File Formats


Key:
EOR - Bitwise Exclusive OR, 0x0000 - Hex Number, %00000000 - Binary Number


BBC Micro
Offset into file Content Size Format
0x0000 Password Data 8 bytes per screen, 8 screens Each letter is [byte] EOR (63-offset). Terminated by CR (ASCII 13)
0x0040 Time Limits 2 bytes per screen, 8 screens [byte1] + [byte2] * 256 (i.e. First byte is LSB, second byte is MSB)
0x0050 Edit Codes 2 bytes per screen, 8 screens [byte1] + [byte2] * 256 (i.e. First byte is LSB, second byte is MSB)
0x0060 Transporters 4 bytes per transporter, 4 transporters per screen, 8 screens. Source x,y , Destination x,y. If no transporters, first byte is 0xFF
0x00E0 Colour Palette 4 bytes per screen, 8 screens. Each byte represents a BBC Colour
(i.e. 0:Black, 1:Red, 2:Green, 3:Yellow, 4:Blue, 5:Magenta, 6:Cyan, 7:White)
0x0100 Map Data 420 bytes per screen, 8 screens The map is represented by a number which indicates which character (0-47).
Each 8 characters are packed into 5 bytes, across map then down (28x24 characters):
Chr 1 bits 0-4 are Byte 1 bits 0-4
Chr 2 bits 0-2 are Byte 1 bits 5-7
Chr 2 bits 3-4 are Byte 2 bits 0-1
Chr 3 bits 0-4 are Byte 2 bits 2-6
Chr 4 bit 0 is Byte 2 bit 7
Chr 4 bits 1-4 are Byte 3 bits 0-3
Chr 5 bits 0-3 are Byte 3 bits 4-7
Chr 5 bit 4 is Byte 4 bit 0
Chr 6 bits 0-4 are Byte 4 bits 1-5
Chr 7 bits 0-1 are Byte 4 bits 6-7
Chr 7 bits 2-4 are Byte 5 bits 0-2
Chr 8 bits 0-4 are Byte 5 bits 3-7
0x0E20 Character Data 128 bytes per character, 48 characters Each byte represents four pixels per character, across character then down (16x32):
%12341234 for pixels 1,2,3 and 4 (2 bits each) representing one of four colours (0,1,2 or 3)
Total file size:
9760 bytes
Thank-you to Neil Crutchlow and Jonathan Marten for their help with the BBC Micro format, from which the following formats were worked out.

Acorn Electron
Offset into file Content Size Format
0x0000 Password Data 8 bytes per screen, 8 screens Each letter is [byte] EOR (63-offset). Terminated by CR (ASCII 13)
0x0040 Time Limits 2 bytes per screen, 8 screens [byte1] + [byte2] * 256 (i.e. First byte is LSB, second byte is MSB)
0x0050 Edit Codes 2 bytes per screen, 8 screens [byte1] + [byte2] * 256 (i.e. First byte is LSB, second byte is MSB)
0x0060 Transporters 4 bytes per transporter, 4 transporters per screen, 8 screens. Source x,y , Destination x,y. If no transporters, first byte is 0xFF
0x00E0 Colour Palette 4 bytes per screen, 8 screens. Each byte represents a BBC Colour
(i.e. 0:Black, 1:Red, 2:Green, 3:Yellow, 4:Blue, 5:Magenta, 6:Cyan, 7:White)
0x0100 Map Data 420 bytes per screen, 8 screens The map is represented by a number which indicates which character (0-47).
Each 8 characters are packed into 5 bytes, across map then down (28x24 characters):
Chr 1 bits 0-4 are Byte 1 bits 0-4
Chr 2 bits 0-2 are Byte 1 bits 5-7
Chr 2 bits 3-4 are Byte 2 bits 0-1
Chr 3 bits 0-4 are Byte 2 bits 2-6
Chr 4 bit 0 is Byte 2 bit 7
Chr 4 bits 1-4 are Byte 3 bits 0-3
Chr 5 bits 0-3 are Byte 3 bits 4-7
Chr 5 bit 4 is Byte 4 bit 0
Chr 6 bits 0-4 are Byte 4 bits 1-5
Chr 7 bits 0-1 are Byte 4 bits 6-7
Chr 7 bits 2-4 are Byte 5 bits 0-2
Chr 8 bits 0-4 are Byte 5 bits 3-7
0x0E20 Character Data 72 bytes per character, 48 characters Each byte represents four pixels per character, across character then down (12x24):
%12341234 for pixels 1,2,3 and 4 (2 bits each) representing one of four colours (0,1,2 or 3)
0x1BA0 Unused 640 bytes Undefined
Total file size:
7712 bytes

Commodore 64
Offset into file Content Size Format
0x0000 Unknown 2 bytes Should be 0x00A0 and 0x0067
0x0002 Edit Codes 8 bytes per screen, 8 screens Unencrypted. Edit codes are stored as a string format, padded with 3 zeros (ASCII 48).
Edit codes of less than 5 characters should be preceded by zeros (ASCII 48)
0x0042 Colour Palette 4 bytes per screen, 8 screens. Each byte represents a Commodore Colour
(i.e. 0:Black,1:White,2:Red,3:Cyan,4:Magenta,5:Green,6:Blue,7:Yellow,8:Orange,
9:Dark Yellow,10:Pink,11:Grey,12:Light Grey,13:Lime Green,14:Pale Blue,15:Silver)
0x0062 Character Data 128 bytes per character, 48 characters Each byte represents four pixels per character, across character then down (16x32):
%11223344 for pixels 1,2,3 and 4 (2 bits each) representing one of four colours (0,1,2 or 3)
0x1862 Map Character Data 8 bytes per character, 48 characters Each byte represents four pixels per character, across character then down (4x8):
%11223344 for pixels 1,2,3 and 4 (2 bits each) representing one of four colours (0,1,2 or 3)
0x19E2 Time Limits 2 bytes per screen, 8 screens This is in Hexadecimal-Coded-Decimal (e.g. 0x0012 and 0x0034 would be a time limit of 1234)
0x19F2 Password Data 8 bytes per screen, 8 screens Unencrypted. Terminated by SPACE (ASCII 32)
0x1A32 Map Data 420 bytes per screen, 8 screens The map is represented by a number which indicates which character (0-47).
Each 8 characters are packed into 5 bytes, across map then down (28x24 characters):
Chr 1 bits 0-4 are Byte 1 bits 0-4
Chr 2 bits 0-2 are Byte 1 bits 5-7
Chr 2 bits 3-4 are Byte 2 bits 0-1
Chr 3 bits 0-4 are Byte 2 bits 2-6
Chr 4 bit 0 is Byte 2 bit 7
Chr 4 bits 1-4 are Byte 3 bits 0-3
Chr 5 bits 0-3 are Byte 3 bits 4-7
Chr 5 bit 4 is Byte 4 bit 0
Chr 6 bits 0-4 are Byte 4 bits 1-5
Chr 7 bits 0-1 are Byte 4 bits 6-7
Chr 7 bits 2-4 are Byte 5 bits 0-2
Chr 8 bits 0-4 are Byte 5 bits 3-7
0x2752 Unused 16 bytes Undefined - usually 0x0000
0x2762 Transporters 4 bytes per transporter, 4 transporters per screen, 8 screens. Source x,y , Destination x,y. If no transporters, first byte is 0xFF
0x27E2 Unused 6 bytes Undefined - usually 0x0000
Total file size:
10210 bytes

Acorn Archimedes
Offset into file Content Size Format
0x0000 Password Data 8 bytes per screen, 8 screens Unknown
0x0040 Time Limits 4 bytes per screen, 8 screens [byte1] + [byte2] * 256 (i.e. First byte is LSB, second byte is MSB)
Last two bytes are unused
0x0060 Edit Codes 2 bytes per screen, 8 screens [byte1] + [byte2] * 256 (i.e. First byte is LSB, second byte is MSB)
NOTE: These codes are a red herring as the Archimedes version
works out the codes based on the map contents
0x0080 Transporters 8 bytes per transporter, 4 transporters per screen, 8 screens. Bytes 1 and 2 are Source x,y , bytes 5 and 6 are Destination x,y. Encoding unknown
0x0180 Colour Palette 4 bytes per colour, 16 colours per screen, 8 screens. Bytes 2,3 and 4 represents the Red, Green and Blue levels of each of the 16 colours
(although the sixteenth is unused)
0x0380 Map Data 420 bytes per screen, 8 screens The map is represented by a number which indicates which character (0-47).
Each 8 characters are packed into 5 bytes, across map then down (28x24 characters):
Chr 1 bits 0-4 are Byte 1 bits 0-4
Chr 2 bits 0-2 are Byte 1 bits 5-7
Chr 2 bits 3-4 are Byte 2 bits 0-1
Chr 3 bits 0-4 are Byte 2 bits 2-6
Chr 4 bit 0 is Byte 2 bit 7
Chr 4 bits 1-4 are Byte 3 bits 0-3
Chr 5 bits 0-3 are Byte 3 bits 4-7
Chr 5 bit 4 is Byte 4 bit 0
Chr 6 bits 0-4 are Byte 4 bits 1-5
Chr 7 bits 0-1 are Byte 4 bits 6-7
Chr 7 bits 2-4 are Byte 5 bits 0-2
Chr 8 bits 0-4 are Byte 5 bits 3-7
0x10A0 Character Data 512 bytes per character, 48 characters Each byte represents two pixels per character, across character then down (32x32):
Bits 4-7 are first pixel, bits 0-3 are second pixel, representing one of the sixteen colours
Total file size:
28832 bytes
If anyone knows how to decode the Passwords, Transporters and Edit Codes, can they please let me know so I can complete the above table.
Please do not ask for the PC Format as it is subject to copyright. Also, I will not reveal the Repton The Lost Realms format until at least a year after release (if at all).

Home