Kat5200 installer (experimental)
-
As the Atari800 emulator i was messing with in this thread requires an extensive rewrite to support the analog controls used in the A5200 i decided to look for some alternative and found the kat5200 emulator to be the best option.
After initial configuration (using keyboard and mouse) and saving the configuration database (see notes) it works like a charm.
To aid in installing this emulator i created a installer script which makes a few necessary adjustments.Usage (from a (SSH) terminal):
wget -N https://raw.githubusercontent.com/futurechild/Kat5200-Retropie/master/install chmod +x install ./install
Notes:
F1 key for invoking the debugger has been removed.
By default a (default) configuration file gets copied over everytime the emulator is started, this can be stopped by editing emulators.cfg and removing the following part:
cp -f /opt/retropie/configs/atari5200/default_config.db3 /home/pi/.kat5200/kat5200.db3 ;
Configuration has to be done with keyboard/mouse (press escape for menu).
Configuration files can be saved by entering the following command (change the destination name if needed !):
cp /home/pi/.kat5200/kat5200.db3 /opt/retropie/configs/atari5200/saved_config.db3
At this point the emulator does not support specifying config files.
Future versions should have this option according to it's developer.
The following is a way to get around this until a new version is available:
edit emulators.cfg and make a new entry with changed emulator name and config file name (i.e. add the following line):config1 = "cp -f /opt/retropie/configs/atari5200/config1.db3 /home/pi/.kat5200/kat5200.db3 ;/usr/loc/bin/kat5200 %ROM%"
The standard emulator does not support combination buttons (ie start+select) to perform functions (ie quit).
Future versions may have this option according to it's developer.
This version has hardcoded button combination SELECT (Nr. 8) and START (Nr. 9) to exit the emulator.
This only works when the joystick is enabled (at least one function has been assigned to a button) and the menu is not active.Update1:
A new version (0.8.1) has been created by the author which supports hotkeys, so the hardcoded buttons to exit have been removed, specifying config files is now also possible so config backup/copy is no longer needed (it will soon be removed from my install script).Also Kat5200 has been included in Zerojay's extra's menu for easy installation (my preferred method).
Step one is to install the extra's menu:
cd ~ git clone https://github.com/zerojay/RetroPie-Extra.git cd RetroPie-Extra/ ./install-extras.sh
Step two is to run the extra's menu:
cd ~ cd RetroPie-Extra/ git pull origin ./install-extras.sh
You should be able to find kat5200 under emulators and install it from there.
Step three is to place you roms and bios files in their proper folders, after rebooting the roms should be listed and be able to launch kat5200.
First start of kat5200 should begin with a configuration wizard for which you need keyboard/mouse.If you want Atari800 as a menu option as well you could modify the /opt/retropie/configs/all/emulationstation/es_systems.cfg and /opt/retropie/configs/atari800/emulators.cfg files.
you can use the following as a guide:
es_systems.cfg :
<system> <name>atari800</name> <fullname>Atari 800</fullname> <path>/home/pi/RetroPie/roms/atari800</path> <extension>.a52 .bin .7Z .A52 .BIN</extension> <command>/opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ atari5200 %ROM%</command> <platform>atari800</platform> <theme>atari800</theme> </system>
/opt/retropie/configs/atari800/emulators.cfg:
kat5200 = "/usr/local/bin/kat5200 %ROM%" default = "kat5200"
-
@future.child Nice work man. :)
I was going to get around to asking you how you were doing on this, but I've been all over the map with other stuff.
No way I'm giving up all that work I did configuring things for all the other games that work, but this should be a great 2nd emulator to get the last few games to play right. If this works for the few that we couldn't control right in the Atari800 emulator, we might just have here an emulator that plays the Atari 5200/800 even better than the XBox.
Awesome job. I can't wait to try it out.
-
@future-child Thanks for bringing Kat5200 into RetroPie.
Two things I've noticed:
First, I've ran installer from /home/pi directory and no /.kat5200 folder was created. Instead, .db3 and .log files were created directly in /home/pi. I'm Linux newbie and not sure if I should have create /.kat5200 folder first then wget and install from there. Anyway I've made /.kat5200 folder and moved files. Emulator starts now and launches games.
Second, ESC doesn't work for me - can't access emulator configuration. Any ideas? -
@adriansos666 i will add a check to the installer to make certain the .kat5200 folder is present before getting the config db.
As for the escape key not working, you could add the parameter -start_gui_with_launcher 1 to the emulators.cfg to force start with the menu.
kat5200 = "cp -f /opt/retropie/configs/atari5200/default_config.db3 /home/pi/.kat5200/kat5200.db3 ;/usr/local/bin/kat5200 -start_gui_with_launcher 1 %ROM% "
Perhaps the default key binding for entering the menu not correct for your keyboard ?
-
@future-child No luck. Kat5200's menu doesn't open on start even with "-start_gui_with_launcher 1" argument. Surprisingly ALT+F4 (quit) function works. Tested with two different physical keyboards connected to the Pi.
The only way I can access emulator's menu is by temporally renaming kat5200 config in /home/pi/.kat5200 and launching emulator. Since it doesn't know where bios file is it opens menu at startup.Few more things I've noticed. First, I had already entry for atari 5200 emulator in es_systems.cfg and installer have created duplicate entry (I know there was a warning shown at the time of installation). It added few more rom extensions like ZIP which is nice for kat5200 to support.
Second, installer overwrites emulators.cfg (I know it saves backup file). Would be possible, in the future to add new entry for kat5200 to existing emulators.cfg for atari5200?
Third, is more of a sugestion. Could you change default installation directory for kat5200 binary file from /usr/local/bin to /opt/retropie/emulators/kat5200 ? That would make it consistent with with other emulators.
I'll have more time over the weekend to play with 5200 emus.
Many thanks!
-
@adriansos666 i'm not sure what happens in your case not being able to access the menu.
the default key for accessing the menu is Escape and afaik this cannot be changed in the configuration menu.you are aware that by default a configuration .db3 gets copied to /home/pi/.kat5200/ ?
perhaps the keybinding is wrong in this one for your system as it is based on my keyboard.could you try the following:
- remove the follwing bit from the command in emulators.cfg:
cp -f /opt/retropie/configs/atari5200/default_config.db3 /home/pi/.kat5200/kat5200.db3 ;
- delete the config file /home/pi/.kat5200/kat5200.db3
- check if other config files are present (i.e. etc/kat5200/kat5200.db3) and delete them as well.
- start the emulator and go trough the wizzard.
- when entering the menu make note of which config file is being used and test if you are able to enter and exit menu at will.
Changing the install location should pose no problem, i will see if there are any negative side effects to it and make an update to the installer.
- remove the follwing bit from the command in emulators.cfg:
-
@future-child I got it to work. Since I have run installer from the /home/pi directory, emulator seems to treat it as a location for kat5200.db3 file. I had to modify my emulators.cfg to copy kat's config from /opt/retropie/configs/atari5200 to /home/pi rather than /home/pi/.kat5200. ESC key works as well. I'll try to install emulator again, this time from /home/pi/.kat5200 directory.
Thanks!
-
@adriansos666 i think it went wrong due to the absence of the .kat5200 folder.
The first thing the script does is switch to the /tmp directory and from there build and install the binaries to the
/usr/local/bin/kat5200
directory.The emulator itself has no option of specifying what configuration file to use, so it will start to look for kat5200.db3 in
/home/pi/.kat5200
, then in/home/pi/
and finally in/etc/kat5200
.Therefore configuration files should be placed in the
/home/pi/.kat5200
directory and deleted from other locations.
I did just yesterday update the script to make sure this directory exists. -
@future-child Reinstalled from the scratch, /.kat5200 directory was created automatically. ESC works. Thanks!
-
@adriansos666 did you reinstall kat5200 or retropie completely ?
-
@future-child Yes I did. I had to manualy remove duplicate entry
from the systems.cfg and restore overwritten emulators.cfg (as I wanted to keep other entries for Atari800 emulator). Installation did create /.kat5200 automatically. -
@future-child just kat5200
-
@adriansos666 how do you mean "just kat5200" ?
If it was a question about what emulator the script installs, then yes it's just kat5200 (and a few dependencies), however it's been modified a bit.
This version has been modified to have the debug hotkey (F1) disabled and controller START + SELECT harcoded to exit the emulator.If you meant something else, please enlighten me.
-
@future-child Sorry, originally I missread your post. What
I ment was that I did reinstall kat5200 only. I didn't reinstall whole Retropie. -
@future-child Hey bud,
I finally got this installed and working. I had to remove it and re-install it. Then I had to hook up the keyboard/mouse to properly configure it for the first time and find the roms/bios files. It only took about a minute on the PI Zero instead of the hour or more before a failure that occurred when I didn't specify the directories.
I was wondering how the configuration files would work for this system though? I'd like to map out and configure the controls the same way I was able to do them for the Atari800 and I reflected in the spreadsheet. https://docs.google.com/spreadsheets/d/1VhS4f3RFCzkPeOpyVYaWno3-Ls0EjJnj_I9WjKfvnuI/edit#gid=0
I'm not sure if I'm ever going to re-configure all of the games, but I did want to try to configure the ones that we never got working 100% in Atari800, such as Pole Position and Kaboom!
Can I use the same templates that we used for Atari800, or do you have a sample kat5200 controller template that I could use to write the new configurations from?
Would this still be the way to get the alternate configurations to work?:
At this point the emulator does not support specifying config files.
Future versions should have this option according to it's developer.
The following is a way to get around this until a new version is available:
edit emulators.cfg and make a new entry with changed emulator name and config file name (i.e. add the following line):config1 = "cp -f /opt/retropie/configs/atari5200/config1.db3 /home/pi/.kat5200/kat5200.db3 ;/usr/loc/bin/kat5200 %ROM%"
-
@used2berx This method , while it still works, is no longer needed.
You can save your settings per rom (crc based) in the ui.
After launching the rom, press 'escape'to enter the menu.
Select 'File'-> 'Launcher' and on the 'Profiles' tab de-select 'Use default' , choose the desired profile and press 'OK'
Next time it will launch the rom with the saved settings. -
@future-child You said this method works, but "is no longer needed".
Why is it no longer needed? If I don't use it, the emulator only launches the default config no matter what game I choose. I'm just confused by the line where you said this wasn't needed anymore.
-
@used2berx The old method works by creating a copy of the database (with custom config) and moving that copy back into place by the runcommand based on rom-crc.
By having all the data in one single database the runcommand no longer needs to copy anything.
The emulator itself will load the settings you chose in the "launcher" each time you launch the rom.so the
cp -f /opt/retropie/configs/atari5200/config1.db3 /home/pi/.kat5200/kat5200.db3 ;
part can be removed from the runcommand. -
@future-child Oh... so do you mean that "is no longer needed" is what I was asking about in the previous post?
The new method is the CRC based one that you explained 7 hours ago, correct?
-
@used2berx Yes, you no longer need to specify different runcommands like :
config1 = "cp -f /opt/retropie/configs/atari5200/config1.db3 /home/pi/.kat5200/kat5200.db3 ;/usr/loc/bin/kat5200 %ROM%"
to have settings configured per rom, you can just configure your settings in the emulator itself for each rom crc.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.