4 http://fceultra.sourceforge.net/
9 * Screen snapshots can now be taken while playing an NSF.
10 * Saving screen snapshots will no longer corrupt the frame buffer.
11 * Added many more games to the list of games that usually are found
12 with bad iNES headers.
13 * Fixed more network play bugs. It should now work correctly(how
14 many times have I said or implied that...).
15 * The NSF player will now disable the FDS sound channel on song
16 initialization(fixes a problem with the Zelda no Densetsu
18 * Reads from $4090 and $4092 while emulating the FDS will now return
19 the current envelope settings. Affects "Ai Senshi Nicole"
20 and "Bio Miracle Bokutte Upa", at least.
21 * Merged a lot of pirate MMC3 multicart emulation code with the main
23 * Added support for the MMC5's split-screen mode. This fixes the
24 introduction in "Uchuu Keibitai SDF".
25 * Writes to $8000-$FFFF with D7 set during MMC1 emulation will
26 cause the MMC1 mode register to be OR'd with $C. This fixes
28 * Replaced an MMC1 hack that I used to get "Bill and Ted's Excellent
29 Video Game Adventure" to work with something more accurate.
30 * Fixed the MMC5 read handler to return the data last on the data
31 bus instead of $FF when a read occured to an unmapped address.
32 This fixes the lockup problem in "Bandit Kings of Ancient China"
33 and possibly other games.
34 * Added support for the game "Ishin no Arashi" in the iNES format
35 (I added an entry with its CRC32 value and the number of 8KB
36 WRAM banks it needs into the MMC5 WRAM size table).
37 * Added support for MMC1 games in the iNES format with 16KB of RAM
38 via CRC32 comparisons(currently only Genghis Khan(USA), Romance
39 of the 3 Kingdoms(USA), and Nobunaga's Ambition(USA and Japan) are
41 * iNES mapper 1 now supports pageable CHR RAM if CHR ROM is not
42 present. Fixes "Family School".
43 * Added support for iNES mappers 51 and 52. Thanks to Kevin Horton
45 * Modified MMC3(iNES mapper 4/118/119) IRQ counter emulation. Fixes
46 problems in "MegaMan 3", "Gun Nac", and the Japanese version of
47 "Klax", but it *might* cause problems with other games.
48 * Fixed an iNES mapper 32 emulation bug. "Ai Sensei no Oshiete"
50 * Fixed iNES mapper 33/48 IRQ emulation.
51 * Fixed iNES mapper 16 IRQ emulation.
52 * Added support for "Famicom Jump 2" as iNES mapper 153.
53 If a good(as far as I can tell) dump is loaded, FCE Ultra will
54 automatically fix the mapper number.
55 * The VS Unisystem bit in iNES headers is no longer recognized.
56 Too many games have this bit set when it shouldn't be set.
57 Now VS Unisystem games are recognized by CRC32 value.
58 * Reads from $4015 no longer reset DMC IRQ. This fixes the
59 title screen of "Romancia".
60 * PPU NMI now occurs a few cycles later. Fixes the "BattleToads"
62 * BRK emulation now sets the I flag.
63 * Changed a few zero-page address mode functions to read directly
70 1.0 What FCE Ultra is.
71 1.1 System requirements.
73 2.0 Starting FCE Ultra
76 3.0 Platform Specific Notes
77 3.1 Network Play Notes
78 3.2 VS Unisystem Notes
79 3.3 Famicom Disk System Notes
82 3.6 Compressed File Notes
85 4.0 Contacting the author
88 /******************************************************************************/
89 /* 1.0) What FCE Ultra is: */
90 /******************************************************************************/
92 FCE Ultra is an NTSC and PAL Famicom/NES emulator for various
93 platforms. It is based upon Bero's original FCE source code. Current
94 features include good PPU, CPU, pAPU, expansion chip, and joystick
95 emulation. Also a feature unique to this emulator(at the current
96 time) is authentic Game Genie emulation. Save states and snapshot
97 features also have been implemented. The VS Unisystem is emulated
98 as well. FCE Ultra supports iNES format ROM images, UNIF format ROM
99 images, headerless and FWNES style FDS disk images, and NSF files.
101 FCE Ultra currently supports the following iNES mappers(many partially):
103 Number: Description: Game Examples:
104 --------------------------------------------------------------------------------
105 0 No Mapper Donkey Kong, Mario Bros
106 1 Nintendo MMC1 MegaMan 2, Final Fantasy
107 2 Simple 16KB PRG Switch MegaMan 1, Archon, 1944
108 3 Simple 8KB CHR Switch Spy Hunter, Gradius
109 4 Nintendo MMC3 Recca, TMNT 2, Final Fantasy 3
110 5 Nintendo MMC5 Castlevania 3, Just Breed, Uchuu Keibitai SDF
111 6 FFE F4 Series(hacked) Saint Seiya, Ganbare Goemon
112 7 AOROM Battle Toads, Lion King
113 8 FFE F3 Series(hacked) Doraemon Kaitakuhen
114 9 Nintendo MMC2 Punchout!
115 10 Nintendo MMC4 Fire Emblem, Fire Emblem Gaiden
116 11 Color Dreams Crystal Mines, Bible Adventures
118 15 Multi-cart(pirate) 100-in-1: Contra Function 16
119 16 Bandai Dragon Ball Z, Gundam Knight
120 17 FFE F8 Series(hacked) Parodius, Last Armageddon
121 18 Jaleco SS806 Pizza Pop, Plazma Ball
122 19 Namco 106 Splatter House, Mappy Kids
123 21 Konami VRC4 2A WaiWai World 2, Ganbare Goemon Gaiden 2
124 22 Konami VRC4 1B Twinbee 3
125 23 Konami VRC2B WaiWai World, Getsufuu Maden
126 24 Konami VRC6 Akumajo Densetsu(Dracula 3)
127 25 Konami VRC4 Gradius 2, Bio Miracle: Boku tte Upa
128 26 Konami VRC6 A0-A1 Inverse Esper Dream 2, Madara
129 32 Irem G-101 Image Fight 2, Perman
130 33 Taito TC0190/TC0350 Don Doko Don 1&2
131 34 NINA-001 and BNROM Impossible Mission 2, Deadly Towers, Bug Honey
132 40 (pirate) Super Mario Bros. 2
133 41 Caltron 6-in-1 Caltron 6-in-1
134 42 (pirate) "Mario Baby"
135 43 Multi-cart(pirate) Golden Game 150 in 1
136 44 Multi-cart(pirate) Super HiK 7 in 1
137 45 Multi-cart(pirate) Super 1000000 in 1
138 46 Game Station Rumble Station
139 47 NES-QJ Nintendo World Cup/Super Spike V.B.
140 48 Taito TC190V Flintstones
141 49 Multi-cart(pirate) Super HiK 4 in 1
142 51 Multi-cart(pirate) 11 in 1 Ball Games
143 52 Multi-cart(pirate) Mario Party 7 in 1
144 64 Tengen RAMBO-1 Shinobi, Klax
145 65 Irem H-3001 Daiku no Gensan 2
146 66 GNROM SMB + Duck Hunt
147 67 Sunsoft Mapper "3" Fantasy Zone 2
148 68 Sunsoft Mapper "4" After Burner 2, Nantetta Baseball
149 69 Sunsoft FME-7 Batman: ROTJ, Gimmick!
150 70 ?? Kamen Rider Club
151 71 Camerica Fire Hawk, Linus Spacehead
152 72 Jaleco ?? Pinball Quest
153 73 Konami VRC3 Salamander
154 75 Jaleco SS8805/Konami VRC1 Tetsuwan Atom, King Kong 2
155 76 Namco 109 Megami Tenshi 1
156 77 Irem ?? Napoleon Senki
157 78 Irem 74HC161/32 Holy Diver
158 79 NINA-06 F15 City War, Krazy Kreatures
159 80 Taito X-005 Minelvation Saga
160 82 Taito ?? Kyuukyoku Harikiri Stadium - Heisei Gannen Ban
161 83 Multi-cart(pirate) Dragon Ball Party
162 85 Konami VRC7 Lagrange Point
163 86 Jaleco ?? More Pro Baseball
165 89 Sunsoft ?? Mito Koumon
166 90 Pirate Super Mario World, Mortal Kombat
167 92 Jaleco ?? MOERO Pro Soccer, MOERO Pro Yakyuu '88
169 94 ?? Senjou no Ookami
170 95 Namco ?? Dragon Buster
171 97 ?? Kaiketsu Yanchamaru
172 99 VS System 8KB CHR Switch VS SMB, VS Excite Bike
173 105 NES-EVENT Nintendo World Championships
174 112 Asder Sango Fighter, Hwang Di
176 118 MMC3-TLSROM/TKSROM Board Ys 3, Goal! 2, NES Play Action Football
177 119 MMC3-TQROM Board High Speed, Pin*Bot
178 140 Jaleco ?? Bio Senshi Dan
179 151 Konami VS System Expansion VS The Goonies, VS Gradius
180 152 ?? Arkanoid 2, Saint Seiya Ougon Densetsu
181 153 Bandai ?? Famicom Jump 2
183 182 ?? Super Donkey Kong
184 184 ?? Wing of Madoola, The
185 189 Micro Genius TXC ?? Thunder Warrior
186 225 Multi-cart(pirate) 58-in-1/110-in-1/52 Games
187 226 Multi-cart(pirate) 76-in-1
188 227 Multi-cart(pirate) 1200-in-1
189 228 Action 52 Action 52, Cheetahmen 2
190 229 Multi-cart(pirate) 31-in-1
191 232 BIC-48 Quattro Arcade, Quattro Sports
192 234 Multi-cart ?? Maxi-15
193 240 ?? Gen Ke Le Zhuan, Shen Huo Le Zhuan
194 242 ?? Wai Xing Zhan Shi
197 250 ?? Time Diver Avenger
199 FCE Ultra currently supports the following UNIF boards(minus the
200 prefixes HVC-, NES-, BTL-, and BMC-, as they are currently ignored):
202 Group: Name: Game Examples:
203 --------------------------------------------------------------------------------
205 MARIO1-MALEE2 Super Mario Bros. Malee 2
206 NovelDiamond9999999in1 Novel Diamond 999999 in 1
207 Super24in1SC03 Super 24 in 1
208 Supervision16in1 Supervision 16-in-1
211 Sachen-8259A Super Cartridge Version 1
212 Sachen-8259B Silver Eagle
213 Sachen-74LS374N Auto Upturn
214 SA-016-1M Master Chu and the Drunkard Hu
219 TC-U01-1.5M Challenge of the Dragon
226 SGROM Defender of the Crown
230 SNROM Shingen the Ruler
231 SOROM Nobunaga's Ambition
234 TFROM Legacy of the Wizard
236 TKROM Kirby's Adventure
238 TLROM Super Spike V'Ball
242 TSROM Super Mario Bros. 3
248 ETROM Nobunaga's Ambition 2
249 EWROM Romance of the Three Kingdoms 2
261 NROM-256 Super Mario Bros.
266 /******************************************************************************/
267 /* 1.1) System requirements: */
268 /******************************************************************************/
270 Minimum system specifications:
274 400 KB free disk space
279 Recommended minimum system specifications:
285 Video adapter with 2D acceleration abilities
289 Sound device capable of handling a sample rate of 44100 hz.
292 /******************************************************************************/
293 /* 2.0) Starting FCE Ultra */
294 /******************************************************************************/
296 FCE Ultra can be started by running the executable "fceu.exe".
297 I do not recommend running it from a DOS "box".
300 /******************************************************************************/
301 /* 2.1) Using FCE Ultra: */
302 /******************************************************************************/
304 After starting FCE Ultra, you'll probably want to load a game. Do
305 this by going to File/Open.
310 Open - Loads a new game.
311 Save State - Saves the current NES state.
312 Load State - Loads a saved NES state.
313 Log Sound As - Logs sound to a file. It will not work if sound
315 Exit - Exit the emulator.
318 Reset - Resets the virtual NES.
319 Power - Power cycles the virtual NES.
320 Cheats - Activates the cheat interface. See "cheat.txt" for
324 Hide Menu - Hides the menu.
325 Game Genie - If checked, enable Game Genie emulation.
326 Game Genie emulation will only begin or end when a new
328 PAL Emulation - If checked, enable PAL emulation. Changes take effect
329 immediately, though I recommend resetting the virtual
330 NES afterward PAL emulation is enabled or disabled.
331 Directories - Configure the directories that FCE Ultra will store
333 Input - Enter input configuration dialog.
334 Note that not all virtual devices are configurable.
335 Miscellaneous - Enter miscellaneous configuration dialog.
336 Network Play - Enter network play configuration dialog.
337 Palette - Enter palette configuration dialog.
338 Sound - Enter sound configuration dialog.
340 Sound emulation and output are enabled when this is checked.
342 Forces 8-bit sound output. Use only when absolutely
343 necessary(very rare).
345 Specifies how many sound samples will be played back per
346 second. Unless you know what you are doing, you probably
347 don't need to change this setting.
348 Use secondary sound buffer:
349 Uses a secondary sound buffer. This option may be required
350 for sound to work with certain sound cards/devices.
351 Selecting "with global focus" will cause sound to be played
352 while FCE Ultra has lost window focus, but you will probably
353 also want to select "Active While Focus Lost" in the Config
354 menu as well, otherwise you will just get repeating sound
355 when FCE Ultra loses focus.
356 Length of sound buffer:
357 Specifies what length of sound(in milliseconds) should be
358 buffered by FCE Ultra. DirectSound and the Windows kernel
359 may or may not cause a little more latency than what you
360 might expect(usually not any more than a few milliseconds),
361 depending on your setup.
362 Use larger values if you have sound problems such as popping
363 or gaps, though. Larger values will increase the latency of
364 the sound, however. Finally, larger values are ideal for
365 background music listening.
367 Specifies the volume of FCE Ultra's sound output. Setting
368 the volume too high MIGHT cause noticeable clipping on some
369 sounds(loud drums, for example), but don't let that possibility
370 stop you from experimenting.
372 Video - Enter video configuration dialog.
376 For emulated Family BASIC Keyboard:
377 Enable/Disable Keyboard Input Scroll Lock
378 (enabling emulated keyboard input will disable
380 All emulated keys are mapped to the closest open key on the PC
381 keyboard, with a few exceptions. The emulated "@" key is
382 mapped to the "`"(grave) key, and the emulated "kana" key
383 is mapped to the "Insert" key(in the 3x2 key block above the
386 For emulated game pads:
396 For emulated power pads(keys correspond to button locations on
405 S Select disk/disk side.
407 For VS Unisystem games:
409 V Show/Hide dip switches.
410 1-8 Toggle dip switches(when dip switches
413 0-9 Select save state.
415 F5/F7 Save/Load state.
416 F9 Save screen snapshot.
419 F4 Toggle between windowed/full screen modes.
425 /******************************************************************************/
426 /* 3.0) Platform Specific Notes */
427 /******************************************************************************/
429 Your desktop color depth must be 16bpp, 24bpp, or 32bpp for FCE Ultra
430 to run properly in windowed mode.
432 FCE Ultra's base directory is the directory in which the executable
436 /******************************************************************************/
437 /* 3.1) Network Play Notes */
438 /******************************************************************************/
440 In TCP/IP network play, the server will be player one, and the
441 client will be player 2.
443 Zapper emulation and power pad emulation currently do not work with
446 Having Game Genie or PAL emulation enabled on only one side
449 Both players MUST use the same ROM/disk image and SRAM
452 When using FDS or VS Unisystem games with network play, only player
453 1 will be able to insert disk, eject disk, insert coins, toggle dip
456 /******************************************************************************/
457 /* 3.2) VS Unisystem Notes */
458 /******************************************************************************/
460 FCE Ultra currently only supports VS Unisystem ROM images in the
465 * VS Unisystem games that are about 49,000 bytes in size most likely
467 * Other VS Unisystem games will use other mappers. Here is a short
468 list of games and the mappers they use:
479 * The colors in many VS Unisystem games may be incorrect. This
480 is due to each game having its own PPU, and thus using a
481 different palette than games that use a different PPU.
484 /******************************************************************************/
485 /* 3.3) Famicom Disk System Notes */
486 /******************************************************************************/
488 You will need the FDS BIOS ROM image in the base FCE Ultra directory.
489 It must be named "disksys.rom". I will not give this file to you, so
492 Two types of FDS disk images are supported: disk images with the
493 FWNES-style header, and disk images with no header.
495 You should make backups of all of your FDS games you use with FCE
496 Ultra. This is because FCE Ultra will write the disk image back to
497 the storage medium, and the disk image in RAM might have been corrupted
498 because of inaccurate emulation(this case is not likely to occur, but
502 /******************************************************************************/
503 /* 3.4) Light Gun Notes */
504 /******************************************************************************/
506 Currently, the NES Zapper and the light gun used with the VS
507 Unisystem(I will call both the same name, Zapper) are supported.
508 Most(all?) NES games expect the Zapper to be plugged into port 2.
509 and most(all?) VS Unisystem games expect the Zapper to be plugged
512 The LEFT mouse button is the emulated trigger button for the
513 Zapper. The RIGHT mouse button is also emulated as the trigger,
514 but as long as you have the RIGHT mouse button held down, no color
515 detection will take place, which is effectively like pulling the
516 trigger while the Zapper is pointed away from the television screen.
517 Note that you must hold the RIGHT button down for a short
518 time(greater than just a fast click, shorter than a second).
520 Zapper emulation currently does NOT work with network play, so
521 don't even try it. I may add support in the future if enough
522 people want it or if I want it.
525 /******************************************************************************/
526 /* 3.5) Palette Notes */
527 /******************************************************************************/
529 Palettes files are expected to contain 64 8-bit RGB triplets(each in
530 that order; red comes first in the triplet in the file, then green,
531 then blue). Each 8-bit value represents brightness for that particular
532 color. 0 is minimum, 255 is maximum.
534 Palettes can be set on a per-game basis. To do this, put a palette
535 file in the "gameinfo" directory with the same base filename
536 as the game you wish to associate with and the extension "pal".
539 File name: Palette file name:
540 BigBad.nes BigBad.pal
541 BigBad.zip BigBad.pal
542 BigBad.Better.nes BigBad.Better.pal
545 With so many ways to choose a palette, figuring out which one will
546 be active may be difficult. Here's a list of what palettes will
547 be used, in order from highest priority to least priority(if a condition
548 doesn't exist for a higher priority palette, the emulator will
549 continue down its list of palettes).
551 NSF Palette(for NSFs only)
552 Palette loaded from the "gameinfo" directory.
553 NTSC Color Emulation(only for NTSC NES games).
554 VS Unisystem palette(if the game is a VS Unisystem game and a palette
556 Custom global palette.
560 /******************************************************************************/
561 /* 3.6) Compressed File Notes */
562 /******************************************************************************/
564 FCE Ultra can load data from both PKZIP-format files and
565 gzip-format files. Only one type of (de)compression algorithm is
566 supported: "deflate"; this seems to be the most popular compression
569 A compressed FDS disk image will only be saved back to disk if it
570 uses the gzip format.
572 All files in a PKZIP format file will be scanned for the
573 followings extensions: .nes, .fds, .nsf, .unf, .nez, .unif
574 The first compressed file to have one of these extensions will be
575 loaded. If no compressed file has one of these extensions, the
576 first compressed file will be loaded.
579 /******************************************************************************/
580 /* 3.7) Game Genie Notes */
581 /******************************************************************************/
583 The Game Genie ROM image is loaded from the file "gg.rom" in the
584 base directory the first time Game Genie emulation is enabled and
585 a ROM image is loaded since the time FCE Ultra has run.
587 The ROM image may either be the 24592 byte iNES-format image, or
588 the 4352 raw ROM image.
590 Remember that enabling/disabling Game Genie emulation will not take
591 effect until a new game is loaded(this statement shouldn't concern
592 any of the "run once" command-line driven ports).
594 /******************************************************************************/
595 /* 4.0) Contacting the author */
596 /******************************************************************************/
598 I can be reached via email at xodnizel@users.sourceforge.net.
599 Bero can be reached via email at 9bero9@geocities.co.jp
600 (Note that Bero can not and will not answer any questions
601 regarding the operation of FCE Ultra, so please don't ask him.
602 If you understand this, remove the 9's from the email address
603 provided to get his real email address.)
606 /******************************************************************************/
608 /******************************************************************************/
610 \Firebug\ - High-level mapper information.
611 Bero - Original FCE source code.
612 Brad Taylor - NES sound channel guide.
613 Chris Hickman - Archaic Ruins.
614 Donald Moore - DC PasoFami NES packs.
615 Fredrik Olson - NES four-player adapter information.
616 Gilles Vollant - PKZIP file loading functions.
617 goroh - Various documents.
618 Jeff Tamer - Insaniacal fun.
619 Jeremy Chadwick - General NES information.
620 Justin Smith - Giving me obscure ROM images in the "dark ages of
622 Kevin Horton - Low level NES information and sound information.
623 Ki - Various technical information.
624 Mark Knibbs - Various NES information.
625 Marat Fayzullin - General NES information.
626 Matthew Conte - Sound information.
627 N. Andou - Awesome NES/SNES emulators, at the time...
628 nori - FDS sound information.
629 Quietust - VRC7 sound translation code by The Quietust
631 Ideas and corrections.
632 R. Hoelscher - Famicom four-player adapter information.
633 Rob Mocca - DC PasoFami NES packs, testing.
634 Sean Whalen - Node99.
635 Tatsuyuki Satoh - OPL2 emulator
636 TheRedEye - ROM images, testing.
641 ...and everyone else who has helped me.