Author: greatlrd
Date: Sun Dec 31 21:45:35 2006
New Revision: 25257
URL:
http://svn.reactos.org/svn/reactos?rev=25257&view=rev
Log:
1. setup input param to main
2. implement cpu type flag in dummy and m68k
3. Adding more opcode for m68k, but they are stubed
Time to test the code and start implement m68k in next commit
Modified:
trunk/rosapps/devutils/cputointel/CpuToIntel.c
trunk/rosapps/devutils/cputointel/dummycpu/Dummy.h
trunk/rosapps/devutils/cputointel/dummycpu/DummyBrain.c
trunk/rosapps/devutils/cputointel/dummycpu/Dummyopcode.c
trunk/rosapps/devutils/cputointel/m68k/M68kBrain.c
trunk/rosapps/devutils/cputointel/m68k/M68kBrain.h
trunk/rosapps/devutils/cputointel/m68k/M68kopcode.c
trunk/rosapps/devutils/cputointel/m68k/m68k.h
Modified: trunk/rosapps/devutils/cputointel/CpuToIntel.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/devutils/cputointel/CpuToI…
==============================================================================
--- trunk/rosapps/devutils/cputointel/CpuToIntel.c (original)
+++ trunk/rosapps/devutils/cputointel/CpuToIntel.c Sun Dec 31 21:45:35 2006
@@ -1,17 +1,27 @@
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#include "m68k/m68k.h"
#include "misc.h"
int main(int argc, char * argv[])
{
+ CPU_UNINT BaseAddress=0;
+ int t=0;
+ char *infile=NULL;
+ char *outfile=NULL;
+
printf("Usage :\n");
printf(" -cpu m68000 : convert motorala 68000/68008 to intel asm
\n");
printf(" -cpu m68010 : convert motorala 68010 to intel asm
\n");
printf(" -cpu m68020 : convert motorala 68020 to intel asm
\n");
printf(" -cpu m68030 : convert motorala 68030 to intel asm
\n");
printf(" -cpu m68040 : convert motorala 68040 to intel asm
\n");
+
printf("--------------------------------------------------------------\n");
+ printf(".......-BaseAddress adr : the start base address only accpect
\n");
+ printf("....... dec value");
printf("--------------------------------------------------------------\n");
printf(" -inBin filename : the bin file you whant convert\n");
printf(" -OutAsm filename : the Asm file you whant create\n");
@@ -22,6 +32,43 @@
printf("yet, more that basic desgin how it should be writen.
\n");
printf("Copyright 2006 by Magnus Olsen, licen under GPL 2.0 for now.
\n");
+ if (argc < 7)
+ return .110;
+
+ for (t=1; t<7;t+=2)
+ {
+ if (stricmp(argv[t],"-inBin"))
+ {
+ infile = argv[t+1];
+ }
+ if (stricmp(argv[t],"-OutAsm"))
+ {
+ outfile = argv[t+1];
+ }
+ if (stricmp(argv[t],"-BaseAddress"))
+ {
+ BaseAddress = atol(argv[t+1]);
+ }
+
+
+ }
+
+ for (t=1;t<7;t+=2)
+ {
+ if (stricmp(argv[1],"-cpu"))
+ {
+ if (stricmp(argv[2],"m68000"))
+ return M68KBrain(infile, outfile, BaseAddress, 68000);
+ else if (stricmp(argv[2],"m68010"))
+ return M68KBrain(infile, outfile, BaseAddress, 68010);
+ else if (stricmp(argv[2],"m68020"))
+ return M68KBrain(infile, outfile, BaseAddress, 68020);
+ else if (stricmp(argv[2],"m68030"))
+ return M68KBrain(infile, outfile, BaseAddress, 68030);
+ else if (stricmp(argv[2],"m68040"))
+ return M68KBrain(infile, outfile, BaseAddress, 68040);
+ }
+ }
return 0;
}
Modified: trunk/rosapps/devutils/cputointel/dummycpu/Dummy.h
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/devutils/cputointel/dummyc…
==============================================================================
--- trunk/rosapps/devutils/cputointel/dummycpu/Dummy.h (original)
+++ trunk/rosapps/devutils/cputointel/dummycpu/Dummy.h Sun Dec 31 21:45:35 2006
@@ -2,7 +2,7 @@
#include "../misc.h"
/* here we put the prototype for the opcode api that brain need we show a example for it
*/
-CPU_INT DUMMY_Add(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT
cpu_size, CPU_UNINT BaseAddress);
+CPU_INT DUMMY_Add(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT
cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch);
/* Export comment thing see m68k for example
Modified: trunk/rosapps/devutils/cputointel/dummycpu/DummyBrain.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/devutils/cputointel/dummyc…
==============================================================================
--- trunk/rosapps/devutils/cputointel/dummycpu/DummyBrain.c (original)
+++ trunk/rosapps/devutils/cputointel/dummycpu/DummyBrain.c Sun Dec 31 21:45:35 2006
@@ -18,7 +18,8 @@
* 9 = can not read file
*/
-CPU_INT DummyBrain(char *infileName, char *outputfileName, CPU_UNINT BaseAddress)
+CPU_INT DummyBrain(char *infileName, char *outputfileName,
+ CPU_UNINT BaseAddress, CPU_UNINT cpuarch)
{
FILE *infp;
FILE *outfp;
@@ -102,9 +103,10 @@
/* Add */
if ((cpuint - (cpuint & GetMaskByte(cpuDummyInit_Add))) ==
ConvertBitToByte(cpuDummyInit_Add))
{
- retsize = DUMMY_Add(outfp, cpu_buffer, cpu_pos, cpu_size, BaseAddress);
- if (retsize<0)
- retcode = 1;
+ retsize = DUMMY_Add( outfp, cpu_buffer, cpu_pos, cpu_size,
+ BaseAddress, cpuarch);
+ if (retsize<0)
+ retcode = 1;
else
cpu_pos += retsize;
}
Modified: trunk/rosapps/devutils/cputointel/dummycpu/Dummyopcode.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/devutils/cputointel/dummyc…
==============================================================================
--- trunk/rosapps/devutils/cputointel/dummycpu/Dummyopcode.c (original)
+++ trunk/rosapps/devutils/cputointel/dummycpu/Dummyopcode.c Sun Dec 31 21:45:35 2006
@@ -12,6 +12,10 @@
* cpu_pos : Current positions in the cpu_buffer
* cpu_size : The memory size of the cpu_buffer
* BaseAddress : The base address you whant the binay file should run from
+ * cpuarch : if it exists diffent cpu from a manufactor like pentium,
+ * pentinum-mmx so on, use this flag to specify which type
+ * of cpu you whant or do not use it if it does not exists
+ * other or any sub model.
*
* Return value :
* value -1 : unimplement
@@ -19,7 +23,8 @@
* value +1 and higher : who many byte we should add to cpu_pos
*/
-CPU_INT DUMMY_Add(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT
cpu_size, CPU_UNINT BaseAddress)
+CPU_INT DUMMY_Add( FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos,
+ CPU_UNINT cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch)
{
/*
Modified: trunk/rosapps/devutils/cputointel/m68k/M68kBrain.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/devutils/cputointel/m68k/M…
==============================================================================
--- trunk/rosapps/devutils/cputointel/m68k/M68kBrain.c (original)
+++ trunk/rosapps/devutils/cputointel/m68k/M68kBrain.c Sun Dec 31 21:45:35 2006
@@ -18,7 +18,7 @@
* 9 = can not read file
*/
-CPU_INT M68KBrain(char *infileName, char *outputfileName, CPU_UNINT BaseAddress)
+CPU_INT M68KBrain(char *infileName, char *outputfileName, CPU_UNINT BaseAddress,
CPU_UNINT cpuarch)
{
FILE *infp;
FILE *outfp;
@@ -77,7 +77,7 @@
{
printf("error can not alloc %uld size for memory buffer",cpu_size);
fclose(infp);
- fclose(outfp);
+ fclose(outfp);
return 8;
}
@@ -92,7 +92,7 @@
}
fclose(infp);
- /* now we start the process */
+ /* now we start the process */
while (cpu_pos<cpu_size)
{
cpu_oldpos = cpu_pos;
@@ -102,63 +102,70 @@
/* Abcd */
if ((cpuint - (cpuint & GetMaskByte(cpuM68kInit_Abcd))) ==
ConvertBitToByte(cpuM68kInit_Abcd))
{
- retsize = M68k_Abcd(outfp, cpu_buffer, cpu_pos, cpu_size, BaseAddress);
- if (retsize<0)
- retcode = 1;
+ retsize = M68k_Abcd( outfp, cpu_buffer, cpu_pos, cpu_size,
+ BaseAddress, cpuarch);
+ if (retsize<0)
+ retcode = 1;
else
cpu_pos += retsize;
}
/* Add */
if ((cpuint - (cpuint & GetMaskByte(cpuM68kInit_Add))) ==
ConvertBitToByte(cpuM68kInit_Add))
{
- retsize = M68k_Add(outfp, cpu_buffer, cpu_pos, cpu_size, BaseAddress);
- if (retsize<0)
- retcode = 1;
+ retsize = M68k_Add( outfp, cpu_buffer, cpu_pos, cpu_size,
+ BaseAddress, cpuarch);
+ if (retsize<0)
+ retcode = 1;
else
cpu_pos += retsize;
}
/* Addi */
if ((cpuint - (cpuint & GetMaskByte(cpuM68kInit_Addi))) ==
ConvertBitToByte(cpuM68kInit_Addi))
{
- retsize = M68k_Addi(outfp, cpu_buffer, cpu_pos, cpu_size, BaseAddress);
- if (retsize<0)
- retcode = 1;
+ retsize = M68k_Addi( outfp, cpu_buffer, cpu_pos, cpu_size,
+ BaseAddress, cpuarch);
+ if (retsize<0)
+ retcode = 1;
else
cpu_pos += retsize;
}
/* Addq */
if ((cpuint - (cpuint & GetMaskByte(cpuM68kInit_Addq))) ==
ConvertBitToByte(cpuM68kInit_Addq))
{
- retsize = M68k_Addq(outfp, cpu_buffer, cpu_pos, cpu_size, BaseAddress);
- if (retsize<0)
- retcode = 1;
+ retsize = M68k_Addq( outfp, cpu_buffer, cpu_pos, cpu_size,
+ BaseAddress, cpuarch);
+ if (retsize<0)
+ retcode = 1;
else
cpu_pos += retsize;
}
/* Addx */
if ((cpuint - (cpuint & GetMaskByte(cpuM68kInit_Addx))) ==
ConvertBitToByte(cpuM68kInit_Addx))
{
- retsize = M68k_Addx(outfp, cpu_buffer, cpu_pos, cpu_size, BaseAddress);
- if (retsize<0)
- retcode = 1;
+ retsize = M68k_Addx( outfp, cpu_buffer, cpu_pos, cpu_size,
+ BaseAddress, cpuarch);
+ if (retsize<0)
+ retcode = 1;
else
cpu_pos += retsize;
}
/* And */
if ((cpuint - (cpuint & GetMaskByte(cpuM68kInit_And))) ==
ConvertBitToByte(cpuM68kInit_And))
{
- retsize = M68k_Add(outfp, cpu_buffer, cpu_pos, cpu_size, BaseAddress);
- if (retsize<0)
- retcode = 1;
+ retsize = M68k_Add( outfp, cpu_buffer, cpu_pos, cpu_size,
+ BaseAddress, cpuarch);
+ if (retsize<0)
+ retcode = 1;
else
cpu_pos += retsize;
}
/* Andi */
if ((cpuint - (cpuint & GetMaskByte(cpuM68kInit_Andi))) ==
ConvertBitToByte(cpuM68kInit_Andi))
{
- retsize = M68k_Andi(outfp, cpu_buffer, cpu_pos, cpu_size, BaseAddress);
- if (retsize<0)
- retcode = 1;
+ retsize = M68k_Andi( outfp, cpu_buffer, cpu_pos, cpu_size,
+ BaseAddress, cpuarch);
+ if (retsize<0)
+ retcode = 1;
else
cpu_pos += retsize;
}
@@ -169,9 +176,10 @@
if ((cpuint - (cpuint & GetMaskByte(cpuM68kInit_AndToCCRS))) ==
ConvertBitToByte(cpuM68kInit_AndToCCRS))
{
cpu_pos++;
- retsize = M68k_AndToCCR(outfp, cpu_buffer, cpu_pos, cpu_size,
BaseAddress);
- if (retsize<0)
- retcode = 1;
+ retsize = M68k_AndToCCR( outfp, cpu_buffer, cpu_pos, cpu_size,
+ BaseAddress, cpuarch);
+ if (retsize<0)
+ retcode = 1;
else
cpu_pos += retsize;
}
@@ -179,6 +187,160 @@
{
cpuint = cpu_buffer[cpu_pos];
}
+ }
+
+ /* Bhi */
+ if ((cpuint - (cpuint & GetMaskByte(cpuM68kInit_Bhi))) ==
ConvertBitToByte(cpuM68kInit_Bhi))
+ {
+ retsize = M68k_Bhi( outfp, cpu_buffer, cpu_pos, cpu_size,
+ BaseAddress, cpuarch);
+ if (retsize<0)
+ retcode = 1;
+ else
+ cpu_pos += retsize;
+ }
+
+ /* Bls */
+ if ((cpuint - (cpuint & GetMaskByte(cpuM68kInit_Bls))) ==
ConvertBitToByte(cpuM68kInit_Bls))
+ {
+ retsize = M68k_Bls( outfp, cpu_buffer, cpu_pos, cpu_size,
+ BaseAddress, cpuarch);
+ if (retsize<0)
+ retcode = 1;
+ else
+ cpu_pos += retsize;
+ }
+
+ /* Bcc */
+ if ((cpuint - (cpuint & GetMaskByte(cpuM68kInit_Bcc))) ==
ConvertBitToByte(cpuM68kInit_Bcc))
+ {
+ retsize = M68k_Bcc( outfp, cpu_buffer, cpu_pos, cpu_size,
+ BaseAddress, cpuarch);
+ if (retsize<0)
+ retcode = 1;
+ else
+ cpu_pos += retsize;
+ }
+
+ /* Bcs */
+ if ((cpuint - (cpuint & GetMaskByte(cpuM68kInit_Bcs))) ==
ConvertBitToByte(cpuM68kInit_Bcs))
+ {
+ retsize = M68k_Bcs( outfp, cpu_buffer, cpu_pos, cpu_size,
+ BaseAddress, cpuarch);
+ if (retsize<0)
+ retcode = 1;
+ else
+ cpu_pos += retsize;
+ }
+
+ /* Bne */
+ if ((cpuint - (cpuint & GetMaskByte(cpuM68kInit_Bne))) ==
ConvertBitToByte(cpuM68kInit_Bne))
+ {
+ retsize = M68k_Bne( outfp, cpu_buffer, cpu_pos, cpu_size,
+ BaseAddress, cpuarch);
+ if (retsize<0)
+ retcode = 1;
+ else
+ cpu_pos += retsize;
+ }
+
+ /* Beq */
+ if ((cpuint - (cpuint & GetMaskByte(cpuM68kInit_Beq))) ==
ConvertBitToByte(cpuM68kInit_Beq))
+ {
+ retsize = M68k_Beq( outfp, cpu_buffer, cpu_pos, cpu_size,
+ BaseAddress, cpuarch);
+ if (retsize<0)
+ retcode = 1;
+ else
+ cpu_pos += retsize;
+ }
+
+ /* Bvc */
+ if ((cpuint - (cpuint & GetMaskByte(cpuM68kInit_Bvc))) ==
ConvertBitToByte(cpuM68kInit_Bvc))
+ {
+ retsize = M68k_Bvc( outfp, cpu_buffer, cpu_pos, cpu_size,
+ BaseAddress, cpuarch);
+ if (retsize<0)
+ retcode = 1;
+ else
+ cpu_pos += retsize;
+ }
+
+ /* Bvs */
+ if ((cpuint - (cpuint & GetMaskByte(cpuM68kInit_Bvs))) ==
ConvertBitToByte(cpuM68kInit_Bvs))
+ {
+ retsize = M68k_Bvs( outfp, cpu_buffer, cpu_pos, cpu_size,
+ BaseAddress, cpuarch);
+ if (retsize<0)
+ retcode = 1;
+ else
+ cpu_pos += retsize;
+ }
+
+ /* Bpl */
+ if ((cpuint - (cpuint & GetMaskByte(cpuM68kInit_Bpl))) ==
ConvertBitToByte(cpuM68kInit_Bpl))
+ {
+ retsize = M68k_Bpl( outfp, cpu_buffer, cpu_pos, cpu_size,
+ BaseAddress, cpuarch);
+ if (retsize<0)
+ retcode = 1;
+ else
+ cpu_pos += retsize;
+ }
+
+ /* Bmi */
+ if ((cpuint - (cpuint & GetMaskByte(cpuM68kInit_Bmi))) ==
ConvertBitToByte(cpuM68kInit_Bmi))
+ {
+ retsize = M68k_Bmi( outfp, cpu_buffer, cpu_pos, cpu_size,
+ BaseAddress, cpuarch);
+ if (retsize<0)
+ retcode = 1;
+ else
+ cpu_pos += retsize;
+ }
+
+ /* Bge */
+ if ((cpuint - (cpuint & GetMaskByte(cpuM68kInit_Bge))) ==
ConvertBitToByte(cpuM68kInit_Bge))
+ {
+ retsize = M68k_Bge( outfp, cpu_buffer, cpu_pos, cpu_size,
+ BaseAddress, cpuarch);
+ if (retsize<0)
+ retcode = 1;
+ else
+ cpu_pos += retsize;
+ }
+
+ /* Blt */
+ if ((cpuint - (cpuint & GetMaskByte(cpuM68kInit_Blt))) ==
ConvertBitToByte(cpuM68kInit_Blt))
+ {
+ retsize = M68k_Blt( outfp, cpu_buffer, cpu_pos, cpu_size,
+ BaseAddress, cpuarch);
+ if (retsize<0)
+ retcode = 1;
+ else
+ cpu_pos += retsize;
+ }
+
+ /* Bgt */
+ if ((cpuint - (cpuint & GetMaskByte(cpuM68kInit_Bgt))) ==
ConvertBitToByte(cpuM68kInit_Bgt))
+ {
+ retsize = M68k_Bgt( outfp, cpu_buffer, cpu_pos, cpu_size,
+ BaseAddress, cpuarch);
+ if (retsize<0)
+ retcode = 1;
+ else
+ cpu_pos += retsize;
+ }
+
+ /* Ble */
+ if ((cpuint - (cpuint & GetMaskByte(cpuM68kInit_Ble))) ==
ConvertBitToByte(cpuM68kInit_Ble))
+ {
+ retsize = M68k_Ble( outfp, cpu_buffer, cpu_pos, cpu_size,
+ BaseAddress, cpuarch);
+ if (retsize<0)
+ retcode = 1;
+ else
+ cpu_pos += retsize;
}
/* Found all Opcode and breakout and return no error found */
Modified: trunk/rosapps/devutils/cputointel/m68k/M68kBrain.h
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/devutils/cputointel/m68k/M…
==============================================================================
--- trunk/rosapps/devutils/cputointel/m68k/M68kBrain.h (original)
+++ trunk/rosapps/devutils/cputointel/m68k/M68kBrain.h Sun Dec 31 21:45:35 2006
@@ -13,6 +13,21 @@
CPU_BYTE cpuM68kInit_Asl[16] = {1,1,1,0,2,2,2,0,2,2,2,0,0,2,2,2};
CPU_BYTE cpuM68kInit_Asr[16] = {1,1,1,0,2,2,2,1,2,2,2,0,0,2,2,2};
+CPU_BYTE cpuM68kInit_Bhi[16] = {0,1,1,0,0,0,1,0,2,2,2,2,2,2,2,2};
+CPU_BYTE cpuM68kInit_Bls[16] = {0,1,1,0,0,0,1,1,2,2,2,2,2,2,2,2};
+CPU_BYTE cpuM68kInit_Bcc[16] = {0,1,1,0,0,1,0,0,2,2,2,2,2,2,2,2};
+CPU_BYTE cpuM68kInit_Bcs[16] = {0,1,1,0,0,1,0,1,2,2,2,2,2,2,2,2};
+CPU_BYTE cpuM68kInit_Bne[16] = {0,1,1,0,0,1,1,0,2,2,2,2,2,2,2,2};
+CPU_BYTE cpuM68kInit_Beq[16] = {0,1,1,0,0,1,1,1,2,2,2,2,2,2,2,2};
+CPU_BYTE cpuM68kInit_Bvc[16] = {0,1,1,0,1,0,0,0,2,2,2,2,2,2,2,2};
+CPU_BYTE cpuM68kInit_Bvs[16] = {0,1,1,0,1,0,0,1,2,2,2,2,2,2,2,2};
+CPU_BYTE cpuM68kInit_Bpl[16] = {0,1,1,0,1,0,1,0,2,2,2,2,2,2,2,2};
+CPU_BYTE cpuM68kInit_Bmi[16] = {0,1,1,0,1,0,1,1,2,2,2,2,2,2,2,2};
+CPU_BYTE cpuM68kInit_Bge[16] = {0,1,1,0,1,1,0,0,2,2,2,2,2,2,2,2};
+CPU_BYTE cpuM68kInit_Blt[16] = {0,1,1,0,1,1,0,1,2,2,2,2,2,2,2,2};
+CPU_BYTE cpuM68kInit_Bgt[16] = {0,1,1,0,1,1,1,0,2,2,2,2,2,2,2,2};
+CPU_BYTE cpuM68kInit_Ble[16] = {0,1,1,0,1,1,1,1,2,2,2,2,2,2,2,2};
+
CPU_BYTE M68k_Rx[16] = {0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0};
CPU_BYTE M68k_RM[16] = {0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0};
Modified: trunk/rosapps/devutils/cputointel/m68k/M68kopcode.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/devutils/cputointel/m68k/M…
==============================================================================
--- trunk/rosapps/devutils/cputointel/m68k/M68kopcode.c (original)
+++ trunk/rosapps/devutils/cputointel/m68k/M68kopcode.c Sun Dec 31 21:45:35 2006
@@ -5,7 +5,8 @@
#include "misc.h"
-CPU_INT M68k_Abcd(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT
cpu_size, CPU_UNINT BaseAddress)
+CPU_INT M68k_Abcd( FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos,
+ CPU_UNINT cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch)
{
fprintf(out,"Line_0x%8x :\n",BaseAddress + cpu_pos);
@@ -13,7 +14,8 @@
return -1;
}
-CPU_INT M68k_Add(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT cpu_size,
CPU_UNINT BaseAddress)
+CPU_INT M68k_Add(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos,
+ CPU_UNINT cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch)
{
CPU_INT opmode;
CPU_INT mode;
@@ -84,7 +86,8 @@
return -1;
}
-CPU_INT M68k_Addi(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT
cpu_size, CPU_UNINT BaseAddress)
+CPU_INT M68k_Addi( FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos,
+ CPU_UNINT cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch)
{
fprintf(out,"Line_0x%8x :\n",BaseAddress + cpu_pos);
@@ -92,7 +95,8 @@
return -1;
}
-CPU_INT M68k_Addq(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT
cpu_size, CPU_UNINT BaseAddress)
+CPU_INT M68k_Addq( FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos,
+ CPU_UNINT cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch)
{
fprintf(out,"Line_0x%8x :\n",BaseAddress + cpu_pos);
@@ -100,7 +104,8 @@
return -1;
}
-CPU_INT M68k_Addx(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT
cpu_size, CPU_UNINT BaseAddress)
+CPU_INT M68k_Addx( FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos,
+ CPU_UNINT cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch)
{
fprintf(out,"Line_0x%8x :\n",BaseAddress + cpu_pos);
@@ -108,7 +113,8 @@
return -1;
}
-CPU_INT M68k_And(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT cpu_size,
CPU_UNINT BaseAddress)
+CPU_INT M68k_And( FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos,
+ CPU_UNINT cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch)
{
fprintf(out,"Line_0x%8x :\n",BaseAddress + cpu_pos);
@@ -116,7 +122,8 @@
return -1;
}
-CPU_INT M68k_Andi(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT
cpu_size, CPU_UNINT BaseAddress)
+CPU_INT M68k_Andi( FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos,
+ CPU_UNINT cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch)
{
fprintf(out,"Line_0x%8x :\n",BaseAddress + cpu_pos);
@@ -124,7 +131,8 @@
return -1;
}
-CPU_INT M68k_AndToCCR(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT
cpu_size, CPU_UNINT BaseAddress)
+CPU_INT M68k_AndToCCR( FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos,
+ CPU_UNINT cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch)
{
fprintf(out,"Line_0x%8x :\n",BaseAddress + cpu_pos);
@@ -132,7 +140,8 @@
return -1;
}
-CPU_INT M68k_Asl(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT cpu_size,
CPU_UNINT BaseAddress)
+CPU_INT M68k_Asl( FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos,
+ CPU_UNINT cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch)
{
fprintf(out,"Line_0x%8x :\n",BaseAddress + cpu_pos);
@@ -140,7 +149,8 @@
return -1;
}
-CPU_INT M68k_Asr(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT cpu_size,
CPU_UNINT BaseAddress)
+CPU_INT M68k_Asr( FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos,
+ CPU_UNINT cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch)
{
fprintf(out,"Line_0x%8x :\n",BaseAddress + cpu_pos);
@@ -148,3 +158,130 @@
return -1;
}
+CPU_INT M68k_Bhi( FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos,
+ CPU_UNINT cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch)
+{
+ fprintf(out,"Line_0x%8x :\n",BaseAddress + cpu_pos);
+
+ printf(";Bhi unimplement\n");
+ return -1;
+}
+
+CPU_INT M68k_Bls( FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos,
+ CPU_UNINT cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch)
+{
+ fprintf(out,"Line_0x%8x :\n",BaseAddress + cpu_pos);
+
+ printf(";Bls unimplement\n");
+ return -1;
+}
+
+CPU_INT M68k_Bcc( FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos,
+ CPU_UNINT cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch)
+{
+ fprintf(out,"Line_0x%8x :\n",BaseAddress + cpu_pos);
+
+ printf(";Bcc unimplement\n");
+ return -1;
+}
+
+CPU_INT M68k_Bcs( FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos,
+ CPU_UNINT cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch)
+{
+ fprintf(out,"Line_0x%8x :\n",BaseAddress + cpu_pos);
+
+ printf(";Bcs unimplement\n");
+ return -1;
+}
+
+CPU_INT M68k_Bne( FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos,
+ CPU_UNINT cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch)
+{
+ fprintf(out,"Line_0x%8x :\n",BaseAddress + cpu_pos);
+
+ printf(";Bne unimplement\n");
+ return -1;
+}
+
+CPU_INT M68k_Beq( FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos,
+ CPU_UNINT cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch)
+{
+ fprintf(out,"Line_0x%8x :\n",BaseAddress + cpu_pos);
+
+ printf(";Beq unimplement\n");
+ return -1;
+}
+
+CPU_INT M68k_Bvc( FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos,
+ CPU_UNINT cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch)
+{
+ fprintf(out,"Line_0x%8x :\n",BaseAddress + cpu_pos);
+
+ printf(";Bvc unimplement\n");
+ return -1;
+}
+
+CPU_INT M68k_Bvs( FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos,
+ CPU_UNINT cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch)
+{
+ fprintf(out,"Line_0x%8x :\n",BaseAddress + cpu_pos);
+
+ printf(";Bvs unimplement\n");
+ return -1;
+}
+
+CPU_INT M68k_Bpl( FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos,
+ CPU_UNINT cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch)
+{
+ fprintf(out,"Line_0x%8x :\n",BaseAddress + cpu_pos);
+
+ printf(";Bpl unimplement\n");
+ return -1;
+}
+
+CPU_INT M68k_Bmi( FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos,
+ CPU_UNINT cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch)
+{
+ fprintf(out,"Line_0x%8x :\n",BaseAddress + cpu_pos);
+
+ printf(";Bmi unimplement\n");
+ return -1;
+}
+
+CPU_INT M68k_Bge( FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos,
+ CPU_UNINT cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch)
+{
+ fprintf(out,"Line_0x%8x :\n",BaseAddress + cpu_pos);
+
+ printf(";Bge unimplement\n");
+ return -1;
+}
+
+CPU_INT M68k_Blt( FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos,
+ CPU_UNINT cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch)
+{
+ fprintf(out,"Line_0x%8x :\n",BaseAddress + cpu_pos);
+
+ printf(";Blt unimplement\n");
+ return -1;
+}
+
+CPU_INT M68k_Bgt( FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos,
+ CPU_UNINT cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch)
+{
+ fprintf(out,"Line_0x%8x :\n",BaseAddress + cpu_pos);
+
+ printf(";Bgt unimplement\n");
+ return -1;
+}
+
+CPU_INT M68k_Ble( FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos,
+ CPU_UNINT cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch)
+{
+ fprintf(out,"Line_0x%8x :\n",BaseAddress + cpu_pos);
+
+ printf(";Ble unimplement\n");
+ return -1;
+}
+
+
Modified: trunk/rosapps/devutils/cputointel/m68k/m68k.h
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/devutils/cputointel/m68k/m…
==============================================================================
--- trunk/rosapps/devutils/cputointel/m68k/m68k.h (original)
+++ trunk/rosapps/devutils/cputointel/m68k/m68k.h Sun Dec 31 21:45:35 2006
@@ -1,16 +1,31 @@
#include "../misc.h"
+CPU_INT M68KBrain(char *infileName, char *outputfileName, CPU_UNINT BaseAddress,
CPU_UNINT cpuarch);
-CPU_INT M68k_Abcd(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT
cpu_size, CPU_UNINT BaseAddress);
-CPU_INT M68k_Add(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT cpu_size,
CPU_UNINT BaseAddress);
-CPU_INT M68k_Addi(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT
cpu_size, CPU_UNINT BaseAddress);
-CPU_INT M68k_Addq(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT
cpu_size, CPU_UNINT BaseAddress);
-CPU_INT M68k_Addx(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT
cpu_size, CPU_UNINT BaseAddress);
-CPU_INT M68k_And(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT cpu_size,
CPU_UNINT BaseAddress);
-CPU_INT M68k_Andi(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT
cpu_size, CPU_UNINT BaseAddress);
-CPU_INT M68k_AndToCCR(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT
cpu_size, CPU_UNINT BaseAddress);
-CPU_INT M68k_Asl(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT cpu_size,
CPU_UNINT BaseAddress);
-CPU_INT M68k_Asr(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT cpu_size,
CPU_UNINT BaseAddress);
+CPU_INT M68k_Abcd(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT
cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch);
+CPU_INT M68k_Add(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT cpu_size,
CPU_UNINT BaseAddress, CPU_UNINT cpuarch);
+CPU_INT M68k_Addi(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT
cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch);
+CPU_INT M68k_Addq(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT
cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch);
+CPU_INT M68k_Addx(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT
cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch);
+CPU_INT M68k_And(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT cpu_size,
CPU_UNINT BaseAddress, CPU_UNINT cpuarch);
+CPU_INT M68k_Andi(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT
cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch);
+CPU_INT M68k_AndToCCR(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT
cpu_size, CPU_UNINT BaseAddress, CPU_UNINT cpuarch);
+CPU_INT M68k_Asl(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT cpu_size,
CPU_UNINT BaseAddress, CPU_UNINT cpuarch);
+CPU_INT M68k_Asr(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT cpu_size,
CPU_UNINT BaseAddress, CPU_UNINT cpuarch);
+CPU_INT M68k_Bhi(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT cpu_size,
CPU_UNINT BaseAddress, CPU_UNINT cpuarch);
+CPU_INT M68k_Bls(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT cpu_size,
CPU_UNINT BaseAddress, CPU_UNINT cpuarch);
+CPU_INT M68k_Bcc(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT cpu_size,
CPU_UNINT BaseAddress, CPU_UNINT cpuarch);
+CPU_INT M68k_Bcs(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT cpu_size,
CPU_UNINT BaseAddress, CPU_UNINT cpuarch);
+CPU_INT M68k_Bne(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT cpu_size,
CPU_UNINT BaseAddress, CPU_UNINT cpuarch);
+CPU_INT M68k_Beq(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT cpu_size,
CPU_UNINT BaseAddress, CPU_UNINT cpuarch);
+CPU_INT M68k_Bvc(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT cpu_size,
CPU_UNINT BaseAddress, CPU_UNINT cpuarch);
+CPU_INT M68k_Bvs(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT cpu_size,
CPU_UNINT BaseAddress, CPU_UNINT cpuarch);
+CPU_INT M68k_Bpl(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT cpu_size,
CPU_UNINT BaseAddress, CPU_UNINT cpuarch);
+CPU_INT M68k_Bmi(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT cpu_size,
CPU_UNINT BaseAddress, CPU_UNINT cpuarch);
+CPU_INT M68k_Bge(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT cpu_size,
CPU_UNINT BaseAddress, CPU_UNINT cpuarch);
+CPU_INT M68k_Blt(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT cpu_size,
CPU_UNINT BaseAddress, CPU_UNINT cpuarch);
+CPU_INT M68k_Bgt(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT cpu_size,
CPU_UNINT BaseAddress, CPU_UNINT cpuarch);
+CPU_INT M68k_Ble(FILE *out, CPU_BYTE * cpu_buffer, CPU_UNINT cpu_pos, CPU_UNINT cpu_size,
CPU_UNINT BaseAddress, CPU_UNINT cpuarch);
extern CPU_BYTE M68k_Rx[16];
extern CPU_BYTE M68k_RM[16];