News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_HAL6128

Emulator detection

Started by HAL6128, 21:25, 29 September 15

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

HAL6128

Just a quick question:
I need a emulator detection for an application. I've read in the Wiki the possibility to read out port &FEFE: if the returning value is different to &FF (= real CPC) then it's an emulator. But some emulators (like WinApe, Caprice) return the same value like a real CPC.
Is there a better way to detect if an application works (or not) inside an emulator?

Thanks.
HAL6128
...proudly supported Schnapps Demo, Pentomino and NQ-Music-Disc with GFX

andycadley

I'd say pretty much any "reliable" emulator detection is a bug.

Zoe Robinson

Surely the point of any emulator is to emulate the original hardware, so it would return any value the actual CPC would return?

arnoldemu

Quote from: Zoe Robinson on 23:21, 29 September 15
Surely the point of any emulator is to emulate the original hardware, so it would return any value the actual CPC would return?
exactly!
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

arnoldemu

Quote from: HAL 6128 on 21:25, 29 September 15
Just a quick question:
I need a emulator detection for an application. I've read in the Wiki the possibility to read out port &FEFE: if the returning value is different to &FF (= real CPC) then it's an emulator. But some emulators (like WinApe, Caprice) return the same value like a real CPC.
Is there a better way to detect if an application works (or not) inside an emulator?

Thanks.
HAL6128


My question:  What are you doing that doesn't work on emulators?

If you would share the code with me I can make sure my emulator works with your code and that I can tell other people how to make their emulators work better too :)
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

AMSDOS

Sprites Alive sets a New Frame Flyback Event Block (&BCD7) if you used that (along with the New Frame Flyback Event Block) then do a OUT &7F00,&C4, the next bit of code following that could simply state emulator.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

TotO

A way to detect emulators is to check the FDC count.
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

arnoldemu

Quote from: TotO on 10:31, 30 September 15
A way to detect emulators is to check the FDC count.
fdc count?

fdc timings?
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

TotO

#8
The RPM is around 300 on a real CPC, but never return the same value.
Just knowing that allow to said witch emulator is running...

Best, on a 3" floppy the RPM decrease on each track from 0 to 39 (40, 41) because the belt...
On a 3"1/2 floppy, the value don't change so much. (on HxC too)

Last year, I have made a little program showing that, if you remember my screenshot showing all emulators detected?
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Bryce

Quote from: TotO on 13:21, 30 September 15
Best, on a 3" floppy the RPM decrease on each track from 0 to 39 (40, 41) because the belt...

How does the belt and track number have any relation to the RPM??

Bryce.

Lazy Dude

That's a belter of a question.

I'd like to say that all the emulators I have tried in 464 mode always have a virtual disc drive attached, there is no option to 'disconnect'  this and have a standard 464.

TotO

Quote from: Bryce on 13:29, 30 September 15
How does the belt and track number have any relation to the RPM.
The belt allow the floppy to turn, but it is flexible and vagueness.
Depending if you are inside or outside the disc, this gap is more or less important and you never got the same RPM speed on a same track.
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

TotO

Quote from: Lazy Dude on 13:36, 30 September 15
That's a belter of a question.

I'd like to say that all the emulators I have tried in 464 mode always have a virtual disc drive attached, there is no option to 'disconnect'  this and have a standard 464.
And a virtual PAL attached too... The memory is not properly handled for a 464.
As I know, only SugarBox handle all those things.
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Bryce

Quote from: TotO on 13:37, 30 September 15
The belt allow the floppy to turn, but it is flexible and vagueness.
Depending if you are inside or outside the disc, this gap is more or less important and you never got the same RPM speed on a same track.

Ah, now I understand what you mean = The drift is more noticeable on the outer tracks. I thought you were claiming that the speed was actually changing depending on what track you were reading.

Bryce.

TotO

Sorry, I'm tired and I have difficulty to explain things today.  :-\
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

gerald

On a 3" drive the speed is slightly changing according to the track, but this due to the head/disk contact resistance and motor torque.
Inner track (0) will spin faster than outer track (39). But the difference is in the 5 rmp range.
This should not be that visible on drive that use a direct drive like 3 1/2 drive.

arnoldemu

Quote from: TotO on 13:21, 30 September 15
The RPM is around 300 on a real CPC, but never return the same value.
Just knowing that allow to said witch emulator is running...

Best, on a 3" floppy the RPM decrease on each track from 0 to 39 (40, 41) because the belt...
On a 3"1/2 floppy, the value don't change so much. (on HxC too)

Last year, I have made a little program showing that, if you remember my screenshot showing all emulators detected?
I forgot about it :(

I understand now :)
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

arnoldemu

Quote from: TotO on 13:40, 30 September 15
And a virtual PAL attached too... The memory is not properly handled for a 464.
As I know, only SugarBox handle all those things.
So does Arnold WIP :)
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

TotO

#18
@gerald: Are you sure about the motor torque? Because, if you goes up and down into the tracks number, the RPM value shift for the same track.
On my CPC, the tests shown that is more 2RPM than 5RPM between track 0 and track 39.
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Targhan

In the Midline Process, from what I remember, I detected an emulator by getting the ID of the sector under the head, made a track seek, read the next sector, and checked that there was a difference of 2 in the ID. It was pretty reliable, but I guess emulators have improved since, so it may not be enough.
Targhan/Arkos

Arkos Tracker 2.0.1 now released! - Follow the news on Twitter!
Disark - A cross-platform Z80 disassembler/source converter
FDC Tool 1.1 - Read Amsdos files without the system

Imperial Mahjong
Orion Prime

dragon

#20
Nothing

TFM

Quote from: gerald on 14:00, 30 September 15
On a 3" drive the speed is slightly changing according to the track, but this due to the head/disk contact resistance and motor torque.
Inner track (0) will spin faster than outer track (39). But the difference is in the 5 rmp range.
This should not be that visible on drive that use a direct drive like 3 1/2 drive.


Isn't track 0 outside and track 39 inside (close to the center)?
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

gerald

Quote from: TFM on 15:39, 30 September 15

Isn't track 0 outside and track 39 inside (close to the center)?
Yes  :D :doh:

remax

Brain Radioactivity

TFM

Oh! You got a picture of my cat!  ;D
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Powered by SMFPacks Menu Editor Mod