Classic Mac OS Software (Discussions on Applications) > Hacking the System, Mac OS 9.3, and Beyond !

Temporarily disabling devices from the device tree in Open Firmware

<< < (2/3) > >>

You have to remove the PCI Header to load the FCode ROM via the load command, so the device ID's won't matter.

OS 9 Runtime Drivers are not fooled by OF changes to the Device ID, they read it direct from the PCI Registers on the PCI card, not the Device Tree.

I need to delete the node holding the Fcode ROM for the built-in GF4MX and load my custom Fcode.

I've done it with unflashed PC Graphics cards, but the FCode in the BootROM for the card is interfering in the process.

Sorry. I have no clue how to help you here  :(

My work on the sil3124 project has forced me to figure out how to do this.

If you want to load fcode that does anything actually interesting, the device node has to have an open instance as you do it. Normally this would be handled by the system when it loads fcode from roms, but doing it from the user interface takes deep magic.

--- Code: ---load hd:,\path\to\file
dev /your-device
: open true ; : close ; : init load-base 1 byte-load ;
" /your-device" select-dev
0 to my-self
--- End code ---

Here is the exact incantation that I have to type every single time I want to test the fcode I am writing:

--- Code: ---load hd:14,\sil3124.fcode
devalias s71 /pci@f2000000/pci1095,7124
devalias s31 /pci@f2000000/SIL3124
dev s71
: open true ; : close ; : init load-base 1 byte-load ;
" s71" select-dev
0 to my-self
" s31" open-dev constant s31-ih
dir s31/sil3124,port0/disk:,\
--- End code ---

And then when the test invevitably fails, then I have to manually read and write chip registers to figure out where the show-stopping bug is this time. Low-level development is completely insane.

is there some type of OF emulation that you could run in a virtualized space to be able to cut + paste such stuff?

I suppose I could load it from a file or use telnet.

For some reason I never bother to do it :D


[0] Message Index

[#] Next page

[*] Previous page

Go to full version