pcGeos Version 0.3 [August 1996] Copyright (c) 1995,1996 Jochen Metzinger, Schrammsweg 33 D, 20249 Hamburg/Germany <1metzing@informatik.uni-hamburg.de> All rights reserved pcGeos is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. pcGeos is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License in COPYING for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Table of Context 0 Preface 1 Compiling 2 From C64/C128 to PC 2.1 Convert 2.2 GDIR and GGET 3 CVT2XXX 3.1 CVT2XXX.CFG 4 CVT2FNT and SHOWFONT 5 CVT2TXT 6 CVT2PCX 7 CVT_INFO 8 Developer's Tools 8.1 D64DUMP 8.2 CVT_USED and CVT_SIZE 8.3 CVT_REC A Disk Image Format B Converted GEOS File Format B.1 Header Block B.2 Info Block B.3 Index Block and Chains 0 Preface This document descripts how to use pcGeos. All programs understand the option /?, that give you a short description of the program and a list of all options. Many programs have the option /G and /E to select the default charset (german and english). Alexander Donald Boyce's "GEOS Programmer's Reference Guide" (ftp://ftp.funet.fi/pub/cbm/geos/ programmer/geostechref?.arc) give you more information about the GEOS file formats. 1 Compiling All TURBO PASCAL source files are included in the directory .\SRC. You need the command line compiler TPC (I use version 6.0). pcGeos has two default charsets (english and german). To create the pcGeos with english default charset you change the working directory to .\SRC and call the batch file > MAKE To create the pcGeos with german default charset you change the working directory to .\SRC and call the batch file > ERZEUGE Now you can move the .EXE files to .\BIN and add this directory to PATH. 2 From C64/C128 to PC GEOS files cannot be directly transferred via modem, ftp or transfer programs like X1541 (you can find them in ftp://ftp.funet.fi/pub/cbm/ transfer/1541-to-PC/) because of their special structure (info record, VLIR). You have to convert them. This can be done on your C64/C128 (see 2.1), on your PC on whole diskettes (or only used blocks transferred one; see 2.2) or with the transfer program Trans64. 2.1 Convert With William Coleman's Convert2.5 (ftp://ftp.funet.fi/pub/cbm/geos/ convert2.5) you can convert files from GEOS format to standard CBM format on your C64/C128. This files can be transferred (with an .cvt extention) and used directly by pcGeos. 2.2 GDIR and GGET The directory of a disk image (default extension .d64) image can be viewed by > GDIR image You can mask the directory with a file name pattern and the page option /1 thru /9 and /B. You can extract files from a disk image by calling > GGET image files You select the file name and page in the same way as in GDIR. You can get the files interactiv with the option /I, overwrite files with /O, create only standard files with /N and SEQ formatted GEOS files with /S. The resulted converted GEOS files have the same format as the one of Convert (see appendix B). 3 CVT2XXX You can convert the converted GEOS files cvt-files (default extension .CVT) with > CVT2XXX cvt-files You get an protocol of actions by option /V. For short memory size you can create a converting batch file by adding the batch file name. cvt2xxx.exe is a meta-converter. It call the converter that is named in cvt2xxx.cfg. 3.1 CVT2XXX.CFG cvt2xxx.cfg has to be in the same directory as cvt2xxx.exe. Each line that is empty or starts with a # is ignored. The other lines descript converting rules. Each rule has three parts: a GEOS type name, class name prefix and command string. GEOS type names are C=64, BAS, ASM, DATA, SYS, HELP, APPL, DOC, FONT, PRT, IN, DISK, STRT, TMP, SELF and MOUS. You can also use the joker name * for any GEOS type name. The class name prefix is a string in between double quotes(""). The command string is a semicolor seperated list of command lines, that will be called if a document of the specified GEOS type and class name prefix is found. In the command lines the % is a escape character that is replaced with the following character: %% get % %. get ; %B get the base name of the file name (w/o extension) %E get the extension of the file name %F get the file name %N get the base name of the file name (with extension) %P get the dir name of the file name See cvt2xxx.cfg in the directory .\bin as an example. 4 CVT2FNT and SHOWFONT You can view a GEOS font file on a VGA screen with > SHOWFONT cvt-file You can omit the waiting for key press with the option /N. If you do not have a VGA screen or you want to create a text file you will call > CVT2FNT cvt-file [fnt-file] with the output file fnt-file. If you want to create a file with same name and extension .FNT you will use the option /F. 5 CVT2TXT The text files from geoWrite, scraps and albums can be transferred by > CVT2TXT cvt-file [txt-file] with the converted GEOS file cvt-file and the text output file txt-file. If you want to create a file with same name and extension .TXT you will use the option /F. You view the context on the screen without txt-file. You get a verbose output which include font selection with the option /V. 6 CVT2PCX The graphic files from geoPaint, geoWrite, scraps and albums can be transferred, viewed and corrected by > CVT2PCX cvt-file [pcx-file] with the converted GEOS cvt-file and an output file pcx-file. If you want to create a file with same name and extension .PCX you will use the option /F. You only view the file when you omit the output file. You can omit the view with /Q. You can omit the waiting for key press with the option /N. There are four levels cvt2pcx can run (/1 thru /4). Level 1 stop on any error, level 2 continue on error, level 3 create black/white output on error and level 4 let you interactive correct errors. If you get the error message 'Device driver file not found ( EGAVGA.BGI)' you will set the environment variable BGI to the path to the driver or copy it in the same directory as CVT2PCX.EXE. 7 CVT_INFO You can call > CVT_INFO cvt-file to get all information of the info sector. With this information you can configure CVT2XXX, see why no converting tool was found or create new converting tools. 8 Developer's Tools While I have developed pcGeos I have used some utilities to examine disk images and converted GEOS files. They can be used to create new converting tools. 8.1 D64DUMP If you want to view sectors of a disk image you will use > D64DUMP image and input the track and sector of the sectors you want to examine. With a negative track number you leave D64DUMP. With track 0 D64DUMP try to show the next sector. 8.2 CVT_USED and CVT_SIZE CVT_USED shows which chains are used. With CVT_SIZE you get their sizes in byte. 8.3 CVT_REC To output the context of chain number in a converted GEOS file to the standard output you call > CVT_REC cvt-file number You get the info record with the `number' I, the directory with D and the ``VLIR'' record with V. You get a dump of the record with the option /D. A Disk Image Format The disk images used by pcTools (default extension .D64) are simple dumps of disks (sequence of the 256-byte blocks 1:0 1:1 1:2 ... 1:20 2:0 ... 35:16 [from double sided disks also 36:0 36:1 ... 70:16]). B Converted GEOS File Format A converted GEOS file is a sequence of 254-byte blocks. Each file has a header (#0) and a info (#1) block. They are descripted in B.1 and B.2. If the GEOS file has no VLIR structure the context of the file will be following. If it has a VLIR structure an index block (#2) will follow and than the context of each chain aligned to block boundary (see B.3). B.1 Header Block $00-$1D GEOS directory entry (see GDIR.PAS and GEOS.PAS) $1E-$39 magic string "SEQ formatted GEOS file V1.0" or "PRG formatted GEOS file V1.0" $3A-$9D unused $9E-$FE Creator name field; terminated by #0 B.2 Info Block The info block is a copy from the GEOS file (see CVT_INFO.PAS and GEOS.PAS). B.3 Index Block and Chains The index block is a list of the sizes of each of its branches (or chains). Each size is given in two bytes. The first byte give you the size of the chain in blocks. A null shows an empty chain. The second byte give you one less the number of used byte in the last block of the chain. *** 1996-08-15 Jochen Metzinger <1metzing@informatik.uni-hamburg.de> ***