toggle backlight on 2400/3400/Kanga? |
May, 02, 2003 5:16 PM |
ivanxqz |
I have a 2400/G3 running 10.2.4 which I use primarily as a server, but I also like to interact with it at times. I don't want to run the backlight 24/7, for obvious reasons. Is there a way to toggle the backlight on and off once booted into OS X? I know it can be done from Open Firmware, but that obviously requires a reboot every time. Is there some way of issuing an OF command from within OS X, or is there some other means? Thanks, Ivan. |
. |
RE: toggle backlight on 2400/3400/Kanga? |
May, 08, 2003 1:43 AM |
joevt |
. |
Hmm, that'll teach me to use << >> The 4 missing quoted text strings are: backlight-on" backlight-on", unknown word see backlight-on backlight-on, huh?? |
. |
RE: toggle backlight on 2400/3400/Kanga? |
May, 08, 2003 1:38 AM |
joevt |
. |
You guys dumped the forth code for the quote word <<">>. That's what << see ">> would do. Then the forth interpreter saw <> and then displayed the error <> <> only works if the current package is the one that defines the word. That's why you saw the error <> You can try the following line to dump the code for backlight-on " backlight-on" _pmu-ihandle ihandle>phandle find-method if (see) then Anyway, you should read IEEE 1275 if you really want to mess around in OF. ftp://playground.sun.com/%2Fpub/1275/coredoc/1275-1994/ |
. |
RE: toggle backlight on 2400/3400/Kanga? |
May, 07, 2003 7:44 PM |
ivanxqz |
. |
Well, this is more of an aside than anything else, since it hardly answers what we're talking about, but I thought I'd share one crude solution to a problem I had...I'm using my 2400 as a server, and I don't want the backlight running all day. I can turn it off with the long OF command before booting if I want, but then I need to be there, and if I need to remotely restart the computer, either it's stuck in OF or it boots and the screen is on, depending on the value of auto-boot?. I thought about adapting one of the old Linux-PPC Open Firmware boot chooser programs and gluing it in to the nvramrc code, with the idea that it would give me ten seconds to press a key to turn on the backlight before booting. But then I thought of a much simpler solution. I edited the "Hooper" OFpt resource in XPF (which itself is adapted from Apple's code found in /usr/ share/nvram). I pulled out " backlight-on" _pmu-ihandle $call-method so that it simply said helpb ; Now, if auto-boot? is true, the backlight stays off during boot, which is how I want it. But if I need the backlight, it automatically turns on if I call the OF prompt with cmd-option-OF (or if I set auto-boot? to false with /usr/sbin/nvram or XPF in OS 9). Then when I boot, it stays on. Still doesn't help me once I'm already booted, but it's one problem solved. Whoo hoo. |
. |
RE: toggle backlight on 2400/3400/Kanga? |
May, 07, 2003 9:29 AM |
ivanxqz |
. |
Nice sleuthing. I didn't know about the see command; cool stuff. I was even happier to discover the same thing you got, tempest (same command), but nicely indented to boot. Anyway. I can't speak for the 3400 or 3500, but the 2400 has a Chips & Technologies 65550 card which announces itself as a PCI card in Apple System Profiler in OS X and appears aliased to "screen" as /bandit/chips65550 in OF when I type "devalias." I barely understand OF (Reverse Polish me confuses), so forgive me if this is obvious stuff. I haven't yet looked at TN 2000, but perhaps we're getting somewhere. I'm going to take a look at the individual execution tokens to see if that reveals anything interesting. What is the syntax for calling one of those tokens directly from the OF prompt? |
. |
RE: toggle backlight on 2400/3400/Kanga? |
May, 07, 2003 12:23 AM |
tempest |
. |
Oops, forgot to say that the command I used was see " backlight-on" _pmu-ihandle $call-method |
. |
RE: toggle backlight on 2400/3400/Kanga? |
May, 07, 2003 12:22 AM |
tempest |
. |
Tried some variations but here's the closest I got: : " {0} ^-7F30B8 dup 0! 1! begin 22 parse tuck 0 ?do i over + c@ 1@ i + c! loop drop 1@ + 1! ^-7ECF90 2! 2@ bl <= while/if true else 2@ case 28 of begin ^-7ECF90 dup 2! 0= while/if ^-7EB7D0 then 2@ 29 <> while/if 2@ ^-7F3308 digit if 4 lshift ^-7ECF90 ^-7F3308 digit 0= if ^-7EB7D0 then or 1@ c! 1@ char+ 1! else drop then repeat endof 22 of 22 1@ c! 1@ char+ 1! endof ^-7EB7D0 endcase false then until 0@ 1@ over - state? if <s",> then ;backlight-on", unknown word ok 0 > |
. |
RE: toggle backlight on 2400/3400/Kanga? |
May, 06, 2003 11:43 PM |
tempest |
. |
I get 0 > see backlight-on backlight-on, huh?? 0 > see , huh?? |
. |
RE: toggle backlight on 2400/3400/Kanga? |
May, 06, 2003 9:25 PM |
joevt |
. |
I don't have a 3400 so I don't know what you'll see when you type see backlight-on in Open Firmware. You'll probably see a lot of no-name execution tokens that look like this ^-7E0550 In which case, you would type -7E0550 (see) to see what they are. Newer Macs like the G4 have Open Firmware code that is a lot easier to read because everything is named. I wonder if the Open Firmware ROM is accessible from Mac OS? In that case, I would use a detokenizer to get everything at once. If the display device has it's own ROM like a PCI card then technote 2000 tells you how to get that. |
. |
RE: toggle backlight on 2400/3400/Kanga? |
May, 06, 2003 5:22 PM |
OSXGuru |
. |
What joevt is suggesting is that it is probably possible to take a look at the machine code that implements the backlight-off method in Open Firmware, and then figure out how to do the same thing in Mac OS X. I'm not absolutely sure how to do that, but I am sure that joevt is right that it is possible. I'll experiment a little and see what I can come up with. |
. |
RE: toggle backlight on 2400/3400/Kanga? |
May, 05, 2003 1:32 PM |
ivanxqz |
. |
When you are in OF, you can type " backlight-off" _pmu-ihandle $call-method (that's including the quotes and the space after the first one) and it will turn off the backlight, or you can use the same thing with on instead of off to turn it back on. I don't really understand what this command does, since I'm not exactly a Forth guy, but it works. I wonder what would happen if you tried it on a TAM? The problem is that you can't do this once you are booted into OS X. Logic would dictate that there must be some way to get to whatever OF is doing, but I don't know how. This command appears in the file /usr/share/nvram/Hooper, which appears to have some OF legacy code for booting 2400's before they stopped supporting them during development. Ryan, I'll be sure to pass along any info if I can find anything out. Ivan. |
. |
RE: toggle backlight on 2400/3400/Kanga? |
May, 03, 2003 5:11 PM |
joevt |
. |
Isn't it possible to list the forth code in Open Firmware for the back light command? |
. |
RE: backlight on TAM also an issue |
May, 03, 2003 12:09 PM |
OSXGuru |
. |
Ah, that's a good question. I'm trying to work out an answer for 20th Century Mac as well, because in that case the backlight just doesn't turn on at all. If anyone happens to know how to adjust the backlight on the powerbooks or the TAM, I'd be grateful to hear about it. I've looked through the NetBSD and LinuxPPC sources to see about the TAM, but didn't find anything obvious. I should check there for the powerbooks as well. |
|
|