Welcome, Guest. Please login or register.

Author Topic: PowerPC emulation on x86 possible?  (Read 19050 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline xeron

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 2533
    • Show all replies
    • http://www.petergordon.org.uk
Re: PowerPC emulation on x86 possible?
« on: November 06, 2003, 08:28:57 PM »
You can emulate a PowerPC on a 6502 if you want. It would run far too slow to be any use, but ;-)

Sure, the x86 can emulate PowerPC, just like PowerPC can emulate x86. Don't expect it to be as fast as the real thing, though.
Playstation Network ID: xeron6
 

Offline xeron

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 2533
    • Show all replies
    • http://www.petergordon.org.uk
Re: PowerPC emulation on x86 possible?
« Reply #1 on: November 06, 2003, 08:40:47 PM »
Quote

mdma wrote:
A 3GHz x86 CPU emulating a PPC has got to be faster than a 600MHz G3 or near enough same speed though.  Amithlon for OS4 anyone? ;-)


Your maths are likely to be somewhat wrong. The PowerPC is a relatively modern processor. Remember, clockspeed is not an indication of how powerful a processor is.
Playstation Network ID: xeron6
 

Offline xeron

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 2533
    • Show all replies
    • http://www.petergordon.org.uk
Re: PowerPC emulation on x86 possible?
« Reply #2 on: November 07, 2003, 10:53:30 AM »
Quote

mdma wrote:
Has anyone looked at the AVI's on that link I posted? It looks pretty fast to me.  Maybe it is a JIT emulator?


For starters the Gamecube processor (Gekko) is not a full spec PowerPC chip, and IIRC its not super fast either. I don't know how much cache it has onboard, or if you need to emulate the MMU for the Gamecube.
Playstation Network ID: xeron6
 

Offline xeron

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 2533
    • Show all replies
    • http://www.petergordon.org.uk
Re: PowerPC emulation on x86 possible?
« Reply #3 on: November 07, 2003, 10:56:54 AM »
Quote

bloodline wrote:
I see no reason why a PPC-JIT could not be make for an x86,


Of course not. There is no technical reason why you can't do that.

Quote

 and I would not be surprised if the Modern x86 gave exceptional performance.


This is where I disagree, depending on what you mean by "exceptional". x86 is faster than PowerPC, but only by a small margin. Remember when x86 and m68k were in the same league? Don't you remember how slowly PC-Task ran? The reason you can emulate 68k Amigas so fast is that the 68k range is so utterly behind x86.

I reckon you might get PowerPC 601 speeds on a fast x86. Of course this is blind conjecture, just like all the other estimates posted here.
Playstation Network ID: xeron6
 

Offline xeron

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 2533
    • Show all replies
    • http://www.petergordon.org.uk
Re: PowerPC emulation on x86 possible?
« Reply #4 on: November 07, 2003, 11:15:14 AM »
Quote

bloodline wrote:
up), probably giving a similar price performace ratio (ie an $800 x86 CPU+Mobo running a PPC JIT, may well perform the same as an $800 PPX + Mobo).


No language barrier there. I just disagree.

Quote

The modern x86 and PPC are not really as different as people here want them to be... With a JIT, things get really nice.


They don't have to be significantly different for emulation to cause an overhead. No matter how similar the design philosophy between two processors, it doesn't change the fact that every instruction has to be translated into several native instructions. The fact is that code targetted for PowerPC processors expects to get PowerPC level performance. I don't think you'll get that, even with JIT, right now, with a full PowerPC emulation (and by full, I mean with the MMU etc.)
Playstation Network ID: xeron6
 

Offline xeron

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 2533
    • Show all replies
    • http://www.petergordon.org.uk
Re: PowerPC emulation on x86 possible?
« Reply #5 on: November 07, 2003, 12:26:27 PM »
Right, well, I just think if you wrote, for example, a Power Mac emulator for windows, you'd get a fairly sluggish mac. Like VirtualPC on the Mac, it runs Windows 98, Office etc. quite happily but its not exactly speedy. I certainly don't think you'll get anything like a modern iMac.
Playstation Network ID: xeron6
 

Offline xeron

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 2533
    • Show all replies
    • http://www.petergordon.org.uk
Re: PowerPC emulation on x86 possible?
« Reply #6 on: November 07, 2003, 01:41:35 PM »
Quote

bloodline wrote:
-EDIT- I'm intregued to know how well it works on MOS! I don't think I used any harware specific stuff, but I do instal an interrupt handler in the VBL interupt... I assume this is emulated, and is at 50/60Hz or the results the program will gives are going to be wrong.


This is actually a pretty bad way to do it, since on Picasso96 VBL emulation is optional (and most people don't use 60Hz on SVGA monitors), on real Amigas the actual frequency depends on the TV format (PAL, NTSC, DBLPal, DBLNtsc, Multiscan etc.), and isn't likely to be particularily accurate on emulated systems.

A much better way would be to use timer.device, since on classic hardware it uses the CIA timers, and under OS4 (and presumably MOS) it uses the PowerPCs onboard timer.

At the end of the day there is no really accurate way to do it on both Amigas and UAE, since there are no particularily accurate timers in UAE (and I count the VBL into that).
Playstation Network ID: xeron6
 

Offline xeron

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 2533
    • Show all replies
    • http://www.petergordon.org.uk
Re: PowerPC emulation on x86 possible?
« Reply #7 on: November 07, 2003, 02:51:48 PM »
Quote

bloodline wrote:
As for the Register limits of the x86, I agree that will have a penalty, of course it will, but the x86 CPU's pump thorugh a lot more instructions that even the fastest PPCs do,


Uhh.. no, I think the PPC970 and Power 5 hold their own pretty well against the equivalent x86 chips. Even when you talk about the G3 and G4, the x86 doesn't "pump through" instructions quickly enough to emulate the PowerPC at real-world speeds. You won't get an x86 emulating a PowerPC keeping up with a Pegasos or AmigaOne. Not with high-end desktop x86 chips, anyway.

Quote

 and the x86's have rather nice large Caches. All in all I would say that a PPC JIT emulator on the x86  would be pretty neat.


It would be OK. I'm not denying that, but your price/performance guestimate of an $800 x86 PC keeping up with an $800 PowerPC board is just fantasy land.
Playstation Network ID: xeron6
 

Offline xeron

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 2533
    • Show all replies
    • http://www.petergordon.org.uk
Re: PowerPC emulation on x86 possible?
« Reply #8 on: November 07, 2003, 04:03:20 PM »
Quote

bloodline wrote:
But I still think my price performance ratio holds.


Well, speaking as someone who has written a few emulation cores, I think you're off in fantasy land as I said earlier.
Playstation Network ID: xeron6
 

Offline xeron

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 2533
    • Show all replies
    • http://www.petergordon.org.uk
Re: PowerPC emulation on x86 possible?
« Reply #9 on: November 07, 2003, 04:29:23 PM »
Quote

bloodline wrote:
I'm still interested in the technical aspects of this though. I don't doubt your technical prowess when it comes to emulation cores (what CPU's, if I may ask?).


Interpretive: Signetics 2650, Z80 and 6809 on 68000. Signetics 2650 on x86.
JIT: only theory, although I did write some test code that executed a small subset of 68000 on x86, which worked better than I expected.

Quote

But from what I have read, a Dynamic compilation could provide really good performance.


Really good is relative. Obviously it beats interpretive, as UAE and MorphOS prove, however the fastest 68000 is significantly slower than the average desktop x86 or PPC processor. The G3 and G4 PowerPC cores, however, are not only several orders of magnitude faster, but have a lot of registers and a totally different FPU to the x86. While the large cache on the x86 helps a lot, having to use memory as PowerPC registers is an overhead.

I'm not saying you can't push PowerPC code through an average desktop x86 quite quickly. As I stated elsewhere, you could probably run a wordprocessor on top of MacOS 9 or so and it would be a bit sluggish (Note: pure conjecture). But when you compare it to an actual G3 or G4, you just are not going to get the same sort of performance. Maybe with a high-end server chip, but your price/performance equation is out of the window by then.

All IMHO, of course.
Playstation Network ID: xeron6
 

Offline xeron

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 2533
    • Show all replies
    • http://www.petergordon.org.uk
Re: PowerPC emulation on x86 possible?
« Reply #10 on: November 07, 2003, 04:37:51 PM »
Quote

bloodline wrote:
@xeron
Side note, if you fancy earing a bit of cash, and playing around with a 68K JIT on the x86... then there is the AROS Emulation bounty open :-)


I never fancy doing anything that involves x86 assembly, even for cash. Besides, i'm somewhat busy organising an OS4 show, doing the websites for a UK AmigaOne dealer and a second hand guitar shop, and after that I'm going to start writing applications for OS4. Thats around my full-time job.
Playstation Network ID: xeron6
 

Offline xeron

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 2533
    • Show all replies
    • http://www.petergordon.org.uk
Re: PowerPC emulation on x86 possible?
« Reply #11 on: November 07, 2003, 04:38:40 PM »
Quote

bloodline wrote:
-Edit- I am willing to conceed that my Price performance ratio only holds until there is a low priced PPC970 board available... Pegasos2 for example.


But I was talking about G3s and G4s.
Playstation Network ID: xeron6