Showing posts with label Forth. Show all posts
Showing posts with label Forth. Show all posts

Sunday, 27 September 2026

Tynemouth 9 Way D Joystick for Minstrel 4th and RC2014 V2.0

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.

Sunday, 4 May 2025

Minstrel 4th Returns

May the 4th be with you.

Five years ago today, the Minstrel 4th was launched with that bad pun. 

And now it's back, with the same bad pun.

Yes, the Minstrel 4th is back, and available now from my Tindie store.

What is it?

It is a Z80 based single board computer with 49K of RAM, 2K of video RAM and 4 banks of 13K of ROM, running at 3.25MHz or 6.5MHz (or an external clock up to 8MHz)

It is compatible with the Jupiter Ace.

What is that?

The Jupiter Ace was a Z80 based single board computer with 1K of RAM, 2K of video RAM and 8K of ROM, running at 3.25MHz.

Unlike it's contemporaries like the ZX81 and the ZX Spectrum which ran BASIC, this runs Forth. (hence Minstrel 4th, do you see what I did there?)

Forth is a very fast and powerful language, although not as easy to pick up as BASIC, it is well worth investigating.

More info on Forth can be found here:

No post on Forth would be complete if it didn't show the result of the vlist command.

This shows the current vocabulary list, all the build in functions.

The default for the Minstrel 4th is black text on a white background, as it was for the ZX80 and ZX81 etc. I prefer this (it is also easier to take pictures of).

The Jupiter Ace used white text on a black background, so the inverse options is available if you wish.

The video on the Jupiter Ace was generated by a lot of logic chips forming counters and decoding logic. To simplify things, the Minstrel 4th uses a microcontroller to do the counting. The produces a more correct composite video signal with a backporch that was originally missing, and PAL or NTSC support via a jumper.

There is a 2K dual port video RAM chip to avoid multiplexing circuitry (the Ace had contended and un-contended memory access via two different address ranges, both are un-contended on the Minstrel 4th)

There is a lot of software available for the Jupiter Ace which will all run on the Minstrel 4th.

As well as some modern titles.

You can load using a standard cassette recorder, such as my favourite Sony TCM-818.

Or you can play the audio files into the ear port.

Not all PC sounds cards can cut it (low output level and fancy audio processing), but these cheap USB dongles usually work fine.

This is a great port of David Stephenson's Tut-Tut by George Beckett.

RC2014

One of the best features of the Minstrel 4th is it has an RC2014 expansion slot. This means it can use RC2014 modules to add whatever new functionality you want.

Most modules should work, apart from any that contain ROM, RAM or CPUs. The only IO port used on the Minstrel 4th is $FE. All others are available. Interrupts are used, generated by the video circuitry and used for timing, display update and keyboard scanning etc.

Minstrel 4th is designed for RC2014.

But don't just stop at one module, add a backplane and you can have loads.

The backplane 5 is a good starting point.

A lot of standard modules and backplanes can be used, some of the ones shown in the photos are:

Many more are available, see also:

This is my current fully loaded setup.

Made up of the following parts.

ROM options

There are four ROM options available with the Minstrel 4th

1 - The standard Forth ROM

This is the standard Forth ROM, to be most compatible with the Jupiter Ace.

2 - Enhanced Forth ROM

This is a patched version of the Forth ROM by Aleksandr Sharikhin (with some extra code from George Beckett).

This adds various features, see the github for details.

This works well with a 68B50 serial card, I have designed one with a separate clock, so it can run at 7.37MHz to divide down to standard RS232 baud rates, and the Minstrel 4th can run at a different speed.

With such a card installed, you can use some of the extra words it added to access the serial port.

If you use a standard FTDI serial cable to connect this up to a PC, you can run a file server from a Python script.

On the Minstrel 4th end, you can use commands like ls to show a directory listing or tapin to open a tape file and then use the modified load command to load over serial in a matter of seconds.

There I was loading 4D Monster Maze, a modified version of George Beckett's Ace version of 3D Monster Maze with some extra features.

If you press R when the first screen appears, you will be invited to select a DIO port. I like a bit of Ronnie James Dio. Oh wait, no.

If you have one of the RC2014 Digital IO modules, then it will function as a "Rex detector" and show you how close Rex is getting.

It also support my RC2014 Joystick module so you can use a standard 9 way D joystick in various games.

Another module you might want to pick up is Ed Brindley's YM2149 sound card.

This is supported by several games, including George Beckett's updated version of Centipede.

It works with the built in speaker, but sounds great with the extra AY-3 sounds.

There is a lot of software out there, including many new games:

3 - ZX80 BASIC

What?

Yes

This is a port of the 4K ZX80 Integer BASIC that runs on the Minstrel 4th.

It is compatible with most BASIC programs, but is not fully hardware compatible for obvious reasons.

I have replaced the standard ZX80 screen draw routines with a routine to copy the ZX80 display file into the Minstrel 4th video RAM. It does that every frame so this display works pretty much as it did, although there is no flicker as the display continues to be drawn by the microcontroller even when the Z80 is busy.

I have written new LOAD and SAVE routines, which show a countdown rather than wavy lines.

They keyboard matrix is slightly different, as is the load hardware, so any games that use fancy display techniques, or their own keyboard scanners or load routines will not work.

But it works well enough for Paul Farrow's ZX80 versions of Kong and PacMan for example.

(but sadly not the recent port of Rock Crush or Rocket Man - for those you need the full ZX80 compatibility of a Minstrel 2)

4 - ZX81 BASIC

Update: The Minstrel 4th now supports ZX81 BASIC with FAST/SLOW. So most games run (i.e. 3D Monster Maze works).

As with the ZX80, no custom loaders, keyboard scan routines or high res graphics, but most of the games.

Speed has been tuned (slowed down) to be 100% ZX81 speed in PAL/50Hz mode.

More info here:

Options

The Minstrel 4th is available as a kit or assembled. With sockets for the main chips, but optionally for the logic chips as well.

The standard version comes with a built in keyboard, but it is also available without a keyboard, should you want to use your own, or do something else.

I did create a sticker to fit over a ZX81 membrane, if you want to do something like that.

And the board is ZX81 size, so.....

But you won't be able to use an RC2014 modules, unless you are very creative with a Dremel....

Or there is a USB keyboard interface from Shiela Dixon:

So you can use a standard USB keyboard (doesn't it look small in comparison?)

Or even a non-standard USB keyboard (yes, they are back as well)

But most people will want the standard version with keyboard.

Whenever I pack a new kit, I like to build one to test.

As always, they work first time.

Oh wait,

That's not right.

Hmmm.

About 95% of the issues come down to things like incorrect jumper settings, shorts, dry joints, missed pins, etc.

Ah, there it is.

Sorted.


I think that's enough for now. I don't think I have included as many links in a blog post ever, and I think I must be pushing the number of images as well.

The only link you really need is this one:


Patreon

You can support me via Patreon, and get access to advance previews of development logs on new projects and behind the scenes updates. New releases like this will be notified to Patreon first, if you want to be sure to get the latest things. This also includes access to my Patreon only Discord server for even more regular updates.