software troubleshooter for beeb hardware SelfTestOs

discussion of beeb/electron applications, languages, utils and educational s/w
User avatar
tricky
Posts: 2698
Joined: Tue Jun 21, 2011 8:25 am
Contact:

software troubleshooter for beeb hardware SelfTestOs

Post by tricky » Sun Oct 25, 2015 11:04 am

With all the posts about excellent hardware addons for troubleshooting atoms and beebs, I just had a thought.
How about a ROM that you swap for the OS ROM on a beeb, or whatever; that on startup runs tests on each bit of hardware and does it's best to signal any issues it finds.
It could try sound, flashing the keyboard Leeds, displaying messages, even Morse code on the cassette relay.
This may already exist, but if it doesn't, could be a good way to diagnose problems that still let the processor run, but are enough to stop a beeb from ruining.
There must be quite a bit of test code already in some diagnostic programmes and the emulator guys probably have more which they could contribute.
I'm not volunteering to do it all, although I would help and have a pile of nonworking beebs that I could try it on.
For development proposes, it could start as a sideways ROM.
Last edited by tricky on Tue Dec 05, 2017 7:23 am, edited 1 time in total.

User avatar
jgharston
Posts: 3172
Joined: Thu Sep 24, 2009 11:22 am
Location: Whitby/Sheffield
Contact:

Re: software troubleshooter for beeb hardware

Post by jgharston » Sun Oct 25, 2015 3:19 pm

tricky wrote:How about a ROM that you swap for the OS ROM on a beeb, or whatever; that on startup runs tests on each bit of hardware and does it's best to signal any issues it finds.
...
I'm sure there's a sideways ROM that does this, probably from Watford. You can grab control of the system very early on at the first service call to go around.

Code: Select all

$ bbcbasic
PDP11 BBC BASIC IV Version 0.25
(C) Copyright J.G.Harston 1989,2005-2015
>_

User avatar
BeebMaster
Posts: 2572
Joined: Sun Aug 02, 2009 4:59 pm
Location: Lost in the BeebVault!
Contact:

Re: software troubleshooter for beeb hardware

Post by BeebMaster » Mon Oct 26, 2015 12:51 pm

Also there is code in the Service Manual to generate a ROM image to replace the OS ROM which performs various tests - although I think you need a meter or a scope to get the results. Maybe that could be a starting point?
Image

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

Re: software troubleshooter for beeb hardware

Post by tricky » Mon Oct 26, 2015 4:17 pm

It is the case where you can't get to a working display that I was most interested; I'll have a look at the manual.
I think it should be fairly easy to pulse a given address line, say a4 or a5 by having a pair of tight loops 16 or 32 bytes apart.

User avatar
DutchAcorn
Posts: 1861
Joined: Fri Mar 21, 2014 9:56 am
Location: Maarn, Netherlands
Contact:

Re: software troubleshooter for beeb hardware

Post by DutchAcorn » Mon Oct 26, 2015 4:24 pm

BeebMaster wrote:Also there is code in the Service Manual to generate a ROM image to replace the OS ROM which performs various tests - although I think you need a meter or a scope to get the results. Maybe that could be a starting point?
I made the rom as described in the service manual, but it is very limited. See this post. Would be great to get a rom that does some startup tests. At least it could tell you what where to look.
Paul

User avatar
BigEd
Posts: 2056
Joined: Sun Jan 24, 2010 10:24 am
Location: West
Contact:

Re: software troubleshooter for beeb hardware

Post by BigEd » Mon Oct 26, 2015 4:32 pm

Slightly OT, Dave Curran diagnoses faulty PETs using a daughterboard which sits in the 6502 socket. See http://blog.tynemouthsoftware.co.uk/201 ... oards.html
"ROM and RAM are common causes of failure on vintage computers, and this is an easy way to rule out problems with the original ROM or RAM, buffering, multiplexing or address decoding."
He mentions other diagnostic tools elsewhere in the blog.

User avatar
daveejhitchins
Posts: 4341
Joined: Wed Jun 13, 2012 5:23 pm
Location: Newton Aycliffe, County Durham
Contact:

Re: software troubleshooter for beeb hardware

Post by daveejhitchins » Mon Oct 26, 2015 6:10 pm

Could do with something similar for the Electron too!

Dave H :D
Parts: UM6502CE, GAL22V10D, GAL16V8D, AS6C62256A, TC514400AZ, WD1772, R6522, TMS27C512, AT28C256
Products: ARA II, ABR, ATI, AP6, MGC, AP5 . . .
For a price list, contact me at: Retro Hardware AT dave ej hitchins DOT plus DOT com

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

Re: software troubleshooter for beeb hardware

Post by tricky » Thu Jun 02, 2016 9:38 pm

OK, I got a new B+128 and it looks quite dead, so I thought I would have a go at writing an OS ROM replacement to exercise some of the hardware to see if anything worked.
This is what my b+ did when I turned it on:

http://youtu.be/zLP2ZfgTw7g
This is what the attached OS does when turned on:

http://youtu.be/CAR3MrxAXlQ
You might be able to hear the cassette relay click, the three LEDs should count and there should be a "pinging" noise from the speaker.
Looking at what is happening on screen while running the self test:

http://youtu.be/ookuXJdF_AA
On screen, it displays the Frogger mode 7 menu screen and then mode 0 with each byte in a page set to the offset into the page.
The mode 7 screen cycles through the colours (not great on my green screen!), while the LEDs and speaker do their thing.
The the bottom 16K is displayed at the top of a mode 0 screen and each byte has the left most bit set, then all but the left most bit, then repeats for all the other bits in the byte, this looks OK if a little blurred on my screen, filming with my phone!
The next memory test pattern is to write &80, &40, &20, &10, &08, &04, &02, &01 to each 8 bytes, then the opposite pattern, then the whole thing rotates around the bits as before; here you can probably see that some bits aren't being set correctly. It should be fairly easy from this to work out which bits are set incorrectly and which chips/data lines/address lines may be at fault.
The same tests are then repeated for the second 16K, using the bottom of a mode 0 screen.
This is as far as I have gone for now, BREAK should "pause" the testing and then continue with the next test, but as the whole things runs without relying on any RAM, sometimes I have used all the registers and it will start from a random place, usually the beginning.
By changing BEGIN to = &6000, you can build a program that will run the first set of tests and then crash as it overwrites itself testing the high 16K!

PS The last video is quite boring, I'll try and add a few screen shots and maybe get the embedded youtube fixed if I can work out what is wrong!

EDIT: changed the embedded YouTube links to https so that they display!
Attachments
os_tester.zip
contains the ROM image
(1.44 KiB) Downloaded 108 times
game.zip
contains the beebasm source code
(8.44 KiB) Downloaded 62 times
Last edited by tricky on Tue Jun 19, 2018 8:13 pm, edited 2 times in total.

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

Re: software troubleshooter for beeb hardware

Post by MartinB » Thu Jun 02, 2016 11:04 pm

I don't know how you're embedding your videos Richard but I've always just used the following...

Code: Select all

[flash=425,344]http://www.youtube.com/v/AaBbCcDdEe&hl=en&fs=1[/flash]
...where AaBbCcDdEe only should be replaced by your video's youtube ID string of upper/lower case letters and characters (and sometimes numbers).

Might not be the purist way (?) but it always seems to work for me... :D

(I've set the example to 'Code' so it doesn't actually try and embed!)

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

Re: software troubleshooter for beeb hardware

Post by tricky » Fri Jun 03, 2016 6:37 am

MartinB wrote:...

Code: Select all

[flash=425,344]http://www.youtube.com/v/AaBbCcDdEe&hl=en&fs=1[/flash]
I've always useda similar string, but with =22 instead of &hl=en&fs=1.
I'll give ita try later.
PS, you can see how someone else has achieved an effect in their post by clicking the quote button at the top as it will start your post with the source of theirs.

EDIT: thanks, that worked.
I'll try and add an analysis of parts of the videos later.

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

Re: software troubleshooter for beeb hardware

Post by MartinB » Fri Jun 03, 2016 6:43 am

tricky wrote:PS, you can see how someone else has achieved an effect in their post by clicking the quote button at the top as it will start your post with the source of theirs.
Thanks Richard, didn't know that... 8)

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

Re: software troubleshooter for beeb hardware

Post by tricky » Sat Jun 04, 2016 9:42 am

Here is my analysis of what is going on with my beeb, please feel free to chip in.
Lower half of RAM ("first" 8 RAM chips 16Kx1bit each).
Image
The vertical lines (1 bit set and 1 bit clear per byte seem OK), this is alternatly setting all bits in one chip to 0, then 1, which seems to work.
This only really means that if we write some ones, we can read some ones - if all address lines were broken, we would still see the same thing, but it does tell us that all the data lines are probably working / can work.
Image
We can just about see that when the bit pattern sent to each chip is 10000000100000001000... that everything isn't OK.
It looks from the poor quality video that it is bits 7 and 5 (76543210) that are wrong.
The third pair suggest that they might be being set to the values of other bits in the same chip, or that we are reading bytes from the wrong addressed in the chip! It seems strange that the same pattern is in all of the memory and that the inverse pattern matches!
Image
Looking at the same pattern being written to the top half of RAM, we see exactly the same pattern, now I am convinced that it is an addressing issues, although this being my first analysis, I could easily be wrong! At this point, I guess I could remove one of the suspect chips and see what happens in the other half of RAM, but as they are all soldered in except one and I haven't checked which bit it is, I will try another visual inspection, following the data and address lines to the four suspect chips to see what they have in common - maybe a driver chip (if that is the correct name).
Attachments
Image3.jpg
Image3.jpg (9.34 KiB) Viewed 628 times
Image2.jpg
Image1.jpg
Image1.jpg (9.54 KiB) Viewed 628 times

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

Re: software troubleshooter for beeb hardware

Post by tricky » Sat Jun 04, 2016 1:43 pm

OK, just checked the RAM chips and it seems that the B+ uses 64Kx1bit (I guess B+64K should have given it away), so the errors are from two chips - back to probably a RAM fault then!
The ROM should work just as well in a B, I'll try it on another of my "won't start" beebs later.

User avatar
sweh
Posts: 1949
Joined: Sat Mar 10, 2012 12:05 pm
Location: New York, New York
Contact:

Re: software troubleshooter for beeb hardware

Post by sweh » Sat Jun 04, 2016 5:14 pm

tricky wrote:OK, just checked the RAM chips and it seems that the B+ uses 64Kx1bit (I guess B+64K should have given it away), so the errors are from two chips - back to probably a RAM fault then!
The ROM should work just as well in a B, I'll try it on another of my "won't start" beebs later.
I wonder what would be needed to adapt this to the Master 128
Rgds
Stephen

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

Re: software troubleshooter for beeb hardware

Post by tricky » Sat Jun 04, 2016 6:30 pm

I think it should "just work", it doesn't try to setup shadow RAM etc, so I'm not sure if what is written is displayed, but apart from that, it should be OK.
I can't try it in an emulator at the moment, but it should be worth a try.
When I get around to testing ADC, speech etc, then it will need to be a bit more sophisticated, but for teletext, sound, cassette relay, LEDs and bitmapped modes, I can't think of a difference.

User avatar
sweh
Posts: 1949
Joined: Sat Mar 10, 2012 12:05 pm
Location: New York, New York
Contact:

Re: software troubleshooter for beeb hardware

Post by sweh » Sat Jun 04, 2016 7:45 pm

tricky wrote:I think it should "just work", it doesn't try to setup shadow RAM etc, so I'm not sure if what is written is displayed, but apart from that, it should be OK.
I can't try it in an emulator at the moment, but it should be worth a try.
It works in BeebEm, but I'm more thinking of the socket; the Master MOS is a 128K ROM (OS+7 ROMs) so I wonder if it might need some form of cradle, or if a 27128 can be plugged straight in.
Rgds
Stephen

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

Re: software troubleshooter for beeb hardware

Post by tricky » Sat Jun 04, 2016 8:21 pm

I see, i had forgotten that. I am currently using a 27256 ina socket with A14 removed as i didn't have any16k eproms to hand!
I guess someone like Mark will be able to tell us.
Does anyone have a picture showing which ram holds which bit?

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

Re: software troubleshooter for beeb hardware

Post by 1024MAK » Sat Jun 04, 2016 9:51 pm

Not for the B+64k :(

But you can work it out if you have a digital multimeter. The data bus lines from the CPU should go to a bi-directional buffer (74LS245 in a Model A/B), then from the other side of the buffer to each DRAM chip (one data line to each chip, repeated 7 times). Use the meter on the continuity range with the computer switched OFF :wink:

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

User avatar
DutchAcorn
Posts: 1861
Joined: Fri Mar 21, 2014 9:56 am
Location: Maarn, Netherlands
Contact:

Re: software troubleshooter for beeb hardware

Post by DutchAcorn » Sun Jun 05, 2016 2:25 pm

Thanks for this, Tricky! Imo this is a very useful fault finding aid. In my B+ I found seemingly no faults but afer a minute or two it started to produce this:

Armed with freezer spray I found IC36 to be the culprit; a PAL chip selecting between normal and shadow memory. I guess that'll be challenging to replace #-o
Attachments
image.jpeg
Paul

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

Re: software troubleshooter for beeb hardware

Post by tricky » Sun Jun 05, 2016 3:49 pm

Thanks, well that wasn't quite how I was expecting it to find problems, but found is found!
I haven't added any shadow ram or bank switching yet, but I will at some point.
There isn't a test that continually writes and checks memory either, which I need to add.
The RAM chips in the b+ turned out to be in logical positions (to me anyway - apart from IC49):
CPU <-> IC49 (under to right hand side), IC49 (left hand side, under to) <-> RAM.
Top row from left to right b0:ic55 b1:ic56 b2:ic60 b3:ic61
bottom row left to right b4:ic64 b5:ic65 b6:ic66 b7:ic67
Assuming I have done my measurements correctly.
The RAMs seem to have their Ins linked directly to their Outs, which seems correct.

Please confirm this information for yourself before doing anything that could damage your beebs.
Please also let me know if this info is correct or not and any other uses you have found for my test ROM.
Attachments
RAM ICs.jpg

User avatar
marcusjambler
Posts: 403
Joined: Mon May 22, 2017 11:20 am
Location: Bradford
Contact:

Re: software troubleshooter for beeb hardware

Post by marcusjambler » Thu Jun 29, 2017 11:18 am

Hi Richard

I'm attempting to repair a dead BBC B.
So, to help me I've blown an eprom (27C128) with a copy of the test ROM you wrote. ( minipro programmer via win10 )
It burns to the chip fine and I've verified this by reading it back and running it in BEEBEM which works as shown above in your videos.

When I replace the OS ROM in my dead BEEB ( Issue 4 ) the mode 7 page is coming up as a series of random square white blocks and ASCII chars.
The colour test works but the graphics are corrupted. The memory test appears to try and display but the connection to the TV drops out as though the mode is out of range.

When I drop the ROM into a working BEEB ( Issue 7 ) It does the same as the dead one.

Am I missing a setup stage or should I be removing other chips to allow the ROM to boot?

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

Re: software troubleshooter for beeb hardware

Post by tricky » Thu Jun 29, 2017 11:51 am

There should be no other changes necessary.
The idea is that it should work without various chips, but equally it should work with all of them.
Can you post the exact chip number in case the wiser ones here can spot anything.
Do you have any other addons in your beebs as it has only been tested with a few that I have.
I would only expect interference from something generating NMI s, and even then, it should only skip through the tests.

User avatar
fordp
Posts: 958
Joined: Sun Feb 12, 2012 9:08 pm
Location: Kent, England
Contact:

Re: software troubleshooter for beeb hardware

Post by fordp » Thu Jun 29, 2017 11:59 am

BigEd wrote:Slightly OT, Dave Curran diagnoses faulty PETs using a daughterboard which sits in the 6502 socket. See http://blog.tynemouthsoftware.co.uk/201 ... oards.html
"ROM and RAM are common causes of failure on vintage computers, and this is an easy way to rule out problems with the original ROM or RAM, buffering, multiplexing or address decoding."
He mentions other diagnostic tools elsewhere in the blog.
I just saw this post. I think with a small tweak my MaxRAM board could do a similar job to this. That is once I have it working as a ROM/RAM board :oops:
FordP (Simon Ellwood)
Time is an illusion. Lunchtime, doubly so!

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

Re: software troubleshooter for beeb hardware

Post by 1024MAK » Thu Jun 29, 2017 3:59 pm

Hi Marcus

What access speed is the 27C128 EPROM?

Do you have another, that you can program with a normal sideways ROM image, then try it in your working Beeb?

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

User avatar
marcusjambler
Posts: 403
Joined: Mon May 22, 2017 11:20 am
Location: Bradford
Contact:

Re: software troubleshooter for beeb hardware

Post by marcusjambler » Thu Jun 29, 2017 4:24 pm

Hi Mark

The device is ST M27C128A-10F1 Singapore... They look brand new I bought a batch of 10.
I was struggling with several aspects of the minipro set-up mostly because I never programmed these devices before.
But 12.5v and 100us seem to produce working devices. For an exercise I pulled the basic rom from my working machine, read it, wrote it to one of these ST devices and put that one in next to the OS rom and it boots to normal basic prompt. I'm sure I'm missing something.... Going back to Trickys request :
Do you have any other addons in your beebs as it has only been tested with a few that I have.
I would only expect interference from something generating NMI s, and even then, it should only skip through the tests.
The dead Issue 4 is a standard 8271DFS system and the working one ( Issue 7 ) is a very basic TAPEFS machine... I had a couple of other roms there but I pulled them... No improvement...

Edited : 100ns access time

User avatar
marcusjambler
Posts: 403
Joined: Mon May 22, 2017 11:20 am
Location: Bradford
Contact:

Re: software troubleshooter for beeb hardware

Post by marcusjambler » Thu Jun 29, 2017 6:23 pm

OK... update
I erased and programmed an old HN4827128 -25 and its running :D FROGGER in full mode 7 glory and then audio and colour test... moving on to the memory test lines... Phew...

So, back to the testing

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

Re: software troubleshooter for beeb hardware

Post by tricky » Thu Jun 29, 2017 6:33 pm

ROMs could only affect it by doing nasty things to the electronic side of things.
My ROM doesn't need any other ROMs or even RAM and shouldn't be affected by them my.
Could you try another EPROM as I can't think of any reason for it not to work.
You could try putting it in a sideways ROM slot and seeing if you can read it correctly from their.

Scratch that then!

User avatar
marcusjambler
Posts: 403
Joined: Mon May 22, 2017 11:20 am
Location: Bradford
Contact:

Re: software troubleshooter for beeb hardware

Post by marcusjambler » Fri Jun 30, 2017 8:31 am

Hi Richard

Thanks for your assistance so far. I have the test rom installed in the dead beeb. Its booting a corrupt mode 7 frogger screen and then cycling the audio and colour tests... no problem... The memory test is predominantly straight lines with some bits not changing in both the upper and lower 16k...
I just need some assistance deducing which devices are responsible for the dead bits... I'll upload some photos later

User avatar
DutchAcorn
Posts: 1861
Joined: Fri Mar 21, 2014 9:56 am
Location: Maarn, Netherlands
Contact:

Re: software troubleshooter for beeb hardware

Post by DutchAcorn » Fri Jun 30, 2017 12:54 pm

As the test rom is now working it's probably a good idea to start a new thread for the fix.

Having said that- have you tried booting the beeb with the S25 jumper set south?
Paul

User avatar
marcusjambler
Posts: 403
Joined: Mon May 22, 2017 11:20 am
Location: Bradford
Contact:

Re: software troubleshooter for beeb hardware

Post by marcusjambler » Fri Jun 30, 2017 4:01 pm

Hi Paul
I've just tried it with S25 in the South position.
I'm still getting stuck bits on the memory testing.
I'll start a new thread over the weekend.

Post Reply