Showing posts with label 4th. Show all posts
Showing posts with label 4th. Show all posts

Sunday, 18 May 2025

Some tips for building (and troubleshooting) a Minstrel kit

I have covered this sort of thing before, but I thought it was a good time to revisit the process of building one of my Minstrel kits, and some of the steps you should take to troubleshoot any issues you might have.

This is based on my experiences and my preferences. Yours may vary. Feel free to not tell me about anything you disagree with.

Most kits work first time, or just need a quick repair to a bad solder joint. Please tell everyone about those.

You can order the kit pre-built, so it will arrive already built and tested, but if you want the fun of building it yourself, it will arrive in kit form. A good first step is to sort out all the parts.

I do my best to make it easy to identify the parts from the parts list. The resistors are all colour coded with the good old fashioned 4 band approach, and the colours are shown in the parts list.

The only tricky one in this kit (the Minstrel 4th) are the 22pF and 47nF capacitors, there are two of each.

I have used a different brand for the 47nF capacitors which are more clearly marked, so you can see the 473 marking (47 and 3 zeroes, 47000pF, 47nF). The 220 from the other brand is less clear (22 and 0 zeroes, 22pF). I am hoping the other brand will start to do more values so I can make them all the more clearly marked versions.

Lead free solder will ruin your day. I get the environmental concerns, but so much modern stuff fails due to bad solder joints caused by lead free solder that it probably generates even more e-waste. So step 1 is to throw your lead free solder in the bin and get some 60/40 tin lead solder, 0.7mm or whatever that is in other units. Something with lots of flux in it. I also use 1.2mm for soldering the larger connectors, I have always done that, it makes sense in my head, but that's up to you.

Once you have checked out all the parts, it is a good idea to fit all the lowest components first. The axial resistors, capacitors and diodes. (I forgot to take a picture, so here is one of a Minstrel 3 that I assembled previously)

I prefer to rest the board off a shelf (or you can get PCB stands) and insert all the components from the top in one go. I then solder them from the top of the board. I find that far easier than keep spinning the board around, and I think it looks neater as well.

You can then flip it over and cut off all the pins from the back in one go.

You will notice I talk a lot about aesthetics, I like things to look nice. The components are all lines up to look neat, but also I find it easier if I need to check the values when they are all lined up the same way.

Normally I have the black band on the diodes, the cathode end, lined up with the gold stripes on the resistors, the tolerance band (gold = ±5%). I also try to get the capacitor values upwards so they can easily be read.

What's that, you have got an extra 100nF capacitor?

I bet this is the one you missed.

Next come the ICs. I prefer to solder the logic ICs directly to the board. You can order the kit with sockets for all ICs if you like, or you can use your own. But please do not use cheap ebay dual wipe sockets. They are often very poor and do not give a good connection.

I like the way the 14 and 16 pin IC packages are the same size, so have arranged the positioning so they line up nicely (aesthetics again).

With sockets, you end up with the 16 pins chips on the end standing out more.

Personal preference, you do what works for you.

Next comes the sockets for the larger ICs, these are included in the kit.

These are good quality turned pin types (and not wire wrapping sockets as one commentor recently said on a YouTube video). I prefer this type. I find they give good reliable contact, and as long as you are not using reclaimed, desoldered chips with wonky legs covered in solder, they work well. Some people don't like them, so change them if you want.

Next is pretty much everything else.

Switches, connectors, jumpers, transistor, crystal, electrolytic capacitor, piezo sounder and voltage regulator.

The Minstrel 4th, even with a few RC2014 cards only uses 100-150mA, so the regulator does not need a heatsink. You can leave it free-floating, but I normally rivet it down (as shown here on an older board).

For a change, I soldered the tab today, but again, whatever works for you.

At this point the board is going to be covered in flux and some small flakes of solder or tiny off-cuts of leads etc. You really need to give the board a good clean at this point. It can make a big difference, and does sort out quite a few issues.

I recommend a good flux cleaner, I am currently using one with a built in brush and that is very effective. Follow that with a couple of washes with IPA to get rid of everything else and leave everything nice and clean.

Once the board is clean, give it a thorough inspection. You are looking for missed solder joints, solder bridges, dry joints, anything out of the ordinary. It can help to use an illuminated magnifier and hold the board at different angles, the bad joints often shine differently to the rest.

When I was building this one, I spotted a couple as I was working and thought, oh good, they will be good examples for the blog post. I then proceeded to absent-mindlessly fix them by force of habit before I took any photos.

I did have one I built recently where I missed a pin, easy to do, specially when you solder like I do, dragging the iron along, relying on flux and surface tension.

Based on 10 years of building these, remotely troubleshooting for people who have built the kits and investigating ones that have been sent to me to check over, I can honestly say that 95% of the problems are fixed by cleaning the board properly and fixing those little soldering issues.

Next it is time for the keyboard. Insert the switches carefully, they are a tight fit, so make sure not to fold any of the legs underneath. 

You can rest the overlay PCB on them to check they are all inline and sitting flat.

You don't actually have to solder the switches in, they make a decent enough contact just with the PCB holes, but it wouldn't hurt to solder them all in, but wait until the faceplate is bolted on to keep everything straight and level.

Fit the four longer screws and 4mm spacers to the overlay PCB.

And then fix that in place with four of the 10mm pillars from the back.

Fit the remaining two pillars with the shorter screws at the rear of the board.

Now it is time to install the socketed ICs.

The final step is to set the jumpers. Refer to the manual for full details, but set the video jumpers to suit. Both to the left is PAL video and black text on a white background.

The clock jumpers as shown below is 3.25MHz (Jupiter Ace standard) and that clock fed to the clock#1 pin on the RC2014 bus.

The A15 and A14 jumpers select the ROM from up to four different ROM images. Left is high, both left is the highest 16K ROM block in the ROM, which is the standard Forth ROM. There are another three combinations, more details on those in the next post.

Finally power. Both jumpers horizontal is for centre negative power supplies, as used on the ZX Spectrum, Commodore 16, and many guitar pedals etc. Both vertical is for centre positive which is pretty much everything else.

Ready to go, time to apply some power.

8-12V will do, 9V is the standard voltage. If you plan to use some power hungry RC2014 cards (i.e. something with a Raspberry Pi or display on it), you use a powered backplane or you could fit a 7805 switching regulator regplacement. They often have input ranges like 7-35V or 8-28V (as shown). You would need to change the electrolytic capacitor if you plan to use over 20V.

Power on, and all being well, you should see a small black square in the bottom corner.

It is a legal requirement that the first thing you should type is vlist.

After that, you can try some forth programming, load some games, even try some of the other ROM images.

Does it work?

If your kit works first time (or thereabouts) please tell the world, it will be greatly appreciated by the designer of the kit, and it's always good to hear positive news.

If it doesn't please reach don't tell the world until you have gone through some simple trouble shooting steps, and if that fails, try to reach out to the designer and try to get it resolved. 

It can really damage the perception of a new kit that someone may have been working on for months and spent lots of their own money on. If the first social media posts or YouTube videos that are seen show "I built this and it worked first time". People will think, "oh, I could do that and maybe my kit would work first time as well".

However, when they see posts about failed builds, they may think "oh, I don't think I will get one of those, mine probably won't work either". Fair enough if it is a bad kit, if the design or documentation is bad, but if there is nothing wrong with the kit itself, it might be casting it unfairly in a bad light.

Likewise, if you find issues, try to report those to the designer first. Sometimes those are not really issues, or get fixed for the next release, but the post stay out there and continue to have a negative impact as people might assume they are actual problems, or they have not been fixed. I hope it's not unreasonable to ask you to consider how things might be perceived, that's all I am asking. 

Troubleshooting

If you haven't already cleaned and checked over the board with a magnifier or a set of eyes younger than mine, go back and do that. It should solve 95% of problems

  • Missed solder joint
  • Solder bridge
  • Dry joint
  • Parts in the wrong place
  • Incorrectly oriented parts
  • Tracks damaged from rework

As well as those, there are occasionally issues like these:

  • Wrong jumper settings
  • Inappropriate power supply
  • Monitor / HDMI adapter that does not like monochrome composite video

It is very rarely anything else. If you went for the PCB only option and are using an assortment of "new old stock" ebay chips, it is quite possible you have fake / remarked or just plain faulty chips. That is particularly an issue on the Minstrel 2 with vintage 74LS series parts that might not be up to the job anymore. Particularly the higher frequency parts such as the 74LS86, 74LS74 and the 74LS157s.

If you have exhausted all of the above checks, then its time to look deeper into the circuit, but most of these builds just work first time, or sometimes need the odd soldering misdemeanour corrected and then are up and running, so be wary before going too far.

It can be counter-productive to start delving deeper without having done the cleaning and checking stages. Once you get into rework and replacing parts and the chances of success start to drop. Take a step back. Run some IPA over the board again, get out the even brighter light and the even stronger magnifier and look again. I can promise you most of the problems are there.

First checks

Power, clock, reset.

That is always my starting point.

Power

Check the incoming supply and all the supply rails, check various ICs around the board, both ground and VCC pins and make sure everything is connected correctly. Most chips have ground bottom left, and VCC top right, but not the Z80, 65xx chips or for some reason the 74LS93.

If any of the rails are high, low or simply missing, power off and check the jumpers, look for shorts or any chips getting hot.

Clock

If you have an oscilloscope, check for the appropriate clock on the CPU and anywhere else it is used, if there is no clock there, check the jumpers and trace back to the clock crystal and the driving chip. On the Minstrel 2 and 3, the clock is generated by a pair of 74x86 gates. On the Minstrel 4th, the crystal is driven by the microcontroller, and the clock is output on one of it's pins.

Reset

The reset pin on the processor should be high with a brief low pulse when power is applied or the reset button is pressed.

Data, Address and Control lines

If all of those are OK, time to start looking around at the data and address bus and control lines.

Look around various chips on the board. You want to see signals that are changing between high and low cleanly. If you find any that are in the muddy grey area around 2V-3V you have a bus conflict somewhere. Two chips are trying to drive the bus at the same time, could be a bad chip, or could be the control signals are incorrectly enabling multiple chips at the same time.

The kits use all new parts, and the programmed parts are all tested when the kits are assembled. The few exceptions are the Z80 and 7132 dual port RAM chips, but these are using stocks purchased before they were discontinued, so were new at the time, have just been sitting in a box in my workshop for a few years.


Adverts

The Minstrel 2, 3 and recently relaunched Minstrel 4th are available on my Tindie store.

The Minstrel 4th now features multiple ROM images, so you can run Forth or ZX80 or ZX81 BASIC, including slow mode. The BASICs are still experimental. They are fairly compatible, most things work, with a few caveats if programs have their own video routines for pseudo-high-resolution graphics modes or fancy loaders etc.

Yes, you can run 3D Monster Maze - that was my target. This is the original unmodified version, loaded from tape.


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.

Sunday, 3 December 2023

ZX80 BASIC on a Minstrel 4D - Part 2 - New tape load and save routines

Continuing the series of posts from Patreon in early November, working on getting ZX80 BASIC running on the Minstrel 4D.

Yesterday I gave up on trying to make the old ZX80 tape load routine work. I do not know what exactly is wrong, I have tried all the combinations I can think, and is just isn't working.

So, I wrote a new one.

A new tape loading routine

The screen border on the Minstrel 4D is driven by the load signal, so you can see the data on the tape in it's groups of 4 or 9 pulses, which represent the 0's and 1s.

The ZX80 cannot generate the screen during loading, so normally the screen is just black. As the hardware on the Minstrel 4D is different, the screen persist with the last update, so the LOAD command remains visible where it was typed until the program has loaded.

I thought it might cause the user to think they hadn't pressed return, or it had not registered, so I tried blanking the screen, which sort of worked. I also tried filling it with 50% grey characters, which is not normal to see on a ZX80, so acts as a "something is going on and nothing is being drawn on the screen".

Loading is a difficult thing to debug, but I realised I could make use of the display. I will go into more detail in a future post, but I can write to the display when the Z80 is doing other things.

Here I am writing the bits remaining counter when it gets to the end of a byte. Most of the time with the old load routine, I was lucky to get more than a single 1. This was an unusual occasion I captured when the volume level on the tape was wrong and the data was rubbish, but it was rubbish in just the right way to make the old tape routine accept that rubbish and try to load it.

I decided to write a new load routine, and see if that worked.

The idea seems to be the a series of either 4 or 9 pulses, followed by a gap. A wrote code to detect the transitions in the signal (so polarity would not be an issue), and waited until there was a big enough gap since the last transition to count as the end.

This shows a 1 and a 0 being detected. Yellow is the sampling pulses, green is the input signal, and blue shows writes to RAM once a bit has been detected.

I used the debug to record the 0s and 1s here showing the 66 bytes that make up the "Hello" program I was testing with.

There is no formatting to the data, no header or end marker. End detection on the ZX80 is based on the data in the file itself. It is written to RAM from 0x4000 upwards, overwriting all the system variables, including E_LINE, the end marker. As memory fills up with data being loaded, the current address is compared with E_LINE until they match, and then loading is complete and the program is listed. (E_LINE is initially set to a high address so that it will not stop before E_LINE has been overwritten with the value from the tape)

Yay, finally. Can you imagine how relieved I was to finally get that working (at about 5AM this morning, but who's counting).

And it even worked.

I needed to remove the debug, but it then went back to being a sort of boring grey. 

I think I can do better than that.

Now when you type LOAD, the screen is cleared and you get a little box.

As loading progresses, the current address is displayed. I thought about subtracting 4000, so it counted up from 0000 instead of 4000, but I think it's fine like that. It also counts in hex as that is far easier to do. Very easy as it happens due to the character set of the ZX80. Character 28 through 37 are 0 to 9, and 38 goes straight to A, so characters 28 through to 43 are 0123456789ABCDEF. To display a number in hex, just add 28 to it. (It is a little more complicated in practice as you need to split the byte into two nibble, and display each one separately.)

That seems to be working quite nicely. I was a little worried about the extra overhead, but it only adds a small delay, see the extra write pulses in blue at the end of a byte, more than enough space before the next one starts.

I successfully loaded many programs, including a large text adventure, Citadel.

And a version of Othello with a surprisingly good AI player.

Save

I knew save was going to have similar problems to load. The hardware of the Ace is again fairly similar to that of the ZX80 when it comes to saving, but the actual triggers are different.

The ZX80 re-purposes the VSync generator to drive the mic input of a cassette recorder. So again, when it is doing that, it cannot drive the TV signal, but that's par for the course with the ZX80.

Here the signal is turned on by any IO writes, and turned off by keyboard IO reads.

The IO read to the keyboard doubles to turn the sync signal off and also read the column which includes the space key, so that can be used to abort the save.

The sync signal generated is a series of pulses representing 0s and 1s. A 0 is 4 pulses, a 1 is 9 pulses. There are no byte or block markers.

The version which is recorded on the tape is AC coupled by the capacitor C14, so ends up as a stream of pulses of 300us / 3.33kHz, which is within the range of a basic 1980s domestic cassette recorder.

The Minstrel 4D has the same output section as the Jupiter Ace, which is something resembling a proper IO port. In this case, a 1 bit output port latching the value of D3 written to I/O port FE.

In order to make save work on the ZX80 4K BASIC on the Minstrel 4D, I just need to change the IO write (to unused address 0xFF) to be a write to 0xFE with D3 set to 1, and the reads of 0xFE to be writes to 0xFE with D3 set to 0.

I need to add extra reads to 0xFE to check for the break key. This is only tested between bytes, so an extra read there shouldn't be a problem.

The only problem is the speaker on the Ace is also controlled by IO reads and writes to port FE so it will click on an off with each byte.

I don't think there is a way around that. I can't change the hardware, so it's either clicking or no way to abort a save once it has started.

Testing out save, that worked fine.

Rather than having to mess around patching in place, I decided it would be easier to just create a new save function, that way I could also use the on screen counter the same as the new load routine.

That all seems to work as expected, I have tried saving and loading and all seems to work well and interchangeably with a Minstrel 2 running the original ZX80 4K BASIC ROM.


In the next post I will be trying out some games and seeing if the special "flicker-free" programs work.


Advertisements

Minstrel 4D

Minstrel 4D kits and ready built units are available from thefuturewas8bit.com

https://www.thefuturewas8bit.com/shop/tynemouth-products/minstrel4d.html


Patreon

You can support me via Patreon, and get access to advance previews of blog posts and behind the scenes updates. These are often in more detail than I can fit in here. This also includes access to my Patreon only Discord server for even more regular updates.

https://www.patreon.com/tynemouthsoftware