GodMode9/source/main.c
Wolfvak 8a4597635d Potentially fix screen init on some systems
Sanitized I2C
Reorganized the memory layout
 - Moved GM9 to ARM9 RAM
 - Increased RAMdisk size to 88MiB
2017-09-26 19:56:19 -03:00

27 lines
522 B
C

#include "godmode.h"
#include "power.h"
#include "pxi.h"
#include "i2c.h"
void main(int argc, char** argv)
{
(void) argv; // unused for now
// Wait for ARM11
PXI_WaitRemote(PXI_READY);
PXI_DoCMD(PXI_SCREENINIT, NULL, 0);
I2C_writeReg(I2C_DEV_MCU, 0x22, 0x2A);
#ifdef AUTORUN_SCRIPT
// Run the script runner
if (ScriptRunner(argc) == GODMODE_EXIT_REBOOT)
#else
// Run the main program
if (GodMode(argc) == GODMODE_EXIT_REBOOT)
#endif
Reboot();
PowerOff();
}