Programming Bitmap Graphics - Agon Light using C
HTML-код
- Опубликовано: 11 май 2024
- Get the code: github.com/nco...
Support the channel: ncot.uk/support
Visit the website: ncot.uk
In this video I look at how you can program the Agon Light to display bitmap images using C. I go through how to convert a PNG image into an RGB2222 format bitmap image, and then use the C library functions to load that into the Agon Light, and the VPD commands necessary to display this on the screen.
The end result is a fairly pretty scrolling text routine that demonstrates how to draw multiple bitmaps to the Agon Light's display using VDP commands.
This builds on my previous Agon Light C Programming video where I explained how the Agon Light's screen works, and how to draw lines and shapes.
----
Music I use: www.bensound.com
License code: 89GUMYPSNGHK77J3
#programming #cprogramming #agonlight #retrocomputer
Well done. Just acquired an Agon Light myself, and everything you are doing is right on point. I appreciate the struggles with programming pitfalls: rabbit holes, failing your way to insight, build your own vs use a library, the territory is all familiar. Best wishes.
Ok we wrote about 150 lines of code and got wiggly text? Or did we???? I have just figured out why I like this channel: we all know the "give a man a fish/ teach a man to fish" paradigm that we use to justify not sending enough fish. Well this channel takes another step into abstraction by teaching the man how to LEARN to fish! Then we don't need to send him grain either. Nice one.
I mean that is all philosophy is.
Great video! I'm a bit surprised that the VDU bitmap commands don't have a way to draw a subset of the bitmap, so that the font could be stored in a single bitmap and then drawing a character involves drawing a piece of that image. I imagine there is a lot of overhead to having one VDU bitmap per character.
I'm sure they will at some point, I think affine transformations are being worked on. Does feel a bit clunky needing one bitmap per character.
The Console8 version of the firmware moves fast, every time I update my machine there's new stuff to play with :)
Ello James! Loving that groovy shirt!
Get your own from your favourite Chinese clothing store with dubious quality control. 😄
@@ncot_tech And you can blend in so well at your local BBQ or retro gaming event curry. We need to arrange another one at some point.
If you do get a scrolling background working on your Agon Light, then you could try writing some kind of platform shooter thing. Always wanted to see whether the Agon Light could run some kind of indie game like that. Also a four bit alpha channel seems very wrong - basically you've got on and off, and 1/3 and 2/3 transparency. Hardly seems worth having an alpha channel for that. Reminds me of the time that you had 8-bit R3G3B2 and 16-bit R5G5GBA1 format graphics on certain machines which seemed quite odd ways of representing colour pixel colouring....
The alpha channel is actually just on or off, so you can have transparent backgrounds. Any value for alpha that is non-zero means visible (I think)