Be careful with that: what looks like free room could be just the BSS section of the exe, which is cleared as soon as the BIOS jumps to the stub function.
Ok, well I did test it quite far into the game, and after doing a memory dump the data I'd written was still there. It looks like a lot of that space is left untouched for the whole game. I have yet to test a bunch of other conditions that might affect it, as well as different BIOS versions, but I think it should still work fine?
Question: how do you usually go about injecting extra calls, or adding functionality to a game? Because it seems to me that after a while you'd need to start finding free space in ram to upload the new functions to, or write at least the code required to upload the functions to ram in the free space of the SPLS file.
Also, is there a PsyQ function or whatever that loads a sector from the cdrom? The game doesn't seem to just have one function that uploads stuff from the cd. I've been doing all my hacks in assembly up till now, and I can't get stuff to load from the cd.
What I tried is:
write 0 to 1f801800
write the MSF to 1f801802 as a sequence of bytes
write 2 to 1f801801
write address to write to in ram to 1f8010b0
write 00010200 to 1f8010b4 (number of blocks and block size)
write 11000000 to 1f8010b8
but it apparently just re-uploads the previously loaded sector to the specified address in ram.