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/Distance: Difference between revisions
From SnesLab
(→References: added ref) |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 10: | Line 10: | ||
|} | |} | ||
'''Distance''' is a [[DSP1]] command that calculates the length of a vector. | '''Distance''' is a [[DSP1]] command that calculates the length of a vector. It is bugged in DSP1/DSP1A and fixed in DSP1B. | ||
=== Input Parameters === | === Input Parameters === | ||
Line 24: | Line 24: | ||
=== References === | === References === | ||
* [https://archive.org/details/SNESDevManual/book2/page/n297 Page 3-5-7 of Book II] of the official Super Nintendo development manual | * subparagraph 5.2.3 on [https://archive.org/details/SNESDevManual/book2/page/n297 Page 3-5-7 of Book II] of the official Super Nintendo development manual | ||
* paragraph 6.6 on [https://archive.org/details/SNESDevManual/book2/page/n324 page 3-6-1 of Book II], lbid. | * paragraph 6.6 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#L395 | |||
[[Category:DSP1]] | [[Category:DSP1]] | ||
[[Category:Vector Calculation Commands]] |
Latest revision as of 05:06, 10 January 2024
Basic Info | |||||||
---|---|---|---|---|---|---|---|
Opcode | 28 | ||||||
Speed | 156 cycles
20.5 μs |
Distance is a DSP1 command that calculates the length of a vector. It is bugged in DSP1/DSP1A and fixed in DSP1B.
Input Parameters
- x is a vector component
- y is a vector component
- z is a vector component
Output Parameters
- R is the vector length
See Also
References
- subparagraph 5.2.3 on Page 3-5-7 of Book II of the official Super Nintendo development manual
- paragraph 6.6 on page 3-6-1 of Book II, lbid.
- https://github.com/bsnes-emu/bsnes/blob/master/bsnes/sfc/coprocessor/dsp1/dsp1emu.cpp#L395