summaryrefslogtreecommitdiff
path: root/genesis.c
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2020-04-02 20:17:08 -0700
committerMichael Pavone <pavone@retrodev.com>2020-04-02 20:17:08 -0700
commit53e926f4dd3187bb0fc5b1d45bfc026839f44d14 (patch)
tree62ebf388327a81c35c5f83f10cd90823c261a143 /genesis.c
parentbeeeda5271442758928dad66ddf8129741d037d8 (diff)
Reading from Z80 bus when Z80 is not bus requested should return open bus. Fixes regression in Metal Sonic Rebooted
Diffstat (limited to 'genesis.c')
-rw-r--r--genesis.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/genesis.c b/genesis.c
index 6b6ba13..c6dc8c0 100644
--- a/genesis.c
+++ b/genesis.c
@@ -888,7 +888,8 @@ static uint8_t io_read(uint32_t location, m68k_context * context)
value = 0xFF;
}
} else {
- value = 0xFF;
+ uint16_t word = get_open_bus_value(&gen->header);
+ value = location & 1 ? word : word >> 8;
}
} else {
if (location < 0x10100) {