Mips API
Description
PCSX-Redux has a special API that mips binaries can use :
1 2 3 4 5 6 7 |
|
The API needs DEV8/EXP2 (1f802000 to 1f80207f), which holds the hardware register for the bios POST status, to be expanded to 1f8020ff.
Thus the need to use a custom crt0.s
if you plan on running your code on real hardware.
The default file provided with the Nugget+PsyQ development environment does that:
1 2 3 4 5 6 7 8 9 10 11 |
|
Functions
The following functions are available :
Function | Usage |
---|---|
pcsx_putc(int c) |
Print ASCII character with code c to console/stdout. |
pcsx_debugbreak() |
Break execution (Pause emulation). |
pcsx_execSlot(uint8_t slot) |
Executes Lua function at PCSX.execSlots[slot] . The slot value can be between 1 and 255. If no Lua function exists within a slot, then this behaves the same as pcsx_debugbreak() . |
pcsx_exit(int code) |
Exit emulator and forward code as exit code. |
pcsx_message(const char* msg) |
Create a UI dialog displaying msg |
pcsx_present() |
Returns 1 if code is running in PCSX-Redux |
Example of a UI dialog created with pcsx_message()
: