- 0 Comments
-
.sav structure
This is the structure of the .sav file, produced by emulators and backup devices for storing the LSDJ song data.
For some examples how to parse this, check http://code.google.com/p/lsdj-sav-utils/ and http://code.google.com/p/lsdj2xml/
Contents |
Map
Edit
This map is valid for v4.1.8:
Bank 0: 0000–0FEF: phrases-> notes 0FF0-102F: bookmarks 1030–108F: empty 1090–128F: grooves 1290–168F: song-> chainno (listed PU1,PU2,WAV,NOI for $00 .. $ff in order) 1690–188F: tables-> envelope 1890–1DCF: instrument->speech->words ($20*42) 1DD0–1E77: instr->speech->wordnames 1E78–1E79: mem initialized flag (set to “rb” on init) 1E7A-1FB9: instr->names 1FBA-1FFF: empty Bank 1: 2000–201F: empty 2020–203F: table allocation table (byte per table, 1 if alloced, 0 else) 2040–207F: instr alloc table (byte per instrument, 1 if alloced, 0 else) 2080–287F: chains-> phraseno 2880–307F: chains-> transposes 3080–347F: instr->param 3480–367F: tables-> transpose 3680–387F: tables-> fx 3880–3A7F: tables-> fx val 3A80–3C7F: tables-> fx 2 3C80–3E7F: tables-> fx 2 val 3E80–3E81: mem initialized flag (set to “rb” on init) 3E82–3EA1: phrase allocation table (bit per phrase, 1 if alloced, 0 else) 3EA2–3EB1: chain allocation table (bit per chain, 1 if alloced, 0 else) 3EB2–3FB1: softsynth params 3FB2–3FB2: clock, hours 3FB3–3FB3: clock, minutes 3FB4–3FB4: tempo 3FB5–3FB5: tune setting 3FB6–3FB6: total clock, days 3FB7–3FB7: total clock, hours 3FB8–3FB8: total clock, minutes 3FB9–3FB9: total clock, checksum (days+hours+minutes) 3FBA-3FBA: key delay 3FBB-3FBB: key repeat 3FBC-3FBC: font 3FBD-3FBD: sync setting 3FBE-3FBE: colorset 3FBF-3FBF: empty 3FC0–3FC0: clone (0=deep, 1=slim) 3FC1-3FC1: file changed? 3FC2-3FC2: power save 3FC3-3FC3: prelisten 3FC4-3FC5: wave synth overwrite locks 3FC6-3FFF: empty Bank 2: 4000–4FEF: phrases->fx 4FF0–5FDF: phrases->fx val 5FE0-5FFF: empty Bank 3: 6000–6FFF: wave frames 7000–7FEF: phrases->instr 7FF0–7FF1: mem initialized flag (set to “rb” on init) 7FF2-7FFE: empty 7FFF-7FFF: version byte (0 = before 3.6.0, 1 = 3.6.0, 2 = 3.6.1 and up)
Instrument Structure
Edit
Default Instrument
Edit
0, $a8, 0, 0, $ff, 0, 0, 3, 0, 0, $d0, 0, 0, $f3, 0, 0
Pulse Instrument
Edit
- Byte 0: 0
- Byte 1: Envelope
- Byte 2: Phase transpose
- Byte 3: Sound length (bit 6-0). If bit 6 is unset, sound length is UNLIM.
- Byte 4: Sweep
- Byte 5: Automate 1,2 (bit 4-3); Vibrato (bit 2-1: type, bit 0: down/up)
- Byte 6: Table (bit 5-0: bit 5 = table on/off)
- Byte 7: Wave (bits 7-6); Phase finetune (bit 5-2); Pan (bit 1-0)
Wave Instrument
Edit
- Byte 0: 1
- Byte 1: Volume
- Byte 2: Synth (bit 7-4); Repeat (3-0)
- Byte 3: -
- Byte 4: -
- Byte 5: Automate 1,2 (bit 4-3); Vibrato (bit 2-1: type, bit 0: down/up)
- Byte 6: Table (bit 5-0: bit 5 = table on/off)
- Byte 7: Pan (bit 1-0)
- Byte 8: -
- Byte 9: Play type (bits 1-0; 0=once, 1=loop, 2=pingpong, 3=manual)
- Byte 10: -
- Byte 11: -
- Byte 12: -
- Byte 13: -
- Byte 14: Steps (bit 7-4); Speed (bit 3-0)
Kit Instrument
Edit
- Byte 0: 2
- Byte 1: Volume
- Byte 2: Keep attack 2 (bit 7); Half-speed (bit 6); Kit (bit 5-0)
- Byte 3: Length 1 (0 = auto)
- Byte 4: -
- Byte 5: Loop 1,2 (bit 6-5); Automate 1,2 (bit 4-3); Vibrato (bit 2-1: type, bit 0: down/up)
- Byte 6: Table (bit 5-0; bit 5 = table on/off)
- Byte 7: Pan (bit 1-0)
- Byte 8: Pitch
- Byte 9: Keep attack 2 (bit 7); Kit 2 (bit 5-0)
- Byte 10: Dist. type
- Byte 11: Length 2 (0 = auto)
- Byte 12: Offset
- Byte 13: Offset 2
Noise Instrument
Edit
- Byte 0: 3
- Byte 1: Envelope
- Byte 2: -
- Byte 3: Sound length (bit 6-0; if bit 6 is unset, soundlength = UNLIM)
- Byte 4: Sweep
- Byte 5: Automate 1,2 (bit 4-3)
- Byte 6: Table (bit 5-0; bit 5 = table on/off)