Hi everyone,
Since reading up on some open source framebuffer drivers / injectors for hackintoshes (e.g. Callisto, ATY_init), I've been wondering about the possibility of porting those to PowerPC. While I haven't been able to find the source code for Callisto or ATY_init (@netkas might have the latter), I've come across Dong Luo's excellent work on a framebuffer driver for Radeon HD 2xxx-4xxx cards ported from the linux RadeonHD driver, with source code available (osx86-driver-radeonhd):
After simply editing OS_Version.h to use the 10.5 IOKit and setting the target architectures properly in the project properties (so far I've only had luck with ppc and i386), I have had some success compiling to powerpc in Xcode 3.1.4 under 10.5.8 (on a G5 Quad), however only using llvm-gcc. I am getting some missing symbols using gcc, I am probably missing some things in OSBundleLibraries for the latter.
Somehow, after compiling with llvm-gcc, at first the kext won't load even after removing S/L/Extensions.mkext, S/L/Extensions/Caches S/L/Caches and rebooting multiple times (kextload -t shows overflow errors). However, after rebooting into another OS (10.6 ppc in my case) and subsequently rebooting into 10.5.8, the RadeonHD extension then loads properly, and RadeonHD cards are correctly detected, but I have yet to get them to display anything.
Both my stock PCIe Radeon HD 4650 and 4870 (PC versions) cards do get recognised under 10.5.8 ppc, with display nubs created, however so far only with a black screen. Their fans, which normally rev up slightly as linux loads (under which they work flawlessly) as activity increases, do not rev up at all. Adding EDIDs to Info.plist (either as base64 or hex) does seem to go slightly further in that displays are shown as connected to the cards, but only in debug mode. The amount of VRAM seems wrong though both using the 4650 (512Mb) or 4870 (1Gb). Both cards are supported as per knownCardList.txt and rhd_id.c. The second last System Profiler screenshot with the 4800 series (actually HD4870) shows what happens when debugMode is set to false. Same result with the HD4650. The display nubs are there, but with nothing seemingly attached to them. The very last System Profiler screenshot is using my HD5770, which, although being detected as display, clearly doesn't seem supported.
I've tried fiddling around with various options, e.g. setting BackLightLevel to 0, enableBacklight to false, @0,UseFixedModes, to true or specifiying @0,TYPE to DACA but no avail. I haven't tried changing forceSwitchCrtc to true yet though, will give it a try. I don't know if getting it to work is just a matter of options in the plist or if deeper issues need to be resolved in Xcode.
Building as debug or release seems to have the exact same effects.
I also haven't compiled RadeonDump to ppc yet to get some proper troubleshooting / logging, but will do as soon as I get a chance. dmesg / verbose boot do show "RadeonHD: creating nubs".
There are several files in the project trunk that are not in the Xcode project that might be needed for hardware support on ppc, notably xf86/Pci.c xf86/Pci.h that seem to have dedicated ppc methods, maybe this is what is missing (notably how the ROM is accessed, as it will be little-endian) ? However trying to include those creates a massive dependency problem, requiring most of the X11/XF86 source code for mac which I don't have (several X11 include files are present in the Developer folder but several other required e.g. Compiler.h are missing).
On the other hand, on the insanelymac forum on the kext, it seems that someone may have made a universal version (however not tested on powerpc) but all versions posted on the forum are intel, would by any chance anyone have this?
Or if anyone knows what I might be missing, even though I found these baby steps already encouraging? Or reckons that this has any chance of ever working (or not due to endianness issues that would entail significant rewriting)?
Cheers,
PS: I will post the ppc kext later on today if anyone wants to try it
EDIT: from what I understand, osx86-driver-radeonhd works independently of ATIX2000.kext (anyway not available for ppc, if only <sigh>) and will still result in a useable framebuffer driver in its absence
EDIT2: from what I also understand, under ppc linux, the modern radeon driver will soft-load ROM code with endianness taken into account for correct operation. I don't know if the present driver implements any of this
EDIT3: further to point 2 I have only tried the AtomBIOS version of the driver
Since reading up on some open source framebuffer drivers / injectors for hackintoshes (e.g. Callisto, ATY_init), I've been wondering about the possibility of porting those to PowerPC. While I haven't been able to find the source code for Callisto or ATY_init (@netkas might have the latter), I've come across Dong Luo's excellent work on a framebuffer driver for Radeon HD 2xxx-4xxx cards ported from the linux RadeonHD driver, with source code available (osx86-driver-radeonhd):
ATI HD framebuffer driver (10.5/10.6) with source code
Put it into /S/L/E/ and rebuild the cache to test. It will not affect vanilla driver. Any injector will prevent this driver from loading since it works the same way as IONDRVSupport. [FAQ:] 1. get a blank or dark screen after boot, or the screen keep flashing In RadeonHD.kext/Contents/Info.plist,...
www.insanelymac.com
After simply editing OS_Version.h to use the 10.5 IOKit and setting the target architectures properly in the project properties (so far I've only had luck with ppc and i386), I have had some success compiling to powerpc in Xcode 3.1.4 under 10.5.8 (on a G5 Quad), however only using llvm-gcc. I am getting some missing symbols using gcc, I am probably missing some things in OSBundleLibraries for the latter.
Somehow, after compiling with llvm-gcc, at first the kext won't load even after removing S/L/Extensions.mkext, S/L/Extensions/Caches S/L/Caches and rebooting multiple times (kextload -t shows overflow errors). However, after rebooting into another OS (10.6 ppc in my case) and subsequently rebooting into 10.5.8, the RadeonHD extension then loads properly, and RadeonHD cards are correctly detected, but I have yet to get them to display anything.
Both my stock PCIe Radeon HD 4650 and 4870 (PC versions) cards do get recognised under 10.5.8 ppc, with display nubs created, however so far only with a black screen. Their fans, which normally rev up slightly as linux loads (under which they work flawlessly) as activity increases, do not rev up at all. Adding EDIDs to Info.plist (either as base64 or hex) does seem to go slightly further in that displays are shown as connected to the cards, but only in debug mode. The amount of VRAM seems wrong though both using the 4650 (512Mb) or 4870 (1Gb). Both cards are supported as per knownCardList.txt and rhd_id.c. The second last System Profiler screenshot with the 4800 series (actually HD4870) shows what happens when debugMode is set to false. Same result with the HD4650. The display nubs are there, but with nothing seemingly attached to them. The very last System Profiler screenshot is using my HD5770, which, although being detected as display, clearly doesn't seem supported.
I've tried fiddling around with various options, e.g. setting BackLightLevel to 0, enableBacklight to false, @0,UseFixedModes, to true or specifiying @0,TYPE to DACA but no avail. I haven't tried changing forceSwitchCrtc to true yet though, will give it a try. I don't know if getting it to work is just a matter of options in the plist or if deeper issues need to be resolved in Xcode.
Building as debug or release seems to have the exact same effects.
I also haven't compiled RadeonDump to ppc yet to get some proper troubleshooting / logging, but will do as soon as I get a chance. dmesg / verbose boot do show "RadeonHD: creating nubs".
There are several files in the project trunk that are not in the Xcode project that might be needed for hardware support on ppc, notably xf86/Pci.c xf86/Pci.h that seem to have dedicated ppc methods, maybe this is what is missing (notably how the ROM is accessed, as it will be little-endian) ? However trying to include those creates a massive dependency problem, requiring most of the X11/XF86 source code for mac which I don't have (several X11 include files are present in the Developer folder but several other required e.g. Compiler.h are missing).
On the other hand, on the insanelymac forum on the kext, it seems that someone may have made a universal version (however not tested on powerpc) but all versions posted on the forum are intel, would by any chance anyone have this?
ATI HD framebuffer driver (10.5/10.6) with source code
www.insanelymac.com
Or if anyone knows what I might be missing, even though I found these baby steps already encouraging? Or reckons that this has any chance of ever working (or not due to endianness issues that would entail significant rewriting)?
Cheers,
PS: I will post the ppc kext later on today if anyone wants to try it
EDIT: from what I understand, osx86-driver-radeonhd works independently of ATIX2000.kext (anyway not available for ppc, if only <sigh>) and will still result in a useable framebuffer driver in its absence
EDIT2: from what I also understand, under ppc linux, the modern radeon driver will soft-load ROM code with endianness taken into account for correct operation. I don't know if the present driver implements any of this
EDIT3: further to point 2 I have only tried the AtomBIOS version of the driver
Last edited: