UserWiki:SynaMax

From Video Game Music Preservation Foundation Wiki
Revision as of 16:32, 28 January 2017 by SynaMax (talk | contribs)
Jump to: navigation, search

MegaRace HERAD "DFADP.HSQ" Driver

Offset Size Description Notes
0x00 0x15  ? Changing some values crash the game, while others don't
0x15 0x2  ? Something to do with the song speed (Always 0x0002)
0x17 0x2  ? (Always 0x1941)
0x19 0x2 Song length (first two bytes from music file)
0x1B 0x2  ? (Always 0x1941)
0x1D 0x2  ? (OPL Timer?)
0x1F 0x2 MIDI Measure Counter (this counts up after every 96 MIDI ticks and is used for the song loop)
0x21 0x2 MIDI Tick Measure Counter (Counts down from 0x60 aka 96 MIDI Ticks)
0x23 0x2 Song Repeat Counter (Counts down from 0xFFFF after passing beginning loop measure)
0x25 0x10  ? Changing some values crash the game, while others don't
0x35 0x6  ? Table (00 03 01 04 02 05)
0x3B 0x6  ? Table (08 0B 09 0C 0A 0D)
0x41 0x6  ? Table (10 13 11 14 12 15)
0x47 0x18 Frequency Table These are the FNUM values that make up the 12 note Chromatic musical scale for HERAD. Basically, changing these values will modify the "tuning" of the scale.
0x5F 0x12 FNUM/Block Number Register Values These register values are sent directly to the OPL chip, however these values are missing the Key-On bit (bit 5, 0xB0-0xB8).
0x71 0x9  ? Table (00 01 02 08 09 0A 10 11 12)
0x7A 0x16 Fine Pitch Bend Table
0x90 0xA Coarse Pitch Bend Table
0x9A 0x2  ? Always 0x8000 (Changing this doesn't crash the game, but does pause playback if the value is below 0x80. Playback resumes if value is equal or greater than 80, however the value range only goes up to 0xBF)
0x9C 0x3 Padding (Always 0xEEEEEE, changing this doesn't affect playback)
0x9F 0x2  ? Two byte "ping-pong" timer that counts in bits (0x (0x1,0x2,0x4,0x8,0x10,0x20,0x40,0x80)
0xA1 0x1 Padding (Always 0x90, changing this doesn't affect playback)
0xA2 0x12 Current Event Midi Tick Counter (counts down until next event)
0xB4 0x12 MIDI Track Position (counts up until reaching the track end)
0xC6 0x12 Start of MIDI Tracks (Absolute address in music file, rather than relative address in music file header)
0xD8 0x12 List of MIDI tracks using drum keymap instrument If MIDI track uses keymap instrument, the absolute offset of the instrument in the music file will be used. If the instrument changes back to a normal instrument, the value zeros out.
0xEA 0x12 Current Instrument (first byte) / MIDI Pitch (second byte) The pitch here is after any transpose macros have been applied. Also, if the keymap instrument is used, the first byte will display the instrument(s) that are actually being played. If no instrument or note data exist, the values will be 0xFF/0x00 respectively. NoteOffs are enabled by setting the highest bit to 1 in the pitch byte.
0xFC 0x12 Pitch Slide Range Flag (first byte) / Root Note Transpose (second byte) for each MIDI track
0x10E 0x12 Pitch Slide Duration Counter (first byte) / Pitch Slide Duration (second byte) for each MIDI track The Pitch Slide Counter starts at the value assigned by the second byte.
0x120 0x12 Pitch Slide Counter (first byte) / Pitch Slide Range (second byte) for each MIDI track The Pitch Slide Counter starts at 0x40 (unless it is transposed) and either goes up or down depending on Pitch Slide Range value.
0x132 0x12 Modulator Output Level Scaling (first byte) / Carrier Output Level Scaling (Second byte) These values are taken from the current instrument.
0x144 0x12 Modulator Output Level (first byte) / Carrier Output Level (Second byte) These values are taken from the current instrument.
0X156 0x12 Modulator Output Level Register (first byte) / Carrier Output Level Register (Second byte) These are the final register values that are sent to the OPL chip.
0x168 0x12 Panning/Feedback/Connector Register Value
0x17A 0x12  ? (Only affects songs that have loop points)
0x18C 0x12 Loop Start Absolute Address for each MIDI track (loads after the song passes the loop beginning measure)
0x19E 0x24  ? Seems to be just zeros
0x1C2 0x1 Terminator (flashes 0xFF during playback)
0x1C3 EOF Binary Data (starts with "HSQ" with 0x20 at the end) (0x48535120)


Dune HERAD "DUNEADL.HSQ" Driver (Floppy Version)

Offset Size Description Notes
0x00 0x21  ? Changing some values crash the game, while others don't
0x21 0x2  ? Something to do with the song speed (Always 0x0240)
0x17 0x2  ? (Always 0x00E0)
0x19 0x2 Song length + 0x0040 This value is the first two bytes from music file with 0x0040 added, for example WORMSUIT.HSQ's song length (0x3C7E) will show up as 0x3CBE
0x1B 0x2  ? (Always 0x00E0)
0x29 0x2  ? (OPL Timer?)
0x2B 0x2 MIDI Measure Counter This counts up after every 96 MIDI ticks and is used for the song loop
0x2D 0x2 MIDI Tick Measure Counter Counts down from 0x60 aka 96 MIDI Ticks
0x2F 0x12  ? Changing some values crash the game, while others don't
0x41 0x6  ? Table (00 03 01 04 02 05)
0x47 0x6  ? Table (08 0B 09 0C 0A 0D)
0x4D 0x6  ? Table (10 13 11 14 12 15)
0x53 0x18 Frequency Table These are the FNUM values that make up the 12 note Chromatic musical scale for HERAD. Basically, changing these values will modify the "tuning" of the scale.
0x6B 0x12 FNUM/Block Number Register Values These register values are sent directly to the OPL chip, however these values are missing the Key-On bit (bit 5, 0xB0-0xB8).
0x7D 0x9  ? Table (00 01 02 08 09 0A 10 11 12)
0x86 0x16 Fine Pitch Bend Table
0x9C 0xA Coarse Pitch Bend Table
0xA6 0x1 Song Reset/Fade Out Controls 0x80 = Play song. 0x00 = resets the song back to the beginning, then the value switches back to 0x80 to play the song. 0xC0 = Fades the song out and waits until the Fade Out MIDI Tick Timer at 0xA8 counts to zero before resetting the song from the beginning).
0xA7 0x1 Change Song Depending on which screen the game is in, this is set to 0x1 so when the current song is finished playing or fades out, a new song will play. In the Options menu of Dune, if "Music On (CD-Style)" is selected, this byte is always 0x1 when a song is playing.
0xA8 0x1 Fade Out MIDI Tick Timer Counts down from 0xFF with each MIDI tick. Once this reaches zero, the value at 0xA6 changes back to 0x0000.
0xA9 0x2  ? Something to do with the fade out timer. When not active, this is at 0x1111. Seems to count in only 0x11,0x22,0x44,0x88.
0xAB 0x1 Padding (Always 0x90, changing this doesn't affect playback)
0xAC 0x12 Current Event Midi Tick Counter (counts down until next event)
0xBE 0x12 MIDI Track Position + 0x0040 Absolute value with 0x0040 added (counts up until reaching the track end)
0xD0 0x12 Start of MIDI Tracks + 0x0040 Absolute value with 0x0040 added (Absolute address in music file, rather than relative address in music file header)
0xE2 0x12 Current Instrument (first byte) / MIDI Pitch (second byte) The pitch here is after any transpose macros have been applied. If no instrument or note data exist, the values will be 0xFF/0x00 respectively. NoteOffs are enabled by zeroing out the pitch byte.
0xF4 0x12 Pitch Slide Range Flag (first byte) / Root Note Transpose (second byte) for each MIDI track
0x106 0x12 Pitch Slide Duration Counter (first byte) / Pitch Slide Duration (second byte) for each MIDI track The Pitch Slide Counter starts at the value assigned by the second byte.
0x118 0x12 Pitch Slide Counter (first byte) / Pitch Slide Range (second byte) for each MIDI track The Pitch Slide Counter starts at 0x40 (unless it is transposed) and either goes up or down depending on Pitch Slide Range value.
0x12A 0x12 Modulator Output Level Scaling (first byte) / Carrier Output Level Scaling (Second byte) These values are taken from the current instrument.
0x13C 0x12 Modulator Output Level (first byte) / Carrier Output Level (Second byte) These values are taken from the current instrument data and also include the Key scaling level register values.
0X14E 0x12 Modulator Output Level Register (first byte) / Carrier Output Level Register (Second byte) These are the final register values that are sent to the OPL chip. These values also include the Key scaling level register values.
0x160 0x12 Feedback Scaling - Velocity (first byte) / Feedback/Connector (second byte) These values are taken from the current instrument data, however the second byte is the unmodified register value of the feedback and connector settings.
0x172 0x12 Modulator Output Level Aftertouch Scaling (first byte) / Carrier Output Level Aftertouch Scaling (second byte) These values are taken from the current instrument data
0x184 0x12 Feedback Scaling - Aftertouch / Feedback/Connector Register Value The first value is taken from the current instrument data, however the second byte is the final modified register value of the feedback and connector settings that will be sent to the OPL2 chip.
0x196 0x12 Loop Counter Values These are the values that the MIDI tick counters load when the song loops.
0x1A8 0x12 Loop Start Absolute Address for each MIDI track + 0x0040 (loads after the song passes the loop beginning measure)
0x1BA EOF Binary Data (always starts with "HSQ" string with 0x16 at the end) (0x48535116)