Sunday 5 January 2020

The Minstrel ZXpand

This is the Minstrel ZXpand. It is a version of the ZXpand SD card disk drive specifically designed for the Minstrel 2 and Minstrel 3 computers.

You had better get used to me saying 'this will not work with an unmodified ZX81', as I may be repeating that rather a lot in this post and all the things it links to.
The original ZXpand (and the later ZXpand+) were designed by Charlie Robson (sirmorris), and here is one in use with a Minstrel 2. It required some changes. The existing ZX80 version worked for 4K BASIC, but a special version of the ROM was required to work with 8K BASIC on the Minstrel 2. This was great, and I know several Minstrel 2 owners who used these to great effect. The only issue was limited availability of the ZXpand boards.
You can see on the back there is an EPROM, a PIC Microcontoller and two GAL chips. Also, not visible (it is hidden under the ROM chip) is a 32K RAM chip. The Minstrel already has a 32k RAM chip, and a ROM chip with space in, so with Charlie's support the Minstrel ZXpand was designed as a cut down version without those elements, to avoid unnecessary duplication and to simplify things.
This is an early version of the Minstrel ZXpand board. There is no ROM and no RAM and the two GAL chips have been replaced with some TTL chips as they don't need to do as much. I have added a logic level shifter to the SD card interface, that's personal preference, the original was working fine using the zener diode type interface.
The joystick port was an optional extra on the original ZXpand, but can be fitted here as there is no longer a requirement to be able to fit into a Memotech RAM pack case as in the real ZXpand. The new board has been designed to sit horizontally, rather than vertically, and although you can still use an edge connector, right from the start I was expecting this to be soldered on.
Since there is no longer a ROM chip on the ZXpand board, there needs to be an extra connection from the ZXpand logic to control one of the address lines on the ROM chip to activate the ROM overlay. The ZXpand adds some commands to BASIC to control the SD card drive. There is space in 4K BASIC (another 4K in fact), but in 8K BASIC (ZX80 and ZX81), it replaces some keywords used by the ZX Printer. To do this, it uses an overlay ROM. In normal operation, the original ROM version is active, and when necessary, it switches to a version of the ROM that has extra code squeezed in where the character set normally lives.
After looking around, it was clear that the sum total of programs I could find that would i) load on the Minstrel 2 and ii) could use the ZXpand joystick was (drum roll.......) zero. That was a little frustrating, and I didn't think it would be good to make it available like that. At this stage, things sort of went on hold for a bit. There were a couple of ways forward, one was to make the Minstrel ZX81 compatible, which it now is, but, well, it took a while - see the blog post, I think I was working with the red 3.1 PCB at this time. Well, working is probably the wrong word, it never did that. I was staring at it a lot, banging my head against the desk.
There were some nice games from Paul Farrow which did run on the ZX80 8K BASIC Minstrel 2, and did support a joystick, just not the ZXpand version. They used the Kempston standard, which was actually from the ZX Spectrum days, I'm not sure if it was ever a ZX81 product, although I have seen several with ZX81 size edge connectors, the pins they used were common to the ZX Spectrum so maybe. This was a fairly simple IO port, just read address 0x31.
I was able to add that with two additional chips, one extra set of gates for the logic decoding, and an LS240 buffer and read the same joystick port as a Kempston joystick as well as maintaining the original ZXpand joystick functionality. I think I managed to get the data direction wrong on the first version, so a slight modification was required.
That worked, and I was able to use the joystick on ZX80 Kong and similar titles. The LS240 problem was fixed in the V1.4 board, which also changed the PIC to a larger one to increase the buffer size and speed up loading. Around this time, the next revision of the Minstrel 3 boards were in progress, so I held these off to release everything together.
Things happened. Projects came and went. Time whooshed by like an endless stream of deadlines.
Eventually, the Minstrel 3 was ready, this had ZX81 support, so the range of titles the Minstrel could run was greatly increased. The Minstrel keyboard and overlay PCBs had been designed, and it was coming together as it's own thing, no longer just a ZX80 clone, but now something which was ZX81 compatible, but with improved hardware.
With such a system built up, when you switch it on, you are greeted with the "Minstrel ZXpand" title on the screen.
You can use the Minstrel 3 as normal at this point, type in BASIC programs, or use LOAD "" (or just LOAD) to load from tape, but if you use LOAD "name", it will load that file direct from the SD card. CAT (which is now on the Z key) will display a catalogue of files, and DELETE "filename.extension" (shift + S) will delete a file (the extension is required here as an extra check).
What, you mean you hadn't noticed the Minstrel Keyboard overlays already had the ZXpand keywords on them?
CONFIG (SHIFT + G) is used to set options on the ZXpand. Currently, the only setting you can change is setting it to automatically start a program called menu.p from the root of the SD card at power on or reset. I used this a few times when demoing the Minstrel 2 to display a gloriously graphical advert.
Now the Minstrel 3 supports NMI slow mode, I normally set that to use ZXpand Commander, a great little menu program that allows you to browse the SD card and load programs, controlled by joystick or keyboard.
Just browse to the program and press enter or fire to run it. That's a neat version of Reversi / Othello that I have been testing quite a bit recently. I can even beat it on level 1. Sometimes.
You can also select a program and press shift + X (or type LOAD "program;X" from BASIC) to load the program and then disable the ZXpand before running it - useful for programs that need the printer routines, or extra picky demo programs such as the 25th Anniversary demo which mostly works without it, but needs the ZXpand disabling to work perfectly.
Most of the functionality of the original ZXpand is implemented here. The exception being RAM selection. The Minstrel 3 has a fixed 32K of RAM located from 8-40K, and cannot be switched to 16K-48K as the ZXpand could. That would have required another logic gate and one or two additional link wires from the Minstrel ZXpand to the Minstrel board, and so far I have not found anything which needs the alternate RAM mode. The Minstrel 2 has a fixed 16K from 16-32K, so also does not change. The AY sound and serial interface of the ZXpand+ are also not available here. If you need those, get a ZXpand+.
The joystick can be accessed in three ways, to give a good chance of compatibility. Most 1980s games did not support joysticks, but modern ones implement a few different options. Games such as Paul Farrows flicker free ZX80 games can use the Kempston interface, press C to change the control type on the main screens.
You can now move around the screen and can no longer blame your poor scores on your membrane keyboards.
As well as the Kempston interface added to the Minstrel ZXpand, the two original ZXpand methods are still available. Games from Revival Studios, such as Down, use the ZXpand joystick interface (which is a two stage IO call, "please read the joystick", followed by "now give me the value"). This is one of my favourite games, on here and on the Commodore PET, very playable on both systems, even more so with a ZipStik plugged in.
Any BASIC programs which use the INKEY$ command to read the keyboard will also now benefit from joystick support as the INKEY$ function is also replaced in the overlay ROM. The Minstrel ZXpand can be configured as to which key will be pressed for each direction using the CONFIG command. Hey ZX81 Adventures, can we have joystick support for Tut-Tut?
Other programs will unfortunately not support any of these methods, but you can still play on the keyboard.
Jeff Minter? I wonder what became of him?
There are jumpers to disable the Minstrel ZXpand, and also the Kempston port, should you need to. I've not found one, but there may be a game out there which supports Kemston and ZXpand and could get confused.
I am very grateful to Charlie Robson for his help in the development of the Minstrel ZXpand, and allowing me to produce these so all the Minstrel owners can now load from SD card. Ah, there's the alarm bell, time for another reminder. This will not work on an unmodified ZX80 or ZX81. As the ZXpand is still a commercial product, I will not be providing download links for the PIC firmware or ROM code, so there will be no PCB only option, I will also not be including a schematic in the datasheet.
The Minstrel ZXpand will be available either as a kit with pre-programmed chips, or fully assembled. All parts are standard 0.1" through hole, with the exception of the SD card socket. I'll solder that to the PCB on the kit versions ready for you, so no surface mount soldering is required. They come with a replacement ROM for the Minstrel 2 or Minstrel 3 which contains the ZXpand ROM code. There are three versions on there, one for ZX80 4K BASIC, a special version for ZX80 8K BASIC (which does not use slow mode for CAT), and a ZX81 version.
There are a few options, turned pin sockets for all chips (which seems to have been popular with the Minstrel 3 kits) or just for the PIC. There is also the option of an SD card which I will preload with a few sample titles and the ZXpand commander.
I recommend using a dual row pin header to solder the board permanently to the Minstrel 3 board. This seems the best option to use for a reliable connection. You can order the kit with an edge connector if you prefer, but it will need to be cut down as they don't make the correct size for the ZX81 edge connector any more.
I'll have to do that if you order the assembled version. I do those by cutting off one end, and leaving the other still closed so it is aligned by the edge of the PCB.
The ROM select wire comes with a three way pin header than plugs onto the top three pins of the ROM address jumpers. The lower two blocks set the system type (ZX80 4K/8K for the Minstrel 2 or ZX81 for the Minstrel 3). This will probably be an issue if you want to use this with a ZX81 case, so it's probably best not to do that, and look for an original ZXpand with the ROM built in. I'm not even going to show a picture of that arrangement here just in case anyone thinks the Minstrel ZXpand would work with an unmodified ZX81 (which of course it won't. Did I mention that?)
A Minstrel ZXpand kit has also been added as an option to the Minstrel 3 listing, so you can now build the whole thing as one complete matched unit. Looks rather splendid, doesn't it.
You can also get a blue version for the Minstrel 2, it's the same board just a different colour soldermask.
You can then have your Minstrel 2 all colour matched.
So, that's the Minstrel ZXpand. Available from my Tindie store now (← that was the link to go and buy it).

Suitable for the Minstrel 2 and Minstrel 3. Not suitable for anything else. Really, I mean, it just won't work. I'm not just saying that. It won't, the firmware is different, the overlay ROM is not on board. The RAM is not there. Half of the decoding logic isn't there because it's already on the Minstrel board. Listen...... No, look..... Oh, whatever....... No, it's clearly not wide enough to fit behind an Amstrad CPC 464............No, it will not work on a TS1000 (or a T-1000) or a TS1500 or a Lambda 8300, or a Commodore PET or an Altair 8800 or on anything else, and let''s be absolutely clear here, even if it looks like it might fit in the hole in the back of the case, it still won't work.................OK, OK, I admit it. If you disable the ZXpand section completely, then only the Kempston joystick interface would probably work on a ZX81. But that's your lot mush.

2022 Update: We did a final run of Minstrel 3 with the ZXpand kits, as part of the "Final Edition" runs. Those have all sold out now, so there will not be any more I am afraid.

2024 Update: Minstrel 2, 3 and ZXpand kits are available from my Sell My Retro store