Auston Stewart likes Nintendo systems. A lot. He not only wrote Macifom, an NES emulator for OSX from scratch, but he figured out how to get Retro Arch and its compatible Game Boy Color emulator Gambatte working on PocketC.H.I.P.!
Retro Arch is a frontend that works with many different game console emulators. Following the instructions first written by Stewart (aka macifom in the NTC forums) and slightly adapted for the blog format, you’ll be emulating your old Game Boy Color in no time.
Connect your PocketC.H.I.P. to the internet and tap the Terminal application on the home screen.
Note: If you’re not sure how to get online with PocketC.H.I.P., learn how with our PocketC.H.I.P. docs.
Type the command below and then press enter. It updates the Debian package repository for your system and gets it ready to install new packages.
sudo apt update
Next, install a couple of required packages for compiling Retro Arch from source code.
sudo apt-get install build-essential git pkg-config libsdl2-dev libsdl1.2-dev
Clone the git repository of the Retro Arch project. This copies all the source code you need to build your own version of Retro Arch directly on PocketC.H.I.P..
git clone https://github.com/libretro/RetroArch.git
Change your working directory to /home/chip/RetroArch.
Run the configure script with all the arguments below. Each of these arguments informs the compiler how to built Retro Arch and what features to enable or disable.
./configure --disable-sdl --enable-sdl2 --enable-floathard --enable-neon --disable-opengl --disable-gles --disable-vg --disable-fbo --disable-egl --disable-pulse --disable-oss --disable-x11 --disable-wayland --disable-ffmpeg --disable-7zip --disable-libxml2 --disable-freetype
Use make to compile Retro Arch.
And install Retro Arch systemwide.
sudo make install
Note: The arguments above compile an SDL2 version of Retro Arch, but you can compile for SDL1 by swapping disable and enable in the arguments –disable-sdl and –enable-sdl2. SDL1 and SDL2 each have its advantages and disadvantages, which Stewart explains in his helpful post. I used SDL2, since it renders the Game Boy Color games in the correct aspect ratio, while SDL1 does not.
Use nano to edit the Retro Arch configuration file.
Change the config file so it has the options below, then save and quit nano.
video_driver = "sdl"
input_driver = "sdl"
input_joypad_driver = "sdl"
video_scale = "1.000000"
video_fullscreen_x = "480"
video_fullscreen_y = "272"
video_fullscreen = "true"
video_windowed_fullscreen = "false"
video_scale_integer = "false"
video_smooth = "false"
input_keyboard_layout = "us"
If you compiled Retro Arch with SDL2 enabled, set the shell variable SDL_RENDER_DRIVER to software.
Gambatte is the software that actually emulates the Game Boy color. It’s just one of many different emulators that you can compile to work with Retro Arch.
Return to your home directory.
Clone the source code repository for Gambatte.
git clone https://github.com/libretro/gambatte-libretro.git
Change to the ~/gambatte-libretro/libgambatte directory.
Use make to compile the emulator.
make -f Makefile.libretro
Download your favorite Game Boy Color ROM such as JetPackDX and start Retro Arch by typing the following command.
retroarch -L /home/chip/libgambatte/gambatte_libretro.so PATH-TO-ROM
Replace PATH-TO-ROM with the absolute path to your .gbc rom and happy gaming.
This project only sets a Game Boy Color emulator for Retro Arch, but Retro Arch supports a lot more emulators. What are you hoping to see PocketC.H.I.P. and Retro Arch emulate next?