Welcome, Guest. Please login or register.

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

Description:

0 Members and 1 Guest are viewing this topic.

Offline xeron

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 2533
    • Show only replies by xeron
    • http://www.petergordon.org.uk
Re: PowerPC emulation on x86 possible?
« Reply #14 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 only replies by xeron
    • http://www.petergordon.org.uk
Re: PowerPC emulation on x86 possible?
« Reply #15 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 bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show only replies by bloodline
    • http://www.troubled-mind.com
Re: PowerPC emulation on x86 possible?
« Reply #16 on: November 07, 2003, 11:00:32 AM »
Quote

Djole_ wrote:
Sysspeed just shows 2500 mips coz the JIT skips the fake instructions from Sysspeed so it thinks it's that fast..... same as on mos .... but the actuall speed is much lower.

Now don't get me wrong i never used UAE and never will but i just happen to know this....


Amiga emulation .... bah ... get a real Amiga....


Maybe SysInfo does, but I wrote my own speed tester that simply times how long it takes to execute 10000 loops of testing every 68K instruction in as many different addressing modes I could think of.  
I would be happy to send it to you.

The timer is a simple int5 (VBL) councter that counts up one every VBL, and treats every 60 as a second. As the VBL was tied to my GFXcards 60Hz, it should be very accurate.


Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show only replies by bloodline
    • http://www.troubled-mind.com
Re: PowerPC emulation on x86 possible?
« Reply #17 on: November 07, 2003, 11:10:06 AM »
Quote

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.


I think there is a language barrier there. You seem to think by exceptional I mean better than. I don't.

By exceptional, I mean that a PPC JIT should be able to perform very, very well (Since I don't know any figures, I won't embaress myelf trying to make any 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).

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

Offline xeron

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 2533
    • Show only replies by xeron
    • http://www.petergordon.org.uk
Re: PowerPC emulation on x86 possible?
« Reply #18 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 bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show only replies by bloodline
    • http://www.troubled-mind.com
Re: PowerPC emulation on x86 possible?
« Reply #19 on: November 07, 2003, 11:59:45 AM »
Quote

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.)


Well, I don't see there needs to be much over head with simple emulation of the instructions.
But I do agree the MMU (and Altivec etc...) is a totally different matter.

My mind set is that most programs don't know or care about the MMU, so if you are (for example) running an AROS PPC program on an AROS x86 system using a JIT then the CPU native OS, would take care of the MMU.*

*This argument applies ot Linux, BeOS etc...


-Edit- I'd love to try PPC emualtion out. But I know next nothing about the PPC (Tried to learn the ASM once but it was too boring, like x86), surely there must be someone here with the experience to make a test program.

Offline xeron

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 2533
    • Show only replies by xeron
    • http://www.petergordon.org.uk
Re: PowerPC emulation on x86 possible?
« Reply #20 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 itix

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 2380
    • Show only replies by itix
Re: PowerPC emulation on x86 possible?
« Reply #21 on: November 07, 2003, 12:30:30 PM »
Quote

Maybe SysInfo does, but I wrote my own speed tester that simply times how long it takes to execute 10000 loops of testing every 68K instruction in as many different addressing modes I could think of.


Can I have this? I'd like to check it out on MorphOS.
My Amigas: A500, Mac Mini and PowerBook
 

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show only replies by bloodline
    • http://www.troubled-mind.com
Re: PowerPC emulation on x86 possible?
« Reply #22 on: November 07, 2003, 12:36:57 PM »
Quote

itix wrote:
Quote

Maybe SysInfo does, but I wrote my own speed tester that simply times how long it takes to execute 10000 loops of testing every 68K instruction in as many different addressing modes I could think of.


Can I have this? I'd like to check it out on MorphOS.


Sure, just send an email to my openamiga AT ahsodit DOT com address and I'll send it to you.

-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.

Offline xeron

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 2533
    • Show only replies by xeron
    • http://www.petergordon.org.uk
Re: PowerPC emulation on x86 possible?
« Reply #23 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 lempkee

  • Hero Member
  • *****
  • Join Date: Apr 2002
  • Posts: 2860
    • Show only replies by lempkee
    • http://www.amigaguru.com
Re: PowerPC emulation on x86 possible?
« Reply #24 on: November 07, 2003, 02:00:13 PM »
this thread makes me sick
Whats up with all the hate!
 

Offline minator

  • Hero Member
  • *****
  • Join Date: Jan 2003
  • Posts: 592
    • Show only replies by minator
    • http://www.blachford.info
Re: PowerPC emulation on x86 possible?
« Reply #25 on: November 07, 2003, 02:16:42 PM »
Quote
Note that modern X86 processors (e.g. K6/K7/K8 and Pentium Pro/II/III/VI) translates X86 ISA into smaller RISC like instructions via HW decoder/translator before pumping it into the Post-RISC pipelines architecture.


I seem to remember writing a long article explaining why thet's really only a myth.  It looks that way at the high level but at the lower levels the original ISA adds a great deal of complexity that pretty much cannot be removed without either breaking compatibility or destroying performance.

I'd bet even Transmeta CPUs have hardware dedicated to the x86 ISA.

PPC Vs x86

Quote
Well, I don't see there needs to be much over head with simple emulation of the instructions.
But I do agree the MMU (and Altivec etc...) is a totally different matter.


But it's also involves emulation of the 32 registers using just 8 and somehow mapping the PPC FPU onto the x86 FPU which is a completely different design.  This is going to be amazingly complex and probably horribly slow due to constant cache thrashing - before even starting on Altivec or the FPU.

That said IIRC Motorola has a PPC emulator for the PC.
 

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show only replies by bloodline
    • http://www.troubled-mind.com
Re: PowerPC emulation on x86 possible?
« Reply #26 on: November 07, 2003, 02:26:09 PM »
Quote

xeron wrote:
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).


The Timer device just gave weird results in UAE. So I decided to use the VBL since I knew for sure that It would be at 60Hz (as this can be set on the latest version of WinUAE). It doesn't really matter how accurate it is, all one needs to know is that it's a lot.

@lempkee
Why not tell someone who cares, or even, and this might be a bit difficult for you, Don't read the threads that make you sick...
Hey why not do something positive and learn about the issues being disccused so that you can add something constructive?

Offline bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show only replies by bloodline
    • http://www.troubled-mind.com
Re: PowerPC emulation on x86 possible?
« Reply #27 on: November 07, 2003, 02:36:02 PM »
Quote

minator wrote:
Quote
Note that modern X86 processors (e.g. K6/K7/K8 and Pentium Pro/II/III/VI) translates X86 ISA into smaller RISC like instructions via HW decoder/translator before pumping it into the Post-RISC pipelines architecture.


I seem to remember writing a long article explaining why thet's really only a myth.  It looks that way at the high level but at the lower levels the original ISA adds a great deal of complexity that pretty much cannot be removed without either breaking compatibility or destroying performance.

I'd bet even Transmeta CPUs have hardware dedicated to the x86 ISA.

PPC Vs x86

Quote
Well, I don't see there needs to be much over head with simple emulation of the instructions.
But I do agree the MMU (and Altivec etc...) is a totally different matter.


But it's also involves emulation of the 32 registers using just 8 and somehow mapping the PPC FPU onto the x86 FPU which is a completely different design.  This is going to be amazingly complex and probably horribly slow due to constant cache thrashing - before even starting on Altivec or the FPU.

That said IIRC Motorola has a PPC emulator for the PC.


I have already given my Critique of the outdated, but  beautiful work of FUD that is the infamous CISC Vs RISC article. I won't rehash it here.

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, 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.

Note: acording to Transmeta, from when I Emailed them 2 years ago, the only "feature" that assisted in x86 emulation was that the Cruso was Little-Endien.

Offline xeron

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 2533
    • Show only replies by xeron
    • http://www.petergordon.org.uk
Re: PowerPC emulation on x86 possible?
« Reply #28 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 bloodline

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show only replies by bloodline
    • http://www.troubled-mind.com
Re: PowerPC emulation on x86 possible?
« Reply #29 from previous page: November 07, 2003, 02:58:20 PM »
Quote

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.



Yeah, I would bet the top of the range PPC970 would hold it's own against the equivilent speed AthlonXP (for example).

But I still think my price performance ratio holds.