|
I thought CoCo users would be interested in this. On the other forum, I got "pixels are too fat", or "it won't work".
So, one more go.
The 256 color graphics mode possible with a composite display does not require any page flipping. No machine language at all actually. Just basic. When you do it, the resolution is 160x192x256. One byte per pixel.
The key lies in how composite video displays generate color. On the old CoCo 2, for example, 4 colors could be obtained in the 256x192 2 color mode, by plotting even pixels only, or odd pixels only. You would get red and blue doing that.
On the CoCo3, the 320x192x16 mode is the best one for generating lots of colors on a composite display. Because of the limitations on color inherent in composite, and because of how the GIME generates it's color signal, TWO 320x192x16 pixels blend together to deliver 160x192x256!
All you need to do is set the 320x192x16 pixel mode, then either in BASIC plot two pixels at a time, or if you want to do machine language for the 6809, you treat each byte as a pixel, and code accordingly!
That's it!
The actual colors produced depend on the palette defined for the 320x192x16 mode. This means you get 256 colors at a time, on screen at 160x192x256 resolution, selected from a larger pool of colors, available with each palette combination possible with the 320x192x16 mode.
When I owned one of these computers, I often used this graphics mode to display lots of colors for fractals and pictures. I'm only posting it because I see some interest in the CoCo after the great Donkey Kong port, and because I've not ever seen this mentioned!
Many game machines of the time worked at 160 pixel resolution.
I figured the easy addressing, plus the higher amount of colors, might be of interest to those working on game ports and such. Most of the Atari games, for example, could be done at the same resolution (most of them were 160), but have much better color use, as the CoCo can use any of the 256 anywhere, where most other machines cannot, and also require tricks.
Doing graphics this way means straight up code for working with the screen, no interrupts and such necessary.
One graphics screen is 30K. Leaving plenty of room to do stuff, particularly in an expanded CoCo.
Again, it's just the 320 pixel mode, running on composite, treating one byte of screen memory as one pixel. A simple plot of all the 256 combinations will reveal colors not in the standard palette.
This won't work with RGB, nor will it work if the computer has been modified to do s-video, for example. You need a composite, baseband video display for it to work. Your TV will serve nicely.
|