[Coco] Reading/Writing Model I/III/4 Disks on a CoCo

Gene Heskett gheskett at wdtv.com
Thu Sep 5 17:23:49 EDT 2013


On Thursday 05 September 2013 16:41:08 Luis Antoniosi (CoCoDemus) did 
opine:

> the default FLOPPY_DS80 from os9 build. Don't have it now. But I can
> format a disk:
> 
> format 2 '80' "DISK"r
> 
> without any problems. Why the BASIC09 can't seek further than 34 ? And
> about my backup.asm that had backup up correctly ? Seems to me there
> some check inside Basic09 functions.
> 
Not that I am aware of.  I used the aftermerket ccdisk on a level 1 system 
in about '92 or so as I needed more capacity in my data disk for my EDisk 
substitute.  So I booted from a 40 track ds disk but all data was saved on 
an 80 track ds disk.

That whole thing was written in basic09, and talked serially to a 
GVG-300-3A/B video production switcher, and while it didn't make heavy use 
of seeks, it did open and read, or write the files sequentially from head 
to tail.

The only 2 problems I had with it over about 15 years of continuous service 
were disk controller related, and one op thought he had to save any changes 
he might have made to his operating profiles bag of tricks with a new 
filename every time he saved, eventually filling up the data disk.  The 
disk controller problems stemmed from having a 255 foot tall lightning 
attractor 30 feet out the back door, which combined with none of that gear 
ever having the gleam in daddy's eye to grow a properly static grounded 
line cord.  And those failures were so rare it was hard to correlate them 
well enough to come up with a sure answer.  So the best I did was to put a 
rack to case ground wire on the drive boxes, after which I never lost 
another controller.

> On Thu, Sep 5, 2013 at 3:15 PM, Gene Heskett <gheskett at wdtv.com> wrote:
> > On Thursday 05 September 2013 15:13:46 Luis Antoniosi (CoCoDemus) did
> > 
> > opine:
> > > Gene I tried this:
> > > 
> > > OPEN #in,"image.dsk":READ
> > > OPEN #out,"/D0@":WRITE
> > > FOR t=34 TO 0 STEP -1
> > > FOR s=17 TO 0 STEP -1
> > > SEEK #in,(t*18)*256.

Here I think might be your error

> > > GET #in,sector
> > > SEEK #out,(t*18)*256.

ditto, neither of these seeks include s*256
S/B something that returns (t*4608 + s*256) where a track is 4608 bytes, 
and add s*256 to that for the final seek value.
And this one /will/ demand a properly preformatted diskette.

> > > PUT #out,sector
> > > NEXT s
> > > NEXT t
> > > CLOSE #in
> > > CLOSE #out
> > > 
> > > It gives me error when T is higher than 34!

And with a big enough buffer, say 4608 bytes defined as track, you could 
read and write it by the track I expect, skipping all that sector related 
hoohaw.  That might not be a lot faster because the writes will still be 
subjected to looking for the next sector in the interleave scheme, 
typically 3 for the coco's although I have used as high as 8 when I was 
playing with bru.  8 gave me the best write times, about 8 minutes an 84 
track disk, but read/recovery was eons slower at 32+ minutes a 756k disk.

BRU, to be an ultimately useful tool, needed a from scratch rewrite with 
major architectural changes.  I never again found my round tuit though.  
Which is why you never saw a BRU-2.0.  But the code is out there, and 
somebody looking for a project with younger, less rusty wet ram might want 
to take a look.  As it is, dsave, despite its warts, is a better, faster 
way to do a backup. 
 
> > Show us the output of "dmode /d0" please.
> > 
> > > Why does it copy backwards ? Because I want to write the LSN0 at
> > > last. Maybe the problem is the SEEK and not the GET/PUT. I didn't
> > > go further, I made an asm routine and solved my problem.

I believe it was in your seek calcs as you never read or wrote more than 
the first sector of each track even if it didn't error out.

> > > 
> > > On Thu, Sep 5, 2013 at 2:43 PM, Gene Heskett <gheskett at wdtv.com> 
wrote:
> > > > On Thursday 05 September 2013 14:41:47 Luis Antoniosi (CoCoDemus)
> > > > did
> > > > 
> > > > opine:
> > > > > B09 won't support double sided.
> > > > 
> > > > Huh?  B09 only runs on os9.  And supports whatever the device
> > > > descriptor says.
> > > > 
> > > > > Also write to LSN0 at the end. Skip the first sector from both
> > > > > image and floppy, write all sectors and then reopen both image
> > > > > and floppy and then write to LSN0.
> > > > > 
> > > > > Don't use seek, just read and ignore as the seek seems to not
> > > > > work properly with non os-9 disks.
> > > > > 
> > > > > I have made a rawcopy tool for that, is at home I can send it
> > > > > you. it is in asm so it supports double sided disks as well. I
> > > > > made a dragon32 superdos disk using it.
> > > > > 
> > > > > On Thu, Sep 5, 2013 at 10:24 AM, Al Hartman
> > > > 
> > > > <alhartman6 at optonline.net>wrote:
> > > > > > Did it work? Have you successfully written an image?
> > > > > > 
> > > > > > - Al -
> > > > > > 
> > > > > > -----Original Message----- From: Gene Heskett
> > > > > > 
> > > > > > Sure there is, it took me about an hour to knock it out in
> > > > > > B09. Write LSN0, close the path, then reopen, and write the
> > > > > > whole thing one sector at a time.  The dbl write of lsn0 is
> > > > > > to get rid of the disk changed error.
> > > > > > 
> > > > > > --
> > > > > > Coco mailing list
> > > > > > Coco at maltedmedia.com
> > > > > > http://five.pairlist.net/**mailman/listinfo/coco<http://five.p
> > > > > > airl ist. net/mailman/listinfo/coco>
> > > > 
> > > > Cheers, Gene
> > > > --
> > > > 
> > > > "There are four boxes to be used in defense of liberty:
> > > >  soap, ballot, jury, and ammo. Please use in that order."
> > > > 
> > > > -Ed Howdershelt (Author)
> > > > My web page: <http://gene.homelinux.net:6309/gene> should be up!
> > > > 
> > > > I tried the clone syscall on me, but it didn't work.
> > > > 
> > > >                 -- Mike Neuffer trying to fix a serious time
> > > >                 problem
> > > > 
> > > > A pen in the hand of this president is far more
> > > > dangerous than 200 million guns in the hands of
> > > > 
> > > >          law-abiding citizens.
> > > > 
> > > > --
> > > > Coco mailing list
> > > > Coco at maltedmedia.com
> > > > http://five.pairlist.net/mailman/listinfo/coco
> > 
> > Cheers, Gene
> > --
> > 
> > "There are four boxes to be used in defense of liberty:
> >  soap, ballot, jury, and ammo. Please use in that order."
> > 
> > -Ed Howdershelt (Author)
> > My web page: <http://gene.homelinux.net:6309/gene> should be up!
> > 
> > "Once they go up, who cares where they come down?  That's not my
> > department."
> > 
> >                 -- Werner von Braun
> > 
> > A pen in the hand of this president is far more
> > dangerous than 200 million guns in the hands of
> > 
> >          law-abiding citizens.
> > 
> > --
> > Coco mailing list
> > Coco at maltedmedia.com
> > http://five.pairlist.net/mailman/listinfo/coco


Cheers, Gene
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
My web page: <http://gene.homelinux.net:6309/gene> should be up!

Every living thing wants to survive.
		-- Spock, "The Ultimate Computer", stardate 4731.3
A pen in the hand of this president is far more
dangerous than 200 million guns in the hands of
         law-abiding citizens.



More information about the Coco mailing list