netkas.org forum
July 30, 2014, 04:09:06 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Information for registering users http://forum.netkas.org/index.php/topic,2246.0.html
 
   Home   Help Search Login Register  
Pages: [1] 2 3 ... 23
  Print  
Author Topic: make your own radeon HD 5770/5870/6870/6850 Mac ROM!  (Read 163479 times)
jeanlain
Full Member
***
Offline Offline

Posts: 231


« on: January 02, 2011, 01:13:02 PM »

EDIT: updated 5770 EFI - should work now.
EDIT2: updated for the 6870/6850

Preamble: this is for Mac Pros only. There's not point to flash a card on a hack.
Too many people here flash their PC cards with BIOS that were originally designed for other models. This can cause wonky fan behavior or worse.
It's better to make your own ROM, that is, your card's original BIOS + Apple's EFI (ideally, EBC for compatibility with old Mac Pros).
This post shows how to do it.

Notice: the 6870/6850 ROMs are designed for 64-bit EFI Mac Pros (e.g. 2008+). Work in progress (by Netkas), so be warned.

Before you start, It's always safer to enable file and screen sharing on you Mac Pro (system prefs/sharing). Make sure OS X is up to date.

1. Back up the card's BIOS:
1a. Create a DOS volume with disk utility (it can be added to an existing partition), put the latest version of ATIflash (techpowerup.com) in the volume.
1b. Burn a FreeDOS boot CD. Download the iso (fdbasecd.iso) and burn the image with disk utility.
1c.  Save the BIOS. Shut down and insert your PC card, remove all other radeon cards (for safety). Boot the Mac on the CD (hold C key).
No need to install DOS (enter 1 at the first prompt, then 2 at the 2nd prompt). Just navigate to your ATIFlash folder (no time to explain DOS commands here).
To save your BIOS on the DOS volume, type
Code:
atiflash -s 0 myrom.rom 20000
The dir command should indicate that this rom is 128KB (131 072 B).

2. Boot on OS X (need a working card or another Mac). Place a copy of your saved rom and the files attached in this post at the root of your home directory. Keep the original myrom saved somewhere.
2a. First stage is to add the EFI section to the BIOS.
Open the terminal (utilities).
If you want to flash a 5870, paste the following
Code:
blocknum=`printf %d "'\`dd if=myrom.rom bs=1 skip=2 count=1 2>/dev/null\`"`
size=$(($blocknum * 512))
dd if=5870_uakari_netkas.efi of=myrom.rom bs=$size seek=1 conv=notrunc

If you want to flash a 5770, paste this
Code:
blocknum=`printf %d "'\`dd if=myrom.rom bs=1 skip=2 count=1 2>/dev/null\`"`
size=$(($blocknum * 512))
dd if=5770_vervet_netkas.efi of=myrom.rom bs=$size seek=1 conv=notrunc

If you want to flash a 6870, paste this
Code:
blocknum=`printf %d "'\`dd if=myrom.rom bs=1 skip=2 count=1 2>/dev/null\`"`
size=$(($blocknum * 512))
dd if=6870.efi.rom of=myrom.rom bs=$size seek=1 conv=notrunc

For a 6850, paste this
Code:
blocknum=`printf %d "'\`dd if=myrom.rom bs=1 skip=2 count=1 2>/dev/null\`"`
size=$(($blocknum * 512))
dd if=6850.efi.rom of=myrom.rom bs=$size seek=1 conv=notrunc

Then hit return.

If you have a 6870/6850, jump to step 4.

2b. Then check if the ROM could hold the EFI. Open myrom it in text edit and search "mcuc". If 2 instances are found, go to step 4.

If only one is found, you need to...
3a. Move the mcuc section (last part of the BIOS) to make room for the EFI.
At this stage you can trash the modified myrom.rom that only has one "MCuC". Open the original myrom in 0xed. Scroll down to the end, it should show a long string of "F". Select a large part of it. Cut.
Look for "mcuc" (text search field) and locate the 2nd instance, near the end of ROM. Note its offset, as indicated at the bottom of the window. It should be 1A000 (hex). You can switch between decimal and hexadecimal by double clicking on the "dec" or "hex" text on the bottom left.
Upward "mcuc" is a long string of "F" where the EFI should be inserted. Put the cursor anywhere in that string. Switch to insert mode ("edit" menu) and paste. Note the new offset of "mcuc". If the offset hasn't changed, or if you have lost the 2nd instance of mcuc, close the ROM without saving and do these steps again.
Save a copy of myrom.rom (with this name) in your home directory.

Then redo steps 2a and 2b. If only one instance of mcuc found, you're screwed. You cannot make a custom ROM with your original BIOS.
If 2 instances are found...
3b. Correct the new offset of mcuc in myrom. Say it has changed from 1A000 to 1A200 (if you have pasted a 512-Byte string of Fs). In 3 Bytes, this new offset is written 01 A2 00. In BIOS code, bytes are written backwards: 00 A2 01. To find where to indicate this offset, locate the first instance of mcuc. 8 Bytes upward (16 chars) you should see the original offset 00 A0 01. Go to overwrite mode and replace this with the new offset. Save myrom.rom in your home directory.

4. Fix last oprom indicator (specifies that the BIOS is no longer the only element in the ROM) and checksum. To do it, paste the following in the terminal and hit return
Code:
python fixrom.py myrom.rom myrom.rom

5. Flash your card with the new myrom.rom

Credits go to pipomolo42 for the script and terminal commands, netkas for tweaking Apple's EFI, and mostly Rominator for the tests.
« Last Edit: August 19, 2011, 02:26:31 PM by jeanlain » Logged
Bolle
Full Member
***
Offline Offline

Posts: 107


« Reply #1 on: January 02, 2011, 01:38:42 PM »

nice work writing it all up jeanlain...

maybe this could be made sticky.
Logged
fouel
Newbie

Offline Offline

Posts: 30


« Reply #2 on: January 02, 2011, 04:35:22 PM »

That is a very good  procedure.
Did someone success ever?
Logged
GULLYMAN
Newbie

Offline Offline

Posts: 20


« Reply #3 on: January 03, 2011, 07:00:51 AM »

Wow! I flashed with a ROM made using this method and now Mac OSX kernel panics (confirmed by putting an Apple 7300 in together) and my FreeDOS CD gets stuck at a blinking cursor in the top left of the screen with the message "No bootable drive" after awhile.

Help! Is my card bricked? Is it possible to fix this? :-(
« Last Edit: January 03, 2011, 07:02:33 AM by GULLYMAN » Logged
GULLYMAN
Newbie

Offline Offline

Posts: 20


« Reply #4 on: January 03, 2011, 08:52:11 AM »

OK, I was able to fix the ROM on my 5770 back to Rominator's one by putting my old 7300 in bay 0 and reflashing blind, as in, with no video (yikes!)

Other people might have better luck with this but I wouldn't recommend it for now unless I f#######ked something up.
Logged
jeanlain
Full Member
***
Offline Offline

Posts: 231


« Reply #5 on: January 03, 2011, 11:11:13 AM »

I see that you didn't have to move the mcuc. Everything seems fine with your ROM.
Plus, I don't think a bad flash could cause kernel panics. More likely, your card won't work at all. Maybe OS X doesn't like this model of card.
« Last Edit: January 03, 2011, 11:19:31 AM by jeanlain » Logged
GULLYMAN
Newbie

Offline Offline

Posts: 20


« Reply #6 on: January 03, 2011, 12:33:08 PM »

I see that you didn't have to move the mcuc. Everything seems fine with your ROM.
Plus, I don't think a bad flash could cause kernel panics. More likely, your card won't work at all. Maybe OS X doesn't like this model of card.

After restoring to M57703.rom it works fine. Damn! :-(

Here is my experience with this rom:

7300GT: Boot normally, works in safe mode (my 7300 is broken, so will not work with a proper 10.6.5 boot or Wind0ze)

5770 slot 2 + 7300 slot 1: Mac OSX Kernel panic, boot to FreeDOS works but with no graphics (I had to reflash blind, atiflash 0 m57703.rom -f -reboot worked.)

5770 slot 1: Mac OSX no response (probably blind kernel panic, can't confirm as obvious no EFI boot but seems the case, see above.)
boot to CD or Wind0ze results in infinite blinking cursor, meaning it is not possible to reflash with just the 5770.

However, I woud still like to thank you for taking the time to make this. I had wished someone would, and I hope my case is the exception, not the rule. If you would like to flash with this guide, just make sure you have another Mac graphics card at hand just in case it goes horribly wrong!
« Last Edit: January 03, 2011, 12:53:26 PM by GULLYMAN » Logged
miamizorz
Newbie

Offline Offline

Posts: 8


« Reply #7 on: January 03, 2011, 03:38:46 PM »

Same experience with my card. Perhaps there is a slight problem with the efi-sewing method?

mac pro 1,1 - sapphire vapor-x 5770, 11163-05-20R. Flashed the new rom per jeanlain's instructions, now results in kernel panic booting to OSX (when display is connected to my 7300) and blinking cursor when booted to windows - when only the 5770 is connected no display shows when booting to either OS.

I don't think my card is the problem – my card was working just fine with rominator's m57704 rom, although my benchmarks were a little shy of what they probably should have been, and I agree that it seems better to use the rom that the card shipped with. I checked the m57704 rom and the factory rom out, and the factory is a newer revision...

in any case, I'm attaching my original rom and the "myrom" efi'd rom. Perhaps that will help? Otherwise, the directions are super-simple and easy to follow, so here's hoping it's just a little typo!

Thanks so much for taking the time to write things out. Good luck -
p
Logged
fouel
Newbie

Offline Offline

Posts: 30


« Reply #8 on: January 03, 2011, 04:26:29 PM »

mac 5870 video card is selling on apple store.
does anyone have the official card and directly put mac's 5870 rom to the reference pc 5870 video card ?
after doing that ,does the flashed video card  work well on mac pro?
Logged
Psychic2k
Newbie

Offline Offline

Posts: 3



« Reply #9 on: January 03, 2011, 05:06:38 PM »

Hi there,
just received my Sapphire Vapor-X OC Edition. I followed this guide and everything is OK so far (i've not tested everything yet, i should update when this is done). No EFI boot screen however, hope this get fixed someday. I have the original and modified ROMs if someone needs them.
Thanks Netkas, Jeanlain, Rominator, Cindori, and every contributor for making this things possible !
Logged

Macpro 1,1 @2x2,66, Sapphire Vapor-X 5870 OC, OS X.6.5
miamizorz
Newbie

Offline Offline

Posts: 8


« Reply #10 on: January 03, 2011, 05:15:54 PM »

Yeah, could you post your original/modified roms? Curious to see how ours differ, since we seem to have the same card and yours worked and mine didn't. Thanks!
Logged
jeanlain
Full Member
***
Offline Offline

Posts: 231


« Reply #11 on: January 03, 2011, 05:42:51 PM »

Ok, I'm looking into the issues but I don't have cards to test. It's the method I used to fix ROMs for other people and it has always worked so far. I'm not sure I tried it for a 5770 though.  Undecided

EDIT: I suspect I didn't attach the right EFI for the 5770. It's possible that I attached the original Apple's EBC whose security checks weren't disabled by netkas.
« Last Edit: January 03, 2011, 05:48:21 PM by jeanlain » Logged
miamizorz
Newbie

Offline Offline

Posts: 8


« Reply #12 on: January 03, 2011, 06:01:20 PM »

ok, i can help test if you post something to try. thanks again!
Logged
jeanlain
Full Member
***
Offline Offline

Posts: 231


« Reply #13 on: January 03, 2011, 06:15:39 PM »

Ok, I indeed posted the wrong EFI for the 5770, which used frame buffer hoolock instead of vervet. I have attached the right files, simplified the terminal commands and took the opportunity to put credit where it was due (netkas, mostly).

Sorry for the trouble.
« Last Edit: January 03, 2011, 06:29:21 PM by jeanlain » Logged
maznac
Newbie

Offline Offline

Posts: 7


« Reply #14 on: January 03, 2011, 09:07:37 PM »

Hi jeanlain, thank ou very much for posting this guide! It worked on my XFX 5770! Now I have a perfect matching EFI-Rom, but somehow, my second DVI and the HDMI ports are not working. I can't connect a second display - just the lower DVI-port works.

Does anybody have an idea how to fix this? I already tried SMC-Resets and different ROMS. Thanks!
Logged
Pages: [1] 2 3 ... 23
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines
SMFAds for Free Forums
Valid XHTML 1.0! Valid CSS!