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

From SnesLab
Revision as of 04:57, 25 May 2023 by Xetheria (talk | contribs) (added TO)
Jump to: navigation, search

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 LOOP ALT1 ALT2 ALT3
4x PLOT SWAP COLOR NOT
5x
6x
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
Cx HIB
Dx GETC
Ex GETB
Fx

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
7x MERGE
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
Cx HIB
Dx RAMB
Ex GETBL
Fx

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
Cx HIB
Dx GETC
Ex GETBH
Fx

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
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
Cx HIB
Dx ROMB
Ex GETBS
Fx