Post Reply

[Beta] Win86emu: Running x86 apps on WinRT devices

OP mamaich

10th February 2013, 02:10 PM   |  #61  
OP Recognized Developer
Thanks Meter: 214
 
1,150 posts
Join Date:Joined: Apr 2004
Donate to Me
Quote:
Originally Posted by danthekilla

Any idea when you can drop a new version?

As I've promised earlier - I've updated the first post with a new build.
The Following User Says Thank You to mamaich For This Useful Post: [ View ]
11th February 2013, 09:06 AM   |  #62  
Member
Thanks Meter: 7
 
30 posts
Join Date:Joined: Oct 2011
Donate to Me
More
Glad to hear this has finally reached beta, but every time I try to run anything other than the H3 Demo file provided in previous versions, I get the "Error in the emulated program" message. Including HOMM3 Complete with the 32-bit patch or the HD patch set to 32-bit. I enabled full logging in the registry, and the file literally says "Logger initialised" and "Logger unloaded"
Last edited by WizardCM; 11th February 2013 at 09:10 AM.
11th February 2013, 01:01 PM   |  #63  
OP Recognized Developer
Thanks Meter: 214
 
1,150 posts
Join Date:Joined: Apr 2004
Donate to Me
Quote:
Originally Posted by WizardCM

Glad to hear this has finally reached beta, but every time I try to run anything other than the H3 Demo file provided in previous versions, I get the "Error in the emulated program" message. Including HOMM3 Complete with the 32-bit patch or the HD patch set to 32-bit. I enabled full logging in the registry, and the file literally says "Logger initialised" and "Logger unloaded"

"Error in the emulated program" means that there is a problem with a program you are trying to execute and emulator can't even start running it.
Here are the reasons: emulated EXE cannot be found or somehow is inaccessible (for example due to NTFS permissions), there is error in the file format (not x86 PE), loader can't find peldr.nt.dll (broken installation), or loader can't reserve memory. In the last case the peloader.exe would be relaunched 100 times and you'll see that it writes the line "Failed to reserve memory (0x%08x, %d) due to ASLR, please rerun the application". Normally it needs 1-3 peloader.exe restarts depending on the size of a program.

I've attached an updated launcher.exe that provides exact reason of the error. Replace the old one and try again.

One more note. If you don't specify log file name in registry - the log would be created in %temp% and there would be 2 log files. One for launcher and the second for the actual emulator.

edited: attached the file to the first post. Also fixed the no sound problem in pinball and some other programs.
Attached Files
File Type: zip Launcher.exe.zip - [Click for QR Code] (1.69 MB, 95 views)
Last edited by mamaich; 11th February 2013 at 01:51 PM.
11th February 2013, 02:17 PM   |  #64  
Member
Thanks Meter: 7
 
30 posts
Join Date:Joined: Oct 2011
Donate to Me
More
Quote:
Originally Posted by mamaich

"Error in the emulated program" means that there is a problem with a program you are trying to execute and emulator can't even start running it.
Here are the reasons: emulated EXE cannot be found or somehow is inaccessible (for example due to NTFS permissions), there is error in the file format (not x86 PE), loader can't find peldr.nt.dll (broken installation), or loader can't reserve memory. In the last case the peloader.exe would be relaunched 100 times and you'll see that it writes the line "Failed to reserve memory (0x%08x, %d) due to ASLR, please rerun the application". Normally it needs 1-3 peloader.exe restarts depending on the size of a program.

I've attached an updated launcher.exe that provides exact reason of the error. Replace the old one and try again.

One more note. If you don't specify log file name in registry - the log would be created in %temp% and there would be 2 log files. One for launcher and the second for the actual emulator.

edited: attached the file to the first post. Also fixed the no sound problem in pinball and some other programs.

Edit: actually, after closing the launcher in the notification area and re-running it, I get "Can't open emulated EXE file."
Edit2: Could it be spaces in the location of the exe? Going to test in a moment...
Edit2: Yep, that was the issue. New issue now though:
HOMM3:
Quote:

[2682B875]E: PeLdr can't open file: PSAPI.DLL
[2682B875]E: Import dll PSAPI.DLL not found
[2682B875]E: Import dll _HD3_.dll not found

Though _HD3_.dll does exist.

AOE2:
Quote:

Debugger detected. Unload the debugger and try again.

edit4:

These are the four dll's it requested before finally crashing



And here's a log file: http://txt.wizrd.tk/yact_0014dc.log

Hope it helps, it's almost 3am here. I'm heading to bed.
Last edited by WizardCM; 11th February 2013 at 03:44 PM.
11th February 2013, 02:37 PM   |  #65  
Junior Member
Saint-Petersburg
Thanks Meter: 4
 
25 posts
Join Date:Joined: Jan 2013
Strange, after I installed this program, my tablet became very buggy: screen resolution is dropping periodically to 1024x768, metro IE crashes, sudden freezes with black screen, even after reboot(without launching jailbreak, even). I realize, that its very improbable that it is your app, that causes this, but since yesterday, it was the only thing that changed. Also, nothing seems to run, keep getting infinite command prompts opening and then error, or the error alone. Will try logging and reinstalling.
11th February 2013, 08:48 PM   |  #66  
OP Recognized Developer
Thanks Meter: 214
 
1,150 posts
Join Date:Joined: Apr 2004
Donate to Me
Quote:
Originally Posted by WizardCM

Edit2: Could it be spaces in the location of the exe? Going to test in a moment...

You are right - spaces and quotes in the EXE file name are not supported - I'll fix that.
Quote:

[2682B875]E: PeLdr can't open file: PSAPI.DLL
[2682B875]E: Import dll PSAPI.DLL not found
[2682B875]E: Import dll _HD3_.dll not found
... Though _HD3_.dll does exist.

This means that _HD3_.dll can't be loaded due to PSAPI.DLL not found. There is a mistake in the error message, it should be "import dll xxx or some of its dependencies not found".
You may try to get psapi.dll from NT4 or 2K, but I don't think that it would work as it probably would depend on the not implemented kernel functions. I'll check that myself.
HD mod 2.98 is working.

I'll try to run AOE myself, would post the progress here.
11th February 2013, 08:53 PM   |  #67  
OP Recognized Developer
Thanks Meter: 214
 
1,150 posts
Join Date:Joined: Apr 2004
Donate to Me
Quote:
Originally Posted by l27_0_0_1

Strange, after I installed this program, my tablet became very buggy: ... even after reboot(without launching jailbreak, even). I realize, that its very improbable that it is your app...

Yes, it cannot be my app as it just can't run without jailbreak. And even after a jailbreak it does not make any changes in OS at all even in RAM.
Theoretically it is possible that some of the emulated apps may break something in the host OS registry - but registry redirection should prevent that from happening.
11th February 2013, 08:59 PM   |  #68  
OP Recognized Developer
Thanks Meter: 214
 
1,150 posts
Join Date:Joined: Apr 2004
Donate to Me
Quote:
Originally Posted by l27_0_0_1

...Also, nothing seems to run...

Try simple and old programs first. More modern ones may require the DLLs I have not implemented yet.
Regarding AOE and similar old games. Most of them require 256-color mode that is not supported on RT. After adding the missing DLLs, I'll need to emulate that mode manually, the work is in progress, but unfinished yet.
11th February 2013, 10:21 PM   |  #69  
Junior Member
Saint-Petersburg
Thanks Meter: 4
 
25 posts
Join Date:Joined: Jan 2013
So anyway, reinstalled the app, created a loglevel setting, tried running some programs that I miss from x86. Halite: requires msimg32.dll and probably some other ones, tried adding it to win86emu\system32, got errors("Import GdiTransparentBlt not found in" and some other GDI-related stuff) and another dll missing - WS2_32.dll. uTorrent: Can't open emulated .exe, no logs created.
old build of foobar2000:
Quote:

[001E926A]E: Import ordinal 74 not found in C:\Program Files\win86emu\System32\SHELL32.86.dll
[001E926A]E: Import ordinal 680 not found in C:\Program Files\win86emu\System32\SHELL32.86.dll

XnView: MSVFW32.dll not found.
mplayer: WS2_32.dll, avformat-53.dll not found
It would be great if you'd have ported WS2_32.dll and msimg32.dll. And thanks for the contribution to the winrt development, if you get this thing working, it would be super-awesome.
11th February 2013, 10:46 PM   |  #70  
OP Recognized Developer
Thanks Meter: 214
 
1,150 posts
Join Date:Joined: Apr 2004
Donate to Me
XnView and media player - they use OS codecs that are not present on RT. Ir is theoretically possible to use them through emulation - but speed would be too slow.
Regarding other apps - I'll test them, thank you for the list.

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Windows RT Development and Hacking by ThreadRank