Skip to content

Commit

Permalink
msx: fix conflicts between rom and scc with KonamiSCC mapper
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeUsher committed Oct 18, 2023
1 parent 5f55b6c commit 88a14fb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ares/msx/cartridge/board/konami-scc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ struct KonamiSCC : Interface {
if(address >= 0x0000 && address <= 0x1fff) data = rom.read(bank[2] << 13 | (n13)address);
if(address >= 0x2000 && address <= 0x3fff) data = rom.read(bank[3] << 13 | (n13)address);

//scc is mapped in bank 0x3f for 98xx-98ff
if(bank[2].bit(0, 5) != 0x3f) return data;

address.bit(8) = 0; //SCC ignores A8

if(address >= 0x9800 && address <= 0x981f) {
Expand Down Expand Up @@ -88,6 +91,9 @@ struct KonamiSCC : Interface {
if(address >= 0x9000 && address <= 0x97ff) bank[2] = data;
if(address >= 0xb000 && address <= 0xb7ff) bank[3] = data;

//scc is mapped in bank 0x3f for 98xx-98ff
if(bank[2].bit(0, 5) != 0x3f) return;

address.bit(8) = 0; //SCC ignores A8

if(address >= 0x9800 && address <= 0x981f && !test.bit(6)) {
Expand Down

0 comments on commit 88a14fb

Please sign in to comment.