Assembly Language

GEOS for Apple ][ File Strucures Explained

Oliver Schmidt, long known for his work on several projects in the Apple][ community including Contiki and Applewin, has now delved into documenting the internals of  GEOS, the Berkeley Softworks  produced operating system for the Apple ][.

In his announcement in the comp.sys.apple2 newsgroup, Oliver says" Although the Apple GEOS filesystem is based on ProDOS 8 the Apple GEOS  files are not standard ProDOS 8 files. I’m not refering to file  content here but to the file structure – meaning that Apple GEOS files  aren’t seedling, sapling nor tree files.

I’ve done some reverse-engineering and have documented my findings here:

http://wiki.cc65.org/doku.php?id=cc65:apple2:geosfileformats

GEOS files are more than the usual byte stream with a few attributes. Therefore they need to be converted in order to represent them in other filesystems. This is just the same as with GEOS 64/128. And again just the same as with GEOS 64/128 it is desirable to have this conversion work “in place” instead of creating copies. To facilitate this a suitable “convert format” has to be specified. I defined one here:

http://wiki.cc65.org/doku.php?id=cc65:apple2:geosconvertformat

Who can make use of this “convert format”?

1. Convert tools running on Apple GEOS (like on GEOS 64/128) or on ProDOS 8. I’ve already written a ProDOS 8 convert – which however currently only supports the “deconversion”.

2. Apple disk image tools like CiderPress or AppleCommander. They could use the “convert format” to represent Apple GEOS files in the host filesystem – and do the (de-)convert on-the-fly when moving files from/to an Apple GEOS disk image.

What’s the benefit of all this?

1. In general it becomes possible to move Apple GEOS files around, transfer them with any filetransfer technicque and share them on the
net etc.

2. I’m working on porting the cc65 GEOSLib (http://www.cc65.org/ snapshot-doc/geos.html) from GEOS 64/128 to Apple GEOS. The cc65 linker creates a “convert format” file which is then tranfered to the Apple GEOS filesystem and finally deconverted there. That’s the reason why my ProDOS 8 convert tool only supports this direction.

3. Now that the basic Apple GEOS file structures are known one can apply the already present knowledge on GEOS file contents – as they are the same for Apple GEOS and GEOS 64/128. Thus it becomes i.e. possible to implement an Apple geoPaint file viewer (or editor):

ftp://ftp.zimmers.net/pub/cbm/geos/programming/documents/geoPaint%20format.txt

From the cc65 developers perspective it would of course be great if  CiderPress and/or AppleCommander would allow to place the output file of the cc65 linker directly in an Apple GEOS disk image as Apple GEOS file, thus superseding the additional convert step.

A.P.P.L.E. obtained permission to distribute the documentation for GEOS in 2003 and if you would like to check GEOS out or to run it on your own system, you can download the entire GEOS CD complete with all of the documentation from our December posting about the program at:

http://www.callapple.org/2011/12/10/geos-apple-cd-re-posted-to-download-section/

 

8-Bit Merlin IDE version 2.59 Source now documented and available

WIlli Kuche has documented the Merlin Macro Assembler IDE Source code and made it available for download.   Merlin, which was written by Glen Bredon at Southwestern Data Systems, was available for download for the past two years, however, the version that was available was without documentation and  without instructions for building the IDE.

Now after a long effort by Willi, the IDE is documented, and according to Willi’s note left on CSA2, “it contains all the source files needed to generate version 2.59, but no others, plus step by step instructions to assemble the four primary source files, to bind together the four generated object files and to compare the newly generated “MERLIN.SYSTEM” against the original. “

You can download the complete source code for Version 2.59 of the 8-Bit version of Merlin at:

ftp://public.asimov.net/pub/apple_II/images/programming/assembler/merlin/VALIDATE.PO

Mr. Fixit Source Released for Apple ][ Prosel

After a request by Willi Kuche, the Apple ][ community came together and managed to come up with two versions of the source code for Glen Bredon’s Mr. Fixit for Prosel 8.  Being as no original source code was available, two people in particular disassembled the program and have posted their respective versions to the internet.

Antoine Vignau of Brutal Deluxe Software posted his Merlin based version of the source code at:

http://www.brutaldeluxe.fr/public/mrfixit/

Willi Kuche also decided to create a version as well, however, his version is Kyan Assembler based.  The version he has created also goes a bit more in depth in the comments than the Merlin based version, according to notes in the CSA2.  No download link has been provided for the Kyan Assembler based source yet, however we have contacted the author for the information.

For those interested in other Glen Bredon materials, you can check out the complete Glen Bredon archives at

http://www.apple2.org.za/gswv/USA2WUG/Glen.Bredon.In.Memoriam/

The only items not in the archives are the items related to the Big Mac assembler which is distributed by A.P.P.L.E.

Don Lancaster releases Apple II Books for Free

Don Lancaster, Curator of the Guru’s Lair website and  author of several Apple ][ releated books including A.P.P.L.E.'s Call-A.P.P.L.E. In Depth Books 4, All About Applewriter, has made a number of his Apple ][ books available in PDF for free download.  The current books he has released are the Apple Assembly Cookbook, Book 1 and Book 2, as well as a number of others.

You can find all of Don’s currently released books at:

http://www.tinaja.com/ebksamp1.asp

Key Clicker Routine

If you have a newer Apple with the silent keyboard, Don Williams has written a short and sweet machine language routine to solve your problem.

0300:  48              PHA
0301 : A9 20        LDA #$20
0303: 8D 30 CO   STA $C030
0306: 20 A8 FC    JSR $FCA8
0309: 8D 30 CO   STA $C030
030C: 68              PLA
030D: 4C 1B FD   JMP $FDIB
0038: 00 03

Once you store the address ($0300) in location $38 and hit return, your keys will click merrily away until you hit reset. To restart the routine, reenter the address.

•A minor modification of this routine will give you a slow list (with tones) feature. Change the JMP and 030D to FOFD and store the address in $36. The value stored at $0302 may be increased for a slower list.

Loadable Program Follows:

————START OF LISTING———–

0300: 48 A9 20 8D 30 C0 20 A8

0307: FC 8D 30 C0 68 4C 1B FD

0038: 00 03

—————END OF LISTING

Assembly Language Classes

The Assembly Language classes are now scheduled to start June 1 at Empire Electronics. Cost $35 per persorn including Synertek manual. To sign up, call Tom Geer at (206)244-5200 or Don Williams at (206)242-6807. The course includes Number Systems, Boolean Algebra, 6502 Instruction set and Programming.

An Apple ][ Memory Test

By Bob Huelsdonk

I wrote this simple program to test new memory chips I bought. Just store the correct end address for your Apple in locations 4 and 5, run 300G and display 800 to the end.

300.32A
0300- A0 00 A9 55 91 02 D1 02
0308- D0 1D A9 AA 91 02 D1 02
0310- D0 15 20 18 03 90 EB 60
0318- A5 02 C5 04 A5 03 E5 05
0320- 3A FF 00

- 4C 42 00 08 FF BF 51 18(?)
SL SH EL EH

SL= START ADS LO   EL= END ADS LO
SH= START ADS HI   EH= END ADS HI

IF MEMORY PERFECT *800.BFFF Displays all AA (for 48K)

EDITORS NOTE: This article has been recovered from very unreadable pages and may not be correct.