Atari 8-bit Stuff

Links to more great Atari sites

AtariAge 8-bit Forums
Atari 800 Emulator
Mathy van Nisselroy's page

In the years that predated my IBM usage, I hacked and tinkered constantly with my trusty Atari 130XE.  I recently decided to start using it again, just to remember the old days.  Here's some of the software that I hacked and/or wrote to suit my needs.

For those using the Atari800 emulator package, I have the following files: - *UPDATED 6/19/2012* Add/edit the header on a cartridge ROM image.
Action.ROM - Action! cartridge image, with valid header.
MAC65.ROM - Mac/65 cartridge image, with valid header. (replaced with good copy on 12/10/2001)
SDXv421.ROM - SpartaDOS X v4.21 cartridge image, with valid header.
SDXv422.ROM - SpartaDOS X v4.22 cartridge image, with valid header.
newdiskled.tgz - Updated diskled.[ch] files for the emulator source. (updated since announced in mail list)
a8-816-pbi.tgz - My current diff file to turn the 1.2.0 source into what I'm playing with.  Please make sure you read the readme.816 file.
NKH.SCR - Eagle v4.16 script used to create library
NKH.LBR - Eagle v4.16 library created from above script

12/4/2001 - I really need to get 65816 emulation ported over to this emulator.  In the mean time, I've managed to code in a turbo mode.  Check out this, this, and this for a general idea how fast the 320XE runs.  That's running on a modified OS ROM.  I added the 149 byte Hyper E: driver, changed the left margin to 0, changed the default border color to a dark blue, changed the default background color to black, and disabled the attract mode.  The ROM checksum routines have been nullified, and the last 12 bytes of the ROM have been configured for a 65816 (preliminary support, more to come once I get the 65816 emulation active).

12/10/2001 - Along with a Turbo-OS ROM image and a little bit of work on the 65816 emulation, I finally figured out what was going wrong.  The result was the ability to run MAE and SysInfo v2.03.  Here's a shot of the Turbo-OS Diagnostics screen, too.  Such a shame that Draco's SysInfo doesn't recognize more RAM, though.

12/10/2001 #2 - For the adventurous soul, I have made this available.  That .exe file contains my video modifications (which do need some work still), the 65816 CPU emulation (with 14MB RAM allocation, even), and my modified keyboard mappings.  The keyboard mappings are as follows:

F1-F4: Mapped to the XL/XE F1-F4 key codes.
F5: Help
F6: Start
F7: Select
F8: Option
F9: Reset (Shift-F9 will perform a coldstart)
F10: Enter monitor
F11: should do nothing
F12: UI menu
PrintScrn: Save PCX (Shift-PrintScrn saves an interlaced PCX)
End: Cycles through the joystick autofire modes
Alt-Q: Quit emulator
Alt-T: toggle turbo (hyper_cpu, aka 4 instructions per registered clock cycle)

The remaining keyboard mappings should be identical to the normal Atari800 v1.2.0 source definitions.

12/10/2001 #3 - Grab this file to patch the Atari800 v1.2.0 source tree with the same code that I am playing with.  Please be sure to read the readme.816 file included.

12/13/2001 - script updated with changes submitted by Jindroush (a much more experienced perl programmer than I).  I don't care for the input waiting for the user to hit enter before continuing, but I'll fix that with a more portable solution (if possible) as soon as I can.

12/17/2001 - Slightly modified script now available.  If the Term::ReadKey module is installed with your perl, then you won't have to press enter to make it process what you typed.  Also, by recommendation of Jindroush, "use strict;" has been added and all warnings that were produced have been cleared up.  While Jindroush doesn't seem interested in offering up a script, I feel that I cannot take sole credit for the script as it now stands.

12/18/2001 - I've been working on coding a virtual PBI device.  The purpose was to allow me the ability to work with the design and write the software before making a physical version.  In fact, I may only create the schematic and release that along with source code for the ROM.  Using Draco's SysInfo, I managed to get these screenshots: 1 2 3  Obviously, the last one (atari015.png) shows the performance in the turbo mode of my personal Atari 800 emulator package.  The scores may look low in the non-turbo mode (atari013.png), but the current ROM code is always performing 512 byte read/write operations and then transferring the desired amount of data from a private sector buffer to the buffer specified by the DCB.  I actually have an idea for improving the speed some more.  The virtual hard drive image file used by this code has no header.  Image creation can be done with this perl script.  Just pass the image filename and size (in bytes), in that order, to the script.  For the extremely curious, here is the source for the current PBI ROM code.

12/19/2001 - Possibly the final version of the script (final unless more cartridge types are needed) is now available.  Also, the PBI ROM code has been updated.  The code, as it stands right now, seems to work fine except for the benchmark in Draco's SysInfo.  It used to work, but I somehow broke that benchmark.  I need to update my PBI IDE schematic to reflect the memory locations used by this code (the SmartIDE design wasn't very efficient on it's use of the $D1xx page).  I have the source for the BlackBox ATASPI manager and will see about adding most (if not all) of that to my PBI ROM code, but not at this time as I don't have use for it (might help to actually build the controller and play with it on a real Atari).  I can say that the PBI emulation I have is running really nice.  I need to add code to show an activity LED like the SIO drive access does.  A turbo mode indicator would be nice, too.  Turbo mode, of course, is only available in my modified emulator.

12/19/2001 #2 - It's early afternoon now, instead of early morning, and the PBI ROM code was updated some more.  The SysInfo lockup was caused by bad cylinder range testing code.  It should be fixed now, but I should probably look for a better way to do that check.  Last benchmark I saw, the throughput (in non-turbo mode) went up by approximately 18% from the first speed tests that I took a screenshot of.  Yes, while performing the same read/write methods (but with slightly optimized code), I took the throughput up from 36k/s to 42k/s.

12/20/2001 - Here is a screenshot of the throughput mentioned yesterday.

12/20/2001 #2 - As promised in the Atari800 development mail list, here is the diskled.[ch] module rewrite.  The font is more complete, supporting ASCII characters 32 (space) through 126 (tilde).  ASCII 0-31 and 127 are all blank but can be defined as whatever.  Please check the updated diskled.h file for the led_status changes implemented (normal/inverse selectable, as well as red/green color selection while still using 1 primary font table).

1/4/2002 - I just created a library of the Atari custom chips for use with the Eagle PCB v4.0 software.  Here is the library, and here is the script that I made to create the library.  If anyone has the pinout for the FREDDIE and EMMU chips, please send them to me for addition to this library.  The following chips are defined: CPU (Sally), CPU socket (useful for designing a daughterboard that plugs into the CPU slot), ANTIC, GTIA, POKEY, PIA, OS ROM (well, 27128 EPROM), BASIC ROM, and the CO61818 (MMU).

10/2/2012 - As I've stated elsewhere, I was reworking the AKI code (started with a disassembly of the v1.1 Tasta.hex file) and planned to publish the resulting source for all to see and use.  While you could just grab the source from my Downloads page, you can also get it right here: MageAKI v1

Atari-Debug/MiniASM - This is actually the Apple //e's ROM that was ported over to work as a machine language monitor/debugger/mini-assembler for the Atari XL/XE.  This copy loads at address 0xB3AD (ends at 0xBC1F).  You can click here for the documentation.  Features added as of 12/19/2000: Step and Trace execution.  See the documentation for details.  Major portions of this code were written by S. Wozniak and A. Baum, and is Copyright 1977 Apple Computer, Inc.

Atari-MON (.asm source, self-test replacement) - A stripped down version of my Atari-Debug/MiniASM utility.  It has had the mini-assembler left out, as well as a few unnecessary commands.  It's code size is 1532 bytes.  This allows for it to be loaded in place of the self-test on a SmartOS/SmartIDE setup and leave the 0xD600-0xD7FF range free for user code space.  Keep in mind, major portions of this code were written by S. Wozniak and A. Baum, and is Copyright 1977 Apple Computer, Inc.

PAMP - This is basically an overlaid AMP.COM (editor/player for .AMP files) that I used for playing AMP files.  Simple instructions for it.  When run, it will default to searching the base directory of drive D1:.  Sorry, it doesn't support subdirectories, but I only had 180k floppies at that time, so I never filled one screen on a single disk.  Using the cursor keys, highlight the song you want to play and press ENTER/RETURN (depending on your keyboard, I use a genuine IBM via the TransKey interface).  Pressing X will exit back to DOS (or whatever called the program, I assume).  While the song is playing, the START button (F9 for us TransKey owners) will exit back to the menu.

IDE - Bob Woolley had a nice package in the IDE38.ASM file, but the SIO command, GET_CONFIG, was not implemented.  Without that command, established formatting programs couldn't be used.  Due to the 20-30 byte addition, I was forced to look elsewhere for the HDTABL storage.  I discovered a 155 byte unused region in the XL/XE OS ROM, located right before the international character set.  In fact, if you don't need/want the international character set, you have a 1179 byte region of free space starting at 0xCB65.  If that area is not available (if you have some other OS revision that uses that area) or not satisfactory to you, then just locate an 80 byte area that is fine for you and change the .ASM accordingly.  This zip file contains an ASCII (edited on my PC) source file and a modified HDINIT.COM (SpartaDOS HD format program).  OOPS!  HDINIT.COM was not fully patched (only worked on drives 1-7).  Fixed now.

16-bit IDE (.asm source)- Based on the schematic for Bob Woolley's SmartIDE, I have created a full 16-bit capable IDE interface for the Atari 8-bit.  This interface has only been tested in read mode (I only had 2 74ALS573 chips and 1 of them is bad).  However, the theory of the circuit should work both ways.  I apologize for the poor quality of the schematic diagram, but I don't have the software to produce anything cleaner.  The high byte of the data transfer is read/written from/to 0xD100-0xD13F (no address decode is applied to the lower 6 address lines).  Reading the low byte, via 0xD150, will latch in the data on U7.  Reading 0xD100 after 0xD150 will result in the reading of all 16 data bits.  Writing, however, should be done in reverse order.  Write the high byte to 0xD100, it will latch into U8, then write the low byte to 0xD150.  This is due to the slave configuration of the 74ALS573's.  Since this is just a 2 chip addition to Bob Woolley's work, I can't and won't take credit for this simple circuit.  I would very much like to thank Bob Woolley for the excellent start he gave me.  I had no idea it was this easy to add an IDE drive to a computer.  I am, at this point, still working on the IDE code to fully support this modification.  I have the 0xEC command implemented, and have seen proper identification of the drive via SysInfo v2.03.

PBI 16-bit IDE - Heavily modified from the SmartIDE schematic.  This is still an internal design that plugs into the CPU socket for most of the signals needed.  No PAL/GAL logic is used.  The .SCH file was created using Eagle v3.55r3.  No code has yet been developed as I have not yet built this circuit.  Where the previous design used 0xD100-0xD13F for the upper 8 data bits, this design should have that area located at 0xD140-0xD147.  The entire board acts as one PBI device.  The LCD interface should be full read/write, as with the battery backed SRAM for the PBI code and the SRAM for the 0xD600-0xD7FF.  The design allows for 16 banks of 2k bytes @ 0xD800-0xDFFF and 16 banks of 512 bytes @ 0xD600-0xD7FF.

Current SmartIDE Code - Includes code to handle LCD display mapped @ 0xD1C0-0xD1C1, and initialization code for 2nd POKEY (@ 0xD21x), 2nd PIA (@ 0xD31x), and a 6522 VIA (@ 0xD32x).  Source is configured to assemble and overlay an OS ROM image located at 0x4000-0x7FFF.  This code assumes you have a stock Rev 2 OS ROM (free space from 0xCB65-0xCBFF) and do not want the international character set (0xCC00-0xCFFF).  There isn't much room left available with this overlay in place.

RS-232 driver - This driver source installs as *: instead of R:.  This was designed to use a 2nd POKEY for the serial I/O, as well as additional lines from a 2nd PIA and a VIA for full RS-232 handshake control.  The VIA was used because I had a parallel printer port, and replacement P: handler, using the 2nd PIA.  If I recall correctly, I was also using the 2nd PIA for a dedicated mouse port (Amiga/ST style mouse), with a full 3 button capability.

Core PSI-Disk code - This is the code that did the actual reading/writing from/to RAM.  It supports a 128 byte bank table (2MB RAM size) and 128 byte sectors.  I used 128 byte sectors for more efficient use of the RAM (8MB drive limit, but the driver only handles 2MB, so there was no need to use 256 byte sectors to increase storage space).  I do not, yet, have the Action! source for the installer/formatting portion available for download.  I am still locating the latest code that doesn't require a special hardware modification.  Sadly, since I built my SmartIDE, I have had no need to use a RAM disk and have also switched my 1088k modification to 320k mode (for BASIC enable/disable functionality).  Here is the v3 series source for PSI-Disk.  In that .ARC is the source for the RAM disk initialization code, a separate formatting program, and my CONF.COM source.  Any queries regarding the code should be sent here.

DG-Term 1.87 source - Sadly, this is not the complete source code.  I seem to have either forgotten, or was unable, to copy the DGANSI.ACT module.  The other 3 modules, however, are there.  DGTERM.ACT is the main module.  DGSYS.ACT is the run-time module.  And CSET.ACT is the character set definition for the 80 column routines located in DGTERM.ACT (the PutX and PrintX functions).  I am still trying to find the rest of the code.

Term-80 source - After looking, I found that I only managed to grab 2 of the 5 source modules for this program.