overdue-scratch

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

0 Members and 1 Guest are viewing this topic.

CEOS

  • Member
  • Posts: 49
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 precompiled bootloaders with sources from diebuche's branch. diff is against RC5pre11, r687
I added a few debug output for Intel.
And hardcoded numbers of modes to 16 and 31 for Nvidia tables. Now we are sure it will patch it. I'm still trying to figure out a way to count them. Apparently, 9 bytes structs are actually 10 bytes in size !? That could be cousing tons of problems.
And I want the ouput.

A minor change in autoresolution.c, I wasn't sure about having a switch in a while loop, so I did the opposite, while loops in the switch, duplicate code but certainly more efficient.
 
@Azimutz, since you have an Intel GMA for testing, could you have a look at Deviato's and Andy's versions of the patch to track any typo/mistake due to the moving? I think Andy added some patching for 945 GMA but I didn't look at it.
« Last Edit: March 21, 2010, 09:53:19 PM by lebidou »

CEOS

  • Member
  • Posts: 49
this totally crashes my system

the cursor blinks 2 times, then the screen went black and my pc restart.
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

Azimutz

  • VoodooLabs
  • Posts: 420
  • Paranoid Android
@lebidou, after reading first post i remembered that i was testing with Graphics Mode added to Boot.plist.
Now testing without it, ATI still perfect! GMA shows the same behavior. The possible pics:
Links:
http://www.screencast.com/t/NzU2ZmQ4M
http://www.screencast.com/t/MzM3YzNkZDYt

There are some changes in the displayed resolutions. Will take a look at the other sources as soon as i can...
pretty busy right now, getting to the point were i don't know were to turn too :(
« Last Edit: March 24, 2010, 05:44:47 AM by Azimutz »
 System & Patches: http://goo.gl/i961
 Chameleon:
- trunk builds: http://goo.gl/9G1Hq
- pref pane: http://goo.gl/OL2UT

lebidou

  • Resident
  • Posts: 133
@Azimutz, I just found a bug in the type 1 bios code, I'll update the code tomorrow. If you have time to correct it in your trunk (there is no hurry, one thing at a time) : in gma_resolution.c, function intel_set_mode_1(), line 145:
replace
Code: [Select]
res->y2 = ((*y >> 4) & 0xf0); by
Code: [Select]
res->y2 = (res->x2 & 0x0f) | ((*y >> 4) & 0xf0); the rest of it seems fine.

@CEOS, I attached a full debug version of RC5pre11 with a loooot of debug information about almost everything chameleon does. I'd like you to pin point the precise moment it crashes.
I also attached an r684 version (which you have been testing till now) updated with the latest changes.
I suspect that the crash doesn't come from the patch but from RC5pre11 (that's why it took my so much time to upgrade to it).

I guess newer isn't always better.
« Last Edit: March 22, 2010, 01:30:18 AM by lebidou »

Azimutz

  • VoodooLabs
  • Posts: 420
  • Paranoid Android
@lebidou, that bit is fixed.. will test it soon. But i still didn't had time to add your latest changes to my work sources.. will probably do it over night, that's when i get peace :)

By the way, tested Deviato's booter and goot a similar situation as with Meklort's one.
A bit better actually, as i could still use Ctrl+Alt+Delete to reboot.
« Last Edit: April 05, 2010, 12:46:18 AM by Azimutz »
 System & Patches: http://goo.gl/i961
 Chameleon:
- trunk builds: http://goo.gl/9G1Hq
- pref pane: http://goo.gl/OL2UT

CEOS

  • Member
  • Posts: 49
here is the latest bug output before the screen went black:http://img135.imageshack.us/img135/5696/img0199z.jpg

the r684 version seems to work a lttle bit better, now i get 1 cursor spin before restarting....
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 think I found out what was going wrong, updated in first post. Please post output.
It wasn't RC5pre11 fault, sorry. Apparently, since the move from 915resolution to nvidia_resolution, structures needed to be packed (that's the 9 bytes long struct with a size of 10 problem). So now, according to the little virtual patcher I've set up, it should be working, dynamically counting modes etc... hopefully without crashing everything.
I don't know how comes it worked without that before and stopped working after a code move.

It implied little changes in Intel part I can't test, can someone with a GMA test if modes are patched ("1024x768 -> 1024x640" messages) ?

I hope it finally corrects the nvidia part, sorry about that guys.

CEOS

  • Member
  • Posts: 49
ok, at least it boots up the system again....

but the GUI is not working !
it starts in text mode, and if i push Tab to change to GUI mode the whole screen is full of graphic bugs...

but it seems like resolution patch is working for the splash screen.
the apple and the spinning cursor seems to have the right resolution.
but the graphic bottom bug is still there.

btw, think it was a good idea to use RC5 instead of 4.
will post debug output later
« Last Edit: March 22, 2010, 06:23:03 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 updated the debug version to have a little bit more output, like what resolution it found in EDID or Graphics Mode key, did it found a correct mode in VESA table and which one, if failure, which function failed. It is certainly still failing while initializing the GUI though. I'd very much like to have the output.
Somehow, initGUI() fails, and it could be because of a wrong resolution. The fact that it is working for the actual boot screen is intriguing.

About the bottom graphics bug, I have an idea but I'm not sure this is it at all, will test as soon as I've figured out why initGUI() failed. It looks like when a font file is wrong and the resulting image is too big for the buffer... I'm not sure on how to solve it yet.

CEOS

  • Member
  • Posts: 49
here is the debug output: http://img144.imageshack.us/gal.php?g=img0200q.jpg

the screen whith all the graphic bugs happend when i try to change to GUI mode (http://img440.imageshack.us/i/img0204o.jpg/)

and i noticed that the apple logo is not centered (http://img94.imageshack.us/i/img0202gp.jpg/)
seems like it's pushed up a bit by the graphic bug....

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

Azimutz

  • VoodooLabs
  • Posts: 420
  • Paranoid Android
@lebidou, latest debug test. ATI still rocks! Unless anyone reports a bug, ATI is fine.
GMA is a bit better. I wasn't explaining it correctly.. what seemed wrong with the resolution was the ratio, though it's reported correctly (16/10). Now the ratio seems fine, but i still get the screwed screen.
Pics:
http://www.screencast.com/t/NTFhMjI5YTUt
http://www.screencast.com/t/NGYzOTQ5
http://www.screencast.com/t/MzM1ZGQ3
http://www.screencast.com/t/N2M1NGYwZGEt

I had my feeling those crashes CEOS reported had nothing to do with RC5pre, At least on my machine i don't see any reason for them :)
« Last Edit: March 24, 2010, 05:46:20 AM by Azimutz »
 System & Patches: http://goo.gl/i961
 Chameleon:
- trunk builds: http://goo.gl/9G1Hq
- pref pane: http://goo.gl/OL2UT

lebidou

  • Resident
  • Posts: 133
Ok, I'm deeply sorry about blaming RC5pre11... but the __attribute__((packed)) thing isn't something you can invent if you don't know about it, right?
I'm happy that ATI seems to work, but that's something I can test myself, so it's easier. I'm almost considering the ATI part as done.

For your GMA, I can't say about the screwed screen, but I noticed there is no 1440 nor 1400 resolution in the bios before it's patched. ATM it uses the resolutions that are already there and turn them into the correct aspect ratio. Since there is 0x0x0 resolutions in the bios (according to your photographs), I will make the intel_set_mode_x functions to set the resolution we have either from EDID (in your case) or Graphics Mode key (in case the EDID is wrong). So we can have the native resolution.

P.S: Just updated with minor changes: 0x0x0 modes are filled with mode in EDID or Graphics Mode key on Intel Cards and the patch is no longer reapplied if there is no change since first run.
« Last Edit: March 22, 2010, 10:05:25 PM by lebidou »

Azimutz

  • VoodooLabs
  • Posts: 420
  • Paranoid Android
@lebidou, no need to be "deeply sorry" :) there's nothing to blame on you. As you said, newer doesn't mean better. Yeah, ATI is pretty stable.

Ok, same results as before with GMA. If i did understand, there should be changes on the 0x0x0 modes, but they still show as 0x0x0?! with or without Graphics Mode key (anyway, the edid id being read correctly).
About the screwed screen, it seems just to be like "compressed"... can't find words to explain this... need dinner :)

p.s.: i did liked the fact that it doesn't show the list of "modes to patch" after we press enter to boot! I was going to ask if you could remove it or make it show only on debug, because when the list is long "Wait=y" doesn't help.
« Last Edit: March 22, 2010, 11:36:52 PM by Azimutz »
 System & Patches: http://goo.gl/i961
 Chameleon:
- trunk builds: http://goo.gl/9G1Hq
- pref pane: http://goo.gl/OL2UT

lebidou

  • Resident
  • Posts: 133
Oh, my mistake. I forgot to allow patching 0x0 modes. Should be corrected now: modes from 1x1 to 640 are untouched, all the others are patched, the zero ones with resolution from EDID or Graphics Mode key.
This is GMA only, no changes are made for ATI or NVIDIA.

I still don't see why initGUI() would fail on Nvidia cards, and looking.