KMFDManic / NESC-SNESC-Modifications

All of your NES-SNES-Playstation Classic Modification Needs!
GNU Lesser General Public License v3.0
273 stars 33 forks source link

Sega CD internal external RAM issue #81

Closed whitezombie2000 closed 6 years ago

whitezombie2000 commented 6 years ago

I have this working great with SNES, Genesis, PSX, and Sega CD. The only issue I have is with Sega CD. I can create a save state and it copies to the usb drive in the save folder on the usb fine. But what about the internal ram and external ram for Sega CD. I don't see anything being created on the USB. If I exit the game to the SNES Classic menu and re-enter I can see the save on internal memory and the external memory in the bios. But power cycle the SNES Classic and the internal\external Sega CD memory is at 0 when you go back into a Sega CD game. I have tried per game and per bios in the retro arch settings but that doesn't help. Does the gens core not create a cart.brm, scd_U.brm, or content-name.brm like when you load Sega CD with the gens core on a PC?

gingerbeardman commented 6 years ago

Does this also happen on PC RetroArch?

whitezombie2000 commented 6 years ago

This is not an issue on the PC. The brm save files are created just fine on PC. This is just an issue with the SNES Classic USB host mod.

gingerbeardman commented 6 years ago

Great, thanks for the clarification!

whitezombie2000 commented 6 years ago

I was able to get this to work. I had to manually specify the path in Retroarch under Settings, Directory, Savefile. By default it was /var/cache. I changed to /var/saves and now it creates them on the USB drive.

capture

whitezombie2000 commented 6 years ago

However, changing that directory causes all retroarch core saves to be dumped there, SNES, Genesis, Sega CD, and PSX. I guess I could just create another folder to dump all Retroarch saves to until this gets corrected. I'm just glad it's functional for me.

KMFDManic commented 6 years ago

All you should have had to do was make a hakchi/saves directory, and it should have pushed the saves to it. Saves go to Nand, unless they are "forced" to go to /saves directory on USB. You can alternately, use SAVES folder in my Core Set to push saves to and from Nand.

whitezombie2000 commented 6 years ago

I have a hakchi/saves directory on the USB drive as you can see in my screen shot and everything saves fine to the gameID directories under saves. Except for the Sega CD internal and external RAM. Suspend\save state for Sega CD save just fine to the USB drive saves\gameID folder with the default setting of /var/cache in Retroarch, but the internal and external RAM does not by default appear to save anywhere. When you play a Sega CD game and create a save on the internal and external RAM it will stay there until you power off the SNES Classic. You can go to SNES Classic menu load another Sega CD game or any other game for that matter and the save on the internal and external RAM will be there, but when you shut the SNES Classic off and back on, load a Sega CD game, there will be nothing on the internal and external RAM. I just created a new folder on my usb drive :\hakchi\saves\saves01. Once I specified that directory in Retroarch I was able to get the internal and external RAM to function properly but all Retroarch saves, SRM, BRM and BIN, now go to the saves01 folder. Not a big deal though as it works. The suspend\save states still go to the proper hakchi\saves\gameID folder. Is this an issue with the gens core not properly creating the internal and external RAM brm files by default or is it supposed to function that way?

capture

KMFDManic commented 6 years ago

Sorry I missed the fact that the folder clearly showed it as saves at the top. Much harder to see on my phone:)

KMFDManic commented 6 years ago

@whitezombie2000 This can potentially be adjusted, as long as there are no conflicts. Let me know how things are testing out for you.

whitezombie2000 commented 6 years ago

You know I kind of prefer to have all my saves in one folder. I think it's easier to find than a random gameID folder. I'm happy with it. No issues and everything saves and loads fine.

KMFDManic commented 6 years ago

PSP is separate, but will be fixed, too. Is Sega CD the only current culprit you've run into?

whitezombie2000 commented 6 years ago

The Sega CD internal and external RAM is the only one I had problems with. I've only tested SNES, Genesis, Sega CD, and PSX.

KMFDManic commented 6 years ago

Sega Saturn may need a test. I got some games running alright for it. I didn't post the Performance Upgrade for it yet. But, I will soon. Mainly wanted to push out other stuff for now.

whitezombie2000 commented 6 years ago

Maybe I'll give Dragon Force a try tomorrow if I have time.

whitezombie2000 commented 6 years ago

Well Dragon Force doesn't appear to compatible with Yabause as just kicks back to the bios screen after the Sega logo. Albert Odyssey loaded extremely slow but the controller stopped functioning when the game loaded. Actually the controller worked, in Retroarch the controller was set to Saturn 3D pad, I switched it to Saturn Pad. Wouldn't even be playable it's so slow, no sound, just a ticking noise. It'll take me forever to get to a save point. Too bad it looked kind of good with the SNES Classic CRT filter. Guess I'll just stick with SSF on the PC for now. Maybe one day someone will give the Saturn some love and give us a good emulator.

capture

whitezombie2000 commented 6 years ago

So the Saturn internal RAM saves to the gameID folder properly. I couldn't get the 1mb or 4mb add on cart recognized after turning on the option in Retroarch and restarting the emulator. The memory manager in the bios and the game when loaded wouldn't recognize it. I know the external memory works for this game in SSF when saving on PC, just an FYI.

capture

KMFDManic commented 6 years ago

For the record, I did a performance boost for Sega Saturn, and got several games playable. Some even at full speed. I will be posting a test video and getting it released in a day or two. Thanks for your amazing feedback:) We can try to sort the Sega CD thing out!

KMFDManic commented 6 years ago

So, to be on the same page, WHERE do you want the saves to go? I will look into forcing them to go there and not affect other Cores, if at all possible:) Let me know of any other findings!

whitezombie2000 commented 6 years ago

I would assume by default you would want them going to the GameID folder like all other saves.

KMFDManic commented 6 years ago

I dug a little deeper and found out that the reason it is set up the current way was due to problems that happened last year, where bram would run out of memory. In options, you should be able to save per bios or per game. Did you try the per game option to see how that plays out? Definitely want to avoid any potential issues as far as memory running out:)

whitezombie2000 commented 6 years ago

Yes I tried per game and per bios. I stated that in the first post.

KMFDManic commented 6 years ago

Haha, long weekend:) Ok, will check it out more.

KMFDManic commented 6 years ago

Dragon Force does play, by the way. Have you tried running with one of the Xtreme RetroArch Variants I just posted?

KMFDManic commented 6 years ago

@whitezombie2000 Very interesting situation. Internal Nand Saves are dependent on combination of the Core, itself, along with RetroArch Directory setting, whereas, saving to USB/saves folder is controlled partially by coding of USB-HOST. If you don't mind, let me know a few things. If you place the save file into saves folder, without it being pushed there to begin with, can it still be used properly? Additionally, try using the SAVES script in my Core Set to see if it pushes it over. Lastly, try using a Neo Variant of RetroArch in my Core set and see if the behavior changes, when you do Saves folder. Thanks!

KMFDManic commented 6 years ago

@whitezombie2000 with /var/cache set to /var/saves, have you attempted to run without a saves folder on USB? If so, how did things work out? I am interested in potentially optimizing Core Wide saves, just so long as there are no issues. I may need to communicate with the Hakchi2 CE Team, to see how things can be done so that RetroArch and Hakchi2 play nice with one another.

whitezombie2000 commented 6 years ago

I've been busy working and don't have time at the moment to test all these things. I'm currently happy though with the way it is by specifying my own folder in settings which all the Retroarch cores will put their game save in.

KMFDManic commented 6 years ago

@whitezombie2000 Work is incredibly hard to escape from! I value your input and test results, thus far. This will be added to my agenda to check more into. If there are no conflicts, it would be nice to have them all save to one single location that matches USB/Nand. By the way, just saw Rob Zombie last summer with Korn:) Fun Concert, and loved his last movie, too! Hopefully, I didn't misconstrue your name and you really are a White Zombie/Rob Zombie fan:) I thought his last movie was really cool, and a little like The Running Man. If you need anymore help, let me know, anytime! I will communicate about the "saves", as well as test the perimeter on my own end to see how it fares:)

whitezombie2000 commented 6 years ago

I have been a zombie fan since I played Way of the Warrior on my Panasonic 3DO back in the mid 90s. Would be nice to be a kid again. I have not tried any of the extreme variants but I might give Dragon Force a try. I had no idea Sega Saturn emulation had made such good strides in the last couple years. I have been playing Dragon Force on Mednafen via Retroarch and it looks so good. I can finally play it full screen. Now I can put my copy of Dragon Force and Albert Odyssey back in the closet. Thanks to this emulator and the Analogue Super NT I may just get rid of my tube tv. My Saturn is crying.

KMFDManic commented 6 years ago

Watched all of Zombie's Films. Saturn is good on PC. I wouldn't be too concerned with it on Minis.

KMFDManic commented 6 years ago

@whitezombie2000 A little late to the party. But, we got things fixed up on the Sega CD front, regarding the Battery Saves:) I wanted to do it a different way than forcing everything to /var/saves. Saves now working with Genesis Plus GX, given you install any of the RetroArchs from the 5-21-18 Update:) Better late than never:) Hope all is well!

Grimsoul commented 6 years ago

just installed 5-21-18 version and sega cd ram saves are working perfect...thank you. Suspend states work also but I cannot get retroarch save states to hold after exiting a game.

gingerbeardman commented 6 years ago

Make sure to manage your save states only using the SNESC menu to save (quit to menu, move the thumbnail down, press button to save) and to resume (highlight save and press start) @Grimsoul

Grimsoul commented 6 years ago

yup that is what i am considering a suspend state. I was really hoping the "save state" within retroarch menu would work for some save state hacking<--cheater

KMFDManic commented 6 years ago

@Grimsoul @gingerbeardman RetroArch Saves are a feature I CAN add, but have not added as of yet. In testing, things can quickly get out of hand and fill up your NAND, leading to C7/C8 Issues. Not to mention, save state manager will not read or show them. PSP Saves can take up to 20 MB each, and so on. For the most part, they would work fine with NES, SNES, Genesis, and so on. But, if someone starts trying to use them with PSP and N64, problems can quickly build up. I am still contemplating on whether or not I should add something that can be used incorrectly and lead to games no longer working. If I do so, I would have to have some "stern" warnings in the Release Notes:)

Grimsoul commented 6 years ago

As it stands right now, can't that still happen? Save state works in the same instance that you have the game loaded so if i played a psp game and used save states 0 - 9 i could force a c7/c8? Would it be possible to use a conditional statement to only allow save states with USB-HOST enabled and write the save states to var/cache/retroarch so they save to the game saves folder If I am way off here I apologize...it is 6 am here

whitezombie2000 commented 6 years ago

Thanks for the update KMFDManic. I have been happy using it the way I have been for the last few months. If I find time I'll update and give it a try. It's Memorial weekend, going to do some fishing, grilling, and have a few beers.

KMFDManic commented 6 years ago

@whitezombie2000 If everything is working for you, no rush in Updating:) Keep in mind, you will need to uninstall before installing anything new. Enjoy your weekend:) I am gonna try to have Picodrive fixed for next Update, too.

KMFDManic commented 6 years ago

@Grimsoul I may possibly add the RetroArch Saves. But, as mentioned, they may end up being MUCH larger than current suspend states are. And, save state manager will not read them. I will want to test them a little more to be sure they won't do more harm than good, overall.

KMFDManic commented 6 years ago

@Grimsoul RetroArch Saves added:) Be sure to run the games from UI for them to stick. They generally work for Cores that work with suspend states to begin with, such as nes, snes, genesis:) Grab my latest Update.

whitezombie2000 commented 6 years ago

So I decided to give this a try today with some spare time. I downloaded the CE_1.2.5_Release and KMFDManic-NESC-SNESC-Cores(6-19-18). My previous ones were CE_1.0.1 and KMFDManic-NESC-SNESC-Cores.2-10-18. I reflashed with CE_1.2.5_Release. From the KMFDManic-NESC-SNESC-Cores(6-19-18) release I used hmods _km_genesis_plus_gx_5_12_18, _km_pcsx_rearmed_neon_6_6_18, _km_snes9x2016_6_19_18, _km_retroarch_172_xtreme_6_19_18. Everything worked well except Sega CD games go to a black screen and exit back out to game select screen. The command line appears to be the same as the previous release, /bin/segacd /usr/share/games/CLV-Z-SAVZO/Lunar_Eternal_Blue.bin, everything recreated on the USB looks the same. Is something broken with this release?

KMFDManic commented 6 years ago

Not exactly. Due to things becoming exponentially bigger, BIOS have to be provided by you. Refer to Master BIOS Module in my Core Set. And, let me know if u need absolutely any help.

https://youtu.be/uJCEQ_-wLbU

whitezombie2000 commented 6 years ago

Ok I was able to use transfer to get the BIOS installed. Sega CD Bios stutters for couple seconds but returns to normal and Sega CD games are loading. Nice work with the saves.