Archive for the 'Apple II Software' Category


Monday, December 8th, 2008

Timing is something that has been frustrating me a lot lately … first with the //cmxp project and now this potential Ethernet card.

The short of it is, I can’t seem to come to grips with the necessary delay required at machine lanuage speeds. Any other method of doing things slowly seems to work and that includes entering the right values in the monitor or single stepping stepping via NoIce. In fact i have written the init program in basic (some peeks and pokes) and even that works fine … grrrr

In trying to port the driver from c over to assembly I’ve come to realize once again how rusty my assembly skills are. So I am doing a combo c/asm dirver just to verify the hardware functionality.

Going to have to shelve things for a bit, probably till after the holidays – too much stuff going on in other areas. If I mange to sneak any time in i’ll post an update ..


Building Apple II applications using cross platform tools

Wednesday, February 14th, 2007

There is a very nice tool suite called cc65 that runs under Windows, Linux Mac OSX etc.. written by Ulrich Von Bassewitz, with user contributions by folks like Oliver Schmitd, MagerValp and Groepaz to name a few….

I am writting series of articles on introducing newcomers to using these tools to develop Apple II software. One showcase example of cross platform developement using this tiool suite is Adam Dunkels “Contiki”. We will build that app as our final article..

While I personally develop software using Cygwin for windows, the instructions are equally applicable on Linux and OSX. I hope to write parallel articles covering those platforms.

Please see the page links to the right of this post …

(I’ll enable them below as they appear as well)

AppleII software development with cc65

  • cc65 for Cygwin
  • cc65 for Linux
  • cc65 for OSX

Test driving the compiler

Building Contiki

uIP for standalone Apple II Internet apps

Wednesday, February 14th, 2007

aiiadict (aka Richard Jackson) made a request in comp.sys.apple2 for someone to help him with the ip side of things for his standalone graphical web browser for the Apple II.

I suggested, I could massage the exisiing uIP 1.0 (Adam Dunkels) open source code to be his starting point for the application as it has a tcp/ip stack writen in portable ‘c’, it is cc65 (Ullrich von Bassewitz) compatible and it comes with some sample web applications … great starting point.

It is about 95% there in that it attempts to download web pages but something is not quite right yet … On the other side I know Rich has said he has made some good progress on the HTML parser in 6502 assembler and graphical display of web data.

Stay tuned …

Contiki 2.x

Tuesday, January 30th, 2007

I would like to learn to write a Contiki App. I decided to try and use Contiki 2.x under windows for that purpose to get better aquainted with it and the work Oliver did with the winpcap driver … I have run into some difficulty that Oliver is helping me track down … my build is different from his even though we are using the same version of the C complier and SDK (at least on one machine) ….

The symptom is that the netmask and the resolver are not maintaining the values as set …

USB/Forth Update

Sunday, January 28th, 2007

I came across gs16forthII again in my travels and decided to give it another shot .. I figured out how to load the usbtest6.f code and start it … there were a couple of duplicate words but at least the menu came up … a bit more tweaking and some more research and I found out that there were extended read/write byte commands that take a ‘bank’ param … I fixed up the spots that access the cards registers and it’s working now … Yay!!

Tested my flash drives so far

  1. Passes reg test
  2. Attach works
  3. Print device descriptor works
  4. Print string decriptor works
  5. SCSI – Device enquiry works (for one drive) I think it fails for the other as the endpoints are not correct
  6. SCSI Test Unit ready (fails)
  7. SCSI read device capacity works (for one drive)
  8. Read LBA (fails – problem with getnum routine)

So it’s time to learn some forth … I still plan to continue my ‘c’ ports but this looks interesting to be able to code directly on the IIgs.

later …

Contiki Port for IIgs (65816)? cont …

Sunday, January 28th, 2007

I have started compling the apps and not surprisingly (due to the great job Adam and Oliver did) they have compiled with no or few errors – most involved missing headers that are file system related … once I figure that out I can look at the conio code. I will update this post later with the module names that don’t compile out of the box …..


  • bounce – TEXTFRAME_TALL undeclared
  • config – missing unistd
  • configedit – includes kfs.h – has fastcall declaration
  • editor – missing unistd
  • ftp – missing unistd
  • http-fsdata – } expected?
  • shell – missing unistd
  • smtp – type conflict line 363
  • ssfire – bad pragma – line 121
  • telnetd – error reading telnetd.conf – (not ported to apple yet)
  • vnc – line 114 ek.h? } expected (not ported to apple yet)
  • vnc-viewer – line 114 ek.h? } expected (not ported to apple yet)
  • welcome – line 42 } expected
  • wget – missing unistd


  • ctk – line 1269 duplicate case label
  • ctk-conio-service – can’t find conio.h
  • ctk-conio – can’t find conio.h
  • ctk-mouse – can’t find mouse.h




Contiki Port for IIgs (65816)? cont …

Saturday, January 27th, 2007

So I spent some time building a HFS formatted HDV volume I could use under kegs. As I am not very familiar with Orca/C I have had to implement a few work arounds due to issues I encountered. I am sure there are better ways of doing things.

1) Had to set they type and AUX type of the .c and .h files so Orca/C would work with them properly. Ciderpress imports them as APW C files. I wrote a simple shell script to change those.

2) Orca/C only searches two include direcories by default. You can include others by two methods. Include pragmas at the beginning of each source file or add complier directives on the command line with cc=(-i”path”)…The problem is it seems the command line is restricted to 256 characters (I have not checked explictly but it bombs to the monitor if I put too many entries.) The way I worked around is was to shorten the path info.

3) Since we are not going to use cc65 and the current Apple ports are currently tied to the library support in that package I am reviewing other coniki ports to see how they handled non cc65 library services. Shouldn’t be a problem.

4) Compiling without loader arch support so it will be one big binary … will make each .prg a seperate segment. For now i commented out conio.h and put stdio.h instead . I expect a lot of linker errors :)

5) Found something Orca/C didn’t like so far

a) the MACRO DSC_HEADER defined in dsc.h is defined with a ; at the end and the invocation of that macro main.c (vis includion of xxx-dsc.h files) also includes a ; at the end.

6) Was able to compile main.c so far with no errors – yay!!

7) So other considerations are

  1. conio support
  2. embedded asm
  3. prg segmentation
  4. file support (cfs/kfs/regular file/io)

Contiki Port for IIgs (65816)?

Thursday, January 25th, 2007

Id love to see a port of Contiki to the Apple IIgs, that takes advantage of the extened memory map available. Unfortunatley there are not any open source tools freely available that are capable of compiling ‘c’ down to 65816 assembler.

The open source package “binutils” is the place to start according to Geoff Weiss. There is some support that needs an active maintainer. The first step is to get ‘ld’ to produce OMF output.

The other choice is to use the Byte Works ORCA/C (runs on the IIgs or IIgs emulator) or ByteWorks MPW IIgs ORCA/C (runs under Mac OS – pre X). These are still classified as for pay tools – available from Syndicomm.

I may pick away at this project just to see how difficult it is to adapt the existing Apple II port currently @ version 1.3 to the IIgs ….

Stay tuned ….

Uthernet Update

Wednesday, January 24th, 2007

Well we are well into our 3rd run of Uthernet cards… As I make this entry there are still approximately 30 cards left.

I would like to recap what has happened on the software front with Apple II ethernet. Adam Dunkels Contiki 1.2 was released by Oliver Schmidt with support for the Uthernet and LANceGS based cards. Contiki 1.3 was released after that with improvements to the memory map, added mouse support and included the web server demo app (among other refinements).

A Marinetti link layer driver was developed by Ewen Wannop and I, that included code from the IP65 library from MagerValp. This is will be available shortly as a non beta release, the source will be added to the MOSP Marinetti cvs repository.

I added support for virtual Uthernet to AppleWin, based on the code developed by Spiro Trikaliotis for the VICE emulator. You can run Contiki, IP65 based apps or ADTPro under AppleWin if you want.

David Schmidt has added Uthernet support (based on IP65) to ADTPro … this is cool as it allows you to dump your ProDOS volumes over the wire back to a host PC for safe keeping.

I know some other folks have developed software that makes use of the Uthernet card but I can’t really mention it as it has not been released.

My next posts in these categories will be discussing the tcp/ip applications that I am working on or would like to see developed in the future ….

till next time ….