Old school 3-D Vector Gaphics on new system
Posted: Wed Apr 02, 2014 7:13 pm
I am fascinated by computer graphic algorithms based on integers. Forgive the self-indulgence, this will be a pic/code/video heavy thread based on the mild success of the Parallel Video Board system that is outputting 1920x1080 video @60Hz with 65K colors. It is highly programmable and it's not finished yet but it is outputting some neat stuff which I'd like to show off here.
Did I mention I like math? Specifically geometry and less so trigonometry. I had a great 6th grade geometry teacher. Things clicked in my brain back then which I remember to this day. Also things I remember from plotting graphics in Atari 800 BASIC over 20 years ago which was maybe 2-3 years after the 6th grade. Also, vector graphic games like Star Wars were a huge inspiration.
Most of the stuff I post is meant for inspiration. Sometimes I know it is too much detail oriented, especially the code. But if it inspires one person then that's a good thing.
The PVB currently has 2 16Kx11 blockRAMs which are meant for X and Y plot scratchpad information for the cpu which is a 65Org16.b. It's basically a 16-bit 6502 with some bells and whistles.
There is also a 10-bit hardware sine LUT present inside the FPGA. The cpu outputs a phase number from 0 to 1023 into that module, and awaiting on the cpu bus is the sinewave data.
The reason for 11-bits in the blockRAMs and 10-bit sine LUT, is so that one can add offsets to the sine LUT data and just plot the values from the scratchpad BRAMs within the 1920x1080 grid. I had wrestled with making the scratchpad BRAMs only 10-bits wide, but the software got messy trying to place waveforms with offsets.
Did I mention I like math? Specifically geometry and less so trigonometry. I had a great 6th grade geometry teacher. Things clicked in my brain back then which I remember to this day. Also things I remember from plotting graphics in Atari 800 BASIC over 20 years ago which was maybe 2-3 years after the 6th grade. Also, vector graphic games like Star Wars were a huge inspiration.
Most of the stuff I post is meant for inspiration. Sometimes I know it is too much detail oriented, especially the code. But if it inspires one person then that's a good thing.
The PVB currently has 2 16Kx11 blockRAMs which are meant for X and Y plot scratchpad information for the cpu which is a 65Org16.b. It's basically a 16-bit 6502 with some bells and whistles.
There is also a 10-bit hardware sine LUT present inside the FPGA. The cpu outputs a phase number from 0 to 1023 into that module, and awaiting on the cpu bus is the sinewave data.
The reason for 11-bits in the blockRAMs and 10-bit sine LUT, is so that one can add offsets to the sine LUT data and just plot the values from the scratchpad BRAMs within the 1920x1080 grid. I had wrestled with making the scratchpad BRAMs only 10-bits wide, but the software got messy trying to place waveforms with offsets.