I'm confused about how the PC is loaded if I do a JML or JSL. If I understand the mapping correctly, it means that
And so on. How do absolute long jumps then work? Let's say I tell my assembler to place my reset routine at ROM $00:0000 and my drawing at ROM $01:0000. So If I write
This will become
But loading $010000 into the PC of the SNES will point me to the RAM mirror in SNES $01:0000 - which is wrong. How do I adjust this?
I work with cc65, so I guess it would me possibly to write a memory config for the linker that would adjust the addresses of the subroutines accordingly, but that seems somehow too convoluted to me. So again the question, how do I jump between pages/bankes? Assuming I do not want to use the SNES banks $0C or higher.
Code:
SNES Address ROM Address
$00:8000 $00:0000
$01:8000 $00:8000
$02:8000 $01:0000
.
.
.
$00:8000 $00:0000
$01:8000 $00:8000
$02:8000 $01:0000
.
.
.
And so on. How do absolute long jumps then work? Let's say I tell my assembler to place my reset routine at ROM $00:0000 and my drawing at ROM $01:0000. So If I write
Code:
Reset:
; some code
jsl DrawRoutine
; more code
; some code
jsl DrawRoutine
; more code
This will become
Code:
jsl $010000
But loading $010000 into the PC of the SNES will point me to the RAM mirror in SNES $01:0000 - which is wrong. How do I adjust this?
I work with cc65, so I guess it would me possibly to write a memory config for the linker that would adjust the addresses of the subroutines accordingly, but that seems somehow too convoluted to me. So again the question, how do I jump between pages/bankes? Assuming I do not want to use the SNES banks $0C or higher.