
In this edition, The Simpsons: Bart’s Nightmare, the 1992 game from Sculptured Software and Acclaim, goes under the microscope.
The cheat sites tend to have a “level select” code listed for this game. Here’s how it’s rendered on GameFAQs, for example:

The code is bogus, however. If you put it in, nothing happens. Let’s correct the record, shall we?
Cheat code hunting
Bart’s Nightmare checks for input from Controller 1 by reading from the memory addresses ffffc7c8 and ffffc7c9. The former represents which buttons are currently being held down; the latter represents which ones were pressed on the current frame.
Each controller button has a hex pattern associated with it. Up is 0x01, Down is 0x02, Left is 0x04, Right is 0x08, B is 0x10, C is 0x20, A is 0x40, and Start is 0x80. If multiple buttons are pressed at the same time, the logical OR of these patterns is stored.
On the copyright screen, the game checks the “currently being held down” address for this value: 0x69. That is the hex representation of Up+Right+A+C. Press all four of those at the same time, and the address at ffffc81e gets updated.

What’s that do? That address gets checked during gameplay. If it’s set to a nonzero value, hex patterns from Controller 2 start getting read.
Let’s see what those do…
Cheat controls
Pressing A on Controller 2 increases Bart’s Z-meter (this game’s version of health).

Pressing B on Controller 2 increases your score by 5000 points.

Pressing Down on Controller 2 slows down the game’s frame rate. Up on Controller 2 increases it again.
These debug controls are neat, but our new cheat code really comes in handy on the mini-game selection screen, which is accessed by finding homework pages in the main Windy World area.
Normally, playing all of the mini-games requires tracking down lots of pages. The game presents you with a pair of colored doors that lead to different games, and you have to choose between them. But with the code, you can press B and C on Controller 1 to change the colors of the doors.

It’s not quite the “level select” that the bogus cheat code promised, but it’s close!
Outro
Thanks for reading! I’ll be back next week with another teardown of a Genesis game. In the meantime, check out my blog for more retro game reverse engineering.





