<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Mon, 23 Nov 2009 12:56:32 +0000
From   : mlist@... (Steven Flintham)
Subject: Is there a 65Tube-style BBC emulator available for

On Sat, 2009-11-21 at 23:20 +0100, Rick Murray wrote:
> Thus, it will max out its available CPU timeslice and never let up. In 
> this respect, a native tube emulator might be better, but on the other 
> hand won't that also sit in a loop awaiting something to happen? It 
> can't exactly stop on inactivity or else if it is running a program 
> (i.e. BASIC or something) then that would grind to a halt...?

Although I realise that my knowledge of the innards of the tube are
limited, I think stopping on inactivity can be supported at least as far
'waiting for keyboard input' counts. As I understand it, there are two
possibilities for a tube emulator:

A) Run the 'real' tube OS code, which I assume sits in a small ROM at
&F800-&FFFF in the second processor address space, on the emulator. The
emulator would need to emulate the tube interface and deal with messages
on the host side of the interface instead of having a BBC deal with
them. I suspect that the 'real' tube OS code spins in a tight loop
polling the interface when (e.g.) waiting for input, so it might be
possible to recognise that and stop the emulation until there's
something to do. This is speculation though. 

B) Don't emulate the tube interface but have the emulator recognise that
(e.g.) &FFF1 is OSWORD and if A=0 turn it into a call to GNU readline. I
think that will block nicely without chewing up CPU, as the emulation
would stop until the call returned. This is probably a less realistic
emulation, although it can probably be made 'good enough' with enough
work.

Whether I'll ever get round to even trying these to see what silly
assumptions I've made is a bit doubtful. :-)

Steve
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>