PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Emulate Windows Games?

Is there any way you can emulate windows or something on the PPC, so you could bring over regular Windows 98/XP games, smaller ones, and have them run?
No, the processors are totally different and so binary code from one can't run on the other. PPC's are too slow to emulate x86's well; after all, they can only barely pull off SNES emulation.

However, you could try installing Windows 1.0 or 2.0 on top of PocketDOS, which emulates an 8086 (the earliest in the x86 family). However, that won't enable you to run any Win98/XP games.
Really? Thats wierd. Even though it runs at 400 mhz its a different speed then desktop PCs I see. Oh well...

Thanks very much.
I'm not entirely convinced by this whole "Pocket PC's are too slow to run Windows games" thing.

Although anything in the last 5 years might be out of reach in speed terms, there's no reason why early DirectX games (95-97) couldn't run acceptably.

Rather than emulate the whole PC, the best approach would surely be to develop a "DirectX application emulator", allowing DirectX applications to be loaded and executed directly by the emulator, without the memory & performance overhead of the underlying emulated Win9x operating system.

Such an emulator would implement a bare-bones "Windows kernel emulator" to provide message routing, timing and so on, along with a subset of the Win32 API (file services, DirectX) in Pocket PC native code for speed purposes. Applications making calls to the API would be redirected to the native PPC API.

Compatibility of such an emulator would be somewhat hit-and-miss, and would possibly require patches to certain games, in a similar way to UltraHLE in the early days of N64 emulation.

The x86 machines are fast and complex to emulate, but Virtual PC for the Mac has demonstrated that it is possible to run Windows DirectX games at an acceptable speed on an alien architecture through (admittedly rather complex) dynamic recompilation.

And before anybody asks - I'm not going to take on this project anytime soon... but I'm am currently working on something in a similar vein but rather less ambitious... :D
I think you're slightly overestimating the power of a PPC.

Yes, Virtual Mac does work very well; however keep in mind that while the PowerPC and x86 were only designed to be powerful, the ARM was designed to be cheap and power-saving.

That means that even at the same clock speed, normal PC's are VASTLY superior to PPC's. Not to mention that no PPC's have FPU's.

Do you think your 400 MHz PPC can beat my 233 MHz Thinkpad in any speed test? No.

Or, look at it this way: Right now, PPC's are only good enough to emulate computers (I'm not talking about consoles) that are 20 or so years old.
Actually my 206mhz iPaq beat my P1 CPU in the pi testing application that was released for several platforms (PC included)

But then again, my P233 can't run Quake 3 anymore, even after a fresh reinstall, when it used to be able to.
Do you think your 400 MHz PPC can beat my 233 MHz Thinkpad in any speed test? No.


Wanna bet on that? (Your use of the word "any" is knid of silly, IMHO).

It depends entirely on what you're testing. I could make an application that clearly showed that a 400MHz XScale would take your ThinkPad to the cleaners (knowing how ARM code is "nicer" than X86 code has its little advantages)...

.. conversely, I could make an application that showed that the Thinkpad walked all over the 400MHz XScale.

Just for the record, I think that X86 emulators will be too slow to emulate even "early" DirectX games. Recompiled natively they have a chance, but with an abstraction layer in between and a dynarec, I don't think it'll be fast enough (I'd be happy to be proved wrong though).
sponge wrote:
Actually my 206mhz iPaq beat my P1 CPU in the pi testing application that was released for several platforms (PC included)

But then again, my P233 can't run Quake 3 anymore, even after a fresh reinstall, when it used to be able to.


OK, fine... so the ARM is faster when calculating pi.

Oh wait, remember that my Thinkpad has a PII; thus it has a different architecture than that PI you were talking about.
There was a significant difference in speeds. I'm somewhat doubtful that the P2 would be that much faster than a P1 MMX. In any case, it is far from saying that the P2 would beat the PPC in ANY test.

I believe the program was called PiCalc.. not that would help in finding it though :P
OK, correct me if I'm wrong, but:

The PI's architecture can do 2 instructions every clock.

The PII's architecture can do 3.

So theoretically, the PII's raw MIPS is 3/2 that of the PI's.
(TSC)Bender · 16 Oct 2002, 00:31 UTC
There was a major speed difference between P1 and P2. My 233 mhz P1 and my moms 300 mhz P2 had nearly twice the fps of my P1 in most games. My computer even had a better video card.
Weird how they stink at emulating older PCs, but they can emulate GBAs(same bit as PSX) and can play some nice PPC graphical games.
It's not weird:

1. The GBA uses an ARM; thus, no processor emulation is required.

2. The PSX isn't very powerful.

And again, for native PPC graphical games, no emulation is required.

Emulating a 486 at full speed, though...
No, but looking at them graphically.

You can run wicked 3d games, but using a DOS emulator you can't play Commander keen above 1 FPS.

Funny
1. The GBA uses an ARM;


Yes it does.

thus, no processor emulation is required.


Yes it is. The GBA's ARM7's Thumb instruction set needs emulating, for one thing..


It's not all that strange that emulation of a DOS machine is slow - the X86 processors were/are horrid things to emulate. If you think about the hoops the ARM has to jump to just to plot a single pixel under emulation, you'll realise why it's so slow.
7 random discussion-provoking reasons why DOS/8086 emulation is slow and complex (from painful experience):

- Every memory reference needs to be converted to an absolute address from a segment and offset.
- Most instructions use a mod r/m byte containing register and memory information, which must be spilt into 3 individual components, each of which must be interpreted.
- Most instructions have different opcodes for 8bit and 16bit operations.
- Some opcodes refer to further groups of instructions. The instruction to be executed depends on a value taken from the above mod r/m byte.
- Instructions may contain a segment override, changing the segment to which the following instruction refers.
- Most instructions modify the auxiliary flag, which is a bitch to calculate manually (please correct me if I'm wrong).
- Because the OS has no control whatsoever over memory management (in real mode at least), there's no way of knowing what random memory addresses have been written to at any given moment. I wouldn't want to be the person assigned to write a dynarec for this thing.

Other Reasons why DOS games run slowly under a DOS emulator

I would imagine that most console emulators get their speed from emulating the graphics hardware at a high level. For example, the Mode7 graphics in the SNES would be emulated using native code for the host processor that replicated the effect of the Mode7 hardware.

There is no custom graphics hardware in the PC (at least in earlier models) - every pixel must be plotted individually by the emulation.

The EGA is capable of some primitive "graphics accceleration", but is also one of the most ridiculously over-complex graphics chipsets in existence. It is also organized in bitplanes.

I suppose the VGA also contains some graphics acceleration as shown by the numerous Amiga-style copper demos that appeared in the early 90's. My point is that the arcane nature of this hardware means that it hinders emulation rather than making it easier.

Most CGA modes and VGA mode 13h can thankfully, regardless of their internal organisation, be emulated quite nicely due to their linear organisation of pixels in memory.
refractor wrote:
Yes it is. The GBA's ARM7's Thumb instruction set needs emulating, for one thing..


Oh, didn't realize that... but what about all the other instructions? Wouldn't most of them just work?
Yeah - the instructions that don't need to use memory will be fine... well sort of. The problem is that even if you're running in on the same processor, you've somehow got to fit the emulator environment / graphics chip emulation in there too.

So you can't, for example, store any emulator information in registers and simply jump into some unmodified GBA ARM code because your registers get trashed...

For example, say you have a main game-loop from the GBA that uses all of the registers. How do you get the PocketPC to run that and return to the emulator? (Or rather, how do you do it "nicely" while emulating the clock-dependant hardware registers, etc).
use vRes :D

make an array of register values and problem solved.... kind of??$??? nah probally not, muh slower than actually using the main registers...