Game Genie: Difference between revisions
(Don't insinuate that mapper # is just a matter of allocation.) |
(formatting, punctuation, links) |
||
Line 1: | Line 1: | ||
The '''Game Genie''' is a enhancement cart for the NES designed by Camerica and distributed by Galoob and Camerica. | The '''Game Genie''' is a enhancement cart for the NES designed by [http://en.wikipedia.org/wiki/Camerica Camerica] and distributed by [http://en.wikipedia.org/wiki/Galoob Galoob] and Camerica. It functions as a pass-thru, with a [[Cartridge_connector#Pinout_of_72-pin_NES_consoles_and_cartridges|72-pin cartridge connector]] connecting it to the NES, and a 72-pin cartridge slot for a game to be inserted into. When plugged in between a game and the NES and turned on, it provides a simple interface to enter up to three cheat codes, which then modify the behavior of the game. | ||
The Game Genie is not assigned a [[mapper]] number. | The Game Genie is not assigned a [[mapper]] number. | ||
Line 5: | Line 5: | ||
== Technical == | == Technical == | ||
The Game Genie works by intercepting CPU reads and replacing the game cart's response with its own response. | The Game Genie works by intercepting CPU reads and replacing the game cart's response with its own response. It can intercept any three addresses in CPU <tt>$8000</tt>…<tt>$FFFF</tt> and respond with a single replacement for each. To make the tool more compatible with [[Glossary#B|bank-switching]], each of the three codes has an optional compare value which can be used to only replace the byte if the original byte matches the compare, hopefully limiting the cheat to functioning on the desired bank. | ||
When first booted, the Game Genie presents its own | When first booted, the Game Genie presents its own 4-KiB [[Glossary#P|PRG ROM]] and a series of simple gates masquerading as a [[Glossary#C|CHR ROM]]. The included PRG ROM runs code to show a simple code entry user interface. When the user presses Start, the cheat values are written to memory-mapped registers, and then another register is written which switches the Game Genie into game mode, where the attached game cart's CHR and PRG is passed through, save whatever code replacements were defined. The Game Genie remains in game mode until power-cycled, and will respond to no further writes. | ||
== Registers == | == Registers == | ||
=== Master Control ($8000) === | === Master Control (<tt>$8000</tt>) === | ||
7 bit 0 | 7 bit 0 | ||
---- ---- | ---- ---- | ||
Line 20: | Line 20: | ||
+++------ Disable each of the three codes | +++------ Disable each of the three codes | ||
Bit 1 and 4 correspond to the code at $8001 | Bit 1 and 4 correspond to the code at <tt>$8001</tt>…<tt>$8004</tt>. | ||
=== Address High ($8001, $8005, $8009) === | === Address High (<tt>$8001</tt>, <tt>$8005</tt>, <tt>$8009</tt>) === | ||
7 bit 0 | 7 bit 0 | ||
---- ---- | ---- ---- | ||
Line 29: | Line 29: | ||
+++-++++- Bits 8:14 of address for this cheat (Bit 15 fixed to 1) | +++-++++- Bits 8:14 of address for this cheat (Bit 15 fixed to 1) | ||
=== Address Low ($8002, $8006, $ | === Address Low (<tt>$8002</tt>, <tt>$8006</tt>, <tt>$800A</tt>) === | ||
7 bit 0 | 7 bit 0 | ||
---- ---- | ---- ---- | ||
Line 36: | Line 36: | ||
++++-++++- Bits 0:7 of address for this cheat | ++++-++++- Bits 0:7 of address for this cheat | ||
=== Compare ($8003, $8007, $ | === Compare (<tt>$8003</tt>, <tt>$8007</tt>, <tt>$800B</tt>) === | ||
7 bit 0 | 7 bit 0 | ||
---- ---- | ---- ---- | ||
Line 43: | Line 43: | ||
++++-++++- Compare value for this cheat (write 0 if unused?) | ++++-++++- Compare value for this cheat (write 0 if unused?) | ||
=== Replace ($8004, $8008, $ | === Replace (<tt>$8004</tt>, <tt>$8008</tt>, <tt>$800C</tt>) === | ||
7 bit 0 | 7 bit 0 | ||
---- ---- | ---- ---- | ||
Line 50: | Line 50: | ||
++++-++++- Replacement value for this cheat | ++++-++++- Replacement value for this cheat | ||
=== Unknown ($FFF0, $FFF1) === | === Unknown (<tt>$FFF0</tt>, <tt>$FFF1</tt>) === | ||
The Game Genie rom writes 0 to $FFF0, $FFF1, $FFF0 in that sequence. | The Game Genie rom writes 0 to <tt>$FFF0</tt>, <tt>$FFF1</tt>, <tt>$FFF0</tt> in that sequence. | ||
== Pattern Tables == | == Pattern Tables == | ||
When game mode is inactive, the Game Genie generates [[PPU pattern tables]] through PPU $0000 | When game mode is inactive, the Game Genie generates [[PPU pattern tables]] through PPU <tt>$0000</tt>…<tt>$1FFF</tt> by the following method: | ||
* When PPU <tt>A2</tt> = 1: | |||
** PPU <tt>A4</tt> → PPU <tt>D4</tt>…<tt>D7</tt> | |||
** PPU <tt>A5</tt> → PPU <tt>D0</tt>…<tt>D3</tt> | |||
* When PPU <tt>A2</tt> = 0: | |||
** PPU <tt>A6</tt> → PPU <tt>D4</tt>…<tt>D7</tt> | |||
** PPU <tt>A7</tt> → PPU <tt>D0</tt>…<tt>D3</tt> | |||
== References == | == References == | ||
* [http://nesdev.org/nesgg.txt | * [http://nesdev.org/nesgg.txt nesgg.txt] – ''NES Game Genie Code Format DOC v0.71'' by Benzene of Digital Emutations, 1997-07-10 |
Revision as of 01:55, 12 February 2018
The Game Genie is a enhancement cart for the NES designed by Camerica and distributed by Galoob and Camerica. It functions as a pass-thru, with a 72-pin cartridge connector connecting it to the NES, and a 72-pin cartridge slot for a game to be inserted into. When plugged in between a game and the NES and turned on, it provides a simple interface to enter up to three cheat codes, which then modify the behavior of the game.
The Game Genie is not assigned a mapper number.
Technical
The Game Genie works by intercepting CPU reads and replacing the game cart's response with its own response. It can intercept any three addresses in CPU $8000…$FFFF and respond with a single replacement for each. To make the tool more compatible with bank-switching, each of the three codes has an optional compare value which can be used to only replace the byte if the original byte matches the compare, hopefully limiting the cheat to functioning on the desired bank.
When first booted, the Game Genie presents its own 4-KiB PRG ROM and a series of simple gates masquerading as a CHR ROM. The included PRG ROM runs code to show a simple code entry user interface. When the user presses Start, the cheat values are written to memory-mapped registers, and then another register is written which switches the Game Genie into game mode, where the attached game cart's CHR and PRG is passed through, save whatever code replacements were defined. The Game Genie remains in game mode until power-cycled, and will respond to no further writes.
Registers
Master Control ($8000)
7 bit 0 ---- ---- .DDD CCCE ||| |||| ||| |||+- Master enable: write 1 then 0 to switch into game mode. ||| +++-- Compare enable for each of the three codes +++------ Disable each of the three codes
Bit 1 and 4 correspond to the code at $8001…$8004.
Address High ($8001, $8005, $8009)
7 bit 0 ---- ---- .AAA AAAA ||| |||| +++-++++- Bits 8:14 of address for this cheat (Bit 15 fixed to 1)
Address Low ($8002, $8006, $800A)
7 bit 0 ---- ---- AAAA AAAA |||| |||| ++++-++++- Bits 0:7 of address for this cheat
Compare ($8003, $8007, $800B)
7 bit 0 ---- ---- CCCC CCCC |||| |||| ++++-++++- Compare value for this cheat (write 0 if unused?)
Replace ($8004, $8008, $800C)
7 bit 0 ---- ---- RRRR RRRR |||| |||| ++++-++++- Replacement value for this cheat
Unknown ($FFF0, $FFF1)
The Game Genie rom writes 0 to $FFF0, $FFF1, $FFF0 in that sequence.
Pattern Tables
When game mode is inactive, the Game Genie generates PPU pattern tables through PPU $0000…$1FFF by the following method:
- When PPU A2 = 1:
- PPU A4 → PPU D4…D7
- PPU A5 → PPU D0…D3
- When PPU A2 = 0:
- PPU A6 → PPU D4…D7
- PPU A7 → PPU D0…D3
References
- nesgg.txt – NES Game Genie Code Format DOC v0.71 by Benzene of Digital Emutations, 1997-07-10