Information on VESA modes in ATI&NVIDIA bios, &how to mod them. |
Information on VESA modes in ATI&NVIDIA bios, &how to mod them. |
|
DieBuche
InsanelyMac Protégé
|
![]() |
Feb 21 2010, 03:10 PM Post #1
|
![]()
|
0. Preface
This is some preliminary work for coding a patch for Chameleon RC4/5, which will read the VBIOS of ATI (3*** HD & 4*** HD) and NVIDIA cards (nearly all models) and modify existing VESA modes (such as 800x600) to the native resolution of the display. For Widescreen monitors this will lead to an unstretched GUI & Spinner. If your extremely eager you can mod ur video rom right now and reflash it.; but im working on a patch similar to 915res to patch the bios on the fly... 1. Structure of VESA modes in ATI VBIOS In ATI VBIOS'es the VESA modes are stored in a table 1064 bytes long, containing 38 Modes, each 28 bytes long. The offset is not constant, but always around 0xA600. (There are actually two tables, but one I could identify as ComponentVideoInfo. Since this doesn't apply to us (& since i tried to patch this table w/o results) I'm concentrating on the table named above. Here is a sample mode from an 4870HD: CODE 20 03 00 01 58 02 19 00 10 00 50 00 01 00 03 00 00 00 00 00 00 00 00 00 6A 4B F9 15 Important for us are bytes 1, 2, 5, 6: Bytes 1&2 (In this example 20 03) are byteflipped versions of the width in hex format. Eg: If you unflip them you get 0320 which is HEX for 800. The same applies for bytes 5&6 ->58 02 -> Unflip them -> 0258 -> convert to DEC -> Height is 600. This sample mode thus has the resolution 800x600. The other bytes afterwards are for color depth, various sync times and pixel clocks In every 3*** - 5*** HD bios there are five 800x600 modes after each other, each with different color depth, various sync times and pixel clocks. For this fix to work we change those five modes to the resolution we want: If native res of the display is 1680x1050, we convert those to hex, resulting in 0x0690 and 0x041A Now we flip the bytes, resulting in 0x9006 and 0x1A04. If we now replace the width & height in the afore mentioned five modes, we will get native 1680x1050x32, 1680x1050x16 & 1680x1050x8. This is confirmed working on ati 3***, 4*** and 5*** I attached a small c++ tool to find the locations of those 5 modes. 2. Structure of VESA modes in NVIDIA VBIOS In NVIDIA VBIOS'es the modes are stored in a similar byteflipped way: Table 1 Update: Thanks to bitrips report, i had another look at his bios & found another table in a different format. (While ATI released some basic structures of their vbios and I could such identify the right table, NVIDIA doesn't) This other table I found is 288bytes long, containing 32 modes á 9 bytes. The offset is again not stable. Sample Code from 8800GT (XFX 512MB) CODE 40 01 C8 00 28 18 08 08 05 Resolution is byte flipped again, this time byte 1&2 and 3&4 (Sample: 320x200). The modes in this table go up to 1920x1200 (80 07 B0 04) The other mode table is 512 bytes long, containing 16 modes, each 32 byte long. Here is a sample mode from an 8800GTS CODE 00 04 FF 03 00 00 FF 03 17 04 9F 04 3F 05 00 03 FF 02 00 00 FF 02 02 03 08 03 25 03 00 FF 30 2A Important for us here are bytes 1, 2, 15, 16: Bytes 1&2 (In this example 00 04) are byteflipped versions of the width in hex format. Eg: If you unflip them you get 0400 which is HEX for 1024. The same applies for bytes 15&16 ->00 03 -> Unflip them -> 0300 -> convert to DEC -> Height is 768. This sample mode thus has the resolution 1024x768. Unlike the ATI modes Table, the NVIDIA is more compact, so we only need to modify two, sometimes only one mode. So we convert the native resolution of the display as above and replace those values. I attached a small c++ tool to find the locations of this mode. 3. Tool to Analyse VBIOS: 0. This tool only looks at where/how many VESA tables there are. It doesn't actually change them 1. Extract VBIOS using Windows etc. 2. run in Terminal ./analyseVBIOS bios.rom 3. You'll get the location of the tables 4. Zip contains exec and sources My thank goes to: The xorg ati team This post for the original cl tool The developers of 915res
Attached File(s)
|
Beerkex'd Very nice work DB!
This is going to make a lo... Feb 21 2010, 04:19 PM
blackosx Whoop!... this is a great find.... Top job Die... Feb 21 2010, 04:28 PM
pirloui Nice project, you have my mental support. Feb 21 2010, 05:36 PM
BiTRiP Thanks for getting into this.
Unfortunately it did... Feb 22 2010, 01:54 AM
Beerkex'd QUOTE (BiTRiP @ Feb 21 2010, 10:54 PM) I ... Feb 22 2010, 03:29 AM
bs0d QUOTE (BiTRiP @ Feb 22 2010, 01:54 AM) Ac... Feb 22 2010, 12:52 PM
kocoman Can anyone tell me which 3*** ATI works in snow le... Feb 22 2010, 09:58 AM
DieBuche QUOTE (kocoman @ Feb 22 2010, 10:58 AM) C... Feb 22 2010, 11:24 AM
DieBuche Hey BiTRiP, thx for trying. I managed to find anot... Feb 22 2010, 01:20 PM
BiTRiP QUOTE (DieBuche @ Feb 22 2010, 02:20 PM) ... Feb 22 2010, 02:32 PM
DieBuche You're right about the 15&16, it's fix... Feb 22 2010, 04:45 PM
shishank Hi
Can you pls guide me step by step to change th... Feb 22 2010, 05:09 PM
jinnggoff Wow...I got native resolution (1366x768) at apple... Feb 22 2010, 06:35 PM
eberts I agree, would be great to have some more detailed... Feb 22 2010, 09:04 PM
DieBuche Cool! Which card did u use?
QUOTE (jinnggoff ... Feb 22 2010, 10:10 PM
hiqu I get the following when I ran using FX570.ROM
At... Feb 22 2010, 10:43 PM
eberts QUOTE (DieBuche @ Feb 22 2010, 11:10 PM) ... Feb 23 2010, 01:11 AM
jinnggoff QUOTE (DieBuche @ Feb 22 2010, 11:10 PM) ... Feb 23 2010, 01:29 AM
DieBuche U have to run it with an Rom. Eg. type ./AnalyseBI... Feb 23 2010, 06:18 AM
eberts Sorry for misunderstanding, DieBuche. I ran it wit... Feb 23 2010, 09:30 AM
DieBuche I had noted this error, but was initally too lazy ... Feb 23 2010, 03:29 PM
eberts sorry to say, but it's still the same:
dyld: u... Feb 23 2010, 04:38 PM
eberts Alright, had it executed at a friend's compute... Feb 23 2010, 05:17 PM
blackosx Hi DieBuche
Chameleon can read a long list of res... Feb 23 2010, 07:32 PM
DieBuche I wouldn't recommend doing the hard flash anym... Feb 23 2010, 09:55 PM
eberts Yep, finally it works although in the end it gives... Feb 23 2010, 11:49 PM
Ezhoon This is just a great effort..thanks DieBuche
Is ... Feb 24 2010, 04:03 AM
Dr. C Wow, this is a really nice feature, thanks a lot E... Feb 24 2010, 10:48 AM
DieBuche The UseNvidiaROM=Yes will inject the bios after th... Feb 24 2010, 12:24 PM
eberts Ok, just tested it with the latest chameleon sourc... Feb 24 2010, 12:44 PM
DieBuche Yeah, this guide sound solid. If u want you could ... Feb 24 2010, 01:46 PM
eberts QUOTE (DieBuche @ Feb 24 2010, 02:46 PM) ... Feb 24 2010, 05:22 PM
jlvaio QUOTE (DieBuche @ Feb 21 2010, 04:10 PM) ... Feb 24 2010, 04:52 PM
Dr. C I did the flash for 1920x1080 - without success. N... Feb 24 2010, 08:20 PM
DieBuche @eberts
That's a bummer; your offsets et al. a... Feb 24 2010, 09:13 PM
eberts I think I got the culprit:
I temporarily connected... Feb 24 2010, 11:01 PM
JJJohan Confirmed working at 1920x1200 on an Asus HD5870... Feb 25 2010, 07:11 AM
Dr. C Buche, do you have any idea what could be the prob... Feb 25 2010, 07:56 AM
DieBuche You copied it to the wrong offset
See the pic.
... Feb 25 2010, 03:03 PM
Dr. C Hey Buche,
thanks again for your help. Here is my... Feb 25 2010, 11:58 PM
oldnapalm Check this, guys
http://forum.voodooprojects.org/... Mar 1 2010, 06:01 PM
twilight.lee It is working on ATI&NVIDIA Integrated Graphic... Mar 4 2010, 08:28 AM
lebidou QUOTE (twilight.lee @ Mar 4 2010, 09:28 A... Mar 4 2010, 04:26 PM
shishank Hi DieBuche
Can you patch my BIOS
My card is nV... Mar 6 2010, 10:11 AM
GLXOZ Only one question - can help me reflash edited BIO... Mar 7 2010, 02:59 PM
d.l. Cna you please patch this BIOS file: http://www.mv... Mar 7 2010, 04:47 PM
twilight.lee I am a little confused. Is this method can make so... Mar 11 2010, 07:05 AM
phr0z Im a bit confused too.
My Benq 2411HD doesn't... Mar 11 2010, 12:21 PM
lebidou Hello,
I checked, I don't think Integrated ch... Mar 11 2010, 10:30 PM
twilight.lee Thank you , lebidou. Your explanation are very cle... Mar 12 2010, 01:19 AM
tolga9009 QUOTE (lebidou @ Mar 11 2010, 11:30 PM) T... Jun 22 2010, 02:36 PM
phr0z Thanks for the explanation!
However I forgot ... Mar 12 2010, 06:58 AM
phr0z Can't get my monitor to display fullscreen wit... Mar 13 2010, 09:24 PM
jamesah Can anyone tell me what exactly this fixes or does... Mar 15 2010, 05:13 PM
DieBuche This fix get's rid of a stretched gui in the b... Mar 15 2010, 05:41 PM
theakseffect How do I use this without OSX installed on my lapt... Apr 5 2010, 06:29 PM
theakseffect QUOTE (theakseffect @ Apr 5 2010, 07:29 P... Apr 16 2010, 09:54 AM
atlee QUOTE (theakseffect @ Apr 16 2010, 07:54 ... May 13 2010, 04:07 AM
El Massman tried the hex patch with no success on a 7600gs. l... Apr 6 2010, 05:33 PM
lebidou QUOTE (El Massman @ Apr 6 2010, 07:33 PM)... Apr 8 2010, 06:15 PM
El Massman on a slightly different note... out of curiosity i... Apr 6 2010, 06:08 PM
El Massman thanks for getting back to me. i'll give it a ... Apr 12 2010, 04:19 PM
atlee Tried to use this on my ATI 5770
Error message ... May 21 2010, 12:04 AM
T-Bone90 Thanks a lot, very good Tutorial.
I have mod my 4... Jun 20 2010, 12:51 PM
frantisheq works with Radeon HD 4550. thanks a lot Jun 28 2010, 04:24 PM
carbondry This post is fine for analyzing the bios, but how ... Jun 29 2010, 06:28 AM ![]() |
|
Lo-Fi Version | Time is now: 3rd September 2010 - 08:59 AM |