Archive for the 'Contiki IIgs' Category

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 ….