Difference between revisions of "Express"

From LinuxMIPS
Jump to: navigation, search
m (Add a link to experimental kernels with XZ "support")
(Locations)
Line 10: Line 10:
 
* 0x1f400000
 
* 0x1f400000
 
* 0x1f600000
 
* 0x1f600000
 +
 +
TBD: Is it here in the same way as for Newport that Express does not give any GIO Product ID? How to identify the board on the bus?
  
 
=Commands=
 
=Commands=

Revision as of 11:59, 15 December 2008

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

Locations

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

  • 0x1f000000
  • 0x1f400000
  • 0x1f600000

TBD: Is it here in the same way as for Newport that Express does not give any GIO Product ID? How to identify the board on the bus?

Commands

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

Operations

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:

[GR2_FIFO_COLOR]=color;

Palette

Unknown.

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.

Character drawing

Set color, then:

First move character draw location to x,y

[GR2_FIFO_CMOV2I]=x
[GR2_FIFO_DATA]=y

Then set width and height of character:

[GR2_FIFO_DRAWCHAR]=8
[GR2_FIFO_DATA]=16

Some magic:

[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.

Moving blocks

This is giving a headache right now as all of the above seems to work just fine.

Other

Other operations will be added when we figure them out.

Patch/Kernel

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