I believe that I have finally got it working
The problem was that I was using an undocumented method called " (load) " to load the Toolbox file (the parenthesis are part of the name). It seems to be only implemented on G3s, which is what I was doing the initial tests on. The problem with the regular function loading function " load " is that after loading a file it checks to see if it is a valid program file and unloads the data if it complains. The Toolbox is not a chrp, elf, xcoff, or forth program. To make it so I could use " load ", I had to add a backslash and a space ("\ ") to the front of the Toolbox (right before the "prcl"). This tricks Open Firmware into thinking that the Toolbox is a forth script to avoid "unrecognized Client Program format" errors. Any replacement Toolbox files will also need a "\ " prepended to them, so keep this in mind. The Trampoline does not need any modifications because it is already an elf file.
Now the ROM file works on several different systems. I have also tested unstuffing the file to make sure that Stuffit is not corrupting it somehow. Note that the Mac OS ROM file has no resource fork. At first this was an accident but I found that including one crashes the system during startup 100% of the time. It seems to be fine without one. It has worked on a G4 and several G3s.
To make it really easy to tell if it works, the secondary boot script now paints colored stripes across the screen a few seconds before the happy mac appears. This version of it works pretty much the same as the previous version, except it actually works on non G3s. You just stick Mac OS ROM and Bootfiles in your System Folder and away you go.
As to forth boot scripts, a lot of useful info can be found here:
https://www.fenestrated.net/mirrors/Apple%20Technotes%20(As%20of%202002)/tn/tn2001.htmlhttps://www.fenestrated.net/mirrors/Apple%20Technotes%20(As%20of%202002)/tn/tn2004.htmlThe first link shows how to create and run forth scripts. The second one shows how to get an Open Firmware prompt over telnet. Telnet has been very useful for my work. I can control Open Firmware from my modern laptop and, because of Wifi, I don't even have to be in the same room as the machine I'm debugging as long as it has a wired connection to the network.
Have Fun,
Daniel