<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Wed, 19 Jul 2006 09:45:08 +0100
From   : "Steve O'Leary" <navalenigma@...>
Subject: Re: Getting .SSD disk images onto a beeb...

>From: Jules Richardson <julesrichardsonuk@...>
>To: bbc-micro@...
>Subject: Re: [BBC-Micro] Getting .SSD disk images onto a beeb...
>Date: Tue, 18 Jul 2006 23:05:57 +0000

>That should get around 'problems' with the image file data being 'shorter' 
>than the eventual target disk. It doesn't cope with 'holes' in a disk; for 
>that the PC side would have to be clever and pad out the data it was 
>sending

Holes shouldn't be a problem as although logically there can be a hole there 
is still data in there that will just be sent by the PC as normal, it'll be 
junk perhaps but unimportant as it doesn't have a catalogue entry. To 
illustrate;

Imagine we have three files on an ssd disk all saved one after the other;

(All values in Hex)

Name   Sector       Size
File 1      002         279
File 2      005         3E2
File 3      009          62

We then delete file 2 thus creating a hole. These unused sectors still 
contain the contents of File 2 but no catalogue entry to access it. The ssd 
disk image therefore will still have these sectors stored as before (as the 
disk in real life would have). So when the data is being sent you just need 
to send all the data in the .ssd file until you reach the end and need not 
worry about the holes as they will be sent also and you will have a perfect 
copy on the real disk including holes and any old data in them.

Basically an .ssd file stores all data (holes and all) up to the end of the 
last bit of available data. It never misses out holes in the middle.

Hope this helps and makes you code a bit simpler. Your solution seems good.

_________________________________________________________________
Windows Live™ Messenger has arrived. Click here to download it for free! 
http://imagine-msn.com/messenger/launch80/?locale=en-gb
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>