[Rpcemu] An idle loop?

Johann "Myrkraverk" Oskarsson johann at myrkraverk.com
Sun Jan 31 11:28:56 PST 2010

On Sun, Jan 31, 2010 at 5:18 PM, Theo Markettos <rpcemu at markettos.org.uk> wrote:
> On Sun, Jan 31, 2010 at 05:35:57AM +0000, Johann Myrkraverk Oskarsson wrote:

>> Perhaps better granularity can be achieved by calling nanosleep where available?

> I'm not sure that's the problem... the problem is something to do with
> mouse/button presses getting lost while the emulator is sleeping.  RISC OS
> only has a centisecond timer, so it shouldn't be affected by
> microsecond-scale sleeps.  It stalls for IO, so they should be expected
> anyway.  I think it's a problem with the emulator missing things rather than
> the OS.

Of course.  I guess *the* way to do this is to have the emulator and
gui in different threads.  Then the gui can wake up the emulator if
sleeping, when there is an event.

And before everyone shouts "too complex," when there is more than one
way of doing things I like the eXtreme Programming way: Do them all,
and measure.

> The Portable module is documented on page 4-205, in other words page 205 of
> PRM4.pdf

Thank you, at least I have some bed time reading now ;)

> The simplest way might be to receive the calls to Portable_Speed in the
> emulator and convert them to cause more or fewer sleep calls.

> That would be a less clumsy way of doing things than the Sleep program,
> though it needs to not miss UI input.  Possibly running variable amounts of
> system load might be one way to simulate this problem.

Hmm, what do you mean by variable amounts of system load?  On the
guest (risc os) or the host?


More information about the Rpcemu mailing list