Posted By
Harry Potter on 2022-03-11 10:49:55
| Re: MemBankP4/cc65: demo prg won't load data to expansion RAM
Oops, I forgot the memory-writing code: ------------------------------ .segment "LOWCODE"
_bank1_writebyte: ;jsr popa pha jsr popax sta ptr1 stx ptr1+1 pla ldy #0 jmp bank1_writebytedirect _bank1_writeword: ;jsr popax pha stx tmp1 jsr popax sta ptr1 stx ptr1+1 pla ldx tmp1 jmp bank1_writeworddirect
.segment "MEMBANK"
bank1_writebytedirect: ;sta $FF02 pha lda #$2 sta $FD16 pla sta (ptr1),y lda #$3 sta $FD16 rts
bank1_writeworddirect: pha lda #$2 sta $FD16 pla sta $FF02 sta (ptr1),y iny txa sta (ptr1),y lda #$3 sta $FD16 rts
|