• Updated 2023-07-12: Hello, Guest! Welcome back, and be sure to check out this follow-up post about our outage a week or so ago.

G4 Cube Internal Speaker Functionality Dilema

Phipli

Well-known member
Thank you so much for sharing! This is great information.
@jajan547 next step is to do the same on your machine to compare - that will let you know important facts about what the setup difference is and why it might not be working.

Boot holding Cmd-opt-o-f

dev /
ls

Then take a photo, or better, a video so we see everything

Then try...

dev sound
.properties

And photograph / video that
 

GRudolf94

Well-known member
He probably won't have /pci@xxxx/.../sound, but finding the i2s bus is a good start.

dev / ls
dev /pci@...
dev i2s...

until you arrive at the end of the chain.

You can issue a ".properties" (with the dot, no quotes) at each level to see the details. Note absence of slashes on entries beyond the first level.
 

Phipli

Well-known member
He probably won't have /pci@xxxx/.../sound, but finding the i2s bus is a good start.

dev / ls
dev /pci@...
dev i2s...

until you arrive at the end of the chain.

You can issue a ".properties" (with the dot, no quotes) at each level to see the details. Note absence of slashes on entries beyond the first level.
Yeah, the sound alias was a "see what happens" thing.
 

jajan547

Well-known member
Please mind the small spelling error, keys got mixed up typing fast. So it looks like I can’t get any properties to show up under sound, to be honest don’t know too much of what I’m looking at here.
Any case here’s photos:
 

Attachments

  • IMG_0966.jpeg
    9.5 MB · Views: 7
  • IMG_0969.jpeg
    IMG_0969.jpeg
    3.7 MB · Views: 8
  • IMG_0968.jpeg
    IMG_0968.jpeg
    3.9 MB · Views: 9

GRudolf94

Well-known member
Ha. Yeah, as predicted, you don't have sound under i2s.

.properties is a separate command, to be entered on a new line, after typing dev (device name) and hitting enter, which is why you got no response.

psuedo(sic)-sound is probably just an entry that exists to initialize the driver that the USB speakers hook into?

Anyway, never have I tried to edit the device tree, I'm not sure how that'd work or if it's even possible in these machines. If it is possible, it's got good odds of resulting in a brick if something goes wrong. Docs on how New World Macs work and boot at a low level are scarce.
 

Phipli

Well-known member
Not sure, but feels like two option -

Either Apple messed up and the system can't see the sound chip

Or

Somehow it is been suppressed.

I would expect it to show even if there wasn't a driver? Or is that an incorrect assumption?

@joevt - any idea why the physically present I2S sound chip doesn't show in the device tree? See photos above, but also GRudolf94's pictures from the similar iBook clamshell on the previous page.
 

GRudolf94

Well-known member
Stuff that has its own FCode (i.e. PCI cards) gets dynamically loaded into the tree, but the rest of it is static. OpenFirmware doesn't probe each bit of the machine to build a list of things it sees, the device tree was generated at the time the firmware was built. That is, Apple omitted the entry for the sound chip.

Edit: I should say, most of it is static, and not all things loaded in have FCode. An USB device will also show, but for core system devices, it is a characteristic of the firmware as built.
 

jajan547

Well-known member
So basically Apple removed the sound functionality entirely and the only way it’ll work is through usb because of how it’s setup in the f code? So on the chance one does tinker with things how bad would a cube be bricked if an error was made. Is there any hope in actually getting internal audio off the DAC to work or is it too risky.
 

Phipli

Well-known member
So basically Apple removed the sound functionality entirely and the only way it’ll work is through usb because of how it’s setup in the f code? So on the chance one does tinker with things how bad would a cube be bricked if an error was made. Is there any hope in actually getting internal audio off the DAC to work or is it too risky.
I don't think that's what we're saying.

It might be possible to patch it in.
 

jajan547

Well-known member
I can take some more screenshots if need be haven’t messed around too much in F Code so still very much so new to me. If there’s anything I can provide here to assist do let me know.
 

Phipli

Well-known member
I can take some more screenshots if need be haven’t messed around too much in F Code so still very much so new to me. If there’s anything I can provide here to assist do let me know.
If someone knows what script is needed, it won't be too difficult to load it in :)
 

joevt

Well-known member
@joevt - any idea why the physically present I2S sound chip doesn't show in the device tree? See photos above, but also GRudolf94's pictures from the similar iBook clamshell on the previous page.
Your guess is as good as mine. I would need a ROM dump to come up with anything better.

Read here:
https://forums.macrumors.com/thread...l-work-in-a-beige-power-macintosh-g3.2303689/
Search for "rom dump". Look at #137 and #682.
You'll need telnet to capture that info.
 

GRudolf94

Well-known member
No, that is the toolbox file that gets loaded into RAM from the boot media. What's needed is a dump of the machine's raw firmware (i.e. what loads those).
 

joevt

Well-known member
So how would one go about doing this?
Read here:
https://forums.macrumors.com/thread...l-work-in-a-beige-power-macintosh-g3.2303689/
Search for "rom dump". Look at #137 and #682.
You'll need telnet to capture that info.
Read the "Connecting to Open Firmware" section at #1. Summary:

Boot the Cube into Mac OS X and write down its IP address from the Network preferences panel or ifconfig command. For example, 192.168.0.121

Boot the Cube into Open Firmware. Set io in Open Firmware to telnet using that IP address like this:
" enet:telnet,192.168.0.121" io

Use telnet on another computer to connect to the Cube. #54. For example, in Terminal.app:
telnet 192.168.0.121
You may need an older Mac that has telnet, or you can install telnet from homebrew or whatever.

Capture some info from Open Firmware:
dev / ls unselect-dev " devalias" evaluate " printenv" evaluate dump-device-tree words

In that output, look at the boot-rom properties:
Code:
name                    boot-rom
reg                     fff00000  00100000
write-characteristic    flash
model                   Apple PowerMac1,1 1.1f4 BootROM built on 04/09/99 at 13:57:32
BootROM-version         663400
BootROM-build-date      30342f30 392f3939 20617420 31333a35 373a3332 00
result                  00000000
info                    fff00000 00004000 000111f4 19990409 c1a05781
                        fff08000 00078001 000111f4 19990409 04f7f36d
                        fff80000 00080002 000111f4 19990409 a70af36d

The boot-rom device's reg property has a physical address fff00000 and a size 00100000 = 1MB. This is probably the same on all New World Macs.

See "Dumping the New World Rom.txt" in the attachment at #137 . Also see #682 .
Check the list of memory translations.

For a 64-bit CPU (Power Mac G5):
Code:
dev /cpus/@0
cr " translations" active-package get-package-property 0= if bounds do i @ u.  i 4+ @ u.  i 8 + @ u.  i c + @ u.  i 10 + @ u. cr 14 +loop then

For a 32-bit CPU:
Code:
dev /cpus/@0
cr " translations" active-package get-package-property 0= if bounds do i @ u.  i 4+ @ u.  i 8 + @ u.  i c + @ u.  i cr 10 +loop then

Find a range that is not in the list of translations and map the physical address range of the boot-rom to that range. For example, 1MB at virtual address 40000000 is probably available, so we can use that for mapping the ROM:
fff00000 40000000 100000 28 do-map

28 is two flags: Cache-Inhibited & Guarded, whatever that means (check the PPC manual). It's the same flags used by most of the translations so we'll go with that.

Once the ROM is mapped into the virtual memory, you can dump the contents. First, create a word that can dump the contents.
: dumpbytes bounds ?do i 3f and 0= if cr then i c@ 2 u.r loop cr ;

The dumpbytes word will be slightly faster than the built-in dump word since it won't output address or text with the hex bytes.

Save everything to a text file, zip the txt file, and post it. I will then convert the hex to PPC assembly and fcode and Forth. Then we can see what it's doing or not doing for audio related devices.
 

Ncc74656

Well-known member
wouldnt it be easier to just connect the rom chip to another computer via a flasher and dump it that way?
 

GRudolf94

Well-known member
wouldnt it be easier to just connect the rom chip to another computer via a flasher and dump it that way?
No. Not everyone is sufficiently skilled to go poke at TSSOP flash. This method is non-invasive, and requires no additional hardware besides a 2nd computer and ethernet cable.
 
Top