From LinuxMIPS
Revision as of 06:59, 8 October 2010 by Onion (talk | contribs) (→‎Patch/Kernel)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

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


These are the possible locations where the XZ board can be found.

  • 0x1f000000
  • 0x1f400000
  • 0x1f600000


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:



Currently know operations that work are the following:

Reading version

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;

Setting color

All drawing operations need a color that it should use:




Drawing a rectangle

First you must set the color and then:


Y needs to be flipped as 0,0 is lower left corner.

Character drawing

Set color, then:

First move character draw location to x,y


Then set width and height of character:


Some magic:


Then plot the character, bottom first:

loop for font height:

Be sure to padd up to 18, probably the max font height.

Moving blocks

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.


No patches just yet. Kernel with sort-of-maybe-working-console can be found from time to time at onion's kernels page.