X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=gp2x%2Fmain.c;h=61579cfd3f5f22a1487b48b2c014bfe5c31fb44f;hb=576fc637929cdfc92884e2e92c6c22e002cfb000;hp=f21ebd78f3d8f1af96d6ed5c89fcfad989bc0622;hpb=720ee7f6244cb51cc123a7fd16832161db9a3b4d;p=libpicofe.git diff --git a/gp2x/main.c b/gp2x/main.c index f21ebd7..61579cf 100644 --- a/gp2x/main.c +++ b/gp2x/main.c @@ -12,6 +12,7 @@ #include "gp2x.h" #include "menu.h" #include "emu.h" +#include "940ctl.h" #include "version.h" #include "squidgehack.h" @@ -86,14 +87,15 @@ int main(int argc, char *argv[]) mmuhack_status = ret; } cpuctrl_init(); - Reset940(1); - Pause940(1); + // Reset940(1); + // Pause940(1); if (currentConfig.EmuOpt&0x100) { printf("setting RAM timings.. "); fflush(stdout); // craigix: --trc 6 --tras 4 --twr 1 --tmrd 1 --trfc 1 --trp 2 --trcd 2 set_RAM_Timings(6, 4, 1, 1, 1, 2, 2); printf("done.\n"); fflush(stdout); } + sharedmem_init(); emu_Init(); engineState = PGS_Menu; @@ -118,13 +120,16 @@ int main(int argc, char *argv[]) } break; + case PGS_RestartRun: + engineState = PGS_Running; + case PGS_Running: emu_Loop(); break; case PGS_Quit: goto endloop; - + default: printf("engine got into unknown state (%i), exitting\n", engineState); goto endloop; @@ -134,6 +139,7 @@ int main(int argc, char *argv[]) endloop: emu_Deinit(); + sharedmem_deinit(); cpuctrl_deinit(); gp2x_deinit(); if(mmuhack_status)