We've just updated MediaWiki and its underlying software. If anything doesn't look or work quite right, please mention it to us. --RanAS
Super FX Opcode Matrices: Difference between revisions
From SnesLab
(added DEC) |
(→ALT1 = 0, ALT2 = 1: added MULT) |
||
Line 92: | Line 92: | ||
| 7x || [[MERGE]] || || || || || || || || || || || || || || || | | 7x || [[MERGE]] || || || || || || || || || || || || || || || | ||
|- | |- | ||
| 8x || || || || || || || || || || || || || || || || | | 8x || [[MULT]] #0 || [[MULT]] #1 || [[MULT]] #2 || [[MULT]] #3 || [[MULT]] #4 || [[MULT]] #5 || [[MULT]] #6 || [[MULT]] #7 || [[MULT]] #8 || [[MULT]] #9 || [[MULT]] #10 || [[MULT]] #11 || [[MULT]] #12 || [[MULT]] #13 || [[MULT]] #14 || [[MULT]] #15 | ||
|- | |- | ||
| 9x || [[SBK]] || [[LINK]] #1 || [[LINK]] #2 || [[LINK]] #3 || [[LINK]] #4 || [[SEX]] || [[ASR]] || [[ROR (Super FX)|ROR]] || || || || || || || [[LOB]] || [[FMULT]] | | 9x || [[SBK]] || [[LINK]] #1 || [[LINK]] #2 || [[LINK]] #3 || [[LINK]] #4 || [[SEX]] || [[ASR]] || [[ROR (Super FX)|ROR]] || || || || || || || [[LOB]] || [[FMULT]] |
Revision as of 05:49, 25 May 2023
The Super FX has two prefix flags called ALT1 and ALT2 that alter the way the GSU interprets opcodes. These four opcode matrices will show which instruction actually runs depending on how those prefix flags are set.
ALT1 = 0, ALT2 = 0
x0 | x1 | x2 | x3 | x4 | x5 | x6 | x7 | x8 | x9 | xA | xB | xC | xD | xE | xF | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0x | STOP | NOP | CACHE | LSR | ROL | BRA | BGE | BLT | BNE | BEQ | BPL | BMI | BCC | BCS | BVC | BVS |
1x | TO R0 | TO R1 | TO R2 | TO R3 | TO R4 | TO R5 | TO R6 | TO R7 | TO R8 | TO R9 | TO R10 | TO R11 | TO R12 | TO R13 | TO R14 | TO R15 |
2x | ||||||||||||||||
3x | STW (R0) | STW (R1) | STW (R2) | STW (R3) | STW (R4) | STW (R5) | STW (R6) | STW (R7) | STW (R8) | STW (R9) | STW (R10) | STW (R11) | LOOP | ALT1 | ALT2 | ALT3 |
4x | PLOT | SWAP | COLOR | NOT | ||||||||||||
5x | ||||||||||||||||
6x | SUB R0 | SUB R1 | SUB R2 | SUB R3 | SUB R4 | SUB R5 | SUB R6 | SUB R7 | SUB R8 | SUB R9 | SUB R10 | SUB R11 | SUB R12 | SUB R13 | SUB R14 | SUB R15 |
7x | MERGE | AND R1 | AND R2 | AND R3 | AND R4 | AND R5 | AND R6 | AND R7 | AND R8 | AND R9 | AND R10 | AND R11 | AND R12 | AND R13 | AND R14 | AND R15 |
8x | ||||||||||||||||
9x | SBK | LINK #1 | LINK #2 | LINK #3 | LINK #4 | SEX | ASR | ROR | LOB | FMULT | ||||||
Ax | IBT R0 | IBT R1 | IBT R2 | IBT R3 | IBT R4 | IBT R5 | IBT R6 | IBT R7 | IBT R8 | IBT R9 | IBT R10 | IBT R11 | IBT R12 | IBT R13 | IBT R14 | IBT R15 |
Bx | FROM R0 | FROM R1 | FROM R2 | FROM R3 | FROM R4 | FROM R5 | FROM R6 | FROM R7 | FROM R8 | FROM R9 | FROM R10 | FROM R11 | FROM R12 | FROM R13 | FROM R14 | FROM R15 |
Cx | HIB | OR R1 | OR R2 | OR R3 | OR R4 | OR R5 | OR R6 | OR R7 | OR R8 | OR R9 | OR R10 | OR R11 | OR R12 | OR R13 | OR R14 | OR R15 |
Dx | INC R0 | INC R1 | INC R2 | INC R3 | INC R4 | INC R5 | INC R6 | INC R7 | INC R8 | INC R9 | INC R10 | INC R11 | INC R12 | INC R13 | INC R14 | GETC |
Ex | DEC R0 | DEC R1 | DEC R2 | DEC R3 | DEC R4 | DEC R5 | DEC R6 | DEC R7 | DEC R8 | DEC R9 | DEC R10 | DEC R11 | DEC R12 | DEC R13 | DEC R14 | GETB |
Fx | IWT R0, #xx | IWT R1, #xx | IWT R2, #xx | IWT R3, #xx | IWT R4, #xx | IWT R5, #xx | IWT R6, #xx | IWT R7, #xx | IWT R8, #xx | IWT R9, #xx | IWT R10, #xx | IWT R11, #xx | IWT R12, #xx | IWT R13, #xx | IWT R14, #xx | IWT R15, #xx |
ALT1 = 0, ALT2 = 1
x0 | x1 | x2 | x3 | x4 | x5 | x6 | x7 | x8 | x9 | xA | xB | xC | xD | xE | xF | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0x | STOP | NOP | CACHE | LSR | ROL | BRA | BGE | BLT | BNE | BEQ | BPL | BMI | BCC | BCS | BVC | BVS |
1x | TO R0 | TO R1 | TO R2 | TO R3 | TO R4 | TO R5 | TO R6 | TO R7 | TO R8 | TO R9 | TO R10 | TO R11 | TO R12 | TO R13 | TO R14 | TO R15 |
2x | ||||||||||||||||
3x | LOOP | ALT1 | ALT2 | ALT3 | ||||||||||||
4x | PLOT | SWAP | COLOR | NOT | ||||||||||||
5x | ||||||||||||||||
6x | SUB #0 | SUB #1 | SUB #2 | SUB #3 | SUB #4 | SUB #5 | SUB #6 | SUB #7 | SUB #8 | SUB #9 | SUB #10 | SUB #11 | SUB #12 | SUB #13 | SUB #14 | SUB #15 |
7x | MERGE | |||||||||||||||
8x | MULT #0 | MULT #1 | MULT #2 | MULT #3 | MULT #4 | MULT #5 | MULT #6 | MULT #7 | MULT #8 | MULT #9 | MULT #10 | MULT #11 | MULT #12 | MULT #13 | MULT #14 | MULT #15 |
9x | SBK | LINK #1 | LINK #2 | LINK #3 | LINK #4 | SEX | ASR | ROR | LOB | FMULT | ||||||
Ax | IBT R0 | IBT R1 | IBT R2 | IBT R3 | IBT R4 | IBT R5 | IBT R6 | IBT R7 | IBT R8 | IBT R9 | IBT R10 | IBT R11 | IBT R12 | IBT R13 | IBT R14 | IBT R15 |
Bx | FROM R0 | FROM R1 | FROM R2 | FROM R3 | FROM R4 | FROM R5 | FROM R6 | FROM R7 | FROM R8 | FROM R9 | FROM R10 | FROM R11 | FROM R12 | FROM R13 | FROM R14 | FROM R15 |
Cx | HIB | OR #1 | OR #2 | OR #3 | OR #4 | OR #5 | OR #6 | OR #7 | OR #8 | OR #9 | OR #10 | OR #11 | OR #12 | OR #13 | OR #14 | OR #15 |
Dx | RAMB | |||||||||||||||
Ex | DEC R0 | DEC R1 | DEC R2 | DEC R3 | DEC R4 | DEC R5 | DEC R6 | DEC R7 | DEC R8 | DEC R9 | DEC R10 | DEC R11 | DEC R12 | DEC R13 | DEC R14 | GETBL |
Fx | IWT R0, #xx | IWT R1, #xx | IWT R2, #xx | IWT R3, #xx | IWT R4, #xx | IWT R5, #xx | IWT R6, #xx | IWT R7, #xx | IWT R8, #xx | IWT R9, #xx | IWT R10, #xx | IWT R11, #xx | IWT R12, #xx | IWT R13, #xx | IWT R14, #xx | IWT R15, #xx |
ALT1 = 1, ALT2 = 0
x0 | x1 | x2 | x3 | x4 | x5 | x6 | x7 | x8 | x9 | xA | xB | xC | xD | xE | xF | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0x | STOP | NOP | CACHE | LSR | ROL | BRA | BGE | BLT | BNE | BEQ | BPL | BMI | BCC | BCS | BVC | BVS |
1x | TO R0 | TO R1 | TO R2 | TO R3 | TO R4 | TO R5 | TO R6 | TO R7 | TO R8 | TO R9 | TO R10 | TO R11 | TO R12 | TO R13 | TO R14 | TO R15 |
2x | ||||||||||||||||
3x | STB (R0) | STB (R1) | STB (R2) | STB (R3) | STB (R4) | STB (R5) | STB (R6) | STB (R7) | STB (R8) | STB (R9) | STB (R10) | STB (R11) | LOOP | ALT1 | ALT2 | ALT3 |
4x | RPIX | SWAP | CMODE | NOT | ||||||||||||
5x | ADC R0 | ADC R1 | ADC R2 | ADC R3 | ADC R4 | ADC R5 | ADC R6 | ADC R7 | ADC R8 | ADC R9 | ADC R10 | ADC R11 | ADC R12 | ADC R13 | ADC R14 | ADC R15 |
6x | ||||||||||||||||
7x | MERGE | |||||||||||||||
8x | UMULT R0 | UMULT R1 | UMULT R2 | UMULT R3 | UMULT R4 | UMULT R5 | UMULT R6 | UMULT R7 | UMULT R8 | UMULT R9 | UMULT R10 | UMULT R11 | UMULT R12 | UMULT R13 | UMULT R14 | UMULT R15 |
9x | SBK | LINK #1 | LINK #2 | LINK #3 | LINK #4 | SEX | DIV2 | ROR | LOB | FMULT | ||||||
Ax | IBT R0 | IBT R1 | IBT R2 | IBT R3 | IBT R4 | IBT R5 | IBT R6 | IBT R7 | IBT R8 | IBT R9 | IBT R10 | IBT R11 | IBT R12 | IBT R13 | IBT R14 | IBT R15 |
Bx | FROM R0 | FROM R1 | FROM R2 | FROM R3 | FROM R4 | FROM R5 | FROM R6 | FROM R7 | FROM R8 | FROM R9 | FROM R10 | FROM R11 | FROM R12 | FROM R13 | FROM R14 | FROM R15 |
Cx | HIB | |||||||||||||||
Dx | GETC | |||||||||||||||
Ex | DEC R0 | DEC R1 | DEC R2 | DEC R3 | DEC R4 | DEC R5 | DEC R6 | DEC R7 | DEC R8 | DEC R9 | DEC R10 | DEC R11 | DEC R12 | DEC R13 | DEC R14 | GETBH |
Fx | IWT R0, #xx | IWT R1, #xx | IWT R2, #xx | IWT R3, #xx | IWT R4, #xx | IWT R5, #xx | IWT R6, #xx | IWT R7, #xx | IWT R8, #xx | IWT R9, #xx | IWT R10, #xx | IWT R11, #xx | IWT R12, #xx | IWT R13, #xx | IWT R14, #xx | IWT R15, #xx |
ALT1 = 1, ALT2 = 1
x0 | x1 | x2 | x3 | x4 | x5 | x6 | x7 | x8 | x9 | xA | xB | xC | xD | xE | xF | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0x | STOP | NOP | CACHE | LSR | ROL | BRA | BGE | BLT | BNE | BEQ | BPL | BMI | BCC | BCS | BVC | BVS |
1x | TO R0 | TO R1 | TO R2 | TO R3 | TO R4 | TO R5 | TO R6 | TO R7 | TO R8 | TO R9 | TO R10 | TO R11 | TO R12 | TO R13 | TO R14 | TO R15 |
2x | ||||||||||||||||
3x | LOOP | ALT1 | ALT2 | ALT3 | ||||||||||||
4x | PLOT ? | SWAP | COLOR ? | NOT | ||||||||||||
5x | ||||||||||||||||
6x | CMP R0 | CMP R1 | CMP R2 | CMP R3 | CMP R4 | CMP R5 | CMP R6 | CMP R7 | CMP R8 | CMP R9 | CMP R10 | CMP R11 | CMP R12 | CMP R13 | CMP R14 | CMP R15 |
7x | MERGE | BIC #1 | BIC #2 | BIC #3 | BIC #4 | BIC #5 | BIC #6 | BIC #7 | BIC #8 | BIC #9 | BIC #10 | BIC #11 | BIC #12 | BIC #13 | BIC #14 | BIC #15 |
8x | ||||||||||||||||
9x | SBK | LINK #1 | LINK #2 | LINK #3 | LINK #4 | SEX | DIV2 ? | ROR | LOB | FMULT | ||||||
Ax | IBT R0 | IBT R1 | IBT R2 | IBT R3 | IBT R4 | IBT R5 | IBT R6 | IBT R7 | IBT R8 | IBT R9 | IBT R10 | IBT R11 | IBT R12 | IBT R13 | IBT R14 | IBT R15 |
Bx | FROM R0 | FROM R1 | FROM R2 | FROM R3 | FROM R4 | FROM R5 | FROM R6 | FROM R7 | FROM R8 | FROM R9 | FROM R10 | FROM R11 | FROM R12 | FROM R13 | FROM R14 | FROM R15 |
Cx | HIB | |||||||||||||||
Dx | ROMB | |||||||||||||||
Ex | DEC R0 | DEC R1 | DEC R2 | DEC R3 | DEC R4 | DEC R5 | DEC R6 | DEC R7 | DEC R8 | DEC R9 | DEC R10 | DEC R11 | DEC R12 | DEC R13 | DEC R14 | GETBS |
Fx | IWT R0, #xx | IWT R1, #xx | IWT R2, #xx | IWT R3, #xx | IWT R4, #xx | IWT R5, #xx | IWT R6, #xx | IWT R7, #xx | IWT R8, #xx | IWT R9, #xx | IWT R10, #xx | IWT R11, #xx | IWT R12, #xx | IWT R13, #xx | IWT R14, #xx | IWT R15, #xx |