How to play Game Boy games on Linux Terminal
But its Spartan interface is almost perfect for recreating the screen of the original 1989 Nintendo Game Boy. Here's how to play Game Boy games on your terminal.
Why emulate Game Boy in Terminal?
Nintendo's Game Boy is one of the most successful game consoles ever created and has introduced generations of children and adults to the joys of games like Tetris, Pokemon and the Super Mario Land series.
With a 4 MHz processor and a 47x43mm screen, the Game Boy can easily fit in a pocket and provides approximately 15 hours of gameplay from 4 AA batteries. In the late 1980s and early 1990s, the Game Boy was a must-have accessory for any teenager and completely dominated the mobile gaming market.
The popularity and longevity of the console means that there are thousands of officially licensed Game Boy games. By running an emulator in your terminal, you can turn your terminal into a rich library of playable games.
As the name suggests, the php-terminal-gameboy-emulator is written in PHP - a language commonly used to create websites - and although the project's readme only states that it supports PHP 5.6, PHP 7 and HHVM, but it runs almost flawlessly on PHP versions up to 8.2.
With the php-terminal-gameboy-emulator, you are also not limited to computers and can run sessions via Secure Shell (SSH) on remote machines. However, because it's running on a terminal, your Game Boy game won't have any sound.
You also won't be able to save the game. If these limitations bother you, there are dozens of great emulators available on Linux.
Warning : You should only use ROMs that you legally own. You can find lots of Game Boy homebrew ROMs at Homebrew Hub.
How to install php-terminal-gameboy emulator on Linux
Before installing php-terminal-gameboy-emulator, you must make sure that you have PHP installed. To test this, open a terminal and enter:
php -v
This command will return the version number of your installed PHP package. If it returns "php: command not found", you don't have PHP installed.
To install PHP on Arch and related distributions, enter:
sudo pacman -S php
On Debian and its derivatives:
sudo apt install php
For the Fedora family, you first need to add the Remi PHP repository:
sudo dnf -y install http://rpms.remirepo.net/fedora/remi-release-XX.rpm
.where XX is your Fedora version number. Now, let's enable the repository:
sudo dnf module enable php:remi-8.1 -y
Finally, you can install PHP with:
sudo dnf install php -y
Now that PHP is installed, use the wget tool to download the php-terminal-gameboy-emulator:
wget https://raw.githubusercontent.com/gabrielrcouto/php-terminal-gameboy-emulator/master/bin/php-gameboy.phar
Make it executable with:
sudo chmod +x php-gameboy.phar
Move the binary file to your path so it is executable from anywhere on the system;
sudo mv php-gameboy.phar /usr/local/bin/php-gameboy
Play great Game Boy games in Linux Terminal
To start the game with the php-terminal-gameboy-emulator, you need to pass the name of the ROM file as an argument. For example:
php-gameboy ~/gbroms/tetris.gb
The ROM will load almost instantly and you'll be faced with the familiar grayscale splash screen of whichever game you choose.
In the video below you can see that the emulator is fully capable of running Street Fighter II, and this writer is just as proficient with the terminal version as he is with the original handheld - controlling Ryu convincingly to defeat Guile in the first round.
Street Fighter II on gameboy emulator in Linux Terminal
You'll also notice that although php-terminal-gameboy-emulator does a convincing job of recreating the Game Boy's dot matrix display in your terminal, there are still occasional visual artifacts. How often they appear and how severe they are will depend on the game you are playing.
The emulator control functions are as follows and unfortunately cannot be remapped:
Controlled by keyboard | Control on console |
---|---|
WASD | D-Pad navigation |
Comma (,) | A |
Dots (.) | B |
N | Select |
M | Start |
You should read it
- 8 best free Terminal Emulator apps for Android
- How to play chess in Linux terminal (with Multiplayer support over SSH)
- How to use Guake Terminal in Linux
- How to play Playstation 2 on Linux with PCSX2
- How to install dictionaries in Linux Terminal
- How to back up and restore Linux Terminal history
- How to use Linux Terminal as a computer
- How to play Solitaire in Linux terminal with solitaire-ti
May be interested
- 6 best Linux distros for gaminglinux is not very prominent when it comes to games, but that doesn't mean you can't play games on this platform. in fact, there are several gaming-focused linux distributions that provide built-in support for game libraries and game-focused hardware drivers, like graphics cards.
- How to install dictionaries in Linux Terminala locally stored dictionary utility can really be useful when no other dictionary is available. there are many options in the linux software world. among these, there is an option that runs fairly 'smoothly' from the system terminal, called sdcv.
- How to back up and restore Linux Terminal historylinux maintains a backup of the command lines used in the terminal. this guide shows you how to back up a linux terminal history file. then show you how to restore those backups.
- How to install and play GOG game on Linuxgone are the days when playing steam or gog games on linux was unthinkable. playing gog's vast library of games on your linux machine is not only possible but surprisingly easy.
- How to Play PS2 Games on PS3if you have a backward compatible ps3, you can play ps2 games on it just like you would play ps3 games. if your ps3 is not compatible with ps2 game discs, you can find many other games on the playstation store. if you've jailbroken your ps3, you can play any ps2 game even if the console doesn't support that game.
- How to use Linux Terminal as a computerjoin tipsmake.com to learn how to use the terminal in linux as a computer, regardless of which distribution you are running, via the following article!
- How to fix the problem of being unable to enter Terminal in Linuxnothing is perfect and sometimes, even terminal can stop responding or ignore what you type. if your terminal crashes and you can't enter it, here are some of the most common causes and solutions for them.
- Make Terminal More Fun with These 8 Linux Tools!these tools will help you be more efficient, productive, and even have more fun working in terminal. let's take a look at some of our favorite command line tools!
- How to Start a Prboom Multi Player Game in Linuxthis is how to start a prboom multi-player game in linux from the terminal inside of the gui. this tutorial is for playing over a local area network (lan) with up to 4 players. make sure you do it from the terminal from inside the gui. if...
- 7 Ways to Restart Linux from Terminalrestarting linux from the terminal may seem difficult, but don't worry, it's quite simple once you know the right commands. restarting linux is necessary after updating, troubleshooting, or performing system maintenance.