A7800Hawk; Misc bug fixes

This commit is contained in:
alyosha-tas 2021-11-08 17:53:34 -05:00
parent 946e088950
commit 3674824889
6 changed files with 30 additions and 2 deletions

View File

@ -29,6 +29,7 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk
ser.Sync(nameof(RAM), ref RAM, false);
ser.Sync(nameof(RAM_6532), ref RAM_6532, false);
ser.Sync(nameof(hs_bios_mem), ref hs_bios_mem, false);
ser.Sync(nameof(_hsram), ref _hsram, false);
ser.Sync(nameof(cycle), ref cycle);
ser.Sync(nameof(cpu_cycle), ref cpu_cycle);

View File

@ -30,11 +30,11 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk
public byte[] RAM = new byte[0x1000];
public byte[] RAM_6532 = new byte[0x80];
public byte[] hs_bios_mem = new byte[0x800];
public byte[] _hsram = new byte[2048];
public readonly byte[] _rom;
public readonly byte[] _hsbios;
public readonly byte[] _bios;
public readonly byte[] _hsram = new byte[2048];
private int _frame = 0;

View File

@ -45,7 +45,14 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk
public byte Read(IController c)
{
return 0;
byte result = 0xF;
if (PortNum == 1)
{
result = (byte)(result << 4);
}
return result;
}
public byte ReadFire(IController c)

View File

@ -191,6 +191,9 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk
Timer.Value = 0x73;
Timer.PrescalerShift = 10;
Timer.PrescalerCount = 1 << Timer.PrescalerShift;
Timer.InterruptEnabled = false;
Timer.InterruptFlag = false;
Timer.Overflowed = false;
_ddRa = 0x00;
_ddRb = 0x00;

View File

@ -26,6 +26,9 @@
_capCharging = false;
AudioClocks = 0;
_doTicks = false;
BusState = 0;
AUD[0].Reset();
AUD[1].Reset();
}
// Execute TIA cycles

View File

@ -204,6 +204,20 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk
ser.Sync(nameof(freqcnt), ref freqcnt);
ser.Sync(nameof(on), ref on);
}
public void Reset()
{
AUDC = 0;
AUDF = 1;
AUDV = 0;
sr1 = true;
sr4 = 0x0f;
sr5 = 0x1f;
sr9 = 0x1ff;
sr3 = 2;
freqcnt = 0;
on = true;
}
}
}
}