This is the new Multi-Standard 9 way D joystick interface for the Minstrel 4th and RC2014.
It might not be immediately obvious what has changed from the previous V1.0 board.
We could play spot the difference, but the main changes are the address jumpers have gone and there are now DIP switches with more options.
The jumpers were sort of pointless, as most people would have set them to ID $01 to make the joystick port compatible with the Boldfield joystick for the Jupiter Ace.
You could have set it to a non-standard ID if you wanted, but that would have only worked with suitably modified software.
You could have set it to ID 31 and pretended to be a Kempston interface, but that would not have worked as the joystick signal bits are arranged in a different order on the Kempston interface.
That is where the V2.0 board comes in.
It now has two DIP switches to select one of three interfaces it can emulate.
- Boldfield Joystick is a vintage standard for the Jupiter Ace
- Kempston Joystick is a vintage standards for the ZX81 and ZX Spectrum
- ZXpand which is relatively modern, and supported by some newer ZX81 games
To support those three addresses and three different arrangements of bits, there is now a GAL where there the 74HC240 was on the original.
This now handles part of the address decoding, the multiplexing of the joystick signals to the appropriate data bits, and acts as an 8-bit latch, like the 74HC240. Inverting the signals as required for Boldfield and Kempston, but not ZXpand.
This should be useful for the Minstrel 4th and it's ability to run Jupiter Ace and ZX81 software, so there is a good chance that one or other of those formats will be supported.
Games like Paul Farrow's ZX81 Kong can support the Kempston interface. Press X to select the controls (because C is mapped to the X key, because Jupiter Ace).
Colin Dooley's Valkyr for the Jupiter Ace support the Boldfield interface.
David Stephenson's Zevious Seven for the ZX81 deserves special mention as it supports all three!
It asks the user to press fire, and is scanning the keyboard and the three interface options.
Whichever one it detects you pressing fire on, it uses for the game. Neat. That is how I normally recommend doing control selection if you need to.
You might have noticed I haven't included a game with just ZXpand support.
That is because I couldn't find one.
Well, I found a couple, including Paul Farrow's Against The Elements, that support the ZXpand joystick, but use high resolution graphics that do not work on ZX81 BASIC for Minstrel 4th.
I found another, ZXagon, which lists ZXpand support, but that didn't seem to be working. I think it was using the mode which only works with the ZXpand ROM that has a patched INKEY$ function, rather than reading the port directly.
There does not seem to have been much uptake unfortunately, which is why I added Kempston support to the Minstrel ZXpand.
If anyone knows of a game I have missed that supports the ZXpand IO port joystick, but doesn't need high resolution graphics, let me know.
Programming / Testing
If you want to use this in your own games, then just read from the appropriate port and check the appropriate bits.
Plug in the card to the RC2014 slot on the side of the Minstrel 4th, or a backplane if you are using one and add a suitable Atari or Commodore style 9 way D joystick (not Atari 5200, Spectrum +2, Sega or things like that). No mice, paddles, light pens, serial adapters or Elks.
Assembler
In assembler, the minimum you need is:
IN A,(31)
I use 31 in these examples for the Kempston interface, replace with 1 for Boldfield or 7 for ZXpand as appropriate.
Note the ZXpand interface itself requires a two stage operation, request a joystick read, then read the port. The request part is not required with this board, and will be ignored. The joystick data will always be read afresh from the port.
Forth
Forth has a built-in IN word that reads the port in the same way.
A simple test word is as follows:
: JOY
BEGIN
CR 31 IN . 0
UNTIL
;
This will continually read values and scroll down the screen.
Being Forth, that scrolls by very fast.
ZX81 BASIC
ZX81 BASIC does not have an IN word, that wasn't added until the ZX Spectrum.
To get around that needs a little bit of assembler.
XOR A
LD B,A
IN A,(31)
LD C,A
RET
To get that into the ZX81 requires a bit of poking around with a REM statement.
You start with a REM statement on line 1 with 6 characters. Then poke the values of the assembled Z80 code into the addresses where those characters are stored.
1 REM ......
10 POKE 16514,175
20 POKE 16515,71
30 POKE 16516,219
40 POKE 16517,31
50 POKE 16518,79
60 POKE 16519,201
The 31 on line 40 is the address of the port, so you can change that to 1 or 7 as required.
One you run that, the REM statement changes.
You can then delete lines 10-60.
A shortcut is to start with the REM statement containing the following:
- Inverse J (shift + 9, J, shift + 9)
- . (any character, will be replaced by POKE 16515,71)
- <= (shift + R, note not < then =, <= is a single character)
- 3 (which is 31 for the Kempston interface or any character to replace with POKE 16517,1 or 16517,7)
- . (any character, will be replaced by POKE 16518,79)
- TAN (shift + newline, shift + E. note a single character, not T A N)
You can enter the POKE for the missing characters in immediate mode if you like.
PRINT USR 16514 will call this new code.
You can then make a simple test program. I put the SCROLL first otherwise it prints the first line then starts scrolling from the middle of the screen.
ZX81 BASIC shows off an interesting feature here.
The zeroes scroll past quite fast, but as soon as you move the joystick and the numbers appear, things slow down.
I think this is due to the storage of numbers as floating point in ZX81 BASIC, so it has to convert to a 5 bytes floating point representation, then parse that back to display it. There is a shortcut for 0 which skips the conversion steps.
Here I press down on the Boldfield interface setting, which shows up as 2. Then I change to down and left and it shows 8+2, 10. Then I finally get the answer by pressing fire which adds 32.
The Boldfield and ZXpand versions of the test program only differ by the character after the <=, a top left quarter graphic for Boldfield, and a bottom right inverse quarter graphic for the ZXpand. (the author adds a note at this time stating he would welcome suggestions for better names for the battenburg characters)
With the ZXpand, the rest state is 255, and when you move that bit goes low, so you end up with values like 247 for fire, 255-8.
That's Great, Dave, Where Can I Get One?
The Tynemouth 9 way D Joystick V2.0 for Minstrel 4th and RC2014 is available as a kit or assembled from my Tindie store. As with everything else on there, if you are outside of the UK, please contact me directly as international shipping calculations don't work on Tindie so I have to get prices on a case by case basis.
It is also available as an add-on option when ordering a Minstrel 4th kit.
All items are still available, and I can ship worldwide.
Including the Minstrel 2 (ZX80), 3 (ZX81) and Minstrel 4th (Jupiter Ace / ZX80 / ZX81 / Lambda 8300 / RC2014,) with built in keyboards
All versions are available in kit form, or pre-built, and optionally the new Minstrel ZXpand II SD card and joystick interface for the 2 and 3 or the Software Serial and 9 way D Joystick for the 4th.
International shipping is a bit complicated at the moment, so if you want to order from outside the UK, please contact me using the contact link at the top of this page.
See here for more information:
Sorry to have to do this, and I know this is going to affect sales, but please understand it is the only option I have right now.
Patreon
If you enjoy posts like this, you can support me via Patreon, and get access to advance previews of blog posts, and exclusive posts.
You also get progress updates on new projects and other behind the scenes updates, as well as access to my Patreon only Discord server for even more regular updates, and to discuss your own projects.