Random pixels on BBC Model B

for bbc micro/electron hardware, peripherals & programming issues (NOT emulators!)
JannievanZyl
Posts: 102
Joined: Sat Feb 11, 2017 8:56 pm
Location: Cape Town, South Africa

Random pixels on BBC Model B

Postby JannievanZyl » Fri Dec 29, 2017 1:49 pm

Need some help in where to start finding the following fault;

On one of my BBC Model Bs (a revision 7), I'm getting random pixels appearing on the screen when I'm in a graphics mode and I write to the display.

For example, I draw a box or a rectangle and a few pixels randomly appear in other places on the screen, some might falsh. This will happen when typing text as well. It does not seem to appear when I reboot the machine or press Break. But it's instantly repeatable when I go into any other display mode.

The fact that new pixels appear only when I seem to be writing to the screen must be relevant. Like the write is execute to more that one location. Timing related maybe?

Any ideas on where I can start looking and if tricks like freezing components might help?

User avatar
tricky
Posts: 2004
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: Random pixels on BBC Model B

Postby tricky » Fri Dec 29, 2017 2:37 pm

Is it that the byte being written goes to the wrong place, or random bits are written.
Does this only happen in the bottom 4/5 of mode 0,1 or 2?
Sounds like ram or address circuitry, not much help I know.
Try following any of the troubleshooting threads and let us know how you get on.

PS just found your pictures on Facebook https://m.facebook.com/groups/2204586455?refid=18&ref=group_header&_ft_=qid.6504978336773189191%3Amf_story_key.10155001746876456%3Atop_level_post_id.10155001746876456%3Atl_objid.10155001746876456&__tn__=C-R

User avatar
MartinB
Posts: 4576
Joined: Mon Mar 31, 2008 9:04 pm
Location: Obscurity

Re: Random pixels on BBC Model B

Postby MartinB » Fri Dec 29, 2017 4:45 pm

From many years ago, here’s a copy of a post of mine related to faults with screen corruptions which might add some value to your investigations. If a given mode ‘passes’ but you see visual corruption then that points at the display circuitry whereas if a given mode test reports a fail, then that suggests a ram fault.

I know there are 1001 different memory testers out there but here's one I wrote for quick first-look testing when there's obvious display symptoms. It tests the whole of user ram from &E00 to &7FFF and by running it from a low (normally illegal) PAGE of &900, it will work fine on tape and disc systems. By using &55 and &AA as the test patterns it will find stuck bits and cross-talk errors and because it creates a visual mode-specific 'test pattern' it also shows cross-chip addressing faults and display circuitry anomalies.

Type it in and save it as per any normal BASIC program. To use, press <Break>, set any screen mode with MODEn <cr>, set PAGE=&900 <cr> and CHAIN"MTEST" <cr> (or whatever name you've saved it under.) The given screen should be completely black during the test apart from the 'twinkling' activity marker in the top left corner until the screen memory for the selected Mode is tested. Then, a pattern will slowly fill the screen from top left to bottom right and there should be no visual deviations from this progressive fill. The pattern will vary according to Mode but will always be constant for that Mode. In the case of Mode7, there will (should) be nothing until the last few seconds when the screen will fill with 'U's. For some modes, you will see that your monitor gets a good resolution and EHT test too! The complete test takes about two minutes.

If a location fails, the program will simply stop and print the hex memory location where the error occurred. If all locations pass, you will just finsh with 'OK'. This type of program specifically tests the CPU<>Memory chain and if it passes but you see random characters, holes or pattern shifts then this points the finger at the display circuitry and thus halves the diagnostic process.

10CLS:VDU23;8202;0;0;0;
20M%=&E00:X%=&8000:E%=FALSE
30I%=1:A%=&AA:V%=&55:S%=42:C%=13
40REPEAT
50 ?M%=A%:IF?M%<>A% E%=TRUE
60 ?M%=V%:IF?M%<>V% E%=TRUE
70 PRINTCHR$((M%ANDI%)+S%);CHR$(C%);:M%=M%+I%
80UNTIL M%=X% OR E%
90IFE% PRINT~M%-1;ELSEPRINT"OK";


Don't forget though, after saving, use as follows :

MODEn <cr>
PAGE=&900 <cr>
CH."MTEST" <cr>

JannievanZyl
Posts: 102
Joined: Sat Feb 11, 2017 8:56 pm
Location: Cape Town, South Africa

Re: Random pixels on BBC Model B

Postby JannievanZyl » Fri Dec 29, 2017 5:14 pm

Thanks, just found the thread where you wrote that originally! :)

I'll go through those test processes and report back what I found, thanks!

Quick question; what is the RAM configuration on these if I need to swap RAM out; 8K x 1bit?

User avatar
MartinB
Posts: 4576
Joined: Mon Mar 31, 2008 9:04 pm
Location: Obscurity

Re: Random pixels on BBC Model B

Postby MartinB » Fri Dec 29, 2017 5:33 pm

My program won’t point you at a given ram chip - for that, use this short program...

5 MODE 0
10 ?&4000=0
20 A=?&4000
30 IF A=0 THEN GOTO 20
40 PRINT ~A

...which is a very slightly modified version of a test originally suggested by Mark H. If you get a hex number output then any bits ‘set’ in that number will point at a specific ram chip or chips given that the latter are arranged in an eight-bit byte-wide configuration.

User avatar
tricky
Posts: 2004
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: Random pixels on BBC Model B

Postby tricky » Fri Dec 29, 2017 5:49 pm

16Kx1 unless I am going mad!
If you get to the point where you think it is a ram fault, I have posted a self test OS, which is a grand name for a ROM image that you can burn to eprom and swap with the os ROM to visualize the problem.
You can find it here

User avatar
1024MAK
Posts: 6900
Joined: Mon Apr 18, 2011 4:46 pm
Location: Looking forward to summer in Somerset, UK...

Re: Random pixels on BBC Model B

Postby 1024MAK » Fri Dec 29, 2017 6:30 pm

JannievanZyl wrote:Quick question; what is the RAM configuration on these if I need to swap RAM out; 8K x 1bit?

In a model B, all normal RAM is made up of sixteen one bit wide 16k (16k x 1 bit) DRAM chips. These are arranged in two "banks" (each 16k bytes). In each "bank", there is one chip per bit, so for a byte, eight chips are used.

There are more details in the Fault Finding Index thread :wink:

Good luck

Mark
For a "Complete BBC Games Archive" visit www.bbcmicro.co.uk NOW!
BeebWiki‬ - for answers to many questions...

JannievanZyl
Posts: 102
Joined: Sat Feb 11, 2017 8:56 pm
Location: Cape Town, South Africa

Re: Random pixels on BBC Model B

Postby JannievanZyl » Fri Dec 29, 2017 6:58 pm

MartinB wrote:My program won’t point you at a given ram chip - for that, use this short program...

5 MODE 0
10 ?&4000=0
20 A=?&4000
30 IF A=0 THEN GOTO 20
40 PRINT ~A

...which is a very slightly modified version of a test originally suggested by Mark H. If you get a hex number output then any bits ‘set’ in that number will point at a specific ram chip or chips given that the latter are arranged in an eight-bit byte-wide configuration.

Hi,

When I run this on the faulty system, it stays in the loop (which points it's reading what's writing, right?) but the random pixels appear on the screen.

User avatar
1024MAK
Posts: 6900
Joined: Mon Apr 18, 2011 4:46 pm
Location: Looking forward to summer in Somerset, UK...

Re: Random pixels on BBC Model B

Postby 1024MAK » Fri Dec 29, 2017 7:10 pm

As your machine does not crash or freeze, it's likely that it's the reading of the screen RAM by the display system is where the problem lies.

Mark
For a "Complete BBC Games Archive" visit www.bbcmicro.co.uk NOW!
BeebWiki‬ - for answers to many questions...

User avatar
tricky
Posts: 2004
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: Random pixels on BBC Model B

Postby tricky » Fri Dec 29, 2017 7:25 pm

If you redraw the same triangle but in different colours, does the corruption change with colours, but repeat when the same colours are drawn?

JannievanZyl
Posts: 102
Joined: Sat Feb 11, 2017 8:56 pm
Location: Cape Town, South Africa

Re: Random pixels on BBC Model B

Postby JannievanZyl » Fri Dec 29, 2017 9:09 pm

tricky wrote:If you redraw the same triangle but in different colours, does the corruption change with colours, but repeat when the same colours are drawn?

I'll have to carefully watch for this.

I'll write a simpler program to test. What is your thinking?

User avatar
MartinB
Posts: 4576
Joined: Mon Mar 31, 2008 9:04 pm
Location: Obscurity

Re: Random pixels on BBC Model B

Postby MartinB » Fri Dec 29, 2017 10:05 pm

It would still be worth trying my ditty in all the modes - due to its being predicated on display symmetry, it’s often a quick way to at least first determine whether the the fault is random or consistent in nature. Jus’ sayin’...... 8)
Last edited by MartinB on Sat Dec 30, 2017 12:46 am, edited 1 time in total.

User avatar
tricky
Posts: 2004
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: Random pixels on BBC Model B

Postby tricky » Fri Dec 29, 2017 10:15 pm

From the pictures it did look like it might be display related and this was the first thing that came to mind, but it's worth trying all the test programs you can find.
You can use beebasm or beebem to convert text to a .ssd that can then be copied to an SD card, assuming that is what you are using.

JannievanZyl
Posts: 102
Joined: Sat Feb 11, 2017 8:56 pm
Location: Cape Town, South Africa

Re: Random pixels on BBC Model B

Postby JannievanZyl » Sat Dec 30, 2017 11:20 am

Going to start with this now, thanks all.

Got side-tracked with the keyboard on my other B that died on me after I cleaned it.

Redid all the solder joints after I read in the service manual the keyboards tend to get track issues. This got it working again except Shift did not work.

Eventually saw the NAND gate keeps on triggering as if there's a key stuck. Eventually found a low enough impedance across F2 that caused it. Resoldered its contacts and relevant tracks and now it's all working.

At least I know the keyboard circuit off by heart now! :)

JannievanZyl
Posts: 102
Joined: Sat Feb 11, 2017 8:56 pm
Location: Cape Town, South Africa

Re: Random pixels on BBC Model B

Postby JannievanZyl » Sat Dec 30, 2017 2:30 pm

OK, some observation that's got me scratching my head even more;

1. If I run the random triangle draw program with S25 in the north position, I get a huge number of pixels appearing.
2. If I insert an inverter (swapping the banks) and then run the same program, I get no pixels appearing.

Must be CAS1 then, right....

however....

3. If I run a program to fill CAS1 with all 1's and/or all 0's, I get no memory error. And here's the kicker; while the program run, no random pixels appear on the screen. But the moment I just LIST the program, a few pixels appear.....grr....

So it *wants* to appear as if the RAM is OK but I saw stevebootes had exactly the same problem and that did turn out to be a RAM chip.

So:

1. Swapping CAS1/0 does seem to have an effect. But, so far, I can't pin the problem to a specific memory chip.
2. Running the triangle program (Mode 0) shows the pixels appearing (as does listing the program or just typing) but running a memory test does not.
3. Memory test seems to pass.

Any ideas?

EDIT/

OK, noticed something that must be relevant;

When I run the random triangle program but I control the colour, the following happens;

1. When the triangles are drawn in black, white or yellow (Mode 5), I get a few pixels to the right of the triangle and only seem to appear with the triangle.
2. When I run the program with RED triangles, the pixels appear in the triangle and they continue to appear till they basically take the triangle over.

I've now lit some incense and will be offering something burnt soon.......

[
red triangle.jpg


EDIT 2/

More weird (until understood) symptoms;

1. In Mode 1 and 5, the red triangle shows massive 'pixelation' as per screenshot above.
2. In mode 2 red is OK but now only YEllow shows the pixels.
3. Mode 4 is OK.

When I swap CAS1 and 0, none of the above appear.

So, in summary:

1. Only happens with S25 North.
2. Happens in high res mode.
3. Happens with Red in Mode 1 and 5 and Yellow in Mode 2 (actually need to test all 16 colours - just realised)

User avatar
hoglet
Posts: 6712
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: Random pixels on BBC Model B

Postby hoglet » Sat Dec 30, 2017 3:23 pm

When you stop running the program that drew the above image, is the display completely stable/static (i.e. the corruptions remain, but nothing is actually changing)?

Can you post your triangle test program?

JannievanZyl
Posts: 102
Joined: Sat Feb 11, 2017 8:56 pm
Location: Cape Town, South Africa

Re: Random pixels on BBC Model B

Postby JannievanZyl » Sat Dec 30, 2017 4:12 pm

When I stop the program it'll continue to add pixels to the red triangle.

The program literally just draws triangles on the screen;

10 Mode 5
20 PLOT 85,RND(1200),RND(1000)
30 GCOL 0,RND(3)
40 GOTO 20

This is what it looks like after I Escaped out and left it for a while. The pixels continue to increase in the red.

After a while.jpg


Important to mention that pixels will appear with text as well. But not remotely to the extent that I found with the red plots.

So, its not that it's perfect when not plotting red, just that it's substantially worse. Like in a lot! :)

JannievanZyl
Posts: 102
Joined: Sat Feb 11, 2017 8:56 pm
Location: Cape Town, South Africa

Re: Random pixels on BBC Model B

Postby JannievanZyl » Sat Dec 30, 2017 8:41 pm

Keep on being side tracked with this fault.....

My other Model B had the earth track to the RGB socket burned off. Someone stuck something in where they should not have......

Sure enough the XOR driving the sync on this port is blown.

Fortunately, the RGB signals all look good.

Still need to find out why the serial port driver is running so hot. Probably shot as well.

joachim
Posts: 122
Joined: Wed Jun 21, 2006 1:20 am

Re: Random pixels on BBC Model B

Postby joachim » Sun Dec 31, 2017 8:20 am

JannievanZyl wrote:EDIT 2/

More weird (until understood) symptoms;

1. In Mode 1 and 5, the red triangle shows massive 'pixelation' as per screenshot above.
2. In mode 2 red is OK but now only YEllow shows the pixels.
3. Mode 4 is OK.

This actually makes a glimmer of sense. Because for red in MODE 1 or MODE 5, the bit pattern being written to each byte is &0f (00001111). That's the same bit pattern that, in MODE 2, is used to produce yellow (colour 3).

JannievanZyl
Posts: 102
Joined: Sat Feb 11, 2017 8:56 pm
Location: Cape Town, South Africa

Re: Random pixels on BBC Model B

Postby JannievanZyl » Sun Dec 31, 2017 10:35 am

joachim wrote:
JannievanZyl wrote:EDIT 2/

More weird (until understood) symptoms;

1. In Mode 1 and 5, the red triangle shows massive 'pixelation' as per screenshot above.
2. In mode 2 red is OK but now only YEllow shows the pixels.
3. Mode 4 is OK.

This actually makes a glimmer of sense. Because for red in MODE 1 or MODE 5, the bit pattern being written to each byte is &0f (00001111). That's the same bit pattern that, in MODE 2, is used to produce yellow (colour 3).

Tx!

Yes, it must makes sense somehow. If one knows enough, which I don't at this point. :D

Any suggestions on what values I could write to the RAM to try and identify a faulty chip?

I'm now first trying to figure out how to format a floppy - so I can save my test programs - as I keep on typing the test programs in by hand and it's becoming a pain every time I reset the machine...... :shock:

User avatar
tricky
Posts: 2004
Joined: Tue Jun 21, 2011 8:25 am
Contact:

Re: Random pixels on BBC Model B

Postby tricky » Sun Dec 31, 2017 11:01 am

I don't understand how this can be causing corruption in the first part of the screen without hitting something important lower down (first 16KB chips) unless it is actually the reading of the memory by the video side that is actually causing the corruption - maybe try scoping the write enable/select or whatever it is!

EDIT, Someone who understands the electrical properties, would a high value (20K+?) pull up/down resistor help to rule this in/out?

In my test ROM, I write 0 repeatedly, then 1, 2, 4, 8, 16, 32, 64 and 128 to see if the problem can be triggered by writing 1 to only one chip (each bit is a separate chip) I then write 255 - those numbers to set all to 1 except one bit to see if that triggers a problem.
I would try this to &4000 a few thousand times, then &4001, &4002, &4004, &4008, &4010, &4020, &4040, &4080, &4100, &4200, &4400, &4800, &5000, &6000 to see if any bit of the address affects the problem.

JannievanZyl
Posts: 102
Joined: Sat Feb 11, 2017 8:56 pm
Location: Cape Town, South Africa

Re: Random pixels on BBC Model B

Postby JannievanZyl » Sun Dec 31, 2017 11:28 am

tricky wrote:I don't understand how this can be causing corruption in the first part of the screen without hitting something important lower down (first 16KB chips) unless it is actually the reading of the memory by the video side that is actually causing the corruption - maybe try scoping the write enable/select or whatever it is!

EDIT, Someone who understands the electrical properties, would a high value (20K+?) pull up/down resistor help to rule this in/out?

In my test ROM, I write 0 repeatedly, then 1, 2, 4, 8, 16, 32, 64 and 128 to see if the problem can be triggered by writing 1 to only one chip (each bit is a separate chip) I then write 255 - those numbers to set all to 1 except one bit to see if that triggers a problem.
I would try this to &4000 a few thousand times, then &4001, &4002, &4004, &4008, &4010, &4020, &4040, &4080, &4100, &4200, &4400, &4800, &5000, &6000 to see if any bit of the address affects the problem.

Also scratching my head. Swapping CAS0/1 with an inverter resolves the problem, so it feels like a RAM chip problem.

Guess I can socket all of CAS1 and swap them one by one. CAn borrow a chip from another system.

But it feels wrong to not be able to point to the culprit. :D

I'll try your example to exercise the crap out of 1 bit at a time.

Must maybe try the freezing/heating idea on each chip an/or the selection chips?

JannievanZyl
Posts: 102
Joined: Sat Feb 11, 2017 8:56 pm
Location: Cape Town, South Africa

Re: Random pixels on BBC Model B

Postby JannievanZyl » Sun Dec 31, 2017 11:32 am

Quick question;

What mode is the BBC in when it powers up?

I see there are a few random characters on the screen now. Specifically a few pound signs.

User avatar
ctr
Posts: 99
Joined: Wed Jul 16, 2014 2:53 pm

Re: Random pixels on BBC Model B

Postby ctr » Sun Dec 31, 2017 12:09 pm

It starts in Mode 7, which is the teletext mode with one byte per character. Pound signs have character code 0x60 or 01100000 in binary.

JannievanZyl
Posts: 102
Joined: Sat Feb 11, 2017 8:56 pm
Location: Cape Town, South Africa

Re: Random pixels on BBC Model B

Postby JannievanZyl » Sun Dec 31, 2017 12:22 pm

ctr wrote:It starts in Mode 7, which is the teletext mode with one byte per character. Pound signs have character code 0x60 or 01100000 in binary.

Thanks!

Previously I though the pixels only appeared in the graphics modes but the same problem seems to show in teletext mode as these pound signs.

Is the 1K RAM used for teletext within the same memory space as the 20KB used for high res graphics?

JannievanZyl
Posts: 102
Joined: Sat Feb 11, 2017 8:56 pm
Location: Cape Town, South Africa

Re: Random pixels on BBC Model B

Postby JannievanZyl » Sun Dec 31, 2017 12:23 pm

I'm going to switch the banks again with the inverter and make doubly sure the fault does not appear then.

User avatar
ctr
Posts: 99
Joined: Wed Jul 16, 2014 2:53 pm

Re: Random pixels on BBC Model B

Postby ctr » Sun Dec 31, 2017 12:27 pm

JannievanZyl wrote:Is the 1K RAM used for teletext within the same memory space as the 20KB used for high res graphics?


Yes, all modes use RAM immediately below &8000. So teletext is &7C00-&8000 (with a few spare bytes) and 20KB modes are &3000-&8000.

User avatar
1024MAK
Posts: 6900
Joined: Mon Apr 18, 2011 4:46 pm
Location: Looking forward to summer in Somerset, UK...

Re: Random pixels on BBC Model B

Postby 1024MAK » Sun Dec 31, 2017 12:38 pm

JannievanZyl wrote:Any suggestions on what values I could write to the RAM to try and identify a faulty chip?

Err, values between zero and 255, so use a FOR - NEXT loop to count from 0 to 255, write the value to screen memory, wait for key press, see the effect, then continue...

JannievanZyl wrote:I'm now first trying to figure out how to format a floppy - so I can save my test programs - as I keep on typing the test programs in by hand and it's becoming a pain every time I reset the machine...... :shock:

FORMAT is often a program on floppy unless you have a ROM with the FORMAT command in it (later DFS or utility ROM).

You can also type in a BASIC program that will format a DFS disk, search the forum (I'm mobile so don't have a link to hand).

Mark
For a "Complete BBC Games Archive" visit www.bbcmicro.co.uk NOW!
BeebWiki‬ - for answers to many questions...

JannievanZyl
Posts: 102
Joined: Sat Feb 11, 2017 8:56 pm
Location: Cape Town, South Africa

Re: Random pixels on BBC Model B

Postby JannievanZyl » Sun Dec 31, 2017 12:59 pm

1024MAK wrote:
JannievanZyl wrote:Any suggestions on what values I could write to the RAM to try and identify a faulty chip?

Err, values between zero and 255, so use a FOR - NEXT loop to count from 0 to 255, write the value to screen memory, wait for key press, see the effect, then continue...

JannievanZyl wrote:I'm now first trying to figure out how to format a floppy - so I can save my test programs - as I keep on typing the test programs in by hand and it's becoming a pain every time I reset the machine...... :shock:

FORMAT is often a program on floppy unless you have a ROM with the FORMAT command in it (later DFS or utility ROM).

You can also type in a BASIC program that will format a DFS disk, search the forum (I'm mobile so don't have a link to hand).

Mark

:D Meant, the exact bit pattern that would show the problem. Was hoping all the hints the system throw out would have pointed to a specific bit or range of addresses. I've currently got the banks swapped again just to make 100% sure it's only in CAS1. But i'll run a few programs to test for different patterns soon.

I've searched the forum for a BASIC format program but the links I found were dead (at least they were last night). So I found this one, I linked here;

viewtopic.php?f=3&t=14295

It's 70-odd lines so I just wanted to check with you guys if it's a known good one before I start typing! :(

User avatar
hoglet
Posts: 6712
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: Random pixels on BBC Model B

Postby hoglet » Sun Dec 31, 2017 1:08 pm

Here's a slightly shorter one, from JGH:
http://mdfs.acornatom.nl/Software/BBC/FormDFS.txt

Code: Select all

REM > FormDFS
REM Quick Formatter
DIM X% 31,data% 511:Y%=X%DIV256:*DISK
ON ERROR REPORT:PRINT " at line ";ERL:OSCLI"FX180,"+STR$(PAGE/256):END
*FX180,64
INPUT"Drive:  "drive%
INPUT"Tracks: "num%
FOR track%=0 TO num%-1
  PRINT CHR$13;"Track ";track%;
  FOR sector%=0 TO 9
    data%!(sector%*4)=track%
    data%?(sector%*4+2)=(sector%+track%*7)MOD10
    data%?(sector%*4+3)=1
  NEXT sector%
  X%?0=drive%
  X%!1=data%
  X%!5=&6305
  X%?7=track%
  X%!8=&10002A10
  A%=127:REPEAT:CALL&FFF1:UNTIL X%?12<>&10
  IF X%?12:PRINT" error &";~X%?12
NEXT track%:PRINT
FOR A%=0 TO 511 STEP 4:data%!A%=0:NEXT A%
data%?&107=num%*10
data%?&106=num%/25.6
X%?0=drive%
X%!1=data%
X%!5=&4B03
X%!9=&22
A%=127:REPEAT:CALL&FFF1:UNTIL X%?10<>&10
IF X%?10:PRINT"write error &";~X%?10
OSCLI"FX180,"+STR$(PAGE/256):END


Return to “hardware”

Who is online

Users browsing this forum: vanekp and 14 guests