EmuDeck icon indicating copy to clipboard operation
EmuDeck copied to clipboard

Atari ST support

Open darkgothmog001 opened this issue 2 years ago • 5 comments

Hello,

I wanted to emulate the Atari ST so since I was using Amiga on retroarch I wanted to check for the Atari ST and it looks like there is no option (i.e. no folder) for Atari ST.

Is Atari ST supported on emu deck ? if so how ? If not, can it be ?

thanks

┆Issue is synchronized with this Trello card by Unito

darkgothmog001 avatar Feb 05 '23 13:02 darkgothmog001

There was an atarist folder in the roms folder and emulationstation-de will scan it for roms.
Also, I'm just going to dump this info here since its related and someone may ask.

If you want ipf formated Atari ST roms to work:

I was able to build the core with support on the steam deck using distrobox running an arch linux pod via AUR. The AUR pacakges name is libretro-hatari-enhanced-git

Copy /usr/lib/caps/libcapsimage.so.5 to your emulation bios folder (once its there you can also "ln -s libcapsimage.so.5 libcapsimage.so" from inside the directory and have ipf for your Amiga emulation too.)

Copy /usr/lib/libretro/hatari_enhanced_libretro.so to /home/deck/.var/app/org.libretro.RetroArch/config/retroarch/cores/hatari_libretro.so overwriting the existing core. You can more than likely also install it via the mechanism within retroarch but I wanted the core info file to remain the same, so this was just easier for me.

Edit /home/deck/.emulationstation/custom_systems/es_systems.xml adding this entry to the file (after the last before the </systemList>:

  <system>
    <fullname>Atari ST</fullname>
    <name>atarist</name>
    <path>%ROMPATH%/atarist</path>
    <extension>.m3u .M3U .st .ST .stx .STX .ipf .IPF .zip .ZIP</extension>
    <command>/usr/bin/flatpak run --env=LD_LIBRARY_PATH=/run/media/mmcblk0p1/Emulation/bios org.libretro.RetroArch -L /home/deck/.var/app/org.libretro.RetroArch/config/retroarch/cores/hatari_libretro.so %ROM%</command>
    <platform>atarist</platform>
    <theme>atarist</theme>
    <emulators>
      <emulator name="libretro">
        <cores>
          <core>hatari</core>
        </cores>
      </emulator>
    </emulators>
  </system>

If you have the autosave feature turned on from emudeck, turn it off, the core seems to crash when it tries to load. I never tested with the original core so I don't know if its a new issue introduced or not, but I tend to doubt it.

Two things of note with that xml the command it is running is: /usr/bin/flatpak run --env=LD_LIBRARY_PATH=/run/media/mmcblk0p1/Emulation/bios org.libretro.RetroArch -L /home/deck/.var/app/org.libretro.RetroArch/config/retroarch/cores/hatari_libretro.so %ROM%

The important bit is the "--env=LD_LIBRARY_PATH=/run/media/mmcblk0p1/Emulation/bios org.libretro.RetroArch" it is what allows the core to access the lib we put in the bios folder. Without it the core will crash when trying to load an ipf file.

You may have noticed I added .m3u and .M3U to the file types Emulation Station DE will scan for. If you are using the no-intro set (why would you use this if you weren't), there are a few multi disk games in the bunch. I suggest extracting those zips putting the ipf files in a hidden folder in the directory ".multidisk" and creating a text file named after the rom with the path to the each disk in it. You can use the disc control menu in retroarch to eject, change index, and then insert to swap the discs. Here is an example I used for afterburner

filename: Afterburner (Europe).m3uin the m3u file:

.multidisk/Afterburner (Europe) (Disk A).ipf
.multidisk/Afterburner (Europe) (Disk B).ipf

You can hide the hidden folder in Emulation Station DE but I didn't bother as I know what it is and I don't really care if it scans the folder as I wont be loading the games from there anyway.

ChronoStriker1 avatar Feb 06 '23 21:02 ChronoStriker1

Hatari is included, and should be able to be accessed via Emulation Station. If not, please make an issue at their GitLab or Discord.

WingofaGriffin avatar Mar 05 '23 06:03 WingofaGriffin

Ok,

if I simply run the included setup of hatari, either via Emulation Station or directly via RetroArch, I just receive "Content cannot be loaded error".

The verbose log is as follows:

[libretro INFO] Retro SYSTEM_DIRECTORY /home/deck/Emulation/bios
[libretro INFO] Retro SAVE_DIRECTORY /home/deck/.var/app/org.libretro.RetroArch/config/retroarch/saves
[libretro INFO] Retro CONTENT_DIRECTORY /home/deck/.var/app/org.libretro.RetroArch/config/retroarch/downloads
[INFO] [Environ]: SET_PIXEL_FORMAT: RGB565.
[INFO] [Environ]: SET_INPUT_DESCRIPTORS:
[INFO] [Environ]: SET_DISK_CONTROL_INTERFACE.
[INFO] [Environ]: SET_SERIALIZATION_QUIRKS.
[libretro INFO] Resolution 832 x 520.
[INFO] [Content]: Content loading skipped. Implementation will load it on its own.
[INFO] [Environ]: SET_INPUT_DESCRIPTORS:
[libretro ERROR] TOS image '/home/deck/Emulation/bios/tos.img' not found. Content cannot be loaded

So, to fix that, I had to grab a TOS 1.06 image (see https://hatari.tuxfamily.org -- not going to link a download here), and put it directly in the Emulation/bios folder, and not in the atarist subfolder there.

Now, if I install hatari directly on Arch (https://archlinux.org/packages/community/x86_64/hatari/), none of this is required, because it includes EmuTOS 1.1.1 (https://hatari.tuxfamily.org/doc/emutos.txt), which is fine for the majority of games, and puts it to /usr/share/hatari/tos.img. This works out of the box.

Now, there are a couple of things here:

  • Retroarch might not include EmuTOS with the core.
  • The path might be wrong due to the Flatpak installation.
  • The path is somehow provided (or rather not provided correctly) via EmuDeck setup.

Any tips on how to make that smoother?

FloatingUpstream avatar Mar 06 '23 23:03 FloatingUpstream

Emulation/bios/ looks correct based on the documentation. (this is mapped to the SYSTEM folder in retroarch) https://docs.libretro.com/library/hatari/#bios

There is also this: https://emutos.sourceforge.io/ which sounds like it should work.

We do not make an atarist folder in Emualtion/bios (maybe it came from something you extracted into the folder?). You can check the folder creation stuff in the script - maybe i missed it, but i don't believe so. If you can point me to it, i'll remove it.

Anyways it sounds like it's all working correctly. The only other thing we should do is create a parser for this system if there is demand, so they can be run from steam.

ES-DE appears to already support it, (but i am unclear on if the RA core supports ipf natively, based on @ChronoStriker1's comment):

atarist

Full system name:
Atari ST

Supported file extensions:
.st .ST .msa .MSA .stx .STX .dim .DIM .ipf .IPF .m3u .M3U .7z .7Z .zip .ZIP

Launch command:
%EMULATOR_RETROARCH% -L %CORE_RETROARCH%/hatari_libretro.so %ROM%

Platform (for scraping):
atarist

Theme folder:
atarist```

Godsbane avatar Mar 07 '23 08:03 Godsbane

It does not support it natively, from reading the git for the core, it looks like back when it was first created there was a question about the licensing of libcaps, but I don't think thats the case anymore (the fact that the amiga core uses it and has built in support as long as the lib is provided). It appears that no one has gone back to give it that support as no one has worked on the core in years.

ChronoStriker1 avatar Mar 07 '23 15:03 ChronoStriker1