Skip to content

Commit

Permalink
Update 15.cpp
Browse files Browse the repository at this point in the history
changes in accordance to the reverse-engineered mapper schematics:
- changed bank mode 1 mapping CPU $C000-$DFFF from "fixed to last bank" to "B OR 7" to support multiple 128KiB UNROM games in one cart
- latch D.7 bit ignored outside bank mode 2
- fixed latch D.6 bit interpreted as bank number bit
  • Loading branch information
norill authored Oct 2, 2019
1 parent 8b1c405 commit 5ca7f60
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/boards/15.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,20 @@ static void Sync(void) {
switch (latchea & 3) {
case 0:
for (i = 0; i < 4; i++)
setprg8(0x8000 + (i << 13), (((latched & 0x7F) << 1) + i) ^ (latched >> 7));
setprg8(0x8000 + (i << 13), ((latched & 0x3F) << 1) + i);
break;
case 2:
for (i = 0; i < 4; i++)
setprg8(0x8000 + (i << 13), ((latched & 0x7F) << 1) + (latched >> 7));
setprg8(0x8000 + (i << 13), ((latched & 0x3F) << 1) + (latched >> 7));
break;
case 1:
case 3:
for (i = 0; i < 4; i++) {
unsigned int b;
b = latched & 0x7F;
b = latched & 0x3F;
if (i >= 2 && !(latchea & 0x2))
b = 0x7F;
setprg8(0x8000 + (i << 13), (i & 1) + ((b << 1) ^ (latched >> 7)));
b = b | 0x07;
setprg8(0x8000 + (i << 13), (i & 1) + (b << 1));
}
break;
}
Expand Down

0 comments on commit 5ca7f60

Please sign in to comment.