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 * The NSF player will now disable the FDS sound channel on song
14 initialization(fixes a problem with the Zelda no Densetsu
16 * Reads from $4090 and $4092 while emulating the FDS will now return
17 the current envelope settings. Affects "Ai Senshi Nicole"
18 and "Bio Miracle Bokutte Upa", at least.
19 * Merged a lot of pirate MMC3 multicart emulation code with the main
21 * Added support for the MMC5's split-screen mode. This fixes the
22 introduction in "Uchuu Keibitai SDF".
23 * Writes to $8000-$FFFF with D7 set during MMC1 emulation will
24 cause the MMC1 mode register to be OR'd with $C. This fixes
26 * Replaced an MMC1 hack that I used to get "Bill and Ted's Excellent
27 Video Game Adventure" to work with something more accurate.
28 * Fixed the MMC5 read handler to return the data last on the data
29 bus instead of $FF when a read occured to an unmapped address.
30 This fixes the lockup problem in "Bandit Kings of Ancient China"
31 and possibly other games.
32 * Added support for the game "Ishin no Arashi" in the iNES format
33 (I added an entry with its CRC32 value and the number of 8KB
34 WRAM banks it needs into the MMC5 WRAM size table).
35 * Added support for MMC1 games in the iNES format with 16KB of RAM
36 via CRC32 comparisons(currently only Genghis Khan(USA), Romance
37 of the 3 Kingdoms(USA), and Nobunaga's Ambition(USA and Japan) are
39 * iNES mapper 1 now supports pageable CHR RAM if CHR ROM is not
40 present. Fixes "Family School".
41 * Added support for iNES mappers 51 and 52. Thanks to Kevin Horton
43 * Modified MMC3(iNES mapper 4/118/119) IRQ counter emulation. Fixes
44 problems in "MegaMan 3", "Gun Nac", and the Japanese version of
45 "Klax", but it *might* cause problems with other games.
46 * Fixed an iNES mapper 32 emulation bug. "Ai Sensei no Oshiete"
48 * Fixed iNES mapper 33/48 IRQ emulation.
49 * Fixed iNES mapper 16 IRQ emulation.
50 * Added support for "Famicom Jump 2" as iNES mapper 153.
51 If a good(as far as I can tell) dump is loaded, FCE Ultra will
52 automatically fix the mapper number.
53 * The VS Unisystem bit in iNES headers is no longer recognized.
54 Too many games have this bit set when it shouldn't be set.
55 Now VS Unisystem games are recognized by CRC32 value.
56 * Reads from $4015 no longer reset DMC IRQ. This fixes the
57 title screen of "Romancia".
58 * PPU NMI now occurs a few cycles later. Fixes the "BattleToads"
60 * BRK emulation now sets the I flag.
61 * Changed a few zero-page address mode functions to read directly
63 * Added a new video mode(256x224 at a refresh rate of 103 Hz).
64 * Increased the refresh rate of video mode 2 to 65 Hz.
65 * Increased the refresh rate of video mode 3 to 120 Hz.
66 * Added speed throttling used when sound is disabled, and a
67 command-line switch to control it.
73 1.0 What FCE Ultra is.
74 1.1 System requirements.
76 2.0 Starting FCE Ultra
79 3.0 Platform Specific Notes
80 3.2 VS Unisystem Notes
81 3.3 Famicom Disk System Notes
84 3.6 Compressed File Notes
87 4.0 Contacting the author
90 /******************************************************************************/
91 /* 1.0) What FCE Ultra is: */
92 /******************************************************************************/
94 FCE Ultra is an NTSC and PAL Famicom/NES emulator for various
95 platforms. It is based upon Bero's original FCE source code. Current
96 features include good PPU, CPU, pAPU, expansion chip, and joystick
97 emulation. Also a feature unique to this emulator(at the current
98 time) is authentic Game Genie emulation. Save states and snapshot
99 features also have been implemented. The VS Unisystem is emulated
100 as well. FCE Ultra supports iNES format ROM images, UNIF format ROM
101 images, headerless and FWNES style FDS disk images, and NSF files.
103 FCE Ultra currently supports the following iNES mappers(many partially):
105 Number: Description: Game Examples:
106 --------------------------------------------------------------------------------
107 0 No Mapper Donkey Kong, Mario Bros
108 1 Nintendo MMC1 MegaMan 2, Final Fantasy
109 2 Simple 16KB PRG Switch MegaMan 1, Archon, 1944
110 3 Simple 8KB CHR Switch Spy Hunter, Gradius
111 4 Nintendo MMC3 Recca, TMNT 2, Final Fantasy 3
112 5 Nintendo MMC5 Castlevania 3, Just Breed, Uchuu Keibitai SDF
113 6 FFE F4 Series(hacked) Saint Seiya, Ganbare Goemon
114 7 AOROM Battle Toads, Lion King
115 8 FFE F3 Series(hacked) Doraemon Kaitakuhen
116 9 Nintendo MMC2 Punchout!
117 10 Nintendo MMC4 Fire Emblem, Fire Emblem Gaiden
118 11 Color Dreams Crystal Mines, Bible Adventures
120 15 Multi-cart(pirate) 100-in-1: Contra Function 16
121 16 Bandai Dragon Ball Z, Gundam Knight
122 17 FFE F8 Series(hacked) Parodius, Last Armageddon
123 18 Jaleco SS806 Pizza Pop, Plazma Ball
124 19 Namco 106 Splatter House, Mappy Kids
125 21 Konami VRC4 2A WaiWai World 2, Ganbare Goemon Gaiden 2
126 22 Konami VRC4 1B Twinbee 3
127 23 Konami VRC2B WaiWai World, Getsufuu Maden
128 24 Konami VRC6 Akumajo Densetsu(Dracula 3)
129 25 Konami VRC4 Gradius 2, Bio Miracle: Boku tte Upa
130 26 Konami VRC6 A0-A1 Inverse Esper Dream 2, Madara
131 32 Irem G-101 Image Fight 2, Perman
132 33 Taito TC0190/TC0350 Don Doko Don 1&2
133 34 NINA-001 and BNROM Impossible Mission 2, Deadly Towers, Bug Honey
134 40 (pirate) Super Mario Bros. 2
135 41 Caltron 6-in-1 Caltron 6-in-1
136 42 (pirate) "Mario Baby"
137 43 Multi-cart(pirate) Golden Game 150 in 1
138 44 Multi-cart(pirate) Super HiK 7 in 1
139 45 Multi-cart(pirate) Super 1000000 in 1
140 46 Game Station Rumble Station
141 47 NES-QJ Nintendo World Cup/Super Spike V.B.
142 48 Taito TC190V Flintstones
143 49 Multi-cart(pirate) Super HiK 4 in 1
144 51 Multi-cart(pirate) 11 in 1 Ball Games
145 52 Multi-cart(pirate) Mario Party 7 in 1
146 64 Tengen RAMBO-1 Shinobi, Klax
147 65 Irem H-3001 Daiku no Gensan 2
148 66 GNROM SMB + Duck Hunt
149 67 Sunsoft Mapper "3" Fantasy Zone 2
150 68 Sunsoft Mapper "4" After Burner 2, Nantetta Baseball
151 69 Sunsoft FME-7 Batman: ROTJ, Gimmick!
152 70 ?? Kamen Rider Club
153 71 Camerica Fire Hawk, Linus Spacehead
154 72 Jaleco ?? Pinball Quest
155 73 Konami VRC3 Salamander
156 75 Jaleco SS8805/Konami VRC1 Tetsuwan Atom, King Kong 2
157 76 Namco 109 Megami Tenshi 1
158 77 Irem ?? Napoleon Senki
159 78 Irem 74HC161/32 Holy Diver
160 79 NINA-06 F15 City War, Krazy Kreatures
161 80 Taito X-005 Minelvation Saga
162 82 Taito ?? Kyuukyoku Harikiri Stadium - Heisei Gannen Ban
163 83 Multi-cart(pirate) Dragon Ball Party
164 85 Konami VRC7 Lagrange Point
165 86 Jaleco ?? More Pro Baseball
167 89 Sunsoft ?? Mito Koumon
168 90 Pirate Super Mario World, Mortal Kombat
169 92 Jaleco ?? MOERO Pro Soccer, MOERO Pro Yakyuu '88
171 94 ?? Senjou no Ookami
172 95 Namco ?? Dragon Buster
173 97 ?? Kaiketsu Yanchamaru
174 99 VS System 8KB CHR Switch VS SMB, VS Excite Bike
175 105 NES-EVENT Nintendo World Championships
176 112 Asder Sango Fighter, Hwang Di
178 118 MMC3-TLSROM/TKSROM Board Ys 3, Goal! 2, NES Play Action Football
179 119 MMC3-TQROM Board High Speed, Pin*Bot
180 140 Jaleco ?? Bio Senshi Dan
181 151 Konami VS System Expansion VS The Goonies, VS Gradius
182 152 ?? Arkanoid 2, Saint Seiya Ougon Densetsu
183 153 Bandai ?? Famicom Jump 2
185 182 ?? Super Donkey Kong
186 184 ?? Wing of Madoola, The
187 189 Micro Genius TXC ?? Thunder Warrior
188 225 Multi-cart(pirate) 58-in-1/110-in-1/52 Games
189 226 Multi-cart(pirate) 76-in-1
190 227 Multi-cart(pirate) 1200-in-1
191 228 Action 52 Action 52, Cheetahmen 2
192 229 Multi-cart(pirate) 31-in-1
193 232 BIC-48 Quattro Arcade, Quattro Sports
194 234 Multi-cart ?? Maxi-15
195 240 ?? Gen Ke Le Zhuan, Shen Huo Le Zhuan
196 242 ?? Wai Xing Zhan Shi
199 250 ?? Time Diver Avenger
201 FCE Ultra currently supports the following UNIF boards(minus the
202 prefixes HVC-, NES-, BTL-, and BMC-, as they are currently ignored):
204 Group: Name: Game Examples:
205 --------------------------------------------------------------------------------
207 MARIO1-MALEE2 Super Mario Bros. Malee 2
208 NovelDiamond9999999in1 Novel Diamond 999999 in 1
209 Super24in1SC03 Super 24 in 1
210 Supervision16in1 Supervision 16-in-1
213 Sachen-8259A Super Cartridge Version 1
214 Sachen-8259B Silver Eagle
215 Sachen-74LS374N Auto Upturn
216 SA-016-1M Master Chu and the Drunkard Hu
221 TC-U01-1.5M Challenge of the Dragon
228 SGROM Defender of the Crown
232 SNROM Shingen the Ruler
233 SOROM Nobunaga's Ambition
236 TFROM Legacy of the Wizard
238 TKROM Kirby's Adventure
240 TLROM Super Spike V'Ball
244 TSROM Super Mario Bros. 3
250 ETROM Nobunaga's Ambition 2
251 EWROM Romance of the Three Kingdoms 2
263 NROM-256 Super Mario Bros.
268 /******************************************************************************/
269 /* 1.1) System requirements: */
270 /******************************************************************************/
272 Minimum system requirements:
276 400 KB free disk space
280 Recommended system specifications(at least):
285 Windows 9x/Me/2000/XP(long filename support)
287 Sound Blaster Pro or newer sound card(or compatible)
290 /******************************************************************************/
291 /* 2.0) Starting FCE Ultra */
292 /******************************************************************************/
294 Start FCE Ultra using the following format:
296 fceu <arguments> romimage.nes
298 <arguments> can be one or more of the following:
300 -vmode x Select video mode(all are 8 bpp).
301 1 = 256x240 @ 72 hz <Default>
303 3 = 256x256(with scanlines) @ 120 hz
304 6 = 256x224(with scanlines) @ 120 hz
306 -vsync x Wait for the screen's vertical retrace before updating
307 the screen. This *may* cause sound distortion.
308 0 = Disabled. <Default>
310 -cpalette x Load a custom global palette from file x.
311 The filename x is saved in the configuration file,
312 not the data from the file. Note that you should
313 probably use an absolute("C:\nes\test.pal") filename
314 rather than a relative("test.pal") filename. If x is 0,
315 the default (built in) global palette will be used.
316 -ntsccol Emulate an NTSC's TV's colors based on user-supplied
320 -sound x Sound. <Default=44100>
322 Otherwise, x = playback rate in samples per second.
323 -soundvol x Sound volume. x is an integral percentage value.
324 The default value is, obviously, 100.
325 Setting it higher will increase the likelihood that
326 sound clipping will occur. This shouldn't be noticeable
327 if the volume is reasonable(200% or lower; perhaps even
328 higher for many games).
329 -f8bit x Force 8-bit sound. Enabling this will decrease
330 sound quality noticeably without increasing
331 performance noticeably. Only use when 16-bit sound
333 0 = Disabled. <Default>
335 -nothrottle x Disables speed throttling used when sound is disabled
336 if x is non-zero. The default value of x is 0.
337 -joy x Joystick mapped to virtual joystick x.
338 0 = Disabled, reset configuration.
339 -inputx str Select device mapped to virtual NES-style input port
341 The default for both virtual input ports is "gamepad".
342 str may be: none, gamepad, zapper, powerpada,
344 -fcexp str Select Famicom expansion port device. If you select
345 a device other than "none", you should enable the
346 "gamepad" on both NES-style virtual input ports.
347 The default is "none".
348 str may be: none, shadow, arkanoid, 4player, fkb
349 -nofs x Disables Four-Score emulation if x is 1. Default is 0.
350 Note that Four-Score emulation will only be active
351 if "gamepad" is mapped to one or both virtual input
353 -gg Enable Game Genie emulation.
354 -pal Emulate a PAL NES.
355 -no8lim x Disables the 8 sprites per scanline limitation.
356 0 = Limitation enabled. <Default>
357 1 = Limitation disabled.
358 -subase x Save extra game data files(such as battery-backed RAM)
359 under the base directory if enabled.
360 0 = Disabled. <Default>
362 -snapname x Selects what type of file name screen snapshots will
364 0 = Numeric(0.png) <Default>
365 1 = File base and numeric(mario-0.png)
366 -clipsides x Clip leftmost and rightmost 8 columns of pixels of
368 0 = Disabled. <Default>
370 -slstart x Set the first drawn emulated scanline for NTSC emulation
371 mode. Valid values for x are 0 through 239.
372 The default value is 8.
373 -slend x Set the last drawn emulated scanline for NTSC emulation
374 mode. Valid values for x are 0 through 239.
375 The default value is 239.
376 -slstartp x Set the first drawn emulated scanline for PAL emulation
377 mode. Valid values for x are 0 through 239.
378 The default value is 0.
379 -slendp x Set the last drawn emulated scanline for PAL emulation
380 mode. Valid values for x are 0 through 239.
381 The default value is 239.
383 /******************************************************************************/
384 /* 2.1) General Keyoard Key Mapping: */
385 /******************************************************************************/
389 For emulated Family BASIC Keyboard:
390 Enable/Disable Keyboard Input Scroll Lock
391 (enabling emulated keyboard input will disable
393 All emulated keys are mapped to the closest open key on the PC
394 keyboard, with a few exceptions. The emulated "@" key is
395 mapped to the "`"(grave) key, and the emulated "kana" key
396 is mapped to the "Insert" key(in the 3x2 key block above the
399 For emulated game pads:
409 For emulated power pads(keys correspond to button locations on
418 S Select disk/disk side.
420 For VS Unisystem games:
422 V Show/Hide dip switches.
423 1-8 Toggle dip switches(when dip switches
426 T Select tint to adjust.
427 H Select hue to adjust.
428 +/- Increase/decrease tint or hue.
430 0-9 Select save state.
431 Caps Lock Select virtual joystick.
433 F2 Activate cheat interface.
435 F5/F7 Save/Load state.
436 F9 Save screen snapshot.
442 /******************************************************************************/
443 /* 3.0) Platform Specific Notes */
444 /******************************************************************************/
446 FCE Ultra's base directory is the directory in which the executable
449 Sound Blaster sound output requires that the 'BLASTER' environment
450 variable is set. To set it(permanently), add the following line
451 to your autoexec.bat file:
453 set BLASTER=A240 I5 D1 H7
455 Where 240(hexadecimal) is the Sound Blaster's base I/O address, 5
456 is the IRQ number, 1 is the 8-bit DMA channel, and 7 is the 16-bit
457 DMA channel(if applicable).
458 *DO NOT GUESS THE SETTINGS*
459 Invalid settings can result in very bad things happening.
461 /******************************************************************************/
462 /* 3.2) VS Unisystem Notes */
463 /******************************************************************************/
465 FCE Ultra currently only supports VS Unisystem ROM images in the
470 * VS Unisystem games that are about 49,000 bytes in size most likely
472 * Other VS Unisystem games will use other mappers. Here is a short
473 list of games and the mappers they use:
484 * The colors in many VS Unisystem games may be incorrect. This
485 is due to each game having its own PPU, and thus using a
486 different palette than games that use a different PPU.
489 /******************************************************************************/
490 /* 3.3) Famicom Disk System Notes */
491 /******************************************************************************/
493 You will need the FDS BIOS ROM image in the base FCE Ultra directory.
494 It must be named "disksys.rom". I will not give this file to you, so
497 Two types of FDS disk images are supported: disk images with the
498 FWNES-style header, and disk images with no header.
500 You should make backups of all of your FDS games you use with FCE
501 Ultra. This is because FCE Ultra will write the disk image back to
502 the storage medium, and the disk image in RAM might have been corrupted
503 because of inaccurate emulation(this case is not likely to occur, but
507 /******************************************************************************/
508 /* 3.4) Light Gun Notes */
509 /******************************************************************************/
511 Currently, the NES Zapper and the light gun used with the VS
512 Unisystem(I will call both the same name, Zapper) are supported.
513 Most(all?) NES games expect the Zapper to be plugged into port 2.
514 and most(all?) VS Unisystem games expect the Zapper to be plugged
517 The LEFT mouse button is the emulated trigger button for the
518 Zapper. The RIGHT mouse button is also emulated as the trigger,
519 but as long as you have the RIGHT mouse button held down, no color
520 detection will take place, which is effectively like pulling the
521 trigger while the Zapper is pointed away from the television screen.
522 Note that you must hold the RIGHT button down for a short
523 time(greater than just a fast click, shorter than a second).
525 Zapper emulation currently does NOT work with network play, so
526 don't even try it. I may add support in the future if enough
527 people want it or if I want it.
530 /******************************************************************************/
531 /* 3.5) Palette Notes */
532 /******************************************************************************/
534 Palettes files are expected to contain 64 8-bit RGB triplets(each in
535 that order; red comes first in the triplet in the file, then green,
536 then blue). Each 8-bit value represents brightness for that particular
537 color. 0 is minimum, 255 is maximum.
539 Palettes can be set on a per-game basis. To do this, put a palette
540 file in the "gameinfo" directory with the same base filename
541 as the game you wish to associate with and the extension "pal".
544 File name: Palette file name:
545 BigBad.nes BigBad.pal
546 BigBad.zip BigBad.pal
547 BigBad.Better.nes BigBad.Better.pal
550 With so many ways to choose a palette, figuring out which one will
551 be active may be difficult. Here's a list of what palettes will
552 be used, in order from highest priority to least priority(if a condition
553 doesn't exist for a higher priority palette, the emulator will
554 continue down its list of palettes).
556 NSF Palette(for NSFs only)
557 Palette loaded from the "gameinfo" directory.
558 NTSC Color Emulation(only for NTSC NES games).
559 VS Unisystem palette(if the game is a VS Unisystem game and a palette
561 Custom global palette.
565 /******************************************************************************/
566 /* 3.6) Compressed File Notes */
567 /******************************************************************************/
569 FCE Ultra can load data from both PKZIP-format files and
570 gzip-format files. Only one type of (de)compression algorithm is
571 supported: "deflate"; this seems to be the most popular compression
574 A compressed FDS disk image will only be saved back to disk if it
575 uses the gzip format.
577 All files in a PKZIP format file will be scanned for the
578 followings extensions: .nes, .fds, .nsf, .unf, .nez, .unif
579 The first compressed file to have one of these extensions will be
580 loaded. If no compressed file has one of these extensions, the
581 first compressed file will be loaded.
584 /******************************************************************************/
585 /* 3.7) Game Genie Notes */
586 /******************************************************************************/
588 The Game Genie ROM image is loaded from the file "gg.rom" in the
589 base directory the first time Game Genie emulation is enabled and
590 a ROM image is loaded since the time FCE Ultra has run.
592 The ROM image may either be the 24592 byte iNES-format image, or
593 the 4352 raw ROM image.
595 Remember that enabling/disabling Game Genie emulation will not take
596 effect until a new game is loaded(this statement shouldn't concern
597 any of the "run once" command-line driven ports).
599 /******************************************************************************/
600 /* 4.0) Contacting the author */
601 /******************************************************************************/
603 I can be reached via email at xodnizel@users.sourceforge.net.
604 Bero can be reached via email at 9bero9@geocities.co.jp
605 (Note that Bero can not and will not answer any questions
606 regarding the operation of FCE Ultra, so please don't ask him.
607 If you understand this, remove the 9's from the email address
608 provided to get his real email address.)
611 /******************************************************************************/
613 /******************************************************************************/
615 \Firebug\ - High-level mapper information.
616 Bero - Original FCE source code.
617 Brad Taylor - NES sound channel guide.
618 Chris Hickman - Archaic Ruins.
619 Donald Moore - DC PasoFami NES packs.
620 Fredrik Olson - NES four-player adapter information.
621 Gilles Vollant - PKZIP file loading functions.
622 goroh - Various documents.
623 Jeff Tamer - Insaniacal fun.
624 Jeremy Chadwick - General NES information.
625 Justin Smith - Giving me obscure ROM images in the "dark ages of
627 Kevin Horton - Low level NES information and sound information.
628 Ki - Various technical information.
629 Mark Knibbs - Various NES information.
630 Marat Fayzullin - General NES information.
631 Matthew Conte - Sound information.
632 N. Andou - Awesome NES/SNES emulators, at the time...
633 nori - FDS sound information.
634 Quietust - VRC7 sound translation code by The Quietust
636 Ideas and corrections.
637 R. Hoelscher - Famicom four-player adapter information.
638 Rob Mocca - DC PasoFami NES packs, testing.
639 Sean Whalen - Node99.
640 Tatsuyuki Satoh - OPL2 emulator
641 TheRedEye - ROM images, testing.
646 ...and everyone else who has helped me.