PearPC for OSX available

[ARCHIVED] About PearPC, a mostly obsolete PPC Mac emulator for Windows and Linux to run MacOS X 10.1 up to 10.4. Using QEMU is now recommended.

Moderators: Cat_7, Ronald P. Regensburg

t3rra
Student Driver
Posts: 11
Joined: Mon May 17, 2010 9:44 am

Post by t3rra »

I am not sure about the accuracy of my modification (which was real ugly hack) though I have finally got to the last linking stage but there is an error I am not beware of.. any idea?

...
...
...
gcc -DHAVE_CONFIG_H -I. -I.. -arch i386 -m32 -Wundef -Wall -fsigned-char -O3 -fomit-frame-pointer -mdynamic-no-pic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -pipe -MT ppc_button_changecd.o -MD -MP -MF .deps/ppc_button_changecd.Tpo -c -o ppc_button_changecd.o ppc_button_changecd.c
mv -f .deps/ppc_button_changecd.Tpo .deps/ppc_button_changecd.Po
g++ -DHAVE_CONFIG_H -I. -I.. -arch i386 -m32 -Wundef -Wall -Woverloaded-virtual -fsigned-char -O3 -fomit-frame-pointer -mdynamic-no-pic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -pipe -MT configparser.o -MD -MP -MF .deps/configparser.Tpo -c -o configparser.o configparser.cc
mv -f .deps/configparser.Tpo .deps/configparser.Po
g++ -arch i386 -m32 -Wundef -Wall -Woverloaded-virtual -fsigned-char -O3 -fomit-frame-pointer -mdynamic-no-pic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -pipe -L/usr/X11/lib -R/usr/X11/lib -o ppc main.o ppc_img.o ppc_font.o ppc_button_changecd.o configparser.o io/graphic/libgraphic.a io/ide/libide.a system/ui/x11/libui.a io/libio.a io/prom/libprom.a io/prom/fs/libfs.a io/prom/fs/hfs/libhfs.a io/prom/fs/hfsplus/libhfsplus.a io/pic/libpic.a io/pci/libpci.a io/macio/libmacio.a io/nvram/libnvram.a io/cuda/libcuda.a io/3c90x/lib3c90x.a io/rtl8139/librtl8139.a io/usb/libusb.a io/serial/libserial.a cpu/cpu_jitc_x86/libcpu.a debug/libdebug.a tools/libtools.a system/libsystem.a system/arch/x86/libsarch.a system/osapi/posix/libsosapi.a -lX11
ld: in cpu/cpu_jitc_x86/libcpu.a(jitc_tools.o), in section __TEXT,__text reloc 56: unsupported r_length=1 for scattered vanilla reloc
collect2: ld returned 1 exit status
make[3]: *** [ppc] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
t3rra
Student Driver
Posts: 11
Joined: Mon May 17, 2010 9:44 am

Post by t3rra »

gotten further and now I got:


Making all in tools
make[3]: Nothing to be done for `all'.
g++ -arch i386 -m32 -Wundef -Wall -Woverloaded-virtual -fsigned-char -O3 -fomit-frame-pointer -mdynamic-no-pic -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -pipe -L/usr/X11/lib -R/usr/X11/lib -o ppc main.o ppc_img.o ppc_font.o ppc_button_changecd.o configparser.o io/graphic/libgraphic.a io/ide/libide.a system/ui/x11/libui.a io/libio.a io/prom/libprom.a io/prom/fs/libfs.a io/prom/fs/hfs/libhfs.a io/prom/fs/hfsplus/libhfsplus.a io/pic/libpic.a io/pci/libpci.a io/macio/libmacio.a io/nvram/libnvram.a io/cuda/libcuda.a io/3c90x/lib3c90x.a io/rtl8139/librtl8139.a io/usb/libusb.a io/serial/libserial.a cpu/cpu_jitc_x86/libcpu.a debug/libdebug.a tools/libtools.a system/libsystem.a system/arch/x86/libsarch.a system/osapi/posix/libsosapi.a -lX11
Undefined symbols:
"entry", referenced from:
_ppc_dsi_exception_special_asm in libcpu.a(jitc_tools.o)
_ppc_isi_exception_asm in libcpu.a(jitc_tools.o)
_ppc_ext_exception_asm in libcpu.a(jitc_tools.o)
_ppc_program_exception_asm in libcpu.a(jitc_tools.o)
_ppc_no_fpu_exception_asm in libcpu.a(jitc_tools.o)
_ppc_no_vec_exception_asm in libcpu.a(jitc_tools.o)
_ppc_dec_exception_asm in libcpu.a(jitc_tools.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[3]: *** [ppc] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2



hmm.. why?
t3rra
Student Driver
Posts: 11
Joined: Mon May 17, 2010 9:44 am

Post by t3rra »

finally tracked down compile errors though I need to test and debug before I could upload exec file. :)
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Post by Cat_7 »

Hey, great! Looking forward to give it a try...

Best,
Cat_7
t3rra
Student Driver
Posts: 11
Joined: Mon May 17, 2010 9:44 am

Post by t3rra »

it starts, selects boot disk and tries to load boot file then (it seems) after few codes in assembly file which is jitc part, it just dies with segfaults.

...

getStartBlock: 0 Apple_HFS
getStartBlock: 1 Apple_HFS
getStartBlock: 2 Apple_HFS
getStartBlock: 3 Apple_HFS
getStartBlock: 4 Apple_HFS
getStartBlock: 5 Apple_HFS
getStartBlock: 6 Apple_HFS
getStartBlock: 7 Apple_HFS
getStartBlock: 8 Apple_HFS
getStartBlock: 9 Apple_HFS
Loading XCOFF...
[CPU/CPU] execution started at 05601028

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x7d5015ff
0x7d5015ff in ?? ()
(gdb)


It seems it tries to access invalid address..
t3rra
Student Driver
Posts: 11
Joined: Mon May 17, 2010 9:44 am

Post by t3rra »

Hi,

Somehow, #define gCPU(r) isn't working on OSX's assembler as the author intended. I assume that is because Apple has not updated GAS for a long while (version incompatibilities) When it is intended to return the address of the gCPU struct from C file, it only returns 0x00 and when the opcode tries to access the memory address it of course generates bad access exception.

In AT&T syntax I think I need to modify(adding few more lines for each access) alot to make it work. (I might not be correct since I am not good on assembly but actually I have experimented for alot of hours yet :( ) Could someone have experience with assembly on OS X? especially in intel syntax. Then please let me know what I should to to return the address of member of extern struct variable. In the code(cpu/cpu_jitc_x86/jitc_[mmu|tool].S), it tries like

#define gCPU(r) EXTERN(gCPU)+r

...
test byte ptr [gCPU(xer+1)], 1
...

Or same code in AT&T syntax would be alright. Possibly a one-liner.

I hope after fix those part that it would work as expected on OS X..
t3rra
Student Driver
Posts: 11
Joined: Mon May 17, 2010 9:44 am

Post by t3rra »

The problem is lying in the following (in src/cpu/cpu_jitc_x86/jitc_mms.S):

##############
## param1: 0 for read, 8 for write
## param2: data / code
#define tlb_lookup(rw, datacode) \
mov %edx, %eax; \
mov %ecx, %eax; \
shr %edx, 12; \
and %ecx, 0xfffff000; \
and %edx, TLB_ENTRIES-1; \
push %ebx; \ <- added by me
mov %ebx, [EXTERN(gJITC)+tlb_##datacode##_##rw##_eff+%edx*4]; \ <- added by me for test
; #cmp %ecx, [gJITC(tlb_##datacode##_##rw##_eff + %edx*4)]; \ <- commented by me
cmp %ecx, %ebx; \ <- added by me
pop %ebx; \ <- added by me
jne 1f; \
/* \
* if a tlb entry is invalid, its \
* lower 12 bits are 1, so the cmp is guaranteed to fail. \
*/
...
..
.

the commented line; cmp %ecx, [gJITC(tlb_##datacode##_##rw##_eff + %edx*4)];
should AFAIK produce code in att syntax like cmp 0x00745db0(3, %edx, 4), %ecx
but instead it produces, according to shown up in gdb, something like cmp 0x0(, %edx, 4), %ecx
ends up trying to reference to memory address at 0x00000004 which would cause seg fault for certain.

I also have tried use lea opcode to get address of gJIT and adding up the values and compare but same result.
I could work around by converting into at&t syntax and modify a lot but it would consume too much time I think.
Anyone could help on this?



the following is the part of the frame disassembled on gdb:
...
...
...

Loading XCOFF...
[CPU/CPU] execution started at 06601c28

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000004
0x000745e1 in ppc_effective_to_physical_code () at data.h:658
658 class Queue: public LinkedList {
(gdb) disassemble
Dump of assembler code for function ppc_effective_to_physical_code:
0x000745d0 <ppc_effective_to_physical_code+0>: mov %eax,%edx
0x000745d2 <ppc_effective_to_physical_code+2>: mov %eax,%ecx
0x000745d4 <ppc_effective_to_physical_code+4>: shr $0xc,%edx
0x000745d7 <ppc_effective_to_physical_code+7>: and $0xfffff000,%ecx
0x000745dd <ppc_effective_to_physical_code+13>: and $0x1f,%edx
0x000745e0 <ppc_effective_to_physical_code+16>: push %ebx
0x000745e1 <ppc_effective_to_physical_code+17>: mov 0x0(,%edx,4),%ebx
0x000745e8 <ppc_effective_to_physical_code+24>: testb $0x20,0x0
0x000745ef <ppc_effective_to_physical_code+31>: jne 0x745f7 <ppc_effective_to_physical_code+39>
...
..
.
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Post by Cat_7 »

Hi,

Just to let you know you're not on your own: I would love to help, but I have no programming skills at all.

Good luck,
Cat_7
t3rra
Student Driver
Posts: 11
Joined: Mon May 17, 2010 9:44 am

Post by t3rra »

I have been busy and might will be for a week or more so I have done much since. However, the Apple's outdated fork of GNU assembler makes it almost impossible to compile the JIT version of PearPC correctly. Yasm's conversion feature doesn't help either in this case. I found no reference on how to use NASM with GCC for the replacement of GAS (may never work anyway I guess). If it nearly is impossible, I feel better leave it off where it is now or something sadly. I wonder if Qemu is going to get support for OS X on PPC emulation soon..
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Post by Cat_7 »

Hi,

Sorry to hear that it seems so complicated to translate the assembly. I always thought it was a question of translating the syntax to intel, but there you go: I know nothing of those things...

Best,
Cat_7
t3rra
Student Driver
Posts: 11
Joined: Mon May 17, 2010 9:44 am

Post by t3rra »

Because the later versions of GNU Assembler added many new features and PearPC depends on some of those features, the version incompatibility is quite a hurdle to overcome to compile PearPC on OS X. It isn't un-do-able though not an easy task unless someone who is an expert on assembly syntaxes is involving I think.
nirvanai
Space Cadet
Posts: 2
Joined: Thu Dec 30, 2010 11:14 am

Post by nirvanai »

I've successfully compiled PearPC with jitc enabled for OSX. I haven't had much chance to test it yet, so I'm not making any promises, but it starts up fine for me on Snow Leopard.

t3rra was on the right track about AT&T syntax, since Apple's assembler has a horrible bug with backward jumps in Intel syntax. The other issue was the missing ".struct" pseudo-op, which I think I replaced with an equivalent. Again, I haven't tested this very extensively, so let me know if things that should work aren't.

The binaries are here. All the OP's instructions apply regarding what you need and how to run it.

For those who wish to compile this themselves, do the following (you'll need Developer Tools installed of course):
  • 1. Get the latest PearPC code from sourceforge.
    2. Download my patch from here and drop it in the root pearpc directory you just checked out.
    3. From that directory, apply the patch like so:

    Code: Select all

    patch -p0 < jitc_x86_osx_host.patch 
    
    4. Run:

    Code: Select all

    ./autogen.sh
    5. Then:

    Code: Select all

    ./configure
    6. And last but not least:

    Code: Select all

    make
Cheers!
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Post by Cat_7 »

Hi,

That sounds great!
I'm going to try tonight or tomorrow. I'll report back.

Best,
Cat_7
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Post by Cat_7 »

Hello,

I didn't say my welcome yet, so here it is: Welcome at our forum.
I tried both your executable and rolling my own. Compiling works fine, but execution doesn't. I tried to run both in 32 and 64 bit. This is the crash report:

Process: ppc [15067]
Path: /Users/hsp/pearpc/ppc
Identifier: ppc
Version: ??? (???)
Code Type: X86 (Native)
Parent Process: bash [15064]

Date/Time: 2011-01-01 01:52:44.123 +0100
OS Version: Mac OS X 10.6.5 (10H574)
Report Version: 6

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: 0x000000000000000d, 0x0000000000000000
Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 libSystem.B.dylib 0x9989ff30 misaligned_stack_error_ + 0
1 ppc 0x000b6406 x86dis::str_format(char**, char const**, char*, char*, char**, int*, char, int) + 582

Thread 1:
0 libSystem.B.dylib 0x99927a7e poll$UNIX2003 + 10
1 libX11.6.dylib 0x001952ad _XWaitForWritable + 202
2 libX11.6.dylib 0x00195640 _XSend + 483
3 libX11.6.dylib 0x00189fd6 PutSubImage + 3621
4 libX11.6.dylib 0x0018a086 PutSubImage + 3797
5 libX11.6.dylib 0x0018a4a6 XPutImage + 854

Thread 2:
0 libSystem.B.dylib 0x998c20a6 __semwait_signal + 10
1 libSystem.B.dylib 0x998c1d62 _pthread_cond_wait + 1191
2 libSystem.B.dylib 0x998c39f8 pthread_cond_wait$UNIX2003 + 73
3 ppc 0x000d1a16 sys_wait_semaphore(void*) + 22
4 libSystem.B.dylib 0x998c16e2 thread_start + 34

Thread 0 crashed with X86 Thread State (32-bit):
eax: 0x00000b45 ebx: 0xbffff5b0 ecx: 0x0000002c edx: 0x000d9488
edi: 0x00000023 esi: 0xbffff668 ebp: 0xbfffed94 esp: 0xbfffed2c
ss: 0x0000001f efl: 0x00010292 eip: 0x9989ff30 cs: 0x00000017
ds: 0x0000001f es: 0x0000001f fs: 0x00000000 gs: 0x00000037
cr2: 0x0011d540

Binary Images:
0x1000 - 0x104ffb +ppc ??? (???) <E5FDBD37-B8BE-974A-2C06-DD0F34F30E97> /Users/hsp/pearpc/ppc
0x174000 - 0x268ff7 +libX11.6.dylib 9.0.0 (compatibility 9.0.0) <B66EB198-3F7F-21DD-50FA-401355AC74D5> /usr/X11/lib/libX11.6.dylib
0x28a000 - 0x28bff7 +libXau.6.dylib 7.0.0 (compatibility 7.0.0) <CF7C13D2-4C5A-37FC-AAF6-7EAB42BCF8AF> /usr/X11/lib/libXau.6.dylib
0x28f000 - 0x291fe7 +libXdmcp.6.dylib 7.0.0 (compatibility 7.0.0) <875B1065-7288-E1DB-CA6C-6FDFCB762407> /usr/X11/lib/libXdmcp.6.dylib
0x8fe00000 - 0x8fe4162b dyld 132.1 (???) <A4F6ADCC-6448-37B4-ED6C-ABB2CD06F448> /usr/lib/dyld
0x9093e000 - 0x909a8fe7 libstdc++.6.dylib 7.9.0 (compatibility 7.0.0) <411D87F4-B7E1-44EB-F201-F8B4F9227213> /usr/lib/libstdc++.6.dylib
0x97a60000 - 0x97a63fe7 libmathCommon.A.dylib 315.0.0 (compatibility 1.0.0) <1622A54F-1A98-2CBE-B6A4-2122981A500E> /usr/lib/system/libmathCommon.A.dylib
0x99893000 - 0x99a3aff7 libSystem.B.dylib 125.2.1 (compatibility 1.0.0) <62291026-D016-705D-DC1E-FC2B09D47DE5> /usr/lib/libSystem.B.dylib
0xffff0000 - 0xffff1fff libSystem.B.dylib ??? (???) <62291026-D016-705D-DC1E-FC2B09D47DE5> /usr/lib/libSystem.B.dylib
nirvanai
Space Cadet
Posts: 2
Joined: Thu Dec 30, 2010 11:14 am

Post by nirvanai »

Thanks for the welcome and for testing this out! First of all, don't even try 64-bit. PearPC sources make a lot of assumptions that make it 32-bit only in its current form.

The crash report doesn't seem to have anything to do with jitc, and the line "misaligned_stack_error_" seems very odd to me. Was this the version you compiled or from my binary? Please explain a little more about the circumstances of the crash. It looks like you're also running OSX 10.6.5, and on my machine the PPC window appears with the boot menu. Does this crash happen for you after emulation starts, or before you even see the window appear? Thanks for your help!
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Post by Cat_7 »

Hi,

The crash appears both in your executable and my own (I recompiled and run in 32 bit mode). I tried running from the X bash terminal and from the normal terminal. If I use the PPC PROM environment, which shows up correctly, the keyboard doesn't allow me to select my bootable partition, so I set boot to automatic. (the "1" I need is under the letter "d" and I haven't even found the key corresponding to "Enter" ;-) )
My old ppc executable without jit does run without problem with my hard disk image, but also has problems with the keyboard setup.
What I get: after I enter the command below, I see the ppc prom window appear for a split second (due to the boot automatic setting) and then this appears:

./ppc ppccfg.txt
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as published by
the Free Software Foundation.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA

[PPC/VEC] Vector Address: 00127050
GenuineIntel
CMOV MMX SSE SSE2 SSE3
[CPU/MMU] new pagetable: sdr1 = 0x00300003
[CPU/MMU] new pagetable: sdr1 accepted
[CPU/MMU] number of pages: 2^15 pagetable_start: 0x00300000 size: 2^18
start: 512
start: 32768
getStartBlock: 0 Apple_Free
getStartBlock: 1 Apple_Free
getStartBlock: 2 Apple_Free
getStartBlock: 3 Apple_Free
start: 134250496
getStartBlock: 0 Apple_HFS
getStartBlock: 1 Apple_HFS
getStartBlock: 2 Apple_HFS
getStartBlock: 3 Apple_HFS
start: 2147450880
getStartBlock: 0 Apple_Free
getStartBlock: 1 Apple_Free
getStartBlock: 2 Apple_Free
getStartBlock: 3 Apple_Free
getStartBlock: 0 Apple_HFS
getStartBlock: 1 Apple_HFS
getStartBlock: 2 Apple_HFS
getStartBlock: 3 Apple_HFS
Loading XCOFF...
[CPU/CPU] execution started at 05600adc
Segmentation fault

A successful run with the generic version shows this:

./ppc_generic ppccfg.txt
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as published by
the Free Software Foundation.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA

[CPU/CPU] <Warning> You are using the generic CPU!
[CPU/CPU] <Warning> This is much slower than the just-in-time compiler and
[CPU/CPU] <Warning> should only be used for debugging purposes or if there's
[CPU/CPU] <Warning> no just-in-time compiler for your platform.
[CPU/MMU] new pagetable: sdr1 = 0x00300003
[CPU/MMU] new pagetable: sdr1 accepted
[CPU/MMU] number of pages: 2^15 pagetable_start: 0x00300000 size: 2^18
start: 512
start: 32768
getStartBlock: 0 Apple_Free
getStartBlock: 1 Apple_Free
getStartBlock: 2 Apple_Free
getStartBlock: 3 Apple_Free
start: 134250496
getStartBlock: 0 Apple_HFS
getStartBlock: 1 Apple_HFS
getStartBlock: 2 Apple_HFS
getStartBlock: 3 Apple_HFS
start: 2147450880
getStartBlock: 0 Apple_Free
getStartBlock: 1 Apple_Free
getStartBlock: 2 Apple_Free
getStartBlock: 3 Apple_Free
getStartBlock: 0 Apple_HFS
getStartBlock: 1 Apple_HFS
getStartBlock: 2 Apple_HFS
getStartBlock: 3 Apple_HFS
Loading XCOFF...
[CPU/CPU] execution started at 05600adc
[CPU/OPC] <Warning> read from spr 25:31 (L2CR) not supported! (from 000923e0)
[CPU/MMU] new pagetable: sdr1 = 0x1fe0001fr: 00000004
[CPU/MMU] new pagetable: sdr1 accepted
[CPU/MMU] number of pages: 2^18 pagetable_start: 0x1fe00000 size: 2^21
[CPU/OPC] <Warning> read from spr 25:31 (L2CR) not supported! (from 006204d8)
[IO/CUDA] <Warning> keyb reg1c: 0063aa97 lr: 00000000
[IO/IDE] <Warning> command STANDBY_IMMEDIATE stub00000
[IO/CUDA] <Warning> power down!: 000062bc lr: 00000000
XIO: fatal IO error 9 (Bad file descriptor) on X server "/tmp/launch-aB1wD9/org.x:0"
after 1340 requests (1340 known processed) with 0 events remaining.


Best,
Cat_7
andreas_g
Student Driver
Posts: 20
Joined: Thu Dec 02, 2010 5:50 pm
Location: Austria

Post by andreas_g »

I have the same problem using the jit version. When trying to boot from a 10.1.4 HD image i get this:

Code: Select all

[PPC/VEC] Vector Address: 000ee790
GenuineIntel
 CMOV MMX SSE SSE2 SSE3
[CPU/MMU] new pagetable: sdr1 = 0x00300003
[CPU/MMU] new pagetable: sdr1 accepted
[CPU/MMU] number of pages: 2^15 pagetable_start: 0x00300000 size: 2^18
start: 512
start: 196608
getStartBlock: 0 Apple_HFS
getStartBlock: 1 Apple_HFS
getStartBlock: 2 Apple_HFS
start: 2064379904
getStartBlock: 0 Apple_Free
getStartBlock: 1 Apple_Free
getStartBlock: 2 Apple_Free
getStartBlock: 0 Apple_HFS
getStartBlock: 1 Apple_HFS
getStartBlock: 2 Apple_HFS
Loading XCOFF...
[CPU/CPU] execution started at 01c00510
Segmentation fault

This is the corresponding crash report:

Code: Select all

Process:         ppc [1047]
Path:            /Users/####/Desktop/ppc
Identifier:      ppc
Version:         ??? (???)
Code Type:       X86 (Native)
Parent Process:  bash [1043]

Date/Time:       2011-01-02 12:22:04.360 +0100
OS Version:      Mac OS X 10.6.5 (10H574)
Report Version:  6

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: 0x000000000000000d, 0x0000000000000000
Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
0   libSystem.B.dylib             	0x98d2cf30 misaligned_stack_error_ + 0
1   ppc                           	0x000817e0 x86dis::str_format(char**, char const**, char*, char*, char**, int*, char, int) + 512

Thread 1:
0   libSystem.B.dylib             	0x98db491a writev$UNIX2003 + 10
1   libX11.6.dylib                	0x001b55fb _XSend + 414
2   libX11.6.dylib                	0x001a9fd6 PutSubImage + 3621
3   libX11.6.dylib                	0x001aa086 PutSubImage + 3797
4   libX11.6.dylib                	0x001aa4a6 XPutImage + 854

Thread 2:
0   libSystem.B.dylib             	0x98d4f0a6 __semwait_signal + 10
1   libSystem.B.dylib             	0x98d4ed62 _pthread_cond_wait + 1191
2   libSystem.B.dylib             	0x98d509f8 pthread_cond_wait$UNIX2003 + 73
3   ppc                           	0x000965a6 sys_wait_semaphore(void*) + 22
4   libSystem.B.dylib             	0x98d4e6e2 thread_start + 34

Thread 0 crashed with X86 Thread State (32-bit):
  eax: 0x00000acd  ebx: 0x00000023  ecx: 0x000a46ca  edx: 0x0000002c
  edi: 0x2aaaaaab  esi: 0x00000023  ebp: 0xbfffed14  esp: 0xbfffecac
   ss: 0x0000001f  efl: 0x00010296  eip: 0x98d2cf30   cs: 0x00000017
   ds: 0x0000001f   es: 0x0000001f   fs: 0x00000000   gs: 0x00000037
  cr2: 0x000819f0

Binary Images:
    0x1000 -    0xc2fff +ppc ??? (???) <3B80F119-D317-DDC1-66FA-DF02538995DC> /Users/andi/Desktop/pearpc_osx_generic/ppc
  0x194000 -   0x288ff7 +libX11.6.dylib 9.0.0 (compatibility 9.0.0) <B66EB198-3F7F-21DD-50FA-401355AC74D5> /usr/X11/lib/libX11.6.dylib
  0x2aa000 -   0x2abff7 +libXau.6.dylib 7.0.0 (compatibility 7.0.0) <CF7C13D2-4C5A-37FC-AAF6-7EAB42BCF8AF> /usr/X11/lib/libXau.6.dylib
  0x2af000 -   0x2b1fe7 +libXdmcp.6.dylib 7.0.0 (compatibility 7.0.0) <875B1065-7288-E1DB-CA6C-6FDFCB762407> /usr/X11/lib/libXdmcp.6.dylib
0x8fe00000 - 0x8fe4162b  dyld 132.1 (???) <A4F6ADCC-6448-37B4-ED6C-ABB2CD06F448> /usr/lib/dyld
0x92a72000 - 0x92adcfe7  libstdc++.6.dylib 7.9.0 (compatibility 7.0.0) <411D87F4-B7E1-44EB-F201-F8B4F9227213> /usr/lib/libstdc++.6.dylib
0x98d20000 - 0x98ec7ff7  libSystem.B.dylib 125.2.1 (compatibility 1.0.0) <62291026-D016-705D-DC1E-FC2B09D47DE5> /usr/lib/libSystem.B.dylib
0x990a4000 - 0x990a7fe7  libmathCommon.A.dylib 315.0.0 (compatibility 1.0.0) <1622A54F-1A98-2CBE-B6A4-2122981A500E> /usr/lib/system/libmathCommon.A.dylib
0xffff0000 - 0xffff1fff  libSystem.B.dylib ??? (???) <62291026-D016-705D-DC1E-FC2B09D47DE5> /usr/lib/libSystem.B.dylib

I am able too boot from this disc using the generic version with the identical configuration file.

But the generic version also suffers some very bad problems:
The keyboard is completely messed. (e.g. "enter" is 8, "delete" is e, "1" is d)
I have bad drawing issues on the guest system. Most icons are not drawn (no icons in the dock), buttons are not drawn correctly (missing edges), checkboxes are not drawn at all.
Also i have some other input issues; e.g. i can't click anything in finder windows (icons, toolbar, close/minimize/resize not clickable), same in sherlock.
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Post by Cat_7 »

Hi,

The icon drawing/menu bars issue used to point to the incomplete altivec-enabled (G4) emulation. Have you tried running with G3 emulation?
Might it also have to do with the 10.1.X system you are running? As you probably know, development was mainly aimed at 10.3/4

Best,
Cat_7
andreas_g
Student Driver
Posts: 20
Joined: Thu Dec 02, 2010 5:50 pm
Location: Austria

Post by andreas_g »

I did use the standard CPU emulation (did not specify PVR value in config file); default should be G3.
But "About this Mac" said it was running on PowerPC G4. After that i tried to specify G3 emulation within the config file, but i still got the same drawing issues.

Another issue i forgot to mention in the first post: The clock of the guest system is ticking much too slow.
ball
Student Driver
Posts: 16
Joined: Thu Jul 07, 2011 5:24 am

Post by ball »

Hey, glad I found you guys,

With Apple dropping support for Rosetta, this little project has suddenly become more important.

I don't know if I can dedicate much if any time to this, but I know a couple people who have various old Mac apps which need Classic or Rosetta working. Running Tiger/PPC on Lion should kill both birds with one stone.

My first plan was to run PearPC on wine, which I'll probably still try. Porting PearPC to run natively on OS X would be a preferable solution, however.
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Post by Cat_7 »

Welcome!,

Do I gather from your post that you are going to try to get JIT compiler to run on OSX?

Best,
Cat_7
ball
Student Driver
Posts: 16
Joined: Thu Jul 07, 2011 5:24 am

Post by ball »

I'm running Tiger on Snow Leopard just fine now, using wine.

This is a good solution for running either classic or ppc apps on Lion.
ElGuillermo
Student Driver
Posts: 11
Joined: Tue Jan 11, 2011 10:52 am
Location: France

Post by ElGuillermo »

Damn... Emulating a PowerPC machine on a simulated environment... Tricky stuff :)
Elgambitero
Space Cadet
Posts: 4
Joined: Mon Nov 07, 2011 5:21 pm

Re: PearPC for OSX available

Post by Elgambitero »

I'm very interested in this thread. Which is the latest compile of PearPc that you have running in OSX? And how is it that you have PowerPC emulation on Tiger in Snow Leopard using Wine?
How can you do those things? I thought that wine was only for linux...

Those proggraming tricks are a bit far from my knowlegdment, but I can make an effort to understand everything said in this thread. I have to put myself up to date on this thing because i'm very interested in any of the ways that could make it possible to emulate PowerPC.
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: PearPC for OSX available

Post by Cat_7 »

Hi,

The latest build of pearpc for OSX is in the first post in this thread. It is very slow, as it doesn't support running with the JIT compiler.
You can install Wine for OSX (see here: http://wiki.winehq.org/MacOSX/Installing)
That would allow you to run the pearpc version for windows which enables the JIT compiler.

Best,
Cat_7
Last edited by Cat_7 on Fri Nov 11, 2011 12:03 pm, edited 1 time in total.
Reason:  
Locked