diff options
author | Zsolt Vasvari <zsoltvas@mamedev.org> | 2008-01-31 02:27:44 +0000 |
---|---|---|
committer | Zsolt Vasvari <zsoltvas@mamedev.org> | 2008-01-31 02:27:44 +0000 |
commit | f65f3077b0f3a9c26215d7a48f09860485ca0bd2 (patch) | |
tree | 90a06019a0b3254c17ae5e0e55f6254a76f4a04e | |
parent | 242b08c930b06474be1413abe84336233aa539cf (diff) |
- Fixes reset crashes in all Z180 games. Not sure if there is a bug ID for this
- Removed the various busy loop and non-exact optimzations from the Z180 core
-rw-r--r-- | src/emu/cpu/z180/z180.c | 123 | ||||
-rw-r--r-- | src/emu/cpu/z180/z180op.c | 144 | ||||
-rw-r--r-- | src/emu/cpu/z180/z180ops.h | 144 | ||||
-rw-r--r-- | src/emu/cpu/z180/z180tbl.h | 2 |
4 files changed, 53 insertions, 360 deletions
diff --git a/src/emu/cpu/z180/z180.c b/src/emu/cpu/z180/z180.c index 7d5ac78a268..d630d4df49b 100644 --- a/src/emu/cpu/z180/z180.c +++ b/src/emu/cpu/z180/z180.c @@ -60,15 +60,6 @@ /* use big flag arrays (4*64K) for ADD/ADC/SUB/SBC/CP results */ #define BIG_FLAGS_ARRAY 1 -/* Set to 1 for a more exact (but somewhat slower) Z180 emulation */ -#define Z180_EXACT 1 - -/* on JP and JR opcodes check for tight loops */ -#define BUSY_LOOP_HACKS 0 - -/* check for delay loops counting down BC */ -#define TIME_LOOP_HACKS 0 - static void set_irq_line(int irqline, int state); /****************************************************************************/ @@ -749,8 +740,8 @@ static UINT8 SZHV_inc[256]; /* zero, sign, half carry and overflow flags INC r8 static UINT8 SZHV_dec[256]; /* zero, sign, half carry and overflow flags DEC r8 */ #if BIG_FLAGS_ARRAY -static UINT8 *SZHVC_add = 0; -static UINT8 *SZHVC_sub = 0; +static UINT8 *SZHVC_add; +static UINT8 *SZHVC_sub; #endif /**************************************************************************** @@ -1913,65 +1904,55 @@ static void z180_reset(void) int (*save_irqcallback)(int); int i, p; #if BIG_FLAGS_ARRAY - if( !SZHVC_add || !SZHVC_sub ) + int oldval, newval, val; + UINT8 *padd, *padc, *psub, *psbc; + /* allocate big flag arrays once */ + SZHVC_add = (UINT8 *)auto_malloc(2*256*256); + SZHVC_sub = (UINT8 *)auto_malloc(2*256*256); + padd = &SZHVC_add[ 0*256]; + padc = &SZHVC_add[256*256]; + psub = &SZHVC_sub[ 0*256]; + psbc = &SZHVC_sub[256*256]; + for (oldval = 0; oldval < 256; oldval++) { - int oldval, newval, val; - UINT8 *padd, *padc, *psub, *psbc; - /* allocate big flag arrays once */ - SZHVC_add = (UINT8 *)auto_malloc(2*256*256); - SZHVC_sub = (UINT8 *)auto_malloc(2*256*256); - padd = &SZHVC_add[ 0*256]; - padc = &SZHVC_add[256*256]; - psub = &SZHVC_sub[ 0*256]; - psbc = &SZHVC_sub[256*256]; - for (oldval = 0; oldval < 256; oldval++) + for (newval = 0; newval < 256; newval++) { - for (newval = 0; newval < 256; newval++) - { - /* add or adc w/o carry set */ - val = newval - oldval; - *padd = (newval) ? ((newval & 0x80) ? SF : 0) : ZF; -#if Z180_EXACT - *padd |= (newval & (YF | XF)); /* undocumented flag bits 5+3 */ -#endif - if( (newval & 0x0f) < (oldval & 0x0f) ) *padd |= HF; - if( newval < oldval ) *padd |= CF; - if( (val^oldval^0x80) & (val^newval) & 0x80 ) *padd |= VF; - padd++; - - /* adc with carry set */ - val = newval - oldval - 1; - *padc = (newval) ? ((newval & 0x80) ? SF : 0) : ZF; -#if Z180_EXACT - *padc |= (newval & (YF | XF)); /* undocumented flag bits 5+3 */ -#endif - if( (newval & 0x0f) <= (oldval & 0x0f) ) *padc |= HF; - if( newval <= oldval ) *padc |= CF; - if( (val^oldval^0x80) & (val^newval) & 0x80 ) *padc |= VF; - padc++; - - /* cp, sub or sbc w/o carry set */ - val = oldval - newval; - *psub = NF | ((newval) ? ((newval & 0x80) ? SF : 0) : ZF); -#if Z180_EXACT - *psub |= (newval & (YF | XF)); /* undocumented flag bits 5+3 */ -#endif - if( (newval & 0x0f) > (oldval & 0x0f) ) *psub |= HF; - if( newval > oldval ) *psub |= CF; - if( (val^oldval) & (oldval^newval) & 0x80 ) *psub |= VF; - psub++; - - /* sbc with carry set */ - val = oldval - newval - 1; - *psbc = NF | ((newval) ? ((newval & 0x80) ? SF : 0) : ZF); -#if Z180_EXACT - *psbc |= (newval & (YF | XF)); /* undocumented flag bits 5+3 */ -#endif - if( (newval & 0x0f) >= (oldval & 0x0f) ) *psbc |= HF; - if( newval >= oldval ) *psbc |= CF; - if( (val^oldval) & (oldval^newval) & 0x80 ) *psbc |= VF; - psbc++; - } + /* add or adc w/o carry set */ + val = newval - oldval; + *padd = (newval) ? ((newval & 0x80) ? SF : 0) : ZF; + *padd |= (newval & (YF | XF)); /* undocumented flag bits 5+3 */ + + if( (newval & 0x0f) < (oldval & 0x0f) ) *padd |= HF; + if( newval < oldval ) *padd |= CF; + if( (val^oldval^0x80) & (val^newval) & 0x80 ) *padd |= VF; + padd++; + + /* adc with carry set */ + val = newval - oldval - 1; + *padc = (newval) ? ((newval & 0x80) ? SF : 0) : ZF; + *padc |= (newval & (YF | XF)); /* undocumented flag bits 5+3 */ + if( (newval & 0x0f) <= (oldval & 0x0f) ) *padc |= HF; + if( newval <= oldval ) *padc |= CF; + if( (val^oldval^0x80) & (val^newval) & 0x80 ) *padc |= VF; + padc++; + + /* cp, sub or sbc w/o carry set */ + val = oldval - newval; + *psub = NF | ((newval) ? ((newval & 0x80) ? SF : 0) : ZF); + *psub |= (newval & (YF | XF)); /* undocumented flag bits 5+3 */ + if( (newval & 0x0f) > (oldval & 0x0f) ) *psub |= HF; + if( newval > oldval ) *psub |= CF; + if( (val^oldval) & (oldval^newval) & 0x80 ) *psub |= VF; + psub++; + + /* sbc with carry set */ + val = oldval - newval - 1; + *psbc = NF | ((newval) ? ((newval & 0x80) ? SF : 0) : ZF); + *psbc |= (newval & (YF | XF)); /* undocumented flag bits 5+3 */ + if( (newval & 0x0f) >= (oldval & 0x0f) ) *psbc |= HF; + if( newval >= oldval ) *psbc |= CF; + if( (val^oldval) & (oldval^newval) & 0x80 ) *psbc |= VF; + psbc++; } } #endif @@ -1987,13 +1968,9 @@ static void z180_reset(void) if( i&0x40 ) ++p; if( i&0x80 ) ++p; SZ[i] = i ? i & SF : ZF; -#if Z180_EXACT SZ[i] |= (i & (YF | XF)); /* undocumented flag bits 5+3 */ -#endif SZ_BIT[i] = i ? i & SF : ZF | PF; -#if Z180_EXACT SZ_BIT[i] |= (i & (YF | XF)); /* undocumented flag bits 5+3 */ -#endif SZP[i] = SZ[i] | ((p & 1) ? 0 : PF); SZHV_inc[i] = SZ[i]; if( i == 0x80 ) SZHV_inc[i] |= VF; @@ -2595,7 +2572,7 @@ void z180_get_info(UINT32 state, cpuinfo *info) /* --- the following bits of info are returned as NULL-terminated strings --- */ case CPUINFO_STR_NAME: strcpy(info->s, "Z180"); break; case CPUINFO_STR_CORE_FAMILY: strcpy(info->s, "Zilog Z8x180"); break; - case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "0.3"); break; + case CPUINFO_STR_CORE_VERSION: strcpy(info->s, "0.4"); break; case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; case CPUINFO_STR_CORE_CREDITS: strcpy(info->s, "Copyright Juergen Buchmueller, all rights reserved."); break; diff --git a/src/emu/cpu/z180/z180op.c b/src/emu/cpu/z180/z180op.c index 2342ce06656..a41fdce641c 100644 --- a/src/emu/cpu/z180/z180op.c +++ b/src/emu/cpu/z180/z180op.c @@ -1,141 +1,3 @@ -#if TIME_LOOP_HACKS - -#define CHECK_BC_LOOP \ -if( _BC > 1 && _PCD < 0xfffc ) { \ - UINT8 op1 = cpu_readop(_PCD); \ - UINT8 op2 = cpu_readop(_PCD+1); \ - if( (op1==0x78 && op2==0xb1) || (op1==0x79 && op2==0xb0) ) \ - { \ - UINT8 op3 = cpu_readop(_PCD+2); \ - UINT8 op4 = cpu_readop(_PCD+3); \ - if( op3==0x20 && op4==0xfb ) \ - { \ - int cnt = \ - cc[Z180_TABLE_op][0x78] + \ - cc[Z180_TABLE_op][0xb1] + \ - cc[Z180_TABLE_op][0x20] + \ - cc[Z180_TABLE_ex][0x20]; \ - while( _BC > 0 && z180_icount > cnt ) \ - { \ - BURNODD( cnt, 4, cnt ); \ - _BC--; \ - } \ - } \ - else \ - if( op3 == 0xc2 ) \ - { \ - UINT8 ad1 = cpu_readop_arg(_PCD+3); \ - UINT8 ad2 = cpu_readop_arg(_PCD+4); \ - if( (ad1 + 256 * ad2) == (_PCD - 1) ) \ - { \ - int cnt = \ - cc[Z180_TABLE_op][0x78] + \ - cc[Z180_TABLE_op][0xb1] + \ - cc[Z180_TABLE_op][0xc2] + \ - cc[Z180_TABLE_ex][0xc2]; \ - while( _BC > 0 && z180_icount > cnt ) \ - { \ - BURNODD( cnt, 4, cnt ); \ - _BC--; \ - } \ - } \ - } \ - } \ -} - -#define CHECK_DE_LOOP \ -if( _DE > 1 && _PCD < 0xfffc ) { \ - UINT8 op1 = cpu_readop(_PCD); \ - UINT8 op2 = cpu_readop(_PCD+1); \ - if( (op1==0x7a && op2==0xb3) || (op1==0x7b && op2==0xb2) ) \ - { \ - UINT8 op3 = cpu_readop(_PCD+2); \ - UINT8 op4 = cpu_readop(_PCD+3); \ - if( op3==0x20 && op4==0xfb ) \ - { \ - int cnt = \ - cc[Z180_TABLE_op][0x7a] + \ - cc[Z180_TABLE_op][0xb3] + \ - cc[Z180_TABLE_op][0x20] + \ - cc[Z180_TABLE_ex][0x20]; \ - while( _DE > 0 && z180_icount > cnt ) \ - { \ - BURNODD( cnt, 4, cnt ); \ - _DE--; \ - } \ - } \ - else \ - if( op3==0xc2 ) \ - { \ - UINT8 ad1 = cpu_readop_arg(_PCD+3); \ - UINT8 ad2 = cpu_readop_arg(_PCD+4); \ - if( (ad1 + 256 * ad2) == (_PCD - 1) ) \ - { \ - int cnt = \ - cc[Z180_TABLE_op][0x7a] + \ - cc[Z180_TABLE_op][0xb3] + \ - cc[Z180_TABLE_op][0xc2] + \ - cc[Z180_TABLE_ex][0xc2]; \ - while( _DE > 0 && z180_icount > cnt ) \ - { \ - BURNODD( cnt, 4, cnt ); \ - _DE--; \ - } \ - } \ - } \ - } \ -} - -#define CHECK_HL_LOOP \ -if( _HL > 1 && _PCD < 0xfffc ) { \ - UINT8 op1 = cpu_readop(_PCD); \ - UINT8 op2 = cpu_readop(_PCD+1); \ - if( (op1==0x7c && op2==0xb5) || (op1==0x7d && op2==0xb4) ) \ - { \ - UINT8 op3 = cpu_readop(_PCD+2); \ - UINT8 op4 = cpu_readop(_PCD+3); \ - if( op3==0x20 && op4==0xfb ) \ - { \ - int cnt = \ - cc[Z180_TABLE_op][0x7c] + \ - cc[Z180_TABLE_op][0xb5] + \ - cc[Z180_TABLE_op][0x20] + \ - cc[Z180_TABLE_ex][0x20]; \ - while( _HL > 0 && z180_icount > cnt ) \ - { \ - BURNODD( cnt, 4, cnt ); \ - _HL--; \ - } \ - } \ - else \ - if( op3==0xc2 ) \ - { \ - UINT8 ad1 = cpu_readop_arg(_PCD+3); \ - UINT8 ad2 = cpu_readop_arg(_PCD+4); \ - if( (ad1 + 256 * ad2) == (_PCD - 1) ) \ - { \ - int cnt = \ - cc[Z180_TABLE_op][0x7c] + \ - cc[Z180_TABLE_op][0xb5] + \ - cc[Z180_TABLE_op][0xc2] + \ - cc[Z180_TABLE_ex][0xc2]; \ - while( _HL > 0 && z180_icount > cnt ) \ - { \ - BURNODD( cnt, 4, cnt ); \ - _HL--; \ - } \ - } \ - } \ - } \ -} - -#else - -#define CHECK_BC_LOOP -#define CHECK_DE_LOOP -#define CHECK_HL_LOOP - -#endif /********************************************************** * main opcodes @@ -152,7 +14,7 @@ OP(op,07) { RLCA; } /* RLCA */ OP(op,08) { EX_AF; } /* EX AF,AF' */ OP(op,09) { ADD16(HL,BC); } /* ADD HL,BC */ OP(op,0a) { _A = RM(_BC); } /* LD A,(BC) */ -OP(op,0b) { _BC--; CHECK_BC_LOOP; } /* DEC BC */ +OP(op,0b) { _BC--; } /* DEC BC */ OP(op,0c) { _C = INC(_C); } /* INC C */ OP(op,0d) { _C = DEC(_C); } /* DEC C */ OP(op,0e) { _C = ARG(); } /* LD C,n */ @@ -170,7 +32,7 @@ OP(op,17) { RLA; } /* RLA */ OP(op,18) { JR(); } /* JR o */ OP(op,19) { ADD16(HL,DE); } /* ADD HL,DE */ OP(op,1a) { _A = RM(_DE); } /* LD A,(DE) */ -OP(op,1b) { _DE--; CHECK_DE_LOOP; } /* DEC DE */ +OP(op,1b) { _DE--; ; } /* DEC DE */ OP(op,1c) { _E = INC(_E); } /* INC E */ OP(op,1d) { _E = DEC(_E); } /* DEC E */ OP(op,1e) { _E = ARG(); } /* LD E,n */ @@ -188,7 +50,7 @@ OP(op,27) { DAA; } /* DAA */ OP(op,28) { JR_COND( _F & ZF, 0x28 ); } /* JR Z,o */ OP(op,29) { ADD16(HL,HL); } /* ADD HL,HL */ OP(op,2a) { EA = ARG16(); RM16( EA, &Z180.HL ); } /* LD HL,(w) */ -OP(op,2b) { _HL--; CHECK_HL_LOOP; } /* DEC HL */ +OP(op,2b) { _HL--; } /* DEC HL */ OP(op,2c) { _L = INC(_L); } /* INC L */ OP(op,2d) { _L = DEC(_L); } /* DEC L */ OP(op,2e) { _L = ARG(); } /* LD L,n */ diff --git a/src/emu/cpu/z180/z180ops.h b/src/emu/cpu/z180/z180ops.h index 8995a368391..9f89acfc7e7 100644 --- a/src/emu/cpu/z180/z180ops.h +++ b/src/emu/cpu/z180/z180ops.h @@ -163,46 +163,10 @@ void z180_setOPbase(int pc) /*************************************************************** * JP ***************************************************************/ -#if BUSY_LOOP_HACKS -#define JP { \ - unsigned oldpc = _PCD-1; \ - _PCD = ARG16(); \ - z180_change_pc(_PCD); \ - /* speed up busy loop */ \ - if( _PCD == oldpc ) \ - { \ - if( !Z180.after_EI ) \ - BURNODD( z180_icount, 1, cc[Z180_TABLE_op][0xc3] ); \ - } \ - else \ - { \ - UINT8 op = cpu_readop(_PCD); \ - if( _PCD == oldpc-1 ) \ - { \ - /* NOP - JP $-1 or EI - JP $-1 */ \ - if ( op == 0x00 || op == 0xfb ) \ - { \ - if( !Z180.after_EI ) \ - BURNODD( z180_icount-cc[Z180_TABLE_op][0x00],\ - 2, cc[Z180_TABLE_op][0x00]+cc[Z180_TABLE_op][0xc3]); \ - } \ - } \ - else \ - /* LD SP,#xxxx - JP $-3 (Galaga) */ \ - if( _PCD == oldpc-3 && op == 0x31 ) \ - { \ - if( !Z180.after_EI ) \ - BURNODD( z180_icount-cc[Z180_TABLE_op][0x31], \ - 2, cc[Z180_TABLE_op][0x31]+cc[Z180_TABLE_op][0xc3]); \ - } \ - } \ -} -#else #define JP { \ _PCD = ARG16(); \ z180_change_pc(_PCD); \ } -#endif /*************************************************************** * JP_COND @@ -392,66 +356,36 @@ INLINE UINT8 DEC(UINT8 value) /*************************************************************** * RLCA ***************************************************************/ -#if Z180_EXACT #define RLCA \ _A = (_A << 1) | (_A >> 7); \ _F = (_F & (SF | ZF | PF)) | (_A & (YF | XF | CF)) -#else -#define RLCA \ - _A = (_A << 1) | (_A >> 7); \ - _F = (_F & (SF | ZF | YF | XF | PF)) | (_A & CF) -#endif /*************************************************************** * RRCA ***************************************************************/ -#if Z180_EXACT #define RRCA \ _F = (_F & (SF | ZF | PF)) | (_A & (YF | XF | CF)); \ _A = (_A >> 1) | (_A << 7) -#else -#define RRCA \ - _F = (_F & (SF | ZF | YF | XF | PF)) | (_A & CF); \ - _A = (_A >> 1) | (_A << 7) -#endif /*************************************************************** * RLA ***************************************************************/ -#if Z180_EXACT #define RLA { \ UINT8 res = (_A << 1) | (_F & CF); \ UINT8 c = (_A & 0x80) ? CF : 0; \ _F = (_F & (SF | ZF | PF)) | c | (res & (YF | XF)); \ _A = res; \ } -#else -#define RLA { \ - UINT8 res = (_A << 1) | (_F & CF); \ - UINT8 c = (_A & 0x80) ? CF : 0; \ - _F = (_F & (SF | ZF | YF | XF | PF)) | c; \ - _A = res; \ -} -#endif /*************************************************************** * RRA ***************************************************************/ -#if Z180_EXACT #define RRA { \ UINT8 res = (_A >> 1) | (_F << 7); \ UINT8 c = (_A & 0x01) ? CF : 0; \ _F = (_F & (SF | ZF | PF)) | c | (res & (YF | XF)); \ _A = res; \ } -#else -#define RRA { \ - UINT8 res = (_A >> 1) | (_F << 7); \ - UINT8 c = (_A & 0x01) ? CF : 0; \ - _F = (_F & (SF | ZF | YF | XF | PF)) | c; \ - _A = res; \ -} -#endif /*************************************************************** * RRD @@ -811,12 +745,8 @@ INLINE UINT8 SRL(UINT8 value) /*************************************************************** * BIT bit,(IX/Y+o) ***************************************************************/ -#if Z180_EXACT #define BIT_XY(bit,reg) \ _F = (_F & CF) | HF | (SZ_BIT[reg & (1<<bit)] & ~(YF|XF)) | ((EA>>8) & (YF|XF)) -#else -#define BIT_XY BIT -#endif /*************************************************************** * RES bit,r8 @@ -837,7 +767,6 @@ INLINE UINT8 SET(UINT8 bit, UINT8 value) /*************************************************************** * LDI ***************************************************************/ -#if Z180_EXACT #define LDI { \ UINT8 io = RM(_HL); \ WM( _DE, io ); \ @@ -847,19 +776,10 @@ INLINE UINT8 SET(UINT8 bit, UINT8 value) _HL++; _DE++; _BC--; \ if( _BC ) _F |= VF; \ } -#else -#define LDI { \ - WM( _DE, RM(_HL) ); \ - _F &= SF | ZF | YF | XF | CF; \ - _HL++; _DE++; _BC--; \ - if( _BC ) _F |= VF; \ -} -#endif /*************************************************************** * CPI ***************************************************************/ -#if Z180_EXACT #define CPI { \ UINT8 val = RM(_HL); \ UINT8 res = _A - val; \ @@ -870,20 +790,10 @@ INLINE UINT8 SET(UINT8 bit, UINT8 value) if( res & 0x08 ) _F |= XF; /* bit 3 -> flag 3 */ \ if( _BC ) _F |= VF; \ } -#else -#define CPI { \ - UINT8 val = RM(_HL); \ - UINT8 res = _A - val; \ - _HL++; _BC--; \ - _F = (_F & CF) | SZ[res] | ((_A ^ val ^ res) & HF) | NF; \ - if( _BC ) _F |= VF; \ -} -#endif /*************************************************************** * INI ***************************************************************/ -#if Z180_EXACT #define INI { \ UINT8 io = IN(_BC); \ _B--; \ @@ -898,19 +808,10 @@ INLINE UINT8 SET(UINT8 bit, UINT8 value) (io >> 2)) & 1 ) \ _F |= PF; \ } -#else -#define INI { \ - _B--; \ - WM( _HL, IN(_BC) ); \ - _HL++; \ - _F = (_B) ? NF : NF | ZF; \ -} -#endif /*************************************************************** * OUTI ***************************************************************/ -#if Z180_EXACT #define OUTI { \ UINT8 io = RM(_HL); \ _B--; \ @@ -925,19 +826,10 @@ INLINE UINT8 SET(UINT8 bit, UINT8 value) (io >> 2)) & 1 ) \ _F |= PF; \ } -#else -#define OUTI { \ - _B--; \ - OUT( _BC, RM(_HL) ); \ - _HL++; \ - _F = (_B) ? NF : NF | ZF; \ -} -#endif /*************************************************************** * LDD ***************************************************************/ -#if Z180_EXACT #define LDD { \ UINT8 io = RM(_HL); \ WM( _DE, io ); \ @@ -947,19 +839,10 @@ INLINE UINT8 SET(UINT8 bit, UINT8 value) _HL--; _DE--; _BC--; \ if( _BC ) _F |= VF; \ } -#else -#define LDD { \ - WM( _DE, RM(_HL) ); \ - _F &= SF | ZF | YF | XF | CF; \ - _HL--; _DE--; _BC--; \ - if( _BC ) _F |= VF; \ -} -#endif /*************************************************************** * CPD ***************************************************************/ -#if Z180_EXACT #define CPD { \ UINT8 val = RM(_HL); \ UINT8 res = _A - val; \ @@ -970,20 +853,10 @@ INLINE UINT8 SET(UINT8 bit, UINT8 value) if( res & 0x08 ) _F |= XF; /* bit 3 -> flag 3 */ \ if( _BC ) _F |= VF; \ } -#else -#define CPD { \ - UINT8 val = RM(_HL); \ - UINT8 res = _A - val; \ - _HL--; _BC--; \ - _F = (_F & CF) | SZ[res] | ((_A ^ val ^ res) & HF) | NF; \ - if( _BC ) _F |= VF; \ -} -#endif /*************************************************************** * IND ***************************************************************/ -#if Z180_EXACT #define IND { \ UINT8 io = IN(_BC); \ _B--; \ @@ -998,19 +871,10 @@ INLINE UINT8 SET(UINT8 bit, UINT8 value) (io >> 2)) & 1 ) \ _F |= PF; \ } -#else -#define IND { \ - _B--; \ - WM( _HL, IN(_BC) ); \ - _HL--; \ - _F = (_B) ? NF : NF | ZF; \ -} -#endif /*************************************************************** * OUTD ***************************************************************/ -#if Z180_EXACT #define OUTD { \ UINT8 io = RM(_HL); \ _B--; \ @@ -1025,14 +889,6 @@ INLINE UINT8 SET(UINT8 bit, UINT8 value) (io >> 2)) & 1 ) \ _F |= PF; \ } -#else -#define OUTD { \ - _B--; \ - OUT( _BC, RM(_HL) ); \ - _HL--; \ - _F = (_B) ? NF : NF | ZF; \ -} -#endif /*************************************************************** * LDIR diff --git a/src/emu/cpu/z180/z180tbl.h b/src/emu/cpu/z180/z180tbl.h index 3598f12a529..6d851e1da5d 100644 --- a/src/emu/cpu/z180/z180tbl.h +++ b/src/emu/cpu/z180/z180tbl.h @@ -1,4 +1,3 @@ -#if Z180_EXACT /* tmp1 value for ini/inir/outi/otir for [C.1-0][io.1-0] */ static const UINT8 irep_tmp1[4][4] = { {0,0,1,0},{0,1,0,1},{1,0,1,1},{0,1,1,0} @@ -28,7 +27,6 @@ static const UINT8 breg_tmp2[256] = { 1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0, 1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1 }; -#endif static const UINT8 cc_op[0x100] = { /*-0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -a -b -c -d -e -f */ |