Added H Counter to try and fix Sonic demo - didn't work

This commit is contained in:
2026-05-16 20:26:13 +01:00
parent b1ff22c9e6
commit f1140fa115
2 changed files with 24 additions and 1 deletions

View File

@@ -25,7 +25,11 @@ namespace Core.Io
// VDP V-Counter (Vertical Scanline Position)
return VideoProcessor.ReadVCounter();
}
if (lowerPort == 0x7F)
{
// THE FIX: VDP H-Counter (Horizontal Pixel Position)
return VideoProcessor.ReadHCounter();
}
if (lowerPort >= 0x80 && lowerPort <= 0xBF)
{
// Even ports (like 0xBE) are Data. Odd ports (like 0xBF) are Control.