Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alexbevi
GitHub Repository: alexbevi/BizHawk
Path: blob/master/waterbox/gpgx/core/m68k/m68kconf.h
2 views
1
#ifndef M68KCONF__HEADER
2
#define M68KCONF__HEADER
3
4
/* ======================================================================== */
5
/* ======================== MAIN 68K CONFIGURATION ======================== */
6
/* ======================================================================== */
7
8
/* Configuration switches.
9
* Use OPT_SPECIFY_HANDLER for configuration options that allow callbacks.
10
* OPT_SPECIFY_HANDLER causes the core to link directly to the function
11
* or macro you specify, rather than using callback functions whose pointer
12
* must be passed in using m68k_set_xxx_callback().
13
*/
14
#define OPT_OFF 0
15
#define OPT_ON 1
16
#define OPT_SPECIFY_HANDLER 2
17
18
/* If ON, the CPU will call m68k_write_32_pd() when it executes move.l with a
19
* predecrement destination EA mode instead of m68k_write_32().
20
* To simulate real 68k behavior, m68k_write_32_pd() must first write the high
21
* word to [address+2], and then write the low word to [address].
22
*/
23
#define M68K_SIMULATE_PD_WRITES OPT_OFF
24
25
/* If ON, CPU will call the interrupt acknowledge callback when it services an
26
* interrupt.
27
* If off, all interrupts will be autovectored and all interrupt requests will
28
* auto-clear when the interrupt is serviced.
29
*/
30
#define M68K_EMULATE_INT_ACK OPT_SPECIFY_HANDLER
31
#define M68K_INT_ACK_CALLBACK(A) vdp_68k_irq_ack(A)
32
33
/* If ON, CPU will call the output reset callback when it encounters a reset
34
* instruction.
35
*/
36
#define M68K_EMULATE_RESET OPT_OFF
37
#define M68K_RESET_CALLBACK() your_reset_handler_function()
38
39
/* If ON, CPU will call the callback when it encounters a tas
40
* instruction.
41
*/
42
#define M68K_TAS_HAS_CALLBACK OPT_OFF
43
#define M68K_TAS_CALLBACK() your_tas_handler_function()
44
45
/* If ON, CPU will call the set fc callback on every memory access to
46
* differentiate between user/supervisor, program/data access like a real
47
* 68000 would. This should be enabled and the callback should be set if you
48
* want to properly emulate the m68010 or higher. (moves uses function codes
49
* to read/write data from different address spaces)
50
*/
51
#define M68K_EMULATE_FC OPT_OFF
52
#define M68K_SET_FC_CALLBACK(A) your_set_fc_handler_function(A)
53
54
/* If ON, the CPU will monitor the trace flags and take trace exceptions
55
*/
56
#define M68K_EMULATE_TRACE OPT_OFF
57
58
/* If ON, the CPU will emulate the 4-byte prefetch queue of a real 68000 */
59
#define M68K_EMULATE_PREFETCH OPT_OFF
60
61
/* If ON, the CPU will generate address error exceptions if it tries to
62
* access a word or longword at an odd address.
63
* NOTE: This is only emulated properly for 68000 mode.
64
*/
65
#define M68K_EMULATE_ADDRESS_ERROR OPT_ON
66
67
/* If ON and previous option is also ON, address error exceptions will
68
also be checked when fetching instructions. Disabling this can help
69
speeding up emulation while still emulating address error exceptions
70
on other memory access if needed.
71
* NOTE: This is only emulated properly for 68000 mode.
72
*/
73
#define M68K_CHECK_PC_ADDRESS_ERROR OPT_OFF
74
75
76
/* ----------------------------- COMPATIBILITY ---------------------------- */
77
78
/* The following options set optimizations that violate the current ANSI
79
* standard, but will be compliant under the forthcoming C9X standard.
80
*/
81
82
83
/* If ON, the enulation core will use 64-bit integers to speed up some
84
* operations.
85
*/
86
#define M68K_USE_64_BIT OPT_OFF
87
88
89
/* ======================================================================== */
90
/* ============================== END OF FILE ============================= */
91
/* ======================================================================== */
92
93
#endif /* M68KCONF__HEADER */
94
95