 |
 |
Open Firmware Scripts
|
 |
|
 |
|
Mac Enthusiast
Join Date: Jul 2001
Status:
Offline
|
|
Hi folks - I've been doing some iBook OC jobs, and I've been using the OF script given at www.xlr8yourmac.com to tidy up the machines when finished. However, it hardcodes the machine to think it's 600/100, from what I can tell. Here's the script - can someone dissect it for me so that I know more what I'm doing? We may be doing machines to different speeds, and we'd like to have a handle on what this really is.
<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier>
<font color = red>" /"</font> select-dev
5efc680 <font color = red>" clock-frequency"</font> get-my-property 2drop !
<font color = red>" /cpus/PowerPC,<font color = blue>750</font>@<font color = blue>0</font>"</font> select-dev
239ea700 <font color = red>" clock-frequency"</font> get-my-property 2drop !
5efc680 <font color = red>" bus-frequency"</font> get-my-property 2drop !
17bf1a0 <font color = red>" timebase-frequency"</font> get-my-property 2drop !
</font>[/code]
Thanks!
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Dec 2000
Location: Old Country
Status:
Offline
|
|
How about some OCing stuff for a DP 533?
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Oct 2001
Status:
Offline
|
|
I'm not sure if I fully understand it, but let me give it a try.
First of all, it's in Forth, so it's using a different kind of notation than C or other popular languages (uh..was it called inverse hungarian notation? I was sleeping too much in those CS lectures.) and it's stack-based.
" /" select-dev
Selects the root node of the device tree.
5efc680 " clock-frequency" get-my-property 2drop !
That's a long one. First, it puts the 32 bit value 5efc680 on the stack. Then it puts " clock-frequency" on the stack to use it as input for the command get-my-property which removes the string from the stack and puts the result of that operation on the stack. That result is an address and two other values, which then are removed from the stack by the 2drop command. All that is left on the stack now is 5efc680 and an address. The ! command takes them from the stack and writes 5efc680 to the address.
Short version: The above commands set the property " clock-frequency" of the node " /" to the value 5efc680.
If you want to see something -uhm- interesting, do this on a late 2001 iBook with an external VGA monitor connected and OS X as default:
<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier>
<font color = red>" /pci@f0000000/ATY,RageM3p29s@<font color = blue>10</font>"</font> select-dev
<font color = blue>31320000</font> <font color = red>" name"</font> get-my-property 2drop b + !
mac-boot
</font>[/code]
And see the ATI-driver acting like on a TiBook.
|
Stink different.
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Mar 2000
Location: meow meow meow meow, meow meow meow meow, meow meow meow meow meow meow meow meo
Status:
Offline
|
|
whats the link to the scripts...
would they work on an old gen1 book?
|
sine -''-..-
now known as pillowcase
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Jul 2001
Status:
Offline
|
|
Originally posted by sine -''-..-:
<STRONG>whats the link to the scripts...
would they work on an old gen1 book?</STRONG>
I got the script I used from XLR8 Your Mac, but it's not useful until after you do an OC job.
You might have to change it up for an older machine, but from what the post above says, it may work just fine.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Jul 2001
Status:
Offline
|
|
Originally posted by stew:
<STRONG>uh..was it called inverse hungarian notation?</STRONG>
Reverse Polish Notation (RPN). Same as an HP calculator uses.
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Oct 2001
Status:
Offline
|
|
Originally posted by Carl Norum:
<STRONG>
Reverse Polish Notation (RPN). Same as an HP calculator uses.</STRONG>
I knew it was something from eastern Europe  However, my calculator is from Casio, so I never had to use RPN except when hacking my iBook's device tree.
|
Stink different.
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Jul 2001
Status:
Offline
|
|
Originally posted by stew:
<STRONG>If you want to see something -uhm- interesting, do this on a late 2001 iBook with an external VGA monitor connected and OS X as default:
SNIP
And see the ATI-driver acting like on a TiBook.</STRONG>
Do I have to change something back afterwards?
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Jul 2001
Status:
Offline
|
|
Originally posted by Carl Norum:
<STRONG>
Do I have to change something back afterwards?</STRONG>
And the answer is no. =)
But it doesn't work like a TiBook as far as I can tell - it's all warped out and crazy. I'll play with it a bit.
Or can this not work at all on an older iBook? (May 2001).
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Oct 2001
Status:
Offline
|
|
It's just going a little nuts as the iBook's device tree looks different than the TiBook's. All the above script does is changing the device name of the ATI card from ATY,RageM3p29s to ATY,RageM3p12 to the driver thinks it's a Titanium. I'm trying to figure out if there's a way to make it work 100% like a Ti.
|
Stink different.
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Jul 2001
Status:
Offline
|
|
Originally posted by stew:
<STRONG>It's just going a little nuts as the iBook's device tree looks different than the TiBook's. All the above script does is changing the device name of the ATI card from ATY,RageM3p29s to ATY,RageM3p12 to the driver thinks it's a Titanium. I'm trying to figure out if there's a way to make it work 100% like a Ti.</STRONG>
There are 4 EE professors at the U of S who have TiBooks (one of them is a 400 model, the rest are 667s). I'll get a list of the properties from the 400's video card and transfer them all over to the iBook. That should do it, right?
Well, I can try, anyway.
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Oct 2001
Status:
Offline
|
|
No, they basic differences are not in the properties but in the node hierarchy. BTW, you don't need access to a Ti to look it up, you can find a complete IOHierarchy dump here: http://penguinppc.org/dev/library/dev-trees-html/
Unfortunately, I haven't figured out how to create nodes and properties in OF - it's hard to find proper OF documentation online.
Cloning the device tree won't necessarily give you the same functionality - I don't now how similar the graphics circuits of the iBook and TiBook are, but I think they're more similar than Apple wants you to know
[ 02-15-2002: Message edited by: stew ]
|
Stink different.
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Jul 2001
Status:
Offline
|
|
Originally posted by stew:
<STRONG>Cloning the device tree won't necessarily give you the same functionality - I don't now how similar the graphics circuits of the iBook and TiBook are, but I think they're more similar than Apple wants you to know  </STRONG>
I was thinking about this today. I think that once the name change you mention above is done in the firmware that we should be looking in the (thankfully open source) Darwin code for the video card drivers. What if I dig around in there and tweak myself an up-to-date machine.
What it comes down to is that I was displaying something different on the VGA monitor than was on the iBook's screen, so at that stage, it should simply be a software problem.
Spring break started today, so I have about 10 days to dig around in there before I have to start paying attention to classes again. I'll see what's up in there.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Dec 2000
Location: In support of our troops
Status:
Offline
|
|
A downside to this is that when you enable that, the Composite vid-out on the iBook no longer works. Very bad, sinces thats what I use most of the time. I think what we need to do here is not modify the firmware, but hack the drivers to make it do it, since we know it will.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Jul 2001
Status:
Offline
|
|
Originally posted by x user:
<STRONG>A downside to this is that when you enable that, the Composite vid-out on the iBook no longer works. Very bad, sinces thats what I use most of the time. I think what we need to do here is not modify the firmware, but hack the drivers to make it do it, since we know it will.</STRONG>
Sounds like time to assemble an army of C programmers.
Anybody know any good hackers?
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Oct 2001
Status:
Offline
|
|
I discovered another side-effect of the faked device-name: My iBook refused to go asleep in OS X when closing the lid. At least, this could be a nice solution for people who want to run their iBook with a closed lid as mp3 player
I'm fully for teaming up an army of coders to hack the iBook's video drivers! I can't say I have experience in writing drivers for graphics hardware (esp on PPC platforms - the only driver I wrote so far was for an ISA sound card for BeOS/x86) but my C/C++ skills are solid.
The driver we are looking for is not in the Darwin source - Darwin only includes a very bare-bones generic OF framebuffer that is used for console displays.
Anyways, send me a mail to stewer (at) mac.com, let's see what we can do!
|
Stink different.
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Dec 2000
Location: In support of our troops
Status:
Offline
|
|
Ok, heres a thing to think about, anyone remember in OS 9.1 that the iBook 500's worked with LID Closed Operation (like the Ti), the screen went off, but the machine kept running, when an external monitor, or TV out cable was plugged in. I know mine did. When we "updated" to 9.2 it stopped doing that. I think with that, and and with a external monitor seperate hack, we'd make alot of people happy.
On another note, I have a simple PC C++ program that I want a GUI written for, and then compiled for mac. I was assured all the code was standerd C++ code so it just needs to have the GUI redone and then compiled. Anyone feel up to the task? I don't know much at all about C/C++ programming. I have the classes if anyone does 
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|