Skip to content

Commit

Permalink
[MD] Fix control port writes to always set command/address bits
Browse files Browse the repository at this point in the history
This fixes graphical corruption when starting Golden Axe II. All credit to Eke for this fix.
  • Loading branch information
near-san authored and Screwtapello committed Apr 8, 2021
1 parent 9a625c5 commit 029a437
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions higan/md/vdp/io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,17 +151,17 @@ auto VDP::writeControlPort(uint16 data) -> void {
return;
}

//command/address bits are always set here, even for register writes
io.command.bit(0,1) = data.bit(14,15);
io.address.bit(0,13) = data.bit(0,13);

//command write (hi)
if(data.bit(14,15) != 2) {
io.commandPending = true;

io.command.bit(0,1) = data.bit(14,15);
io.address.bit(0,13) = data.bit(0,13);
return;
}

//register write (d13 is ignored)
if(data.bit(14,15) == 2)
switch(data.bit(8,12)) {

//mode register 1
Expand Down

0 comments on commit 029a437

Please sign in to comment.