ga586hx Bios support for 32GB+

Only for programmers and BIOS gurus with technical questions.
janpopan
Chip off the ol' block
Posts: 82
Joined: Tue Apr 02, 2002 10:08 pm
Location: Berlin
Contact:

I found an interesting Information about the ga586hx:

http://lh.ga586hx.de/wwwboard2002/messages/196.html

a modified Bios for HDD > 32GB
edwin
The Hardware Archivist
Posts: 6286
Joined: Wed Mar 20, 2002 7:11 pm
Location: Netherlands
Contact:

It works. The modification is being analyzed by Rainbow to see if it will work on other bioses too.
ajzchips
El cheapo dude
Posts: 3048
Joined: Sat Mar 23, 2002 12:41 pm
Location: Madrid, Spain

Rainbow mentioned it's just a dozen (or so) consecutive bytes that need replacing, but this can only be done if the BIOS already has native support for HDDs upto 32GB, since this "patch" only "fixes" the bug. It doesn't add the full >8GB support.
Rainbow
The UniFlasher
Posts: 3122
Joined: Wed Mar 20, 2002 4:16 pm
Location: Slovakia
Contact:

Tested this modification today on my MSI MS-5120 board with DTK PAM0054I E1 BIOS. This BIOS supported up to 32GB and hanged when I tried it with my WD400BB 40GB drive (worked fine with WD300BB 30GB). After this modficication, it does not hang anymore and detects full 40GB without any problems. I booted from floppy, ran ScanDisk on that drive - without errors and also ran some games from it. It looks pretty good, 30GB HDD and 1.6GB HDD work still OK as before.

I will do a guide how to modify the BIOS and a program that can do it automatically. I already did something that modifies the BIOS main block (finds the bytes that need to be changed and changes them), but you must extract it first from the BIOS (by running modbin - it leaves original.tmp file after exiting which is BIOS main block) and then insert it back after modification. That's not too easy - I'm doing it like this:
1) Extract all blocks to files using CBROM, then remove ("release") them all
2) Look (using HEX editor), where the compressed main block ends in the BIOS and split the BIOS file at that point (1st part is the old compressed main block, 2nd part is remaining BIOS code)
3) Compress the modified main block using LHA (I use v2.55)
4) If the new compressed block is smaller than old one, add some FFh bytes at the end, if it's larger, cut some FFh bytes from the beginning of the 2nd part
5) Join the new compressed main block with the 2nd part
6) Open the new BIOS in modbin, change something (like add some letter to the OEM string) and save it (this is needed because modbin recalculates all the checksums that may be bad!)
Patched and tested BIOSes are at http://wims.rainbow-software.org
UniFlash - Flash anything anywhere
Rainbow
The UniFlasher
Posts: 3122
Joined: Wed Mar 20, 2002 4:16 pm
Location: Slovakia
Contact:

The modification explained:
original (buggy) code:

Code: Select all

.....
2666837D78FF     cmp d,es:[di][00078],0FF
741A             je  000001E56
26817D7AF00F     cmp w,es:[di][0007A],00FF0
7712             ja  000001E56
52               push dx
.....
Fixed code:

Code: Select all

.....
26817D7AF003     cmp w,es:[di][0007A],003F0
7202             jb  000001E3E
B2FF             mov dl,0FF
90               nop
90               nop
90               nop
90               nop
90               nop
90               nop
52               push dx
.....
The easiest way to find the original code is to search for "26 66 83 7D 78 FF" byte sequence.
Patched and tested BIOSes are at http://wims.rainbow-software.org
UniFlash - Flash anything anywhere
ajzchips
El cheapo dude
Posts: 3048
Joined: Sat Mar 23, 2002 12:41 pm
Location: Madrid, Spain

I believe this thread will have to be retitled and made sticky.
This will be one of the greatest discoveries at wimsbios.com!!
soupy
Absentee administrator
Posts: 1086
Joined: Thu Mar 21, 2002 1:06 am
Location: Ontario, Canada
Contact:

Rainbow, if you can make this work with any motherboard, I think you might be able to market the program, or at least sell modified BIOSs that support large HDDs!
Flash your BIOS at your own risk.
Rainbow
The UniFlasher
Posts: 3122
Joined: Wed Mar 20, 2002 4:16 pm
Location: Slovakia
Contact:

I don't know who invented this fix, but Petr Soucek did it before (as you can see in the first post).
Patched and tested BIOSes are at http://wims.rainbow-software.org
UniFlash - Flash anything anywhere
Rainbow
The UniFlasher
Posts: 3122
Joined: Wed Mar 20, 2002 4:16 pm
Location: Slovakia
Contact:

The program is called AWD32GB and it's currently version 0.1. Almost no error checking, but works with many BIOSes (and also corrupts some of them). I'm going to do some debugging (testing it on my 300MB BIOS archive)...
Patched and tested BIOSes are at http://wims.rainbow-software.org
UniFlash - Flash anything anywhere
janpopan
Chip off the ol' block
Posts: 82
Joined: Tue Apr 02, 2002 10:08 pm
Location: Berlin
Contact:

I have some Informations abot the removed code. I get them from Ralf Seyfarth and he get them from Petr Soucek.

He removed
2666837D78FF cmp d,es:[di][00078],0FF
741A je 000001E56

the part was for detection of sectors

with removing this part it could be possible that an CD-ROM drive is detected as HDD

and this:
26817D7AF00F cmp w,es:[di][0007A],00FF0
7712 ja 000001E56

was for detection hdds bigger than 128GB
removing this part could also bring some problems if an hdd bigger than 128gb is attached

Sorry for that poor English

Jan

I have modified a bios for the AsusT2P4 Board. www.jan-hill.com/bios.html
Rainbow
The UniFlasher
Posts: 3122
Joined: Wed Mar 20, 2002 4:16 pm
Location: Slovakia
Contact:

Detection for HDDs over 128GB is useless because these drives need all new 48-bit LBA accessing method.
I fixed some bugs, have to add some more error checking...
Patched and tested BIOSes are at http://wims.rainbow-software.org
UniFlash - Flash anything anywhere
janpopan
Chip off the ol' block
Posts: 82
Joined: Tue Apr 02, 2002 10:08 pm
Location: Berlin
Contact:

Rainbow wrote:Detection for HDDs over 128GB is useless because these drives need all new 48-bit LBA accessing method.
I fixed some bugs, have to add some more error checking...
I know that(48 Bit accessing method), but I got a mail with the information that the second line is for testing if HDD is bigger than 128GB (136.9GB)

:)
Rainbow
The UniFlasher
Posts: 3122
Joined: Wed Mar 20, 2002 4:16 pm
Location: Slovakia
Contact:

I will test various BIOSes for FX boards modified by this program on my MSI MS-5120 board. Is anyone here who will test it on some other boards?
Patched and tested BIOSes are at http://wims.rainbow-software.org
UniFlash - Flash anything anywhere
janpopan
Chip off the ol' block
Posts: 82
Joined: Tue Apr 02, 2002 10:08 pm
Location: Berlin
Contact:

I got psitive answers for the Asus T2P4 and also the Soyo 5ED.

I have a small web-page

www.jan-hill.com/bios.html

Jan :D
Rainbow
The UniFlasher
Posts: 3122
Joined: Wed Mar 20, 2002 4:16 pm
Location: Slovakia
Contact:

Tested it before a while on some i430FX BIOSes. All BIOSes still worked after the fix, but most of them do not have INT13 extensions, so although they will detect big HDDs and show in setup and configuration table, only 8.4GB is supported. Three of them have INT13 extensions, but I haven't tested the 40GB drive (I have it in my main computer).
Patched and tested BIOSes are at http://wims.rainbow-software.org
UniFlash - Flash anything anywhere
Post Reply