<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Thu, 22 Sep 1994 16:47:51 EST
From   : Stephen Quan <quan@...>
Subject: Re: Start up in mode 0, you ****** thing...

> Aaarrggh, as I seem to say a lot.
> 
> I've implemented mode zero screen display and got it updating every 20k 
> instructions (yes, I know that's wrong...). Well, it work okayish. I've 
> also got rid of my no-writing-to-Sheila idea, which appeared to make 
> little difference.

You really have to emulate some of Sheila.

This means trapping read requests or write requests to the sheila and
doing the appropriate action, rather than a straight memory read or write.
For instance, writing a byte to FE30 (the paging register), you actually
have to store in memory that (byte And 15), since the paging register can
only take values between 0..15.  Also, when you do change the paging
register, the appropriate 16K ROM gets copied (or mapped) into 8000-BFFF.

> However, I have a problem. If I clear *all* the BBC memory on bootup, my 
> BBC attempts to go into mode 7; not much use. If I set all the VIA 
> memory in Sheila to 1, it goes into mode 4 or something (one of the ones 
> with &5800 start address) and reports "BBC Computer" (no memory, 
> apparently!) then "Searching" as if it's jumped into the ROM FS.

Hmmm..  I had mine trundling off to mode 0 when I did that.  The root cause
of this is when the 6502 is reading your keyboard.  (It does this by writing
0x8 + 0x3 = 11 to FE42).  Check the manual on System VIA ORB.  Once 11 is in
FE42, FE4D FE4E FE4F will return information about the keyboard and the
keyboard interrupt, and the BBC default mode is in there.

> A) How can I get it to think it's in mode zero
> B) Why does it not report 16/32K?

One of the thing that's is read back from the keyboard is the status of
the CTRL and the SHIFT key which (I think) affects the 16/32K message.
The SHIFT key (I am sure) will determine whether it tries to autoboot
your disk, and there is other bits it reads to determine the screen
mode it goes onto, after a reset.  I have been staring at appendix J
(I have quite an old version of the AUG), till my brains fell out!

> Any help on either of these would be much appreciated...

Again, checkout the AUG, and lookup

   FE30   (Paging ROMs)
   FE40   (System VIA DDRB)
   FE41   (System VIA DDRA)
   FE4D   (System VIA ???)
   FE4E   (System VIA ???)
   FE4F   (System VIA IRAnh)

Well, I am sure the James and others with working emulators know more
detail here.  With the ??? one of them is a interrupt flag register,
and the other is an interrupt enable register, but I don't recall which
is which at the moment.
-- 
Stephen Quan (quan@...                 ), SysAdmin, Analyst/Programmer.
Centre for Spatial Information Studies, University of Tasmania, Hobart.
GPO BOX 252C, Australia, 7001.  Local Tel: (002) 202898 Fax: (002) 240282
International Callers use +6102 instead of (002).
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>