(solved) libretro atari 800 not defaulting to 5200 for game roms and start button
-
In the standard atari800 emulator (maybe the libretro as well) you can edit atari800.cfg and change MACHINE_TYPE=5200 or add -5200 to the runcommand.
Setting atari800_system = "5200" in /opt/retropie/configs/atari5200/retroarch-core-options.cfg should do for the libretro core. -
Sorry still no-go on that. I tried adding machine type to both the atari800.cfg and /opt/retropie/configs/atari5200/retroarch.cfg. I also tried adding the suggested atari800_system = "5200" in /opt/retropie/configs/atari5200/retroarch-core-options.cfg as well.
I think what is still suspicious is that out of he box I get this double-run of the runcommand (or that is what I think is happenin). The runcommand status indicating lr-atari800 comes up twice.
Any thoughts on how I can debug this?
-
I have the default settings for /opt/retropie/configs/atari5200/emulators.cfg which are:
lr-atari800 = "/opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-atari800/atari800_libretro.so --config /opt/retropie/configs/atari5200/retroarch.cfg %ROM%"
default = "lr-atari800"Still I get this condition where the runcommand "launching <rom>" is displayed twice. Looking at the runcommand.info and runcommand.log, things look reasonable. The log file indicates it is reading the .atari800.cfg, which looking at that also has MACHINE_TYPE=Atari 5200.
Any toughts?
Thanks
-
I think maybe this is a quirk with lr-atari800, but I need someone t sanity check this for me.
I SSH'ed in and attempted to run the exact retroarch command above to see what the behavior is. There is no double-run of runcommand, what this core does is flip the video mode to "Got size: 336 x 240" then it flips back to the console, then back to graphic mode, and then presents the blue "memo pad" screen. The core indicates that it read the ~pi/.atari800.cfg file, and this file definitely has:
MACHINE_TYPE=Atari 5200
Which I think is correct. Yet still the emulator comes up in atari 800 mode.The -5200 cmd line didn't work ... prints out the core's accepted command line options, and there doesn't seem to be anything that can force the machine type from the command line.
Any thoughts?
Thanks
-
@jamesnj No thoughts, both switches work for me in the non-retroarch version.
Where do you place the -5200 ?
I'd suggest lr-atari800 = "/opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-atari800/atari800_libretro.so --config /opt/retropie/configs/atari5200/retroarch.cfg -5200 %ROM%"I do not have the retroarch version installed as i use kat5200 for A5200 emulation (it has better controller support).
-
I face the exact same problem. I need to have the lr_atari800 run the 5200 roms
-
@future.child thanks ...
I started to look at the lr-atari800 source last night and it occurred to me that maybe the parameter placement was important. I tried like you suggested plus some variations, but still no good.
Sadly this LR core has not been updated in >2year.
I don't know anything about libretro programming, but what I can tell from the code I see is that the older atari800 emulator code was wrapped in such a way to make it loadable as a shared library. In this case "retroarch" appears to be doing the parameter parsing and then invoking lr-atari800 with the ROM file. I don't think retroarch is passing any parameters to the emulator core aside from the ROM file. Further, I think I see with the source that it would be possible for retroarch to do this, but maybe just doesn't. It also doesn't seem to honor the machine type set up in the various 800 emulator config files.
The issue that gets me and likely Pyjamerama as well is that lr-atari800 seems to be the default in the new retropie install/packages ... and can't seem to work out of the box without keyboard intervention.
I may look at that "kat5200" you mention above, or maybe switch to the emulator version my last install defaulted to.
If i'm missing something or any other place to look let me know,
Thanks
-
Weird, because in this topic changing from the non-XL 800 to 800XL did work so the values are passed to the emulator itself (maybe atari5200 support was removed from the source ?).
Have you tried changing the emulation type from within the emulator and saving it from there ?
To bee honest i haven't given the retroarch port much thought as it would seem unlikely from the source it adds functionality over the standard version (or the modded one i had for a while), also because it was released after i switched over to kat5200 (which is now included in zerojay's extra's menu, see this thread).
-
I took a look.
mud2005's message points to going to the retroarch screen <select>-X and changing the system there. When I did that and changed this to 5200, the carts load up now as expected.
However the start & select keys don't seem useful for game operation. In other words, select does not select games, neither does start actually start anything. You can exit with select-start and enter retroarch menu with select-X but that seems about it. If you start the game with keyboard F4 play is possible.
That previous thread didn't seem to be conclusive as to what was needed to cleanly play 5200 and 800 games without switching emulator options. It also alludes to everything working great with no mention of the start/select keys working (controller type, etc.)
So then the question is, if this select-X trick worked, where does retroarch save this information for later recall?
Also, any thoughts on the key mappings? I seem to remember not being able to get select/start working in the older atari800 emulator but was able to re-map those to L&R shoulder.
-
I'm not sure but as far as i know retroarch uses retroarch.default.cfg for the core options, maybe you can find button mappings there as well.
In the original emulator start/select/option and numerical were not possible to map to controller, that's why i made a modified version.
-
@future-child, do you have that kat5200 working on raspberry pi or something else?
I was looking at it and saw some note that the RPi may not be supported.
On the old atari800 emulator I could not get start/select buttons to work, but I eventually found a modified version where I could get most things working and re-map start/select to L&R shoulder buttons.
Thanks I'll look for retroarch.default.cfg and see if there is anything else in the various emulator screens I can fool with to make it work.
-
Yes, i have it working on the Rpi, i tested it on both models 2 and 3 without flaw (also on Win and Linux pc's).
Only thing i did to the source was to disable the debugger hotkey as causes a black screen in emulationstation with no way to exit.
The pi has no native support but compiled from source i have yet to run in to any major issues.The old version you used was probably jfroco's or mine (it added start/select/option/pound/hash/numerical keys, 2nd joystick etc.)
It did however not allow for real analog input to the emulator or improve input lag.you can find a installscript for kat5200 and the atari800 binary here
-
@future-child, the script resulted in a good compile (but has other install errors, I'll try to submit some fix suggestions tonight). I got it all installed, but can't get past the wizard screen. I have all the necessary BIOS files and kat5200 seems to find everything, but I get 2 issues:
- can't save configuration ... it just prints 'user error' occurred
- when I try to launch game, it results in segmentation violation / crash
Unfortunately I don't get anything more useful than that out to the console.
Any idea?
-
@jamesnj
What platform/os are you on ?Did you use use the database file created during compilation or downloaded it ?
Maybe you can try to replace the database file with the default one compiled from source if you downloaded it.No compilation errors or permissions errors (specifically the database file) ?
-
I'm on an RPi3b+. The OS is the standard raspbian light with the usual retropie/emulation station packages loaded in manually.
I'm not sure about the database file. I just let the install script run and do its thing ... I didn't download or install anything extra. The only issues I had with the install script was a missing double-quote around line 50 which I fixed and then re-ran the installer (with compile line commented out) to finish up the rest of the install.
There was no compile errors that caused the build to fail, but I do remember seeing a series of warnings. I could reproduce that if needed.
I did all of this from the user "pi" so I don't think there are permissions issues ... however some of the observed behavior might look like there is some permission out of place. I'm just not sure where to look. I have 2 database files from what I can see, /etc/kat5200/kat5200.db3 owned by root:root, and /home/pi/kat5200.db3 owned by pi:pi
I could clear out all the installed stuff and data in /tmp and attempt to build again if any of the compile warnings might be relevant.
Thanks
Thanks
-
@jamesnj
The missing quote on line 50 has been added to my script.
As far as i can tell it should not have interfered with the emulator itself, only with creating the emulationstation config files.I think the problem lies in the database, presumably user pi couldn't read/write to the root owned one (precompiled ?) and therefore the emu created a new one owned by pi but it misses a bunch of core data.
Can you also try exiting emulationstation and running the kat5200 from X desktop ?
I have not tested it on the RPi3+/Stretch, only RBPi3 /Jessie and earlier (I doubt it makes a difference however).
As soon as i have stretch up and running on a RBPi3 i will test it (I did not plan on getting a RBPi3+ anytime soon, as i still have about 10 of the RBPi3's in stock). -
I figured it out .... finally I can play some 5200 games by controller alone!
I resorted to using strace to see if I could find any suspicious actions. Finally after poking around I saw at the start of kat5200 it looks for /home/pi/.kat5200/kat5200.db3, finds none, and so then reverts to /etc/kat5200/kat5200.db3, which is owned by root and cannot be written.
In your install script line 36 you create /home/pi/.kat5200, but then in line 46 it is looking for /home/pi/kat5200.db3 and that file is never referenced in the emulator. So I think all that is needed is to fix the script to download the db3 file in put it in the right place. The rest of the script seems to have done the right thing as everything else with game selection/etc. seems to work.
It took me a little while to figure out how to get the joypad configured and get the correct combo of keys to simulate retroarch exit.
As an aside, line 20 looks for 5300.ROM, and on my default install it is named 5200.rom
As another aside, with this condition where a writable db3 file is not found, entering the game leads to an munalloc() which I assume is immediately followed by a pointer dereference causing the SIGSEGV.
-
@jamesnj Thanks for the feedback,
i have updated the script to only keep the /home/pi/.kat5200/kat5200.db3 file (weird that it hasn't given problems before).
Are you sure about line 20 ? I may have a dyslectic episode (nu pun intended) but looking at it i see nothing wrong.
As for the munalloc(), I will give this feedback to the developer of kat5200 for improvement.
-
This is what a new system looks like:
pi@raspberrypi:~/RetroPie/BIOS $ ls -l 5200*
-rw-r--r-- 1 pi pi 2048 May 1 22:21 5200.romThanks for the help ... I'll download the script again today and run it on my other system.
-
I ran it and things look good. The only minor change I made was to alter line 20 to read:
if [ -f "/home/pi/RetroPie/BIOS/5200.ROM" -o -f "/home/pi/RetroPie/BIOS/5200.rom" ]aside from this the compile/install seems to have gone well and games are playable immediately.
The only odd thing which I'm not sure it related to this update is that my emulation station console select includes atari 5200 twice .. I need to figure out how that happened, it could have been some mistake of mine when I first installed the system....
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.