We've just updated MediaWiki and its underlying software. If anything doesn't look or work quite right, please mention it to us. --RanAS
SM (Super FX): Difference between revisions
From SnesLab
(added official doc link) |
(→See Also: LM, LMS) |
||
(21 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{| class="wikitable" style="float:right;clear:right;width:50%" | |||
{| class="wikitable" style="float:right;clear:right;width: | |||
!colspan="8"|Basic Info | !colspan="8"|Basic Info | ||
|+ | |+ | ||
|'''Addressing Mode''' | |||
|'''Opcode''' | |'''Opcode''' | ||
|'''Length''' | |'''Length''' | ||
Line 10: | Line 9: | ||
|'''Cache Speed''' | |'''Cache Speed''' | ||
|+ | |+ | ||
|[[Implied Indirect]] | |||
|3EFnxxxx | |3EFnxxxx | ||
|4 bytes | |4 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 | !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: | ||
|. | |. | ||
|} | |} | ||
'''SM''' (Store to raM) is a [[Super FX]] instruction that stores a value to the [[Game Pak]]. The bank must be specified with [[RAMB]]. | |||
The number of cycles varies because of the [[RAM buffer]]. | |||
The [[ALT0]] state is restored. | |||
==== Syntax ==== | |||
<pre> | |||
SM (xx), Rn | |||
</pre> | |||
==== Example ==== | |||
Let: | |||
R<sub>4</sub> = 438ch | |||
RAMBR = 70h | |||
After executing SM (0b492h), R<sub>4</sub>: | |||
(70:b492h) = 8ch | |||
(70:b493h) = 43h | |||
=== See Also === | |||
* [[SMS]] | |||
* [[LM (Super FX)|LM]] | |||
* [[LMS]] | |||
* [[ALT2]] | |||
=== External Links === | === External Links === | ||
* Official Nintendo documentation on SM: https://archive.org/details/SNESDevManual/book2/page/n268 | * Official Nintendo documentation on SM: 9.81 on [https://archive.org/details/SNESDevManual/book2/page/n268 page 2-9-112 of Book II] | ||
[[Category:ASM]] | [[Category:ASM]] | ||
[[Category:Super FX]] | [[Category:Super FX]] | ||
[[Category:Data Transfer Instructions]] | [[Category:Data Transfer Instructions]] |
Latest revision as of 05:46, 16 July 2024
Basic Info | |||||||
---|---|---|---|---|---|---|---|
Addressing Mode | Opcode | Length | ROM Speed | RAM Speed | Cache Speed | ||
Implied Indirect | 3EFnxxxx | 4 bytes | 12 to 17 cycles | 16 to 20 cycles | 4 to 9 cycles |
Flags Affected | ||||||||
---|---|---|---|---|---|---|---|---|
B | ALT1 | ALT2 | O/V | S | CY | Z | ||
0 | 0 | 0 | . | . | . | . |
SM (Store to raM) is a Super FX instruction that stores a value to the Game Pak. The bank must be specified with RAMB.
The number of cycles varies because of the RAM buffer.
The ALT0 state is restored.
Syntax
SM (xx), Rn
Example
Let:
R4 = 438ch RAMBR = 70h
After executing SM (0b492h), R4:
(70:b492h) = 8ch (70:b493h) = 43h
See Also
External Links
- Official Nintendo documentation on SM: 9.81 on page 2-9-112 of Book II