Jump to content

Information on VESA modes in ATI&NVIDIA bios


  • Please log in to reply
255 replies to this topic

#21
eberts

eberts

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 138 posts
Sorry for misunderstanding, DieBuche. I ran it with a rom in the first place. Just wanted to make sure if it is the app which is not working. That's why I tried it without one.
I googled a bit: it's been compiled under Snow Leo and there seems to be an issue with dynamic libraries under Leo (google gives quite a lot hits for that error, e.g.:http://discussions.apple.com/thread.jspa?threadID=2151112)

#22
DieBuche

DieBuche

    InsanelyMac Protégé

  • Members
  • PipPip
  • 85 posts
I had noted this error, but was initally too lazy to do smt. about it; It's fixed now..

Sorry for misunderstanding, DieBuche. I ran it with a rom in the first place. Just wanted to make sure if it is the app which is not working. That's why I tried it without one.
I googled a bit: it's been compiled under Snow Leo and there seems to be an issue with dynamic libraries under Leo (google gives quite a lot hits for that error, e.g.:http://discussions.apple.com/thread.jspa?threadID=2151112)



#23
eberts

eberts

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 138 posts
sorry to say, but it's still the same:
dyld: unknown required load command 0x80000022
Trace/BPT trap
:(

#24
eberts

eberts

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 138 posts
Alright, had it executed at a friend's computer running snow - this is the output with a MSI 7300GT:
Attempting to open MSI.ROM
Length:61440
Found 1. NVIDIA Mode at 0x8ad1
Found 2. NVIDIA Mode at 0x8af1
Found 3. NVIDIA Mode at 0xd35e

#25
blackosx

blackosx

    InsanelyMacaholic

  • Coders
  • 3,083 posts
  • Gender:Male
  • Location:UK
Hi DieBuche

Chameleon can read a long list of resolutions from my card and I can already use 1680x1050, which is the native resolution of my display so I don't need to make any changes to my video BIOS. But out of interest I ran through this procedure, and here are my results for reference.

Hardware:
Video Card: MSI NX8800GT-E 512MB OC
BIOS Version: 62.92.23.00

Your app (v2) gave me the following result:
Length:58880
Found 1. possible NVIDIA Mode at 0x7bd1(Decimal:31697)
Empty Table at 0x7cf1(Decimal:31985)
Empty Table at 0x7d71(Decimal:32113)
Empty Table at 0x7db1(Decimal:32177)
Correct number of finds
Mod should be working

32 bytes starting from offset 0x7bd1:
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

which is the same as the example for the 8800GTS 512MB as you have in your opening post.

#26
DieBuche

DieBuche

    InsanelyMac Protégé

  • Members
  • PipPip
  • 85 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

#27
eberts

eberts

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 138 posts
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

#28
Ezhoon

Ezhoon

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 280 posts
  • Gender:Male
This is just a great effort..thanks DieBuche ;)

Is it possible to include 2560x1600 resolution?

#29
Dr. C

Dr. C

    InsanelyMac Protégé

  • Members
  • PipPip
  • 88 posts
Wow, this is a really nice feature, thanks a lot Eiche! :) Will try 1920x1080 asap with my NV7600GT.

#30
DieBuche

DieBuche

    InsanelyMac Protégé

  • Members
  • PipPip
  • 85 posts
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



#31
eberts

eberts

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 138 posts
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.w.../nvflash-basics

Cheers, DieBuche

#32
DieBuche

DieBuche

    InsanelyMac Protégé

  • Members
  • PipPip
  • 85 posts
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.w.../nvflash-basics

Cheers, DieBuche



#33
jlvaio

jlvaio

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 220 posts

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....download/326878
another link : http://www.popies.net/sonypi/
http://sony-tools.ho...x.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

#34
eberts

eberts

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 138 posts

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

Attached File  Bild_10.png   14.84KB   369 downloads
Attached File  Bild_9.png   15.36KB   291 downloads

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

Thanks again for your help
eberts

#35
Dr. C

Dr. C

    InsanelyMac Protégé

  • Members
  • PipPip
  • 88 posts
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:
Posted Image

After:
Posted Image

Thanks
Dr. C

#36
DieBuche

DieBuche

    InsanelyMac Protégé

  • Members
  • PipPip
  • 85 posts
@eberts
That's a bummer; your offsets et al. are fine.
To be honest, i can't see why it doesn't work. We just copied a mode which is working on an 8800GT?

Im probably gonna get a cheap used nvidia to try...

#37
eberts

eberts

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 138 posts
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

#38
JJJohan

JJJohan

    InsanelyMac Protégé

  • Members
  • Pip
  • 14 posts
  • Gender:Male
  • Location:Brisbane, Australia
Confirmed working at 1920x1200 on an Asus HD5870!

#39
Dr. C

Dr. C

    InsanelyMac Protégé

  • Members
  • PipPip
  • 88 posts
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 :P

Thanks
Dr. C

#40
DieBuche

DieBuche

    InsanelyMac Protégé

  • Members
  • PipPip
  • 85 posts
You copied it to the wrong offset :)
See the pic.
Posted Image

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







1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy