Are ROMs compiled or assembled?
Who makes ROMs?
If ROMs are compiled or assembled, how difficult is it to decompile or disassemble one, compared to say, C++?
They are most probably written in C and compiled to x86 machine code. Disassembling the code is easy if you have a disassembler - there are plenty out there, just search for one. I use nasm.
To extract the ROM from the GPU you can use the following (on an x86 machine, obviously):
List PCI devices and their bus IDs:
Enable ROM access (where x is the ID from the previous step):
Code:
$ cd /sys/bus/pci/devices/0000\:00\:0x.0
# echo 1 > rom
Dump the ROM to a file:
or
Disable ROM access
Now you have your ROM, you need to take a look at the PCI expansion ROM spec (see here:
http://www.pzk-agro.com/0321156307_ch23lev1sec7.html) and extract the x86 initialization code from it so you can disassemble it.
You may wish to use
strings utility to print out any interesting ASCII strings it finds in the ROM (manufacturer, clocks etc.).
Once you have the code you need to figure out exactly how the device is initialized (there will be a lot of memory access and IO going on). Understanding this process is key. Once you understand how the device is initialized you will write a similar implementation and assemble it to PPC machine code, making sure it fits into the exact same memory map as before.
I have no idea how complex the initialization code is, but no doubt it's not simple. Given we don't have any open-source implementations of the Nvidia VBIOS, I'm guessing it's going to be incredibly tough.