X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=cpu%2Ffame%2Ffame.h;h=aba9316ee726a84f35698d5159424819337fa9e3;hb=48c9e01be8ad93a7902e22f9ad07aba4527e6572;hp=d5349246f83bb443c677c53a4ba80305c4b044dc;hpb=9a1f192a146e9b9752ec1a760745b1261fe9bdec;p=picodrive.git diff --git a/cpu/fame/fame.h b/cpu/fame/fame.h index d534924..aba9316 100644 --- a/cpu/fame/fame.h +++ b/cpu/fame/fame.h @@ -9,6 +9,12 @@ #ifndef __FAME_H__ #define __FAME_H__ +// uintptr_t +#include +#ifndef _MSC_VER +#include +#endif + #ifdef __cplusplus extern "C" { #endif @@ -125,8 +131,9 @@ typedef struct unsigned int Opcode; signed int cycles_needed; + unsigned short *PC; - unsigned long BasePC; + uintptr_t BasePC; unsigned int flag_C; unsigned int flag_V; unsigned int flag_NotZ; @@ -136,10 +143,19 @@ typedef struct unsigned int flag_S; unsigned int flag_I; - unsigned long Fetch[M68K_FETCHBANK1]; + unsigned char not_polling; + unsigned char pad[3]; + + uintptr_t Fetch[M68K_FETCHBANK1]; } M68K_CONTEXT; -extern M68K_CONTEXT *g_m68kcontext; +typedef enum +{ + fm68k_reason_emulate = 0, + fm68k_reason_init, + fm68k_reason_idle_install, + fm68k_reason_idle_remove, +} fm68k_call_reason; /************************/ /* Function definition */ @@ -147,12 +163,15 @@ extern M68K_CONTEXT *g_m68kcontext; /* General purpose functions */ void fm68k_init(void); -int fm68k_reset(void); -int fm68k_emulate(int n, int dualcore, int idle_mode); -int fm68k_would_interrupt(void); // to be called from fm68k_emulate() +int fm68k_reset(M68K_CONTEXT *ctx); +int fm68k_emulate(M68K_CONTEXT *ctx, int n, fm68k_call_reason reason); +int fm68k_would_interrupt(M68K_CONTEXT *ctx); // to be called from fm68k_emulate() -unsigned fm68k_get_pc(M68K_CONTEXT *context); +unsigned int fm68k_get_pc(const M68K_CONTEXT *ctx); +// PICODRIVE_HACK +int fm68k_idle_install(void); +int fm68k_idle_remove(void); #ifdef __cplusplus }