colinvella wrote:
the game Akumajou Special - Boku Dracula-kun (Japan), which uses mapper 23, seems to write to $8FFF and $AFFF in what seems to be an attempt to write to some PRG registers.
Akumajou Special is a VRC4e.
It is not an "attempt", because VRC4 has CPUA14-12, /ROMSEL (effectively CPU/A15) and for the e-variant board, CPUA2-3 connected…not A0-1 nor A4-11. So, of the sixteen address bits in 16'h8fff (16'b1000_1111_1111_1111), it only cares about six of them (16'b1000_xxxx_xxxx_11xx), which is the same pattern that 16'h800c is (16'b1000_0000_0000_1100). And, as happens, the 8xxx region
is agnostic to the two low address lines, it's all PRG-select-0.
Masking by $F003 for all of mapper 23 will make for other problems, because VRC4e would more-appropriately mask $F00C. (and masking $F00C would probably break the VRC2b, as they're using A1,A0.)
So, if it writes the CHR-bank registers 1,3,5,7 ($B-Exx8/C), your mask is instead treating it as a write to CHR-bank registers 0,2,4,6 ($B-Exx0).Real Solution: use submappers, or in their absence, checksums. (The link above includes those for known games.)
(edited, see bolded section for likely reason why CHR is now misbanked)