comparison musashi/m68kcpu.c @ 1507:2455662378ed mame_interp

Added MAME Z80 core, re-enabled 68K tracing in Musashi core, disabled a bunch of code gen stuff when using interpreters from MAME
author Michael Pavone <pavone@retrodev.com>
date Sat, 30 Dec 2017 18:27:06 -0800
parents ded16f3d7eb4
children 2e57910fd641
comparison
equal deleted inserted replaced
1506:ded16f3d7eb4 1507:2455662378ed
706 throw; 706 throw;
707 }*/ 707 }*/
708 708
709 709
710 /* Trace m68k_exception, if necessary */ 710 /* Trace m68k_exception, if necessary */
711 //m68ki_exception_if_trace(this); /* auto-disable (see m68kcpu.h) */ 711 m68ki_exception_if_trace(this); /* auto-disable (see m68kcpu.h) */
712 } 712 }
713 713
714 /* set previous PC to current PC for the next entry into the loop */ 714 /* set previous PC to current PC for the next entry into the loop */
715 REG_PPC(this) = REG_PC(this); 715 REG_PPC(this) = REG_PC(this);
716 } 716 }
858 this->c.int_ack = int_level; 858 this->c.int_ack = int_level;
859 859
860 vector = M68K_INT_ACK_AUTOVECTOR;//int_ack_callback(*this, int_level); 860 vector = M68K_INT_ACK_AUTOVECTOR;//int_ack_callback(*this, int_level);
861 861
862 /* Get the interrupt vector */ 862 /* Get the interrupt vector */
863 if(vector == M68K_INT_ACK_AUTOVECTOR) 863 if(vector == M68K_INT_ACK_AUTOVECTOR) {
864 /* Use the autovectors. This is the most commonly used implementation */ 864 /* Use the autovectors. This is the most commonly used implementation */
865 vector = EXCEPTION_INTERRUPT_AUTOVECTOR+int_level; 865 vector = EXCEPTION_INTERRUPT_AUTOVECTOR+int_level;
866 else if(vector == M68K_INT_ACK_SPURIOUS) 866 uint32_t e_clock = this->c.current_cycle / this->c.options->gen.clock_divider;
867 this->c.current_cycle += ((9-4) + e_clock % 10) * this->c.options->gen.clock_divider;
868 } else if(vector == M68K_INT_ACK_SPURIOUS)
867 /* Called if no devices respond to the interrupt acknowledge */ 869 /* Called if no devices respond to the interrupt acknowledge */
868 vector = EXCEPTION_SPURIOUS_INTERRUPT; 870 vector = EXCEPTION_SPURIOUS_INTERRUPT;
869 else if(vector > 255) 871 else if(vector > 255)
870 return; 872 return;
871 873