mirror of
https://github.com/reactos/reactos.git
synced 2025-04-20 12:29:56 +00:00
Adding stub for AnyalsingProcess and ConvertToIntelProcess
svn path=/trunk/; revision=25449
This commit is contained in:
parent
7c96cb069a
commit
f74e30f8ca
6 changed files with 99 additions and 25 deletions
17
rosapps/devutils/cputointel/AnyalsingProcess.c
Normal file
17
rosapps/devutils/cputointel/AnyalsingProcess.c
Normal file
|
@ -0,0 +1,17 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "misc.h"
|
||||
#include "any_op.h"
|
||||
|
||||
|
||||
CPU_INT AnyalsingProcess()
|
||||
{
|
||||
/* FIXME it will set a name to the memory if we got one */
|
||||
|
||||
/* FIXME build the jump table */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
18
rosapps/devutils/cputointel/ConvertToIntelProcess.c
Normal file
18
rosapps/devutils/cputointel/ConvertToIntelProcess.c
Normal file
|
@ -0,0 +1,18 @@
|
|||
|
||||
#include <windows.h>
|
||||
#include <winnt.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "misc.h"
|
||||
#include "any_op.h"
|
||||
|
||||
CPU_INT ConvertToIntelProcess(FILE *outfp, char *cpuid)
|
||||
{
|
||||
/* cpuid we need it to known the register
|
||||
we should solv it another way
|
||||
*/
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -52,20 +52,6 @@ CPU_INT PPCBrain( CPU_BYTE *cpu_buffer,
|
|||
CPU_INT retcode = 0;
|
||||
CPU_INT retsize;
|
||||
|
||||
|
||||
/* 0x12 = 0001 0010,
|
||||
0x10 = 0001 0000
|
||||
0x13 = 0001 0011
|
||||
|
||||
0x20 = 0010 0000 0 0000 0010 2
|
||||
0x80 = 1000 0000 0 0000 1000 8
|
||||
0x4e = 0010 1110 E 1110 0010 2
|
||||
|
||||
0x20 00 80 4e
|
||||
0010 0000 0000 0000 1000 0000 0100 1110
|
||||
|
||||
*/
|
||||
|
||||
/* now we start the process */
|
||||
while (cpu_pos<cpu_size)
|
||||
{
|
||||
|
|
|
@ -114,9 +114,17 @@ CPU_INT LoadPFileImage( char *infileName, char *outputfileName,
|
|||
{
|
||||
type=1;
|
||||
}
|
||||
FreeAny();
|
||||
fclose(outfp);
|
||||
return 0;
|
||||
else
|
||||
{
|
||||
if (mode > 1)
|
||||
{
|
||||
AnyalsingProcess();
|
||||
ConvertToIntelProcess(outfp,cpuid);
|
||||
FreeAny();
|
||||
}
|
||||
fclose(outfp);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (type== 1)
|
||||
|
@ -124,48 +132,83 @@ CPU_INT LoadPFileImage( char *infileName, char *outputfileName,
|
|||
if (stricmp(cpuid,"m68000"))
|
||||
{
|
||||
ret = M68KBrain(cpu_buffer,cpu_pos,cpu_size,BaseAddress,68000,outfp,mode);
|
||||
FreeAny();
|
||||
if (mode > 1)
|
||||
{
|
||||
AnyalsingProcess();
|
||||
ConvertToIntelProcess(outfp,cpuid);
|
||||
FreeAny();
|
||||
}
|
||||
fclose(outfp);
|
||||
}
|
||||
else if (stricmp(cpuid,"m68010"))
|
||||
{
|
||||
ret = M68KBrain(cpu_buffer,cpu_pos,cpu_size,BaseAddress,68010,outfp,mode);
|
||||
FreeAny();
|
||||
if (mode > 1)
|
||||
{
|
||||
AnyalsingProcess();
|
||||
ConvertToIntelProcess(outfp,cpuid);
|
||||
FreeAny();
|
||||
}
|
||||
fclose(outfp);
|
||||
return ret;
|
||||
}
|
||||
else if (stricmp(cpuid,"m68020"))
|
||||
{
|
||||
ret = M68KBrain(cpu_buffer,cpu_pos,cpu_size,BaseAddress,68020,outfp,mode);
|
||||
FreeAny();
|
||||
if (mode > 1)
|
||||
{
|
||||
AnyalsingProcess();
|
||||
ConvertToIntelProcess(outfp,cpuid);
|
||||
FreeAny();
|
||||
}
|
||||
fclose(outfp);
|
||||
return ret;
|
||||
}
|
||||
else if (stricmp(cpuid,"m68030"))
|
||||
{
|
||||
ret = M68KBrain(cpu_buffer,cpu_pos,cpu_size,BaseAddress,68030,outfp,mode);
|
||||
FreeAny();
|
||||
if (mode > 1)
|
||||
{
|
||||
AnyalsingProcess();
|
||||
ConvertToIntelProcess(outfp,cpuid);
|
||||
FreeAny();
|
||||
}
|
||||
fclose(outfp);
|
||||
return ret;
|
||||
}
|
||||
else if (stricmp(cpuid,"m68040"))
|
||||
{
|
||||
ret = M68KBrain(cpu_buffer,cpu_pos,cpu_size,BaseAddress,68040,outfp,mode);
|
||||
FreeAny();
|
||||
if (mode > 1)
|
||||
{
|
||||
AnyalsingProcess();
|
||||
ConvertToIntelProcess(outfp,cpuid);
|
||||
FreeAny();
|
||||
}
|
||||
fclose(outfp);
|
||||
return ret;
|
||||
}
|
||||
else if (stricmp(cpuid,"ppc"))
|
||||
{
|
||||
ret = PPCBrain(cpu_buffer,cpu_pos,cpu_size,BaseAddress,0,outfp,mode);
|
||||
FreeAny();
|
||||
if (mode > 1)
|
||||
{
|
||||
AnyalsingProcess();
|
||||
ConvertToIntelProcess(outfp,cpuid);
|
||||
FreeAny();
|
||||
}
|
||||
fclose(outfp);
|
||||
return ret;
|
||||
}
|
||||
else if (stricmp(cpuid,"arm4"))
|
||||
{
|
||||
ret = ARMBrain(cpu_buffer,cpu_pos,cpu_size,BaseAddress,4,outfp,mode);
|
||||
FreeAny();
|
||||
if (mode > 1)
|
||||
{
|
||||
AnyalsingProcess();
|
||||
ConvertToIntelProcess(outfp,cpuid);
|
||||
FreeAny();
|
||||
}
|
||||
fclose(outfp);
|
||||
return ret;
|
||||
}
|
||||
|
@ -175,7 +218,12 @@ CPU_INT LoadPFileImage( char *infileName, char *outputfileName,
|
|||
{
|
||||
|
||||
ret = PEFileStart(cpu_buffer, 0, BaseAddress, cpu_size, outfp, mode);
|
||||
FreeAny();
|
||||
if (mode > 1)
|
||||
{
|
||||
AnyalsingProcess();
|
||||
ConvertToIntelProcess(outfp,cpuid);
|
||||
FreeAny();
|
||||
}
|
||||
fclose(outfp);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
<library>kernel32</library>
|
||||
<library>user32</library>
|
||||
|
||||
<file>AnyalsingProcess.c</file>
|
||||
<file>ConvertToIntelProcess.c</file>
|
||||
<file>CpuToIntel.c</file>
|
||||
<file>ImageLoader.c</file>
|
||||
<file>misc.c</file>
|
||||
|
|
|
@ -25,3 +25,6 @@ CPU_UNINT GetData32Be(CPU_BYTE *cpu_buffer);
|
|||
|
||||
CPU_INT AllocAny();
|
||||
CPU_INT FreeAny();
|
||||
CPU_INT AnyalsingProcess();
|
||||
CPU_INT ConvertToIntelProcess(FILE *outfp, char *cpuid);
|
||||
|
||||
|
|
Loading…
Reference in a new issue