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 10th Sep 2021, 10:58 pm   #1
Slothie
Octode
 
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
Default 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've used the format naming the files with the execution address suffix on code that are complete programs that some seem to use as it is a useful reminder. However all sources that are relevant contain the necessary statements to generate the "fake" bytes at FFFE and FFFF to tell Sirius's uploader program to execute the program at the start address.

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....
Attached Files
File Type: zip examples.zip (23.2 KB, 103 views)
Slothie is offline  
Old 11th Sep 2021, 8:34 am   #2
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,471
Default 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.
SiriusHardware is offline  
Old 11th Sep 2021, 3:13 pm   #3
Timbucus
Octode
 
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 1,362
Default Re: MK14 examples sources

I will draw them together - for a start here is the 2D Life Game I love playing....
Attached Files
File Type: zip LIFE_FA0.zip (338.1 KB, 76 views)
Timbucus is offline  
Old 11th Sep 2021, 3:18 pm   #4
Timbucus
Octode
 
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 1,362
Default Re: MK14 examples sources

Here is Mr Robson's SEGTRIS converted to SBASM - It needs the full 512K memory

SEGTRIS512K.zip
Timbucus is offline  
Old 11th Sep 2021, 3:25 pm   #5
Timbucus
Octode
 
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 1,362
Default 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.
Attached Files
File Type: zip PicoBASIC.zip (192.9 KB, 80 views)
Timbucus is offline  
Old 11th Sep 2021, 4:04 pm   #6
Timbucus
Octode
 
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 1,362
Default Re: MK14 examples sources

This is Karen Orton's 2007 Babbage Difference Engine simulation...
Attached Files
File Type: zip BABBAGE_F20.zip (1.5 KB, 68 views)
Timbucus is offline  
Old 11th Sep 2021, 4:11 pm   #7
Timbucus
Octode
 
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 1,362
Default 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...
Attached Files
File Type: zip CT7905Maze.zip (428.1 KB, 62 views)
Timbucus is offline  
Old 11th Sep 2021, 5:01 pm   #8
Slothie
Octode
 
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
Default Re: MK14 examples sources

Quote:
Originally Posted by Timbucus View Post
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...
If anyone could find an Adventure for the MK14, Tim could! This actually looks quite fun. Imagine what could be done with the 1.5k expanded memory.....!
Slothie is offline  
Old 11th Sep 2021, 6:06 pm   #9
Timbucus
Octode
 
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 1,362
Default Re: MK14 examples sources

Quote:
Originally Posted by Slothie View Post
Quote:
Originally Posted by Timbucus View Post
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...
If anyone could find an Adventure for the MK14, Tim could! This actually looks quite fun. Imagine what could be done with the 1.5k expanded memory.....!
it is fun - try playing it before you study the source too closely - making a map is interesting...
Timbucus is offline  
Old 13th Sep 2021, 5:13 pm   #10
Slothie
Octode
 
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
Default 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!
Attached Files
File Type: zip moonlanding.zip (2.1 KB, 53 views)
Slothie is offline  
Old 13th Sep 2021, 6:16 pm   #11
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,471
Default 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.
SiriusHardware is offline  
Old 13th Sep 2021, 7:39 pm   #12
Slothie
Octode
 
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
Default Re: MK14 examples sources

Quote:
Originally Posted by SiriusHardware View Post
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.
I've come to that conclution too, so I was trying to ensure that the hex codes in the manual were the same as those produced by the assembler. I was assuming someone would have verified the hex was correct, I have also found a couple of places where the assembly code is wrong for the hex codes being produced.
Slothie is offline  
Old 13th Sep 2021, 8:07 pm   #13
JohnBHanson
Heptode
 
Join Date: Aug 2009
Location: Worthing, Sussex, UK.
Posts: 659
Default 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
Attached Files
File Type: zip scmplist.zip (9.0 KB, 104 views)
JohnBHanson is offline  
Old 13th Sep 2021, 8:17 pm   #14
Slothie
Octode
 
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
Default 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.
Attached Files
File Type: zip moonlandig.zip (2.1 KB, 61 views)
Slothie is offline  
Old 13th Sep 2021, 8:22 pm   #15
Slothie
Octode
 
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
Default 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....
Slothie is offline  
Old 13th Sep 2021, 9:07 pm   #16
circuitryboy
Pentode
 
circuitryboy's Avatar
 
Join Date: Jun 2012
Location: Bristol, UK.
Posts: 115
Default Re: MK14 examples sources

Exactly so. The PAL reference crystals were cheaper.
circuitryboy is offline  
Old 14th Sep 2021, 8:00 am   #17
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,471
Default 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.
SiriusHardware is offline  
Old 14th Sep 2021, 8:26 am   #18
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,471
Default Re: MK14 examples sources

Quote:
a bad data byte and a wrong placement of a label
Wrong placement of one jump destination label would cause the relevant jump destination offset value to be different to the original one in the hex listing, so, provided that jump instruction is the only one which targets that label, those two things match up very neatly.
SiriusHardware is offline  
Old 14th Sep 2021, 10:04 am   #19
Slothie
Octode
 
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
Default 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!
Slothie is offline  
Old 14th Sep 2021, 6:57 pm   #20
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,471
Default 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.
SiriusHardware is offline  
Closed Thread

Thread Tools



All times are GMT +1. The time now is 6:29 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.