Detecting A1200/A4000 on OS4

3 posts / 0 new
Last post
Henochius
Henochius's picture
Offline
Last seen: 1 day 8 hours ago
Joined: 2018-06-03 22:28
Detecting A1200/A4000 on OS4

Hello all, I am wondering what would be the recommended and most reliable way of detecting from C whether OS4 is running on a Classic Amiga (A1200/A4000) vs. a real NG Amiga (AmigaOne, X5000, etc.). For the purpose of performing read/writes to Classic Amiga custom chip registers if present or otherwise avoiding them.

jabirulo
jabirulo's picture
Offline
Last seen: 15 hours 12 min ago
Joined: 2013-05-30 00:53
Re: Detecting A1200/A4000 on OS4

expansion.library/GetMachineInfo

NAME
GetMachineInfo -- Get information about the current hardware (V50)

SYNOPSIS
uint32 GetMachineInfo(struct TagItem *taglist);

uint32 GetMachineInfoTags(ULONG tag1, ...);

FUNCTION
This function is used to determine the current hardware configuration,
with a focus on determining the machine you're running on.
...

  1. uint32 tmp;
  2. IExpansion->GetMachineInfoTags(GMIT_Machine,&tmp, TAG_END);
  3. if(tmp==MACHINETYPE_BLIZZARDPPC || tmp==MACHINETYPE_CYBERSTORMPPC)
  4. {
  5. DBUG(" BPPC or CPPC\n",NULL);
  6. }

AOS4.1/SAM460ex/PPC460EX-1155MHZ/2048MB/RadeonRX550/SSD240GB/DVDRW :-P

Henochius
Henochius's picture
Offline
Last seen: 1 day 8 hours ago
Joined: 2018-06-03 22:28
Re: Detecting A1200/A4000 on OS4

Many thanks jabiluro, that's exactly what was needed!

Log in or register to post comments