From 29e6ef31e520575fe90b1d69eba4412823cd156e Mon Sep 17 00:00:00 2001 From: dborth Date: Thu, 2 Oct 2008 05:28:01 +0000 Subject: [PATCH] fix zip loading --- source/ngc/fceugc.c | 2 +- source/ngc/fceuload.c | 4 ++-- source/ngc/fceuload.h | 2 +- source/ngc/filesel.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/source/ngc/fceugc.c b/source/ngc/fceugc.c index 61d0254..8814432 100644 --- a/source/ngc/fceugc.c +++ b/source/ngc/fceugc.c @@ -78,7 +78,7 @@ int main(int argc, char *argv[]) #endif // allocate memory to store rom - nesrom = (unsigned char *)malloc(1024*1024*3); // 3 MB should be plenty + nesrom = (unsigned char *)malloc(1024*1024*2); // 2 MB should be plenty /*** Minimal Emulation Loop ***/ if ( !FCEUI_Initialize() ) { diff --git a/source/ngc/fceuload.c b/source/ngc/fceuload.c index 71eb209..245d1a4 100644 --- a/source/ngc/fceuload.c +++ b/source/ngc/fceuload.c @@ -72,7 +72,7 @@ extern int UNIFLoad(const char *name, FCEUFILE *fp); extern int NSFLoad(FCEUFILE *fp); extern uint8 FDSBIOS[8192]; -int GCMemROM(method) +int GCMemROM(int method, int size) { ResetGameLoaded(); @@ -99,7 +99,7 @@ int GCMemROM(method) InitialisePads(); - MakeFCEUFile((char *)nesrom, filelist[selection].length); + MakeFCEUFile((char *)nesrom, size); nesGameType = 0; diff --git a/source/ngc/fceuload.h b/source/ngc/fceuload.h index c5013f3..6b44b80 100644 --- a/source/ngc/fceuload.h +++ b/source/ngc/fceuload.h @@ -9,4 +9,4 @@ * NES Memory Load Game ****************************************************************************/ -int GCMemROM(int method); +int GCMemROM(int method, int size); diff --git a/source/ngc/filesel.c b/source/ngc/filesel.c index ed6deb8..afa788f 100644 --- a/source/ngc/filesel.c +++ b/source/ngc/filesel.c @@ -300,7 +300,7 @@ int FileSelector (int method) StripExt(romFilename, filelist[selection].filename); ShowAction ((char *)"Loading..."); - + int size = 0; switch (method) @@ -323,7 +323,7 @@ int FileSelector (int method) if (size > 0) { - if(GCMemROM(method) > 0) + if(GCMemROM(method, size) > 0) return 1; else return 0;