APPLE ][+ EMULATOR ------------------ I wrote this emulator about four years ago, completely on a whim. By looking at the source code, you should see that I had no programming discipline whatsoever back then. There are a total of about five comments dispersed through the whole thing, and my choice of variable names does not make things any easier. But, it works (sometimes). To use the emulator, you will need two ROM image files, which should be named ROM.DAT and DABOOT.DAT. The first one is a $3000 byte long image of the data between $d000-$ffff, and the next one is the 256 byte image of the disk controller ROM. You can get these from foghorn.stanford.edu in the file "applemu.zip". To start the emulator, type: 6502 [.dsk] [.dsk] Where and are the names of the disk images you wish to use for drive 1 and drive 2, respectively. The disk images are just sector dumps of an Apple disk. Their size is 16 sectors*35 tracks* 256 bytes/sector = 143360 bytes. The format is similar to that used by the APL2EM program. Keys you should know: Alt-X Exits the emulator. Alt-R Resets the virtual machine. Alt-P Does a power-on reset of the virtual machine. F10 Brings up the control menu, where you may open different disk images, or toggle sound on/off. The CVTDOS program ------------------ The emulator usually emulates disk activity by nibbilizing the data in the disk images, converting it on-the-fly to what the Apple would see if there were actually a disk in the drive. However, my emulator provides an alternate form of disk access, by intercepting the RWTS routines. By running the CVTDOS program on a disk image, it changes the DOS to run my native-code RWTS subroutine instead of emulating the Apple subroutine. The result: much faster disk access. The caveats: this method only works with standard DOS disks, and does not work with PRODOS. Actually, you must use this method to be able to write to diskettes, as my emulator does not currently emulate the write head of the disk controller (I'm lazy). To convert your DOS to intercept the RWTS routines, type CVTDOS [.dsk] where is the filename of a DOS disk image. If all goes well, you'll get a happy message. If not, you'll get an error message or an "already converted" message. LIMITATIONS, BUGS ----------------- * This is absolutely the sloppiest code I've ever written in my life. If you wish to modify or extend this emulator, may God bless your soul. * Sometimes has trouble executing code that crosses language card boundaries. Most notably, it will not run the newer versions of PRODOS. * Sometimes hi-res graphics get weirded out for unknown reasons. * Sometimes the thing will not reboot with PR#6, or even a power-up reset. By the way, the .TPU units in this file are copyrighted, so please don't ask for their source code or interface units. -------------------------------------------------- Send kudos and flames to: Steven E. Hugg hugg@cs.fsu.edu