PCE: Fix timer issue causing Battle Royale to break
This commit is contained in:
parent
5c9ee84ed4
commit
d211a6d3c5
|
@ -228,6 +228,15 @@ namespace BizHawk.Emulation.CPUs.H6280
|
|||
TimerEnabled = (value & 1) == 1;
|
||||
}
|
||||
|
||||
public byte ReadTimerValue()
|
||||
{
|
||||
if (TimerTickCounter + 5 > 1024)
|
||||
{
|
||||
return (byte) ((TimerValue - 1) & 0x7F);
|
||||
}
|
||||
return TimerValue;
|
||||
}
|
||||
|
||||
// ==== Flags ====
|
||||
|
||||
/// <summary>Carry Flag</summary>
|
||||
|
|
|
@ -11,7 +11,6 @@ General:
|
|||
|
||||
Air Zonk - Fully playable, doesn't freeze, but some gfx/timing issues
|
||||
Battle Ace - Some gfx glitches
|
||||
Battle Royale - STILLL Doesnt boot
|
||||
Chase HQ - Press start -"O" sprite gets left on screen. probably timing on SATB DMA
|
||||
Cross Wiber - Minor; Raster on wrong line
|
||||
Davis Cup Tennis - Some timing issue, splash screen is too slow
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
if (addr < 0x1FE400) return VDC1.ReadVDC(addr);
|
||||
if (addr < 0x1FE800) { Cpu.PendingCycles--; return VCE.ReadVCE(addr); }
|
||||
if (addr < 0x1FEC00) return IOBuffer;
|
||||
if (addr < 0x1FF000) { IOBuffer = (byte) (Cpu.TimerValue | (IOBuffer & 0x80)); return IOBuffer; }
|
||||
if (addr < 0x1FF000) { IOBuffer = (byte) (Cpu.ReadTimerValue() | (IOBuffer & 0x80)); return IOBuffer; }
|
||||
if (addr >= 0x1FF000 &&
|
||||
addr < 0x1FF400) { IOBuffer = ReadInput(); return IOBuffer; }
|
||||
if ((addr & ~1) == 0x1FF400) return IOBuffer;
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
if (addr < 0x1FE800) { Cpu.PendingCycles--; return VCE.ReadVCE(addr); }
|
||||
if (addr < 0x1FEC00) return IOBuffer;
|
||||
if (addr < 0x1FF000) { IOBuffer = (byte)(Cpu.TimerValue | (IOBuffer & 0x80)); return IOBuffer; }
|
||||
if (addr < 0x1FF000) { IOBuffer = (byte)(Cpu.ReadTimerValue() | (IOBuffer & 0x80)); return IOBuffer; }
|
||||
if (addr >= 0x1FF000 &&
|
||||
addr < 0x1FF400) { IOBuffer = ReadInput(); return IOBuffer; }
|
||||
if ((addr & ~1) == 0x1FF400) return IOBuffer;
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
if (addr < 0x1FE400) return VDC1.ReadVDC(addr);
|
||||
if (addr < 0x1FE800) { Cpu.PendingCycles--; return VCE.ReadVCE(addr); }
|
||||
if (addr < 0x1FEC00) return IOBuffer;
|
||||
if (addr < 0x1FF000) { IOBuffer = (byte) (Cpu.TimerValue | (IOBuffer & 0x80)); return IOBuffer; }
|
||||
if (addr < 0x1FF000) { IOBuffer = (byte) (Cpu.ReadTimerValue() | (IOBuffer & 0x80)); return IOBuffer; }
|
||||
if (addr >= 0x1FF000 &&
|
||||
addr < 0x1FF400) { IOBuffer = ReadInput(); return IOBuffer; }
|
||||
if ((addr & ~1) == 0x1FF400) return IOBuffer;
|
||||
|
|
Loading…
Reference in New Issue