Difference between revisions of "Express"
(Add some ZX information) |
m (Fixes) |
||
| Line 1: | Line 1: | ||
| − | 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 | + | 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== |
| − | + | * 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; | |
| − | + | ||
| − | + | ||
| − | + | ===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 draw=== | |
| − | + | 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=== | ||
Other operations will be added when we figure them out. | Other operations will be added when we figure them out. | ||
Revision as of 22:52, 14 February 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
Contents |
Locations
- 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;
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 draw
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.