Sunday, 17 May 2020

Loading Programs on a Minstrel 4th (or Jupiter Ace)

The Minstrel 4th uses cassettes to save and load programs, in the same way as the Jupiter Ace, and many other computers of the era.
If you are familiar with the Minstrel 2 or 3 or machines like the Sinclair ZX80/81 etc. you might try the following.
That will not work. You need to type load, and you don't need the quotes. You also need a filename, and it is case sensitive. If you type load without a filename, it will display any dictionary files it finds.
So, if you wanted to load TUTTUT, you would need to type load TUTTUT, but for tetris, you would type load tetris
All being well, that will be found and loaded. Once it's loaded, you need to run it, that is usually the name of the program, or if not, see the instructions on the cassette inlay (what do you mean you aren't loading from an original cassette?).
That should start your program and away you go, I have spent much time testing Minstrel 4th with tetris and Tut-Tut. It's a hard life being me.
That is not the full story, however.

Back in the mists of time when the Minstrel 4th was being developed, I had reached the point where it was running, the display was clear, it was running all the code I typed in.
I had moved to trying out saving and loading, and it was successfully saving, verifying and loading it's own programs.
I didn't have any actual Jupiter Ace tapes to try to load (or a working Ace to compare against), so I was working from files from 'the internet', and loading them via a tzxduino based device.
It was sort of working, but would always fail with 'error 10' (which just means it failed to load). I gave up on that, and went for plan B. This was the EightyOne emulator, which would 'play' the loading sounds as it loaded files.
This again failed. Again and again. At this point I was assuming (incorrectly, it turns out), that because all of these separate methods were failing, the problem must be with the Minstrel 4th.
I then spent ages trying out all sorts of things trying to improve the loading, including adding in buffer amplifiers and all sorts of different input circuits.
All the time though, the signals looked decent on the oscilloscope (the top is the output 5V peak to peak square wave, the bottom trace is the input from the tape).
I even tried building a separate signal booster, based on a circuit designed to help tape loading for the ZX81. This has an active filter which boosts the signals of the frequency used by the tape signals. That made no difference (in fact it was a bit worse as it required quite a high signal level to start with).
I decided to dig out my first attempt at a Jupiter Ace clone (more on that in a future blog post). That was close to the original schematic, but there was a mistake somewhere in that (or in my implementation of it) that caused the screen RAM to keep being corrupted. It worked well enough to try loading, just to see if that was any better.
No, it wasn't. Same issues there. More head banging, more running around in circles.

I finally decided to challenge my original assumptions that the files being output from tzxduino, the PC, the laptop, the phone and all the other things that I had tried may have been the problem. Looking around I when through various programs that claimed to do tap to wav conversions.
One of the ones I hadn't tried before was castool, part of the MAME suite. That was a command line program that took a .tap file and generated a .wav file. That specifically stated that it supported the Jupiter Ace format.
I tried that out, fed to the wav file out of the soundcard and tried to load it.
First time it loaded. First time. After all that messing around. First time!
I had various booster circuits installed at the time, so I wanted to know if I could remove them, so I went back to the original board, and guess what, that also loaded straight away (but still with the frustrating screen corruption).
All that time wasted trying to fix a problem with the hardware that was actually a problem with using the wrong third party software to feed it. I reverted the Minstrel 4th board back to the basic circuit I had in the first place, which was perfectly fine, it continued to load without any problems.
So, after all that, it came down to finding the correct way of generating the wav files. What I found was castool was generating files in two blocks (which worked).
Other conversion tools seemed to generate a single block (which didn't work). The same with TZXduino, it seems they support .tap files for the Spectrum which are not the same format and do not generate the right output.
I also found the output of EightyOne was different again, and looking closer at it, contained glitches, possibly caused by other programs running on the PC at the same time as they were not consistent.
Since switching to castool, I have had no problems loading files on the Minstrel 4th. It only supports .tap files, so I have been using Eighty One to open .tzx files and save as .tap files if necessary. I was also able to try some machine code programs that required the bload command.
This 'Big Character Scroller Demo' runs very nicely on the Minstrel 4th, with scrolling text and very Amiga like bouncing balls.

I would like the Minstrel 4th to have some other loading options. The first is likely to be serial based, development of that is progressing well.
Work has also started on SD and CF based storage options, and given the RC2014 bus, anything developed for that would also potentially be an option.
The Minstrel 4th and RC2014 Serial cards are available from My Tindie Store.


During testing, I found I had better results recording the programs onto tape using a cassette recorder, and then loading into the 4th from tape. In discussing this, I had suggested it may be having some form of low pass filter effect. George Beckett has tested this further and found that applying a low pass filter at around 8KHz to the wav file within Audacity gives similarly good results.

Minstrel 4ths, are now available from The Future Was 8 bit.

If you want to support this blog, you can donate via Patreon or Paypal, or buy something from my store.