diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2019-06-26 19:47:30 -0400 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2019-06-26 19:47:30 -0400 |
commit | 5d268f0acf7ecc320423b0c9bff18e125015b4c3 (patch) | |
tree | 52ce08a521e03a38a2474c029d3222e4dfe45328 /src/main.c | |
parent | 4fedd5183be7de5d5e0fa59c269b28c49d88ef88 (diff) |
Make Ruby compile with gcc-8
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c index d7ef91df0..75845213f 100644 --- a/src/main.c +++ b/src/main.c @@ -89,7 +89,14 @@ static void WaitForVBlank(void); void AgbMain() { +#if MODERN + // Modern compilers are liberal with the stack on entry to this function, + // so RegisterRamReset may crash if it resets IWRAM. + RegisterRamReset(RESET_ALL & ~RESET_IWRAM); + DmaFill32(3, 0, (void *)0x03000000, 0x7E00); +#else RegisterRamReset(RESET_ALL); +#endif //MODERN REG_WAITCNT = WAITCNT_PREFETCH_ENABLE | WAITCNT_WS0_S_1 | WAITCNT_WS0_N_3; InitKeys(); InitIntrHandlers(); |