6003a768 |
1 | \r |
619b1824 |
2 | // This file is part of the Cyclone 68000 Emulator\r |
3 | \r |
c41b9b97 |
4 | // Copyright (c) 2011 FinalDave (emudave (at) gmail.com)\r |
5 | \r |
619b1824 |
6 | // This code is licensed under the GNU General Public License version 2.0 and the MAME License.\r |
7 | // You can choose the license that has the most advantages for you.\r |
8 | \r |
9 | // SVN repository can be found at http://code.google.com/p/cyclone68000/\r |
10 | \r |
6003a768 |
11 | #include <stdio.h>\r |
12 | #include <stdarg.h>\r |
13 | #include <stdlib.h>\r |
14 | #include <string.h>\r |
15 | \r |
16 | // Disa.c\r |
17 | #include "../Pico/Disa.h"\r |
18 | \r |
19 | // Ea.cpp\r |
20 | int EaCalc(int a,int mask,int ea,int size);\r |
21 | int EaRead(int a,int v,int ea,int size,int top=0);\r |
22 | int EaCanRead(int ea,int size);\r |
23 | int EaWrite(int a,int v,int ea,int size,int top=0);\r |
24 | int EaCanWrite(int ea);\r |
25 | \r |
26 | // Main.cpp\r |
27 | extern int *CyJump; // Jump table\r |
28 | extern int ms; // If non-zero, output in Microsoft ARMASM format\r |
29 | extern char *Narm[4]; // Normal ARM Extensions for operand sizes 0,1,2\r |
30 | extern char *Sarm[4]; // Sign-extend ARM Extensions for operand sizes 0,1,2\r |
31 | extern int Cycles; // Current cycles for opcode\r |
32 | extern int Amatch; // If one, try to match A68K timing\r |
33 | extern int Accu; // Accuracy\r |
34 | extern int Debug; // Debug info\r |
35 | void ot(char *format, ...);\r |
36 | void ltorg();\r |
37 | void CheckInterrupt();\r |
38 | int MemHandler(int type,int size);\r |
39 | \r |
40 | // OpAny.cpp\r |
41 | int OpGetFlags(int subtract,int xbit);\r |
42 | void OpUse(int op,int use);\r |
43 | void OpFirst();\r |
44 | void OpStart(int op);\r |
45 | void OpEnd();\r |
46 | int OpBase(int op);\r |
47 | void OpAny(int op);\r |
48 | \r |
49 | //----------------------\r |
50 | // OpArith.cpp\r |
51 | int OpArith(int op);\r |
52 | int OpLea(int op);\r |
53 | int OpAddq(int op);\r |
54 | int OpArithReg(int op);\r |
55 | int OpMul(int op);\r |
56 | int OpAbcd(int op);\r |
57 | int OpAritha(int op);\r |
58 | int OpAddx(int op);\r |
59 | int OpCmpEor(int op);\r |
60 | \r |
61 | // OpBranch.cpp\r |
62 | void OpPush32();\r |
63 | void OpPushSr(int high);\r |
64 | int OpTrap(int op);\r |
65 | int OpLink(int op);\r |
66 | int OpUnlk(int op);\r |
67 | int Op4E70(int op);\r |
68 | int OpJsr(int op);\r |
69 | int OpBranch(int op);\r |
70 | int OpDbra(int op);\r |
71 | \r |
72 | // OpLogic.cpp\r |
73 | int OpBtstReg(int op);\r |
74 | int OpBtstImm(int op);\r |
75 | int OpNeg(int op);\r |
76 | int OpSwap(int op);\r |
77 | int OpTst(int op);\r |
78 | int OpExt(int op);\r |
79 | int OpSet(int op);\r |
80 | int OpAsr(int op);\r |
81 | int OpAsrEa(int op);\r |
82 | \r |
83 | // OpMove.cpp\r |
84 | int OpMove(int op);\r |
85 | int OpLea(int op);\r |
86 | void OpFlagsToReg(int high);\r |
87 | void OpRegToFlags(int high);\r |
88 | int OpMoveSr(int op);\r |
89 | int OpArithSr(int op);\r |
90 | int OpPea(int op);\r |
91 | int OpMovem(int op);\r |
92 | int OpMoveq(int op);\r |
93 | int OpMoveUsp(int op);\r |
94 | int OpExg(int op);\r |