Classic on Intel

Although Intel macs don’t support classic, SheepShaver may be a way to run older software. I’ve installed an x86 build and I finally found a working ROM image, but it won’t boot my 9.2 CD, which is the oldest one I can find. Tomorrow I’ll look for a 9.0 CD which it should be able to boot.

UPDATE: I was able to get it running using the Software Install CD from my old G4 minitower. I posted the full details here.

Ha!

I found a pre-compiled binary of Wine for Intel Macs. It looks like they didn’t fix the problem in context_i386.c that I ran into, they just worked around it:

[mike: 7]$ winecfg
wine: Unhandled page fault on write access to 0x00000000 at address 0xffff0857 (thread 0009), starting debugger…
FIXME : get_thread_context_ptrace unimplemented
FIXME : get_thread_context_ptrace unimplemented
Can’t attach process 8: error 5

MacIntel hacking

CAUTION: extreme geekiness ahead…

I’ve been attempting to build WINE on my iMac Core Duo. I’m just using the raw wine source code, although someone has Mac patches for it. I ran into difficulty with context_i386.c, which contains functions that obtain the register contents from a process using ptrace. Unfortunately the register structure & PT_GETREGS isn’t defined, so I’ve been looking through the system headers to find some clues.

Reading the Darwine mailing list archive, I found a pointer to this very interesting article which tells how to access the EFI command mode on Intel macs. That article gave some clues about the Mac’s startup process.

[mike: 182]$ file /usr/standalone/i386/boot.efi
/usr/standalone/i386/boot.efi: MS Windows PE 32-bit Intel 80386 executable

hmmmm…. This is the boot image that starts up the OS.

Catching up

I apologize for not writing much in the last few days, but I’ve had a lot going on. Here’s a summary.

  • We’re making very good progress on the consumer product (LoJack for Laptops). The actual code is the same as the regular Computrace agent, only the installer & activation is different. I’ve been working on the new web-based activation.
  • We have a very ugly situation at the condo. At least 14 roofs need to be replaced completely out of 34 buildings and all of the rest have damage that needs to be repaired. That means another assessment. We had one just before Wilma to pay for two roofs that needed to be replaced before the storm, but now there’s a lot more damage. As you can imagine, a lot of people are pissed. Some troll posted some very nasty stuff on the web site, among other things accusing the association of stealing money for decorations and parties (all of which was paid for entirely by the president & vice president out of their own pocket without using any of the association’s money). Of course the same people who complained came to all of our parties during the holiday season and the cookouts when we had no power after Wilma and ate for free. We’re having a town meeting tomorrow night about the roofs and we expect it to get very nasty.
  • I’m still dealing with my mom’s medical bills.

Intel Incompatibility

It looks like the inability to call PowerPC code from native code is going to be a big problem. I can’t run SourceOffsite because it isn’t native but the libraries it tries to dynamically load are native. The result is:

[mike: 655] $ sos
dyld: Library not loaded: /opt/local/lib/libexpat.0.dylib
Referenced from: /usr/local/bin/sos
Reason: no suitable image found. Did find:
/opt/local/lib/libexpat.0.dylib: mach-o, but wrong architecture
Trace/BPT trap

Intel Transition

There’s one very big difference between the transition from PowerPC to Intel and the transition from 68K to PowerPC, which may make it more difficult for many people. With the first transition, it was possible for code to switch between architectures, so you can use 68K plug-ins in a PPC application & vice versa. The Code Fragment Manager was able to handle cross-architecture calls.

However that’s not the case with Rosetta. You can’t call code written in one architecture from the other, so you can’t use PPC plug-ins with a native x86 application. So even when a major application like PhotoShop goes native, anyone who still needs to use a non-native plug-in is stuck running it in Rosetta.

Intel Mac performance

I should receive my new iMac tomorrow, so my tests were done on my DTK. Several sites have done performance tests showing the Intel iMac to be slower than a G5. However, anyone using a G4 (as I am) will see a big speedup with an Intel mac. I use a PowerBook as my primary system, so I’m forced to use a lower-performance G4. If and when I get a MacBook, it will outperform my PowerBook by a huge margin.

I did some very crude tests running a small command line program that writes some system information to a file and timing it using time. Even running in emulation, the DTK is faster than my PowerBook.

On my PowerBook:
[mike: Development]$ time ./inventory >/tmp/invreal 0m0.642s
user 0m0.006s
sys 0m0.046s

On the DTK, native version:
[mike: Development]$ time ./inventory >/dev/null

real 0m0.031s
user 0m0.005s
sys 0m0.012s

Emulated version on the DTK:
[mike: Development]$ time ./inventoryppc >/tmp/inv

real 0m0.368s
user 0m0.090s
sys 0m0.045s