[Coco] Creating a .dsk MESS image an EASY way!

Robert Gault robert.gault at worldnet.att.net
Thu Dec 25 10:51:35 EST 2003


There has been quite a bit of confusion over the MESS utility IMGTOOL 
partially caused by buggy versions. That will be a thing of the past 
when the next MESS is released because of a new function included within 
the Coco emulation.

I recently answered a question saying that I created a 0byte file .dsk 
file and ran DSKINI from MESS Coco emulation. After posting that, I 
realized I'm the only person that can do that because of a special 
version of RGBDOS. However, I'm going to show you how to do the 
equivalent, regardless of your DOS. First we need some background on how 
MESS works.

The MESS philosophy is to emulate all hardware as closely as possible 
regardless if it makes sense in the context of emulation. In the case of 
disk I/O, the result is odd. MESS will not run DSKINI on a 0byte .dsk 
image because the image is not recognized as a disk. DSKINI will run 
with 157KB .dsk files.

If you examine the full .dsk image, you will only see the data portion 
for each sector but not the format information found on a real disk. 
Users of RGBDOS in MESS will know that you can DSKINI a 0byte .vhd image 
and it works perfectly. What is the difference? RGBDOS treats a hard 
drive as if it were an image consisting only of data portions of 
sectors. No low level formatting is done. Clearly MESS will extend a 
.dsk image if it thinks a low level format is not being called.

So clearly anyone can create a .dsk image from a 0byte file in MESS, 
regardless of DOS, if they do a raw write to the image. Here's one way 
to do it.

00 REM Substitute for DSKINI with MESS
10 CLEAR500
20 A$=STRING$(128,255):B$=STRING$(128,255)
30 FORT=0TO34:FORS=1TO18
40 DSKO$0,T,S,A$,B$
50 NEXTS,T

This method can do what DSKINI can't do because the number of tracks and 
sectors can be any number desired. You can easily create an 80 track 
.dsk (without any JVC header info) by changing the range of T.

Creating a 0byte file is also easy using Windows. A right click in a 
directory should bring up "new text file" as a possibility. Just make 
the extension .dsk.




More information about the Coco mailing list