Monthly Archives: January 2015

Sideways RAM for BBC Micro Model B+

There’s an excellent article by Mark at RetroClinic on adding 32K of Sideways RAM to a BBC Micro with just a couple of track cuts and wires. I’ve performed it on a BBC Model B, in order to replace a Solidisk SWR which never worked reliably even when it was new, and the modification works well. However, I wanted to do it on the BBC B+ I use in the office, and the details are slightly different.

The first thing to note is that the B+’s sideways ROM sockets are conveniently already wired to support 32K chips (27256 EPROMs). There is a row of links to the left of the ROM sockets which select whether each socket is configured for a 16K chip or 32K chip. Each link just selects whether pin 27 (A14 on 27256, /PGM on 2764 and 27128) is tied to +5V or connected to the bottom bit of the ROMSEL register IC45. If the link is to the left, pin 27 is tied high, and if it’s to the right, it’s an address bit. To be honest I can’t see any reason not to leave them all to the right all the time, since pulling /PGM low on 2764 and 27128 chips seems to have no effect other than disabling the chip. However, on my B+ they were all set to the left by default.

The layout of the parts on the board is:

    +------+ +------+ +------+
S19 |      | |      | |      |
S18 | IC62 | | IC68 | | IC71 |
S15 | ROM  | | ROM  | | OS & |
S12 | banks| | banks| | bank |
S11 | 8/9  | | A/B  | | 1/F  |
S9  |      | |      | | BASIC|
    | (S15)| | (S18)| | (S19)|
    +------+ +------+ +------+
    +------+ +------+ +------+
    |      | |      | |      |
    | IC35 | | IC44 | | IC57 |
    | ROM  | | ROM  | | ROM  |
    | banks| | banks| | banks|
    | 2/3  | | 4/5  | | 6/7  |
    |      | |      | |      |
    | (S9) | | (S11)| | (S12)|
    +------+ +------+ +------+

Note that S19 (for IC71) behaves a bit differently. IC71 is always the OS ROM, which is not a sideways ROM, but can be a sideways ROM (in bank 1 or bank F) as well. If S19 is placed to the right, IC71 should have the OS in the top 16K and a sideways ROM image, conventionally BASIC, in the bottom 16K. Which bank this ROM image ends up in depends on the setting of S13. If S13 is set ‘north’, the lower half of IC71 appears in bank 1. If it’s ‘south’, it appears in bank F. Normally bank F is convenient for BASIC.

The key ingredient of the sideways RAM upgrade is to provide a write enable signal to the RAM chip. This isn’t normally present on ROMs because it makes no sense to write to a ROM. The RetroClinic upgrade takes a write signal from IC77 pin 8. This is the write strobe for the uPD7002 ADC and the 8271 floppy disc controller. The corresponding signal still exists in the B+, and is used by the ADC and the 1770 floppy disc controller. It comes from IC27 pin 6, however, which is conveniently close to the ROM sockets.

However, there’s an annoying difference between a 27256 32K EPROM and a 62256 32K RAM. The EPROM has A14 on pin 27, but the RAM has A14 on pin 1 and /WE, the write enable signal, on pin 27.

On the Model B, it’s not hard to cut the tracks to pins 1 and 27 and solder wires on the bottom of the board. However on the B+, the tracks to those pins are on the top of the board, mostly concealed by the socket, and are a royal pain to get to. I could have desoldered the socket, done the modifications and put it back, but that was relatively risky and a lot of effort. I decided to just take pins 1 and 27 of my RAM chip outside the socket and run a wire from pin 27 to IC27 pin 6, and pin 1 to IC45 pin 14 (the source of the address line), on the top of the board. Here’s what it looked like.

DSC_1094

My final discovery was that the Sideways RAM utilities are provided by the 1770 DFS ROM. My B+, however, only had DFS version 2.10, which doesn’t include them. I programmed a ROM with DFS version 2.26, and took the opportunity to shuffle the existing ROMs into 32K chips to save sockets.

This done, the SRAM commands were now available, but the Sideways RAM wouldn’t work. I’d put my RAM chip in socket IC57, which is banks 6 and 7. It seems that the B+ and DFS SRAM utilities only understand about Sideways RAM in the banks which the B+128 would have it: banks 0, 1, C and D, exactly the banks which are not covered by the ROM sockets. Doh!

I needed to move my RAM chip to appear in banks 0 and 1. This was easily accomplished by moving pin 20 outside the socket and soldering a wire from it to IC46 pin 15. IC46 is the address decoder for the ROM sockets, and pin 15 is its /0 output.

Now, when switched on, the machine shows ‘Acorn OS 96K’ (cute!) instead of its previous ‘Acorn OS 64K’, and the *SRLOAD command works to load images into banks 0 and 1.

Img_8121s

In summary, to add 32K of Sideways RAM to a BBC B+ 64K:

  • Move S12 into its right-hand position
  • Bend pins 1, 20 and 27 of a 62256 RAM chip so they fall outside the socket
  • Put the chip with bent pins into socket IC57
  • Solder a wire from pin 1 to IC45 pin 14
  • Solder a wire from pin 20 to IC46 pin 15
  • Solder a wire from pin 27 to IC27 pin 6
  • Make sure your DFS is version 2.26

Now you have Sideways RAM in banks 0 and 1. Job done.

IMG_8120