Extracting ROMs from integrated Video Cards

Phipli

68040
Is there a way of obtaining the ROM for built in video chips like the Rage II Pro on the beige G3. In a way that would allow you to flash it to a PCI version of the card? Or is that just nonsense?

If the answer is yes, how would I go about it?

Does the Rage II Pro use the same ROM as the II+? Or are there two different versions baked into the Beige G3's ROM?
 
Is there a way of obtaining the ROM for built in video chips like the Rage II Pro on the beige G3. In a way that would allow you to flash it to a PCI version of the card? Or is that just nonsense?

If the answer is yes, how would I go about it?

Does the Rage II Pro use the same ROM as the II+? Or are there two different versions baked into the Beige G3's ROM?

There’s a question for @joevt I guess. In my mind it sounds plausible. You can probably find out the version of the ATI firmware (ndrv?) contained in the ROM using Hex Fiend.
 
The Beige G3 has two fcode images for ATI GPUs.
Code:
1002:4754    ATY,mach64_3DU       ATY,GT-B    113-XXXXX-1.1 1.49
1002:4750    ATY,mach64_3DUPro    ATY,GT-C    113-XXXXX-1.1 1.53

DingusPPC supports these device IDs:
Code:
    ATI_RAGE_PRO_DEV_ID  = 0x4750, // GP (Rage Pro)
    ATI_RAGE_GT_DEV_ID   = 0x4754, // GT (Rage II)
    ATI_RAGE_GW_DEV_ID   = 0x4756, // GW (Rage IIc)
    ATI_MACH64_GX_DEV_ID = 0x4758, // GX

I think I tried creating a PCI Option ROM from one of the Beige G3 fcode images but it didn't work.
I used my scripts and tools from https://github.com/joevt/OpenBIOSStuff to convert the fcode in the Mac ROM to Forth (DumpMacRom.sh), and to convert the Forth to a PCI Option ROM (toke).

One issue with the fcode images is that they don't include a ndrv property driver,AAPL,MacOS,PowerPC so the ndrv needs to exist on disk or in ROM or you need to add the ndrv to the fcode.

bitsavers has a ROM 109-39200-00_3D_Rage_II_+DVD_Mac_1996/M64_3D_1.F10.bin that is suitable for the 1002:4754 device.
https://bitsavers.org/pdf/ati/109-39200-00_3D_Rage_II_+DVD_Mac_1996/

DingusPPC can use that ROM to install one or more AtiRageGT PCI devices to available PCI slots. DingusPPC can add more PCI slots by adding PCI bridges.

Attached is the Forth code for the 109-39200-00_3D_Rage_II_+DVD_Mac_1996 PCI Option ROM.

You would basically want the fcode image from the Beige G3 to look like that.

In the Beige G3 dumps, there's a Part1.txt that includes a list of the fcode images:

This is the entry for the first ATI fcode image:
Code:
 51153: 0269D4: FFFF D8C0                                                                        "..ÿ¿"
 51154: 0269D8: 4750 1002                       sc                                               "GP.."
 51155: 0269DC: 0003 0000 0000 0010                                                              "........"
 51156: 0269E4: \ detokenizing start at offset 0269E4
 55060: 028C8C: \ detokenizing finished after 8872 of 8872 bytes.
[code]

This is the entry for the second ATI fcode image:
[code]
 55061: 028C8C: FFFF DD48                       xsmaxcqp v31,v31,v27                             "..›H"
 55062: 028C90: 4754 1002                       sc                                               "GT.."
 55063: 028C94: 0003 0000 0000 0010                                                              "........"
 55064: 028C9C: \ detokenizing start at offset 028C9C
 58860: 02ADED: \ detokenizing finished after 8529 of 8529 bytes.

Search for the same detokenizing messages in Part2.of:

The first fcode image is like this:
Code:
\ detokenizing start at offset 0269E4
fcode-version2                                                                    \                    [0f1]
...
fcode-end
\ detokenizing finished after 8872 of 8872 bytes.

The second fcode image is like this:
Code:
\ detokenizing start at offset 028C9C
fcode-version2                                                                    \                    [0f1]
...
fcode-end
\ detokenizing finished after 8529 of 8529 bytes.

Copy one of the fcode images to a new file.

Add this to the start (adjust pci-header and rom-size):
Code:
hex
tokenizer[ 0000 ]tokenizer set-rev-level
tokenizer[ 0020 ]tokenizer pci-data-structure-start
tokenizer[ 0020 ]tokenizer pci-data-structure-length
tokenizer[ 1002 4754 030000 ]tokenizer pci-header
tokenizer[ 10000 ]tokenizer rom-size

Add this to the end:
Code:
pci-end

Tokenize the file using the toke command to create the PCI Option ROM.

Test using DingusPPC (my fork has a --rom option for each PCI card that is added).
 

Attachments

Ah, thanks joevt and croissantking

bitsavers has a ROM 109-39200-00_3D_Rage_II_+DVD_Mac_1996/M64_3D_1.F10.bin that is suitable for the 1002:4754 device.
https://bitsavers.org/pdf/ati/109-39200-00_3D_Rage_II_+DVD_Mac_1996/

Bitaavers has the following LT Pro Mac ROM at the same location. This was the first ATI Rage chip to support dual displays (it had laptops in mind) but is mostly a Rage II Pro / Turbo. I happen to have one with a PC ROM on a PCI card.

 
Back
Top