ESP_8_BIT is designed to run on the ESP32 within the Arduino IDE framework. Schematic is pretty simple:

    -----------
    |         |
    |      25 |------------------> video out
    |         |
    |      18 |---/\/\/\/----|---> audio out
    |         |     1k       |
    |         |             ---
    |  ESP32  |             --- 10nf
    |         |              |
    |         |              v gnd
    |         |
    |         |     3.3v <--+-+   IR Receiver
    |         |      gnd <--|  )  TSOP4838 etc.
    |       0 |-------------+-+   (Optional)
    -----------

Before you compile the sketch you have 2 choices:

//  Choose one of the video standards: PAL, NTSC
#define VIDEO_STANDARD NTSC

//  Choose one of the following emulators: EMU_NES,EMU_SMS, EMU_ATARI
#define EMULATOR EMU_ATARI

Build and run the sketch and connect to an old-timey composite input. The first time the sketch runs in will auto-populate the file system with a selection of fine old and new homebrew games and demos. This process only happens once and takes about ~20 seconds so don't be frightened by the black screen.

The Emulated

Atari 400/800, XL, XEGS, 5200

Oh how I adore thee Atari 8 bit. 40 years on your cheery blue default background color and enigmatically wiggly built-in font still delights me. Your bizarre industrial design and giant floppy drives are the stuff of legend. Nice to see you back in this new incarnation.

Atari support is built from the venerable Atari800 emulator. Some violence was done to move structures and tables into read-only flash. It does not support machines with 128k RAM.

Enter/Exit GUI with F1. In GUI, '1' or '2' keys insert a disk (.atr file) into drives 1 or 2. A '0' key ejects the disk. Shift + Enter will insert Basic along with the selected disk. A 'filename.cfg' file can be used to override default settings. i.e.
miner2049er.bin.cfg (for miner2049er.bin) would look like

-5200 -ntsc -cart-type 4 -cart

File system is mounted as the "H1" device. See https://atari800.github.io/ for more details.

Keyboard Atari
Arrow Keys Joystick 1
Left Shift Fire Button
F1 Open/Close GUI
F2 Option
F3 Select
F4 Start
F5 Warm Reset
Shift+F5 Cold Reset
F6 Help (XL/XE)
F7 Break
Keyboard Atari 5200
S Key Start
P Key Pause
R Key Reset
WiiMote (sideways) Atari
D-Pad Joysticks
A,B,1,2 Fire Buttons
Home GUI
Minus Select
Plus Start
Plus & Minus Together Warm Reset

Nintendo Entertainment System

Based on nofrendo.

Keyboard NES
Arrow Keys D-Pad
Left Shift Button A
Option Button B
Return Start
Tab Select
WiiMote (sideways) NES
Plus Start
Minus Select
A,1 Button A
B,2 Button B
Plus & Minus Together Reset

Sega Master System, Game Gear

Based on smsplus. Plays .sms (Sega Master System) and .gg (Game Gear) ROMs. Game Gear titles look a little funny in the middle of the screen, but Shinobi is still a masterpiece.

This is the same emulator with which the brilliant and prolific SpriteTM first demostrated the power of the ESP31. Jeroen is the person most responsible for making the ESP32 ecosystem a pleasure to work with.

Keyboard SMS
Arrow Keys D-Pad
Left Shift Button 1
Option Button 2
Return Start
Tab Select
WiiMote (sideways) SMS
A,1 Button 1
B,2 Button 2
Home GUI
Minus Pause
Plus Start
Plus & Minus Together Reset

How it works

Composite Video

Much as been written on generating color composite video with microcontrollers. Rickard Gunée kicked it off in 2003, with many fun variants emerging over the years. I enjoyed building the RBox in 2010 that used a Cortex M0 and a R2R DAC to generate color NTSC, then in 2015 the Arduinocade on an Arduino with upgraded crystal that used its SPI port to create the colors. Now that 2020 has given us all a little extra time at home its time to do another one.

Now that we have fancy devices like the ESP8266/ESP32 we can be a little more ambitious. We have an order of magnitude more compute, two orders of magnitude more RAM, and three orders of magnitude more storage than an Arduino. And we have lots of new exotic new peripherals to play...

Read more »