Jump to content

Photo

Detecting if software is running on real hardware


94 replies to this topic

#1 peteym5 OFFLINE  

peteym5

    River Patroller

  • 2,299 posts
  • Location:Buffalo NY USA

Posted Tue Dec 29, 2015 3:58 PM

I am working on some program modifications, but sometimes things don't work the same on an emulator as they do on real hardware. I wonder if there still are ways to detect if a program is running on an emulator or real hardware?



#2 kenames99 OFFLINE  

kenames99

    Star Raider

  • 79 posts

Posted Tue Dec 29, 2015 4:11 PM

contact sjcarden @ sjcarden "at" bellsouth dot net as he has knowledge of these differences.

 

Ken


Edited by kenames99, Tue Dec 29, 2015 4:12 PM.


#3 flashjazzcat OFFLINE  

flashjazzcat

    Quadrunner

  • 13,928 posts
  • Location:United Kingdom

Posted Tue Dec 29, 2015 4:31 PM

If the software crashes after publication, you know you're running on real hardware. :)

#4 Stephen OFFLINE  

Stephen

    Quadrunner

  • 7,232 posts
  • A8 Gear Head
  • Location:No longer in Crakron, Ohio

Posted Tue Dec 29, 2015 4:50 PM

Is this for "quality control" or to prevent software from running in an emulator.  Rhetorical question of course.



#5 ZuluGula OFFLINE  

ZuluGula

    Chopper Commander

  • 119 posts
  • Location:Chicago, Il

Posted Tue Dec 29, 2015 4:59 PM

If there's a difference between emulator and real hardware, that means than this emulator has to be fixed.



#6 kenames99 OFFLINE  

kenames99

    Star Raider

  • 79 posts

Posted Tue Dec 29, 2015 5:20 PM

hopefully to make sure the software will run correctly on both real and emulated machines.

 

Ken



#7 erichenneke OFFLINE  

erichenneke

    Moonsweeper

  • 380 posts
  • Location:USA

Posted Tue Dec 29, 2015 6:09 PM

I'm curious about this also.  A practical application would be handling paddle control "jitter" for example.   Real-world paddles have quite a bit of physical jitter and, depending on the program, might require some jitter-compensation on real hardware to keep things from jumping all over the place when controlled by a paddle.

 

That said, implementing jitter control logic introduces some overhead and loss of accuracy.

 

So, it would be great to be able to apply some jitter control only if it is real hardware, and bypass that if emulating since emulation doesn't have jitter.

 

I guess a perfect emulator would emulate physical paddle jitter also.  ;)



#8 rdea6 OFFLINE  

rdea6

    River Patroller

  • 2,745 posts
  • Location:Arizona USA

Posted Tue Dec 29, 2015 6:14 PM

http://atariage.com/...tion/?p=1645533

 

I have used this program before..  Posted by Rybags..



#9 flashjazzcat OFFLINE  

flashjazzcat

    Quadrunner

  • 13,928 posts
  • Location:United Kingdom

Posted Tue Dec 29, 2015 6:19 PM

hopefully to make sure the software will run correctly on both real and emulated machines.


The usual method is to test the software both in the emulator and on real hardware. Discrepancies (and bugs in the software, and - helpfully - bugs in the emulator) may then be revealed.

#10 Rybags ONLINE  

Rybags

    Quadrunner

  • 15,855 posts
  • Location:Australia

Posted Tue Dec 29, 2015 6:43 PM

I believe the fast scan method on the paddles won't detect Altirra.

 

Refer Phaeron's Acid800 test - it is designed to exploit known weaknesses in emulation and test for them.



#11 Josť Pereira OFFLINE  

Josť Pereira

    River Patroller

  • 4,140 posts
  • Location:Lisbon - Portugal

Posted Tue Dec 29, 2015 6:45 PM

Some interesting and :grin: answers here ;)...

Edited by Josť Pereira, Tue Dec 29, 2015 6:46 PM.


#12 snicklin OFFLINE  

snicklin

    River Patroller

  • 2,146 posts
  • Location:Australia

Posted Tue Dec 29, 2015 8:24 PM

I asked Phaeron/Avery about this a while ago in some thread which I cannot remember. It was probably around 3 or 4 years ago.

 

I wanted the emulator to look for a specific sequence of bytes set by the loaded program so that the emulator could then do something specific which a real Atari wouldn't. Perhaps it'd kick off an external program or would switch on certain features in the emulator.



#13 phaeron OFFLINE  

phaeron

    River Patroller

  • 2,599 posts
  • Location:Bay Area, CA, USA

Posted Tue Dec 29, 2015 8:57 PM

Detecting the emulator is almost always the wrong thing to do.

 

If you are trying to work around an emulation issue, then you need to test for that specific issue. Trying to detect emulators in general is wrong if for no other reason that there are lots of emulators out there with varying levels of accuracy. About the only time it is appropriate to test feature A to change handling of feature B is if you can't reliably test feature B, and that should only be used as a last resort. I've also seen a fair number of "emulator issues" turn into real bugs on real hardware -- the reproduction rate is just different.

 

If you are trying to detect an emulator just for the sake of doing so, there is no reliable way to do so that will work in the future. You have three active emulators with different behaviors (Altirra, Atari800, Atari++) and with continually rising levels of emulation accuracy, five classes of real hardware with slightly different behavior to avoid false positives on, and a handful of internal add-ons and FPGA emulators to throw an extra wrench into the works. There are ways to detect most emulators with a high level of accuracy, but many of those also have a significant risk of false positives on machines that have add-ons. About 80% of Acid800, for instance, will not work with a CPU accelerator. One test program reports an emulator if it sees an H: device... except that there is nothing preventing having an H: device on stock hardware.

 

I have received several requests over the years for a way to control Altirra from within the emulation, but that any such feature would never be enabled by default, both for security and for emulation accuracy reasons. You would not be able to depend on it.

 

Paddle noise is an interesting issue. I have, on my desk, a pair of paddles where paddle 0 is noisy to the point of uselessness and paddle 1 is perfectly clean. No idea how it came out this way, but it exists. Furthermore, there are at least two emulators that do emulate a minimal amount of pot noise in 5200 mode because there is at least one game that doesn't work without it (Galaxian). You can't assume emulator=clean, real hardware=noisy.



#14 Paul Westphal OFFLINE  

Paul Westphal

    Stargunner

  • 1,283 posts
  • Location:Portland, Oregon

Posted Tue Dec 29, 2015 9:20 PM

I thought that was how you did the AtariMax protection in tempest Xtreem...

#15 peteym5 OFFLINE  

peteym5

    River Patroller

  • Topic Starter
  • 2,299 posts
  • Location:Buffalo NY USA

Posted Tue Dec 29, 2015 10:01 PM

I think I accidentally came across an issue with Altirra trying to clear the console and waiting for all the console keys are up while initializing the title screen with DMACTL and NMIEN disabled  Some of it is copy protection and the other reason is testing to make sure something works properly before it is burned to an EPROM image. I know the FastPot scan thing got fixed in Altirra.



#16 snicklin OFFLINE  

snicklin

    River Patroller

  • 2,146 posts
  • Location:Australia

Posted Wed Dec 30, 2015 12:42 AM

I completely respect Avery's opinion on not writing emulator specific code / bytes.

 

I'm not saying that it -should- be implemented, but if it was, you could have things like a graphic of the disk manual could be added. All the emulators wouldn't need to follow the same standard, those that didn't look for it wouldn't do anything other than normal emulation.

 

Then you have the opportunity to have encapsulated files. You could have a .xei (executable information) file which includes a .xex inside and a load of extra information. That would require the emulator to support it.

 

I'll repeat once more though that I am not saying that either of these options is a good idea - just a possibility. I can see the downsides.



#17 Kyle22 OFFLINE  

Kyle22

    River Patroller

  • 3,668 posts
  • Call my BBS! telnet://broadway1.lorexddns.net
  • Location:McKees Rocks (Pittsburgh), PA

Posted Wed Dec 30, 2015 12:53 AM

I suspect that he has a nefarious reason for all this.  He is looking for a way to prevent his cartridges from being dumped and run on an emulator.

I (for one) will go out of my way to purchase his products, only to disable his protection and release them as .xex or .rom, or any easily usable format.

 

I am tired of this nonsense. Quit being paranoid about piracy.  That just makes it a better challenge to see who can pirate your stuff.

 

Politically incorrect, but absolutely correct!  Speak Freely, Vote Trump! :)

 

Edit: By the way, peteym5, you never know who purchased your product and released it if we all share dumps privately. That makes it easy to find out where the serial number and protection is.  Even if compressed, your work will be pirated!

 

Have a nice day :)


Edited by Kyle22, Wed Dec 30, 2015 1:01 AM.


#18 snicklin OFFLINE  

snicklin

    River Patroller

  • 2,146 posts
  • Location:Australia

Posted Wed Dec 30, 2015 1:21 AM

Perhaps Pete is looking to do just that.

 

I'd rather that we have people creating games (commercial or not) for the platform, whether I like the way that they release the product or not.

 

And as for voting for a Trump!! :)



#19 Rybags ONLINE  

Rybags

    Quadrunner

  • 15,855 posts
  • Location:Australia

Posted Wed Dec 30, 2015 2:03 AM

It could well be that the intent is for emulator only code, which would allow trial versions on PC but not the real hardware.

 

Certain anomolies likely aren't necessarily reproduced in emulation, that's large part of the reasoning for Avery's Acid800 tests.

 

- Pokey's RANDOM and keycode readings when in INIT state and while returning to normal operation.

- "On demand" SEROC IRQ which isn't reproduced properly by all emulators.

 

- GTIA exploit to have a PM object remain showing for the entire display.

- GTIA behaviour when reloading shift register when a PM object is repositioned but still displaying (ORed, not simply loaded).



#20 Rybags ONLINE  

Rybags

    Quadrunner

  • 15,855 posts
  • Location:Australia

Posted Wed Dec 30, 2015 2:19 AM

Actually, I have a method which I'm almost certain will be 100% accurate.  Relies on something probably not covered in any existing emulator.



#21 Mclaneinc OFFLINE  

Mclaneinc

    Quadrunner

  • 6,061 posts
  • Location:Northolt, UK

Posted Wed Dec 30, 2015 2:59 AM

Is this for "quality control" or to prevent software from running in an emulator.  Rhetorical question of course.

 

Yup, a see through lie.....There's the old attitude again...

 

No one begrudges a person protecting their software but at least be honest about it and don't invent some nonsense about an emulator issue, it just puts you off his work which is a shame because most of what I've seen running is very nice.


Edited by Mclaneinc, Wed Dec 30, 2015 3:19 AM.


#22 Mclaneinc OFFLINE  

Mclaneinc

    Quadrunner

  • 6,061 posts
  • Location:Northolt, UK

Posted Wed Dec 30, 2015 3:36 AM

I can't work out the thought process at Peteym HQ, lets insult the customers ahead of time and call them pirates, lets make a cock and bull story about emulator issues when anyone with half a brain (well I have a 3rd of a Brain and saw it) can see what this thread is about but most importantly he's almost begrudging about people owning the software?

 

But the facts are, anything that can be read can be disassembled and hacked, a seriously talented person could remove any protection, I mean we are talking about a 40yr old system that has had 40yrs of protection attempts that were all defeated over time so is it so important to make a big thing of the protection?

 

Petey, you seem to have missed the whole point of the community, we look after our own, people's paid software has never appeared on sites because even those with the skill to dump it either don't do it or don't spread it because of the respect for the developer, you have to remember that the respect goes both ways, your attitude really grates with people about certain topics as seen by Kyles angry post, its just anger over the paranoid attitude against people who HAVE purchased your stuff.

 

Protect as much as you like but keep it quiet please, telling us how much you want to protect your software simply prolongs this air of paranoia and distrust, in simple business ideals, its stupid...

 

Paul.


Edited by Mclaneinc, Wed Dec 30, 2015 3:38 AM.


#23 Madi OFFLINE  

Madi

    Moonsweeper

  • 383 posts

Posted Wed Dec 30, 2015 4:28 AM

Madi’s mentality:

 

By the time "Parasites" are able to break the protection of my Software Gems, the sale target will be accomplished. The “PIRATES” may finally defeat the protection, but I would have milked the sales to the last possible penny (win/win). Possible scenario?  :-D

 

Fact:  Every one has the right to protect his/her work  against illegal misuse/abuse.

 

madi


Edited by Madi, Wed Dec 30, 2015 4:29 AM.


#24 Rybags ONLINE  

Rybags

    Quadrunner

  • 15,855 posts
  • Location:Australia

Posted Wed Dec 30, 2015 4:40 AM

My suggestion about limiting software to work on emulation only - invent a hypothetical banked cartridge scheme that would be hard or expensive to reproduce in real hardware.

e.g. have 2 banking registers that have to be written to at addresses which aren't simply decoded like $A123 and $BFE8.

Have the cartridge otherwise functionally identical to an existing one WRT where banks are mapped etc.

Then a "demo" emulation only version could be released which won't work on a real cartridge or real machine.

 

But still it'd require the support of emulator developers which we already know isn't really there.



#25 Mclaneinc OFFLINE  

Mclaneinc

    Quadrunner

  • 6,061 posts
  • Location:Northolt, UK

Posted Wed Dec 30, 2015 5:38 AM

Madi’s mentality:

 

By the time "Parasites" are able to break the protection of my Software Gems, the sale target will be accomplished. The “PIRATES” may finally defeat the protection, but I would have milked the sales to the last possible penny (win/win). Possible scenario?  :-D

 

Fact:  Every one has the right to protect his/her work  against illegal misuse/abuse.

 

madi

 

Perhaps Peteym should start every reply "I know you are only here to rip me off" because that's how it comes across...

 

A unique selling point, but not in a good way...

 

Petey, over load the games with protection but do it quietly, concentrate on the selling point...Bored of being labelled a parasite, even posted a pic of me holding a genuine Venture packaged cart with a message to Sal to prove it was me....'Nuff said...






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users