Close

GLXgears on a commodore 64

A project log for Silly software wishlist

Motivation to do some software projects by writing them down.

lion-mclionheadlion mclionhead 02/09/2023 at 09:030 Comments

This is a somewhat practical use of a commodore 64, if only for historical purposes.  The purpose would be just to rediscover the programming model & see how fast it could run a modern task.  Programming a C64 is a kind of sadistic game in itself.  If you already wrote GLXGears for an arduino, you might as well do it for a C64.

The arduino port of GLXgears uses floating point.  It would have to be converted to fixed point assembly language.  It would be cross compiled & put on a disk image in Linux.  The mane task is writing a fast fixed point math library.  It would use lookup tables for trig.  It would possibly use the BASIC routines for integer operations, but it should need only 16 bit precision.  Lions at least remember the C64 had no multiply instruction & young lion believed writing one to be the biggest obstacle to doing anything.

A rough search revels no canned fixed point math library.  Most everyone just calls the BASIC math routines for floating point.  

Discussions