Difference between revisions of "Express"

From LinuxMIPS
Jump to: navigation, search
m (Fixes)
m (Add a link to experimental kernels with XZ "support")
Line 4: Line 4:
 
* Copying rectangles "work" but the board gets stuck
 
* Copying rectangles "work" but the board gets stuck
  
==Locations==
+
=Locations=
 +
These are the possible locations where the XZ board can be found.
 +
 
 
* 0x1f000000
 
* 0x1f000000
 
* 0x1f400000
 
* 0x1f400000
 
* 0x1f600000
 
* 0x1f600000
  
==Commands==
+
=Commands=
  
 
Known commands locations into the engine FIFO are:
 
Known commands locations into the engine FIFO are:
Line 31: Line 33:
 
  DATA=paramX
 
  DATA=paramX
  
==Operations==
+
=Operations=
 
Currently know operations that work are the following:
 
Currently know operations that work are the following:
  
===Reading version===
+
==Reading version==
  
 
  rev0=ex_regs->bdversion.rd0 & GR2_REVISION_RD0_VERSION_MASK;
 
  rev0=ex_regs->bdversion.rd0 & GR2_REVISION_RD0_VERSION_MASK;
Line 40: Line 42:
 
  hqv=(ex_regs->hq.version & HQ2_VERSION_MASK) >> HQ2_VERSION_SHIFT;
 
  hqv=(ex_regs->hq.version & HQ2_VERSION_MASK) >> HQ2_VERSION_SHIFT;
  
===Setting color===
+
==Setting color==
  
 
All drawing operations need a color that it should use:
 
All drawing operations need a color that it should use:
Line 46: Line 48:
 
  [GR2_FIFO_COLOR]=color;
 
  [GR2_FIFO_COLOR]=color;
  
===Drawing a rectangle===
+
=== Palette ===
 +
Unknown.
 +
 
 +
==Drawing a rectangle==
  
 
First you must set the color and then:
 
First you must set the color and then:
Line 57: Line 62:
 
Y needs to be flipped as 0,0 is lower left corner.
 
Y needs to be flipped as 0,0 is lower left corner.
  
===Character draw===
+
==Character drawing==
  
 
Set color, then:
 
Set color, then:
Line 86: Line 91:
 
Be sure to padd up to 18, probably the max font height.
 
Be sure to padd up to 18, probably the max font height.
  
===Moving blocks===
+
==Moving blocks==
  
 
This is giving a headache right now as all of the above seems to work just fine.
 
This is giving a headache right now as all of the above seems to work just fine.
  
===Other===
+
==Other==
 
Other operations will be added when we figure them out.
 
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 [http://home.tal.org/~milang/o2/kernels/ onion's kernels page.]

Revision as of 06:38, 18 August 2005

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

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.