Monday, August 26, 2024

Getting a Gotek working on a PCW9512

I acquired a PCW9512 motherboard a year or so ago and I really wanted to get it up and going so I can build a little case for it and turn it into a proper CP/M plus hack machine.

The challenge? Getting a Gotek working on the PCW9512. There are some .. issues.

Specifically - the flash floppy support needs some extra options and board modifications to support the drive detection that the PCW boot block / CP/M loader wants.

The PCW8256/PCW8512 and earlier CP/M versions only support booting from the 180k single side 3" drive. However the later models have a different floppy drive controller and support booting from the 3" 180k drives or 3.5" 720k double sided drive. So, it does some drive detection based on drive behaviour to guess what's going on. For more information take a read of https://www.seasip.info/Unix/Joyce/hardware.pdf.

The drive detection requires emulating the specific drive motor behaviours that FlashFloppy by default is not done. There are workarounds available - have a look at https://github.com/keirf/flashfloppy/wiki/Host-Platforms#amstrad-pcw. The "supported" modification is written in https://github.com/keirf/flashfloppy/wiki/Hardware-Mods#motor-signal.

Unfortunately my spare Gotek is one of the smaller footprint microcontroller ones which doesn't support it - see https://github.com/keirf/FlashFloppy/issues/557 for more information.

So off to the external logic modification at https://fabriziodivittorio.blogspot.com/2018/05/installazione-gotek-su-amstrad-pcw-9512.html - which after a bit of thinking, I realised I didn't need it. I just needed the M0 jumper! If I wanted to support two drives then I would need to do the modification, but for one drive I just need that jumper.

So here's the jumper config on my little sordan.ie floppy pinout conversion board. Note that Drive 0 -> A: is set, and the Side jumper is set to the top. I haven't got a B: drive jumper set.


And then the jumpers on the Gotek - only the M0 jumper.

I then needed a 720k DSK image of the PCW9512 compatible CP/M. I finally found one - I'll go set up some links on my website to the relevant images soon - and then plugged it in. The system seemed to boot fine - the tracks seeked like it was booting.

But, I couldn't see anything! So, off to build a video buffer and keyboard attachment. Luckily I have a full PCW8256 setup, a spare PCW8512 keyboard and a PCW9512+ keyboard.

First up - over to the PCW wiki to look at the PCW-IO schematic - https://www.habisoft.com/pcwwiki/doku.php?id=en:hardware:perifericos:pcw-io

It's just some buffer gates and a pull-up / pull-down resistor on the SYNC input from the mainboard so you can select PAL and NTSC at boot. (Yes, I did test it. It does actually select PAL or NTSC.)

Yes, you need a pull up / pull-down resistor.

Then I built my own MVP version - starting with the schematic and some wiring notes.


And then the veroboard prototype!


.. it wouldn't be complete without a picture of the bottom side wiring.


I later added a keyboard adapter - another 4 pin connector next to the keyboard connector (at the top of that image, with the red/black/grey/purple wiring) to a 4 pin DIN socket. Nothing fancy.

Anyway, that's enough to get it to boot and work, as seen here.


This isn't the prettiest PCW9512 setup, but it's mine, and it takes much less space - and much less power - than the rest of the full PCWs I have here. Although I must point out that the monochrome white and monochrome green screens are quite lovely to use.

In any case - it works fine, and I'm completely happy with it. Now I need to build a little plastic box to put it all in, add a DC converter so I can feed it "stuff" and have a nice regulated 5v supply, and then start on the IDE interface.

No comments:

Post a Comment