Saturday, June 01, 2024

How Many Mugs Are Out There? - PCW9512 Part 3

So, quick summary of where we are. I finally bought a boot disk for the PCW9512 but it didn't work so I tried calibrating the drive and, in retaliation, it died.

As anyone who knows anything about the Amstrad machines knows, this particular iteration of the PCW had a 3 inch floppy drive rather than the established 5 1/4 inch or the contemporary 3.5 inch version. I had assumed that this was because Amstrad had managed to blag a boatload of 3 inch drives cheap (seems about right for the Amstrad boss - you know who that is) but this is actually incorrect. According to Roland Perry, in actual fact, the 3.5 inch drives were released at a similar time and there was no clear indication as to whether either would become a standard. In fairness, from the limited experience I've had with the 3 inch disks, they do seem rather more robust than their 3.5 inch cousins..


3 inch EME-232 floppy drive


3.5 inch generic PC floppy drive


Anyway. 

Without a working floppy drive the PCW9512 is pretty useless. So what to do. I can either try and repair the 3 inch drive (more on that below), find another drive from the internet's auction sites, or get a Gotek. Gotek it is then.

The Gotek drive has been around for a long time. They are small circuit boards that act as a floppy drive emulator. They normally use USB (or sometimes SD) storage devices to hold disk images and then these can be 'swapped' by using either buttons on the front or, if you're particularly geeky and handy with a soldering iron, you can add a fancy rotary switch to do the same thing. They are useful for most systems that use floppy disks and can even be used in 80s/90s keyboards that used floppy disks. They normally come in a pseudo floppy drive shaped plastic case too which, for some reason, I find very aesthetically pleasing (my strange mind).

Having had a small (and I mean 'small') reward for some super work I did at er.. work, I decided to risk getting one from Amazon (Not enough yachts - JB). A quick search around the site and I ended up getting one for about £26. I went for that model specifically because it mentioned in one of the reviews that it came with the later Artery microcontrollers which will be important soon. So, next day, my Amazon parcel arrived.


Library Picture of a Gotek

First impressions were OK but I did notice that the box said '2018 Model' which was a bit disappointing. After opening the case and looking at the microcontroller I could see it was the Artery AT32F415. While this is OK, for what I was about to do next it's not the best version to have.

And what was I about to do? Re-flash the firmware of course! There is an excellent piece of software called Flash Floppy by the most amazing Kier Fraser. If you're ever used the Amiga Test Kit then he is the chap also responsible for that. An amazing contributor to the retro computer community and we salute you.


Amiga Test Kit in action.

So, the Flash Floppy software is specifically geared up to support as many retro systems as possible and is significantly better than any of the 'stock' firmwares that the Goteks and their clones will ever have (IMHO). 

To get it on to the drive requires a quick visit to the github page for Flash Floppy where there are comprehensive setup guides and the necessary files to get it up and running. There is also a description of the supported models and this is where I found that the microcontroller in my Gotek is not necessarily the best to have. This is because of the tiny amount of SRAM that it has. The Artery 415 has just 32Kb compared to the latest Artery 435 which has 384Kb. However, for my purposes I've had no issues and everything works fine so far.


My first Gotek.


You do need to download an app from a a Chinese website that allows the Gotek to be reprogrammed. Once you have this then the next step is top put the Gotek into reprogram mode by connecting two of the contacts on the back of the unit together. Once that's done, plugging the drive into a laptop gives the familiar 'bing bong' that Windows has recognised the device. Do note that in most cases, you're going to need a USB-A to USB-A cable which are quite unusual. In my case I already had one that came with my USB oscilloscope and it worked perfectly. 

Reprogramming took about twenty minutes but most of that time was spent reading and re-reading the instructions. There are a few key steps that must be followed but they are well documented on the github page. 

Once I'd completed the steps, my Gotek had the latest flash floppy firmware which was confirmed by the "F-F" displayed on the LED display on the Gotek.

Now, a while ago I bought a couple of OLED panels about an inch by half an inch. They were pretty cheap, so cheap that they only came in packs of two. And a quick rummage around the garage turned up the new one that I hadn't even opened. Changing over to this was actually really easy and just required a few dupont type cables with female connectors at both ends to connect the screen up correctly. And the results are immediate since Flash Floppy is clever enough to support various screen types.


OLED display showing disk image name
how many images are on the USB and
the track number being accessed. Clever.


So, now what?

Well, I can't plug this directly into the PCW like I could with an Amiga or Atari ST (or PC for that matter). The PCW only has 26 pins on its connector rather than the standard 34 pin. The signals on the PCW are compatible but it just needs an adaptor to use the 26 pins. Also, and I can't stress this enough, the Amstrad - HAS NON-STANDARD POWER PINS!!! - so if you plug a gotek into the PCW power connector directly, you will be sad and have a dead Gotek. The 5v and 12v lines are switched in the PCW. Cheers, Alan.

I ordered an adaptor board that I could build up from other bits that I had and then, in a fit of forgetfulness, also ordered an adaptor cable too. Both items arrived quickly with the advantage that the cable also included a power cable adaptor which saves me having to swap the 5v and remove the 12v cables in the power plug.


Adaptor cable (rainbow colours) and
the power adaptor cable


The final missing piece of the puzzle is a disk image. These are available online if you know where to look but as I already have a legal version of CP/M I...well...fill in the blanks.

With a disk image on a USB stick, the USB stick plugged into the front of the Gotek and the Gotek plugged into the PCW I switched everything on. And it just worked. A series of lines appear down the screen as the initial ROM/BIOS loads in and then CP/M starts.

Perfect.

Ah, CP/M. I've been expecting you.

I did play a little bit with some commands and a bit of BASIC too.


BASIC. In honour of LGR

One of the big issues with the PCW is that, as suggested above, it loads the initial BIOS/ROM from the disk which means that unless a disk image is specifically for the PCW9512 then it won't boot. Unfortunately, there seem to be very few software disk images around for the PCW9512. I did locate a fairly comprehensive archive of PCW games but they are all generated for the PCW8526.

But there is a way around this. I spent several hours trying to copy files from a disk image to effectively a 'blank' disk image with no success. Then I stumbled across a post on one of the forums, I forget which one, that said it was possible to eject a 9512 disk just as the screen goes solid white after loading the BIOS/ROM and then insert a different disk.

I was a bit dubious about this but I thought that what I could try is wait for the screen to go solid white and then press one of the select buttons on the front to change disk. And it bally well worked. What actually happens is that the unit reports the drive A: not ready. At this point I can leisurely switch through the images to find whichever one I want and when I select it I press 'Enter' to try again on drive A and the software loads. It's a little bit clunky but easy to do. And these are some of the games I got to load:


Fairlight

Head Over Heels

Tetris (my favourite)

Zork (note the 3D printed case
I downloaded and printed)


But what about that original floppy drive? Well, if you read the last exciting instalment, you'll know that I'd ordered some tiny SMD transistors and they arrived in a slim envelope. They are tiny. I used to joke about losing SD cards if you breathed in a bit too quick but these things could get absorbed by your skin they're so freakin' small..

Anyway, I managed to replace the original CR transistor at Q6 on the board. Switching it on I was really surprised to hear the stepper motor actually trying to move the heads backwards and forwards. After giving them a bit of a poke the heads did actually start to move! 

Does this mean I've fixed it? I don't think so or at least, not entirely. The stepper motor doesn't seem to be as strong as it was before and no matter how hard I try, I can't get it to seek properly with 4 beeps once it gives up. It only behaves as if there is a completely incompatible disk in the drive.

But that's tomorrows problem.


Ten for a couple of quid. 
Banana was too big for scale.


Newly installed - not the neatest
but it's on there!


Close up of my slightly blobby SMD soldering..

Tune in next time to see if I can fix the drive properly and then have to deal with how the PCW handles two drives in one box. Can't wait..


No comments: