reactos/rosapps/devutils/cputointel
Magnus Olsen d1aa0d32ae Adding m68k,arm,ia32,ppc to ppc convert.
Remove the old disambler list from ppc to ppc 
implement new ppc to ppc disambler that are allot better at end. 

svn path=/trunk/; revision=25498
2007-01-17 17:35:18 +00:00
..
From Adding m68k,arm,ia32,ppc to ppc convert. 2007-01-17 17:35:18 +00:00
any_op.h Adding m68k,arm,ia32,ppc to ppc convert. 2007-01-17 17:35:18 +00:00
AnyalsingProcess.c Adding stub for AnyalsingProcess and ConvertToIntelProcess 2007-01-14 13:54:19 +00:00
ConvertingProcess.c Adding m68k,arm,ia32,ppc to ppc convert. 2007-01-17 17:35:18 +00:00
ConvertToIA32Process.c Adding m68k,arm,ia32,ppc to ppc convert. 2007-01-17 17:35:18 +00:00
CpuToIntel.c This break the ppc disambler support and convert to ia32, temporary 2007-01-17 15:02:43 +00:00
cputointel.rbuild Adding m68k,arm,ia32,ppc to ppc convert. 2007-01-17 17:35:18 +00:00
ImageLoader.c Adding m68k,arm,ia32,ppc to ppc convert. 2007-01-17 17:35:18 +00:00
misc.c the public frist version that can convert arty testms.exe that are commited to powerpc branch in the alink folder. 2007-01-14 18:01:56 +00:00
misc.h This break the ppc disambler support and convert to ia32, temporary 2007-01-17 15:02:43 +00:00
ReadMe.txt This break the ppc disambler support and convert to ia32, temporary 2007-01-17 15:02:43 +00:00

CpuToIntel is a experment tools and is strict under havy devloping


The Idea
The idea is to convert a binary file or win pe file 
from one cpu to another cpu, But it does not exists
plan to port over diffent hardware architect like
how diffent hw comucate, example x86 DMA controller
to PPC like. It is only to convert the the binary or
pe file to another cpu. it mean a user mode apps
will always be ported, but if it self modify code
it will not work. But it exists a idea to deal with
self modify code. 


The idea to handling self modify code
The idea is to add a small emulator that 
runing the apps or adding a anylasuing process
to dectect self modify code and extract it
this is hard thing todo. almost imposible


Why the name are CpuToIntel
When I start write on it it was only ment to convert 
from ARM, PPC, m68k to X86 but then I come think of
ReactOS PPC port that is going on. for or later we
will need something that doing convert from x86 to
PPC apps. It exists two way todo it. One is to use 
dymatic translation a jit, like UAE or QEMU doing 
converting. But it will lose of allot of speed if
it is a game or a havy apps to much. So the idea
is to convert the whole file in one sweep. will give
 one other problem it will be a slow process todo it,
and hard dectect self modify program. so not all program
can be really convert with this process. 


Who will it work 
we take it step for step and I will describe the 
binary translations how it works. The PE file
work simluare way. 

step 1 : it will disambler the program frist 

step 2 : translate everthing to a middle asm dialect,
         it is own asm dialect it is not suite for a real

step 3 : (not implement) send it to ananalysing processs 
         to get any name or mark out which row is a new functions

step 3.5 (not implement) split the code into functions here

step 4 : Now it start the convert process. 

step 4.5 (not implement) maybe a optimzer. 
  
step 5 : now it is finish. 


The arch that are plan 
PPC  to IA32, PPC (work in progress)
m68k to IA32, PPC (stubed)
ARM  to IA32, PPC (stubed)
IA32 to IA32, PPC (work in progress)


The Winodws NT PPC and x85 diffrent 
R1  The stack pointer equal with x86 esp
R3  The return reg equal with x86 eax
R4  The return reg equal with x86 edx
R31 The base pointer equal with x86 ebp