A concept for sprite hardware
Posted: Fri Aug 15, 2025 9:27 am
Hi there! first time posting here
I've been (slowly) working on my own 65c816 based computer, I got the CPU running in a prototype breadboard a little while ago, and have tested some other things (keyboard adapter, SD card, UART, and basic VGA output) with a 65c02 based machine, but now I've had an idea for sprite hardware for a potential graphics stack for the actual machine I'd like to build. I'm not sure anyone else has taken this approach before but it seems like it would let me render potentially 256 independent sprites without needing to duplicate a bunch of hardware (my biggest gripe with many of the simple ones I've seen)
The data flow would be as follows: The sprite reader reads data from the sprite attribute memory, and does a vertical check with the height and size information (present in the first fetched word), if this sprite would be visible on the *next* scanline (it works one scanline ahead of time) more data is read, processed, and passed to the sprite renderer (the X position, width, horizontal flip information, palette nybble, and the starting location in the sprite graphics memory) which renders out the sprite into the back side of the single-line double buffer
I've made a simulation of the overall approach, it doesn't currently fit actual real-life chips or their timing requirements, naturally, but it does work well enough for me to have some faith in the approach, here's a debug view (blue channel is renderer active, green channel is reader active, red channel is reader "stalled" (for reading further sprite information / waiting for the renderer), and intensity is used as an alpha mask for sprites in the output) and actual output: If anyone has any thoughts on this approach, or examples of it being done before, that would be greatly appreciated
I've been (slowly) working on my own 65c816 based computer, I got the CPU running in a prototype breadboard a little while ago, and have tested some other things (keyboard adapter, SD card, UART, and basic VGA output) with a 65c02 based machine, but now I've had an idea for sprite hardware for a potential graphics stack for the actual machine I'd like to build. I'm not sure anyone else has taken this approach before but it seems like it would let me render potentially 256 independent sprites without needing to duplicate a bunch of hardware (my biggest gripe with many of the simple ones I've seen)
The data flow would be as follows: The sprite reader reads data from the sprite attribute memory, and does a vertical check with the height and size information (present in the first fetched word), if this sprite would be visible on the *next* scanline (it works one scanline ahead of time) more data is read, processed, and passed to the sprite renderer (the X position, width, horizontal flip information, palette nybble, and the starting location in the sprite graphics memory) which renders out the sprite into the back side of the single-line double buffer
I've made a simulation of the overall approach, it doesn't currently fit actual real-life chips or their timing requirements, naturally, but it does work well enough for me to have some faith in the approach, here's a debug view (blue channel is renderer active, green channel is reader active, red channel is reader "stalled" (for reading further sprite information / waiting for the renderer), and intensity is used as an alpha mask for sprites in the output) and actual output: If anyone has any thoughts on this approach, or examples of it being done before, that would be greatly appreciated