fix(joypad): fix bug where gameboy overwrites read only bits

This commit is contained in:
2021-05-03 23:37:30 -05:00
parent 4abb2833c4
commit 5a59c31b72
2 changed files with 11 additions and 7 deletions

View File

@@ -243,7 +243,7 @@ impl Bus {
0xFF00..=0xFF7F => {
// IO Registers
match addr {
0xFF00 => self.joypad.status = byte.into(),
0xFF00 => self.joypad.status.update(byte),
0xFF01 => self.serial.next = byte,
0xFF02 => self.serial.control = byte.into(),
0xFF04 => self.timer.divider = 0x00,