[Coco] Atom IDE + toolshed

pfitchjr at bellsouth.net pfitchjr at bellsouth.net
Sat Mar 14 22:27:54 EDT 2020


Tormod, I apologize that my goals were not correctly detailed. Let me try again.  

Ron Klein made a video last year showing how he had customized the Atom-IDE to allow quick software development for his Coco 1, 2 and 3 in DECB Basic, C, and Assembly. He had combined ATOM with Drivewire and MESS to allow Basic, C, and Assembly development on his PC, with easy transfer of the resulting source and binaries to/from DECB disk floppy images. He used the MESS "imgtool" and Toolshed "decb.exe" to move his files to/from the host file system.

ATOM allow extensions to be created via essentially batch files, which is how imgtool and decb get used.  ATOM does some preprocessing, but all the shell variables and such are there. So I saw that and said, that’s cool, but I want to do that with VCC, Drivewire and Basic09. Should be no big deal.

What I wanted to be able to do was:
A) generate Basic09 source code using ATOM on the HOST filesystem (which for me is Win10) and "put" it onto a OS9 format floppy image.
B) pull source code from an OS9 floppy image and place it onto the HOST file system, so I could access it with the ATOM editor.
C) I wanted to do it in a seemless "one-click" fashion, just like Ron did in his video. 

To start all of that, I first had to modify Ron's batch files which he had developed for Coco 1/2 and 3 disk basic. So my first task was to change all of his uses of imgtool.exe and decb.exe to os9.exe, since the MESS tool doesn't like OS9 format disk images. My problems with that lead me to posting on the list, and your happy involvement.

So Question #1, Is "Rogue" a formatted disk image? No, Rogue is a HOST system file directory under which I have OS9 Rogue game floppy images stored. Ie, rogue128.dsk and rogue512.dsk.  

Question #2, 'omit the dot in the source path'. I did that, and the "./" was removed from the source side of the command, but not the destination side, and while it generated the following output, it didn't actually do anything.  Ie, no files were written/created. Example output=
currentfolder Misc
projectfolder C:\Misc
"C:\Program Files (x86)\toolshed-2.2\os9.exe" dsave -b=24k -r -e rogue128.dsk, . 
os9 copy 'rogue128.dsk,OS9Boot' './OS9Boot' -r -b=245760
os9 makdir './CMDS'
End
When I removed both dots, I got even less output. Example=
currentfolder Misc
projectfolder C:\Misc
"C:\Program Files (x86)\toolshed-2.2\os9.exe" dsave -b=24k -r -e rogue128.dsk, 
End

So, I decided to simplify my life, and start work on a much simpler file structure. No sub-directories on the floppy image, and none created or used on the HOST file system. I was going for just a straight COPY of files from the OS9 disk image to the exact same directory that disk image was stored in. So I created a new floppy disk image called "MISC"  with only some text files and basic source code files on it. No binaries, no directories. 
  
I think that should bring you up to where my thinking was in my last message. But, just in case, I have included the text of the batch file I am actually using to work this out. Ron Klein developed this, and I hacked and chopped until it almost does what I want.

:: batch file to extract all files from an OS9 floppy disk image
:: syntax example:
:: extractOS9dsk.bat <DSK image>

@echo off

:: if no command line parameters, only make disk image and exit
if "%~1"=="" (
    echo No valid OS9 disk image provided.
		echo.
		echo syntax example:
		echo.
		echo "extractOS9dsk.bat <DSK image>"
	  echo.
	  exit /B
)

:: if disk image is not found
if not exist "%1" (
	echo OS9 Disk image not found.  Aborting.
	echo.
  exit /B
)

:: set up some environment variables

:: MAME's imgtool utility
SET imgtool=C:\Program Files (x86)\mame\imgtool.exe

:: Toolshed's DECB utility
SET decb=C:\Program Files (x86)\toolshed-2.2\decb.exe

:: Toolshed's OS9 utility
SET os9=C:\Program Files (x86)\toolshed-2.2\os9.exe

:: get name of batch file and place it into a variable
SET batchfilename=%~n0%~x0

for %%a in (.) do set directory=%%~nxa
echo currentfolder %directory%

SET projectfolder=%cd%
echo projectfolder %projectfolder%

:: use OS9's dsave command to extract all files from DSK image

echo "%os9%" dsave -b=24k -r -e %1,. . 
"%os9%" dsave -b=24k -r -e %1,. .  
:: Only it doesn't work
rem dsave outputs the following lines which I have REMd out:
rem os9 copy 'MISC.DSK,./startrek.bas' './startrek.bas' -r -b=245760
rem os9 copy 'MISC.DSK,./taipan.b09' './taipan.b09' -r -b=245760
rem os9 copy 'MISC.DSK,./c.hlp' './c.hlp' -r -b=245760
rem os9 copy 'MISC.DSK,./runb.hlp' './runb.hlp' -r -b=245760
rem os9 copy 'MISC.DSK,./r3systems.hlp' './r3systems.hlp' -r -b=245760
rem os9 copy 'MISC.DSK,./s09.hlp' './s09.hlp' -r -b=245760
rem os9 copy 'MISC.DSK,./pt.hlp' './pt.hlp' -r -b=245760
rem os9 copy 'MISC.DSK,./s.hlp' './s.hlp' -r -b=245760
rem os9 copy 'MISC.DSK,./m.hlp' './m.hlp' -r -b=245760

rem but when I remove the single-quotes, it does work. I also added the -l flag, since I really want readable text files

rem os9 copy MISC.DSK,./startrek.bas ./startrek.bas -l -r -b=245760
rem os9 copy MISC.DSK,./taipan.b09 ./taipan.b09 -l -r -b=245760
rem os9 copy MISC.DSK,./c.hlp ./c.hlp -l -r -b=245760
rem os9 copy MISC.DSK,./runb.hlp ./runb.hlp -l -r -b=245760
rem os9 copy MISC.DSK,./r3systems.hlp ./r3systems.hlp -l -r -b=245760
rem os9 copy MISC.DSK,./s09.hlp ./s09.hlp -l -r -b=245760
rem os9 copy MISC.DSK,./pt.hlp ./pt.hlp -l -r -b=245760
rem os9 copy MISC.DSK,./s.hlp ./s.hlp -l -r -b=245760
rem os9 copy MISC.DSK,./m.hlp ./m.hlp -l -r -b=245760

echo End

echo "Done."
echo.

exit /B

 

-----Original Message-----
From: Coco <coco-bounces at maltedmedia.com> On Behalf Of Tormod Volden
Sent: Saturday, March 14, 2020 9:21 PM
To: CoCoList for Color Computer Enthusiasts <coco at maltedmedia.com>
Subject: Re: [Coco] Atom IDE + toolshed

pfitchjr,

I think you have to explain what you /want/ to do, not only show the commands you are typing. From your first post I thought you wanted to copy from one disk image to another. In your last examples it seems that you want to extract a disk image to a local folder tree.

Is "Rogue" a formatted disk image? If not, there is no wonder it doesn't work. If it is a local directory you must *not* add the comma, since it signifies a disk image.

It seems you also ignored my suggestion to omit the dot in the source path.

It is strange that removing the single quotes changes anything. From the "copy" error messages it seems that the quotes are correctly stripped away by your shell. However, the error message shows the source file, but the problem could be in the destination. I have changed it to show both, maybe that can give us some hints.

> os9 copy MISC.DSK,./m.hlp ./m.hlp -l-r -b=245760 <-- where the "-l-r" causes the line to error out.

Yup, that's a bug, I have fixed it.

> And one final note...why is my -b=24K translating into -b=245760?

Good catch! That is a bug from 2004. Also fixed now.

Regards,
Tormod



More information about the Coco mailing list