I'm playing around with some GxROM-based mappers just to find the right one with the most features which fits my needs. Currently having success developing in C and using plain GNROM from emulators.
But I'm a bit concerned about bus conflicts in real hardware. Here's my lame bankswitching code which won't protect you against anything:
(This is copied along all PRG-ROMs so it works great).
I understand that, in order to prevent bus conflicts, you have to write to a ROM address with the same value. I know of this technique which I have used for CNROMs as it just needs a table with 4 values.
Using the same technique for GxROMs would be kinda overkill, I would need a table with 256 values. Am I right? (I have 256 bytes to spare, but I was just wondering if there was a better way?)
And a related question: do GxROM-like mappers such as iNes #140 (Jaleco) which map the register to $6000 avoid such BUS conflicts?
But I'm a bit concerned about bus conflicts in real hardware. Here's my lame bankswitching code which won't protect you against anything:
Code:
.segment "ROMJUMPER"
_change_rom:
lda #0
sta PPU_MASK
sta PPU_CTRL
lda $0300
sta $8000
jmp start
_change_rom:
lda #0
sta PPU_MASK
sta PPU_CTRL
lda $0300
sta $8000
jmp start
(This is copied along all PRG-ROMs so it works great).
I understand that, in order to prevent bus conflicts, you have to write to a ROM address with the same value. I know of this technique which I have used for CNROMs as it just needs a table with 4 values.
Code:
; A = bank to swap
tax
sta SwapTable, X
rts
SwapTable:
db $0, $1, $2, $3
tax
sta SwapTable, X
rts
SwapTable:
db $0, $1, $2, $3
Using the same technique for GxROMs would be kinda overkill, I would need a table with 256 values. Am I right? (I have 256 bytes to spare, but I was just wondering if there was a better way?)
And a related question: do GxROM-like mappers such as iNes #140 (Jaleco) which map the register to $6000 avoid such BUS conflicts?