How do you identify the machine?

8 posts / 0 new
Last post
Hans
Hans's picture
Offline
Last seen: 4 months 3 weeks ago
Joined: 2010-12-09 22:04
How do you identify the machine?

This should really be in a "Misc" forum under OS4 development, but it doesn't exist yet.

What's the easiest way to get basic details of the hardware that your app is running on? I really just need a name, e.g., "SAM 460ex", or "A1200". I'd prefer a method that doesn't require installing additional libraries, but that's not a requirement. Additional info such as how much RAM, etc. would be a bonus.

Hans

walkero
walkero's picture
Offline
Last seen: 4 months 3 weeks ago
Joined: 2009-05-03 16:54
Re: How do you identify the machine?

Maybe an easy way, without installing any library or tool, could be to check the Sys:Kickstart/kicklayout file. Maybe the variables that the user sets up there can be read by a system variable, but I don't know that part. Your program could read the file the first time it is launched and save it as an env variable.

Hans
Hans's picture
Offline
Last seen: 4 months 3 weeks ago
Joined: 2010-12-09 22:04
Re: How do you identify the machine?

I don't think that the kicklayout file is a reliable indicator of what motherboard the app is running on. Right now, using the identify.library seems to be the only choice. However, Ranger does a pretty good job of identifying the hardware, and it doesn't need the identify library.

Hans

Join the Kea Campus - upgrade your skills; support my work; enjoy the Amiga corner.
https://keasigmadelta.com/ - see more of my work

Hans
Hans's picture
Offline
Last seen: 4 months 3 weeks ago
Joined: 2010-12-09 22:04
Re: How do you identify the machine?

Partially answering myself, there's a GetMachineInfo() function in expansion.library, and GetCPUInfo in exec.library.

Hans

Join the Kea Campus - upgrade your skills; support my work; enjoy the Amiga corner.
https://keasigmadelta.com/ - see more of my work

walkero
walkero's picture
Offline
Last seen: 4 months 3 weeks ago
Joined: 2009-05-03 16:54
Re: How do you identify the machine?

So, did you try the GetMachineInfo and GetCPUInfo? What did you find out? Is it what you wanted? How do you think to use that information about the CPU?

Rigo
Rigo's picture
Offline
Last seen: 2 years 6 months ago
Joined: 2011-01-24 21:55
AmiUpdate also uses these

AmiUpdate also uses these functions to discover which platform it is running on. The functions work exactly as documented.

Simon

Hans
Hans's picture
Offline
Last seen: 4 months 3 weeks ago
Joined: 2010-12-09 22:04
Re: How do you identify the machine?

@walkero

As Rigo said, it works exactly as the Autodocs say. I now have the CPU details and the motherboard type. I'm writing a benchmark tool, and it helps to know the machine and CPU details when comparing numbers.

Hans

Join the Kea Campus - upgrade your skills; support my work; enjoy the Amiga corner.
https://keasigmadelta.com/ - see more of my work

walkero
walkero's picture
Offline
Last seen: 4 months 3 weeks ago
Joined: 2009-05-03 16:54
Re: How do you identify the machine?

It would be great if you could make it a small blog tutorial and post it here. I'm sure that in the future a few people might like to do the same thing. So what you say?

Log in or register to post comments