Now we will describe some tape file formats (used to store
and retrieve games in the C64) using low level details and also with 6510
Assembly language programs. These type of formats are describe because
the emulator is able to manage them.
Describe a byte structure (with eventually coding information)
Describe the synchronization region and the countdown sequence
Describe header and file structure
Final comments and considerations
Eventual assembly listing
Note that the assembly listing has a fixed structure, where there's present:
The address of the location
The byte of opcode + eventually bytes of instruction
The disassembly mnemonic instruction
A comment of instruction
The comment can be color to see that:
example this is automatic generated comment
example this is a comment human added to show the situation
example this is a comment for routine call
example this is a comment for routine definition
example this is a comment for the value of data
In this table there's a reassume of the information that you can read below
(remember that the time provided are estimated, not measured).
Method
used bits
parity bit
Byte length (bits)
Copy present
Byte Duration (ms)
Byte per second
Time for 10Kbyte
Kernal
3
yes
20
2
20,4
49
7'
Golden 1
2
no
8
1
10,41
96
1'46"
Turbo
2
no
8
1
5,44
183
55"
Galadriel
2
no
8
1
4,21
237
43"
Golden 2
2
no
8
1
4,21
237
43"
Commodore Kernal
Format
This is the format used by the Commodore 64 to store programs and data
and it is already described in the previous page.
Bits:
L: ^^^°°°
H: ^^^^°°°°
*: ^^^^^°°°°°
Average time for HL: 2*996 micro sec
Average time for H*: 2*1243micro sec
Byte:
*H x0 x1 x2 x3 x4 x5 x6 x7 yy a byte
*L end of file
x0..x7 areHL for bit 1 and LH for 0 like in
a Manchester coding.
yy is a parity bit (01 has 0 parity, 11 has 1 parity)
The effective byte is the decode of x7..x0, because low bit
is the first.
Synchronization region:
a big region of 0 bits (this region
may occupies 2/3 tour of tape)
89h, 88h, 87h, 86h, 85h, 84h, 83h, 82h, 81h
for first copy
09h, 08h, 07h, 06h, 05h, 04h, 03h, 02h, 01h
for second copy
Header and File:
The header and the file are stored in 2 copies. The file has a synchronization
region like the header because when the header is found, the tape is stopped
for displaying the file name, so a new synchronization may be used.
The header contains these information (1 word is low, high byte):
1 byte: Type of header (01h, 03, 04)
1 word: Start of program in memory
1 word: End of program in memory
10h bytes: File name
9Fh bytes: Header body (normally 20h)
1 bytes: Checksum of header (simple xor method)
The file contains these information:
File length bytes: Body of file
1 bytes: Checksum of file (simple xor method)
Comment:
The Kernal archive format is more reliable but too much slow!
Byte Average Length: always 1 '*', 10 'H', 9 'L' Byte Average Times duration: 2*1243+18*996= 20,414 milli sec Byte per second: 1/0,0204=49 Time for 10Kbyte: 10240*2/49=418" = 7'
Listing:
No listing is available. See the Kernal listing for the implementation
of the method (that use interrupt for reading/writing).
Turbo Format
Galadriel Format
This is the format used by Galadriel Software to read the games with
fast mode.
Bits:
0: ^^^°°°
1: ^^^^°°°°
Average time for 0/1: 526 micro sec.
Byte:
x7 x6 x5 x4 x3 x2 x1 x0
x0..x7 are the 0/1 bits. The byte is x7..x0 because low
bit is the last.
Synchronization region:
a region of 02h bytes
10h, 09h, 08h, 07h, 06h, 05h, 04h, 03h, 02h, 01h
(Header and) File:
The file contains these information:
File length bytes: body of file
1 bytes: Checksum of file (simple xor method)
Comment:
This is a very quickly tape method but with no parity bit and only with
one checksum!
Byte Average Length:
4 '0', 4 '1' Byte Average Time duration: 8*526=4,208 milli sec. Bytes per second: 1/0,004208=237,64 Time for 10Kbytes: 10240/237,64=43,08 sec.
This is the format 1 used by Golden Software to read the games with fast mode.
Bits:
0: ^^^°°°
1: ^^^^°°°°
Average time for 0/1: 768 micro sec.
Byte:
x0 x1 x2 x3 x4 x5 x6 x7
x0..x7 are the 0/1 bits. The byte is x7..x0 because low
bit is the first.
Synchronization region:
a region of 02h bytes
52h, 42h
(Header and) File:
The file contains these information:
2 bytes: starting address of program
2 bytes: ending address of program
File length bytes: body of file
1 bytes:Checksum of file (simple xor method)
Comment:
This is a quickly tape method, but with no parity bit and only with
one checksum!
Byte Average Length:
4 '0', 4 '1' Byte Average Time duration: 8*768=10,416 milli sec. Bytes per second: 1/0,010416=96 Time for 10Kbytes: 10240/96=106,66 sec. = 1'46"
This is the format 2 used by Golden Software to read the games with fast mode.
Bits:
0: ^^^°°°
1: ^^^^°°°°
Average time for 0/1: 526 micro sec.
Byte:
x7 x6 x5 x4 x3 x2 x1 x0
x0..x7 are the 0/1 bits. The byte is x7..x0 because low
bit is the last.
Synchronization region:
a region of 02h bytes
09h, 08h, 07h, 06h, 05h, 04h, 03h, 02h, 01h
(Header and) File:
The file contains these information:
2 bytes: starting address of program
2 bytes: ending address of program
2 bytes: return address
File length bytes: body of file
Comment:
This is a very quickly tape method but with no parity bit and no checksum!
Byte Average Length:
4 '0', 4 '1' Byte Average Time duration: 8*526=4,208 milli sec. Bytes per second: 1/0,004208=237,64 Time for 10Kbytes: 10240/237,64=43,08 sec.