Date : Mon, 28 Sep 2009 22:53:07 +0100
From : dl.harper@... (David Harper)
Subject: Couple of Tube operation queries
Michael Firth wrote:
>> ...
>> I have noticed that they are named also in Watford's "Advanced Reference
>> Manual for the BBC Master", but that doesn't mention T.
>>
> Interesting. The Watford book is the only (semi) official documentation
> that
> doesn't make a differentiation between reading and writing the status
> register.
> Both the AppNote, and the 6502 Second Processor Service manual (one other
> source that describes the Tube ULA operation) talk about the behaviour
> being
> different for reading and writing.
> That said, there are several obvious clangers in the Watford book -
> referring
> to the Tube as "", which plainly isn't true, for example.
>
> I had heard that this book was actually written by Acorn, and just
> published by
> Watford - if that's true, it seems like it needed another proof-read
> before publishing!
I found a number of errors in the book, too. It is a good starting point for
how things ought to work, but you have to try them out to see whether they
do.
>> It would not be possible to read this bit, of course, because the
>> space it
>> occupies in the memory map is taken up by the "write" status bit for
>> Register 1.
>>
> Indeed. The App Note confirms that this bit is "Write Only", which means
> that
> it isn't even possible to see how it really behaves on a real Co-Pro.
> I think I won't worry about it for now, as I'm not sure its used by the
> software,
> and if the only place it might be used is after a Host reset, then it
> probably doesn't
> matter, as that action causes a Tube chip reset anyway.
It may be possible to experiment with it, but I suspect it would be rather
fiddly.
>> It may well work as suggested in this App Note. During the Beeb's reset
>> sequence, and assuming "Notube" is not set in the Master's configuration
>> RAM, the system writes values to all of the control bits, writing a
>> couple
>> of bytes to location &FEE0. This has two functions: (a) the system can
>> check
>> whether it has succeeded in altering the values, and this tells it
>> whether a
>> co-processor is attached; (b) it resets the co-processor, if one
>> exists. The
>> setting of bit 5 (P) resets the coprocessor CPU; probably writing to
>> bit 6
>> (T) is resetting the Tube ULA at the same time.
>>
> Have you got a reference of where this initialisation code is in the
> Master
> MOS ROM?
> I tried looking on a BBC B, but haven't had time to decode the DNFS ROM
> enough yet to work out which bit of it is the Tube Host (assuming its
> all in a
> block), or what it does on reset.
> It does seem to have the strange feature that the run-time host code is
> one of
> the few things I've seen that executes code in zero page, usually its
> mostly used
> for storing variables.
Many years ago I did a disassembly of the Master reset code. I didn't keep
all details, but I did write a summary. It is in "View" format, and I don't
have access to "View" just at present, but you can read most of it with a
text editor. So until I can get round to converting it to something more
sensible, I have temporarily put it on the web at:
http://www.cowsarenotpurple.co.uk/bbccomputer/break.view
You can see from this that most of the reset code is in SW-ROM bank &F,
starting at location &8020. The code relevant to starting the Tube is at
location &809D in this SW bank.
This is for MOS 3.20, of course.
> ...
>> It is things like this that made me feel it was better to speak of 8
>> registers (4 in each direction between Host and Parasite). The H-to-P
>> registers really are quite separate from the P-to-H ones.
>>
> Indeed true, and probably sloppy wording on my part. Its more that the
> aforementioned "Register 3" section of the App Note talks about the
> operation
> being the same in both directions, which doesn't correspond with your
> findings.
What I discovered is what I found after close examination of the Tube on the
Master 512. I wanted to use the Tube "backwards", and needed to find out
exactly how it behaved.
> ...
> Is there still interesting things that can be done with a Master 512
> that can't be
> done more easily with a modern PC?
Possibly not! I became fascinated with how one could get something as
different from a PC as a BBC with a coprocessor to pretend it was a PC. The
pretence was never perfect, but I became impressed with how well they had
succeeded.
> I'm in the slightly odd position that the only time I had any experience
> with the
> Master 512 was far enough removed in time from my first standard PC
> experiences
> to really appreciate how closely the two appeared, or what could be done
> on one that
> you couldn't on the other.
> (Our school had a couple of Master 512 boards, which I managed to
> borrow one of
> in around 1989, but I didn't use anything PC like again until about 1992)
For some time I was running a (PC) spreadsheet on the Master 512, and a
word-processor on the BBC - perhaps not the most efficient use of
technology.
David Harper