...or how to play games from a linux machine, from the terminal ;)
Hackberry Pi, has a square screen, which makes it perfect for Gameboy gaming. The keyboard, for sure it's not convenient as a gamepad, but still you can play simple games and it's not that you will have your HPi as a game console all the time, but mostly for playing a game, while you wait for something or have some time to kill :)
We will use VisualBoyAdvance emulator for the following reasons:
- It's in the repos
- Can use SDL to run from the terminal
- Can play original GameBoy, GameBoy Color and Advance games
Perhaps not the perfect emulator, but it does the job and has all the basic features and even more. So, install it with sudo apt install visualboyadvance
. Also make sure you have installed fzf
. Now grub this package, which contains a VBA configuration file, a script that uses fzf to select the games, some homebrew games and the tree structure, that the project is organized.
Unzip the archive in a directory you prefer and make the play
file, executable. Put your ROMs inside each directory and you can execute the play
file.
Select the game with the cursor keys, or type part of the name. Each line contains the three letter, console prefix, so you can filter the games by console. One quirk of VBA emulator is that even if you apply the -F (fullscreen) parameter, it doesn't occupy the full screen. So i had to use the video scaling options -1 -2 -3 -4
to enlarge the screen. Even so, VBA for the GameBoy Advance, can't use the -4 parameter and automatically resizes the window of it, to a much smaller window. That's why i had to use different parameters for Gameboy|Color and GameBoy Advance.
The package includes a configuration file for VBA, with the keys all ready set to WASD for direction, K for button A, L for button B, C for capturing a screen shot and V for run/speed. Screenshots and saves will be stored in each folder, all ready created and configured in the package.
Up : W
Left : A
Down : S
Right : D
A : K
B : L
Start : Enter
Select : Space
Capture : C
Run : V
The games included are freeware homebrew games, downloaded from Homebrew Hub. Go there to download more games for the Gameboy|Color|Advance.
If you want to change the keys, edit the configuration file and in the corresponding lines, change the keycodes, according to this page SDL Keycodes Lookup. For example f
is 0x66 ('f')
in the page, so if you want to make it as the Up key, make the line Joy0_Up=0077
to look like Joy0_Up=0066
Joy0_Left=0061
Joy0_Right=0064
Joy0_Up=0077
Joy0_Down=0073
Joy0_A=006b
Joy0_B=006c
Joy0_L=0069
Joy0_R=006f
Joy0_Start=000d
Joy0_Select=0020
Joy0_Speed=0076
Joy0_Capture=0063