Как превратить Raspberry Pi в игровую консоль

Многие пользователи мини-ПК Raspberry сталкиваются с проблемой запуска на своём гаджете написанных ранее программ или утилит, ошибкой в работе новой операционки или невозможностью настройки системы. Для того чтобы избежать этой проблемы можно воспользоваться эмуляцией Raspberry Pi в Windows и посмотреть на работу приложений ещё до перекидывания на гаджет.

Особенности эмулятора Raspberry Pi на основе Qemu

  • Открытый код с регулярными обновлениями и возможностью внесения правок (для опытных пользователей);
  • Эмуляция происходит в окне без необходимости внесения изменений в ПК;
  • Возможность изменения модели вычислительной мощности гаджета;
  • Не требует покупки платного софта;
  • Поддерживает большинство версий Windows.

Кроме того, при помощи эмулятора можно запускать огромное количество других устройств и операционных систем. Теперь давайте выясним особенности установки и запуска Qemu.

Установка и настройка эмулятора Raspberry Pi для Windows

  • Вводим в поисковике "Raspberry Pi emulation for Windows" и переходим по первой ссылке. Здесь уже собран весь необходимый софт для установки обычными пользователями. Если же вы любитель сделать всё своими руками — можете отдельно скачать Qemu, образ мини-ПК и настроить среду с ядром;
  • Жмём "Download", ждём 5 секунд и скачиваем архив;
  • Извлекаем содержимое в ранее созданную папку;
  • Запускаем файл с названием run.bat и ждём загрузку системы;
  • После появления конфигуратора вносим правки в соответствии с желаемыми настройками (только для профессионалов, иначе могут возникнуть проблемы с работоспособностью системы);
  • Наблюдаем завершение запуска эмулятора Raspberry Pi для виртуальной машины и можем приступать к выполнению манипуляций.

Если вы выполнили всё верно и обладаете ПК со средней по мощности конфигурацией — проблем с работой эмулятора возникнуть не должно. В противном случае попробуйте запустить батник от имени администратора, провести повторную установку без внесения изменений в конфигуратор и обновить все критичные драйвера.

Кроме того, существует множество эмуляторов приставок для Raspberry Pi, работоспособность которых перед установкой можно проверить на Qemu. Поэтому рассмотрим дальше небольшой гайд о самой популярной и многофункциональной среди них.

Эмулятор RetroPie для Raspberry Pi

Главной его особенностью является возможность запуска игр с множества консолей, среди которых PlayStation, NES, Sega Genesis и прочие. Кроме того, эмулятор игровой приставки на Raspberry Pi выполнен в виде готового образа, который имеет достаточно удобный интерфейс.

Установка RetroPie

  • Вводим в поисковике "RetroPie Project SD" и скачиваем образ по первой ссылке;
  • Записываем скачанный файл на карту памяти через DiskImager;
  • После запуска системы заходим в консоль и запускаем настройку конфигурации;
  • Выбираем вкладку Filesystem (первая в списке), переходим в Advanced, далее - memory split и вписываем значение 256;
  • Меняем раскладку и временную зону на UTF8;
  • Закрываем настройки и перезапускаем систему.

Кроме этого, в зависимости от использования геймпада или клавиатуры, может понадобиться установка дополнительных драйверов. Также образы игр желательно скачивать через локальную сеть, чтобы избежать проблем в дальнейшем.

iButton на Raspberry

Эмулятор iButton для Raspberry способен проводить эмуляцию ключей от домофона. Он будет полезен для тех, кто хочет иметь под рукой многофункциональное устройство для считывания и имитирования ключей с возможностью подключения через USB к стационарному ПК. Скачать и ознакомится с iButton можно на официальной странице в GitHub, которая выполнена на русском языке и содержит детализированную инструкцию.

Надеемся наша статья о настройках эмуляторов, связанных с Raspberry, позволила сэкономить время на проверку приложений и дала ответы на возникшие при инсталляции вопросы. Пользуйтесь эмуляцией и наслаждайтесь возможностями Raspberry Pi.

To understand the possibilities and the range of games you can play on Raspberry Pi as well as on other ARM devices, first of all, you need to understand the structure of gaming emulation. And this is going to be our first question.

What are Raspberry Pi emulators?

Basically, we need to talk about the emulators in general. There are two things that we can actually call the “emulators” – an application to emulate some particular video gaming console and software, which provides a set (or a bundle) of those console emulators mentioned. Nowadays, you can hardly find the separate emulators. Neither the emulation software has a great number of examples. The software projects to choose from include:

In one of our previous articles, we’ve already told you about the different ways of playing games on Raspberry Pi . So, you are supposed to know that most of these ways allow you to play only very old games. And even using such retro gaming emulators as Rertopie or Emulation Station will still cause some speed issues and retro gaming bundle limitations. As you can see, it includes only NES classic emulators, so you’ll find very old console video games in their game lists and ROMs to download. And if you would like to play more up-to-date computer games, like Might and Magic, you’ll certainly face problems…

Well, how can we play x86 PC games on ARM devices then? Luckily, there is a simple solution – ExaGear Desktop . It will work as a Raspberry Pi emulator (or like VirtualBox) and will allow you to play a much wider variety of Linux and Windows PC games. And what’s more, it has been recently integrated into Retropie as an extension and users can install it like a native emulator.

We have already posted 2 tutorials on how to use ExaGear Desktop as a gaming emulator and run some iconic games such as Arcanum, Disciples II, Fallout and Heroes of Might and Magic 3, Sid Meier’s Alpha Centauri and Caesar 3 on Raspberry Pi. However, we continue testing more games and sharing our experience with you. In this post, we’ll look through the cases of running Might and Magic 6, Stronghold Crusader Extreme HD and Pharaoh and Cleopatra on Raspberry Pi as if your device was really all in one game console.

P.S.: keen gamers will probably also like to know that with ExaGear Desktop you can turn your Raspberry Pi into a TeamSpeak 3 Server

Raspberry Pi test stand configuration

Operating System

Raspbian Stretch from September 2017

Eltechs ExaGear Desktop v2.2 for Raspberry Pi 3

Retropie v4.3 for Raspberry Pi 2/3

EmulationStation

EmulationStation was the first attempt to gather a lot of console emulators together and give it a user-friendly interface. It is a flexible and open-source front-end for emulators and it supports Windows, Debian, and Arch versions. It has also got a Raspberry Pi version, which has recently been turned into a Retropie application (that we’re going to decribe later).

EmulationStaion’s main features are the user-friendly interface with customizable themes for any emulator, a list of pre-installed emulators (which is rather short) and the possibility of operating with controllers (no keyboard needed).

How to install EmulationStation

As we are from the ARM industry, there’s no need for Windows installation tutorial, especially since downloading the installer and launching it will be enough. Let’s jump to Debian installation process :

1. Make sure you have updated your OS:

$ sudo apt-get update $ sudo apt-get upgrade

2. Pre-install the additional libraries:

$ sudo apt-get install -y libsdl2-dev libboost-system-dev libboost-filesystem-dev libboost-date-time-dev libboost-locale-dev libfreeimage-dev libfreetype6-dev libeigen3-dev libcurl4-openssl-dev libasound2-dev libgl1-mesa-dev build-essential cmake git

3. Download the Emulation Station:

$ git clone https://github.com/Aloshi/EmulationStation

4. Install the Emulation Station on your Debian device:

$ cd EmulationStation $ git checkout unstable $ cmake $ make $ sudo make install

As soon as the installation is finished and you are booting the EmulationStation for the first time, you ‘ll need to configure the controllers’ buttons. You may either use the keyboard or the controllers to operate within the interface.

Also, it’s possible to do some technical configuration. This can be easily done via the GUI, including theme setup and adding the game system emulators. But if you want to do it manually, you’ll need to find the es_systems.cfg file in the emulationstation folder. There you may add the emulators’ titles by placing its title between ” … ” which are listed inside of tag (as seen in the picture):

If you’d like to install Emulation Station app on Raspberry Pi, look below on Retropie’s section, as EmultationStation has been fully replaced with Retropie for Raspberry Pi version. It’s also announced on their official website.

Retropie

Retropie is probably the most popular console emulator for Raspberry Pi devices. Actually, it’s not the emulator itself but the big opensource retro gaming and emulation project. It originates from EmulationStation and is optimized for open source operating systems in general. Due to the tendency of Raspberry Pi becoming more and more popular to make up a retro gaming machine on, Retropie offers it’s core features adapted for Raspberry Pi and concentrates on this type of devices.

In addition to Raspberry Pi device models, which include RPi Zero/1 and Raspberry Pi 2/3, there are also distributions for Odroid-C1/C2, Odroid-XU3/XU4, Debian PC and Ubuntu PC.

The main feature of Retropie is that it includes almost all the previous experience of console gaming emulation. It consists of EmulationStation with themes for emulators, Kodi media-player, RetroArch (Libretro’s frontend) and 50+ systems pre-installed.

Retropie installation

You can install Retropie on Raspberry Pi using an SD card to make an image for booting or install it on top of the existing Raspbian OS. In this post, we’re going to highlight the most spread and convenient way with an SD card. If you’d like to learn all of the ways, read our detailed Retropie guide .

You will need some side PC desktop (Windows, Linux or Mac) to make up an image. So, as soon as you’ve got the additional device, follow the steps below:

PiPlay

PiPlay (formerly PiMAME) is an operating system and an emulation system open source project made for retro gaming on Raspberry Pi. Actually, the Piplay also includes the two hardware products – the Piplay portable and the DeskCade.

The Piplay portable is a device, based on Raspberry Pi Zero and PiPLay system to play retro console games on one portable game system kit (like a Gameboy or a PSP). DeskCade is a desktop arcade gaming kit, looking like a retro gaming arcade machine. It has a classic arcade controller (a joystick) and is compatible with Retropie, so you can play any retro and modern console games arcade style.

PiPlay as an emulation system itself is a quite simple application that works ontop of Raspbian and has a user-friendly interface. It offers a limited number of retro console emulators, including MAME, CPSI/CPSII, Neo Geo, PlayStation, Genesis, NES and SNES, Gameboy, ScummVM, Atari 2600, Cavestory and Commodore64.

How to install PiPlay on RPi

1. Update and upgrade the packages before you start:

$ sudo apt-get update $ sudo apt-get dist-upgrade -y $ sudo reboot

2. After the system reboots update a Raspberry Pi firmware:

$ sudo apt-get install rpi-update $ sudo rpi-update

3. Install additional libraries:

$ sudo apt-get install git build-essential joystick htop python-pygame jstest-gtk

4. Download and install the PiPlay:

$ wget http://piplay.org/installer.sh $ cd home/pi/Downloads $ sudo ./installer.sh

Create the “piplay-sound.slate” file:

$ touch ~/pimame/config/piplay-sound.state

5. Now you can configure your controller (previously connected, of course) by pressing tab and selecting the “Controller Setup”.

6. On this step, the system is actually installed and the only last thing you need to do is to start it and install MAME4ALL and AdvanceMAME by moving to the right screen and selecting “Install MAME” in the interface. As soon as this installation is finished, you are completely all set!

Now, you need to find ROMs and load them to the ~/pimame/roms folder. all the ROMs must stay “.zip” format in PiPlay. You can choose to download the ROMs via FTP or SRC as well (the methods are similar to those, described above).

ExaGear Desktop Emulator for gaming on Raspberry Pi

All of the Retropie emulators mentioned above are available for playing only console games, while ExaGear Desktop allows playing x86 PC Windows games on Raspberry Pi! Of course, the only condition is that games technical requirements should be relevant to the hardware. Raspberry Pi, even overclocked and withs 3D graphics acceleration feature enabled (supported by ExaGear), can still run old and medium age computer games. For example, such games as Fallout, Arcanum, Heroes III etc. are OK. But the latest Destiny 2 will definitly never start! 🙂

Besides the graphics acceleration support, another great feature of ExaGear Desktop is that it’s been integrated into Retropie front-end, bringing a lot of convenience to users. The mater is that, originally, ExaGear Desktop is not a narrow-purpose gaming emulator but the full functional binary translation software, which aim is (but not limited to) running any x86 applications on ARM-based devices. So, it used to work side-by-side with Retropie and on top of Raspbian. And only since the latest update in 2017, ExaGear has become integrated into Retropie and has been gained the option for running PC games directly from the Retropie’s interface. Read the details in our ExaGear extension for Retropie guide .

ExaGear Desktop for gaming is compatible with Raspberry Pi (all models) as well as with Odroid.

In addition, it’s worth noting that ExaGear may run two ways: headless as a side application and as a Retropie emulator from the EmulationStation’s interface. It is very convenient and the only thing you need is to download it, set up and start. For that, simply follow the instructions below.

How to install ExaGear emulator on Retropie

The installation of ExaGear Desktop emulator on Retropie is quite simple.

1. Open Retropie and call for the terminal inside the Retropie interface by pressing “Ctrl+Alt+F4”.

2. Download and install ExaGear Rettopie Emulator with this command (you need to be in “home” directory):

$ cd /home/pi $ wget downloads..sh

3. Assign the proper rights to the installer app and launch it:

$ chmod +x install-exagear-retropie-v2.sh $ ./install-exagear-retropie-v2.sh

4. The next step is to fill out a tiny pop-up form. Input your name, last name and e-mail address to activate the emulator.

5. As the final step, you’ll need to configure Wine. The configuration window will open up automatically and you’ll have to simply tick “Emulate a virtual desktop” checkbox.

As soon as you are done with all the steps and the installation is finished, perform a reboot.

$ sudo reboot

Now, you can proceed to installing and running PC games with your new RPi emulator. Below you can find some examples.

The ExaGear emulator doesn’t work with ROM files. To install and play x86 PC games, you’ll need to get distributions (mainly “.zip” files). The easiest way to get the proper files is to use the website www.gog.com , specially targeted to distribute such games.

Below, find some examples of games we have already managed to install and launch on the Pi with ExaGear Desktop.

Emulate Might and Magic 6 on RPi

To install MaM 6 open Terminal (command line), enter the guest x86 system by running the ‘exagear’ command to activate the Raspberry Pi emulator for Windows games. After that, enter the folder with the installer (in our case it’s in folder Downloads) and run it with Wine:

$ exagear $ cd Downloads $ wine setup_mm6_2.1.0.42.exe

The graphical interface of the game installer will show up:

After installation is finished you can run MaM 6 from your Desktop:

Wait a couple of minutes while MaM 6 is loading, and finally, you will see the start menu.

Now you can play Might and Magic 6 on Raspberry Pi:

For more detailed illustration, we’ve made a video of the whole installation process.

Emulate Pharaoh and Cleopatra on Raspberry Pi

To install Pharaoh and Cleopatra open Terminal (command line), enter the guest x86 system by running the ‘exagear’ command, enter the folder with the installer and run it with Wine:

$ exagear $ cd Downloads $ wine setup_pharaoh_gold_2.0.0.12.exe

The graphical interface of the game installer will show up and you can proceed with the installation. After installation is finished you can run Pharaoh and Cleopatra directly from the Raspbian desktop or from the start menu. You might need to wait until the game is loaded.

For your convenience, watch the video about the whole process below.

Emulate Stronghold Crusader Extreme HD on RPi

We recommend downloading Stronghold Crusader Extreme HD from GOG .

To install the game on our Raspberry Pi console emulator, just enter the guest x86 system by entering the ‘exagear’ command in the Terminal, enter the folder with the installer and run it with Wine:

$ exagear $ cd Downloads $ wine setup_stronghold_crusader_extreme_hd_2.2.0.8.exe

After installation you can run the game from the Raspbian desktop:

The Most Popular Emulators for Raspberry Pi

We’ve already listed a number of emulators to be actively used within the emulation systems, like Retropie or Recalbox. So, there are the most popular among them. In fact, it’s not optimal to load all the existing emulators to Retropie, for example, as it can influence on your hardware performance. And it’s really smart to get only the best emulators which are used by hundreds of thousands of retro gamers around the globe. For you to learn them and compare, we’ve prepared a special listing below.

Gameboy

Gameboy was the first handheld portable gaming console, released by Nintendo in 1989 and started the whole industry of handhelds. The great Gameboy features which made it the world popular were the multiple players (via the cable, up to 4 players), extended battery life and affordable price. Not mentioning the portability for gamers to play anywhere and on-the-go.

Emulators : lr-gambatte, lr-tgbdual

ROM files extensions : .7z, .gb and .zip.

ROMs directory : /home/pi/RetroPie/roms/gb .

The controls configurations : customize the file, located in /opt/retropie/configs/gb/retroarch.cfg

The main feature for using the emulators is that lr-gambatte is good for single playing, while lr-gambatte emulator supports two players connected through the cable over network or parallel on the same system.

Gameboy Advance or GBA

GBA was the next generation handheld console, released by Nintendo in 2001. It featured 32-bit updated graphics and performance.

Emulators :gpSP, lr-gpSP, lr-vba-next, lr-mgba

ROM files extensions : .7z, .gba and .zip.

ROMs directory : /home/pi/RetroPie/roms/gba .

The controls : files to configure are situated in /opt/retropie/emulators/gpsp/gpsp.cfg for gpSP emulator and in /opt/retropie/configs/gba/retroarch.cfg for other emulators.

Note that The Game Boy Advance requires a BIOS file “gba_bios.bin”, which should be placed in /home/pi/RetroPie/BIOS

NES

NES stands for “The Nintendo Entertainment System”. It is an 8-bit gaming console, firstly released in 1985.

Programm emulators (LibRetro) : lr-nestopia, lr-fceumm and lr-quicknes.

ROM files extensions : .7z, .fds, .fig, .mgd, .nes, .sfc, .smc, .swc, and .zip.

NES ROMs directory : /home/pi/RetroPie/roms/nes .

Also note, that games with the .fds files extension will require the “disksys.rom” file, which must be placed in /home/pi/RetroPie/BIOS directory. Concerning the controllers, you can set up and configure them using the Retroarch configurations. Add custom controls to the “retroarch.cfg” file in /opt/retropie/configs/nes/retroarch.cfg directory.

SNES

SNES (or “Super Nintendo Entertainment System”) was later released in 1991 and was the 4th generation video game consoles produced by Nintendo.

Emulators (RetroArch) : lr-snes9x-2010, lr-snes9x, lr-snes9x2002, PiSNES, lr-snes9x2005, lr-armsnes, snes9x-rpi. Each of them accepts the ROMs: .7z, .bin, .fig, .mgd, .sfc, .smc, .swc and .zip.

The controls configurations : through the custom “retroarch.cfg” file which you can find in /opt/retropie/configs/snes/retroarch.cfg

Controller configurations : are kept in “snes9x.cfg” file that is located in /opt/retropie/emulators/pisnes .


Also note, that the games with more than 2 players are supported only for lr-snes9x2010 emulator. To activate the feature, switch on the multi-tap option by adding this line to the “retroarch.cfg” file (using the leafpad command):

input_libretro_device_p2 = "257"

Nintendo 64 or N64

Nintendo 64 (or N64) was released by Nintendo in 1996 and that started the era of the 5th generation gaming consoles.

Emulators : Mupen64plus, lr-Mupen64plus, lr-GLupeN64. (The recommended one is the Mupen64plus as it has better performance.)

ROM files : .z64, .n64, and .v64 files.

ROMs directory : /home/pi/RetroPie/roms/n64 folder.

Controls regulation : for lr-Mupen64plus and lr-GLupeN64 the controls are regulated via the “retroarch.cfg”. For Mupen64plus (starting from Retropie 3.3) they are configured automatically. So, the files to modify in this case are located at: /opt/retropie/configs/n64/mupen64plus.cfg and /opt/retropie/configs/n64/InputAutoCfg.ini .

Note, that at least Raspberry Pi 2 needed for a good N64 performance. Also beware, that the performance gets worse with the HD screen resolution. For the best experience don’t mind using low resolution. For example, for RetroPie 4.0 the best resolution would be 320×240 px.

Nintendo DS

Nintendo DS (where the “DS” is “dual screen”) is a handheld portable video gaming console released by Nintendo in 2004. The main feature of this console was the two LCD screens, one of which was a touchscreen. Also, it had a built-in microphone and a wireless connection. It is a unique application with a bunch of frontends to provide users with a simple interface.

Emulators : lr-desmume and DraStic.

The ROMs extensions : .nds and .zip format.

The ROMs directory : /home/pi/RetroPie/roms/nds .

The controls directories : for lr-desmume – opt/retropie/configs/nds/retroarch.cfg and for DraStic – /opt/retropie/configs/nds/drastic/system .

Note, that the DraStic is a beta software, though it runs very good, unlike lr-desmume, which is very laggy even when used on an overclocked RPi 2/3.

PlayStation or PS1 or PSX

Sony PlayStation came to the market as the 5th generation CD-based game console and was released by Sony in 1994. Besides playing games, PS also could playback audio CDs and some models even could play Video CDs. Was one of the best selling computer entertainment platforms.

Special emulators : lr-pcsx-rearmed, lr-beetle-psx and pcsx-rearmed.

ROMs : .cue, .cbn, .img, .iso, .m3u, .mdf, .pbp, .toc, .z and .znx

The ROMs directory : /home/pi/RetroPie/roms/nds .

Controllers configuration : for lr-desmume – /opt/retropie/configs/psx/pcsx.cfg and for other two – /opt/retropie/configs/psx/retroarch.cfg .

The BIOS file “SCPH1001.BIN” is needed. You should place it in /home/pi/RetroPie/BIOS directory.

PlayStation 2 or PS2

PS2 was a successor of PSX (PS1) and the 7th generation gaming console. It was released in 2000 and was the best selling entertainment system of all time with over 155 million units sold worldwide. Besides gaming, it also played the audio and video CDs, DVDs, and had the Internet connection.

Emulator : only PCSX2.

ROMs : .iso, .img, .bin, .mdf, .z, .z2, .bz2, .dump, .cso, .ima and .gz.

The ROMs directory : /home/pi/RetroPie/roms/ps2 .

Controllers configuration : can be done via Retropie GUI on the first run.

Plasystation 2 BIOS file is needed for the emulator to function. Load it to /home/pi/.config/PCSX2/bios/ .

Wii

Wii was released by Nintendo in 2006. The most modern console available in Retropie. Was the 7th generation gaming console to compete with Xbox 360 and PS3. Was the first device with a pointing remote controller that could detect movement in 3D.

Emulator : dolphin.

ROMs extension : only .iso.

ROMs directory : /home/pi/RetroPie/roms/wii .

Controllers configuration : //opt/retropie/configs/wii/Config .

NOTE! Can’t be ported to Raspberry Pi (or other ARM) and although the ARM community discusses the opportunities on forums, the solution is still unreachable due to hardware performance limitations. (Introduced only for familiarization)

MAME Arcade emulators

MAME or Multiple Arcade Machine Emulator is the app to emulate arcade machine games. It doesn’t emulate a console, but different arcade machines. Consequently, MAME represents thousands of retro games, rather very old, released by different manufacturers, which used to deliver them with their own unique arcade machines.

Emulators list : mame4all-pi, lr-mame2000, lr-mame2003, lr-mame2010, lr-mame2014, lr-mame2016, AdvanceMAME 0.94, AdvanceMAME 1.4, AdvanceMAME 3.

The ROMs : all use .zip format.

ROMs locations : The ROMs are stored in the shared folders, which means they are used by more than one emulator. You can find these folders by names, which have the RetroPie/roms/ in the beginning of the directory and finishes with: /arcade , /mame-libretro , /fba and /neogeo (for example, RetroPie/roms/neogeo ). Thus, you need to specify the arcade emulator version which matches your ROMs.

The things are a more complicated with MAME emulators contorls. Different emulators belong to different directories where you can find the controls configuration files to modify:

  • for mame4all-pi the path is /opt/retropie/configs/mame-mame4all/cfg/default.cfg
  • for lr-mame2000 – /opt/retropie/configs/lr-mame2000/retroarch.cfg
  • for lr-mame2003, lr-mame2010, lr-mame2014 and lr-mame2016 – /opt/retropie/configs/mame-libretro/retroarch.cfg
  • for AdvanceMAME 0.94, AdvanceMAME 1.4 and AdvanceMAME 3 – /opt/retropie/configs/mame-advmame

FBA Arcade emulators

FBA stands for FinalBurn Alpha that is a Multiple Arcade Emulator just like MAME is, but supports only Konami, NeoGeo, Cave and Capcom games.

Emulators : lr-fbalpha, lr-fbalpha2012 and PiFBA

ROM files : .7z .zip, .zip

ROMs directories : like MAME, FBA uses 5 shared folders – /arcade , /mame-libretro , /fba and /neogeo (with RetroPie/roms/ as the start of the path, e.g. RetroPie/roms/neogeo ). Specification of the emulator is needed!

Different emulators have different controls configuration files directories:

  • for lr-fbalpha and lr-fbalpha2012: /opt/retropie/configs/fba/retroarch.cfg
  • for PiFBA: /opt/retropie/emulators/pifba/fba2x.cfg

Neo Geo

Neo Geo is a cartridge-based arcade emulator, which brought the arcade machine fun at users homes. Released by SNK in 1990. So, it is emulated with one unique emulator. Also, the NeoGeo games can be played via FBA emulators.

Emulators list : GnGeo-Pi, lr-fbalpha, lr-fbalpha2012 and PiFBA.

The ROMs : .7z.zip and .zip.

ROMs locations : /home/pi/RetroPie/roms/neogeo

The controllers can be configured in /opt/retropie/configs/neogeo/gngeorc directory for GnGeo-Pi emulator. For FBA emulators controls configuration, see the FBA emulator part.

Gamecube

Gamecube is a 6th generation gaming console, released by Nintendo in 2001 to compete with PlayStation and XBOX. It was the first Nintendo’s console which used the optical disks, supported online gaming and could connect to GBA to use it as a second screen and controller.

Emulator : dolphin.

The ROMs : .iso

ROMs location : /home/pi/RetroPie/roms/gc

As the Gamecube can be played only via the Dolphin emulator, unfortunately, it’s almost impossible to run it on Raspberry Pi or any other ARM. It will launch but will be unbearably slow.

Dolphin

Dolphin is an emulator for just two consoles: GameCube and Wii. It’s a special emulator to talk about. The matter is that it is included in Retropie, but the Linux version only. Also, it’s possible to install this emulator on Raspberry Pi, but its performance is close to unplayable.

There are quite a lot of people who have tried to do that and discussing their experience on forums and social media. And all of those who have ever tried to launch the Dolphin emulator on Raspbian say, that it’s extremely laggy and slow.

Of course, the reason for it is in the low performance of the Raspberry Pi (as well as many other ARM) hardware. And even if you overclock your RPi, or will use the hardware graphics acceleration (which is supported by ExaGear) you won’t receive the desirable quality.

The ROMs extensions : the ISO disk images are used. The ISO ripping is carried out by the user and may require additional apps (like Rawdump, Friidump or CleanRip). Also, due to file formats sizes the GameCube and Wii disks have, splitting some games into several ISO files and reassembling them inside the emulator is a widely used practice.

DOSBox

DOSBox is an emulator of DOS operating system for retro gamers to enjoy very old DOS PC games. DOSBox uses SDL-library and emulates CPU 286/386; FileSystem, such as XMS and EMS; graphics: VESA, CGA, EGA, VGA, Tandy and Hercules; Gravis and SoundBlaster Ultra Sound. Officially released in 2010, it had been unofficially being used since 2002.

Operating systems : compatibility with Raspberry Pi is provided with RISC OS, Fedora, FreeBSD, Gentoo Linux and Debian operating system packages. Currently, it’s also integrated into Retropie.

The ROMs extensions : use specific image files that can be downloaded from a special GOG website.

The ROMs directory : need to be placed in a specific directory, different from the “dosbox” folder. So, if you created “dosbox” folder in home/Pi/Retropie directory, so the ROMs should be kept in the same directory, but in a different folder, for instance, “DOS-GAMES” folder.

So, every time you install and start a game, you should download it in that folder and use the “mount c ~*your game folder path ” command to connect the game ROM to the DOSBox emulator.

In general, this kind of an emulator is very simple and user-friendly. Easy to install and easy to set up and configure the controllers. All the process are guided by the clear prompts.

ExaGear

I have already mentioned the ExaGear Desktop software is a retro gaming emulation system to play old and medium age x86 PC games on ARM devices. Here, I’d like to uncover one more feature od ExagEar – it can be loaded to Retropie as an additional emulator.

The main convenience is that it becomes possible to run PC games right from the Retropie GUI. So, we can truthfully say, that Retopie is extended to PC playing in addition to consoles. The feature was released in 2017.

Emulator : ExaGear

The ROMs : .exe and specific files from the GOG website.

ROMs location : No specific folders needed. You can download everything right into /home/pi/RetroPie

Raspberry Pi Gaming emulator

A detailed guide on how to make your Raspberry Pi a powerful gaming emulator and run any iconic and nostalgic PC games on Raspbian (or any other ARM).

ExaGear is registered trademark of Eltechs, Inc. Raspberry Pi is a trademark of the Raspberry Pi Foundation. Other trademarks and product names are the property of their respective owners.

Скорее всего это первый русскоязычный мануал о настройке QEMU на Raspberry.

Какое-то время назад я загорелся идеей запустить на своей Raspberry Pi 2 какую-нибуть Windows систему. Сначала я хотел узнать возможно ли установить её, просто записав на SDCARD и вставив в «малинку», но этому не дано было осуществится…

После я стал искать возможность запуска через какие-нибудь эмуляторы. Наткнулся на QEMU и стал копаться с ним. Пытался я запустить эмулятор очень долго, почти всё, что я находил на форумах, было написано на английском, причём информации там было «по-минимуму», а людей, которые запустили, было совсем немного. После нескольких неудачных попыток запуска QEMU, я решил написать на 4PDA в теме, посвящённой Raspberry. Там мне помогли, и я благополучно запустил Windows 98 (почти идеально...). Запускал я это на Raspibiane (Debian).

Начнём, открываем терминал и прописываем это:

Sudo apt-get install sudo apt-get uprage sudo apt-get install git zlib1g-dev libsdl1.2-dev libpixman-1-0 libpixman-1-dev
Желательно всё это делать через putty , чтобы всё символы точно соответствовали написанному.

Git clone git://git.qemu-project.org/qemu.git
Команда начинает скачивать «внутренности» эмулятора, этот процесс не займёт много времени.

После того, как файл скачается и распакуется, появится папка (расположение /home/%username%/qemu), в которой будут расположены все файлы, которые необходимы для работы эмулятора. После того, как у нас всё скачалось и распаковалось, прописываем это:

Cd qemu ./configure --target-list="i386-softmmu" --enable-sdl --prefix=/usr
Начинается процесс конфигурации, это не займёт много времени (~30-60 секунд). Теперь нам нужно запустить процесс отладки:

Sudo make

Скриншот

После ввода команды, начнётся отладка, она выглядит примерно так:



Отладка может продолжаться неопределённое время, (~15-20 минут). Последнее, что мы должны сделать, это подправить конфиги и отладить.

Sudo nano /home/pi/qemu/tcg/arm/tcg-targe­t.c sudo nano /home/pi/qemu/tcg/i386/tcg-targ­et.c

Скриншот

Иногда при выполнение вышеперечисленных команд система создаёт новый файл, тогда выходим из редактора и руками открываем необходимые конфиги.



Зажимаем Ctrl+W, открывается строка поиска, вводим: static void tcg_out_addi. Меняем на static inline void tcg_out_addi. Переходим ко второму конфигу, так же вызываем строку поиска и вводим этот текст: static void tcg_out_opc и меняем на static inline void tcg_out_opc. Если вы не нашли какую-то из строк, то ничего не делаем, а просто закрываем конфиг и выполняем следующий шаг (в первом конфиге я не нашёл нужную строку, однако эмулятор у меня работает нормально).

Если вы закончили с заменой строк, продолжаем дальше мучать нашу «малинку»:

Sudo make sudo make install

Скриншот



Настройку эмулятора мы закончили. Теперь перейдём к запуску системы. Насколько я знаю, эмулятор поддерживает данные форматы образов:

Img - Образ системы.
.vhd - Виртуальный «хард»
.iso - Образ диска.

Скачать образы интересующих вас систем можно , там же есть инструкция по созданию своего образа системы.

Я собрал на Яндекс.Диске все образы , которые запускаются на QEMU и взяты из темы, ссылка на которую дана выше. Стоит заметить, что в названии образа Linux KDE написан пароль от пользователя.

Переходим к запуску систему. Пишем в консоль:

Qemu-system-i386 здесь тип образа (-hda, -fda, -cdrom) НазваниеВашегоОбраза.img -m Тут_Кол-во_ОЗУ_В_МБ(Без подчёркиваний разумеется).
Если все настройки верны, должна начаться загрузка образа системы.

Это фото, как скринить в линуксе я так и не освоил.

Результат



QEMU может эмулировать не только i386 процессоры, но и другие «платформы», подробнее:

Ls /usr/bin/qemu*
Данный запрос вызывает список команд QEMU:

Qemu-system-i386 --help
Поиграйтесь с настройками QEMU, сам ещё не до конца разобрался с ним. Стоит учесть, что я запускал систему, используя ресурсы только одного ядра «малинки», при этом компьютер нагружался на 25-26% (запускал Win98). Я читал на форумах о многопоточной работе QEMU с образом системы, но так и не понял как заставить эмулятор использовать ресурсы больше, чем одного ядра. Опять же, поиграйтесь с настройками и возможно вы поймёте как настроить многопоточность (не забудьте написать в комментариях как вы это сделали).

До выхода некстген-консолей остался месяц с лишним, и весь мир готовится к новым Battlefield’ам и FIFA’м. Если тебя все это не возбуждает, у тебя есть возможность прямо сейчас приобщиться к вечным ценностям. Давай посмотрим, как твой Raspberry Pi поможет тебе в этом деле.

Почему именно Raspberry Pi? Разумеется, ты можешь запустить эмулятор почти на любом устройстве. В большинстве случаев ты даже сможешь вывести картинку на большой экран и воспользоваться любым джойстиком. Но хочется получить все удобства работы с приставкой. Это значит: никаких клавиатур и мышей, возможность выполнять все, что нужно, с джойстика и высокая скорость загрузки. Низкое энергопотребление и бесшумность позволяют держать Raspberry Pi всегда включенным, так что последний пункт вычеркиваем. Мощности «малинки» хватит для всего, кроме разве что PS1 (но, уверен, это скоро изменится благодаря проектам вроде PSX ReARMed). А со всем остальным нам на помощь придет проект RetroArch и его графическая надстройка Emulation Station!

Что нам понадобится

Во многом придется повториться: очень желателен корпус (они сейчас доступны по 300–400 рублей), а подходящий зарядник у тебя почти наверняка уже есть. Наконец, понадобится SD-карта. Чем выше класс - тем лучше, тем более что 32-гиговые карты 10-го класса стоят довольно мало. Также желателен Wi-Fi-адаптер. Я пользуюсь TP-LINK TL-WN725N. В отличие от медиацентра, для игровой системы качество канала не критично, но само подключение необходимо (зачем - мы поговорим чуть позже).

Weapon of choice

Самому важному железному компоненту я решил отвести отдельную главу. Конечно же, речь пойдет о геймпаде. Какой лучше выбрать?

За последние 10–15 лет консоли заметно изменились, и это отразилось на их контроллерах. В первую очередь речь идет о крестовине, которая сейчас остается важной только в очень специфичных жанрах. В старых играх же крестовина была главным элементом. Взять хотя бы диагональные движения: стрельба «вверх-вправо» в Contra нужна очень часто, и тут важно четкое срабатывание. Кроме того, Nintendo до последнего удавалось удерживать патент на классическую крестовину. Microsoft, Sony и прочим приходилось изгаляться по-всякому. Насколько я понимаю, фанатам Sony в этом смысле повезло больше - у них, в отличие от Microsoft, крестовина разделена и поэтому работает четко. Короче говоря, покупка USB-клона ретроконтроллера на Amazon’е в этом контексте не кажется блажью.

Но с другой стороны, клон NES-контроллера точно не подойдет для SNES или Sega Megadrive - у него банально не хватит кнопок. Забегая вперед, скажу, что нам понадобятся дополнительные клавиши на джойстике, если мы не хотим использовать клавиатуру для выхода из эмулятора и других дополнительных функций. В этом смысле прелесть контроллера от PS3 или Xbox 360 в том, что клавиш точно хватит.

Опять-таки если у тебя уже есть игровая приставка, то наверняка есть и геймпад. Завести контроллер Xbox 360 или PS3 относительно просто.

У фанатов Sony в данном случае есть большой плюс - их джойстик универсален и может подключаться как по стандартному Bluetooth, так и по USB. С другой стороны, драйвер для DualShock придется качать и собирать своими руками, а драйвер для Xbox доступен в родном репозитории.

Другой плюс контроллера от Xbox в том, что если потом захочется поиграть на PC, то у него поддержка в играх намного лучше, чем у DualShock’а. Жирный минус в том, что контроллер от Xbox 360 работает по проприетарному беспроводному протоколу и разъем у него отличается от USB.

По себе знаю, что выбор джойстика - почти религиозный вопрос. Поэтому хотя с практической точки зрения удачнее DualShock, но, если ты привык к Microsoft-овскому контроллеру, ты все равно сделаешь все, чтобы пользоваться им. Тут есть три варианта:

  1. Купить специальный и довольно редкий беспроводной USB-адаптер Wireless Gaming Receiver for Windows PC, стоит около 1300 рублей.
  2. Купить специальный и менее редкий USB-провод для зарядки беспроводного джойстика Play & Charge Kit. Продается в комплекте с аккумулятором, стоит около 700 рублей. Длина кабеля - 2,7 м.
  3. Купить проводной джойстик (около 1500 рублей). Длина кабеля - все те же 2,7 м.

В общем, если у тебя не очень большая гостиная, логичнее всего купить Play & Charge Kit. Все-таки в быту аккумулятор намного полезнее, чем все остальное. Ну а у меня уже был проводной контроллер Xbox, поэтому говорить буду о нем.

Разворачиваем систему

Все, о чем дальше пойдет речь, стало возможным благодаря проекту RetroArch. Это фреймворк, объединяющий кучу эмуляторов для различных систем, от NES до PSX и DOS. Благодаря ему нам не придется, например, отдельно настраивать управление в каждом эмуляторе. Raspberry Pi активно поддерживается, и существует специальный скрипт , позволяющий довольно просто установить его на официальный дистрибутив Raspbian. Все действительно просто, но довольно долго. Мы пойдем более простым путем и возьмем специальный образ . По сути это и есть стандартный Raspbian, только с уже установленными эмуляторами.

Скачай образ любым удобным способом и залей его на SD-карту. Под Windows ты можешь использовать , а под Linux и OS X воспользуйся стандартным dd:

Dd if=RetroPieImage* of=/dev/sdX bs=1M # Для Linux dd if=RetroPieImage* of=/dev/rdiskN bs=1M # Для OS X

Обрати внимание, что заливать нужно не в раздел, а в корень диска (то есть /dev/sdc, а не /dev/sdc1). Макинтошникам стоит обратить внимание на приставку r (rdisk вместо disk) - этот режим значительно ускоряет запись данных.

Итак, записали диск, вставили в Raspberry. Подключаем зарядку, сетевой кабель и HDMI. Войдем в систему по SSH:

Ssh [email protected] # Указывай свой IP, пароль - raspberry

Воткни Wi-Fi-адаптер и контроллер. Теперь настроим Wi-Fi самым простым способом.

Sudo nano /etc/network/interfaces auto lo iface lo inet loopback iface eth0 inet dhcp allow-hotplug wlan0 auto wlan0 iface wlan0 inet dhcp wpa-ssid "ssid" # Имя твоей сети wpa-psk "password" # Пароль к сети

А теперь займемся настройкой геймпада Xbox:

Sudo apt-get update sudo apt-get install xboxdrv sudo nano /etc/rc.local xboxdrv --trigger-as-button --id 0 --led 2 --deadzone 4000 --silent & sleep 1 xboxdrv --trigger-as-button --id 1 --led 3 --deadzone 4000 --silent & sleep 1 xboxdrv --trigger-as-button --id 2 --led 4 --deadzone 4000 --silent & sleep 1 xboxdrv --trigger-as-button --id 3 --led 5 --deadzone 4000 --silent & sleep 1

Обрати внимание на опцию —id. Для беспроводного джойстика нужно использовать —wid.

Можно использовать до четырех джойстиков, но тогда придется задействовать USB-хаб с внешним питанием.

Теперь зайдем в настройки самой Raspberry:

Sudo raspi-config

По умолчанию системе недоступно все дисковое пространство. Для того чтобы это изменить, выбери пункт Expand Filesystem. Во-вторых, можно поиграться с настройками производительности. Тут стоит поэкспериментировать, единого варианта нет. Я не трогал частоту процессора (пункт Overclock), но менял распределение памяти между оперативной и графической (Advanced -> Memory Split) на 256/256. После того как ты закончишь с настройками, система предложит тебе перезагрузиться. Согласись. При перезагрузке можешь выдернуть сетевой кабель - подхватится Wi-Fi.

Warning

Выставлять очень высокие значения частоты процессора не рекомендуется - это может привести к нарушению целостности данных на карте. Кроме того, в Emulation Station могут быть лаги.

Если все пошло как надо, то после загрузки на твоем геймпаде кружок вокруг X перестанет мигать и засветится первый сегмент. Это значит, что джойстик определился как первый в системе. При первом запуске Emulation Station предложит тебе настроить управление на джойстике, тут все довольно прозрачно.

Итак, ты в главном меню. Переключение между эмуляторами происходит по нажатию стрелок вправо-влево. Сначала ты можешь прийти в ступор - почему доступен только Doom, Duke Nukem, DOS, Apple II и Sega? Дело в том, что большинство эмуляторов будут доступны только тогда, когда в их папках появятся файлы ромов. И вот сейчас ты поймешь, зачем был нужен Wi-Fi!

На своей основной системе подключись к FTP-серверу с IP-адресом твоей «малинки» (на всякий случай: после перехода на Wi-Fi он точно будет другой). Здесь ты увидишь аккуратную структуру папок с именами систем. Учти, что каждый эмулятор поддерживает вполне конкретный набор форматов. Привожу табличку для основных эмуляторов, а полный список ты найдешь в файле /home/pi/.emulationstation/es_systems.cfg. В общем, главный момент - не нужно заливать ромсеты с ZIP-файлами. Потратишь кучу времени, а потом еще будешь сильно удивлен.


После того как ты залил нужный ROM, нужно обновить Emulation Station. Для этого на геймпаде (при стандартной конфигурации) нужно нажать Start и выбрать Reload. Вуаля - соответствующий эмулятор активировался и ему видны твои ромы.

Но не спеши загружаться. По умолчанию Emulation Station не позволяет выходить из эмулятора в основное меню с геймпада. И тут начинается самый интересный момент - ручная настройка кнопок джойстика. Подключайся по SSH, набирай

Sudo nano ~/RetroPie/configs/all/retroarch.cfg

Добавь в конец файла

Input_exit_emulator_axis = -5

Это позволит тебе выходить из эмулятора при нажатии «вверх» на крестовине. Но на этом дело не заканчивается!

Savefile_directory = /home/pi/RetroPie/savestate savestate_directory = /home/pi/RetroPie/savestate screenshot_directory = /home/pi/RetroPie/screenshots autosave_interval = 300 input_exit_emulator_axis = -5 input_save_state_axis = +4 input_load_state_axis = -4 input_screenshot_axis = +5

Если не настроить кнопку выхода, то покидать эмулятор придется с помощью ребута. Из-за частых перезагрузок запросто может нарушиться целостность карты, и придется заново заливать образ.

Итак, с помощью крестовины ты сможешь выходить из эмулятора, делать сохранение (вправо), загружать сохранение (влево), делать скриншот (вниз). При желании можно добавить страховку, для этого вставь перед input_exit строчку

Input_enable_hotkey_btn = 10

Теперь для каждого действия нужно будет зажать большой Х. Учти, что любое назначение после этой строчки будет считаться как клавишесочетание Х + кнопка. На всякий случай я приложил схему кнопок с точки зрения конфига. Каждый элемент имеет суффикс (btn или axis) и номер (5, 10 или +4 для стрелок/джойстиков).

Чтобы сохранения и скриншоты заработали, не забудь создать нужные папки:

Sudo mkdir /home/RetroPie/{savestate,screenshots}

После того как ты закончил все это править, не забудь снова перегрузить эмулятор. На самом деле настроек намного больше: как минимум есть еще ускоренный режим (inputtoggle fastforward или inputhold fast forward). В интернете можно ознакомиться с полным списком опций .

Наводим красоту

Итак, остались мелочи. Во-первых, можно отключить ненужные эмуляторы. Для этого закомментируй их в /home/pi/.emulationstation/es_systems.cfg. Заодно можешь закомментить и Input Control - все равно для любой задачи тебе придется лезть в конфиг.

У RetroPie есть свой отдельный конфигуратор cd ~/RetroPie-Setup/ sudo ./retropie_setup.sh

Отсюда ты можешь обновить эмуляторы и поковыряться в различных опциях.

Во-вторых, в поставке RetroPie есть скрипт, который автоматически ищет обложки к играм. Для этого запусти:

Sudo python ~/RetroPie/supplementary/ES-scraper/scraper.py -crc

Опция crc позволит искать не по названиям, а по сигнатурам файлов. Понятно, что это более длинный процесс, но зато это проще, чем вручную называть файлы так, чтобы понял скрипт. Вот, пожалуй, и все.