We've just updated MediaWiki and its underlying software. If anything doesn't look or work quite right, please mention it to us. --RanAS

ALT2: Difference between revisions

From SnesLab
Jump to: navigation, search
(changed category)
(added XOR)
 
(26 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''ALT2''' is both the name of a [[Super FX]] flag and the flag prefix instruction that sets it.
{| class="wikitable" style="float:right;clear:right;width:50%"
 
{| class="wikitable" style="float:right;clear:right;width:40%"
!colspan="8"|Basic Info
!colspan="8"|Basic Info
|+
|+
|'''Addressing Mode'''
|'''Opcode'''
|'''Opcode'''
|'''Length'''
|'''Length'''
Line 10: Line 9:
|'''Cache Speed'''
|'''Cache Speed'''
|+
|+
|[[Implied]] (type 2)
|3E
|3E
|1 byte
|1 byte
Line 18: Line 18:


{| class="wikitable" style="float:right;clear:right;width:30%"
{| class="wikitable" style="float:right;clear:right;width:30%"
!colspan="9"|Flags Clobbered
!colspan="9"|Flags Affected
|+
|+
|B
|[[B Flag|B]]
|ALT1
|[[ALT1]]
|ALT2
|[[ALT2]]
|O/V
|[[O/V]]
|S
|[[Sign Flag|S]]
|CY
|[[CY]]
|Z
|[[Zero Flag|Z]]
|+
|+
|.
|.
Line 36: Line 36:
|.
|.
|}
|}
'''ALT2''' is both the name of a [[Super FX]] flag and the flag prefix instruction that sets it.  It is bit 9 of the [[status flag register]].
==== Syntax ====
<pre>
ALT2
</pre>
The following instructions require ALT2:
* [[ADD]] #n
* [[AND (Super FX)|AND]] #n
* [[GETBL]]
* [[MULT]] #n
* [[OR]] #n
* [[RAMB]]
* [[SM]] (xx), R<sub>n</sub>
* [[SMS]] (yy), R<sub>n</sub>
* [[SUB]] #n
Many instructions clear the ALT2 flag, including:
* [[GSU/ADC|ADC]] R<sub>n</sub>
* [[GSU/ADC|ADC]] #n
* [[ADD]] R<sub>n</sub>
* [[ADD]] #n
* [[GSU/AND|AND]] R<sub>n</sub>
* [[GSU/AND|AND]] #n
* [[ASR]]
* [[BIC]] R<sub>n</sub>
* [[BIC]] #n
* [[CACHE]]
* [[CMODE]]
* [[GSU/CMP|CMP]] R<sub>n</sub>
* [[COLOR]]
* [[GSU/DEC|DEC]] R<sub>n</sub>
* [[DIV2]]
* [[FMULT]]
* [[GETB]]
* [[GETBH]]
* [[GETBL]]
* [[GETBS]]
* [[GETC]]
* [[HIB]]
* [[IBT]] R<sub>n</sub>, #pp
* [[GSU/INC|INC]] R<sub>n</sub>
* [[IWT]] R<sub>n</sub>, #xx
* [[GSU/JMP|JMP]] R<sub>n</sub>
* [[LDB]] (R<sub>m</sub>)
* [[LDW]] (R<sub>m</sub>)
* [[LEA]] R<sub>n</sub>, xx
* [[LINK]] #n
* [[LJMP]] R<sub>n</sub>
* [[GSU/LM|LM]] R<sub>n</sub>, (xx)
* [[LMS]] R<sub>n</sub>, (yy)
* [[LMULT]]
* [[LOB]]
* [[LOOP]]
* [[GSU/LSR|LSR]]
* [[MERGE]]
* [[GSU/MOVE|MOVE]] R<sub>n</sub>, R<sub>n</sub>'
* [[MOVES]] R<sub>n</sub>, R<sub>n</sub>'
* [[MULT]] R<sub>n</sub>
* [[MULT]] #n
* [[GSU/NOP|NOP]]
* [[NOT]]
* [[OR]] R<sub>n</sub>
* [[OR]] #n
* [[PLOT]]
* [[RAMB]]
* [[GSU/ROL|ROL]]
* [[ROMB]]
* [[GSU/ROR|ROR]]
* [[RPIX]]
* [[GSU/SBC|SBC]] R<sub>n</sub>
* [[SBK]]
* [[SEX]]
* [[SM]] (xx), R<sub>n</sub>
* [[SMS]] (yy), R<sub>n</sub>
* [[STB]] (R<sub>m</sub>)
* [[STOP]]
* [[STW]] (R<sub>m</sub>)
* [[SUB]] R<sub>n</sub>
* [[SUB]] #n
* [[SWAP]]
* [[UMULT]] R<sub>n</sub>
* and presumably UMULT #n and XOR too
=== See Also ===
* [[ALT1]]
* [[ALT3]]
* [[ALT0]]
* [[Super_FX_Opcode_Matrices#ALT1_=_0,_ALT2_=_1]]


=== External Links ===
=== External Links ===
* Official Nintendo documentation on ALT2: https://archive.org/details/SNESDevManual/book2/page/n164
* Official Nintendo documentation on ALT2: 9.9 on [https://archive.org/details/SNESDevManual/book2/page/n164 page 2-9-8 of Book II]
* Table 2-4-2 on [https://archive.org/details/SNESDevManual/book2/page/n110 page 2-4-4], lbid.


[[Category:ASM]]
[[Category:ASM]]
Line 44: Line 138:
[[Category:Super FX]]
[[Category:Super FX]]
[[Category:Flag Prefix Instructions]]
[[Category:Flag Prefix Instructions]]
[[Category:One-byte Instructions]]

Latest revision as of 00:49, 22 July 2024

Basic Info
Addressing Mode Opcode Length ROM Speed RAM Speed Cache Speed
Implied (type 2) 3E 1 byte 3 cycles 3 cycles 1 cycle
Flags Affected
B ALT1 ALT2 O/V S CY Z
. . 1 . . . .

ALT2 is both the name of a Super FX flag and the flag prefix instruction that sets it. It is bit 9 of the status flag register.

Syntax

ALT2

The following instructions require ALT2:

Many instructions clear the ALT2 flag, including:

See Also

External Links