Difference between revisions of "Sonic Classic Collection/Technical information"
From Sonic Retro
Ccawley2011 (talk | contribs) (Created page with "{{back}}Category:Technical information {{sub-stub}} '''''TODO:''''' * Move emulation information from the main page * More information about screensGame_eu.dat and Game.p...") |
Ccawley2011 (talk | contribs) m |
||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{back}}[[Category:Technical information]] | {{back}}[[Category:Technical information]] | ||
− | {{ | + | {{stub}} |
'''''TODO:''''' | '''''TODO:''''' | ||
* Move emulation information from the main page | * Move emulation information from the main page | ||
− | * More information about | + | * More information about Game.pak |
* Document any modifications made to the Mega Drive ROMs | * Document any modifications made to the Mega Drive ROMs | ||
* Full list of tracks from the .mods files? | * Full list of tracks from the .mods files? | ||
+ | |||
==Music and Sound effects== | ==Music and Sound effects== | ||
Rather than emulating the Mega Drive audio hardware, all of the music and sound effects are pre-recorded and stored in .mods files. These can be unpacked using [https://github.com/ccawley2011/ubiquitous-doodle/blob/master/QuickBMS/scripts/SCCmods.bms this QuickBMS script]. | Rather than emulating the Mega Drive audio hardware, all of the music and sound effects are pre-recorded and stored in .mods files. These can be unpacked using [https://github.com/ccawley2011/ubiquitous-doodle/blob/master/QuickBMS/scripts/SCCmods.bms this QuickBMS script]. | ||
− | The file format consists of a 32-bit integer containing the number of sound effects or tracks, followed by an array of 32-bit integers, each containing a pointer to a structure containing information about the particular sound. If a pointer is identical to the following pointer, then that pointer is for an empty sound, and should be ignored. The structure | + | The file format consists of a 32-bit integer containing the number of sound effects or tracks, followed by an array of 32-bit integers, each containing a pointer to a structure containing information about the particular sound. If a pointer is identical to the following pointer, then that pointer is for an empty sound, and should be ignored. The structure is described below: |
{|class="prettytable" style="width:auto;" | {|class="prettytable" style="width:auto;" | ||
Line 33: | Line 34: | ||
|} | |} | ||
− | The audio data follows immediately after this header, using the IMA ADPCM codec described [ | + | The audio data follows immediately after this header, using the IMA ADPCM codec described [https://problemkaputt.de/gbatek-ds-sound-notes.htm here]. |
+ | |||
+ | |||
+ | ==UI graphics== | ||
+ | The graphics for the user interface are stored in the screensGame_eu.dat file. This can be unpacked using [https://github.com/ccawley2011/ubiquitous-doodle/blob/master/QuickBMS/scripts/SCCscreens.bms this QuickBMS script]. The file begins with the following header: | ||
+ | |||
+ | {|class="prettytable" style="width:auto;" | ||
+ | !Offset||Type||Description | ||
+ | |- | ||
+ | | 0 | ||
+ | | 4 Bytes | ||
+ | | Number of image layouts. | ||
+ | |- | ||
+ | | 4 | ||
+ | | 4 Bytes | ||
+ | | Pointer to image layout data, plus 0x25DF000. | ||
+ | |- | ||
+ | | 8 | ||
+ | | 4 Bytes | ||
+ | | Number of image names | ||
+ | |- | ||
+ | | C | ||
+ | | 4 Bytes | ||
+ | | Pointer to image name pointers, plus 0x23D1000. | ||
+ | |- | ||
+ | | 10 | ||
+ | | 4 Bytes | ||
+ | | Number of compressed image names | ||
+ | |- | ||
+ | | 14 | ||
+ | | 4 Bytes | ||
+ | | Pointer to compressed image name pointers, plus 0x23D1000. | ||
+ | |- | ||
+ | | 18 | ||
+ | | 4 Bytes | ||
+ | | Number of compressed images | ||
+ | |- | ||
+ | | 1C | ||
+ | | 4 Bytes | ||
+ | | Pointer to compressed image index, plus 0x23D1000. | ||
+ | |} | ||
+ | |||
+ | Each image layout consists of 192 32-bit words containing pointers to the 16-bit BGR555 graphics data for each row in the image, plus 0x25DF000. | ||
+ | |||
+ | Some images are instead compressed using the LZ11 algorithm described [https://problemkaputt.de/gbatek-lz-decompression-functions.htm here]. These contain raw 256x192 images using 16-bit BGR555 graphics, and are referred to by the index, which is an array of the following structure: | ||
+ | |||
+ | {|class="prettytable" style="width:auto;" | ||
+ | !Offset||Type||Description | ||
+ | |- | ||
+ | | 0 | ||
+ | | 4 Bytes | ||
+ | | Size of the compressed file. | ||
+ | |- | ||
+ | | 4 | ||
+ | | 4 Bytes | ||
+ | | Pointer to the compressed file, plus 0x25DF000. | ||
+ | |} | ||
+ | |||
+ | Names are stored as an array of pointers to the null terminated strings containing the name of the corresponding image, plus 0x23D1000. The array only contains the names for the English images - the list should be repeated for each of the remaining languages. | ||
+ | |||
==References== | ==References== |
Latest revision as of 10:49, 13 May 2021
- Back to: Sonic Classic Collection.
This short article is in need of work. You can help Sonic Retro by adding to it. |
TODO:
- Move emulation information from the main page
- More information about Game.pak
- Document any modifications made to the Mega Drive ROMs
- Full list of tracks from the .mods files?
Music and Sound effects
Rather than emulating the Mega Drive audio hardware, all of the music and sound effects are pre-recorded and stored in .mods files. These can be unpacked using this QuickBMS script.
The file format consists of a 32-bit integer containing the number of sound effects or tracks, followed by an array of 32-bit integers, each containing a pointer to a structure containing information about the particular sound. If a pointer is identical to the following pointer, then that pointer is for an empty sound, and should be ignored. The structure is described below:
Offset | Type | Description |
---|---|---|
0 | 4 Bytes | Length of the sound in bytes, including this header. |
4 | 4 Bytes | Number of bytes from the end to be looped. |
8 | 2 Bytes | Sample rate. |
A | 6 Bytes | Unknown. |
The audio data follows immediately after this header, using the IMA ADPCM codec described here.
UI graphics
The graphics for the user interface are stored in the screensGame_eu.dat file. This can be unpacked using this QuickBMS script. The file begins with the following header:
Offset | Type | Description |
---|---|---|
0 | 4 Bytes | Number of image layouts. |
4 | 4 Bytes | Pointer to image layout data, plus 0x25DF000. |
8 | 4 Bytes | Number of image names |
C | 4 Bytes | Pointer to image name pointers, plus 0x23D1000. |
10 | 4 Bytes | Number of compressed image names |
14 | 4 Bytes | Pointer to compressed image name pointers, plus 0x23D1000. |
18 | 4 Bytes | Number of compressed images |
1C | 4 Bytes | Pointer to compressed image index, plus 0x23D1000. |
Each image layout consists of 192 32-bit words containing pointers to the 16-bit BGR555 graphics data for each row in the image, plus 0x25DF000.
Some images are instead compressed using the LZ11 algorithm described here. These contain raw 256x192 images using 16-bit BGR555 graphics, and are referred to by the index, which is an array of the following structure:
Offset | Type | Description |
---|---|---|
0 | 4 Bytes | Size of the compressed file. |
4 | 4 Bytes | Pointer to the compressed file, plus 0x25DF000. |
Names are stored as an array of pointers to the null terminated strings containing the name of the corresponding image, plus 0x23D1000. The array only contains the names for the English images - the list should be repeated for each of the remaining languages.
References
Sonic Classic Collection | |
---|---|
Manuals |