initial import
[picodrive.git] / cpu / Cyclone / config.h
1 \r
2 \r
3 /**\r
4  * Cyclone 68000 configuration file\r
5 **/\r
6 \r
7 \r
8 /*\r
9  * If this option is enabled, Microsoft ARMASM compatible output is generated.\r
10  * Otherwise GNU as syntax is used.\r
11  */\r
12 #define USE_MS_SYNTAX             0\r
13 \r
14 /*\r
15  * Enable this option if you are going to use Cyclone to emulate Genesis /\r
16  * Mega Drive system. As VDP chip in these systems had control of the bus,\r
17  * several instructions were acting differently, for example TAS did'n have\r
18  * the write-back phase. That will be emulated, if this option is enebled.\r
19  * This option also alters timing slightly.\r
20  */\r
21 #define CYCLONE_FOR_GENESIS           1\r
22 \r
23 /*\r
24  * This option compresses Cyclone's jumptable. Because of this the executable\r
25  * will be smaller and load slightly faster and less relocations will be needed.\r
26  * This also fixes the crash problem with 0xfffe and 0xffff opcodes.\r
27  * Warning: if you enable this, you MUST call CycloneInit() before calling\r
28  * CycloneRun(), or else it will crash.\r
29  */\r
30 #define COMPRESS_JUMPTABLE        1\r
31 \r
32 /*\r
33  * Cyclone keeps the 4 least significant bits of SR, PC+membase and it's cycle\r
34  * count in ARM registers instead of the context for performance reasons. If you for\r
35  * any reason need to access them in your memory handlers, enable the options below,\r
36  * otherwise disable them to improve performance.\r
37  * Warning: the PC value will not point to start of instruction (it will be middle or\r
38  * end), also updating PC is dangerous, as Cyclone may internally increment the PC\r
39  * before fetching the next instruction and continue executing at wrong location.\r
40  */\r
41 #define MEMHANDLERS_NEED_PC       0\r
42 #define MEMHANDLERS_NEED_FLAGS    0\r
43 #define MEMHANDLERS_NEED_CYCLES   1\r
44 #define MEMHANDLERS_CHANGE_PC     0\r
45 #define MEMHANDLERS_CHANGE_FLAGS  0\r
46 #define MEMHANDLERS_CHANGE_CYCLES 0\r
47 \r
48 /*\r
49  * If enabled, Cyclone will call IrqCallback routine from it's context whenever it\r
50  * acknowledges an IRQ. IRQ level is not cleared automatically, do this in your\r
51  * hadler if needed. PC, flags and cycles are valid in the context and can be read.\r
52  * If disabled, it simply clears the IRQ level and continues execution.\r
53  */\r
54 #define USE_INT_ACK_CALLBACK      1\r
55 \r
56 /*\r
57  * Enable this if you need/change PC, flags or cycles in your IrqCallback function.\r
58  */\r
59 #define INT_ACK_NEEDS_STUFF       0\r
60 #define INT_ACK_CHANGES_STUFF     0\r
61 \r
62 /*\r
63  * If enabled, ResetCallback is called from the context, whenever RESET opcode is\r
64  * encountered. All context members are valid and can be changed.\r
65  * If disabled, RESET opcode acts as an NOP.\r
66  */\r
67 #define USE_RESET_CALLBACK        1\r
68 \r
69 /*\r
70  * If enabled, UnrecognizedCallback is called if an invalid opcode is\r
71  * encountered. All context members are valid and can be changed. The handler\r
72  * should return zero if you want Cyclone to gererate "Illegal Instruction"\r
73  * exception after this, or nonzero if not. In the later case you shuold change\r
74  * the PC by yourself, or else Cyclone will keep executing that opcode all over\r
75  * again.\r
76  * If disabled, "Illegal Instruction" exception is generated and execution is\r
77  * continued.\r
78  */\r
79 #define USE_UNRECOGNIZED_CALLBACK 1\r
80 \r
81 /*\r
82  * This option will also call UnrecognizedCallback for a-line and f-line\r
83  * (0xa*** and 0xf***) opcodes the same way as described above, only appropriate\r
84  * exceptions will be generated.\r
85  */\r
86 #define USE_AFLINE_CALLBACK       1\r
87 \r
88 /*\r
89  * This makes Cyclone to call checkpc from it's context whenever it changes the PC\r
90  * by a large value. It takes and should return the PC value in PC+membase form.\r
91  * The flags and cycle counter are not valid in this function.\r
92  */\r
93 #define USE_CHECKPC_CALLBACK      1\r
94 \r
95 /*\r
96  * When this option is enabled Cyclone will do two word writes instead of one\r
97  * long write when handling MOVE.L with pre-decrementing destination, as described in\r
98  * Bart Trzynadlowski's doc (http://www.trzy.org/files/68knotes.txt).\r
99  * Enable this if you are emulating a 16 bit system.\r
100  */\r
101 #define SPLIT_MOVEL_PD            1\r