BBC Micro: writes to ROM?

for bbc micro/electron hardware, peripherals & programming issues (NOT emulators!)
crj
Posts: 313
Joined: Thu May 02, 2013 4:58 pm

BBC Micro: writes to ROM?

Postby crj » Wed Dec 06, 2017 5:23 pm

In an interesting discussion away from the forums, somebody pointed out an interesting thing to me: the processor's R/~W line features nowhere in the driving of ~CE or ~OE to the ROMs. I've checked this on the schematic and it appears to be true.

Doesn't that mean that there's a bus clash every time an attempt is made to write anywhere between &8000 and &FBFF? That seems like both an unfortunate way to mistreat the hardware and a commonplace occurrence.

Also, it leaves me trying to make sense of my recollection that with the original Solidisk sideways RAM, the one that mounted in the rightmost ROM socket and ran up the edge of the case, you could write to it by writing to &8000-&BFFF regardless of which bank was selected. In particular, you could load a sideways ROM image simply by doing *LOAD without any help from the filing system implementation. Am I misremembering? If not, how on earth did that work if the filing system ROM would have been driving the bus during stores as well as loads?

I feel like I'm missing something, here.

User avatar
hoglet
Posts: 6604
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: BBC Micro: writes to ROM?

Postby hoglet » Wed Dec 06, 2017 5:37 pm

crj wrote:Doesn't that mean that there's a bus clash every time an attempt is made to write anywhere between &8000 and &FBFF? That seems like both an unfortunate way to mistreat the hardware and a commonplace occurrence.

Yes there is indeed a bus clash in a Model B when accessing the language ROM &8000-&BFFF. Not sure about the OS ROM.

If a ROM board is fitted, then it depends I guess on the design of the ROM board.

I also found (through the use of the 6502 bus analyzer), the Electron apparently suffer the same with slots 10 and 11(Basic).

Dave

User avatar
1024MAK
Posts: 6785
Joined: Mon Apr 18, 2011 4:46 pm
Location: Looking forward to summer in Somerset, UK...

Re: BBC Micro: writes to ROM?

Postby 1024MAK » Wed Dec 06, 2017 6:01 pm

Despite what the various text books say, it not uncommon for there to be no read/write control in ROM control circuits. The BBC is indeed a computer that is like this. So yes, a write will result in a bus clash for the duration of the memory bus cycle.

Mark
For a "Complete BBC Games Archive" visit www.bbcmicro.co.uk NOW!
BeebWiki‬ - for answers to many questions...

crj
Posts: 313
Joined: Thu May 02, 2013 4:58 pm

Re: BBC Micro: writes to ROM?

Postby crj » Wed Dec 06, 2017 6:15 pm

So... what limits the current that flows if a ROM drives 1 and the CPU drives 0 or vice-versa?

Is that current sustainable? And is the limit by luck or by design?

User avatar
1024MAK
Posts: 6785
Joined: Mon Apr 18, 2011 4:46 pm
Location: Looking forward to summer in Somerset, UK...

Re: BBC Micro: writes to ROM?

Postby 1024MAK » Wed Dec 06, 2017 7:24 pm

The combined output impedance of the two chips that are trying to both drive the bus limits the current. Whichever has the higher drive (lowest output impedance) will override the weaker chip. Modern CMOS memory chips are likely to win against an NMOS CPU for example.

But keep in mind that most chips can only output up to around 25mA into a short circuit, or sink a similar amount. And that the bus contention only lasts for one memory cycle. As long as there is only occasional bus clashes, the hardware should survive. However, IMHO, it is a bit of poor design. But the upside, is that it makes sideways RAM and EEPROM/flash ROM relatively easy to fit and use.

Mark
For a "Complete BBC Games Archive" visit www.bbcmicro.co.uk NOW!
BeebWiki‬ - for answers to many questions...

User avatar
tricky
Posts: 1916
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: BBC Micro: writes to ROM?

Postby tricky » Wed Dec 06, 2017 10:26 pm

crj wrote:...
I feel like I'm missing something, here.

That sideways RAM used the low three bits of the user port to select which "socket" got written to, so setting write to a sideways RAM "just worked" as the DFS tried to overwrite itself.
Really upsets the various MMC options though! (SmartSPI allows you to connect to lines 01, 23, 45 or 67, which helps).

crj
Posts: 313
Joined: Thu May 02, 2013 4:58 pm

Re: BBC Micro: writes to ROM?

Postby crj » Thu Dec 07, 2017 12:54 am

1024MAK wrote:But keep in mind that most chips can only output up to around 25mA into a short circuit, or sink a similar amount.

Hmm. I may have misconstrued.

I thought those limits meant the chip would break if you ever tried to source/sink more, not that it would current-limit!

User avatar
1024MAK
Posts: 6785
Joined: Mon Apr 18, 2011 4:46 pm
Location: Looking forward to summer in Somerset, UK...

Re: BBC Micro: writes to ROM?

Postby 1024MAK » Thu Dec 07, 2017 3:49 pm

crj wrote:
1024MAK wrote:But keep in mind that most chips can only output up to around 25mA into a short circuit, or sink a similar amount.

Hmm. I may have misconstrued.

I thought those limits meant the chip would break if you ever tried to source/sink more, not that it would current-limit!

Well, strangely enough, the various manufacturers specify the maximum current, but don't say what the consequences would be if you exceed the figure. However, some manufacturers also give the expected voltage at a specified current. From this, it is clear that there is a low, but significant impedance in the chips output drivers. Shorting out an output will result in increased localised heating in that part of the chip, but as the short circuit is only for a very short duration, for the most part, it does not cause problems.

Having said that, IMHO it's something that should be avoided, so I include read/write control in my own designs. Further, it is possible that a continuous (or long duration) short circuit (to the supply rail or to ground) will cause damage. The quickest way to kill a chip remains connecting a high voltage (greater than VCC+0.7V) or a negative voltage (less than -0.7V) to a chip pin (unless the chip is designed with this in mind, like some EPROM chip inputs).

It should also be noted that this bus contention problem is not restricted to ROMs. It also affects some (often, but not always low cost) I/O input devices, for example, the First Byte Digital Joystick interface has no connection to the R/W line. Some joystick interfaces for the ZX Spectrum also have no /RD control line connections.

Mark
For a "Complete BBC Games Archive" visit www.bbcmicro.co.uk NOW!
BeebWiki‬ - for answers to many questions...

User avatar
flynnjs
Posts: 757
Joined: Tue Jul 06, 2010 9:33 pm

Re: BBC Micro: writes to ROM?

Postby flynnjs » Thu Dec 07, 2017 5:46 pm

As a rule of thumb, unless a datasheet says that an output can survive a short then I would avoid it.

As you draw more current the pin will gradually "let go" and eventually the voltage will no longer
be within the valid voltage range for the connection standard (TTL/CMOS etc). Drawing yet more
current will result either in just "wrong level detected", gradual degradation of drive ability or
potentially immediate catastrophic failure.

As Mark says, driving a line above or below the supply rails is more likely to cause major damage
but for many FPGAs the precise characterics of amount and duration of excursion vs expected
lifetime is published by the manufacturer as it is a "fact" that many high speed signals ring and
to over/undershoot. In such systems it is therefore implicit that the circuit has a finite lifetime
although in conservative designs this may be decades of power on and less conservate designs
for disposible kit it could be only hours.

Kazzie
Posts: 21
Joined: Sun Oct 15, 2017 7:10 pm
Location: North Wales

Re: BBC Micro: writes to ROM?

Postby Kazzie » Fri Dec 08, 2017 12:32 pm

crj wrote:Also, it leaves me trying to make sense of my recollection that with the original Solidisk sideways RAM, the one that mounted in the rightmost ROM socket and ran up the edge of the case, you could write to it by writing to &8000-&BFFF regardless of which bank was selected. In particular, you could load a sideways ROM image simply by doing *LOAD without any help from the filing system implementation. Am I misremembering? If not, how on earth did that work if the filing system ROM would have been driving the bus during stores as well as loads?

I feel like I'm missing something, here.


As another data point, the ATPL Sidewise does the same. Quoting from the manual:

As supplied, SIDEWISE will accept up to 16K RAM in the two special sockets 15a and 15b. The RAM is written to by any write instruction to the SIDEWAYS ROM area, addresses in the range 8000 - BFFF hex. The write access will override the currently selected SIDEWAYS ROM causing data to be stored on the RAM chips. This data may then only be read by selecting ROM NUMBER 15 in the normal way. This allows a FILING SYSTEM ROM, which may be itself a SIDEWAYS ROM, to control the loading of a file to this RAM area, without affecting itself.
A not altogether useful example might be the BASIC line

Code: Select all

FORX=&8000 TO &BFFF:?X=?X:NEXT

This will make a copy of the BASIC ROM in the SIDEWAYS RAM.
Pudsey - BBC Model B 32k issue 7, Sidewise ROM board with 16K RAM

crj
Posts: 313
Joined: Thu May 02, 2013 4:58 pm

Re: BBC Micro: writes to ROM?

Postby crj » Fri Dec 08, 2017 3:08 pm

Ah, the ATPL Sidewise.

That was a solid bit of kit, what I selected for my own BBC B at home. Which sadly got burgled so I no longer have it. The silver lining was BBC Master being launched between the burglary and the insurance payout!


Return to “hardware”

Who is online

Users browsing this forum: No registered users and 18 guests