Everything works great now. Phantasy Star loads and plays

This commit is contained in:
2026-05-14 23:30:26 +01:00
parent a9b15ee113
commit c416bea9ac
2 changed files with 105 additions and 11 deletions

View File

@@ -43,19 +43,16 @@ namespace Core.Io
{
byte lowerPort = (byte)(port & 0xFF);
// Audio Ports
if (lowerPort == 0x7E || lowerPort == 0x7F)
{
AudioProcessor.WritePort7F(value);
}
// Video Ports
else if (lowerPort == 0xBE)
// THE FIX: Video Ports are mirrored across the entire 0x80 to 0xBF range!
else if (lowerPort >= 0x80 && lowerPort <= 0xBF)
{
VideoProcessor.WriteDataPort(value);
}
else if (lowerPort == 0xBF)
{
VideoProcessor.WriteControlPort(value);
// Even ports are Data, Odd ports are Control
if ((lowerPort & 0x01) == 0) VideoProcessor.WriteDataPort(value);
else VideoProcessor.WriteControlPort(value);
}
else if (lowerPort <= 0x3F)
{