I decided to make patch for game `Bio Senshi Dan - Increaser tono Tatakai` so that it can be ported
from mapper #140 to something more popular to be playable on flashcarts/multicarts which support limited number of mappers.
As this game switches PRG in 32kB chunks and CHR in 8kB chunks, MMC1 was the only choice.
This game writes to $6000 register:
* Via opcode STA $6000 = 8D 00 60, in six places in each of its PRG banks at offsets:
fe19, fe31, fe6f, fe76, fec8, fedd,
* Via opcode STX $6000 = 8E 00 60, in one place in each of its PRG banks at offset:
feb6
I found a lot of unused space in each PRG bank starting at fee3 and put there 3 routines:
and then I replaced:
* the reset vector with jump to routine 1,
* each of "sta $6000" with "JSR routine2",
* "stx $6000" with "JSR routine3"
Game seems to load fine, but few seconds after start it freezes. I tried to investigate the reason but no luck. Can it be that the longer mmc1 bakn switching routines mess the timing of game?
from mapper #140 to something more popular to be playable on flashcarts/multicarts which support limited number of mappers.
As this game switches PRG in 32kB chunks and CHR in 8kB chunks, MMC1 was the only choice.
This game writes to $6000 register:
* Via opcode STA $6000 = 8D 00 60, in six places in each of its PRG banks at offsets:
fe19, fe31, fe6f, fe76, fec8, fedd,
* Via opcode STX $6000 = 8E 00 60, in one place in each of its PRG banks at offset:
feb6
I found a lot of unused space in each PRG bank starting at fee3 and put there 3 routines:
Code:
;---------------reset routine----------------routine1:lda #$80sta $8000lda #2 ;mirr=V, PRG=32k, CHR=8kBsta $8000lsrsta $8000lsrsta $8000lsrsta $8000lsrsta $8000jmp $fed1 ;jump to where original RESET vector pointed;--------------sets MMC1's PRG and CHR banks basing on the value of A; A ; PP CCCC;[..fe dcba] ====>;; $a000 $a000 $a000 $a000 $a000 ;[0... ....] [0... ...a] [0... ...b] [0... ...c] [0... ...d] ;; $e000 $e000 $e000 $e000 $e000;[0... ....] [0... ...e] [0... ...f] [0... ....] [0... ....]routine2:pha ;save the original value of Aand #$3f ;clear bit 7 to be sure no write to $a000/$e000 will have this bit setsta $a000 ;bit ignored in 8kB CHR modesta $a000lsrsta $a000lsrsta $a000lsrsta $a000sta $e000 ;bit ignored in 32kB PRG modelsrsta $e000lsrsta $e000lsrsta $e000lsrsta $e000plarts;-----same as above but basing on the value of Xsroutine3:phatxaand #$3fsta $a000sta $a000lsrsta $a000lsrsta $a000lsrsta $a000sta $e000lsrsta $e000lsrsta $e000lsrsta $e000lsrsta $e000plarts
* the reset vector with jump to routine 1,
* each of "sta $6000" with "JSR routine2",
* "stx $6000" with "JSR routine3"
Game seems to load fine, but few seconds after start it freezes. I tried to investigate the reason but no luck. Can it be that the longer mmc1 bakn switching routines mess the timing of game?
Statistics: Posted by krzysiobal — Wed Feb 07, 2024 1:21 am — Replies 2 — Views 109