Date : Tue, 06 May 2014 18:28:51 +0100
From : mlist@... (Steven Flintham)
Subject: 6502 second processor ROM disassembly
On 06/05/14 15:39, John Kortink wrote:
> I have now looked. I did not have a commented 1.10. I do
> have a commented 1.21. This is a carefully developed and
> tested improvement on 1.10. So unless reference to 1.10
> is a hard requirement, this is the one to use.
>
> Go here :
>
> http://web.inter.nl.net/users/J.Kortink/home/articles/assemblysrc/index.htm
Thank you both, this is fascinating. I didn't realise the ROM was
actually 4K either. (I know very little about the second processor,
hence looking at this.)
What has been puzzling me is how OSWORD 14 (read CMOS time) with
function 0 (read clock value as string) works across the tube. The
returned data is 24 bytes. Looking at the OSWORD control block length in
JGH's disassembly of 1.10 and a random copy of 1.10 I managed to find on
the web, the tube OS expects 24 bytes to be returned. Which is great and
makes sense and doesn't confuse me at all.
Except... looking at app note 4, I found two copies. The earliest, at
http://www.sprow.co.uk/bbc/hardware/armcopro/004.pdf, is dated 16 June
1992 and says OSWORD 14 receives 16 bytes. A slightly more recent one
dated 12 October 1992 at http://mdfs.net/Info/Comp/Acorn/AppNotes/004
says it receives 25 bytes.
Is this just a case of app note 4 always having been wrong? That would
make sense and would explain everything.
What originally provoked my curiosity was the idea of attaching an
original "BBC B"-era 6502 second processor to a Master 128. BASIC 4
would AIUI be copied across into the second processor and execute
happily there, including using OSWORD 14 to handle TIME$. But the OS ROM
in the second processor would predate the definition of OSWORD 14 and at
least according to the documentation it appeared that it would only
transfer 16 bytes.
I've never laid hands on a physical second processor, but I just tried
this in BeebEm and TIME$ does work as expected in a Master 128 with OS
1.10 second processor attached.
Was there an upgrade to the tube OS needed to make it work with the
additional OSWORDs in OS 3.20? Does the host patch the tube ROM in any
way? Or was it all thought out in advance and worked perfectly, except
for some errors in app note 4? Or have I got completely confused? :-)
Cheers.
Steve