[Coco] cocomagic

Willard Goosey goosey at virgo.sdc.org
Mon Aug 31 19:01:16 EDT 2009


#CoCo Disk BASIC
#Coco binary files can be multi-section.  Each section is:
#$00 <16-bit length> <16-bit start address> <data>...
#The last section is $FF $0000 <16-bit exec address>
#Pretty much s-record with header, only in binary.
#(from: Robert Gault)
#
#Color TRSDOS binaries are single record, but can have overlays
#built-in to them.  They have a $FF section, but the exec address is
#$0000  They start at $1200, and should start with a JMP 1205 <16-bit-
#section-length> <code>....
#or in other words 00 xx xx 12 00 7E 12 05 yy yy <code...>
#BRA would be.....................20 03 zz yy yy <code...>
#LBRA would be....................16 00 02 yy yy <code...>
#
#xx xx is length of .bin section
#yy yy is length of the root program -- the same section may have
#overlays after the root program.

#except that the edtasm executables start at $1400 (zbug.bin) or 
#$1600 (edtasm.bin & edtasmov.bin)  Reading the code for CTRSDOS shows
#program can start anywhere above $11FF
#CTRSDOS info from Color Dist EDTASM manual

#wow, talk about conflicting with lots of stuff!

0	byte	0	CoCo DECB .bin

>3	beshort 0	relocatable, must supply offset

>3	beshort 0x0400	VDG text screen image

>3	beshort 0x0E00	Pmode graphics data,page 1
>>1	beshort 0x1800  Pmode 3/4
>>1	beshort 0x0800  Pmode 1/2
>>1	beshort 0x0600  Pmode 0
>3	beshort 0x1400  Pmode graphics data, page 2
>3	beshort 0x1A00  Pmode graphics data, page 3
>3	beshort 0x2000  Pmode graphics data, page 4
>3	beshort 0x2600  Pmode graphics data, page 5
>3	beshort 0x2c00  Pmode graphics data, page 6
>3	beshort 0x3200  Pmode graphics data, page 7
>3	beshort 0x3800  Pmode graphics data, page 8 

>3	beshort 0xFFB0	CoCo3 Palette dump

>3	beshort 0xC000	ROM space image

>3	beshort 0x1200	Color TRSDOS required?
>>5      byte	0x7E
>>>8	beshort x	length of root program %d
>>5	byte	0x16
>>>8	beshort x	length of root program %d

>1	beshort	x	length of first record %d
>3	beshort x	load address of first record %d

#TC3  "The Compressor" archiver
#<sequence number (start at 1)><header><data><sequence number>....
#from: Tim Koonce's untc.c

0	byte	1	TC3 archive
#header
>1	string	x	Filename: %s
>9	string	x	ext: %s
>12	byte	x	File type: %d
>13	byte	x	ASCII Flag: %d
>14	byte	1	valid version
>14	byte	x	invalid version number: %d
>15	byte	x	Length1: %d
>16	beshort	x	Length2 +3 : %d
>18	byte	x	compression type: %d


#Additional OS-9 formats

#VEF image 
#Vdg Extended Format, a graphics format
#from: MVCanvas Version 2.0 docs by Mike Haaland

#also conflicts with lots of stuff...
0	beshort 0x0000	VEF image data, 320x200 16 color
0	beshort 0x0001  VEF image data, 640x200  4 color
0	beshort 0x0003  VEF image data, 320x200  4 color
0	beshort 0x0004  VEF image data, 640x200  2 color

0	beshort 0x8000	squashed VEF image data, 320x200 16 color
0	beshort 0x8001  squashed VEF image data, 640x200  4 color
0	beshort 0x8003  squashed VEF image data, 320x200  4 color
0	beshort 0x8004  squashed VEF image data, 640x200  2 color

#Coco Usenet Transfer System, a smart uuencoder
#these can have text in front of the encoded part, and this will only
#work on CUTS files that don't.

0	string	.0000.	CUTS encoded file

#OS-9/6x09 ROF (object file)
#OS-9 libraries are just rof files catted together, which
#makes the linker slower but simpler.
#This also means that this could be a whole library of rof files, not
#just one.
#from: Jljao at aol.com

0	belong 0x62cd2387	OS-9 ROF object file
>4	beshort x		Type/language: %d
>6	byte	x		valid: %d
#>7     5 bytes! date/time
>12	byte	x		Edition: %d
>13	byte	x		Assembler version: %d
>14	beshort x		Uninitialized Data size: %d
>16	beshort	x		Uninitialized Direct Page size: %d
>18	beshort x		Initialized Data size: %d
>20	beshort x		Initialized Direct Page size: %d
>22	beshort x		Module Code size: %d
>24	beshort x		Module Stack size: %d
>26	beshort x		Module Entry Point: %d
>28	string  >\0		Module Name: %s

#OS-9/6x09 gpload data
#get / put buffer load 
#like most OS-9 formats, can have multiple sections catted together
#from: OS-9 Level II Technical Reference

0	beshort 0x1B2B		OS-9 GPLoad data
>1	byte	0xCA		StdPtrs group
>1	byte	0XC8		StdFnts group
>1	byte	0xCB		StdPats_2 group
>1	byte	0xCC		StdPats_4 group
>1	byte	0xCD		StdPats_16 group
>1	byte	0xC9		Clipboard group
>1	byte	x		Group: %d
>2	byte	x		Buffer Number: %d
>3	byte	x		Screen Type: %d
>4	beshort x		x-size: %d
>6	beshort x		y-size: %d
>8	beshort x		Data Length: %d

#OS-9/6x09 AR
#OS-9 ar is an archiver that also does compression
#Again, files are catted together
#from: Robert Gault's ar13ar12.b09 program

0	string	 +AR0.0+	OS-9 AR archive
>8	string	x		File: %s
>74	belong	x		Length: %d
>78	byte	x		Compression Version : %d
>79	byte	x		Status: %d
#next is 16 bytes of "attr" data
#then the compressed data


0	string	PROCEDURE	OS-9 BASIC-09 source

#iirc LI help file has a different format
0	string	@		OS-9 LII helpmsg file

#OS-9 shell uses * as a comment character.
0	string	*		OS-9 shell script or env.file


#YM6 sound files
#only sorta a CoCo format
#native to machines with a YM sound chip
#CoCo Speech/Sound pak has a YM chip, but it's complicated...

0	string	YM		YM sound file
>4	string	x		by: %s
>20	byte	1		interleaved
>34	string	x		title: %s
>55	string	x		Author: %s
>75	string	x		Software: %s

#DB9-90 database file
#used by Data Windows, was released into PD in 1990
#hoped to become the standard OS-9 database file format
#main database file .dba
#header is variable length:
#4 byte offset to the first data record
#4 byte offset to the field definition section
#2 byte numer of fields in each record
#6 byte application signature
#variable length app specific data field
#48 byte field definition for each field
#
#DB9-90 .ndx is a btree index file
header is:
#4 byte file offset to the root node of the tree
#2 byte duplication flag
#250 byte reserved space
#
#from: Data Windows Reference Manual Keith J. Alphonso
#closest thing to a real magic number is the app. signature
#Alphonso reserved ALPHA0..ALPHA9 
#
10	string	ALPHA0		OS-9 Data Windows database
>8	beshort	x		%d fields/record

#Color Computer Artist
0	string	Artist\ file\ type	Color Computer Artist

#Dynacalc
#Dynacalc's spreadsheet file not documented
#import/export data file is in ascii
#from: Dynacalc manual

0	string	*DYNACALC	OS-9 Dynacalc exported data
0	string	/Col		OS-9 Dynacalc import/export data column-major
0	string	/Row            OS-9 Dynacalc import/export data row-major

#Pilot language interpeter

0	string	R:		PILOT source




More information about the Coco mailing list