Is it worth getting a Class 10 SDHC card for DC?

Discuss modifications you have done or plan to do to your Dreamcast or any other hardware, or discuss devices you want to build. If your console does not work or is acting up, ask about fixing it in here.
Post Reply
MethodGit
Insane DCEmu
Insane DCEmu
Posts: 253
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Thu Feb 06, 2003 10:43 am
Has thanked: 1 time
Been thanked: 0

Is it worth getting a Class 10 SDHC card for DC?

Post by MethodGit »

Hello again. Been taking advantage of quite a few discounts on Maplin and MemoryBits lately on memory cards and adaptors, and am thinking about replacing the Class 2 8GB MicroSDHC card I was originally using for DC goodness.

I'm aware that the serial port means transfer speeds are significantly reduced anyway, but will upgrading to a higher-class card still make any difference speed-wise? Prices on Class 10 cards have been getting quite decent of late and I'm hoping to get a nice setup of Class 10 usage across all my SD-compatible consoles and handhelds.

Thanks!
User avatar
DaMadFiddler
Team Screamcast
Team Screamcast
Posts: 7953
Joined: Fri Feb 06, 2004 7:17 am
Location: San Francisco, CA
Has thanked: 0
Been thanked: 0
Contact:

Re: Is it worth getting a Class 10 SDHC card for DC?

Post by DaMadFiddler »

A more practical concern is probably the question of what the SD reader (and the various loader software) can handle in the first place. Once you get beyond 4GB, FAT32 becomes problematic, and I don't know if any more modern/more advanced file systems are even supported by KOS so that developers can integrate support.

Anyone have a definitive answer?
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5652
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Re: Is it worth getting a Class 10 SDHC card for DC?

Post by BlueCrab »

Month old bump, but whatever...

Technically, KOS proper doesn't support FAT32 at all (nor FAT16). In fact, the canonical KOS repo didn't even have a SD card driver period when this thread was opened (or the reply posted). Of course, that changed somewhat recently when I decided to work on it and add a driver.

The only filesystem currently supported by the canonical KOS repo is ext2 (the old Linux filesystem without a journal). There are various reasons why I won't support FAT32 for the foreseeable future. So, ext2 seemed like a good choice for a variety of reasons (relative ease of implementation, availability of drivers for pretty much all the major OSes for it (although, only Linux has default support for it), relatively good performance, a decent feature set, etc). This is all integrated into the canonical git repository for KOS (hosted at sourceforge). In case anyone's interested, there's an example program of how to use the library that was added for ext2 support with the SD card in the examples directory in the repo. The library implementing ext2 on KOS is called libkosext2fs (for lack of a better name) and was written from scratch by me (so there's not any licensing concerns beyond the normal KOS license).

One thing to note though is that I'm pretty sure KOS doesn't support file sizes over 4GiB (it may actually be 2GiB, but I'm not sure off the top of my head). This isn't necessarily a limitation of ext2 or my implementation of it, but rather the fact that I think that off_t and all the other file position related types are 32-bit types. This should be able to be fixed by mucking about with Newlib settings, but I'm not messing with it right now as it really shouldn't be that big of a deal. :wink:

Oh, and back to the original topic of the thread itself, I seriously doubt there's any useful reason to get a class 10 card for the Dreamcast. I don't think there's any way that you'd ever get that sort of speed out of the serial port, especially with the method in which it is accessed for the SD card driver. You probably won't ever even push the limits of a class 2 card.
User avatar
Basil
Insane DCEmu
Insane DCEmu
Posts: 200
Joined: Wed Apr 09, 2008 9:04 am
Has thanked: 13 times
Been thanked: 0
Contact:

Re: Is it worth getting a Class 10 SDHC card for DC?

Post by Basil »

Wow, so now if something compiled with current kos revision will have sd directory in a file browser?
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5652
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Re: Is it worth getting a Class 10 SDHC card for DC?

Post by BlueCrab »

Basil wrote:Wow, so now if something compiled with current kos revision will have sd directory in a file browser?
Look at the example program for how to use it. It doesn't have it automatically, you have to mount the device first. It is only a couple of lines of code to make it work. Also, as the only supported filesystem is ext2, you have to make sure the card is formatted as ext2 as well.

This is because KOS still prioritizes dcload-serial and a serial cable over SD cards, as that's how it has always been. The emuforge KOS repo basically makes it so that you can't use dcload-serial or a serial cable without reinitializing it, I believe.
Post Reply