Atari 5200: New version of Atari800 (Beta): two triggers (Moon Patrol!!!), hat start and exit buttons
-
@Used2BeRX I must have missed the 2nd player part .
I'll have a look at the code @jfroco made, to see if i get it working for me (and let you know what i did to do so). -
@future.child Thanks for looking into that. I'm a code dummy so I never would have figured it out. Not sure if you'd be interested, but I posted that guide to putting headers on your 5200 roms so they load automatically. Worth doing if you play the system more than once or twice.
-
As far as i can tell something is indeed wrong in joystick handing or enumeration.
When having two controllers connected, the first controller's second axis also controlls player two.
When having only one controller connected the second axis data is discarded.I'll see if i can fix this (note, I'm no code hero).
-
Sounds good. Keeping my fingers crossed. Maybe we can figure out why I couldn't get your update running as well. I had to revert to the OP's update. When I tried loading a game with your version it would just kick me back to the romlist. I wasn't going to do Atari 800 on the Pi, but I've spent today making headers for about 150 Atari 800 images so they auto-load like the 5200 carts. Would probably be wise for me to get your upgrade installed too. :)
-
@Used2BeRX I have updated my version to prevent discarding of 2nd axis data when not having two joysticks.
As far as i can tell 2nd axis now works as intended.as for not being able to run my binary, i can't really say what's going on on your system without additional info.
The binaries should be interchangeable between jfroco's and mine (compiled on a raspberry pi 3).Did you install using the following procedure ?
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
I myself use the following emulators.cfg
atari800
atari800 = "/opt/retropie/emulators/atari800/bin/atari800 %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 XL/XE RAM_SIZE=64 BUILTIN_BASIC=0
-
Hey bud,
First off, this time I was able to get your version to work. I don't know what I was doing wrong before. AWESOME to see you got the Robotron controls to work for that game and for Space Dungeon. Perfect.
I had a few questions though. I did not use your configuration, so I'm having the screen size issue that you guys figured out. The reason that I'm not using it is because I'm using the python script the OP had created and pointed to instead of the standard configuration file. Here's what my emulators.cfg file looks like:
atari800="/opt/retropie/emulators/atari800/bin/atari5200.py; /opt/retropie/emulators/atari800/bin/atari800 %ROM%"
default="atari800"I'm not sure what is in that python script that your config doesn't have, but I figured you were using it since you built off of his setup. I'm going to see if I can add the screensize fix and your additional controller button for the Atari800 in the python script.
One thing I noticed is that when playing Ballblazer now, as I expected it would, you control both players now with the 1st player controller.
I was wondering if you could code this so it only steals the 2nd player control when loading Ballblazer or Space Dungeon, and also if you would be able to properly code the 2nd player controller so we have 2 player support. This is almost a perfect setup now.
Thanks so much for going back in there and fixing the Robotron controls. This is awesome. :)
-
Here's the text in the python script that I'm referencing (/opt/retropie/emulators/atari800/bin/atari5200.py):
https://pastebin.com/embed_js/hTQiFkxx
I still can't figure out how to post the black boxes, but you can click on the link to see the python script. At least it's not taking up 10 pages on this thread now. :)
-
I don't know why the code isn't showing up in the black boxes now.
https://retropie.org.uk/forum/topic/3/read-this-first
Format your posts! - put small logs in code blocks - see http://commonmark.org/help/ - and put large logs on a pastebin type site like http://paste.ubuntu.com/ http://pastebin.com/ or similar.
-
That's great. I'll try it out. I'm wondering why yesterday code was automatically put in black boxes for me and today it's not.
-
@Used2BeRX As far as i can tell the python script makes adjustements to the /home/pi/.atari800.cfg file based on what joysticks are connected and configured in /opt/retropie/configs/all/retroarch-joypads/.cfg*.
I do not use this python script myself, neither do i use the global configuration file.
This is because i use different emulator settings per system/romlist.As for the 2 player suport, a newer version is on it's way, this is just a temporary (ugly) quick fix, i'm trying to figure out a more elegant way to do it (and have it auto disable when second controller is actually being used).
Just to be sure there is no misunderstanding, with "properly code the 2nd player controller so we have 2 player support" , did you mean the first player now interferes with second player or 2 player does not work at all ?
-
@future.child I actually don't have a 2nd controller yet, so I can't tell you if this code is interfering with the 2nd controller. I just noticed that when loading the 2 player only game Ballblazer that the left joystick controls the 1st player movement and the right joystick controls the 2nd player. I assumed that this would happen so it didn't surprise me.
I'm really looking forward to your update. I'll have to get a 2nd USB controller to try it out when you get to that point.
I'm going to try your setup without the python script. I'll let you know if I notice anything not working with it that was working before.
BTW..... There are 2 games for the 5200 right now that you can't play without the keyboard attached. They are Beamrider and Congo Bongo. Both of these games require you to enter number of players (1-2) and Beamrider I believe asks also for skill level (1-4). Might be a good idea to map at least the 1+2 keys if possible. :)
- This forum is no longer auto answering with @ either now. I don't know what's wrong. I'll have to reboot and see if that fixes these issues.
-
@Used2BeRX I'll see if i can add digits 1-3 as well (Beamrider has 1-3 skill levels).
auto answering works fine for me, you may want to clear your cache if reboot did not work.
-
@future-child Sounds great man.
I'm using your config now and I noticed that you don't have any of the "VIDEOMODE" lines in it. I still have the super small screen that's not stretched to full screen. Even when I add the VIDEOMODE lines in that should fix it, that doesn't sort the problem.FYI for ya... While messing around all of the sudden Joust worked for me when I was getting a black screen before. I just figured out it was because I changed the config file to NTSC mode instead of PAL mode. Nice! One of the best games on the system wasn't working for me before but works now.
EDIT: Well..... no matter what I did to edit the configuration file manually, I could not get full screen. I decided to try it through the emulator itself by pressing Select+X. Going into Display Settings and then Video Mode Settings I turned "Fullscreen" to Yes and "Fullscreen Resolution" to 320x240 and now I have full screen again!
Everything is looking good so far. I'm going to have to retest all the games now. I might wait until you update the 2nd player code first though so I don't have to re-test everything again.
-
I'm wondering why yesterday code was automatically put in black boxes for me and today it's not.
It could be that a moderator formatted it. There's nothing that detects code automatically though.
-
@mediamogul strange..... When I'm typing here there is a "Compose" window on the left and a "preview" window on the right. When I was putting code in here in the left window, the right window showed up different in black.....
Maybe I had copied and pasted somebody elses formatted code, now that I think about it. Thanks. I'll look into how to do it myself.
-
Maybe I had copied and pasted somebody elses formatted code
That would do it.
Thanks. I'll look into how to do it myself.
Dankeschön!
-
@Used2BeRX
As requested i have made an updated version with the following modifications:- When player 2 presses the joystick trigger it automatically disables player1's joystick 2nd axis as input for player 2 until restart of the emulator.
- Joystick buttons can be mapped to Numeric buttons 1, 2 and 3 (for i.e. Beamrider, Congo Bongo) .
New config parameters:
SDL_JOY_0_SECOND_AXIS_ENABLED=1 SDL_JOY_0_DIGIT_1=0 SDL_JOY_0_DIGIT_2=6 SDL_JOY_0_DIGIT_3=7
As far as i can tell it all works as intended (or at least nothing major is broken).
Comments or suggestions are welcome. -
@future.child So, just being clear here, all I need to do to for all of this is to add those 4 lines of code into my atari500.cfg? That's amazing.
The 2nd player controller still isn't configured though, right?
Also, you say that the numeric buttons "can be" mapped. They aren't with this addition? How do I map them after adding this code? Thanks!
-
@Used2BeRX All you need to do is replace the binary and add the 4 lines to your config file.
to install the binary :
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
2nd player should all work as intended, if there is no player 2 you can use the 2nd axis on the first controller.
If there is a second player he/she can disable the 2nd axis input by pressing the trigger1 button. -
@future.child Okay... well here's my results.
1 player - The right joystick is not responsive to the player's inputs. It is "working" somewhat though because you constantly fire diagonally to the NW.
2 player - I plugged in the 2nd player controller and the controls are split and everything seems to work right on the games that you can actually start up 2 players. Read below for specifics on games.
Robotron 2084 - It's possible to play 2 players, but the controls don't shift to the 2nd player. Both players move with 1 joystick and shoot with 2nd joystick. The original game was likely programmed that way. You don't use #2 to select 2 players in this game. It is an option you can scroll through with the # pound sign.
Beamrider - Left trigger selects 1 player/level. Right trigger selects 3 player/level. No way to select 2 player/level. You can't select 4 players either, but I can't ever imagine a situation in my life where I'm actually going to have 3 other people who want to sit down and play Beamrider with me. :)
Ballblazer - This seems to work perfectly now. I can control movement and ball shot with both players. (you don't press 2 for 2nd player on this game. It is part of the options that you can scroll through before beginning a match when you choose either "human" or a different level of "droid" for either player.
Congo Bongo - Can't select 2 players. 1 player works fine. From what I can tell Left Trigger = 1, Right Trigger = 3. I can't figure out what 2 is mapped to.
Space Dungeon - Right Trigger is definitely 3 in Space Dungeon because it brings up "Demo Mode". Can't figure out how to start 2 players in Space Dungeon though. Left Trigger does nothing. Title screen says "1" for 1 player version, "2" for two players and "3" for demonstration, but above that it says "Press start for 1 player game" so start button selects 1 player.
Maybe something is wrong with my controls in the atari5200.cfg? Could you post your controls scheme part for me to compare mine too? In the meantime, maybe you could try these games on your own and see if you're having any of the same issues.
We're almost there! :)
EDIT: Assuming nothing else changed in your configuration file for the joysticks, I did notice that both the "SDL_JOY_0_DIGIT_1" and the "SDL_JOY_0_ASTERISK" are now both mapped to "0" Maybe there is a conflict there?
I'm kind of baffled about this though. I've tested my controller and I know that LT is "6" for my controller. and SQUARE is "0" for my controller. I would have thought that "2" would work on the LT, 3 on the RT and the conflict would be "1" and "ASTERISK" both sharing the SQUARE button......
EDIT2: I made it so SDL=JOY_0_DIGIT_1=12, which is the "Home Button" on my joystick Now what happens is the LT and Home are for 1 player, and RT is still for the number 3. I think possibly you coded in the number 1 twice and didn't code in the number 2?
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.