aboutsummaryrefslogtreecommitdiff
path: root/doc/dev_notes.md
diff options
context:
space:
mode:
authorspicyjpeg <thatspicyjpeg@gmail.com>2022-10-30 17:19:56 +0100
committerspicyjpeg <thatspicyjpeg@gmail.com>2022-10-30 17:19:56 +0100
commit37d963f724113e45d15aa9b8ee86baa9c4362b8f (patch)
treed4d3374afd5e36e8580cc424ab2c63ee9e7d357c /doc/dev_notes.md
parent68daf6d338aba6e32e687d4151eaddc8735227b3 (diff)
downloadpsn00bsdk-37d963f724113e45d15aa9b8ee86baa9c4362b8f.tar.gz
Add inline docs to psxcd.h, psxetc.h, psxgte.h
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_