From a quick look at Nagra's symbol file, there's this:
0x802dd838,??Save...
This is the save dialog after you get a star:
802DDB84: LUI A2, 0x8033
802DDB88: ADDIU A2, A2, 0x1490
802DDB8C: ADDIU A0, R0, 0x0064
802DDB90: ADDIU A1, R0, 0x0056
802DDB94: JAL 0x802DD838
802DDB98: ADDIU A3, R0, 0x0014
This seems be the only instance from where it's called. If somebody wants to try executing it from another point in the game using the header files, add this function in the linker script:
mario64.x (linker script):
in the SECTIONS part, add:
SaveMenu = 0x802DD838;
Prototype it in your mario64.c file:
extern int SaveMenu(u16 argument0, u16 argument1, u32 pointer, u16 argument3)
And try calling it with the same params, ie:
if (Mario->coins == 10)
{
SaveMenu(0x64, 0x56, 0x80331490, 0x14);
}
The 16 arguments are probably x,y positions of the text box. Note that even if this works (I haven't tested), Mario will still probably be able to walk around while the save menu is displayed, as there's a combination of functions that needed to be called in order to stop Mario/the environment around him.
By the way, I am updating the header files with more useful functions and addresses and I'm planning to write some more detailed guides about how to use them, where to hook stuff, etc.
Edit: A PJ64 modification to make it display calls to Epprom functions, perhaps it won't be that difficult to reprogram how the EEPROM is mapped into RAM. |