I have made quite a bit of progress this weekend.
Firstly I'm nearing finalizing the ISA (Instruction Set Architecture) which I've started documenting. Currently most instructions are supported by the hardware itself bar the register-offset addressing.
As the defined ISA has overtaken hardware support, I decided that it's probably best implementing it as per the spec in the simulator; mainly to see if it's sufficient to do actual Turing-complete processing. To this end I've updated the simulator with support for the whole ISA. I've also made some major changes to the assembler to both in regards to suppls -lh te orting the new instructions and expand the lexical support. The assembler now can handle variables (in both
.data), handles labels better, understands
%define and can assemble the new offset addressing syntax.
One of the major new features in the simulator is (hacked together) support for my SPI-driven display module. I'm intending on using the ST7735R-based 1.8" LCD module from Adafruit driven off the first hardware SPI driver (SPI0). The simulated display is implemented using Pygame (SDL) and supports a 256x256 display matrix.
I have also made a start on the actual Kernel code itself. This currently consists of a basic SPI driver, the display driver for the ST7735R (sans proper init code as the simulator doesn't currently need it) and simple text routines.
For the character set I'm using the C64 character ROM with a basic routine to provide ASCII support. Here's the Kernel executing a routine on the simulator which dumps the charset:
The simulator is actually pretty slow. I'm getting ~400Khz on my Haswell i5. The hardware should run at around 100Mhz so a factor of ~250 better. Still a full screen refresh over SPI is pretty expensive...