[comp.sys.atari.st] CPMZ80 and TOS 1.4 - A Fix

os9paul@gkcl.ists.ca (Paul Good) (09/11/90)

The CP/M emulator from Atari DOES work with TOS 1.4, but it does require
a minor patch.

On the TOS disk, rename the file INIDSK.COM to INIDSK10.COM (it works 
with TOS 1.0 and TOS 1.2).  Copy CPMDATA.DAT to CPMDATA.BAK just in case.
Using your favorite disk editor, you must change one byte in CPMDATA.DAT.
Locate cluster 19 (aka sector 38).  This begins with the hex sequence
31 DA 03.  At offset B8 the original byte is 08; change this to 00 and
save the change.  Or you may search the file for the sequence of bytes
7E FE 08 20 0C, and change the 08 to 00.

That's all there is to it.  The file CPMDATA.COM actually contains the
information for the TOS directory on the CP/M disk, the CP/M directory,
the files INIDSK.COM and TOSCPM.COM.  The byte that must be changed is
actually in INIDSK.COM.  If this byte is not changed, any attempt to
initialize a freshly formatted disk will cause the dreaded "Disk is not
empty" error.

Code fragment for techie types:

     ...
     LD   HL,#008B     ;byte just after first filename.ext in directory
     LD   A,(HL)       ;this byte is 00 with freshly formatted TOS 1.4 disk
     CP   #08          ;must have been 08 with older TOS versions, make 00!!
     JR   NZ,1C7       ;display "Disk is not empty"
     ...

ASSORTED NOTES:
The version of the CP/M emulator that I am using signs on as follows:

     CP/M-Z80 Emulator                Copyright (85) SoftDesign Munich
     Release 9.4                      Version 7 for ATARI TOS

I followed the directions in the READ.ME file to create a single-sided
PSEUDO CP/M disk.  I then formatted a double-sided (720K) disk under
TOS, started the emulator by double-clicking on CPMZ80.TOS, and 
inserted the SS CP/M disk when requested.  Then I used the command
'inidsk b:' to initialize the 720K disk.  I used TOSCPM.COM to copy
all the CP/M files from the TOS disk to the 720K CP/M disk.

Two drives are required to set the emulator up, but after that it will
work just fine with one drive.  (Note that scopy may be used to do
single drive copys from one CP/M disk to another CP/M disk.)  If you only
have one floppy and a hard drive it is still possible to create your
CP/M disk.  Make a CPM folder on the C: partition of the hard drive and
copy all the CP/M files into it.  Open the CPM folder so that it is 
active.  Now open A: and run CPMZ80.TOS from it.  Insert your CP/M disk
into A: when prompted.  Use the command:

     toscpm c:filename.ext filename.ext

to copy each file to the CP/M disk.  Do not use a backslash after the c:
and all will work well.

BTW, when you run MAKE_ME.TOS and it prompts "Press any key...", it
actually means "Press any key provided it is marked 'Return'". :-)

--
Paul Good   INTERNET: os9paul@gkcl.ists.ca   UUCP: ists!gkcl.ists.ca!os9paul