Saturday, 1 August 2015

Introducing ZEsarUX, a new Speccy Emulator


ZEsarUX is a new ZX Spectrum emulator from developer Cesar Hernandez Bano. What I like about ZEsarUX is the out of the box support for game controllers. In this tutorial, I will guide you through setting up ZEsarUX in RetroPie and playing your first Spectrum games.

ZXSpectrum48k

First, a quick word about the developer. Cesar Hernandez Bano is the active developer of ZEsarUX (ZX Second-Emulator And Released for UniX ), so much so that he added SDL support at my request so Spectrum games using ZEsarUX could be run from EmulationStation. If you like the emulator or would like to ask any questions, then please give your feedback to Cesar at the project home or at the thread at the Raspberry Pi forum.

Even though ZEsarUX is included in the experimental section of RetroPie version 3.0 RC1, there have been some tweaks made to the scriptmodule since the release of the image. The first thing to do, regardless of which version of RetroPie you are running, is to update the RetroPie script. To install, restart the RetroPie script and select the ZEsarUX option in the experimental section.

If you are using a Raspberry Pi 1, I would suggest disabling Dispmanx and overclocking your Pi to medium to make sure you get decent audio.

ZEsarUX configuration


Upon loading, ZEsarUX reads a configuration file, .zesaruxrc, which is located in the home directory. The config file allows for the same options to be passed in the command line for every game.

The default config file reads as below:

;ZEsarUX sample configuration file
;
;Lines beginning with ; or # are ignored

;Run zesarux with --help or --experthelp to see all the options
--disableborder
--disablefooter
--vo sdl
--ao alsa
--hidemousepointer

--smartloadpath $romdir/zxspectrum 

--joystickemulated Kempston

;Remap Fire Event. Uncomment and amend if you wish to change the default button 3. ;--joystickevent 3 Fire

As you can see, the default joystick emulated by ZEsarUX is Kempston as this is the most widely supported by Speccy games.

The default game controller mapping for a PS3 controller in ZEsarUX is given below.

EventButton
PS3 Controller
Up-1
Left Analogue up
Down+1
Left Analogue down
Left-0
Left Analogue left
Right
+0
Left Analogue right
Fire3
Start
EscMenu0
Select
Enter8
L2
Smartload9
R2
NumSelect2
R3 (press right stick)
NumAction1
L3 (press left stick)

By default, the event Fire on the PS3 controller is the Start button which is not ideal for gameplay. This can be fixed by changing the last line of the config file.

Run the following command to edit the config file.

sudo nano ~/.zesaruxrc

Uncomment the last line (delete the semi-colon) and change the default button number 3 to the desired one. For the PS3 controller, I prefer the X button (button 14) so the last line becomes:

--joystickevent 14 Fire

Save and exit.

If you wish to remap any other event in the table above then you can add further parameters in the config file in the form below:

--joystickevent but evt

where but is the joystick button number and evt is the event.

Playing Games

Cesar, the developer, has suggested that TAP versions of the tape should be used wherever possible.

A good game to try first is Manic Manier. You can get the TAP file from the World of Spectrum. Unzip it to the zxspectrum folder in the roms folder.

To start playing once the game has launched, press Enter (button 8 or R2 on PS3 controller). In game, use the left analogue stick to move and Fire (X button) to jump.

To exit the game, press Select (button 0) to bring up the ZEsarUX menu (below).

Use the left analogue stick to navigate to Exit emulator and press Fire (X) to exit back to EmulationStation.

In some games such as Deathchase, you will be asked to enter a number to be able to play with the Kempston joystick. To do this, press NumSelect (button 2) once and an overlay will confirm that the key selected is 2 (see screenshot below). On the PS3 controller, you need to press right stick once though it is possible do this by moving the right stick in any direction. If you accidently skip past 2, then keep pressing NumSelect to cycle though the numbers back to 2.




Next press NumAction (button 1 or press left stick on PS3 controller) to enter and play.

If you use NumSelect to cycle through the numbers you will see a blank between 9 and 0. This key represents the spacebar, useful for bypassing menus in games such as Myth: History in the Making.

In the next tutorial, I will show you how to map the keyboard to your game controller for games that don't support the Kempston joystick.