Thanks to NetBSDs GR2 driver we have out that HQ2.1 is a kind of successor of the HQ2 found in the Indigo(IP12), and at least partialy compatible. Version information can be read in the same way and tests have shown that:
- Drawing colored rectangles work
- Drawing characters work
- Copying rectangles "work" but the board gets stuck
Known commands locations into the engine FIFO are:
#define GR2_FIFO_INIT 0x191 #define GR2_FIFO_COLOR 0x192 #define GR2_FIFO_FINISH 0x193 #define GR2_FIFO_PNT2I 0x194 #define GR2_FIFO_RECTI2D 0x195 #define GR2_FIFO_CMOV2I 0x196 #define GR2_FIFO_LINE2I 0x197 #define GR2_FIFO_DRAWCHAR 0x198 #define GR2_FIFO_RECTCOPY 0x199 #define GR2_FIFO_DATA 0x1df
Most commands seems to work like this:
"LOCATION"=param0 DATA=param1 DATA=param2 .... DATA=paramX
Currently know operations that work are the following:
rev0=ex_regs->bdversion.rd0 & GR2_REVISION_RD0_VERSION_MASK; rev1=ex_regs->bdversion.rd1 & 0x03; hqv=(ex_regs->hq.version & HQ2_VERSION_MASK) >> HQ2_VERSION_SHIFT;
All drawing operations need a color that it should use:
Drawing a rectangle
First you must set the color and then:
[GR2_FIFO_RECTI2D]=x1; [GR2_FIFO_DATA]=y1; [GR2_FIFO_DATA]=x2; [GR2_FIFO_DATA]=y2;
Y needs to be flipped as 0,0 is lower left corner.
Set color, then:
First move character draw location to x,y
Then set width and height of character:
[GR2_FIFO_DATA]=2; [GR2_FIFO_DATA]=0; [GR2_FIFO_DATA]=0; [GR2_FIFO_DATA]=0; [GR2_FIFO_DATA]=0; [GR2_FIFO_DATA]=0;
Then plot the character, bottom first:
loop for font height: [GR2_FIFO_DATA]=pattern
Be sure to padd up to 18, probably the max font height.
This is giving a headache right now as all of the above seems to work just fine.
Other operations will be added when we figure them out.