• Please review our updated Terms and Rules here

Assistance with assembly code for 5160 ROM

Hello! Just to clarify - with GLaBIOS, are you getting a "Key" (2000) or "KB" (4000) error (I think 601 may be an IBM BIOS error code)? And does the keyboard actually work now with that model F or still does not work but the error is different?
Well, what I observed when the GLaBIOS was in use was that there were no long and short beeps at power-on. However, the splash screen displayed the CPU, but didn't display the FPU, which was configured by the switch SW1 position 2 on the motherboard. In addition, the RAM size was displayed, which is the reason for this discussion regarding the RAM on this 256-640 KB motherboard. If the keyboard error of 2000\4000 was displayed, I didn't see it. The only item regarding the keyboard was the 601. I checked with the miinuszerodegrees website and found that the model F keyboard is the only type used with the IBM PC and PC-XT. I can't explain why the model M keyboard adapter that Chuck(G) developed was rejected other than Modem7's explanation that the 8255A-5 might be at fault. As I mentioned, I connected the model M keyboard and Chuck(G)'s adapter to the IBM PC or 5150, and the keyboard with the adapter was fully recognized.
 
Well, what I observed when the GLaBIOS was in use was that there were no long and short beeps at power-on. However, the splash screen displayed the CPU, but didn't display the FPU, which was configured by the switch SW1 position 2 on the motherboard. In addition, the RAM size was displayed, which is the reason for this discussion regarding the RAM on this 256-640 KB motherboard.
Yes, it's almost as if all of the DIP switches are reversed to what they should be. For example GLaBIOS won't attempt to detect an 8087 if the FPU switch is set to "not installed" (ON). SW3/4 for memory sizes would be 256K (ON-ON) if they were backwards to 640K (OFF-OFF).

Crazy idea - what if you just flipped all of them the other way?
 
Last edited:
I think that you would unlucky if both did not work.

Of note, Ruud's Diagnostic ROM (RDR) does not read the switches in SW1 in order to determine {MDA or CGA}. RDR will automatically detect the CGA card, then direct its screen output to the CGA card.


Presently, in my opinion, the 8255A is the prime suspect. It is the type of chip that gets configured by software, after power is applied, according to what the programmer needs to the chip to do. One of the things that the IBM POST (and the POST in GLaBIOS) does, is to configure the chip. Any functional 8255A-5 (the -5 bit is important) that can be sourced will work; it gets soldered in, and that's that. Although, whenever I have replaced a faulty one, I have put in an IC socket between the chip and the motherboard. But yes, presently, we are 'jumping the gun'.


Yes, I am interested to see whether or not the switches in SW1 are being read correctly.
Incorrect reading of switches 5 and 6 can explain the {1 long beep then 2 short beeps} issued by the IBM POST.

And interesting will be the 'Top of RAM' KB figure that RDR shows.
I am glad to read that Ruud's diagnostic bypasses the SW! but displays the settings of the SW1 on screen. I'll see if I can capture a screen picture with my phone camera.

I still have a 64-256 motherboard that I can substitute for use in the 5160, if the current 256-640 does have a defective 8255A-5 chip. I have a desoldering gun to remove the chip; however, my hands tremble because of a directed tremor that is not Parkinson's. Handling a desoldering gun is a challenge. Let's see what Ruud's diagnostic displays as the cause of the errors and RAM size.
 
Yes, it's almost as if all of the DIP switches are reversed to what they should be. For example GLaBIOS won't attempt to detect an 8087 if the FPU switch is set to "not installed" (ON). SW3/4 for memory sizes would be 256K (ON-ON) if they were backwards to 640K (OFF-OFF).

Crazy idea - what if you just flipped all of them the other way?
Are you saying that the FPU should be switched "on" because right now it is set to "off"? GLaBIOS ignores the FPU. Interesting! In addition, setting the memory count to "off/off" for 3/4 should achieve 640 KB. What about the use of the IBM BIOS? Should that be switched as well? Modem7 are you reading this?
 
Are you saying that the FPU should be switched "on" because right now it is set to "off"? GLaBIOS ignores the FPU. Interesting! In addition, setting the memory count to "off/off" for 3/4 should achieve 640 KB. What about the use of the IBM BIOS? Should that be switched as well? Modem7 are you reading this?

GLaBIOS is the same as the IBM in terms of the switch settings. Some are just a little counter-intuitive on the IBM 5160 board (like switch 2 set to "ON" means FPU is NOT installed).

I was just suggesting this because what you are seeing almost seems to be what would be expected if all of the DIP switches were set backwards OR perhaps they just need to be exercised a little bit. Just an idea that could be tried prior to getting the Rudd ROM and CGA working. You could switch them all the other way and just see what happens. If behavior changes that can give us a clue as to whether or not the 8255 is at least partially working.
 
Last edited:
I was just suggesting this because what you are seeing almost seems to be what would be expected if all of the DIP switches were set backwards OR perhaps they just need to be exercised a little bit. Just an idea that could be tried prior to getting the Rudd ROM and CGA working. You could switch them all the other way and just see what happens. If behavior changes that can give us a clue as to whether or not the 8255 is at least partially working.
I considered the 'opposite setting' possibility back at post #23, asking the OP, "For switch block SW1, are you confident about what position is OFF/ON for the switches? We have seen people get that incorrect. See the switch block examples at [here]."

But I subsequently failed to analyze the photo in the next post, post #24.
What I make out is:
* Switch 1 is in the ON position (resulting in the IBM 5160's POST going into a loop).
* 3 and 4 appear to be half way between OFF and ON. If both ON, that explains the 256 KB symptom.
* 5 and 6 are both OFF, the MDA setting. (With only a compatible VGA card fitted, the VGA card will work, but the IBM 5160 POST will beep {1 long beep then 2 short beeps} due to no MDA card.)

1783729297524.png
 
Last edited:
I considered the 'opposite setting' possibility back at post #23, asking the OP, "For switch block SW1, are you confident about what position is OFF/ON for the switches? We have seen people get that incorrect. See the switch block examples at [here]."

But I subsequently failed to analyze the photo in the next post, post #24.
What I make out is:
* Switch 1 is in the ON position (resulting in the IBM 5160's POST going into a loop).
* 3 and 4 appear to be half way between OFF and ON. If both ON, that explains the 256 KB symptom.
* 5 and 6 are both OFF, the MDA setting. (With only a compatible VGA card fitted, the VGA card will work, but the IBM 5160 POST will beep {1 long beep then 2 short beeps} due to no MDA card.)

View attachment 1325198
Thanks for clarifying the issue of the switches. Okay, well I will recheck these first and then set 5&6 for the CGA card. I plan to make the CGA card a permanent video card for the computer. The red marks are a little confusing on this switch. I'll rephotograph the setting before proceeding with the Ruud test.
 
Update before Ruud's test. Modem7 was correct the SW1 switches were set incorrectly. I have reset the SW1 settings as follows :
switch 1 - off
switch 2 - off
switch 3 - off
switch 4 - off
switch 5 - on
switch 6 - off
switch 7&8 - on

My new CGA card seems to be working. The adapter works, however, I can't get an answer from Monotech on the menu button. Event though I have the motherboard set of 80x25 I am getting what looks like 40x25. There must be an adjustment in the menu button.

RAM went up from the 256 kB to 512 kB and stopped there. No other errors displayed. My spindle on the floppy is not working but that may be needing cleaning/oiling or whatever.

Hats of to Modem7 for his keen eyes spotting the incorrect settings on the motherboard switch (SW1).

The next setup of course is to see which bank of RAM 64 kBchips are not working. I post these results in my next post.
 
My new CGA card seems to be working. The adapter works, however, I can't get an answer from Monotech on the menu button. Event though I have the motherboard set of 80x25 I am getting what looks like 40x25. There must be an adjustment in the menu button.
Are you using a 16:9 LCD? That adapter doesn't have any aspect ratio adjustment or correction. It just puts out the VGA equivalent of the CGA input. So if your monitor stretches it to full screen, the characters will look wide. Some LCDs have an aspect ratio adjustment to display VGA at 4:3.
 
Are you using a 16:9 LCD? That adapter doesn't have any aspect ratio adjustment or correction. It just puts out the VGA equivalent of the CGA input. So if your monitor stretches it to full screen, the characters will look wide. Some LCDs have an aspect ratio adjustment to display VGA at 4:3.
Yes, that is a possibility that it is set for 16:9. I'll to see if I can set the screen on the monitor for 4:3. Thank you for the reply.
 
I have included a picture of the current SW1 setting. (Note: I don't know if I have exceeded the number of pictures for the posts. I am sorry that the SW1,jpg and Ruud test.jpg are not of clearer picture quality.)

sw1.jpgRuud test.jpg

I ran the Ruud test and got an error at 512 kB. The Ruud test counted up to 512 kB, then triggered an error at address 80000h, as seen in the picture Ruud test.jpg. Looks like it's having difficulty accessing the last two banks, namely 64 kB, of which 128 kB of RAM is used. Suggestions? I didn't see the SW1 settings displayed by the Ruud, as shown by Modem7.
 
I ran the Ruud test and got an error at 512 kB. The Ruud test counted up to 512 kB, then triggered an error at address 80000h, as seen in the picture Ruud test.jpg. Looks like it's having difficulty accessing the last two banks, namely 64 kB, of which 128 kB of RAM is used. Suggestions?
Via the 'Top of RAM' test, Rudd's Diagnostic ROM (RDR) first ascertained that 640 KB of RAM appeared to be installed. RDR then tested the RAM upwards, starting at address 0, with the aim of a final test address of 640KB-1. RDR is designed to stop/halt at the first RAM address found faulty.

RDR found bit 1 at address 512 KB (80000 hex) to be faulty, and consequently stopped/halted all testing. You have a 256-640KB motherboard, and so per [here], address 512 KB corresponds to the start of motherboard bank 2. A motherboard RAM layout diagram for the IBM 5160 is at [here]. It is probable that the bit 1 chip in bank 2 is faulty, although a poor connection of the chip to the contacts in its socket is also a possibility.

What you could do is swap the bit 1 chip with another chip in the bank. If RDR then shows bit 1 as good and the other bit as bad, then you know that the chip is faulty in some way.

I didn't see the SW1 settings displayed by the Ruud, as shown by Modem7.
Once you get the RAM problem fixed, RDR will then be able to progress past the RAM testing. If the rest of the motherboard tests good (within the bounds of what RDR is able to test), then the switch settings box will appear.

( I will have a think about modifying RDR to display the switch settings boxes very early. In that way, if the 'Top of RAM' figure is not as expected, the switch settings boxes may reveal the cause. )
 
Last edited:
Via the 'Top of RAM' test, Rudd's Diagnostic ROM (RDR) first ascertained that 640 KB of RAM appeared to be installed. RDR then tested the RAM upwards, starting at address 0, with the aim of a final test address of 640KB-1. RDR is designed to stop/halt at the first RAM address found faulty.

RDR found bit 1 at address 512 KB (80000 hex) to be faulty, and consequently stopped/halted all testing. You have a 256-640KB motherboard, and so per [here], address 512 KB corresponds to the start of motherboard bank 2. A motherboard RAM layout diagram for the IBM 5160 is at [here]. It is probable that the bit 1 chip in bank 2 is faulty, although a poor connection of the chip to the contacts in its socket is also a possibility.

What you could do is swap the bit 1 chip with another chip in the bank. If RDR then shows bit 1 as good and the other bit as bad, then you know that the chip is faulty in some way.


Once you get the RAM problem fixed, RDR will then be able to progress past the RAM testing. If the rest of the motherboard tests good (within the bounds of what RDR is able to test), then the switch settings box will appear.

( I will have a think about modifying RDR to display the switch settings boxes very early. In that way, if the 'Top of RAM' figure is not as expected, the switch settings boxes may reveal the cause. )
In the second test, I moved the chip associated with bit1 to bit 5, and Rudd's test found bit 5 as an error. I removed the chip from bit 5 and tested it using Monotech's DRAM tester using March B. The tester found faults between pins 8 & 9 that were connected to pin 18. A replacement is on order.

Is there a remote possibility that the motherboard could have initiated this chip failure?
 
I don't think so, because I cannot think of how the motherboard could do that to a RAM chip.
I'll be in touch when the replacement chips come in. After the chip is replaced, I'll see if Rudd finds any more defective chips, now that I know what to look for. This is a good learning exercise.
 
I'll be in touch when the replacement chips come in. After the chip is replaced, I'll see if Rudd finds any more defective chips, now that I know what to look for. This is a good learning exercise.
I have added an entry for your motherboard to the failure history list at [here]. If you do find more bad RAM chips, I will modify the entry. In that list, you will see that 'RAM' appears many times.

Of course, Ruud's Diagnostic ROM (RDR) will be good for your IBM 5150 as well, especially considering that the 5150 motherboard has the bank 0 chips soldered in.
 
I wanted to report that I successfully increased the memory count to 640 kB. One chip in bank 2 was detected as bad. I checked the chip and reported my findings earlier. That was the only defective chip.
I ran Rudd’s test tool multiple times to make sure the success wasn’t a fluke. I want to thank Modem7, Plasma, and 640KB for their advice and help in getting GLaBIOS operational. It works now, and I’m seeing the CPU, RAM count, co-processor, serial/parallel I/O, and more at startup.

After I get this 5160 fully functional, I’ll set up my 5150 with that GLaBIOS ROM. The picture below was taken using Rudd’s test tool for the 5160 and SW1 switches.

1785423128092.png
 
I am writing to ask a question related to the GLaBIOS that was the focus of the post. How is the floppy drive correlated with the BIOS? When I started this project, I had planned to modernize the computer with modern components. Right now, as was shown in the previous post, I have the SW1 position 7&8 to host only one floppy, namely the 360 kB. However, I will adjust SW1 position 7 to off to host a second floppy. I wanted to know if the GLaBIOS would support a 1.44 MB floppy using a GOTEK floppy drive?
 
I am writing to ask a question related to the GLaBIOS that was the focus of the post. How is the floppy drive correlated with the BIOS? When I started this project, I had planned to modernize the computer with modern components. Right now, as was shown in the previous post, I have the SW1 position 7&8 to host only one floppy, namely the 360 kB. However, I will adjust SW1 position 7 to off to host a second floppy. I wanted to know if the GLaBIOS would support a 1.44 MB floppy using a GOTEK floppy drive?
Yes, you can. GLaBIOS doesn't natively have high-density drive support (not really practical in an 8K BIOS ROM), however there are several options involving option ROMs or TSRs.

It will also require a high-density capable floppy controller as the standard IBM PC/XT Diskette adapter isn't capable of supporting HD drives and media. Controllers such as ISA FDC or Quad-Flop come with the option ROMs installed to enable support for HD floppy, GOTEK, etc.
 
Another trick for HD floppy support is to simply boot DR-DOS 7. No BIOS support is required, just an HD controller.
 
Back
Top