home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1997 July / PCO_07_97.ISO / filesbbs / DOS / ATARI15.ARJ / ATARI.TXT < prev    next >
Encoding:
Text File  |  1997-01-04  |  19.7 KB  |  491 lines

  1. PC Atari Emulator 1.5
  2.  
  3. Author: John Dullea (jxd230@psu.edu)
  4.  
  5. Contents
  6.  
  7.   0. What's new?
  8.   1. What is it?
  9.   2. System requirements
  10.   3. Features
  11.   4. Bugs/future additions
  12.   5. Program instructions
  13.   6. Disclaimer
  14.   7. And finally...
  15.   8. Acknowledgements
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22. 0. What's new?
  23.  
  24. Version 1.5
  25.  
  26. . First off, you'll note that there are two executables: ATARI.EXE and
  27.   ATARI160.EXE.  Both have been improved in speed, but ATARI160 is an even
  28.   faster version.  It places your VGA card into a non-standard 160x200 VGA
  29.   mode that allows the emulator to run faster, since it has to do less
  30.   work to display to the screen.  The speedup should be especially noticeable
  31.   with slower VGA cards or I/O buses.
  32.  
  33. . The 99-second clock bug in Ice Hockey is fixed.  The ADC and SBC
  34.   instructions weren't setting the N (negative) flag bit when in BCD mode.
  35.  
  36. . I've gone over all the sound initialization routines carefully after lots
  37.   of mail concerning problems with the sound in 1.4a and have made some
  38.   changes.  I've tested it pretty thoroughly, and hope this should solve most
  39.   of the problems people have been having.
  40.  
  41. . DMA values 0 to 3 are now supported, instead of just the DMA 1 in 1.4a.  Be
  42.   sure that the BLASTER command line contains a "D#" entry for the DMA value.
  43.  
  44. Version 1.4a
  45.  
  46. . I've gotten this version to run under Windows 95; the problem was that
  47.   Windows does not let you lock an XMS memory block, thus requiring a
  48.   different method of moving data to and from XMS.
  49.  
  50. Version 1.4
  51.  
  52. . I've overhauled the vertical synchronization in the emulator.  It uses an
  53.   autosynchronizing technique to analyze the vertical sync location and
  54.   shift the screen up or down to get the signal to take place within a
  55.   certain scan line range.  There is still a little jitter in a couple of
  56.   games, and PAL games still give some difficulty.  However, a few more games
  57.   come up properly now, and most of the jitter is gone.  PAL games do look
  58.   better than they did as well.  Part of the problem is that many games
  59.   require more than 200 scan lines to display, so there will always be
  60.   compromises.
  61.  
  62. . The sound routines are different again; since there have been problems with
  63.   sound quality and slower speed, I've created a hybrid version of the sound
  64.   routines in versions 1.2 and 1.3.  This version uses the new routines to
  65.   pre-calculate the sounds upon startup, but stores them in XMS memory.  When
  66.   a game is running, the sounds are copied from XMS, adjusted for volume on
  67.   the fly, and played using the old routines.  Since XMS is being used, don't
  68.   expect this version to work from within a Windows 95 DOS prompt; you'll
  69.   probably have to restart in MS-DOS mode or exit Windows 95 completely by
  70.   "shutting down" and typing "MODE CO80" when the "It's safe to turn off..."
  71.   screen appears (this at least works when I use my old MS-DOS COMMAND.COM;
  72.   I don't know if it works with the one for Windows 95).  Also, since the old
  73.   routines olly support DMA 1, other DMA's probably won't work (they're
  74.   unchanged from version 1.2).  At one point I experimented with using the
  75.   FM registers to produce just the pure tones, but FM synthesis does not
  76.   support square waves and the sound didn't come out quite right.  Also, with
  77.   this version, the 'Z' menu key (for changing the buffer size) is still
  78.   supported, but it automatically truncates the buffer size so that it's
  79.   evenly divisible by 4 because my routines use doublewords for speed.  There
  80.   is also a slight delay as the sounds are recreated for the new buffer size
  81.   and stored in XMS.  You'll need enough XMS to hold all the sounds at max.
  82.   volume; for a large buffer size, this can go as high as 5,120,000 bytes. The
  83.   amount of XMS required is 512 times the buffer size; for a 4096-byte buffer
  84.   (which I find sounds very good), 2,097,152 bytes of XMS are required.
  85.  
  86. . Improved the joystick calibration routuine.  This should help with joystick
  87.   drift somewhat; the problem appears to arise if the joystick trimmers are
  88.   not centered during the calibration.  The old routines treated the left
  89.   distance the same as the right (and similarly for the up/down distance).
  90.   The new routines ask you to move the joystick to the upper left corner, then
  91.   center the joystick, and finally to move to the lower right corner.  This
  92.   allows the center to be explicitly known, allowing each of the four
  93.   directions to be treated seperately.
  94.  
  95. . Improved the playfield display of Astroblast and Tutankham.  There appears
  96.   to be at least a 64-pixel delay between the time CTRLPF is written to and
  97.   when it affects what is drawn on the screen.
  98.  
  99. Version 1.3
  100.  
  101. . I've changed the keyboard key assignments for pleyer 2 to J, K, L, and I.
  102.   Enter still serves as the fire button.  I hope this makes things easier.
  103.  
  104. . This version uses completely different cound code (and no XMS); I've been
  105.   able to get it to run in a Windows 95 DOS window, but the sound doesn't
  106.   play quite right (the games are playable, though).  I might try to auto-
  107.   detect Windows in a later version and use it's sound routines.
  108.  
  109. . Some display problems that arose in Space Invaders and Astroids are now
  110.   fixed.
  111.  
  112. . Greatly improved debugger.  Four new keys are available:
  113.   . <End> moves the address to 1FFFh
  114.   . <Ins> moves to the current Program Counter
  115.   . "D" toggles the display between 320x200 and 320x400, which also displays
  116.     the TIA and input register contents, as well as object x positions
  117.   . F1 displays a help screen
  118.  
  119. . Much better sounds, using the routines written by Ron Fries instead of my
  120.   sample file.  The quality of the sounds is adjustable to accommodate
  121.   slower PC's by letting the user adjust the sample buffer size.  Smaller
  122.   buffer sizes allow the sound routines to run quicker, but degrade quality.
  123.   The 'Z' key in the menu allows buffer sizes in the range 1000-10000 bytes
  124.   to be set.  The default buffer size is 4500 bytes; I find this to be
  125.   fairly acceptable on my P90, and the emulator seems to run just a bit
  126.   faster.  New buffer sizes are immediately saved to the configuration file.
  127.  
  128.   A note about using the buffer size: with different games you may notice
  129.   "popping" sounds at different buffer sizes.  This  arises from resetting
  130.   the digital playback to allow sounds to play continuously.  If anyone has a
  131.   method for restarting DMA playback without any popping noise, their help
  132.   would be appreciated.  One way to get rid of the popping is to make the
  133.   buffer very small, which tends to make it blend into the noise as a slight
  134.   buzz.  Although larger buffer sizes tend to space them out thus creating
  135.   purer tones, there is an upper limit on usable buffer sizes since larger
  136.   buffers result in longer delays before changes in sound are played.
  137.  
  138. . Partial Starpath Supercharger Support.  The emulator will attempt to
  139.   run single-load Supercharger games.  For this to work, all Supercharger
  140.   images must be 8448 bytes in size.  They will be displayed in the menu
  141.   in red and are autodetected when <Enter> is pressed.  Alternately, the
  142.   command-line switch BANKSP will use a Supercharger ROM.  Multi-load games
  143.   are on the agenda, but aren't yet supported.
  144.  
  145. . Video Touch Pad emulation for Star Raiders.  Either the VTP command switch
  146.   or the 'V' key in the menu will enable the keys used to emulate the right
  147.   keyboard controller only, while leaving the left joystick active.  The
  148.   Video Touch Pad has the same characteristics as the keyboard controllers.
  149.  
  150. . CBS Booster-Grip support.  When CBS games are run (i.e. Omega Race, Tunnel
  151.   Runner, and Mountain King) the joystick buttons that normally perform
  152.   select and reset will instead emulate the two buttons on the CBS Booster-
  153.   Grip joystick add-on.  This controller definitely came bundled with Omega
  154.   Race; I don't know if it came with the other two games.
  155.  
  156. . Better control flexibility.  For most games, player 1 can use the joystick
  157.   and  player 2 can opt to use the player 2 keyboard controls, if no second
  158.   joystick is available.  Indy 500 is the exception to this feature; both
  159.   players muse use either joysticks or the keyboard.
  160.  
  161. . Less vertical jitter.  I have improved the vertical synchronization quite
  162.   a bit, and most of the jitter should be gone.
  163.  
  164. Version 1.2
  165.  
  166. . It seems that the emulator doesn't work in the DOS box of Windows 95.  I
  167.   think it's because of the interrupt and DMA overrides that are being done.
  168.   For now, I guess it'll have to be run by restarting in DOS mode or by
  169.   "shutting down Windows" and typing MODE CO80 to get to a C> prompt when
  170.   the "it's safe to turn off" screen appears.  I'll try to take a look at
  171.   it's behavior under W95's DOS shell, but I seriously doubt I can do
  172.   anything about it.
  173.  
  174. . Got rid of that annoying beep whenever you exit a game or trace in the
  175.   debugger
  176.  
  177. . Some more games now work
  178.  
  179. . Improved keyboard support
  180.  
  181.   Player 1 fire .................. <Space> or keypad <Enter>
  182.   Player 1 up .................... Either up arrow key
  183.   Player 1 down .................. Either down arrow key
  184.   Player 1 left .................. Either left arrow key
  185.   Player 1 right ................. Either right arrow key
  186.  
  187.   Player 2 fire .................. normal <Enter>
  188.   Player 2 up .................... J
  189.   Player 2 down .................. M
  190.   Player 2 left .................. ,
  191.   Player 2 right ................. .
  192.  
  193. . Indy 500 controllers are emulated by using the left/right keys or joystick
  194.   movements of both players.  Indy 500 emulation is enabled/disabled by
  195.   using the I key or the INDY500 command switch.
  196.  
  197. . Improved display of several games
  198.  
  199. . Atari keyboard controllers are now supported.  The key mapping is as
  200.   follows:
  201.  
  202.   LEFT CONTROLLER      RIGHT CONTROLLER
  203.  
  204.   1 2 3                4 5 6
  205.   Q W E                R T Y
  206.   A S D                F G H
  207.   Z X C                V B N
  208.  
  209.   Keypad emulation is enabled/disabled by using the B key or the KB command
  210.   switch.
  211.  
  212. . Support for PC's without sound cards sould work properly; use the 'S' key
  213.   in the menu to disable sound.
  214.  
  215. . An upper limit on the number of frames-per-second can be set for the
  216.   emulator, or it can be run with no fps limit.  This feature is available
  217.   both as a command-line argument (FRAMExx) and from the menu (F key).
  218.  
  219. Version 1.1a
  220.  
  221. . Fixes a bug in the joystick routine that causes the entire emulator to slow
  222.   down if only one joystick is plugged in.
  223.  
  224. Version 1.1
  225.  
  226. . SOUND!  I've stripped out everything related to the Activision sound files
  227.   and started fresh (uncovering quite a few bugs in the sound code, as well).
  228.   There is now some basic sound support, but the polyphonic sounds are fairly
  229.   rough and untested (I'd appreciate any comments!).  I think that I've
  230.   matched the pitch fairly well.  Also, I recorded the tank firing sound from
  231.   Combat, scaled it so that the volume stays constant, and used it to generate
  232.   my own sample file for noise sounds.  It's not perfect, but it is fairly
  233.   close (and better than silence!)
  234.  
  235.   NOTE: You must have the "BLASTER" environment variable correctly defined for
  236.   sound to work.
  237.  
  238.   Also, Just as I was about to release this version, Dan Boris (the author of
  239.   Virtual VCS) has graciously sent me an amazing set of routines written by
  240.   Ron Fries called the TIA Sound Emulation Library.  I am currently attempting
  241.   to get them to work with my emulator instead of my crude samples.
  242.  
  243. . The emulator should run a little bit faster.  To quote Michael Abrash,
  244.   TANSTATFC ("There ain't no such thing as the fastest code.")
  245.  
  246. . The program now shouldn't immediately exit if game files have the read-only
  247.   attribute set, but should be able to use them.
  248.  
  249. . If you enter a path as the first argument (e.g. "ATARI C:\GAMES") the menu
  250.   will display, using that directory instead of the current one.
  251.  
  252. . By request, I went over the screen palette again and tried to make it a
  253.   bit more accurate; I hope this looks better!
  254.  
  255. . Support for both PC joysticks
  256.  
  257. . Bowling and Codebreaker now work
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264. 1. What is it?
  265.  
  266. The PC Atari Emulator is a DOS program that emulates the famous Atari 2600
  267. on the Intel 80486+ platform. It is mainly written in assembly language, with
  268. Borland Pascal 7.0 suppliying higher functions (such as an integrated
  269. debugger and disassembler).
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276. 2. System requirements
  277.  
  278. OS:    MS-DOS
  279. CPU:   Intel 80486 or greater, for the BSWAP instruction (though a Pentium is
  280.        highly recommended for performance purposes)
  281. RAM:   640K
  282. Other: Mouse required for paddle emulation
  283.        A 4-button joystick is strongly recommended, ESPECIALLY a Gravis
  284.        GamePad
  285. Sound: A SoundBlaster or compatible is required for sound support
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292. 3. Features
  293.  
  294. . Very fast emulation due to the assembly implementation
  295.  
  296. . Full collision checking
  297.  
  298. . Left paddle is emulated using the mouse
  299.  
  300. . Emulates Indy 500 controllers, keyboard controllers, Video Touch Pad, and
  301.   CBS Booster-Grip
  302.  
  303. . Support for two joysticks (four-button joysticks can control select, reset,
  304.   and both players' fire buttons)
  305.  
  306. . Built-in menu allows easy selection of games
  307.  
  308. . On-line help in the menu system
  309.  
  310. . Built in interactive debugger that supports bank-switched images
  311.  
  312. . Built-in disassmebler for images 4k or smaller (i.e. non-bank-switched)
  313.  
  314. . Support for Atari 8k, Atari 16k, Super-chip, Parker Bros., CBS, and
  315.   M-Network bank switching (M-Network, though, is untested, since I have no
  316.   such games to test with)
  317.  
  318. . Partial support of Starpath Supercharger single-load games
  319.  
  320. . Sound support
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327. 4. Bugs/future additions
  328.  
  329. A (very) few games do not yet run perfectly. Some bugs/omissions are:
  330.  
  331. . Vertical jitter on a few games
  332.  
  333. . Some games don't come up at all.  I think they are mainly due to bad dumps,
  334.   since the code implies bank switching but the dumps I have are not big
  335.   enough.
  336.  
  337. . I'm sure there are others I haven't found yet... :)
  338.  
  339. Features to be added (if I ever make the time):
  340.  
  341. . Add the last few undocumented instructions that aren't implemented
  342.  
  343. . Expand the disassembler to handle bank-switched images
  344.  
  345. . Likewise, there are probably others I haven't thought of yet... :)
  346.  
  347. I'm sure I could fix a lot of these with some work, but I've been working on
  348. this since January 1996, and I decided that it was high time to just upload
  349. the darn thing instead of tinkering with it forever....
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356. 5. Program instructions
  357.  
  358.   Step 1: Copying the software
  359.  
  360.   It's pretty simple.  Just extract the files from whatever archive you
  361.   got it from (e.g. ZIP file) and place them where your game files are (e.g.
  362.   in your Action Pack directory).  There should be the following files:
  363.  
  364.   ATARI.EXE ....... the program
  365.   ATARI.PAL ....... the color palette
  366.   ATARI.CFG ....... sound on/off, joystick, etc.
  367.   ATARIDBG.FNT .... my 5x7 font for the integrated debugger
  368.   ATARI.TXT ....... this file
  369.  
  370.  
  371.   Step 2: Running the program
  372.  
  373.   The easiest way to run it is by entering the name with no parameters:
  374.   (make sure there are .BIN files present, or the program will exit)
  375.  
  376.   ATARI
  377.  
  378.   Inside you will find a menu showing all game files.  Scroll around with
  379.   the cursor keys or use the joystick (hit 'J' to calibrate it, or 'K' to
  380.   disable joystick support).  F1 will bring up the online help, which details
  381.   all commands and command-line options.  If your system supports more than
  382.   25 rows of text, the program will support it (I wrote a nifty program that
  383.   gives me 80x50 text with full 720x800 resolution on ATI Mach 32 and Mach
  384.   64 cards, for example).
  385.  
  386.   You should notice that files are color-coded according to size; 2k and 4k
  387.   files are gray, 8k are white, 12k are black, and 16k are yellow.  Hitting
  388.   <enter> (or joystick button 1) runs 2k, 4k, atari 8k, CBS 12k, and standard 16k (non super-chip)
  389.   files.  'A' runs Activision "special" files (e.g. Robot Tank and Decathlon).
  390.   'R' runs 16k super-chip games, 'P' runs 8k Parker Bros., and 'M' ATTEMPTS
  391.   to run M-network games (I have none, so testing was impossible).  'D'
  392.   toggles the integrated debugger, which will kick in when you run a game.
  393.  
  394.   Ok, you've picked a game and gotten it to appear.  How do you start playing?
  395.  
  396.   F2.........................Reset
  397.   F4.........................Select
  398.   F5.........................Color/BW toggle
  399.   F6,F7......................Player 1,2 difficulty switches
  400.   <Esc>......................Exit game
  401.   Joystick/cursor keys.......move
  402.   <Space>/joystick fire......fire
  403.   joystick buttons 2,3,4.....select,reset,player 2 fire (not very useful)
  404.  
  405.   Finally, the program supports command-line arguments to allow other shells
  406.   and batch files to drive it.  It's usage is as follows:
  407.  
  408.   ATARI [gamefile] [BANK|BANK16|BANKA|BANKM|BANKP|BANKC|BANKSC|BANKSP]
  409.         [DEBUG] [DISASM] [FRAMExx] [KB] [INDY500] [VTP]
  410.  
  411.   BANK........8k standard file
  412.   BANK........16k standard file
  413.   BANKA.......Activision "special"
  414.   BANKM.......M-Network (would someone please tell me if this works?)
  415.   BANKP.......Parker Bros.
  416.   BANKC.......CBS RAM Plus
  417.   BANKSC......Atari Super-Chip
  418.   BANKSP......Starpath Supercharger
  419.   DEBUG.......Use integrated debugger
  420.   DISASM......Try to disassemble a 2k or 4k file to LISTING.ASM
  421.   FRAMExx.....limit display to xx frames per second
  422.   KB..........Emulate Atari keyboard controllers
  423.   INDY500.....Emulate Indy 500 paddles
  424.   VTP.........Emulate Video Touch Pad
  425.  
  426.  
  427.  
  428.  
  429.  
  430. 6. Disclaimer (a.k.a. covering myself)
  431.  
  432. For the following discussion, this software, the PC Atari Emulator, will be
  433. referred to as "PCAE".
  434.  
  435. The author of PCAE hereby grants unlimited license for users of PCAE to freely
  436. copy it for personal use (I can't think of a reason why a company would want
  437. to use it).  PCAE is supplied as-is; the author WILL NOT be held responsible
  438. for ANY damages that may occur as a direct or indirect result of, or inability
  439. to use, PCAE.  The author grants no warranty whatsoever, and none should be
  440. implied.
  441.  
  442.                           USE IT AT YOUR OWN RISK.
  443.  
  444. As stated previously, PCAE may be copied and distributed freely for personal
  445. use.  It MAY NOT be sold by anyone without prior written consent by the author
  446. (after all, why would anyone want to sell this?)  It may be distributed as
  447. part of a shareware/freeware package as long as not more than $7 US (1996
  448. dollars) is charged for its distribution.  PCAE MAY NOT be distributed without
  449. this document in its complete form.
  450.  
  451. PCAE emulates a commercial game system for which copyrighted software was
  452. developed and still exists.  The author of PCAE hereby forbids anyone to
  453. distribute PCAE in conjunction with any other copyrighted software (because
  454. if anyone does, I don't want to be held responsible).  In addition, users of
  455. PCAE are specifically forbidden from using it in any way with copyrighted
  456. software for which they are not in legal ownership.  PCAE should IN NO WAY be
  457. regarded as condonation of, or an excuse to commit, software piracy, and the
  458. author will not be held responsible for the actions of others.
  459.  
  460. Whew!  (dammit, Jim, I'm a programmer, not a lawyer!)
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467. 7. And finally...
  468.  
  469. Well, I hope you like it.  If there are any problems please let me know.  I
  470. might release the source code since the available time I have to support this
  471. is limited; it'll depend on how many changes are requested.
  472.  
  473.  
  474.  
  475.  
  476.  
  477. 8. Acknowledgements
  478.  
  479. This emulator was not written completely without help.  I would like to thank
  480. the following people for their assistance (knowingly or otherwise):
  481.  
  482. Norbert Juffa for writing the millisecond timer used in the fps limiting code
  483.  
  484. Dan Melton for writing the keyboard interrupt service routine
  485.  
  486. Matt Conte for building the awesome homepage
  487.  
  488. Ron Fries for writing the sound routines, and Dan Boris for sending them to me
  489.  
  490. Everyone else who has sent suggestions and feedback, you know who you are!
  491.