Tricky-to-emulate games

From NESdev Wiki
Revision as of 03:39, 26 June 2024 by TakuikaNinja (talk | contribs) (Fix link to PPU scrolling section.)
Jump to navigationJump to search

At the very least the following games depend on hard-to-emulate or just obscure behavior. (If you're looking for a good first game for your new emulator, try anything made in 1984 or earlier, such as Donkey Kong.)

Abarenbou Tengu (J), Captain Tsubasa 2 (J), Noah's Ark (E), Rampart (U), Zombie Nation (U)
These refer to CHR ROM banks outside their size. A CHR ROM of the correct size will wrap the addresses correctly by discarding the most significant bits, as do most emulators. But if you are developing a flash-cart that just pre-programs its flash/SRAM memory with the CHR ROM data without address wrapping, graphical bugs will happen. If you want to simulate that behaviour in emulator, increase CHR-ROM banks number in iNES header twice and paste zeros in the the CHR area.
Adventures of Lolo 2, Ms. Pac-Man (Tengen), and Spelunker
These rely on 1-cycle NMI delay when PPUSTATUS ($2002) bit 7 gets set inside vblank (if $2002 has not been read yet), in which PPUSTATUS bit 7 can be read as true.
Air Fortress (J)
Expects RAM to be enabled at power-up, as it clears WRAM before enabling it ($E000 D4). If MMC1 powers up with RAM disabled, the values written in the init routine go nowhere. If RAM is not enabled is used and the RAM's power-up value is anything but $00, unwanted color emphasis gets applied until the reset button is pressed. (The North American version enables WRAM first.)
Arkista's Ring
Crashes after completing the first loop if a read from PPU open bus returns 1 on bit 6, which is 0 unless using a mod such as NESRGB or Hi-Def NES that uses EXT output.
Balloon Fight
It reads the nametables through PPUDATA ($2007) to twinkle the stars in the background. (The code is at $D603.) The scroll split in "Balloon Trip" also depends to an extent on the correct number of CPU cycles from the start of NMI to the start of display, but it's not particularly picky.
Bandit Kings of Ancient China, Gemfire, L'Empereur, Nobunaga's Ambition II, Romance of the Three Kingdoms II, and Uncharted Waters
Koei's MMC5 RPGs and strategy games use 8×8-pixel attributes and large work RAM.
Bases Loaded II
The screen glitches after a pitch is thrown (screenshot) if writing $00 then $80 to PPUCTRL during vertical blank does not cause an additional NMI.
Batman: Return of the Joker and Dragon Quest
These read level data and control logic from CHR ROM. The $2007 read must take into account not only the 1-byte delay but also CHR bank switching. Batman: RotJ also executes code from PRG RAM.
Battletoads
Infamous among emulator developers for requiring fairly precise CPU and PPU timing (including the cycle penalty for crossing pages) and a fairly robust sprite 0 implementation. Because it continuously streams animation frames into CHR RAM, it leaves rendering disabled for a number of scanlines into the visible frame to gain extra VRAM upload time and then enables it. If the timing is off so that the background image appears too high or too low at this point, a sprite zero hit will fail to trigger, hanging the game. This usually occurs immediately upon entering the first stage if the timing is off by enough, and might cause random hangs at other points otherwise.
Battletoads & Double Dragon and Low G Man
They read from WRAM at $6000–$7FFF despite there being none on the cartridge, relying on the values produced by open bus behavior.[1] Additionally, LGM disables WRAM through $A001, which some emulators disregard in order to kludge MMC6 games into working. If WRAM is present and enabled, some pre-loaded values will cause BT&DD to crash at the end of stage 1 when Abobo makes his first appearance and LGM to crash when playing boss music.[2]
Bee 52
This needs accurate DMC timing and relies on PPUSTATUS bit 5 (sprite overflow) as well.
Bill & Ted's Excellent Adventure and some other MMC1 games
These depend on the mapper ignoring successive writes; see iNES Mapper 001 (the talk page for that page might be informative too). Bill & Ted also turns off and re-enables rendering midframe to switch CHR banks (such as in the black border above dialog boxes).
Burai Fighter (U)
It accesses PPUDATA during rendering to draw the scorebar. Incorrect emulation clips the scorebar to half size. See the notes on accessing PPUDATA during rendering on the PPU scrolling page.
B-Wings, Fantasy Zone II, Demon Sword / Fudō Myōō Den, Fushigi no Umi no Nadia, Krusty's Fun House, Trolls in Crazyland, Over Horizon, Super Xevious: GAMP no Nazo, and Zippy Race
They write to CHR ROM and expect the writes to have no effect.[3][4]
Captain Planet, Dirty Harry, Infiltrator, Mad Max, Paperboy, The Last Starfighter
Mindscape games which rely on the open bus behavior of controller reads and expects them to return exactly 0x40 or 0x41; see Standard controller.
Cobra Triangle and Ironsword: Wizards and Warriors II
They rely on the dummy read for the sta $4000,X instruction to acknowledge pending APU IRQs.
Crystalis
Uses MMC3 scanline for a moving vertical split to wrap the playfield while accommodating the status bar. Incorrect MMC3 timing will create a moving seam as you wander up and down the map.
Crystalis, Fantastic Adventures of Dizzy, Fire Hawk, Indiana Jones and the Last Crusade, StarTropics, and Super Off Road
These do mid-frame palette changes.
Daydreamin' Davey
Changes the background palette color mid-frame; also does an OAM DMA for its sprite-only status bar below the split. (See also: Stunt Kids.)
Door Door
Writes to the PRG-ROM area frequently through a pointer explicitly set to $8080. Harmless on NROM.
Final Fantasy, River City Ransom, Apple Town Story[5], Impossible Mission II[6] amongst others
Use the semi-random contents of RAM on powerup to seed their RNGs. Emulators often provide fully deterministic emulated powerup state, and these games will seem to be deterministic when they weren't intended to be.
Fire Hawk, Mig 29 Soviet Fighter, and Time Lord
These need accurate DMC timing because they abuse APU DMC IRQ to split the screen.
Galaxian
Requires proper handling of bit 4 of the P register for /IRQ.
G.I. Joe and Mickey in Letterland
These turn sprite display off and leave the background on. Correct timing of MMC3 IRQs requires that the sprite fetches still clock the scanline counter when either is enabled.[1]
Huge Insect
Depends on obscure OAMADDR ($2003) behavior in the OAM DRAM controller; see PPU registers.
Ishin no Arashi
Plays sound effects through MMC5 pulse channels and times them using $5015 reads.
Jurassic Park
The wobbling OCEAN logo on the title screen is very sensitive to slight delay in the MMC3 IRQ and could have incorrectly scrolled lines if mistimed.
The Legend of Zelda
Writes to PPUADDR midframe to set the coarse Y scroll for vertical scrolling between screens. See the Game bugs page for buggy behavior arising from its implementation.
The Magic of Scheherazade
It maps two non-contiguous PRG ROM pages next to each other, then executes code across the page boundary. Emulators which use pointers to fetch sequential instruction bytes from ROM will fail when taking damage in the RPG-style battles. (Use password 5W to test this easily.)
Marble Madness, Mother (J), and Pirates
These switch CHR banks mid-scanline to draw text boxes (such as at the beginning of each MM level). Getting these to render correctly requires fairly precise timing.
Micro Machines
Requires correct values when reading OAMDATA ($2004) during rendering, and also relies on proper background color selection when rendering is disabled and the VRAM address points to the palette (see the "background palette hack" on PPU palettes).
Punch-Out!!
MMC2 snoops PPU fetches. If the PPU does not fetch the 34th tile, the ring will be glitched.
Puzznic and Reflect World (FDS)
These use unofficial opcode $89, which is a two-byte NOP on 6502 and BIT #imm on 65C02. (Puzznic tasvideos discussion) The instruction in Puzznic is $89 $00; emulating $89 as a single-byte NOP will trigger a BRK that causes the screen to shake.
Rollerblade Racer
Has an unusual status bar using only sprites with the background disabled. (See also: Daydreamin' Davey.)
Slalom
Does a JSR while the stack pointer is 0, so that half of the return address ends up at $0100 and the other half at $01FF. Also executes code from RAM.
Solar Jetman
Enables the decimal bit through manipulation of a flag byte pushed to the stack and expects addition to continue to operate in binary.
Spot and Quattro Sports
These poll input multiple times per frame, and may not respond to emulated input that can only change at one specific time during the frame[7][8]. Emulators generally don't have the option to poll the controller many times per frame in real-time, so the solutions used may need to compromise (e.g. game-specific solution, user option to decide when during the frame input changes, non-deterministic input change time). Tepples created a test ROM to explore this behaviour: Telling LYs?
Star Trek – 25th Anniversary
Forces MMC3 to fire IRQ at scanline 0 which on some MMC3 versions or flashcarts causes glitching during split-screen scenes.
StarTropics
Disables rendering at the top of the status bar to change palettes, but also re-enables sprites when rendering comes back on. For hardware mapper emulation, the specific timing is critical. If the MMC3 IRQ timing is delayed by a cycle or two, this will begin to cause all sprites to flicker erratically. Even with a correctly timed hardware implementation, there are still some subtle corruption interactions to do with turning rendering off, then re-enabling sprites mid-frame which might not be possible to emulate correctly with current knowledge[9].
Stunt Kids
Mid-frame OAM DMA for split-screen gameplay.
Super Mario Bros.
This is probably the hardest game to emulate among the most popular NROM games, which are generally the first targets against which an emulator author tests their work. It relies on JMP indirect, correct palette mirroring (otherwise the sky will be black; see PPU palettes), sprite 0 detection (otherwise the game will freeze on the title screen), the 1-byte delay when reading from CHR ROM through PPUDATA (see The PPUDATA read buffer), and proper behavior of the nametable selection bits of PPUSTATUS and PPUADDR. In addition, there are several bad dumps floating around, some of which were ripped from pirate multicarts whose cheat menus leave several key parameters in RAM.
Super Mario Bros. 3, Mystery World Dizzy, Double Action 53, and Haunted: Halloween '86: The Curse of Possum Hollow
This relies on an interaction between the sprite priority bit and the OAM index to put sprites behind the background. SMB3 uses it for powerups sprouting from blocks. Mystery World Dizzy puts Dizzy behind a blue pillar (screenshot). RHDE: Furniture Fight in DA53 uses it for characters behind furniture. HH86 uses it when Donny or Tami passes behind a telephone pole or steps into polluted water.
Teenage Mutant Ninja Turtles
Uses Y scroll values greater than 239, causing the PPU to read the attribute table as nametable data before looping back to the same nametable instead of rolling to the next nametable down.
Time Lord
This is sensitive to the power-on state of the NES. The Vblank flag in PPUSTATUS must be set for the first time within 240 scanlines, otherwise there will be a frame IRQ which is never acknowledged, which will mess up the DMC IRQs used elsewhere and cause the game to crash.
Ultimate Stuntman, Skate or Die 2
Ultimate Stuntman plays PCM drum samples on the DMC channel during idle portions of the frame. Skate or Die 2 does it on the title screen. (See also: Battletoads introduction.)
Wario's Woods
Uses MMC3 IRQ with unusual configuration of BG using CHR page $1000 and sprites using CHR page $0000. On some CPU-PPU alignments (assigned randomly at reset), the IRQ receives an extra clock on every second frame, causing the last 48 pixels of the green ground to flicker, but not on all resets[10].
Wizards and Warriors 3
It writes new tile graphics for the sprites at the screen split after the sprites have been drawn, but before the frame has ended. Emulators which draw the sprites all at once using graphics data from the end of the frame will have glitches in the main character's sprite.
The Young Indiana Jones Chronicles and Zelda II: The Adventure of Link
These access PPUDATA during rendering to perform a glitchy y scroll. Young Indy uses it to make the screen shake when cannonballs hit the ground, and Zelda II uses it to skip scanlines on the title screen. See the notes on accessing PPUDATA during rendering on PPU scrolling page.

Troubleshooting games

If a scroll split doesn't work, and a garbage sprite shows up around the intended split point, then the game is probably trying to use a sprite 0 hit, but either the wrong tile data is loaded or the background is scrolled to a position that doesn't overlap correctly. This could be a problem with nametable mirroring, with CHR bankswitching in mappers that support it, or with the CPU and PPU timing of whatever happened above the split. Battletoads, for one, uses 1-screen mirroring and requires exact timing to get the background scroll position dead-on.

See also

References

  1. thread: Battletoads Double Dragon Powerpak Freeze
  2. thread: Battletoads Double Dragon Powerpak Freeze - pre-loading $FF reliably crashes BT&DD, $00 reliably does not.
  3. thread: KrzysioCart - Home made cartridge that support>80% NES games
  4. thread: Hong Kong 212 PCB,128+1024?
  5. http://forums.nesdev.org/viewtopic.php?p=183064#p183064
  6. http://forums.nesdev.org/viewtopic.php?f=3&t=18111
  7. forum thread: Spot bug in Mesen and Nintaco
  8. forum thread: Quattro Sports BMX Simulator uses extra controller?
  9. forum thread: OAM corruption in StarTropics
  10. forum post: discussion of Wario's Woods behaviour on real hardware

External links