windows Pico stuff wip
[picodrive.git] / cpu / Cyclone / app.h
CommitLineData
cc68a136 1\r
2#include <stdio.h>\r
3#include <stdarg.h>\r
4#include <stdlib.h>\r
5#include <string.h>\r
6\r
0e11c502 7#ifndef CONFIG_FILE\r
8#define CONFIG_FILE "config.h"\r
9#endif\r
10#include CONFIG_FILE\r
cc68a136 11\r
12// Disa.c\r
13#include "Disa/Disa.h"\r
14\r
15// Ea.cpp\r
0e11c502 16extern int earead_check_addrerr;\r
17extern int eawrite_check_addrerr;\r
cc68a136 18extern int g_jmp_cycle_table[];\r
19extern int g_jsr_cycle_table[];\r
20extern int g_lea_cycle_table[];\r
21extern int g_pea_cycle_table[];\r
22extern int g_movem_cycle_table[];\r
23int Ea_add_ns(int *tab, int ea); // add nonstandard EA cycles\r
b637c56a 24int EaCalc(int a,int mask,int ea,int size,int top=0,int sign_extend=1); // 6\r
25int EaRead(int a,int v,int ea,int size,int mask,int top=0,int sign_extend=1); // 7\r
85a36a57 26int EaCalcRead(int r_ea,int r,int ea,int size,int mask,int sign_extend=1); // 6\r
27int EaCalcReadNoSE(int r_ea,int r,int ea,int size,int mask);\r
cc68a136 28int EaCanRead(int ea,int size);\r
b637c56a 29int EaWrite(int a,int v,int ea,int size,int mask,int top=0,int sign_extend_ea=1);\r
cc68a136 30int EaCanWrite(int ea);\r
31int EaAn(int ea);\r
32\r
33// Main.cpp\r
cfb3dfa0 34extern int *CyJump; // Jump table\r
35extern int ms; // If non-zero, output in Microsoft ARMASM format\r
cc68a136 36extern char *Narm[4]; // Normal ARM Extensions for operand sizes 0,1,2\r
37extern char *Sarm[4]; // Sign-extend ARM Extensions for operand sizes 0,1,2\r
cfb3dfa0 38extern int Cycles; // Current cycles for opcode\r
39extern int pc_dirty; // something changed PC during processing\r
ee5e024c 40extern int arm_op_count; // for stats\r
cc68a136 41void ot(const char *format, ...);\r
42void ltorg();\r
0e11c502 43int MemHandler(int type,int size,int addrreg=0,int need_addrerr_check=1);\r
cfb3dfa0 44void FlushPC(void);\r
cc68a136 45\r
46// OpAny.cpp\r
85a36a57 47extern int g_op;\r
0e11c502 48extern int opend_op_changes_cycles, opend_check_interrupt, opend_check_trace;\r
cc68a136 49int OpGetFlags(int subtract,int xbit,int sprecialz=0);\r
50void OpUse(int op,int use);\r
ee5e024c 51void OpStart(int op,int sea=0,int tea=0,int op_changes_cycles=0,int supervisor_check=0);\r
0e11c502 52void OpEnd(int sea=0,int tea=0);\r
85a36a57 53int OpBase(int op,int size,int sepa=0);\r
cc68a136 54void OpAny(int op);\r
55\r
56//----------------------\r
57// OpArith.cpp\r
58int OpArith(int op);\r
59int OpLea(int op);\r
60int OpAddq(int op);\r
61int OpArithReg(int op);\r
62int OpMul(int op);\r
63int OpAbcd(int op);\r
64int OpNbcd(int op);\r
65int OpAritha(int op);\r
66int OpAddx(int op);\r
67int OpCmpEor(int op);\r
68int OpCmpm(int op);\r
69int OpChk(int op);\r
70int GetXBit(int subtract);\r
71\r
72// OpBranch.cpp\r
73void OpPush32();\r
74void OpPushSr(int high);\r
75int OpTrap(int op);\r
76int OpLink(int op);\r
77int OpUnlk(int op);\r
78int Op4E70(int op);\r
79int OpJsr(int op);\r
80int OpBranch(int op);\r
81int OpDbra(int op);\r
82\r
83// OpLogic.cpp\r
84int OpBtstReg(int op);\r
85int OpBtstImm(int op);\r
86int OpNeg(int op);\r
87int OpSwap(int op);\r
88int OpTst(int op);\r
89int OpExt(int op);\r
90int OpSet(int op);\r
91int OpAsr(int op);\r
92int OpAsrEa(int op);\r
c008977e 93int OpTas(int op, int gen_special=0);\r
cc68a136 94\r
95// OpMove.cpp\r
96int OpMove(int op);\r
97int OpLea(int op);\r
98void OpFlagsToReg(int high);\r
0e11c502 99void OpRegToFlags(int high,int srh_reg=0);\r
cc68a136 100int OpMoveSr(int op);\r
101int OpArithSr(int op);\r
102int OpPea(int op);\r
103int OpMovem(int op);\r
104int OpMoveq(int op);\r
105int OpMoveUsp(int op);\r
106int OpExg(int op);\r
85a36a57 107int OpMovep(int op);\r
cc68a136 108int OpStopReset(int op);\r
85a36a57 109void SuperEnd(void);\r
0e11c502 110void SuperChange(int op,int srh_reg=-1);\r
85a36a57 111\r