12/05/2019 at 20:38 •
Well, it's been about 4 months. A lot's happened since then. For starters, I finally got rid of my harbor freight soldering iron, and bought a proper iron. I also discovered that I absolutely abhor protoboard.
Before I could make any more progress, I needed a way to program the flash chips that I bought, and preferably have a way to dump the ROM so I could try to reverse engineer things a little bit more. But alas, my attempts to build a flash programmer quickly descended into madness. Honestly should've just breadboarded the thing. Maybe protoboard is better when it has a solder mask. I dunno. All I know is that I hated every minute of it, and my problems were only exasperated by my terrible soldering iron.
The basic concept was sound, but I couldn't find the patience to actually finish the abomination I created. I figured maybe someday I'd finally sit down and learn how to use KiCad, and until then, the project was officially on hold.
Until this week!
I finally sat down and forced myself to learn KiCad (so I can help other people do the same). I needed a good starter project, and this was immediately the obvious solution.
Not bad for a first PCB, eh?
I ordered the boards from JLCPCB, and they're scheduled to get here tomorrow. Assuming I can make it through finals next week, I should be able to finally get some software put together. My dream of connecting this typewriter to the internet may finally come true!
Here's the github repo if you want to check it out:
08/18/2019 at 00:53 •
It's been a few weeks, but fear not, I'm continuing to work on it! I've just been a little lax with the project logs.
As promised, the sockets and new flash chips arrived from Digikey!
In hindsight, I probably should have purchased ZIF sockets, but I only recently learned about them. I ordered a few on AliExpress, so they'll probably get here sometime in late September ;)
The flash chips look like they'll work perfectly. Everything is the correct size, which means I'll just have to make an adapter to fix the pinout.
Here's the motherboard extracted from the typewriter. My soldering iron is absolutely awful, and this solder wick is of unknown origin, but I'm not going to let that stop me from moving forward with this.
Luckily I managed to find my jar of flux paste, which made this a quick and fairly painless extraction. With enough flux you can solder with just about anything, and this ROM was no exception.
Here's another picture with the new socket in place. Now we're all set on the typewriter end of things! I feel like this is basically the equivalent of rooting a phone. We now have the ability to run arbitrary code on this typewriter. I just have to build a way to program the flash.
I forgot to take too many pictures of this step, but I had to build an adapter for the flash. The ROM has an NC pin where the flash's 19th address pin is, and the ROM's 19th address pin is where the write enable line is on the flash. I've never worked with protoboard before, but let's just say that I look forward to learning a proper PCB design tool so I don't have to work with this again.
Here are some shots of the finished adapter. I'm not sure if this will have any utility outside of this project, but I'm happy with how it turned out.
The next big hurdle is the reader/writer for the flash and ROM. Unfortunately they're not something easy like SPI, but at least they're parallel instead of some undocumented protocol. While rummaging around in my parts bin, I found three 74HC595 shift registers, which should provide ample output pins for the address lines. For the controller I went with an ATMega328P, partly because they're easy to work with, and partly because I had one already on hand. I can break out the serial pins to USB, and that should give me an easy interface to work with. Next log will be on building the programmer.
08/06/2019 at 23:19 •
On the top right corner of the board is a very interesting find: an HD64180ZP6! According to Wikipedia (and the datasheet), it's a Z80 compatible processor (somewhat analogous with the Z180), with plenty of IO and a few serial interfaces. Now we're talking! In addition, the datasheet includes charts for all of the machine code and registers just in case there are any discrepancies we need to sort out. With 18 data address lines, life was quite different from things like the ESP-32's serial memory. Luckily, all of this means great things for what we can do to modify this typewriter. Getting custom code running should be as simple as swapping out that mask ROM with something re-programmable, and making a dump of the ROM so we can reverse engineer the current firmware. I've got a logic analyzer and some other tools that will be helpful for all of that.
Now, for the other interesting find:
An HG62F gate array chip. Now, this complicates a few things because there's no easy way to see inside and know what's going on, but I believe that it will simplify more. If you look at the picture from last time (with some added notation):
It looks like the keyboard and the LCD get piped through the gate array before they make their way over to the CPU. The keyboard runs through some resistor arrays before it gets all the way there, but I'm guessing that the gate array decodes the keyboard so I don't have to implement that in software. I'd bet that something similar is going on with the LCD, both of which would be a nice surprise. It will be interesting to see how much flexibility we have, and what we're stuck with.
The flash chips and some DIP-32 sockets have been ordered from Digikey, and they should arrive on Friday. In the meantime, I can start attempt to figure out how the CPU is communicating with the gate array, and that should give me a head start when it comes time to start writing my own firmware.
08/06/2019 at 22:12 •
Found it ready to go into the trash can, and brought it home.
Not too much to go on yet, but I've already got it pulled apart. Much to my surprise, we have quite a bit to work with.
Here's a few shots of the interior.
Front of the PCB:
And the back:
Upon closer inspection, we have a few interesting chips on the front side.
On top we have the HN62314B.
According to the datasheet, this is a mask ROM. I'm guessing this is where the program data is stored. Not reprogrammable, but luckily, I found a flash chip that has almost the exact same pinout.
Main difference is the write enable line. Should be an easy enough fix.
The chip on the bottom appears to be RAM (HM65256BLP-12).
I'm not sure what part this play in all of this, but there's another RAM chip to our left (HMG2256ALP-8):
I'm guessing that one of these acts as the persistent storage. There's a coin cell battery on the bottom right corner that probably keeps the data loaded when the power's cut. Probably pretty dead at this point though, so I can't imagine that the persistent storage lasts very long.
That's about it for this log, but I'll share more exciting things in the next ;)