Galagino: Galaga, Pac-Man and Donkey Kong on an ESP32
A Galaga, Pac-Man and Donkey Kong arcade emulator for the ESP32
At a glance
- What is it?
- Galagino runs six classic arcade games on a cheap microcontroller with a small TFT screen, a joystick and a speaker, which sounds simple until you read what the original Galaga hardware was doing: three Z80 CPUs at 3 MHz plus two more for buttons and audio, dedicated wavetable sound and tilemap graphics. The ESP32 has no video hardware at all, so the emulator has to draw every frame itself.
- Who is it for?
- Galagino suits somebody who wants a working arcade cabinet as a hardware project, on a board that costs a fraction of what a small computer would, and who is prepared to wire a screen, buttons and a speaker onto a breadboard and flash firmware with the Arduino IDE.
- Can I use it commercially?
- Not without permission. GitHub finds no licence file in the repository, and without a licence all rights are reserved by default: you may read the code but not reuse it. Check the README, or ask the authors, before using it.
- Is it still maintained?
- Yes. The repository last received commits 8 days ago.
- What is it written in?
- Mainly C, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 24, 2026, and from our analysis. They are not legal advice.
Editorial analysis
Three Z80 CPUs, and a microcontroller with no video hardware
Galagino is an arcade emulator for the ESP32 that plays Galaga, Pac-Man, Donkey Kong, Frogger, Digdug and 1942, and the README explains why that is not the trivial project it sounds like.
The setup starts with what the original machines were. The Galaga arcade was driven by three Z80 CPUs, each running at 3 MHz. The machine included two more CPUs, one for button and coin handling and one for audio support. The hardware itself had dedicated support for simple wavetable audio, tilemap graphics and up to 64 sprites. The video resolution was 224 by 288 pixels.
Against that, the ESP32 comes with two cores running at 240 MHz, and it lacks dedicated video hardware. Emulating the various CPUs as well as the handling of audio and graphics turned out to be challenging for the ESP32.
That framing is the whole project in one paragraph. A machine with dedicated tilemap graphics and sprite hardware draws its picture with a few dozen hardware operations per frame, and a microcontroller has to do the equivalent work in software, thousands of times per second, while also emulating three processors. The repository topics reflect the same picture: z80, arcade, emulator, esp32, galaga, pacman, donkey-kong, frogger, digdug and 1942, plus arduino and 8048, which is a hint that the range of emulated architectures is not confined to the Z80 games.
The audience is anybody who wants a physical arcade machine small enough to sit on a desk. The README shows a cardboard cabinet prototype and a finished plywood cabinet, and a 3D printed case from a third party, so the project is understood as the electronics half of a cabinet build rather than as a software project on its own.
The README tells you to build a successor instead
The first section of the README is the one to read before anything else, and it is unusual.
Since Galagino was started in 2023 many developers have updated and improved this project, and these successors have long left this original Galagino behind. The author recommends checking the following versions as well, and lists four of them with what each adds.
GalaginoPlus features an impressive 43 games and most other third party contributions. Speckhoilers Galagino increases the number of supported games to 30. Galagino3 adds several new games, supports an OLED for the marquee and enhances joystick support, as well as adding new games. Another Galagino adds new games and support for more display types. And then there is the general note about various other ports and contributions.
That is an unusually generous framing for a project README. The author of the original is telling you that this repository is the starting point and that the interesting work has moved into forks, and the four names are given with the specific advantage of each so you can pick on that basis rather than on popularity.
The distinction between the original and the successors matters if you are reading the documentation here, because the hardware notes, the button mappings and the build instructions all describe the 2023 version. A successor will have its own documentation, and the feature lists above suggest a large divergence in what is supported.
So the practical reading of this repository is two things. It is the version that explains the technique, and it is the baseline the later ones forked from.
Why the refresh rate is a hardware decision
The display section of the README is short and unusually concrete, because on this project the screen's SPI clock rate decides the frame rate.
Cheap TFT screens with a resolution of 320 by 240 pixels are available in various sizes from 2.0 inch to 3.2 inch, which allows for a very small and cheap setup. These small displays usually allow for SPI clock rates of up to 40 MHz, allowing for a maximum screen refresh rate of about 30 Hz. And the README is explicit that this is exactly half the refresh rate of the original arcade machine.
It then makes the judgement call: 30 Hz is sufficient for very fluid gameplay. However, with displays coping with 80 MHz SPI clock, Galagino will run at full 60 Hz refresh.
So the emulator is not limited by the processor to 30 Hz. The frame budget is spent pushing pixels across SPI, and the arithmetic is straightforward: a 320 by 240 frame is a lot of bytes to shift, and the clock rate sets the ceiling. A faster SPI display, which costs more, doubles the refresh rate and matches the arcade original.
The resolution choice is the other half of that arithmetic. 320 by 240 is a little larger than the arcade's own 224 by 288, which means the emulator is not simply copying a framebuffer across; it is scaling or centring the original picture area on a screen with a different shape.
This is the detail that tells you the project is a hardware project. The refresh rate is not an internal setting you tune, it is a property of which display you buy, and the two options are thirty frames per second for a cheap panel or sixty for a faster one.
The parts list, and why Pac-Man needs a joystick
The hardware section lists what you need, and the list is short enough to buy in one order.
The core is one of the cheap ESP32 development boards like the ESP32 Devkit V4. The screen is a 320x240 SPI TFT with no touch needed, either an ILI9341 based screen or an ST7789 based one with 320x240 pixels. The audio is an amplifier and a speaker, for example a PAM8302A with a 3W speaker as seen in the photos, or a Keyestudio SC8002B, or something similar. For input there are five push buttons, or one push button and a five way joystick breakout for Pac-Man and Donkey Kong. And then a breadboard and wires.
The joystick split is explained by the games themselves. This setup with five buttons works fine for Galaga since there is no vertical movement in the game that requires a joystick. A joystick is needed for Pac-Man and Donkey Kong.
The wiring has one practical wrinkle worth reading before you start. The Devkit is too wide for the breadboard, leaving no space above it to connect wires. So the wires going to the top pin row of the Devkit are placed underneath the DevKit with the connections done as shown in the wiring diagram, and the breadboard scheme is published as an image and as a PDF. The button mappings are in galagino/config.h, which is the file to look at when you want to know which physical button does what.
If you plan to build the cabinet rather than a breadboard, the README suggests ordering the exact parts from the hardware directory, because those are not only electrically compatible but also mechanically, so the buttons and the screen sit correctly in the panel.
The Cheap Yellow Display, one board and two cables
There is a much shorter path to a working device, and it is a single board that already contains most of what the breadboard build needs.
The ESP32-2432S028R, known as the Cheap Yellow Display, is an ESP32 board that comes with the majority of hardware required to build a Galagino device. The screen is built in, so the only additions are a Nintendo Wii nunchuck and adaptor, which can be connected to the JST connector labelled CN1 with the cable included with the display, and a speaker, which can be attached to the display with a 1.25mm JST connector to the connector labelled SPEAK, or soldered.
One wiring detail is noted: the Start button is connected to the boot button on the board.
To make the project work on that display, the README gives a one line change: uncomment the #define CHEAP_YELLOW_DISPLAY_CONF line in galagino/config.h.
#define CHEAP_YELLOW_DISPLAY_CONFSo the same configuration file holds the button mappings and the display selection, which means the porting between the breadboard build and the single board build is a matter of a define rather than a separate code path.
The nunchuck is worth a second look. It is a controller with an analogue stick, so it maps directly onto the five way joystick input the games need, and the hardware/NUNCHUCK.MD document in the repository explains that connection. For a Pac-Man or Donkey Kong cabinet, using a nunchuck rather than a rebuilt five way stick means the input device is a known quantity and the stick is a genuine analogue axis rather than four buttons in a hat.
The Arduino IDE requirement, and the audio bug in newer board packages
The software section opens with two important notices, and both of them are the kind of thing that costs an evening if you skip them.
The first: you really need to use the Arduino IDE, as it provides the optimization settings required for sufficient performance of Galagino and Digdug by default. The example given is that PlatformIO does not seem to enable enough optimization. That is a blunt statement, and it is a statement about the compiler flags rather than about the IDE. It means the project's performance depends on optimisation settings that the Arduino tooling applies by default and that other build systems do not.
The second notice is about audio: I2S and DAC support seems to be broken in the ESP32 board package version 2.0.10 and up, with a link to the arduino-esp32 repository issue.
So the build environment is constrained in two ways at once. The IDE is fixed, and the board package version matters for the sound output. The second point is the more awkward of the two, because board packages get updated and the natural instinct is to take the newest one, which is exactly the version range where the audio path is reported as broken.
The repository layout shows the rest of the project. The galagino/ directory holds the emulator code and the config.h that configures it. hardware/ holds the cabinet and the parts documentation, including the nunchuck connection document and the wiring schemes. romconv/ is a separate directory for ROM conversion, and roms/ holds the ROMs the emulator works with. samples/ contains .s8 files, which are the sample sound effects, with names such as dkong_jump.s8, dkong_stomp.s8, dkong_walk0.s8 and galaga_boom.s8, and its own README.md. logos/ and images/ hold the artwork.
Editorial conclusion
Galagino suits somebody who wants a working arcade cabinet as a hardware project, on a board that costs a fraction of what a small computer would, and who is prepared to wire a screen, buttons and a speaker onto a breadboard and flash firmware with the Arduino IDE. It does not suit somebody who wants the newest emulator, because the README itself recommends several successor projects that have moved past this one, and it does not suit somebody who wants to avoid the ROMs question or the toolchain constraints. Check three things before you start: which successor you actually want to build, since the README lists GalaginoPlus, Speckhoilers Galagino, Galagino3 and Another Galagino, whether your display's SPI clock rate reaches 60Hz or settles at 30Hz, and whether you have the Arduino IDE with an ESP32 board package older than 2.0.10 if you want the I2S and DAC audio path working. The last push to the repository was on 2026-10-16.
Frequently asked questions
What is Galagino?
It is an arcade emulator for the ESP32 that plays Galaga, Pac-Man, Donkey Kong, Frogger, Digdug and 1942 on a cheap microcontroller with a small TFT screen, buttons or a joystick, and a speaker, with the build intended to become a small arcade cabinet.
Which Galagino version should I build?
The README says that since Galagino was started in 2023 many developers have updated and improved it and that the successors have long left the original behind. It recommends GalaginoPlus with 43 games, Speckhoilers Galagino with 30 games, Galagino3 with new games and OLED marquee support, and Another Galagino with more display types.
How do I build Galagino on the Cheap Yellow Display?
The Cheap Yellow Display board contains most of the required hardware. You connect a Nintendo Wii nunchuck to the CN1 JST connector and a speaker to the SPEAK connector, then uncomment the #define CHEAP_YELLOW_DISPLAY_CONF line in galagino/config.h.
Why does the Galagino README tell me to use the Arduino IDE?
Because the Arduino IDE provides the optimization settings required for sufficient performance of Galaga and Digdug by default, and the README notes that PlatformIO does not seem to enable enough optimization. It also warns that I2S and DAC support appears broken in the ESP32 board package version 2.0.10 and up.
What screen and refresh rate does Galagino need?
A 320x240 SPI TFT, either ILI9341 based or ST7789 based, in sizes from 2.0 to 3.2 inches. Most such displays run at up to 40MHz SPI clock, which gives about 30Hz refresh, half the arcade original, and the README says a display coping with 80MHz SPI clock runs at the full 60Hz.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/harbaum-galagino)Was this useful?