Author Topic: Disk image layout - is there a doc?  (Read 1405 times)

0 Members and 1 Guest are viewing this topic.

Offline leibnitz27

  • CPC464
  • **
  • Posts: 10
  • Liked: 1
  • Likes Given: 2
Disk image layout - is there a doc?
« on: 09:57, 09 October 12 »
Hi All -
 
So I'm messing around with getting back into CPCs, and one thing I'd like to do is understand the layout of a CPC disk image, by just writing something in C to look at files on a DSK (but without doing a full blown emulator!!  ;D )
 
The file format for the DSK image shows me how the physical data is laid out, Format:DSK disk image file format - CPCWiki , which is great, but are there any docs as to how a DATA formatted disk is laid out given this? 
 
When I've been digging, I keep on ending up at "get the catalog by calling CAS CATALOG (BC9B)" Unofficial Amstrad WWW Resource - what I'd like is - has anyone documented the equivalent of the FAT, so I can do this by hand without firmware present?   (I'd look at eg the source for CPCloader, but it doesn't seem to be open source :(  , unless I've missed something really obvious! :)  )
 
Cheers!
 

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.335
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2261
  • Likes Given: 3478
Re: Disk image layout - is there a doc?
« Reply #1 on: 11:44, 09 October 12 »
Hi All -
 
So I'm messing around with getting back into CPCs, and one thing I'd like to do is understand the layout of a CPC disk image, by just writing something in C to look at files on a DSK (but without doing a full blown emulator!!  ;D )
 
The file format for the DSK image shows me how the physical data is laid out, Format:DSK disk image file format - CPCWiki , which is great, but are there any docs as to how a DATA formatted disk is laid out given this? 
 
When I've been digging, I keep on ending up at "get the catalog by calling CAS CATALOG (BC9B)" Unofficial Amstrad WWW Resource - what I'd like is - has anyone documented the equivalent of the FAT, so I can do this by hand without firmware present?   (I'd look at eg the source for CPCloader, but it doesn't seem to be open source :(  , unless I've missed something really obvious! :)  )
 
Cheers!
DATA, SYSTEM and IBM are all variants of the CP/M filesystem.

DATA has no system tracks, SYSTEM has 2 system tracks.
The directory blocks follow.

This is a good reference:
CP/M information archive : disc formats
CP/M information archive : disc formats


« Last Edit: 11:46, 09 October 12 by arnoldemu »
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline leibnitz27

  • CPC464
  • **
  • Posts: 10
  • Liked: 1
  • Likes Given: 2
Re: Disk image layout - is there a doc?
« Reply #2 on: 13:25, 09 October 12 »
Great, thanks!

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.335
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2261
  • Likes Given: 3478
Re: Disk image layout - is there a doc?
« Reply #3 on: 15:14, 09 October 12 »
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource