> Dear All,
> Is there an easy way to test if my program is running in RISC OS in
> Virtual Acorn rather than RISC OS in native hardware ?
I suppose you might look to see if HostFS is in use, but if the machine is
just using an ADFS drive that's not too useful, and doesn't RPCEmu also have
a HostFS?
The !WinClip application has some way of issuing Windows API calls, but
presumably that only works if the user has the relevant DLL loaded.
WHy not just try whatever it is you want to know for, and see if it works?
--
Jeremy C B Nicoll - my opinions are my own.
Email sent to my from-address will be deleted. Instead, please reply
to newsre...@wingsandbeaks.org.uk replacing "nnn" by "284".
Mohsen
IIRC, there's a way to detect /some/ emulators to do with checking
whether you can read the CPUID in user mode.
(That is, checking if MRC p15, 0, r1, c0, c0, 0 (or similar) causes an
error when executed in USR: the 'real' ARMs I've tested it on /do/
give an undefined instruction exception in USR mode for that
instruction, while the emulators I've tested don't treat USR and SVC
modes differently for this instruction.)
Needless to say, this undocumented feature may have been fixed since I
last tested it. ;)
> Dear All,
> Is there an easy way to test if my program is running in RISC OS in
> Virtual Acorn rather than RISC OS in native hardware ?
Look to see if the hard disc performance is massively superior to any
RISC OS box. :)
More seriously, looking for HostFS is a good, but not fool-proof,
heuristic.
Even more seriously, why do you want to know?
B.
That's particularly the case for emulators, because they're moving targets
in the way that hardware platforms aren't. For example, VA provides the
CallWin32 API to make Windows calls. There's no particular reason why
RPCEmu on Windows can't support the same API, and if someone feels like it
they might implement that feature. So it would make much more sense to
check for that, rather than try to detect whatever version of VA has it.
So you might think you know what an emulation platform looks like, only for
the next version of the emulator to change things around. In the case of
open source emulators like RPCEmu, someone could make the change and release
it to users tomorrow. Unless you really want to track a moving target it's
easier just to check for the feature you want.
Theo
Out of interest, why do you want to know whether the program is running on
VA or not?
Theo