24 January 2014, 14:15 | #1 |
I Identify as an Ewok
Join Date: Jul 2001
Location: North Lincolnshire
Age: 45
Posts: 2,356
|
Best way of detecting the AGA chipset?
Hi. I am wondering what is the best way to detect the AGA chipset? In the howtocode page it gives this listing to detect the AGA chipset. Are there other (better) ways?
Code:
GFXB_AA_ALICE equ 2 gb_ChipRevBits0 equ $ec ; Call with a6 containing GfxBase from opened graphics.library btst #GFXB_AA_ALICE,gb_ChipRevBits0(a6) bne.s is_aa |
24 January 2014, 14:28 | #2 |
I Identify as an Ewok
Join Date: Jul 2001
Location: North Lincolnshire
Age: 45
Posts: 2,356
|
Found some more code.
That's a bit unreliable, it's better to check Agnus/Alice version... Code:
move.w $DFF004,d0 and.w #$6F00,d0 ; 0110111100000000 cmp.w #$2200,d0 ; 0010001000000000 beq.b .aga cmp.w #$2300,d0 ; 0010001100000000 .aga: seq.b ISAGA ... ... ISAGA: dc.b 0 Last edited by Steve; 24 January 2014 at 16:09. |
24 January 2014, 14:41 | #3 |
Going nowhere
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 8,986
|
Theres generally a combination of tests people do, because sometimes one check in itself won't be enough.
1). Check for 2meg of chip ram, basic configuration for AGA, but obviously doesn't stop others having it. 2). Check Kickstart version 3). Check Graphics library version 4). Check processor type Thats what I did back in the day, but obviously, later on, people started using a lot of this stuff on other Amigas, and that buggered that all up. |
24 January 2014, 15:01 | #4 |
Registered User
Join Date: Jun 2008
Location: somewhere else
Posts: 511
|
Code:
isAGA: move.w $dff07c,d0 moveq #31-1,d2 and.w #$ff,d0 check_loop: move.w $dff07C,d1 and.w #$ff,d1 cmp.b d0,d1 bne.b not_AGA dbf d2,check_loop or.b #$f0,d0 cmp.b #$f8,d0 bne.b not_AGA moveq #1,d0 rts not_AGA: moveq #0,d0 rts |
24 January 2014, 15:11 | #5 |
I Identify as an Ewok
Join Date: Jul 2001
Location: North Lincolnshire
Age: 45
Posts: 2,356
|
I think this is the code I used when I first started playing with assembler a few years ago. Its taken from the HowToCode2 guide on back2roots ftp. I remember it worked fine when I tested it on my A1200 so what is the difference between this one and the one just posted by hitchhikr? Some comments would have been nice as I'm just learning asm again from where I left off years ago.
Code:
This code will check for AGA move.w $dff07c,d0 cmp.b #$f8,d0 bne.s .notaga ; Do your funky AGA Stuff in here! .notaga Last edited by Steve; 24 January 2014 at 15:41. |
24 January 2014, 15:38 | #6 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,506
|
VPOSR (DFF004) AGA check is easiest and 100% reliable test. No extra tests needed like DENISEID/LISAID requires (because it does not exist in OCS Denise).
btw, upper byte of LISAID can be used to detect between A1200 and A4000, it is zero on A1200, non-zero on A4000. (But first check AGA using VPOSR) |
24 January 2014, 16:58 | #7 |
Registered User
Join Date: Jun 2008
Location: somewhere else
Posts: 511
|
$dff07c doesn't exist on preAGA architectures so it's supposed to return "bus noise", the routine checks it several times to be sure that it's really an AGA machine ($f8) and not just a random value.
|
24 January 2014, 20:18 | #8 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,506
|
$7c (DENISEID/LISAID) was introduced with ECS Denise. But VPOSR is still the best choice, no need for multiple tests
|
24 January 2014, 20:55 | #9 | |
Registered User
Join Date: Jun 2010
Location: PL?
Posts: 2,747
|
Quote:
http://amiga-dev.wikidot.com/hardware:vposr
|
|
24 January 2014, 21:06 | #10 | |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,506
|
Quote:
AmigaOS detects AGA by checking if bit 9 of VPOSR is set. |
|
25 January 2014, 20:42 | #11 |
I Identify as an Ewok
Join Date: Jul 2001
Location: North Lincolnshire
Age: 45
Posts: 2,356
|
Thanks for all the input. I will have a play with the VPOSR test. I am curious about this bit of code though. I have looked through the 68k instruction set but can't find a seq.b instruction anywhere. Is this a typo?
|
25 January 2014, 20:43 | #12 |
Going nowhere
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 8,986
|
Just checked by R-Type 2 AGA fix from back in the day, and I used the same method as Hitchhiker back then.... i'd forgotten!
|
25 January 2014, 20:50 | #13 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,506
|
It is most likely called Scc in documentation. cc = any condition code.
|
25 January 2014, 22:08 | #14 |
I Identify as an Ewok
Join Date: Jul 2001
Location: North Lincolnshire
Age: 45
Posts: 2,356
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Detecting ACA6x0 at startup | jimbob | support.Hardware | 18 | 08 January 2013 22:25 |
Help on detecting Amiga model from within a script | gulliver | support.Other | 5 | 11 October 2011 18:56 |
EHB sprites with AGA chipset ? | FrenchShark | Coders. General | 4 | 17 September 2009 06:37 |
GameBase not detecting WinUAE (or any emulators at all) | yoshimitsuhiro | project.MAGE | 1 | 15 March 2009 21:38 |
Does "Cycle-exact" do nothing with the AGA chipset? | fmcpma | support.WinUAE | 10 | 26 October 2006 13:11 |
|
|