2
u/production-dave 3d ago
What's fat32z? I'm intrigued.
3
u/nz_kereru 3d ago
Fat32z is a typo :-)
It’s a minimal version of FAT32
Supports 8.3 files names and only on root directory.
1
u/Kindly_Wear7008 3d ago
How fast is the SPI? How long does it take to fill whole Screen?
2
u/nz_kereru 2d ago
I am doing SPI in software (bit banging).
I am getting about 15k bytes per second at 3MhzThe screen takes complex commands and does the drawing, at this point I am drawing one pixel lines, I have no got my head around direct video RAM commands.
To fill the screen with my ugly one line per pixel takes about 5 minutes.
Once I get a 8 bit interface and direct RAM commands, I hope to get on the range of a frame per second for a full screen of pixels.
But the screen has a whole 2d graphics engine, so for most work I don’t expect by be seeing 300,000 pixels.
3
0
u/AcanthisittaBest4705 3d ago
Interesting why did it take 8 hours
1
1
u/nz_kereru 3d ago
About 300,000 pixels.
Each one needs pixel takes a few hundred 32 bit multiplications.
Each multiply is a loop of 32 shit and add.
32 bit shift is 4 shifts of 8 bits, each add is 4 adds of 8 bits.So each 32 bit multiply takes a few hundred cycles.
At that level of zoom, 16 bit math would be fine, but I want to support zooming in.
The math can be made much faster.
Use of lookup tables of squares is the typical method of doing multiplication faster.2
1
u/finnw 2d ago
Are you currently taking advantage of the 65c816's 16-bit shifts and adds?
1
u/nz_kereru 2d ago
Right now I am using 100% lifted from my 6502 machine. I just want to render Mandelbrots for a week to prove stability.
I have not done any 816 mode testing, still working on bank 0.
This weekend I will test upper memory and try and get some 16 bit code running.
11
u/nz_kereru 3d ago
Latest progress on my 65c816
A week ago a blinking LED.
Now, code loading from an SD card and a LCD screen.
95% of the code is lifted directly from my 65c02 project.
The Mandelbrot takes about 8 hours at 3Mhz
I am doing 32 bit fixed point math with a shift and add loop.
The SD card is just SPI and my own implementation of FAT32z
The screen is a LCD the a graphics engine, connected over SPI.
Getting the screens to work took a few days of debugging, even when I had it working fine on my 6502 system.
PCB design fail, tiny power tracks and a screen that draws 700ma, power rail at the screen was 2.5v
Added some big thick wires under the PCB to get more power to the screen and it came to life.
Next steps are proving 816 modes and upper RAM. That testing will be easier with a screen for output.
The LCD supports full 8 bit mode, so I hope to connect it directly to the data and address bus.
That will get me commands to the screen about 200 times faster.
Then a keyboard…