I'm just Curious.
I wonder if it's possible to make anti cheat system,for emulator's save states...
My though is that to use SRAM.
-Game starts:SRAM is saved with flag 0 as TRUE.
-If player collide a enamy/bullet/spikes/water/or whatever then flag 0 is set to FALSE
-After a level end SRAM compare state of flag 0.If both is TRUE then game continues.
If Flag 0 state is FALSE then Game Shows message"Sorry,no cheating"And game restarts.
Is something like this is possible?Or maybe i'm missing something
Perhaps it's the foreigner-speak, but I don't completely understand what you're explaining here. What attack are you trying to thwart? A ROM attack like Game Genie? A RAM attack like Pro Action Replay? Or simple rewinding?
I don't think this is possible. Emulators save state does just that, save the state, including SRAM (only some early SNES emulators didn't save SRAM I think, because most games actually used it only for saving, but I'm not too sure).
You could potentially find a flaw in one particular emulator's format that will make save-state detectable (especially in early/inacurate emulators), but you won't be able to do something that detects all savestates for all emulators.
What you describe would always give a "sorry no cheating" screen if the player does get any hit which sounds like nonsense to me.
Umm..sorry looks like my english is poor...
I want to prevent save stating.
You know...save states...
So i guess it's like RAM attack(Save states is loading RAM...i guess)
Your mechanism can only work against emulators with buggy save states. A correct one cannot be detected because it restores everything perfectly. Imagine that the universe had a save state made, and then run forward a year, and then the state restored just now. Would you be able to tell?
Your best approach is to put emulator detection and refuse to run unless it's an actual NES.
No,no that's is not a option
'
So,ok It will work only wtih buggy emulators.
But,anyways...anyone know how to Save an LOAD SRAM?
I plan to make unlockable extra character after beating game once.SO SRAM would be useful
Unfotrunelly wiki don't have information about it
Make an online game using
chykn's adapter. An emulator can't save the state of a remote server.
Umm...sorry,but I don't understand...What do you mean by "make online game"??
Develop a video game that will not function without a connection to a server through the Internet. I gave you a link to a topic describing a device through which an NES, through a PC proxy, can connect to the Internet.
Umm,but...why in the world...
I don't need that.
I just wanted to know how to save and load SRAM on emulator.
Denine wrote:
I just wanted to know how to save and load SRAM on emulator.
You don't have to do anything special. Whatever data you write to the SRAM area ($6000-$7FFF) will remain there, as long as the cart has a battery (or your ROM is defined as having a battery, in case of emulation). Some mappers do have registers to lock and unlock SRAM though (to prevent corruption by undesired writes), so check the documentation of the mapper you are using to see if you have to unlock the SRAM before using it (and lock it while you're not using it).
It's pretty simple, you just use it like normal memory - except that you don't normally clear it when the cart is reset. You put a signature byte/word in SRAM (like $55AA) when you first initialize it. Then on later resets, you don't initialize it if the signature is there.
You can defend against modification type cheats (RAM or ROM poking), but not against savestates.
To defend against RAM cheats, you could always maintain an 8-bit checksum of all your memory. Every time you write somewhere, also update the checksum. This is an 8-bit subtraction with the old value, followed by an 8-bit addition of the new value. This will also make your game slow as hell, and any hacker who cares about cheating can disable the mechanism as well. But this will defeat "cheat finders" built into emulators. Of course, you need to validate the checksum as well, and that's also slow.
To defend against ROM cheats, do a checksum of various places in the ROM. Check if they match. Have more than three different functions to validate the checksum, each with its own checksum information. This way the hackers need to get rid of many different checking routines, instead of just one. This won't stop people from cracking the game, but it would stop a Game Genie.
Not a damn thing you can do about savestates though, except make the game more deterministic, and less reliant on random numbers generated on the spot. So rather than asking for a random number, you would separate each thing that needs random numbers into its own "pile of cards", and "draw cards" from there each time you need a new random number. Or just separate RNG seeds for every type of thing.
Hard code the game into an open source emulator and disable the save states. Even then though, if the emulator saves the sram to a separate file, you're screwed.
As long as the open source emulator is under a permissive license, not a copyleft license, you can have it digitally sign the SRAM file like more recent game consoles do with their saved games.
I think you should just concede that some people will cheat through the game. It's unavoidable without extreme measures. Measures that take time away from actually developing something worth while. Many pirate famicom games suck yet have all sorts of protections. They should have spent more time working on creating something worth stealing.