Turn a "new" Sapphire RX580 PULSE into the "Mac Edition" card

Discussion in 'Mac Pro' started by h9826790, Jan 19, 2018.

  1. h9826790, Jan 19, 2018
    Last edited: Jan 23, 2018

    h9826790 macrumors G3

    h9826790

    Joined:
    Apr 3, 2014
    Location:
    Hong Kong
    #1
    Forum member Teddy managed to get a Sapphire PULSE RX580 8GB card. But the part number is changed already, so, can't identify itself correctly in MacOS (technically speaking, we can't really see the part number in MacOS, but if it's "right", High Sierra should able to recognise this card. Therefore, the R9 XXX in "about this Mac" can be used as an indication that the part number is "wrong"). He showed me a post about how to "fix" it, and that guide suggest users to use the Polaris BIOS Editor to open an edited ROM, then save it again. To me, this looks like the process to fix the checksum. I never own this card, and never play around with the Polaris BIOS Editor. But Teddy showed me this warning message from the Polaris BIOS Editor.
    写真 2018-01-20 午前2 36 47.JPG
    Despite the PULSE ROM size is just 256k, it seems the Polaris BIOS Editor may still base on the 512k size assumption to apply the checksum fix. Which may eventually apply the fix on an important byte and causing error. More than one users reported that, the card "fixed" in this way will only shows back screen once driver is loaded (in Windows), or all the way black screen (in MacOS).

    So, I worked with him to correctly fix the card. The following records what we did. I use macOS calculator and Hexminer (Mac apps) to assist him because I work with him via the internet, and I am in MacOS. In fact, the whole process can be done within Windows. No need to boot back to MacOS until everything is done. All you need is

    1) ATIWinFlash.exe
    2) Any Hex calculator
    3) Any Hex Editor

    I am quite sure the whole process can also be done in DOS or Linux, but I don't know how to do it. So, the following procedures are all base on Windows. You can do that in a PC, or Bootcamp Windows on the Mac Pro (and NO, this cannot be done within Parallel Windows, or any virtual machine).

    He sent me the original dumped ROM (by using ATIWinFlash in Windows. GPU-Z can also be used to dump the ROM), I open it (with HexMiner, but any hex editor can do the job), and obviously the part number is not the one that same as the Apple developer kit. (N.B. Before you do anything to the ROM image, backup your original dumped ROM at least twice, and only edit the copy of copy, NEVER edit the original ROM image backup. We should ALWAYS keep a MASTER BACKUP.)
    Screen Shot 2018-01-20 at 03.56.04.jpg
    So, we apply the "part number fix", change it to 113-4E353BU-O4E (N.B. Make sure you UPDATE / REPLACE the required byte, NOT add / insert some new bytes) (113-4E3531U-O4V should also work, but we never test it)
    Screen Shot 2018-01-20 at 03.59.05.jpg
    The work is fairly easy, only 5 bytes need to be changed in this case.
    Screen Shot 2018-01-20 at 04.00.32.jpg
    However, after this "part number fix", the checksum of ROM may be wrong (and 99.99% of time, it is wrong). So, we need to fix that as well. Since we know the Polaris BIOS Editor will cause issue, we use a more complicated but safer way to manually fix it.

    First, we need a hex calculator to workout the checksum difference. This is easy, macOS already included a calculator, and can be switch to hex mode. In this case, the 5 bytes changed as follow (all numbers are in Hexadecimal).
    31 -> 34
    38 -> 35
    37 -> 33
    30 -> 42
    42 -> 45

    If we put all the new numbers in the Hex calculator, 34+35+33+42+45 = 123
    Screen Shot 2018-01-20 at 04.11.33.jpg
    And then minus all the old numbers, 123 - 31 - 38 - 37 - 30 - 42 = 11
    Screen Shot 2018-01-20 at 04.11.47.jpg
    That means, we need to find a useless byte and make it 11 smaller than the original number. A very standard way to do that is to find the very large piece of FF, which located at the end of the ROM, and change one of them from FF to EE (FF - 11 = EE from the Hex calculator). An example is like this.
    Screen Shot 2018-01-20 at 04.15.46.jpg
    I am not familiar with the ROM, and simply avoid to change the very last few bytes, just in case it's used to define the end of the ROM. However, this is just an example. We did NOT correct the checksum in this "standard" way. And this ROM is never tested at the end. (update: leVel tested this method on his Nitro+, and doesn’t work. So please avoid this method until further update)

    We choose another way to fix the checksum. Since the overall difference is just 11, it's very easy to mod some other useless info to match the requirement. In Hex, 11 means 9+8, coincidentally, there is a 9 and a 8 in the ROM which is very obvious not belongs to any card's setting. Screen Shot 2018-01-20 at 04.21.01.jpg
    So, we pick this number, changed both the 9 and 8 to 0. (the relative bytes change from 39 and 38 to 30, overall difference is -11).
    Screen Shot 2018-01-20 at 04.26.26.jpg
    So, up to this stage, all the "preparation" is done. We can now save this edited ROM image to another new ROM file (NOT to overwrite the original one).

    Of course, in general, no one will apply checksum fix in this way. However, this looks extremely safe, because we believe this 1998 is completely a "for info" item in that ROM image. It should be safer than pick a random FF to apply the correction. So we go ahead, and use ATIWinFlash to flash the edited ROM back to the card (This process can take a minute or two. The computer may stop responding, the progress bar may stop moving, do NOT touch anything! Just wait and let it do the job). End result? A big success.
    Screen Shot 2018-01-23 at 23.44.31.jpg

    Thanks Teddy for providing his card, ROM, and time for me to test the "fix". And if anyone want to try this "part number fix" on the new Sapphire PULSE RX580 8GB card, please AVOID the Polaris BIOS Editor.

    If there is ANY error during / after flash, do NOT restart, but flash your MASTER BACKUP ORIGINAL ROM image back in. Then dump it out again to double check if it's the same as the MASTER BACKUP (You may simply check the modded bytes by yourself, or use some software to compare them automatically). I didn't use the ATIWinFlash for a while already. I am not 100% sure, but from memory, if the checksum is wrong, it should refuse to flash the ROM onto the card. So, as long as the software take it, the ROM should be OK.

    If you only even edit the part number, some useless info, or that large piece of FF. Even you did something wrong, the card should still work, but just still shows R9 XXX in High Sierra. If this happened, I suggest you also flash the MASTER BACKUP ROM image back to the card. Then start everything from the beginning again.

    Of course, please feel free to post any questions (or share your work) at here. I prefer to discuss at here rather than PM. Therefore, everything can benefit from the discussion.
     
  2. leVel macrumors regular

    Joined:
    Jul 24, 2008
    #2
    Amazing work. Will try flashing my NITRO+ 8GB with this method over the weekend.
     
  3. h9826790, Jan 19, 2018
    Last edited: Jan 20, 2018

    h9826790 thread starter macrumors G3

    h9826790

    Joined:
    Apr 3, 2014
    Location:
    Hong Kong
    #3
    It should be much easier to work with the Nitro+ because of its dual ROM design, much much less pressure on worrying about if the hex edit screw up the ROM.

    If possible, can you try to fix the checksum by altering the FF which picked in the sample? (of course, only if you need to pick a byte to reduce it. If the checksum fix require you to increase a byte, you can't do that with a FF byte)

    I just want to collect more evidence that byte change should not brick the single ROM PULSE 580. Therefore, make the checksum fix easier (or more standard) for other members. In your case, it can't brick the Nitro+, because you can always boot from the other ROM. And obvious this FF is not an important parameter (e.g. not a voltage setting that may cause permanent damage).
     
  4. krakman macrumors member

    Joined:
    Dec 3, 2009
    #4
    wow thats fantastic news, do you think the same could be done to RX Vega cards?
     
  5. Teddy Leung macrumors newbie

    Teddy Leung

    Joined:
    Jun 12, 2015
    Location:
    Hong Kong
    #5
    Thanks h9826790 ! Let my RX 580 perfect on OS X now ! Nice and professional man :cool:
     
  6. Teddy Leung macrumors newbie

    Teddy Leung

    Joined:
    Jun 12, 2015
    Location:
    Hong Kong
    #6
    I think yes ! But another problem is power input for graphic card.

    PS : Vega 56 is my first choice before RX 580. I don’t know how to mod power supply for my cMP, so bought RX 580 finally. Compare my old card 7950 Mac edition, very nice in RX 580 now.
     
  7. orph macrumors 65816

    Joined:
    Dec 12, 2005
    Location:
    UK
    #7
    super nice, just wish they where not £430 on amazon at the mo :mad:
    one day we will need a ATI sticky for GPU's to keep links alive to posts.
     
  8. Teddy Leung macrumors newbie

    Teddy Leung

    Joined:
    Jun 12, 2015
    Location:
    Hong Kong
    #8
    Price crazy high this moment....
     
  9. Fl0r!an macrumors 6502a

    Joined:
    Aug 14, 2007
    #9
    Definitely not. This modification just makes macOS think that you're running the "eGPU Edition" RX 580 in your Mac, enabling some specific initialisations. It will not enable boot screens or anything like that and it will not work on any other GPU than RX 580.
     
  10. eksu macrumors member

    Joined:
    Aug 3, 2017
    #10
    off topic but, what hex editor are you using?
     
  11. leVel macrumors regular

    Joined:
    Jul 24, 2008
    #11

    turns out i'm pretty terrible with the hex calculator and wasn't able to get a working rom using your methods. i've attached a link to my original bios for my GPU. if you edit it using both methods I would be more than happy to try them and report back..

    https://www.dropbox.com/s/rubrmspe1874q1p/SAPPHIRE-RX580-NITRO-ORIGINAL-BIOS?dl=0
     
  12. jhero macrumors 6502

    jhero

    Joined:
    Jan 10, 2005
    Location:
    Not near an Apple Store
    #12
    A fantastic tutorial h9826790! With my 580 Pulse I had a difference of 30 instead of 11.

    And so I changed the same "1988" to "1008", and the "2010," to "2000 ". Flashed to the card and everything seems OK but is this an OK change as well?

    Thanks!
     

    Attached Files:

  13. h9826790, Jan 21, 2018
    Last edited: Jan 21, 2018

    h9826790 thread starter macrumors G3

    h9826790

    Joined:
    Apr 3, 2014
    Location:
    Hong Kong
    #13
    May I know what's your original part number? I need to know if your calculation is correct. Thanks!

    Anyway, from your PM, I know your "30" actually means 1E (hex). So, if the calculated checksum difference is correct. I believe your mod is good.

    If the checksum is wrong, I believe you can't flash it back to the ROM (via the normal way). Therefore, if you already done the flashing, the mod should be correct.

    And also now your card is running, that a good sign everything work as expected. Anyway, did you check if your card is identify properly in "About This Mac"?
    --- Post Merged, Jan 21, 2018 ---
    I believe that I downloaded it from the AppStore, but now seems off the shelf already. I google it, and found that still available in other way.

    https://en.freedownloadmanager.org/Mac-OS/HexMiner-FREE.html
    --- Post Merged, Jan 21, 2018 ---
    I have checked it already, may I know what's your calculated checksum difference? And how you fix it?
     
  14. jhero, Jan 21, 2018
    Last edited: Jan 22, 2018

    jhero macrumors 6502

    jhero

    Joined:
    Jan 10, 2005
    Location:
    Not near an Apple Store
    #14
    Indeed the card lived after flashing and rebooting back into OS X. It is correctly being identified in About Mac as Radeon RX 580 8 GB.

    The original part number is 113-1E3870U-O45 (close to your P/N).
     
  15. Squuiid, Jan 22, 2018
    Last edited: Jan 22, 2018

    Squuiid macrumors 65816

    Squuiid

    Joined:
    Oct 31, 2006
    #15
    h9826790, thanks for this. VERY helpful. Given that this is more or less a wiki post, is there any chance you could add a bit more info on what utility to use to flash the card with and how to go about it?

    Can you dump and flash in Mac OS or just Windows?

    Is there a way of determining the original part number from Mac OS or do you need to head over to Windows to dump the ROM or use GPU-Z to find it?

    Thanks.
     
  16. h9826790 thread starter macrumors G3

    h9826790

    Joined:
    Apr 3, 2014
    Location:
    Hong Kong
    #16
    Thanks for the suggestion, will update the original post accordingly.
     
  17. Squuiid macrumors 65816

    Squuiid

    Joined:
    Oct 31, 2006
    #17
    Thanks so much!
    After having bought 2 cards with the 'good' part numbers my 3rd from Amazon has a new one :(

    IMG_0201.jpg
     
  18. TheStork macrumors regular

    TheStork

    Joined:
    Dec 28, 2008
    #18
    It appears that several images are not showing up in the original post, as seen by the "[IMG']" tag.
     
  19. leVel, Jan 22, 2018
    Last edited: Jan 22, 2018

    leVel macrumors regular

    Joined:
    Jul 24, 2008
    #19
    GPU: Sapphire RX 580 Nitro+ 8GB
    Part Number (Original): 113-1E3660U-O51

    Here is my work....

    Original Bios:

    [​IMG]

    Overwrite 113-1E3660U-O51 with new P/N 113-4E353BU-O4E

    [​IMG]


    Changed bits:

    [​IMG]


    31 31 33 2D 31 45 33 36 36 30 55 2D 4F 35 31 <-- Original
    31 31 33 2D 34 45 33 35 33 42 55 2D 4F 34 45 <-- Updated

    31 -> 34
    36 -> 35
    36 -> 33
    30 -> 42
    35 -> 34
    31 -> 45

    New numbers added: 34+35+33+42+34+45 = 157

    Old numbers subtracted: 157-31-36-36-30-35-31 = 24

    So, 24 bits have been added...

    Now lets adjust the bios to remove 24 bits.... Using the hex calculator: FF-24=DB

    So towards the end of the bios replace an FF bit with a DB bit.

    Before:

    [​IMG]


    After:

    [​IMG]



    Saving this updated bios to a new file and flashing it to my GPU with ATIWinFlash gives me errors....

    I'd like to try the other method suggested, by changing the year... However I am not sure how to properly change "1988-2010" to remove 24 bits..

    Any help?
     
  20. h9826790 thread starter macrumors G3

    h9826790

    Joined:
    Apr 3, 2014
    Location:
    Hong Kong
    #20
    I can't spot any error as well.

    If you want to try the "year" method. jhero's fix actually change the "," after the 2010 as well. Therefore, for 24.

    31 39 38 38 2D 32 30 31 30 2C (1998-2010,) can be changed to
    31 30 30 31 2D 32 30 31 30 20 (1001-2010 )

    This will also reduce the overall checksum by 24.
     
  21. leVel macrumors regular

    Joined:
    Jul 24, 2008
    #21

    Thanks, will give this a shot later.

    Would it be better to change the numbers in the timestamp towards the top instead of removing the ","?

    [​IMG]
     
  22. MisterAndrew macrumors 6502a

    MisterAndrew

    Joined:
    Sep 15, 2015
    Location:
    Portland, Oregon
    #22
    It's too bad they changed the part number on these cards. I wonder how all this will be addressed by Apple when eGPU support officially begins this spring. I'm really hoping they'll release some Mac edition cards.
     
  23. h9826790 thread starter macrumors G3

    h9826790

    Joined:
    Apr 3, 2014
    Location:
    Hong Kong
    #23
    No sure, but since jhero already proved that "comma" (2C) can be change to "space" (20) safely. I will treat this is "known good method".

    That time stamp also looks like can be change, but it's a "unknown method" at this moment. Of course, it will be great if you can test it.

    Anyway, after you edit the ROM, just before you flash it, can you double check if your ROM image is still 262,144 bytes? I am still thinking why your 1st try won't work (except you may pick the wrong FF).
     
  24. Lucas Godfrey macrumors 6502

    Lucas Godfrey

    Joined:
    Jul 12, 2010
    Location:
    Somewhere between Here and There
    #24
    A lot of this goes right over my head, but bottom line, will this give you boot screens or just get the card recognised and working?
     
  25. Synchro3 macrumors 68000

    Synchro3

    Joined:
    Jan 12, 2014
    #25
    It's only cosmetical. I have no problems with my 'new' Sapphire RX 580 8GB, even sleep works.
     

Share This Page