NES on the iCEBreaker

I have started a new post to explain how to use my port of the Nintendo Entertainment System to the iCEBreaker.

On the hardware side you will need the VGA Pmod from Diigilent or an equivalent. They are widely available and quite cheap. You can make your own with a resistor ladder. They have 12-bit color resolution.

Until the Controller/Audio Pmod is produced, you will need to connect a controller and a speaker to Pmod 2 (the head Pmod).

You will need a shift register Nintendo controller for the NES or SNES. The Nintendo original controllers have 7 pins, but there are clone controllers that also work and they typically have a 9-pin DB9 connector. Note that the controllers for the recent NES Classic mini are i2c controllers and will not work.

The pinout is described on the Nes Dev Wiki.

You should connect CLK (joy_clock) to pin 1 (FPGA pin 27), OUT (joy_strobe) to pin 2 (25) and D0 (joy_data) to pin 3 (21).

You should connect the speaker to pin 4 (FPGA pin 19).

You can use headphones or a small battery-powered speaker.

Ideally you should connect the speaker with a series resistor and a low-pass filter:

   e.g. 470 ohm      eg. 10uF
AUDIO_O  ---./\/\/\.---o------| |-------> "Analog" output
                      --- eg. 0.1uF
                      --- GND

But I connect it directly without any of this. There is some risk of damaging the FPGA pin doing that, but I have never had a problem. If you are worried, at least use a series resistor.

On the software side, you should do:

git clone
cd up5k-demos/nes
make prog

You also need a rom loaded in flash memory. The Upduino version allowed up to 8 games selected by buttons, but I am currently just supporting a single game.

I downloaded games from this site, but there are many other sites.

Only fairly small games with128kb or less of PRG ROMs and 8kb or less of CHR RAM (or 64kb PRG ROM and 64KB CHR ROM) work. The ones that worked for me were Tetris, Super Mario Bros, Contra and The Legend of Zelda.

To load a rom, you do

cd rom
./ <game>.nes games.bin
iceprog -o1024k games.bin

The game should start playing. You can press the user button to restart it.

Have fun :grinning:


There is now an HDMI version that works with my DVI monitor via an adapter but not with my HDMI TV.

It also works with an HDMI input on another of my monitors and @edbordin has reported that it works on his monitor. So it probably works with most monitors but not TVs.

1 Like

Hi @lawrie,

Thank you again for all your hard work porting the NES core to the iCEBreaker. I have it now also working on my own board and it is really awesome. It works with the gamepad & audio Pmod that I created during the last few twitch streams too.

My own TV does not seem to accept any of the video modes I was able to generate with the iCEBreaker I still don’t know why that is. Hopefully at some point I am able to figure it out.

But it works great with the Magewell HDMI to USB 3.0 capture device.

If you are interested you can see me do some fooling around with MicroMages on yesterday’s stream:

If you want I can send you a pull request with the few changes I made to autogenerate nes rom bin files, and adapting the pinout for my Pmod.

You can find my fork here:

I owe you a beverage of choice :smiley:


Hi @esden,

I watched your Twitch session. It was good to see you so excited about the Pmod and NES working, and the new game looked interesting.

Yes, send me a pull request.

@ironsteel made change to the NES port on the Ulx3s board, to make it generate VGA/HDMI output that works on more monitors and TVs, but he had to use a frame buffer to make that work, and I don’t know if there is enough memory on up5k devices for that.