RigInfo
If you plan to use the output of this app as input to your own app, strip the first two lines of text and parse the third line. If you wish no output (black screen until WB is loaded), redirect it to NIL: as usual.
RigInfo returns a result of 0 if the CPU is a 68000, 5 (WARN) if it's not, and 20 if it fails to start or detect your hardware (should never happen). For example, use "if WARN" to conditionally run initialization commands for your accelerator only if it's running. Or only run memory-hogging commands if you have fastmem. Or use a different SetPatch for your kickstart for different CPU models.
Direct download of Riginfo here.
Use on non-Commodore Amigas/non-Motorola CPUs at your own risk :) Credits to Stingray for finding out some ExecBase bits!
Comment this post