mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
famec: make reentrant
This commit is contained in:
parent
ae214f1c37
commit
95049eea1c
2 changed files with 27 additions and 15 deletions
|
@ -122,6 +122,20 @@ typedef struct
|
||||||
unsigned short execinfo;
|
unsigned short execinfo;
|
||||||
// PD extension
|
// PD extension
|
||||||
int io_cycle_counter; // cycles left
|
int io_cycle_counter; // cycles left
|
||||||
|
|
||||||
|
unsigned int Opcode;
|
||||||
|
signed int cycles_needed;
|
||||||
|
unsigned short *PC;
|
||||||
|
unsigned long BasePC;
|
||||||
|
unsigned int flag_C;
|
||||||
|
unsigned int flag_V;
|
||||||
|
unsigned int flag_NotZ;
|
||||||
|
unsigned int flag_N;
|
||||||
|
unsigned int flag_X;
|
||||||
|
unsigned int flag_T;
|
||||||
|
unsigned int flag_S;
|
||||||
|
unsigned int flag_I;
|
||||||
|
|
||||||
unsigned long Fetch[M68K_FETCHBANK1];
|
unsigned long Fetch[M68K_FETCHBANK1];
|
||||||
} M68K_CONTEXT;
|
} M68K_CONTEXT;
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#define FAMEC_CHECK_BRANCHES
|
#define FAMEC_CHECK_BRANCHES
|
||||||
#define FAMEC_EXTRA_INLINE
|
#define FAMEC_EXTRA_INLINE
|
||||||
// #define FAMEC_DEBUG
|
// #define FAMEC_DEBUG
|
||||||
#define FAMEC_NO_GOTOS
|
// #define FAMEC_NO_GOTOS
|
||||||
#define FAMEC_ADR_BITS 24
|
#define FAMEC_ADR_BITS 24
|
||||||
// #define FAMEC_FETCHBITS 8
|
// #define FAMEC_FETCHBITS 8
|
||||||
#define FAMEC_DATABITS 8
|
#define FAMEC_DATABITS 8
|
||||||
|
@ -528,22 +528,20 @@ M68K_CONTEXT *g_m68kcontext;
|
||||||
#define m68kcontext (*g_m68kcontext)
|
#define m68kcontext (*g_m68kcontext)
|
||||||
|
|
||||||
#ifdef FAMEC_NO_GOTOS
|
#ifdef FAMEC_NO_GOTOS
|
||||||
static u32 Opcode;
|
#define Opcode m68kcontext.Opcode
|
||||||
static s32 cycles_needed;
|
#define cycles_needed m68kcontext.cycles_needed
|
||||||
static u16 *PC;
|
#define PC m68kcontext.PC
|
||||||
static uptr BasePC;
|
#define BasePC m68kcontext.BasePC
|
||||||
static u32 flag_C;
|
#define flag_C m68kcontext.flag_C
|
||||||
static u32 flag_V;
|
#define flag_V m68kcontext.flag_V
|
||||||
static u32 flag_NotZ;
|
#define flag_NotZ m68kcontext.flag_NotZ
|
||||||
static u32 flag_N;
|
#define flag_N m68kcontext.flag_N
|
||||||
static u32 flag_X;
|
#define flag_X m68kcontext.flag_X
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef FAMEC_EMULATE_TRACE
|
#define flag_T m68kcontext.flag_T
|
||||||
static u32 flag_T;
|
#define flag_S m68kcontext.flag_S
|
||||||
#endif
|
#define flag_I m68kcontext.flag_I
|
||||||
static u32 flag_S;
|
|
||||||
static u32 flag_I;
|
|
||||||
|
|
||||||
static u32 initialised = 0;
|
static u32 initialised = 0;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue