AtariXLBox Atari 800/5200/130/320/XL/XE Emulator port for XBox v7

First off...

what's new:

**** Atari core related changes ****

- Fixed new pokey sound issues.  Using a modified new_pokey engine by foft, author of the GP2x port of atari800.

- Core updated to ver 2.03 with the exception of the pokey engine.

- New NTSC palette code using some routines created by Kr0tki.

- Autoconfiguration for select games.  If you do not have a game configured and the emu finds a matching crc in the configs\game directory it will ask you if you wanna use it.

- 5200 Overlay support!! Now you can bring up the corresponding overlay for whatever 5200 title you are playing. Just use the same button used to bring up the onscreen keyboard (currently left trig+x for 5200). Use left analog or digital pad to select a keypad button. Right analog moves the overlay around. Black makes more transparent, white less transparent. The overlay location is saved for each title.

- Support for the 5200 analog stick.  It is only read when in 5200 mode.  

- Dual Analog support!  Yeah Dual Robotron and Space Dungeon baby!! Just check out the configuration screen and enable dual analog.

- Trackball support! Use for games like Missile Command and Centipede. Plus a trackball/analog stick sensitivity mode to make certain games more playable. 100 is the default. 70-80 is a decent setting for titles like Missle Command and Super Breakout.

- Replaced generic keyboard with 130xe look alike (only used within game).  Keyboard can be moved with right analog stick. Keyboards location and transparency are saved in each games configuration.

- Extra functionality for the virtual keyboard. Cursor can be moved with the analog stick.  X button toggles shift key. Y toggles ctrl key. Start presses enter and back backspaces. White/Black change the keyboard transparency.

- Lightgun support.  Barnyard Blaster, Bug Hunt, Crossbow, and Special Forces play pretty well.

- New default "Miner 2049'er skin" you can change it to the "old_atarixlbox" if it rakes on your nerves.

- Ability to pick a file from within a zip file. That way multi-disk games can be zipped now. Code stolen from the ViceX emulator.  Keep in mind that if you play any game that "saves" to a floppy, that disk has to be a seperate UNZIPPED file.

- New option in the "Game Options" menu to display what files are "loaded" in drives 1 thru 4.  Plus I added a rotate disks option. Press the A button when viewing the loaded disks.

- Added rotate_disks option to the controller setup.

- Option in configuration menu to allow swapping of joystick in port 1 and 2.  I think like a total of two 8-bit and 1 5200 game use this.

- Rewind and slow down functionality.  This was already in the last release by x-port but I just wanted to re-iterate.  :P  

- Ability to turn on/off player/missile/playfield collisions (for cheating).  Try it on games like Pacman or Jumpman.  The collision setting is not saved, but the sprite collision detection settings are saved on exit.  So all it takes is a simple hop into the options menu to re-activate it.

- Added in to configuration menu "do not allow activating attract mode". Really only useful in demo's.  This and above idea borrowed from AwinPlus.

- Paddles 0 & 1 are now mapped to sticks 1 &2, or 3&4 depending on what port you have the mouse set too.

- Added built in disk menu for using with megaimages. When you turn this option on the emulator will read the disk and display all games on it for your selection. It's under the "computer specific options" and it's called "Use built in disk menu". Thanks to HiassofT for letting me use Picodos as the built in disk menu.

- Add in the ability to play SAP music. I used the ASAP code made by Piotr Fusik. Playback speed (for SAP files) can be set to either NTSC or PAL. For those not in the know SAP is like the Atari equivalent of the SID collection for the C64. Check it out at "". The player can also play the following formats, CMC (Chaos Music Composer), CMR (CMC Rzog), DMC (DoublePlay CMC), MPT (Music ProTracker), MPD (MPT DoublePlay), RMT (Raster Music Tracker), TMC, TM8 (Theta Music Composer 1.x), TM2 (Theta Music Composer 2.x).

- modified the cheat code system to read/write values the way an Atari would. That way you can check, for example, the player/missile collision registers to see if a collision happened. Or you could (in theory) disable certain sound channels, etc.

- Added ability to add in cheat codes from a Gameshark compatible database (see description below). This includes the ability to export the cheat codes in a game to "share" with your friends. Cheat/rumble codes are included for most 5200 games. When "adding" codes from the gameshark DB it will move you to the entries with a matching CRC. If not you'll have to manually find the game (sorry, only one CRC per game).

- Fixed artifact mode selection option, it can now be used for games like (drol, lode runner, etc).

- Fixed screenshot saves.  The colors are now correct.

- Corrected screen not displaying properly when no filter is selected.  (look at the ladders in games like donkey kong and jumpman).  Filters still place garbage on the right and bottom of the screen though.  Thanks to x-port for advice.

- Record/playback now work correctly.   Thanks to x-port for advice.  It now also records all keyboard presses and 5200 analog movement as well as Paddles 0 & 1.

- Added a record analog (yes/no) option so you can double the record time for those 5200 games that do not really need the analog stick (galaxian, pitfall, etc).  Analog stick will be disabled.

- Changed so player/missile detection still occurs when fast forwarding.

- "autodetect" for media type. In most cases you can exit the options screen and be good to go (see tips on getting a game to run).  Unfortunately cart types have to be selected, but I did make it easier (see "oddball cart types" below).

- Turned on code for upload/downloading configurations to website. 

- Thanks to Brian Berlin (aka eegt97) 5200 Star Trek and Pitfall can be started now. Brian did the pc 5200 emu kat5200.  Be sure to check it out!

- 5200 games like Missile Command, Centipede, Pole Position, Pengo, and Xari Arena are playable. Super Breakout is a little more playable. 

- Thanks to Kr0tki Bounty Bob is now playable.  There are only two working versions of Bounty Bob that I know of.  The correct 5200 dump and the cassette version released in the UK.  I highly suggest the 5200 version, UK version is a little slower.  Set the UK version to PAL for it to work properly.

- Netplay should now work properly and it passes keypresses as well.  No analog yet though.

**** Interface related changes ****

Upload configuration has been removed from the configuration screen and moved to the options screen where it makes more sense to use it.
Upload configuration adds file CRC and media type to the name.  Download configuration displays current file CRC for user comparison.

Modified the button definitions to include "5200 specific" options (no more crazy mapping!), as well as removing unneeded stuff like "F1-F10".  Things less likely to be used (like mouse buttons) I pushed towards the end of the list.

Changed the "Game Configuration" menu so it only displays options specific to the machine type selected.  This includes the Video type "NTSC/PAL" option since there is no such thing as a PAL 5200.

Autoselect media automatically brings up the cartridge select screen if the media type is a cartridge.

The cart select screen now only displays applicable cart entries. Those that are the same size as the file in question as well as filtering out computer/5200 depending on what system is currently selected.  Unusual cart types are not displayed by default (see "oddball cart types" below).

Some menu changes.  Specifically..
  Split the computer specific options to a second screen. If you set the computer type to something other than Atari 5200 a menu option will appear allowing you to set them. All shared options are left on the main config screen.
  If the computer type is set to Atari 5200 it will automatically (on exit) set the media type to cartridge and if the cart type is not 5200 specific it will bring up the cart select screen.

removed atari_ostype.  If anyone can think of a reason to keep it, let me know.
removed pokey_type.  We default to pokey_new.  Is there any reason not to?
removed "Enable 0xC000 RAM in Atari 800."
removed "RTime Emulation" the emulator by default gets the current date/time anyways.

Basic Cartridge is set to on when autodetect detects a basic program.

Menu option in "computer configuration" called "Lock in Autoselect Media Type".  The "lock in" feature is there to let the user to change the media type if for some odd reason they want to, but prevent the user from accidently changing it.  Autoselect should get it right 99% of the time, but JIC.

Changed the default cntrlr preset to "Atari Joystick". It auto changes to when the user changes the machine type.

Added custom presets for the controllers.  These are in the "Game Configuration" and "Game Options" menu. Controller settings can be saved under these defaults if you do not like the way I set them.  ;)   Only Emulator Definitions and Joypad Mappings are saved.  There are three kinds.

Atari 5200 for 5200 games.
Atari Joystick for most stick based games.  Common keys like space, enter, and esc are mapped to buttons.
Atari Keyboard for games like Ultima IV.  Same as Joystick except the keypad is mapped to the arrow keys.

Controller preset filenames are "Atari 5200 Stick.ini", "Atari Joystick.ini", and "Atari Keyboard.ini" and are stored in the default saves directory.  The emu copies these from your emu directory into the default saves directory so make sure they are in there.  If not you can manually copy them over or just define them yourself!!  

For Atari Joystick.  Xbox d-pad is mapped to the joystick. A = "button 1". B = "stick up" (for games that require pressing up to jump). Start= "Start". Back = "Select". Black = "Option". White = "Esc". X = "space". Y = "enter". Right stick up=1, left=2, right=3, and down=4.  Left trig+Right stick up=5, left=6, right=7, down=8.  Left trigger+X=0 and Left trigger+Y=9.  Start+Back=Cold_Start(reboot).

Atari Keyboard is the same as Atari Joystick except the stick is mapped to the keyboard arrow keys.  (for you Ultima fans).

Atari 5200 Stick.  Use the left analog stick or the Xbox d-pad for the joystick. A= " button 1". B= "button 2". Start= "Start". Back= "*". Black=  "#".  White= "Pause". Numpad is assigned the same as Atari Joystick except 0 is assigned to X and 9 is assigned to Y (no left trigger).  Start+Back=Cold_Start(reboot).  White+Black=Reset button.

Changed cartridge descriptions so the proper choice is a little more obvious.

Fixed a few interface "quirks" regarding playing game sounds while emu is paused.

Modified the select save state screen so it tells you whether your "loading" or "saving", can be a bit confusing when hot keying to that screen.  Also now displays whether a save file has a record session (R) associated with it.

When a new save state is created it deletes any recordings and if you press the "back" button while in the save state select screen it will allow you to delete that save state (as well as it's recording).

Utilities menu display modifed to state "stop or start recording/playback" depending on whether they are turned on or off.  It also displays total minutes remaining or played so far.

Record/Playback turn off when exiting a game.  Boy that sure caused some confusion.  :lol:

Switched positioning control of sprites in the skin menu to the left analog stick, that way you don't have to worry about unintentionally lowering the volume.

Savestate load screen is a little more informational when sent to it from the save/record option. 

When you save a picture it removes the screenshot save path making it easier to see long names.

Changed order of some of the entries in the "Music Control Menu". Added options to skip to next/prev song within a SAP/tracker file. Pressing "start" while in the game select menu will play any SAP files in the "sap" directory with a matching filename.

Added an option to show (view) song name when the mp3 player changes songs. It also shows the song number within a SAP file for multisong SAP's.

Playlist repeat mode, and View Name setting is saved in INI file.

When "adding a code" from the "edit code" screen the current code is copied as a template. You can activate/deactivate a code from the "cheat code list" menu by pressing start.

Deleting a code now asks you if you are sure (I got tired of accidently deleting my codes :lol: ).

Changed the cart select screen so it does not show the "oddball" cartridge configurations. This can be toggled by selecting the "Show Odd Cart Types" line. This is my solution to the one thing that bothered me about automediadetect, and that is the rather large cartridge type list with mostly useless entries.

**** Internal changes (the boring stuff) ****

Disk mounts from savestates are now automated. The only exception is Samba/Relax drives. I have not decided (if even possible) what to do about them. Old savestates, most likely, are incompatible. Although it is smart enough to ask you for them if it can't find 'em.

If you set the mouse type to anything other than "none", load a game, and then load a game where the mouse type is "none" it doesn't reset. So for example 5200 games will lose their analog control. Fixed.. 

Fixed up the problem created from using multiple files in a .zip. This error also occured when "changing disks". Removed all the configure game code that does not need to execute when changing disks and changed it so the emulator keeps all of the save/config/key stuff underneath the originating (read boot) disks name. Keep in mind that if you play any game that "saves" to a floppy, that disk has to be a seperate UNZIPPED file.

Seems the capslock key was not mapped properly.  Fixed it, now we can type in lower case!  Keep in mind on the Atari caps works in reverse.  Pressing capslock will put you in lower case, unlocking capslock puts you back in upper case.  8:

Apparently the emu does not "unload" a cartridge, disks, executable, or cassette when switching games thus creating weird behavior. (like atari basic being unusable).  Fixed that.

Fixed problem when a filename inside a zip contains too many characters. While I was at it I fixed the space as the last character when trimming to 42 characters behavior.  Zip files where the path was saved now unzip correctly.

Artifact mode didn't turn off when using it and switching games.. fixed

Rewind and Fastforward are de-activated during record/playback and netplay mode.  It even tells you so when you try!!  Keyboard is de-activated during playback.

Rewind is deactivated when in 130Xe or higher mode (crashes).

Modified YesNoMenu so it doesn't clear m_menuText.

Put in some code that hopefully will prevent any conflicts when cold_restart is mapped to a combo where one of the buttons is mapped to something else (like START for example).