Skip to main content
Home Forums 68kMLA G3 Blue and White custom startup sound ROM hack -success!! — #8
Post #8 by dougg3
Source Forum68kMLA
CategoryDevelopment
Post DateTue, 3 Jul 2012 - 06:09
Original URLhttps://68kmla.org/bb/threads/g3-blue-and-white-custom-startup-sound-rom-hack-success.25758/
Post
Thanks Dennis Nedry! I think it would be AWESOME to hack the startup chime of current Macs. For me it becomes a monetary thing...once the technology gets cheap enough that it's easy to get a new motherboard when something goes wrong, then I'm comfortable hacking it :-)

I have decoded the sound.

I started messing with disassembling, but I quickly realized that PowerPC assembly is a complete mess to try to read. There are so many freakin' instructions that do really crazy things! I started seeing instructions like rlwinm (Rotate Left Word Immediate then AND with Mask) and think "WTF?" Maybe it's just because I'm not familiar with the syntax like I am with Motorola and Intel code, but it turned me off pretty quickly. I found a place where it's writing to the sound chip but lost my patience and decided to try some other methods.

I figured Apple would probably use their own IMA 4:1 encoding standard (34-byte chunks -- 2 bytes of starting info followed by 64 nibbles of data), and it turns out that's exactly what they did. See this page for the header info, and this page for generic IMA decoding info. I took the code I had already written from experimenting with your Quadra 700 project, and made it work with Apple's IMA 4:1.

I didn't know exactly where the sound started, so I played with various starting points until I found one that didn't show any weird "index out of bounds" errors during decoding. Then I played back the resulting sound and BINGO. It's a little scratchy for my tastes, but I think it's correct. I'll post a recording and code later...

mcdermd -- WOW, thank you! I may indeed take you up on that offer once I'm comfortable with trying to inject my own sound :-)

Edit: Here's the extracted chime. There may be some improvements needed to the decode algorithm because I don't think it's supposed to sound that scratchy. But it's pretty much correct.

mp.ls