Batocera is a gaming OS that you can install on a PC, Single Board Computer (SBC), Steamdeck and others. The OS support is for multiple SBC devices, not just Raspberry Pi devices.
This article may be a little involved at times. Especially if you want to run this Operating System (OS) under VirtualBox.
Download Batocera
Go to 'https://batocera.org/download' and you can see quite a list of devices that you can download the Batocera OS. For my examples, I will use the one for the PC. When I wrote this article, I downloaded the current version of Batocera 38 for the PC. The filename was 'batocera-x86_64-x86_64-38-20231014.img.gz'.
Since the 3 GB image file has been gzipped, we will need to extract the 8 GB contents. Open a terminal and switch to the folder with the file in question. Run the command:
gzip -dk <filename>
So in my case, the command was:
gzip -dk batocera-x86_64-x86_64-38-20231014.img.gz
The file that is extracted is called ' batocera-x86_64-x86_64-38-20231014.img'. Of course, if you want to try this out in VirtualBox, you need a VDI file.
Convert the IMG to VDI
You may think it would be better with an ISO file, but the IMG has multiple partitions in it. Because of the multiple partitions, you cannot convert it to an ISO file. The best thing is to convert it straight to a Virtual Disk Image (VDI) that is used as the hard drive for a virtual machine.
To convert the IMG file, we need to use the 'vboxmanage' program that is installed with VirtualBox. So, to use this program from a command-line, we need to know its location. By default, it should be '/usr/bin/vboxmanage', but we can verify it.
To find a file, you can use the 'find' command:
sudo find / -name vboxmanage
The command shows we are starting in the root folder of the system (/) and because of this, we need sudo privileges to access most of the folders to scan. The result shows the location of the 'vboxmanage' file.
Now that we have the location, the examples I use will place the file at '/usr/bin/'. You use your file location if it is different.
To convert the IMG file, it is in my Home folder and renamed to 'batocera.img', I use the command:
/usr/bin/vboxmanage convertdd --format VDI ~/batocera.img ~/batocera.vdi
Remember that the size of the VDI should be 3.1 GB. We can increase this to 20 GB to allow for the addition of game files. For my example, I'll make it 20 GB, or 20,000 MB. The command is:
/usr.bin/vboxmanage modifyhd ~/batocera.vdi --resize 20000
After a short time, the VDI files grow to 20 GB, you can specify more or less space as you need. Do not change the VDI while the VM is running.
The conversion should not take too long. Once it is done, you can leave the VDI file or move it to the default location of the Virtual Machines. You can find the default location in the settings under VirtualBox.
Add VDI to VirtualBox
Now that we have the VDI file, we need to create a new virtual machine in VirtualBox to use the VDI.
Select 'New' to create a new virtual machine (VM). For the settings, use a name that you like for the VM. I named mine 'Batocera'. For the ISO file, leave it at 'None'. The 'Type' should be 'Linux' and the 'Version' is 'Other Linux (64-bit)'. Select the 'Next' button.
Now you'll need to set the memory and number of CPUs to use for the VM. These would vary depending on your system resources available. Click 'Next' again.
The last step to create the VM is to click on 'Use an existing Virtual Hard Disk File'. Click on 'Add' and then find the VDI, highlight it and then click 'Select'. Click 'Next' then 'Finish' to get the VM created.
You can now select the new VM and then click on 'Settings' to change other options, such as video memory, network adapter, etc. It may be best to set the network type to ‘Bridged’.
Burn to a USB
For better performance, you can use Balena Etcher or another image writing program to burn the IMG file to a USB Flash Drive.
Once done, you only need to boot from the USB drive.
Starting Batocera
When first started, there are few games on the OS. The systems with a game show up on the list. The full list of emulators is:
The first column is the shortened name, or folder name, and the second column is the full name of the console.
Once in Batocera, you can press the F1 key to get to a folder listing of Linux, which is PCManFM.
There is a folder named 'ROMS' which where these folders exist. Place any ROMS you have into the folders and when you restart Batocera, you'll see the emulator on the list.
To add files to the list, you can access a set share on the system. You'll need to use F1 and then get to a terminal. In a Terminal, use the command 'ip a' and find your IP Address of the Batocera system. Connect to the share from another system, which will be '\\IP-Address\share'.
From here, you simply copy the ROMS to their folder.
Conclusion
From here, you can get started with Batocera. Keep in mind that you can run this OS on many types of devices.
Enjoy old-style games and have some fun!
This article may be a little involved at times. Especially if you want to run this Operating System (OS) under VirtualBox.
Download Batocera
Go to 'https://batocera.org/download' and you can see quite a list of devices that you can download the Batocera OS. For my examples, I will use the one for the PC. When I wrote this article, I downloaded the current version of Batocera 38 for the PC. The filename was 'batocera-x86_64-x86_64-38-20231014.img.gz'.
Since the 3 GB image file has been gzipped, we will need to extract the 8 GB contents. Open a terminal and switch to the folder with the file in question. Run the command:
gzip -dk <filename>
So in my case, the command was:
gzip -dk batocera-x86_64-x86_64-38-20231014.img.gz
The file that is extracted is called ' batocera-x86_64-x86_64-38-20231014.img'. Of course, if you want to try this out in VirtualBox, you need a VDI file.
Convert the IMG to VDI
You may think it would be better with an ISO file, but the IMG has multiple partitions in it. Because of the multiple partitions, you cannot convert it to an ISO file. The best thing is to convert it straight to a Virtual Disk Image (VDI) that is used as the hard drive for a virtual machine.
To convert the IMG file, we need to use the 'vboxmanage' program that is installed with VirtualBox. So, to use this program from a command-line, we need to know its location. By default, it should be '/usr/bin/vboxmanage', but we can verify it.
To find a file, you can use the 'find' command:
sudo find / -name vboxmanage
The command shows we are starting in the root folder of the system (/) and because of this, we need sudo privileges to access most of the folders to scan. The result shows the location of the 'vboxmanage' file.
Now that we have the location, the examples I use will place the file at '/usr/bin/'. You use your file location if it is different.
To convert the IMG file, it is in my Home folder and renamed to 'batocera.img', I use the command:
/usr/bin/vboxmanage convertdd --format VDI ~/batocera.img ~/batocera.vdi
Remember that the size of the VDI should be 3.1 GB. We can increase this to 20 GB to allow for the addition of game files. For my example, I'll make it 20 GB, or 20,000 MB. The command is:
/usr.bin/vboxmanage modifyhd ~/batocera.vdi --resize 20000
After a short time, the VDI files grow to 20 GB, you can specify more or less space as you need. Do not change the VDI while the VM is running.
The conversion should not take too long. Once it is done, you can leave the VDI file or move it to the default location of the Virtual Machines. You can find the default location in the settings under VirtualBox.
Add VDI to VirtualBox
Now that we have the VDI file, we need to create a new virtual machine in VirtualBox to use the VDI.
Select 'New' to create a new virtual machine (VM). For the settings, use a name that you like for the VM. I named mine 'Batocera'. For the ISO file, leave it at 'None'. The 'Type' should be 'Linux' and the 'Version' is 'Other Linux (64-bit)'. Select the 'Next' button.
Now you'll need to set the memory and number of CPUs to use for the VM. These would vary depending on your system resources available. Click 'Next' again.
The last step to create the VM is to click on 'Use an existing Virtual Hard Disk File'. Click on 'Add' and then find the VDI, highlight it and then click 'Select'. Click 'Next' then 'Finish' to get the VM created.
You can now select the new VM and then click on 'Settings' to change other options, such as video memory, network adapter, etc. It may be best to set the network type to ‘Bridged’.
Burn to a USB
For better performance, you can use Balena Etcher or another image writing program to burn the IMG file to a USB Flash Drive.
Once done, you only need to boot from the USB drive.
Starting Batocera
When first started, there are few games on the OS. The systems with a game show up on the list. The full list of emulators is:
|
The first column is the shortened name, or folder name, and the second column is the full name of the console.
Once in Batocera, you can press the F1 key to get to a folder listing of Linux, which is PCManFM.
There is a folder named 'ROMS' which where these folders exist. Place any ROMS you have into the folders and when you restart Batocera, you'll see the emulator on the list.
To add files to the list, you can access a set share on the system. You'll need to use F1 and then get to a terminal. In a Terminal, use the command 'ip a' and find your IP Address of the Batocera system. Connect to the share from another system, which will be '\\IP-Address\share'.
From here, you simply copy the ROMS to their folder.
Conclusion
From here, you can get started with Batocera. Keep in mind that you can run this OS on many types of devices.
Enjoy old-style games and have some fun!