41 |
|
#define DEBUG 0 |
42 |
|
#include "debug.h" |
43 |
|
|
44 |
+ |
#if ENABLE_MON |
45 |
+ |
#include "mon.h" |
46 |
+ |
|
47 |
+ |
static uint32 mon_read_byte_b2(uint32 adr) |
48 |
+ |
{ |
49 |
+ |
return ReadMacInt8(adr); |
50 |
+ |
} |
51 |
+ |
|
52 |
+ |
static void mon_write_byte_b2(uint32 adr, uint32 b) |
53 |
+ |
{ |
54 |
+ |
WriteMacInt8(adr, b); |
55 |
+ |
} |
56 |
+ |
#endif |
57 |
+ |
|
58 |
|
|
59 |
|
/* |
60 |
|
* Initialize everything, returns false on error |
144 |
|
ErrorAlert(GetString(STR_UNSUPPORTED_ROM_TYPE_ERR)); |
145 |
|
return false; |
146 |
|
} |
147 |
+ |
|
148 |
+ |
#if ENABLE_MON |
149 |
+ |
// Initialize mon |
150 |
+ |
mon_init(); |
151 |
+ |
mon_read_byte = mon_read_byte_b2; |
152 |
+ |
mon_write_byte = mon_write_byte_b2; |
153 |
+ |
#endif |
154 |
+ |
|
155 |
|
return true; |
156 |
|
} |
157 |
|
|
162 |
|
|
163 |
|
void ExitAll(void) |
164 |
|
{ |
165 |
+ |
#if ENABLE_MON |
166 |
+ |
// Deinitialize mon |
167 |
+ |
mon_exit(); |
168 |
+ |
#endif |
169 |
+ |
|
170 |
|
// Save XPRAM |
171 |
|
XPRAMExit(); |
172 |
|
|