How do you identify the machine?

8 posts / 0 new
Last post
Hans
Hans's picture
Offline
Last seen: 1 month 1 week 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: 1 month 5 days ago
Joined: 2009-05-03 16:54
Maybe an easy way, without
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: 1 month 1 week ago
Joined: 2010-12-09 22:04
I don't think that the
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
http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more. Home of the RadeonHD driver for Amiga OS 4.x project. http://keasigmadelta.co.nz/ - more of my software.
Hans
Hans's picture
Offline
Last seen: 1 month 1 week ago
Joined: 2010-12-09 22:04
Partially answering myself,
Partially answering myself, there's a GetMachineInfo() function in expansion.library, and GetCPUInfo in exec.library. Hans
http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more. Home of the RadeonHD driver for Amiga OS 4.x project. http://keasigmadelta.co.nz/ - more of my software.
walkero
walkero's picture
Offline
Last seen: 1 month 5 days ago
Joined: 2009-05-03 16:54
So, did you try the
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: 1 month 1 week 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: 1 month 1 week ago
Joined: 2010-12-09 22:04
@walkero As Rigo said, it
@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
http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more. Home of the RadeonHD driver for Amiga OS 4.x project. http://keasigmadelta.co.nz/ - more of my software.
walkero
walkero's picture
Offline
Last seen: 1 month 5 days ago
Joined: 2009-05-03 16:54
It would be great if you
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