1.1 --- a/src/sh4/sh4core.c Mon Jan 14 09:08:58 2008 +0000
1.2 +++ b/src/sh4/sh4core.c Tue Jan 15 10:03:27 2008 +0000
1.6 #define MODULE sh4_module
1.10 #include "dreamcast.h"
1.11 @@ -234,15 +235,20 @@
1.14 /* Read instruction */
1.15 - uint32_t pageaddr = pc >> 12;
1.16 if( !IS_IN_ICACHE(pc) ) {
1.17 - mmu_update_icache(pc);
1.18 + if( !mmu_update_icache(pc) ) {
1.19 + // Fault - look for the fault handler
1.20 + if( !mmu_update_icache(sh4r.pc) ) {
1.21 + // double fault - halt
1.22 + ERROR( "Double fault - halting" );
1.29 - if( IS_IN_ICACHE(pc) ) {
1.30 - ir = *(uint16_t *)GET_ICACHE_PTR(pc);
1.32 - ir = sh4_read_word(pc);
1.34 + assert( IS_IN_ICACHE(pc) );
1.35 + ir = *(uint16_t *)GET_ICACHE_PTR(sh4r.pc);
1.36 switch( (ir&0xF000) >> 12 ) {