![]() |
![]() |
#1 |
Unregistered User
Join Date: Sep 2012
Location: Copenhagen / DK
Age: 44
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?
|
![]() |
![]() |
#2 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,574
|
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..) |
![]() |
![]() |
#3 |
Unregistered User
Join Date: Sep 2012
Location: Copenhagen / DK
Age: 44
Posts: 4,190
|
I get an error if I put that in the beginning of my startup-sequence: 'version failed returncode 20'.
|
![]() |
![]() |
#4 |
2 contact me: email only!
Join Date: May 2001
Location: Auckland / New Zealand
Posts: 3,187
|
You'll need to add the "failat" command above the version command.
|
![]() |
![]() |
#5 |
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...
|
![]() |
![]() |
#6 |
2 contact me: email only!
Join Date: May 2001
Location: Auckland / New Zealand
Posts: 3,187
|
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).
|
![]() |
![]() |
#7 |
Registered User
Join Date: Mar 2004
Location: finland
Posts: 1,844
|
What's the highest fail - I never used higher than 21 in my s-s.
|
![]() |
![]() |
#8 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 7,032
|
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. |
![]() |
![]() |
#9 | |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 7,032
|
Quote:
Perhaps you like this small program. Run it like this: Code:
DetectUAE IF NOT WARN ACATune ... EndIF |
|
![]() |
![]() |
#10 |
Paranoid Amigoid
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 ![]() |
![]() |
![]() |
#11 |
Unregistered User
Join Date: Sep 2012
Location: Copenhagen / DK
Age: 44
Posts: 4,190
|
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. |
![]() |
![]() |
#12 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 7,032
|
|
![]() |
![]() |
#13 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,574
|
|
![]() |
![]() |
#14 |
Oldtimer
![]() Join Date: Nov 2010
Location: VXO / Sweden
Posts: 153
|
|
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
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 |
|
|