Author Topic: Mac OS 9 booting on: Mac mini G4 (Detailed Posts)  (Read 538294 times)

Offline Jubadub

  • Gold Member
  • *****
  • Posts: 326
  • New Member
Re: Booting Mac Os 9 on Mac Mini.
« Reply #120 on: December 29, 2017, 11:11:04 AM »
Yeah, taking the Mini apart... I considered that as soon as I was done with my previous post, although I shiver at the thought of doing that again, because the screws that are still left in it (many are missing) are really almost losing their "grip-ability" due to how worn out the screw heads of each screw are, and also because I lack some screwdrivers & other tools that are more proper to reach the Mini's hard disk, meaning the Mini gets damaged each time I do this. I had to replace its hard drive before to see if the Mini was even functional (it was a risky purchase that thankfully worked out), so that's why I know.

By the way, you are right; It's the same type of hard disk as the Wallstreet's: 2.5" Parallel ATA (PATA) / IDE.

And, really? PATA HDDs will just fit in the Wallstreet's CD slot? I did wonder before, but was never sure, nor ever felt the need to do that, but I guess I have a reason now. ;D
Still, I'll see if I can get ahold of an ExpressCard/PCCard with FireWire or borrow a FireWire Mac-OS-9-capable Mac first. But if it takes too long... *sigh* :D No other choice then!

Offline androda

  • Valued Member
  • **
  • Posts: 24
Re: Booting Mac Os 9 on Mac Mini.
« Reply #121 on: December 29, 2017, 11:33:23 AM »
What I mean is that you should be able to get an adapter that will let you put one of those 2.5 inch ATA hard drives into the CD bay (or battery bay) of the wallstreet.  The expansion bays are both wired with ATA/IDE, just needs a shell to put the drive in (I think).  Don't try to just stick the hard drive in there or it might get broken!

Here's a card for your wallstreet on eBay which would probably work:
https://www.ebay.com/itm/New-Apple-MacSense-FireWire-CardBus-PCMCIA-Card-FW-200-IEEE-1394/391739290931

Original manufacturer page:
http://www.macsense.com/product/usb/fw200.html
My Collection: Sunflower iMac G4, Beige G3 (G4 333) w/USB+FW, G4 Mini 1.33, 2x G3 500 Pismos

Offline Jubadub

  • Gold Member
  • *****
  • Posts: 326
  • New Member
Re: Booting Mac Os 9 on Mac Mini.
« Reply #122 on: December 29, 2017, 03:25:04 PM »
Oh, I certainly wouldn't ever simply force it in there, fear not. ;D If I was to even try to fit it in there without any adapters, I'd check a bunch of things first, like whether the number & order of pins match or not, and whether the drive would end up suspended mid-air or not, as it could damage the pins etc..

Thanks for the links! I'll definitely take a look. :) As well as this, which I have set my eyes on for a while now: https://www.amazon.com/gp/product/B0007T276O/ref=ox_sc_act_title_5

EDIT: Bought!
« Last Edit: December 29, 2017, 10:40:41 PM by Jubadub »

Offline Astroman

  • Gold Member
  • *****
  • Posts: 206
  • new to the forums
Re: Booting Mac Os 9 on Mac Mini.
« Reply #123 on: December 30, 2017, 03:28:42 AM »
just a hint because you mentioned 'only USB-1' further up:
there is no USB-2 in any MacOS 9 whatsoever, as there is no FW800 - no such drivers exist.

Offline androda

  • Valued Member
  • **
  • Posts: 24
Re: Booting Mac Os 9 on Mac Mini.
« Reply #124 on: January 01, 2018, 09:09:11 AM »
@Jubadub

I hope that cardbus card works properly for you.  I was interested in getting something very much like that for my WallStreet several years ago, but couldn't find much in the way of compatibility information.  That's when I decided to just get a Pismo - and now I have two of them.  :)
My Collection: Sunflower iMac G4, Beige G3 (G4 333) w/USB+FW, G4 Mini 1.33, 2x G3 500 Pismos

Offline tooloudtoowide

  • Newcomer
  • Posts: 4
  • New Member
Re: Booting Mac Os 9 on Mac Mini.
« Reply #125 on: January 02, 2018, 01:40:24 AM »
Need testers, guys, or this won't go anywhere. I really think that the mini is going to work!

sorry mate, Christmas and New Year holded me a little as I do in parellel some works with Apple //c and some Macintosh 68k to be working.

I have iMac G4-700 15" unfortunately with upgraded ROM during natural moves to 10.4 OSX, but at least it boots in modded Mac OS9 however I cannot boot into genuine Mac OS9 using CD that was included with this iMac... So the question is - does this iMac is good to make mentioned steps to format Macmini harddrive (partition) in firewire connection mode? cheers

Offline Daniel

  • Gold Member
  • *****
  • Posts: 300
  • Programmer, Hacker, Thinker
Re: Booting Mac Os 9 on Mac Mini.
« Reply #126 on: January 02, 2018, 01:00:10 PM »
I believe that any OS9 system with firewire is good enough. The worst what can reasonably be expected to happen is that the partition is not set up correctly (There is no theoretical upper bound to how bad a result can be, but even the install failing is pretty unlikely).

Offline ELN

  • Gold Member
  • *****
  • Posts: 295
  • new to the forums
Re: Booting Mac Os 9 on Mac Mini.
« Reply #127 on: January 02, 2018, 03:03:31 PM »
I've just bought a Mac mini G4! This will speed up testing a lot. Stay tuned for a new test file.

Offline ELN

  • Gold Member
  • *****
  • Posts: 295
  • new to the forums
Re: Booting Mac Os 9 on Mac Mini.
« Reply #128 on: January 04, 2018, 12:58:10 AM »
Okay. I am now sure that the Power Manager contains the first code to freeze the machine.

The 68k StartInit code loads and initialises several PPC code fragments. One of the first is NativePowerMgr. This fragment is copied from a parcel to the device tree by the Trampoline. When StartInit calls its PMInitialize function, the machine freezes. It is possible to get further through the boot process by skipping this call, but without it the machine is sure to crash eventually.

So, now to reverse the Power Manager! Unfortunately this manager got a lot of changes with the introduction of the G4s and more sophisticated mobile power management. It might be a bit tricky. Daniel, want to give it a go?

Offline nanopico

  • Platinum Member
  • *****
  • Posts: 767
Re: Booting Mac Os 9 on Mac Mini.
« Reply #129 on: January 18, 2018, 09:33:38 AM »
Call out to anyone with knowledge out there.
So the power manager is definitely a bottle neck and even more is communicating with it.
In short the mini uses uPMU where as all the other G4's use PMU99.
The mini is the only machine (including G5's) that uses the uPMU chip.
Now check this.
Those PowerBooks that we are able to boot, but have issues with power management?  Related.
They use PMU99, but they use Intrepid for the North Bridge and IO Controller just like the mini only their PMU is known.
So OS 9 knows nothing of Intrepid and worse get to the uPMU and it has no clue there either, thus the mini is in a sorry state.
So if any one has any low level details on Intrepid or uPMU please let us know. 
Getting support to Intrepid should allow all those PowerBooks to pretty much be completely working. Except for the last version of the PowerBook released (Intrepid 2 and PMU05).



If it ain't broke, don't fix it, or break it so you can fix it!

Offline mrhappy

  • Platinum Member
  • *****
  • Posts: 1152
  • new to the forums
Re: Booting Mac Os 9 on Mac Mini.
« Reply #130 on: January 18, 2018, 09:35:41 PM »
Don't know 'squat' about this so I can only be a 'cheerleader' however... I feel a breakthrough coming on!! Keep up the good work lads!!! ;D

Offline darthnVader

  • Platinum Member
  • *****
  • Posts: 679
  • New Member
Re: Booting Mac Os 9 on Mac Mini.
« Reply #131 on: January 19, 2018, 12:30:11 PM »
I have a PowerBook6,8 with 7447a v1.5( PRV 80030105 ), and I've been trying to get OS 9 to boot on it.

I'm assuming this is one of the last G4's that can't boot OS 9 at this time?

I was able to get the the OS 9 boot screen, but the system bombs out while it's loading. I removed everything from the Systems Folder but the Mac OS ROM, Finder, and System suitcase.

Just to make things a little easier, I used diskutil in Tiger to create a USB drive with OS 9 drivers.

Code: [Select]
diskutil  partitionDisk  /dev/disk1 1 OS9Drivers  HFS+  MacHD 0b
Then I copied a OS 9 System folder to the drive and blessed it with:

Code: [Select]
sudo bless -folder /path/to/your/os9/System Folder
I think that was the command, I'll have to check. We should be able to bless the drive with --setboot, but I haven't figured out the correct commands for that, yet.

Anyway, if I can help here, I will, and maybe we'll kill to non-9 booting Macs with one stone, as it were.

Sorry, forgot the boot command to boot a USB drive from Open Firmware.

Check the dev tree and see what port your usb drive is on, then dev alias to see the alias of the port.

For me, it usb0.

So:

Code: [Select]
boot usb0/disk:10,\\:tbxi


« Last Edit: January 19, 2018, 01:55:49 PM by darthnVader »

Offline nanopico

  • Platinum Member
  • *****
  • Posts: 767
Re: Booting Mac Os 9 on Mac Mini.
« Reply #132 on: January 19, 2018, 02:51:50 PM »
I was able to get the the OS 9 boot screen, but the system bombs out while it's loading. I removed everything from the Systems Folder but the Mac OS ROM, Finder, and System suitcase.

And did it boot after removing everything?
there are instances where the built in audio device causes this.  Even with all extensions gone it will still load the Sound Manager and choke on the sound chip.  Can be worked around by removing the sound device node in the Open Firmware device tree.

Code: [Select]
boot usb0/disk:10,\\:tbxi

You can use this to also boot a non-blessed system folder  by providing the full path to the ROM file. 
I do this actually often to test things.
If it ain't broke, don't fix it, or break it so you can fix it!

Offline Daniel

  • Gold Member
  • *****
  • Posts: 300
  • Programmer, Hacker, Thinker
Re: Booting Mac Os 9 on Mac Mini.
« Reply #133 on: January 19, 2018, 03:01:26 PM »
Part of the initialization of TBXIs sets the bootpath property of the /chosen node to the path of the TBXI.
Mac OS 9 uses this to find the system folder. If you set this value right before you launch the Trampoline, you can make the system folder be wherever you want it.
I do this in my rom test partition so it always boots from the main system folder.

Offline darthnVader

  • Platinum Member
  • *****
  • Posts: 679
  • New Member
Re: Booting Mac Os 9 on Mac Mini.
« Reply #134 on: January 19, 2018, 05:31:24 PM »
I was able to get the the OS 9 boot screen, but the system bombs out while it's loading. I removed everything from the Systems Folder but the Mac OS ROM, Finder, and System suitcase.

And did it boot after removing everything?
there are instances where the built in audio device causes this.  Even with all extensions gone it will still load the Sound Manager and choke on the sound chip.  Can be worked around by removing the sound device node in the Open Firmware device tree.

Code: [Select]
boot usb0/disk:10,\\:tbxi



You can use this to also boot a non-blessed system folder  by providing the full path to the ROM file. 
I do this actually often to test things.

Seems to be bombing on a MoveL command, but I don't really know how to use MacsBugs, any tips?

I know OS 9 has a built in debugger, and others are using it, but isn't MacsBugs a litlle more powerfull?

Though it's not clear to me if the Mac Mini is getting out of the Mac OS Rom into the System Suitcase?

Seems I'm bombing it the suitcase, right, if I get to the loading screen, with the progress bar?

Not done any hacking on the classic OS in a while, so I need to brush up.

How do I remove the sound device from the tree?




Offline Daniel

  • Gold Member
  • *****
  • Posts: 300
  • Programmer, Hacker, Thinker
Re: Booting Mac Os 9 on Mac Mini.
« Reply #135 on: January 19, 2018, 05:39:13 PM »
The loading screen is displayed way after the system suitcase takes control.

http://macos9lives.com/smforum/index.php/topic,3233.0.html tells you how to remove a device from the tree.
I am not exactly sure which device tree node is the sound device on a PowerBook.

Offline darthnVader

  • Platinum Member
  • *****
  • Posts: 679
  • New Member
Re: Booting Mac Os 9 on Mac Mini.
« Reply #136 on: January 19, 2018, 07:33:24 PM »
Thanks, i'll give it a shot, but here is a thought, why not fire up the IOReg Explorer that comes with the classic PCIDDK under Classic Mode in OS X, and see what IOReg OS X uses to boot Classic mode?

That may give us some ideas on how we need the device tree to look to get at least minimal support in OS 9 going.


Offline ELN

  • Gold Member
  • *****
  • Posts: 295
  • new to the forums
Re: Booting Mac Os 9 on Mac Mini.
« Reply #137 on: January 19, 2018, 09:04:44 PM »
Some good ideas flying around this thread!

After several hours mucking around with Apple's PowerPC build tools, I have given up on fully reversing the the NativePowerMgr and other PEFs. Instead, I have produced this murderously hacky patching tool. Meet patchpef: https://github.com/elliotnunn/patchpef

Patchpef makes small changes to the code section of a given PEF file, with all new code being inserted at the end of the section. It depends on vasm with the "mot" syntax module to assemble new code. Convenience functions are provided to spam the NanoKernel log. Here is the command line for my current patchset:

Code: [Select]
./patchpef.py CodeRegister_NativePowerMgrLib{,_patched} Initialize+0x168 :SysErroring InitPostLoadPlugin-0x4 :r3 Initialize+0xe8 :r31 PMPluginInitialize-0x4 :r3 FindPluginDevice-0x4 :r3 Initialize+0x94 ' li r3,0' Initialize-0x4 :returning
Briefly, the syntax is:
Code: [Select]
patchpef.py INPUT OUTPUT [ LOCATION_1 COMMAND_1 ... ]
Locations are relative either to the start of the end of a function. (Functions, by the way, can be identified only if MacsBug symbols are present. Exported symbols are no help.) For most C functions, "FuncName-0x4" will allow you to log the function return (before the blr). Using ":r3" as the command will log the return value. Otherwise, any arbitrary string can be logged by prepending the argument with a colon.

These convenience commands take care of register saving for you (r0-r31 and the LR are saved in the "red zone" below the stack pointer). But you can also supply arbitrary assembly code in Apple-like syntax. (Don't forget the leading whitespace!) "nopNNN" is another special case – it removes code, rather than inserting.

So far, I have managed to disable loading the PowerMgr plugin from the device tree. This advances the mini's boot process significantly, and should not cause any problems later in the boot process.

Progress!

Offline ELN

  • Gold Member
  • *****
  • Posts: 295
  • new to the forums
Re: Booting Mac Os 9 on Mac Mini.
« Reply #138 on: January 21, 2018, 09:22:21 PM »
The NanoKernel log disappears when the Display Mgr is initialised. This is because the Display Mgr blanks the screen with 50% grey. I am not sure how the NK log comes back up, but I know that the mini freezes before it does so.

So I need another way to get output from the machine. Luckily, with the Display Mgr up, it is possible to get QuickDraw to run! I have just gotten this to work. Now a dithered grey pattern can be drawn to the screen.

I spent several hours believing that the Display Mgr was actually freezing, so now I have reversed some important parts of it -- needlessly!

Offline ELN

  • Gold Member
  • *****
  • Posts: 295
  • new to the forums
Re: Booting Mac Os 9 on Mac Mini.
« Reply #139 on: January 21, 2018, 09:44:22 PM »
The next crash was in the USBFamilyExpertLib. Skipping over it gets us this far. Promising!