Using a section is a decent way of doing it. You could also pad the rom.
Why do you need a specific address in the rom? Perhaps you can change the code to avoid needing a fixed address. That would be the "best" way to handle it.
ah ah!
no...
I wrote a function that need to be added at a 0xFFB20 (free space in rom) and call it from an existing function (where I added the jsr $FFB20)
This function is fully written in asm... hopefully lot of you shared pure asm code I used to learn
I know functions wrote on asm are 'address dependant' (ex: thing like bra nearFunc became bra +=4 and not bra $233DD) so I prefer to code it at the correct address while testing so I could copy/paste the final binary from my test rom to hack rom
It's what I did : I successfully added 6 pad support to a 3 pad only game
more coming soon
You should declare you procedure in another section and then set base address of this section during linking. I don't familiar with linker options, all I know is how to assemble files with GNU toolchain. Something like this:
KanedaFr wrote:ah ah!
no...
I wrote a function that need to be added at a 0xFFB20 (free space in rom) and call it from an existing function (where I added the jsr $FFB20)
This function is fully written in asm... hopefully lot of you shared pure asm code I used to learn
I know functions wrote on asm are 'address dependant' (ex: thing like bra nearFunc became bra +=4 and not bra $233DD) so I prefer to code it at the correct address while testing so I could copy/paste the final binary from my test rom to hack rom
It's what I did : I successfully added 6 pad support to a 3 pad only game
more coming soon