• Please review our updated Terms and Rules here

BIOS SETUP utility inside IBM PC/AT ROM

deanimator

Experienced Member
Joined
Apr 25, 2020
Messages
60
Location
SK
Hi everyone,

for all the IBM PC/AT afficionados, I came up with a small software stub that allows to load a BIOS SETUP utility inside the ROM BIOS of an AT - a machine that normally required this to be done using an external SETUP disk or application.
This was accomplished by replacing the 32K ROM/BASIC segment with a primitive INT 21h emulator, a .COM/.EXE preloader and a modified PhoenixBIOS setup utility. If there's no boot device found, this will be then called from ROM.
From DOS, the SETUP can be accessed by running DEBUG with the G=F600:0 command - this launches cassette BASIC in the original BIOS. I presume no one missed this in an AT, since cassette support was dropped off starting with the XT.
I have provided images of all four BIOS revisions for the AT with this setup, also source code in assembly and a manual on how to wire in a custom application, e.g. you can run a small DOS game instead.
For successful installation, two 27256 E/EEPROMs are required, and a flasher/programmer. Afterwards, the ROMs are socketed into the mainboard.

That's all, folks :)
P.S.: GSETUP was not used here - it called way too many DOS interrupts (C standard library) and without compression it would not fit into the 32K segment.

 

Attachments

  • setup.jpg
    setup.jpg
    210.4 KB · Views: 44
That's pretty cool. Is there anyway to run it if you cannot boot to DOS and run debug? Will it run setup if there is no OS found, kind of like how the AT would default to Basic?

The only issue with ROM Basic missing would be that BasicA from PC-DOS requires it. GW-Basic or QBasic does not, so if running a later version or if running MS-DOS it won't be a problem. Or if you don't use basic at all it won't be a problem.
 
Yes, it will run the SETUP utility automatically if no bootable device or OS has been found.
The alternate, "DEBUG" way of launching was to run it also if DOS successfully boots - to avoid having a BIOS SETUP utility on disk, as the same one is reused.

If PC DOS BASIC is called, it will currently bubble through the NOP opcode filler, which has a reboot handler at the end. If required I guess you could patch MS-GWBASIC to skip the DOS version check to run on the trilobites; not guaranteed though.
//edit: patching not required - MS-GWBASIC works on a PC DOS 2.10 just fine:
 

Attachments

  • gwbasic.png
    gwbasic.png
    14.7 KB · Views: 12
Last edited:
SETUP code could go into EPROM's that fit into the IBM AT (IBM 5170) motherboard's empty ROM sockets, U17 and U37.
- Cassette BASIC is unaffected.
- Implemented as a BIOS expansion ROM, per [here].
- Example execution: At boot time, it could display something like "Press F1 to run SETUP", wait 5 seconds for any F1. If no F1, clear the "Press F1 to run SETUP" then continue the boot process.
 
@offensive_Jerk: I use a TL866II from the "Far East", as - at that time - it was one of the cheaper programmers. However, there's a new version of this that deprecated some support for old chips, I reckon at least one of the programming voltages (21Vpp) was dropped in their new revisions. IIRC I had used 21 volts on some Iron Curtain chips that didn't want to cooperate on the lower voltages. Note that there might be cheaper and better stuff sold now than the TL866.
Note that if you have EPROMs, which are ceramic chips with a window on top, you will also need some means to erase them before they can be programmed. I use a small 11 watt UV-C fluorescent light, gets the job done in under a minute. Or perhaps a round trip to the Elephant's Foot of the Chernobyl NPP should flip a good couple of them bits inside. That at least unless the Russkies have the place booby-trapped.

@modem7: thanks for the info. Actually I did this project for a friend of mine as I do not currently have physical access to an IBM PC/AT, and replacing the BIOS ROMs in a zipfile was easier to test on a MESS/MAME32. I did notice that in the earliest AT mainboard revisions they had all 4 sockets populated - but once the 2 can be used for my own 64K BIOS expansion then it becomes much easier, as you write.
 
Interesting idea if you want to keep the original BIOS. On my XT-286 I installed an AMI BIOS so I didn't have to deal with IBM's clunky boot floppy, and also to allow me to run it at 8MHz. I use it as a hardware test machine, so I'm changing options frequently. Interestingly, the AMI bios with built in setup program fits in the same size EPROMs as the original.
 
Here's the improved version that can be put into the empty U17/U37 sockets, keeping the original BIOS and ROM/BASIC. Overrides INT 19h during POST to wait for F1 to enter SETUP after POST is finished, then either restores it back and boots normally, or jumps into SETUP on F1 keypress. I also got rid of the ugly darkgray on cyan color scheme while at it. The "stub loader" of the SETUP utility is practically same as above.

Regards
 

Attachments

  • BIOSSETUP.ZIP
    9.6 KB · Views: 8
  • setup.png
    setup.png
    65.2 KB · Views: 31
Just got a used ARLABS EPROM+ in the mail today. I think I can use some 27c256 eproms I yanked from a different board, but have to get a uv-c lamp first to erase them. I finally have programming power!
 

Attachments

  • PXL_20231114_032239754.MP.jpg
    PXL_20231114_032239754.MP.jpg
    5.1 MB · Views: 13
You could also use a mercury vapor lamp if you have one, like those used in street lighting, but you will need to cut the bulb as it filters out UV. Oh and a choke and a starter to light it up.
Or just use an EEPROM...
 
You could also use a mercury vapor lamp if you have one, like those used in street lighting, but you will need to cut the bulb as it filters out UV. Oh and a choke and a starter to light it up.
Or just use an EEPROM...
I ordered a uv-c light from Amazon, we'll see how that works
 
Here's the improved version that can be put into the empty U17/U37 sockets, keeping the original BIOS and ROM/BASIC.
Nice. Is it able to run from an alternate address range? For instance, would it work as an option ROM installed on an ISA card? (presuming that the even/odd binaries were combined into a single binary, of course. You supplied two 32KB files but it looks like only ~16KB is used in total)[/quote]
 
Your suggestion worked! Here's my poor man's eprom eraser. Confirmed it was erased in the software.
 

Attachments

  • PXL_20231115_212011082.MP.jpg
    PXL_20231115_212011082.MP.jpg
    4.2 MB · Views: 10
Nice. Is it able to run from an alternate address range? For instance, would it work as an option ROM installed on an ISA card? (presuming that the even/odd binaries were combined into a single binary, of course. You supplied two 32KB files but it looks like only ~16KB is used in total)
[/QUOTE]

Oh that is an interesting idea. Put it in a network card and then it could be used on other 286 computers the need setup floppies like Compaq deskpro or NEC powermate.
 
bakemono said:
Nice. Is it able to run from an alternate address range? For instance, would it work as an option ROM installed on an ISA card?

Of course it can, that's the point. The previous revision hacked it in instead of the ROM/BASIC code, as an option ROM in BIOSSETUP.ZIP it should run in any PC-compatible that has CMOS RAM.
That at least if the loading address (on option ROM cards, configured by jumpers or DIP switches) is not already preoccupied by something else in the system.
The actual .COM/.EXE loader with (very) primitive INT 21h emulation is just a little bit over 0.5K in size, the rest is the application; there's a README in the 1st zipfile on how to fit in a custom app. I tried to UPX the one I have there to fit into a 2764 (8K) but had no success with that as I think I'd need to emulate more INT 21h routines (memory allocation perhaps).
The only (practical) difference in code between the first and second revisions is the INT 19h override to ask for a F1 keypress. For clarity I'm uploading the sources of the second revision also. Note that the CHECKSUM byte needs to be patched after inserting the code at offset "binary_to_load" to be exactly 0 bytes, otherwise BIOS won't load the ROM.

@offensive_Jerk: glad to hear. I use an old comblock desk lamp for G23 fluorescent lights, the "self-starting" ones. Apart from regular "cold" and "warm" white tubes, UV-A, -B and -C are still manufactured and can be fitted straight into the socket. With a photo-resist lacquer you can also do homebrew printed circuit boards this way, with your circuit printed on a tracing paper and transferred via UV. Of course who would do it at home when there's PCB services from the "Far East" nowadays :)
 

Attachments

  • EXPANSIONROM.TXT
    4.5 KB · Views: 2
Last edited:
Will this work on a 286 motherboard that has a onboard SCSI controller ?

I have a peculiar XEROX 286 computer that has a motherboard with a SCSI controller and there seems to be no setup program even though there is a message
at boot saying "Options ROM found: 1" I have been using a setup disk but it doesn't seem to work very well because it cant find any hard disk type compatible with the 50mb installed disk

Thanx
 
SCSI is typically set for no drives installed in the computer’s setup and then the scsi boot bios takes over and provides access to the drive.
 
Back
Top