From 1e892254a706a04d8ee59d383bfdc969af47d7b2 Mon Sep 17 00:00:00 2001 From: dborth Date: Wed, 1 Oct 2008 23:10:30 +0000 Subject: [PATCH] small bug fixes, finalize 2.0.3 --- readme.txt | 24 +++++++++++++++++------- source/ngc/fceuconfig.h | 4 ++-- source/ngc/fileop.c | 7 +++---- source/ngc/fileop.h | 2 +- source/ngc/filesel.c | 25 ++++++++++++++----------- source/ngc/pad.c | 2 +- source/ngc/preferences.c | 6 ++++-- source/ngc/smbop.c | 8 +++++++- source/ngc/smbop.h | 2 +- 9 files changed, 50 insertions(+), 30 deletions(-) diff --git a/readme.txt b/readme.txt index 16b79bd..97c6805 100644 --- a/readme.txt +++ b/readme.txt @@ -1,7 +1,7 @@ ¸,ø¤°`°¤ø,¸¸,ø¤°`°¤ø,¸,ø¤°`°¤ø,¸¸,ø¤°`°¤ø,¸,ø¤°`°¤ø,¸¸,ø¤°`°¤ø,¸,ø¤°`°¤ø,¸¸,ø¤ - FCE Ultra GX - - Version 2.0.2 + Version 2.0.3 (Under GPL License) ¸,ø¤°`°¤ø,¸¸,ø¤°`°¤ø,¸,ø¤°`°¤ø,¸¸,ø¤°`°¤ø,¸,ø¤°`°¤ø,¸¸,ø¤°`°¤ø,¸,ø¤°`°¤ø,¸¸,ø¤ @@ -29,11 +29,12 @@ SNES9x GX and Genesis Plus GX projects. |0O×øo· UPDATE HISTORY ·oø×O0| `¨•¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨' -[What's New 2.0.3] -* VS game support (submitted by pakitovic) -* Complete rewrite of loading code - UNIF / NSF support, FDS games - load but don't run +[What's New 2.0.3 - October 1, 2008] +* Complete rewrite of loading code - FDS / UNIF / NSF support added! +* VS games work (coin insert submitted by pakitovic) +* Mapping of 'Special' commands - VS coin insert, FDS switch disk (default A) * 480p and DVD now available for GameCube +* Improved stability - less crashes! [What's New 2.0.2 - September 19, 2008] * Fixed network freeze-up problem @@ -93,8 +94,8 @@ Loading / Running the Emulator: Wii - Via Homebrew Channel: -------------------- The most popular method of running homebrew on the Wii is through the Homebrew -Channel. If you already have the channel installed, just copy over the apps folder -included in the archive into the root of your SD card. +Channel. If you already have the channel installed, just copy over the apps +folder included in the archive into the root of your SD card. Remember to also create the fceugx directory structure required. See above. @@ -132,6 +133,15 @@ You can load roms from DVD or SD card. If you create a bootable DVD of FCEUGX you can put roms on the same DVD. You may save preferences and game data to SD or Memory Card. +-=[ Famicom Disk System (FDS) ]=- + +FCE Ultra GX supports loading FDS games. The FDS BIOS is required - put it +in your roms folder, and name it disksys.rom (should be 8 KB in size). +You can switch disks using the A button (by default). The mapped button +can be changed under Controller Configuration ('Special' button). +Compatibility is limited, so check that the game in question works on +FCE Ultra 0.98.12 for Windows before asking for help. + -=[ Supported Mappers ]=- Mappers are the way the Nintendo handles switching from ROM/VROM so the more diff --git a/source/ngc/fceuconfig.h b/source/ngc/fceuconfig.h index af5526a..a010c19 100644 --- a/source/ngc/fceuconfig.h +++ b/source/ngc/fceuconfig.h @@ -15,8 +15,8 @@ void DefaultSettings (); -#define VERSIONNUM "2.0.2" -#define VERSIONSTR "FCE Ultra GX 2.0.2" +#define VERSIONNUM "2.0.3" +#define VERSIONSTR "FCE Ultra GX 2.0.3" #define NOTSILENT 0 #define SILENT 1 diff --git a/source/ngc/fileop.c b/source/ngc/fileop.c index f968256..5dc29ed 100644 --- a/source/ngc/fileop.c +++ b/source/ngc/fileop.c @@ -162,7 +162,7 @@ ParseFATdirectory(int method) * LoadFATFile ****************************************************************************/ int -LoadFATFile (char *filename, int length) +LoadFATFile () { char zipbuffer[2048]; char filepath[MAXPATHLEN]; @@ -199,11 +199,10 @@ LoadFATFile (char *filename, int length) { // Just load the file up fseek(handle, 0, SEEK_END); - length = ftell(handle); // get filesize + size = ftell(handle); // get filesize fseek(handle, 2048, SEEK_SET); // seek back to point where we left off memcpy (nesrom, zipbuffer, 2048); // copy what we already read - fread (nesrom + 2048, 1, length - 2048, handle); - size = length; + fread (nesrom + 2048, 1, size - 2048, handle); } fclose (handle); return size; diff --git a/source/ngc/fileop.h b/source/ngc/fileop.h index 5e9052e..d4417b1 100644 --- a/source/ngc/fileop.h +++ b/source/ngc/fileop.h @@ -24,7 +24,7 @@ bool ChangeFATInterface(int method, bool silent); int ParseFATdirectory(int method); -int LoadFATFile (char *filename, int length); +int LoadFATFile (); int SaveBufferToFAT (char *filepath, int datasize, bool silent); int LoadSaveBufferFromFAT (char *filepath, bool silent); int LoadBufferFromFAT (char * buffer, char *filepath, bool silent); diff --git a/source/ngc/filesel.c b/source/ngc/filesel.c index 698e062..ed6deb8 100644 --- a/source/ngc/filesel.c +++ b/source/ngc/filesel.c @@ -300,30 +300,33 @@ int FileSelector (int method) StripExt(romFilename, filelist[selection].filename); ShowAction ((char *)"Loading..."); + + int size = 0; switch (method) { - case METHOD_SD: - case METHOD_USB: - LoadFATFile (filelist[selection].filename, - filelist[selection].length); + case METHOD_SD: + case METHOD_USB: + size = LoadFATFile(); break; - case METHOD_DVD: + case METHOD_DVD: dvddir = filelist[selection].offset; dvddirlength = filelist[selection].length; - LoadDVDFile (nesrom); + size = LoadDVDFile(nesrom); break; - case METHOD_SMB: - LoadSMBFile (filelist[selection].filename, - filelist[selection].length); + case METHOD_SMB: + size = LoadSMBFile(); break; } - if (GCMemROM(method) > 0) + if (size > 0) { - return 1; + if(GCMemROM(method) > 0) + return 1; + else + return 0; } else { diff --git a/source/ngc/pad.c b/source/ngc/pad.c index 462718e..c2c6bdc 100644 --- a/source/ngc/pad.c +++ b/source/ngc/pad.c @@ -58,7 +58,7 @@ unsigned int ccpadmap[] = { WPAD_CLASSIC_BUTTON_MINUS, WPAD_CLASSIC_BUTTON_PLUS, WPAD_CLASSIC_BUTTON_UP, WPAD_CLASSIC_BUTTON_DOWN, WPAD_CLASSIC_BUTTON_LEFT, WPAD_CLASSIC_BUTTON_RIGHT, - WPAD_CLASSIC_BUTTON_FULL_R // insert coin for VS games + WPAD_CLASSIC_BUTTON_A // insert coin for VS games }; /*** Nunchuk + wiimote Padmap ***/ unsigned int ncpadmap[] = { diff --git a/source/ngc/preferences.c b/source/ngc/preferences.c index 6129adc..72b231a 100644 --- a/source/ngc/preferences.c +++ b/source/ngc/preferences.c @@ -171,6 +171,7 @@ preparePrefsData (int method) createXMLSetting("FSDisable", "Four Score", toStr(GCSettings.FSDisable)); createXMLSetting("zapper", "Zapper", toStr(GCSettings.zapper)); + createXMLSetting("crosshair", "Zapper Crosshair", toStr(GCSettings.crosshair)); createXMLController(gcpadmap, "gcpadmap", "GameCube Pad"); createXMLController(wmpadmap, "wmpadmap", "Wiimote"); createXMLController(ccpadmap, "ccpadmap", "Classic Controller"); @@ -253,9 +254,9 @@ decodePrefsData (int method) char verMinor = version[15]; char verPoint = version[17]; - if(verPoint < '2' && verMajor == '2') // less than version 2.0.2 + if(verMajor == '2' && verPoint < '3') // less than version 2.0.3 return false; // reset settings - else if(verMajor > '2' || verMinor > '0' || verPoint > '2') // some future version + else if(verMajor > '2' || verMinor > '0' || verPoint > '3') // some future version return false; // reset settings // File Settings @@ -284,6 +285,7 @@ decodePrefsData (int method) loadXMLSettingInt(&GCSettings.slimit, "slimit"); loadXMLSettingInt(&GCSettings.screenscaler, "screenscaler"); loadXMLSettingInt(&GCSettings.zapper, "zapper"); + loadXMLSettingInt(&GCSettings.crosshair, "crosshair"); // Controller Settings loadXMLController(gcpadmap, "gcpadmap"); diff --git a/source/ngc/smbop.c b/source/ngc/smbop.c index 392afc1..1bb5afd 100644 --- a/source/ngc/smbop.c +++ b/source/ngc/smbop.c @@ -79,12 +79,18 @@ ConnectShare (bool silent) return false; #endif + ShowAction ((char*) "Connecting..."); + // check that all parameter have been set if(strlen(GCSettings.smbuser) == 0 || strlen(GCSettings.smbpwd) == 0 || strlen(GCSettings.smbshare) == 0 || strlen(GCSettings.smbip) == 0) + { + if(!silent) + WaitPrompt((char*) "Invalid network settings. Check FCEUGX.xml."); return false; + } if(!networkInit) networkInit = InitializeNetwork(silent); @@ -212,7 +218,7 @@ ParseSMBdirectory () * Load SMB file ****************************************************************************/ int -LoadSMBFile (char *filename, int length) +LoadSMBFile () { char filepath[MAXPATHLEN]; diff --git a/source/ngc/smbop.h b/source/ngc/smbop.h index 033ca1c..ff4dec9 100644 --- a/source/ngc/smbop.h +++ b/source/ngc/smbop.h @@ -18,7 +18,7 @@ bool ConnectShare (bool silent); char * SMBPath(char * path); int UpdateSMBdirname(); int ParseSMBdirectory (); -int LoadSMBFile (char *filename, int length); +int LoadSMBFile (); int LoadSaveBufferFromSMB (char *filepath, bool silent); int LoadBufferFromSMB (char * sbuffer, char *filepath, bool silent); int SaveBufferToSMB (char *filepath, int datasize, bool silent);