UK Vintage Radio Repair and Restoration Powered By Google Custom Search Vintage Radio and TV Service Data

Go Back   UK Vintage Radio Repair and Restoration Discussion Forum > Specific Vintage Equipment > Vintage Computers

Notices

Vintage Computers Any vintage computer systems, calculators, video games etc., but with an emphasis on 1980s and earlier equipment.

Closed Thread
 
Thread Tools
Old 25th Nov 2021, 9:22 pm   #1
coolsnaz2
Tetrode
 
Join Date: Aug 2020
Location: Wallington, Greater London, UK.
Posts: 86
Default Yet another MK14 tape interface (ESP32).

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.
Attached Thumbnails
Click image for larger version

Name:	20211125_200715.jpg
Views:	256
Size:	115.7 KB
ID:	246601   Click image for larger version

Name:	20211125_200445.jpg
Views:	217
Size:	66.5 KB
ID:	246602   Click image for larger version

Name:	20211125_200647.jpg
Views:	197
Size:	66.2 KB
ID:	246603  
coolsnaz2 is offline  
Old 26th Nov 2021, 12:36 pm   #2
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,471
Default 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?
SiriusHardware is offline  
Old 26th Nov 2021, 6:14 pm   #3
coolsnaz2
Tetrode
 
Join Date: Aug 2020
Location: Wallington, Greater London, UK.
Posts: 86
Default Re: Yet another MK14 tape interface (ESP32).

Hi SiriusHardware, sorry to disappoint you, no 3D printing involved, that is how the M5StickC arrives.
coolsnaz2 is offline  
Old 26th Nov 2021, 7:06 pm   #4
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,471
Default 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.

https://shop.pimoroni.com/products/m...evelopment-kit
SiriusHardware is offline  
Old 26th Nov 2021, 8:46 pm   #5
Timbucus
Octode
 
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 1,362
Default 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.
Timbucus is offline  
Old 26th Nov 2021, 10:18 pm   #6
coolsnaz2
Tetrode
 
Join Date: Aug 2020
Location: Wallington, Greater London, UK.
Posts: 86
Default Re: Yet another MK14 tape interface (ESP32).

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.
Attached Thumbnails
Click image for larger version

Name:	20211126_204323.jpg
Views:	138
Size:	130.4 KB
ID:	246709   Click image for larger version

Name:	20211126_204351.jpg
Views:	135
Size:	111.6 KB
ID:	246710   Click image for larger version

Name:	Mk14 Tape Interface.jpg
Views:	129
Size:	45.1 KB
ID:	246711  
coolsnaz2 is offline  
Old 27th Nov 2021, 12:20 pm   #7
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,471
Default 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.

Last edited by SiriusHardware; 27th Nov 2021 at 12:48 pm.
SiriusHardware is offline  
Old 27th Nov 2021, 12:51 pm   #8
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,471
Default 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?
SiriusHardware is offline  
Old 27th Nov 2021, 6:16 pm   #9
coolsnaz2
Tetrode
 
Join Date: Aug 2020
Location: Wallington, Greater London, UK.
Posts: 86
Default Re: Yet another MK14 tape interface (ESP32).

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.
Attached Thumbnails
Click image for larger version

Name:	20211127_162351.jpg
Views:	125
Size:	31.0 KB
ID:	246756   Click image for larger version

Name:	20211127_162318.jpg
Views:	128
Size:	43.0 KB
ID:	246757  
coolsnaz2 is offline  
Old 28th Nov 2021, 12:59 pm   #10
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,471
Default 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.
SiriusHardware is offline  
Old 28th Nov 2021, 1:58 pm   #11
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,063
Default Re: Yet another MK14 tape interface (ESP32).

Quote:
Originally Posted by coolsnaz2 View Post
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?
Phil__G is offline  
Old 28th Nov 2021, 7:08 pm   #12
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,471
Default 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.
SiriusHardware is offline  
Old 29th Nov 2021, 12:05 pm   #13
Slothie
Octode
 
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
Default 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.
Slothie is offline  
Old 1st Dec 2021, 6:35 pm   #14
coolsnaz2
Tetrode
 
Join Date: Aug 2020
Location: Wallington, Greater London, UK.
Posts: 86
Default 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.
coolsnaz2 is offline  
Old 1st Dec 2021, 8:13 pm   #15
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,471
Default Re: Yet another MK14 tape interface (ESP32).

Quote:
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 is offline  
Old 1st Dec 2021, 8:27 pm   #16
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,471
Default 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.
SiriusHardware is offline  
Old 2nd Dec 2021, 4:55 pm   #17
coolsnaz2
Tetrode
 
Join Date: Aug 2020
Location: Wallington, Greater London, UK.
Posts: 86
Default 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.
coolsnaz2 is offline  
Old 2nd Dec 2021, 10:30 pm   #18
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,471
Default 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.
SiriusHardware is offline  
Old 3rd Dec 2021, 4:45 pm   #19
coolsnaz2
Tetrode
 
Join Date: Aug 2020
Location: Wallington, Greater London, UK.
Posts: 86
Default Re: Yet another MK14 tape interface (ESP32).

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
007E CBD5 ST COUNT(3)
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
008B BBD5 DLD COUNT(3)
008D 9CF1 JNZ LOOP
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;
Serial.print(thisbit);
b = b>>1;

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

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

}
Serial.println();
}
Attached Thumbnails
Click image for larger version

Name:	20211203_142921.jpg
Views:	74
Size:	59.6 KB
ID:	247205  
coolsnaz2 is offline  
Old 3rd Dec 2021, 5:06 pm   #20
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,471
Default 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.

Quote:
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.
SiriusHardware is offline  
Closed Thread

Thread Tools



All times are GMT +1. The time now is 6:04 am.


All information and advice on this forum is subject to the WARNING AND DISCLAIMER located at https://www.vintage-radio.net/rules.html.
Failure to heed this warning may result in death or serious injury to yourself and/or others.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright ©2002 - 2023, Paul Stenning.