That's, uh, really impressive. I'd like the author to write about it, because I'd like to understand how much extra work it took to get compiling from the C code once it was disassembled by the tools. It'd be interesting to understand what sort of pitfalls the tools produce, so that the tools can be more efficiently used to do more work like this.
It's well above my head, but it'd be a fascinating read!
By the way it's not the first time this is done, there were some other static recompilations (Xcom i think) done in the same way 3 years ago. But Starcraft was probably harder.
It looks like it's not a full decompiler, but just an instruction-level one - it doesn't attempt to recover any more high-level structure beyond if/goto and function boundaries with parameters. Look at lines 4500-4533 for an example. He also appears to be parsing disassembler output(!) for its input.
This kind of reverse engineering never fails to impress. If you asked me ahead of time, I'd probably have said "possible in theory, but there would be so many obstacles to overcome that no one will succeed in practice."
"The Winulator doesn’t work like an emulator. It just converts an x86 game executable to an ARM-friendly one. Here is what you need to do.
You’ll need three things – a computer with installed Winulator Converter Helper, the original DRM-free game installed on that computer and the Winulator Android app installed on your phone."
Yes I was a bit confused that this is supposed to be new information, I installed StarCraft on my android about a year ago using winulator.
It even supports a bluetooth mouse, (which I went and bought the same day I installed and got working). Works perfectly. like having a '96 gaming PC in your pocket(s)
I even changed the winulator icon to StarCraft icon then went to the pub and pulled the mouse out of my pocket, setup my android and made all my iphone-owning friends $#!^ bricks. Good times.
I've kicked around the idea of translating machine code to LLVM assembly code specifically to do things like this.
I actually got as far as creating a GitHub repo to work on this <https://github.com/wtracy/recompile> but my code never got farther than some logic for parsing ELF headers.
I can't wait until I find such a project that is in a usable state! I've tried all of these (save dagger, no releases yet) and always hit some issue due to their immaturity.
Excuse my ignorance here; I wanted to get into LLVM more but never did. Don't you have: frontends which do Language => LLVM intermediate code and backends which do LLVM code => native ? So you were writing a frontend which could do x86 => LLVM code and then it can compile to ARM, x86, JS etc?
Sounds like a HUGE undertaking (esp for one person) but worth it; once you have that frontend (if my assumptions are correct), you would be able to have a lot of fun.
Yeah LLVM would be really cool like emscripten, but for x86.
I would like to see a performance comparison of this approach vs. running a full virtual machine since the x86 to arm conversion approach still requires a wine lib to execute all the windows APIs.
It's still the only option for long flights if you don't have the $ to pay for business class (power sockets there); I have a Pandora with 2 batteries (which are quite small) which is over 20 hours of a system which actually lets you do your work. Wouldn't have survived my trip of 25 hours last week without it.
I had various models of the GP2X and hacked together a game for it and really enjoyed the community around it. That said, I thought the Pandora project would either fail or units would only be available when better alternatives exist, or the unit price would be too high. I'm glad to see there is still some momentum.
Neat! As I'm not much of a gamer, I hadn't heard of this device before. But for under $600, you get a modest portable Linux box with 10-hour battery life.
Done by some of the founders of OpenPandora. Will probably be the only followup device. It has impressive specs, but is priced like a laptop (which it is tbh).
While I'm never one to stand in the way of tinkering, I'm curious as to why you chose FF7?
There are many open source implementations of PS1 emulators, and the PC version of FF7 is notoriously bad. So from a gameplay perspective, the PS1 version of FF7 is far easier to run an any platform, and is superior in all respects.
Starcraft was ported to ARM in 2010 to run on the Windows Mobile platform. Details are rather light, so I don't know if they used the same approach, but it's likely.
[+] [-] NamTaf|12 years ago|reply
It's well above my head, but it'd be a fascinating read!
[+] [-] ekianjo|12 years ago|reply
[+] [-] ekianjo|12 years ago|reply
[+] [-] slacka|12 years ago|reply
https://github.com/notaz/ia32rtools
Video of the game running on an OpenPandora here:
http://www.youtube.com/watch?v=7vWnyDrNQO4.
[+] [-] agumonkey|12 years ago|reply
ps: the pandora specs http://openpandora.org/portal/index.php?option=com_content&v...
[+] [-] userbinator|12 years ago|reply
https://github.com/notaz/ia32rtools/blob/master/tools/transl...
It looks like it's not a full decompiler, but just an instruction-level one - it doesn't attempt to recover any more high-level structure beyond if/goto and function boundaries with parameters. Look at lines 4500-4533 for an example. He also appears to be parsing disassembler output(!) for its input.
[+] [-] pmorici|12 years ago|reply
[+] [-] sspiff|12 years ago|reply
[+] [-] GFischer|12 years ago|reply
docs.winulator.com/programs
Edit: more info on GsmArena
http://blog.gsmarena.com/you-can-now-play-starcraft-and-caes...
"The Winulator doesn’t work like an emulator. It just converts an x86 game executable to an ARM-friendly one. Here is what you need to do.
You’ll need three things – a computer with installed Winulator Converter Helper, the original DRM-free game installed on that computer and the Winulator Android app installed on your phone."
[+] [-] Sektor|12 years ago|reply
It even supports a bluetooth mouse, (which I went and bought the same day I installed and got working). Works perfectly. like having a '96 gaming PC in your pocket(s)
I even changed the winulator icon to StarCraft icon then went to the pub and pulled the mouse out of my pocket, setup my android and made all my iphone-owning friends $#!^ bricks. Good times.
[+] [-] shirman|12 years ago|reply
[0] https://play.google.com/store/apps/details?id=com.postram.wi...
[1] https://docs.google.com/a/shir-man.com/file/d/0B1bdCV3iqJ-MT...
[+] [-] wtracy|12 years ago|reply
I actually got as far as creating a GitHub repo to work on this <https://github.com/wtracy/recompile> but my code never got farther than some logic for parsing ELF headers.
[+] [-] jevinskie|12 years ago|reply
https://github.com/libcpu/libcpu
http://dagger.repzret.org/
https://github.com/draperlaboratory/fracture
[+] [-] tluyben2|12 years ago|reply
Sounds like a HUGE undertaking (esp for one person) but worth it; once you have that frontend (if my assumptions are correct), you would be able to have a lot of fun.
[+] [-] dangero|12 years ago|reply
I would like to see a performance comparison of this approach vs. running a full virtual machine since the x86 to arm conversion approach still requires a wine lib to execute all the windows APIs.
[+] [-] unknown|12 years ago|reply
[deleted]
[+] [-] AdrianRossouw|12 years ago|reply
I'll probably also buy the follow up device.
[+] [-] tluyben2|12 years ago|reply
[+] [-] kokey|12 years ago|reply
[+] [-] wpietri|12 years ago|reply
http://ithic.com/newsite/index.php?id_product=9&controller=p...
I'm not quite sure what I'd use one for, but it's an interesting option.
[+] [-] Aissen|12 years ago|reply
Done by some of the founders of OpenPandora. Will probably be the only followup device. It has impressive specs, but is priced like a laptop (which it is tbh).
[+] [-] protopete|12 years ago|reply
[+] [-] foldor|12 years ago|reply
There are many open source implementations of PS1 emulators, and the PC version of FF7 is notoriously bad. So from a gameplay perspective, the PS1 version of FF7 is far easier to run an any platform, and is superior in all respects.
Like I said, not discouraging it, just curious.
[+] [-] MikeTV|12 years ago|reply
http://www.phonearena.com/news/StarCraft-arrives-for-Windows...
[+] [-] cordite|12 years ago|reply
[+] [-] ekianjo|12 years ago|reply
[+] [-] AdmiralAsshat|12 years ago|reply
[+] [-] deletes|12 years ago|reply
[+] [-] jevinskie|12 years ago|reply
[+] [-] ndesaulniers|12 years ago|reply
[+] [-] qdog|12 years ago|reply
FD: I no longer play Blizzard games due to this action.
[+] [-] theandrewbailey|12 years ago|reply
[+] [-] grecy|12 years ago|reply
[+] [-] marcelocamanho|12 years ago|reply
[+] [-] marukokinno|12 years ago|reply
[deleted]
[+] [-] crassus|12 years ago|reply