BIOS Mods

Software related questions

BIOS Mods

Postby Chromedome45 » Sun May 15, 2011 7:12 am

Just wondering if there are any software guru's out there who could do some BIOS mods. The reason for asking is why cant the BIOS be patched to recognize the full amount of memory installed not just 128k. That way we won't need any device drivers or hacks just to run certain software such as DOS 5. And to recognize 2 or more floppies again without a device driver. Just a suggestion here. :D
Chromedome45
 
Posts: 7
Joined: Mon Apr 18, 2011 9:22 am

Re: BIOS Mods

Postby Brutman » Sun May 15, 2011 8:41 am

When you dig into it, neither of these is just a simple BIOS modification.

The machine recognizes up to 640KB RAM if it is installed - just watch as the machine starts and you can see it counting. But on a 128K or larger machine the BIOS only reports 112KB. 16KB is deducted to support the CGA video buffer, which is located by default starting at 112KB. DOS is designed to handle a contiguous amount of memory and it can't 'skip' the hole created by the CGA buffer, so the machine plays dumb and does not try to use the extra memory. Hence the need for software device drivers.

If you wanted to fix this in BIOS you would have to have the BIOS pick a different default location for the CGA video buffer, and then DOS would have to be smart enough to load above that address. How much video buffer would you reserve? 16KB is the standard, but you could do much more - the machine is flexible and will let you use almost the full 128KB if you try. Given that you don't know how much video buffer should be reserved up front (and it needs to be variable), burning it into BIOS is a bad idea.

The machine can be patched to recognize more than one diskette drive. The BIOS actually handles up to three diskette drives. I am speculating, but I think the issue there is that BIOS knows that only one drive should exist, so it only looks for one. The better 2nd drive kits know to patch BIOS to look for a 2nd or 3rd drive - you would only need to do your own BIOS fix for when you have a homebrew setup.

JRCONFIG handles both cases well. I think that DOS 5 has to be patched so that it doesn't refuse to run on the machine - when you first boot it thinks it has only 112KB, and it refuses to load. The DOS 5 patch basically lies to DOS 5 so that it will load far enough to load device drivers, where you can then do the correct machine fixup in the device driver.

(JRCONFIG in particular will fix the values in the BIOS RAM area and then start another reboot, so that when DOS comes up the second time the values are correct.)


Mike
Brutman
Site Admin
 
Posts: 910
Joined: Sat Jun 21, 2008 5:03 pm

Re: BIOS Mods

Postby geoffdaddy » Tue Aug 20, 2013 7:34 am

Brutman wrote:When you dig into it, neither of these is just a simple BIOS modification.

The machine recognizes up to 640KB RAM if it is installed - just watch as the machine starts and you can see it counting. But on a 128K or larger machine the BIOS only reports 112KB. 16KB is deducted to support the CGA video buffer, which is located by default starting at 112KB. DOS is designed to handle a contiguous amount of memory and it can't 'skip' the hole created by the CGA buffer, so the machine plays dumb and does not try to use the extra memory. Hence the need for software device drivers.

If you wanted to fix this in BIOS you would have to have the BIOS pick a different default location for the CGA video buffer, and then DOS would have to be smart enough to load above that address. How much video buffer would you reserve? 16KB is the standard, but you could do much more - the machine is flexible and will let you use almost the full 128KB if you try. Given that you don't know how much video buffer should be reserved up front (and it needs to be variable), burning it into BIOS is a bad idea.

The machine can be patched to recognize more than one diskette drive. The BIOS actually handles up to three diskette drives. I am speculating, but I think the issue there is that BIOS knows that only one drive should exist, so it only looks for one. The better 2nd drive kits know to patch BIOS to look for a 2nd or 3rd drive - you would only need to do your own BIOS fix for when you have a homebrew setup.

JRCONFIG handles both cases well. I think that DOS 5 has to be patched so that it doesn't refuse to run on the machine - when you first boot it thinks it has only 112KB, and it refuses to load. The DOS 5 patch basically lies to DOS 5 so that it will load far enough to load device drivers, where you can then do the correct machine fixup in the device driver.

(JRCONFIG in particular will fix the values in the BIOS RAM area and then start another reboot, so that when DOS comes up the second time the values are correct.)


Mike


Bump for an old topic.

Interesting. I wonder if a patch might be useful for systems that have 768 kB installed, since then you would have a contiguous 640 kB available for DOS? At any rate I guess the JRCONFIG utility will do the job so why reinvent the wheel there.

I am a little bit interested in BIOS patches myself as the system has one seemingly bad limitation for what I want to do with it, namely the serial port throughput when using a keyboard. I had intended to use the PCjr for two jobs: to transfer disk images back and forth to real 5.25" floppy disk for use in my ADAM computer, and secondly to use as a terminal emulator for using 80 column text on the same ADAM. The footprint of the PCjr is ideal for this since there's a wireless keyboard, it fits nicely under a CGA monitor, and I can switch back-and-forth from composite video (for the native ADAM display) or the PCjr's CGA RGBi output on my Amiga 1080 monitor. Real estate in my workspace is limited, and I've also always wanted to tinker around with the PCjr.

So, I was thinking maybe it would be cool if the keyboard decoding job could be redirected to the normal IRQ 1, and a modern microcontroller programmed to do the deserialization of the keyboard data as is done on a real IBM PC. Might be a neat little project maybe.
PCjr: 10MB RACore 01 hard drive expansion, Hotshot 640kB RAM expander, optical mouse, Xircom PE3, speech sidecar.
geoffdaddy
 
Posts: 118
Joined: Wed May 15, 2013 5:22 pm


Return to PCjr Software

Who is online

Users browsing this forum: No registered users and 1 guest

cron