overdue-scratch

Author Topic: ATI and possibly nVIDIA resolution patch (based on prasys' 915resolution port)  (Read 115048 times)

0 Members and 1 Guest are viewing this topic.

eberts

  • Observer
  • Posts: 15
But how, on earth, is it possible for other cards to set higher modes like the MSI 9400gt 512MB (I've been told). The only obious change I can see is, that the DVI output seems to be the first channel (closer to the board) so the EDID info  can be read properly from the monitor.  ???

lebidou

  • Resident
  • Posts: 133
I think it might also depend on the bios.
 The VESA standard is a specification to make sure you'll have something displayed on your monitor. But it is just a specification, the way it is implemented in bios may change from a computer to another.

When the booter performs a VBE call, it deals with the BIOS, not the video ROM (vBios).
I think there might be some mode validation procedure to prevent setting insane modes. I'm not hundred percent sure, but I think that's why some computers can set higher than 1280 modes and some don't. Once upon a time a 1440x1050 mode was actually considered as insane, my first Mac couldn't have more than 800x600.

My X1900 Mobility comes from an amilo Xi1556 (I have the Pi1556, my 7600GO burned out) which has a 1920x1200 native resolution. Yet, my earlier test proved that I can't set that mode.
Your video ROM contains a 1440x900 mode already, but it never showed up.
My point is it does not only depend on the graphics card but also on the bios. That's why, I guess, it worked for oldnapalm and didn't for you.

Remember that this method is more a hack than a real modesetting feature. A real modesetting would allow us to set any mode without performing vbe calls, but it requires a LOT of work (ask Dong, and the guys working on nouveau).

I hope this answer your question.

diebuche

  • VoodooLabs
  • Posts: 30
@lebidou  For nvidia: Have u tried patching the other table i wrote about on IM? Dunno what's its for (probably just TV-Out), but could be worth a try. And if I remember correctly there was another part, which kinda looked like a table, but i couldn't make sense out of it.

Gonna try w/o ati kexts now..
« Last Edit: March 13, 2010, 01:34:55 PM by diebuche »

lebidou

  • Resident
  • Posts: 133
Yes I read about that on your thread on IM and added it, that's what I called the second VESA table.
Each mode looks like that:
Code: [Select]
typedef struct {
unsigned short h_disp;
unsigned short v_disp;
unsigned char  h_blank;
unsigned char  h_syncoffset;
unsigned char  h_syncwidth;
unsigned char  v_blank;
unsigned char  flags;           //looks like flags & 1 means "Graphics Mode", to oppose to "Console Mode"
  //on 7xxx the high four bits look like a mode id number.
  //on 8xxx only the low four bits are used, standard graphics mode are always 5.
  // it can be 1 (1400x1050 and 2048x1536) (HSync High, VSync High ?)
  //   3 (1440x900, 1680x1050 and 1920x1200) (Hsync High, VSync Low ?)
  //   3 (Standard Timings) (Hsync Low, VSync High ?)
  //    or 7 (1280x800 and 768x340) (Hync Low, VSync Low ?)
} NV_MODELINE_2;

and it uses reduced blanking timings.

diebuche

  • VoodooLabs
  • Posts: 30
hey lebidou

did some more tests: When removing ati kexts, it behaves as expected, but obviously qe/cl isn't working.
Then i accidentally booted my working partition with AutoResolution=No in the boot.plist. It didn't patch, but i still got the   kp.

So I think it's that old pciroot bug, which was fixed month ago in the trunk. Gonna reboot now to confirm

Edit: Ok, im kinda embarassed now; it actually never was a fault with your booter. Adding the PciRoot flag solved the kp; res patching still works
« Last Edit: March 15, 2010, 05:11:12 PM by diebuche »

diebuche

  • VoodooLabs
  • Posts: 30
About the "third" mode table in nvidia bioses:

Here's 0x7802 from the attached 8800GTS bios:

Quote
20 03 73 03 B9 20 03 81 FA 58 02 73 03 BA 58 02

Exactly the same string can be found at 0x9EF7.

The first one is followed directly by the already known 512-byte table at 0x7bbd

Strongly looks like some 800x600 mode to me, but nothing similar in the vincinity...
I dunno but it just doesn't look like some random stuff.

lebidou

  • Resident
  • Posts: 133
Ah! I'm glad to finally hear good news!

I'm planning on modifying the way it works because nVidia users reported it didn't work as expected. I won't change the ATI part as long as no one reported the same kind of issue for now though.

Instead of trying to set the native resolution, it will patch all the modes to fit the aspect ratio of the mode given in the Graphics Mode key. For example, if you enter 1440x900x32, the 1280x1024 will become 1280x800, the 1024x768 mode will become 1024x640 and so on. So if we can't set mode higher than 1280, the aspect ratio will still be correct.
Hopefully, it could put an end the stretched boot logo and save time for the theme designers.

I'll add the pciroot patch in the precompiled booter to avoid any further issues.

Thank you very much for reporting! I began to be worried about that issue as I couldn't find out what made ATI drivers to crash.

PS: I'm looking what you just posted about nvidia, I'll talk about what I find later. Looks interesting.

lebidou

  • Resident
  • Posts: 133
I made the updates I plan, it is available for testing in first post, as usual.

diebuche, I looked at the vbios you've sent. I think you're right, it might be some mode, but I could not make any sense of it. Also, I'm not sure if it directly concerns our matter. First, because it looks like a lonely 800x600 mode, with no other 1024x768 (the default mode) or 1280x1024 modes around. And also because if you look a few lines after the 0x9EF7 modeline, there is a bunch of 16/9 HD modes, from 420p to 1080p. And these mode are not related to TV, since the TV VESA table is at offset 0x7c7b. So maybe its related to h264 hardware acceleration, or a non VESA way of dealing with HDMI TVs. Finally, both of the strings you found are close to "SPQR" strings, do you know what SPQR stands for (apart from the roman thing) ?

eberts

  • Observer
  • Posts: 15
Lebidou,
this is very interesting. I tested the debug version and I got modes of 1280x800 but none of 1440x900 although I set it in com.apple.Boot.plist. I inserted my EDID (the one I posted earlier) manually. It said aspect ratio is 16/10 and the output was garbled at the bottem.
I'm attaching a screenshot but it seems hard to read because of my camera (mobile).

CEOS

  • Member
  • Posts: 49
Ha, you made it ! ;D

resolution is working here !
looks great
the only "problem" is the small graphic bug at the buttom of the screen...

Graphics enabler works perfekt

debug output:
http://img251.imageshack.us/gal.php?g=img0176s.jpg

great work   :)
can't wait to try the next chameleon version with this patch

ps.
i think it would be a cool feature if you could mark the active video mode in chameleons video info...
« Last Edit: March 16, 2010, 01:23:17 PM by CEOS »
My Hackintosh: • Intel Core2Quad Q6600 (g0) • PNY 8800gts 512 (g92) • Gigabyte Ga EP45-DS3R (Rev 1; BIOS v. f11e) • 2x2gb OCZ 1066MHz DDR3 • D-Link DWA 547 RangeBooster N

Drives: • HL-DT-STDVD-RAM GH22LS30  • SAMSUNG HD250HJ : Windows 7 Ultimate x64 • SAMSUNG HD161HJ :  Snow Leopard 10.6.3 • SAMSUNG HD103UJ : Backup

lebidou

  • Resident
  • Posts: 133
I correct two typos that may have caused this garbled screen bottom. In first post, as always. I'm glad we got some positive results, at last  :).

CEOS

  • Member
  • Posts: 49
Nope, graphic bug is still there...
My Hackintosh: • Intel Core2Quad Q6600 (g0) • PNY 8800gts 512 (g92) • Gigabyte Ga EP45-DS3R (Rev 1; BIOS v. f11e) • 2x2gb OCZ 1066MHz DDR3 • D-Link DWA 547 RangeBooster N

Drives: • HL-DT-STDVD-RAM GH22LS30  • SAMSUNG HD250HJ : Windows 7 Ultimate x64 • SAMSUNG HD161HJ :  Snow Leopard 10.6.3 • SAMSUNG HD103UJ : Backup

lebidou

  • Resident
  • Posts: 133
I updated the debug version, does it still does it ?

CEOS

  • Member
  • Posts: 49
yes, it's still there
My Hackintosh: • Intel Core2Quad Q6600 (g0) • PNY 8800gts 512 (g92) • Gigabyte Ga EP45-DS3R (Rev 1; BIOS v. f11e) • 2x2gb OCZ 1066MHz DDR3 • D-Link DWA 547 RangeBooster N

Drives: • HL-DT-STDVD-RAM GH22LS30  • SAMSUNG HD250HJ : Windows 7 Ultimate x64 • SAMSUNG HD161HJ :  Snow Leopard 10.6.3 • SAMSUNG HD103UJ : Backup

lebidou

  • Resident
  • Posts: 133
damn it!