I've been thinking that it's nice to have CAS files, as they are very convenient, but we are missing some info that would allow to reconstruct the original wave file from a CAS file.
Not to mention, not having to patch games that use custom loaders.
So, this is the idea I've come with. Adding cue data (as bin+cue files for optical media dumps) at the end of the CAS file.
It would be compatible with emulator with no cue support as cue data will be beyond cas data, and would provide necessary data for recreating the original wav file with a good degree of accuracy.
Also, it could be used to store extra data like cheat codes, level codes, or any other useful info that could be accessed within emulators.
Here's an initial spec off the top of my head:
Code: Select all
* CAS data * '[CUE' - Cue data begin (0x5B435545) CUE blocks ---------- 0xF0 - '0' length in hz (2 bytes) 0xF1 - '1' length in hz (2 bytes) 0x00 - Silence, in miliseconds (2 bytes) 0x0D - Data. Start and end offsets as uint32 (4+4 bytes) 0xEA - External Audio. Like tutorial tapes with embedded audio. 2 byte string size string size bytes with name of external audio file 4+4 bytes start and end offsets as uint32, could be file offsets or time offsets Another CUE blocks could include additional data like level passwords, cheats, etc... * uint32 - offset to cue data begin * 'CUE]' - Cue data end (footer) (0x4355455D)