Another Nesemu Save/load Problem


Prometheus

Well-Known Member
Joined
Mar 8, 2008
Messages
9,472
After my previous save-state problem with NesEmu, I thought that it was solved when I ended up having to reformat my SD Card from ext2 to FAT32. However, I was incorrect in this assumption.

What happens with the card formatted as FAT32 is that NesEmu will load and save states perfectly well, until you quit the emulator. After that, NesEmu won't even start up again until its appdata directory is removed (which isn't too good, since that takes your save-states with it).

I've tried everything to get it to work, including purging and re-downloading the PND itself (multiple times), but it hasn't helped me.

Is anyone else encountering this?

EDIT: While I think of it, it also hangs (and sticks on whatever note of music it was on, in a most ear-searing fashion) if you assign and use a key for taking screenshots. Anyone getting this one?
 
Last edited by a moderator:
I just downloaded the NesEmu PND and I don't think I'm getting this problem. Saved state, quit, restart, load state: no problem.
What game are you playing, and what settings did you change?
 
The only settings I changed were to set the controls to my liking, and turn the FPS counter off.

After shutting down (or rebooting) the Pandora and going back to NesEmu again after having made a save-state, it simply won't start - can you try this, to see if you get the same, please?
 
Sorry, I'm not getting that. No matter what I do, NesEmu comes up no problem and I can save and load states to my hearts content.
However, taking a screenshot does cause it to crash. Like, exit right out crash, not the still-running-but-not crash you described.
What does /tmp/pndrunnesemu.out say when you can't restart it? There may be some helpful errors in there.
 
Good call. I'll check it tomorrow - I can't right now as my battery's just snuffed it and I don't have any free sockets in my current location. :(

Typical, looks like another bizarre Prometheus-bug... :rolleyes:
 
Ok, pardon the double-post - I just eked out a few minutes more life from the battery. This is what I got;

Code:
in fork!
PND ++ /media/PandoraMain/pandora/menu//nesemu.pnd
mountpoint: /media/PandoraMain
Basename: nesemu
/mnt/utmp/nesemu
/usr/pandora/scripts/pnd_run.sh: line 125: /proc/pandora/cpu_mhz_max: Permission denied
not mounted on loop yet, doing so
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
LoopMountedon:
/dev/loop0
Filetype is Squashfs
sudo mount -t squashfs  /dev/loop0
mounting union!
Filesystem is vfat
mount: wrong fs type, bad option, bad superblock on none,
       missing codepage or helper program, or other error
       (for several filesystems (e.g. nfs, cifs) you might
       need a /sbin/mount.<type> helper program)
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

/usr/pandora/scripts/pnd_run.sh: line 200: ./nesemu.linux.elf: No such file or directory
app exited
rm: cannot remove `/mnt/utmp/nesemu': No such file or directory
umount: /mnt/utmp/nesemu: not found
umount failed, didnt clean up
 
It's failing to union mount the appdata directory, specifically.
*testing* *testing*
*ding*
I think your SD card is being mounted read-only due to a corrupt file. At the terminal, type "mount", and there should be a line that says "/dev/mmcblk0p1 on /media/PandoraMain type vfat (XX" where that XX will either be rw (read/write) or ro (read only). If I'm right, it'll say ro. If it says rw, I'm wrong and back to the drawing board.
This usually happens when trying to manipulate a block that doesn't exist (ie, deleting or editing a file that has somehow gotten corrupted to be larger than it should be). It starts out fine, then as soon as you touch this bizarrely broken file, the Linux kernel panics and drops the card into read only mode just to be safe.
To fix it, run a check disk in Windows, or fsck in Linux. You might even be able to fsck it right on the Pandora. "sudo umount /media/PandoraMain" and then "fsck /dev/mmcblk0p1"
Hopefully that helps.

edit: hmm... if this were the case, you shouldn't be able to run any PNDs after running NesEmu. Are you able to run anything else off the card after running NesEmu, or is it just NesEmu that fails to restart?
 
It's just NesEmu that fails to restart. I'm able to run other things (and use any saving/loading facilities on offer) just fine afterwards. I should probably also note that it's been doing this ever since the card was freshly-formatted as FAT32 (previously the card was ext2, and NesEmu's saving and loading of states just plain didn't work at all).

The mount command tells me that the card is rw, by the way. Just checked it.
 
Well something weird is going on with that appdata/nesemu directory that is preventing it from mounting into the union, and specifically only on your system.
Next suggestion: Browse to that directory with thunar, hit ctrl-h to show hidden files, and delete each file one at a time, trying to start nesemu between each delete, until it works. That should tell us if there is one particular file it's having trouble with. If you've completely emptied the directory and it still won't load, try deleting the directory and then manually creating it again.
That's about all the ideas I can think of right now.
 
Alright, I've just removed everything, item by item (starting with the save state that started all of this :p ), and kept trying to start NesEmu again after removing each item. It will not start again until its appdata directory is completely empty, at which point it behaves normally until making another save-state.

EDIT: Even the NesEmu log file didn't contain anything useful - all of the stuff in it pertained to when I was last using it, so it hasn't been logging when it's failing to start again.
 
Some people say I have magic hands. I "repaired" TV sets and computers basically by touching them. People called me telling me their device was broken, I powered it on and it worked :lol: Now I know who got the other half of that magic :D :p
 
Yeah, lucky me. :p

I've always had a knack for finding strange bugs during normal usage, ever since I was a kid. :lol: (That reminds me, I need to do a bit more testing on that apparent issue I found relating to ext2 cards and the Pandora's ability to shut down properly. Need to dig up that spare 128MB card first, though...)
 
Ok, now it's started coming up as "ro". :rolleyes:

Apparently, fsck.vfat isn't available on the Pandora, and I'm on my Mac right now, so I've run it from there. This is what I'm getting;

Code:
BAD SUPER BLOCK: MAGIC NUMBER WRONG

LOOK FOR ALTERNATE SUPERBLOCKS? [yn] y

SEARCH FOR ALTERNATE SUPER-BLOCK FAILED. YOU MUST USE THE
-b OPTION TO FSCK TO SPECIFY THE LOCATION OF AN ALTERNATE
SUPER-BLOCK TO SUPPLY NEEDED INFORMATION; SEE fsck(8).

The trouble is, I don't know what location I'm supposed to specify. I've never come across this before. :p (Though I'm very much reminded of when the same card got corrupted when it was formatted as ext2.)
 
It may be easier to make a backup of the card, reformat it, and copy everything back.
 
That's what I'm doing right now, funnily enough. :lol:

I did some reading up on it, and I couldn't find anything helpful relating to SD Cards - frankly it's all a bit beyond me at this point in time, anyway. I guess I'll be avoiding NesEmu for a while. :p
 
Argh, it's still giving the same bad superblock complaint even though it's been reformatted. :blink: Any suggestions?

EDIT: Now that I think about it, this is starting to sound a little like the issues some other folks have had with running seemingly random PNDs (I noticed that, over the last day, a couple of mine ceased working properly after the NesEmu issue came up). I guess I'll get the Panasonic Formatter running under WINE on my main box later. I hope that'll fix it.

EDIT 2: Well, great... The Panasonic Formatter doesn't see my card, or any other devices, at all. :rolleyes: I thoroughly hate the assumption on their part that we all use Microsoft Windows. I don't even know a single person who does, so now it seems that I'm stuck.

EDIT 3: Hooray! I reformatted on my main box (Xubuntu 10.04) and the bad superblock problem seems to be gone. :) How odd that Mac OS X didn't touch it, though...

EDIT 4: Ok, odd. Mac OS X is still claiming there's a problem, but Xubuntu 10.04 can fsck the card just fine. I guess I'll trust Xubuntu on this one, as I don't use OS X's terminal enough to know any of its nuances.

EDIT 5: I just fsck'ed it on my main box again, after doing so on the Mac, out of curiousity, and back on Linux it spits out some chatter about there being two FATs, both intact. Is Mac OS X munging things up a bit here? :blink: No matter, the card seems to be fine again under Linux after another reformat, and that's all I ask of it. (Pardon my talking to myself. :p I had suspected that Mac OS X may have contributed to killing another of my cards stone dead, and now I'm wondering if I was right.)
 
Well, I seem to have the same problem.

I will try to give your solution a shot: format the hell out of it :)

I'm thinking I'll wipe it by dding /dev/random over it or something, and then doing a format with the panasonic tool or something. Oh well, that'll have to come after the weekend :(
 
Last edited by a moderator:
For what it's worth, after about two or three reformats (for the sake of quickness, I used the KMFormat GUI under Xubuntu 10.04, but all that actually does is call the standard mkfs.vfat stuff at the command line), it started behaving itself again. Really it probably only actually needed one, but my curiousity got the better of me and I just had to look into that strange thing that Mac OS X was doing.

That said, I've also been avoiding NesEmu ever since, since I appear to be having no luck with that one! :p
 
I was having problems with the display in Elite on NesEmu, the screen seemed to move everything down so I couldn't see the control panel. It wouldn't be so bad but I couldn't get saves in GPFCE to work, and I kind of missed out on Elite first time round! Maybe I should just give up on playing it on the NES and try it on one of the other emulators...
 
The NES version of Elite is a tricky little thing (note to the other mods: It's a legal download :p). If memory serves it requires proper PAL emulation (or is the provided one the NTSC version? I forget! Pretty sure it's PAL, though), which I don't think NesEmu provides. I've only ever gotten it to run in Nestopia on my main computer. :p
 
Back
Top