Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
R4300: Remove obsolete variable; caused crashes in PD/Goldeneye in An…
…droid Ed.

Issue pinpointed by xperia64 and discussed in greater length here:
http://www.paulscode.com/forum/index.php?topic=1199.msg11751#msg11751

This may be just a band-aid to a deeper issue.  Was discovered in Android while
trying to reload save states for Perfect Dark and Goldeneye from the latest
master revision of mupen64plus-ae.  Recent changes to mupen64plus-ae have elim-
inated the blanket call to System.exit() it was using previously, which may have
been masking this issue before now.  AE is also different from the upstream PC
version because it loads ui-console dynamically and calls main as a subroutine
of a larger multi-threaded android process (rather than ui-console being an
entry point to a new process). Not sure of all the ramifications, or if this is
even the correct fix, but it does fix the problem in AE.
  • Loading branch information
littleguy77 committed Nov 29, 2013
1 parent aeddaab commit a4b3bbf
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 6 deletions.
2 changes: 0 additions & 2 deletions src/r4300/interpreter_cop0.def
Expand Up @@ -72,10 +72,8 @@ DECLARE_INSTRUCTION(MTC0)
interupt_unsafe_state = 1;
if (next_interupt <= Count) gen_interupt();
interupt_unsafe_state = 0;
debug_count += Count;
translate_event_queue((unsigned int) rrt & 0xFFFFFFFF);
Count = (unsigned int) rrt & 0xFFFFFFFF;
debug_count -= Count;
break;
case 10: // EntryHi
EntryHi = (unsigned int) rrt & 0xFFFFE0FF;
Expand Down
3 changes: 0 additions & 3 deletions src/r4300/r4300.c
Expand Up @@ -60,7 +60,6 @@ long long int local_rs;
long long int reg_cop1_fgr_64[32];
tlb tlb_e[32];
unsigned int delay_slot, skip_jump = 0, dyna_interp = 0, last_addr;
unsigned long long int debug_count = 0;
unsigned int CIC_Chip;
char invalid_code[0x100000];

Expand Down Expand Up @@ -982,7 +981,6 @@ void r4300_execute(void)

current_instruction_table = cached_interpreter_table;

debug_count = 0;
delay_slot=0;
stop = 0;
rompause = 0;
Expand Down Expand Up @@ -1066,7 +1064,6 @@ void r4300_execute(void)
free_blocks();
}

debug_count+= Count;
DebugMessage(M64MSG_INFO, "R4300 emulator finished.");

/* print instruction counts */
Expand Down
1 change: 0 additions & 1 deletion src/r4300/r4300.h
Expand Up @@ -39,7 +39,6 @@ extern long long int reg_cop1_fgr_64[32];
extern int FCR0, FCR31;
extern tlb tlb_e[32];
extern unsigned int delay_slot, skip_jump, dyna_interp, op;
extern unsigned long long int debug_count;
extern unsigned int r4300emu;
extern unsigned int next_interupt, CIC_Chip;
extern int rounding_mode, trunc_mode, round_mode, ceil_mode, floor_mode;
Expand Down

0 comments on commit a4b3bbf

Please sign in to comment.