|
Vintage Computers Any vintage computer systems, calculators, video games etc., but with an emphasis on 1980s and earlier equipment. |
|
Thread Tools |
10th Sep 2021, 10:58 pm | #1 |
Octode
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
|
MK14 examples sources
I've been trying to re-teach myself how to program the MK14,, and in the process have typed in and converted to SBASM compatible form all the programs in the V2 manuals
Code:
alarmclock_f20.asm dectohex_f50.asm divide.asm duckshoot_f12.asm function_e80.asm gcd.asm mastermind_f1c.asm message_f20.asm moonlanding_f52.asm multiply.asm musicbox_f46.asm organ_f20.asm pulsedelay_f20.asm randomnoise_f20.asm reaction_f20.asm relocator_f20.asm replicate_f12.asm serin.asm serout.asm silverdollar_f28.asm sqroot.asm I have typed in all these programs and done a byte-by-byte comparison from the listings to confirm they are correct, but as yet haven't necessarily ran all these programs or code fragments. As I mentioned these are designed to be assembled with SBASM, and I have included a Makefile in the archive that will assemble all the program if you have a suitable unix-like environment (I can't see why Cygwin on windows wouldn't work). The archive also contains all the generated hex files too for those who don't want to. If you want to convert the examples to suit a different assembler you prefer, that should be fairly straightforward, so feel free and maybe post your versions here! If you spot any glaring errors then please inform me.... |
11th Sep 2021, 8:34 am | #2 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,560
|
Re: MK14 examples sources
Good work, and a good idea. I think Tim has 'done' many of the historic programs which were NOT in the manual, such as OneArm, Segtris, Life, many snippets of code from magazines like PE, plus just about everything which was written to run on the VDU so maybe he could add those, time allowing, to make this the 'MK14 software repository thread'. A lot of stuff has been posted before but it is scattered all over the place.
|
11th Sep 2021, 3:13 pm | #3 |
Octode
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 1,363
|
Re: MK14 examples sources
I will draw them together - for a start here is the 2D Life Game I love playing....
|
11th Sep 2021, 3:18 pm | #4 |
Octode
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 1,363
|
Re: MK14 examples sources
|
11th Sep 2021, 3:25 pm | #5 |
Octode
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 1,363
|
Re: MK14 examples sources
For those with full 1.5K memory expansion - PicoBASIC is a great thing to play with - again converted from Mr Robson's source - the original magazine scan was too big for the archive - except the front cover on which it features - yes an MK14 program - so I include a capture of the relevant retyped pages from Mr Robson's now defunct website.
|
11th Sep 2021, 4:04 pm | #6 |
Octode
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 1,363
|
Re: MK14 examples sources
This is Karen Orton's 2007 Babbage Difference Engine simulation...
|
11th Sep 2021, 4:11 pm | #7 |
Octode
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 1,363
|
Re: MK14 examples sources
Here is the great little Maze game mentioned in Compliment and Add, which is where the instructions are from as Computing Today May 1979 failed to include them. Note it was a Hex listing only so I disassembled and commented it. This is the one I refer to in my Adventure Video on my channel https://youtu.be/P7XvHifN78k playing this will be in my planned MK14 video when I get five minutes...
|
11th Sep 2021, 5:01 pm | #8 | |
Octode
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
|
Re: MK14 examples sources
Quote:
|
|
11th Sep 2021, 6:06 pm | #9 | ||
Octode
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 1,363
|
Re: MK14 examples sources
Quote:
|
||
13th Sep 2021, 5:13 pm | #10 |
Octode
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
|
Re: MK14 examples sources
There are a few problems with the moonlander source that cause it not to load properly using the loader, I've fixed that problem but the program shows a corrupted display when run. I'll upload it here anyhow, in case someone else wants to give it a go, 2 minds are better than 1 I am told!
|
13th Sep 2021, 6:16 pm | #11 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,560
|
Re: MK14 examples sources
When I SBASMed Moon Landing myself I could not reconcile the assembly language code with the hex code listing, because (I think) at least one of the jump destination labels was at the wrong address - I can't remember the specific problem though.
It's long been suggested that the programs in the manual were hand coded and then written up as assembly listings afterwards, not always completely accurately. Tim has a useful method of starting off by converting the original hex code listing to .DB statements, assembling that and seeing if that works, and then replacing the .DB statements instruction by instruction with an equivalent line of assembly language, although I imagine he only normally uses that for programs / routines for which only the hex code was ever supplied. |
13th Sep 2021, 7:39 pm | #12 | |
Octode
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
|
Re: MK14 examples sources
Quote:
|
|
13th Sep 2021, 8:07 pm | #13 |
Heptode
Join Date: Aug 2009
Location: Worthing, Sussex, UK.
Posts: 661
|
Re: MK14 examples sources
Just to help out - I used to have a mk14 which I bought in about 1983 and
gave away to someone in portsmouth in 1996 or so. Anyway I wrote an assmbler for it - and have attached the listings for the programs in the manual. Actually used it to check my assembler was generating correct code. I have attached the listing files here for reference |
13th Sep 2021, 8:17 pm | #14 |
Octode
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
|
Re: MK14 examples sources
Well I have had a look again and found the problems, a bad data byte and a wrong placement of a label. Here's the correct Hex and Asm files.
John - thanks for the listings, I will attempt to use them to validate my sources too. |
13th Sep 2021, 8:22 pm | #15 |
Octode
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
|
Re: MK14 examples sources
One thing I have noticed is that the programs that rely on timing all seem to assume a clock speed of 4MHz. It's almost like the MK14 was designed to run at 4MHz but someone turned up at Clives office with a suitcase full of 4.433619MHz crystals and only wanted a tenner for them....
|
13th Sep 2021, 9:07 pm | #16 |
Pentode
Join Date: Jun 2012
Location: Bristol, UK.
Posts: 115
|
Re: MK14 examples sources
Exactly so. The PAL reference crystals were cheaper.
|
14th Sep 2021, 8:00 am | #17 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,560
|
Re: MK14 examples sources
While the assumption re: 4.43MHz crystals is true - they were used in their millions in colour TVs at one time, so very widely made and therefore cheap - I'm fairly sure programs like Digital Clock - where software timing was used for the clock to run at the right speed - and 'Music Box' - where software timing was used to produce the right note pitches - worked properly with the original 4.43MHz clock.
Of course, I could just be completely tone deaf. |
14th Sep 2021, 8:26 am | #18 | |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,560
|
Re: MK14 examples sources
Quote:
|
|
14th Sep 2021, 10:04 am | #19 |
Octode
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
|
Re: MK14 examples sources
Well it seems to be working now. However, If I worked at NASA the surface of the moon would be scattered with the wreckage of lots of moon landers!
|
14th Sep 2021, 6:57 pm | #20 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,560
|
Re: MK14 examples sources
Moon Landing:
I usually let it freefall and accelerate until the altitude is about 540, then hit '7' and watch as the rate of descent decreases all the way down to '1', by which time the altitude is rather low. At that point, hit '5' to steady the rate of descent and coast gently down to the surface with about 1 unit of fuel remaining. Once you know how to do this you can do it every time, so the game really needs the introduction of a random element, such as a semi-random starting altitude, to make it more of a challenge. |