• Please review our updated Terms and Rules here

IBM 5160 Hardware Address Configuration Assistance

SkydivinGirl

Veteran Member
Joined
Jan 12, 2012
Messages
507
Location
Raleigh, NC, USA
Hey everyone,

I'm attempting to optimize the hardware addressing for the BIOS of each card I have installed in my 5160. The three cards that I'm using, which have their own BIOS, are as follows:

Octek EVGA-16 VGA Adapter
XT-IDE Rev 2 with UART
Sergey ISA Floppy Disk UART

According to the 5160's memory map, A0000 - AFFFF is set aside for Video RAM and C0000 - C7FFF is for the Video BIOS. That is correct with my configuration.

The memory between C8000 and CFFFF is available so that's where I put the XT-IDE BIOS. The problem I'm running into when putting the XT-IDE BIOS in this location is that the floppy BIOS simply does not work (no matter its BIOS location). If I move the XT-IDE BIOS to any other location, the floppy BIOS works properly. Any ideas why this may be happening?

My other question is in regard to the IBM 5160's BIOS. According to the BIOS memory map, F0000 - FFFFF is reserved for the BIOS and Basic. Is there a way to remove Basic from the BIOS to free up some of that address space for other uses?

Thanks for any help you can provide. :)

Heather
 
From my own experience the FDC BIOS should be initialized prior to XT-IDE. So put it at a lower address, e.g. FDC BIOS at 0xC8000 - 0xC9FFF, and XT-IDE at 0xD0000-0xD7FFF.

Thanks,
Sergey
 
Is there a way to remove Basic from the BIOS to free up some of that address space for other uses?

Unfortunately not from software, but there is a pretty straightforward hardware mod which should work.

I believe all 5160s have the BIOS+Basic as two socketed ROMs (U18 and U19). U18 is F8000-FFFFF and U19 is F0000-F7FFF. Basic is from F6000-FDFFF and the BIOS is from FE000-FFFFF. So you should be able to remove U19 to free up the segments F000-F7FF. The machine will probably crash if it can't find a valid boot device and tries to enter ROM BASIC, though. And freeing up the space from F8000-FDFFF would probably mean doing some soldering.
 
@Sergey

Thank you so much for taking the time to offer a suggestion. That explains why it works properly when I put the floppy controller at address 0xCE000 and the XT-IDE at 0xD0000. My ultimate goal with my configuration is to have two 64K blocks of high memory available that I can use with my Lo-Tech 1MB RAM adapter. Your input will help!

@reenigne

You are correct that my 5160 has two socketed ROMs. I'll give it a try to find out. :)

Heather
 
@Sergey

Thank you so much for taking the time to offer a suggestion. That explains why it works properly when I put the floppy controller at address 0xCE000 and the XT-IDE at 0xD0000. My ultimate goal with my configuration is to have two 64K blocks of high memory available that I can use with my Lo-Tech 1MB RAM adapter. Your input will help!

You're welcome. You can try using 8 KiB EEPROM for XT-IDE if it supports them, and put XT-IDE and FDC controllers in 0xC8000 - 0xCFFFF range, so that you'll have 0xD0000 - 0xEFFFF available for EMS adapter.
 
That's another great idea! I have an 8KiB EEPROM that I can use. I wanted the larger EEPROM for the Boot Menu in the XTIDE but I never use the boot menu so I won't really be missing anything. I'll let you know how it works out. As of now, here's how I have the memory mapped above 640K.

0xA0000 - 0xAFFFF - VGA Memory
0xB0000 - 0xBFFFF - High Memory from 1MB RAM Board
0xC0000 - 0xC7FFF - VGA BIOS
0xC8000 - 0xC9FFF - Sergey Floppy BIOS
0xCA000 - 0xCFFFF -
0xD0000 - 0xD7FFF -
0xD8000 - 0xDFFFF - XT-IDE
0xE0000 - 0xEFFFF - Lo-Tech 2MB EMS
0xF0000 - 0xFFFFF - Motherboard BIOS ROM

I appreciate the help! I'm very happy with the Floppy + Serial card that you designed. The serial port on it and the XT-IDE Rev 2 don't take up extra slots, which is also a great bonus.

Heather
 
VGA adapter will normally use 0xB0000 - 0xBFFFF for text mode memory. I checked the XT-IDE jumpers, and unfortunately it looks that XT-IDE takes 32KiB space for its ROM BIOS extension, no matter what is the actually size of the installed EPROM/EEPROM. You can try programming both FDC BIOS extension and 8KiB (or 24KiB?!) XT-IDE BIOS into a single 32KiB EPROM and installing it into XT-IDE board. In this case the built-in FDC BIOS configuration utility will not work (it won't be able to save settings).
So the procedure is following:
1. Power on with FDC board installed, enter the FDC setup, and configure floppy disks parameters.
2. Power off, extract EEPROM from FDC, put it into an EPROM programmer and dump the image.
3. Prepare the XT-IDE image (use its configuration utility if needed)
4. Concatenate FDC and XT-IDE BIOS, e.g.: COPY /B FDC.BIN+XTIDE.BIN FDCXTIDE.BIN
5. Program the image from the previous step into an EPROM/EEPROM, put it in XT-IDE board.
 
My other question is in regard to the IBM 5160's BIOS. According to the BIOS memory map, F0000 - FFFFF is reserved for the BIOS and Basic. Is there a way to remove Basic from the BIOS to free up some of that address space for other uses?

I believe all 5160s have the BIOS+Basic as two socketed ROMs (U18 and U19). U18 is F8000-FFFFF and U19 is F0000-F7FFF. Basic is from F6000-FDFFF and the BIOS is from FE000-FFFFF. So you should be able to remove U19 to free up the segments F000-F7FF.
Per the diagram at [here], that would be valid only for the 11/08/82 BIOS chips, but even then, there is still a problem (besides loss of BASIC). Refer to the diagram at [here]. Even with the U19 ROM removed, the motherboard will still have the U15 driver drive the data bus from the external data bus (switch position 3) whenever a read from F0000-F7FFF occurs. At that time, the problem exists of the data bus being driven by two sources: motherboard U15 and the expansion card with RAM at F0000-F7FFF.

Adding a jumper to E1 on the 5160 motherboard will stop U15 from doing that, but it will also disable both the U18 and U19 ROM sockets, not just the desired U19 socket.

And freeing up the space from F8000-FDFFF would probably mean doing some soldering.
Yes, any partial removal of ROM address address space will require a wiring modification to the motherboard (specifically, the ROM decode circuitry).


For the 11/08/82 BIOS, I expect that a way of freeing up F0000 to F7FFF would be to:
1, Add a jumper to E1 on the 5160 motherboard (i.e. total disabling of motherboard ROM socket functionality), and
2. Use James Pearce's 'Lo-tech ISA ROM Board' [here], with a 32KB ROM, and set to address F8000, with the code in the ROM being a copy of 11/08/82 BIOS chip U18.

Of course, that takes up a slot.
 
Thanks guys! Lots of great information in this thread. My BIOS is the 11/08/82 revision. Removing the U19 chip did not affect the operation of the system other than not being able to load Basic from ROM. Putting a device in the F0000 range did cause errors that seem consistent with Modem7's idea that I would need to do a mod to keep the motherboard from driving that range.

From the sound of it, Sergey's idea about combining the ROMs into the same chip seems to be the best option. That way, I can stick everything in the C8000 range and leave the D0000 range completely open. I'll post by results here. :)

Heather
 
Even with the U19 ROM removed, the motherboard will still have the U15 driver drive the data bus from the external data bus (switch position 3) whenever a read from F0000-F7FFF occurs. At that time, the problem exists of the data bus being driven by two sources: motherboard U15 and the expansion card with RAM at F0000-F7FFF.

Adding a jumper to E1 on the 5160 motherboard will stop U15 from doing that, but it will also disable both the U18 and U19 ROM sockets, not just the desired U19 socket.


Yes, any partial removal of ROM address address space will require a wiring modification to the motherboard (specifically, the ROM decode circuitry).


For the 11/08/82 BIOS, I expect that a way of freeing up F0000 to F7FFF would be to:
1, Add a jumper to E1 on the 5160 motherboard (i.e. total disabling of motherboard ROM socket functionality), and
2. Use James Pearce's 'Lo-tech ISA ROM Board' [here], with a 32KB ROM, and set to address F8000, with the code in the ROM being a copy of 11/08/82 BIOS chip U18.

Of course, that takes up a slot.

With some soldering it might be possible to disconnect /CS6' line from U24 (pin 6), and connect that pin to pin 10 or ground. So that U15 will output data when /CS7' (0xF8000-0xFFFFF range) is active.

But I don't think that available space at 0xF0000-0xF7FFF will be that useful: BIOS extension scan will not scan that area, so it is useless for extension ROMs (well, it is possible to modify the BIOS); and 32 KiB window is kind of small of UMB or EMS.
 
Sergey, you rock. :)

I pulled the ROMs from my XT-IDE and the Floppy controller and copied the data. Even with the "large" version of the XTIDE Universal BIOS, there was a lot of empty space on the AT28C256. I first replaced the last 8K of the XTIDE BIOS with the floppy BIOS. The system recognized the floppy BIOS but it didn't see the XTIDE BIOS. Next, I merged the two files together, with the floppy BIOS at the beginning, then cut off the last 8K of the combined file and it worked perfectly!

I now have access to another 64K of RAM. :D

Updating the ROM will be a little more work, but I don't foresee changing it often. Thanks again to you and the rest of the Vintage-Computer community for the help on this.

Heather
 
But I don't think that available space at 0xF0000-0xF7FFF will be that useful: BIOS extension scan will not scan that area, so it is useless for extension ROMs (well, it is possible to modify the BIOS); ...
Surprisingly, the code in the 11/08/82 BIOS revision scans for BIOS expansion ROMs past F0000. F5800 is the last address checked.

It is as if IBM anticipated that someone would want to substitute the BIOS chip in socket U19 with a 32 KB ROM containing:
1. Offset 0000h to 5FFFh: BIOS expansion code (up to 24 KB); and
2. Offset 6000h to 7FFFh: The BASIC code from BIOS chip U19 (so that BASIC remains operational)
 
Surprisingly, the code in the 11/08/82 BIOS revision scans for BIOS expansion ROMs past F0000. F5800 is the last address checked.

It is as if IBM anticipated that someone would want to substitute the BIOS chip in socket U19 with a 32 KB ROM containing:
1. Offset 0000h to 5FFFh: BIOS expansion code (up to 24 KB); and
2. Offset 6000h to 7FFFh: The BASIC code from BIOS chip U19 (so that BASIC remains operational)

Not surprising at all to me because of socket U28. U28 begins at 0xF4000, extends to 0xF5FFF- just before BASIC starts. Based on the format that BIOS scans for Option ROMs, the ROM which can be placed in U28 can be any multiple of 2k up to 8k, and start on any 2k boundary to accommodate different ROM sizes.

EDIT: The above applies to the 5150, not 5160... oops :p. That said, the most likely explanation for that is code reuse from 5150 BIOS.
 
Surprisingly, the code in the 11/08/82 BIOS revision scans for BIOS expansion ROMs past F0000. F5800 is the last address checked.

It is as if IBM anticipated that someone would want to substitute the BIOS chip in socket U19 with a 32 KB ROM containing:
1. Offset 0000h to 5FFFh: BIOS expansion code (up to 24 KB); and
2. Offset 6000h to 7FFFh: The BASIC code from BIOS chip U19 (so that BASIC remains operational)

That's handy :) Just downgraded one of my 5160's to the 11/8/82 bios, I have Sergey's floppy bios and the XT-IDE bios in U19 and so far seems to be working fine, The machine would not boot into basic though, No big deal i never used it anyway so removed it from both eproms.
 
Last edited:
That is odd. I cannot think of a reason for failure. I might try it myself later.

I should have mentioned the 5160 that would not boot into basic has the 256 - 640k motherboard ( 640k onboard ), I tried the same on another 5160 with the 64 - 256k motherboard, It successfully boots to basic but only recognizes 1 expansion rom bios in U19 and not 2.
 
That is odd. I cannot think of a reason for failure. I might try it myself later.
I should have mentioned the 5160 that would not boot into basic has the 256 - 640k motherboard ( 640k onboard ), I tried the same on another 5160 with the 64 - 256k motherboard, It successfully boots to basic but only recognizes 1 expansion rom bios in U19 and not 2.
Works for me, on both a 64-256KB and a 256-640KB type of 5160 motherboard.

As a demo, I have put a test U18/U19 ROM set at [here] for you to try.
The content is:

U18 = Unmodified U18 from a 08NOV82 BIOS set of U18/U19
U19 = Each of the first three 8KB blocks contain BIOS expansion code that has an invalid checksum. The last 8KB block contains the BASIC from U19 in the 08NOV82 BIOS set.

When that test U18/U19 ROM set is fitted to my 5160s (floppy drive, but no hard drive), what I see on power on is:

vr35494vfkj92hf9.jpg


I press F1, then after after an attempt to boot from floppy, the BIOS jumps to cassette BASIC.

The behaviour is as I expect.
BIOS/POST finds BIOS expansion code at F0000, but after establishing that it has an invalid checksum, displays "F0000 ROM".
BIOS/POST then finds BIOS expansion code at F2000, but after establishing that it has an invalid checksum, displays "F2000 ROM".
BIOS/POST then finds BIOS expansion code at F4000, but after establishing that it has an invalid checksum, displays "F4000 ROM".
 
Works for me, on both a 64-256KB and a 256-640KB type of 5160 motherboard.

Thanks, What i wasn't doing was using the whole 24kb, (didn't think i needed to) i was only using 16kb of the 24kb space, I doubled up on the xt-ide bios = 16kb + 8k floppy bios and it works and now successfully boots to basic using the 256 - 640 motherboard.
 
Back
Top