Skip to main content
Home Forums 68kMLA implementing Carbon — #2
Post #2 by porter
Source Forum68kMLA
CategoryDevelopment
Post DateFri, 31 Jul 2009 - 01:02
Original URLhttps://68kmla.org/bb/threads/implementing-carbon.18131/
Post
would that be enough to run classic Mac apps natively on 68k/PPC *nix, in the same vein as WINE?
Only if they are already Carbon applications, there never was a carbon for 68k.

classic 68k programs call trap instructions to get into the toolbox

68k CFM and PPC CFM applications call via "InterfaceLib" and other libraries.

So a 68k binary isn't going to give a damn about your CarbonLib it will just trap away and crash if there is no Mac ROM or emulator.

PPC CFM Carbon applications call the CFM CarbonLib

PPC Mach-o Carbon applications call a Mach-O CarbonLib

Code:
$ otool -L browserx
browserx:
       /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 122.0.0)
       /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 88.1.12)

$ lipo -info /System/Library/Frameworks/Carbon.framework/Versions/Current/Carbon
Non-fat file: /System/Library/Frameworks/Carbon.framework/Versions/Current/Carbon is architecture: ppc
Does Carbon work natively on i386? Can somebody with an Intel mac tell us if the carbon framework has any intel implementation?

There is an architectural difference between CFM PPC and Mach-o PPC. Basically the Darwin Mach-o people stuffed up the PPC runtime model by trying to treat a RISC CPU as a CISC one. The PPC-CFM one is more correct because it originally used the AIX compiler tool set, so they did the calling conventions in a RISC efficient manner.

So in answer to your question, if you happen to have lying about a Carbon Application compiled for i386 then you could run it on any other i386 box if you implemented the CarbonLib and could load and runtime link Mach-o i386 modules.

mp.ls