RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    Atari 5200: New version of Atari800 (Beta): two triggers (Moon Patrol!!!), hat start and exit buttons

    Scheduled Pinned Locked Moved Ideas and Development
    409 Posts 26 Posters 198.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • JLsoftJ
      JLsoft @future.child
      last edited by

      @future-child
      Thanks for your fixes and additions :D

      After messing around trying to figure out why Robotron 2084/Space Dungeon dual stick controls weren't working for me (shooting was always aiming northwest, and the config would always write out SDL_JOY_0_SECOND_AXIS_ENABLED=0) with a single gamepad connected to my Pi, I finally worked out that the simplest fix was to change the 2 lines in sdl/input.cthat contain "SDL_JOY_0_SECOND_AXIS_ENABLED" to something else.

      I'm guessing that since the option SDL_JOY_0_SECOND_AXIS is a substring of SDL_JOY_0_SECOND_AXIS_ENABLED, that's the reason the segment where SDL_JOY_0_SECOND_AXIS_ENABLED option is read from the config file never actually got called.

      future.childF 1 Reply Last reply Reply Quote 0
      • future.childF
        future.child @JLsoft
        last edited by

        @jlsoft
        could you post your config, there may be an issue in there causing it not to work for you with the original code.

        It is possible because SDL_JOY_0_SECOND_AXIS is a sub string of SDL_JOY_0_SECOND_AXIS_ENABLED this variable should be placed first, but since the complete string is compared, there should be no problem having it in any other order.

        JLsoftJ 1 Reply Last reply Reply Quote 0
        • JLsoftJ
          JLsoft @future.child
          last edited by

          @future-child
          The problem/behavior I was getting was that I would set SDL_JOY_0_SECOND_AXIS_ENABLED=1 in the config, run the emulator, it'd have no effect, and then when the emulator wrote the config back out, it'd replace it with SDL_JOY_0_SECOND_AXIS_ENABLED=0.

          I don't think anything else in my config would affect that, since it works fine after I only changed the name of that option and made a new build.

          SDL_JOY_0_ENABLED=1
          SDL_JOY_0_LEFT=7
          SDL_JOY_0_RIGHT=5
          SDL_JOY_0_UP=4
          SDL_JOY_0_DOWN=6
          SDL_JOY_0_TRIGGER=16
          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=16
          SDL_JOY_0_SELECT=0
          SDL_JOY_0_START=3
          SDL_JOY_0_TRIGGER1=13
          SDL_JOY_0_TRIGGER2=14
          SDL_JOY_0_ASTERISK=12
          SDL_JOY_0_OPTION=11
          SDL_JOY_0_HASH=15
          SDL_JOY_0_SECOND_AXIS_ENABLED=1 <= Current build resets this to 0 on exit.
          SDL_JOY_0_SECOND_AXIS_INDEX=2
          SDL_JOY_0_DIGIT_1=16
          SDL_JOY_0_DIGIT_2=16
          SDL_JOY_0_DIGIT_3=16
          SDL_JOY_0_DIGIT_4=16
          SDL_JOY_0_DIGIT_5=16
          SDL_JOY_0_DIGIT_6=16
          SDL_JOY_0_DIGIT_7=16
          SDL_JOY_0_DIGIT_8=16
          SDL_JOY_0_DIGIT_9=16
          SDL_JOY_0_DIGIT_0=16
          SDL_JOY_0_A52_PAUSE=1
          SDL_JOY_0_A52_RESET=2
          SDL_JOY_0_INDEX=0
          SDL_JOY_1_INDEX=1
          JOY_SPEED_ADJUST=10
          JOY_SPEED_ADJUST=10 <=This line is written twice by sdl/input.c :P
          TRUE_ANALOG_JOYSTICK=0
          

          These are Dualshock 3 button numbers. Single controller connected.

          future.childF 1 Reply Last reply Reply Quote 0
          • future.childF
            future.child @JLsoft
            last edited by

            @jlsoft so you changed:
            strcmp(option, "SDL_JOY_0_SECOND_AXIS" into strcmp(option, "SDL_JOY_0_SECOND_AXIS_INDEX" and
            fp, "SDL_JOY_0_SECOND_AXIS=%d\n"... into fp, "SDL_JOY_0_SECOND_AXIS_INDEX=%d\n"...?

            I will update the source and binary, later today, and also fix the JOY_SPEED_ADJUST being written twice.

            JLsoftJ 1 Reply Last reply Reply Quote 0
            • JLsoftJ
              JLsoft @future.child
              last edited by

              @future-child
              HEH.

              Ugh...

              (I was about to reply to explain how during my fix attempts, adding _INDEX or adding other stuff onto the end didn't have any effect, and only until I actually changed part of the 'SDL_JOY_0_SECOND_AXIS' part would it work...)*

              Okay, so I decided to start from scratch to make sure it was acting the way I was describing...went and changed the source to test, and realized I needed to also change the atari5200.py that auto-maps the RetroArch controls to the atari800.cfg...then noticed line 96:

              elif line.startswith("SDL_JOY_0_SECOND_AXIS"):

              'startswith'...so SDL_JOY_0_SECOND_AXIS_ENABLED was also getting set to 2 right before the executable ran...and it's looking for 1 or T(rue).

              It is really sad how long I spent messing with this last night and looking at the wrong thing :D


              So yeah, it's only your copy of the atari5200.py script that needs altered, since currently it'll match SDL_JOY_0_SECOND_AXIS_ENABLED= and make it's value the same as SDL_JOY_0_SECOND_AXIS=.

              future.childF 1 Reply Last reply Reply Quote 0
              • future.childF
                future.child @JLsoft
                last edited by

                @jlsoft Ok, now it makes sense to me.
                As i do not use the python script myself, i did not notice anything wrong.
                I specify a config file in the emulators.cfg file so i can have different configurations per system/rom where this python script afaik only uses/home/pi/.atari800.cfg.

                I will make changes to the python script and fix the JOY_SPEED_ADJUST being written twice.

                I think changing elif line.startswith("SDL_JOY_0_SECOND_AXIS") at line 96 to
                elif line.startswith("SDL_JOY_0_SECOND_AXIS=") (notice the = sign) should be enough to fix it.

                Used2BeRXU 1 Reply Last reply Reply Quote 0
                • Used2BeRXU
                  Used2BeRX @future.child
                  last edited by

                  @future-child Hey bud.

                  I still haven't had a chance to check out that new emulator on the two or three games that weren't working right with the other one.

                  I was wondering though if you'd had an opportunity to look into the other issue with this emulator with the two bugs? I believe at some point you had said you belived that it was due to a difference between the Atari 5200 controller and the Atari 800 keypad, but then you didn't mention anything about it afterward.

                  I'd like to spend some time getting back to this and wrapping everything up so I could give you the alternate configs for every game that makes the control functions as uniform as possible between all of the games.

                  1 Reply Last reply Reply Quote 0
                  • future.childF
                    future.child
                    last edited by

                    @Used2BeRX
                    I did spend some time getting the inputs right but so far without success.
                    To get it right the sdl input should have to be rewritten to use a event driven model instead of a polling model.
                    The polling it now uses has timing issues causing the misfiring experienced in roms like choplifter.

                    The input crosstalk is another thing requiring a lot of work.
                    The original 5200 used multiplexers to select which joystick port places keypad (row/column) data on the bus, as far as i can tell the core does not have this implemented so all incoming data appears to come from all joystickports.

                    Used2BeRXU 1 Reply Last reply Reply Quote 0
                    • rkosterR
                      rkoster
                      last edited by

                      Hey @future-child , a quick question related to the 800/XL/XE computers rather than the 5200, if I may... in several games, such as Archon or Bruce Lee, hitting the joy0 button 0 seems to pause the game as well as firing. I found reference online to hitting F7 to toggle "keyboard mode" but that didn't seem to work. I have both keyboard joysticks disabled. Normal pause is supposedly CTRL-1, and I don't understand why J0B0 would be triggering that. Since you've been in the code, any chance you could take a peek at this?

                      Github/helper scripts * Creativision/Arcadia/Astrocade guide * Amiga guide * Atari 8bit guide

                      rkosterR 1 Reply Last reply Reply Quote 0
                      • rkosterR
                        rkoster @rkoster
                        last edited by

                        Aha, figured it out. If you map the 5200 keypad to button 0, that will be pause on the Atari 800 for some reason. I moved it to J0B1 and now I can fire without pausing.

                        Github/helper scripts * Creativision/Arcadia/Astrocade guide * Amiga guide * Atari 8bit guide

                        G 1 Reply Last reply Reply Quote 0
                        • hansolo77H
                          hansolo77
                          last edited by

                          I'm eager to get Atari 5200 and Atari 800 working better on my system. Is this very hard to setup? The current method (using the one available in the Docs) really kinda sucks.

                          Who's Scruffy Looking?

                          1 Reply Last reply Reply Quote 0
                          • future.childF
                            future.child
                            last edited by

                            @rkoster Good to head it's working.

                            @hansolo77 once you have the original emulator setup all you have to do is replace the binary in a ssh shell:

                            cd /opt/retropie/emulators/atari800/bin/
                            sudo cp atari800 atari800.original
                            sudo wget https://github.com/futurechild/atari800-rpi/blob/master/atari800?raw=true -O atari800
                            sudo chmod +x atari800
                            

                            and adjust the configuration files to suit your needs:

                            I myself use the following emulators.cfg

                            atari800

                            atari800 = "/opt/retropie/emulators/atari800/bin/atari800 -config /opt/retropie/configs/atari800/atari800.cfg %ROM%"
                            default = "atari800" 
                            

                            atari5200

                            atari5200="echo %ROM: -\ % > /dev/null;/opt/retropie/emulators/atari800/bin/atari800 -config /opt/retropie/configs/atari5200/atari5200.cfg -cart %ROM%" 
                            default = "atari5200"
                            atari800 = "/opt/retropie/emulators/atari800/bin/atari800 %ROM%"
                            

                            and have the following config files:

                            atari800.cfg

                            Atari 800 Emulator, Version 3.1.0
                            ROM_OS_A_PAL=/home/pi/RetroPie/BIOS/ATARIOSA.ROM
                            ROM_OS_BB01R2=/home/pi/RetroPie/BIOS/ATARIXL.ROM
                            ROM_5200=/home/pi/RetroPie/BIOS/5200.ROM
                            ROM_BASIC_C=/home/pi/RetroPie/BIOS/ATARIBAS.ROM
                            ROM_400/800_CUSTOM=/home/pi/RetroPie/BIOS/ATARIOSB.ROM
                            OS_400/800_VERSION=AUTO
                            OS_XL/XE_VERSION=AUTO
                            OS_5200_VERSION=AUTO
                            BASIC_VERSION=AUTO
                            XEGS_GAME_VERSION=AUTO
                            ATARI_FILES_DIR=/home/pi/RetroPie/BIOS
                            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=1
                            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
                            CARTRIDGE_TYPE=0
                            CARTRIDGE_PIGGYBACK_TYPE=0
                            CARTRIDGE_AUTOREBOOT=1
                            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_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=276
                            SDL_JOY_0_RIGHT=275
                            SDL_JOY_0_UP=273
                            SDL_JOY_0_DOWN=274
                            SDL_JOY_0_TRIGGER=306
                            SDL_JOY_USE_HAT=1
                            SDL_JOY_0_SELECT=8
                            SDL_JOY_0_START=9
                            SDL_JOY_0_TRIGGER1=1
                            SDL_JOY_0_TRIGGER2=2
                            SDL_JOY_0_ASTERISK=0
                            SDL_JOY_0_HASH=4
                            SDL_JOY_0_OPTION=5
                            SDL_JOY_0_SECOND_AXIS=2
                            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
                            

                            atari5200.cfg has the following different settings:

                            MACHINE_TYPE=Atari 5200
                            RAM_SIZE=16
                            BUILTIN_BASIC=0
                            

                            You may want to read this thread trough as there are some interesting posts regarding configuration options and known bugs.

                            If you run into problems, this forum is a good place to ask for help.

                            1 Reply Last reply Reply Quote 1
                            • Used2BeRXU
                              Used2BeRX @future.child
                              last edited by

                              @future-child How does the new emulator you ported over handle these issues?

                              It's been a while now, but I believe that the list of games the two bugs effected was rather small overall. Since I already have all of the controls mapped out on the spreadsheet, I'd just have to figure out how to get them working on the new emulator for the buggy games.

                              future.childF 1 Reply Last reply Reply Quote 0
                              • future.childF
                                future.child @Used2BeRX
                                last edited by

                                @used2berx as far as i have tested all controls work as intended in kat5200, even analog.

                                I think the work you've done with configs is great and could also be used as a template to create controller mappings for other emulators as well, or at least as a lookup table to link roms to desired controller configurations.

                                Used2BeRXU 1 Reply Last reply Reply Quote 1
                                • G
                                  GreyRhino @rkoster
                                  last edited by

                                  @rkoster , I'm having a similar issue where several of my buttons pause the game in Bruce Lee. I'm using a PS3 controller and the 4 primary action buttons pause the game (but still work as mapped to *, # and punch/kick). I have the option / select working, just cant figure out where you remap the 5200 keypad to something other than button 0. Can you provide some details on that? I've read through the thread and poked around in a few files but am missing something. Your help would be appreciated.

                                  rkosterR 1 Reply Last reply Reply Quote 0
                                  • rkosterR
                                    rkoster @GreyRhino
                                    last edited by

                                    @greyrhino My Pi setup is currently disconnected but soon as I reconnect it I will post my config file here.

                                    Github/helper scripts * Creativision/Arcadia/Astrocade guide * Amiga guide * Atari 8bit guide

                                    1 Reply Last reply Reply Quote 0
                                    • Used2BeRXU
                                      Used2BeRX @future.child
                                      last edited by

                                      @future-child Cool man. I haven't forgotten about this. I just got pulled way in another direction and then some real life stuff came up the last 3 or so weeks. I should be able to get back to this and give you more feedback soon. :)

                                      1 Reply Last reply Reply Quote 0
                                      • Z
                                        zerojay
                                        last edited by

                                        I created a script to install @future.child's version of atari800 and put it into my repo tonight: https://github.com/zerojay/RetroPie-Extra/blob/master/scriptmodules/emulators/atari800.sh

                                        I'm not using the automatic controller updating script (atari5200.py) because for some reason, I get very strange permissions errors when I use the script to try copying it to the right place and for some reason runcommand can't see the script either.

                                        Used2BeRXU darkniorD 2 Replies Last reply Reply Quote 0
                                        • Used2BeRXU
                                          Used2BeRX @zerojay
                                          last edited by

                                          @zerojay Not sure what you mean man. What did you do?

                                          I don't know anything about how repos work.

                                          darkniorD 1 Reply Last reply Reply Quote 0
                                          • darkniorD
                                            darknior @Used2BeRX
                                            last edited by

                                            @used2berx All is explain here : https://github.com/zerojay/RetroPie-Extra

                                            Execute :

                                            git clone https://github.com/zerojay/RetroPie-Extra.git
                                            cd RetroPie-Extra/
                                            ./install-extras.sh

                                            And you will have new stuff on you EXPERIMENTAL Retropi-Setup ;)

                                            Life is game, just play it !

                                            Used2BeRXU 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            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.