Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

DearthnVader

Suspended
Original poster
Dec 17, 2015
2,207
6,399
Red Springs, NC
This is how to load a Fcode ROM form the hard disk in Open Firmware, while they still have a PC VBios on them. If you want to test a AGP card, it is best to have a Mac PCI video card, but it can be done without one.

We can only boot OS 9 at this time if the card you are testing is nVidia. I'll update this when I test an ATI card.

With a PCI Video card:

Install the latest drivers for the card you want to test.

Open your ROM in Hexedit and remove the PCI Header, everything to 0x40. We shouldn't have to do this, but Apple screwed around with their Open Firmware implementation, so we have to.

Place the Fcode ROM file you want to test in a folder at the root of your drive, name the folder ppc.

Shut Down.

Put in your Mac PCI card, and your PC AGP card into your Mac. Connect a display to both cards, if you have 2 displays, if not connect you display to the PCI card.

Boot into Open Firmware, Command+Opt+O+F. It may take a few seconds as the Mac probes the APG card, then redirects video to the PCI card.

If all goes well, you will be greeted with the Open Firmware prompt.

Now we want to load the FCode Rom we want to test, for this example I named mine GFM.rom, and my hard drive partition number is 10.

Code:
load hd:10,\ppc\GFM.rom
dev agp/@10
800000 1 byte-load
" agp/@10" open-dev to my-self
800000 1 byte-load
boot hd:10,\\:tbxi






If you get no errors, then you should see the screen light up on the AGP card, if you have a display connected to it, and OS 9 should boot.

Enjoy!

I tested it on the Gainwood dual DVI GeForce 4ti 4600 PC Bios card, with a Mac Radeon 9200 PCI. Everything worked 2D/3D and DVD Player.

If things go wrong, and you get no display, ensure your card works in a PC, if it does, you haven't edited the FCode ROM correctly.

I also tried it with the Quadro 900 GXL that MacTron sent me, one with a dead eeprom, however the display stared up out of sync/range, then went dark, and OS 9 never finished booting.

Once we can boot OS X with this, we should be able to flash the cards without the need for a PC at all.

I'll update when I test ATI cards, and PCI Cards, if anyone is interested?

Also, I can give some directions on how to boot to a telnet session incase you don't have a Mac compatible PCI video card, if anyone is interested.

If you are trying to test a PCI card, doesn't have to be a video card, just any PCI card that uses and FCode rom to be a part of the boot process, this should work, you would just need to adjust the commands to get to the PCI card rather than the AGP bus.
 
Great work! This is a very valuable contribution. It is definitely worth mentioning the telnet option to save the need to obtain a PCI graphics card for the process.

First plugin an Ethernet cable to the target machine, reboot into Open Firmware and at the OF prompt setup the telnet I/O device;
Code:
" enet:telnet,10.1.2.3" io

(substituting 10.1.2.3 with a valid IP on your subnet. Also be sure to include the space after the first quotation mark)

NOTE: You'll likely be entering this command blind (that is without a display), so type carefully. Do a practice run first, before pulling out your existing graphics card, to get an idea of how long it takes from the chime to drop into OF.

Then on a different Mac or PC on the same subnet, telnet in from the command line / Terminal;
Code:
telnet 10.1.2.3

You can then take full control of the target machine's Open Firmware via your LAN.

(Full Open Firmware telnet debugging notes and instructions can be found here)
 
Last edited:
Great work! This is a very valuable contribution. It is definitely worth mentioning the telnet option to save the need to obtain a PCI graphics card for the process.

First plugin an Ethernet cable to the target machine, reboot into Open Firmware and at the OF prompt setup the telnet I/O device;
Code:
" enet:telnet,10.1.2.3" io

(substituting 10.1.2.3 with a valid IP on your subnet. Also be sure to include the space after the first quotation mark)

NOTE: You'll likely be entering this command blind (that is without a display), so type carefully. Do a practice run first, before pulling out your existing graphics card, to get an idea of how long it takes from the chime to drop into OF.

Then on a different Mac or PC on the same subnet, telnet in from the command line / Terminal;
Code:
telnet 10.1.2.3

You can then take full control of the target machine's Open Firmware via your LAN.

(Full Open Firmware telnet debugging notes and instructions can be found here)
Well, we want to make things a little easier, so we don't have to type commands blind. So what we are going to do is leverage the nvramrc and the boot-command to let us boot to a telnet session without needing to type anything blind.

The nvramrc runs before the system is ready to enter into a telnet session, so we just can't enter telnet at boot from the nvramrc, so we create a custom colon definition in the nvramrc and then we set this new word to be our boot-command.

Code:
nvedit
: tnio " enet:telnet,10.1.2.3" io ; <press return>
<press ctrl+c to exit the nvramrc editor>
nvstore
setenv use-nvramrc? true
setenv boot-command tnio
reset-all

Now all you have to do is enter a telnet session on a target system.

I.e.

Code:
telnet 10.1.2.3

This is for New World Macs, old world Macs default to telnet via the serial port anytime you enter open firmware, unless you change the input and output device, and I don't think they support telnet over the ethernet connection.
 
Nicely done. There is always more than one solution. Nothing wrong with a little blind typing though ;)
 
Well, we want to make things a little easier, so we don't have to type commands blind. So what we are going to do is leverage the nvramrc and the boot-command to let us boot to a telnet session without needing to type anything blind.

The nvramrc runs before the system is ready to enter into a telnet session, so we just can't enter telnet at boot from the nvramrc, so we create a custom colon definition in the nvramrc and then we set this new word to be our boot-command.

Code:
nvedit
: tnio " enet:telnet,10.1.2.3" io ; <press return>
<press ctrl+c to exit the nvramrc editor>
nvstore
setenv use-nvramrc? true
setenv boot-command tnio
reset-all

Now all you have to do is enter a telnet session on a target system.

I.e.

Code:
telnet 10.1.2.3

This is for New World Macs, old world Macs default to telnet via the serial port anytime you enter open firmware, unless you change the input and output device, and I don't think they support telnet over the ethernet connection.

This solution assumes two machine debugging via a single ethernet cable between the two machines, however if you'd rather use your router, so maybe you want to control the telnet session via wifi, then just adjust the commands to give the telnet server an address within you routers DHCP address.

You can not run the telnet server from WIFI, as there is no networking for wifi in Open Firmware. Tho intel Macs do have wifi networking in their EFI firmware, but that's beyond the scope of PWPC.
[doublepost=1528983872][/doublepost]
very cool :)

ima have to play with this lot at some point soon :)

One thing to note, tho you can set fcode-debug to true in Apple's implementation of Open Firmware, it doesn't support, or I can't find how to turn on, fcode-verbose.

When dealing with an Fcode ROM, it's much simpler to debug if you can execute the code in verbose mode, so rather than just seeing a default catch, you can understand where in the code you are when you receive it.

For this reason it maybe better to use QEMU-system-ppc and PCI passthrough with IBM's implementation of Open Firmware( SLOF ). Tho it's not a solution for AGP cards.
 
Last edited:
Boot into Open Firmware: command+option+o+f

0 >
Code:
" enet:telnet,10.1.2.3" io

Wow! Many times in the past that would have saved me a lot of bad typing. Yesterday, I was in the GRUB2 command line (and the ridiculous PC BIOS Setup), and let me just say this: PowerPC Macs are way better in this regard.

0 >
Code:
words
 
  • Like
Reactions: AphoticD
I am having an issue getting my other Macs to telnet into my PM G4 Quicksilver 2002 OF. I have tried it both over my LAN Network and directly ethernet connected from Mac to G4. I get the same results either way. I am able to run a TFTP server from my Mac that the G4 OF can connect to and load a file from. Here is what I am doing and what I get (example is with Mac and G4 connected directly)

G4 within OF:
" enet:telnet,10.1.1.3" io <presses enter>

iMac (OS 10.12.6) using terminal:
telnet 10.1.1.3 <presses enter>
<terminal output says>
Trying 10.1.1.3...
Connected to 10.1.1.3.
Escape character is '^]' .
ok
0 > <at this point I cannot type anything into it and it will stay like this for little bit than will say>
<terminal output after waiting>
0 > Connection closed by foreign host.
<then it goes back to the prompt>

After the connection closes I have to power cycle my G4 and get back into OF. If i try to connect again after I get that message is will just fail to find host.

I am not sure if it terminal or what... I have been trying to find a solution to this and even tried a couple of the telnet option commands with the same results...
 
I am having an issue getting my other Macs to telnet into my PM G4 Quicksilver 2002 OF. I have tried it both over my LAN Network and directly ethernet connected from Mac to G4. I get the same results either way. I am able to run a TFTP server from my Mac that the G4 OF can connect to and load a file from. Here is what I am doing and what I get (example is with Mac and G4 connected directly)

G4 within OF:
" enet:telnet,10.1.1.3" io <presses enter>

iMac (OS 10.12.6) using terminal:
telnet 10.1.1.3 <presses enter>
<terminal output says>
Trying 10.1.1.3...
Connected to 10.1.1.3.
Escape character is '^]' .
ok
0 > <at this point I cannot type anything into it and it will stay like this for little bit than will say>
<terminal output after waiting>
0 > Connection closed by foreign host.
<then it goes back to the prompt>

After the connection closes I have to power cycle my G4 and get back into OF. If i try to connect again after I get that message is will just fail to find host.

I am not sure if it terminal or what... I have been trying to find a solution to this and even tried a couple of the telnet option commands with the same results...

I have the same trouble with my QS, and I've been unable to pin down the problem, I was forced to us a PCI video card rather than telnet.

I'm not sure why we get no keyboard input via telnet, and was hoping it was just an issue with my QS, however it seems to be an issue for you too. I have a dual 1ghz, but a I have a spare logic board for a single 800mhz, I may swap them out and see if it's still an issue.
 
  • Like
Reactions: ICCRRP
I have the same trouble with my QS, and I've been unable to pin down the problem, I was forced to us a PCI video card rather than telnet.

I'm not sure why we get no keyboard input via telnet, and was hoping it was just an issue with my QS, however it seems to be an issue for you too. I have a dual 1ghz, but a I have a spare logic board for a single 800mhz, I may swap them out and see if it's still an issue.

Mine is also the Dual 1GHz G4 Quicksilver 2002. Wish I would have tested this on the 733MHz G4 Quicksilver 2002 I had before I sold it to another collector...

Now that I know it is possibly a QS issue I will keep digging on that. Once I get my G5 up and running again I will see what happens in the open firmware on it.
 
Something to add, this works with Qemu and Openbios and may or may not work on a real Mac:

It seems when booting OS 9 that the disk based 'NDRV' maybe all we need to test ATI cards that have native drivers for OS 9.

Doesn't work with OS X.

The native device drivers (NDRV) for ATI cards match in name space in the IONameRegistry.

On multi headed ATI cards the name property from one of the display nodes in Open Firmware, and on Rage128 and older ATI cards just the name from the PCI node of the device tree.

So, let's assume we have a Rage128 PC card and we want to test it with OS 9, but none of the FCode ROM's seem to work correct.

Boot into Open Firmware:


Code:
dev /pci ls
or
dev agp ls
**we should see our ATI card with a vendor ID of 1002(ATI/AMD)**
**Let's assume we have a PCI Rage128, and we see it is /pci/@f**
dev /pci/@f
"ATY,Rage128o" encode-string " name" property
mac-boot

The " ATY,Rage129o" 'NDRV' is the ATI Mac Edition Rage Orion, and it requires the ATI ROM Xtender( this is the disk based 'NDRV' for all ATI Retail cards ) ATI OEM Apple cards use the ATI Driver Update extension as the disk based 'NDRV'

If you open the data fork of these extension and search for ATY,xxxxx you can see all the Names that match "NDRV's" such as ATY,Rage128Pd or ATY,Rage128Ps. The Rge128 has 8 or 10 'NDRV's and you would want to test one until you find a proper driver for your card, then you will know what FCode ROM you need to find to flash to the card.


Finding FCode ROM's for all the Rage128 cards can be tricky, as back in the day we only cared about flashing the latest and greatest cards, no one cared about the Rage128 cards because you could just flash a Readon card. So we don't have a collection of all the Rage128 Fcode ROM's, but if you know the ROM you are looking for, likely you can get someone to dump it for you if they have the card.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.