Request for testers for quick but fascinating test case

discuss bbc micro and electron emulators (including mame) here!
User avatar
scarybeasts
Posts: 671
Joined: Tue Feb 06, 2018 7:44 am
Contact:

Request for testers for quick but fascinating test case

Post by scarybeasts »

Hi,

We've uncovered a strange test result on an issue 3 model B that might represent a change in hardware cycle stretching behavior between earlier and later B's. But it's unclear.

Anyone able to run a small test on any BBC (issue anything, B, Master, etc.) and share results would be really helping, and contributing to the next generation of BBC demos (these rely on tight timing!)

The test case, on the attached SSD, is:
CHAIN "VSIRQTM"

It should output a couple of numbers.

Of particular interest is running on an issue 7 model B. Master results also interesting, would be useful to also state type of CRTC if known as well, since this varies on a Master.


Cheers
Chris
Attachments
crtc-oct3-2019-2.ssd
(200 KiB) Downloaded 58 times
cmorley
Posts: 1430
Joined: Sat Jul 30, 2016 8:11 pm
Location: Oxford
Contact:

Re: Request for testers for quick but fascinating test case

Post by cmorley »

Issue 7 model B

Code: Select all

2 CYCLE STRETCH:1
3 CYCLE STRETCH: 1
tom_seddon
Posts: 453
Joined: Tue Aug 30, 2005 12:42 am
Contact:

Re: Request for testers for quick but fascinating test case

Post by tom_seddon »

Master 128, VL68C45, CMD G65C22

Code: Select all

2 CYCLE STRETCH: 255
3 CYCLE STRETCH: 255
--Tom
Last edited by tom_seddon on Fri Oct 04, 2019 11:14 pm, edited 1 time in total.
User avatar
scarybeasts
Posts: 671
Joined: Tue Feb 06, 2018 7:44 am
Contact:

Re: Request for testers for quick but fascinating test case

Post by scarybeasts »

cmorley wrote:
Thu Oct 03, 2019 7:04 pm
Issue 7 model B

Code: Select all

2 CYCLE STRETCH:1
3 CYCLE STRETCH: 1
Thanks Chris. That's definitely different to this issue 3, which is giving an answer of 2 / 1.
I must admit, 1 / 1 was not expected, if anything I was expecting 2 / 2. I'll need to go away and think about this.

More model B test results welcomed!


Cheers
Chris
User avatar
sweh
Posts: 2363
Joined: Sat Mar 10, 2012 12:05 pm
Location: New York, New York
Contact:

Re: Request for testers for quick but fascinating test case

Post by sweh »

FWIW on my Issue 4 Beeb, I also get 1/1
Rgds
Stephen
User avatar
scarybeasts
Posts: 671
Joined: Tue Feb 06, 2018 7:44 am
Contact:

Re: Request for testers for quick but fascinating test case

Post by scarybeasts »

sweh wrote:
Thu Oct 03, 2019 11:24 pm
FWIW on my Issue 4 Beeb, I also get 1/1
Thanks! If you happened to know what type of 6522 VIAs it has, that's also useful information!

If anyone had any of these configurations, they'd be super useful to test:

1) More issue 3s, any type of 6522 VIA.

2) An issue 7, with non-Rockwell 6522 VIA (did any issue 7 get shipped with anything else?)


Cheers
Chris
User avatar
Rich Talbot-Watkins
Posts: 1719
Joined: Thu Jan 13, 2005 5:20 pm
Location: Palma, Mallorca
Contact:

Re: Request for testers for quick but fascinating test case

Post by Rich Talbot-Watkins »

For anyone wondering what this is all about, this was an attempt to try to prove that Chris's issue 3 BBC B was performing double accesses when writing to the CRTC, but only when the store instruction was aligned with the 1MHz clock.

This tale is best read as a continuation of this thread.

We know that so-called cycle stretching happens when accessing a 1MHz device. There are two possibilities, which are well documented with scope traces, and Beeb documentation.

Here's what the BBC Micro Service Manual (1985) says:
servicemanual1985.png
As cmorley pointed out in the other thread, the 2MHzE signal is generated such that it's high for exactly 3 half cycles, and low for the rest.

But there's a different school of thought, that cycle stretching will hold 2MHzE high for 3 or 5 half cycles, depending on the alignment, which is frequently stated in documentation. Here's a 1982 version of the Beeb Service Manual, stating exactly this, unequivocally:
servicemanual1982.png
I was intrigued by this, as, if that were the case, it's totally possible to see how double accesses might occur in case B: while 2MHzE is high, there are two 1MHzE falling edges in which write would be latched. But did something change between Beeb revisions, or was it a documentation error? Well, comparing two versions of the circuit diagram it seems that the cycle stretching logic did change!

Here's what the Beeb circuit diagram from the AUG says:
circuitnew.png
That bit in yellow is extra logic which didn't exist in this older version of the circuit diagram (from the 1982 Service Manual, not the best quality scan!):
circuitold.png
As we can see, it looks like half the 74LS61 chip, which used to form part of the reset logic (being used as a simple inverter) got repurposed later on to provide extra logic for cycle stretching, hence the change in documented behaviour (although note that this change isn't actually documented anywhere in the "differences between revisions" appendix of the later Service Manual).

My assumption is that Acorn realised that the double access behaviour was a problem, and fixed it by shortening the 2MHzE high portion during aligned accesses, and then changing some of the access logic for 1MHz devices. In particular, in the later circuit diagram, we can see that the CRTC signal is contingent on phi1, and the VIA chip select is contingent on the 2MHzE signal, to ensure that accesses only happen when 2MHzE is high.

New
crtcnew.PNG
vianew.PNG
vianew.PNG (22.28 KiB) Viewed 2755 times
Old
crtcviaold.png
I'm not sure when this was changed, but my guess is that Issue 3 was the last revision with the old behaviour.

Thought it was an interesting bit of history that maybe isn't really known. An interesting thing about this is that it provides a way, entirely in software, of determining an Issue 3 or less board, versus a newer revision, whenever it got changed.

In general, the double access won't really make much difference to most programs, but cycle-exact CRTC access is one example where it is critical!
User avatar
Rich Talbot-Watkins
Posts: 1719
Joined: Thu Jan 13, 2005 5:20 pm
Location: Palma, Mallorca
Contact:

Re: Request for testers for quick but fascinating test case

Post by Rich Talbot-Watkins »

Incidentally, we'd still love to have any other results from people who are able to try the test! The next thing is to try to figure out why apparently Chris's machine takes longer to respond to the interrupt than an issue 7...
Kazzie
Posts: 1793
Joined: Sun Oct 15, 2017 8:10 pm
Location: North Wales
Contact:

Re: Request for testers for quick but fascinating test case

Post by Kazzie »

This looks like a fantastic bit of sleuthing!

I'll try to get time over the weekend to add another Issue 7 Model B to the results.
BBC Model B 32K issue 7, Sidewise ROM board with 16K RAM
Archimedes 420/1 upgraded to 4MB RAM, ZIDEFS with 512MB CF card
RiscPC 600 under repair
Acorn System 1 home-made replica
User avatar
MarkMoxon
Posts: 109
Joined: Thu Jul 18, 2019 4:38 pm
Contact:

Re: Request for testers for quick but fascinating test case

Post by MarkMoxon »

Rich Talbot-Watkins wrote:
Fri Oct 04, 2019 5:31 pm
Incidentally, we'd still love to have any other results from people who are able to try the test!
Issue 4 here. Same results as above:

Code: Select all

2 CYCLE STRETCH: 1
3 CYCLE STRETCH: 1
User avatar
Rich Talbot-Watkins
Posts: 1719
Joined: Thu Jan 13, 2005 5:20 pm
Location: Palma, Mallorca
Contact:

Re: Request for testers for quick but fascinating test case

Post by Rich Talbot-Watkins »

Thanks Mark! I think that confirms that this aspect of the hardware was changed in issue 4 then! (along with quite a bunch of other stuff, as I understand it)

Anyone else with an issue 3 (or less), just so we can rule out Chris's machine being a complete freak case?
User avatar
1024MAK
Posts: 10549
Joined: Mon Apr 18, 2011 5:46 pm
Location: Looking forward to summer in Somerset, UK...
Contact:

Re: Request for testers for quick but fascinating test case

Post by 1024MAK »

This weekend I can test an issue 3 Beeb (if and when I find it!), also an issue 4, issue 7 and an issue 2 Master 128. I’ll include CRTC details. I don’t know what types of 6522 VIAs are in the various Beebs, but the Master has G65SC22P-2 CMOS VIAs (see this post).

Mark
User avatar
BeebMaster
Posts: 3972
Joined: Sun Aug 02, 2009 5:59 pm
Location: Lost in the BeebVault!
Contact:

Re: Request for testers for quick but fascinating test case

Post by BeebMaster »

Master 128 (Station 1): 255/255
Master 128 (Station 114): 255/255
Master 128 (Station 200): 1/1
Master 128 MOS 3.50 (Station 201): 255/255
BBC Model B issue 4 (Station 128): 1/1

(All with 6502 second processors off, which can make a difference when on)

I'll try Station 129 (BBC Model B issue 2) over the weekend, it's currently having a rest whilst its space is being occupied by my 2 A4000s which are being saved for the nation after 9 years of battery leakage in storage.
Image
User avatar
0xC0DE
Posts: 863
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: Request for testers for quick but fascinating test case

Post by 0xC0DE »

This weekend I will test my issue 7 BBC and my BBC Master.
0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
User avatar
scarybeasts
Posts: 671
Joined: Tue Feb 06, 2018 7:44 am
Contact:

Re: Request for testers for quick but fascinating test case

Post by scarybeasts »

BeebMaster wrote:
Fri Oct 04, 2019 10:41 pm
I'll try Station 129 (BBC Model B issue 2) over the weekend, it's currently having a rest whilst its space is being occupied by my 2 A4000s which are being saved for the nation after 9 years of battery leakage in storage.
Issue 2!!! What a beauty. Not sure if this picture I found is it or not but if so, it has a Synertek system VIA 6522 (and Rockwell user VIA??): https://www.beebmaster.co.uk/Motherboards.html

That's definitely a combination of interest.


Cheers
Chris
steve3000
Posts: 2341
Joined: Sun Nov 25, 2012 12:43 am
Contact:

Re: Request for testers for quick but fascinating test case

Post by steve3000 »

Really interesting investigation...

Does your test code need to run on a B ?

I have an issue 2 model A.
User avatar
sweh
Posts: 2363
Joined: Sat Mar 10, 2012 12:05 pm
Location: New York, New York
Contact:

Re: Request for testers for quick but fascinating test case

Post by sweh »

scarybeasts wrote:
Fri Oct 04, 2019 4:24 pm
sweh wrote:
Thu Oct 03, 2019 11:24 pm
FWIW on my Issue 4 Beeb, I also get 1/1
Thanks! If you happened to know what type of 6522 VIAs it has, that's also useful information!
They are both R6522-31
Rgds
Stephen
dominicbeesley
Posts: 1453
Joined: Tue Apr 30, 2013 12:16 pm
Contact:

Re: Request for testers for quick but fascinating test case

Post by dominicbeesley »

Good work on this,

I'm getting 1/1 on my Issue 7 with blitter board - I'm following this with interest as one of the things the blitter board has to do to stay in sync is to anticipate cycle stretches, I'll have to have a think about how the Issue<=3 circuitry might affect this!

D
User avatar
rmbrowngr
Posts: 445
Joined: Sat Jan 13, 2018 12:46 pm
Location: Dionysos, Greece
Contact:

Re: Request for testers for quick but fascinating test case

Post by rmbrowngr »

BBC B+ 64k

Code: Select all

2 CYCLE STRETCH: 1
3 CYCLE STRETCH: 1
Richard B
Acorn Electrons issue 4 and 6, MRB, Plus 1, AP6, AP5, Pegasus 400, BeebSCSI, Gotek, Raspberry Pi, GoSDC MBE.
BBC B+ 64K (128K upgraded) with Duel OS, Raspberry Pi and Gotek.
User avatar
0xC0DE
Posts: 863
Joined: Tue Mar 19, 2019 7:52 pm
Location: The Netherlands
Contact:

Re: Request for testers for quick but fascinating test case

Post by 0xC0DE »

BBC Master: 255/255
BBC B issue 7: 1/1
0xC0DE
"I program my home computer / Beam myself into the future"
:arrow: Follow me on Twitter
:arrow: Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
User avatar
tricky
Posts: 5171
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: Request for testers for quick but fascinating test case

Post by tricky »

Master Compact
VSIRQTM 2:1 3:1
BIGSYNC RAISE:N M LOWER: N-2 M+2
LPSYNC HI: 16 LO: 134-136
User avatar
vanekp
Posts: 973
Joined: Thu Nov 30, 2000 7:09 am
Location: The Netherlands
Contact:

Re: Request for testers for quick but fascinating test case

Post by vanekp »

BBC Micro Issue 7, one VIA (IC69) is R6522 the other (IC3) is SY6522, CRTC is HD46505SP
VSIRQTM 2:1 3:1
BIGSYNC:- Raise: 201 59 Lower: 199 61
LPSYNC HI: 16 LO: 134
Peter.
User avatar
kieranhj
Posts: 937
Joined: Sat Sep 19, 2015 11:11 pm
Location: Farnham, Surrey, UK
Contact:

Re: Request for testers for quick but fascinating test case

Post by kieranhj »

Master Turbo, VSIRQTM = 1/1
BBC Model B issue 7, HD6845SP, R6522AP, VSIRQTM = 1/1
BBC Model B issue 4, HD6845SP, R6522P, VSIRQTM = 2/2
Bitshifters Collective | Retro Code & Demos for BBC Micro & Acorn computers | https://bitshifters.github.io/
VectorEyes
Posts: 405
Joined: Fri Apr 13, 2018 2:48 pm
Contact:

Re: Request for testers for quick but fascinating test case

Post by VectorEyes »

MAIN DEV CHERRY MASTER:
(Not had time to take lid off yet but if it is similar to the other one I own, it’s got a Toshiba CRTC. Will check VIAs soon and update!)
VSIRQTM: 1,1

BigSync:
Time Raise: 99 174
Time Lower: 97 176
TR: 249 228
TL: 247 230
TR: 22 38
TL: 20 36

SyncMid: 2
LPSYNC: Hi always 16, Lo 134-137
SyncX2: 2


OTHER MASTER:
CRTC: Hitachi HD46505SP
VIAs: Both VTi (VLSI?) 609 V 9883 / VL6522-02PC / MEXICO-R

VSIRQTM: 1,1
BIGSYNC: TR 128 255 TL 146 252 … 40 255, 38 253 … 170 255, 168 253
Syncmid: 2
LPSync: Hi always 16, Lo 134 - 137
Syncx2: 2


BBC B (issue 7):
CRTC: Hitachi HD46505SP
VIAs: Both Rockwell P6522P / R6522-31 / 3342

Vsirqtm 1,1
Bigsync: 158 69 / 156 71 … 176 70 / 174 72 … 120 72 / 118 70
Syncmid: 2
lpsync Hi always 16, Lo 134 - 137
SyncX2: 2
User avatar
BeebMaster
Posts: 3972
Joined: Sun Aug 02, 2009 5:59 pm
Location: Lost in the BeebVault!
Contact:

Re: Request for testers for quick but fascinating test case

Post by BeebMaster »

scarybeasts wrote:
Sat Oct 05, 2019 6:33 am
BeebMaster wrote:
Fri Oct 04, 2019 10:41 pm
I'll try Station 129 (BBC Model B issue 2) over the weekend, it's currently having a rest whilst its space is being occupied by my 2 A4000s which are being saved for the nation after 9 years of battery leakage in storage.
Issue 2!!! What a beauty. Not sure if this picture I found is it or not but if so, it has a Synertek system VIA 6522 (and Rockwell user VIA??): https://www.beebmaster.co.uk/Motherboards.html

That's definitely a combination of interest.


Cheers
Chris
That's the one, what a shocking picture! For some reason Station 129 has slipped through the net for years and didn't get its own picture set till January 2018 (so it's still about 5 years away from making an online appearance) but here's a better pic from that set (although I think I ought to have a go at doing even better):
Station129-5.jpg
I've long suspected it as an A to B upgrade given the socketed upper 16K of RAM and the different user & system VIA date-codes. The user VIA has been changed since, it is still the same Rockwell R6522-31 part but date-coded 8342.

It's one of my favourite Beebs, although I've always found the Acorn User RAM with its new-fangled SMT chips to be a bit incongruous in a Beeb that old. According to the early (1982) service manual there were apparently only 5,000 Issue 2 ever in production, so it's very precious to me.

Anyway: to set the cat amongst the pigeons...

First try: 1/1, which I don't think I was expecting. This was loading VSIRQTM from Econet.

I switched it off, went away for a bit, and then plugged the floppy drive back in andcopied the file from Econet so I could run it from DFS.

Then I get 2/1.

It boils down to whether the disc drive ribbon cable is plugged into the disc drive port at power-on or not:
Plugged in: 2/1
Not plugged in: 1/1

Changing this (ie. plugging or unplugging the cable) whilst powered on makes no difference to the result, it is the same from power on until the next power on no matter what.
Image
User avatar
BeebMaster
Posts: 3972
Joined: Sun Aug 02, 2009 5:59 pm
Location: Lost in the BeebVault!
Contact:

Re: Request for testers for quick but fascinating test case

Post by BeebMaster »

BeebMaster wrote:
Mon Oct 07, 2019 2:38 pm
but here's a better pic from that set (although I think I ought to have a go at doing even better)
Wait a minute, the real picture I uploaded is quite good, 4992x3589 3MB but the forum cuts it down to 1500 across and 300K when I post it in-line. Let's see if this gives the full one.
Attachments
Station129-5.jpg
Image
User avatar
BeebMaster
Posts: 3972
Joined: Sun Aug 02, 2009 5:59 pm
Location: Lost in the BeebVault!
Contact:

Re: Request for testers for quick but fascinating test case

Post by BeebMaster »

Cheek! I've been censored again - what's happening????
Image
VectorEyes
Posts: 405
Joined: Fri Apr 13, 2018 2:48 pm
Contact:

Re: Request for testers for quick but fascinating test case

Post by VectorEyes »

Are you on a mobile? I’ve found that quite often when I’m viewing a web page on a mobile phone the image resolution is reduced for large images.
User avatar
BeebMaster
Posts: 3972
Joined: Sun Aug 02, 2009 5:59 pm
Location: Lost in the BeebVault!
Contact:

Re: Request for testers for quick but fascinating test case

Post by BeebMaster »

No fear! Well, laptop: that's as mobile as it gets round here, and even then it uses wired ethernet and is under a wooden Beeb monitor stand!
Image
User avatar
IanS
Posts: 1608
Joined: Mon Aug 31, 2009 7:02 pm
Contact:

Re: Request for testers for quick but fascinating test case

Post by IanS »

BeebMaster wrote:
Mon Oct 07, 2019 2:44 pm
Cheek! I've been censored again - what's happening????
viewtopic.php?f=5&t=15136
Post Reply

Return to “8-bit acorn emulators”