Skip to content

Commit

Permalink
[CPCHawk] Fixed high-impedence returns
Browse files Browse the repository at this point in the history
  • Loading branch information
Asnivor committed Oct 1, 2024
1 parent 5905fc7 commit 6309ee5
Show file tree
Hide file tree
Showing 11 changed files with 153 additions and 190 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public override void Clock()
{
base.Clock();

var maxScanLine = 0;
int maxScanLine;

if (HCC == R0_HorizontalTotal)
{
Expand Down Expand Up @@ -204,7 +204,7 @@ public override void Clock()


/* Address Generation */
var line = VLC;
int line = VLC;

if (R8_Interlace == 3)
{
Expand Down Expand Up @@ -244,7 +244,7 @@ public override void Clock()
/// </summary>
protected override bool ReadRegister(ref int data)
{
bool addressed = false;
bool addressed;

switch (AddressRegister)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public override void Clock()
{
base.Clock();

var maxScanLine = 0;
int maxScanLine;

if (HCC == R0_HorizontalTotal)
{
Expand Down Expand Up @@ -209,7 +209,7 @@ public override void Clock()


/* Address Generation */
var line = VLC;
int line = VLC;

if (R8_Interlace == 3)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public override void Clock()
{
base.Clock();

var maxScanLine = 0;
int maxScanLine;

if (HCC == R0_HorizontalTotal)
{
Expand Down Expand Up @@ -206,7 +206,7 @@ public override void Clock()


/* Address Generation */
var line = VLC;
int line = VLC;

if (R8_Interlace == 3)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public override void Clock()
{
base.Clock();

var maxScanLine = 0;
int maxScanLine;

if (HCC == R0_HorizontalTotal)
{
Expand Down Expand Up @@ -204,7 +204,7 @@ public override void Clock()


/* Address Generation */
var line = VLC;
int line = VLC;

if (R8_Interlace == 3)
{
Expand Down Expand Up @@ -279,8 +279,6 @@ protected override bool ReadRegister(ref int data)
/// </summary>
protected override void WriteRegister(int data)
{
byte v = (byte)data;

byte v3 = (byte)data;
switch (AddressRegister)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public override void Clock()
{
base.Clock();

var maxScanLine = 0;
int maxScanLine;

if (HCC == R0_HorizontalTotal)
{
Expand Down Expand Up @@ -205,7 +205,7 @@ public override void Clock()


/* Address Generation */
var line = VLC;
int line = VLC;

if (R8_Interlace == 3)
{
Expand Down Expand Up @@ -280,8 +280,6 @@ protected override bool ReadRegister(ref int data)
/// </summary>
protected override void WriteRegister(int data)
{
byte v = (byte)data;

byte v3 = (byte)data;
switch (AddressRegister)
{
Expand Down
20 changes: 7 additions & 13 deletions src/BizHawk.Emulation.Cores/Computers/AmstradCPC/Hardware/CRTC.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,14 @@ public abstract partial class CRTC : IPortIODevice
/// </summary>
public static CRTC Create(int crtcType)
{
switch (crtcType)
return crtcType switch
{
case 0:
return new CRTC_Type0();
case 1:
default:
return new CRTC_Type1();
case 2:
return new CRTC_Type2();
case 3:
return new CRTC_Type3();
case 4:
return new CRTC_Type4();
}
0 => new CRTC_Type0(),
2 => new CRTC_Type2(),
3 => new CRTC_Type3(),
4 => new CRTC_Type4(),
_ => new CRTC_Type1(),
};
}


Expand Down
Loading

0 comments on commit 6309ee5

Please sign in to comment.