mirror of
https://github.com/mattrberry/crab.git
synced 2025-02-03 08:48:25 +01:00
patch up additional registers that don't read open bus
this makes all mgba suite io tests pass
This commit is contained in:
parent
2fe794edba
commit
30f6597676
1 changed files with 6 additions and 3 deletions
|
@ -12,7 +12,7 @@ module GBA
|
|||
when 0x060..0x0A7 then @gba.apu[io_addr]
|
||||
when 0x0B0..0x0DF then @gba.dma[io_addr]
|
||||
when 0x100..0x10F then @gba.timer[io_addr]
|
||||
when 0x120..0x12B, 0x134..0x159 # todo: serial
|
||||
when 0x120..0x12B, 0x134..0x15B # todo: serial
|
||||
if io_addr == 0x135
|
||||
0x80_u8
|
||||
else
|
||||
|
@ -22,7 +22,10 @@ module GBA
|
|||
when 0x200..0x203,
|
||||
0x208..0x209 then @gba.interrupts[io_addr]
|
||||
when 0x204..0x205 then @waitcnt.read_byte(io_addr & 1)
|
||||
else @gba.bus.read_open_bus_value(io_addr)
|
||||
when 0x206..0x207,
|
||||
0x20A..0x20B,
|
||||
0x302..0x303 then 0_u8 # do not read open bus
|
||||
else @gba.bus.read_open_bus_value(io_addr)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -33,7 +36,7 @@ module GBA
|
|||
when 0x060..0x0A7 then @gba.apu[io_addr] = value
|
||||
when 0x0B0..0x0DF then @gba.dma[io_addr] = value
|
||||
when 0x100..0x10F then @gba.timer[io_addr] = value
|
||||
when 0x120..0x12B, 0x134..0x159 # todo: serial
|
||||
when 0x120..0x12B, 0x134..0x15B # todo: serial
|
||||
when 0x130..0x133 then @gba.keypad[io_addr] = value
|
||||
when 0x200..0x203,
|
||||
0x208..0x209 then @gba.interrupts[io_addr] = value
|
||||
|
|
Loading…
Add table
Reference in a new issue