mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
psp bugfixes, refactoring, stuff
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@284 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
03e4f2a349
commit
9d917eea21
14 changed files with 109 additions and 48 deletions
|
@ -26,6 +26,7 @@
|
|||
#define FAMEC_ADR_BITS 24
|
||||
// #define FAMEC_FETCHBITS 8
|
||||
#define FAMEC_DATABITS 8
|
||||
#define FAMEC_32BIT_PC
|
||||
|
||||
#define USE_CYCLONE_TIMING
|
||||
#define USE_CYCLONE_TIMING_DIV
|
||||
|
@ -289,15 +290,22 @@ static u32 flag_I;
|
|||
#define GET_PC \
|
||||
(u32)PC - BasePC;
|
||||
|
||||
|
||||
#ifndef FAMEC_32BIT_PC
|
||||
|
||||
#define SET_PC(A) \
|
||||
BasePC = g_m68kcontext->Fetch[((A) >> M68K_FETCHSFT) & M68K_FETCHMASK]; \
|
||||
/* BasePC -= (A) & 0xFF000000; */ \
|
||||
PC = (u16*)(((A) & M68K_ADR_MASK) + BasePC);
|
||||
|
||||
#define SET_PC_BASE(P,B,A) \
|
||||
(B) = g_m68kcontext->Fetch[((A) >> M68K_FETCHSFT) & M68K_FETCHMASK]; \
|
||||
/* (B) -= (A) & 0xFF000000; */ \
|
||||
(P) = (u16*)(((A) & M68K_ADR_MASK) + (B));
|
||||
#else
|
||||
|
||||
#define SET_PC(A) \
|
||||
BasePC = g_m68kcontext->Fetch[((A) >> M68K_FETCHSFT) & M68K_FETCHMASK]; \
|
||||
BasePC -= (A) & 0xFF000000; \
|
||||
PC = (u16*)((A) + BasePC);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#define PRE_IO \
|
||||
|
@ -717,7 +725,10 @@ static FAMEC_EXTRA_INLINE void execute_exception(s32 vect)
|
|||
/* adjust SR */
|
||||
flag_S = M68K_SR_S;
|
||||
|
||||
newPC&=M68K_ADR_MASK&~1; // don't crash on games with bad vector tables
|
||||
#ifndef FAMEC_32BIT_PC
|
||||
newPC&=M68K_ADR_MASK
|
||||
#endif
|
||||
newPC&=~1; // don't crash on games with bad vector tables
|
||||
|
||||
SET_PC(newPC)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue