BlackCH Posted May 13, 2023 Share Posted May 13, 2023 (edited) Probably this is one of best price-performance deals to have a macos supported card for a hackintosh or even an old MacPro. Is likely many of you are aware of these chinese RX 580 2048sp 8Gb cards from Aliexpress. They come cheap. I Paid about 70€ for mine shipped to Spain (included VAT too). The problem with these cards is that they do not work with macos at all. Even if you spoof the device ID through the bootloader you dont get accleration. A widely known fix for this is to flash a RX570 BIOS on it but unless you find a BIOS that matches closely the physical outputs on your card you will end up with no video output. After trying a few BIOSes without success I decided the best aproach was to edit the original bios that came with the card, as it would contain the correct port configuration, memory timings, etc. As it happens, we just need to change a few values to get the card recognized as a RX 570. On my quest I came upon this thread that explain the RX470/480 conversion:https://www.overclock.net/threads/bios-mod-rx480-rx580-conversions-how-to-rx470-rx480-rx570-rx580.1634872/ See post nr 3, where they explain how to edit a 4 byte string at offset 0xD4. For each RX model the string is different: 470: F0 7D C6 0F 480: F0 7D C6 07 570: F0 7D E6 0F 580: F0 7D E6 07 590: F0 7D E6 01 What I did was backup the bios that came with my chinese 580 2048SP, open the binary on a hex editor and look at offset 0xD4. Got this value: F0 FD E6 0F Which is none of the above, as you can see. I proceeded to replace the string with the one for the 570: F0 FD E6 0F >>> F0 7D E6 0F Following this I edited the device ID value. The original dev ID on the card was 6FDF and it needed to be changed to 67DF. So, we look for this string: 02 10 DF 6F And replace it with: 02 10 DF 67 In my case there were only two occurrences of this in the whole binary. After the modifications the BIOS CRC needs to be fixed. For that we need to open the modified bios with Polaris BIOS Editor utility. Upon open the file, it will complain the CRC in wrong tell you need to save the file to fix it. Just save it and that's it. Flashed the resulting binary into the card and its now running 100% with macOS! I still need test it in everyday use but got about 44k in Geekbench 5 metal test and full GUI acceleration as far as I can tell, and multiple screens too! Notice that Im using a CH341a programmer with clips attached directly to the BIOS chip. You could use any of the available Radeon flash utilities but I find a "hard" programmer much more convenient. I believe this could be a solution to get most of the RX580 2048SP cards out there working under macOS. Cheers! It would be advisable to check the actual ASIC model in the board, as this is probably relevant when replacing the hex string located a offset 0xD4. These GPUs from AliExpress ship with different ASIC chips and might be a good idea to modify the BIOS in accordance. The model number is etched in the metal frame around the actual GPU chip (so you would have to remove the heatsink to see it): 215-0876204 (RX 470) >>>> F0 7D C6 0F 215-0876406 (RX470 Mining) >>>> F0 7D C6 0F 215-0876184 (RX480) >>>> F0 7D C6 07 215-0910052 (RX570) >>>> F0 7D E6 0F 215-0910038 (RX580) >>>> F0 7D E6 07 Edited May 18, 2023 by BlackCH 7 2 Link to comment Share on other sites More sharing options...
jalavoui Posted May 21, 2023 Share Posted May 21, 2023 (edited) can you upload your modded bios here? maybe others can inject it in opencore using ATY,bin_image you can load the legacy part of bios if you need (strip 64k and fix checksum) but oc can load legacy+uefi bios also - it works fine +amdxxxcontroller/acelerator validates bios size (legacy 0x10000) but the kexts can be patched if need this is where the legacy part ends and gop begins cut it and fill with FF till bios size is 0x10000 (65536=64k) then edit and fix checksum to load in clover - copy/paste the hex code as in this picture note that the uefi part is probably not used directly by mac os x as its loaded by the uefi bios at computer boot opencore legacy as something related to gop loading (macs mostly) if you use a driver without framebufer personalitys and you got luck the driver will detect the connectors and it will work no framebufer personalitys sample a good aproach is not use the stock bios (the one you extract from bios update) and goto linux and dump it atomtool.py Edited June 11, 2023 by jalavoui Link to comment Share on other sites More sharing options...
BlackCH Posted May 28, 2023 Author Share Posted May 28, 2023 (edited) On 5/22/2023 at 1:02 AM, jalavoui said: can you upload your modded bios here? maybe others can inject it in opencore using ATY,bin_image The particular BIOS of my card wont be of any good except for cards with the exact same physical output configuration, memory brand and timings. Most likely you wont get any video output if the card is not the same (or very similar) to mine. Also, in my opinion, would be wise to lift the heatsink and check the ASIC model on the card and apply the BIOS patch accordingly. Even when bought from the same vendor/brand cards might come with different ASIC model, so the patch should change slightly depending on this. The main reason of the procedure outlined in post #1 is to use the stock BIOS that comes with each card, which will contain the right memory timings and output configuration, and do just the necessary modification to get the macos driver loading correctly. You will be better of by dumping your card BIOS, modify it and try loading it through opencore. Although I understand Opencore can only load 64k of BIOS data whereas these cards uses 256/512k BIOSes. So, you need to load the first 65536 bytes of your binary (never tryed this so I dont know if it works). Here are my files, but again, is very likely you will end up with a black screen if your card is not the same: Archive.zip GPU model: SJS RX580 2048SP ASIC: 215-0910052 Memory: 8Gb (Micron) Video Outputs: DVI, DP, HDMI https://es.aliexpress.com/item/1005005046377456.html?spm=a2g0o.productlist.main.3.55b05LmI5LmIeN&algo_pvid=6d0e3cea-2d0a-493e-b347-57fd33dd5f37&algo_exp_id=6d0e3cea-2d0a-493e-b347-57fd33dd5f37-1&pdp_npi=3%40dis!EUR!119.67!75.39!!!!!%402100ba4716852746769087585d074c!12000031440977423!sea!ES!192365147&curPageLogUid=NgKUApySNPBX Edited May 28, 2023 by BlackCH Link to comment Share on other sites More sharing options...
BlackCH Posted May 29, 2023 Author Share Posted May 29, 2023 (edited) On 5/22/2023 at 1:02 AM, jalavoui said: you can load the legacy part of bios if you need (strip 64k and fix checksum) but oc can load legacy+uefi bios also - it works fine I had the chance to try the BIOS injection and it does not work for me. I can see the injected data in the IOReg but still no kext loaded for the GPU. Maybe Im doing something wrong. Flashing the card with the modded BIOS works perfectly though Edited June 3, 2023 by BlackCH Link to comment Share on other sites More sharing options...
BlackCH Posted May 29, 2023 Author Share Posted May 29, 2023 On 5/22/2023 at 1:02 AM, jalavoui said: this is where the legacy part ends and gop begins cut it and fill with FF till bios size is 0x10000 (65536=64k) then edit and fix checksum Yes, that is clear. What I meant to ask is how do you load legacy+uefi bios with opencore Link to comment Share on other sites More sharing options...
gemini44 Posted February 1 Share Posted February 1 Hello @BlackCH. First of all, thank you for your efforts. I also have an RX 580 8 GB 2048 (Mllse, from aliexpress) Chinese graphics. I did not run this card on Ventura either (Just only shows 31MB). I saw your title, but I couldn't understand how to mod the screen display bios. I am sending my bios as attachment. I would be glad if you could help. Thanks. rx580-original.rom.zip Link to comment Share on other sites More sharing options...
aliab Posted February 2 Share Posted February 2 On 5/13/2023 at 7:38 PM, BlackCH said: Probably this is one of best price-performance deals to have a macos supported card for a hackintosh or even an old MacPro. Is likely many of you are aware of these chinese RX 580 2048sp 8Gb cards from Aliexpress. They come cheap. I Paid about 70€ for mine shipped to Spain (included VAT too). The problem with these cards is that they do not work with macos at all. Even if you spoof the device ID through the bootloader you dont get accleration. A widely known fix for this is to flash a RX570 BIOS on it but unless you find a BIOS that matches closely the physical outputs on your card you will end up with no video output. After trying a few BIOSes without success I decided the best aproach was to edit the original bios that came with the card, as it would contain the correct port configuration, memory timings, etc. As it happens, we just need to change a few values to get the card recognized as a RX 570. On my quest I came upon this thread that explain the RX470/480 conversion: https://www.overclock.net/threads/bios-mod-rx480-rx580-conversions-how-to-rx470-rx480-rx570-rx580.1634872/ See post nr 3, where they explain how to edit a 4 byte string at offset 0xD4. For each RX model the string is different: 470: F0 7D C6 0F 480: F0 7D C6 07 570: F0 7D E6 0F 580: F0 7D E6 07 590: F0 7D E6 01 What I did was backup the bios that came with my chinese 580 2048SP, open the binary on a hex editor and look at offset 0xD4. Got this value: F0 FD E6 0F Which is none of the above, as you can see. I proceeded to replace the string with the one for the 570: F0 FD E6 0F >>> F0 7D E6 0F Following this I edited the device ID value. The original dev ID on the card was 6FDF and it needed to be changed to 67DF. So, we look for this string: 02 10 DF 6F And replace it with: 02 10 DF 67 In my case there were only two occurrences of this in the whole binary. After the modifications the BIOS CRC needs to be fixed. For that we need to open the modified bios with Polaris BIOS Editor utility. Upon open the file, it will complain the CRC in wrong tell you need to save the file to fix it. Just save it and that's it. Flashed the resulting binary into the card and its now running 100% with macOS! I still need test it in everyday use but got about 44k in Geekbench 5 metal test and full GUI acceleration as far as I can tell, and multiple screens too! Notice that Im using a CH341a programmer with clips attached directly to the BIOS chip. You could use any of the available Radeon flash utilities but I find a "hard" programmer much more convenient. I believe this could be a solution to get most of the RX580 2048SP cards out there working under macOS. Cheers! It would be advisable to check the actual ASIC model in the board, as this is probably relevant when replacing the hex string located a offset 0xD4. These GPUs from AliExpress ship with different ASIC chips and might be a good idea to modify the BIOS in accordance. The model number is etched in the metal frame around the actual GPU chip (so you would have to remove the heatsink to see it): 215-0876204 (RX 470) >>>> F0 7D C6 0F 215-0876406 (RX470 Mining) >>>> F0 7D C6 0F 215-0876184 (RX480) >>>> F0 7D C6 07 215-0910052 (RX570) >>>> F0 7D E6 0F 215-0910038 (RX580) >>>> F0 7D E6 07 I tried with this tutorial to modify a MLLSE RX580 - bios flash with a ch341 but it does not work black screen on reboot? Link to comment Share on other sites More sharing options...
hardcorehenry Posted February 2 Share Posted February 2 Might be helpful. Link to comment Share on other sites More sharing options...
aliab Posted February 3 Share Posted February 3 On 2/1/2024 at 5:47 AM, gemini44 said: Hello @BlackCH. First of all, thank you for your efforts. I also have an RX 580 8 GB 2048 (Mllse, from aliexpress) Chinese graphics. I did not run this card on Ventura either (Just only shows 31MB). I saw your title, but I couldn't understand how to mod the screen display bios. I am sending my bios as attachment. I would be glad if you could help. Thanks. rx580-original.rom.zip 110.61 kB · 4 downloads https://www.techpowerup.com/vgabios/208854/sapphire-rx570-8192-180123-1 working rom for MLLSE 1 1 Link to comment Share on other sites More sharing options...
gemini44 Posted February 12 Share Posted February 12 Thank you very much @aliab. Works OOB in win 10 and Ventura. 👍 Link to comment Share on other sites More sharing options...
Recommended Posts