Dave wrote:On the subject of detecting CPU, is there a method of detecting the currently used bus width by the OS? The CPU does this transparently to the OS, so is there a way for it to find out?
Nope, at least not intrinsically. That is transparent to code running on the CPU.
In case you have no CPU cache and relatively accurate timers, you can do a series of .B, .W and .L memory transfers in a tight loop. In case all 3 have roughly the same timing, you are on a 32-bit bus. If .B and .W is the same, it's a 16-bit bus, and if .B is fastest, you apparently are on an 8-bit architecture. Note this is also different between the CPUs of the 68k family.
And, obviously, any further complications like cycle stealing from peripherals or otherwise contended memory might further complicate matters.
Tobias