Skip to content

Installation

Giorgioggì edited this page Jun 7, 2016 · 15 revisions

To interface NES++ with your NES, you will need to solder a few wires. The actual set or wires depends on the desired functionality, so they are listed here in different groups:

Reset-From-Pad / In-Game-Reset / IGR

TBD

NESRGB Palette Control

WARNING - ACHTUNG - ATTENZIONE - ATTENTION - ATENCION - WAARSCHUWING - UWAGA!

Please BE CAREFUL here, as you risk DESTROYING YOUR NESRGB! Only proceed if you understand what you are doing!

If you proceed, you do so AT YOUR SOLE RISK AND WITHOUT WARRANTIES OF ANY KIND BY US, EXPRESSED OR IMPLIED. UNDER NO CIRCUMSTANCES ARE WE LIABLE FOR ANY DAMAGES.

The NES works at 5V, so our chip must work at that voltage to read its signals, while the Altera FPGA on the NESRGB uses 3.3V, so we must do some kind of level shifting.

Level shifting

The safe choice is to use a dedicated board/chip/component that takes care of shifting the voltage levels. We can keep our chip running at 5V and just shift down the three lines going to the NESRGB. Some possibilities:

Multi-channel

  • SparkFun Logic Level Converter: This has 4 channels for a very affordable price, so it's the recommended choice if you are not too practical with electronics. There are also similar boards made in China for a fraction of that price. Wiring is simple:
    • Lines coming from the chip go to HV1/HV2/HV3
    • The corresponding LV1/LV2/LV3 lines go to the NESRGB pads
    • HV must be connected to +5V
    • LV must be connected to +3.3V (You can take this from the NESRGB board, see below)
    • Finally one of the GND lines must be connected to the NES/NESRGB ground (they are the same)
  • 74LVX125: This is a quad buffer with 5V-tolerant inputs. Wiring:
    • Lines coming from the chip go to A0/A1/A2
    • The corresponding O0/O1/O2 lines go to the NESRGB pads
    • OE1/OE2/OE3 must be connected to ground
    • Vcc must be connected to +3.3V
    • GND must be connected to the NES/NESRGB ground (they are the same)
  • CD4504BE: We can use this chip in its CMOS-to-CMOS level shifting configuration:
    • Lines coming from the chip go to Ain/Bin/Cin
    • The corresponding Aout/Bout/Cout lines go to the NESRGB pads
    • SELECT must be connected to ground
    • Vcc must be connected to +5V
    • Vcc must be connected to +3.3V
    • Vss must be connected to the NES/NESRGB ground (they are the same)

Single-channel

The following solutions are single-channel only, so they must be built three times, one per input:

  • Schottky diode: A very simple and effective solution, provided that you have the right type of diode (1N5817 should be fine). Note that the pull-up resistor is already embedded in the NESRGB inputs, so you only need the diode. Oh, and a normal (non-Schottky) diode might work as well, so you might as well give it a try. AAA
  • 3.3V Zener diode + series resistor: Use a BZX55C3V3 diode and a 220 ohm resistor. AAA
  • MOSFET + pull-up resistor: This is actually the circuit that is implemented on the SparkFun converter. Note that the left pull-up resistor (R1) is already embedded in the NESRGB inputs, so you only need the right one (R2), and its actual value is not critical (probably anything in the 1K-20K range will do).
    MOSFET Logic Level Converter
  • 2-3 series diodes: Just put in series as many diodes as needed, until the voltage drops to a safe level. Measure to be sure.

If you have used one of these solutions, UNCOMMENT the USE_LEVEL_SHIFTER #define in the code, but please please please MAKE SURE THAT NO MORE THAN 3.3V ARE PUT ON THE NESRGB PALETTE INPUTS!

3.3V Point

Whenever a 3.3V voltage source is mentioned in the previous paragraph, it can be taken from the following point on the NESRGB board:

Alternative approach

This is an alternative approach that was discussed on the Arduino forums. It allows interfacing the chip with the NESRGB directly, without any external components.

THIS SHOULD WORK BUT HAS NOT BEEN TESTED YET. USE IT AS YOUR OWN RISK!

The basic idea is that, since experience suggests that the NESRGB has internal pull-ups on the palette pins, emulating an open-collector output should work:

  • To set a pin to 1 we switch the pin to INPUT mode. It will go to high impedance mode and the FPGA will see 3.3V because of its internal pull-up.
  • To set a pin to 0 we switch the pin to OUTPUT mode. The AVR architecture guarantees that the pin will be at the LOW level.
  • The AVR architecture also guarantees that pins are configured as inputs at startup, so nothing bad should happen.

If you want to use this strategy, leave the USE_LEVEL_SHIFTER #define COMMENTED.

CIC Control

In order to let NES++ toggle your CIC chip, you will need to disconnect its pin 4 from the NES board, lift it and solder a wire to it. The perfect solution would be to unsolder the whole CIC chip, solder a socket in its place and put the CIC on it, with pin 4 lifted, as in the following picture:

Note that unsoldering the CIC is a tough job, this it is not recommended. If you installed your NESRGB yourself, you probably had a hard time removing the PPU. Removing the CIC is even harder, as many of its pins are connected to a large ground plane, which carries the heat of your iron away. Notice the blue wire above? It's there because I broke a pin while removing my CIC, and I had to reconnect it as possible.

Thus, it is recommended to just cut CIC pin 4 as near as possible to the NES board using some sharp cutter. There are tons of howtos and videos around on how to disable the CIC, but they all just break the pin away from the chip, which you cannot do, as you are going to solder a wire to it once you have lifted it, so be aware not to break it!