How does one detect if running on ECS or AGA?
Taken from RandyAGA.doc:
LEA $DFF000,A5
MOVE.W $7C(A5),D0 ; DeniseID or LisaID in AGA
MOVEQ #30,D2 ; Check 30 times ( prevents old denise random)
ANDI.W #%000000011111111,d0 ; low byte only
DENLOOP:
MOVE.W $7C(A5),D1 ; Denise ID (LisaID on AGA)
ANDI.W #%000000011111111,d1 ; low byte only
CMP.B d0,d1 ; same value?
BNE.S NOTAGA ; Not the same value, then OCS Denise!
DBRA D2,DENLOOP ; (THANX TO DDT/HBT FOR MULTICHECK HINT)
ORI.B #%11110000,D0 ; MASK AGA REVISION (will work on new aga)
CMPI.B #%11111000,D0 ; BIT 3=AGA (this bit will be=0 in AAA!)
BNE.S NOTAGA ; IS THE AGA CHIPSET PRESENT?
ST.B AGA ; Set the AGA flag that will be tested later
NOTAGA: ; NOT AGA, BUT IS POSSIBLE AN AAA MACHINE!!
You can find it here:
http://aminet.net/docs/misc/RandyAGA.lhax303
