Author: greatlrd
Date: Sun Jan 14 16:54:19 2007
New Revision: 25449
URL:
http://svn.reactos.org/svn/reactos?rev=25449&view=rev
Log:
Adding stub for AnyalsingProcess and ConvertToIntelProcess
Added:
trunk/rosapps/devutils/cputointel/AnyalsingProcess.c (with props)
trunk/rosapps/devutils/cputointel/ConvertToIntelProcess.c (with props)
Modified:
trunk/rosapps/devutils/cputointel/From/PPC/PPCBrain.c
trunk/rosapps/devutils/cputointel/ImageLoader.c
trunk/rosapps/devutils/cputointel/cputointel.rbuild
trunk/rosapps/devutils/cputointel/misc.h
Added: trunk/rosapps/devutils/cputointel/AnyalsingProcess.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/devutils/cputointel/Anyals…
==============================================================================
--- trunk/rosapps/devutils/cputointel/AnyalsingProcess.c (added)
+++ trunk/rosapps/devutils/cputointel/AnyalsingProcess.c Sun Jan 14 16:54:19 2007
@@ -1,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;
+}
+
+
Propchange: trunk/rosapps/devutils/cputointel/AnyalsingProcess.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/rosapps/devutils/cputointel/ConvertToIntelProcess.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/devutils/cputointel/Conver…
==============================================================================
--- trunk/rosapps/devutils/cputointel/ConvertToIntelProcess.c (added)
+++ trunk/rosapps/devutils/cputointel/ConvertToIntelProcess.c Sun Jan 14 16:54:19 2007
@@ -1,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;
+}
Propchange: trunk/rosapps/devutils/cputointel/ConvertToIntelProcess.c
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/rosapps/devutils/cputointel/From/PPC/PPCBrain.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/devutils/cputointel/From/P…
==============================================================================
--- trunk/rosapps/devutils/cputointel/From/PPC/PPCBrain.c (original)
+++ trunk/rosapps/devutils/cputointel/From/PPC/PPCBrain.c Sun Jan 14 16:54:19 2007
@@ -51,20 +51,6 @@
CPU_INT cpuint;
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)
Modified: trunk/rosapps/devutils/cputointel/ImageLoader.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/devutils/cputointel/ImageL…
==============================================================================
--- trunk/rosapps/devutils/cputointel/ImageLoader.c (original)
+++ trunk/rosapps/devutils/cputointel/ImageLoader.c Sun Jan 14 16:54:19 2007
@@ -114,9 +114,17 @@
{
type=1;
}
- FreeAny();
- fclose(outfp);
- return 0;
+ else
+ {
+ if (mode > 1)
+ {
+ AnyalsingProcess();
+ ConvertToIntelProcess(outfp,cpuid);
+ FreeAny();
+ }
+ fclose(outfp);
+ return 0;
+ }
}
if (type== 1)
@@ -124,58 +132,98 @@
if (stricmp(cpuid,"m68000"))
{
ret = M68KBrain(cpu_buffer,cpu_pos,cpu_size,BaseAddress,68000,outfp,mode);
+ 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);
+ 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);
+ 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);
+ 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);
+ 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);
+ 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);
+ if (mode > 1)
+ {
+ AnyalsingProcess();
+ ConvertToIntelProcess(outfp,cpuid);
+ FreeAny();
+ }
+ fclose(outfp);
+ return ret;
+ }
+ }
+
+ if (type==2)
+ {
+
+ ret = PEFileStart(cpu_buffer, 0, BaseAddress, cpu_size, outfp, mode);
+ 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();
- fclose(outfp);
- return ret;
- }
- else if (stricmp(cpuid,"m68020"))
- {
- ret = M68KBrain(cpu_buffer,cpu_pos,cpu_size,BaseAddress,68020,outfp,mode);
- FreeAny();
- fclose(outfp);
- return ret;
- }
- else if (stricmp(cpuid,"m68030"))
- {
- ret = M68KBrain(cpu_buffer,cpu_pos,cpu_size,BaseAddress,68030,outfp,mode);
- FreeAny();
- fclose(outfp);
- return ret;
- }
- else if (stricmp(cpuid,"m68040"))
- {
- ret = M68KBrain(cpu_buffer,cpu_pos,cpu_size,BaseAddress,68040,outfp,mode);
- FreeAny();
- fclose(outfp);
- return ret;
- }
- else if (stricmp(cpuid,"ppc"))
- {
- ret = PPCBrain(cpu_buffer,cpu_pos,cpu_size,BaseAddress,0,outfp,mode);
- FreeAny();
- fclose(outfp);
- return ret;
- }
- else if (stricmp(cpuid,"arm4"))
- {
- ret = ARMBrain(cpu_buffer,cpu_pos,cpu_size,BaseAddress,4,outfp,mode);
- FreeAny();
- fclose(outfp);
- return ret;
- }
- }
-
- if (type==2)
- {
-
- ret = PEFileStart(cpu_buffer, 0, BaseAddress, cpu_size, outfp, mode);
- FreeAny();
+ }
fclose(outfp);
return ret;
}
Modified: trunk/rosapps/devutils/cputointel/cputointel.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/devutils/cputointel/cputoi…
==============================================================================
--- trunk/rosapps/devutils/cputointel/cputointel.rbuild (original)
+++ trunk/rosapps/devutils/cputointel/cputointel.rbuild Sun Jan 14 16:54:19 2007
@@ -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>
Modified: trunk/rosapps/devutils/cputointel/misc.h
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/devutils/cputointel/misc.h…
==============================================================================
--- trunk/rosapps/devutils/cputointel/misc.h (original)
+++ trunk/rosapps/devutils/cputointel/misc.h Sun Jan 14 16:54:19 2007
@@ -25,3 +25,6 @@
CPU_INT AllocAny();
CPU_INT FreeAny();
+CPU_INT AnyalsingProcess();
+CPU_INT ConvertToIntelProcess(FILE *outfp, char *cpuid);
+