this is a non issue, copying 62k (not 64k, because you have to copy to $800) takes 1 second anyway.
You also don't consider that you have to reserve about $100 bytes in bank 0 to actually store the crt init routine + the relocation code, and that you're not actually copying 64k but 62 max ($800-ffff), so every bank need to copy a variable amount of bytes. Not counting that you have to switch roms off when you write, else you will make a mess when copying to $d000. =)
A cart that support 4x16kb banks is Supergames, this is a quick example how to use it. Refer to CRT.txt or your cart documentation on how to switch banks and turn off the cart completely after you're done relocating.
http://iancoog.altervista.org/...es_crt.rar
| Code: |
; copy from 64kcart rom, 4x16kb banks to $0800-$ffff (62kb usable)
; using Supergames type cart
trbuff=$0334
bank=$02
gameinit=$080d
*=$8000
word start
word start
hex c3 c2 cd 38 30
start
jsr $fda3
jsr $fd50
jsr $fd15
jsr $ff5b
cli
ldx #$ff
txs
inx
stx $d011
stx $d020
stx $d021
lda #$c8
sta $d016
lda #$15
sta $d018
lda #$79
sta $d019
lda #$f0
sta $d01a
ldy #$00
lp1
lda reloc,y
sta trbuff,y
iny
cpy #[endreloc-reloc+1]
bne lp1
jmp trbuff
; this is relocated to $0334
reloc
rorg trbuff
sei
ldx #$0
stx bank
; 1st bank is NOT copied from $8000 but, let's say from $8100, because
; you have to put init code and this copy routine at $8000 in bank 0
; hence from $8000-80ff it's reserved
mainloop
stx $df00 ; set cart bank
ldy blocklen,x
ldx #$00
inloop
ptr1=*+2
lda $8100,x
inc $01
ptr2=*+2
sta $0800,x
dec $01
inx
bne inloop
inc ptr1
inc ptr2
dey
bne inloop
lda #$80 ; reset ptr1 to $8000, ptr2 is already pointing correctly
sta ptr1
inc bank
ldx bank
cpx #4
bne mainloop
exitloop
lda #$0c ; disable cart (supergames), your cart may vary, check crt.txt
sta $df00
cli
jmp gameinit
blocklen byte $3f,$40,$40,$39
rend
endreloc
*=$8100
byte 0 ; this is byte $0800, usually game prgs are at $0801
incprg yourgame.prg
endofgame
ds [endofcart-endofgame],$ff ; fill rest of the ROM with $ff
*=$18000
endofcart
|
_________________
-=[]=--- iAN CooG/HVSC & C64Intros ---=[]=-