Updated 1080p 2bpp tiled VGA driver
Rayman
Posts: 14,385
in Propeller 2
Here's a way to save big on HUB Ram for the cost of a few cogs.
This is kind of the P1 way, but much better with 256 colors to choose from.
This has been neglected for a long time and needed updating badly.
Now works with Prop Tool, Spin Tools IDE, and FlexProp.
Was developed using what is now FlexProp, way before the Prop Tool supported P2.
Here are few demos to show how to use it.
Comments
Here are screenshots of them working
The mixed signal scope can be useful for looking at P2 pins.
Top two are in analog mode and bottom six are in digital mode.
One can also play around with smartpin settings.
Also the View/Set Pins button is interesting.
Here are some pics to show how to use them with Eval or SimpleP2++ boards.
Way it works is the screen is divided into 120 columns and 68 rows of 16x16 pixel tiles (only top half of lowest row is visible).
Each tile has a pointer that either points to an embedded font character or optionally, to 2bpp graphics area.
Each tile also has a set of four colors (this is two bits per pixel, so each pixel in a tile can only be one of these four colors), from a selection of 256 colors.
The 256 color palette can be changed, if needed, but the current ones should work for most cases.
Multiple fonts are supported, but showing that needs some archeology. Addition of special characters to the fonts are also supported.
When used without graphics, the hub ram footprint is very small, considering it is in 1080p.
It needs 3 cogs (5,6,&7) for regular use and 4 cogs when graphics are needed. Note that cogs 6&7 share their LUT, so have to be adjacent.
There is a special, cogless form of the graphics driver that uses free cycles on one of the VGA cogs. But, this only works with FlexProp at the moment, so is not shown here.
Very usefull. Also love that you added some pictures herr on the forum
Looks good. Thanks for updating it!
Ross.
Wonderful that but where do you define the pins to use.
This can be a challenge, right? Why the SimpleP2 board might make things easier, where the pins are constant.
Anyway, for the 1080p_TileDriver_MixedScopeDemo, the USB basepin is defined in 1080p_TileDriver_MixedScopeDemo.spin2, here:
The VGA basepin is defined in VGA_1080p_8c, here:
I think that's all you need for that one...
This is assuming you have a P2 Eval type setup, using the accessory boards on groups of 8 pins with the lowest pin being the basepin...