Is a NES game able to detect if it is being emulated?
Moderator: Moderators
Is a NES game able to detect if it is being emulated?
Is a NES game able to detect if it is being emulated or not? If so, could it be possible to detect if a save state has been made and loaded? It'd be neat to screw with the player for CHEATING.
Re: Is a NES game able to detect if it is being emulated?
No.
But, I can imagine a scenario where you have a password system at the beginning, and you could screw with people who put in a false password by making the game unwinnable... or have special in-game text about cheaters, or make the game ridiculously hard. Lots of options.
But, I can imagine a scenario where you have a password system at the beginning, and you could screw with people who put in a false password by making the game unwinnable... or have special in-game text about cheaters, or make the game ridiculously hard. Lots of options.
nesdoug.com -- blog/tutorial on programming for the NES
Re: Is a NES game able to detect if it is being emulated?
Only in less accurate emulators.AlexE wrote:Is a NES game able to detect if it is being emulated or not?
Absolutely not. The entire point of a save state is to store all the state necessary for the game; being able to detect a save state would imply that there was something that the emulator should have and failed to save.If so, could it be possible to detect if a save state has been made and loaded?
Re: Is a NES game able to detect if it is being emulated?
On a perfect emulator, no. But it can test for inaccuracies in popular emulators. For example, NESticle does not clear bit 7 of $2000 after reading. During a typical 5-second copyright notice, it can probably squeeze in dozens of behavior tests, just as the HackMii installer on Wii does a bunch of low-level vulnerability tests during its own notice screen.AlexE wrote:Is a NES game able to detect if it is being emulated or not?
You could do what arcade games do. Put a security token of some sort on the cartridge, and have the 6502 code depend on what it outputs. In fact, run some of the game logic inside the security token. Running game logic on a separate MCU is why Bubble Bobble was emulated wrong for years until its MCU was finally dumped.
- rainwarrior
- Posts: 8062
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: Is a NES game able to detect if it is being emulated?
There is no perfect emulator. If you really wanted to, you should be able to devise a test for every known emulator. (I suppose the various NES test ROMs are indirectly a form of this.) Though, any test that an emulator fails that works on the machine might be a call to arms to improve that emulator, at which point you might need to find yourself a new test. Certainly most currently popular NES emulators have very prominent holes in their emulation if you know were to look.
As for detecting savestates, I have no idea how you'd go about doing that. If an emulator correctly knows its own state, there shouldn't be any mechanism for knowing the difference between resuming from a saved state and any other execution.
I don't understand why you'd want to even attempt this, though. Why exactly do you care if people cheat at an NES game?
As for detecting savestates, I have no idea how you'd go about doing that. If an emulator correctly knows its own state, there shouldn't be any mechanism for knowing the difference between resuming from a saved state and any other execution.
I don't understand why you'd want to even attempt this, though. Why exactly do you care if people cheat at an NES game?
Re: Is a NES game able to detect if it is being emulated?
Not to mention that hacking the ROM to skip all these tests should be pretty trivial.
Re: Is a NES game able to detect if it is being emulated?
Yet. Eventually someone is likely to create an executable program with a proof of its equivalence to the netlist in Visual 2A03/2C02. Or what bugs have been found in Visual 2A03/2C02?rainwarrior wrote:There is no perfect emulator.
Because it's cheaper than flying top-ranked players out to your location to verify their achievements.Why exactly do you care if people cheat at an NES game?
- rainwarrior
- Posts: 8062
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: Is a NES game able to detect if it is being emulated?
That's a bit of "unknown unknown" territory, since Visual 2A03 is so slow it's not practical for large scale testing. Do you honestly believe it is bug-free and also complete? (As I recall it's been tweaked more than once to fix scanning errors.)tepples wrote:Or what bugs have been found in Visual 2A03/2C02?
Re: Is a NES game able to detect if it is being emulated?
Then someone could at least spot-check it by running it on an FPGA, then run it in parallel with an authentic NES chipset and compare the signals. But that'd take money that the Visual 6502 project doesn't have. Yet.
- rainwarrior
- Posts: 8062
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: Is a NES game able to detect if it is being emulated?
Also, if you make a mistake your anti-emulator test can backfire and make you look like a fool. 
There's that lovely RTC 2K demo that tells you it's running on an emulator even if you run it on an NES.
There's games out there that do things like wipe your save game if anything seems amiss. Whether or not this stops cheaters or pirates, it also tends to inconvenience legitimate users as collateral damage.
There's that lovely RTC 2K demo that tells you it's running on an emulator even if you run it on an NES.
There's games out there that do things like wipe your save game if anything seems amiss. Whether or not this stops cheaters or pirates, it also tends to inconvenience legitimate users as collateral damage.
Re: Is a NES game able to detect if it is being emulated?
You could detect if a Game Genie is being used because it leaves a lot of code in RAM. But then, one can make a code that disables the detection, heh.
Re: Is a NES game able to detect if it is being emulated?
That sounds like a neat idea. I don't know how I would go about doing that exactly, but I'll keep that in mind for when and if I ever go about implementing an emulation detector.memblers wrote:You could do what arcade games do. Put a security token of some sort on the cartridge, and have the 6502 code depend on what it outputs. In fact, run some of the game logic inside the security token. Running game logic on a separate MCU is why Bubble Bobble was emulated wrong for years until its MCU was finally dumped.
I've managed to think of two reasons.rainwarrior wrote:I don't understand why you'd want to even attempt this, though. Why exactly do you care if people cheat at an NES game?
- 1. Valid achievements
- 2. A self-referential, fourth wall-breaking NES game
- rainwarrior
- Posts: 8062
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: Is a NES game able to detect if it is being emulated?
What do you mean by "valid achievement" on an NES game?
Like I understand what this means for a platform that has achievements, since you might have an opinion that achievements earned via the built-in achievement system are competitive and/or should be meaningful, but NES doesn't connect to an outside network.
(I don't have that opinion of achievement systems, personally, but that's a side topic of its own.)
Like I understand what this means for a platform that has achievements, since you might have an opinion that achievements earned via the built-in achievement system are competitive and/or should be meaningful, but NES doesn't connect to an outside network.
(I don't have that opinion of achievement systems, personally, but that's a side topic of its own.)
Re: Is a NES game able to detect if it is being emulated?
I never really experienced achievements as something that is made for online gaming. Personally, I always thought of them as a way to provide the player with a "tangible" sense that he's making progress, sort of like positive reinforcing. It's also an opportunity to put in the occasional gag like when in Metal Gear Solid 3 if you kill Ocelot, an important antagonist in the sequels, you get a game over for causing a time paradox and an Achievement that says "Well, the series is over. Go home" or something like that. That might be because I don't do online gaming since my internet can't really handle it, though. Achievements can also provide the player with a replayability factor so that he can complete all the challenges laid out.rainwarrior wrote:What do you mean by "valid achievement" on an NES game?
Like I understand what this means for a platform that has achievements, since you might have an opinion that achievements earned via the built-in achievement system are competitive and/or should be meaningful, but NES doesn't connect to an outside network.
(I don't have that opinion of achievement systems, personally, but that's a side topic of its own.)
- rainwarrior
- Posts: 8062
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: Is a NES game able to detect if it is being emulated?
Perhaps I should rephrase: what is an "achievement" in an NES game, and what makes it "valid", and why would you want to address the validity with an anti-cheat mechanism? The key part that I'm very curious about is the NES context, specifically.
Do you just mean you want to prevent people from cheating at your game?
Do you just mean you want to prevent people from cheating at your game?