This project has moved. For the latest updates, please go here.

Vintage Studio

Coordinator
May 21, 2012 at 4:45 AM

Following the introduction of Vintage Studio, http://blog.3d-logic.com/2012/05/12/introducing-vintage-studio/, I thought it was a cool idea, so I added commandline support for running 'program' (.prg) files to Virtu, which is available from release 0.9.2.

PRG files are output by the 64tass 6502[+] compiler, http://singularcrew.hu/64tass/, used by Vintage Studio and are essentially the compiled output prefixed with a 16-bit address that serves as both the load address and program entry point. Note the size of the program is not in this header.

This is fairly straightforward, apart from the subtleties of the Apple IIe memory map. I assumed that addresses $0000-$FFFF are loaded into Main RAM. Also addresses $C000-$CFFF are loaded into LC Bank1 $D000-$DFFF, so that addresses $D000-$DFFF are loaded into LC Bank2 $D000-$DFFF.

Aux RAM is currently not supported, but could easily be added by assuming the given address is in Main RAM (limited by 16-bits) and supplying data beyond $FFFF. Meanwhile, you could just use bootstrap code in Main RAM to unpack code and data into other areas of RAM.

Besides, I expect this feature would mostly be used with simple 6502 programs that live in the Main $0800-$BFFF address range, unless you really know what you're doing. Either way, you might need to peruse some classic Apple II literature like "What's Where in the Apple" and "Understanding the Apple IIe", so check out the Apple II Documentation Project, http://www-personal.umich.edu/~mressl/a2dp/.

Also, I had the idea of bootstrapping the program post power on reset, so the machine is in a known sane state, via the soft entry reset vector ($03F2-$03F4), massaged to indicate warm start and thereby bypass the Disk II boot. This seems to work well but has the side effect that hitting reset restarts the program.

Coordinator
May 21, 2012 at 4:59 AM
Edited May 21, 2012 at 5:02 AM

To get the ball rolling, here's my 'Hello World' program:

*           = $800

StrOut      = $db3a
Init        = $fb2f
Home        = $fc58
MonZ        = $ff69

            jsr     Init
            jsr     Home
            lda     #<Message
            ldy     #>Message
            jsr     StrOut
            jmp     MonZ

Message     .text "Hello World!"
Coordinator
Jul 17, 2012 at 11:30 AM
Edited Aug 21, 2012 at 10:14 AM

I've also added commandline support for running 'executable' (.xex) files to Virtu, which is available from release 0.9.3.

XEX files are output by other compilers used by the WUDSN IDE, http://wudsn.com/.

Update: WUDSN IDE 1.6.3 now has disk image support for Apple II emulators! Virtu has a tab in the config as a supported emulator. ;)