Comments (9)
The libretro.c implementation does not use those functions indeed - this is done by design.
Savestate loading and saving is serialized so that it can be used for rewind purposes as well (and netplay). As for SRAM saving/loading - the libretro.c implementation has its own implementation of that.
There have indeed been reports that saves created with Genesis Plus GX libretro are not compatible with, say, Kega or Exodus. If this is due to the aforementioned endian issues I guess we know where to proceed from here.
from genesis-plus-gx.
more exactly, Wii, PS3 & X360 libretro .srm files are compatible, but Windows, Linux, Xbox, IOS & Android ones are not for aforementioned reasons
EEPROM saves (used in Rockman Mega World, Wonderboy 5, NBA Jam, etc) are not impacted because they are handled as bytes
And yes, I eventually figured that SRAM was handled directly by retroarch through retro_get_memory_xxx functions although i cannot figure what the "SYSTEM_DIRECTORY environment callback" in libretro.h is if I want to handle more complex RAM (and maybe also Mega CD backup & cartridge RAM) though this ?
So I guess it means the only alternative is to modify Genesis Plus GX core to force SRAM data to be internally handled in big-endian format on little-endian architecture (native format was obviously used for optimization when memory can be accessed directly through pointers instead of specific function calls but it shouldn't be very significant for the few SRAM access games are usually doing)
from genesis-plus-gx.
The SYSTEM_DIRECTORY callback is there so that the libretro port can query the frontend (ie. RetroArch) about the 'path' of the system directory (since this can differ per platform port). This way we don't have to messily hardcode in some 'filesystem path' to a 'system directory' or make assumptions about where it might be stored in a libretro port.
The System directory is typically the directory where all the BIOS files go that a libretro core might use. For instance, with PCSX ReARMed, it looks for PSX BIOS files in the system directory - same for Genesis Plus GX where it looks for the Mega CD/Sega CD BIOS files inside this directory.
from genesis-plus-gx.
Fixed.
SRAM is now by default saved in BIG ENDIAN format, even on LITTLE ENDIAN platform.
This also means that .srm files made before with the libretro port on LITTLE ENDIAN platforms (PC, Android, IOS, XBOX) are not compatible anymore and must be manually byteswapped.
from genesis-plus-gx.
I'm not sure if this is the right place to mention this, but I've just tested the current libretro core of Genesis Plus GX (20130629) and some sram files still seem to be incompatible with other emulators (Sonic 3 & Knuckles and Phantasy Star IV for example).
I did not use any save files from previous versions of Genesis Plus GX, so they all should be in big endian now.
I've also noticed Sonic the Hedgehog 3 no longer saves correctly. It creates a srm file, but every time I reset the game the save slots are empty.
from genesis-plus-gx.
Indeed, I forgot to handle SRAM for some specific mapper used in a few games (namely Sonic the Hedgehog 3, Beyond Oasis / Legend of Thor & Phantasy Star IV)
SRAM will indeed be broken in those games and it might affect gameplay as well, this should be fixed soon
from genesis-plus-gx.
Hum, that's weird, for me Fusion .ssm & sgm files are perfectly compatible once renamed to .srm... and the opposite is also true. Can you upload sram files somewhere and tell from which emulator they come from ?
What I am 100% sure is that there isn't any endianness compatibility issues for 8-bit systems, it's strictly a 16-bit problem
from genesis-plus-gx.
I forgot Fusion uses different file extensions for each system. No wonder it didn't want to load any of the MS/GG saves.
Thank you very much for looking into this!
from genesis-plus-gx.
Should now be properly fixed for games using SRAM bankswitching like Sonic 3, etc
from genesis-plus-gx.
Related Issues (20)
- [Gamecube] Request: Allow L and R to be read as a button press HOT 1
- PCM chip's RAM unaligned access on DMA write HOT 1
- Update Nuked-OPN2 sound core HOT 1
- [Wii] delay based netplay HOT 1
- Update Nuked-OPLL sound core
- Mortal Kombat (Sega CD) hangs while loading HOT 3
- Faster Sega CD Playback on GameCube? HOT 3
- Game Gear games has borders while Borders enabled HOT 1
- Snatcher - Issues with audio and freeze HOT 9
- Loading games from HDD says "file too large", i have the bios on the hdd and a bunch of games, all in .bin and .cue format, and when i open a small game, it crashes, any help? HOT 3
- Light Crusader (Russian Translation) doesn't save in game HOT 4
- A lot dma fill fails in vdp port access test rom HOT 1
- set rom default rom path HOT 1
- [RetroArch] Stuttering while playing Ultimate Mortal Kombat 3 HOT 2
- [GC] Possible to run the Menu in Interlaced mode? HOT 2
- [RetroArch/BizHawk] Port 1 controls Players 1/3/4 even if no multitap present in any of ports in Mega Bomberman HOT 2
- Toggling graphical layers on and off HOT 1
- Wii u gamepad support and channel forwarder HOT 1
- Escape 2042 The Truth Defenders - "Smooth Coder" Screen HOT 1
- Rick Dangerous 2 title screen graphical glitch HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from genesis-plus-gx.