Jump to content

Editing custom personalities for ATI Radeon HD[45]xxx


  • Please log in to reply
757 replies to this topic

#621
bcc9

bcc9

    InsanelyMac Legend

  • Coders
  • 1,278 posts
  • Gender:Male
Thanks zhell, I've tweaked&added your changes to the version of the script in post #1.

Of course the script should probably look at the version of OSX running on the target volume if /S/L/E is not used, but I'll save that for a future update :)

Also, instead of downloading command line tools, one can use otools, etc. with current xcode just by updating your path. e.g.:
set path = ($path `xcode-select -print-path`/usr/bin)
or PATH=$PATH:`xcode-select -print-path`/usr/bin; export PATH
if you're a bash/sh person.

I find it really poor of Apple to promote installation of 2 copies of the developer tools on the system just to get the tools find-able via a standard path. They could at least install default symlinks like what some linux distributions do with their /etc/alternatives solution.

The script could search for the tools in the above path automatically but maybe that's going too far (better to get one's xcode environment set up right).

#622
lukazm

lukazm

    InsanelyMac Protégé

  • Members
  • Pip
  • 1 posts
Thanks! The ati-personality.pl works well in Mountain Lion (10.8) and this guide helped me to fix my graphic card. Thanks a lot! :)

#623
Slice

Slice

    InsanelyMacaholic

  • Local Moderators
  • 2,976 posts
  • Gender:Male
  • Location:Moscow
Great job, bcc9!
I want to thank you for the method to make a Radeon working. It will be helpful for many many new users.
My report briefly.
Graphics Card: Gigabyte HD6670 2Gb DeviceID=0x6758. Outputs DVI-D, VGA, HDMI.
1. Without any injector it works natively with RadeonFramebuffer. But DVDPlayer chashes.
2. With GraphicsInjector=Yes, or with DSDT patch, or with Natit, no matter what I inject and what frame buffer choose I always get black screen.
3. With connectors patched by your manual I got fully working Graphics, including resolution, rotating, OpenGL, DVD playback. Injected values are not very important. Only basics are needed. Framebuffer may be chosen anyone, appropriate for 6000. I checked with Pithecia and with Ipomoea. Same result.

My final result with Ipomoea
  04 00 00 00  04 03 00 00  00 01  00 00  10  00  01  06
  10 00 00 00  10 00 00 00  00 01  00 00  00  00  00  01
  00 08 00 00  04 02 00 00  00 01  00 00  12  04  04  03

To get VBios I made an addition in Clover.
Start with Clover rev579 up to GUI. Press F6 and get EFI/misc/c0000.bin
This file may be used for
./radeon_bios_decode <c0000.bin
./redsock_bios_decoder <c0000.bin

Is it possible to get sources of these decoders?


PS. Just wonder, why the theme is not pinned in the forum. It is more useful then other pinned here.

Edited by fantomas1, 11 August 2012 - 10:50 AM.
done


#624
bcc9

bcc9

    InsanelyMac Legend

  • Coders
  • 1,278 posts
  • Gender:Male
Hi Slice, surprisingly, you're the first to ask for the source. I hadn't posted the source (like I normally would) simply because the code was a midnight hack-attack that is not properly maintainable without some cleanup. The code is way below my standard for releasing but I'll put it out there as-is anyways. The code is largely lifted from two sources:
1. The xf86 ati video driver source xf86-video-ati-6.14.0/src
2. the linux kernel driver source linux-2.6.37/drivers/gpu/drm/radeon

Unfortunately the two sources are using different APIs for bios parsing and it's not clear which one was going to be supported going forward (it looked like the newer code was using an inferior API if I remember correctly). I wound up using a bit of both and never got around to cleaning things up.

Also I did add hex offset output to radeon_bios_decode as someone was claiming to want it but I don't think it was ever used by anyone in the end. That information should probably be hidden from the output by default.

As for redsock_bios_decoder, I do not know who published that or where it came from (I never recommended it). It looks to largely be a re-implementation of radeon_bios_decode. If there is something that radeon_bios_decode is missing that people need in order to edit their connectors, I think it should just be added to radeon_bios_decode. Best not to have a second utility replicating almost everything.

Regarding clover, I notice that recent code is patching the ATI connector information using static edited connector tables. I think it's cool to start to automate the patching of connectors but I think static tables is the wrong approach. It would be much cooler to make options to dynamically change the connector count, order, type, etc. And, perhaps this would be better ironed out in a general purpose auto-patch script that newbies could use, rather than in one particular bootloader.

PS: I think I have a lot of posts that are worthy of stickies/FAQs, but since I don't run this site none of them are (ok, 1 is now :) Perhaps a short book on best current practices for OSX hackintosh development is in order :)

Attached Files



#625
redsockosx

redsockosx

    InsanelyMac Protégé

  • Members
  • Pip
  • 17 posts
Hey bcc9, hat's off to ya for all your early and continued effort on all this.

Its been many moons since I did anything with my quick hackjob for redsock_bios_decoder, from memory, the only reason I did it was to cross-reference the actual output flags that were scattered from different sources with part of your effort as I had been scratching down lots of hand-written notes when I was playing around with it all.

Let me know if y'all want me to dust off my notes as well.

Cheers

#626
bcc9

bcc9

    InsanelyMac Legend

  • Coders
  • 1,278 posts
  • Gender:Male

Hey bcc9, hat's off to ya for all your early and continued effort on all this.

Its been many moons since I did anything with my quick hackjob for redsock_bios_decoder, from memory, the only reason I did it was to cross-reference the actual output flags that were scattered from different sources with part of your effort as I had been scratching down lots of hand-written notes when I was playing around with it all.

Let me know if y'all want me to dust off my notes as well.

Cheers

Thanks. You could make diffs to apply to radeon_bios_decode that I could merge in and or merge in radeon_bios_decode to what you have if you want. I'm happy to let anyone else take over on this; I'm not claiming any copyright over this (it's all cribbed from open source). If the xf86 & linux source got synced/cleaned up maybe the code could be re-based off of a newer version of that code as well.

#627
chappatti

chappatti

    InsanelyMac Protégé

  • Members
  • Pip
  • 16 posts
@bcc9:

Thanks for the post, and truning me back on to try and fix my HDMI audio...

I am not a techie or anything, but am an avid reader and obssessive perfectionist, so I want my HDMI audio. I dont understand a few things on your post, but for now my problem is somewhat strange. Running the radeondump I get "ATOMBios signature not found" or something similar. My XFX HD 6670 (2GB) works OOB (3 port DVI, DP, HDMI) to the extent that resolutions work, dashboard ripples, I can select 720p and underscan, and it is fully installed in my Windows 7 side (dont know what that helps for). HDMI video is great, and movies run. BUT DVD Player crashes. Cinebench gives 25 fps (??).

1. Why is the dumper not able to find an ATOMBios signature. Like I said I did not have to use any boot flags, etc. and the card just came up on the video side fine. I have not checked any other ports.

2 Also, my IoregExplorer lists HDMI as 0 - it loads the default generic framebuffer.

I dont know if this makes any sense but I am a little suspicious about the ATOMBios not found. Does that simply mean that no proper framebuffer is loaded and my card is treated as "generic"

3. Kabyl's boot does not work for me since it just reboots after loading. It looks like kabyl's boot is only 10.6.8 ????

Thanks for any comments. I am at work so I do not have any pics to upload !??!!

#628
sollarman

sollarman

    InsanelyMac Protégé

  • Members
  • Pip
  • 9 posts
  • Gender:Male
  • Location:Yalta
Thank you !

#629
Slice

Slice

    InsanelyMacaholic

  • Local Moderators
  • 2,976 posts
  • Gender:Male
  • Location:Moscow
Hi bcc9,
Thank you for the sources. You are right, Clover's patch is far from perfect and I have an idea to improve it. To do this I need a sources to work with ATOMBios.
Did you have an objection on including part of your sources in Clover?

I just have to do
1. Choose a framebuffer. Already done.
2. Find a connection table in the kext. Just rewrite procedures from Perl into C.
3. Choose an order of connectors. May be let user to write it into config,plist
4. Took senseid from ATOMBIOS as radeon-bios-decode does.
5. Write this info into the kext. Already done.
That's all!
Not sure other values are significant.

#630
bcc9

bcc9

    InsanelyMac Legend

  • Coders
  • 1,278 posts
  • Gender:Male

Did you have an objection on including part of your sources in Clover?

That would be fine, it's all based off of open source in the first place. However I still think a general purpose auto-patch script would be nice rather than a solution that is tied to just 1 bootloader (most of us users still use chameleon after all).

Another problem is that my perl script parses the assembly code output from otool on the fly, so you would have to do something different with clover for determining the connector tables. Such as statically pre-determining what the tables look like, and building that into clover.

#631
bcc9

bcc9

    InsanelyMac Legend

  • Coders
  • 1,278 posts
  • Gender:Male

1. Why is the dumper not able to find an ATOMBios signature.

radeon_bios_decode does find the signature in all my test cases. If it is not for you, I suspect you are not correctly inputing a valid dump to the program.

#632
Slice

Slice

    InsanelyMacaholic

  • Local Moderators
  • 2,976 posts
  • Gender:Male
  • Location:Moscow

That would be fine, it's all based off of open source in the first place. However I still think a general purpose auto-patch script would be nice rather than a solution that is tied to just 1 bootloader (most of us users still use chameleon after all).

Another problem is that my perl script parses the assembly code output from otool on the fly, so you would have to do something different with clover for determining the connector tables. Such as statically pre-determining what the tables look like, and building that into clover.

Yes, perl script is a problem to repeat so why I still didn't do this.
About Chameleon. I know it is still popular.
But see (around the discussion)
http://forge.voodoop...6/libsaio/ati.c
line:1177 is wrong.
And this is not a last mistake of ATI injection by Chameleon.

#633
bcc9

bcc9

    InsanelyMac Legend

  • Coders
  • 1,278 posts
  • Gender:Male

Yes, perl script is a problem to repeat so why I still didn't do this.
About Chameleon. I know it is still popular.
But see (around the discussion)
http://forge.voodoop...6/libsaio/ati.c
line:1177 is wrong.
And this is not a last mistake of ATI injection by Chameleon.

If you're aware of some important outstanding bug with chameleon, I'm sure you could get it fixed if you brought it to their attention. I've had good luck getting attention for fixes when I've had something important to address (like the MSR flex ratio bug).

In any case, I'm not sure what your argument is. Chameleon is a somewhat complex project, and yes the code is often not well commented and the code contains many conflicting coding styles.... Like any evolving sw project, there are outstanding bugs. efi-based bootloaders contain a lot more lines of code and so the number of outstanding bugs we can expect are even greater...

As for the problem at hand:
I'm still thinking it's best done via a general purpose auto-patch script. At least until we figure out what config options and mods work for most users. Care to help?

#634
Nanael

Nanael

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 165 posts
  • Gender:Male
Hey guys!

I've created this excel paper to help the creation of personalitys :)
Tell me if it helped you

Attached Files



#635
Slice

Slice

    InsanelyMacaholic

  • Local Moderators
  • 2,976 posts
  • Gender:Male
  • Location:Moscow

Hey guys!

I've created this excel paper to help the creation of personalitys :)
Tell me if it helped you

This is empty?
Attached File  Screen shot 2012-09-17 at 17.05.36.png   43.57KB   71 downloads
How did you propose to use it?


@bcc9
In your case, Chameleon+script you get patched kext (and cache next time) until System Update. Then you have to do the patch again, and create kernelcache again.
In my case I wrote the patched connectors in config.plist and it works independent on updates.
Nonetheless we have the common purpose to find a better way to patch connectors.
My experience
GA AMD Radeon HD6670 (10.8.1)
Pithecia
		04 00 00 00 1402 00 00 00 01 00 00 00 00 04 06
		00 04 00 00 0403 00 00 00 01 00 00 21 03 02 03
		10 00 00 00 1000 00 00 00 01 00 00 00 00 00 01
Ipomoea
  04 00 00 00  04 03 00 00  00 01  00 00  10  00  01  06
  10 00 00 00  10 00 00 00  00 01  00 00  00  00  00  01
  00 08 00 00  04 02 00 00  00 01  00 00  12  04  04  03
See! They are different but both are working.
Transmitters - no matter.
Flags - no matter.
Encoders - it is better to set zero.
Exchange 2 and 3 - no matter. In both cases I can boot with VGA connected display. As well as I can boot with my main DVI monitor.

VTX vendor AMD Radeon HD5570
Baboon (10.7.2)
04 00 00 00 14 00 00 00 00 01 00 00 01 00 01 04
00 08 00 00 00 02 00 00 00 71 00 00 22 00 02 05
10 00 00 00 10 00 00 00 00 01 00 00 00 00 00 02
so here I just decided to set senseid only and zero encoders. Other digits are native.
It works! Main display is VGA connected monitor.

PS. I also want to say that in both cases I can enter desktop without GraphicsInjector (native framebuffer) but DVDPlayer crashing.
Without the Connectors Patch I can't enter desktop with any monitor.
6670 - black screen (system works)
5570 - empty desktop with galaxy. All info out of the desktop.
And with this Connector Patch I have full success.

#636
Nanael

Nanael

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 165 posts
  • Gender:Male
@slice
just have a look on the orange cell ;)
i join the edit one for my hd6870 ;)

On each orange cell you have a list and it change automaticaly with what you put befor ;)

You can contact me via PM if you want ;)

Attached Files



#637
kizwan

kizwan

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 1,422 posts
Hi bcc9,

My ATI 4570 (mobility) works in Lion but the whole system hang when running Chess (opengl problem??). I want to try Mountain Lion but do you think the Lion problem will be inherited in ML too? I'm still figuring out whether buying ML will be worth it. I don't have other computer I want to hackintosh. I have X79 desktop computer but CPU is not supported, so I don't want to use ML on that. Thanks.

#638
Za0oO

Za0oO

    InsanelyMac Protégé

  • Members
  • Pip
  • 4 posts
Hello, i would need more help... i got a Gateway NV5909h laptop with a radeon mobility 5650, and i can't boot my Mountain Lion 10.8 using GraphicsEnabler=Yes. All i get is a black screen.

I tried editing the manual override with the following.

DisplayVendorID-756e6b6e/DisplayProductID-717

Here is my Display file as follow :


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com...yList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DisplayProductID</key>
<integer>1815</integer>
<key>DisplayProductName</key>
<string>Color LCD</string>
<key>DisplayVendorID</key>
<integer>1970170734</integer>
<key>IODisplayEDID</key>
<data>
AP///////wBMo0FBAAAAAAATAQOAIhN4Co2lnVtVnCYZUFQAAAABAQEBAQEBAQEBAQEB
AQEBQRxWoFAAFjAwICUAWMEQAAAZAAAADwAAAAAAAAAAAB60AnQAAAAA/gBTQU1TVU5H
CiAgICAgAAAA/gAxNTZBVDAyLUEwNAogAO8=
</data>
</dict>
</plist>

everything seems OK, i get a black screen at boot using GraphicsEnabler=Yes, if i plug an HDMI connector, i get the screen and my radeon card is detected..... i think i can't get my LVDS to work

I dumped the VBIOS.DMP using AIA64. I am stuck right now... is there any way somebody can edit my Ati5000Controller.Kext

Here is my EDID, my VBIOS attached. Thanks !

Attached Files



#639
Kasi99

Kasi99

    InsanelyMac Protégé

  • Members
  • PipPip
  • 50 posts

hello

maybe somebody can help me to accomplish my targets.
my english is verry bad, and the instructionguide is to diffecult to understand for me cause it`s all in english !!
maybe sombody of you is speaking german !! it would be much easier for me !!

my problem is: i don`t get any picture on my internal lcd of my notebook. i always get a blackscreen with graphicsenabler=yes

at vga everthing ist allright !




the following steps i have allready done:


-device id´s added in kext


-LCD force edid in the DisplayProductID-717 enscribed




every framebuffer in the org.chameleon.Boot.plist tried with and without GraphicsEnabler

i still need help !! and i think i`m at the right place to get support !! sooo please help me !!!!

Attached Files



#640
plsh2me

plsh2me

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 179 posts
  • Gender:Male
  • Location:Bangladesh
Hi, I have patched my graphics succesfully with shrike personality and it using open GL settings of ATI 4670.
Attached File  display.jpg   140.4KB   34 downloads

My question is - Is the graphics card 4670 supports HDMI?, if so what is the HDMI ID. (as 5xxx series has 1002_aa50) of ATI 4670/46xx series?





0 user(s) are reading this topic

0 members, 0 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