Expanding a System 1 into a System 2

emulators, hardware and classic software for atom + system machines
Kazzie
Posts: 1793
Joined: Sun Oct 15, 2017 8:10 pm
Location: North Wales
Contact:

Expanding a System 1 into a System 2

Post by Kazzie » Sun Dec 01, 2019 9:40 am

Some of you may recall I built a replica of a System 1 last year. After a few tweaks to the cassette circuitry, here's how it looks at the moment:
IMG_20191201_0731269.jpg
A DIN41612 connector has been fitted on the left for easy switching between power supplies
The aluminium enclosure around the system has some space underneath though...
IMG_20191201_0731404.jpg
There's room down below
Which surely needs filling with some more Acorn Eurocards!

First on the list is a VDU card. I've started wiring up a copy of the 40x25 (teletext) Eurocard on a perfectly-sized piece of veroboard I had available:
IMG_20191201_0727016.jpg
Most of the address bus and data bus wired up
Veroboard really isn't the best-suited equipment for the job, as I'm really doing more of a point-to-point wiring job in order to fit everything on the board. But I had some boards to hand and they've got pre-drilled holes for mounting the DIN 42612 connector too.

I've been searching on-and-off for a few months for a suitable ASCII keyboard, or a donor to let me build one. There are PS/2 - ASCII signal converters, but I'd prefer something with the same bit-shifted keyboard layout if possible. Custom-printing a set of brand-new keycaps isn't going to fit in my budget. For the time being I'll keep looking...
Last edited by Kazzie on Mon Jan 20, 2020 9:34 am, edited 1 time in total.
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

Kazzie
Posts: 1793
Joined: Sun Oct 15, 2017 8:10 pm
Location: North Wales
Contact:

Re: Expanding a System 1

Post by Kazzie » Sun Dec 01, 2019 10:28 am

In the longer term, I do intend to build more that the two extra cards that my current enclosure has room for. Last week I received what can only be described as a "statement of intent":
IMG_20191201_0733016.jpg
IMG_20191201_0734289.jpg
It's a subrack that was originally used for some audio-processing, based on the labels on the brushed aluminium card fronts. The cards themselves mostly have a mix of 4000-series ICs and various passive components:
IMG_20191201_0735295.jpg
It turns out that the rack is a 4U height one, rather than a 3U one. The cards are no only longer than my Eurocards, but a fair bit taller too (roughly 220x160mm rather than 160x100mm):
IMG_20191201_0737365.jpg
They do, however, use the same DIN 41612 type B connectors:
IMG_20191201_0740404.jpg
Here's a look inside the subrack with all the cards removed. The power supply card takes its 240V along the red DE-9 connector (!) and outputs DC values on the beige DIN connector.
IMG_20191201_0742132.jpg
I'd hoped that the power supply card included would be an adjustable two-voltage power supply that I could repurpose for 5V and 12V use. On opening the card up, I was a little underwhelmed:
IMG_20191201_0748241.jpg
It's just a pair of commercial 7V DC power supplies cable-tied to the board! :shock:

Turning round to the back of the subrack, we have a vast array of connectors who's name escapes me at the moment:
IMG_20191201_0751237.jpg
Open the two thumbscrews, and the rear panel folds down like so:
IMG_20191201_0752065.jpg
The wires from the rear connectors are trunked together and soldered to the backplane connectors. Connections between the backplane connectors are wire-wrapped.

The fact that the subrack is 4U rather than 3U makes things a little bit more complex. My intention was to put together something like a System 3, with a floppy drive mounted alongside the cards:
Image
With a 4U rack, I'll need to move the card guides closer together to hold 100mm-height cards, and relocate the backplane panel to match. It will, however, let me mount a floppy drive vertically, like the System 5 chassis:
Image
Looks like I've got a bit of work to do!
IMG_20191201_0756331.jpg
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
jgharston
Posts: 4081
Joined: Thu Sep 24, 2009 12:22 pm
Location: Whitby/Sheffield
Contact:

Re: Expanding a System 1

Post by jgharston » Sun Dec 01, 2019 11:48 am

Kazzie wrote:
Sun Dec 01, 2019 9:40 am
I've been searching on-and-off for a few months for a suitable ASCII keyboard, or a donor to let me build one.
I mayyyyyy have one of these spare. I need to dig through the basement, I may have cannibalised it.

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.32
(C) Copyright J.G.Harston 1989,2005-2020
>_

PhilYoung
Posts: 205
Joined: Sun Jun 12, 2011 5:55 pm
Contact:

Re: Expanding a System 1

Post by PhilYoung » Sun Dec 01, 2019 12:25 pm

Kazzie wrote:
Sun Dec 01, 2019 10:28 am

Turning round to the back of the subrack, we have a vast array of connectors who's name escapes me at the moment:
Varicon.

https://www.canford.co.uk/Index/Varicon-connectors (for example).

Cheers,

Phil Young

Kazzie
Posts: 1793
Joined: Sun Oct 15, 2017 8:10 pm
Location: North Wales
Contact:

Re: Expanding a System 1

Post by Kazzie » Sun Dec 01, 2019 1:11 pm

PhilYoung wrote:
Sun Dec 01, 2019 12:25 pm
Kazzie wrote:
Sun Dec 01, 2019 10:28 am

Turning round to the back of the subrack, we have a vast array of connectors who's name escapes me at the moment:
Varicon.

https://www.canford.co.uk/Index/Varicon-connectors (for example).

Cheers,

Phil Young
Thanks. I had searched for and found the name, then forgot again by the time I wrote the above post.
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

Kazzie
Posts: 1793
Joined: Sun Oct 15, 2017 8:10 pm
Location: North Wales
Contact:

Re: Expanding a System 1

Post by Kazzie » Sun Dec 01, 2019 1:12 pm

jgharston wrote:
Sun Dec 01, 2019 11:48 am
Kazzie wrote:
Sun Dec 01, 2019 9:40 am
I've been searching on-and-off for a few months for a suitable ASCII keyboard, or a donor to let me build one.
I mayyyyyy have one of these spare. I need to dig through the basement, I may have cannibalised it.
If it should happen to surface, and depending on the extent of its cannibalisation, I'd be very interested to hear from you!
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

Kazzie
Posts: 1793
Joined: Sun Oct 15, 2017 8:10 pm
Location: North Wales
Contact:

Re: Expanding a System 1

Post by Kazzie » Tue Dec 24, 2019 5:30 pm

Progress has been a bit slow over the past weeks, due to a combination of work and illness. But there have been two notable arrivals:

Chris (ChrisO) kindly offered to send me a copy of a System backplane that he's had re-manufactured. That should work nicely in my subrack, once I decide how I'm going to adapt it for 160x100mm eurocards.

Dave (daveejhitchins) has sent an old BBC keyboard that will be rewired (and have a new surround built?) to work as an ASCII keyboard to operate the System when it's running its Cassette Operating System (COS) or DOS. The red BBC function keys have stayed with him, as they'll be of no use with the System.
IMG_20191224_1214262.jpg
Backplane and Donor Keyboard
Three eurocards fit in my aluminium enclosure at a spacing of slightly more than 1/2" (11/20" iirc). Unfortunately that spacing doesn't suit my plan of making a mini-backplane out of stripboard: I could fit the top and bottom cards in with 11 holes of spacing, but the middle one would be skee-wiff.
IMG_20191223_1433356.jpg
Existing System 1 card, with the work-in-progress VDU card and a placeholder card as a mock-up.
I'd desoldered the wiring loom that attached the subrack's backplane. The backplane is an aluminium sheet with holes cut out for the DIN 41612 connectors, and screwed into position. Loosening the screws on two connectors gave enough wiggle-room to eek an extra 1/10" of space, so that the top and bottom connectors line up nicely with the cards. I've lopped off that end of the backplane sheet, with the intention of machining it down when I'm back at work. Later I'll cut a new hole half-way in-between to mount the third connector.
IMG_20191223_1433176.jpg
The top two connectors are plugged into the upper and lower eurocards. The third connector is currently overhanging the enclosure.
I've gathered all the components I'll need to finish building the VDU card. I'm planning on getting that done in the next week or so, now that I've got during some spare time before the new year (family and kids permitting!).
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

Kazzie
Posts: 1793
Joined: Sun Oct 15, 2017 8:10 pm
Location: North Wales
Contact:

Re: Expanding a System 1

Post by Kazzie » Mon Dec 30, 2019 4:40 pm

There's been some slow-and-steady progress on building the VDU card over the past week:
IMG_20191201_0727016.jpg
Mid-December
IMG_20191230_1604130.jpg
Today
Most of the wiring is done, it's largely the video output from the SAA5050 and the power supplies to finish off. The pins sticking up on the DIN connector are for the optional control lines on the B-side of the board. If I choose to use them, I don't want them soldered to the same stripboard strips as all the A-side pins.

I found I'd done an oafish blooper and fitted 20-pin sockets for 18-pin 2114 RAM chips. #-o A little bit of rewiring was needed, but rather than desolder the sockets completely I've fitted a "blocking wire" over the unused holes to make sure I insert the chips in the right place.

I've typed up the listings for controlling the VDU card from the System 1. They look correct from an eyeball at the generated hexadecimal files, but naturally I haven't tested them on real hardware yet. They're on the software thread, here.
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
1024MAK
Posts: 10230
Joined: Mon Apr 18, 2011 5:46 pm
Location: Looking forward to summer in Somerset, UK...
Contact:

Re: Expanding a System 1

Post by 1024MAK » Mon Dec 30, 2019 5:56 pm

It will never work, there’s no red wire to cut to defuse it by a movie superhero :shock: :lol:

That’s a weird mix of socket types. I mostly get all my DIL sockets from Rapid Electronics.

Still, some good progress :D I hope it works first time for you :mrgreen:

Mark

Kazzie
Posts: 1793
Joined: Sun Oct 15, 2017 8:10 pm
Location: North Wales
Contact:

Re: Expanding a System 1

Post by Kazzie » Mon Dec 30, 2019 7:24 pm

1024MAK wrote:
Mon Dec 30, 2019 5:56 pm
It will never work, there’s no red wire to cut to defuse it by a movie superhero :shock: :lol:

That’s a weird mix of socket types. I mostly get all my DIL sockets from Rapid Electronics.
I'm still getting a lot of my DIL sockets from an drawer of old parts at work ;)

Putting together such a dense layout on stripboard has been challenging. Those masses of wires aren't the tidiest of things, but I don't expect to run this card much beyond 1MHz, so high-speed digital design guidelines be damned! :D
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

Kazzie
Posts: 1793
Joined: Sun Oct 15, 2017 8:10 pm
Location: North Wales
Contact:

Re: Expanding a System 1

Post by Kazzie » Wed Jan 01, 2020 8:57 pm

Good news for movie superheros, the red wires have been fitted!
IMG_20200101_2051164.jpg
That's all the wires and passives fitted, and tracks cut on the back of the veroboard. No testing done yet, and I need to wire up my mini-backplane before I can connect it to my System 1. A job for the weekend...
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

Kazzie
Posts: 1793
Joined: Sun Oct 15, 2017 8:10 pm
Location: North Wales
Contact:

Re: Expanding a System 1

Post by Kazzie » Sun Jan 19, 2020 10:47 am

Sorry about the long delay, without a post, I thought I'd written another report, but it seems not. I've got a lot to catch-up on in this post!

The first thing I did was set about sorting out my mini-backplane. Step one was to remove the existing wire-wrap connections:
IMG_20200104_0807074.jpg
Removing old wire-wrap
Then cutting a new slot in between two of the existing slots, and trimming down the remaining metal:
IMG_20200105_1539308.jpg
Backplane trimmed, and new slot cut in the middle
Followed by a fresh round of wire-wrapping:
IMG_20200107_2051417.jpg
Wired-up and ready to go
Having fitted the relevant ICs, here's my VDU card in it's mini-rack:
IMG_20200107_2052188.jpg
VDU in-situ
...and then we hit the snag list. If the board were working correctly, I'd expect to be able to:
  • Configure the 6845 by writing its registers at &0800/&0801
  • Read and write from the display RAM mapped to &0400-&07FF
  • See an image generated by the SAA5050 onscreen
Naturally, life was not that straight-forward...



On power-up, the System 1 + VDU gave garbage (composite) output on my monochrome display, as expected:
IMG_20200111_1511406.jpg
Uninitialised 6845
Running the VDU and KEYWRITE program (and pressing 'R') gave a blank screen with sensible sync signals:
IMG_20200111_1512006.jpg
6845 initialised, screen blank
so the System 1 was clearly able to write to the 6845's registers correctly. But there was no joy with the RAM at all.

Normally, when reading an unmapped portion of memory using the System Monitor, the contents of the non-existent memory appear to be the upper half of the address given (e.g. &0943 is unmapped, and will appear to contain &09), and refuse to be overwritten. This appears to be an "echo" on the undriven data bus. The RAM on my System 1 card has default values of &66 and &99 (alternating), and can be overwritten by using the hex keypad.

Reading addresses in the display RAM area gave one of a number of values (e.g. &45 or &59), and couldn't be overwritten. On changing address (with the ^ and \/ keys) the contents of a given address would sometimes be different. Cue a lot of head-scratching, swapping out RAM chips and bus transceivers, and tracing chip-enable signals, but to no avail.

Curiously, if I removed the 6845, I was able to read and write to addresses &0400-07FF, but writing to one location over-wrote the contents of al the other memory locations too!

Eventually, I realised that I'd wired up the the A and B inputs of the 74ls157 chips back-to-front. I routed the backplane address lines from the north of the chips, and the 6845-generated address lines from the south. Without thinking, I connected the backplane wires (from the north) to the north-most pin of each multiplexer pair (i.e. pins 2, 5, 11, 14), whereas they should have gone to the other pin (pins 3, 6, 10, 13). The net result was that when the System was accessing the RAM, it was using the 6845-generated address, and the SAA5050 was using addresses off the System's address bus (or is would have if the transciever were enabled). Oops! :oops:

After a fair bit of wire-swapping, I was able to read and write to individual memory locations correctly. Well some locations: I discovered last night that &0400 is currently mirroring to &0500, &0600, &0700, &0401 to &0501 and so-on. A bit more to do on that front, then... :roll:

With control over the 6845 and access to the display RAM, I was hoping to see something on-screen by now. Things remained very black (or dark grey), however. A probe around the SAA5050's colour outputs showed no activity there, the only thing getting to the display was the sync signals from the 6845. Further poking around indicated that the SAA5050 wasn't actually running, due to a missing (weak) 6MHz dot clock on pin 19. Here's the schematic:
40x25VDU-6MHzClock.png
6MHz dot clock generation on Issue 2 40x25 VDU board
The input on the right is an inverted Phi2 signal (at 2MHz). The output on the right should be a 6MHz square wave for the dot clock.

The core of the circuit is a Schmitt trigger oscillator, with the time period controlled by the variable resistor and the 270pF capacitor. The second Schmitt gate tidies up the resulting wave for the SAA5050. Inputting the 2MHz /Phi2 signal into pin 1 of the first gate should reset the oscillation after three 6MHz cycles, keeping the dot clock in sync with the system clock. At least that's how I've interpreted it.

Note that Issue 1 boards had a different arrangement, swapping the two Schmitt gates around, and changing the values of the resistor ladder before the oscillating Schmitt gate. The clock for IC10 (for the cursor generation) was taken at a slightly different point too:
40x25VDU-6MHzClock-issue1.png
6MHz dot clock generation on Issue 1 40x25 VDU board
(Issue 2 is the one I followed when building.)

Snooping around this portion of my circuit, I found that I'd fitted a pair of 100R resistors for R1 and R2 (instead of 1K), and that there was a poor solder joint connecting C8 to ground. Having fixed these the amplitude of the clock signal at pin 19 of the SAA5050 is better, and it responds to twiddling resistor R3, but there's still not much activity from the SAA5050 itself. My cheap pocket scope isn't able to show me a very good picture of what's going on, so I'll have to take the board into work and have a look there.

There's also a bit of planning work done for the ASCII keyboard, but that will have to be in another post.
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

ChrisO
Posts: 41
Joined: Thu Oct 04, 2018 8:40 pm
Location: Northampton
Contact:

Re: Expanding a System 1

Post by ChrisO » Sun Jan 19, 2020 12:12 pm

Kassie

I've had a look at my original Issue 3 PCB and that is wired as per the Issue 4 schematic i.e. with the buffer after the oscillator rather than before.

Have you wired IC2 pin 2 correctly ?, it's shown tied to +5V on both versions of the schematic but it should be tied to 0V ?

Chris

Kazzie
Posts: 1793
Joined: Sun Oct 15, 2017 8:10 pm
Location: North Wales
Contact:

Re: Expanding a System 1

Post by Kazzie » Sun Jan 19, 2020 2:43 pm

ChrisO wrote:
Sun Jan 19, 2020 12:12 pm
Kassie

I've had a look at my original Issue 3 PCB and that is wired as per the Issue 4 schematic i.e. with the buffer after the oscillator rather than before.

Have you wired IC2 pin 2 correctly ?, it's shown tied to +5V on both versions of the schematic but it should be tied to 0V ?

Chris
That's a good thought, but I followed the advice on your website and made sure I corrected that. (A NOR 0 = /A, whereas A NOR 1 = 0, so the schematic is definitely wrong!)
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

Kazzie
Posts: 1793
Joined: Sun Oct 15, 2017 8:10 pm
Location: North Wales
Contact:

Re: Expanding a System 1

Post by Kazzie » Sun Jan 19, 2020 4:42 pm

Now for some keyboard progress:

Firstly, a test of the donor keyboard, before I do anything to it. Some of the keys needed a fair bit of pressing/hammering to clean up (the C and COPY keys were particularly stubborn) but they're all working:
IMG_20200118_0726278.jpg

Next, what to actually do with it... :twisted:

The original Acorn ASCII keyboard used an AY-3-4592 IC as its keyboard encoder. These are fairly rare these days, and prices are pushing £40 per chip. :shock:

Thankfully, Acorn were at pains to point out that their system was compatible with any ASCII keyboard, so there's no need to stick to their design.

I found a few reference designs on the internet that use the AY-5-2376 (aka. KR2376) keyboard encoder instead. This is available for less than a third of the price of the AY-3-4592. It has the disadvantage of requiring a -12V supply, but a MC34063A regulator will generate that from a 5V source. :)

Here's one such reference design, a Jameco JE-610 that was sold in 1979:
Jameco_JE-610-image.png
Jameco's design gives an eight-bit ASCII output, plus parity bit, as well as the strobe signal indicating that a key's been pressed. That's over and beyond the seven bits plus strobe that Acorn's keyboard offers (and the System expects as input).

The Jameco design is intended for a locking Caps Lock key. (The Acorn Keyboard is as well, but has what appears to be a momentary Shift Lock that's monitored by its AY-3-4592). The BBC keyboard that I'm using as a donor has momentary Caps and Shift Locks, which I'd like to use if possible. Debouncing with a Schmitt inverter and clocking a T Flip Flop should allow me to latch them electrically.

The datasheets available online for the AY-5-2376 are broadly readable, but the one place they fall short is in describing the outputs for a given input on the keyboard matrix: it's a fine grid with tiny squares filled in to indicate nine logic levels for each keypress, with an ASCII name adjacent. Scanning in 1-bit colour at a moderate resolution hasn't really done it any favours!

The AY-5-2376 only has inputs for two modifier keys: Shift and Control (plus an option to invert parity). The JE-610 handles the Caps Lock with discrete logic, but it's not clear at a glance whether it operates as a Caps Lock (affecting only letters) or a Shift Lock (affecting all keys). As it toggles output D5 based on the value of D5 and the modifier keys, it couldn't distinguish between a P and a [, for example, as they both have D5 low.

Staring at the mess that is the output grid of the datasheet, I thought I identified a useful pattern in the highest order bit, D7. Not wanting to rely on the murky datasheet, I set up my AY-5-2376 along with some inverters and hex output LEDs on my breadboard:
IMG_20200119_1057132.jpg
The AY-5-2376 is at the top-right, with yellow wires taking one nybble (plus strobe and parity outputs) to the two 74ls04 hex inverters and TIL311 displays. To the left of the AY-5-2376 an orange wire is holding the Shift input (pin 4) high, and a purple wire is holding the Control input (pin 5) low. The purple wire to the right of the AY-5-2376 is shorting pin X5 of the keyboard matrix to pin Y8, which is the A key. ASCII code 41 (capital A) is shown on the displays.

Toggling the Shift input for the A key alternates between ASCII code 41 and 61, for A and a respectively. For the ] key, it toggles between FD and 5D for } and ], though we might have expected } to display 7D. For non-alphabetical keys, The AY-5-2376 turns on D7 when Shift is pressed. That means we can indeed have both Caps Lock and a Shift Lock functionality built around an AY-5-2376, by using the value of D7 to decide whether to toggle D5 or not. :)

---

In summary, for my keyboard circuit I'll need to include latches for the momentary Shift and Caps Lock keys, and then a circuit to toggle D5 (or not) depending on whether Caps Lock is enabled, using D8 to help us identify letter keys. I'll also want a reset/break key, for which I'll probably lean on the 555-based design in Acorn's keyboard.
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
jgharston
Posts: 4081
Joined: Thu Sep 24, 2009 12:22 pm
Location: Whitby/Sheffield
Contact:

Re: Expanding a System 1

Post by jgharston » Mon Jan 20, 2020 12:17 am

Is this any good. The 2376 is the same keyboard encode I used back in the '80s, and I scanned and cleaned up the datasheets. I keep meaning to type up the encoding table as a text table.

Edit: Ooo! I've just looked at the Jameco datasheet, and it's TINY!!!!

And from memory CAPS only affected letter keys, there are two D5 outputs, and you glue some logic to select the appropriate one. (Of course, the datasheet confuses issues by labelling D0-D7 as B1-B8.)

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.32
(C) Copyright J.G.Harston 1989,2005-2020
>_

Kazzie
Posts: 1793
Joined: Sun Oct 15, 2017 8:10 pm
Location: North Wales
Contact:

Re: Expanding a System 1

Post by Kazzie » Mon Jan 20, 2020 9:33 am

jgharston wrote:
Mon Jan 20, 2020 12:17 am
Is this any good. The 2376 is the same keyboard encode I used back in the '80s, and I scanned and cleaned up the datasheets. I keep meaning to type up the encoding table as a text table.

Edit: Ooo! I've just looked at the Jameco datasheet, and it's TINY!!!!

And from memory CAPS only affected letter keys, there are two D5 outputs, and you glue some logic to select the appropriate one. (Of course, the datasheet confuses issues by labelling D0-D7 as B1-B8.)
Thanks for that link! :D (I think I may have stumbled across that page a while back when researching possible encoder chips, but disregarded it because of the mention of the Spectrum interface, and never looked at the datasheet. Either way, thanks for bringing it to my attention.)

That RS keyboard (and RS2376) datasheet is really useful: not only has it got a legible copy of the bit output table from the Jameco/GI datasheet, but it's also got a typed-out table of character, bits, and ASCII code for every key used by their keyboard. I would probably have wanted to prototype up my chip anyway, to make sure that I didn't have one of the EBCDIC-output versions that GI apparently made, but it confirms my conclusions about the D7 values.

The RS circuit handles Caps Lock in a far clearer manner than the Jameco circuit, it neatly boils down to "if Caps Lock is on (and Shift isn't pressed) then swap D5 and D7 (B6 and B8)". There are two copies of the D5 and D7 outputs, one that may be swapped by Caps Lock, and another that always gives the unmodified output of the 2376. The Jameco cirucit, on the other hand, inverts D5 and leaves D7 as it is. That would make the parity bit incorrect, so it needs to change the "parity invert" input to the 2376 (pin 6) to compensate. (It does this with a feedback loop, using the output of D5, plus the state of the Shift, Control and Caps keys to control the Parity Invert input, and the Caps Lock logic.)

The Jameco circuit has the "invert output" (pin 20) of the 2376 active, then uses a bank of inverters to re-invert and buffer the keyboard's output. The RS circuit foregoes this and just goes with unbuffered, uninverted outputs.

P.S. The Jameco copy of the 2376 datasheet is one of the worst copies of the bit output table, but the others, such as this GI original at the Internet Archive, aren't much better.
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
jgharston
Posts: 4081
Joined: Thu Sep 24, 2009 12:22 pm
Location: Whitby/Sheffield
Contact:

Re: Expanding a System 1 into a System 2

Post by jgharston » Mon Jan 20, 2020 6:13 pm

I was sure I'd uploaded a text type-up of the keycode outputs, and I had, I'd just forgotten to link to it!
Here: http://mdfs.net/Docs/Comp/Keyboard/RS2376.txt

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.32
(C) Copyright J.G.Harston 1989,2005-2020
>_

User avatar
anightin
Posts: 560
Joined: Thu Aug 23, 2018 2:03 pm
Location: Cambridge UK
Contact:

Re: Expanding a System 1 into a System 2

Post by anightin » Mon Feb 03, 2020 11:50 pm

Got my System 2 up and running this evening, now on to System 3 and a BASIC ROM :)
IMG_5853.jpeg

Update: Now it's a System 3 :D
IMG_5854.jpeg

Kazzie
Posts: 1793
Joined: Sun Oct 15, 2017 8:10 pm
Location: North Wales
Contact:

Re: Expanding a System 1 into a System 2

Post by Kazzie » Sun May 10, 2020 8:19 am

It's been a while since I posted to this thread, mainly because I'd had little success to report.

Connecting the 40x25 VDU card to my System 1 board via my backplane was a marginal success, at best. The extra load on the backplane (particularly on the data lines) meant that the INS8154 garbled its display. Note this 'u' that's shown up in the middle of displaying the contents of memory address 0400:
IMG_20200510_0755533.jpg
Should read "A0400 00", not "A0400u00"
The CPu still responded to keypresses, for a while, but would eventualy hand at some point. Removing the data bus buffer (IC11) from the VDU card made this problem go away, but then of course I couldn't access the display RAM. :? Alternatively sticking the VDU card on the end of an extension card (eurocard-sized stripboard with DIN41612 connectors on either end, carrying side A from one end to the other) gave similar corruption, even with the data bus buffer removed. (Removing chips loading the address bus had no obvious effect.)

A poke at the data bus with an oscilloscope showed that things were a bit ugly:
IMG_20200215_0756346.jpg
D0 looking jaggedy and overlapping with itself (due to scope triggering)
IMG_20200215_0936099.jpg
D0 (bottom) using Phi2 (top) for triggering
Whereas without the VDU card attached, it looked like this:
IMG_20200215_0937484.jpg
(Vertical scale may have been changed, can't remember)
I played with fitting some pull-up or pull-down resistors to the data bus to try to deal with this dampening, but to no avail.
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

Kazzie
Posts: 1793
Joined: Sun Oct 15, 2017 8:10 pm
Location: North Wales
Contact:

Re: Expanding a System 1 into a System 2

Post by Kazzie » Sun May 10, 2020 9:06 am

The offer of a blank System CPU card from Kcsi (see this thread) let me test whether my card's data bus really was marginal-to-failing when connected to any other cards.

Some details on the build of the new CPU card can be found in this post of the other thread.

Putting everything together was a bit of a Heath Robinson lashup, but it worked:
IMG_20200509_1553492.jpg
The PSU and clock source are on the stool, connected to new CPU card in mini backplane, in turn connected to my keypad adapter, connected to my old CPU card to use the cassette interface, which is connected to my laptop to play audio files of the VDU and KEYWRITE programs. VDU card sits above the new CPU card on the backplane, plugged into my green Zenith display.

And what's that on the screen?
IMG_20200509_1547367.jpg
:D :D :D

There were still a few bugs to iron out however. Having the keypad on an extension lead, allowing me to park the VDU at the top of the backplane for probing with a scope made life a lot easier.

I'd missed out a grounding link for pin 27, which meant that the /PICTURE ON signal was floating. That led to some fun effects involving hand-waving around the left side of the card to persuade the card to display an image, until I worked out where the fault was:
IMG_20200509_1927263.jpg
Hand removed, only some of the left-most characters is displayed
IMG_20200509_1927440.jpg
Hand covering the SAA5050, a more stable display with eight columns of characters nice and crisp.
Even after fitting that missing link, characters from the ninth character onwards didn't show on the display. Further investigation showed that the first eight characters showed up fine, the next sixteen didn't show up, and then the next eight characters showed up in their correct places, and duplicated twice in the space of the previous sixteen character locations. The ASCII values showed in the right locations on the keypad display, so the CPU was managing to write and read the values correctly.
IMG_20200509_2103161.jpg
Characters J-P are repeated in three locations. See also the repetition of 'i', and '/' lower down.
Crunching the numbers of the address locations affected, there was some funny business going on with address bits 3 and 4:

Code: Select all

A3 A4 Result
 0  0 Displays correctly
 0  1 Character not displayed
 1  0 Character not displayed
 1  1 Character displayed in three locations (those of A3&4 set 01, 10, 11)
Examining the underside of the board, a solder bridge was found between the A3 and A4 outputs of the 6845 address generator. Cleaning that up got a near perfect output by the end of the night:
IMG_20200509_2206078.jpg
One of my favourite limericks, but the last line should read "and made cider inside her inside" - I was tired!
There's still some funny business going on at the very left-hand side of the screen. The column of dashes (-) is outside the 40x25 character area, but is dependent on the screen data. Each of the extra left-hand characters is derived from the 24th character on the next line, but with bit 6 set. Letters are unaffected as bit 7 is set already, but '!' becomes 'a', and ' ' (space) becomes '-'. (It would be '`' in ASCII, but the teletext character set is different.) I'm not sure what could be causing this, perhaps someone else with a 40x25 VDU card, or more experience with the 6845/SAA5050 could offer a suggestion? (Paging Tricky! :p)

In the meantime, I tried the tweaked VDU card with my original CPU card, and found it would now work, but was still prone to garbling the keypad display or crashing altogether if the cards or backplane were touched. Whether that's due to the rat's nest wiring, or the fact that the W65C02 CPU in the new card can drive the bus better, I'm not sure. Either way, it got my son interested enough to start mashing some keypad buttons this morning. :lol:
Attachments
IMG_20200510_0754415.jpg
The Acorn System range. So simple, a two-year-old can use it!
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

Kazzie
Posts: 1793
Joined: Sun Oct 15, 2017 8:10 pm
Location: North Wales
Contact:

Re: Expanding a System 1 into a System 2

Post by Kazzie » Mon May 11, 2020 8:32 am

Some further musings on the cause of the extra column of characters to the left of the actual display...

Bit 6 (which is set in the extra column) doesn't come straight from the RAM: it goes via two NAND gates. In the first it is NANDed with 5V (just inverted), then it is NANDed with the DISEN signal from the 6845. So if DISEN is high, D6 at the SAA5050 will be equal to the D6 output from the RAM (disregarding gate delays), but if DISEN is low, it will be forced high.

The DISEN signal from the 6845 also goes to the SAA5050's LOSE input, via some flip-flops. The SAA5020 datasheet describes it (in a bit more detail than the SAA5050 sheet) thus:
This output signal to the SAA5050 Teletext Character Generator is used to reset internal control character flip-flops prior to the start of each display line. This signal also defines the character display period. It is a positive going pulse of duration 40us starting 14.5ps after the start of the line and occurs on lines 49 to 288 and 362 to 601 only.
The 6845 is continuously generating addresses, even when it's not time to display anything on-screen: that's part of how it helps with DRAM refresh. So if the LOSE signal is going high slightly too early, that will cause the SAA5050 to display the contents of some garbage address that the 6845 had just been requesting from the RAM chips. The data that's displayed has bit 6 set high, which happens when the DISEN signal is still low. But the LOSE signal is a delayed version of the DISEN signal, so it shouldn't be possible for that to go high before IC14 stops forcing bit 6 high. :?

The two schematics for the 40x25 VDU card at TheOddys differ in how the LOSE signal is delayed. In the Issue 1 (August 1979) schematic it is delayed by one flip-flop from IC10, which is clocked by the inverse of the 6845's clock signal. In the Isuse 4 (June 1982) schematic it is delayed by two flip-flops from IC10, which is clocked by the same clock signal as the 6845. I built my card according to schematic 4, so LOSE ought to go high two clock cycles after DISEN reaches IC14.

I'll take a look to see what's actually happening on my card when I've got the scope out again later this week.
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

ChrisO
Posts: 41
Joined: Thu Oct 04, 2018 8:40 pm
Location: Northampton
Contact:

Re: Expanding a System 1 into a System 2

Post by ChrisO » Mon May 11, 2020 8:21 pm

The 80 column VDU card works in a similar fashion though the designer has taken short cuts and not used D-type flip flops but crude RC delays. Its not very effective, neither accurate or consistant. I've modified the design to incorporate D-type delays which gives a far more stable display, just waiting for a new PCB to arrive. The 80 column VDU also relies on the use of the Hitachi version of the 6845 - HD46505SP, this is able to provide additional cursor delay via register 8. Unfortunatly this IC is not as easy to come by - there are plenty on eBay from a certain far eastern country which are labelled HD46505SP but beware they are not (especially those with batch code 4B4) ! I have been able to confirm my modified design works using pucker Hitachi parts, it is linkable to work with either variant of '6845'.
Chris

User avatar
anightin
Posts: 560
Joined: Thu Aug 23, 2018 2:03 pm
Location: Cambridge UK
Contact:

Re: Expanding a System 1 into a System 2

Post by anightin » Tue May 12, 2020 8:17 am

I don't know if it helps on your setup Kazzie but I can 'tune in/out' the column on the LHS on my VDU card by twiddling the R3 preset to adjust the 6MHz character dot clock. My R3 is a 470R part. I get the lines to appear at the higher end of the adjustment.

Kazzie
Posts: 1793
Joined: Sun Oct 15, 2017 8:10 pm
Location: North Wales
Contact:

Re: Expanding a System 1 into a System 2

Post by Kazzie » Tue May 12, 2020 3:02 pm

That's useful information , Chris: an 80-column card is on the list, but a bit further down. I'll bear it in mind when I come to shopping for a suitable 6845.
anightin wrote:
Tue May 12, 2020 8:17 am
I don't know if it helps on your setup Kazzie but I can 'tune in/out' the column on the LHS on my VDU card by twiddling the R3 preset to adjust the 6MHz character dot clock. My R3 is a 470R part. I get the lines to appear at the higher end of the adjustment.
Mine's a 470R pot, and I don't recall twiddling it since I got an image onscreen: I'd previously calibrated it by eye to 6MHz on my scope. I'll definitely investigate it when I get some time at the workbench (probably tomorrow evening).

Thanks to both of you. :)
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

Kazzie
Posts: 1793
Joined: Sun Oct 15, 2017 8:10 pm
Location: North Wales
Contact:

Re: Expanding a System 1 into a System 2

Post by Kazzie » Thu May 14, 2020 7:15 am

Twiddling the pot had an effect, though the result wasn't quite as good as I'd hoped:
IMG_20200514_0700128.jpg
Before twiddling
IMG_20200514_0700370.jpg
After twiddling
Note that while the extra column of characters is gone, the remaining characters are no longer as crisp: the pixel rounding done by the SAA5050 seems to have been knocked off somewhat.

The untwiddled clock was pretty close to 6MHz, and after twiddling the last of every six cycles was being stretched (i.e. if I'd kept turning I'd have been fitting another cycle within the Phi2 cycle, and hit 7MHz).

I'll try throwing another flip-flop delay in to the DISEN/LOSE signal path, to see if that gives a better result.
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

Kazzie
Posts: 1793
Joined: Sun Oct 15, 2017 8:10 pm
Location: North Wales
Contact:

Re: Expanding a System 1 into a System 2

Post by Kazzie » Thu May 14, 2020 8:38 am

Right, adding another flip-flop of delay didn't work:
IMG_20200514_0753433.jpg
With three flip-flop delays, we get a blocky mess
Not too surprising, when you consider that the flip-flops are clocked at 1MHz.

While I was poking the area under the 'ls174 with my soldering iron, I took the opportunity to fix the cursor delay circuit. I'd misread the chip's pinout, and not noticed that two of the flip-flops are reversed. (My miswirind had left the SAA505's cursor input permanently enabled, so the screen was permanently inverted, with no flashing cursor.)

Having turned on the cursor, it's clear to me that the tidy characters I'd prefered are the wrong width for the cursor. The wider, slightly blockier characters are a better fit:
IMG_20200514_0816339.jpg
With cursor enabled, the neat characters are clearly too narrow
IMG_20200514_0817187.jpg
Not as neat, but as Acorn intended?
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
anightin
Posts: 560
Joined: Thu Aug 23, 2018 2:03 pm
Location: Cambridge UK
Contact:

Re: Expanding a System 1 into a System 2

Post by anightin » Thu May 14, 2020 9:06 am

Nice one Kazzie, yes these look correct and they are not as quite as neat as the ones the Beeb produces.

Kazzie
Posts: 1793
Joined: Sun Oct 15, 2017 8:10 pm
Location: North Wales
Contact:

Re: Expanding a System 1 into a System 2

Post by Kazzie » Thu May 14, 2020 10:31 pm

Having established that the card is fully working, I've attached some proper video sockets on it:
IMG_20200514_2044203.jpg
It can now give composite output (as viewed on my Green Zenith):
IMG_20200514_2044266.jpg
Or glorious RGB technicolor (as seen on my CM8833):
IMG_20200514_2044588.jpg
One little detail that I find offputting is that the cursor blinks at a different rate to the flashing teletext characters. I don't recall that being the case with the Beeb. (Though I'm not fussed enough to dig it out and plug it in tonight!)
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

Kazzie
Posts: 1793
Joined: Sun Oct 15, 2017 8:10 pm
Location: North Wales
Contact:

Re: Expanding a System 1 into a System 2

Post by Kazzie » Fri May 15, 2020 9:20 pm

This evening I've populated the clock generation corner of the new CPU card, so it no longer needs to be lashed up to an external clock source. Other tweaks include swapping out the big red socket, and fitting a right-angle IDC header for the keypad/keyboard.
IMG_20200515_1959293.jpg
I've also burned a new EPROM, to replace the System 1 Monitor program:
IMG_20200515_2000257.jpg
It's a bit limited in functionality for now, as it's sat waiting for input from a non-existent ASCII keyboard. Well I say non-existent: the main decoding circuit is sat on a breadboard and the keyswitches are in the process of being removed from their current home on the ex-Beeb donor keyboard, prior to rewiring it.
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

Post Reply

Return to “acorn atom and acorn system series”