<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Tue, 18 Jul 2006 16:13:49 +0000
From   : Jules Richardson <julesrichardsonuk@...>
Subject: Re: Getting .SSD disk images onto a beeb...

Rob wrote:
> I don't suppose it would be too hard to knock up a bit of BASIC

BBC BASIC always feels harder to understand than obfuscated C, and that's 
being kind ;-)

> Actually, assuming the format of the SSD file is as simple as has been 
> described, then, off the top of my head, you only need something like:
> ...

which begs the question - if that works, can't the same be done but taking the 
input from the serial port rather than a file somewhere on the beeb? Or would 
the slowness of the serial link just cause lots of timeout problems?

Maybe you need to buffer each track and write a track at a time (which is 
what, probably 256 * 9 = a little over 2KB of memory buffer), so something like:

   get track count from serial port

   loop (number of tracks)
     read track's worth of data from serial port to buffer
     write track's worth of data to disk
     signal status to PC
   end loop

... it doesn't seem too complex, assuming a good understanding of BBC BASIC. 
I'm sure there must be built-in OS routines to write an in-memory track buffer 
to disk.

Alternatively, you could work at the sector level and read a sectors per track 
value from the host as well as total tracks, then work from there.

It's possible that the formatting routines are floating around the 'net too - 
it's not like you need to create a blank filesystem on the disk; all you need 
to do is low level format to the right sector size and sectors per track - 
transferring the disk image will have the side effect of creating the 
filesystem for you.

But then if it were all that easy someone would have done it by now :-)

cheers

Jules
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>