Uzebox is basically a ATMEGA644 and a AD725 RGB to PAL/NTSC convertor
As you could see from the site, its be designed as a game console with 256 colours and 3 chan sound.. its not a library but I think the core files are available for game writers, not for the faint hearted though
I have seen some other projects involving multiple simultaneous colours, which can be done on the 328/644/1284 but doesnt leave much room for calculation of any shapes outside of the routine that draws the TV picture
essentially, 25 or 30 times a second the picture is updated and the core/time required to do this takes up a large proportion of the processor time. There are small opportunities to do 'outside' calculations, the main one being on VSync Flyback, and a tiny bit of time after each line is drawn before the next is started
I have been thinking seriously about creating a video library for the MapleDuino (128k version)
I reckon at least 8 simultaneous colours could be created on a 256*128 res screen, its always a trade off of res against colours when the limiting factor is RAM of which the Mapleduino has 20k
If creating monochrome : 400 * 300 = 120,000 pixels, or 15,000 bytes of Ram
If creating eight colour : 256128 = 32,768 pixels, or 4096 bytes of ram/RGB colour, 40963 = 12,288 bytes
I also think there would be plenty of processor overhead to be able to stitch in some pretty good 32-bit graphics handling and some external comms too
The AtMega1284 has 16k of Ram, which is pretty handy for creating a 2561288 colour screen, I just wonder if it is possible to decode the RGB format on the fly for each line running at 16mHz
I have been using 32mHz on a 128961 colour mainly to increase the useful quiet-time of the processor
The changes are in hardware, I just added one cmos/ttl chip and some res/caps and sent the signal out via a VGA connector rather than the composite (phono type plug) signal that is currently being used for TVout
I hope someone else tries this, it works and is pretty awesome !
I used 3 PWMs on the UNO to drive 3 separate 100R & 10uf charge pumps, one for red/green/blue respectively. The resultant voltage levels of these charge pumps was fed into one side of a 4066 transmission gate (3 needed, although there are 4 in the chip). The gate of the 4066 is driven by the raw TV signal derived from pin 13. Each of the outputs of the transmission gates feed the VGA signal (R/G/B) via 470R resistors. The VGA needs to have a composite sync made up of both H & V syncs, this comes from UNO pin 15 via a 1k resistor into the VGA connector. Dont forget to connect the correct GND signals on the VGA connector.
See attached circuit for more information
The PWMs can be driven as normal to give the correct R/G/B out put on the screen
The downside of this is that the TV can only output ONE colour at a time, but I think you will find this is better than just white all the time. The possibilities of this will give you 24bit colour !!!
Looks like I am going to make a major rewrite of my TVout to include colour, created in two different ways
(1) up to 12 colours on screen at once
(2) split screen colour based on 24bit colour format
After working on smaller chips with baby timers and little ram (i.e ATTINY13a) and still able to get working colour video out, I am sure I can do a pretty good job for the 328/1284
Also I am working on RGB-to-composite conversion using the AD725 chip, this way I can run the output into a standard TV (up till now I have been using the VGA input on projectors, but I think this is more luck than judgment !!
I am revisiting this project for a private application, although I will rewrite the library to suit 8 colours simultaneously at 128*96
Still usable for the 8 bit series, but obviously wont be 8 colours mapped for 12896 as there isnt enough ram
There is still potential ram to have some fun with a STM32 which could probably manage 256192 in 8 colours quite easily with 20k ram
Anyway, I have a nice stock of AD725 now, so I am going to replan my original 24bit colour version to reduce to 8 colour but with a 256 step brightness
I still never got to the bottom of the full VGA version, so what I had was just RGB running a projector via the VGA socket which worked fine, but now I am going to simplify back to just a single Composite (phono) output
HERE is where I currently up to, and is perfectly usable