RAW Format (Adlib)
Format type | Music |
---|---|
Notation type | OPL |
Instruments | OPL |
Max channel count | 9 or 11 (OPL2), 18 or 22 (Dual OPL2 and OPL3) |
Max track count | 1 |
Max pattern count | Unknown |
Max order count | Unknown |
Tags? | Unknown |
Games | None |
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.
File format
The file can be described in the following structure:
Data type | Name | Description |
---|---|---|
BYTE[8] | 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:
Register value | Purpose |
---|---|
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.
Control type | Purpose |
---|---|
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
Tools
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 |
Similar formats
- The DOSBox DRO Format has pretty much replaced the RAW format.
- The id Software Music Format (IMF) stores Adlib data in a similar manner in order to provide background music in many Apogee games.