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