English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. C/C++

 
 
Thread Tools
Old 22 October 2017, 11:19   #1
Steffest
Registered User
 
Join Date: Jan 2017
Location: Antwerp / Belgium
Posts: 189
Detect AGA

Hey!
I'm an experienced webdeveloper but totally new to C.
As an educational project I want to create a (simple) game that compiles from the same source from Amiga kickstart 1.3 to kickstart 3.1 and beyond to other platforms like modern webbrowsers, scaling up things like colors and sprite-sizes depending on the host capabilities.

My question: How do you detect what features like AGA are present on the host?
Is it just a matter of trying to open a library using IExec->OpenLibrary starting from version 50 going up until one works?

As a non-C guy, this looks a bit weird to me.
Are there any other methods?

Thanks!
Steffest is offline  
Old 22 October 2017, 11:55   #2
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
Quote:
Originally Posted by Steffest View Post
from Amiga kickstart 1.3 to kickstart 3.1
...
Quote:
Is it just a matter of trying to open a library using IExec->OpenLibrary starting from version 50 going up until one works?
Using the Exec-Interface (IExec) works with V50 (OS4.x) only. Do you want to support 1.3 to 3.x (M68k) or 4.x (PPC), or both?

Quote:
My question: How do you detect what features like AGA are present on the host?
Open graphics.library. Cast the returned library-pointer to "struct GfxBase *" and don't forget to include "graphics/gfxbase.h".

Now you can check GfxBase->ChipRevBits0. When GFXF_AA_ALICE is set, you are most likely running on an AGA system.

IIRC, ChipRevBits0 didn't exist before V39. So you better open graphics.library for V39. When your ROM is older then there is certainly also no AGA chipset present (first AGA Amigas had V39).
phx is offline  
Old 22 October 2017, 12:20   #3
Steffest
Registered User
 
Join Date: Jan 2017
Location: Antwerp / Belgium
Posts: 189
Aha!
Thanks phx.

Yes, I want to support 1.3 too.
GfxBase->ChipRevBits0 sounds perfect. I will try it out.

Thanks, nudges like these are super useful in this phase.
Steffest 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
Best way to detect the end of a frame? earok Coders. Blitz Basic 8 02 July 2016 20:00
How to detect AGA chipset installed from C? earok Coders. C/C++ 3 04 June 2016 02:31
Detect NTSC or PAL highpuff Coders. Asm / Hardware 14 18 March 2015 17:23
How to detect WinUAE demolition support.Apps 13 13 November 2012 11:21
'detect pixel format' Melroc support.WinUAE 2 09 December 2003 16:03

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 05:35.

Top

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