Fix some broken stuff.

This commit is contained in:
normmatt234 2009-06-03 05:24:23 +00:00
parent ad8fe45f83
commit cd5560b966
6 changed files with 12 additions and 6 deletions

View File

@ -2934,6 +2934,7 @@ u32 FASTCALL _MMU_ARM9_read32(u32 adr)
if((MEM_8(MMU.MMU_MEM[ARMCPU_ARM9], REG_GCCMDOUT) == 0xB7) && (MMU.dscard[ARMCPU_ARM9].address < 0x8000))
{
MMU.dscard[ARMCPU_ARM9].address = (0x8000 + (MMU.dscard[ARMCPU_ARM9].address&0x1FF));
INFO("Read below 0x8000 from: %08X\n", NDS_ARM9.instruct_adr);
}
val = T1ReadLong(MMU.CART_ROM, MMU.dscard[ARMCPU_ARM9].address & MMU.CART_ROM_MASK);
}

View File

@ -1915,7 +1915,9 @@ void NDS_exec(s32 nb)
}
T1WriteWord(ARM9Mem.ARM9_REG, 6, nds.VCount);
T1WriteWord(ARM9Mem.ARM9_REG, 0x1006, nds.VCount);
T1WriteWord(MMU.ARM7_REG, 6, nds.VCount);
T1WriteWord(MMU.ARM7_REG, 0x1006, nds.VCount);
vmatch = T1ReadWord(ARM9Mem.ARM9_REG, 4);
if(nds.VCount==((vmatch>>8)|((vmatch<<1)&(1<<8))))

View File

@ -541,7 +541,9 @@ static BOOL cflash_init()
{
file_size = LSEEK_FN( disk_image, 0, SEEK_END);
if (0 && file_size == -1)
{
CFLASHLOG( "Error when seeking to end of disk image" );
}
else
{
LSEEK_FN( disk_image, 0, SEEK_SET);

View File

@ -224,7 +224,7 @@ extern volatile BOOL execute;
TEMPLATE static u32 FASTCALL OP_UND()
{
LOG("Undefined instruction: %08X\n", cpu->instruction);
LOG("Undefined instruction: %08X from %08X\n", cpu->instruction, cpu->instruct_adr);
emu_halt();
LOG("Stopped (OP_UND)\n");
return 1;

View File

@ -538,6 +538,7 @@ void BackupDevice::loadfile()
{
//never use save files if we are in movie mode
if(isMovieMode) return;
if(filename.length() ==0) return; //No sense crashing if no filename supplied
FILE* inf = fopen(filename.c_str(),"rb");
if(!inf)

View File

@ -587,7 +587,7 @@ BOOL CALLBACK ViewDisasm_ARM9Proc (HWND hwnd, UINT message, WPARAM wParam, LPARA
DisView9->curr_ligne <<= 1 ;
} else if (!(DisView9->cpu->CPSR.bits.T) && (DisView9->mode == 2)) {
/* from thumb to arm, line / 2 */
DisView9->curr_ligne >>= 1 ;
DisView9->curr_ligne >>= 2 ;
}
DisView9->mode = 0;
InvalidateRect(GetDlgItem(hwnd, IDC_DES_BOX), NULL, FALSE);
@ -595,7 +595,7 @@ BOOL CALLBACK ViewDisasm_ARM9Proc (HWND hwnd, UINT message, WPARAM wParam, LPARA
case IDC_ARM :
/* address to line correction */
if ((DisView9->mode==2) || ((DisView9->mode==0) && (DisView9->cpu->CPSR.bits.T))) {
DisView9->curr_ligne >>= 1 ;
DisView9->curr_ligne >>= 2 ;
} ;
DisView9->mode = 1;
InvalidateRect(GetDlgItem(hwnd, IDC_DES_BOX), NULL, FALSE);
@ -626,9 +626,9 @@ BOOL CALLBACK ViewDisasm_ARM9Proc (HWND hwnd, UINT message, WPARAM wParam, LPARA
return 1;
case IDC_STEP : // TODO: draw in DD
{
int ndstep;
ndstep = GetDlgItemInt(hwnd, IDC_SETPNUM, NULL, FALSE);
NDS_exec<TRUE>(ndstep);
int ndstep;
ndstep = GetDlgItemInt(hwnd, IDC_SETPNUM, NULL, FALSE);
NDS_exec<TRUE>(ndstep);
}
return 1;
case IDC_GO :