NES Game Hacks

(using my special port of FCE Ultra, MacFCEU,
sometimes whole mornings, trial and error)

** Spoiler Alert! **

Before you go any further, you should know that you are looking at content that enables you to cheat!

Addresses are in hexadecimal with '$' or '0x' prefixes, absolute (unsigned) by default.
Remember that 'H' and 'V', instead of 'X' and 'Y' represent on-screen coordinates; scanline vertical coordinates run top-to-bottom, not center-up.
To change data in MacFCEU, use the debugger; type `sb <address> <bytes..>` into the command line.


Donkey Kong ©1981 Nintendo - NROM, 24KB, NTSC (CRC32:0x6F97C721)

AddressUse
$18-1Fror array (for random no. generation); (bit #1 of $19 eor’d with $00) != 0, is rotated in
$2Etime (bonus), in BCD
$44countdown to next screen
$54zero-based level; incremented before Kong falls
$55lives
$58demo control of player
$5Eactive barrel motion array: #1=descending, down ladder, 8=falling (gravity), 16=bouncing, $80=appearing (from Kong), $C0=dropping, $C1=dropping, hit floor (restart velocity)
$50Edemo replay index
$AFactive ‘sparky’ motion array: #1=moving, $10=descending, $20=ascending

The 2A03 version is so operationally close to the original Z80 arcade version that most or all of its bugs are carried over, including the timer bugs toward level 254 (the infamous kill screen).  I’m not sure about this, though.

Super Mario Bros. ©1985, 1989 Nintendo - NROM, 64KB, PAL

AddressUse
$Egame transition:
#1-bean stalk, fall, down pipe, run, completion, dead, start,
#8-norm-1, input disable, norm-2, death, powerup disable
(higher values will crash)
..game object store
$9Fplayer v-velocity
$B5death sequence (#1=none)
$CEplayer v-position
$F2song track-something
$FBgame song (by bit) — single bit=start:
#0-above ground, sea, underground, fortress,
#4-special, land-to-pipe, special-2, <silence>
Code Addresses: stop, $9056; course-set, $9113; read: $8EA7
$FCend song (by bit):
#0-death, game over, the end, world clear,
#4-over, course clear, time running out, <silence>
$FDnoise sfx (by bit):
#0-brick bash, fire breath..<silence>
$FErectangle sfx-1 (by bit):
#0-coin, open box, unearth (bean stalk), explosion,
#4-select, empower, one-up, fall
$FFrectangle sfx-2 (by bit):
#0-jump, fire ball hit, squish, pluck,
#4-shrink/pipe, fire ball, flag, small jump
$200..$2FFsprite store;
#0 is used for sprite #0-hit: v:$18 i:$FF a:$23 h:$58
$300..playfield store?
~$500..map store
$6CDsome loader field
$6E0..??
$704in water
$70Bgrowing
$70Ehold vertical physics, scroll
$70Fshowing flag points
$716pass-through
$71Amap update pace?
$71Cobj update pace?
$71F..$721playfield update pace, sizes?
$723no scroll updates
$725..$72Ablock map reference?
$72E..$72Fblock map lengths?
$743in sky round (cloud blocks instead of bricks)
$747animation/load stop time
$74Eenvironment:
#0-water/hard, normal, normal-concealed, hard, sky/empty
$753player index (controls), can be used to disable
$754player’s small (can be incorrect in rare cases)
$756player’s powerup:
#0-small, large, anything else is 'fire'
$770mode: #0-off, game, lock..lock-up
$772reset mode: #0-title, place, active
$773environment key
$774temporary-only: $00
$776paused
$778CHR banks (master): $11
$779screen PPU-Control-1 (see docs.)
$781map length key?
$79Eflash time
$79Fstar time
$7A0music regs
$7C4music rate bitmask; #3=fast
$7C5music set status
$7C6sound disable
$7DDscore (6 byte-coded decimal)
$7EDcoins (2 byte-coded decimal)
$7F8time (3 byte-coded decimal)

Super Mario Bros. 2 ©1988 Nintendo - TxROM, 256KB, PAL

AddressUse
$14world H
$28world V
$32player V - below screen kills
$46player V velocity
$ACportal egg activation status (1=open)
$CAno sprites
$CBsprite world V
$FCplayfield H
$FDplayfield V
$4B5portal activated
$4C4POW shake (decremented)
$4C5playfield scroll-V
$4C6bomb flash (decremented)
$4CBworld H shift
$4E0invincibility (decremented, slowly)
$4ECstaging:
#0-no change, begin, game over, end sequence,
any other value initiates warp zone
$600song start (by bit):
#0-over ground, pick player, under ground, danger,
#4-star, dream land, final battle, intro
$601DMC sfx (by bit):
#0-door open, drum-low, whew, uproot,
#4-foe death, drum-high, foe pain,
#7-player death (stopped immediately in death)
$602rect-2 sfx (by bit):
#0-egg launch, door form, cherry grab, throw,
#4-1up, NPC kill, clock tick, portal open
$603music sequence (by bit):
#0-lotto win, white door, end-song, player death,
#4-game over, portal open, lotto, silent
$604rect-1 sfx (by bit):
#0-jump, climb, coin, shrink,
#4-fall, enlarge
any other value lets channel play out
$605noise sfx (by bit):
#0-instrument (short), #1/2-shuttle/POW
any other value silences channel
$609defered song bits (DMC played w. #2 on)
$60Dsfx sequence playing

With UDLR, left+right causes the player to “moon walk.”

Super Mario Bros. 3 ©1988 Nintendo - TSROM-8, 384KB, PAL

AddressUse
$14stage end
$15game tile cycle (e.g., coins)-VBL incremented, apparently
$16game (above scorebar) PPU-Control-1 (see docs.)
$6C..some music control registers
$75map Mario v-position
$76map Luigi v-position
$77map Mario h-position-high
$78map Luigi h-position-high
$79map Mario h-position-low
$7Amap Luigi h-position-low
$87player v-position-high (may not apply to falling ceilings)
$90player game scroll
$A2player v-position-low (may not apply to falling ceilings)
$ABplayer h-position
$BDplayer h-speed
$EDplayer current power up ($578 value-1)
$3DDrun stat
$3F2star
$3F3map power-up (8=cloud)
$461/$4F5game song init.:
#0-<no change>, World 1-8
#9-sky/world select, star, flute, harp(SMB theme)
#13-return, trivia, the end
$10-land...$20-night...$30-water
$40-fortress...$50-fight...$60-ship...
$70-duel...$80-special...$90-hills...
$A0-switch...$B0-endgame...$C0-ship fight...
$D0-all-in-one-land,$E0:dark,$F0:sea,
evil,battle,ship,duel,special,hills,endgame,fight—<crash>
$4F1jump sfx — bit #7 = small
$4F2auto sfx,
$4F3noise/triangle sfx
$4F4break tune init. (by bit):
#0-congrats, died, start over, champ, win,
#4-bowser fall, complete, time running out!, <empty>
$4F6map sfx (by bit):
#0-appear, move, enter, inventory, special, <empty>...
#7-fail
$4F7pause bitmask
$500map help balloon V
$50Fmap help balloon H
$546player state bits:
#7-can slide (downhill)
$551player grow
$552player stun time
$553player star time
$554player poof time
$555player flash time
$556player stop time
$557player kick (object) time
$558player holding time
$559complete (course) time — no mirror updates, passes right
$55Aship transition
$55Fscene reset
$561character reset (reloads characters, zeroes $566)
$563player no ground
$564obj count recreate
$566map environment or transition:
#0-normal, flying fish, spiked fish (slow)
#3-loading/transition value (resets to zero),
#4-flying beetles (timing was done w. care as the player will hit the ceiling!),
#5-passing clouds, passing stands (that fall when you stand on them),
#7-special box (ends level when opening it),
#8-loading/transition value (resets to zero),
#9/10-reserved (crashes),
#11-unknown, #12-reserved for card games (reserved),
#13/14-reserved (crashes), #15-reserved (blanks screen, crashes)
#16-rising (to coin heaven; can still fire/wag!)
#17-22-reserved (crashes),
#23-tile loading (messes up graphics w/o proper data)
$567break tune time
$56Eplayer fly time
$56Fcrouch
$571teleport bitmask:
1-3: ender; <0-hold; 4-7: end;
8: to darkness (dies w/o proper loading);
14: value for entering pipe-down (until in); 15: up
16-23: to hills, "coming out of pipe" (20+ invalid in some cases)
$82: leaving pipe-down (until out); $83-up
$572sky transition
$575swim efx
$577has shoe — CHR must be loaded for it to look right
$578powerup set:
  1. <no change>
  2. small
  3. norm
  4. fire
  5. tanuki
  6. frog
  7. racoon
  8. hammer
$57Clast active block hit type (e.g., song block)
$580game is floating (water level)
$587behind end-zone
$588time left in background (note that you must pass a special to win a flute)
$58Ano fist (affects appearance in jumping)
$597in boat (map, used; reset if on boat)
$5EEtime (3 byte-decimal), negatives treated as carry
$5F1timer decrement (per-VBL, apparently)
$5F2map menu
$5FCship game position
$5FDtransition w/ king (Oh, it's terrible!)
$6B6player obstruction bit:
#0: koopa-anchored (unable to jump high)
$71Abkgnd tile pattern offset (includes shadows)
$715score (3 bytes MSB)
$736lives
$7C1palette (32 bytes)
$7F0..sound regs
$6000game block map
$7964set to $5A; any other value resets the cart
$7D80Mario power-up items:
#0=emtpy, mushroom, flower, leaf
#4=frog, racoon, hammer bros., cloud
#8=power tanuki, star, anchor, hammer
#12=flute, song
$7DA2Mario cash (auto one-up past 99)
$7DA3Luigi power-up items
$7DC5Luigi cash (auto one-up past 99)

Ghoul School ©1991 Imagineering, Inc. - SxROM, 256KB, NTSC

AddressUse
$10player H copy
$12player-upper V copy
$14player-lower V copy
$16scroll-remaining - 16-bit; $0080 when in locker
$1A/1Cplayer orientation bitmask
$24hit data
$26, $27scorebar scrolls v,h: $C0,$00 (in-game)
$2Acounter from down-center $2B; bit #7 is off
$2Dreset (by bit):
#0-text unrendered
#3-map unrendered
$31sprite environment:
#0-halls, cafeteria, gym,
#5-classroom, chemistry, duct/roof, basement, shop,
#10-library, spike/snake, weights, opening seqs.,
#15-elevator BG, building, select/title, spike/spine,
#19-elevator/ghoul, spike/showers, spike/monkey,
#22-spike/brainer, spike/reaper, spike/plant, spike/skull,
#26-spike/classroom, spike/note, spike/ducts, spike/heart,
#30-spike/janitor, spike/boiler
$49physics flags (by bit):
#0-on floor, hit ceiling, #4-on dropable sufrace
$6Bweapons not taken from map (boolean bytes)
$81game state-setting to $FF ends game
$204..player sprite data
$300../$700-1Fmap graphics
$45Ecurrent room ID
$45Froom/menu switch
setting both $45E-F to $0101 kills player
$460prev. room ID (old value)
$4DAplayer H
$50Aplayer V
$55Aplayer V velocity
$6CAsong index:
#0-silence, halls, air, wild,
#4-classroom, doomed(unused), library, phantom(basement),
#8-music, chemistry, farewell, clock,
#12-crawlspace; others crash
bit #7=fast tempo, #5=alternate tempo
ghosts in end-sequence only move when non-zero
$6CBweapon array, by type each:
#0-bat, towel, sandwich, deweytron,
#4-digestaray, embalm fluid, sickle, gamma gun,
#8-spinal tap; other make sprite garble, may crash
$6D4shoe array: sneakers, springs, suction
$6D7current shoes (in shoe array)
$6D8current weapon (in weapon array)
$6DEweapons count
$6DFshoes count
$6EEmobility bitmask (updated airborne-wise):
#0-walk(no motion w/o turn), enter (doors), await move, drop,
#4-jump, turn
$7BB(re)start music
$7C0music variables

Weapons appear to be worth 1,000 points in general.  The Gamma Gun kills anything that moves, including the Medusa Head (although you can’t get back to the halls once you get the gun; without teleporting via $45E anyway…) and janitor’s mop.

ObjectVulnerablesPoints
Reaperall but likes of Dewytron0
Ghoulall40/80
Gym Zombieall50
Ghostall100
Librarianmost100
Hall Zombieall, but he is FAST!200
SunflowerSickle, Gamma300
BuzzerBat, Towel1000
ClockBat1000
Heartmost1000
MedusaGamma1000
Dead Bodynot an NPC!n/a

Click here for a near-complete map of the game.


Disclaimer:
The authors of this content, and web host(s) disclaim all responsibility for any damages, direct or indirect, that may occur in use of the information, software, etc. available here.

Nintendo®, Nintendo Entertainment System® are a registered trademarks of Nintendo of America, Inc. ©1985-2010