The hardest part of developing in C for the 68000 is finding a compiler. The amount of Googling was insane. I came across some projects to compile gcc as a 68k cross compiler, but they were Linuxy. I tried under Cygwin and failed. And then I found a MingW build on sourceforge. I combined this with Tom Storey's bare metal toolkit, modified crt0.S and platform.ld to load all code into RAM at 0x00984500, and it was off to the races. Again, there was some python scripting to add the HP's executable file header which I was slowly reverse-engineering (latest version here). I hadn't done programming on old hardware with a modern compiler before, and---wow!--gcc is really, really good with full optimization.
I wrote various simple functions to interact with the hp's code: this is now my libhp165x library. It is satisfying to be able to write code in a modern environment and produce binaries that are less than 35K in size.
Finally, I started porting my 2002 Wiztris falling blocks game (here is the current code). It was very satisfying to get it to work. I had to remove the high score code from the initial version, however, because I didn't know how to do disk i/o.
Alexander R Pruss
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.