Open xor2003 opened 5 years ago
Hi xOr,
this process has been done manually by me, since I know C and x86 assembly very well. The code, I have translated, was not optimized by the compiler, so it was a straight forward process. I also have the compiler, Borland C++ 3.1, which has been used to compile that binary. So I did the following for each function separately of the original binary:
There are no DOSBox pseudo instructions, a rewritten function is executed natively on the host processor.
I've hooked into the two call instructions of the software DOSBox-CPU. If a function I have rewritten is called:
Otherwise DOSBox emulates that function call.
But I think, that will not help you for masm2c, since you are doing something general with that. I had only a special case.
I hope to find time next month to reactivate Bright-Eyes, and I'll try out masm2c on one function which I did not managed to translate correctly.
Feel free to ask, if you want more details.
Thanks mostly clear and interesting. I will try to prepare Borland C++ Dos as target of my translator.
Testing resulting code on Dos might be easier before porting sound, graphics, etc to SDL. The problem is reversed code is a code modification and no tests available. Good solution for it is binary equality as in your case.
I'm doing similar thing with my masm2c. How did you converted ida/asm to dosbox pseudo instructions?