From 7494be5525e0bf6f83346bfd4392ba52afa1d13f Mon Sep 17 00:00:00 2001 From: Couriersud Date: Tue, 7 Oct 2008 23:07:09 +0000 Subject: [PATCH] Removed speed hack - this would break the protection for lohtb2 --- src/emu/cpu/nec/nec.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/emu/cpu/nec/nec.c b/src/emu/cpu/nec/nec.c index 7dd6d66427a..9ede717a298 100644 --- a/src/emu/cpu/nec/nec.c +++ b/src/emu/cpu/nec/nec.c @@ -114,6 +114,10 @@ typedef UINT32 DWORD; #include "nec.h" #include "necintrf.h" +/* enabling USE_SPEED_HACK will break lothb2 (m72.c) protection. It may cause issues + * on any system requiring close sync between two processors */ + +#define USE_SPEED_HACK (0) /* default configuration */ static const nec_config default_config = @@ -866,7 +870,9 @@ OP( 0xe8, i_call_d16 ) { UINT32 tmp; FETCHWORD(tmp); PUSH(I.ip); I.ip = (WORD)(I OP( 0xe9, i_jmp_d16 ) { UINT32 tmp; FETCHWORD(tmp); I.ip = (WORD)(I.ip+(INT16)tmp); CHANGE_PC; nec_ICount-=15; } OP( 0xea, i_jmp_far ) { UINT32 tmp,tmp1; FETCHWORD(tmp); FETCHWORD(tmp1); I.sregs[PS] = (WORD)tmp1; I.ip = (WORD)tmp; CHANGE_PC; nec_ICount-=27; } OP( 0xeb, i_jmp_d8 ) { int tmp = (int)((INT8)FETCH); nec_ICount-=12; +#if USE_SPEED_HACK if (tmp==-2 && I.no_interrupt==0 && (I.pending_irq==0) && nec_ICount>0) nec_ICount%=12; /* cycle skip */ +#endif I.ip = (WORD)(I.ip+tmp); } OP( 0xec, i_inaldx ) { I.regs.b[AL] = read_port_byte(I.regs.w[DW]); CLKS(8,8,5);}