Homepage Forums RetroPie Project Everything else related to the RetroPie Project How to add an Atari 5200 libretro Emulator?

Viewing 19 posts - 1 through 19 (of 19 total)
  • Author
    Posts
  • #89813
    juicebag85
    Participant

    Hi.

    Now that I’ve almost accomplished everything that I wanted to do with my RetroPie, there’s still one issue that bothers me.

    Since the Atari 2600 support is great, I’m wondering why there are no emulators for the Atari 5200. Especially because the games are much prettier on the 5200.
    I would really appreciate if there could be any way to add an Atari 5200-libretro emulator that supports Retroarch (for an easy input setup). :)

    Are there any plans to implement that in near future or is the an easy way to do this by yourself?

    I already tried it with this way by using the Atari 800:

    Setting up Atari 400/800

    but it didn’t worked out for me because I always got black screens which led me to hard reset my Pi. Also there was no possibility to use my Xbox 360 controller which works fine in every other emulator. :(

    Thank you for your help!

    Regards
    Juicebag

    #89822
    labelwhore
    Participant

    There is Atarai 5200 support via Atarai 800. I haven’t been able to get it to work very smoothly though. For example, I can only launch roms from the emulator menu rather than directly from emulationstation.

    #89825
    juicebag85
    Participant

    And how does it work? And most importantly: Does it work with a Controller instead of a keyboard? Because otherwise it would have no worth for me. :/

    #89829
    labelwhore
    Participant

    I have been able to get some games to work in atari 800 with my xbox 360 controller. Admittedly, I haven’t messed with it much yet though, as I only got the roms to launch at all yesterday morning. The difficult part for me, was getting the config file set up correctly. The file is named atari800.cfg, in order to get roms to start, you need to fill in all of the top section of the file manually to point to the BIOS files, like in this example:

    https://github.com/tonymorris/arcade/blob/master/.atari800.cfg

    There are 5 total BIOS files you need for both atari 800 and atari 5200 roms. So far, playing around with the emulator menu, I can get 5200 roms to launch, but I haven’t figured out how to launch them directly from ES yet. Atari 800 roms so far work perfectly for me.

    Did you know that you can have multiple configurations for your xbox 360 controller? it’s possible to map keyboard keys to buttons for example in one configuration, then switch to that configuration by pressing the xbox button.

    Take a look at this, particularly where it mentions –next-config and –ui-buttonmap:

    http://pingus.seul.org/~grumbel/xboxdrv/xboxdrv.html

    I think using something like this when you start up xboxdrv might do it:

    --next-config --wid 0 --led 2 --ui-buttonmap dl=KEY_4,dr=KEY_6,du=KEY_8,dd=KEY_2,a=KEY_0,y=KEY_SPACE --deadzone 4000 --silent

    …actually, I think you may even be able to tweak that further to be able to navigate the menu to launch 5200 roms. I’ll play with it later tonight and report back

    #89879
    juicebag85
    Participant

    Hey thanks for your help.
    The ROMs really do work with the Atari 800 after I tweaked everything right. :)

    You can start the ROMs directly from emulation station by modifiing the <extension> in the es_systems.cfg. Just add “.a52 .A52” and you can start them right off the emulationstation.

    But I have another question. When I have this command line: “SDL_JOY_0_TRIGGER=305” in the .atari800.cfg, where the number stands for an specific key on the keyboard, how can I figure out which key that is? I really googled my a** off, but I couldn’t find anything. :(

    And could you please explain a bit more specificly where I have to add the command line to the xboxdrv (in which file). Because I don’t think that I understood that. :D
    I think it maybe also important to know that I configured the Xbox Controller like Step 3 (init script) on this page:

    https://github.com/retropie/RetroPie-Setup/wiki/Setting-up-the-XBox360-controller

    Thank you!

    #89885
    labelwhore
    Participant

    For me, I need to change the lines in /etc/rc.local to initialize xboxdrv. I haven’t worked out exactly what the change should be, since what I wrote above isn’t exactly working. I’ll try again later tonight though.

    the jist of the change is this. in rc.local currently, you probably have something like this:
    xboxdrv --trigger-as-button --wid 0 --led 2 --deadzone 4000 --silent &

    Adding –next-config you can specify a second controller configuration that can be accessed by hitting the xbox button.

    Using –ui-buttonmap, you can map the d-pad and buttons to keyboard buttons. So you should be able to add --next-config --ui-buttonmap followed by the key mapping before the &.

    The part I’m missing, I think, is the correct key mapping.

    #89892
    labelwhore
    Participant

    Also, the 5200 games only boot to the emulator screen for me, at which point, I have to choose what type of emulation. They boot after that. Could you share your atari800.cfg file changes? and also post the atari 5200 section of your es_systems.cfg?

    #89898
    labelwhore
    Participant

    I think 305 is the x11 value for the right ctrl key. So try mapping a button to XK_305 using --ui-buttonmap a=XK_305 or --ui-buttonmap a=KEY_RIGHTCTRL.

    #89902
    juicebag85
    Participant

    My atari800.cfg looks like this:

    Atari 800 Emulator, Version 3.1.0
    ROM_OS_A_NTSC=
    ROM_OS_A_PAL=
    ROM_OS_B_NTSC=
    ROM_OS_AA00R10=
    ROM_OS_AA00R11=
    ROM_OS_BB00R1=
    ROM_OS_BB01R2=/home/pi/RetroPie/roms/atari800/ATARIXL.ROM
    ROM_OS_BB02R3=
    ROM_OS_BB02R3V4=
    ROM_OS_CC01R4=
    ROM_OS_BB01R3=
    ROM_OS_BB01R4=
    ROM_OS_BB01R59=
    ROM_OS_BB01R59A=
    ROM_5200=/home/pi/RetroPie/roms/atari800/5200.rom
    ROM_5200_A=
    ROM_BASIC_A=
    ROM_BASIC_B=
    ROM_BASIC_C=/home/pi/RetroPie/roms/atari800/ATARIBAS.ROM
    ROM_XEGAME=
    ROM_400/800_CUSTOM=/home/pi/RetroPie/roms/atari800/ATARIOSB.ROM
    ROM_XL/XE_CUSTOM=
    ROM_5200_CUSTOM=
    ROM_BASIC_CUSTOM=
    ROM_XEGAME_CUSTOM=
    OS_400/800_VERSION=AUTO
    OS_XL/XE_VERSION=AUTO
    OS_5200_VERSION=AUTO
    BASIC_VERSION=AUTO
    XEGS_GAME_VERSION=AUTO
    H1_DIR=
    H2_DIR=
    H3_DIR=
    H4_DIR=
    HD_READ_ONLY=1
    PRINT_COMMAND=lpr %s
    SCREEN_REFRESH_RATIO=1
    MACHINE_TYPE=Atari XL/XE
    RAM_SIZE=64
    DEFAULT_TV_MODE=PAL
    MOSAIC_RAM_NUM_BANKS=0
    AXLON_RAM_NUM_BANKS=0
    ENABLE_MAPRAM=0
    DISABLE_BASIC=1
    ENABLE_SIO_PATCH=1
    ENABLE_H_PATCH=1
    ENABLE_P_PATCH=1
    ENABLE_NEW_POKEY=1
    STEREO_POKEY=0
    SPEAKER_SOUND=1
    BUILTIN_BASIC=1
    KEYBOARD_LEDS=0
    F_KEYS=0
    BUILTIN_GAME=0
    KEYBOARD_DETACHED=0
    1200XL_JUMPER=0
    CFG_SAVE_ON_EXIT=0
    MIO_ROM=
    BLACK_BOX_ROM=
    XLD_D_ROM=
    XLD_V_ROM=
    CARTRIDGE_FILENAME=
    CARTRIDGE_TYPE=0
    CARTRIDGE_PIGGYBACK_FILENAME=
    CARTRIDGE_PIGGYBACK_TYPE=0
    CARTRIDGE_AUTOREBOOT=1
    CASSETTE_FILENAME=
    CASSETTE_LOADED=0
    CASSETTE_WRITE_PROTECT=0
    RTIME=1
    COLOURS_NTSC_SATURATION=0
    COLOURS_NTSC_CONTRAST=0
    COLOURS_NTSC_BRIGHTNESS=0
    COLOURS_NTSC_GAMMA=0.3
    COLOURS_NTSC_HUE=0
    COLOURS_NTSC_GTIA_DELAY=26.8
    COLOURS_NTSC_EXTERNAL_PALETTE=
    COLOURS_NTSC_EXTERNAL_PALETTE_LOADED=0
    COLOURS_NTSC_ADJUST_EXTERNAL_PALETTE=0
    COLOURS_PAL_SATURATION=0
    COLOURS_PAL_CONTRAST=0
    COLOURS_PAL_BRIGHTNESS=0
    COLOURS_PAL_GAMMA=0.3
    COLOURS_PAL_HUE=0
    COLOURS_PAL_GTIA_DELAY=23.2
    COLOURS_PAL_EXTERNAL_PALETTE=
    COLOURS_PAL_EXTERNAL_PALETTE_LOADED=0
    COLOURS_PAL_ADJUST_EXTERNAL_PALETTE=0
    ARTIFACT_NTSC=NONE
    ARTIFACT_PAL=NONE
    ARTIFACT_NTSC_MODE=0
    SCREEN_SHOW_SPEED=0
    SCREEN_SHOW_IO_ACTIVITY=1
    SCREEN_SHOW_IO_COUNTER=0
    SCREEN_SHOW_1200XL_LEDS=1
    SOUND_ENABLED=1
    SOUND_RATE=44100
    SOUND_BITS=16
    SOUND_FRAG_FRAMES=0
    SOUND_LATENCY=20
    VIDEO_FILTERING=1
    VIDEO_ZOOM=1.00
    SDL_JOY_0_ENABLED=1
    SDL_JOY_0_LEFT=260
    SDL_JOY_0_RIGHT=262
    SDL_JOY_0_UP=264
    SDL_JOY_0_DOWN=261
    SDL_JOY_0_TRIGGER=305
    SDL_JOY_1_ENABLED=0
    SDL_JOY_1_LEFT=97
    SDL_JOY_1_RIGHT=100
    SDL_JOY_1_UP=119
    SDL_JOY_1_DOWN=115
    SDL_JOY_1_TRIGGER=306
    

    The part in my es_systems.cfg like this:

    <system>
        <fullname>Atari 800</fullname>
        <name>atari800</name>
        <path>~/RetroPie/roms/atari800</path>
        <extension>.xex .XEX .a52 .A52</extension>
        <command>/opt/retropie/supplementary/runcommand/runcommand.sh 0 "/opt/retropie/emulators/atari800/bin/atari800 %ROM%" "atari800"</command>
        <platform>atari800</platform>
        <theme>atari800</theme>
      </system>
    

    Or do you mean with the “emulator screen” the cartridge selevtion screen where you have to choose which type of cartridge you wanna start? Because I also see that every time I start a Game.

    The problem for me is that every time I try to change something at the xboxdrv, I mess it up, the xboxdrv doesn’t load anymore nothing works and the raspberry pi just loads the xpad driver. :(

    Did you see that I edited my post before?
    I configured my xboxdrv like on this page:

    https://github.com/retropie/RetroPie-Setup/wiki/Setting-up-the-XBox360-controller

    But I did choose Step 3 (init.d script with the daemon -D Option) because of performance advantages. Is there any possibility to configure it that way how I want it to be? And where do I have to do it?

    Thank you!

    #89908
    labelwhore
    Participant

    I could never get the init.d script to work, so I used option 2. You’ll have to edit /etc/default/xboxdrv, I believe. Your changes will have to be just after each iteration of “–dpad-as-button”.

    I did mean the cartridge select screen. I thought perhaps there was a way to get it to not come up. So it looks like we’re at the same point. I’m not at home, but I’ll share my findings for remapping an xbox controller later.

    #89914
    juicebag85
    Participant

    Hmm ok that was what I was guessing too. :/

    I edited the /etc/default/xboxdrv like:

    # How many Controllers? (support up to 4 Controllers)
    CONTROLLER_NUM=1
    
    case $CONTROLLER_NUM in
        1) CONTROLLER="-w 0 -l 2 --trigger-as-button --dpad-as-button --ui-clear --ui-buttonmap a=KEY_RIGHTCTRL,b=KEY_F1,x=KEY_F4,y=KEY_F5 --ui-buttonmap back=ESC --ui-buttonmap dl=KEY_NUM4,dr=KEY_NUM6,du=KEY_NUM8,dd=KEY_NUM5"
        ;;
        2) CONTROLLER="-w 0 -l 2 --trigger-as-button --dpad-as-button --next-controller -w 1 -l 3 --trigger-as-button --dpad-as-button"
        ;;
        3) CONTROLLER="-w 0 -l 2 --trigger-as-button --dpad-as-button --next-controller -w 1 -l 3 --trigger-as-button --dpad-as-button --next-controller -w 2 -l 4 --trigger-as-button --dpad-as-button"
        ;;
        4) CONTROLLER="-w 0 -l 2 --trigger-as-button --dpad-as-button --next-controller -w 1 -l 3 --trigger-as-button --dpad-as-button --next-controller -w 2 -l 4 --trigger-as-button --dpad-as-button --next-controller -w 3 -l 5 --trigger-as-button --dpad-as-button"
        ;;
        *) CONTROLLER="incorrect amount of controller specified"
        ;;
    esac
    

    But after a reboot it seems, that it doesn’t load the xboxdrv anymore but the xpad instead. Really tricky. ^^

    #89915
    labelwhore
    Participant

    When I tried earlier, I got the same results. Maybe it would work using a config file like is mentioned here:

    http://pingus.seul.org/~grumbel/xboxdrv/xboxdrv.html

    #89916
    juicebag85
    Participant

    Yeah. That could help. Do you know where I have to save that .ini that xboxdrv can recognize it? Unfortunatly he doesn’t write that in his tutorial.

    #89919
    labelwhore
    Participant

    I think it could be anywhere, you need to put the whole path in the command line for xboxdrv. I’d put it in the /usr/ folder somewhere.

    #89925
    juicebag85
    Participant

    Damn…

    So I created a xboxdrvcfg.ini with the following content:

    [xboxdrv]
    silent=true
    deadzone=6000
    dpad-as-button=true
    trigger-as-button=true
    
    [ui-buttonmap]
    a=KEY_RIGHTSHIFT
    b=KEY_F1
    x=KEY_F4
    y=KEY_F5
    
    [ui-buttonmap]
    lb=KEY_TAB
    rb=KEY_SPACE
    
    [ui-buttonmap]
    lt=KEY_F9
    rt=BTN_LEFT
    
    [ui-buttonmap]
    dl=KEY_NUM4
    dr=KEY_NUM6
    du=KEY_NUM8
    dd=KEY_NUM5
    
    [ui-buttonmap]
    back=KEY_ESC
    start=KEY_ENTER
    
    # EOF #

    and saved it at /usr/local/bin/

    Then I edited the /etc/default/xboxdrv to:

    # How many Controllers? (support up to 4 Controllers)
    CONTROLLER_NUM=1
    
    case $CONTROLLER_NUM in
        1) CONTROLLER="-w 0 -l 2 --config /usr/local/bin/xboxdrvcfg.ini"
        ;;
        2) CONTROLLER="-w 0 -l 2 --config /usr/local/bin/xboxdrvcfg.ini --next-controller -w 1 -l 3 --config /usr/local/bin/xboxdrvcfg.ini"
        ;;
        3) CONTROLLER="-w 0 -l 2 --config /usr/local/bin/xboxdrvcfg.ini --next-controller -w 1 -l 3 --config /usr/local/bin/xboxdrvcfg.ini --next-controller -w 2 -l 4 --config /usr/local/bin/xboxdrvcfg.ini"
        ;;
        4) CONTROLLER="-w 0 -l 2 --config /usr/local/bin/xboxdrvcfg.ini --next-controller -w 1 -l 3 --config /usr/local/bin/xboxdrvcfg.ini --next-controller -w 2 -l 4 --config /usr/local/bin/xboxdrvcfg.ini --next-controller -w 3 -l 5 --config /usr/local/bin/xboxdrvcfg.ini"
        ;;
        *) CONTROLLER="incorrect amount of controller specified"
        ;;
    esac
    

    but everytime I boot the Pi I get the following error:

    [....] Starting XBOX Controller Service: xboxdrv
    -- [ERROR] -----------------------------------------------
    /usr/local/bin/xboxdrvcfg.ini:1:0: error: expected newline
    . ok
    

    Any ideas what this could mean?

    #89927
    labelwhore
    Participant

    I’m not really sure. what happens if you add --silent after /usr/local/bin/xboxdrvcfg.ini?

    nevermind, that’s covered by your config file.

    #89946
    labelwhore
    Participant

    I think i may have it. change this:

    [ui-buttonmap]
    dl=KEY_NUM4
    dr=KEY_NUM6
    du=KEY_NUM8
    dd=KEY_NUM5

    to this:

    [ui-buttonmap]
    dl=KEY_NUMMERIC_4
    dr=KEY_NUMMERIC_6
    du=KEY_NUMMERIC_8
    dd=KEY_NUMMERIC_5

    you can get all the codes like this: sudo xboxdrv --help-key

    Let me know how this worked out for you. It didn’t work correctly for me, but I think that may be because the keyboard I have connected has no numeric keypad. I’m working on finding a work around solution.

    #90149
    juicebag85
    Participant

    It didn’t work. Everytime I change a little bit in that script, it doesn’t load anymore. :(

    I think I give up here. I just wanted to play the classics like Pac Man, Space Invaders, Asteroids and so on.
    I figured out that you can also play them very good in the mame4all emulator, which works absolutly fine for me and also the config setup for the controls is the best and easiest of all the retropie emulators.

    I’m sorry to let you hang there alone. :(

    #90165
    labelwhore
    Participant

    Nah, it’s ok. I got atari 5200 roms to mostly work. Somehow the analog stick just started working for me. I’d rather use the dpad, but at least it’s working. I tried several different ways of faking the number pad inputs, but just made no traction, then I noticed that in one of my other controller setups, the analog stick worked for atari800 and 5200. So right now, I’m calling that good enough.

Viewing 19 posts - 1 through 19 (of 19 total)
  • The forum ‘Everything else related to the RetroPie Project’ is closed to new topics and replies.