[Coco] CoCo f83 -- Questions on .bin file format and disk layout for non SSSD disks.

Robert Gault robert.gault at worldnet.att.net
Fri Dec 19 08:41:14 EST 2008


Brett Heath wrote:
> Hello all,
> 
> Before begging for help here's an update on the status of f83 for the CoCo.
> 
> <snip>
> 
> By examining the first few bytes in other .bin files and playing around with
> the options on VCC2's import utilities I've come up with;
> 
> 00 <size> <load-adr>
> 
> for the first five bytes, but this didn't seem to work and it's apparent
> from the conversation in the Assembler thread that it's more complicated
> than that.
> 
> The Assembler thread gave me some more hints, but there are still some
> murky spots.
> 
>   1. Can a large (~16k) executable  be put in a single segment .bin file?

As you correctly stated, each segment preamble is of the form
$00 size location
with size and location in Motorola format - msn lsn
That means the largest segment can't exceed $FFFF bytes base 1. So, the 
answer to your question is Yes, as 16k is $4000.

>   2. If not what are the size restrictions and format requirements for
> each segment?

The content of each segment must be contiguous.

>   3. If so, what's the format of the postamble (and preamble for that matter)?

The postamble is $FF $00 $00 $MM $NN indicating that the end of the file 
has been reached $FF0000 and the execution (starting) address is $MMNN

>   4. Is there someplace where this is documented so I don't have to
> pester people
>       with questions?

Probably lots of places, certainly in the disk chapter of the Unravelled 
series by Spectral Associates.

>   5. What is the largest executable that can be loaded and run from Basic?
>        (64k CoCo 2)

Assuming you are not going to use the trick of moving all code to RAM, 
you can load slightly under 32k. You must leave room in low RAM for the 
Basic OS. Tape only $600-$7FFF, Disk $E00-$7FFF.
If Basic is to still operate, then room must be left for variables and 
stack space. You would need to CLEAR some space but not much.
If you are going to use all RAM, then you might put a loader program 
into the text window $400-$5FF, load bytes from tape or disk, move the 
bytes into RAM, and then start the program. That will give you access to 
$600-$FEFF.
The amount of memory available depends on how much of the ROM code you 
want to use in your programs.
><snip>
> Specifically, where are the additional FAT and directory entries
> stored on the 40 and
> 80 track disks.

As this is not sanctioned by Tandy for Disk Basic, there is no universal 
format for these larger disks. The few third party DOS that work with 
Basic disks larger than 42 tracks just extend the FAT region on the disk 
in T17S2. There is no change in the directory structure which is still 
T17S3 through T17S18.
The real problem is the low RAM used by Disk Basic. There is no more 
room in RAM to extend FAT copies, so something has to give. You can't 
work simultaneously with 4 drives.

> What other disk sizes/formats are common in the CoCo world and
> where might I find documantation on their layout?

OS-9 and FLEX. The OS-9 info can be found at
http://www.rtsi.com/ftparchive.html You will have to search the Internet 
for info on FLEX.

If you are talking about disk images on a PC, then there is JVC and DMK. 
Take a look at the source code for MESS
mess/src/formats/coco_dsk.c
Source code is available at http://www.mess.org/download.php or you can 
install SVN and browse the MESS repository.

 ><snip>
> Brett K. Heath
> 



More information about the Coco mailing list