X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=gp2x%2Fmain.c;h=13eb5a8e63ea97ff55f01967109a653bc3091b76;hb=c7a4ff64287b12487c7e9cc13ce3b7d2aa6e1f06;hp=5422b2b650a7c529fe8bd1ab77b4c6936e3510b2;hpb=8dfb9fd5df1ccef9f8aba43cfed8be82c822f512;p=libpicofe.git diff --git a/gp2x/main.c b/gp2x/main.c index 5422b2b..13eb5a8 100644 --- a/gp2x/main.c +++ b/gp2x/main.c @@ -11,7 +11,9 @@ #include "gp2x.h" #include "menu.h" +#include "../common/menu.h" #include "emu.h" +#include "940ctl.h" #include "version.h" #include "squidgehack.h" @@ -62,7 +64,7 @@ void parse_cmd_line(int argc, char *argv[]) } if (unrecognized) { - printf("\n\n\nPicoDrive v" VERSION " (c) notaz, 2006\n"); + printf("\n\n\nPicoDrive v" VERSION " (c) notaz, 2006-2007\n"); printf("usage: %s [options] [romfile]\n", argv[0]); printf( "options:\n" "-menu launch a custom program on exit instead of default gp2xmenu\n" @@ -78,7 +80,7 @@ int main(int argc, char *argv[]) { g_argv = argv; - emu_ReadConfig(0); + emu_ReadConfig(0, 0); gp2x_init(); if (currentConfig.EmuOpt&0x10) { int ret = mmuhack(); @@ -94,7 +96,9 @@ int main(int argc, char *argv[]) set_RAM_Timings(6, 4, 1, 1, 1, 2, 2); printf("done.\n"); fflush(stdout); } + sharedmem_init(); emu_Init(); + menu_init(); engineState = PGS_Menu; @@ -118,6 +122,9 @@ int main(int argc, char *argv[]) } break; + case PGS_RestartRun: + engineState = PGS_Running; + case PGS_Running: emu_Loop(); break; @@ -134,6 +141,7 @@ int main(int argc, char *argv[]) endloop: emu_Deinit(); + sharedmem_deinit(); cpuctrl_deinit(); gp2x_deinit(); if(mmuhack_status)