Romik (modified)

Found on:
"Tower of Despair"

Loader files:
ROM Header
Only filename
ROM Data
Turbo loader

Encoding:
Endianess:LSbF
Threshold:0x00F0
Lead-in:7680 x 1-bit
Sync:None
Byte:12+ bits
0-bit:Short

Structure:
Header:Yes
Checksum:Yes

Lead-in:
Lead-in is 7680 1-bits, loader only checks for 256 consecutive 1-bits.

Byte:
For every byte the first two bits are ignored.
The the loader wait for the first 0-bit.
It then fetches the 8 bits making up the byte.
After these bits comes a parity bit which should be '1' for odd parity.

Data:
Data is ordered into 8+1 byte blocks.
Loader first waits for three consecutive 1-bits.
Then follows 8 data bytes and a checksum byte for the block.

Checksum:
Checksum is EOR of the 8 bytes in a block, with the checksum byte directly following the block.
The header is also followed by a checksum byte.
Loader doesn't verify the checksum, it is used to repair a byte if a parity error has been detected.

Header:
00        Load start address high byte
01        Load end address high byte (Exclusive)
02-03   Address to subroutine to call before game start (Low/high order)
04-07   ??