This is how it's supposed to play out. Do you have a simulator in your CPLD devkit? Can you feed in a sequence of $5000 and $8000 writes and monitor the output on A19-A14?
Player chooses Jupiter Scope 2
Alternate write $08 to $8531 and $FF to $FFFD until CHR RAM is filled
Code running from RAM
Write $19 to $83DA (outer PRG bank = Jupiter2 and Super Tilt Bro.)
Write $80 to $5000 (mode)
Write $8A to $8000 (mirroring=vertical, mode=UNROM180, outer size=32K)
Write $01 to $5000 (inner PRG bank)
Write $00 to $8000 (inner PRG bank = 0)
Write $81 to $5000 (outer PRG bank)
JMP ($FFFC)
Now running Jupiter Scope 2. A14 is high ($C000-$FFFF), but the output is 16K bank $32 because in UNROM180 mode, $C000-$FFFF is switchable
Play a while
Reset at $BFE0. A14 is low ($8000-$BFFF), and the output on A19-A14 should still be $32.
Write $01 to $5000 (inner PRG bank)
Now 16K bank $33 (Super Tilt Bro.) should be swapped into the top half.
Write $81 to $5000 (outer PRG bank)
JMP ($FFFC)
Now running Super Tilt Bro's exit patch. A14 is high, in 16K bank $33.
Write $81 to $5000 (outer PRG bank)
Write $FF to $8000 (outer PRG bank = $FF)
This changed the outer bank to that of the menu. A14 is high, in 16K bank $3F.
JMP ($FFFC)
Write $81 to $5000 (outer PRG bank)
Write $FF to $8000 (outer PRG bank = $FF)
Write $80 to $5000 (mode)
Write $02 to $8000 (mirroring=vertical, mode=BNROM, outer size=32K)
Now displaying Action 53 title screen
From here, the next steps are as follows:
- Paul tries 8 Mbit builds of Holy Mapperel and test28, which I've attached
- I make 4 Mbit and 8 Mbit ROMs similar to test28 that play this exact write sequence