Hi cbmeeks, I recognize your username because I looked at your repo a couple of weeks ago![]()
I started with the Hunter Adams code as well (actually, Bruce Land, another Cornell prof, made an 8-bit fork of Adams VGA code), which is how I came across your repo (googling for certain lines of code to find other forks).
I just wanted to mention that I ended up switching to Miroslav Nemecek's PicoQVGA PIO implementation as the basis of my VGA implementation (this is a simpler version of his PicoVGA). His repo is C++, and he doesn't use CMake, so I just grabbed his PIO + initialization code and ported some of his drawing functions (and I added double buffering).
I think it was a worthwhile switch, because he managed to cram the entire VGA implementation into just one PIO, whereas Adams uses 3 (though Adams has an entire lecture on how his code works, which is fantastic https://www.youtube.com/watch?v=ZXMdZGQ ... Z&index=18).
Anyway, Nemecek's code is a great lesson in how to code efficiently, definitely worth taking a look. https://www.breatharian.eu/hw/picoqvga/index_en.html
Thank you for the information!
I think I have unofficially abandoned that PicoVGA project as I have also found a better way.
https://github.com/cbmeeks/PicoVic
My current repo uses code I pulled from Troy Schrapel's Pico-56 https://github.com/visrealm/pico-56 repo which emulates a TMS9918.
However, I have not used his complete implementation. I have added my own modes, etc using his driver.
My new repo (the PicoVic) now has:
320x240 pixels.
Palletized colors (256 of them).
Each palette color can be changed to any of the 4,096 colors.
40x30 character fonts (using PETSCII at the moment).
Each character can be any of the 256 palette colors for foreground or background.
Basic 320x240 framebuffer mode where each pixel can be any of the 4,096 colors.
Sprites! Each sprite is 16 pixels wide and any arbitrary height (memory permitting). I am drawing 64 sprites on screen smoothly with up to "20 ish" sprites per scanline.
Sprites are FOUR COLOR just like the NES with each sprite being able to pick it's own palette. This is the same way the NES draws sprites and saves memory.
Tiles are 16x16. Tiles are also 4 color like sprites and they have their own palettes. Each tile can have it's own palette number.
My goal is to emulate (not reproduce) the graphics system of the NES but with more sprites, more colors, etc. The NES had a great way of rendering graphics that saved lots of memory.
I will certainly check out the repos you mentioned. I'm always looking for better code!
Thanks! (sorry about the long rant on my new project...lol)
Statistics: Posted by cbmeeks — Mon Jul 08, 2024 12:57 pm