English Amiga Board


Go Back   English Amiga Board > Support > support.Apps

 
 
Thread Tools
Old 11 November 2012, 15:57   #1
demolition
Unregistered User
 
demolition's Avatar
 
Join Date: Sep 2012
Location: Copenhagen / DK
Age: 43
Posts: 4,190
How to detect WinUAE

Whenever I move my CF card from the Amiga to WinUAE, I have to comment out the ACATune line in S-S, as it will not boot otherwise. Is there a way to detect WinUAE and only run acatune in case it is running on a real Amiga?
demolition is offline  
Old 11 November 2012, 17:17   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,516
Something like this should work:

version >nil: uaehf.device 1
if warn
; no uaehf.device found
endif

(do not attempt to use any side-effect to detect emulation, it will break someday..)
Toni Wilen is offline  
Old 11 November 2012, 23:22   #3
demolition
Unregistered User
 
demolition's Avatar
 
Join Date: Sep 2012
Location: Copenhagen / DK
Age: 43
Posts: 4,190
I get an error if I put that in the beginning of my startup-sequence: 'version failed returncode 20'.
demolition is offline  
Old 12 November 2012, 01:29   #4
Codetapper
2 contact me: email only!
 
Codetapper's Avatar
 
Join Date: May 2001
Location: Auckland / New Zealand
Posts: 3,182
You'll need to add the "failat" command above the version command.
Codetapper is offline  
Old 12 November 2012, 04:10   #5
Mr B
Registered User
 
Join Date: Nov 2005
Location: Sweden
Posts: 749
*shrugs* i haven't been able to incorporate this, but then again, i fail to grasp the most about the Amiga...
Mr B is offline  
Old 12 November 2012, 05:03   #6
Codetapper
2 contact me: email only!
 
Codetapper's Avatar
 
Join Date: May 2001
Location: Auckland / New Zealand
Posts: 3,182
Add "failat 200" to the top of your script, ensure failat is in your c: path (with WB2.x+ it may already be in ROM) and it should work fine! (It just means that an error of 200 or higher is required to break your script).
Codetapper is offline  
Old 12 November 2012, 16:52   #7
zipper
Registered User
 
Join Date: Mar 2004
Location: finland
Posts: 1,838
What's the highest fail - I never used higher than 21 in my s-s.
zipper is offline  
Old 12 November 2012, 17:17   #8
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 7,001
OK = 0
WARN = 5
ERROR = 10
FAIL = 20

These are the defined return values. A bad program might return anything between 0 and 4294967295, though.
thomas is offline  
Old 12 November 2012, 17:30   #9
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 7,001
Quote:
Originally Posted by demolition View Post
Whenever I move my CF card from the Amiga to WinUAE, I have to comment out the ACATune line in S-S, as it will not boot otherwise. Is there a way to detect WinUAE and only run acatune in case it is running on a real Amiga?

Perhaps you like this small program.

Run it like this:

Code:
DetectUAE
IF NOT WARN
   ACATune ...
EndIF
Attached Files
File Type: lha DetectUAE.lha (491 Bytes, 261 views)
thomas is offline  
Old 12 November 2012, 18:16   #10
mfilos
Paranoid Amigoid
 
mfilos's Avatar
 
Join Date: Mar 2008
Location: Athens/Greece
Age: 45
Posts: 1,978
Thanks a lot Thomas mate.
I was seeking a solution like this as well, since ACATune nowadays, report that it found the board (ACA1230@28 if chipset=AGA or ACA620@25 if chipset<>AGA) even if it doesn't exist = WinUAE.

This solved the problem once and for all
mfilos is offline  
Old 12 November 2012, 19:29   #11
demolition
Unregistered User
 
demolition's Avatar
 
Join Date: Sep 2012
Location: Copenhagen / DK
Age: 43
Posts: 4,190
Quote:
Originally Posted by thomas View Post
Perhaps you like this small program.
How does it work? Also by detecting if uaehf.device exist?

Edit: And thanks Codetapper, it now works as it's supposed to.
For reference, the S-S part looks like this:
Code:
failat 200
version >nil: uaehf.device 1
if warn
  acatune -maprom devs:kickstarts/kick40068.a1200 >nil:
endif

Last edited by demolition; 12 November 2012 at 19:38.
demolition is offline  
Old 12 November 2012, 21:31   #12
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 7,001
Quote:
Originally Posted by demolition View Post
How does it work? Also by detecting if uaehf.device exist?
It checks if any hardware with vendor ID 2011 is in the system.
thomas is offline  
Old 13 November 2012, 10:56   #13
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,516
Quote:
Originally Posted by thomas View Post
It checks if any hardware with vendor ID 2011 is in the system.
There is no guarantee it stays the same in future. It probably does but it still isn't guaranteed Nothing outside of emulation needs to directly access emulated boards.
Toni Wilen is offline  
Old 13 November 2012, 11:21   #14
Geijer
Oldtimer
 
Geijer's Avatar
 
Join Date: Nov 2010
Location: VXO / Sweden
Posts: 153
Quote:
Originally Posted by thomas View Post
It checks if any hardware with vendor ID 2011 is in the system.
Manufacturer (vendor ID) 2011 is reserved for "Hackers" like prototypes and developer boards so that is not unique for WinUAE!
Geijer 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
WinUAE won't detect roms in main folder Maren support.WinUAE 11 01 October 2010 10:39
Is winuae able to detect emulated (Amiga) output resolution? ceztko support.WinUAE 5 11 March 2007 23:36
WinUAE 1.3 does not detect my Amiga 2.5" IDE HDD gizmomelb support.WinUAE 2 18 July 2006 14:46
WinUAE doesn't detect joystick button (via ppjoy) oldpx support.WinUAE 16 15 July 2004 22:42
WinUAE won't detect written CD³² CDs MethodGit support.WinUAE 34 04 April 2003 22:41

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 07:52.

Top

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