This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
notes:comporg:spring2025:virconref [2025/02/27 16:25] – [ILT] wedge | notes:comporg:spring2025:virconref [2025/03/02 03:43] (current) – [GPU] tkastne1 | ||
---|---|---|---|
Line 167: | Line 167: | ||
^ Type ^ Port ^ Name ^ Description | ^ Type ^ Port ^ Name ^ Description | ||
| OUT | 0x200 | GPU_Command | | OUT | 0x200 | GPU_Command | ||
- | | | + | | |
+ | | IN | 0x202 | GPU_ClearColor | ||
| OUT | 0x202 | GPU_ClearColor | | OUT | 0x202 | GPU_ClearColor | ||
- | | | + | | |
- | | | + | | |
+ | | IN | 0x204 | GPU_ActiveBlending | ||
+ | | OUT | ||
| IN | 0x204 | GPU_SelectedTexture | | IN | 0x204 | GPU_SelectedTexture | ||
| OUT | 0x204 | GPU_SelectedTexture | | OUT | 0x204 | GPU_SelectedTexture | ||
| IN | 0x205 | GPU_SelectedRegion | | IN | 0x205 | GPU_SelectedRegion | ||
| OUT | 0x205 | GPU_SelectedRegion | | OUT | 0x205 | GPU_SelectedRegion | ||
+ | | IN | 0x206 | GPU_DrawingPointX | ||
| OUT | 0x206 | GPU_DrawingPointX | | OUT | 0x206 | GPU_DrawingPointX | ||
+ | | IN | 0x207 | GPU_DrawingPointY | ||
| OUT | 0x207 | GPU_DrawingPointY | | OUT | 0x207 | GPU_DrawingPointY | ||
- | | | + | | |
- | | | + | | OUT |
- | | | + | | |
+ | | OUT | ||
+ | | | ||
+ | | OUT | 0x20A | GPU_DrawingAngle | ||
+ | | IN | 0x20B | GPU_RegionMinX | ||
| OUT | 0x20B | GPU_RegionMinX | | OUT | 0x20B | GPU_RegionMinX | ||
+ | | IN | 0x20C | GPU_RegionMinY | ||
| OUT | 0x20C | GPU_RegionMinY | | OUT | 0x20C | GPU_RegionMinY | ||
+ | | IN | 0x20D | GPU_RegionMaxX | ||
| OUT | 0x20D | GPU_RegionMaxX | | OUT | 0x20D | GPU_RegionMaxX | ||
+ | | IN | 0x20E | GPU_RegionMaxY | ||
| OUT | 0x20E | GPU_RegionMaxY | | OUT | 0x20E | GPU_RegionMaxY | ||
+ | | IN | 0x20F | GPU_RegionHotspotX | ||
| OUT | 0x20F | GPU_RegionHotspotX | | OUT | 0x20F | GPU_RegionHotspotX | ||
+ | | IN | 0x210 | GPU_RegionHotspotY | ||
| OUT | 0x210 | GPU_RegionHotspotY | | OUT | 0x210 | GPU_RegionHotspotY | ||
| | ||
Line 461: | Line 475: | ||
In this case, we are testing if the first operand is less than or equal to the second operand. | In this case, we are testing if the first operand is less than or equal to the second operand. | ||
- | |||
- | ===NOTE=== | ||
- | For the purposes of comparisons and conditional jumps on Vircon32: | ||
- | |||
- | * true is 1 (technically non-zero) | ||
- | * false is 0 | ||
- | |||
- | There are six relational operations: | ||
- | |||
- | * is equal to | ||
- | * is not equal to | ||
- | * is less than | ||
- | * is than or equal to | ||
- | * is greater than | ||
- | * is greater than or equal to | ||
===Structure and variants=== | ===Structure and variants=== | ||
Line 544: | Line 543: | ||
====LEA==== | ====LEA==== | ||
Load Effective Address of a memory position. | Load Effective Address of a memory position. | ||
- | |||
- | ===Addressing=== | ||
- | LEA, like other data-centric instructions, | ||
- | |||
- | * **register**: | ||
- | * **immediate**: | ||
- | * **indirect**: | ||
- | * **indexed**: | ||
- | * **immediate**: | ||
- | * **indexed**: | ||
- | * **register**: | ||
- | |||
- | Indirect processing is accomplished with the **< | ||
===Structure and variants=== | ===Structure and variants=== | ||
Line 765: | Line 751: | ||
===Structure and variants=== | ===Structure and variants=== | ||
^ Variant | ^ Variant | ||
- | | 1 |<nowiki>AND DSTREG, ImmediateValue</ | + | | 1 |<code asm>AND DSTREG, ImmediateValue</ |
- | | 2 |<nowiki>AND DSTREG, SRCREG</nowiki> |<nowiki>DSTREG = DSTREG & SRCREG;</ | + | | 2 |<code asm>AND DSTREG, SRCREG</code> |<code c>DSTREG = DSTREG & SRCREG;</ |
===Description=== | ===Description=== | ||
Line 785: | Line 771: | ||
===Structure and variants=== | ===Structure and variants=== | ||
^ Variant | ^ Variant | ||
- | | 1 |<nowiki>OR DSTREG, ImmediateValue</ | + | | 1 |<code asm>OR DSTREG, ImmediateValue</ |
- | | 2 |<nowiki>OR DSTREG, SRCREG</nowiki> |<nowiki>DSTREG = DSTREG | SRCREG;</ | + | | 2 |<code asm>OR DSTREG, SRCREG</code> |<code c>DSTREG = DSTREG | SRCREG;</ |
===Description=== | ===Description=== | ||
- | OR performs a **Bitwise | + | OR performs a **Bitwise |
- | operands. The result is stored in the first of them, which is always a register. | + | |
====XOR==== | ====XOR==== | ||
Line 805: | Line 790: | ||
===Structure and variants=== | ===Structure and variants=== | ||
^ Variant | ^ Variant | ||
- | | 1 |<nowiki>XOR DSTREG, ImmediateValue</ | + | | 1 |<code asm>XOR DSTREG, ImmediateValue</ |
- | | 2 |<nowiki>XOR DSTREG, SRCREG</nowiki> |<nowiki>DSTREG = DSTREG ^ SRCREG;</ | + | | 2 |<code asm>XOR DSTREG, SRCREG</code> |<code c>DSTREG = DSTREG ^ SRCREG;</ |
===Description=== | ===Description=== | ||
Line 829: | Line 814: | ||
===Structure and variants=== | ===Structure and variants=== | ||
- | * < | + | ^ Variant |
- | * < | + | | 1 |< |
- | + | | 2 |< | |
- | ===Processing actions=== | + | |
- | * < | + | |
- | * < | + | |
===Description=== | ===Description=== | ||
SHL performs an bit shift to the left in the specified register. The second operand is | SHL performs an bit shift to the left in the specified register. The second operand is | ||
- | taken as an integer number of positions to shift. Shifting 0 positions has no effect, while | + | taken as an integer number of positions to shift. |
- | negative values result in shifting right. The shift type is logical: in shifts left, overflow is | + | |
- | discarded and zeroes are introduced as least significant bits. In shifts right, underflow is | + | Shifting 0 positions has no effect, while negative values result in shifting right. |
- | discarded and zeroes are introduced as most significant bits. | + | |
+ | The shift type is logical: in shifts left, overflow is discarded and zeroes are introduced as least significant bits. | ||
+ | |||
+ | In shifts right, underflow is discarded and zeroes are introduced as most significant bits. | ||