File system used on Rio Carbon?

Posted by: Ezekiel

File system used on Rio Carbon? - 10/10/2007 12:10

What file system does the Rio Carbon use? When attached as MSC device it shows up as FAT32. When the microdrive is pulled out and attached to a CF reader it does not show up as a volume under XP. Does the Carbon emulate FAT32 for the host computer?

-Zeke
Posted by: peter

Re: File system used on Rio Carbon? - 11/10/2007 13:12

Quote:
What file system does the Rio Carbon use? When attached as MSC device it shows up as FAT32. When the microdrive is pulled out and attached to a CF reader it does not show up as a volume under XP. Does the Carbon emulate FAT32 for the host computer?

The Carbon has a genuine FAT32 filesystem, but a non-standard partition table. When reading the bare microdrive, you see the non-standard partition table; when Carbon itself is attached as MSC, the software presents only a certain portion of the actual drive to Windows. So there is also a standard partition table, but it's not at the beginning of the microdrive where Windows looks for it.

Peter
Posted by: Ezekiel

Re: File system used on Rio Carbon? - 11/10/2007 21:41

Very interesting. If one knew which parts of the partition table to modify (ie where Cabon puts the # of sectors per FAT), I assume it would be possible increase the number of sectors/FAT listed in each table (the real one and the one used for presentation to Windows), thus increasing the addressable space.

This sounds like a fun project - if I blow it, I can just re-flash the firmware and try again.

Let me know if I'm totally off-base...I'm willing to work at it, but don't want to bang my head in an insurmountable task.

-Zeke
Posted by: peter

Re: File system used on Rio Carbon? - 13/10/2007 12:16

Quote:
Very interesting. If one knew which parts of the partition table to modify (ie where Cabon puts the # of sectors per FAT), I assume it would be possible increase the number of sectors/FAT listed in each table (the real one and the one used for presentation to Windows), thus increasing the addressable space.

Um, increasing it how? The Carbon already uses all the addressable space on the disk. You can put any size CF flash or microdrive in a Carbon, apply the firmware from upgrader mode, and it will take advantage of the whole size. (Early Carbon firmwares failed to deal with flash CF cards, which don't implement the cache flush command. But the final Carbon firmware version fixed this.)

Peter
Posted by: peter

Re: File system used on Rio Carbon? - 13/10/2007 12:31

Sorry, just seen your post in the other thread. I've no idea why your 16Gb card is coming up as 8Gb. What you'd need to do, assuming that this is just a problem with determining the drive size and that the Carbon could actually read and write sectors beyond 8Gb if asked, is fix the first, proprietary partition table. Once you've done that, Carbon will expose the full 16Gb over MSC (minus its system partition, of course) and you can reformat the visible area to 16Gb under Windows. (Windows won't format FAT32 above 32Gb, but 16Gb should be fine.)

Peter
Posted by: Ezekiel

Re: File system used on Rio Carbon? - 13/10/2007 15:28

Peter-
That sounds encouraging.

I have a couple of the CF/IDE converters coming (the one Mark recommended in the CF Empeg thread).

Hopefully, once I have the 16GB card I can just poke at the MBR with a hex editor. My plan is to look at the Carbon table next to a standard FAT32 table and try to sort out the differences.

I know the CF is OK since it takes a standard format to 16GB no problem.

-Zeke

Edit: from the hex - "Limoncello, Mill Road, Cambridge - Great pesto!"
Posted by: peter

Re: File system used on Rio Carbon? - 13/10/2007 20:12

Actually, if you have two CF cards of different sizes, you could put each one in the Carbon, apply the firmware in upgrader mode, then take it out again and examine the first few sectors. The differences between the two will likely indicate where the drive size is kept.

Or you can just wait until Monday when I'll be back in the office and able to ask pesto lover John how it all works.

Peter
Posted by: Ezekiel

Re: File system used on Rio Carbon? - 13/10/2007 21:08

Peter,
What you suggest is what I've done today. The FAT seems to start at 300600x and again at 301240x offset. I can see the difference in sector counts (4C 24 EC 00 for the 8GB and 5D F2 94 00 for the original 5GB).

Occurred to me after editing the quantity of sectors (but not the sectors per FAT) that even if I did modify this, the origial FAT file descriptors would be in the wrong locations (I assume you'd need twice as big descriptor table to handle twice the addressed space).

However, I may wait till Monday, since I do see a few other differences early on (0x06 0x07 and 1F0x0B, 1F0x0C) but I can't figure what they mean; I'm looking for values with a ratio of approximately 0.625 (5/8) for the 5 and 8GB drives.

Mmmm pesto!

-Zeke
Posted by: peter

Re: File system used on Rio Carbon? - 14/10/2007 06:38

Ignore the FAT, indeed ignore the Windows MBR and its contents. They aren't the problem. You can use fdisk (or Disk Manager or whatever) to set them up correctly over MSC -- if the Carbon is offering the correct size partition to MSC in the first place. That is the part set up by the first, proprietary, partition table, which is all you really need to fix.

One worrying thing that's just occurred to me, though, is that the Carbon has a 24-bit CPU. 2^24 512-byte sectors is -- 8GB. There might be a worse problem here than we thought.

Peter
Posted by: Ezekiel

Re: File system used on Rio Carbon? - 14/10/2007 13:57

Well, if sector size can't be set to 1024k then the game's over. I still haven't found the non-standard FAT - I'm looking for FF FF FF (drive size) and 02 00 (sector size) strings near the beginning of the 8GB disk image.

-Zeke
Posted by: peter

Re: File system used on Rio Carbon? - 15/10/2007 08:42

Quote:
Well, if sector size can't be set to 1024k then the game's over. I still haven't found the non-standard FAT - I'm looking for FF FF FF (drive size) and 02 00 (sector size) strings near the beginning of the 8GB disk image.

The sector size here is the hardware sector size, the firmware doesn't get to vote. It is fixed at 512 bytes. Sadly, following a discussion with local pesto fanciers, it turns out that all through the code it uses 24-bit integers for sector counts. (Expanding that to 48-bit integers was a task we put off until we needed it: Carbon is so incredibly tight on memory that those extra three bytes everywhere would have caused us real work in shrinking some other part of the system.)

So it's game over, I'm afraid. Carbon supports up to 2^24 sectors (8Gbytes) only.

Peter
Posted by: Ezekiel

Re: File system used on Rio Carbon? - 15/10/2007 09:35

C'est la vie. I did have a good time trying. Thanks for all the help with this - much appreciated. At least I'll have a spare 16GB for the CF empeg or dream SLR. I'll probably grab an 8GB and call it a day; it's still over 50% more capacity.

-Zeke
Posted by: Ezekiel

Re: File system used on Rio Carbon? - 15/10/2007 09:41

Sorry, one last question - if I could put a second partition in the remains of the CF card space (above the 8GB) used by Carbon - any chance the system would see it as an 'external' card like the older flash players would?
Posted by: peter

Re: File system used on Rio Carbon? - 15/10/2007 10:26

Quote:
Sorry, one last question - if I could put a second partition in the remains of the CF card space (above the 8GB) used by Carbon - any chance the system would see it as an 'external' card like the older flash players would?

No chance, sorry. Carbon plain can't read or write sectors beyond the 2^24th, and external cards, even fake ones, would need specific software support anyway. (External card support, though present in the closely-related Forge, was one of the things we removed from the Carbon firmware to get it to fit.)

Peter
Posted by: Ezekiel

Re: File system used on Rio Carbon? - 15/10/2007 10:45

Well, a Forge code remenant seemed a straw worth clutching at! Thanks again.

-Zeke