I'll put my system to test very soon.
Thanks for this great emu.
Is the save state suppose to work now ?
|
|
|
|
Would you like to get all the new info from
PSX-Scene in your email each day?
Want to learn more about the team keeping you up to date with the latest scene news?
Read about them now! Check out our Developer bios, too! | ||
|
|
I'll put my system to test very soon.
Thanks for this great emu.
Is the save state suppose to work now ?
For cnf loading, from what I understand, not all software that is used to boot programs passes arguments to the elf, and those that do might not pass anything useful. That means FCEUltra might not "know" the path from which it was booted in order to load cnf files or set the savepath from there, so I can't depend on it. That's why I have to limit it to hardcoded paths, hdd0:/+FCEUMM/, mass:/FCEUMM/, or mc0:/FCEUMM/. But that doesn't affect savegames, states or gg.rom/disksys.rom which takes up all the space.
For the path corruption, the behavior looks like an unterminated string... for the "dir" part of the string. I think I know where the problem is for the elfpath anyway, I reset the position of the pointer to the first / prior to the filename for boot.elf so it becomes /boot.elf. It might also affect what happens when I'm making a new path for the savepath if the filename part of the path isn't returned correctly... I know where to look now. I need to get this fixed for snes9x anyway.
Savestates should work, for the most part. It hinges if the savepath is working correctly, heh.
Edit:
It's going to take some time. I'm going to more fully implement _makepath and _splitpath according to their descriptions in the C library reference, since snes9x does use them for making new paths to different files and such, it'd be a good idea to have it work properly.
Last edited by ragnarok2040; 05-09-2008 at 01:58 AM.
H-A-W! Take your time ragnarok!
I'll keep my eyes open here waiting for the new build![]()
I redid the functions a bit. Decided to separate creating a hdd0: path from _splitpath to a separate _makehddpath function, which isn't as versatile as _makepath right now but works good enough. The _splitpath and _makepath functions should follow the standard libc description of what they return. I uploaded the source for the functions in case anyone wants to double check my work. I tested them pretty thoroughly to make sure all the parts are null-terminated and that they combine together fine.
Here's the output from _makepath and _makehddpath where Path = pfs0:/somewhere/on/this/hdd/is/a/file.elf:
Code:Path was divided into: Device = pfs0: Dir = /somewhere/on/this/hdd/is/a/ Filename = file Ext = .elf Path was combined into: Path2 = pfs0:/somewhere/on/this/hdd/is/a/file.elf Path2 = hdd0:/+FCEUMM/somewhere/on/this/hdd/is/a/file.elf
Testing it... i'll be right back in a few
I just fixed another bug in _splitpath which might not affect that release, but it was affecting snes9x. After I'd copied over the device part of the string, I was setting the null terminator one byte too far. g++ was making the bug appear with a random character in device like mc0:M/BOOT/... but gcc was not.
While testing, I came across a bug with saves. The first time opening a game, the filename is alright, (game.nes game.ips gamecrcvalue.sav). Then the next time, the first number from the crcvalue is appended to states and save names :S, (game.nes gamec.ips gameccrcvalue.sav) so you get a doubled number in the middle. I'm pretty sure it's derived from trying to fix it so entire small filenames get included in the filename, so I just reverted it since it worked fine before.
ragnarok: sorry about the delay, real life (tm) called and i had to answer...
Anyway, I tested the previous post version.
It reported "error saving game 0"..
Also, it crashed when exiting to elf.
How I can save the FCEUMM.cnf file?
I'll test this new version... i'll bbl in a few
Welp.. here I am... same bug as previous version ragnarok
I'm guessing that the emulator NEEDs a folder in the memorycard called FCEUMM to save the cnf and savestates properly now.
I can't test for sure, because I'm out of memorycards here.
So, to remind you...
My save folder is pointed to hdd0:/__boot/NES/
My exit to elf is pointed to hdd0:/__boot/boot.elf
I can't save FCEUMM.cnf. I won't save.. anywhere, unless, it only saves to the memorycard.
Exit to elf crashes the ps2, saves aren't working. Error saving state 0, error loading stat 0
Last edited by spkleader; 05-09-2008 at 03:31 PM.
Yeah, if you don't have a hdd0:/+FCEUMM/ partition or a mass:/FCEUMM/ folder, you need to have a mc0:/FCEUMM/ folder, and they're all case sensitive. When it boots up, it looks for those paths and sets them by precedence, so hdd0:/+FCEUMM/ before mass:/FCEUMM/ before mc0:/FCEUMM/ and they're only used for the .cnf files. Save states save to the savepath, so they should be going to your hdd0:/__boot/NES/ or pfs0:/NES/ after it's been mounted. As a safety precaution in the future, when starting, if no cnf paths are found, I'll have FCEUltra try to create mc0:/FCEUMM/ and then, if that fails, issue a warning advising the creation of either the partition or one of those directories on mass or the first memory card in order to save the configuration.
I just realized the function I use to mount the savepath and elfpath partitions, which is a clone of _splitpath's code, didn't have any of the fixes added. Totally slipped my mind. It's probably mangling the pfs0: path it returns to pfs0:#/NES/ where # is some random byte. I'll add the fixes and do some testing with both C and C++ to make sure it's working properly.
See if this works,.
Edit:
For those looking for Snes9x news. I've gotten a rom loaded and initialized and emulating in a loop, but only rendering black... which is probably my fault. So far, I've only came across one random crash bug, which I fixed. The speed in PCSX2 is about 10 fps... which isn't looking too good, since FCEUltra, by comparison, runs at 40 on my machine.
Last edited by ragnarok2040; 05-10-2008 at 04:57 AM.
This last version seems to be in working order, from what I can tell. Good times.
Thanks alot! It's cool!![]()
| « Previous Thread | Next Thread » |