For a prototype build of a game I'm working on, $gp is getting set to 0x800C9780, but the correct value is 0x800B9780.
$800C9780 is in the middle of the .bss section, while $800B9780 is the start of the '.sdata' function. Using a debugger, it seems like every function I've tested is using 0x800B9780 and not 0x800B9780.
I'm a little surprised I didn't notice this sooner, but ghidra_psx_loader does not detect the correct $gp value.
I suspect the issue is in this code, but it could get in the other $gp detection too. https://github.com/lab313ru/ghidra_psx_ldr/blob/410b1a4f73edc5d31d37e7c28f5b165181f4c22b/src/main/java/psyq/PsyqLoader.java#L639-L662
For a prototype build of a game I'm working on, $gp is getting set to 0x800C9780, but the correct value is 0x800B9780. $800C9780 is in the middle of the .bss section, while $800B9780 is the start of the '.sdata' function. Using a debugger, it seems like every function I've tested is using 0x800B9780 and not 0x800B9780.
Game: Frogger (SLUS0506) PROTOTYPE (Build 50b) PsyQ Ver: 4.0