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 23rd Oct 2020, 9:57 pm   #541
Timbucus
Octode
 
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 1,362
Default Re: Mk14 vdu

Just in case there is a difference in memory use as well here are my test programs - obviously set for use at F00 on top and B00 on bottom.
Attached Files
File Type: zip VDUTESTS.zip (2.2 KB, 46 views)
Timbucus is offline  
Old 23rd Oct 2020, 10:11 pm   #542
Slothie
Octode
 
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
Default Re: Mk14 vdu

I think the shuddering may be a tiny error in the sync timing. The 877 and 877A do have differences in their internal circuitry (for instance, the data sheet says they are slightly faster to program) so its entirely possible there are tiny differences in propagation delays between instruction execution and when the port actually changes, or something like that. This may be subtly exascerbating a small timing error? Pure conjecture I know but I do think there is a small snafu in the timing of the video given the original software is rock solid, as is the character mode.
Tim, not seeing the white line may just mean your TV has more "oveerscan" than Sirius's.

You're right Sirius, its really annoying not being able to help out!!!
Slothie is offline  
Old 23rd Oct 2020, 10:21 pm   #543
Karen O
Rest in Peace
 
Join Date: Jul 2011
Location: Bridgnorth, Shropshire, UK.
Posts: 787
Default Re: Mk14 vdu

I've a feeling that the PIC baud rate generator (which has settings like divide-by-1, divide-by-2 etc.) does not have its phase automatically reset when the serial port is enabled.

This is not a problem - it might mean some ambiguity about exactly when a line of graphics pixels will begin, but at least it will be consistent and won't shudder...

IF the total frame duration is an even number of processor cycles. If my frame duration is out by just one processor cycle, then we'll get the effects people have witnessed.

So don't despair! I have an awful lot of counting to do!

I'm encouraged to see, in the image of #531 that the left edge of the bright line is continuous.
Karen O is offline  
Old 23rd Oct 2020, 10:25 pm   #544
Timbucus
Octode
 
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 1,362
Default Re: Mk14 vdu

Quote:
Originally Posted by Slothie View Post
Tim, not seeing the white line may just mean your TV has more "oveerscan" than Sirius's.

You're right Sirius, its really annoying not being able to help out!!!
I think you are correct in fact in the center where the mask is most concave I can see a glimmer of RED glow that could be the white line bleeding in. If I can find a way to support the MK14 and VDU etc in the lounge tommorrow I will try it on my 40" Sony!

I bet it is annoying but, also helpful to have a dispassionate third eye... I will certainly try double programming and two PICS for all future tests before reporting.
Timbucus is offline  
Old 23rd Oct 2020, 10:34 pm   #545
Timbucus
Octode
 
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 1,362
Default Re: Mk14 vdu

Quote:
Originally Posted by Karen O View Post
I've a feeling that the PIC baud rate generator (which has settings like divide-by-1, divide-by-2 etc.) does not have its phase automatically reset when the serial port is enabled.

This is not a problem - it might mean some ambiguity about exactly when a line of graphics pixels will begin, but at least it will be consistent and won't shudder...

IF the total frame duration is an even number of processor cycles. If my frame duration is out by just one processor cycle, then we'll get the effects people have witnessed.

So don't despair! I have an awful lot of counting to do!

I'm encouraged to see, in the image of #531 that the left edge of the bright line is continuous.
Did you notice among my excited posts that my A part programmed with the FW523 has the shudder like Sirius but, the NON A part does not. This may or may not help you find the shudder.

I also think the Random character in character mode may have a wider impact and be worth looking into as after some time playing, MINEFIELD started doing funny things, which it did not on FW352 nor on the Replica SOC VDU so in this instance (unlike HORSERACE) I do not suspect a bug in my code. This game uses the screen memory for sensing what is happening by looking at the characters as it goes along which may explain why it suffers.

Sirius if you can confirm with my CHARSET running that you see the same character appear then that will help a lot I assume.

So all in all this is almost a perfect build especially on a non A part from my perspective as the graphics can be looked at and admired.

As I said the Random character appears and then changes slightly slower on the A version. Again this may or may not help.
Timbucus is offline  
Old 23rd Oct 2020, 10:41 pm   #546
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,482
Default Re: Mk14 vdu

I only asked about programmers (Tim) because it seemed possible that your preferred programmer does not always work perfectly which is a bit dangerous - we could end up making Karen waste time looking for a non-existent problem (which is why it's great that there are two of us independently testing, otherwise we might be none the wiser).

On the matter of the horizontal shifting in graphics mode only, brilliant observation thanks Tim - so ultimately if I want to fix that the workaround is just to use a non-A part, but then that offers another mystery - why does the 'A' part not do this when programmed with the original code? Why only in more recent versions?

I went looking for empirical proof of the graphics shifting problem, and here it is:

Image #1 a capture of a single line of the 'inside' image video. The first bright spike after the sync pulse and a bit of black-level is the unavoidable 'white bit' generated when the UART switches on. As this is a frozen image it only shows the line at one of two possible degrees of shift.

Image #2: This is is a close up on the sync pulse and the 'bright line' only, but this time I left the scope running 'live' while I took the shot, and you can now see that the 'bright line' is alternating between two different durations, so we can say for sure that this is the point at which the timing of unshifted graphics frames and shifted graphics diverges, the timing on all frames is identical up to the rising edge of the 'bright line' but on every other frame, for some reason, there is an extra white bit being added on to the right hand side of the bright line. When this happens, the whole line following is shifted to the right by one UART bit duration / half a graphics pixel width.
Attached Thumbnails
Click image for larger version

Name:	inside_image_one_line_frozen.jpg
Views:	53
Size:	93.4 KB
ID:	218727   Click image for larger version

Name:	inside_image_brightline_detail.jpg
Views:	71
Size:	65.1 KB
ID:	218728  
SiriusHardware is online now  
Old 23rd Oct 2020, 10:45 pm   #547
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,482
Default Re: Mk14 vdu

We are doing a lot of crossposting at the moment - aren't we all excited? This has been a major breakthrough by Karen today.

I'll dig up a copy of CHARSET and see if I have similar problems.
SiriusHardware is online now  
Old 23rd Oct 2020, 10:54 pm   #548
Timbucus
Octode
 
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 1,362
Default Re: Mk14 vdu

Quote:
Originally Posted by SiriusHardware View Post
We are doing a lot of crossposting at the moment - aren't we all excited? This has been a major breakthrough by Karen today.

I'll dig up a copy of CHARSET and see if I have similar problems.
Yes we do all seem to be excited, and pleased Karen has found the major fault in the optimized version. So much that I think this will remain as my working firmware (in a non A PIC as I do not want epilepsy) as I may be able to help work out where the random char is coming from especially if you can reproduce as well. The HEX is in my ZIP above but, attached is the ASM as you will probably want to try it at 200 as well first so will need to re-assemble.

Going to have to call it a night as have an appointment for my Flu Jab first thing in the morning!
Attached Files
File Type: zip CHARSET.ASM.zip (1.5 KB, 49 views)
Timbucus is offline  
Old 23rd Oct 2020, 11:34 pm   #549
Timbucus
Octode
 
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 1,362
Default Re: Mk14 vdu

Quote:
Originally Posted by SiriusHardware View Post
I went looking for empirical proof of the graphics shifting problem, and here it is:
I went proving I really want to buy a new fangled scope to confirm your findings and to see if I could 'see' my white line. I managed to prove that my trusty old bird was still pretty much up to the job (I really want to justify a new one but, feel it will lack the retro experience) so I will have a white line like you... The first one is the top line of SC/MP inside, then one of the image shown so you can clearly see the lines to confirm where I was syncing.

Click image for larger version

Name:	IMG_4137.jpg
Views:	51
Size:	49.5 KB
ID:	218730Click image for larger version

Name:	IMG_4138.jpg
Views:	50
Size:	48.4 KB
ID:	218731Click image for larger version

Name:	IMG_4139.jpg
Views:	56
Size:	77.0 KB
ID:	218732

and with an A part it is noisy and the timing of its pulse is variable whereas on the NON A it was a nice steady signal lock. This is zoomed in like you on the pulse which is flickering in duration on the A part.

Click image for larger version

Name:	IMG_4140.jpg
Views:	47
Size:	54.7 KB
ID:	218733

OK I really am going now curiosity satisfied.
Timbucus is offline  
Old 23rd Oct 2020, 11:45 pm   #550
Karen O
Rest in Peace
 
Join Date: Jul 2011
Location: Bridgnorth, Shropshire, UK.
Posts: 787
Default Re: Mk14 vdu

Quote:
When this happens, the whole line following is shifted to the right by one UART bit duration / half a graphics pixel width.
I should point out that, in graphics mode, I'm running the serial port at 2Mbit/sec. In other words, one serial bit equals one graphics pixel.

If the shift is half a graphics pixel width, then this is actually a shift of a single processor cycle. This is what lead me to consider that it might be a baud rate generator phasing issue.
Karen O is offline  
Old 23rd Oct 2020, 11:59 pm   #551
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,482
Default Re: Mk14 vdu

OK Karen, I wasn't sure, at one point you were trying to decide whether to stay at the same baud rate and double up all the transmitted pixels, or drop the baud rate in graphics mode and transmit one bit per pixel. I didn't know which way you went in the end. You should be able to get an idea of the actual difference in duration / width of the bright line from image #2 of #546.

To Tim: I actually much prefer analogue scopes, ideally ones which have a digital frame store built in as an afterthought so my weapon of choice at work is still a Hameg hybrid (analogue-with a digital-
bit clagged on) CRT scope. Also has that very handy V/I component analyser built in, very much a Hameg feature.

The one I've been using here at home for the off-system grabs is a modern but basic 'Multicomp' model identical to some we have at work - I test drove those for a while and decided to get one myself. I could wish that the pixel resolution of its screen was at least twice as high but it is not bad for what I have been using it for here.

Last edited by SiriusHardware; 24th Oct 2020 at 12:15 am.
SiriusHardware is online now  
Old 24th Oct 2020, 12:04 am   #552
Karen O
Rest in Peace
 
Join Date: Jul 2011
Location: Bridgnorth, Shropshire, UK.
Posts: 787
Default Re: Mk14 vdu

SH, you're illustrations in #546 really reveal the problem.

I found it difficult to read off the exact duration of the shudder shift. What was the actual shift duration in microseconds?
Karen O is offline  
Old 24th Oct 2020, 12:20 am   #553
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,482
Default Re: Mk14 vdu

The horizontal scale in the second shot is 1.0uS per division, so the difference between the two possible widths of the bright line is roughly 1/5th to 1/4 of a microsecond / 200-250ns. As you say hard to read. Hope this helps.

I can try to get a better measurement of the time difference if you need it but it will have to be tomorrow evening now, sorry.

Last edited by SiriusHardware; 24th Oct 2020 at 12:30 am.
SiriusHardware is online now  
Old 24th Oct 2020, 12:43 am   #554
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,482
Default Re: Mk14 vdu

Here's the 'bright line' detail from that shot magnified up: 1.0uS per blue square.
Attached Thumbnails
Click image for larger version

Name:	bright_line_shudder_detail.jpg
Views:	49
Size:	33.2 KB
ID:	218739  
SiriusHardware is online now  
Old 24th Oct 2020, 8:40 am   #555
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,482
Default Re: Mk14 vdu

By the way Karen, I hope you don't mind that we keep coming up with little (and sometimes big) issues which need tweaking, but you seem to be most in your element when:-

- There is a problem to solve.
- You are the only person who can realistically solve it.

This has been an unusual project for you for various reasons but especially given the 'real time' and 'remote' nature of it. Normally you would have the target hardware in front of you and would quietly labour away in the lab until you had the chrome-plated final product ready to be unleashed upon the world, whereas in this case it's a work in progress and you don't even have the target hardware in front of you, and you have done a lot of your thinking on this 'out loud'. It has been a real pleasure to be involved with this project (if only as a passive spectator) and to watch that formidable mind of yours working.
SiriusHardware is online now  
Old 24th Oct 2020, 11:06 am   #556
Timbucus
Octode
 
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 1,362
Default Re: Mk14 vdu

The ability to follow the development rather than a fait-accompli has been a great learning experience for me, your BCF instruction explanation was really helpful and understanding what you meant about the clever dual use of RC6 for PS4 in, and TX out, when I saw the bits on the scope while looking for my oscillator track errors. Going to tackle trying to understand the ASM next so thanks for sharing the journey with us this time.

Working remotely has become the norm for so many at the moment it is nice to do so in a creative way where (hopefully) the problems are like enjoyable puzzle book problems rather than drudge work.
Timbucus is offline  
Old 24th Oct 2020, 11:19 am   #557
Karen O
Rest in Peace
 
Join Date: Jul 2011
Location: Bridgnorth, Shropshire, UK.
Posts: 787
Default Re: Mk14 vdu

This VDU project has been one of the most difficult but simultaneously one of the most pleasurable that I have ever taken on. Normally, I set the spec.s of the things I build, but in this case the spec. is already defined and that makes for a much more difficult task. I couldn't do this without the help and feedback of my friends on this forum.

I lay awake last night, and I think I've found a way to implement graphics without changing baud rates. I'm finally embracing something that was hinted at earlier (probably by someone else): implement graphics as a special kind of character font.

When I did finally fall asleep, the project acquired a bank of 8 cathode followers. Don't ask me what that's all about...
Karen O is offline  
Old 24th Oct 2020, 5:26 pm   #558
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,482
Default Re: Mk14 vdu

Hmm, and we imposed at least one major spec change pretty late on, namely the ability for any control input to respond to a change in state of TOP PAGE half way down the screen.

The changes you are considering making to de-shudder the graphics mode I think I understand in principle - leave it at the higher baud rate and use two serial bits to represent each pixel although presumably that means you would have to pre-store a further 256 +256 'characters' (the high and low nibbles of each possible bit pattern, with each pixel represented by 2 bits?).

If you wanted to say 'Look, just use the 877 and forget about the 877A' I don't think we would quibble too much about that as long as that requirement, and the unsuitability of the 877A, was made clear in the project documentation.

Can I ask, though, if you have a theory as to why this was not a problem even on the 877A in your first two released firmware versions? No shudder in those versions, and I have only used the 877A throughout.

Last edited by SiriusHardware; 24th Oct 2020 at 5:37 pm.
SiriusHardware is online now  
Old 24th Oct 2020, 6:15 pm   #559
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,482
Default Re: Mk14 vdu

Tim, as a matter of interest what is the EXACT numbering on your non-A 877s?

Just been looking around with a view to ordering a couple of non-A variants through work and I'm surprised to see the non-A version seems to be available in 4MHz DIP (PIC16F877-04/P) and 20MHz DIP (PIC16F877-20/P). I was never aware before that they were available in 'two speeds'.

This one instance that you have found where the project code works OK in non-A but not quite OK in 'A' variants probably means that we have to test any future code revisions in both types from now on, unless Karen decides that the project has to use a non-A variant.
SiriusHardware is online now  
Old 24th Oct 2020, 6:39 pm   #560
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,079
Default Re: Mk14 vdu

When I bought my 877s for the PIC14 & PICL from RS, I noticed they list 04's and 20's
04 = 379-3143
20 = 467-1640

Heres something:
Quote:
Originally Posted by the internet
The 16F877A also has a pair of comparators which must be disabled (on by default) if you want it to perform like a 16F877

Last edited by Phil__G; 24th Oct 2020 at 6:53 pm.
Phil__G is online now  
Closed Thread

Thread Tools



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