English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 29 December 2022, 20:46   #1
KONEY
OctaMED Music Composer
 
KONEY's Avatar
 
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 670
Floppy disk Detect A500 Mini environment

Hi guys!


I'm wondering if any trick exists to detect when code is being run on A500 Mini...?


Thanks
KONEY is offline  
Old 01 January 2023, 11:42   #2
Twiggy
\m/
 
Twiggy's Avatar
 
Join Date: Nov 2008
Location: Devon, U.K.
Posts: 573
Hi,

I wonder whether this solution would work?

https://eab.abime.net/showthread.php?t=66606
Twiggy is offline  
Old 05 January 2023, 18:07   #3
KONEY
OctaMED Music Composer
 
KONEY's Avatar
 
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 670
This would detect a UAE environment but not specifically an Amiga Mini one?
KONEY is offline  
Old 05 January 2023, 19:34   #4
mrv2k
Registered User
 
Join Date: Apr 2020
Location: England
Age: 53
Posts: 436
I just tested detectuae on my a500 mini and it worked fine. The a500 mini uses Amiberry 3.3 which is based on UAE so accepts commands like uae-configuration etc...
mrv2k is offline  
Old 05 January 2023, 20:53   #5
KONEY
OctaMED Music Composer
 
KONEY's Avatar
 
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 670
but it's not specific to A500 mini, correct?
KONEY is offline  
Old 05 January 2023, 21:21   #6
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,169
Why do you want to detect the a500 mini exactly? Unless they provide an official way of detection you're bound to get false negatives/positives now or in the future. If you want to check if e.g. a 3 button controller is available (or whatever) check for that directly.

If it's just for yourself then you could probably measure the execution time of a specific set of instructions and see if that's in some predefined time range (in addition to checking if you're running emulated).
paraj is offline  
Old 05 January 2023, 22:14   #7
KONEY
OctaMED Music Composer
 
KONEY's Avatar
 
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 670
For the same reasons one would want to detect UAE: to make some code run better or not at all.

Checking for timings could be one way but it's a bit too generic as a solution. I was asking if something similar to the UAE check but specific for mini was already available.

I'm not sure what "just for yourself" is supposed to mean. I'm also confused about the official way of detection, is checking for uaehf.device official?
KONEY is offline  
Old 06 January 2023, 11:11   #8
DisasterIncarna
Registered User
 
DisasterIncarna's Avatar
 
Join Date: Oct 2021
Location: England
Posts: 1,221
the mini is just a pi3 variant running an emulator anyways so detecting UAE is kinda the right way to go about it.
DisasterIncarna is offline  
Old 06 January 2023, 11:32   #9
KONEY
OctaMED Music Composer
 
KONEY's Avatar
 
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 670
OK, kinda right but not specific. I mean, you can tell it's not real hardware only, not if it's a mini.
KONEY is offline  
Old 06 January 2023, 11:47   #10
kriz
Junior Member
 
kriz's Avatar
 
Join Date: Sep 2001
Location: No(R)Way
Age: 42
Posts: 3,215
Well the mini is just running an emulator...
kriz is offline  
Old 06 January 2023, 11:57   #11
KONEY
OctaMED Music Composer
 
KONEY's Avatar
 
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 670
The core of the question was if there was a way to detect it specifically, reckoning there isn't one from the simple fact it's an emulator itself isn't a very tech approach to the question.
KONEY is offline  
Old 06 January 2023, 12:13   #12
alexh
Thalion Webshrine
 
alexh's Avatar
 
Join Date: Jan 2004
Location: Oxford
Posts: 14,414
The answer is no you can't detect A500 Mini from other UAE based devices. Not unless they change(d) the emulator. I mean they could have if they had wanted to. But I very much doubt they did.
alexh is online now  
Old 06 January 2023, 12:27   #13
KONEY
OctaMED Music Composer
 
KONEY's Avatar
 
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 670
Thanks Alexh, for the answer and for not dodging the question
KONEY is offline  
Old 06 January 2023, 18:51   #14
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,169
Quote:
Originally Posted by KONEY View Post
For the same reasons one would want to detect UAE: to make some code run better or not at all.

Checking for timings could be one way but it's a bit too generic as a solution. I was asking if something similar to the UAE check but specific for mini was already available.

I'm not sure what "just for yourself" is supposed to mean. I'm also confused about the official way of detection, is checking for uaehf.device official?
My reason for asking is that if it's just for yourself is that you can query WinUAE various things (e.g. which version it's running/paths of disks inserted), so if you just want a quick check in your program to see if you're running on your PC or a500 mini that can probably be done very easily, but it would not work in general.

Wasn't trying to be dismissive of the question, but usually it's better to rephrase it. If you have code that's better on an a500 mini why not run it if it's an amiberry with similar specs?

For example: Instead of say detecting a 68030 processor and then using a specific C2P routine, maybe it's better to time the generic function vs. the 030 specific one and selecting the best performing one instead of just checking AttnFlags. Or if you want to select keyboard input as the default for WinUAE on your PC but not on your a500 mini, check if there's a good controller connected instead.
paraj is offline  
Old 06 January 2023, 19:21   #15
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,540
Trying to detect emulation is generally not very good idea because there can be dozens of different configurations and some of them does not even have any "UAE" devices. Trying to detect these can break in any version.
Toni Wilen is online now  
Old 06 January 2023, 19:24   #16
Galahad/FLT
Going nowhere
 
Galahad/FLT's Avatar
 
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 9,014
One way to detect for emulation that is usually 100% effective is disk loading timing.

Because WinUAE and other emulators are usually accurate when it comes to loading via ADF, usually people ramp up the floppy loading speed.

Absolutely easy to detect this on emulated, A500 Mini and real Amiga.
Galahad/FLT is offline  
Old 06 January 2023, 20:02   #17
alexh
Thalion Webshrine
 
alexh's Avatar
 
Join Date: Jan 2004
Location: Oxford
Posts: 14,414
There are lots of other ways. Chip RAM or blitter speeds. But non will detect A500 mini against say RPi running UAE
alexh is online now  
Old 06 January 2023, 22:03   #18
malko
Ex nihilo nihil
 
malko's Avatar
 
Join Date: Oct 2017
Location: CH
Posts: 4,959
Quote:
Originally Posted by Galahad/FLT View Post
One way to detect for emulation that is usually 100% effective is disk loading timing.

Because WinUAE and other emulators are usually accurate when it comes to loading via ADF, usually people ramp up the floppy loading speed.

Absolutely easy to detect this on emulated, A500 Mini and real Amiga.

So I am on the safe side as I leave this settings alone (real speed) .

By the way, I don't get the point from OP to try to determine if a program is run from an emulator or from real hardware...
malko is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
A500 Mini Marmo Retrogaming General Discussion 9 25 May 2023 12:46
A500 mini with modem? Ghost64 support.Other 2 18 August 2022 00:56
A500 Mini - A500 LED trigger AdyJ66 support.Hardware 0 30 June 2022 18:16
Yet ANOTHER A500 Mini Review... BUT... EmuChicken Amiga scene 0 23 April 2022 12:09
A500 Mini - Ambermoon Fenris project.WHDLoad 2 15 April 2022 20:54

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 17:09.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.09762 seconds with 15 queries