drivePACK file format version 1 is
obsolete. It was used on firmware v 0.5 and previous but has been replaced by
latest version. The following is a detailed explanation of the blocks used in that version of the format:
HEADER: 11bytes:
*DRIVEPACK_FILE_VERSION: 11 bytes: string where byte[10] is '\0' : DRIVE_PACK file format version identificaton : [R][O][M][P][A][C][K][v][0]
[1][\0] (0x57,0x4F.0x4D.0x50,0x41.0x43,0x4B,0x76,0xXX,0xXX,0x00)
METADATA BLOCKS: 1 + 4 + n bytes
*1 + 4 + METADATA_BLOCK_SIZE
*METADATA_BLOCK_TYPE: 1 bytes: uint8: embeded metadata block 1 type: 1:Title data block, 2: Songs information data block, 3: ROM content data block, 4: Embeded image data block.
*METADATA_BLOCK_SIZE: 4 bytes: uint32: size of embeded metadata block 1 ( does not include the 1 METADATA type byte and the 4 METADATA SIZE bytes ).
*METADATA_BLOCK_DATA: n bytes ....
So the different types of information are stored in the file as metadata blocks, each on with its _TYPE identifier byte, _SIZE bytes and _DATA bytes. This is the description of the different METADA BLOCKs in that version of the file format:
0x01:Title metadata block:
METADATA_BLOCK_TYPE: 1 byte = [01]
METADATA_BLOCK_SIZE: 4 bytes
METADATA_BLOCK_DATA: 0 to 0xFFFFFFFF bytes. Content of the "Title" block. The data on this METADATA_BLOCK consists on ASCII characters with the title of the ROM PACK.
0x02: Information metadata block:
METADATA_BLOCK_TYPE: 1 byte = [02]
METADATA_BLOCK_SIZE: 4 bytes
METADATA_BLOCK_DATA: 0 to 0xFFFFFFFF bytes. Content of the "Info" block. The data on this METADATA_BLOCK consists on ASCII characters with the list of the different titles in the ROM PACK, or with any other informative text.
0x03: ROM content metadata block:
METADATA_BLOCK_TYPE: 1 byte = [03]
METADATA_BLOCK_SIZE: 4 bytes
METADATA_BLOCK_DATA: 0 to 0xFFFF bytes. Content of the "ROM" block. The data on this METADATA_BLOCK is the content of the ROM PACK cartridge with the melodies program. Each byte of that block corresponds to two consecutive nibbles. First bytes in the block are the lowest addresses nibbles, and last bytes in the block are the highest address nibbles. The 4 lowest bits of each byte correspond to the high nibble, and the 4 high bits correspond to the low nibble. So file content [12][34][56][78][9A][BC][DE]... would correspond to ROM content @0:[1], @1:[2], @2:[3], @3:[4], @4:[5] ,@5:[6] ... Note that compared to .BIN files, in .DRP files the nibbles of each byte are swapped, so what in the .BIN file is 0xA5, in the DRP file is 0x5A.
A detailed description of the ROM content can be found in the page dedicated to the
ROM PACK technical information.
0x04: Embeded image metadata block:
METADATA_BLOCK_TYPE: 1 byte = [04]
METADATA_BLOCK_SIZE: 4 bytes
METADATA_BLOCK_DATA: 0 to 0xFFFFFFFF bytes
The following image shows the organisation of the content of a .drp file: