Translate

Showing posts with label Computer. Show all posts
Showing posts with label Computer. Show all posts

Tuesday 21 December 2021

Building an Altair 8800 Clone.

Having had a bit of a clear out of the workshop recently, I found a very posh (and expensive at the time!) rack case. 

I need something to build into it. Let's re-create someone else's project for a change..

What about a MITS Altair 8800 clone? That would be exciting, and there's a ready-to-roll Arduino emulator available. It really is an extensive project, but using inexpensive hardware. Details can be found here.

So, parts are procured... An Arduino Due clone, a bunch of LEDs and switches.

The original clone project called for a bunch of buffer transistors to drive the LED's, as if they were all lit up, the maximum source current of the Due would be exceeded. I must say, the designer does like to run his LED's at a higher current.But who doesn't like some bright LED's? You could increase the current limiting resistors, and not bother with a buffer, but who doesn't like some bright LED's? The buffer board consists of a lot of transistors. Let's simplify this and use a few 74HCT541 non inverting buffer IC's. We've got more bits than we need.. you never know.. expansion or something!


A PCB is created, and sent for manufacture.. 







Now we're going to need a front panel made, and I used Front panel designer to re-create something a bit like the original. It's sent off to ATP Projects to make it reality. Files for the front panel, and buffer PCB can be found on my github page here.
 


Now, as well as the human/machine interface being handled by the front panel LEDs and switches, it also has a terminal interface. I dislike the idea of hooking this up to a modern computer, running some serial terminal. I'd rather it had an interface of it's own. Now various bits of video hardware are supported by the emulator. I like the idea of a composite output, emulating a old style terminal (I did look, briefly, at procuring an old VT52/100 compatible terminal... whoa, there's some money now!). I can make a serial terminal to output composite video easily enough using Arduino, and to send data from a PS2 keyboard, but there's already a polished, open source solution already out there, courtesy of Geoff's projects. It supports PAL and NTSC and VGA, and emulates a few different terminals. The gerbers are downloaded, and sent for manufacture.

The front panel arrives . It's superb. 





... as do the PCB's...









The buffer board is the first to be populated. 











The LED's are fitted to the front panel and held in place with a dab of adhesive. 








While this is drying, the Due clone is uploaded with the code. You'll need to install any missing libraries, and ensure the version of the SdFat library installed is 1.1.4, later versions throw the error 'File' has no member named 'getSFN'.

The front panel switches are added in...









... and the long, tedious job of wiring it all up...









... LEDs to the buffer ...









... buffer to the Due, with SD card adaptor used as a reader as per the instructions. I hope you like the "mother" board ðŸ˜†.



Switches connected...  Note the micro SD card adaptor is used to connect SD storage to the Due.


... and a quick test shows some fault finding is needed as a couple of the LED's aren't working, which is thankfully easily sorted. 

Next the video interface is built up, and programmed with Pickit 5 (Graham's design uses a 32 bit PIC microcontroller)


 





The MPLAB IDE faultlessly uploading the firmware.










In the interim period, I'd managed to get hold of a small black and white CRT monitor on Facebook Marketplace, for peanuts. I'd tested it, and it performed well with a test pattern from the video rack. Thanks Colin! 

It's not got a makers name, but I'm thinking it may be a Hitachi or Shibiden. 

It's vintage and looks the part... 








Hooking the output from the PCB to the monitor and switching on produced less than encouraging results. If you look carefully, you can *just* make out some text in the top right of the tube ... and why is the line sync showing up white?? 




Reversing the video connection solved the issue. Serves me right for using the wrong type of socket! 





... and once a compatible keyboard is located, RX and TX pins shorted together to get an echo test to work ... 

Brilliant. Now to connect it to our Altairduino!




The RX & TX lines are connected to pins 18 & 19 of the Due, and the unit powered up. With a serial terminal opened via the USB port on the Due and my PC, the Stop and AUX1 switches are raised to put the unit into config mode, where the default serial terminal can be moved to pins 18 & 19. Don't forget to save as default! (If you do this without an SD card present, the default settings are saved to EEPROM within the Due. If you subsequently fit an SD card, the process will need to be repeated, as the default is then saved to the SD card. 

So far the machine has been running from 5V supplied by my bench supply. A simple power supply is built up on a piece of perfboard. It's a rectifier, some smoothing and a 7805 regulator. LEDs are added to the input and output, just because ... 


A suitable 6V transformer is mounted into the enclosure, along with the supply board, and connected up .. 

Mains will eventually be supplied via an IEC connector on the rear panel.



I want to replicate the Altair badge on the front of the machine, so I order a piece of thin aluminium, cut to the required dimensions by eBay seller Penninehardwaredirect. Just message them the required size, and they do the rest. A first class service. 

I spent a while searching for the right sort of font, and 256-bytes fits the bill.


It's flipped to mirror image and laser printed onto some glossy photopaper, and that is then ironed onto the aluminium strip, with the iron on the hottest setting. It's exactly the same procedure as making a toner transfer PCB.

Soak off the paper... 
... and give it a light coating of clear protective lacquer...









.. and stick it to the front panel with some contact adhesive. Smart.







A back panel is fabricated from aluminium to (my now) legendary high standards (ahem). It's not from this rack unit though, and this rack doesn't appear to have any means to attach a back panel....
So some doo-hickies are drawn up on CAD, and 3D printed....









... and pressed into service ... 

Nice ...










The back panel is secured into place, and I'm thinking it's finished. I was wrong. 









The keyboard interface isn't working. It was previously working fine. Doing a loop-though test, the terminal appears to be sending data, and that's confirmed with the oscilloscope.... Some head-scratching occurred... Also another weird thing was happening. Any traffic on the USB com port of the Due was being relayed to the terminal board via pins 18/19. The Due was erased and re-flashed. Same weirdness... It's also refusing to read the SD card... 

A replacement (genuine this time!) Due was ordered,  and some aspirin to cure the headache caused by the wiring, and this sorted the issue.


I also ordered an SD extender , and used this instead of the adaptor. I can conveniently locate the SD card reader on the exterior of the case now. 







Right... I'm off to see if I can complete Infocom's hitchhiker's guide to the galaxy!






Monday 20 September 2021

Sharp MZ-700 keyboard repair.

Back to the Sharp MZ-700. You may remember mine was missing a "blank" key. User psmart over on the Sharp MZ forum, very kindly provided me with a spare key and pillar/contact.


The machine is disassembled again...


The keyboard is flipped over. I want to avoid disconnecting that fragile keyboard connector, and making a load of work for myself. 27 screws are removed..


... and the PCB separated from the keys & frame.


As the key is missing, the keyboard is simply flipped over and the broken plunger falls out.



We need a spring, so time to rifle through the tub of junque fixings to see what we have that looks promising...

I'm kicking myself slightly here, as I junked a few old PC keyboards a couple of weeks ago that would have provided a perfect spring!

Hmmm ... 1 is too small and too stiff, 2 is too tall, 3 is way too stiff and 4 is suitable for closing a garden gate ...




Spring two is simply cut down to about 12mm long...

Looking good.











The replacement blank key snaps in place, and the tension is about perfect.





While the keyboard is in bits, the contact surfaces on the PCB are cleaned with a cloth and a bit of IPA. If your keyboard is not responding well, and needs a bit of force to work, you can clean the rubber contact surface on the plunger too. Mine works fine, so I'll not do that here.
The PCB can now be reassembled, taking care to ensure the power LED fits back through the hole.


And finally the machine is back together... 
A word on retrobrighting... Apparently these machines don't retrobright well, the legends fade on the keys. Now I've been watching a few YouTube videos on the chemistry and science behind retrobrighting. This one especially interests me https://www.youtube.com/watch?v=YPl356YKcVs&t=1557s 
What is interesting here is he uses a heat pad, rather than UV light, which is better for me, as I'm located in an overcast area of the UK. Sun is in short supply, and I don't fancy going out and getting a UV floodlight. Anyway, I won't be retrobrighting this unit, because of the tendency for the keys to fade.

What I did try was leaving it in the sun for a bit (when we were lucky enough to have some in early September (August was hopeless) .
Other than having to keep popping out, and bringing it in when it looks like rain. I think it's stating to make a difference... Look at the top and bottom section of the case here.. I'll carry on for as longs as the sun lasts! 

Saturday 28 August 2021

Sharp MZ-700 (MZ-711) repairs and renovations

About 10 or 12 years ago, I visited a car boot sale, on the look out for some vintage TV a friend of mine had seen there the previous week. I found the TV, it wasn't in great condition, and the seller wanted far too much money for it, I walked away*

This did, however, follow me home. I think it cost me £5. The seller didn't know whether it worked or not. It's missing a key on the right hand side... 


It's a Sharp MZ-700 personal computer. I remember these from my youth, but had never had a chance to use one. It dates from around 1983. 

I rushed it back home, plugged it into the living room TV, and eagerly switched it on. BEEP! it booted up, followed by a bang, and acrid smoke billowing out, much to the delight of the (not quite Mrs back then) Mrs Doz.

"I'll look at that later..." 

... much, much later ...

First off, let's get into the machine.

This is the rear of the machine, there are 5 screws to remove here. You can also see the composite video output, RF output, RGB output, cassette input and output jacks, the "figure-of-eight" (Telefunken) connector for the mains input, an on off rocker switch, a volume knob, a reset button, and various little covers over some ports. There's also a huge earth binding post (got to love a big binding post!)

It appears to be of modular construction. Under the centre section is a port marked "printer" , and to the left (in the photo) is the in-built cassette drive, which just lifts out, after disconnecting it's robbin connector. The right-hand most cover (in the photo) doesn't move...

There's a couple of screws which appear to attach the top to the case below.

... and finally three underneath across the front. 

Hmmm, the badge underneath states it's an MZ-711... OK it's time to consult google.

The MZ-700 is just a range of computers. The MZ-711 is the base model. It came out of the factory as a bare-bones thing. No in-built tape or printer. The tape was obviously an add on (at £50 in 1983!) for this machine.

There's seems to be quite an active forum on the web too, at sharpmz.org I've applied to join.

So, off with the lid...


Nicely built I must say....

Z80 at 3.5 MHz, 64K of RAM.... Not much in the way of ROM.

Apparently the ROM only contains a boot loader and monitor... which means you needed to load basic from a tape... and google shows me there are lots of different basic's and many other languages too... interesting.


Zilog licensed the Z80 to sharp, in this case it's an LH0080A. It's pin for pin compatible.


... anyway , let's not get sidetracked ... 




As this machine went bang, and is utterly dead, it's out with the power supply...

It's a switched-mode affair, made by Sharp. Single output, presumably 5V.
I quickly spot the culprit....
Big bang, lots of smoke, acrid smell... it's our old friend the Rifa suppression capacitor! 









It's duly replaced with a suitably rated X-class capacitor. 47nF for future reference (or should that be rifarence ðŸ˜†). One of the two 33uF 400V reservoir capacitors has a slightly domed top. I change them both out. Testing of the other caps shows excellent ESR and values within tolerance, so are left in place. The mains fuse is open, unsurprisingly. It's a T500mA. A new HRC one is fitted...


...and the supply seems to work well. 









With the supply installed back into the machine, the supply was switched on, and the machine beeped... RF was coupled into the tiny workshop TV, and ....

... well, it's a bit of a disappointment. The display is interacting with the keyboard, but the characters are corrupted. Resetting the machine changes the pattern of corruption. 

The keyboard is VERY carefully removed... go easy with the ribbon connector, I got away with mine, only "folding out" two of the contacts, and managed to repair the socket. 

All the socketed chips (the monitor and character roms, and the Z80) are removed, the sockets cleaned and refitted. No change. 


The main board is removed from the case, and there's a rusty spot on the metal screening tray beneath.. 




.. with an accompanying mark on the PCB itself...


... it's right by this IC, a 74S157, a non-inverting quad 1 to 2 line data selector chip. It's removed from the board and tested.. 

... and it's bad, which is a pity, as I don't have a '157 , but a '158 (which is the same, but inverting). A replacement is duly ordered.








.. and fitted, and makes a slight change to the display. Last time, hitting reset changed the characters on the display, now, at least it's constantly corrupt!

Now the wonderful people on the sharpmz.org forum had suggested the CG (character generator) EPROM may be corrupted. They only had a design life of 10 or so years, and we're way outside that now. The good news is, if it is corrupted, all I need to do is erase it (with UV light), and re-programme it. I plug it into the TL866 programmer and read the contents of the ROM out. This is compared with a known good .bin file, and the bad news is the ROM is fine ...

Back to basics. Check the supply rails to the IC's... I scoped up the 5V rail, and it gets horribly noisy around the MB8264-15 memory IC's. Ugh, there's more than 500mV of hash on the rail... 


There's a couple of electrolytics there , C82 & C86 ... swap them out ... and bingo !

For the sake of it, all 9 electrolytics are changed.
For future reference, these are :
2 x 100uF 10V
2 x 10uF 16V
4 x 1uF 50v 
1 x 22uF 16V


Be careful when changing the caps, as the PCB quality isn't the greatest, and it's double sided. Were a track is soldered component side, it's best to warm that side up, and pull the cap out. There's also a couple of sold tantalum capacitors in there. I don't have any, so they can stay for a while, although they do have a reputation for failing short circuit with no warning, and going pop like little firecrackers!


Note there are several components in the top right of the picture, which are lying down flat against the board, so to clear the modulator. This includes one of our new ones. 





With the machine partially reassembled, the keyboard is tested... and much to my surprise works perfectly! I expected a disassembly and clean up of the contacts, but no. The missing key turns our to be a "blank" key on this UK machine. On the Japanese version, it has a character on it. One of the users on the MZ forum has said he has a spare key from a spares machine I can have. What a super person!

Onward with the machine.. I'm keen to get something loaded. The cassette deck is mounted, and L (for
load) followed by CR (carriage return) switches the motors to the cassette deck on, and it actually appears to work. It's cleaned up.




Now, a couple of years ago, I obtained a wav file of "Z80 Basic", which my good friend, Nathan, duly recorded it to a cassette for me. I put the cassette in a safe place.... and even remembered where that was ! 

So the tape is inserted, and, there's no take up. I quickly stop the tape before we get into a mess...


Out with the cassette deck, and remove the four screws holding the back on... the one on the bottom right is longer...


I notice there's some debris on the back panel... 



Now the belt is shot, and is replaced, but it's not that shot, because it managed to turn the capstan, and rewind is working well...  out with the deck itself... 
Undo the slotted pillar thing (there's probably a technical name for that) , there's three in total, all of
differing lengths. 







Lift the mechanism carefully from the case. More debris evident ...
... and look at the state of the supply reel table rubber, it's got chunks out of it! Despite that it's still
working (albeit a bit "lumpy" !)

The take up is reel is removed, and the reel rubber, is badly cracked, and beyond refurbishment... The Lidl box of plumbing washers is pressed into service and a suitable new tyre located!  




The unit is reassembled, and we attempt again....


Bingo! Sadly this is as far as I can get.

The deck most likely needs checking for speed and azimuth.

After an alignment of the cassette drive, and a lot of cussing, it was determined that the cassette I'd used to align the deck was of poor quality. I asked my friend Nathan to record a new one for me, which he duly did, and after aligning with that, all was well ...
The ubiquitous test program is run ... 










Except all this tedious messing around this cassettes is all very well, but ... my ageing MP3 player works really well at putting data into the Spectrum ... can this work here? 

Now the MZ-700 was also sold without a tape-drive. It's equipped with 3.5mm jacks for reading and writing data to any tape deck, so let's use those... except it doesn't work.

This is the relevant part of the circuit diagram. It can be seen that the external plugs (P-8 read and P-7 write) are not jumpered across P-12, which is where the cassette deck is connected. 




Making some jumpers up out of dupont connectors, and grounding pin5 (sense) allows the machine to load perfectly from my MP3 player via the external connector. Perfect, and easily reversible if I ever wish to use cassettes again!  
Intrigued with the "PETSCII" style characters on the keyboard, I conjured up an infinite maze programme... not as elegant as the C64's one-liner, but gives a pleasing result.  



Another saved from landfill!


*the set was there the following week, now with the tell-tale mark on the tube face that the neck had been knocked off the back, and the tube was now shot. He still wanted silly money. I still walked away.