UK Vintage Radio Repair and Restoration Discussion Forum

UK Vintage Radio Repair and Restoration Discussion Forum (
-   Vintage Computers (
-   -   Yet another MK14 tape interface (ESP32). (

coolsnaz2 25th Nov 2021 8:22 pm

Yet another MK14 tape interface (ESP32).
3 Attachment(s)
I wanted a device which would allow me to load programmes onto my old Mk14.
On searching the web, I came across Slothie’s tape Emulator program developed for the Arduino.
I adapted Slothie’s program to run on a M5Stack Atom, this is ideal if you only need to load 1 or 2 programmes.
I decided to use the slightly more expensive M5StickC PLUS. With the colour LCD display and an additional button which allows me to select the program to be loaded. Currently I have 5 games from the original Training Manual loaded onto the M5StickC. Moon Landing game takes approximately one minute to load.
The M5StickC is 48.2*25.5*13.7 self-contained unit with battery and requires only two wires connected to the Mk14 tape interface.

SiriusHardware 26th Nov 2021 11:36 am

Re: Yet another MK14 tape interface (ESP32).
Hello coolsnaz2 - we are honoured to receive a rare special guest appearance from you and that nice original MK14 of yours. The tape substitute looks very neat - I take it you must have designed the 3D printed case to fit around the particular micro PCB which you have used?

coolsnaz2 26th Nov 2021 5:14 pm

Re: Yet another MK14 tape interface (ESP32).
Hi SiriusHardware, sorry to disappoint you, no 3D printing involved, that is how the M5StickC arrives.

SiriusHardware 26th Nov 2021 6:06 pm

Re: Yet another MK14 tape interface (ESP32).
Oh I see, it actually comes in the case. Quite a powerful little thing for the money although it doesn't seem to have many GPIO lines exposed. More than enough for what you have used it for, though.

Timbucus 26th Nov 2021 7:46 pm

Re: Yet another MK14 tape interface (ESP32).
Looks lovely - both the original MK14 and the device to simulate the tape player. Any chance of a picture of your interface and the end of the MK14 - interesting how it is on the expansion port.

coolsnaz2 26th Nov 2021 9:18 pm

Re: Yet another MK14 tape interface (ESP32).
3 Attachment(s)
The backplane is used to connect the MK14 to my VDU card, with the VDU card sitting under the MK14 (not currently inserted). I connect G33 from the M5Stick to the standard MK14 tape interface which appears pins 27 and 28 of the edge connect, plus a ground.

SiriusHardware 27th Nov 2021 11:20 am

Re: Yet another MK14 tape interface (ESP32).
Coolsnaz2, as a very infrequent poster you are still subject to 'new user' moderation so your posts don't appear straight away but when they do appear they appear in chronological order, so when Tim and I posted #5 and #4 respectively your post #3 wasn't yet visible. This can be confusing but it will wear off once you've posted a few more times.

Like Tim, I would be interested to see what's installed on the end of the MK14, is it a homebrew copy of the tape interface - also what is the little joiner or converter in the cable between the microcontroller module / tape emulator and the MK14?

I like the customisation of the external keypad - clearly the numeric keys have the original key legends but the others have been carefully re-legended and then given a coat of clear varnish which has yellowed over time.

I also notice that the MK14 does not have its original huge 4.43Mhz crystal fitted, the smaller grey one fitted looks like the 4.00MHz one provided with the VDU kit so, do you also have the VDU card as well?

Edit: I posted this before your post #6 appeared - thanks for the info.

SiriusHardware 27th Nov 2021 11:51 am

Re: Yet another MK14 tape interface (ESP32).
Another thing I notice is that your MK14 does not ever appear to have had its onboard regulator fitted, instead you have linked the +8V fingers on the edge connector to the +5V rail so those contact fingers now function as +5V in / out. What are you using as a +5V supply?

coolsnaz2 27th Nov 2021 5:16 pm

Re: Yet another MK14 tape interface (ESP32).
2 Attachment(s)
My MK14 had the original regulator at first, when the VDU board arrived I moved the 5v regulation off the board. The board has been powered by a number of power supplies over the the years, currently powered from an Advance PMG Power Module.

The little joiner is a GROVE-to-VH3.96 interface, also supplied by M5Stack, no components just straight through connections.

The crystal is the 4.00 Mhz one, not sure if it was supplied with the original kit or the VDU kit.

SiriusHardware 28th Nov 2021 11:59 am

Re: Yet another MK14 tape interface (ESP32).
I was never happy with how hot the regulator ran when installed on the PCB itself and so when mine ended up in the wedge-shaped plywood 'console' which would become its permanent home I moved the original regulator offboard and onto a largeish finned heatsink mounted on the rear of the 'case'. The suggestion from S.O.C. that it '...might require a heatsink' was a bit of an understatement.

My Slothie 'Issue VI' replica has the traditional stand-alone configuration with the regulator and heatsink on board, but I run it on a regulated 7.5V supply to minimise voltage drop across the onboard 5V regulator.

I'm sure your crystal (grey shrink wrap, black lettering) is the one provided with the VDU kit.

I'm glad you have obviously decided to dust yours off and get to the point where you can easily demo it working.

It's a sobering thought that the Pis / Arduinos / ESP32s which we use as mere MK14 accessories nowadays are all many times more powerful than the machine they are supporting, but the MK14 was what it was, it was the only affordable 'computer' at the time, and if I had not had one and had not owned a computer until the BASIC computer era a few years later I might never have learned about microprocessors at machine level, so I will always be grateful to it for that.

Phil__G 28th Nov 2021 12:58 pm

Re: Yet another MK14 tape interface (ESP32).

Originally Posted by coolsnaz2 (Post 1427943)
My MK14 had the original regulator at first, when the VDU board arrived I moved the 5v regulation off the board. The board has been powered by a number of power supplies over the the years, currently powered from an Advance PMG Power Module.

I find USB so convenient that all my small stuff is USB powered now, so it can be powered from from a USB wall-wart supply, a laptop or a battery power-bank, or from the CH340G or FTDI thats doing the serial console - very versatile if not quite 'retro' :) Would a fully-loaded MK14 be too much?

SiriusHardware 28th Nov 2021 6:08 pm

Re: Yet another MK14 tape interface (ESP32).
You can now get SMPSU modules which have roughly the same form factor as a 7805 regulator and the same three-lead pinout, obviously they are a lot more efficient and don't require a heatsink for the same power out.

My official Raspberry Pi 4 PSU unit (5.1V) has a USB-C plug on the end and is allegedly capable of supplying 3A, but that might be subject to intelligent negotiation between the PSU and the thing being powered. My original MK14 with all onboard options fitted draws about 0.5A from 5V.

I would hesitate to power something as ancient as an original MK14 from any mains SMPSU which does not have its 0V-out connected to mains earth via a metal pin - un-earthed mains SMPSUs often have low current high voltage AC superimposed on their 0V line due to the use of a low value capacitor across the mains / low voltage barrier, for EMC suppression purposes.

That low current high voltage won't hurt me if I happen to touch the 0V of the circuit being powered - at worst an unpleasant tingle, but that same tingle could be the death of old ICs - hence my obsession for interfacing with the MK14 via optocouplers whenever possible.

Getting back to the tape loader, it occurs to me that if we were prepared to change several (timing) bytes in the 'new OS' code we could 'speed load' cassette code in from the various digital devices we can now use to directly generate the digital waveform the SC/MP expects to see on Sin / SenseB.

Or going halfway: Use the in-PROM cassette routines to load the software tape loader routine (from the manual) with modified (faster) timing into spare memory at normal speed and then use that to load your code in from the ESP32 at much higher speed. Obviously the ESP32 would have to output the data at the corresponding higher speed. You could make it automatically send the speed loader code to the MK14 at normal speed and all other files at much higher speed on the assumption that the already loaded 'speed loader' code will be used to load those.

Slothie 29th Nov 2021 11:05 am

Re: Yet another MK14 tape interface (ESP32).
Glad to see your setup! Those M5 Sticks look quite fun, perfect for this kind of application. Nice to see an original MK14 being used for tinkering too. The keyboard looks great, my replica uses Tact switches which bounce a bit more than I would like, I did get some better quality ones but I was thinking about making an external keyboard like yours using proper mechanical keyboard switches, but I am currently looking at other projects at the moment.

coolsnaz2 1st Dec 2021 5:35 pm

Re: Yet another MK14 tape interface (ESP32).
SiriusHardware, I tried what you suggested. I loaded a slightly modified tape loader routine and separated the Sin and SenseB. Using the SenseB input as sync, and Sin as the data input, I have reduced the load time for Moon Landing from 58 seconds to 4.3 seconds.

Currently I don't connect the M5StickC to a power source while it is connected to my MK14, it has it's own internal 120mAh Lipo battery.

SiriusHardware 1st Dec 2021 7:13 pm

Re: Yet another MK14 tape interface (ESP32).

I have reduced the load time for Moon Landing from 58 seconds to 4.3 seconds.
!!! That is way better than I could have imagined. :)

The only problem now is that it takes you longer to type the load destination address into 0FF9 (or wherever) than it does to load the program!

I don't know if you would be interesting in sharing more details of your project - no pressure obviously, but we are always interested to see new MK14 projects and utilities.

SiriusHardware 1st Dec 2021 7:27 pm

Re: Yet another MK14 tape interface (ESP32).
Would your modified fast-loader code fit into the space currently occupied by the tape loader routine in the 'New OS' PROM? I'm thinking / wondering if it would be possible to replace the original routine with the fast one if the MK14 is always going to be used with a digital 'tape'.

My original thought was just to pare the current timing values down to as low as they could go without altering the main body of the code but it sounds as though you've altered the structure a bit.

coolsnaz2 2nd Dec 2021 3:55 pm

Re: Yet another MK14 tape interface (ESP32).
Fast-loader requires one additional byte, I have increased the sync speed and got Moon Lander program loading in under 2 seconds, not sure what the theoretical maximum speed we could achieve.

Changing the original timing values from 32ms per bit to 8ms per bit reduces load time to 16.7 seconds.

If you wanted to incorporate the Fast-Loader into a 'New OS' PROM, presumable you would update the 'Store to Tape' routine at the same time, and I am not sure if this would require more or less bytes.

Another option may be to remove 'Store to Tape' option completely and modify 'Load From Tape' to be able to handle Start Address, Length and Execution Address. Unfortunately this is currently beyond my capabilities.

I don't mind sharing more details of my project, if required.

SiriusHardware 2nd Dec 2021 9:30 pm

Re: Yet another MK14 tape interface (ESP32).
You seem pretty comfortable mucking about with SC/MP code so I wonder how you go about writing code - do you do it on a PC with a cross assembler? Or do you do it 1978 style in hex and on the machine itself?

If you write it off-machine then the ability to save code from the machine is arguably redundant, as is the jump offset calculator and maybe even the single step facility, so there's more PROM you could free up to do synchronous serial upload from Intel Hex, which would let the uploader place the code at the right address automatically.

When I made the keypad injection loaders the main aim was to alter absolutely nothing on the MK14, including the PROM contents, because the only MK14 I had at the time was my original issue II MK14. I've since built one of Slothie's issue VI replicas and that is the main one I play with now.

People here are generally very generous about posting circuits and project code but I'm not trying to steamroller you into doing the same - if you are happy to post your code for your project then obviously we would be interested to see it.

coolsnaz2 3rd Dec 2021 3:45 pm

Re: Yet another MK14 tape interface (ESP32).
1 Attachment(s)
I only wrote a couple of programs for the SC/MP, so used the 1978 style in hex on paper.

I agree the Fast-loader should alter nothing on the MK14, so Fast-loader should be loaded using the existing interfaces into RAM. Any subsequent loads could then use Fast-loader. The loader could be developed further to include Start Address, Execution Address and length.

New load code below.

007C C408 FRTAPE: LDI 8
0080 06 LOOP: CSA
0081 D420 ANI 20
0083 98FB JZ LOOP
0085 19 S10
0086 06 LOOP2: CSA
0087 D420 ANI 20
0089 9CFB JZ LOOP2
008F 40 LDE
0086 CD01 ST@1(1)
0092 90E8 JMP FRTAPE

The Sense-B and Sin connection has been broken, Sense-B goes to G33 on the M5StickC and the Sin goes to G32 on the M5Stick.

As mentioned previously my M5StackC code is based on Slothie's original program, below is new sendByteSync function. What is the best way to share M5StickC code?

void sendByteSync(byte b) {
for (int i=0; i<8; i++) {
byte thisbit = b & 1;
b = b>>1;

if ( thisbit == 1 ){
digitalWrite(G32, HIGH);
digitalWrite(G32, LOW);

digitalWrite(G33, HIGH);
digitalWrite(G33, LOW);


SiriusHardware 3rd Dec 2021 4:06 pm

Re: Yet another MK14 tape interface (ESP32).
Thanks for posting the information, I don't think I could have come up with a bit of pen-and-paper hex like that so quickly.


What is the best way to share M5StickC code?
For small fragments of code like that, just put CODE tags around them in the post editor. (Select with the # symbol in the advanced editor). Doing so also preserves the formatting of the code which can be critical in some languages like Python, which depend on indenting for the identification of code blocks.

There are only a limited number of file attachments allowed and '.ino' etc aren't among them so if you want to post a large file or project consisting of some code, circuit diagrams etc, best to pile all the individual parts into a single .zip file, as .zip is allowed.

Deciding not to mess with anything on the MK14 was just my personal choice as I didn't want to modify what is now a historic and quite valuable machine, but nowadays I have a replica MK14 as well and the means to program (most of) the compatible PROMs so I wouldn't be so averse to experimentation on that one.

All times are GMT. The time now is 12:25 am.

Powered by vBulletin®
Copyright ©2000 - 2022, vBulletin Solutions, Inc.
Copyright ©2002 - 2021, Paul Stenning.