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 Jan 2023, 7:40 pm   #21
Slothie
Octode
 
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
Default Re: PIC14 and moonlander

There was a problem with one of the Moolander files I uploaded, although I can't remember the details. I have had one version running fine on my issue VI but must confess I haven't tried it on my PIC14. So its probabaly better to use a different one!
Slothie is offline  
Old 10th Jan 2023, 8:00 pm   #22
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,485
Default Re: PIC14 and moonlander

Attached, a 'key test' utility for the MK14 keypad - it's a bit long and unwieldy - when I wrote it I just wanted something which worked in the shortest possible time but in these days of hex uploading that's not much of an issue.

Intel Hex, loads at 0F12. Run from 0F20 (I have not included an auto-run line) - display goes blank. Press and hold any single key, the display shows:-

Row, Column, Key

The displayed 'Command' key symbols all have the DP illuminated, so G. M. A. t. (The 'M' for 'Mem' is more like an inverted 'U'). The use of the decimal point was mainly to distinguish between 'A' for 'Hex A' and 'A.' for 'Abort', but I then decided to 'highlight' all of the command key symbols with a DP 'suffix'.

When run on an issue VI replica all of the keys cause the correct row, column and key symbol to be displayed. I would be interested to know what happens when you run this on a PIC14.
Attached Files
File Type: zip kdtest.zip (377 Bytes, 36 views)
SiriusHardware is offline  
Old 10th Jan 2023, 9:05 pm   #23
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,087
Default Re: PIC14 and moonlander

Quote:
Originally Posted by SiriusHardware View Post
I would be interested to know what happens when you run this on a PIC14.
Code:
Key         Result
Term          2 7 t.  (dp)
0             nothing
F             3 7 F
E             nothing
1             nothing
2             nothing
3             nothing
D             nothing
4             nothing
5             nothing
6             nothing
C             nothing
7             0 7 7
8             nothing
9             nothing
B             nothing
Go            nothing
Mem           nothing
Abort         nothing
A             nothing
Weird eh
Phil__G is online now  
Old 10th Jan 2023, 9:18 pm   #24
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,485
Default Re: PIC14 and moonlander

Wowser.

I'm assuming that when the machine is in its normal standby mode - at the monitor prompt - manual code entry and review works normally.

What about (Electronic) 'Organ' from the manual - very short, quick to type in, have you tried running that? Every key should produce a different 'note' - of course you will need to connect an amplifier, frequency meter or scope to the Flag output to hear or see anything happening.
SiriusHardware is offline  
Old 10th Jan 2023, 9:20 pm   #25
Sparky1
Diode
 
Join Date: Jan 2023
Location: Nottingham, Nottinghamshire, UK.
Posts: 3
Default Re: PIC14 and moonlander

Hi All wiggles here, but that user name was taken so I am sparky1. Thanks to Phill G
Sparky1 is offline  
Old 10th Jan 2023, 9:26 pm   #26
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,485
Default Re: PIC14 and moonlander

You could try some of the 'empty' row/column intersections to see what comes up - on a real MK14 it would display something which looks like a '?' when it detects a key press in one of the 'empty' row/column slots.

You may very well get some of the missing characters coming up if you bridge some of those unpopulated switch positions on the PIC14.

Edit: Hi, Wiggles (Sparky1), nice to have you with us.

Last edited by SiriusHardware; 10th Jan 2023 at 9:44 pm.
SiriusHardware is offline  
Old 10th Jan 2023, 10:01 pm   #27
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,087
Default Re: PIC14 and moonlander

Hi Wiggles, happy to see you got your account sorted!
Yes there's something about the way the PIC14 reads the matrix - but at least now we know what's behind all this shenanigans!
Phil__G is online now  
Old 11th Jan 2023, 2:48 am   #28
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,485
Default Re: PIC14 and moonlander

Re: #24 part 2, sorry, I forgot that the 'mini' (876) version does not have the flag outputs. Are these issues also present in the 'large' (877) based PIC14 version built on Philoupat's PCB?

If so I would have thought that this would have come up long before now because Moon Landing is one of the two or three most likely programs which people would go looking for, especially now that they don't have to type it all in.

I do seem to recall that when Daver2 over on the VCFED forums made a VHDL emulation of the MK14 Timbucus couldn't get that to run Moon Landing either, although it would run everything else. It would be interesting to know if the 'George' version will run on that emulator, as far as I know Tim is the only regular here who has that up and running.

I wonder if the 'key test' program and therefore by implication Slothie's and my version of Moon Landing will run correctly on the MAME emulator, which I don't have. (Both work on real hardware and are probably byte for byte identical).
SiriusHardware is offline  
Old 11th Jan 2023, 3:29 pm   #29
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,087
Default Re: PIC14 and moonlander

Hi G yes it affects both PIC14 versions the same, 877 and 876.
I've been trying to work through Moon Landing step by step and finding it difficult to keep track of P3, initially P3 is set to one below the display/keypad at 0CFF and the "Displ" routine leaves P3 incremented by three. "Displ" writes characters right to left, two characters then a space.
George's fix is to output 0x00 to the port immediately before reading the keypad, but P3 is constantly moving along the display & I've not worked it out yet

I have to keep reminding myself of the auto-indexing rule:
where auto-index value is positive, load from EA then increment pointer
where auto-index value is negative, decrement pointer then load from EA

I'm sure now its a 'feature' of the PIC14, Karens site notes that:
Quote:
Originally Posted by Karen
The display column latch is not updated by reads of the display ... Problems can occur with programs that implement column latch update using display read cycles, though the author has never seen such a program.
...which I'm still digesting but I'm sure is relevant.

The attached pic highlights Georges change, other than outputting a zero to the display port before reading the keypad, the rest is identical.
I took out Slothies NOP so the addresses correspond up to Georges change at 0FDE.
(I keep calling it Georges change but it could possibly be that George just found a good, working copy... there have been a few Moonlander errors along the way, although the original printed in the MK14 manual seems to run on a genuine MK14 even with the jump error...)
Attached Files
File Type: zip moondiff.zip (108.3 KB, 30 views)

Last edited by Phil__G; 11th Jan 2023 at 3:44 pm.
Phil__G is online now  
Old 11th Jan 2023, 4:37 pm   #30
Sparky1
Diode
 
Join Date: Jan 2023
Location: Nottingham, Nottinghamshire, UK.
Posts: 3
Default Re: PIC14 and moonlander

Hi All, Like I said before to Phil - Can of worms opened regarding moonlander. But i'm glad it has renewed some interest in the subject of mk 14 verses pic14.
Sparky1 is offline  
Old 11th Jan 2023, 8:44 pm   #31
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,087
Default Re: PIC14 and moonlander

As a Nascom user I never really got deep into the MK14 for the brief time I owned one, but as a result of this discussion I've been studying Scios, it crams a lot of functionality into half a k! Some of it is easy to follow but some parts like the keypad and display really are quite complex. I've been using the MK14 manual listing and the Ian Williamson/Rodney Dale book, both have errors just to make things interesting but I think I've a better idea of how it all works now and Reaction Timer is the current fixation, doesnt work on the PIC14 - on startup, it does the random delay ok then displays a "]" and locks up. Like most of the examples it doesnt use the monitor routines but reads & writes directly to the display & from the keypad port at 0xD00. I'm playing with Georges idea at the moment but no joy as yet, its clearly a very similar problem to Moonlanding. I find mentally keeping track of auto-incremented pointers the hardest part so I have to write everything down... and every thought process takes 10 times as long as it did back in the day
Cheers
Phil

Last edited by Phil__G; 11th Jan 2023 at 8:51 pm.
Phil__G is online now  
Old 12th Jan 2023, 10:20 am   #32
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,485
Default Re: PIC14 and moonlander

Seems like we need a high-end debug monitor, one which lets you single step through the code, set breakpoints, follows the code, keeps track of all registers, pointers and flag values and allows application of external stimuli (like key presses). Software based emulators like MAME often have that sort of functionality, have you looked at that?
SiriusHardware is offline  
Old 12th Jan 2023, 6:34 pm   #33
Realtime
Hexode
 
Join Date: Jan 2021
Location: Ashford, Kent, UK
Posts: 318
Default Re: PIC14 and moonlander

Based on your "requirements list" MAME sounds perfect. I've been using it to good effect to debug SW and compare actual operation against the real HW. MAME has a few quirks but once you get past that it's very good (IMHO - not being a SW developer and all).

If you can point me at the exact version you're trying to run (just to be absolutely sure I get the right one) then I'll happily run it up on MAME and at least see how it performs.
Realtime is offline  
Old 12th Jan 2023, 6:54 pm   #34
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,485
Default Re: PIC14 and moonlander

Hi Realtime - if you get time could you try running kdtest.hex from post #22 - if that doesn't work correctly on MAME then most likely original versions of software from the manual which go straight to the bare metal for their keypad input won't either.
SiriusHardware is offline  
Old 12th Jan 2023, 6:58 pm   #35
Realtime
Hexode
 
Join Date: Jan 2021
Location: Ashford, Kent, UK
Posts: 318
Default Re: PIC14 and moonlander

OK. I'll give that a go at the weekend
Realtime is offline  
Old 13th Jan 2023, 10:14 am   #36
Realtime
Hexode
 
Join Date: Jan 2021
Location: Ashford, Kent, UK
Posts: 318
Default Re: PIC14 and moonlander

So, running kdtest.hex in MAME gives the following

Code:
Key           Result
Term          2 7 t.  (dp)
0             0 0 0
F             3 7 F
E             3 6 E
1             0 1 1
2             0 2 2
3             0 3 3
D             3 3 d
4             0 4 4
5             0 5 5
6             0 6 6
C             3 2 C
7             0 7 7
8             1 0 8
9             1 1 9
B             0 0 0
Go            2 2 G.
Mem           2 3 M.
Abort         2 4 A.
A             3 0 A
All good!

This also ties up with Invaders which uses 'bare metal' keyboard decoding, rather than the SoC Monitor keyboard routines, and works fine in MAME.
Realtime is offline  
Old 13th Jan 2023, 11:21 am   #37
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,485
Default Re: PIC14 and moonlander

Thanks for taking the time to do that - I'm hoping that the 'all zeros' entry for the 'B' key is just a typo or oversight and not the actual result.

I didn't have the expected output from the test program in any kind of table form so I have rearranged your results into a more logical order. Note that really, strictly speaking, the A-F keys should be on row 2 and the GMAT keys should be on row 3, this was obviously some oversight on my part when I wrote the key test program years ago.

Suffice to say that when you run it on a real MK14 or on MAME, as we now know, the results should look like the table below.

Code:
Key           Row 	Col	Character

0             0 	0	0
1             0		1	1
2             0		2	2
3             0		3	3
4             0		4	4
5             0		5	5
6             0		6	6
7             0		7	7
8             1		0	8
9             1		1	9

Go            2		2	G.
Mem           2		3	M.
Abort         2		4	A.
Term          2		7	t.

A             3		0	A
B             3		1	b
C             3		2	C
D             3		3	d
E             3		6	E
F             3		7	F
SiriusHardware is offline  
Old 13th Jan 2023, 1:29 pm   #38
Realtime
Hexode
 
Join Date: Jan 2021
Location: Ashford, Kent, UK
Posts: 318
Default Re: PIC14 and moonlander

Ah yes sorry, B is definitely 3 1 b .

I took the table from #23. I did think the order was a little random
Realtime is offline  
Old 13th Jan 2023, 1:47 pm   #39
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,485
Default Re: PIC14 and moonlander

No problem, thanks for confirming the 'b,' result is as expected.
SiriusHardware is offline  
Old 13th Jan 2023, 5:19 pm   #40
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,485
Default Re: PIC14 and moonlander

Quote:
Originally Posted by Sparky1
Can of worms opened regarding moonlander.
I'm just amazed this has never come up before because the PIC14 project has been around for a while, but it's only in the last maybe three years that we have had this sort of mini-maelstrom of MK14 activity building up here in this forum subsection so it's now starting to draw in a few people who haven't previously been in contact with us, and as a result we are coming across a few things which possibly one or two individuals (like George) did know, but most of us didn't.

I have an 877 based PIC14 90% built but the one thing I've never been able to push myself into is wiring up the keypad (mine is built on a PIC prototype PCB so it's not on a dedicated PCB). It runs things like 'Message' but failure to wire up a keypad meant that I never discovered these issues with programs like Moon Landing myself.

To be fair it seems Karen did warn us but was not entirely correct in her belief that no pre-existing software accessed the keypad in this way.

Anyway Wiggles (Sparky1), can you give us a brief breakdown on how you came by your original interest - if you were seeking to run Moon Landing then I guess you must have run it on original hardware, maybe yours, maybe someone else's, back in the day?

(Note you will be subject to new user moderation for your first few posts but that will wear off eventually).
SiriusHardware is offline  
Closed Thread

Thread Tools



All times are GMT +1. The time now is 1:10 pm.


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.