Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Testing for Virtual Acorn

2 views
Skip to first unread message

Martin Hansen

unread,
Feb 22, 2009, 1:58:43 AM2/22/09
to
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 ?
Regards,
Martin

http://www.MathMagical.co.uk

http://www.RISCOScode.com

Jeremy Nicoll - news posts

unread,
Feb 22, 2009, 6:55:41 PM2/22/09
to
Martin Hansen <m...@shrewsbury.org.uk> wrote:

> 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

unread,
Feb 25, 2009, 8:13:30 PM2/25/09
to
If you could tell the difference then it wouldn't be
a good emulator :-)

Mohsen

matthew....@gmail.com

unread,
Feb 26, 2009, 3:19:14 AM2/26/09
to
On Feb 22, 6:58 am, Martin Hansen <m...@shrewsbury.org.uk> wrote:
> 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 ?
> Regards,
> Martin

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. ;)

Rob Kendrick

unread,
Feb 26, 2009, 4:18:33 AM2/26/09
to
On Sat, 21 Feb 2009 22:58:43 -0800 (PST)
Martin Hansen <m...@shrewsbury.org.uk> wrote:

> 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.

Theo Markettos

unread,
Feb 26, 2009, 8:24:06 AM2/26/09
to
Jeremy Nicoll - news posts <jn.nntp....@wingsandbeaks.org.uk> wrote:
> WHy not just try whatever it is you want to know for, and see if it works?

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

Martin Hansen

unread,
Mar 16, 2009, 5:20:34 PM3/16/09
to
Dear All,
Thanks for the replies.
Got it sorted - decided to get the program to simply ask the user via
an option in a "choices" menu.
Regards,
Martin.

http://www.MathMagical.co.uk

http://www.RISCOScode.com

Theo Markettos

unread,
Mar 17, 2009, 1:47:56 PM3/17/09
to
Martin Hansen <m...@shrewsbury.org.uk> wrote:
> Dear All,
> Thanks for the replies.
> Got it sorted - decided to get the program to simply ask the user via
> an option in a "choices" menu.

Out of interest, why do you want to know whether the program is running on
VA or not?

Theo

0 new messages