GEOS Extensions
Categories:
Later on in the life of the C64, the GEOS OS came out. It was a system much like many other windowing OS's (MAC OS, Windows) in that it used icons, windows, a mouse pointer and resource drivers. In order to contain all the information needed for the windowing system (icon, window position, creation time/date), a new filetype called VLIR was needed and directory changes were made. While GEOS files might not be of interest to many of the emulator users, it is likely that these files will be encountered, and knowledge of them would be helpful.
There are actually two types of GEOS files, VLIR and SEQuential. Don't confuse the GEOS SEQuential type with that of the standard D64 SEQ file. They are related, but not the same. VLIR are described in more detail following this paragraph. GEOS SEQuential files are all non-VLIR files, including normal PRG, USR and SEQ types.
GEOS files usually have an entity attached called an INFO block. It contains ICON info, author, file description, load address etc. However, just because an INFO block does not exist for a given file, does not mean that the file is not a GEOS file.
Each GEOS VLIR file or application is comprised of many separate chains (called RECORDS) for different sections of the app/file. Each RECORD can be loaded in separately and overtop of other ones. Below is a dump of the first directory sector of the GEOS 2.0 disk. Note the first entry seems normal enough, but the rest have additional information in the normally unused section of the entry.
Directory entry
Byte | Content | |||||||
---|---|---|---|---|---|---|---|---|
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
00 | 15 |
As per CBM DOS, Location of next directory sector or 0x0000 for last sector or not first file |
8 | |||||
01 | 7 | 0 | ||||||
02 | Closed | Locked | Save | 30CBM File Type | ||||
03 | 15 | Location of first sector of file | 8 | |||||
04 | 7 | 0 | ||||||
05 | Filename in PETASCII padded with 0xA0 | |||||||
06 | ||||||||
07 | ||||||||
08 | ||||||||
09 | ||||||||
0A | ||||||||
0B | ||||||||
0C | ||||||||
0D | ||||||||
0E | ||||||||
0F | ||||||||
10 | ||||||||
11 | ||||||||
12 | ||||||||
13 | ||||||||
14 | ||||||||
15 | 15 | Location of info block | 8 | |||||
16 | 7 | 0 | ||||||
17 | GEOS file structure, 00=Sequential 01=VLIR file | |||||||
18 | GEOS file type | |||||||
19 | Year (1900+value) | |||||||
1A | Month (1-12) | |||||||
1B | Day (1-31) | |||||||
1C | Hour (0-23) | |||||||
1D | Minute (1-59) | |||||||
1E | 7 | File size in sectors | 0 | |||||
1F | 15 | 8 |
Info block
Byte | Content | |||||||
---|---|---|---|---|---|---|---|---|
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
00 | 15 | Always 0x00, 0xFF as this is 1 sector long | 8 | |||||
01 | 7 | 0 | ||||||
02 | Information sector ID Always 0x03 0x15, 0xBF | |||||||
03 | ||||||||
04 | ||||||||
05 | Icon bitmap in sprite format, 63 bytes | |||||||
43 | ||||||||
44 | 30CBM File Type | |||||||
45 | GEOS file type | |||||||
46 | GEOS file structure | |||||||
47 | 7 | Program load address | 0 | |||||
48 | 15 | 8 | ||||||
49 | 7 | Program end address Accessories only |
0 | |||||
4A | 15 | 8 | ||||||
4B | 7 | Program start address | 0 | |||||
4C | 15 | 8 | ||||||
4D | Class text, terminated with 0x00 | |||||||
60 | ||||||||
61 | Author, terminated with 0x00 | |||||||
74 | ||||||||
75 | If document name of application that created it | |||||||
88 | ||||||||
89 | Free for applications, unreserved | |||||||
9F | ||||||||
A0 | Description, terminated with 0x00 | |||||||
FF |
The CBM File Type, GEOS file type and GEOS file structure fields are duplicated in both structures
CBM DOS file type
REL files are not permitted with GEOS. If byte 0x18 in the directory entry is 0x00 then it's a standard CBM DOS file, otherwise it's a GEOS file.
GEOS File type
Value | Type | Value | Type |
---|---|---|---|
00 | Normal C64 file | 08 | Font File |
01 | BASIC | 09 | Printer Driver |
02 | Assembler | 0A | Input Driver |
03 | Data file | 0B | Disk Driver |
04 | System file | 0C | System Boot file |
05 | Desk Accessory | 0D | Temporary |
06 | Application | 0E | Auto-Execute file |
07 | Application Data | 0F | Undefined |
File types 0x0F…0xFF are undefined.