possible to tell if running on emulator ?
possible to tell if running on emulator ?
is there a way to tell from within a running program if we are running on an emulator or real hardware ?
regards Andy
regards Andy
what's that Smell.... smells like fresh flux and solder fumes...
Re: possible to tell if running on emulator ?
If an emulator is well coded you can't.
Only when the hardware is not well emulated you might have a wrong read from i.e. not connected hardware.
Like the ZX Spectrum emulator on the SAM coupe that reads BASIC IN from the SAM and without fix would return a value that is not available on any ZX Spectrum.
Only when the hardware is not well emulated you might have a wrong read from i.e. not connected hardware.
Like the ZX Spectrum emulator on the SAM coupe that reads BASIC IN from the SAM and without fix would return a value that is not available on any ZX Spectrum.
Re: possible to tell if running on emulator ?
+1 Dr. Beep. IO is the usual way.
10 PRINT "IO IO IS THIS RUNNING IN AN EMULATOR?"
20 INPUT A$
30 IF A$ = "YES" THEN EMULATOR = 1
10 PRINT "IO IO IS THIS RUNNING IN AN EMULATOR?"
20 INPUT A$
30 IF A$ = "YES" THEN EMULATOR = 1
Re: possible to tell if running on emulator ?
![Laughing :lol:](./images/smilies/icon_lol.gif)
![Laughing :lol:](./images/smilies/icon_lol.gif)
![Laughing :lol:](./images/smilies/icon_lol.gif)
I had actually considered asking the user such a question....
Then i remembered the monkey
![Mr. Green :mrgreen:](./images/smilies/icon_mrgreen.gif)
what's that Smell.... smells like fresh flux and solder fumes...
Re: possible to tell if running on emulator ?
Well,
EightyOne has the vars-last-byte-bug, but then again your code would not load on real machine.
EightyOne has the vars-last-byte-bug, but then again your code would not load on real machine.
- 1024MAK
- Posts: 5118
- Joined: Mon Sep 26, 2011 10:56 am
- Location: Looking forward to summer in Somerset, UK...
Re: possible to tell if running on emulator ?
Simple, ask the monkey sorry user to press [CONTROL]+[ALT]+[DELETE] or if they can't find the those keys, instead press [NEW LINE] ![Razz :P](./images/smilies/icon_razz.gif)
Mark
![Razz :P](./images/smilies/icon_razz.gif)
Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp
Standby alert ![Exclamation :!:](./images/smilies/icon_exclaim.gif)
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Looking forward to summer later in the year.
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp
![Exclamation :!:](./images/smilies/icon_exclaim.gif)
![Exclamation :!:](./images/smilies/icon_exclaim.gif)
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
![Exclamation :!:](./images/smilies/icon_exclaim.gif)
Looking forward to summer later in the year.
Re: possible to tell if running on emulator ?
You can tell if you're running on EO by using OUT (1) and IN (1) which returns you a config byte.
So
would give you 0x85.
Code: Select all
switch(Address&255)
{
case 0x01:
{
char *config;
config=(char *)(&zx81);
return(config[configbyte]);
}
...
typedef struct config
{
CFGBYTE emuid, major,minor,testver;
Code: Select all
XOR A
OUT (1),a
IN a,(1)
Re: possible to tell if running on emulator ?
That's only EO though. I doubt such back doors exist for other emulators.
Re: possible to tell if running on emulator ?
Cool...
what's that Smell.... smells like fresh flux and solder fumes...