RAW Format (Adlib)
The Rdos Raw OPL Capture format is used for storing captured OPL data from a game. The data was originally produced by the RAC utility, which ran as a TSR behind the game having its music captured.
The file can be described in the following structure:
|BYTE||cSignature||"RAWADATA" (not NULL-terminated)|
|UINT16LE||iClock||Initial clock speed (can be changed during playback)|
|BYTE||cOPLData||Song data (see below)|
|UINT16LE||iEOF||0xFFFF to indicate end of song|
The first byte in the song data will be the register data, followed by the OPL register where the data should be sent (i.e. in the opposite order to IMF and DRO.) The OPL register can also be one of these control values:
|0x00||Delay. The data byte is the number of cycles to delay by.|
|0x02||Control data (see below)|
If the register is 0x02, the data byte is the "control type" as shown below.
|0x00||Clock change. The following UINT16LE is the new clock speed.|
|0x01||Switch to "low" OPL chip (#0)|
|0x02||Switch to "high" OPL chip (#1)|
To convert the clock speed to a Hertz measurement (Hertz is cycles per second, and the delays are in units of one cycle), use this formula:
iHertz = 1193180.0 / iClockSpeed
The following tools are able to work with files in this format.
|Name||Platform||Play?||Create new?||Modify?||Convert/export to other?||Import from other?||Access hidden data?||Edit metadata?||Notes|
|AdPlug||Windows/Linux/DOS||Yes||Yes||No||No||Yes; many||N/A||View||Can convert all supported files into .raw|
|Camoto||Linux/Win||Yes||Yes||No||Yes; many||Yes; many||N/A||Yes|
|RAC||DOS||No||Yes||No||No||No||N/A||No||The original DOS TSR used for capturing game music|