How to use PIX when using lower than 32bit display.
![Baggers](https://forums.parallax.com/uploads/userpics/316/nM38GQVOEYVFZ.gif)
This is my first look into the PIX hardware, and my first finding was that when using 16bit graphics, the PIX engine could only output 32bit.
So to allow it to render to a 16bit bitmap, either needed you to rejig every long that came out of each GETPIX instruction, which would take a few instructions.
So to speed things up, I decided, using my method, we could remove the RGBA blending, and set Alpha to 255, and rejig the pixel data going into GETPIX,
ie, for mode $0d, you would use
TexturePalette long $ff000000+(REDVALUE>>3<<11)+(GREENVALUE>>2<<5)+(BLUEVAL>>2)
etc... This would set the 16bit value into the G and B of the 32bit value for PIX, so if no blending or colour multiplication is added, these 16bit values won't change, when they come out the GETPIX, and keep it fast!
I've attached a DE2 example ( Sorry Coley ) that has one cog displaying the Composite display, which has a framesync indicator in hub-ram at $7ffc and a bordercol in hubram also, and the monitor in cog1, and the JBRender cog in cog2 filling the 16bit display with the famous beanie
re-setting the PIXvars each scanline.
Now that I've got this sorted, I will next move onto getting it to render something creative, like a poly![:) :)](https://forums.parallax.com/resources/emoji/smile.png)
BaggersNPotatoheads_16_bit_graphics_driver_NTSC.spin
So to allow it to render to a 16bit bitmap, either needed you to rejig every long that came out of each GETPIX instruction, which would take a few instructions.
So to speed things up, I decided, using my method, we could remove the RGBA blending, and set Alpha to 255, and rejig the pixel data going into GETPIX,
ie, for mode $0d, you would use
TexturePalette long $ff000000+(REDVALUE>>3<<11)+(GREENVALUE>>2<<5)+(BLUEVAL>>2)
etc... This would set the 16bit value into the G and B of the 32bit value for PIX, so if no blending or colour multiplication is added, these 16bit values won't change, when they come out the GETPIX, and keep it fast!
I've attached a DE2 example ( Sorry Coley ) that has one cog displaying the Composite display, which has a framesync indicator in hub-ram at $7ffc and a bordercol in hubram also, and the monitor in cog1, and the JBRender cog in cog2 filling the 16bit display with the famous beanie
![:D :D](https://forums.parallax.com/resources/emoji/lol.png)
Now that I've got this sorted, I will next move onto getting it to render something creative, like a poly
![:) :)](https://forums.parallax.com/resources/emoji/smile.png)
BaggersNPotatoheads_16_bit_graphics_driver_NTSC.spin
Comments
Edit: my trick should also work on lower 8bit 4bit etc displays.