--- /dev/null
+=================================================================================\r
+ GPFCE - NES emulator for the GP2X\r
+=================================================================================\r
+ Ported by: zzhu8192\r
+ Current version: 0.2\r
+ Email: zzhu8192@yahoo.com\r
+ Web Site: www.unicorn-jockey.com\r
+ Web Site Admin: Lil-kun\r
+=================================================================================\r
+\r
+\r
+This is a gp2x port of the **great** Open Source NES emulator FCE Ultra:\r
+http://fceultra.sourceforge.net. If you enjoyed using this emulator, please\r
+keep in mind that this would not have been possible without the hard work and\r
+dedication of the FCE Ultra developers.\r
+\r
+In case you don't know what the NES is about, see:\r
+http://en.wikipedia.org/wiki/Famicom.\r
+\r
+My main reasons for working on this port is to get some game programming \r
+experience on smaller devices. Although coding/porting an emu is \r
+generally not the same thing, it's still pretty cool.\r
+I'm an Enterprise Java software developer by trade, so this is a nice side project\r
+for me, and a welcome change of pace. I'm also planning to write some \r
+original games in Java for the GP2x. This should be interesting.... \r
+\r
+\r
+------------------------------------------------------------------\r
+What's new\r
+------------------------------------------------------------------\r
+Current version number is now: 0.2\r
+\r
+Many usability features were added, thanks to some great input \r
+from developers and users on the gp32x.com board. Some of the\r
+changes went into the selector frontend.\r
+\r
+(I have sent my selector customization changes to kounch, \r
+ so hopefully the changes will make it into\r
+ version 1.2 or later for other projects to use)\r
+\r
+There are now 4 executable scripts.\r
+gpfce\r
+gpfce_showfps\r
+gpfce_swapbuttons\r
+gpfce_showfps_swapbuttons\r
+\r
+showfps: this means FPS is displayed on the upper left of the screen\r
+ (in non-stretch mode only). \r
+\r
+swapbuttons: this means instead of Y/A as NES_B and B/X as NES_A\r
+ use A/X as NES_B, and Y/B as NES_A. (think NES MAX)\r
+ \r
+Volume meter is now shown on the OSD when adjusted.\r
+\r
+\r
+See version history below for more details.\r
+\r
+Depending on feedback, speed and even more compability will \r
+probably be the major focus going forward.\r
+\r
+\r
+------------------------------------------------------------------\r
+Current Features\r
+------------------------------------------------------------------\r
+- .zip file support\r
+- 22050 Hz Mono Sound support with volume control support\r
+- OSD Volume bar\r
+- Load/Save state (up to 10 slots, pick by holding down R)\r
+- Hardware stretch (See controls)\r
+- Soft Reset\r
+- Savegame support\r
+- 60 FPS without frame skipping on many games\r
+- Configurable Turbo Fire (hold L to toggle)\r
+- Game genie/Cheat code (functionality already exists in FCEU 0.81)\r
+- Sorted display of 2048 roms per subdirectory (recommended 512-1024)?\r
+- Semi-Configurable button layout (startup only)\r
+- configurable FPS display on upper left hand side\r
+\r
+--------------------------------------------------------------------\r
+ Version History\r
+--------------------------------------------------------------------\r
+\r
+\r
+ver 0.2 5/29/2006 MD5SUM: dd75fa3f090f9298f9f4afff01ab96f2 *gpfce\r
+\r
+ - Sound output issue with stereo fixed, now using\r
+ 22050 khz 16-bit mono. I've tried interpolating to \r
+ 44khz mono, but the results seemed similar.\r
+ - selector supports up to 2048 files, sorted, with\r
+ alpha scrolling via left/right in addition to \r
+ page up/down via L/R.\r
+ - additional startup scripts to select button and fps \r
+ configurations\r
+ - can load FDS files, but does not seem to work yet\r
+ - configurable buttons (use swapbuttons version )\r
+ - configurable fps (use showfps version)\r
+ - Configurable turbo fire control\r
+ - Selectable save slots from 0-9\r
+ - Volume bar\r
+ - compiled with GCC 4.1.0 -O3 with profiling\r
+\r
+\r
+ver 0.1 5/23/2006 MD5SUM: 13681f25713ad04c535c23f8c61f1e0b *gpfce\r
+ \r
+\r
+ - Initial version\r
+ - Around 60 fps with sound\r
+ - Load/Save State\r
+ - Hardware Stretch\r
+ - Soft reset support\r
+ - No GUI, using selector with config\r
+ - Hard coded 22050 audio, 16-bit, stereo\r
+ - compiled with GCC 4.1.0 -O3 with profiling\r
+ - Hard coded config path. This is to prevent users\r
+ from filling up the gp2x space by accident\r
+\r
+\r
+------------------------------------------------------------------\r
+Usage\r
+------------------------------------------------------------------\r
+1) Untar the emulator tarball onto some directory on your SD card.\r
+2) You must have a directory called /roms/nes on your SD card.\r
+ Put the roms in there, i.e. /mnt/sd/roms/nes is the gp2x path.\r
+ Rom files can be zipped.\r
+3) The emulator will create a subdirectory under roms \r
+ /roms/nes/fceultra. Save states etc. go here.\r
+4) To start a different rom while running one, hit L+R+JOY.\r
+ To exit the file selection menu, press start.\r
+5) For FDS support, put disksys.rom in /mnt/sd/roms/nes/fceultra\r
+ Note: FDS roms must not be zipped.\r
+6) For GameGenie support, put gg.rom in /mnt/sd/roms/nes/fceultra\r
+\r
+------------------------------------------------------------------\r
+Cheats\r
+------------------------------------------------------------------\r
+\r
+gpfce uses the cheat mechanisms already provided by\r
+http://mednafen.com/documentation/cheat.html Note this feature\r
+is untested on gpfce as of version 0.2\r
+\r
+To use game genie, place appropraite gg.rom into /mnt/sd/roms/nes/fceultra.\r
+Use -gg on commandline to activate the game genie rom.\r
+\r
+\r
+------------------------------------------------------------------\r
+Controls\r
+------------------------------------------------------------------\r
+\r
+Note: JOY means press in on the joystick (i.e. not up/down/left/right)\r
+\r
+\r
+In file selector mode\r
+(This is based on selector version 1.1)\r
+----------------------------------------------\r
+Start - EXIT file selector, back to main menu.\r
+B,A,X,Y, JOY - start rom\r
+L - page up\r
+R - page down\r
+UP - scroll up one, wraps if at top\r
+DOWN - scroll down one, wraps if at bottom\r
+LEFT - jump up list by first letter of rom name\r
+RIGHT - jump down list by first letter of rom name\r
+ \r
+\r
+\r
+\r
+In game\r
+------------------------\r
+Y - NES B\r
+A - NES B\r
+B - NES A\r
+X - NES A\r
+SELECT - NES SELECT\r
+START - NES START\r
+VOL +/- - Vol control. \r
+\r
+hold L - toggles between \r
+ No Turbo Fire, \r
+ Upper row of buttons turbo fire\r
+ Lower row of buttons turbo fire \r
+ \r
+hold R - cycles through save state slots\r
+\r
+L & JOY - Save state\r
+R & JOY - Load State\r
+SEL & JOY - Stretch screen toggle\r
+L & R - Reset NES\r
+\r
+L + R + JOY - Exit back to menu\r
+\r
+\r
+FDS only\r
+-------------------------------\r
+L - insert disk\r
+R - eject disk\r
+JOY - select disk\r
+\r
+\r
+\r
+------------------------------------------------------------------\r
+Known issues\r
+------------------------------------------------------------------\r
+1) Stretch mode could use a better aspect ratio. Looks a bit odd.\r
+ Might look into some fancy non-2x filtering algorthms, if there are such things.\r
+2) Not thoroughly QA'd\r
+3) S-Video not working\r
+4) FDS does not seem to be working\r
+5) Some compatibility issues\r
+6) Can't sustain 60fps on some games\r
+7) Some clipping issues in some games\r
+8) Game genie behaves a bit odd, although code works...\r
+\r
+------------------------------------------------------------------\r
+ Might have time to do list\r
+------------------------------------------------------------------\r
+1) Fix more known issues\r
+2) Better looking stretch?\r
+3) File based Game genie support\r
+4) Cleaner build\r
+5) Full speed on all games. (This may require some work)\r
+6) Better compability\r
+7) Multiplayer support via cable - this one is obviously pretty\r
+ tricky. Will need cables and a usb hub first.\r
+ It's definitely possible, but is not a priority at this point. \r
+\r
+ \r
+------------------------------------------------------------------\r
+ Many thanks\r
+------------------------------------------------------------------\r
+- To lots of talented developers on the http://www.gp32x.com/board/\r
+ Reesy, Squidge, etc. for responding to my technical questions.\r
+- Thanks to \r
+- Lil-kun - for the neat GPFCE logo and the Web Site (under construction) :D\r
+- Referenced source code from MameGP2X (Franxis) and FCEU-0.3 gp2x (Noname)\r
+- Awesome wiki: http://wiki.gp2x.org/wiki/Main_Page\r
+- Awesome gp2x site: http://www.gp32x.com/\r
+- ryleh's minimal lib - w/o which this wouldn't have worked\r
+- FCE Ultra developers (http://fceultra.sourceforge.net/) \r
+ for the wonderful and feature rich NES emulator.\r
+- kounch for Selector frontend - works great for lazy developers like me. :-D\r
+ I have sent my changes to kounch, so hopefully the changes will make it into\r
+ version 1.2 or later.\r
+- gp2x community - just plain rocks\r
+\r
+\r
--- /dev/null
+\r
+\r
+ FCE Ultra Cheat Guide\r
+\r
+***** This file was obtained from *****\r
+http://mednafen.com/documentation/cheat.html\r
+\r
+\r
+/Last updated November 12, 2003\r
+Valid as of FCE Ultra 0.97.4/\r
+\r
+*Table of Contents:*\r
+\r
+ * Introduction <#intro>\r
+ o Cheat Files <#cheatfiles> \r
+ * The Windows Interface <#windows>\r
+ o Cheat Search Interface <#windows-search> \r
+ * The Text Interface(TODO)\r
+ * Examples <#examples>\r
+ o "Mega Man 3" Windows Example <#examples-mm3>\r
+ o "Over Horizon" Text Interface Example <#examples-oh> \r
+ * Tips <#tips> \r
+\r
+------------------------------------------------------------------------\r
+\r
+\r
+ Introduction\r
+\r
+FCE Ultra allows cheating by the periodic "patching" of arbitrary\r
+addresses in the 6502's memory space with arbitrary values, as well as\r
+read substitution. "Read substitution" is the method that would be used\r
+on a real NES/Famicom, such as done by the Game Genie and Pro Action\r
+Replay. It is required to support GG and PAR codes, but since it is\r
+relatively slow when done in emulation, it is not the preferred method\r
+when a RAM patch will suffice. Also, in FCE Ultra, read substitution\r
+will not work properly with zero-page addressing modes(instructions that\r
+operate on RAM at $0000 through $00FF).\r
+\r
+The RAM patches are all applied a short time before the emulated\r
+vertical blanking period. This detail shouldn't concern most people,\r
+though. However, this does mean that cheating with games that use\r
+bank-switched RAM may be problematic. Fortunately, such games are not\r
+very common(in relation to the total number of NES and Famicom games).\r
+\r
+\r
+ Cheat Files\r
+\r
+Cheats are stored in the "cheats" subdirectory under the base FCE Ultra\r
+directory. The files are in a simple plain-text format. Each line\r
+represents a one-byte memory patch. The format is as follows(text in\r
+brackets [] represents optional parameters):\r
+\r
+ [S][C][:]Address(hex):Value(hex):[Compare value:]Description \r
+\r
+Example:\r
+\r
+ 040e:05:Infinite super power.\r
+\r
+A colon(:) near the beginning of the line is used to disable the cheat.\r
+"S" denotes a cheat that is a read-substitute-style cheat(such as with\r
+Game Genie cheats), and a "C" denotes that the cheat has a compare value.\r
+\r
+------------------------------------------------------------------------\r
+\r
+\r
+ The Windows Interface\r
+\r
+All addresses listed in the cheats window are in unsigned 16-bit\r
+hexadecimal format and all values in these windows are in an unsigned\r
+8-bit decimal format(the range for values is 0 through 255).\r
+\r
+The cheats window contains the list of cheats for the currently loaded\r
+game on the right side. Existing cheats can be selected, edited, and\r
+updated using the "Update" button.\r
+\r
+\r
+ Cheat Search Interface\r
+\r
+The cheat search interface consists of several components: a list of\r
+addresses and associated data for a search, several command buttons, and\r
+the search parameters.\r
+\r
+Each entry in the list is in the format of:\r
+\r
+ Address:Original Value:Current Value\r
+\r
+The address is the location in the 6502's address space, the original\r
+value is the value that was stored at this address when the search was\r
+reset, and the current value is the value that is currently stored at\r
+that address. Selecting an item in this list will automatically cause\r
+the "Address" field in the cheat information box on the right side of\r
+the window to be updated with the selected address.\r
+\r
+The "Reset Search" button resets the search process; all valid addresses\r
+are displayed in the cheat list and the data values at those addresses\r
+noted.\r
+\r
+The "Do Search" buttons performs a search based on the search parameters\r
+and removes any non-matching addresses from the address list.\r
+\r
+The "Set Original to Current" button sets the remembered original values\r
+to the current values. It is like the "Reset Search" button, but it does\r
+not affect which addresses are shown in the address list. This command\r
+is especially useful when used in conjunction with the "O!=C" search\r
+filter.\r
+\r
+The "Unhide Excluded" button shows all addresses that are excluded as a\r
+result of any previous searches. It is like the "Reset Search" button\r
+except that it does not affect the remembered original values.\r
+\r
+The numbers assigned the names "V1" and "V2" have different meanings\r
+based on which filter is selected. A list of the names of the filters\r
+and detailed information on what they do follows("original value"\r
+corresponds to the value remembered for a given addres and "current\r
+value" is the value currently at that address. Also, if a value is not\r
+explicitly said to be shown under a certain condition, then it is\r
+obviously excluded.):\r
+\r
+"O==V1 && C==V2":\r
+\r
+ Show the address if the original value is equal to "V1" AND the\r
+ current value is equal to "V2". \r
+\r
+"O==V1 && |O-C|==V2":\r
+\r
+ Show the address if the original value is equal to "V1" AND the\r
+ difference between the current value and the original value is equal\r
+ to "V2". \r
+\r
+"|O-C|==V2":\r
+\r
+ Show the address if the difference between the current value and the\r
+ original value is equal to "V2". \r
+\r
+"O!=C":\r
+\r
+ Show the address if the original value does not equal the current\r
+ value. \r
+\r
+The following cheat methods/filters automatically perform the function\r
+of the "Set Original to Current" button after "Do Search" is pressed.\r
+\r
+"Value decreased."\r
+\r
+ Show the address if the value has decreased. \r
+\r
+"Value increased."\r
+\r
+ Show the address if the value has increased. \r
+\r
+------------------------------------------------------------------------\r
+\r
+\r
+ Examples\r
+\r
+\r
+ "Mega Man 3" Windows Example\r
+\r
+This example will give Mega Man unlimited energy. Immediately after\r
+entering the Top Man stage, make your way to the "Add Cheat" window.\r
+Push "Reset Search". Go back to playing and move right until the first\r
+enemy appears. Allow yourself to be hit twice. Each hit does "2" damage,\r
+so you've lost 4 energy bars. Go to the "Add Cheat" window again and\r
+select the third filter ("|O-C|==V2") and enter the value 4 next to\r
+"V2". Then push "Do Search".\r
+\r
+Several addresses will appear in the address list. You can try to find\r
+the address you want through trial and error, or you can narrow the\r
+results down further. We will do the latter.\r
+\r
+Go back to playing MM3 and get hit one more time and make your way back\r
+to the "Add Cheat" window. Your damage is now "6". You can probably see\r
+which address that contains your life(it is 00A2). If not, change V2 to\r
+6 and push "Do Search" again. This should leave only 00A2.\r
+\r
+Select that entry in the address list. Shift your attention to the "Add\r
+Cheat" box to the right. Type in a meaningful name and the desired\r
+value(156; it was the value when you had no damage, so it's safe to\r
+assume it's the maximum value you can use). Push the "Add" button and a\r
+new entry will appear in the cheats list. The cheat has been added.\r
+\r
+\r
+ "Over Horizon" Text Interface Example\r
+\r
+This example will give you infinite lives in the NTSC(Japanese) version\r
+of "Over Horizon".\r
+\r
+Start a new game. Notice that when you press "Start" during gameplay,\r
+the number of lives you have left is indicated. With no cheating, you\r
+start with 3 lives(2 lives left).\r
+\r
+Activate the cheat interface immediately after starting a new game.\r
+Select the "New Cheats" menu and "Reset Search".\r
+\r
+I'll assume that the number of lives left shown in the game is the same\r
+number that's stored in RAM. Now, "Do Search". You're going to use the\r
+first search filter. For V1, enter the value 2. For V2, enter the same\r
+value. This, coupled with the fact that you just reset the search, will\r
+allow you to search for a value "absolutely"(as opposed to changes in\r
+the value).\r
+\r
+Now, "Show Results". When I did it, I received 11 results:\r
+\r
+ 1) $0000:002:002\r
+ 2) $001c:002:002\r
+ 3) $001e:002:002\r
+ 4) $009d:002:002\r
+ 5) $00b9:002:002\r
+ 6) $00e3:002:002\r
+ 7) $0405:002:002\r
+ 8) $0406:002:002\r
+ 9) $0695:002:002\r
+ 10) $07d5:002:002 \r
+ 11) $07f8:002:002\r
+\r
+You really can't do much yet(unless you want to spend time doing trial\r
+and error cheat additions). Return to the game.\r
+\r
+After losing a life, go back to the cheat interface, to the "New Cheats"\r
+menu, and "Show Results". Here are my results:\r
+\r
+ 1) $0000:002:002\r
+ 2) $001c:002:002\r
+ 3) $001e:002:002\r
+ 4) $009d:002:002\r
+ 5) $00b9:002:041\r
+ 6) $00e3:002:002\r
+ 7) $0405:002:001\r
+ 8) $0406:002:002\r
+ 9) $0695:002:002\r
+ 10) $07d5:002:001\r
+ 11) $07f8:002:002\r
+\r
+Notice that two addresses seem to hold the number of lives($0405 and\r
+$07d5). You can lose another life and go "Show Results" again, and you\r
+should see that $07d5 is the address that holds the number of lives.\r
+\r
+Now that you know the address that holds the number of lives, you can\r
+add a cheat. You can either type in the number from the cheat results\r
+list corresponding to the address you want to add a cheat for, or you\r
+can remember the address and select "Add Cheat" from the "New Cheats"\r
+menu. Do the former.\r
+\r
+Now you will need to enter a name for the cheat. I suggest something\r
+short, but descriptive. "Infinite lives" will work fine. Next, a prompt\r
+for the address will show up. Since you selected an item from the list,\r
+you can press enter to use the associated address($07d5). Next, you will\r
+need to enter a value. It doesn't need to be large(in fact, it probably\r
+shouldn't be; abnormally high numbers can cause some games to\r
+misbehave). I suggest a value of 2. After this, you should get a prompt\r
+that looks like this:\r
+\r
+ Add cheat "Infinite lives" for address $07d5 with value 002?(Y/N)[N]:\r
+\r
+Answer "Y". You now have infinite lives.\r
+\r
+------------------------------------------------------------------------\r
+\r
+\r
+ Tips\r
+\r
+Games store player information in many different ways. For example, if\r
+you have "3" lives in Super Wacky Dodgeball 1989, the game might store\r
+it in memory as 2, 3, or 4, or perhaps a different number all together.\r
+Also, say that you have 69 life points out of 200 in Mole Mashers. The\r
+game might store how many life points you have, or how much damage you\r
+have taken. Relative value searches are very valuable because you\r
+probably don't know the way that the game stores its player data.\r
+\r
+Some games, especially RPGs, deal with individual numbers greater than\r
+8-bits in size. Most that I've seen seem to store the multiple-byte data\r
+least significant byte(lower byte of number) first in memory, though\r
+conceivably, it could be stored most significant byte first, or the\r
+component bytes of the number could be non-contiguous, though the latter\r
+is very unlikely. For example, say I have 5304 experience points in\r
+Boring Quest for the Overused Plot Device. To split the number into two\r
+eight bit decimal numbers, take 5304 %(modulus) 256. This will give a\r
+number that is the lower 8 bits. Next, take 5304 / 256. The integral\r
+component of your answer will be the upper 8 bits(or the next 8 bits, if\r
+the number is or can be larger than 16 bits) of 5304. Now you will need\r
+to search for these numbers. Fortunately, most(all?) RPGs seem to store\r
+large numbers exactly as they are shown in the game.\r
+\r