At the end of January, I posted A Start to Video Output for My 65816, where I built a stackable dual-port SRAM PCB that could later be used with my VGA 2.0 card. Well, it's now later. :) I have the first control of video pixels from my 65816 working! I'm pretty stoked.
My last major 65816 post was 65816: VIA1 Working. Since then, I have stepped my 65816 up to 8 MHz. I have also been able to get a basic video circuit working at 320x240x1B, reading an image from a ROM. See The Obligatory Gouldian Finch Post.
Today, I pulled the ROM from my video circuit and connected a single dual-port SRAM in its place. I also connected the SRAM to my 65816.
Yes, my wiring is a mess (and is too long, especially for the desired clock speeds) and is limiting the speed at which I can run the video circuit. But, I wanted to quickly see if the basic functionality would even work, even at slower speeds.
I added three 32Kx8 dual-port SRAMs to my 65816 schematic. I physically connected only one to the 65816, but adding the other two (maybe three) SRAMs is as easy as clicking them onto the stack, connecting power and six enable lines per PCB. I have all the glue logic in place to support the full stack of SRAM. I added a 74138 3-to-8 decoder to the 65816 and another to the video circuit to facilitate address decoding and accessing multiple SRAMs. The following schematics are probably eye charts, especially the first one, but hopefully, it gives you the idea. I need to clean the schematics up a bit.
It's late, and I'm about to turn into a pumpkin. I didn't have a lot of energy to write some nice 65816 assembly to clear the screen and do some fancy animation (well, for the part of the screen that has associated video RAM). Rather, I just wrote a quick loop that fills in white pixels and moves across the screen in a single row. Yes, exciting! :) And I know this is terrible assembly.
With this, I was able to validate that I could write to the dual-port SRAM from the 65816 easily, and the video circuit could simultaneously read the video memory. With this setup, the 65816 is not hamstrung by the video circuit, as it was in my 6502+VGA build. The processor can write to video memory at any point and continue with other tasks; meanwhile, the video circuit can concurrently draw from that video memory. The 65816 and the video circuit have independent clocks and timing. I'm loving dual-port memory! And it all came together (up to this point) faster than I was expecting.
Next Steps
The long ribbon cables, high up off the board, are not friendly to the video circuit. I'm going to see how much I can clean them up.
Improve power distribution. The SRAM is pulling power from the lower right of my 65816 PCB. This is far from the power input (upper left), and the 65816 board is only a two-layer board with 0.2544mm traces.
The location it's drawing at on the screen doesn't match what I would expect. I probably have some wires crossed somewhere, lol.
I'll see how fast I can increase the clock speed. Right now, due to the wiring, it's running at sub-kHz. I am fairly confident this is purely due to the ribbon cabling and power distribution to the SRAM, as the 65816 and video circuits both run at nice speeds independently.
I'll connect two or three more SRAM PCBs to the stack so that I can cover the entire video memory space.
I need to get back into 65xxx assembly programming and refactor some of my previous graphics work over to this setup. With that, I need to learn more about 65816 programming specifics.
I haven't added my extended RAM to the 65816 yet, but I think that should be pretty straightforward at this point.
I may need to get to a PCB version of this setup soon. This might mean it's time to get a design completed for my 65816 motherboard and a full video add-in card.
This is awesome - port Super Mario World over :D