<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Mon, 18 Jul 1994 19:00:44 +0100
From   : jfid@... (James Fidell)
Subject: Re: benchmarks

Chris Rae wrote:

> > It depends somewhat on how you're emulating the keyboard etc., but you
> > probably need to get some of the system VIA done, bits of the CRTC and
> > video ULA and ignore the reset of memory-mapped IO.  If you want to
> > see the prompt, you're obviously going to have to implement some
> > sort of screen IO too.
> 
> Oh dear... I've got a basic mode 0 screen mapping system going though.

What you could do is implement enough of the VIA to do keyboard scanning.
Then you'd be able to force the OS to power up into MODE 1.

The AUG lists what values are stored in the CRTC and VIA registers for each
MODE, so you could trap these and exit if they don't match the values you
expect to see for MODE 1.

> > You'll also need to deal with the paged ROM select switch.
> 
> Not too bad.
> 
> > [ As an afterthought, the reason you need some sort of keyboard emulation
> > is because the OS scans the keyboard for pressed keys (eg, shift and ctrl)
> > and also the power-up option DIP switches.  If you get these wrong, weird
> > things can start happening when you're implementation is otherwise OK.
> 
> Doesn't it go beeb as well? What about that? I suddenly thought of that 
> in bed last night. Anyway, it doesn't really matter to me at the moment 
> because I can't load the OS in anyway due to my inability to allocate 
> 65536 bytes of memory...

Sound is also handled via the system VIA.  As I remember, there's a
two-tone beep on start-up.  I think that the first tone is when the VIA
is initialised and the second is done by the OS as an indication of a
power-up reset.

You should be able to ignore sound though.  What happens with the system
VIA is that port A can potentially be connected to several different
IO devices, each of which has a (negative logic) ENABLE line.  The lower
3 bits of port B on the system VIA control which device is enabled or
disabled.  The ENABLE bit is modified by changing the value of bit 3
of port B.

The outcome of all of this is that to get the keyboard working, you
only need to worry about sorting out what keys are pressed when the
lower 4 bits of port B are 0011 (the keyboard is device 3 and it's
a negative logic ENABLE line).

The meanings of the 8 different values of the lower 3 bits of port B
are :

    000  sound chip write enable
    001  speech processor read enable
    010  speech processor write enable
    011  keyboard write enable
    100  screen size for hardware scrolling (hi bit)
    101  screen size for hardware scrolling (lo bit)
    110  CAPS LOCK LED
    111  SHIFT LOCK LED

If you have a MODE 1 scrolling screen then you'll need to implement the
screen size stuff as well, I would have thought, because this is how
the hardware knows the amount of memory allocated to the screen so that
it can wrap back to the correct address when it reaches the end of RAM.

James.

-- 
 "Yield to temptation --             |
  it may not pass your way again"    |     jfid@...        
                                     |
        - Lazarus Long               |              James Fidell
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>