1 |
|
/* |
2 |
|
* basilisk_glue.cpp - Glue UAE CPU to Basilisk II CPU engine interface |
3 |
|
* |
4 |
< |
* Basilisk II (C) 1997-1999 Christian Bauer |
4 |
> |
* Basilisk II (C) 1997-2001 Christian Bauer |
5 |
|
* |
6 |
|
* This program is free software; you can redistribute it and/or modify |
7 |
|
* it under the terms of the GNU General Public License as published by |
19 |
|
*/ |
20 |
|
|
21 |
|
#include "sysdeps.h" |
22 |
+ |
|
23 |
|
#include "cpu_emulation.h" |
24 |
|
#include "main.h" |
25 |
|
#include "emul_op.h" |
32 |
|
|
33 |
|
|
34 |
|
// RAM and ROM pointers |
35 |
< |
uint32 RAMBaseMac; // RAM base (Mac address space) |
35 |
> |
uint32 RAMBaseMac = 0; // RAM base (Mac address space) gb-- init is important |
36 |
|
uint8 *RAMBaseHost; // RAM base (host address space) |
37 |
|
uint32 RAMSize; // Size of RAM |
38 |
|
uint32 ROMBaseMac; // ROM base (Mac address space) |
46 |
|
int MacFrameLayout; // Frame buffer layout |
47 |
|
#endif |
48 |
|
|
49 |
+ |
#if DIRECT_ADDRESSING |
50 |
+ |
uintptr MEMBaseDiff; // Global offset between a Mac address and its Host equivalent |
51 |
+ |
#endif |
52 |
+ |
|
53 |
|
// From newcpu.cpp |
54 |
|
extern int quit_program; |
55 |
|
|
64 |
|
// Mac address space = host address space |
65 |
|
RAMBaseMac = (uint32)RAMBaseHost; |
66 |
|
ROMBaseMac = (uint32)ROMBaseHost; |
67 |
+ |
#elif DIRECT_ADDRESSING |
68 |
+ |
InitMEMBaseDiff(RAMBaseHost, RAMBaseMac); |
69 |
|
#else |
70 |
|
// Initialize UAE memory banks |
71 |
|
RAMBaseMac = 0; |
88 |
|
#endif |
89 |
|
|
90 |
|
init_m68k(); |
91 |
+ |
#ifdef USE_COMPILER |
92 |
+ |
compiler_init(); |
93 |
+ |
#endif |
94 |
|
return true; |
95 |
|
} |
96 |
|
|
101 |
|
|
102 |
|
void Exit680x0(void) |
103 |
|
{ |
104 |
+ |
exit_m68k(); |
105 |
|
} |
106 |
|
|
107 |
|
|
125 |
|
regs.spcflags |= SPCFLAG_INT; |
126 |
|
} |
127 |
|
|
128 |
+ |
void TriggerNMI(void) |
129 |
+ |
{ |
130 |
+ |
//!! not implemented yet |
131 |
+ |
} |
132 |
+ |
|
133 |
|
|
134 |
|
/* |
135 |
|
* Get 68k interrupt level |