RTI (format pliku)
From Atariki
(Różnice między wersjami)
Wersja z dnia 11:07, 31 maj 2026
RMT 1.x instrument format -------------------------------- header struct ============= offset type desc ------ ---- ---- 00 BYTE header string 'RTI' ($52 $54 $49) 03 BYTE version ($00 or $01) 04 BYTE name (space-padded, terminating zero in byte 32 ASCII string) 25 BYTE length of instrument definition block 26... BYTE instrument definition block instrument struct ================= offset type desc ------ ---- ---- 00 BYTE tlen (pointer to end of table of notes) 01 BYTE tgo (pointer to loop of table of notes) 02 BYTE elen (pointer to end of envelope) 03 BYTE ego (pointer to loop of envelope) 04 BYTE tspd (bit 0-5), tmode (bit 6), ttype (bit 7) 05 BYTE audctl 06 BYTE vslide 07 BYTE vmin(bit 4-7) 08 BYTE delay ($00 for no vibrato & no fshift) 09 BYTE vibrato (0-3) 0a BYTE fshift 0b BYTE unused 0c table of notes ? envelope ttype ----- 0 - notes 1 - freqs tmode ----- 0 - + 1 - += TABLE OF NOTES struct ===================== BYTE note or frequence (according to the ttype) ENVELOPE struct =============== BYTE volume (bit 0-3 left channel) (bits 4-7 right channel (in RMT4 it's the same as bits 0-3)) BYTE portamento (bit 0), distortion(bit 1-3), command (bit 4-6), filter (bit 7) BYTE XY distortion ---------- 0 - $0v 2 - $2v 4 - $4v 6 - $Cv 16-bit bass table tone 8 - $8v A - $Av pure tone C - $Cv bass 1 table tone E - $Cv bass 2 table tone command ------- 0 - play BASE_NOTE + $XY semitones 1 - play frequency $XY 2 - play BASE_NOTE + frequency $XY 3 - set BASE_NOTE += $XY semitones; play BASE_NOTE 4 - set FSHIFT += frequency $XY; play BASE_NOTE 5 - set PORTAMENTO speed $X and step $Y; play BASE_NOTE 6 - set FILTER_SHFRQ += frequency $XY; play BASE_NOTE 7 - set BASE_NOTE = $XY; play BASE_NOTE / if $XY == $80 then VOLUMEONLY mode
