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

CMODE (Super FX): Difference between revisions

From SnesLab
Jump to: navigation, search
m (Jeffythedragonslayer moved page CMODE to CMODE (Super FX): Super FX in title)
(→‎See Also: COLOR)
 
(23 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''CMODE''' is a [[Super FX]] instruction that specifies [[execution modes]].
{| 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 1)
|3D4E
|3D4E
|2 bytes
|2 bytes
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]]
|+
|+
|0
|0
Line 36: Line 36:
|.
|.
|}
|}
{| class="wikitable" style="float:right;clear:right;width:45%"
!colspan="9"|Color/Plot flags
|+
|Plot Transparent
|Plot Dither
|Color Src High
|Color Frz High
|Object Mode
|+
|Bit 0 of src
|Bit 1 of src
|Bit 2 of src
|Bit 3 of src
|Bit 4 of src
|}
'''CMODE''' is a [[Super FX]] instruction that specifies [[execution modes]]. It sets plot and color related flags based on the low 5 bits of the [[source register]].
The [[ALT0]] state is restored.
==== Syntax ====
<pre>
CMODE
</pre>
==== Example ====
Let:
S<sub>reg</sub> : R<sub>0</sub>
R<sub>0</sub> = 0002h
After CMODE runs, the transparency and dither modes are set.
=== See Also ===
* [[Transparency Flag]]
* [[Dither Flag]]
* [[ALT1]]
* [[Plot Options Register]]
* [[COLOR]]


=== External Links ===
=== External Links ===
* Official Nintendo documentation on CMODE: https://archive.org/details/SNESDevManual/book2/page/n195
* Official Nintendo documentation on CMODE: 9.28 on [https://archive.org/details/SNESDevManual/book2/page/n195 Page 2-9-39 of Book II]
* example: [https://archive.org/details/SNESDevManual/book2/page/n196 Page 2-9-40], lbid.
* 8.1.4 Plot Function and CMODE on page 2-8-9, lbid.


[[Category:ASM]]
[[Category:ASM]]
[[Category:Super FX]]
[[Category:Super FX]]
[[Category:Plot-related Instructions]]
[[Category:Plot-related Instructions]]
[[Category:Two-byte Instructions]]

Latest revision as of 18:12, 16 July 2024

Basic Info
Addressing Mode Opcode Length ROM Speed RAM Speed Cache Speed
Implied (type 1) 3D4E 2 bytes 6 cycles 6 cycles 2 cycle
Flags Affected
B ALT1 ALT2 O/V S CY Z
0 0 0 . . . .
Color/Plot flags
Plot Transparent Plot Dither Color Src High Color Frz High Object Mode
Bit 0 of src Bit 1 of src Bit 2 of src Bit 3 of src Bit 4 of src

CMODE is a Super FX instruction that specifies execution modes. It sets plot and color related flags based on the low 5 bits of the source register.

The ALT0 state is restored.

Syntax

CMODE

Example

Let:

Sreg : R0
R0 = 0002h

After CMODE runs, the transparency and dither modes are set.

See Also

External Links