Jump to content

Information on VESA modes in ATI&NVIDIA bios


DieBuche
 Share

261 posts in this topic

Recommended Posts

Hi Dublove, thank you so much for detailed guide, I hope that should help many hackintoshers out there. I am trying to add 1920x1080 vesa mode to my Gigabyte HD5750 but I am stuck on step 2 (analysing vbios). when I execute the commad in terminal, all I get is info about lenth. I dont get any info on modes. I have tried many ways but same results. I am doing it on Lion, may be that is the reason.

 

I have attached my vbios and would really appreciate if you could analyse it on your system and tell me what are the 5 modes (eg: A9EE) for my bios. I can do the rest. Note: there are two bioses in bioses folder, one extracted via gpuz and one via winflash.

 

Once again, thank you so much for doing it for our hackintosh community.

 

Here is the edited one http://d.pr/f/fMnj, we have the same card so I edited your 1920x1440 res to 1920x1080

Make sure to specify Graphics Mode in your "org.chameleon.Boot.plist"

 

Like this:

<key>Graphics Mode</key>
<string>1920x1080x32</string>

 

I have the same problem, with an HD 4850. I noticed the resolution did change, because during boot there were some lines that wouldn't fit in one line and now it does.

Besides, in case of any problem with my monitor, I believe it would be safer to have 800x600 mode. I guess it'd be better to replace another "less useful" resolution, perhaps 1152x864. How can I do that?

 

Edit: another reason, look what happened to my BIOS screen (previously, it was fullscreen, almost full, with the same black borders).

 

Edit2: I managed to replace 1600x1200 with 1920x1080, so BIOS went back to normal, but I still have those borders.

 

Are you running through HDMI? ATI cards have a scaling issue with HDMI. Try a DVI Cord with that, it should work

 

Please help to set a resolution 2560x1440 for a Ati Saphire 5770!

I already made the modifcation for 1920x1080 like above!

 

I really appreciate your help

 

Thanks and best regards

MasterLen

 

Upload your VBIOS and I can do it for ya.

 

My VBIOS file: http://d.pr/f/HXTN

Screenshot of supported resolutions on Chameleon: http://d.pr/i/lfHm

 

I have tried to set it to 1680x1050 manually, but that never did work.

 

Oh damn disregard that patch! DO NOT USE IT!!!

You didn't give me the right video modes. I need you to literally reboot and in the chameleon Boot Screen push the arrow down key and choose video modes and scroll down. Then give me that pic!

 

Thanks to dublove i was finally able to hard flash my MSi ATi HD 5870, i can get now 1920 x 1080, but i still have those 1 inch thick, awful borders. Does anyone know, how to remove them?

 

Use a DVI cord. ATI cards have a scaling issue with HDMI.

 

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:

 

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)

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

 

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

 

The analyser isn't even needed. If you boot up in Chameleon and push down you can see all of the VESA modes your VBIOS supports. Just search for the width with the byteflipped hex value and if it has the byteflipped hex value height 2 bytes away then you can just change those.

Link to comment
Share on other sites

Here are the screenshots then;

 

1. http://d.pr/i/ciNU

2. http://d.pr/i/jonJ

3. http://d.pr/i/Zz8B

 

On the third screenshot I had to scroll down a little bit so don't skip that one. c:

 

OK I edited it but I'm not sure it if its right. Any matching height/width values that I found were right next to each other and weren't 2 values apart like the other ATI VBIOS'.

THe one I edited was 640x400x32. Heres a pic of the edit: http://d.pr/i/8eFP

 

Flash at your own risk

Link to comment
Share on other sites

Awesome, I'm assuming you just edited the file from the link you PMed me? Anyways, I'll try it out now. :)

 

~ Edit

 

Mhm, I flashed it but, upon restart nothing changed, GraphicEnabler is turned on, org.chameleon.Boot.plist lists 1680x1050x32 as resolution and when booting nothing has changed in the video info section.

 

I used NVFlash to flash the VBIOS, using this terminal command; nvflash.exe -4 -5 -6 changed.rom and it said it was successful.

 

:(

Link to comment
Share on other sites

Let me know once you've updated the file again, and can you check if your changes are there? If they are I might have done something wrong. :P

 

Should work. http://d.pr/f/NcbL

I'm positive the changes are in this one.

 

As for the last one I didn't even include a link to it O.o. What did you flash lol?

Anyway flash this and enjoy

Link to comment
Share on other sites

The .rom you sent via PM on the forums, I assumed you had updated the file, anyways I'll give this a go in a few, thanks for helping me the way. :)

 

~ Edit

 

Just tried it again, same result; no changes visible. It flashed fine as the output from the terminal said removing old .rom, replacing with new, successful flash etc.

 

Any ideas?

Link to comment
Share on other sites

The .rom you sent via PM on the forums, I assumed you had updated the file, anyways I'll give this a go in a few, thanks for helping me the way. :)

 

~ Edit

 

Just tried it again, same result; no changes visible. It flashed fine as the output from the terminal said removing old .rom, replacing with new, successful flash etc.

 

Any ideas?

 

No idea. What card do you have?

Link to comment
Share on other sites

Trying now, will flash through a DOS on a USB. brb.

 

Didn't bother with booting from a USB, did it from Windows again, this time it worked to some degree, in the video info when booting the last two are now 1680x1050x16 (or 8 I forgot...) and 1680x1050x32, though the screen doesn't fit properly, like, the Apple logo is at the bottom right of the screen and it's all enlarged, it's like 1680x1050 being stretched x2 then my monitor only showing the top left of what it should actually be displaying. Does that make sense? I can take a picture of it if needed.

Link to comment
Share on other sites

Trying now, will flash through a DOS on a USB. brb.Didn't bother with booting from a USB, did it from Windows again, this time it worked to some degree, in the video info when booting the last two are now 1680x1050x16 (or 8 I forgot...) and 1680x1050x32, though the screen doesn't fit properly, like, the Apple logo is at the bottom right of the screen and it's all enlarged, it's like 1680x1050 being stretched x2 then my monitor only showing the top left of what it should actually be displaying. Does that make sense? I can take a picture of it if needed.
Use a DVI Cord if you can and then go into /Extra/themes/ and find your theme folder and edit the plist file in there to match your resolution.
Link to comment
Share on other sites

I've already modified the theme, what happens if I can't use a DVI cord? It is actually a DVI cord but has a DVI to VGA converter at PC input.

 

~ Edit

 

I was wrong, it already is just a DVI cable from Monitor to PC, what now? :c

Link to comment
Share on other sites

I've already modified the theme, what happens if I can't use a DVI cord? It is actually a DVI cord but has a DVI to VGA converter at PC input.

 

~ Edit

 

I was wrong, it already is just a DVI cable from Monitor to PC, what now? :c

 

No idea, but a pic would help.

Link to comment
Share on other sites

It's pixelated.

 

~ Edit

 

Is the settings correct?

 

 

org.chameleon.Boot.plist

 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Boot Banner</key>
<string>No</string>
<key>Default Partition</key>
<string>hd(0,3)</string>
<key>EthernetBuiltIn</key>
<string>Yes</string>
<key>GenerateCStates</key>
<string>Yes</string>
<key>GeneratePStates</key>
<string>Yes</string>
<key>Graphics Mode</key>
<string>1680x1050x32</string>
<key>GraphicsEnabler</key>
<string>Yes</string>
<key>Hide Partition</key>
<string>hd(0,2)</string>
<key>Kernel Flags</key>
<string>“Graphics Mode”=”1680x1050x32″</string>
<key>Legacy Logo</key>
<string>Yes</string>
<key>Rename Partition</key>
<string>hd(0,1) Windows 7 Ultimate </string>
<key>Theme</key>
<string>LoginToLion</string>
<key>Timeout</key>
<string>5</string>
<key>USBBusFix</key>
<string>Yes</string>
<key>UseKernelCache</key>
<string>No</string>
</dict>
</plist>

 

theme.plist

 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Author</key>
<string>Enzo</string>
<key>Version</key>
<string>1.0</string>
<key>Enabled</key>
<string>Yes</string>
<key>screen_width</key>
<string>1680</string>
<key>screen_height</key>
<string>1050</string>
<key>screen_textmargin_h</key>
<string>10</string>
<key>screen_textmargin_v</key>
<string>10</string>
<key>screen_bgcolor</key>
<string>#3c3e42</string>
<key>background_pos_x</key>
<string></string>
<key>background_pos_y</key>
<string></string>
<key>logo_pos_x</key>
<string></string>
<key>logo_pos_y</key>
<string>29%</string>
<key>logo_bgcolor</key>
<string>#000000</string>
<key>logo_transparency</key>
<string>255</string>
<key>devices_pos_x</key>
<string></string>
<key>devices_pos_y</key>
<string>42%</string>
<key>devices_bgcolor</key>
<string>#232427</string>
<key>devices_transparency</key>
<string>255</string>
<key>devices_max_visible</key>
<string>5</string>
<key>devices_iconspacing</key>
<string>80</string>
<key>devices_layout</key>
<string>horizontal</string>
<key>bootprompt_pos_x</key>
<string></string>
<key>bootprompt_pos_y</key>
<string>-2</string>
<key>bootprompt_width</key>
<string>40%</string>
<key>bootprompt_height</key>
<string>20</string>
<key>bootprompt_textmargin_h</key>
<string>10</string>
<key>bootprompt_textmargin_v</key>
<string>5</string>
<key>bootprompt_bgcolor</key>
<string>#232427</string>
<key>bootprompt_transparency</key>
<string>60</string>
<key>infobox_pos_x</key>
<string></string>
<key>infobox_pos_y</key>
<string></string>
<key>infobox_width</key>
<string>800</string>
<key>infobox_height</key>
<string>406</string>
<key>infobox_textmargin_h</key>
<string>10</string>
<key>infobox_textmargin_v</key>
<string>10</string>
<key>infobox_bgcolor</key>
<string>#232427</string>
<key>infobox_transparency</key>
<string>60</string>
<key>menu_pos_x</key>
<string></string>
<key>menu_pos_y</key>
<string>-5%</string>
<key>menu_textmargin_h</key>
<string>10</string>
<key>menu_textmargin_v</key>
<string>5</string>
<key>menu_bgcolor</key>
<string>#3c3e42</string>
<key>menu_transparency</key>
<string>255</string>
<key>progressbar_pos_x</key>
<string></string>
<key>progressbar_pos_y</key>
<string>-33%</string>
<key>progressbar_width</key>
<string>100</string>
<key>progressbar_height</key>
<string>40</string>
<key>countdown_pos_x</key>
<string></string>
<key>countdown_pos_y</key>
<string>-28%</string>
<key>boot_width</key>
<string>1680</string>
<key>boot_height</key>
<string>1050</string>
<key>boot_bgcolor</key>
<string>#AAAAAA</string>
</dict>
</plist>

Link to comment
Share on other sites

It's pixelated.

 

~ Edit

 

Is the settings correct?

 

 

org.chameleon.Boot.plist

 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Boot Banner</key>
<string>No</string>
<key>Default Partition</key>
<string>hd(0,3)</string>
<key>EthernetBuiltIn</key>
<string>Yes</string>
<key>GenerateCStates</key>
<string>Yes</string>
<key>GeneratePStates</key>
<string>Yes</string>
<key>Graphics Mode</key>
<string>1680x1050x32</string>
<key>GraphicsEnabler</key>
<string>Yes</string>
<key>Hide Partition</key>
<string>hd(0,2)</string>
<key>Kernel Flags</key>
<string>“Graphics Mode”=”1680x1050x32″</string>
<key>Legacy Logo</key>
<string>Yes</string>
<key>Rename Partition</key>
<string>hd(0,1) Windows 7 Ultimate </string>
<key>Theme</key>
<string>LoginToLion</string>
<key>Timeout</key>
<string>5</string>
<key>USBBusFix</key>
<string>Yes</string>
<key>UseKernelCache</key>
<string>No</string>
</dict>
</plist>

 

theme.plist

 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Author</key>
<string>Enzo</string>
<key>Version</key>
<string>1.0</string>
<key>Enabled</key>
<string>Yes</string>
<key>screen_width</key>
<string>1680</string>
<key>screen_height</key>
<string>1050</string>
<key>screen_textmargin_h</key>
<string>10</string>
<key>screen_textmargin_v</key>
<string>10</string>
<key>screen_bgcolor</key>
<string>#3c3e42</string>
<key>background_pos_x</key>
<string></string>
<key>background_pos_y</key>
<string></string>
<key>logo_pos_x</key>
<string></string>
<key>logo_pos_y</key>
<string>29%</string>
<key>logo_bgcolor</key>
<string>#000000</string>
<key>logo_transparency</key>
<string>255</string>
<key>devices_pos_x</key>
<string></string>
<key>devices_pos_y</key>
<string>42%</string>
<key>devices_bgcolor</key>
<string>#232427</string>
<key>devices_transparency</key>
<string>255</string>
<key>devices_max_visible</key>
<string>5</string>
<key>devices_iconspacing</key>
<string>80</string>
<key>devices_layout</key>
<string>horizontal</string>
<key>bootprompt_pos_x</key>
<string></string>
<key>bootprompt_pos_y</key>
<string>-2</string>
<key>bootprompt_width</key>
<string>40%</string>
<key>bootprompt_height</key>
<string>20</string>
<key>bootprompt_textmargin_h</key>
<string>10</string>
<key>bootprompt_textmargin_v</key>
<string>5</string>
<key>bootprompt_bgcolor</key>
<string>#232427</string>
<key>bootprompt_transparency</key>
<string>60</string>
<key>infobox_pos_x</key>
<string></string>
<key>infobox_pos_y</key>
<string></string>
<key>infobox_width</key>
<string>800</string>
<key>infobox_height</key>
<string>406</string>
<key>infobox_textmargin_h</key>
<string>10</string>
<key>infobox_textmargin_v</key>
<string>10</string>
<key>infobox_bgcolor</key>
<string>#232427</string>
<key>infobox_transparency</key>
<string>60</string>
<key>menu_pos_x</key>
<string></string>
<key>menu_pos_y</key>
<string>-5%</string>
<key>menu_textmargin_h</key>
<string>10</string>
<key>menu_textmargin_v</key>
<string>5</string>
<key>menu_bgcolor</key>
<string>#3c3e42</string>
<key>menu_transparency</key>
<string>255</string>
<key>progressbar_pos_x</key>
<string></string>
<key>progressbar_pos_y</key>
<string>-33%</string>
<key>progressbar_width</key>
<string>100</string>
<key>progressbar_height</key>
<string>40</string>
<key>countdown_pos_x</key>
<string></string>
<key>countdown_pos_y</key>
<string>-28%</string>
<key>boot_width</key>
<string>1680</string>
<key>boot_height</key>
<string>1050</string>
<key>boot_bgcolor</key>
<string>#AAAAAA</string>
</dict>
</plist>

 

Well I'm stumped. My guess is that your monitor isn't adjusting the res in VESA?

Link to comment
Share on other sites

  • 1 month later...

Hi!

I patched the bios an the result is the 2560X1440 option in spite of the 1920x1440 inside the vesa modes list. But chameleon doesn't display the right resolution. I put resolution.dlyb in Extra, and I added the graphics mode 2560... in c.b.a.p. and finally I edited the theme.plist.

 

Suggestions???

 

Enjoy!

Link to comment
Share on other sites

  • 2 months later...

I got mine working on 1920x1080, originally I had a 1920x1440 on my ATI Card.

 

I simply extracted the VBIOS using GPU-Z and then edited the res using a HEX Editor.

 

I'll post pics later. Also willing to give help to anyone who needs it

 

I was trying this on an Asus nVidia 210 Silent 1 GB. I extracted the BIOS with GPU-Z in Windows 7. I attached the unaltered BIOS. Here is the AnalyseVBIOS result from original unaltered graphics card BIOS...

 

Length:64000
Found 1. possible NVIDIA Mode at 0x4118(Decimal:16664)
  Empty Table at 0x4238(Decimal:16952)
  Empty Table at 0x42b8(Decimal:17080)
  Empty Table at 0x42f8(Decimal:17144)
Correct number of finds
Mod should be working

 

I then added the following in Hex Fiend to attempt 1920x1080...

 

80 07 7F 07 00 00 7F 07 E3 07 03 08 87 08 38 04 37 04 00 00 37 04 39 04 3F 04 5A 04 00 FF 00 00

 

Here is the AnalyseVBIOS result from the altered graphics card BIOS...

 

Length:64000
Found 1. possible NVIDIA Mode at 0x4118(Decimal:16664)
  Empty Table at 0x42b8(Decimal:17080)
  Empty Table at 0x42f8(Decimal:17144)
Correct number of finds
Mod should be working

 

Can someone check my original BIOS (bios.rom) vs my new altered BIOS (GT218.rom) and tell me if I did something wrong? I got no new VESA modes after flashing the ROM with nvflash from a DOS boot USB and there seems to be no effect. I actually tried flashing a couple of other resolutions at different empty spots in the BIOS but they didn't work either. :wallbash:

nVidia 210 Silent 1 GB BIOS.zip

Link to comment
Share on other sites

 Share

×
×
  • Create New...