Desktop apps ported to Windows RT

Search This thread

Mantenner

Senior Member
Feb 15, 2012
84
18
Sydney
www.mantenner.webs.com
DOOM Source Code

I dont know about you guys, but i think it would be pretty amazing to get doom running on surface rt, considering this new jailbreak, here is the source code for doom 1 https://github.com/id-Software/DOOM

The guy who wrote the code said that this is for linux only, so i dont know how easy it would be to port, it also says you need an official copy of the game, so im not sure if that will be an issue too, but i was just wondering about this so i thought i'd post it up, sorry if i wasted any time

---------- Post added at 12:35 PM ---------- Previous post was at 12:32 PM ----------

I dont know if this could be ported, i found some source code here, not sure if its right or not, but its a wonderful game and im sure everyone would have a lot of fun playing it at one point or another, i noticed not many games have been ported, hope its good code :p http://www.mpgh.net/forum/478-terraria-hacks/417105-terraria-1-1-2-source-code.html
 

GoodDayToDie

Inactive Recognized Developer
Jan 20, 2011
6,066
2,933
Seattle
@Mantenner: discussion of pirating software, or links to pirate downloads, are forbidden here on XDA-Devs. We're a community of builders, not of takers.

That said, porting DOOM might be interesting even though I don't have the assets to run it; I'm sure somebody does and I believe there may exist some freely available assets for the game. The original was of course 16-bit, which won't run on RT (no NTVDM) but if it runs on Linux (also 32-bit, when it's not 64-bit) it's probably possible to port... unlikely to be easy, though.

I believe Terraria may already be open source, although I might have it confused with another game. In any case, if somebody wants to compile some open-source games, that would be awesome. Getting the SDL built on RT would enable a bunch of games... it would be a ton of fun to play something like Wesnoth on the Surface. Please choose your links somewhat more carefully, though. Not everything on the Internet is free for the taking (in fact, the majority of it isn't) and quite aside from consequences to yourself, you could cause problems for XDA-Developers and the rest of the community if the site becomes associated with piracy.
 

dawmail333

Member
Oct 31, 2009
20
8
@Mantenner: discussion of pirating software, or links to pirate downloads, are forbidden here on XDA-Devs. We're a community of builders, not of takers.

That said, porting DOOM might be interesting even though I don't have the assets to run it; I'm sure somebody does and I believe there may exist some freely available assets for the game. The original was of course 16-bit, which won't run on RT (no NTVDM) but if it runs on Linux (also 32-bit, when it's not 64-bit) it's probably possible to port... unlikely to be easy, though.

I believe Terraria may already be open source, although I might have it confused with another game. In any case, if somebody wants to compile some open-source games, that would be awesome. Getting the SDL built on RT would enable a bunch of games... it would be a ton of fun to play something like Wesnoth on the Surface. Please choose your links somewhat more carefully, though. Not everything on the Internet is free for the taking (in fact, the majority of it isn't) and quite aside from consequences to yourself, you could cause problems for XDA-Developers and the rest of the community if the site becomes associated with piracy.

Terraria is commercial. I would advise that it should NOT be ported for that reason.
If you own a licence to the game, feel free to compile it yourself, but I'm not sure how XNA will perform on RT.
 

dawmail333

Member
Oct 31, 2009
20
8
Just missing one thing for me in this list, the WinSCP would be great if Simone can port it on rt

I just took a hack at WinSCP, looks like the compiler can support ARM, based on the advertising, but I'm not quite able to gather all the components, pay for the compiler, and then try to port it. Maybe see if the developer is feeling nice? :)
In all seriousness though, what I see could be just the tip of the iceberg - the source base is much larger than anything I've tinkered with before.
 

Inadorel

Member
Jan 9, 2013
11
0
Edinburgh
Firstly can I say how absolutely awesome this project is. You guys have turned what was already a great device into a super great one - so maximum kudos and thanks :) I think the best feature of all is that post exploit powershell actually works properly.... But having the other apps - putty in particular - makes the device far more useful as a sysadmin tool.

Just one question - I'd love to contribute to this and get some more programs done - but I am a bit of a noob (well actually a lot of a noob) as far as cross-compiling is concerned. Could anyone recommend an internet resource that I could look at (I've had a google about and I can find plenty on Linux but very little on Windows)? Even if it was just something that gave some clues I would be happy to write up a detailed guide from my experiences for anyone else who wants to help out but is new to this. Many thanks.
 

GoodDayToDie

Inactive Recognized Developer
Jan 20, 2011
6,066
2,933
Seattle
@Inadorel: There's been some discussion of the cross-compiling around the last couple weeks, if you read this forum. The first thing to do is to change a VS configuration file that tries to prevent you from building desktop apps from RT. It's like a two-line edit, and posted on the .NET (here and at StackOverflow). Then, acquire some source code that's meant to be built in Visual Studio, Open the .SLN file in VS2012 (it'll ask you to upgrade it if the file was built by an older version, this should be fine), go to the Configuration Manager (the thing where you usually choose "Debug" vs. "Release"), select Release (not Debug; it might be possible to get it working on ARM but seems to be more difficult), and under Active Solution Platform, choose <New...> and select ARM from the drop-down (if ARM is not present, it's probably a managed project, in which case you should use "Any CPU" and set the framework to .NET 4.5). Sorry for the huge run-on sentence; believe me,it only takes a few seconds. Then, build as normal. If there isn't anything crazy like inline assembly or other CPU-specific stuff, it should build and give you a .EXE file you can copy onto a hacked Windows RT device to run.

You will find that VS2012 includes only a tiny portion of all the .LIB files that are needed for real programs. There are multiple people who have posted tools for "cutting" .LIBs from .DLLs (which you can extract from an RT device yourself) or who have uploaded a bunch of pre-cut LIBs. You may also need to manually specify some LIBs that are normally included automatically... I've found myself doing this with things like kernel32.lib.
 
  • Like
Reactions: Inadorel

netham45

Inactive Recognized Developer
Jun 24, 2009
886
569
Denver
XkK3P.jpg


I still need to get the code cleaned up a bit before I post a binary.

Buglist so far in SDL:
DirectX support requires DirectX 5, which is ancient and doesn't seem to be in RT. Running in Software Rendering.
No joystick support (Requires DirectX)
No physical CdRom support (Libs seem to be missing on RT)
No Audio support (I haven't looked into this much, it may be an easy fix)


The only code changes I had to do in DosBox were to remove Joystick and CDRom support.
 
Last edited:
  • Like
Reactions: Cotulla

GoodDayToDie

Inactive Recognized Developer
Jan 20, 2011
6,066
2,933
Seattle
@netham45, you are a cross-compiling beast. Honest question: are you using the MSVC cross-compile tools, or are you using something else (like MinGW GCC)? If the latter, please let me know how (here, in a different thread, or in PM). There's a lot of stuff I'd like to port over that doesn't build under MSVC.

EDIT: I'm gonna play me some WarCraft: Orcs and Humans (as soon as I work around the lack of CD-ROM support) on the Surface. Hell yeah!.
 

netham45

Inactive Recognized Developer
Jun 24, 2009
886
569
Denver
@netham45, you are a cross-compiling beast. Honest question: are you using the MSVC cross-compile tools, or are you using something else (like MinGW GCC)? If the latter, please let me know how (here, in a different thread, or in PM). There's a lot of stuff I'd like to port over that doesn't build under MSVC.

EDIT: I'm gonna play me some WarCraft: Orcs and Humans (as soon as I work around the lack of CD-ROM support) on the Surface. Hell yeah!.

I'm just using MSVC.

As far as CDRoms go, getting ISO loading in DosBox -SHOULD- be possible, but I'll need to get a dummy driver going in SDL so I don't have to trash dosbox's CDRom support to get it compiling.

Edit: And as far as performance goes, it's actually running quite well. I'm able to play Duke Nukem 1 (the old sidescroller) at <7% CPU most of the time. No frameskip, default settings.

More edit: ISO mounting still works as-is. I'm honestly surprised it does.

Here are my bins if you want to play around with it, though note that it's literally the first build I got to compile and run, so it may not be stable, and I would prefer if it wasn't added to the RT app downloader just yet.

My end goal with SDL is to get a dummy driver for the joystick and a dummy driver for the CDRom made so apps can just be compiled against SDL's headers and run with it.
 

Attachments

  • dosbox.zip
    764.3 KB · Views: 585
Last edited:

tycho

New member
Jan 3, 2006
4
0
I Would love to run Paint.NET on my Yoga. Hope someone can compile this? The source of the latest open source version can be found on google code under the name of openpdn . (can't post links)
 

netham45

Inactive Recognized Developer
Jun 24, 2009
886
569
Denver
I Would love to run Paint.NET on my Yoga. Hope someone can compile this? The source of the latest open source version can be found on google code under the name of openpdn . (can't post links)

I actually e-mailed the developer about getting the full source a couple days ago, he gave me a rather blunt 'No source' response.

I'll see if I can find it on google code, though, I wanted PDN too
 

GoodDayToDie

Inactive Recognized Developer
Jan 20, 2011
6,066
2,933
Seattle
@netham45: Wow, that's some nice performance! I guess I shouldn't be too surprised - 7% of the Surface's CPU is still over 350MHz (yes, really!) and even with a 10x performance hit for the emulation, that's still an actually fairly powerful 386. 20x overhead would put it about mid-range, actually (I had a 386 SX 16 and a DX 25 when I was growing up - the latter was, together with its 5MB of RAM, a $4000 USD computer back in the early 90s). People forget just how outrageously powerful modern PCs are. My 2+ year old ARM smartphone can emulate an x86 CPU in non-JIT-compiled JS and run Linux on it within a web page (admittedly slowly, but still!)

Good luck on the SDL. It's required by a lot of non-games too; like DirectX of bygone days, it's a unified set of APIs which can be used for all kinds of interactive and/or multimedia software.
 
Last edited:

jonsnowboard

Member
Apr 4, 2008
11
1
Copying files to bochs

Thanks for this awesome work guys.

Does anyone know how to copy files over to WinXP SP3 running in bochs in the absence of network support? I can't see any way of sharing a folder or mounting via USB, for example. Can't find anything via Google either (maybe I'm searching for the wrong thing...).

[Edit] I'm checking to see if I can copy the files to transfer to an ISO file and mount that in bochs. Does anyone have any better ideas? Would be nice to have a read/write folder to transfer files between host and bochs.

[Edit2] After some further research on bochs soundforge site it looks like I need to use a "vvfat" disk which allows file sharing, although it can't be updated whilst the bochs machine is running. I'll give it a go.
 
Last edited:

netham45

Inactive Recognized Developer
Jun 24, 2009
886
569
Denver
I cant run dosbox on my device.(Chinese version)

I'm not sure what that error says, but did you put SDL in the folder too? Try the version attached to this post. I had compiled SDL in debug mode in the previous post, that might be the cause of the issues.

On another note, I got DosBox building with nothing but configuration changes to DosBox, I also got audio working in SDL, and replaced the CDRom and Joystick handlers with dummies.

Here's DosBox + SDL + SDL's .libs, I'll get the source for SDL posted in a couple minutes.

Edit: Here's my SDL project folder. DirectX isn't working, and I was lazy and left a hardcoded path to .libs in the configs, but it should be easy enough to remove.

The main changes I did was replace all the functions in the CDRom and Joystick files with dummy functions, comment out all the DirectX handlers with giant #ifdefs, and change the configuration around.
 

Attachments

  • Sdl_Windows_RT.zip
    8.9 MB · Views: 20,880
  • dosbox2.zip
    764.4 KB · Views: 20,708
Last edited:

windowsrtc

Senior Member
Nov 21, 2012
94
35
I'm not sure what that error says, but did you put SDL in the folder too? Try the version attached to this post. I had compiled SDL in debug mode in the previous post, that might be the cause of the issues.

On another note, I got DosBox building with nothing but configuration changes to DosBox, I also got audio working in SDL, and replaced the CDRom and Joystick handlers with dummies.

Here's DosBox + SDL + SDL's .libs, I'll get the source for SDL posted in a couple minutes.

Edit: Here's my SDL project folder. DirectX isn't working, and I was lazy and left a hardcoded path to .libs in the configs, but it should be easy enough to remove.

The main changes I did was replace all the functions in the CDRom and Joystick files with dummy functions, comment out all the DirectX handlers with giant #ifdefs, and change the configuration around.

still not work with the same error.Its strange.
 

netham45

Inactive Recognized Developer
Jun 24, 2009
886
569
Denver
still not work with the same error.Its strange.

Can you translate the error into English for me?


Also, fun fact, DosBox and SDL run from within an appcontainer, this could be ran from a non-jailbroken WinRT tablet.

Edit: Looking at what I can read, it seems to be a localization issue. If you could translate it for me I could see about fixing it.

Also, try the one I uploaded to my previous post, if you haven't yet (The download counter for it is still at '0').
 
Last edited:

Top Liked Posts