Skip to content

Commit 68190a9

Browse files
leinaccISSOtm
andauthored
Correct SOU_TRN vram data transfer format (#461)
Co-authored-by: Eldred Habert <[email protected]>
1 parent 700a6f0 commit 68190a9

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

src/SGB_Command_Sound.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,21 @@ Used to transfer sound code or data to SNES Audio Processing Unit memory
4444
1-F Not used (zero)
4545
```
4646

47-
The sound code/data is sent by VRAM-Transfer (4 KBytes).
47+
The sound code/data is sent by [VRAM transfer](<#VRAM Transfers>) as a contiguous list of "packets".
48+
4849
All 16-bit values are little-endian.
4950

51+
Data transfer packet format:
52+
```
53+
0-1 Size of data below (N); if zero, this is instead a jump packet
54+
2-3 Destination address in S-APU RAM (typically $2B00, see below)
55+
4-N+3 Data to be transferred
56+
```
57+
58+
Jump packet format:
5059
```
51-
000-001 Size of transfer data
52-
002-003 Destination address in S-APU RAM (typically $2B00, see below)
53-
004-XXX Data to be transferred
54-
X+1-X+2 "End marker" (???), should be $0000
55-
X+3-X+4 S-APU jump address, should be $0400
56-
X+5-FFF Remaining bytes ignored
60+
0-1 Must be $0000
61+
2-3 S-APU jump address, use $0400 to safely restart the built-in SGB BIOS' N-SPC sound engine
5762
```
5863

5964
Possible destinations in APU-RAM are:

0 commit comments

Comments
 (0)