If you are still using the old URL (datacrystal.romhacking.net), please update your bookmarks! The old URL may stop working soon.
The current URL is datacrystal.tcrf.net.
The current URL is datacrystal.tcrf.net.
Tetris (NES, Nintendo)/ROM map: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(a few more) |
||
Line 1: | Line 1: | ||
{{Rommap|game=Tetris}} | {{Rommap|game=Tetris}} | ||
All addresses are in CPU address space, not iNES file space. You'll have to convert addresses for use in iNES, UNIF, or any other file format. | |||
<pre> | <pre> | ||
; Code: | ; Code: | ||
Line 6: | Line 7: | ||
main = $8000 | main = $8000 | ||
soundWaitVBL = $AA45 ; Run sound code and wait for vblank NMI | soundWaitVBL = $AA45 ; Run sound code and wait for vblank NMI | ||
turnOffNMI = $AA78 ; Turn off | turnOnNMI = $AA6B ; Turn on interrupt at scanline 241 | ||
turnOffNMI = $AA78 ; Turn off interrupt at scanline 241 | |||
clearNametable = $AA82 ; Clear nametable whose base address is A | clearNametable = $AA82 ; Clear nametable whose base address is A | ||
clearVRAM = $AC1C ; If A < $1F, clear Y pages of VRAM to X | clearVRAM = $AC1C ; If A < $1F, clear Y pages of VRAM to X | ||
; Otherwise, clear 4 pages of VRAM to X and clear attribute table to Y | ; Otherwise, clear 4 pages of VRAM to X and clear attribute table to Y | ||
clearRAM = $AC6A ; Clear pages X to Y of CPU RAM to value in A | |||
switch = $AC82 ; Jumps to the Ath 16-bit address in the following jump table, | |||
; similar to the "magic jump" in Super Mario Bros. | |||
playSound = $E000 ; Appears to be sound code, called every frame | playSound = $E000 ; Appears to be sound code, called every frame | ||
; Data: | ; Data: |
Revision as of 21:11, 18 June 2006
The following article is a ROM map for Tetris (NES, Nintendo).
All addresses are in CPU address space, not iNES file space. You'll have to convert addresses for use in iNES, UNIF, or any other file format.
; Code: reset = $FF00 main = $8000 soundWaitVBL = $AA45 ; Run sound code and wait for vblank NMI turnOnNMI = $AA6B ; Turn on interrupt at scanline 241 turnOffNMI = $AA78 ; Turn off interrupt at scanline 241 clearNametable = $AA82 ; Clear nametable whose base address is A clearVRAM = $AC1C ; If A < $1F, clear Y pages of VRAM to X ; Otherwise, clear 4 pages of VRAM to X and clear attribute table to Y clearRAM = $AC6A ; Clear pages X to Y of CPU RAM to value in A switch = $AC82 ; Jumps to the Ath 16-bit address in the following jump table, ; similar to the "magic jump" in Super Mario Bros. playSound = $E000 ; Appears to be sound code, called every frame ; Data: initHiScores = $AD67 ; High score table, copied to $0700 on boot