32x, tentative kludge for blackthorne

This commit is contained in:
kub 2022-11-21 21:08:39 +00:00
parent eb990fd62a
commit 4ec1247d23
6 changed files with 48 additions and 33 deletions

View file

@ -3836,8 +3836,6 @@ static void REGPARM(2) *sh2_translate(SH2 *sh2, int tcache_id)
u = FETCH32(opd->imm);
else
u = (s16)FETCH_OP(opd->imm);
// tweak for Blackthorne: avoid stack overwriting
if (GET_Rn() == SHR_SP && u == 0x0603f800) u = 0x0603f900;
gconst_new(GET_Rn(), u);
}
else

View file

@ -52,6 +52,7 @@ typedef struct SH2_
#define SH2_STATE_RPOLL (1 << 4) // polling address in SDRAM
#define SH2_TIMER_RUN (1 << 6) // SOC WDT timer is running
#define SH2_IN_DRC (1 << 7) // DRC in use
#define SH2_PWM_IRQ (1 << 8) // entering IRQ
unsigned int state;
uint32_t poll_addr;
int poll_cycles;