fix host memory clobber crash in new TSC code when the arm7 is acting wacky

This commit is contained in:
zeromus 2011-11-23 21:15:23 +00:00
parent 22a69c92d8
commit 2d7b42dbf2
2 changed files with 3 additions and 2 deletions

View File

@ -1101,7 +1101,7 @@ u16 DSI_TSC::write16(u16 val)
switch(state)
{
case 0:
reg_selection = val>>1;
reg_selection = (val>>1)&0x7F;
read_flag = val&1;
state = 1;
return read16();
@ -1114,6 +1114,7 @@ u16 DSI_TSC::write16(u16 val)
}
ret = read16();
reg_selection++;
reg_selection &= 0x7F;
return ret;
}
return 0;

View File

@ -1152,7 +1152,7 @@ bool savestate_load(EMUFILE* is)
if((nds._DebugConsole!=0) != CommonSettings.DebugConsole) {
printf("WARNING: forcing console debug mode to: debugmode=%s\n",nds._DebugConsole?"TRUE":"FALSE");
}
}
return true;