--- a/src/aica/armcore.c Mon Jan 16 11:23:28 2006 +0000 +++ b/src/aica/armcore.c Tue Jan 17 12:53:39 2006 +0000 @@ -1,5 +1,5 @@ /** - * $Id: armcore.c,v 1.18 2006-01-16 11:23:28 nkeynes Exp $ + * $Id: armcore.c,v 1.19 2006-01-17 12:53:39 nkeynes Exp $ * * ARM7TDMI CPU emulation core. * @@ -1149,11 +1149,16 @@ } armr.r[15] = pc + 4 + operand; } else { /* Load/store multiple */ + gboolean needRestore = FALSE; operand = RN(ir); switch( (ir & 0x01D00000) >> 20 ) { case 0: /* STMDA */ - for( i=15; i>= 0; i-- ) { + if( ir & 0x8000 ) { + arm_write_long( operand, armr.r[15]+4 ); + operand -= 4; + } + for( i=14; i>= 0; i-- ) { if( (ir & (1<= 0; i-- ) { + if( ir & 0x8000 ) { + arm_write_long( operand, armr.r[15]+4 ); + operand -= 4; + } + for( i=14; i>= 0; i-- ) { if( (ir & (1<= 0; i-- ) { if( (ir & (1<= 0; i-- ) { + if( ir & 0x8000 ) { + operand -= 4; + arm_write_long( operand, armr.r[15]+4 ); + } + for( i=14; i>= 0; i-- ) { if( (ir & (1<= 0; i-- ) { + if( ir & 0x8000 ) { + operand -= 4; + arm_write_long( operand, armr.r[15]+4 ); + } + for( i=14; i>= 0; i-- ) { if( (ir & (1<= 0; i-- ) { if( (ir & (1< 0x00200000 ) { + dreamcast_stop(); + ERROR( "BRANCH to fishkill at %08X", pc ); + return FALSE; + } return TRUE; }