aboutsummaryrefslogtreecommitdiff
path: root/doc/dev_notes.md
diff options
context:
space:
mode:
authorJohn "Lameguy" Wilbert Villamor <lameguy64@gmail.com>2022-11-03 10:14:22 +0800
committerGitHub <noreply@github.com>2022-11-03 10:14:22 +0800
commit4139331d233b7a962e747c5564fa68a285f81cc8 (patch)
treed4d3374afd5e36e8580cc424ab2c63ee9e7d357c /doc/dev_notes.md
parente08a3d9366f8ca14a76b3dd569dac1fb9f569748 (diff)
parent37d963f724113e45d15aa9b8ee86baa9c4362b8f (diff)
downloadpsn00bsdk-4139331d233b7a962e747c5564fa68a285f81cc8.tar.gz
Merge pull request #60 from spicyjpeg/bugfix
Bugfixes, new serial port API and sound examples
Diffstat (limited to 'doc/dev_notes.md')
-rw-r--r--doc/dev_notes.md16
1 files changed, 11 insertions, 5 deletions
diff --git a/doc/dev_notes.md b/doc/dev_notes.md
index 3c3aa55..fa01756 100644
--- a/doc/dev_notes.md
+++ b/doc/dev_notes.md
@@ -135,13 +135,19 @@ _- spicyjpeg_
4. If no valid response is received, assume no controller is connected and
reset the port's digital-only flag.
-- I haven't worked on `psxspu` but, for those willing to write some code, this
- is the formula to calculate SPU pitch values for playing musical notes (`^`
- is the power operator, not xor):
+- The SPU *really* doesn't like 32-bit register writes. It is connected to the
+ CPU through a 16-bit bus; 32-bit writes are automatically split into two
+ transactions, however the SPU has a tendency to miss one of them (perhaps due
+ to the bus controller issuing them too quickly). This might be why nocash
+ docs claim that writing to the SPU is unstable when in actual fact 16-bit
+ writes seem to be perfectly stable.
+
+- This is the formula to calculate SPU pitch values for playing musical notes
+ (`^` is the power operator, not xor):
```
frequency = (ref / 32) * (2 ^ ((note - 9) / 12))
- spu_pitch = frequency / 44100 * 4096
+ spu_pitch = (frequency * 4096) / 44100
ref = frequency the sample should be played at to play a middle A (MIDI note 69)
note = MIDI note number (usually 0-127, 60 is middle C)
@@ -280,4 +286,4 @@ _- spicyjpeg_
space.
-----------------------------------------
-_Last updated on 2022-03-25 by lameguy64_
+_Last updated on 2022-10-30 by spicyjpeg_