Request for testers for quick but fascinating test case
- scarybeasts
- Posts: 608
- Joined: Tue Feb 06, 2018 7:44 am
- Contact:
Request for testers for quick but fascinating test case
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
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 55 times
Re: Request for testers for quick but fascinating test case
Issue 7 model B
Code: Select all
2 CYCLE STRETCH:1
3 CYCLE STRETCH: 1
-
- Posts: 444
- Joined: Tue Aug 30, 2005 12:42 am
- Contact:
Re: Request for testers for quick but fascinating test case
Master 128, VL68C45, CMD G65C22
--Tom
Code: Select all
2 CYCLE STRETCH: 255
3 CYCLE STRETCH: 255
Last edited by tom_seddon on Fri Oct 04, 2019 11:14 pm, edited 1 time in total.
- scarybeasts
- Posts: 608
- Joined: Tue Feb 06, 2018 7:44 am
- Contact:
Re: Request for testers for quick but fascinating test case
Thanks Chris. That's definitely different to this issue 3, which is giving an answer of 2 / 1.cmorley wrote: ↑Thu Oct 03, 2019 7:04 pmIssue 7 model BCode: Select all
2 CYCLE STRETCH:1 3 CYCLE STRETCH: 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
Re: Request for testers for quick but fascinating test case
FWIW on my Issue 4 Beeb, I also get 1/1
Rgds
Stephen
Stephen
- scarybeasts
- Posts: 608
- Joined: Tue Feb 06, 2018 7:44 am
- Contact:
Re: Request for testers for quick but fascinating test case
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
- Rich Talbot-Watkins
- Posts: 1707
- Joined: Thu Jan 13, 2005 5:20 pm
- Location: Palma, Mallorca
- Contact:
Re: Request for testers for quick but fascinating test case
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: 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: 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: 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!): 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 Old 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!
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: 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: 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: 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!): 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 Old 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!
- Rich Talbot-Watkins
- Posts: 1707
- Joined: Thu Jan 13, 2005 5:20 pm
- Location: Palma, Mallorca
- Contact:
Re: Request for testers for quick but fascinating test case
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...
Re: Request for testers for quick but fascinating test case
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.
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
Archimedes 420/1 upgraded to 4MB RAM, ZIDEFS with 512MB CF card
RiscPC 600 under repair
Acorn System 1 home-made replica
Re: Request for testers for quick but fascinating test case
Issue 4 here. Same results as above:Rich Talbot-Watkins wrote: ↑Fri Oct 04, 2019 5:31 pmIncidentally, we'd still love to have any other results from people who are able to try the test!
Code: Select all
2 CYCLE STRETCH: 1
3 CYCLE STRETCH: 1
- Rich Talbot-Watkins
- Posts: 1707
- Joined: Thu Jan 13, 2005 5:20 pm
- Location: Palma, Mallorca
- Contact:
Re: Request for testers for quick but fascinating test case
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?
Anyone else with an issue 3 (or less), just so we can rule out Chris's machine being a complete freak case?
- 1024MAK
- Posts: 10486
- 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
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
Mark
For a "Complete BBC Games Archive" visit www.bbcmicro.co.uk NOW!
BeebWiki - for answers to many questions...
Fault finding index • Acorn BBC Model B minimal configuration • Logic Levels for 5V TTL Systems
BeebWiki - for answers to many questions...
Fault finding index • Acorn BBC Model B minimal configuration • Logic Levels for 5V TTL Systems
- BeebMaster
- Posts: 3867
- Joined: Sun Aug 02, 2009 5:59 pm
- Location: Lost in the BeebVault!
- Contact:
Re: Request for testers for quick but fascinating test case
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.
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.
Re: Request for testers for quick but fascinating test case
This weekend I will test my issue 7 BBC and my BBC Master.
0xC0DE
"I program my home computer / Beam myself into the future"
Follow me on Twitter
Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
"I program my home computer / Beam myself into the future"


- scarybeasts
- Posts: 608
- Joined: Tue Feb 06, 2018 7:44 am
- Contact:
Re: Request for testers for quick but fascinating test case
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.htmlBeebMaster wrote: ↑Fri Oct 04, 2019 10:41 pmI'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.
That's definitely a combination of interest.
Cheers
Chris
Re: Request for testers for quick but fascinating test case
Really interesting investigation...
Does your test code need to run on a B ?
I have an issue 2 model A.
Does your test code need to run on a B ?
I have an issue 2 model A.
Re: Request for testers for quick but fascinating test case
They are both R6522-31scarybeasts wrote: ↑Fri Oct 04, 2019 4:24 pmThanks! If you happened to know what type of 6522 VIAs it has, that's also useful information!
Rgds
Stephen
Stephen
-
- Posts: 1403
- Joined: Tue Apr 30, 2013 12:16 pm
- Contact:
Re: Request for testers for quick but fascinating test case
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
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
Re: Request for testers for quick but fascinating test case
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.
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.
Re: Request for testers for quick but fascinating test case
BBC Master: 255/255
BBC B issue 7: 1/1
BBC B issue 7: 1/1
0xC0DE
"I program my home computer / Beam myself into the future"
Follow me on Twitter
Visit my YouTube channel featuring my games and demos for Acorn Electron and BBC Micro
"I program my home computer / Beam myself into the future"


Re: Request for testers for quick but fascinating test case
Master Compact
VSIRQTM 2:1 3:1
BIGSYNC RAISE:N M LOWER: N-2 M+2
LPSYNC HI: 16 LO: 134-136
VSIRQTM 2:1 3:1
BIGSYNC RAISE:N M LOWER: N-2 M+2
LPSYNC HI: 16 LO: 134-136
Re: Request for testers for quick but fascinating test case
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
VSIRQTM 2:1 3:1
BIGSYNC:- Raise: 201 59 Lower: 199 61
LPSYNC HI: 16 LO: 134
Peter.
Re: Request for testers for quick but fascinating test case
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
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/
-
- Posts: 387
- Joined: Fri Apr 13, 2018 2:48 pm
- Contact:
Re: Request for testers for quick but fascinating test case
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
(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
- BeebMaster
- Posts: 3867
- Joined: Sun Aug 02, 2009 5:59 pm
- Location: Lost in the BeebVault!
- Contact:
Re: Request for testers for quick but fascinating test case
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):scarybeasts wrote: ↑Sat Oct 05, 2019 6:33 amIssue 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.htmlBeebMaster wrote: ↑Fri Oct 04, 2019 10:41 pmI'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.
That's definitely a combination of interest.
Cheers
Chris
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.
- BeebMaster
- Posts: 3867
- Joined: Sun Aug 02, 2009 5:59 pm
- Location: Lost in the BeebVault!
- Contact:
Re: Request for testers for quick but fascinating test case
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.BeebMaster wrote: ↑Mon Oct 07, 2019 2:38 pmbut here's a better pic from that set (although I think I ought to have a go at doing even better)
- BeebMaster
- Posts: 3867
- Joined: Sun Aug 02, 2009 5:59 pm
- Location: Lost in the BeebVault!
- Contact:
Re: Request for testers for quick but fascinating test case
Cheek! I've been censored again - what's happening????
-
- Posts: 387
- Joined: Fri Apr 13, 2018 2:48 pm
- Contact:
Re: Request for testers for quick but fascinating test case
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.
- BeebMaster
- Posts: 3867
- Joined: Sun Aug 02, 2009 5:59 pm
- Location: Lost in the BeebVault!
- Contact:
Re: Request for testers for quick but fascinating test case
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!