GameBoy Style Reset Mechanism for the NES

Remember how the Nintendo GameBoy series lacked a reset button, but you could do a soft reset by holding B + A + Select + Start? Sadly, none of Nintendo’s home consoles had this feature, but it wasn’t really needed, provided that you had a physical reset button on the console itself. So I added this feature to my NES. Why?

I’m a really lazy person. I like to automate stuff as much as I can with my electronics skills to avoid unnecessary efforts. I have a wall-mounted TV, so one of my favorite things to do is lying down on my bed and play some classic NES games. I think that the American NES was designed with the couch potato in mind, since the controller cables are really really long, especially when compared to its Japanese counterpart.

I own lots of Famicom multicarts which I play on my NES with a converter. I’ve got some really good multicarts with a respectable number of unique games, saving me the hassle of repeatedly shuffling through cartridges when I want to play several games, all I need to do is push the Reset button and choose another game from the menu.

But wait, I have to get up from my comfortable position and go all the way to push the Reset button on the console, then back! That kind of negates the purpose of the multicart in the first place. There’s no easy way to return to the menu screen other than resetting the console. I’ve seen some mods where people physically extend their system’s reset button using wire and a toggle pushbutton, and also modified controllers with reset buttons on them. I don’t like any of these approaches because I like to preserve my system’s original aesthetics and also because I want a solution that works independently of the controller used. I was thinking how could I extend the reset function in a non-invasive way, when I recalled the GameBoy series using B + A + Select + Start as a soft reset sequence. Eureka! an idea was born.

Now it’s just a matter of implementing the idea electronically into the NES. The Nintendo Entertainment System uses a synchronous serial protocol to transfer information between the controllers and the system. Every television frame, the system reads out the state of each of the controller’s buttons in a sequential fashion, this data is broadcast over one wire, and two additional wires are used for synchronization between controller and console. Inside the NES, the decoding of the controller data is done inside the CPU.

The idea is to decode the serial data from the controller to extract the individual button presses corresponding to the A, B, Start and Select buttons, using that information to detect when they’ve been pressed together, and when that happens, send a reset signal to the console.

The “brain” of the NES controller is the 4021, which is a parallel in, serial out shift register IC. I’m using the 74HC595 serial in, parallel out shift register IC to decode the serial data from the 4021 back into individual button presses. Interfacing it is as simple as piggybacking the controller data lines directly from the NES motherboard. Here’s the pinout:

Controller connector on the NES motherboard

Controller connector on the NES motherboard

  1. +5V
  2. Serial data
  3. Latch
  4. Clock
  5. Ground

I soldered wires directly to these points to feed my 74HC595. On pins 4, 5, 6 and 7 of the ‘595 you’ll find the status information for the Start, Select, B and A buttons respectively. These are active low, which means that you get a logic 1 if the button’s not pressed, and a logic 0 if the button’s pressed.

We want the console to reset when the A, B, Start and Select buttons are pressed simultaneously, so we must find a way to detect this condition. We need to detect when A AND B AND Select AND Start are pushed, therefore we need AND gates. I’m using a 74LS22 which is a dual 4-input NAND gate with open collector outputs. Since the button signals are active low, we have to invert them using a 7404 hex inverter IC to get a logic 1 when we press a button. We then take the inverted button signals and feed them into the inputs of the NAND gate. When all four buttons are pushed (1 1 1 1), the condition is satisfied and the NAND gate outputs a zero, otherwise it outputs a one. Why the inverted logic? Because the NES’ Reset line is active low, too. You can find the Reset signal on pin 9 of the lockout chip (also called CIC).

NES System Reset Signal (Pin 9 of the Lockout Chip)

NES System Reset Signal (Pin 9 of the Lockout Chip)

The idea is pretty simple: Decode the status from the A, B, Select and Start buttons from the controller’s data stream, invert them, NAND them together and use the resulting signal to drive the Reset line low when all four buttons have been pressed.

However, when I tested my contraption the NES got stuck in an infinite reset loop, just like if I held down the Reset button permanently. I eventually traced this to the fact that during a system reset, the NES stops updating the controller status and therefore the controller signals get frozen in their last known-good state, which in this case is B, A, Select and Start pressed. In other words, once the four buttons have been pressed and the reset line is driven low, the buttons are electrically “held down”, which in turn keeps the reset condition true, and since as long as reset is true the buttons will be frozen, it stays on reset indefinitely.

The simplest way to solve this is to generate a short pulse and use that to drive the reset line: the pulse must be long enough to reliably reset the system and short enough to allow the controller status to update and therefore break the infinite loop. I built a monostable timer with a period of about 100 milliseconds using the ubiquitous 555 timer IC. It might not be the most elegant or space-saving solution, but it works. If you can think of a better, simpler solution, leave a comment ;-).

After adding the monostable timer, success! I’m able to reset my NES remotely just like a GameBoy! Here’s the working schematic:

GameBoy Style Reset for NES Schematic

GameBoy Style Reset for NES Schematic (click to zoom)

Here are some pictures of the testing and building process:

The Prototype (click to zoom)

The Prototype (click to zoom)

After making sure it works, I built the circuit on a small piece of stripboard. I barely managed to fit everything on it, hence my build quality leaves a lot to be desired. I could’ve designed a printed circuit board for it, but I didn’t want to bother for such a small project.

Finished board inside the NES (click to zoom)

Finished board inside the NES (click to zoom)

Final Thoughts

Even if the project turned out to be slightly more complicated than I initially thought, I’m still amazed about how simple it was to add remote reset functionality to my NES. Four simple chips, six wires, easy as installing a modchip, no drilling holes into your classic console, and best of all, I can finally lie down and play NES without having to get up just to push the Reset button to switch games! If you can build circuits from schematics, you can have it too!

Video of my Ultimate Couch Potato NES in action!

About these ads

26 Responses to “GameBoy Style Reset Mechanism for the NES”

  1. Luis Says:

    Wow awesome stuff. Of course I couldn’t understand most of what you were explaining, I do hope one day I will be like “ohhh interesting mod” lol but awesome that it was possible on a NES. I want to see the video as well you lazy gamer lol….

  2. ravc_cs Says:

    nice project, i’m pretty sure it will impress people

  3. xt5 Says:

    Hi dude!

    nice to know you have setup a blog! bmarked!

    I think I got an elegant solution for the circuit, if I understand correctly the behavior of the NES controller port and reset logic, this minimalistic “circuit” should work, although don’t blame on me if this don’t work because I don’t have the setup to test it.

    http://www.ingenieria-inversa.cl/retro/NES/NES_reset.pdf

    to be honest it looks counterintuitive because it uses only a 74xx193, but if you follow what happen inside, it must make some sense.

  4. RunnerPack Says:

    Very nice project! Implementing this in a Virtual Boy (or inside the controller itself? Hmm…) is definitely on the to-do list…

    To reduce parts count, you could replace the NAND and inverters with a 7425 dual 4-input NOR and use the second gate to invert the output of the first. This also has the advantage that you can use a simple RC timer “POR” circuit on the 7425’s enable input to solve the boot locking problem, reducing total parts count to one IC and some discretes!

    (Note, all of the above is theoretical, and I’m far from being an electronics engineer, YMMV ;)

  5. e5frog Says:

    Great work, I’ve been hoping someone would do this, not having to go up and reset when playing with the PowerPak.

  6. e5frog Says:

    I built my own, with about 2.5s delay on the reset signal instead – to work with the PowerPak – it requires a 2s reset to get back in to the menu. Just replace R3 and C3 with 220k ohm and 10 µF to change the time from 0.110s to 2.4s (time is C3 x R3 x ln(3) which is about C3 x R3 x 1.1).

    Also made sure the unused inputs of the 74LS04 was connected to ground and added the recommended 100µF capacitor over VCC and GND at the 555 timer (I used an ICM7555 – works the same)

    youtube. com/watch?v=ZrOZLc8Kp2A

    Images:
    postimage. org/image.php?v=aVwxOji
    postimage. org/image.php?v=aVwxLP9
    Going to attach it iside the metal shield with double side foam tape
    postimage. org/image.php?v=aVwxTiA

  7. e5frog Says:

    Prepared for mounting inside the metal shield:
    http://www.postimage.org/image.php?v=Ts4zd3i

    Mounted:
    http://www.postimage.org/image.php?v=Ts4zaz9

    The length of the wires are adapted for easy disassembly without needing to loosen the reset-circuit from the sheld.

  8. e5frog Says:

    I had to remove mine again, it resetted when my daughter pressed A on the other controller while playing the Famicom Disk System game “Doki Doki Panic” with the PowerPak and instead of starting the game R.C. Pro Am II it resets – so I couldn’t play it… Very strange. I have no idea what the PowerPak does or how pressing A on the second controller while Doki Doki Panic was running (only in the game, not while in the menu) would cause the reset circuit to activate…

    It doesn’t seem to be a fluke, same behavior over and over again, I didn’t try that many games but instead tried cutting the reset-wire of the reset-circuit and it stopped…

    The lock-out chip is disabled in this unit – the ugly way and can’t be restored because the pin has actually been pulled out of the capsule. I guess I could pull a CIC from a game perhaps… aren’t they the same? Or perhaps it’s the 47k resistor between pin 3 and 9 on the expansion port that helps to cause this – or the combination – or there’s something wrong with the circuit – it worked just as it was supposed to otherwise…
    Or it’s just the PowerPak doing strange things…

    Perhaps I put the circuit too close to the cartridge and it activates the reset signal somehow…

    Any ideas?

    I’ll solder it back and see if it acts the same in other positions as well. I haven’t forgotten some needed pull-up resistor on the reset signal or something like that?

  9. e5frog Says:

    I measured on the 74HC595 and it seems something makes all the outputs go to low at these two occasions (pressing A in the FDS game D.D. Panic and starting RC Pro AM II). What else would change the outputs to low other than actual serial data? Is there a reset? The NES itself doesn’t use a ‘595 to decode the data – does it? Using the standard reset-button does not make lower them go low…

  10. e5frog Says:

    I’m guessing it’s something the PowerPak does that makes the 74HC595 zero all outputs – and reset the machine.

    I’ll try and change the trigger condition, I’ll also check that three the direction pad is untouched – so all outputs zeroes will not reset it.

  11. e5frog Says:

    I was lazy and just removed the inverted “select” from the trigger condition and put “left” signal directly into the NAND-gate – so if left signal is not high no reset will occur. This solved the problem, RC Pro AM II now starts just fine and no buttons on the second controller will reset Doki Doki Panic – Great.

    But reset is now done with A+B+START only (and NOT(left), if left is held no reset will occur).

    I could move things around and use the inverters left and the other NAND gate to make it used A+B+START+SELECT but I’m happy with it, I think the risk of pressing just those three buttons by accident isn’t that big.

    Strange thing though is that I can’t reset RC Pro Am II with the controller – it’s somehow disabled…

  12. Petik1 Says:

    Hey, could this be implemented in a famicom? I know space is very limited, but how about adding a port and putting the board in a project box and connecting them through a cable? Where would they be soldered and could it work with a controller in the 15 pin port?

    • 133MHz Says:

      Yes you could implement this on a Famicom. It would be a very tight fit as you mentioned but it can be done with enough miniaturization and by heavily optimizing the circuit (mine’s terrible really, you could do away with at least two chips if you aren’t as lazy as I am). As for your other question, it can’t be run off the 15 pin controller port because you need access to the internal controller’s data and the system reset line, none of which you’d find on the 15 pin port.

      If you can do SMD soldering you could use the SOIC versions of the chips to end up with a tiny little board that would fit practically anywhere. Otherwise an optimized DIP version might just fit somewhere inside the Fami.

      • Petik1 Says:

        Thanks for the reply. It sucks that I can’t use it with the D sub, as I was planning to splice a 15 pin d sub and NES female conntector for an NES Advantage. Could I stick it in a project box and just add another connector to the famicom? I wanted to put all of my future mods in there, like my video amp, a power LED, and this. If you don’t mind, could you list the soldering points for the famicom, materials, and procedures for this? Im not a pro like you, and I’m much younger than you probably think. IF I could get my hands on the parts, my neighbor can help me with it. Thanks so much!

      • Petik1 Says:

        Forget my last post, I found where to solder the GND, 5V+, etc. And I’ll ask my neighbor about the parts as I have your schematic. I just need to know where the famicom’s reset signal is. Thanks alot!

      • 133MHz Says:

        Easy, unlike the NES with its lockout chip, the Famicom’s reset signal is right there on the reset switch, just find the pin that gets pulled to ground when the switch is pushed down and solder a wire to it.

      • Petik1 Says:

        I found what I think you are talking about. It is a little strip of metal that it pushed to the side when the button is pressed. I solder it to this? Or what it is being pushed against?

  13. timethy Says:

    Very nice work! I had always this as well now I can have it :D

  14. Marcos Vives Says:

    I made a simplified version using just a 74HC595, a quad OR gate chip (74HC32 for example), a capacitor, a resistor, a diode and a NOT gate (can be replaced with a transistor and two resistors instead of a full 74HC04 chip)

    As you may notice, it has NO NE555. I managed to replace with a simple RC circuit (actually, I don’t know how that works, but as my tech professor says: “If it works, don’t touch it”)

    I would upload a schematic, but the CAD I use, the ExpressPCB does not have that 74HC595 chip. What CAD do you use?

  15. OmegaWarrior (@TheOmegaWarrior) Says:

    I actually came up with a different solution for a controller reset button; one that takes advantage of the fact that the NES controller has 2 wires that are never used except by specialty controllers, but all of those are required to be plugged into port 2:

    Cut off the female end of an NES controller extension cable and replace the standard nes controller cable with it,

    Then add a tactile membrane sensor to the top of the nes controller and run the 5V line through it and into one of the wires that isn’t used by controllers on port 1.

    next, pop the NES open and solder a transistor between the two contacts that are shorted by the reset button.

    Finally, solder the signal lead of this transistor to the line on port 1 that we just ran through the TMS on the controller.

    I’m thinking you could do something similar for a power button, but you’d have to use a flip-flop instead of a transistor; this would basically turn the power switch on the NES into a kill switch.

    • e5frog Says:

      You can also have a remote and mount a receiver inside it, but that’s not as elegant as detecting button presses. The console also works just like before…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.

%d bloggers like this: