Apple IIgs JavaPosted: November 17, 2015 Introduction So Joe Davisson started extending Java Grinder to support the W65C816 as a CPU for with target platforms of first the W65C265SXB dev board, then Apple IIgs, and hopefully soon also Super Nintendo. I helped him out by writing some code using Google Go to create bootable Apple II disk images. The source code for Java Grinder, the demo below, and the Apple II disk image creator is all available on github. Since Joe had already extended Java Grinder to create a Java demo on the Commodore 64 he already had a pretty good head start with the W65C816 (considering the W65C816 is a 6502 with 16 bit extensions). Related Projects @mikekohn.net Videos Below is the demo compiled out of the samples/apple_iigs directory. The demo was written in Java and compiled using javac against a jar file filled with empty methods for all the API calls. The .class files that are generated are then run through Java Grinder which transforms the Java byte-code into a single native W65C816 source file which is then assembled with naken_asm. Start of the demo running in the Mess emulator. https://youtu.be/kahpsCyrBwE Years ago someone gave me an Apple IIgs that I had turned on once or twice and then put in storage in a closet. Never thought I'd find any real use for this thing. I set it back up so I could make this video of the demo running on a real Apple IIgs. https://youtu.be/3d7jONblTF4 File Transfer To transfer the demo to the Apple IIgs, a NULL modem cable was connected to a PC and I wrote this small program in Apple BASIC:
10 D$ = CHR$(4)
20 A$ = CHR$(1)
25 I$ = CHR$(9)
45 PRINT D$;"IN#2"
60 FOR I = 0 to 5435
70 GET C$
75 V = (ASC(C$) - 65) * 16
76 GET C$
78 V = V + (ASC(C$) - 65)
80 POKE 4096 + I, V
90 NEXT I
200 PRINT D$;"BSAVE GRINDER,A4096,L5436"
1010 PRINT D$;"IN#0"
1020 PRINT "DONE"
On the Linux side, I wrote a small program that would take the .bin file produced by Java Grinder and send it over the serial port 300 baud by taking each byte, splitting into 4 bit nybbles, and sending each nybble added with 'A' so that it's always something ASCII being sent over the wire. I believe if it sends a 0, all kinds of awful stuff happens. On the Apple IIgs side, before I could run the program I have to press Ctrl-Apple-Esc and change the default baud rate to 300. I tried to change it programmatically with PR#2 (notice some missing line numbers above?), but it was doing weird things. I eventually got sick of doing that and switch the software to the default 1200 baud. Download git clone https://github.com/mikeakohn/apple2_disk_utils.git
Copyright 1997-2024 - Michael Kohn
|