It is currently Mon Oct 20, 2014 4:49 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 17 posts ] 
Author Message
PostPosted: Tue Jun 10, 2008 9:48 pm 
Offline
Site Admin
User avatar
 Profile

Joined: Wed Dec 19, 2007 10:46 pm
Posts: 779
I'm looking at the DFS SSD format:

http://mdfs.net/Docs/Comp/Disk/Format/DFS

Can anyone explain to me what the byte 0,b7 stuff is about?

Looking at a file entry, for instance, I can see that the eight bytes are split up by the first 7 being the filename and the last is the directory prefix character.

For the first file entry in the catalogue, that's 008-00F. Then the second file entry is at 010-017.

So where do all the byte 0,b7 - byte 7,b7 fit in? Apparently, this includes the locked bit of the file.

And I'm also utterly confused by the file info entry description.

Thicko Sam. :?

P.S. And what is the Disk Cycle?


Top
 
PostPosted: Tue Jun 10, 2008 11:32 pm 
Offline
User avatar
 Profile

Joined: Mon Jan 07, 2008 7:02 pm
Posts: 273
Each file entry is 8 bytes (bytes 0-7). The bottom 7 bits of each byte (bits 0-6) are ASCII characters. This leaves bit 7 unused, so DFS stuffs more information there. byte 7,b7, means bit 7 (highest bit) of byte 7.

I'm not sure what bit of the file info description you're finding difficult. The bit descriptions are similar to the filenames, for example, the file load address has bytes 0 and 1 specifying the lowest 16 bits of the address, and byte 6 bits 2 and 3 specifying bits 16 and 17 of the address.

I'm not sure what the disk cycle is. DFS increments a value on the disk every time it's written to (it's displayed in *CAT next to the disk title), maybe that's what it is?


Top
 
PostPosted: Tue Jun 10, 2008 11:42 pm 
Offline
Site Admin
User avatar
 Profile

Joined: Wed Dec 19, 2007 10:46 pm
Posts: 779
Ahhh .... yeah, since posting, I worked out the bits and bytes thing, but not entirely:

b0-b1: file start sector b8-b9
b2-b3: file load address b16-b17

So I get that b0-b1 refers to bits 0 and 1, but where do bits 8, 9, 16 and 17 come in?

And, yes, I just checked - that's exactly what the Disk Cycle is!

Cheers,

Sam.


Top
 
PostPosted: Tue Jun 10, 2008 11:50 pm 
Offline
Site Admin
User avatar
 Profile

Joined: Wed Dec 19, 2007 10:46 pm
Posts: 779
byte 0-6 Filename, padded with spaces
byte 7 Directory prefix character
byte 0,b7: zero
byte 1,b7: zero
byte 2,b7: zero
byte 3,b7: zero
byte 4,b7: zero
byte 5,b7: zero
byte 6,b7: zero
byte 7,b7: locked

No, wait - I'm confused again - how can bit 7 of byte 7 represent locked if byte 7 already contains the ASCII representation of the directory prefix character?

Sam.


Top
 
PostPosted: Wed Jun 11, 2008 12:55 am 
Offline
 Profile

Joined: Thu Mar 27, 2008 9:07 pm
Posts: 14
Samwise wrote:
No, wait - I'm confused again - how can bit 7 of byte 7 represent locked if byte 7 already contains the ASCII representation of the directory prefix character?


Because byte 7 is 7-bit ASCII too?


Top
 
PostPosted: Wed Jun 11, 2008 10:26 am 
Offline
User avatar
 Profile

Joined: Wed Jan 09, 2008 7:30 am
Posts: 406
Samwise wrote:
Ahhh .... yeah, since posting, I worked out the bits and bytes thing, but not entirely:

b0-b1: file start sector b8-b9
b2-b3: file load address b16-b17

So I get that b0-b1 refers to bits 0 and 1, but where do bits 8, 9, 16 and 17 come in?

And, yes, I just checked - that's exactly what the Disk Cycle is!


The bits you refer to are the extra ones for the item in question. i.e.

Start sector is one byte (b0 to b7), so it's saying that Bits 0 and 1 of byte 6 actually are bits 8 and 9 of the start sector, thus giving a greater amount of sectors allowed on the disk

Same with file load address, if you look at it in byte 0-1, it can only go from b0 to b15 (as only 16 bits in two bytes). So bits b2-b3 of byte 6 represent bits 16-17 of the load address thus extending it's value. That's where the b16, b17 come in.


Top
 
PostPosted: Wed Jun 11, 2008 6:31 pm 
Offline
Site Admin
User avatar
 Profile

Joined: Wed Dec 19, 2007 10:46 pm
Posts: 779
I'm slowly beginning to get this ...

Code:
  byte 0,b7:   zero         zero         sector b10
  byte 1,b7:   zero         zero         length b18
  byte 2,b7:   zero         zero         unused
  byte 3,b7:   zero         zero         file/directory
  byte 4,b7:   zero         zero         not readable
  byte 5,b7:   zero         length b18      not writable
  byte 6,b7:   zero         sector b10      not executable
  byte 7,b7:   locked         locked      locked

Assuming bit 7 represents locked, and bits 0-6 represent the Directory prefix character - why does the table above indicate zero when those bits 0-6 must be set to whatever the Directory prefix character is? Surely they'd be populated? With $ in 7-bit ASCII for a typical file in $?

Also, how can the other DFSs use those bits for other features?

Stop sniggering at me, at the back!

Sam.


Top
 
PostPosted: Wed Jun 11, 2008 6:45 pm 
Offline
User avatar
 Profile

Joined: Mon Jan 07, 2008 7:02 pm
Posts: 273
That's referring to bit 7 of the other bytes, not the other bits of byte 7.


Top
 
PostPosted: Thu Jun 12, 2008 3:44 pm 
Offline
Site Admin
User avatar
 Profile

Joined: Wed Dec 19, 2007 10:46 pm
Posts: 779
Ahh, OK.

I think the mist is beginning to clear ...

Sam.


Top
 
PostPosted: Sun Jul 13, 2008 12:10 pm 
Offline
Site Admin
User avatar
 Profile

Joined: Wed Dec 19, 2007 10:46 pm
Posts: 779
I have all-new Acorn DFS / SSD questions ... ;)

For strange reasons known only to myself, imagine I want to create an SSD which holds the biggest file I can put on an SSD (but sticking to the rules of a standard Acorn DFS, don't want to create my own/use a DSD/use an alternative DFS like WDFS/HDFS/ADFS).

1) First up, an SSD can be a max. of 200K, yes? Does that mean than a full DFS / SSD is made up of 800 sectors (256 bytes)?

2) Similarly, does that mean the largest file that can be fit on a standard Acorn DFS disk is 204,288 bytes long (i.e. 800 sectors - 2 sectors for DFS catalogue)?

3) From http://mdfs.net/Docs/Comp/Disk/Format/DFS:

Code:
106 b0-b1: Total number of sectors b8-b9
107        Total number of sectors b0-b7


Specifically, what is meant by total number of sectors here? Is this the total number of sectors used by the disk image? Therefore, is it 800? Wouldn't it always be 800, because you format the disk for the maximum usage?

I think I need some confirmation of my thinking on this sectors stuff. Can anyone back up my understanding?

Sam.


Last edited by Samwise on Sun Jul 13, 2008 1:05 pm, edited 1 time in total.
removed nonsense about representing 800 (dec) in 6 bits


Top
 
PostPosted: Sun Jul 13, 2008 2:49 pm 
Offline
User avatar
 WWW  Profile

Joined: Wed Jan 09, 2008 10:23 am
Posts: 359
Location: Glasgow, Scotland
Hi Samwise,

Samwise wrote:
1) First up, an SSD can be a max. of 200K, yes? Does that mean than a full DFS / SSD is made up of 800 sectors (256 bytes)?

Yes. Think of it as 10 sectors per track and 80 tracks per disc, so 10*80 is 800 sectors.

Samwise wrote:
2) Similarly, does that mean the largest file that can be fit on a standard Acorn DFS disk is 204,288 bytes long (i.e. 800 sectors - 2 sectors for DFS catalogue)?

In theory yes, but I haven't personally tried that.

Samwise wrote:
3) From http://mdfs.net/Docs/Comp/Disk/Format/DFS:

Code:
106 b0-b1: Total number of sectors b8-b9
107        Total number of sectors b0-b7


Specifically, what is meant by total number of sectors here? Is this the total number of sectors used by the disk image? Therefore, is it 800? Wouldn't it always be 800, because you format the disk for the maximum usage?

Yes, this is the total number of sectors used by the disc. Remember that the DFS format would also need to cater for 40 track discs as well so this number can change.

Kind regards,

Francis.


Top
 
PostPosted: Sun Jul 13, 2008 2:58 pm 
Offline
Site Admin
User avatar
 Profile

Joined: Wed Dec 19, 2007 10:46 pm
Posts: 779
Ahh... support for 40 tracks. That's the bit I was forgetting - so in practice that Total number of sectors on a standard Acorn DFS disk is only really ever going to be 400 or 800, for 40 or 80 tracks respectively.

Sam.


Top
 
PostPosted: Sun Jul 13, 2008 3:17 pm 
Offline
User avatar
 WWW  Profile

Joined: Wed Jan 09, 2008 10:23 am
Posts: 359
Location: Glasgow, Scotland
For most cases the total number of sectors will be 400 or 800, but I'm sure that there are some oddball formats where this would not be the case.

Kind regards,

Francis.


Top
 
PostPosted: Sun Jul 13, 2008 3:30 pm 
Offline
Site Admin
User avatar
 Profile

Joined: Wed Dec 19, 2007 10:46 pm
Posts: 779
Ah, but then they wouldn't be standard Acorn DFS disks ... :)

Thanks, Francis.

Sam.


Top
 
PostPosted: Tue Aug 25, 2009 4:13 pm 
Offline
 Profile

Joined: Sat Aug 22, 2009 7:45 pm
Posts: 34
The maximum DFS disk and DFS file is 256K. The largest /physical/ disk is 200K - 80 tracks of 2.5K each, though you can quite often fit 82 tracks onto a 5.25" floppy (giving 205K) and I've managed to fit 84 tracks on a 3.5" floppy (giving 210K).


Top
 
PostPosted: Tue Sep 01, 2009 11:03 pm 
Offline
User avatar
 WWW  Profile

Joined: Thu Jan 10, 2008 8:44 pm
Posts: 23
Location: London, UK
FWIW there is a diagram of the DFS catalogue format and extra information on the BeebWiki. --Greg


Top
 
PostPosted: Wed Sep 02, 2009 9:35 am 
Offline
User avatar
 WWW  Profile

Joined: Wed Jan 09, 2008 10:23 am
Posts: 359
Location: Glasgow, Scotland
Hi Greg,

Thanks for that link. Some of the information there is actually quite useful for part of one of my projects. :)

Kind regards,

Francis


Top
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron