Running x86 apps on WinRT devices

I'm presenting a tool that allows running x86 Windows applications on Windows RT (ARM) tablets. The tool emulates x86 instructions and passes Windows API calls to WinRT kernel with necessary modifications. 

The tool have reached the beta version. Now it has an installer and a GUI launcher, speed and the number of the emulated Windows API function increased, but it is still very far from being perfect. 

This tool supports only 32-bit windows native applications. It would not allow you to run drivers, .NET apps, Win16 or DOS programs. 

Instructions:
1. Unlock your device with this tool:  http://forum.xda-developers.com/show....php?t=2092158
2. Install the MSI file
3. Run the "Launch x86 program" from the start menu
4. Browse for an x86 EXE file and press "Ok" to run it. The launcher would be minimized to tray, you may exit it any time.
If everything goes fine - you'll see a black console window of "Peloader.exe" and after a few moments your program would run. If it does not - see the notes below.

The tool is a beta version. So it may crash or hang, and is incompatible with lots of programs. These programs are tested to work:
- WinRar
- 3D Pinball "Space Cadet" from Windows 95. Known problem: no sound
- Heroes of Might and Magic 3 with 32-bit patch. HD mod is compatible too, see this video:  http://youtu.be/3uzjV406nVs. Known problem: no music. And I'll recommend to turn off all sounds to increase speed.
- "7zG.exe b" - a 7Zip benchmark. "b" here is a command line parameter.
- Lots of tiny simple progs.
Sometimes emulated program may crash immediately at start. I'm looking for the reason, just restart it in this case.

Plans:
- Automatic emulation of x86 programs, so the launcher would not be needed.
- Fix known bugs, increase stability, add more API, ...

Notes:
The program keeps its settings in the HKCU\Software\x86node\Settings registry key. Supported REG_SZ (string) values are:
DosboxCore: "dynamic", "simple" or "normal". 
LogFile: path to the log file. If not present - log files are created in %temp%\yact_%pid%.log
Supported REG_DWORD values:
LogLevel: 0=no log (default), 4=max logging

There are several compatibility hacks that may be useful. Compatibility settings are stored in HKCU\Software\x86node\Compatibility\[filename.exe] key. "filename.exe" - a name of the emulated EXE file without path. All values are DWORD:
SetProcessAffinityMask = bitmask. Specify which CPUs to use for running a program, read SetProcessAffinityMask description in MSDN. 0 or unset == run on all cores.
NoRaiseException = 1. RaiseException would just return. Now exceptions are emulated correctly, so this hack is no longer needed.
UseDirectRegistry = 1. Do not redirect emulated registry keys to HKCU\Software\x86node. Be careful when using it.
MaxProcessorFeaturePresent = max processor feature number that is "supported". See the IsProcessorFeaturePresent function in MSDN. All requests for the value above specified would return 0. Default: 0 (IsProcessorFeaturePresent always returns 0).

Hints
If the program does not run - create the LogLevel=4 and a LogFile="log file name" registry keys in HKCU\Software\x86node\Settings, then look in the log file. It may provide useful information, for example the name of the missing DLL. In this case you may try to get that DLL from the old Windows version (NT4 or 2000), Windows XP and later DLLs may require the functions that are not emulated yet.
Or you may post the program name here, and I may look on it myself. I don't promise that I would check the every program, but I'll try to fix problems with the most popular ones.

Some programs, like Heroes of Might and Magic 1 and 2, require registry keys to be set. You need to edit desktop .REG files before importing them on device and manually change all HKEY_LOCAL_MACHINE keys to "HKCU\Software\x86node\HKLM" and HKEY_CURRENT_USER to "HKCU\Software\x86node\HKCU". Or, better, use x86 regedit.exe from NT4 (newer versions may work too but not tested) to import unmodified .REG files, the keys imported by x86 programs would be redirected automatically.

Some information on the project internals may appear in my blog:  http://mamaich-eng.blogspot.ru, but this thread on XDA would be the main discussion place.

Changes:
10 feb 2013: now the program reached the beta stage.
11 feb 2013: fixed a typo in winmm.dll emulation, now pinball has sound. Extract winmm.nt.dll.zip to "c:\Program Files\win86emu\SystemNT" dir overwriting the old file. Also attached the updated launcher, now it writes more information in the case it can't run a program. Extract Launcher.exe.zip to "c:\Program Files\win86emu\" over the old file.
ATTACHED FILES
win86emu.msi.zip - [Click for QR Code] (5.76 MB, 121 views)
winmm.nt.dll.zip - [Click for QR Code] (8.0 KB, 2 views)
Launcher.exe.zip - [Click for QR Code] (1.69 MB, 1 views)
以上内容转自XDA-developers,原文网址:http://forum.xda-developers.com/showthread.php?t=2095934
拥有win RT设备的朋友们可以试一下,希望对win8开发的朋友有帮助

你可能感兴趣的:(device)