Posted 30 July 2012 - 10:38 PM

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).

Posted 04 August 2012 - 08:45 PM

Posted 11 August 2012 - 09:19 AM

Slice

InsanelyMacaholic

Local Moderators

3,741 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.

To get VBios I made an addition in Clover.Start with Clover rev579 up to GUI. Press F6 and get EFI/misc/c0000.binThis 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.

Posted 12 August 2012 - 09:09 PM

bcc9

InsanelyMac Legend

Coders

1,282 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

Posted 12 August 2012 - 09:46 PM

redsockosx

InsanelyMac Protégé

Members

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.

Posted 13 August 2012 - 02:49 AM

bcc9

InsanelyMac Legend

Coders

1,282 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.

Posted 22 August 2012 - 03:02 PM

chappatti

InsanelyMac Protégé

Members

17 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.

Posted 24 August 2012 - 08:16 PM

Posted 27 August 2012 - 01:54 PM

Slice

InsanelyMacaholic

Local Moderators

3,741 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.

Posted 31 August 2012 - 07:02 PM

bcc9

InsanelyMac Legend

Coders

1,282 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.

Posted 06 September 2012 - 08:53 PM

Slice

InsanelyMacaholic

Local Moderators

3,741 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.cline:1177 is wrong.And this is not a last mistake of ATI injection by Chameleon.

Posted 13 September 2012 - 06:49 AM

bcc9

InsanelyMac Legend

Coders

1,282 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.cline: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?

@bcc9In 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 experienceGA AMD Radeon HD6670 (10.8.1)Pithecia

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.

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.

Attached Files

Posted 02 October 2012 - 01:27 AM

kizwan

InsanelyMac Legend

Members

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.

Attached Files

Posted 14 October 2012 - 06:49 PM

Kasi99

InsanelyMac Protégé

Members

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