Archive for October, 2020

Cheap and cheerful DRAM tester

October 30, 2020

While working on my Commodore PET 4032 I had a strange problem where it started chirping like it normally does in the boot up sequence and then crashed with some extra characters on the screen. There it sat, and when I rebooted it would make some terrible sorrowful beeping not at all like it was supposed to make and it hung. The issue was very quickly found with the Commodore PET RAM/ROM board. I installed it, switched to using all possible resources from that board and it booted well. Systematically turning things off I found the issue to be in the first 16k of RAM. According to the (almost my board) schematics that meant every odd numbered ram chip.

Given that each chip is supplying one of the bits to the entire 16k bank I didn’t know which chip it was. I removed the one socketed low RAM chip to prove to myself that I had the right bank and sure enough the computer started up fine with the RAM bank replaced with the red board, but failed to boot otherwise. It is important to note that if I had removed a chip from the wrong bank the commodore would also have booted, but it would only show 16k of RAM because one of the bits from the high bank would be missing. I did things in the wrong order and while I waited for some parts for my DRAM tester I removed and socketed all the low ram chips. This did not go smoothly. On my board the chips that had been soldered down had their legs clipped so they do not insert well into machine pin sockets, but interestingly enough they work fine in double wipe sockets. I had just ensured that I would be replacing the entire bank with new ram chips and saving the working 4116s for repairs elsewhere.

Now on to the actual tester. My full BoM is an arduino pro mini, a 5v-to-12v step up converter, a 5v-to-negative5v converter, some LEDs, sockets, jumpers, and wire. With the two voltage modules selected and tweaked in (they come with potentiometers, be careful as the output seems related to the input so it’s scaling not regulating). I followed (mostly) the schematic laid out here for a 41256 ram tester. It also has a jumper that allows you to test 4164 chips (which I need) so I decided to start there. The code I wrote is pulled from him as well, but I made a few modifications for my needs. I changed the LEDs to be active high because I had already soldered them that way before I looked at the code. I moved the LEDs down one and added a second mode bit so I can now test for 4116 chips as well. I also bumped the baud rate up because I usually run 115,200 on my stuff. That’s it, the code seems to wok really well and scaled down to 4116s without complaining one bit. The hardware configuration was a bit trickier.

I had first found this nice site explaining pinouts of various 16 pin DRAM chips and how to substitute newer ones for older ones. It seems that the 41256 and the 4164 are identical except pin 1 is not used on the maller module and is another address line on the larger one. That is why the creator of the code I borrowed opted to do both, they’re very compatible. The 4116 is a little different. In addition to dropping another address line it adds two new voltages on the pins that are not used. We need to inject negative 5v on pin 1 (instead of an address line on the 256 and nothing on the 64) and put 12v on pin 8 which is where the other two draw their 5v from. The 4116 still uses 5v but it gets it from pin 9 which is where that last address line just disappeared from. This means we need a jumper at pin 1 to go between negative 5v and a data line, a jumper at pin 8 to go between 12v and 5v, and a jumper at pin 9 to go between a data line and 5v. That last one I went back and forth on. I could just output a high signal from the arduino and power the device under test from that logic signal directly, but looking at the datasheets for 4116 chips and knowing how power hungry old hardware can be I didn’t want to chance it.

I used colored 0.1″ header to remind me which lines were voltage and which were data. That will help in the future if I want to look at this device again without having to reference my documentation (which you are reading right now). Coincidentally I got a free power jack because my 5v to 12v converter has a micro usb port on it so I can run this without needing a bench supply or barrel jack.

Working once again (used but clipped 4116 chips seen to the left)

I elected not to cut or severely bend any pins on my 4164 chips because I didn’t need to. If I ever have spare 4116 chips and need to reclaim some 4164s from this PET I can do that with in the future.

Poly-88 S100 system raised from the dead

October 25, 2020

Back at Makerfaire Detroit I did a booth with my buddy Frank. We showed off a bunch of vintage computers we had fixed over the prior year and had them set up for use. Because of this a member of our hackerspace offered me some spare vintage stuff he had which either didn’t work or were just undesirable parts for some reason. Of course I accepted and we still haven’t gone through and gotten all of it working.

The pile

Here’s the pile of hardware. There are a couple things to notice. There’s two 8″ floppy drives there and an enclosure for said drives. Under those orange binders are two more drives in a cardboard box (probably the intact ones, two have wires gnawed by mice that I still have to fix). Those orange binders though, they’re interesting. They seem to be the original binders that came with a Poly88 S100 bus computer system, notable for being one of (possibly THE?) smallest S100 chassis that was available at the time. Let’s take a look in that last box…

Looks like we have TWO of these adorable little Poly88 chassis, some cards, and another mystery PCB. Ignoring the S100 stuff for now, what is that mystery PCB? It’s got:

  • 6x 24 pin dip spots, with 5 populated sockets
  • 3x 40 pin dip sockets
  • a bunch of 0.1″ header of indeterminate purpose
  • a screw terminal block screwed to a cable that connects to a supplied power supply board

The silk screen says: Copyright 1983 William White and Digital Research Computers. There are some other hints as to what it is by the labels at the many dip switches, but I’ll jump right to what we discovered. It is a single board computer/low cost serial terminal called the ZRT-80. It can take up to four 6116 equivalent ram chips, two 2732 rom chips, and either a 2716 or 2732 font rom (the larger rom allowing for two character sets that are swappable with an escape code). It runs on a Z80 with an 8250 serial port controller and a Hitachi 6845SP CRTC. I don’t know why that specific variant of the CRTC is needed, but that’s what the scanned version of the schematics with the handwritten note says.

Working

Once you have the key word “ZRT-80” you can find some stuff online and I have mirrored the relevant contents on my github. When you search that silk screen text now you’ll find an ebay listing for one of these boards. I thought I’d give someone the heads-up based on the fact that searching those words do not immediately reveal what the board is (until this article is published…). But that board, that the seller doesn’t seem to know what it is, is listed for $480. So no, no one should buy that. You can build something from scratch using only new or surplus chips and datasheet example circuits and it’d end up cheaper than that (and the ZRT-80 rom is out there so go nuts running that on your custom terminals). On this board I believe after I got all the missing parts to put it back together there were some bad solder joints in the oscillator section near that inductor on the right as well as a bad logic chip (74LS166) that was found by replacing the one that seemed too hot. That got it working alright

‘new’ in package

One of the things needed to make this terminal work was an ascii keyboard. This has a controller that scans a key matrix and presents data to the z80 on a parallel bus. These used to be the ubiquitous way of interfacing to early computers because of how little hardware they took to be read by processors with a proper bus architecture, but these days they can get a bit expensive. People have made adapters that will use a microcontroller to read a ps/2 keyboard and present the data as an ascii keyboard would do, but it’s nice to have a real one. Coincidentally Frank had a kit he got many years ago when radio shack was putting these on clearance. It has two missing parts, the stabilizer bar for the keyboard and the plastic bracket that that bar attaches to. Without it the spacebar will only work if pushed in the center and otherwise will bind and probably break the key that I can’t easily buy another one of.

This is a picture of the mechanism from the documentation that came with the keyboard. This is not exactly right as it doesn’t quite match what the underside of the spacebar we have looks like, but I still need to get around to making one of these using the measurements from the board.

Before I assembled it I scanned the board and all the docs which are now up on the internet archive. I believe the unpopulated spots on the pcb to the left are for a switching power supply in case you couldn’t supply the required negative 12 volts required by the ASCII keyboard standard (and this arcane controller chip). The spots sticking above the asterisk is for an external numpad which I think I will be attaching. It just gloms on to the matrix in parallel so the controller IC doesn’t even know it’s there and just works. ASCII keyboards are also cool because you can tell what the shift and control keys do very easily. All shift does is it masks off bit 6, making the keypress sent 32DEC or 0x20 lower in the table. Additionally the control key masks off bits 6 and 7 pushing the data sent down even further in the ascii table. This is where things like control-g for terminal bell come from, because if you held down the control key and pressed the ‘g’ key it would send 0x07 which is supposed to make the machine at the other end beep

This is the power supply that came with the ZRT-80. It has a connector in the middle of the cable and that pigtail is just screwed into the power supply terminals on the terminal. I assume this was not purchased for this terminal and was salvage to the person that had this thing before me, but it works so I gingerly don’t touch it.

One last thing we did (I asked for it) was that Frank massaged a font found here that looks like that famous ’80s font called ‘byte’ into the second half of a rom image to allow us to switch to this cool looking style. In reality it doesn’t read well even at 80 characters wide (instead of 96) on an apple monitor 3 (which has a nice crisp picture and lovely long persistence phosphor). It was made with some hex editing and visualized with this python script. The generated roms (with both fonts in both locations) are also on github for anyone that has one of these and wants to use it (I promised some people at VCFMW that they’d go up online).

The eventual goal for this is to locate it all in a nice wedge shaped enclosure and tote it around as a serial terminal with external composite monitor.

I realize this is going to be a very long post, but it’s gonna be one post because it’s all relevant to the /r/retrobattlestations contest so here we go into the next part: the s100 machine. In this pile of parts we got two Poly-88 chassis. The cool thing about these tiny S100 machines is you can expand them by getting another one and chaining them together side by side. We are only using one chassis right now because either due to bad contacts or something else the second one doesn’t work reliably yet (and we don’t have enough boards to warrant more than 5 slots anyhow). These are very cute, photogenic machines and ours is missing all the original cards and the distinctive orange metal cases but we can make do in the future with some orange acrylic bent into a U shape with vent holes and spots for any switches and indicators that would be useful to us.

It doesn’t seem to be shown in this schematic but I think some of the diodes in the unit we have were doubled up for current carrying capacity and one shorted. Replacing that and cleaning up some other solder joints got us a reliable chassis. We have the optional fan in both which is highly recommended and aside form some reset button cleaning and contact cleaner in the slots I think we’re pretty much good to go here.

I’m gonna talk about the next two cards at once (because I only took the one picture). We have a Solid State Music IO-4 card which is nice because we get serial and parallel ports that we can play with. The manual is really interesting because it shows just how configurable these serial ports are and gives different interfaces to mimic different cards that an off-the-shelf S100 system might be expecting. It’s not surprising that SSM makes flexible cards, One that Glitch reproduces is also nice, the IO-2. The second card is an SD systems Expandoram that gives me a full 64K of DRAM and only had some shorted tantalum caps on the power bus if I remember correctly. That’s right, DRAM chips older than me are all socketed and working just fine. The real reason for this is that I haven’t been able to set up a really good ram test yet to find out what’s wrong so for now we live in ignorance.

The CPU card is interesting. It’s an Ithica Audio IA-1010 card which has a Z80 and an onboard 2708 that can be placed at any 4k location starting at 8000, 9000, A000, B000, C000, D000, E000, or F000. It also has a front panel header that is IMSAI compatible, but includes a couple of extra inputs. The ROM that it came with was a modified version of the PERCOM ROM monitor found in docs for a Percom CI-812 Cassette/Terminal card. It was loaded at C000 and for some reason had the ram relocated to start at 00FF (matched a penciled in note in the manual we got with these parts). Frank hand-edited dump to put it the ram back where it was supposed to be, then relocated the entire thing to F000 so we had the maximum amount of contiguous ram available.

This is a cable I built for us since we are running without a front panel so I figured we could use any help we could get. The pushbutton is for reset, the middle toggle switch is a run/stop switch (there must be some routine still refreshing the DRAM otherwise bad things would happen, this isn’t an RCA 1802 geez), and the far toggle switch changes if the monitor rom is where we jump to on boot or if we jump to 0x0000. The method described in the manual for this is a NOP sled which forces NOP instructions into the processor upon a reset until the program counter hits the target address, then it lets go.

Now we have a serial terminal, a working S100 machine with serial ports and a rom monitor. What do we do with it? We load z80 BASIC of course! What this took was slight modifications to Grant Searle’s Z80 BASIC and simply loading the resulting intel formated hex file via the rom monitor, a usb-serial converter, and putty. I believe the serial chips we have in our IO-4 are compatible with the one he used for his BASIC and we just loaded that program into memory at 0x0000 using the monitor program. Once the program was loaded we just switch the jump switch, reset the machine and we’re at BASIC. On boot it can either be told how much memory we have or we can let it investigate by reading and writing until it hits memory that won’t change.

Once we had BASIC it was time to load some BASIC programs. This took a bit of fiddling because BASIC had some more overhead tokenizing commands before storing them in memory, so a simple python script was used to drip feed the characters by waiting for the echo from the terminal before continuing. Even then though we got some unexpected errors. This particular one is because that line is creating a very long string to display the positions of ships on the screen. By default the BASIC we used has a very small amount of string space, so by executing the command ‘CLEAR 1000’ we were able to expand that enough for this program to run.

You may notice some string artifacts, so something may not be perfect but it plays well enough for me to die quite quickly.

Here’s one of the first cards I bought to continue playing with the S100 system, It’s the 8080 CPU board rev2 (or the JAIR board for short). It has two serial ports, two parallel ports, 64k of SRAM, 64K of ROM, an 8080 CPU, and an SD card slot. It’s very versatile and I haven’t even scraped the surface of what it can do yet. I got it for the SD card slot because you may have noticed that I got 4 8″ floppy drives, but no floppy controller. With this board we should be able to load CP/M which will give quite a lot of freedom in software that can be run on a system like this. This card can switch in RAM in 8k chunks, ROM in 8k chunks, the serial and parallel ports, the SD card, and the CPU all separately. It can also drive Altair style or IMSAI style front panels. It was designed to make machines in museums work with more reliable hardware inside so they can still look authentic outside. The ability to switch all these things in and out also makes it useful in diagnosing systems that have bad boards and slowly replacing them with other boards as you fix things. I had populated it with the wrong logic families at first so it didn’t quite work, but once I replaced everything to match the silkscreen it worked both with RAM and ROM. The other functions will come later, but for now I call that a win.

This is an ADDS Kluge card, it includes S100 decoding so you can use it for prototyping whatever you want. I bought this unpopulated at VCFMW and uploaded scans of it so it can be recreated if anyone wants to take the time. With the addition of some WD1773-PH Western Digital Floppy Disk Formatter/Controller chips I might yet get that floppy controller. Just have to design it in a way that’s compatible with some existing codebase.

The other cards I have haven’t been used or even tested yet, but with all this we may be able to get two working machines now that I have a second card that can act as a CPU. So after all this work tracking down parts, fixing solder joints and faulty chips, replacing suicidal tantalum capacitors (seriously, I will never use a tantalum in any design, shorting is a completely inexcusable failure mode for a capacitor) we finally resurrected this into a working computer. Granted, right now we have to bootstrap it with typing in a BASIC interpreter or letting putty do that for us. We could load basic into the rom on the JAIR card and bank in 8K of the rom and the rest of the ram, but there’s other plans for that card. There’s also no storage yet, but listing programs to a terminal emulator and copying them into a file is reasonable for now.

Oh yeah. After all that, it was never a computer to begin with. These were apparently the leftover parts from some people that grew up with S100 systems and kept upgrading them. These parts had not, until now, constituted a complete system. So, we sorta resurrected a machine. Sorta Frankenstein-ed one together out of mismatched parts.