gb, gba, nes, snes – emulators


games/gb [ -acd ] [ -C ... ] [ -x scale ] romfile
games/gba [ -a ] [ -b biosfile ] [ -s savetype ] [ -x scale ] romfile
games/nes [ -aos ] [ -x scale ] romfile
games/snes [ -ahms ] [ -x scale ] romfile


Gb, gba, nes and snes are emulators for the Nintendo Game Boy and Game Boy Color (GB and GBC), Nintendo Game Boy Advance (GBA), Nintendo Entertainment System (NES), and Super Nintendo Entertainment System (SNES). They execute the romfile given as an argument. The z, x, a, s, q, w, return and shift keys correspond to B, A, Y, X, L1, L2, Start and Select, respectively. Other keys:


Pause the emulator. If already paused it will step one video frame.  


Save the current state in / / /  


Load the current state from / / /  


Toggle the emulator’s speedometer. It shows in the upper left, off-viewport corner, the ratio between the expected and observed time it took to draw 60 frames.  


Toggle tracing of the emulator.  

It uncaps the 60fps frame rate and lets emulation go as fast as possible.  


Pause the emulator.  


Exit the emulator.  

Command line options:


Enable audio output.  


Scale the screen to a given factor regardless of the window’s size.  

gb options:


Run GBC roms in GBC mode and DMG (GB) roms in GBC’s DMG compatibility mode.  


Run GB roms in DMG mode. GBC-only roms will not run in this mode; others will run only in black & white.  


Select a color palette. Has no effect on roms in color mode. The syntax is of the form -C ffffff,aaaaaa,555555,000000 (using HTML style rrggbb notation).  

gba options:


Location of the GBA BIOS file (required to operate the emulator). Default is /sys/games/lib/gbabios.bin.  


Save format used by the original game. Valid formats are: eeprom4, eeprom64, sram256, flash512, flash1024. The number corresponds to the size, in kilobits, of the save file. By default, the emulator attempts to automatically detect the save format, but does not always succeed.  

nes options:


Hide the top and bottom eight pixels (overscan area), like a real television would.  


Save contents of battery backed SRAM (used by some games for savegames) as a file (gb and snes automatically detect if this is needed).  

snes options:


Override HiROM/LoROM detection: -h sets LoROM, -hh sets HiROM.  


Enable mouse emulation using system mouse. Mouse button 1 (left button) engages the SNES left mouse button. Mouse button 3 (right button) engages the SNES right mouse button. Holding down mouse button 2 (middle button) disengages the SNES mouse entirely so that the Plan 9 cursor offset can be adjusted to align with the SNES cursor.  




You bet!
SRAM saving on the NES only functions when the -s option is used.
The SNES horizontal hires mode is supported only with -2 scaling.
All emulators assume a North American (i.e. NTSC) system. PAL games (and in some cases Japanese games) are not supported.


Gb first appeared in 9front (April, 2012).
Gba first appeared in 9front (September, 2014).
Nes first appeared in 9front (February, 2014).
Snes first appeared in 9front (March, 2014).