Jump to content

Information on VESA modes in ATI&NVIDIA bios


DieBuche
 Share

261 posts in this topic

Recommended Posts

I wouldn't recommend doing the hard flash anymore. Please refer to lebidou's post for a booter which patches ati & nvidia resolution modes automatically

 

I found an easier mod for NVIDIA Bioses:

You need:

- GPU-Z for Windows

- HexFiend for Mac

- get the latest AnaylseVBIOS tool from my first post (should now work in 10.5 as well)

 

 

0. make sure that in your theme.plist screen_width, screen_height, boot_width, boot_height are set to your display res.

1. In Windows extract your bios with GPU-Z; store it in a place so that you can access it from mac.

 

2. In Mac OS X drag the AnaylseVBIOS tool into a new terminal window, type space, then drag the extracted bios into it

 

3.Output will (hopefully) be something like this:

 

Attempting to open /Volumes/Azazel/Downloads/NVIDIA.7300GT.512.070126.bin
Length:61440
Found 1. possible NVIDIA Mode at 0x8ad1(Decimal:35537)
	 Empty Table at 0x8c11(Decimal:35857)
	 Empty Table at 0x8c31(Decimal:35889)
	 Empty Table at 0x8c71(Decimal:35953)
	 Empty Table at 0x8c91(Decimal:35985)
	 Empty Table at 0x8cb1(Decimal:36017)

 

4. Open the Bios with HexFiend. Jump to the offset of the first empty Table (Command+L and paste the decimal value)

5. Select the next 32 bytes (Status bar should read: 32 bytes selected at offset .....)

6. Select one of the following modes and replace the selected bytes with it.

 

For 1680x1050:

90 06 8F 06 00 00 8F 06 BF 06 DF 06 2F 07 1A 04 19 04 00 00 19 04 1B 04 21 04 37 04 00 FF 2F 3F

 

For 1920x1200:

80 07 7F 07 00 00 7F 07 E3 07 03 08 87 08 B0 04 AF 04 00 00 AF 04 B1 04 B7 04 D2 04 00 FF 00 00

 

For 1280x800:

00 05 FF 04 00 00 FF 04 C3 05 F3 05 FF 05 20 03 1F 03 00 00 1F 03 24 03 27 03 2B 03 00 FF 00 00

 

For 1440x900:

A0 05 9F 05 00 00 9F 05 DF 05 FF 05 DF 06 84 03 83 03 00 00 83 03 86 03 89 03 8F 03 00 FF 95 2E

 

For 1920x1080 (experimental):

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

 

(I'll post more later on)

 

7. Make sure everything is right & hit save

8. Flash the card in windows with your fav. tool. You might get an error; this will be because now he Checksum is wrong. NVM, flash it & reboot.

Please not that like any BIOS mod this could go wrong. If it does you can still blindflash the card, use another pci card etc. to recover

Link to comment
Share on other sites

Yep, finally it works although in the end it gives a segmentation fault... but I got a similar output as yours.

So I've done "patching" the table. Isn't there any possibility to load the modified bios via bootloader (UseNvidiaROM=Yes)? I tried it, but I'm not sure if it ever got loaded (bootloader=AsereBLN v1.1.9). ?Video still showed a max of 1024x768x32.

 

Thanks a lot, DieBuche

Link to comment
Share on other sites

The UseNvidiaROM=Yes will inject the bios after the apple bootscreen, but you could use that option to see if the bios loads correctly. If the text flashes too fast, use Wait=Yes.

 

Yep, finally it works although in the end it gives a segmentation fault... but I got a similar output as yours.

So I've done "patching" the table. Isn't there any possibility to load the modified bios via bootloader (UseNvidiaROM=Yes)? I tried it, but I'm not sure if it ever got loaded (bootloader=AsereBLN v1.1.9). ?Video still showed a max of 1024x768x32.

 

Thanks a lot, DieBuche

Link to comment
Share on other sites

Yeah, this guide sound solid. If u want you could also use the gui version

 

U won't have to get a pci-card: Follow the guide, then do the same for another usb-stick/floppy. Copy the original bios onto this one and create an autoexec.bat file containing

nvflash -4 -5 -6 -A -y file.rom

. If u boot from this stick, it will force flash your old bios...

 

Ok, just tested it with the latest chameleon source. It does load my 10de_0939.rom.

 

I've never done any vbios flashing before. I think I have to look for an old pci graphics card first - just in case...

What's your "usual process"? I found a pretty nice manual here: http://themacelite.wikidot.com/nvflash-basics

 

Cheers, DieBuche

Link to comment
Share on other sites

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*** &4*** 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.

 

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

 

 

is there any chance to help vaio user to have internal screen enabled

 

thanks if you can help

 

this link to my video installer: http://www.sony-mea.com/support/download/326878

another link : http://www.popies.net/sonypi/

http://sony-tools.homeunix.net/sony.html :D

 

 

regards

 

vgn-ar61zu

8600mgt512 qe/ci on external screen

alc262 work

sigma 7664 work but don t know how to enable the twice at the same time

ti-xxx dont work

webcam work

batery work

kalyway 10.5.8

ethernet work

rc4

Link to comment
Share on other sites

Yeah, this guide sound solid. If u want you could also use the gui version

 

U won't have to get a pci-card: Follow the guide, then do the same for another usb-stick/floppy. Copy the original bios onto this one and create an autoexec.bat file containing

nvflash -4 -5 -6 -A -y file.rom

. If u boot from this stick, it will force flash your old bios...

 

DieBuche,

I tried that but unfortunately it doesn't work:

Flashed modded BIOS with 'nvflash MSI_1440.ROM' (ver.5.91.0.1) successfully.

I got a blank screen after reboot so I flashed the old one back.

 

What I did:

./AnalyseVBIOS /Volumes/USB/MSI.ROM

Attempting to open /Volumes/USB/MSI.ROM

Length:61440

Found 1. possible NVIDIA Mode at 0x8ad1(Decimal:35537)

Empty Table at 0x8c11(Decimal:35857)

Empty Table at 0x8c31(Decimal:35889)

Empty Table at 0x8c71(Decimal:35953)

Empty Table at 0x8c91(Decimal:35985)

Empty Table at 0x8cb1(Decimal:36017)

Segmentation fault

 

post-37234-1267032022_thumb.png

post-37234-1267031784_thumb.png

 

I think I edited the right offset (replaced the highlighted bytes)

 

Thanks again for your help

eberts

Link to comment
Share on other sites

I did the flash for 1920x1080 - without success. No problems so far booting 10.6.2, but still Chameleon displays 1280x1024x32 max.

 

Some extra infos:

 

Attempting to open G73.bin
Length:65024
Found 1. possible NVIDIA Mode at 0x97af(Decimal:38831)
	 Empty Table at 0x98ef(Decimal:39151)
	 Empty Table at 0x990f(Decimal:39183)
	 Empty Table at 0x994f(Decimal:39247)
	 Empty Table at 0x996f(Decimal:39279)
	 Empty Table at 0x998f(Decimal:39311)
Correct number of finds
Mod should be working

 

I attached the before and after from Hex Fiend. My GPU is a Gigabyte 7600GT.

Before:

beforel.th.png

 

After:

afterd.th.png

 

Thanks

Dr. C

Link to comment
Share on other sites

I think I got the culprit:

I temporarily connected my monitor to the d-sub. All of a sudden, I got higher modes shown with ?video.

Unfortunately, I got no video output after nvidia drivers had been loaded. This is because I swapped the video channels in my NVCAP (dsdt) to have my monitor on Display-A. So the solution would be to use the original NVCAP + the vga output which I don't really like to use.

 

It would be an interesting question if it were possible to swap the channels within the vbios (NVCAP?)

Or is there any other possibility to extend the video modes for "the second channel" (the one which is further away from the mainboard)

 

Thanks

eberts

Link to comment
Share on other sites

You copied it to the wrong offset :)

See the pic.

hex.png

 

If u attach the rom, ill patch it.. or make sure u click into the hex view before you jump to the offset, so that you get that flashing cursor to point you to the right place

 

 

Buche, do you have any idea what could be the problem with the 1920x1080 resolution? I have nothing like the previous mentioned video swap in my dsdt, so I`m hoping for your input :)

 

Thanks

Dr. C

 

 

Thats great news!

 

Confirmed working at 1920x1200 on an Asus HD5870!

 

This is only to add more resolutions, if your display is working

Notebooks are much more tricky&I got little expirecnce on them...

is there any chance to help vaio user to have internal screen enabled
Link to comment
Share on other sites

It is working on ATI&NVIDIA Integrated Graphics Cards ?

 

It hasn't been tested on those kind of systems. It has been tested on my ATI Mobility X1900 (MXM, not integrated), and on Desktop NVidia 9800GTX+ (working), 8800GTS (didn't work) and 7300GT (VGA seems ok, DVI not).

Pre ATOMBIOS ATI cards won't work (ie. pre X1000 series).

 

There are 3 conditions for it to work:

-Have an Intel Chipset that doesn't belong to the 5 series (you can know that with lspci)

-The vbios must be located at address 0xC0000 (it usually is)

-The bios must return an EDID to get native resolution (and have native resolution in it)

 

So please test and report indicating you graphics model and chipset.

Thank you for testing.

Link to comment
Share on other sites

I am a little confused. Is this method can make some no-driver video card display on a proper resolution when enter GUI of MacOSX?

 

Or it's only make GUI of chameleon display on a proper resolution?

 

For example: I have a Epox EP-MGF6100-M mainbord , there is nVidia Integrated Graphics chip on it, When I enter GUI of macOSX , it's only one display mode : 1024x768 , no QE , no CI.

 

Can I use this method set display mode to 1440x900 in GUI of MacOSX?

Link to comment
Share on other sites

Im a bit confused too.

 

My Benq 2411HD doesn't display Chameleon in fullscreen so Im guessing it has something to do with that EDID bug and that it doesn't get it's native or proper resolution in VESA.

 

Native resolution is 1920x1080.

 

Im running DVI/HMDI, DVI is second port from motherboard and HDMI third.

 

I tried editing the bios for my NVIDIA GTX260 to get 1920x1080p in VESA.

BIOS loaded up fine with GraphicsEnabler/VideoROM/VBIOS, suprisingly (didn't work with only GraphicsEnabler).

 

Graphics Mode is set to 1920x1080x32@60.

 

However, when I list VESA modes i only get 1280x720 as highest possible.

 

Monitor should switch to fullscreen when native resolution is initiated even though no EDID is detected right?

Link to comment
Share on other sites

Hello,

 

I checked, I don't think Integrated chipset will be supported because of the lack of documentation from the manufacturers. The patch uses a functionality in Intel Host Controllers to unlock the vBios image in the system memory. Without documentation, it's impossible to tell if this same functionality is available for other chipsets. If someone knows, information is welcome.

 

The main goal of this isn't just to get chameleon to the native resolution, it's to have native resolution in MacOS since the first boot after installation (and maybe during installation), before you've set up GraphicsEnabler, messed with your kexts and all. And to keep native resolution if you have to disable GraphicsEnabler for a while... To have native resolution, no matter what.

 

Also this is the only way for me to have native resolution in 64 bits mode on my Radeon Mobility.

 

Note that it worked on a Nvidia 9800 and an ATI X1900 Mobility, other nVidia cards don't set the mode yet, and it makes ATI drivers crash with HD3xxx and HD4xxx (HD2xxx is untested, X1300 to X1900 should be working fine though). It is still work in progress.

 

@phroz, loading your vbios in the registry with VBIOS/VideoROM/etc won't help, this is for OS X drivers, later in the boot process.

To set native resolution from boot, you need the patch I'm working on, or to flash your card. If you'd like to test the patch, it hasn't been tested on GT1xx, GT2xx series.

And the EDID bug isn't in cause.

 

There are already testers for nvidia 7xxx, 8xxx, 9xxx and ati HD3xxx and HD4xxx. If you don't have one of these and/or if you have a laptop, I'd like to know how it behaves on your machine.

 

I hope it clarifies things a bit, have a nice day.

Link to comment
Share on other sites

 Share

×
×
  • Create New...