#161542 - HyperHacker - Wed Aug 06, 2008 3:31 am
For just about as long as I've been using DS homebrew, I've had this problem. After a few months my CF/SD card will just stop working. The filesystem becomes corrupt, PCs will often just hang trying to access it when it's removed, and after wiping it files can be copied back - sometimes with seemingly no problems - only to have the same issues again as soon as I use it in the DS. With decent high-capacity memory cards being often $50+, this is obviously a big problem.
I know it's not simply defective cards, because they've been good brands - Kingston, Sandisk, Kodak, etc - and every one will quit after just a few months. It's not the DS, because the same happened on my old DS and my DS Lite. It's not the adaptor, because it's happened on my GBAMP and my GnM. It's probably not the PC, because other memory cards I use in it don't have this problem. I doubt it's something I'm doing to them, because my other stuff (the DS itself, my digital watch, all the gadgets in my room, etc) hasn't had such problems.
That being said, my guess is some buggy piece of software is doing something weird and wearing them out. I originally suspected DSOrganize, because it (even the latest versions) had a nasty tendency to corrupt the filesystem when I created, renamed, or deleted a file, but I didn't use it at all on the newest card and it still only lasted a few months.
The only programs I did use on this card are Moonshell, LMP (almost daily), Lameboy, NESDS, and a few times DSVideo. I also tried to use TxtWriter, but the screen shows up as garbage with every loader I try on GnM, so it's not usable. There's also the loader/boot menu I wrote*, but it doesn't write to the card at all, so I'm sure it's not doing anything odd.
Right now my main suspects are Moonshell (because IIRC it also uses some perverted hack of GBA_NDS_FAT, and does a lot of writing) and Lameboy (because the card died shortly after I started using it often again). The only real way to be sure is to remove them and see if the next card dies the same way, which is slow and expensive.
Is anyone else having this problem who might be able to help me narrow down the cause? With the expense of having to keep replacing these cards, I'd almost be better off buying a PSP instead, but I don't want to do that. :(
*This will be released some day, I know it's taking forever, but it's not dead. I just start way too many projects and spend too much time online. <_<
_________________
I'm a PSP hacker now, but I still <3 DS.
#161557 - sonny_jim - Wed Aug 06, 2008 8:34 am
I've experienced filesystem corruption with DS homebrew (DSO and LMP I seem to remember) but every time I've been able to get the cards back working by writing out zero's on the mbr:
Code: |
dd if=/dev/zero of=/dev/sdcard bs=1k count=512
|
I've had cards that have been impossible to do anything with in Windows until I've chucked them in a Linux box and done the above.
EDIT: And I think it'd take quite a long time even on a continuous write cycle to 'wear' it out. Anyone care to make some ballpark numbers up?
#161558 - HyperHacker - Wed Aug 06, 2008 8:52 am
That's worked for me before (though it usually permanently dies shortly after), but with this one the GnM is now not even seeing the card. badblocks reported a number of bad sectors, but it might have just been due to the corrupt partition table.
_________________
I'm a PSP hacker now, but I still <3 DS.
#161581 - tepples - Wed Aug 06, 2008 7:54 pm
HyperHacker: I assume you're already - fscking your card (C:\>chkdsk /f J:) at least monthly,
- using DSOrganize 3.1129 and not 3.2 or an older release, and
- keeping at least 5 percent of the card free at all times.
If these are not done, I've seen problems accumulate and eventually result in this kind of corruption.
DS adapters are "unlicensed" just like the Game Genie, and mismatched electronegativities between the connector metals might put dirt and corrosion on the card's contacts. If it's a microSD card, you can try cleaning the contacts with rubbing alcohol on a cotton swab to see if that helps.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#161584 - HyperHacker - Wed Aug 06, 2008 8:14 pm
tepples wrote: |
fscking your card (C:\>chkdsk /f J:) at least monthly |
Typically, the filesystem ends up corrupt every month or so anyway, so yes.
Quote: |
using DSOrganize 3.1129 and not 3.2 or an older release |
I've kept up with the latest version since 1.something, it's definitely improved, but 3.1129 still did it.
Quote: |
keeping at least 5 percent of the card free at all times. |
No problem there.
Quote: |
If these are not done, I've seen problems accumulate and eventually result in this kind of corruption. |
Does it normally render the card unusable though? Typically once this happens, two or three bytes of every sector become fixed to a certain value. Writing over them has no effect.
Right now I've got two MicroSD cards, one (brand new) that works fine and one (just wiped) that seems to work fine in the PC but isn't seen at all by GnM. Both appear to be clean. I can try cleaning them anyway, but how would I get at the contacts inside the GnM?
_________________
I'm a PSP hacker now, but I still <3 DS.
#161585 - josath - Wed Aug 06, 2008 8:59 pm
If it works fine in the PC (eg you can write 500MB of data, eject the card, put it back in, and then compare the data and it matches 100%), that would seem to indicate a problem with the media adaptor (GnM or whatever), and perhaps not the SD card.
#161587 - sonny_jim - Wed Aug 06, 2008 9:31 pm
Quote: |
DS adapters are "unlicensed" just like the Game Genie, and mismatched electronegativities between the connector metals might put dirt and corrosion on the card's contacts
|
/me sniggers
#161592 - elhobbs - Wed Aug 06, 2008 9:47 pm
I found that if I do not use the eject hardware feature every time in windows the filesystem would get corrupt.
#161595 - HyperHacker - Wed Aug 06, 2008 10:39 pm
You can set up Windows to not require that (disable caching), which I had done, but I'm using Xubuntu now.
This particular card's being funny now, my laptop reads it just fine and the files I put on it (about 1.8GB) all appear fine, but the GnM just will not acknowledge it. The only reason I can think of for this is mkdosfs made a FAT16 filesystem even though I used "-F 32" (distinguishing FAT16 from FAT32 on Xubuntu seems to be surprisingly difficult), and it's not liking this.
Regardless of whether this card is toast, though, those I've had in the past definitely have been (with certain bytes becoming read-only like I described) after usually no more than 8 months.
[edit] Well this one might not be dead yet. I had to use fdisk to change the partition type to FAT32 (0xB, or FAT16 0x6) before GnM would read it. I'm still suspicious though, since running badblocks did report a number of failed sectors, but I'm not sure if that's accurate because the partition table was corrupt; it might have just been trying to access past the end of a partition and failing. I'll have to see if the files end up corrupt again right away.
Of course that still doesn't explain the others. Even disk editor programs running on bare metal (i.e. boot directly into them from a CD) weren't able to wipe those; you could wipe it to zeros, then look in a hex editor and find non-zero bytes, using two different machines. So there's pretty much no question those ones were toast.
I wouldn't be surprised with my luck if I really am the only one having these issues, and maybe managed to end up with a defective GBAMP and a defective GnM or something. >_> Nobody else has had this happen?
_________________
I'm a PSP hacker now, but I still <3 DS.
#161614 - nanou - Thu Aug 07, 2008 11:13 am
tepples wrote: |
HyperHacker: I assume you're already [...] fscking your card [...] at least monthly |
Heh. I read that and thought it was an apt description of the problem. I know this is tempting fate, but I've never been arsed to run fsck on my cards and haven't ever gotten any corruption. I've even gotten dangerously close to capacity without problems.
@HyperHacker, are you using the same cardreader with the PC for all your cards? If so, maybe it has some electrical problems. It seems like the only things you haven't switched out are the PC and maybe the cardreader.
Or it could be ghosts.
_________________
- nanou
#161615 - Lynx - Thu Aug 07, 2008 2:42 pm
Well, I'm running lmp-ng 2 alpha pretty much every day for 8-10 hours and haven't had a problem. But, it is pretty much all I use this card/DS for.. so I would guess it is something else that is corrupting your cards.
_________________
NDS Homebrew Roms & Reviews
#161617 - HyperHacker - Thu Aug 07, 2008 3:46 pm
The card reader is suspect, but I've used other cards in it and they've worked fine for years.
_________________
I'm a PSP hacker now, but I still <3 DS.
#161633 - Lynx - Fri Aug 08, 2008 2:33 pm
Well, I would guess it is a homebrew app that is doing it, but only one that is opening the file system for write access. Corrupting FAT is pretty easy.. in most cases, you can open a file for writing and then turn the DS off.. and it'll corrupt the file system.
Maybe you are using part of a game/app that most people aren't using so that the dever doesn't even know it's corrupting it?
_________________
NDS Homebrew Roms & Reviews
#161638 - Dwedit - Fri Aug 08, 2008 6:46 pm
GBA NDS FAT corrupts cards. It really isn't worth using anymore.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."
#164494 - HyperHacker - Tue Nov 04, 2008 4:29 am
So, guess what. Brand new MicroSD, brand new MicroSD adaptor, brand new SD reader. Only ever used it in my PC and DS. Only used LMP, NESDS, Lameboy, bunjalloo, and CBDS. Played in Lameboy for a few hours, card is fried. Again, cards that haven't been used in the DS are all fine.
Something homebrew apps and/or libFAT is doing is wrecking memory cards. There is no other explanation. The problem has persisted through every other possible variable - the DS itself (even Phat vs Lite), the homebrew device (even slot1 vs slot2), the brand and size of card, the type of card (CF and MicroSD), the card reader, the MicroSD adaptor, the PC, the PC's operating system, the programs used, the frequency of usage, even the climate I live in (moved across the country). Everything has changed and the problem remains. Fuck it, I'll get a used PSP instead, it'll be cheaper than buying cards all the time.
I'll put my unfinished DS projects on my website when it's back up (don't hold your breath) if anyone wants to try to finish them. I officially give up on DS homebrew. There's some wonderful software, but it's not worth the expense to keep replacing these damn things.
(I might come back to play with DSi in the future; hopefully the standard SD slot, and/or filesystem routines in firmware, will alleviate the issue. Or if - knowing my luck - PSP turns out even worse. <_<)
_________________
I'm a PSP hacker now, but I still <3 DS.