• Please review our updated Terms and Rules here

Ruud's diagnostic ROM for IBM PC, XT and compatibles

Ruud

Veteran Member
Joined
Nov 30, 2009
Messages
1,369
Location
Heerlen, NL
Hallo allemaal,

As promised, here is my diagnostics ROM for the IBM-PC, XT or compatibles. You can download the binary and the source at http://www.baltissen.org/zip/diagrom.zip.

First a some what strange remark: it hasn't been tested on a real PC yet. So fat I tested it by using the PCEM-emulator. Why? Quite simple: I don't have to program a EEPROM for every change. A little BAT file takes care of assembling the source, calculating and inserting the checksum, and copying the result to the correct directory within PCem. After that it is just clicking a little button on the screen and I can see the result. And in the mean time I can keep sitting in my favourite chair :)

But I found out that using PCem didn't go without flaws. I found out that PCem contains at least two bugs:
- It doesn't handle the 8253 timers correctly. Landmark reports a FAILED for each timer. I never used Landmark in a real PC but I can safely assume that some of you readers must have used it and didn't encounter any problems with good timer. I reported the bug and the only comment was: you are not allowed to point to illegal downloads. OK Modem 7, you are warned :) Strange thing: not one remark about at least checking it.
Also strange: my ROM only has an error with timer two. Still have to look how Landmark tests the timers and why the difference causes errors for the the other two timers as well.
- The output of the 74LS322 keyboard buffer does not behave as it should. It outputs $00 instead of $FF when disabled. I reported that as well but I didn't even get a reply.

The two bugs had consequences for my ROM.
- Because it takes "quite some" time to find out that timer 2 is not working, I actually test timer 0 when the ROM thinks it is testing timer 0.
- I found a way to distinguish between the PC and XT but that doesn't work in PCem now due to that bug. Knowing I'm testing a XT compatible, I forced the ROM to handle the dip switch settings of a XT for the moment.

If you run the ROM, you will see that it is very fast compared to the Landmark ROM. Because it is still in the testing phase, I'm more interested in direct results like "does it work at all?" and "how do the error counters and the loop counter behave". So I shortened some time consuming tests.

The ZIP also contains the source code. It is made to compile under NASM. If you look for '###' you will find the parts where I skipped some loops, where I still have some doubts about the code or anything else that needs my attention.

Have fun!

Comments, ideas, suggestions and criticism is welcome of course :)
 
Cool stuff. I find an EPROM emulator is very useful for test and development on real hardware. I use a Moates Ostrich 2.0 which is geared towards automotive tuning but works with any binary image.
 
Can the diagnostic run with no RAM?

No, it cannot. The idea behind it is simple: I'm interested in repairing broken motherboard. So I'm not interested if there is or isn't a 8087 or a BASIC ROM present if the RAM does not work. If I have no RAM, I cannot use them anyway. Once I have working RAM, I want to check for other things.
Having RAM also means I can use subroutines in a natural way and use the stack as temporary storage.

For the same reason I stop the test after detecting a faulty CPU: why should I continue the test? Every other error found now could be due to a CPU executing the instructions in the wrong way. The same with DMA: no DMA means no refresh, means no reliable RAM. Fix the DMA first, then we continue.

I could change the program so it does not rely on RAM but that would mean I can forget, for example, about subroutines called by other subroutines and implementing it is a lot of extra work. But that's why I gave you the source code: if you feel the need to make it run without using RAM, be my guest :)
 
No, you didn't. It should have been "Danke schön". But being Dutch and not German, I would prefer "Dank je wel". :)

Really? Be sure and tell the other individual who actually thinks an adult doesn't know there's a difference between Dutch and German. And it's not like we actually use foreign language phrases here in the US. Rather the assumption is I believe everyone in northern Europe speaks German. Achtung baby.
 
Rather the assumption is I believe everyone in northern Europe speaks German.
If you start speaking German in France, there are regions where people will turn around and ignore you completely. Yes, we are more than seventy years after the war but people still remember. Most Dutch will understand it, but speaking it? Hardly.
The Dutch Commodore User Group is visited regularly by Germans. Except me and one other guy, the rest of the club speaks English with them.
 
Hallo Ruud,

vielen Dank für das Programm! I have just tested in a an non-working XT-clone baord I had around.

Supersoft:
https://imgur.com/a/6FeLWIk
Your ROM:
https://imgur.com/gmmMtAR

With your ROM, scrren is refreshing very fast (think its starting from the beginning again at the error) so its hard to read anything. Think I dont have to explain, but the information Supersoft gives me seems to be more accurate.

Keep up the good work, but I think it still needs some improvement to keep up with Supersoft.
 
Here is a screenshot of Ruud's Diagnostic ROM working on 5150 PC hardware. This is a stock motherboard with MDA display adapter. I doubled the file using a Hex Editor to 16K, and burnt it to a 27128 EPROM and installed it using a ROM adapter (The one I offer for the PC-Retro on the MTM website). I especially appreciate that you have included the source code for this program! Michael

rudd_1.jpg

ruud_2.jpg
 
If you start speaking German in France, there are regions where people will turn around and ignore you completely. Yes, we are more than seventy years after the war but people still remember. Most Dutch will understand it, but speaking it? Hardly.
The Dutch Commodore User Group is visited regularly by Germans. Except me and one other guy, the rest of the club speaks English with them.

I recall a visit to Amsterdam where I shared breakfast with a very frustrated Danish tourist. He was complaining about not being understood by the Dutch when he spoke German or English. I asked him which language he used first.
 
With your ROM, scrren is refreshing very fast (think its starting from the beginning again at the error)
First: it it the very first public version and never tested in a real PC, just the PCem emulator. But I appreciate it very very much that you actually tested it in a real motherboard :)

I have to check your screenshots yet but either my tool stops when finding a critical error or it should complete the test ending with showing the dip switch settings. And when restarting the loop, it skips the initialisation of the screen. So anything else must be a bug IMHO.

but the information Supersoft gives me seems to be more accurate.
My test gives IMHO the same info as Supersoft. But because of the strange behavior you probably miss a part. Suggestions for more info are always welcome!
 
I am looking forward to a ROM based diagnostic that is not misleading when it comes to the testing of conventional RAM.
Please, explain a bit more? I check the very first 2 KB of RAM very thoroughly (I think). Having a reliable base where I can create a stack I use the same subroutine toy check the rest of the memory. So if you think my test is not good enough or you have other complaints, please tell me! I'm looking forward to ideas that can improve the tool. We will all benefit from it.
 
With your ROM, scrren is refreshing very fast (think its starting from the beginning again at the error) so its hard to read anything.
I was able to check your pictures at home and it does seem that the test for the first 2 KB of RAM fails. But in that case the program should have stopped with a very clear message: 'Critical error, diagnostics heave been stopped!'. It seems it doesn't so there is probably a bug. AFAIK I have tested it by branching to the "Failed" part instead of the "Passed" part but for one or another reason it goes wrong in your case. I'll try to test it in the weekend.

I dug up a clone the day before yesterday to use as test machine. But when I opened it I noticed that the EPROM was partly under the left drive bay :( So I have either to find another machine with a more suitable case or to remove the motherboard. We'll see. To be continued.....
 
Back
Top