Hooka: Would you like to introduce yourself a bit?
M-HT: I am 29 years old, programming is my job and also my hobby (although the programming I do at work is totally different from programming I do at home). My other hobbies include reading and watching anime.
Hooka: How did you get into the GP2X scene?
M-HT: I first read about GP2X in some news articles on the Internet and became interested in it. I was reading the GP2X forum (http://www.gp32x.com/board/) almost from the beginning, but I didn't get to buy the GP2X until about one and half year later after it was released.
Hooka: Do you intend to eventually add touchscreen support to your static recompilations?
M-HT: Yes, touchscreen support is something I'd like to add to my recompilations, but since I only own GP2X-F100, it's not on top of my priorities, because I can't test it. But Senor Quack volunteered to add touchscreen support to X-COM, so the future of touchscreen support is looking bright.
Hooka: You decided to make a (very) small demo to get a grasp on arm asm, was it easy to learn the new instruction set having a good base of (possibly x86 and other) asm knowledge to begin with?
M-HT: It really wasn't difficult and working on the demo (written in pure assembler) for a few days (and on nothing else) really helped me to get the hang of it.
Hooka: Do you have any suggestions on certain GP2X-specific (920T and 940T) asm optimizations that might help others?
M-HT: I try to avoid platform/product specific stuff whenever possible. It's best used in libraries (e.g. HW accelerated SDL) and not directly in programs. That said, I haven't really used any GP2X-specific stuff (except for GP2X controls), so I can't be of any help here. I was planning to use 940T in case the recompiled Albion wasn't fast enough, but it was and I didn't get to do anything with 940T yet and I probably won't.
Hooka: Do you find the arm/thumb instruction set combination has major benefits? (for instance, you mentioned using thumb instead of arm for the dosbox dynamic recompiler to save cache)
M-HT: It really helps, when you want to save some memory. Sometimes it also helps speed, but usually it's the other way round. There were three main reasons to use thumb for the dosbox dynamic recompiler backend. First one was, that I first made dosbox dynamic recompiler backend with arm instructions, but it didn't work for some reason. So I thought that a somewhat different approach with thumb instructions might work. Second one was, that almost all arm instructions that I used were also present in thumb instruction set (thumb is essentially a subset of arm instruction set with half instruction size), so I thought that I would get half code size (which really helps, because dosbox is a memory hog even without dynamic recompiler) and almost no decrease in speed. The last one was, that not only does thumb use half the memory, but also twice as many thumb instructions fit into code cache as arm instructions, which would bring another speed increase. That was the theory, but in practice the thumb version was slower than the arm version. Thanks to some other "tricks" (i.e. also modifying the dosbox recompiler framework), the thumb version is almost 50% faster than the arm version.
Hooka: You're from Bratislava, correct? Is your first language Slovak? (Sorry, I'm just curious... when I saw you writing in another language I had presumed it was polish at first, because it seemed similar to what I know of the polish language, but it would seem more realistic for it to be Slovak given your location)
M-HT: Yes, I was born in Bratislava and I'm living here. And your guess was right, my first language is Slovak.
Hooka: So, basically what you've been doing is isolating what x86 instructions are used in the game and making arm equivalents, then letting your static recompiler replace what it needs to in the binary, right?
M-HT: Essentially, yes. I replace each x86 instruction with a sequence of (one or more) arm instructions with the same functionality and emulate everything that needs to be emulated.
Hooka: What has been the most enjoyable and/or hard part of building your static recompiler?
M-HT: I have to say that the most enjoyable part was finally finishing it. The hard part was the bug fixing. It took me about two months to make the arm part of the recompiler and then it took me at least that long to fix all the bugs in it.
Hooka: Did you ever imagine when you started that it would turn out so well?
M-HT: I was hoping for just a working final product, but I was pleasantly surprised by the result.
Hooka: Do you still intend to do some work on Albion, or are you shifting your focus to X-Com, or some other project for a bit?
M-HT: I'm switching my focus between projects all the time - mostly when I'm tired with the current one. As for Albion, the project is almost done, there are only two things missing. One is touchscreen support, which will hopefully be done. The other one is background midi effects, which I'm not planning to do. The reason is that Albion plays up to three midi sequences at a time. I'm using SDL_mixer to play midi sequences and it can only play one at a time - I use it to play the background music. To play more than one midi sequence would require writing my own mixer (since I don't know any that will do it) and that's really not my area of expertise.
Hooka: You're a big fan of logical thinking and algorithm writing aren't you?
M-HT: Logical thinking is a definite influence from the university, but I also think quite illogically sometimes :). As for algorithm writing - it's much more satisfying to think up an idea for an algorithm, than to write it. But, to write some algorithm and see it work has it's own appeal.
Hooka: Do you intend to possibly bring some of your projects and/or new projects to the Wiz and/or Pandora?
M-HT: I preordered a Pandora and I'm planning to make a Pandora version of my projects. I'm also planning some new projects for Pandora that can't run on GP2X. I don't intend to buy a Wiz, but I'd like to make a Wiz version of my projects with help from someone who owns a Wiz, although that's not my priority.
Hooka: Did you start making your static recompiler just for Albion, or did you have some other reason to start working on it?
M-HT: I started it mainly for Albion with a slight possibility of using it for other games. The possibility increased later as I worked on it and learnt what needs to be done (and what does not).
Hooka: Was there alot of rewriting to the static recompiler for the X-Com recompilation?
M-HT: It wasn't that much rewriting (changing things), but I did have to add a lot of things (e.g. instructions) that weren't used by Albion.
Hooka: What was your first computer? XT? AT? Amiga? Commodore? Apple II? Some other system? or above that?
M-HT: If I remember correctly, the first computer I used was Sinclair ZX Spectrum, but that was more than 20 years ago, so I may be mistaken. The first computer that I owned was a PC with Intel Pentium processor (200 MHz).
Hooka: What technologies and/or programmatic feats inspire you?
M-HT: I'm always impressed when a product/technology is pushed beyond limits it was originally made for.
Hooka: What kind of work did you put into the dosbox dynamic recompiler backend? Do you think it could still be improved?
M-HT: First, I just implemented an arm (and thumb) backend; Then I also did some changes to the recompiler framework to bring some more speed, because it wasn't done with an arm backend in mind (the developer only has access to x86 processor and he did really good with with the recompiler). As for improvements - to implement a recompiler backend you just have to implement some basic building blocks, which are used by the recompiler framework. There aren't really that many ways to do it, so while a speed increase might be possible, at most it would be a few percent. Higher possibility of speed increase (in regard to Pandora) would be to use some new instructions in the backend. I haven't looked if there are some new usable instructions, but again the speed increase would be only marginal in my opinion. Another thing (and much more work) would be to rewrite the recompiler framework to be more arm friendly, which could bring some more speed increase. And last, the best (and the most difficult) thing (speed-wise) would be to write an arm-only recompiler from scratch. But I wouldn't expect wonders, even if someone decided to do it. My latest version (dynamic core) brings about 50% increase over simple core. I think, the new recompiler could bring at most 100% increase over simple core, but I have been proven wrong before, so don't take my word for it.
Hooka: I've noticed that you seem to find multiple solutions to your problems, is this just for optimization sake or is it due to refined thought process while working on an earlier version?
M-HT: A little of both. It's only natural to make a working version first and optimize it later. And the optimized version can be quite different from the original. Of course, after implementing a working version, you have really good understanding of your solution and how to improve it. Another thing is, that sometimes, after working on a problem for some time, you get an idea of a different solution to the problem - maybe better, maybe worse.
Hooka: Terror from the deep is a possibility also, from what you've said... are their any other titles that grab your attention?
M-HT: At the moment there are no games that I would want to do and that would work on GP2X. But there's one game, that I'm already working on, that should work on Pandora. Other than that, there's only one more game I'm considering to recompile for Pandora. I won't give you names, you'll know them when I make a release.
Hooka: What would be one of your favourite projects to undertake or even just ponder about?
M-HT: I'm pondering the possibility of recompiling some windows games - that has it's own set of problems, but if I could make it happen, the results would be quite satisfactory (for me and I hope that also for others).
Hooka: What does your nickname stand for, or is it just math that I don't have the variables for?
M-HT: It's a remainder from high school. Originally it meant "Messenger of Helltrack", but now I'm using it as my nick, because I'm too lazy to think up a new one.
Hooka: Would you like to share a silly or interesting phrase in Slovak? (I'm such a nerd...)
M-HT: Hard to say what's silly or interesting, so I'll tell you a tongue-twister -
Hooka: Any greetings, finishing words, news headlines you'd like to share with us?
M-HT: I'd just like to say, that I'm really glad when people are using my programs and to look forward to more releases.