We've just updated MediaWiki and its underlying software. If anything doesn't look or work quite right, please mention it to us. --RanAS
DSP1/Triangle: Difference between revisions
From SnesLab
(added DSP1 category) |
(general calculation commands) |
||
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{| class="wikitable" style="float:right;clear:right;width:25%" | |||
{| class="wikitable" style="float:right;clear:right;width: | |||
!colspan="8"|Basic Info | !colspan="8"|Basic Info | ||
|+ | |+ | ||
|'''Opcode''' | |'''Opcode''' | ||
|04 | |04 | ||
|+ | |||
|'''Speed''' | |||
|59 cycles | |||
7.8 μs | |||
|} | |} | ||
'''Triangle''' is a [[DSP1]] command that performs a trigonometric calculation. | |||
=== Input Parameters === | |||
* θ[A] is the angle | |||
* r[T/l] is the radius | |||
=== Ouput Parameters === | |||
* S[T/l] is the sine | |||
* C[T/l] is the cosine | |||
=== References === | === References === | ||
* [https://archive.org/details/SNESDevManual/book2/page/n293 | * subparagraph 5.1.3 on [https://archive.org/details/SNESDevManual/book2/page/n293 page 3-5-3 of Book II] of the official Super Nintendo development manual | ||
* paragraph 6.3 on [https://archive.org/details/SNESDevManual/book2/page/n324 page 3-6-1 of Book II], lbid. | |||
* https://github.com/bsnes-emu/bsnes/blob/master/bsnes/sfc/coprocessor/dsp1/dsp1emu.cpp#L322 | |||
[[Category:DSP1]] | [[Category:DSP1]] | ||
[[Category:General Calculation Commands]] |
Latest revision as of 04:31, 11 January 2024
Basic Info | |||||||
---|---|---|---|---|---|---|---|
Opcode | 04 | ||||||
Speed | 59 cycles
7.8 μs |
Triangle is a DSP1 command that performs a trigonometric calculation.
Input Parameters
- θ[A] is the angle
- r[T/l] is the radius
Ouput Parameters
- S[T/l] is the sine
- C[T/l] is the cosine
References
- subparagraph 5.1.3 on page 3-5-3 of Book II of the official Super Nintendo development manual
- paragraph 6.3 on page 3-6-1 of Book II, lbid.
- https://github.com/bsnes-emu/bsnes/blob/master/bsnes/sfc/coprocessor/dsp1/dsp1emu.cpp#L322