ROM Hack Nintendo SDAT specifications?

devmas

Member
OP
Newcomer
Joined
Jan 31, 2008
Messages
16
Trophies
0
XP
235
Country
United States
So I decided to revisit something I've been trying to work on. Basically, a project to rip the music from DS games. I used some DS specifications from here (kiwi.ds) and here (Tahaxan through archive.org).

However, looking today, the Tahaxan site is sadly down, and archive.org didn't save the stuff that really mattered. That was one of the most valuable sources of information for me, as it was very complete, up-to-date, and clear.

I wanted to know if anyone by any chance saved the specifications pages or something.
 

devmas

Member
OP
Newcomer
Joined
Jan 31, 2008
Messages
16
Trophies
0
XP
235
Country
United States
Ah, thank you much. I will also definitely check romhacking.net a little more.

I found the emutalk source a little earlier by searching GBATemp, but sadly, I don't think it is as complete as the Tahaxan one, but that's okay for now.
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,321
Country
United Kingdom
Some more
loveemu

The only nicer thing about the tahaxan spec was that it was geared towards the would be editor rather than the would be programmer like the kiwi.ds specs although low lines link from my earlier post does OK on that front.

Speaking of source code there is code for nintendon's ndssndext if you want that
http://www.4shared.com/file/Ut_RM4Pi/ndssndext_v04.html

Similarly crystaltile2 is pretty good if you only want numbers to feed into your hex editor.

I did a search of my hard drive and drummed up copies of the other links but nothing on this front, if I had them they were lost when my external drive went.
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,321
Country
United Kingdom
Thanks for that Orengefox (I saw your NSMB thread a few months back as well nice work there)- a bit of copy and paste thanks to your link and abusing of my HTML abilities around here- you might have to highlight the table descriptions until I fiddle with the css a bit but the data is there.

SSEQ stand for "Sound SEQuence", or that's what I though

smile.gif
. SSEQ
files are used for providing music for Nintendo DS games. This is not
really a file, but part of SDAT files.

ALMOST ALL this info have been collected using loveemu "sseq2mid", so (almost) all credit goes to him!



Example file: zoo_m1.SSEQ, extracted from "Zoo Keeper".

SSEQ section FieldStartEndSizeExampleDescription Magic stamp0x000000000x000000034 bytes"SSEQ"Magic stamp. "Sound SEQuence"
Unknown constant0x000000040x000000074 bytes0x0100FFFEThis always appears with this value  Section size0x000000080x0000000B4 bytes0x000007ECSize of this section always matches with file size (includes header)
Header size0x0000000C0x0000000D2 bytes0x0010This is going to be always 0x0010, because size of the header is always the sameNumber of sections0x0000000E0x0000000F2 bytes0x0004Number of sections included inside "SSEQ" section

 

DATA section FieldStartEndSizeExampleDescription Magic stamp0x000000000x000000034 bytes"DATA"Magic stamp. "DATA", nothing more, nothing less Section size0x000000040x000000074 bytes0x000007DCSection size, including header
Base offset 0x000000080x0000000B4 bytes
0x0000001C
Starting with this offset comes notation data
"Track description" command
0x0000000C
0x0000000C1 byte
0xFE
This
means "Track description", and is only one of lots of commands used in
SSEQ files (list of commands at the end, see for descriptions). "Track description" data
0x0000000D0x0000000E
2 bytes
0x001F"0000 0000 0001 1111" in this case. Now
comes the offsets to track data, one offset for each used track (Offset
for track zero doesn't appear, because it starts right after end of
this header data). I'll post only one as an example. "Open Track" command 0x0000000F
0x0000000F1 byte0x93This command is used to specify track number and offset. "Open Track" track index
0x000000100x000000101 byte
0x01
This is the track number opened.
"Open Track" track offset
0x000000110x00000012
2 bytes
0x0272This is the offset to the track data, RELATIVE to 'Base offset' ... and this repeats for each track.
"Mono / Poly" command
0x000000230x000000231 byte
0xC7Another command used for song configuration. This sets monophonie / polyphonie. "Mono / Poly" argument0x000000240x000000241 byte
0x00
Polyphonic
"Tempo" command
0x00000025
0x00000025
1 byte
0xE1This changes tempo
"Tempo" argument
0x00000026
0x000000272 bytes
0x00FF
Tempo now 255
...and this continues ad infinitum. Just check the list of commands below, or check loveemu "sseq2mid". Enjoy!


Here
comes the command list. Format used in 'Parameter format' follows the
"standard" notation (0x... means hexadecimal number, 0b... means binary
number)

List of commands CodeNameDescription Parameter length
Parameter formatParameter info 0x00 - 0x7F
Note
Note value. Actual command has note itself. So 0x00 is C, octave 0; and 0x7F is F#, octave 10 (in theory)
2 bytes
0xAABB
0xAA - Velocity
0xBB - Duration
0x80
Rest
Just silence note
1 byte
0xAA0xAA - Duration: Gives duration of rest note
0x81
Change Instrument
Change instrument used in track
1 byte
0xAA
0xAA - Instrument: Number of zero-based instrument to change to.
0x93Open track
Gives info about track number and offset data
4 bytes
0xAABBBBBB
0xAA - Track index: This just gives track number

0xBBBBBB - Track offset: This gives the offset RELATIVE to 'Base offset' where to find track data
0x94
Jump
Jump to another part of track and play it. (Loop) 3 bytes0xAAAAAA
0xAAAAAA - Position offset: Offset to jump. 0x95
Call
Call another track part and play it until a "Return" command found3 bytes
0xAAAAAA0xAAAAAA - Position offset: Offset to jump.
0xC0Channel panning
Changes channel panning1 byte
0xAA
0xAA - Panning: Value for panning (from -128 to 127)
0xC1Channel volume
Changes Channel volume
1 byte
0xAA0xAA - Volume
0xC2Global volume
Changes global volume
1 byte
0xAA0xAA - Volume
0xC3Transpose
 1 byte
0xAA 0xC4Portamento
 1 byte
0xAA 0xC5Portamento range
 1 byte
0xAA 0xC6Priority 1 byte0xAA 0xC7
Mono / PolySets monophonie / polyphonie1 byte
0xAA
0xAA - Type of "phonie": 0x00 means Polyphonie, 0x01 Monophonie.0xCA
Vibrato depth  1 byte
0xAA
 0xCB
Vibrato speed
 1 byte
0xAA
 0xE1Change tempoChanges song tempo until a new "Change tempo" command appears
1 byte
0xAA
0xAA - Tempo: This gives new tempo for the song
0xFD
Return
Returns from a previous "Call command"
0 bytes
N/A
N/A
0xFE
Track descriptionUsed to describe number of tracks and position 2 bytes 0bFEDCBA9876543210Used
tracks: Just read in binary form. Track 0x0F (Most Significant Bit) to
0x00 (Least Significant Bit). Ones here means "used track"; and zeros,
"unused track".0xFF
End of track
Just informs that track has end.0 bytes
N/A
N/A

Remember
that this list is incomplete / maybe inaccurate, so please contribute
with corrections or more commands. Hope this is useful to you!

 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    SylverReZ @ SylverReZ: @OctoAori20, Cool. Same here.