diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/devices/cpu/z80/z80.cpp | 1 | ||||
-rw-r--r-- | src/devices/cpu/z80/z80.h | 1 | ||||
-rw-r--r-- | src/devices/cpu/z80/z80.inc | 3 | ||||
-rw-r--r-- | src/devices/cpu/z80/z80.lst | 2109 | ||||
-rw-r--r-- | src/emu/diexec.cpp | 2 | ||||
-rw-r--r-- | src/emu/resampler.cpp | 142 | ||||
-rw-r--r-- | src/emu/resampler.h | 41 | ||||
-rw-r--r-- | src/emu/sound.cpp | 66 | ||||
-rw-r--r-- | src/emu/sound.h | 26 | ||||
-rw-r--r-- | src/frontend/mame/ui/audioeffects.cpp | 167 | ||||
-rw-r--r-- | src/frontend/mame/ui/audioeffects.h | 13 | ||||
-rw-r--r-- | src/mame/act/victor9k.cpp | 31 | ||||
-rw-r--r-- | src/mame/bmc/koftball.cpp | 157 | ||||
-rw-r--r-- | src/mame/capcom/cps2.cpp | 55 | ||||
-rw-r--r-- | src/mame/casio/pickytlk.cpp | 10 | ||||
-rw-r--r-- | src/mame/gaelco/gaelco2.cpp | 169 | ||||
-rw-r--r-- | src/mame/igs/igs011.cpp | 440 | ||||
-rw-r--r-- | src/mame/mame.lst | 14 | ||||
-rw-r--r-- | src/mame/misc/acefruit.cpp | 154 | ||||
-rw-r--r-- | src/mame/namco/mappy.cpp | 2 | ||||
-rw-r--r-- | src/mame/sega/m50dass.cpp | 2 | ||||
-rw-r--r-- | src/mame/sega/model2_v.cpp | 3 |
22 files changed, 1936 insertions, 1672 deletions
diff --git a/src/devices/cpu/z80/z80.cpp b/src/devices/cpu/z80/z80.cpp index c95474999d5..9d2c5958dd7 100644 --- a/src/devices/cpu/z80/z80.cpp +++ b/src/devices/cpu/z80/z80.cpp @@ -571,7 +571,6 @@ void z80_device::device_start() save_item(NAME(m_ea)); save_item(NAME(m_service_attention)); save_item(NAME(m_tmp_irq_vector)); - save_item(NAME(m_shared_addr.w)); save_item(NAME(m_shared_data.w)); save_item(NAME(m_shared_data2.w)); save_item(NAME(m_rtemp)); diff --git a/src/devices/cpu/z80/z80.h b/src/devices/cpu/z80/z80.h index b40e697d81f..3498f100dcd 100644 --- a/src/devices/cpu/z80/z80.h +++ b/src/devices/cpu/z80/z80.h @@ -181,7 +181,6 @@ protected: int m_icount; int m_tmp_irq_vector; - PAIR16 m_shared_addr; PAIR16 m_shared_data; PAIR16 m_shared_data2; u8 m_rtemp; diff --git a/src/devices/cpu/z80/z80.inc b/src/devices/cpu/z80/z80.inc index caf7ce22c8f..1c7dd7843a0 100644 --- a/src/devices/cpu/z80/z80.inc +++ b/src/devices/cpu/z80/z80.inc @@ -60,9 +60,6 @@ #define WZ_L m_wz.b.l -#define TADR m_shared_addr.w // Typically represents values from A0..15 pins. 16bit input in steps. -#define TADR_H m_shared_addr.b.h -#define TADR_L m_shared_addr.b.l #define TDAT m_shared_data.w // 16bit input(if use as second parameter) or output in steps. #define TDAT2 m_shared_data2.w #define TDAT_H m_shared_data.b.h diff --git a/src/devices/cpu/z80/z80.lst b/src/devices/cpu/z80/z80.lst index a31e651748b..b1aa31aa12d 100644 --- a/src/devices/cpu/z80/z80.lst +++ b/src/devices/cpu/z80/z80.lst @@ -3,47 +3,46 @@ ########################################################## # macros ########################################################## -macro nomreq_addr +macro nomreq_addr %addr if (nomemrq_en) - m_nomreq_cb(TADR, 0x00, 0xff); + m_nomreq_cb(%addr, 0x00, 0xff); + 1 macro nomreq_ir %cycles - TADR = (m_i << 8) | (m_r2 & 0x80) | (m_r & 0x7f); - %cycles * call nomreq_addr + %cycles * call nomreq_addr (m_i << 8) | (m_r2 & 0x80) | (m_r & 0x7f) -macro in - m_iorq_cycles !! TDAT8 = m_io.read_interruptible(TADR); +macro in %port + m_iorq_cycles !! TDAT8 = m_io.read_interruptible(%port); -macro out - m_iorq_cycles !! m_io.write_interruptible(TADR, TDAT8); +macro out %port + m_iorq_cycles !! m_io.write_interruptible(%port, TDAT8); -macro rm - m_memrq_cycles !! TDAT8 = data_read(TADR); +macro rm %addr + m_memrq_cycles !! TDAT8 = data_read(%addr); -macro rm_reg - call rm - call nomreq_addr +macro rm_reg %addr + call rm %addr + call nomreq_addr %addr -macro rm16 - call rm - TDAT_H = TDAT_L; TADR++; - call rm +macro rm16 %addr + call rm %addr + TDAT_H = TDAT_L; + call rm %addr+1 using std::swap; std::swap(TDAT_H, TDAT_L); -macro wm - m_memrq_cycles !! data_write(TADR, TDAT8); +macro wm %addr + m_memrq_cycles !! data_write(%addr, TDAT8); -macro wm16 - call wm - TADR++; TDAT8 = TDAT_H; - call wm +macro wm16 %addr + call wm %addr + TDAT8 = TDAT_H; + call wm %addr+1 -macro wm16_sp +macro wm16_sp %d16 SP--; - m_memrq_cycles !! stack_write(SP, TDAT_H); + m_memrq_cycles !! stack_write(SP, (%d16) >> 8); SP--; - m_memrq_cycles !! stack_write(SP, TDAT_L); + m_memrq_cycles !! stack_write(SP, %d16); macro rop m_m1_cycles-2 !! TDAT8 = opcode_read(); @@ -80,9 +79,9 @@ macro pop m_memrq_cycles !! TDAT_H = stack_read(SP); SP++; -macro push +macro push %d16 call nomreq_ir 1 - call wm16_sp + call wm16_sp %d16 macro jp call arg16 @@ -116,20 +115,17 @@ macro t6a84:jp_cond macro jr call arg - TADR = PC-1; - 5 * call nomreq_addr + 5 * call nomreq_addr PC-1 PC += (s8)TDAT8; WZ = PC; macro t6a84:jr call arg - TADR = PC-1; - 5 * call nomreq_addr + 5 * call nomreq_addr PC-1 PC += (s8)TDAT8; WZ = PC; paged_jump(); macro r800:jr call arg - TADR = PC-1; + 1 PC += (s8)TDAT8; WZ = PC; @@ -142,18 +138,18 @@ macro jr_cond macro arg16_call call arg16 - m_ea = TDAT; TADR = PC-1; - call nomreq_addr - WZ = m_ea; TDAT = PC; - call wm16_sp + m_ea = TDAT; + call nomreq_addr PC-1 + WZ = m_ea; + call wm16_sp PC PC = m_ea; macro r800:arg16_call call arg16 - m_ea = TDAT; TADR = PC-1; - call nomreq_addr - WZ = m_ea; TDAT = PC; - call wm16_sp + m_ea = TDAT; + call nomreq_addr PC-1 + WZ = m_ea; + call wm16_sp PC PC = m_ea; macro call_cond @@ -234,38 +230,32 @@ macro r800:ld_a_i set_service_attention<SA_AFTER_LDAIR, 1>(); macro rst addr - TDAT = PC; - call push + call push PC PC = addr; WZ = PC; macro rrd - TADR = HL; - call rm + call rm HL WZ = HL+1; - 4 * call nomreq_addr + 4 * call nomreq_addr HL TDAT_H = TDAT8; TDAT8 = (TDAT8 >> 4) | (A << 4); - call wm + call wm HL A = (A & 0xf0) | (TDAT_H & 0x0f); set_f((F & CF) | SZP[A]); macro rld - TADR = HL; - call rm + call rm HL WZ = HL+1; - 4 * call nomreq_addr + 4 * call nomreq_addr HL TDAT_H = TDAT8; TDAT8 = (TDAT8 << 4) | (A & 0x0f); - call wm + call wm HL A = (A & 0xf0) | (TDAT_H >> 4); set_f((F & CF) | SZP[A]); -macro ex_sp - TDAT2 = TDAT; +macro ex_sp %d16 call pop - TADR = SP-1; - call nomreq_addr - using std::swap; std::swap(TDAT, TDAT2); - call wm16_sp - TADR = SP; - 2 * call nomreq_addr - using std::swap; std::swap(TDAT, TDAT2); WZ = TDAT; + call nomreq_addr SP-1 + call wm16_sp %d16 + %d16 = TDAT; + 2 * call nomreq_addr SP + WZ = TDAT; macro add16 call nomreq_ir 7 @@ -289,161 +279,135 @@ macro r800:sbc_hl { u32 res = HL - TDAT - (F & CF); WZ = HL + 1; set_f((((HL ^ res ^ TDAT) >> 8) & HF) | NF | ((res >> 16) & CF) | ((res >> 8) & (SF | YF | XF)) | ((res & 0xffff) ? 0 : ZF) | (((TDAT ^ HL) & (HL ^ res) &0x8000) >> 13)); HL = (u16)res; } macro ldi - TADR = HL; - call rm - TADR = DE; - call wm - 2 * call nomreq_addr + call rm HL + call wm DE + 2 * call nomreq_addr DE set_f(F & (SF | ZF | CF)); if ((A + TDAT8) & 0x02) F |= YF; if ((A + TDAT8) & 0x08) F |= XF; HL++; DE++; BC--; if(BC) F |= VF; macro r800:ldi - TADR = HL; - call rm - TADR = DE; - call wm - call nomreq_addr + call rm HL + call wm DE + call nomreq_addr DE set_f(F & (SF | ZF | CF)); if ((A + TDAT8) & 0x02) F |= YF; if ((A + TDAT8) & 0x08) F |= XF; HL++; DE++; BC--; if(BC) F |= VF; macro cpi - TADR = HL; - call rm - 5 * call nomreq_addr + call rm HL + 5 * call nomreq_addr HL { u8 res = A - TDAT8; WZ++; HL++; BC--; set_f((F & CF) | (SZ[res]&~(YF|XF)) | ((A^TDAT8^res)&HF) | NF); if (F & HF) res -= 1; if (res & 0x02) F |= YF; if (res & 0x08) F |= XF; if (BC) F |= VF; } macro r800:cpi - TADR = HL; - call rm - call nomreq_addr + call rm HL + call nomreq_addr HL { u8 res = A - TDAT8; WZ++; HL++; BC--; set_f((F & CF) | (SZ[res]&~(YF|XF)) | ((A^TDAT8^res)&HF) | NF); if (F & HF) res -= 1; if (res & 0x02) F |= YF; if (res & 0x08) F |= XF; if (BC) F |= VF; } macro ini call nomreq_ir 1 - TADR = BC; - call in - WZ = BC + 1; B--; TADR = HL; - call wm + call in BC + WZ = BC + 1; B--; + call wm HL { HL++; set_f(SZ[B]); unsigned t = (unsigned)((C + 1) & 0xff) + (unsigned)TDAT8; if (TDAT8 & SF) F |= NF; if (t & 0x100) F |= HF | CF; F |= SZP[(u8)(t & 0x07) ^ B] & PF; } macro r800:ini - TADR = BC; - call in - WZ = BC + 1; B--; TADR = HL; - call wm + call in BC + WZ = BC + 1; B--; + call wm HL { HL++; set_f(SZ[B]); unsigned t = (unsigned)((C + 1) & 0xff) + (unsigned)TDAT8; if (TDAT8 & SF) F |= NF; if (t & 0x100) F |= HF | CF; F |= SZP[(u8)(t & 0x07) ^ B] & PF; } macro outi call nomreq_ir 1 - TADR = HL; - call rm - B--; WZ = BC + 1; TADR = BC; - call out + call rm HL + B--; WZ = BC + 1; + call out BC { HL++; set_f(SZ[B]); unsigned t = (unsigned)L + (unsigned)TDAT8; if (TDAT8 & SF) F |= NF; if (t & 0x100) F |= HF | CF; F |= SZP[(u8)(t & 0x07) ^ B] & PF; } macro r800:outi - TADR = HL; - call rm - B--; WZ = BC + 1; TADR = BC; - call out + call rm HL + B--; WZ = BC + 1; + call out BC { HL++; set_f(SZ[B]); unsigned t = (unsigned)L + (unsigned)TDAT8; if (TDAT8 & SF) F |= NF; if (t & 0x100) F |= HF | CF; F |= SZP[(u8)(t & 0x07) ^ B] & PF; } macro ldd - TADR = HL; - call rm - TADR = DE; - call wm - 2 * call nomreq_addr + call rm HL + call wm DE + 2 * call nomreq_addr DE { set_f(F & (SF | ZF | CF)); if ((A + TDAT8) & 0x02) F |= YF; if ((A + TDAT8) & 0x08) F |= XF; HL--; DE--; BC--; if (BC) F |= VF; } macro r800:ldd - TADR = HL; - call rm - TADR = DE; - call wm - call nomreq_addr + call rm HL + call wm DE + call nomreq_addr DE { set_f(F & (SF | ZF | CF)); if ((A + TDAT8) & 0x02) F |= YF; if ((A + TDAT8) & 0x08) F |= XF; HL--; DE--; BC--; if (BC) F |= VF; } macro cpd - TADR = HL; - call rm - TADR = HL; - 5 * call nomreq_addr + call rm HL + 5 * call nomreq_addr HL { u8 res = A - TDAT8; WZ--; HL--; BC--; set_f((F & CF) | (SZ[res]&~(YF|XF)) | ((A^TDAT8^res)&HF) | NF); if (F & HF) res -= 1; if (res & 0x02) F |= YF; if (res & 0x08) F |= XF; if (BC) F |= VF; } macro r800:cpd - TADR = HL; - call rm - TADR = HL; - call nomreq_addr + call rm HL + call nomreq_addr HL { u8 res = A - TDAT8; WZ--; HL--; BC--; set_f((F & CF) | (SZ[res]&~(YF|XF)) | ((A^TDAT8^res)&HF) | NF); if (F & HF) res -= 1; if (res & 0x02) F |= YF; if (res & 0x08) F |= XF; if (BC) F |= VF; } macro ind call nomreq_ir 1 - TADR = BC; - call in - WZ = BC - 1; B--; TADR = HL; - call wm + call in BC + WZ = BC - 1; B--; + call wm HL { HL--; set_f(SZ[B]); unsigned t = ((unsigned)(C - 1) & 0xff) + (unsigned)TDAT8; if (TDAT8 & SF) F |= NF; if (t & 0x100) F |= HF | CF; F |= SZP[(u8)(t & 0x07) ^ B] & PF; } macro r800:ind - TADR = BC; - call in - WZ = BC - 1; B--; TADR = HL; - call wm + call in BC + WZ = BC - 1; B--; + call wm HL { HL--; set_f(SZ[B]); unsigned t = ((unsigned)(C - 1) & 0xff) + (unsigned)TDAT8; if (TDAT8 & SF) F |= NF; if (t & 0x100) F |= HF | CF; F |= SZP[(u8)(t & 0x07) ^ B] & PF; } macro outd call nomreq_ir 1 - TADR = HL; - call rm - B--; WZ = BC - 1; TADR = BC; - call out + call rm HL + B--; WZ = BC - 1; + call out BC { HL--; set_f(SZ[B]); unsigned t = (unsigned)L + (unsigned)TDAT8; if (TDAT8 & SF) F |= NF; if (t & 0x100) F |= HF | CF; F |= SZP[(u8)(t & 0x07) ^ B] & PF; } macro r800:outd - TADR = HL; - call rm - B--; WZ = BC - 1; TADR = BC; - call out + call rm HL + B--; WZ = BC - 1; + call out BC { HL--; set_f(SZ[B]); unsigned t = (unsigned)L + (unsigned)TDAT8; if (TDAT8 & SF) F |= NF; if (t & 0x100) F |= HF | CF; F |= SZP[(u8)(t & 0x07) ^ B] & PF; } macro ldir call ldi if (BC != 0) { - TADR = DE; - 5 * call nomreq_addr + 5 * call nomreq_addr DE PC -= 2; WZ = PC + 1; F &= ~(YF | XF); F |= (PC >> 8) & (YF | XF); } macro r800:ldir call ldi if (BC != 0) { - TADR = DE; - call nomreq_addr + call nomreq_addr DE PC -= 2; WZ = PC + 1; F &= ~(YF | XF); F |= (PC >> 8) & (YF | XF); } macro cpir call cpi if (BC != 0 && !(F & ZF)) { - TADR = HL; - 5 * call nomreq_addr + 5 * call nomreq_addr HL PC -= 2; WZ = PC + 1; F &= ~(YF | XF); F |= (PC >> 8) & (YF | XF); } macro r800:cpir call cpi - call nomreq_addr + call nomreq_addr HL if (BC != 0 && !(F & ZF)) { - TADR = HL; PC -= 2; WZ = PC + 1; F &= ~(YF | XF); F |= (PC >> 8) & (YF | XF); } macro inir call ini if (B != 0) { - TADR = HL; - 5 * call nomreq_addr - PC -= 2; block_io_interrupted_flags(); + 5 * call nomreq_addr HL + PC -= 2; + block_io_interrupted_flags(); } macro r800:inir @@ -451,16 +415,16 @@ macro r800:inir T(1); call ini if (B != 0) { - TADR = HL; - PC -= 2; block_io_interrupted_flags(); + PC -= 2; + block_io_interrupted_flags(); } macro otir call outi if (B != 0) { - TADR = BC; - 5 * call nomreq_addr - PC -= 2; block_io_interrupted_flags(); + 5 * call nomreq_addr BC + PC -= 2; + block_io_interrupted_flags(); } macro r800:otir @@ -468,49 +432,45 @@ macro r800:otir T(1); call outi if (B != 0) { - TADR = BC; - 5 * call nomreq_addr - PC -= 2; block_io_interrupted_flags(); + 5 * call nomreq_addr BC + PC -= 2; + block_io_interrupted_flags(); } macro lddr call ldd if (BC != 0) { - TADR = DE; - 5 * call nomreq_addr + 5 * call nomreq_addr DE PC -= 2; WZ = PC + 1; F &= ~(YF | XF); F |= (PC >> 8) & (YF | XF); } macro r800:lddr call ldd if (BC != 0) { - TADR = DE; - call nomreq_addr + call nomreq_addr DE PC -= 2; WZ = PC + 1; F &= ~(YF | XF); F |= (PC >> 8) & (YF | XF); } macro cpdr call cpd if (BC != 0 && !(F & ZF)) { - TADR = HL; - 5 * call nomreq_addr + 5 * call nomreq_addr HL PC -= 2; WZ = PC + 1; F &= ~(YF | XF); F |= (PC >> 8) & (YF | XF); } macro r800:cpdr call cpd - call nomreq_addr + call nomreq_addr HL /* suspected wrong. must be inside if? */ if (BC != 0 && !(F & ZF)) { - TADR = HL; PC -= 2; WZ = PC + 1; F &= ~(YF | XF); F |= (PC >> 8) & (YF | XF); } macro indr call ind if (B != 0) { - TADR = HL; - 5 * call nomreq_addr - PC -= 2; block_io_interrupted_flags(); + 5 * call nomreq_addr HL + PC -= 2; + block_io_interrupted_flags(); } macro r800:indr @@ -518,16 +478,16 @@ macro r800:indr T(1); call ind if (B != 0) { - TADR = HL; - PC -= 2; block_io_interrupted_flags(); + PC -= 2; + block_io_interrupted_flags(); } macro otdr call outd if (B != 0) { - TADR = BC; - 5 * call nomreq_addr - PC -= 2; block_io_interrupted_flags(); + 5 * call nomreq_addr BC + PC -= 2; + block_io_interrupted_flags(); } macro r800:otdr @@ -535,8 +495,8 @@ macro r800:otdr T(1); call outd if (B != 0) { - TADR = BC; - PC -= 2; block_io_interrupted_flags(); + PC -= 2; + block_io_interrupted_flags(); } macro jump %po @@ -556,8 +516,7 @@ macro take_nmi m_iff1 = 0; m_r++; + 5 - TDAT = PC; - call wm16_sp + call wm16_sp PC PC = 0x0066; WZ = PC; set_service_attention<SA_NMI_PENDING, 0>(); @@ -598,11 +557,9 @@ macro take_interrupt // even, and all 8 bits will be used; even $FF is handled normally. // CALL opcode timing + 5 - TDAT = PC; - call wm16_sp + call wm16_sp PC m_tmp_irq_vector = (m_tmp_irq_vector & 0xff) | (m_i << 8); - TADR = m_tmp_irq_vector; - call rm16 + call rm16 m_tmp_irq_vector PC = TDAT; LOGMASKED(LOG_INT, "IM2 [$%04x] = $%04x\n", m_tmp_irq_vector, PC); } else if (m_im == 1) { @@ -610,8 +567,7 @@ macro take_interrupt LOGMASKED(LOG_INT, "'%s' IM1 $0038\n", tag()); // RST $38 + 5 - TDAT = PC; - call wm16_sp + call wm16_sp PC PC = 0x0038; } else { /* Interrupt mode 0. We check for CALL and JP instructions, @@ -624,8 +580,7 @@ macro take_interrupt if ((m_tmp_irq_vector & 0xff0000) == 0xcd0000) { // CALL $xxxx cycles + 11 - TDAT = PC; - call wm16_sp + call wm16_sp PC PC = m_tmp_irq_vector & 0xffff; } else if ((m_tmp_irq_vector & 0xff0000) == 0xc30000) { // JP $xxxx cycles @@ -634,8 +589,7 @@ macro take_interrupt } else if ((m_tmp_irq_vector & 0xc7) == 0xc7) { // RST $xx cycles + 5 - TDAT = PC; - call wm16_sp + call wm16_sp PC PC = m_tmp_irq_vector & 0x0038; } else if (m_tmp_irq_vector == 0xfb) { // EI cycles @@ -678,16 +632,13 @@ macro nsc800_take_interrupt // 'interrupt latency' cycles + 7 if (m_nsc800_irq_state[0]) { - TDAT = PC; - call wm16_sp + call wm16_sp PC PC = 0x003c; } else if (m_nsc800_irq_state[1]) { - TDAT = PC; - call wm16_sp + call wm16_sp PC PC = 0x0034; } else if (m_nsc800_irq_state[2]) { - TDAT = PC; - call wm16_sp + call wm16_sp PC PC = 0x002c; } else { + 2 * m_memrq_cycles @@ -773,10 +724,9 @@ cb05 # RLC L L = rlc(L); cb06 # RLC (HL) - TADR = HL; - call rm_reg + call rm_reg HL TDAT8 = rlc(TDAT8); - call wm + call wm HL cb07 # RLC A A = rlc(A); @@ -800,10 +750,9 @@ cb0d # RRC L L = rrc(L); cb0e # RRC (HL) - TADR = HL; - call rm_reg + call rm_reg HL TDAT8 = rrc(TDAT8); - call wm + call wm HL cb0f # RRC A A = rrc(A); @@ -827,10 +776,9 @@ cb15 # RL L L = rl(L); cb16 # RL (HL) - TADR = HL; - call rm_reg + call rm_reg HL TDAT8 = rl(TDAT8); - call wm + call wm HL cb17 # RL A A = rl(A); @@ -854,10 +802,9 @@ cb1d # RR L L = rr(L); cb1e # RR (HL) - TADR = HL; - call rm_reg + call rm_reg HL TDAT8 = rr(TDAT8); - call wm + call wm HL cb1f # RR A A = rr(A); @@ -881,10 +828,9 @@ cb25 # SLA L L = sla(L); cb26 # SLA (HL) - TADR = HL; - call rm_reg + call rm_reg HL TDAT8 = sla(TDAT8); - call wm + call wm HL cb27 # SLA A A = sla(A); @@ -908,10 +854,9 @@ cb2d # SRA L L = sra(L); cb2e # SRA (HL) - TADR = HL; - call rm_reg + call rm_reg HL TDAT8 = sra(TDAT8); - call wm + call wm HL cb2f # SRA A A = sra(A); @@ -935,10 +880,9 @@ cb35 # SLL L L = sll(L); cb36 # SLL (HL) - TADR = HL; - call rm_reg + call rm_reg HL TDAT8 = sll(TDAT8); - call wm + call wm HL cb37 # SLL A A = sll(A); @@ -962,10 +906,9 @@ cb3d # SRL L L = srl(L); cb3e # SRL (HL) - TADR = HL; - call rm_reg + call rm_reg HL TDAT8 = srl(TDAT8); - call wm + call wm HL cb3f # SRL A A = srl(A); @@ -989,8 +932,7 @@ cb45 # BIT 0,L bit(0, L); cb46 # BIT 0,(HL) - TADR = HL; - call rm_reg + call rm_reg HL bit_hl(0, TDAT8); cb47 # BIT 0,A @@ -1015,8 +957,7 @@ cb4d # BIT 1,L bit(1, L); cb4e # BIT 1,(HL) - TADR = HL; - call rm_reg + call rm_reg HL bit_hl(1, TDAT8); cb4f # BIT 1,A @@ -1041,8 +982,7 @@ cb55 # BIT 2,L bit(2, L); cb56 # BIT 2,(HL) - TADR = HL; - call rm_reg + call rm_reg HL bit_hl(2, TDAT8); cb57 # BIT 2,A @@ -1067,8 +1007,7 @@ cb5d # BIT 3,L bit(3, L); cb5e # BIT 3,(HL) - TADR = HL; - call rm_reg + call rm_reg HL bit_hl(3, TDAT8); cb5f # BIT 3,A @@ -1093,8 +1032,7 @@ cb65 # BIT 4,L bit(4, L); cb66 # BIT 4,(HL) - TADR = HL; - call rm_reg + call rm_reg HL bit_hl(4, TDAT8); cb67 # BIT 4,A @@ -1119,8 +1057,7 @@ cb6d # BIT 5,L bit(5, L); cb6e # BIT 5,(HL) - TADR = HL; - call rm_reg + call rm_reg HL bit_hl(5, TDAT8); cb6f # BIT 5,A @@ -1145,8 +1082,7 @@ cb75 # BIT 6,L bit(6, L); cb76 # BIT 6,(HL) - TADR = HL; - call rm_reg + call rm_reg HL bit_hl(6, TDAT8); cb77 # BIT 6,A @@ -1171,8 +1107,7 @@ cb7d # BIT 7,L bit(7, L); cb7e # BIT 7,(HL) - TADR = HL; - call rm_reg + call rm_reg HL bit_hl(7, TDAT8); cb7f # BIT 7,A @@ -1197,10 +1132,9 @@ cb85 # RES 0,L L = res(0, L); cb86 # RES 0,(HL) - TADR = HL; - call rm_reg + call rm_reg HL TDAT8 = res(0, TDAT8); - call wm + call wm HL cb87 # RES 0,A A = res(0, A); @@ -1224,10 +1158,9 @@ cb8d # RES 1,L L = res(1, L); cb8e # RES 1,(HL) - TADR = HL; - call rm_reg + call rm_reg HL TDAT8 = res(1, TDAT8); - call wm + call wm HL cb8f # RES 1,A A = res(1, A); @@ -1251,10 +1184,9 @@ cb95 # RES 2,L L = res(2, L); cb96 # RES 2,(HL) - TADR = HL; - call rm_reg + call rm_reg HL TDAT8 = res(2, TDAT8); - call wm + call wm HL cb97 # RES 2,A A = res(2, A); @@ -1278,10 +1210,9 @@ cb9d # RES 3,L L = res(3, L); cb9e # RES 3,(HL) - TADR = HL; - call rm_reg + call rm_reg HL TDAT8 = res(3, TDAT8); - call wm + call wm HL cb9f # RES 3,A A = res(3, A); @@ -1305,10 +1236,9 @@ cba5 # RES 4,L L = res(4, L); cba6 # RES 4,(HL) - TADR = HL; - call rm_reg + call rm_reg HL TDAT8 = res(4, TDAT8); - call wm + call wm HL cba7 # RES 4,A A = res(4, A); @@ -1332,10 +1262,9 @@ cbad # RES 5,L L = res(5, L); cbae # RES 5,(HL) - TADR = HL; - call rm_reg + call rm_reg HL TDAT8 = res(5, TDAT8); - call wm + call wm HL cbaf # RES 5,A A = res(5, A); @@ -1359,10 +1288,9 @@ cbb5 # RES 6,L L = res(6, L); cbb6 # RES 6,(HL) - TADR = HL; - call rm_reg + call rm_reg HL TDAT8 = res(6, TDAT8); - call wm + call wm HL cbb7 # RES 6,A A = res(6, A); @@ -1386,10 +1314,9 @@ cbbd # RES 7,L L = res(7, L); cbbe # RES 7,(HL) - TADR = HL; - call rm_reg + call rm_reg HL TDAT8 = res(7, TDAT8); - call wm + call wm HL cbbf # RES 7,A A = res(7, A); @@ -1413,10 +1340,9 @@ cbc5 # SET 0,L L = set(0, L); cbc6 # SET 0,(HL) - TADR = HL; - call rm_reg + call rm_reg HL TDAT8 = set(0, TDAT8); - call wm + call wm HL cbc7 # SET 0,A A = set(0, A); @@ -1440,10 +1366,9 @@ cbcd # SET 1,L L = set(1, L); cbce # SET 1,(HL) - TADR = HL; - call rm_reg + call rm_reg HL TDAT8 = set(1, TDAT8); - call wm + call wm HL cbcf # SET 1,A A = set(1, A); @@ -1467,10 +1392,9 @@ cbd5 # SET 2,L L = set(2, L); cbd6 # SET 2,(HL) - TADR = HL; - call rm_reg + call rm_reg HL TDAT8 = set(2, TDAT8); - call wm + call wm HL cbd7 # SET 2,A A = set(2, A); @@ -1494,10 +1418,9 @@ cbdd # SET 3,L L = set(3, L); cbde # SET 3,(HL) - TADR = HL; - call rm_reg + call rm_reg HL TDAT8 = set(3, TDAT8); - call wm + call wm HL cbdf # SET 3,A A = set(3, A); @@ -1521,10 +1444,9 @@ cbe5 # SET 4,L L = set(4, L); cbe6 # SET 4,(HL) - TADR = HL; - call rm_reg + call rm_reg HL TDAT8 = set(4, TDAT8); - call wm + call wm HL cbe7 # SET 4,A A = set(4, A); @@ -1548,10 +1470,9 @@ cbed # SET 5,L L = set(5, L); cbee # SET 5,(HL) - TADR = HL; - call rm_reg + call rm_reg HL TDAT8 = set(5, TDAT8); - call wm + call wm HL cbef # SET 5,A A = set(5, A); @@ -1575,10 +1496,9 @@ cbf5 # SET 6,L L = set(6, L); cbf6 # SET 6,(HL) - TADR = HL; - call rm_reg + call rm_reg HL TDAT8 = set(6, TDAT8); - call wm + call wm HL cbf7 # SET 6,A A = set(6, A); @@ -1602,10 +1522,9 @@ cbfd # SET 7,L L = set(7, L); cbfe # SET 7,(HL) - TADR = HL; - call rm_reg + call rm_reg HL TDAT8 = set(7, TDAT8); - call wm + call wm HL cbff # SET 7,A A = set(7, A); @@ -1616,388 +1535,324 @@ cbff # SET 7,A # rotate, shift and bit operations with (IX+o) ########################################################## fe00 # RLC B = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea B = rlc(TDAT8); TDAT8 = B; - call wm + call wm m_ea fe01 # RLC C = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea C = rlc(TDAT8); TDAT8 = C; - call wm + call wm m_ea fe02 # RLC D = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea D = rlc(TDAT8); TDAT8 = D; - call wm + call wm m_ea fe03 # RLC E = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea E = rlc(TDAT8); TDAT8 = E; - call wm + call wm m_ea fe04 # RLC H = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea H = rlc(TDAT8); TDAT8 = H; - call wm + call wm m_ea fe05 # RLC L = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea L = rlc(TDAT8); TDAT8 = L; - call wm + call wm m_ea fe06 # RLC (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea TDAT8 = rlc(TDAT8); - call wm + call wm m_ea fe07 # RLC A = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea A = rlc(TDAT8); TDAT8 = A; - call wm + call wm m_ea fe08 # RRC B = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea B = rrc(TDAT8); TDAT8 = B; - call wm + call wm m_ea fe09 # RRC C = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea C = rrc(TDAT8); TDAT8 = C; - call wm + call wm m_ea fe0a # RRC D = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea D = rrc(TDAT8); TDAT8 = D; - call wm + call wm m_ea fe0b # RRC E = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea E = rrc(TDAT8); TDAT8 = E; - call wm + call wm m_ea fe0c # RRC H = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea H = rrc(TDAT8); TDAT8 = H; - call wm + call wm m_ea fe0d # RRC L = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea L = rrc(TDAT8); TDAT8 = L; - call wm + call wm m_ea fe0e # RRC (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea TDAT8 = rrc(TDAT8); - call wm + call wm m_ea fe0f # RRC A = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea A = rrc(TDAT8); TDAT8 = A; - call wm + call wm m_ea fe10 # RL B = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea B = rl(TDAT8); TDAT8 = B; - call wm + call wm m_ea fe11 # RL C = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea C = rl(TDAT8); TDAT8 = C; - call wm + call wm m_ea fe12 # RL D = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea D = rl(TDAT8); TDAT8 = D; - call wm + call wm m_ea fe13 # RL E = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea E = rl(TDAT8); TDAT8 = E; - call wm + call wm m_ea fe14 # RL H = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea H = rl(TDAT8); TDAT8 = H; - call wm + call wm m_ea fe15 # RL L = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea L = rl(TDAT8); TDAT8 = L; - call wm + call wm m_ea fe16 # RL (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea TDAT8 = rl(TDAT8); - call wm + call wm m_ea fe17 # RL A = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea A = rl(TDAT8); TDAT8 = A; - call wm + call wm m_ea fe18 # RR B = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea B = rr(TDAT8); TDAT8 = B; - call wm + call wm m_ea fe19 # RR C = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea C = rr(TDAT8); TDAT8 = C; - call wm + call wm m_ea fe1a # RR D = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea D = rr(TDAT8); TDAT8 = D; - call wm + call wm m_ea fe1b # RR E = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea E = rr(TDAT8); TDAT8 = E; - call wm + call wm m_ea fe1c # RR H = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea H = rr(TDAT8); TDAT8 = H; - call wm + call wm m_ea fe1d # RR L = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea L = rr(TDAT8); TDAT8 = L; - call wm + call wm m_ea fe1e # RR (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea TDAT8 = rr(TDAT8); - call wm + call wm m_ea fe1f # RR A = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea A = rr(TDAT8); TDAT8 = A; - call wm + call wm m_ea fe20 # SLA B = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea B = sla(TDAT8); TDAT8 = B; - call wm + call wm m_ea fe21 # SLA C = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea C = sla(TDAT8); TDAT8 = C; - call wm + call wm m_ea fe22 # SLA D = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea D = sla(TDAT8); TDAT8 = D; - call wm + call wm m_ea fe23 # SLA E = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea E = sla(TDAT8); TDAT8 = E; - call wm + call wm m_ea fe24 # SLA H = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea H = sla(TDAT8); TDAT8 = H; - call wm + call wm m_ea fe25 # SLA L = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea L = sla(TDAT8); TDAT8 = L; - call wm + call wm m_ea fe26 # SLA (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea TDAT8 = sla(TDAT8); - call wm + call wm m_ea fe27 # SLA A = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea A = sla(TDAT8); TDAT8 = A; - call wm + call wm m_ea fe28 # SRA B = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea B = sra(TDAT8); TDAT8 = B; - call wm + call wm m_ea fe29 # SRA C = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea C = sra(TDAT8); TDAT8 = C; - call wm + call wm m_ea fe2a # SRA D = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea D = sra(TDAT8); TDAT8 = D; - call wm + call wm m_ea fe2b # SRA E = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea E = sra(TDAT8); TDAT8 = E; - call wm + call wm m_ea fe2c # SRA H = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea H = sra(TDAT8); TDAT8 = H; - call wm + call wm m_ea fe2d # SRA L = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea L = sra(TDAT8); TDAT8 = L; - call wm + call wm m_ea fe2e # SRA (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea TDAT8 = sra(TDAT8); - call wm + call wm m_ea fe2f # SRA A = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea A = sra(TDAT8); TDAT8 = A; - call wm + call wm m_ea fe30 # SLL B = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea B = sll(TDAT8); TDAT8 = B; - call wm + call wm m_ea fe31 # SLL C = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea C = sll(TDAT8); TDAT8 = C; - call wm + call wm m_ea fe32 # SLL D = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea D = sll(TDAT8); TDAT8 = D; - call wm + call wm m_ea fe33 # SLL E = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea E = sll(TDAT8); TDAT8 = E; - call wm + call wm m_ea fe34 # SLL H = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea H = sll(TDAT8); TDAT8 = H; - call wm + call wm m_ea fe35 # SLL L = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea L = sll(TDAT8); TDAT8 = L; - call wm + call wm m_ea fe36 # SLL (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea TDAT8 = sll(TDAT8); - call wm + call wm m_ea fe37 # SLL A = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea A = sll(TDAT8); TDAT8 = A; - call wm + call wm m_ea fe38 # SRL B = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea B = srl(TDAT8); TDAT8 = B; - call wm + call wm m_ea fe39 # SRL C = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea C = srl(TDAT8); TDAT8 = C; - call wm + call wm m_ea fe3a # SRL D = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea D = srl(TDAT8); TDAT8 = D; - call wm + call wm m_ea fe3b # SRL E = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea E = srl(TDAT8); TDAT8 = E; - call wm + call wm m_ea fe3c # SRL H = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea H = srl(TDAT8); TDAT8 = H; - call wm + call wm m_ea fe3d # SRL L = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea L = srl(TDAT8); TDAT8 = L; - call wm + call wm m_ea fe3e # SRL (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea TDAT8 = srl(TDAT8); - call wm + call wm m_ea fe3f # SRL A = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea A = srl(TDAT8); TDAT8 = A; - call wm + call wm m_ea fe40 # BIT 0,(XY+o) call jump fe46 @@ -2018,8 +1873,7 @@ fe45 # BIT 0,(XY+o) call jump fe46 fe46 # BIT 0,(XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea bit_xy(0, TDAT8); fe47 # BIT 0,(XY+o) @@ -2044,8 +1898,7 @@ fe4d # BIT 1,(XY+o) call jump fe4e fe4e # BIT 1,(XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea bit_xy(1, TDAT8); fe4f # BIT 1,(XY+o) @@ -2070,8 +1923,7 @@ fe55 # BIT 2,(XY+o) call jump fe56 fe56 # BIT 2,(XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea bit_xy(2, TDAT8); fe57 # BIT 2,(XY+o) @@ -2096,8 +1948,7 @@ fe5d # BIT 3,(XY+o) call jump fe5e fe5e # BIT 3,(XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea bit_xy(3, TDAT8); fe5f # BIT 3,(XY+o) @@ -2122,8 +1973,7 @@ fe65 # BIT 4,(XY+o) call jump fe66 fe66 # BIT 4,(XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea bit_xy(4, TDAT8); fe67 # BIT 4,(XY+o) @@ -2148,8 +1998,7 @@ fe6d # BIT 5,(XY+o) call jump fe6e fe6e # BIT 5,(XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea bit_xy(5, TDAT8); fe6f # BIT 5,(XY+o) @@ -2174,8 +2023,7 @@ fe75 # BIT 6,(XY+o) call jump fe76 fe76 # BIT 6,(XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea bit_xy(6, TDAT8); fe77 # BIT 6,(XY+o) @@ -2200,780 +2048,651 @@ fe7d # BIT 7,(XY+o) call jump fe7e fe7e # BIT 7,(XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea bit_xy(7, TDAT8); fe7f # BIT 7,(XY+o) call jump fe7e fe80 # RES 0,B = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea B = res(0, TDAT8); TDAT8 = B; - call wm + call wm m_ea fe81 # RES 0,C = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea C = res(0, TDAT8); TDAT8 = C; - call wm + call wm m_ea fe82 # RES 0,D = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea D = res(0, TDAT8); TDAT8 = D; - call wm + call wm m_ea fe83 # RES 0,E = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea E = res(0, TDAT8); TDAT8 = E; - call wm + call wm m_ea fe84 # RES 0,H = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea H = res(0, TDAT8); TDAT8 = H; - call wm + call wm m_ea fe85 # RES 0,L = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea L = res(0, TDAT8); TDAT8 = L; - call wm + call wm m_ea fe86 # RES 0,(XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea TDAT8 = res(0, TDAT8); - call wm + call wm m_ea fe87 # RES 0,A = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea A = res(0, TDAT8); TDAT8 = A; - call wm + call wm m_ea fe88 # RES 1,B = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea B = res(1, TDAT8); TDAT8 = B; - call wm + call wm m_ea fe89 # RES 1,C = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea C = res(1, TDAT8); TDAT8 = C; - call wm + call wm m_ea fe8a # RES 1,D = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea D = res(1, TDAT8); TDAT8 = D; - call wm + call wm m_ea fe8b # RES 1,E = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea E = res(1, TDAT8); TDAT8 = E; - call wm + call wm m_ea fe8c # RES 1,H = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea H = res(1, TDAT8); TDAT8 = H; - call wm + call wm m_ea fe8d # RES 1,L = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea L = res(1, TDAT8); TDAT8 = L; - call wm + call wm m_ea fe8e # RES 1,(XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea TDAT8 = res(1, TDAT8); - call wm + call wm m_ea fe8f # RES 1,A = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea A = res(1, TDAT8); TDAT8 = A; - call wm + call wm m_ea fe90 # RES 2,B = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea B = res(2, TDAT8); TDAT8 = B; - call wm + call wm m_ea fe91 # RES 2,C = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea C = res(2, TDAT8); TDAT8 = C; - call wm + call wm m_ea fe92 # RES 2,D = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea D = res(2, TDAT8); TDAT8 = D; - call wm + call wm m_ea fe93 # RES 2,E = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea E = res(2, TDAT8); TDAT8 = E; - call wm + call wm m_ea fe94 # RES 2,H = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea H = res(2, TDAT8); TDAT8 = H; - call wm + call wm m_ea fe95 # RES 2,L = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea L = res(2, TDAT8); TDAT8 = L; - call wm + call wm m_ea fe96 # RES 2,(XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea TDAT8 = res(2, TDAT8); - call wm + call wm m_ea fe97 # RES 2,A = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea A = res(2, TDAT8); TDAT8 = A; - call wm + call wm m_ea fe98 # RES 3,B = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea B = res(3, TDAT8); TDAT8 = B; - call wm + call wm m_ea fe99 # RES 3,C = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea C = res(3, TDAT8); TDAT8 = C; - call wm + call wm m_ea fe9a # RES 3,D = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea D = res(3, TDAT8); TDAT8 = D; - call wm + call wm m_ea fe9b # RES 3,E = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea E = res(3, TDAT8); TDAT8 = E; - call wm + call wm m_ea fe9c # RES 3,H = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea H = res(3, TDAT8); TDAT8 = H; - call wm + call wm m_ea fe9d # RES 3,L = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea L = res(3, TDAT8); TDAT8 = L; - call wm + call wm m_ea fe9e # RES 3,(XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea TDAT8 = res(3, TDAT8); - call wm + call wm m_ea fe9f # RES 3,A = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea A = res(3, TDAT8); TDAT8 = A; - call wm + call wm m_ea fea0 # RES 4,B = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea B = res(4, TDAT8); TDAT8 = B; - call wm + call wm m_ea fea1 # RES 4,C = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea C = res(4, TDAT8); TDAT8 = C; - call wm + call wm m_ea fea2 # RES 4,D = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea D = res(4, TDAT8); TDAT8 = D; - call wm + call wm m_ea fea3 # RES 4,E = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea E = res(4, TDAT8); TDAT8 = E; - call wm + call wm m_ea fea4 # RES 4,H = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea H = res(4, TDAT8); TDAT8 = H; - call wm + call wm m_ea fea5 # RES 4,L = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea L = res(4, TDAT8); TDAT8 = L; - call wm + call wm m_ea fea6 # RES 4,(XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea TDAT8 = res(4, TDAT8); - call wm + call wm m_ea fea7 # RES 4,A = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea A = res(4, TDAT8); TDAT8 = A; - call wm + call wm m_ea fea8 # RES 5,B = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea B = res(5, TDAT8); TDAT8 = B; - call wm + call wm m_ea fea9 # RES 5,C = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea C = res(5, TDAT8); TDAT8 = C; - call wm + call wm m_ea feaa # RES 5,D = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea D = res(5, TDAT8); TDAT8 = D; - call wm + call wm m_ea feab # RES 5,E = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea E = res(5, TDAT8); TDAT8 = E; - call wm + call wm m_ea feac # RES 5,H = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea H = res(5, TDAT8); TDAT8 = H; - call wm + call wm m_ea fead # RES 5,L = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea L = res(5, TDAT8); TDAT8 = L; - call wm + call wm m_ea feae # RES 5,(XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea TDAT8 = res(5, TDAT8); - call wm + call wm m_ea feaf # RES 5,A = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea A = res(5, TDAT8); TDAT8 = A; - call wm + call wm m_ea feb0 # RES 6,B = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea B = res(6, TDAT8); TDAT8 = B; - call wm + call wm m_ea feb1 # RES 6,C = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea C = res(6, TDAT8); TDAT8 = C; - call wm + call wm m_ea feb2 # RES 6,D = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea D = res(6, TDAT8); TDAT8 = D; - call wm + call wm m_ea feb3 # RES 6,E = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea E = res(6, TDAT8); TDAT8 = E; - call wm + call wm m_ea feb4 # RES 6,H = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea H = res(6, TDAT8); TDAT8 = H; - call wm + call wm m_ea feb5 # RES 6,L = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea L = res(6, TDAT8); TDAT8 = L; - call wm + call wm m_ea feb6 # RES 6,(XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea TDAT8 = res(6, TDAT8); - call wm + call wm m_ea feb7 # RES 6,A = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea A = res(6, TDAT8); TDAT8 = A; - call wm + call wm m_ea feb8 # RES 7,B = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea B = res(7, TDAT8); TDAT8 = B; - call wm + call wm m_ea feb9 # RES 7,C = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea C = res(7, TDAT8); TDAT8 = C; - call wm + call wm m_ea feba # RES 7,D = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea D = res(7, TDAT8); TDAT8 = D; - call wm + call wm m_ea febb # RES 7,E = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea E = res(7, TDAT8); TDAT8 = E; - call wm + call wm m_ea febc # RES 7,H = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea H = res(7, TDAT8); TDAT8 = H; - call wm + call wm m_ea febd # RES 7,L = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea L = res(7, TDAT8); TDAT8 = L; - call wm + call wm m_ea febe # RES 7,(XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea TDAT8 = res(7, TDAT8); - call wm + call wm m_ea febf # RES 7,A = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea A = res(7, TDAT8); TDAT8 = A; - call wm + call wm m_ea fec0 # SET 0,B = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea B = set(0, TDAT8); TDAT8 = B; - call wm + call wm m_ea fec1 # SET 0,C = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea C = set(0, TDAT8); TDAT8 = C; - call wm + call wm m_ea fec2 # SET 0,D = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea D = set(0, TDAT8); TDAT8 = D; - call wm + call wm m_ea fec3 # SET 0,E = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea E = set(0, TDAT8); TDAT8 = E; - call wm + call wm m_ea fec4 # SET 0,H = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea H = set(0, TDAT8); TDAT8 = H; - call wm + call wm m_ea fec5 # SET 0,L = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea L = set(0, TDAT8); TDAT8 = L; - call wm + call wm m_ea fec6 # SET 0,(XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea TDAT8 = set(0, TDAT8); - call wm + call wm m_ea fec7 # SET 0,A = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea A = set(0, TDAT8); TDAT8 = A; - call wm + call wm m_ea fec8 # SET 1,B = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea B = set(1, TDAT8); TDAT8 = B; - call wm + call wm m_ea fec9 # SET 1,C = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea C = set(1, TDAT8); TDAT8 = C; - call wm + call wm m_ea feca # SET 1,D = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea D = set(1, TDAT8); TDAT8 = D; - call wm + call wm m_ea fecb # SET 1,E = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea E = set(1, TDAT8); TDAT8 = E; - call wm + call wm m_ea fecc # SET 1,H = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea H = set(1, TDAT8); TDAT8 = H; - call wm + call wm m_ea fecd # SET 1,L = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea L = set(1, TDAT8); TDAT8 = L; - call wm + call wm m_ea fece # SET 1,(XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea TDAT8 = set(1, TDAT8); - call wm + call wm m_ea fecf # SET 1,A = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea A = set(1, TDAT8); TDAT8 = A; - call wm + call wm m_ea fed0 # SET 2,B = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea B = set(2, TDAT8); TDAT8 = B; - call wm + call wm m_ea fed1 # SET 2,C = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea C = set(2, TDAT8); TDAT8 = C; - call wm + call wm m_ea fed2 # SET 2,D = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea D = set(2, TDAT8); TDAT8 = D; - call wm + call wm m_ea fed3 # SET 2,E = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea E = set(2, TDAT8); TDAT8 = E; - call wm + call wm m_ea fed4 # SET 2,H = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea H = set(2, TDAT8); TDAT8 = H; - call wm + call wm m_ea fed5 # SET 2,L = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea L = set(2, TDAT8); TDAT8 = L; - call wm + call wm m_ea fed6 # SET 2,(XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea TDAT8 = set(2, TDAT8); - call wm + call wm m_ea fed7 # SET 2,A = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea A = set(2, TDAT8); TDAT8 = A; - call wm + call wm m_ea fed8 # SET 3,B = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea B = set(3, TDAT8); TDAT8 = B; - call wm + call wm m_ea fed9 # SET 3,C = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea C = set(3, TDAT8); TDAT8 = C; - call wm + call wm m_ea feda # SET 3,D = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea D = set(3, TDAT8); TDAT8 = D; - call wm + call wm m_ea fedb # SET 3,E = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea E = set(3, TDAT8); TDAT8 = E; - call wm + call wm m_ea fedc # SET 3,H = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea H = set(3, TDAT8); TDAT8 = H; - call wm + call wm m_ea fedd # SET 3,L = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea L = set(3, TDAT8); TDAT8 = L; - call wm + call wm m_ea fede # SET 3,(XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea TDAT8 = set(3, TDAT8); - call wm + call wm m_ea fedf # SET 3,A = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea A = set(3, TDAT8); TDAT8 = A; - call wm + call wm m_ea fee0 # SET 4,B = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea B = set(4, TDAT8); TDAT8 = B; - call wm + call wm m_ea fee1 # SET 4,C = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea C = set(4, TDAT8); TDAT8 = C; - call wm + call wm m_ea fee2 # SET 4,D = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea D = set(4, TDAT8); TDAT8 = D; - call wm + call wm m_ea fee3 # SET 4,E = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea E = set(4, TDAT8); TDAT8 = E; - call wm + call wm m_ea fee4 # SET 4,H = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea H = set(4, TDAT8); TDAT8 = H; - call wm + call wm m_ea fee5 # SET 4,L = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea L = set(4, TDAT8); TDAT8 = L; - call wm + call wm m_ea fee6 # SET 4,(XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea TDAT8 = set(4, TDAT8); - call wm + call wm m_ea fee7 # SET 4,A = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea A = set(4, TDAT8); TDAT8 = A; - call wm + call wm m_ea fee8 # SET 5,B = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea B = set(5, TDAT8); TDAT8 = B; - call wm + call wm m_ea fee9 # SET 5,C = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea C = set(5, TDAT8); TDAT8 = C; - call wm + call wm m_ea feea # SET 5,D = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea D = set(5, TDAT8); TDAT8 = D; - call wm + call wm m_ea feeb # SET 5,E = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea E = set(5, TDAT8); TDAT8 = E; - call wm + call wm m_ea feec # SET 5,H = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea H = set(5, TDAT8); TDAT8 = H; - call wm + call wm m_ea feed # SET 5,L = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea L = set(5, TDAT8); TDAT8 = L; - call wm + call wm m_ea feee # SET 5,(XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea TDAT8 = set(5, TDAT8); - call wm + call wm m_ea feef # SET 5,A = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea A = set(5, TDAT8); TDAT8 = A; - call wm + call wm m_ea fef0 # SET 6,B = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea B = set(6, TDAT8); TDAT8 = B; - call wm + call wm m_ea fef1 # SET 6,C = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea C = set(6, TDAT8); TDAT8 = C; - call wm + call wm m_ea fef2 # SET 6,D = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea D = set(6, TDAT8); TDAT8 = D; - call wm + call wm m_ea fef3 # SET 6,E = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea E = set(6, TDAT8); TDAT8 = E; - call wm + call wm m_ea fef4 # SET 6,H = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea H = set(6, TDAT8); TDAT8 = H; - call wm + call wm m_ea fef5 # SET 6,L = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea L = set(6, TDAT8); TDAT8 = L; - call wm + call wm m_ea fef6 # SET 6,(XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea TDAT8 = set(6, TDAT8); - call wm + call wm m_ea fef7 # SET 6,A = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea A = set(6, TDAT8); TDAT8 = A; - call wm + call wm m_ea fef8 # SET 7,B = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea B = set(7, TDAT8); TDAT8 = B; - call wm + call wm m_ea fef9 # SET 7,C = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea C = set(7, TDAT8); TDAT8 = C; - call wm + call wm m_ea fefa # SET 7,D = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea D = set(7, TDAT8); TDAT8 = D; - call wm + call wm m_ea fefb # SET 7,E = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea E = set(7, TDAT8); TDAT8 = E; - call wm + call wm m_ea fefc # SET 7,H = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea H = set(7, TDAT8); TDAT8 = H; - call wm + call wm m_ea fefd # SET 7,L = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea L = set(7, TDAT8); TDAT8 = L; - call wm + call wm m_ea fefe # SET 7,(XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea TDAT8 = set(7, TDAT8); - call wm + call wm m_ea feff # SET 7,A = (XY+o) - TADR = m_ea; - call rm_reg + call rm_reg m_ea A = set(7, TDAT8); TDAT8 = A; - call wm + call wm m_ea ########################################################## @@ -3119,8 +2838,8 @@ dd21 # LD IX,w dd22 # LD (w),IX call arg16 - m_ea = TDAT; TADR = m_ea; TDAT = IX; - call wm16 + m_ea = TDAT; TDAT = IX; + call wm16 m_ea WZ = m_ea + 1; dd23 # INC IX @@ -3152,8 +2871,8 @@ dd29 # ADD IX,IX dd2a # LD IX,(w) call arg16 - m_ea = TDAT; TADR = m_ea; - call rm16 + m_ea = TDAT; + call rm16 m_ea IX = TDAT; WZ = m_ea + 1; dd2b # DEC IX @@ -3192,29 +2911,23 @@ dd33 # DB DD dd34 # INC (IX+o) call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm_reg + 5 * call nomreq_addr PC-1 + call rm_reg m_ea inc(TDAT8); - call wm + call wm m_ea dd35 # DEC (IX+o) call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm_reg + 5 * call nomreq_addr PC-1 + call rm_reg m_ea dec(TDAT8); - call wm + call wm m_ea dd36 # LD (IX+o),n call eax call arg - TADR = PC-1; - 2 * call nomreq_addr - TADR = m_ea; - call wm + 2 * call nomreq_addr PC-1 + call wm m_ea dd37 # DB DD illegal_1(); @@ -3277,10 +2990,8 @@ dd45 # LD B,LX dd46 # LD B,(IX+o) call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + 5 * call nomreq_addr PC-1 + call rm m_ea B = TDAT8; dd47 # DB DD @@ -3311,10 +3022,8 @@ dd4d # LD C,LX dd4e # LD C,(IX+o) call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + 5 * call nomreq_addr PC-1 + call rm m_ea C = TDAT8; dd4f # DB DD @@ -3345,10 +3054,8 @@ dd55 # LD D,LX dd56 # LD D,(IX+o) call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + 5 * call nomreq_addr PC-1 + call rm m_ea D = TDAT8; dd57 # DB DD @@ -3379,10 +3086,8 @@ dd5d # LD E,LX dd5e # LD E,(IX+o) call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + 5 * call nomreq_addr PC-1 + call rm m_ea E = TDAT8; dd5f # DB DD @@ -3408,10 +3113,8 @@ dd65 # LD HX,LX dd66 # LD H,(IX+o) call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + 5 * call nomreq_addr PC-1 + call rm m_ea H = TDAT8; dd67 # LD HX,A @@ -3436,10 +3139,8 @@ dd6d # LD LX,LX dd6e # LD L,(IX+o) call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + 5 * call nomreq_addr PC-1 + call rm m_ea L = TDAT8; dd6f # LD LX,A @@ -3447,45 +3148,39 @@ dd6f # LD LX,A dd70 # LD (IX+o),B call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; TDAT8 = B; - call wm + 5 * call nomreq_addr PC-1 + TDAT8 = B; + call wm m_ea dd71 # LD (IX+o),C call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; TDAT8 = C; - call wm + 5 * call nomreq_addr PC-1 + TDAT8 = C; + call wm m_ea dd72 # LD (IX+o),D call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; TDAT8 = D; - call wm + 5 * call nomreq_addr PC-1 + TDAT8 = D; + call wm m_ea dd73 # LD (IX+o),E call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; TDAT8 = E; - call wm + 5 * call nomreq_addr PC-1 + TDAT8 = E; + call wm m_ea dd74 # LD (IX+o),H call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; TDAT8 = H; - call wm + 5 * call nomreq_addr PC-1 + TDAT8 = H; + call wm m_ea dd75 # LD (IX+o),L call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; TDAT8 = L; - call wm + 5 * call nomreq_addr PC-1 + TDAT8 = L; + call wm m_ea dd76 # DB DD illegal_1(); @@ -3493,10 +3188,9 @@ dd76 # DB DD dd77 # LD (IX+o),A call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; TDAT8 = A; - call wm + 5 * call nomreq_addr PC-1 + TDAT8 = A; + call wm m_ea dd78 # DB DD illegal_1(); @@ -3522,10 +3216,8 @@ dd7d # LD A,LX dd7e # LD A,(IX+o) call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + 5 * call nomreq_addr PC-1 + call rm m_ea A = TDAT8; dd7f # DB DD @@ -3556,10 +3248,8 @@ dd85 # ADD A,LX dd86 # ADD A,(IX+o) call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + 5 * call nomreq_addr PC-1 + call rm m_ea add_a(TDAT8); dd87 # DB DD @@ -3590,10 +3280,8 @@ dd8d # ADC A,LX dd8e # ADC A,(IX+o) call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + 5 * call nomreq_addr PC-1 + call rm m_ea adc_a(TDAT8); dd8f # DB DD @@ -3624,10 +3312,8 @@ dd95 # SUB LX dd96 # SUB (IX+o) call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + 5 * call nomreq_addr PC-1 + call rm m_ea sub_a(TDAT8); dd97 # DB DD @@ -3658,10 +3344,8 @@ dd9d # SBC A,LX dd9e # SBC A,(IX+o) call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + 5 * call nomreq_addr PC-1 + call rm m_ea sbc_a(TDAT8); dd9f # DB DD @@ -3692,10 +3376,8 @@ dda5 # AND LX dda6 # AND (IX+o) call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + 5 * call nomreq_addr PC-1 + call rm m_ea and_a(TDAT8); dda7 # DB DD @@ -3726,10 +3408,8 @@ ddad # XOR LX ddae # XOR (IX+o) call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + 5 * call nomreq_addr PC-1 + call rm m_ea xor_a(TDAT8); ddaf # DB DD @@ -3760,10 +3440,8 @@ ddb5 # OR LX ddb6 # OR (IX+o) call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + 5 * call nomreq_addr PC-1 + call rm m_ea or_a(TDAT8); ddb7 # DB DD @@ -3794,10 +3472,8 @@ ddbd # CP LX ddbe # CP (IX+o) call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + 5 * call nomreq_addr PC-1 + call rm m_ea cp(TDAT8); ddbf # DB DD @@ -3851,8 +3527,7 @@ ddca # DB DD ddcb # ** DD CB xx call eax call arg - TADR = PC-1; - 2 * call nomreq_addr + 2 * call nomreq_addr PC-1 call jump_prefixed 0xfe ddcc # DB DD @@ -3948,17 +3623,14 @@ dde2 # DB DD call jump 00e2 dde3 # EX (SP),IX - TDAT = IX; - call ex_sp - IX = TDAT; + call ex_sp IX dde4 # DB DD illegal_1(); call jump 00e4 dde5 # PUSH IX - TDAT = IX; - call push + call push IX dde6 # DB DD illegal_1(); @@ -4207,8 +3879,8 @@ fd21 # LD IY,w fd22 # LD (w),IY call arg16 - m_ea = TDAT; TADR = m_ea; TDAT = IY; - call wm16 + m_ea = TDAT; TDAT = IY; + call wm16 m_ea WZ = m_ea + 1; fd23 # INC IY @@ -4240,8 +3912,8 @@ fd29 # ADD IY,IY fd2a # LD IY,(w) call arg16 - m_ea = TDAT; TADR = m_ea; - call rm16 + m_ea = TDAT; + call rm16 m_ea IY = TDAT; WZ = m_ea + 1; fd2b # DEC IY @@ -4280,29 +3952,23 @@ fd33 # DB FD fd34 # INC (IY+o) call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm_reg + 5 * call nomreq_addr PC-1 + call rm_reg m_ea inc(TDAT8); - call wm + call wm m_ea fd35 # DEC (IY+o) call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm_reg + 5 * call nomreq_addr PC-1 + call rm_reg m_ea dec(TDAT8); - call wm + call wm m_ea fd36 # LD (IY+o),n call eay call arg - TADR = PC-1; - 2 * call nomreq_addr - TADR = m_ea; - call wm + 2 * call nomreq_addr PC-1 + call wm m_ea fd37 # DB FD illegal_1(); @@ -4365,10 +4031,8 @@ fd45 # LD B,LY fd46 # LD B,(IY+o) call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + 5 * call nomreq_addr PC-1 + call rm m_ea B = TDAT8; fd47 # DB FD @@ -4399,10 +4063,8 @@ fd4d # LD C,LY fd4e # LD C,(IY+o) call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + 5 * call nomreq_addr PC-1 + call rm m_ea C = TDAT8; fd4f # DB FD @@ -4433,10 +4095,8 @@ fd55 # LD D,LY fd56 # LD D,(IY+o) call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + 5 * call nomreq_addr PC-1 + call rm m_ea D = TDAT8; fd57 # DB FD @@ -4467,10 +4127,8 @@ fd5d # LD E,LY fd5e # LD E,(IY+o) call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + 5 * call nomreq_addr PC-1 + call rm m_ea E = TDAT8; fd5f # DB FD @@ -4496,10 +4154,8 @@ fd65 # LD HY,LY fd66 # LD H,(IY+o) call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + 5 * call nomreq_addr PC-1 + call rm m_ea H = TDAT8; fd67 # LD HY,A @@ -4524,10 +4180,8 @@ fd6d # LD LY,LY fd6e # LD L,(IY+o) call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + 5 * call nomreq_addr PC-1 + call rm m_ea L = TDAT8; fd6f # LD LY,A @@ -4535,45 +4189,39 @@ fd6f # LD LY,A fd70 # LD (IY+o),B call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; TDAT8 = B; - call wm + 5 * call nomreq_addr PC-1 + TDAT8 = B; + call wm m_ea fd71 # LD (IY+o),C call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; TDAT8 = C; - call wm + 5 * call nomreq_addr PC-1 + TDAT8 = C; + call wm m_ea fd72 # LD (IY+o),D call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; TDAT8 = D; - call wm + 5 * call nomreq_addr PC-1 + TDAT8 = D; + call wm m_ea fd73 # LD (IY+o),E call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; TDAT8 = E; - call wm + 5 * call nomreq_addr PC-1 + TDAT8 = E; + call wm m_ea fd74 # LD (IY+o),H call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; TDAT8 = H; - call wm + 5 * call nomreq_addr PC-1 + TDAT8 = H; + call wm m_ea fd75 # LD (IY+o),L call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; TDAT8 = L; - call wm + 5 * call nomreq_addr PC-1 + TDAT8 = L; + call wm m_ea fd76 # DB FD illegal_1(); @@ -4581,10 +4229,9 @@ fd76 # DB FD fd77 # LD (IY+o),A call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; TDAT8 = A; - call wm + 5 * call nomreq_addr PC-1 + TDAT8 = A; + call wm m_ea fd78 # DB FD illegal_1(); @@ -4610,10 +4257,8 @@ fd7d # LD A,LY fd7e # LD A,(IY+o) call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + 5 * call nomreq_addr PC-1 + call rm m_ea A = TDAT8; fd7f # DB FD @@ -4644,10 +4289,8 @@ fd85 # ADD A,LY fd86 # ADD A,(IY+o) call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + 5 * call nomreq_addr PC-1 + call rm m_ea add_a(TDAT8); fd87 # DB FD @@ -4678,10 +4321,8 @@ fd8d # ADC A,LY fd8e # ADC A,(IY+o) call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + 5 * call nomreq_addr PC-1 + call rm m_ea adc_a(TDAT8); fd8f # DB FD @@ -4712,10 +4353,8 @@ fd95 # SUB LY fd96 # SUB (IY+o) call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + 5 * call nomreq_addr PC-1 + call rm m_ea sub_a(TDAT8); fd97 # DB FD @@ -4746,10 +4385,8 @@ fd9d # SBC A,LY fd9e # SBC A,(IY+o) call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + 5 * call nomreq_addr PC-1 + call rm m_ea sbc_a(TDAT8); fd9f # DB FD @@ -4780,10 +4417,8 @@ fda5 # AND LY fda6 # AND (IY+o) call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + 5 * call nomreq_addr PC-1 + call rm m_ea and_a(TDAT8); fda7 # DB FD @@ -4814,10 +4449,8 @@ fdad # XOR LY fdae # XOR (IY+o) call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + 5 * call nomreq_addr PC-1 + call rm m_ea xor_a(TDAT8); fdaf # DB FD @@ -4848,10 +4481,8 @@ fdb5 # OR LY fdb6 # OR (IY+o) call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + 5 * call nomreq_addr PC-1 + call rm m_ea or_a(TDAT8); fdb7 # DB FD @@ -4882,10 +4513,8 @@ fdbd # CP LY fdbe # CP (IY+o) call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + 5 * call nomreq_addr PC-1 + call rm m_ea cp(TDAT8); fdbf # DB FD @@ -4939,8 +4568,7 @@ fdca # DB FD fdcb # ** FD CB xx call eay call arg - TADR = PC-1; - 2 * call nomreq_addr + 2 * call nomreq_addr PC-1 call jump_prefixed 0xfe fdcc # DB FD @@ -5036,17 +4664,14 @@ fde2 # DB FD call jump 00e2 fde3 # EX (SP),IY - TDAT = IY; - call ex_sp - IY = TDAT; + call ex_sp IY fde4 # DB FD illegal_1(); call jump 00e4 fde5 # PUSH IY - TDAT = IY; - call push + call push IY fde6 # DB FD illegal_1(); @@ -5348,14 +4973,13 @@ ed3f # DB ED illegal_2(); ed40 # IN B,(C) - TADR = BC; - call in - B = TDAT8; set_f((F & CF) | SZP[B]); WZ = TADR + 1; + call in BC + B = TDAT8; set_f((F & CF) | SZP[B]); WZ = BC + 1; ed41 # OUT (C),B - TADR = BC; TDAT8 = B; - call out - WZ = TADR + 1; + TDAT8 = B; + call out BC + WZ = BC + 1; ed42 # SBC HL,BC TDAT = BC; @@ -5363,8 +4987,8 @@ ed42 # SBC HL,BC ed43 # LD (w),BC call arg16 - m_ea = TDAT; TADR = m_ea; TDAT = BC; - call wm16 + m_ea = TDAT; TDAT = BC; + call wm16 m_ea WZ = m_ea + 1; ed44 # NEG @@ -5380,14 +5004,13 @@ ed47 # LD i,A call ld_i_a ed48 # IN C,(C) - TADR = BC; - call in - C = TDAT8; set_f((F & CF) | SZP[C]); WZ = TADR + 1; + call in BC + C = TDAT8; set_f((F & CF) | SZP[C]); WZ = BC + 1; ed49 # OUT (C),C - TADR = BC; TDAT8 = C; - call out - WZ = TADR + 1; + TDAT8 = C; + call out BC + WZ = BC + 1; ed4a # ADC HL,BC TDAT = BC; @@ -5395,8 +5018,8 @@ ed4a # ADC HL,BC ed4b # LD BC,(w) call arg16 - m_ea = TDAT; TADR = m_ea; - call rm16 + m_ea = TDAT; + call rm16 m_ea BC = TDAT; WZ = m_ea + 1; ed4c # NEG @@ -5412,14 +5035,13 @@ ed4f # LD r,A call ld_r_a ed50 # IN D,(C) - TADR = BC; - call in - D = TDAT8; set_f((F & CF) | SZP[D]); WZ = TADR + 1; + call in BC + D = TDAT8; set_f((F & CF) | SZP[D]); WZ = BC + 1; ed51 # OUT (C),D - TADR = BC; TDAT8 = D; - call out - WZ = TADR + 1; + TDAT8 = D; + call out BC + WZ = BC + 1; ed52 # SBC HL,DE TDAT = DE; @@ -5427,8 +5049,8 @@ ed52 # SBC HL,DE ed53 # LD (w),DE call arg16 - m_ea = TDAT; TADR = m_ea; TDAT = DE; - call wm16 + m_ea = TDAT; TDAT = DE; + call wm16 m_ea WZ = m_ea + 1; ed54 # NEG @@ -5444,14 +5066,13 @@ ed57 # LD A,i call ld_a_i ed58 # IN E,(C) - TADR = BC; - call in - E = TDAT8; set_f((F & CF) | SZP[E]); WZ = TADR + 1; + call in BC + E = TDAT8; set_f((F & CF) | SZP[E]); WZ = BC + 1; ed59 # OUT (C),E - TADR = BC; TDAT8 = E; - call out - WZ = TADR + 1; + TDAT8 = E; + call out BC + WZ = BC + 1; ed5a # ADC HL,DE TDAT = DE; @@ -5459,8 +5080,8 @@ ed5a # ADC HL,DE ed5b # LD DE,(w) call arg16 - m_ea = TDAT; TADR = m_ea; - call rm16 + m_ea = TDAT; + call rm16 m_ea DE = TDAT; WZ = m_ea + 1; ed5c # NEG @@ -5476,14 +5097,13 @@ ed5f # LD A,r call ld_a_r ed60 # IN H,(C) - TADR = BC; - call in - H = TDAT8; set_f((F & CF) | SZP[H]); WZ = TADR + 1; + call in BC + H = TDAT8; set_f((F & CF) | SZP[H]); WZ = BC + 1; ed61 # OUT (C),H - TADR = BC; TDAT8 = H; - call out - WZ = TADR + 1; + TDAT8 = H; + call out BC + WZ = BC + 1; ed62 # SBC HL,HL TDAT = HL; @@ -5491,8 +5111,8 @@ ed62 # SBC HL,HL ed63 # LD (w),HL call arg16 - m_ea = TDAT; TADR = m_ea; TDAT = HL; - call wm16 + m_ea = TDAT; TDAT = HL; + call wm16 m_ea WZ = m_ea + 1; ed64 # NEG @@ -5508,14 +5128,13 @@ ed67 # RRD (HL) call rrd ed68 # IN L,(C) - TADR = BC; - call in - L = TDAT8; set_f((F & CF) | SZP[L]); WZ = TADR + 1; + call in BC + L = TDAT8; set_f((F & CF) | SZP[L]); WZ = BC + 1; ed69 # OUT (C),L - TADR = BC; TDAT8 = L; - call out - WZ = TADR + 1; + TDAT8 = L; + call out BC + WZ = BC + 1; ed6a # ADC HL,HL TDAT = HL; @@ -5523,8 +5142,8 @@ ed6a # ADC HL,HL ed6b # LD HL,(w) call arg16 - m_ea = TDAT; TADR = m_ea; - call rm16 + m_ea = TDAT; + call rm16 m_ea HL = TDAT; WZ = m_ea + 1; ed6c # NEG @@ -5540,14 +5159,13 @@ ed6f # RLD (HL) call rld ed70 # IN 0,(C) - TADR = BC; - call in - set_f((F & CF) | SZP[TDAT8]); WZ = TADR + 1; + call in BC + set_f((F & CF) | SZP[TDAT8]); WZ = BC + 1; ed71 # OUT (C),0 - TADR = BC; TDAT8 = 0; - call out - WZ = TADR + 1; + TDAT8 = 0; + call out BC + WZ = BC + 1; ed72 # SBC HL,SP TDAT = SP; @@ -5555,8 +5173,8 @@ ed72 # SBC HL,SP ed73 # LD (w),SP call arg16 - m_ea = TDAT; TADR = m_ea; TDAT = SP; - call wm16 + m_ea = TDAT; TDAT = SP; + call wm16 m_ea WZ = m_ea + 1; ed74 # NEG @@ -5572,14 +5190,13 @@ ed77 # DB ED,77 illegal_2(); ed78 # IN A,(C) - TADR = BC; - call in - A = TDAT8; set_f((F & CF) | SZP[A]); WZ = TADR + 1; + call in BC + A = TDAT8; set_f((F & CF) | SZP[A]); WZ = BC + 1; ed79 # OUT (C),A - TADR = BC; TDAT8 = A; - call out - WZ = TADR + 1; + TDAT8 = A; + call out BC + WZ = BC + 1; ed7a # ADC HL,SP TDAT = SP; @@ -5587,8 +5204,8 @@ ed7a # ADC HL,SP ed7b # LD SP,(w) call arg16 - m_ea = TDAT; TADR = m_ea; - call rm16 + m_ea = TDAT; + call rm16 m_ea SP = TDAT; WZ = m_ea + 1; ed7c # NEG @@ -5998,8 +5615,8 @@ edff # DB ED BC = TDAT; 0002 # LD (BC),A - TADR = BC; TDAT8 = A; - call wm + TDAT8 = A; + call wm BC WZ_L = (BC + 1) & 0xFF; WZ_H = A; 0003 # INC BC @@ -6028,8 +5645,7 @@ edff # DB ED HL = TDAT; 000a # LD A,(BC) - TADR = BC; - call rm + call rm BC A = TDAT8; WZ = BC+1; 000b # DEC BC @@ -6059,8 +5675,8 @@ edff # DB ED DE = TDAT; 0012 # LD (DE),A - TADR = DE; TDAT8 = A; - call wm + TDAT8 = A; + call wm DE WZ_L = (DE + 1) & 0xFF; WZ_H = A; 0013 # INC DE @@ -6089,8 +5705,7 @@ edff # DB ED HL = TDAT; 001a # LD A,(DE) - TADR = DE; - call rm + call rm DE A = TDAT8; WZ = DE + 1; 001b # DEC DE @@ -6120,8 +5735,8 @@ edff # DB ED 0022 # LD (w),HL call arg16 - m_ea = TDAT; TADR = TDAT; TDAT = HL; - call wm16 + m_ea = TDAT; TDAT = HL; + call wm16 m_ea WZ = m_ea + 1; 0023 # INC HL @@ -6152,8 +5767,8 @@ edff # DB ED 002a # LD HL,(w) call arg16 - m_ea = TDAT; TADR = TDAT; - call rm16 + m_ea = TDAT; + call rm16 m_ea HL = TDAT; WZ = m_ea + 1; 002b # DEC HL @@ -6183,8 +5798,8 @@ edff # DB ED 0032 # LD (w),A call arg16 - m_ea = TDAT; TADR = m_ea; TDAT8 = A; - call wm + m_ea = TDAT; TDAT8 = A; + call wm m_ea WZ_L = (m_ea + 1) & 0xFF; WZ_H = A; 0033 # INC SP @@ -6192,21 +5807,18 @@ edff # DB ED SP++; 0034 # INC (HL) - TADR = HL; - call rm_reg + call rm_reg HL inc(TDAT8); - call wm + call wm HL 0035 # DEC (HL) - TADR = HL; - call rm_reg + call rm_reg HL dec(TDAT8); - call wm + call wm HL 0036 # LD (HL),n call arg - TADR = HL; - call wm + call wm HL 0037 # SCF set_f((F & (SF | ZF | PF)) | CF | (((F & Q) | A) & (YF | XF))); @@ -6222,8 +5834,8 @@ edff # DB ED 003a # LD A,(w) call arg16 - m_ea = TDAT; TADR = TDAT; - call rm + m_ea = TDAT; + call rm m_ea A = TDAT8; WZ = m_ea + 1; 003b # DEC SP @@ -6261,8 +5873,7 @@ edff # DB ED B = L; 0046 # LD B,(HL) - TADR = HL; - call rm + call rm HL B = TDAT8; 0047 # LD B,A @@ -6286,8 +5897,7 @@ edff # DB ED C = L; 004e # LD C,(HL) - TADR = HL; - call rm + call rm HL C = TDAT8; 004f # LD C,A @@ -6311,8 +5921,7 @@ edff # DB ED D = L; 0056 # LD D,(HL) - TADR = HL; - call rm + call rm HL D = TDAT8; 0057 # LD D,A @@ -6336,8 +5945,7 @@ edff # DB ED E = L; 005e # LD E,(HL) - TADR = HL; - call rm + call rm HL E = TDAT8; 005f # LD E,A @@ -6361,8 +5969,7 @@ edff # DB ED H = L; 0066 # LD H,(HL) - TADR = HL; - call rm + call rm HL H = TDAT8; 0067 # LD H,A @@ -6386,43 +5993,42 @@ edff # DB ED 006d # LD L,L 006e # LD L,(HL) - TADR = HL; - call rm + call rm HL L = TDAT8; 006f # LD L,A L = A; 0070 # LD (HL),B - TADR = HL; TDAT = B; - call wm + TDAT = B; + call wm HL 0071 # LD (HL),C - TADR = HL; TDAT = C; - call wm + TDAT = C; + call wm HL 0072 # LD (HL),D - TADR = HL; TDAT = D; - call wm + TDAT = D; + call wm HL 0073 # LD (HL),E - TADR = HL; TDAT = E; - call wm + TDAT = E; + call wm HL 0074 # LD (HL),H - TADR = HL; TDAT = H; - call wm + TDAT = H; + call wm HL 0075 # LD (HL),L - TADR = HL; TDAT = L; - call wm + TDAT = L; + call wm HL 0076 # HALT halt(); 0077 # LD (HL),A - TADR = HL; TDAT = A; - call wm + TDAT = A; + call wm HL 0078 # LD A,B A = B; @@ -6443,8 +6049,7 @@ edff # DB ED A = L; 007e # LD A,(HL) - TADR = HL; - call rm + call rm HL A = TDAT8; 007f # LD A,A @@ -6468,8 +6073,7 @@ edff # DB ED add_a(L); 0086 # ADD A,(HL) - TADR = HL; - call rm + call rm HL add_a(TDAT8); 0087 # ADD A,A @@ -6494,8 +6098,7 @@ edff # DB ED adc_a(L); 008e # ADC A,(HL) - TADR = HL; - call rm + call rm HL adc_a(TDAT8); 008f # ADC A,A @@ -6520,8 +6123,7 @@ edff # DB ED sub_a(L); 0096 # SUB (HL) - TADR = HL; - call rm + call rm HL sub_a(TDAT8); 0097 # SUB A @@ -6546,8 +6148,7 @@ edff # DB ED sbc_a(L); 009e # SBC A,(HL) - TADR = HL; - call rm + call rm HL sbc_a(TDAT8); 009f # SBC A,A @@ -6572,8 +6173,7 @@ edff # DB ED and_a(L); 00a6 # AND (HL) - TADR = HL; - call rm + call rm HL and_a(TDAT8); 00a7 # AND A @@ -6598,8 +6198,7 @@ edff # DB ED xor_a(L); 00ae # XOR (HL) - TADR = HL; - call rm + call rm HL xor_a(TDAT8); 00af # XOR A @@ -6624,8 +6223,7 @@ edff # DB ED or_a(L); 00b6 # OR (HL) - TADR = HL; - call rm + call rm HL or_a(TDAT8); 00b7 # OR A @@ -6650,8 +6248,7 @@ edff # DB ED cp(L); 00be # CP (HL) - TADR = HL; - call rm + call rm HL cp(TDAT8); 00bf # CP A @@ -6677,8 +6274,7 @@ edff # DB ED call call_cond 00c5 # PUSH BC - TDAT = BC; - call push + call push BC 00c6 # ADD A,n call arg @@ -6731,17 +6327,17 @@ edff # DB ED 00d3 # OUT (n),A call arg - TADR = TDAT8 | (A << 8); TDAT = A; - call out - WZ_L = ((TADR & 0xff) + 1) & 0xff; WZ_H = A; + TDAT2 = TDAT8 | (A << 8); + TDAT = A; + call out TDAT2 + WZ_L = ((TDAT2 & 0xff) + 1) & 0xff; WZ_H = A; 00d4 # CALL NC,a TDAT8 = !(F & CF); call call_cond 00d5 # PUSH DE - TDAT = DE; - call push + call push DE 00d6 # SUB n call arg @@ -6763,9 +6359,9 @@ edff # DB ED 00db # IN A,(n) call arg - TADR = TDAT8 | (A << 8); - call in - A = TDAT8; WZ = TADR + 1; + TDAT2 = TDAT8 | (A << 8); + call in TDAT2 + A = TDAT8; WZ = TDAT2 + 1; 00dc # CALL C,a TDAT8 = F & CF; @@ -6795,17 +6391,14 @@ edff # DB ED call jp_cond 00e3 # EX HL,(SP) - TDAT = HL; - call ex_sp - HL = TDAT; + call ex_sp HL 00e4 # CALL PO,a TDAT8 = !(F & PF); call call_cond 00e5 # PUSH HL - TDAT = HL; - call push + call push HL 00e6 # AND n call arg @@ -6863,8 +6456,7 @@ edff # DB ED call call_cond 00f5 # PUSH AF - TDAT = AF; - call push + call push AF 00f6 # OR n call arg @@ -7600,10 +7192,9 @@ r800:cb35 # SLL L L = r800_sll(L); r800:cb36 # SLL (HL) - TADR = HL; - call rm_reg + call rm_reg HL TDAT8 = r800_sll(TDAT8); - call wm + call wm HL r800:cb37 # SLL A A = r800_sll(A); @@ -8736,11 +8327,9 @@ r800:00f3 # DI ########################################################## macro ldix { - TADR = HL; - call rm + call rm HL if (TDAT8 != A) { - TADR = DE; - call wm + call wm DE ; } HL++; @@ -8750,11 +8339,9 @@ macro ldix macro lddx { - TADR = HL; - call rm + call rm HL if (TDAT8 != A) { - TADR = DE; - call wm + call wm DE ; } DE++; @@ -8817,15 +8404,14 @@ z80n:ed36 # add bc,** BC += TDAT; z80n:ed8a # push ** - call arg16 - using std::swap; swap(TDAT_H, TDAT_L); - call push + call arg + TDAT_H = TDAT_L; + call arg + call push TDAT z80n:ed90 # outinb - TADR = HL; - call rm - TADR = BC; - call out + call rm HL + call out BC HL++; z80n:ed91 # nextreg *,* @@ -8851,18 +8437,15 @@ z80n:ed95 # setae A = 0x80 >> (E & 7); z80n:ed98 # jp (c) - TADR = BC; - call in + call in BC PC = (PC & 0xc000) + (TDAT8 << 6); z80n:eda4 # ldix call ldix z80n:eda5 # ldws - TADR = HL; - call rm - TADR = DE; - call wm + call rm HL + call wm DE L++; inc(D); @@ -8875,11 +8458,9 @@ z80n:edb4 # ldirx PC -= 2; z80n:edb7 # ldpirx - TADR = (HL & 0xfff8) + (E & 7); - call rm + call rm (HL & 0xfff8) + (E & 7) if (TDAT8 != A) { - TADR = DE; - call wm + call wm DE ; } DE++; diff --git a/src/emu/diexec.cpp b/src/emu/diexec.cpp index 1813dbff611..1cd5266c518 100644 --- a/src/emu/diexec.cpp +++ b/src/emu/diexec.cpp @@ -438,7 +438,7 @@ void device_execute_interface::interface_post_reset() if (m_vblank_interrupt_screen != nullptr) { // get the screen that will trigger the VBLANK - screen_device * screen = device().siblingdevice<screen_device>(m_vblank_interrupt_screen); + screen_device *const screen = device().siblingdevice<screen_device>(m_vblank_interrupt_screen); assert(screen != nullptr); screen->register_vblank_callback(vblank_state_delegate(&device_execute_interface::on_vblank, this)); diff --git a/src/emu/resampler.cpp b/src/emu/resampler.cpp index b95fe80dfba..d319c4c0eb9 100644 --- a/src/emu/resampler.cpp +++ b/src/emu/resampler.cpp @@ -149,7 +149,7 @@ // Having the sum of coefficients being 1 ensures that. -audio_resampler::audio_resampler(u32 fs, u32 ft) +audio_resampler_hq::audio_resampler_hq(u32 fs, u32 ft, float latency, u32 max_order_per_lane, u32 max_lanes) { m_ft = ft; m_fs = fs; @@ -160,13 +160,13 @@ audio_resampler::audio_resampler(u32 fs, u32 ft) m_fsm = ft / gcd; // Compute the per-phase filter length to limit the latency to 5ms and capping it - m_order_per_lane = u32(fs * 0.005 * 2); - if(m_order_per_lane > 400) - m_order_per_lane = 400; + m_order_per_lane = u32(fs * latency * 2); + if(m_order_per_lane > max_order_per_lane) + m_order_per_lane = max_order_per_lane; - // Reduce the number of phases to be less than 200 + // Reduce the number of phases to be less than max_lanes m_phase_shift = 0; - while(((m_fsm - 1) >> m_phase_shift) >= 200) + while(((m_fsm - 1) >> m_phase_shift) >= max_lanes) m_phase_shift ++; m_phases = ((m_fsm - 1) >> m_phase_shift) + 1; @@ -217,7 +217,7 @@ audio_resampler::audio_resampler(u32 fs, u32 ft) m_skip = m_ftm / m_fsm; } -u32 audio_resampler::compute_gcd(u32 fs, u32 ft) +u32 audio_resampler_hq::compute_gcd(u32 fs, u32 ft) { u32 v1 = fs > ft ? fs : ft; u32 v2 = fs > ft ? ft : fs; @@ -229,7 +229,12 @@ u32 audio_resampler::compute_gcd(u32 fs, u32 ft) return v1; } -void audio_resampler::apply(const emu::detail::output_buffer_flat<sample_t> &src, std::vector<sample_t> &dest, u64 dest_sample, u32 srcc, float gain, u32 samples) const +u32 audio_resampler_hq::history_size() const +{ + return m_order_per_lane; +} + +void audio_resampler_hq::apply(const emu::detail::output_buffer_flat<sample_t> &src, std::vector<sample_t> &dest, u64 dest_sample, u32 srcc, float gain, u32 samples) const { u32 seconds = dest_sample / m_ft; u32 dsamp = dest_sample % m_ft; @@ -255,7 +260,7 @@ void audio_resampler::apply(const emu::detail::output_buffer_flat<sample_t> &src } } -void audio_resampler::apply(const emu::detail::output_buffer_interleaved<s16> &src, std::vector<sample_t> &dest, u64 dest_sample, u32 srcc, float gain, u32 samples) const +void audio_resampler_hq::apply(const emu::detail::output_buffer_interleaved<s16> &src, std::vector<sample_t> &dest, u64 dest_sample, u32 srcc, float gain, u32 samples) const { u32 seconds = dest_sample / m_ft; u32 dsamp = dest_sample % m_ft; @@ -287,7 +292,7 @@ void audio_resampler::apply(const emu::detail::output_buffer_interleaved<s16> &s } -void audio_resampler::apply(const emu::detail::output_buffer_flat<sample_t> &src, std::vector<s16> &dest, u32 destc, int dchannels, u64 dest_sample, u32 srcc, float gain, u32 samples) const +void audio_resampler_hq::apply(const emu::detail::output_buffer_flat<sample_t> &src, std::vector<s16> &dest, u32 destc, int dchannels, u64 dest_sample, u32 srcc, float gain, u32 samples) const { u32 seconds = dest_sample / m_ft; u32 dsamp = dest_sample % m_ft; @@ -315,3 +320,120 @@ void audio_resampler::apply(const emu::detail::output_buffer_flat<sample_t> &src } } } + + +// Now for the lo-fi version +// +// We mostly forget about filtering, and just try to do a decent +// interpolation. There's a nice 4-point formula used in yamaha +// devices from around 2000: +// f0(t) = (t - t**3)/6 +// f1(t) = t + (t**2 - t**3)/2 +// +// The polynoms are used with the decimal part 'p' (as in phase) of +// the sample position. The computation from the four samples s0..s3 +// is: +// s = - s0 * f0(1-p) + s1 * f1(1-p) + s2 * f1(p) - s3 * f0(p) +// +// The target sample must be between s1 and s2. +// +// When upsampling, that's enough. When downsampling, it feels like a +// good idea to filter a little with a moving average, dividing the +// source frequency by an integer just big enough to make the final +// source frequency lower. + +// Sample interpolation functions f0 and f1 + +const std::array<std::array<float, 0x1001>, 2> audio_resampler_lofi::interpolation_table = []() { + std::array<std::array<float, 0x1001>, 2> result; + + // The exact way of doing the computations replicate the values + // actually used by the chip (which are very probably a rom, of + // course). + + for(u32 i=1; i != 4096; i++) { + float p = i / 4096.0; + result[0][i] = (p - p*p*p) / 6; + } + for(u32 i=1; i != 2049; i++) { + float p = i / 4096.0; + result[1][i] = p + (p*p - p*p*p) / 2; + } + for(u32 i=2049; i != 4096; i++) + // When interpolating, f1 is added and f0 is subtracted, and the total must be 1 + result[1][i] = 1.0 + result[0][i] + result[0][4096-i] - result[1][4096-i]; + + result[0][ 0] = 0.0; + result[0][0x1000] = 0.0; + result[1][ 0] = 0.0; + result[1][0x1000] = 1.0; + return result; +}(); + +audio_resampler_lofi::audio_resampler_lofi(u32 fs, u32 ft) +{ + m_fs = fs; + m_ft = ft; + + m_source_divide = fs <= ft ? 1 : 1+fs/ft; + m_step = u64(fs) * 0x1000 / ft / m_source_divide; +} + + +u32 audio_resampler_lofi::history_size() const +{ + return 5 * m_source_divide; +} + +void audio_resampler_lofi::apply(const emu::detail::output_buffer_flat<sample_t> &src, std::vector<sample_t> &dest, u64 dest_sample, u32 srcc, float gain, u32 samples) const +{ + u32 seconds = dest_sample / m_ft; + u32 dsamp = dest_sample % m_ft; + u64 ssamp = (u64(dsamp) * m_fs * 0x1000) / m_ft; + u64 ssample = (ssamp >> 12) + u64(m_fs) * seconds; + u32 phase = ssamp & 0xfff; + if(m_source_divide > 1) { + u32 delta = ssample % m_source_divide; + phase = (phase | (delta << 12)) / m_source_divide; + ssample -= delta; + } + + // We're getting 2 samples latency, which is small enough + + ssample -= 4*m_source_divide; + + const sample_t *s = src.ptrs(srcc, ssample - src.sync_sample()); + + std::function<sample_t()> reader; + if(m_source_divide == 1) + reader = [s]() mutable -> sample_t { return *s++; }; + else + reader = [s, count = m_source_divide]() mutable -> sample_t { sample_t sm = 0; for(u32 i=0; i != count; i++) { sm += *s++; } return sm / count; }; + + sample_t s0 = reader(); + sample_t s1 = reader(); + sample_t s2 = reader(); + sample_t s3 = reader(); + + sample_t *d = dest.data(); + for(u32 sample = 0; sample != samples; sample++) { + *d++ = gain * (- s0 * interpolation_table[0][0x1000-phase] + s1 * interpolation_table[1][0x1000-phase] + s2 * interpolation_table[1][phase] - s3 * interpolation_table[0][phase]); + + phase += m_step; + if(phase & 0x1000) { + phase &= 0xfff; + s0 = s1; + s1 = s2; + s2 = s3; + s3 = reader(); + } + } +} + +void audio_resampler_lofi::apply(const emu::detail::output_buffer_interleaved<s16> &src, std::vector<sample_t> &dest, u64 dest_sample, u32 srcc, float gain, u32 samples) const +{ +} + +void audio_resampler_lofi::apply(const emu::detail::output_buffer_flat<sample_t> &src, std::vector<s16> &dest, u32 destc, int dchannels, u64 dest_sample, u32 srcc, float gain, u32 samples) const +{ +} diff --git a/src/emu/resampler.h b/src/emu/resampler.h index c1b2f88f3e9..d0758b5ae7e 100644 --- a/src/emu/resampler.h +++ b/src/emu/resampler.h @@ -15,13 +15,26 @@ class audio_resampler public: using sample_t = sound_stream::sample_t; - audio_resampler(u32 fs, u32 ft); + virtual ~audio_resampler() = default; - u32 history_size() const { return m_order_per_lane; } + virtual u32 history_size() const = 0; - void apply(const emu::detail::output_buffer_flat<sample_t> &src, std::vector<sample_t> &dest, u64 dest_sample, u32 srcc, float gain, u32 samples) const; - void apply(const emu::detail::output_buffer_interleaved<s16> &src, std::vector<sample_t> &dest, u64 dest_sample, u32 srcc, float gain, u32 samples) const; - void apply(const emu::detail::output_buffer_flat<sample_t> &src, std::vector<s16> &dest, u32 destc, int dchannels, u64 dest_sample, u32 srcc, float gain, u32 samples) const; + virtual void apply(const emu::detail::output_buffer_flat<sample_t> &src, std::vector<sample_t> &dest, u64 dest_sample, u32 srcc, float gain, u32 samples) const = 0; + virtual void apply(const emu::detail::output_buffer_interleaved<s16> &src, std::vector<sample_t> &dest, u64 dest_sample, u32 srcc, float gain, u32 samples) const = 0; + virtual void apply(const emu::detail::output_buffer_flat<sample_t> &src, std::vector<s16> &dest, u32 destc, int dchannels, u64 dest_sample, u32 srcc, float gain, u32 samples) const = 0; +}; + +class audio_resampler_hq : public audio_resampler +{ +public: + audio_resampler_hq(u32 fs, u32 ft, float latency, u32 max_order_per_lane, u32 max_lanes); + virtual ~audio_resampler_hq() = default; + + virtual u32 history_size() const override; + + virtual void apply(const emu::detail::output_buffer_flat<sample_t> &src, std::vector<sample_t> &dest, u64 dest_sample, u32 srcc, float gain, u32 samples) const override; + virtual void apply(const emu::detail::output_buffer_interleaved<s16> &src, std::vector<sample_t> &dest, u64 dest_sample, u32 srcc, float gain, u32 samples) const override; + virtual void apply(const emu::detail::output_buffer_flat<sample_t> &src, std::vector<s16> &dest, u32 destc, int dchannels, u64 dest_sample, u32 srcc, float gain, u32 samples) const override; private: u32 m_order_per_lane, m_ftm, m_fsm, m_ft, m_fs, m_delta, m_skip, m_phases, m_phase_shift; @@ -31,5 +44,23 @@ private: static u32 compute_gcd(u32 fs, u32 ft); }; +class audio_resampler_lofi : public audio_resampler +{ +public: + audio_resampler_lofi(u32 fs, u32 ft); + virtual ~audio_resampler_lofi() = default; + + virtual u32 history_size() const override; + + virtual void apply(const emu::detail::output_buffer_flat<sample_t> &src, std::vector<sample_t> &dest, u64 dest_sample, u32 srcc, float gain, u32 samples) const override; + virtual void apply(const emu::detail::output_buffer_interleaved<s16> &src, std::vector<sample_t> &dest, u64 dest_sample, u32 srcc, float gain, u32 samples) const override; + virtual void apply(const emu::detail::output_buffer_flat<sample_t> &src, std::vector<s16> &dest, u32 destc, int dchannels, u64 dest_sample, u32 srcc, float gain, u32 samples) const override; + +private: + static const std::array<std::array<float, 0x1001>, 2> interpolation_table; + u32 m_source_divide, m_fs, m_ft; + u32 m_step; +}; + #endif diff --git a/src/emu/sound.cpp b/src/emu/sound.cpp index 5ff9e86e1ed..dade6ed3479 100644 --- a/src/emu/sound.cpp +++ b/src/emu/sound.cpp @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Aaron Giles +// copyright-holders:O. Galibert, Aaron Giles /*************************************************************************** sound.cpp @@ -23,6 +23,8 @@ #include "osdepend.h" +#include "util/language.h" + #include <algorithm> //************************************************************************** @@ -36,7 +38,7 @@ #define LOG_OSD_STREAMS (1U << 3) #define LOG_ORDER (1U << 4) -#define VERBOSE 0 +#define VERBOSE -1 #include "logmacro.h" @@ -189,7 +191,7 @@ template<typename S> void emu::detail::output_buffer_flat<S>::resample(u32 previ return; auto si = [](attotime time, u32 rate) -> s64 { - return time.m_seconds * rate + ((time.m_attoseconds / 100'000'000) * rate) / 10'000'000'000LL; + return time.m_seconds * rate + ((time.m_attoseconds / 100000000) * rate) / 10000000000LL; }; auto cv = [](u32 source_rate, u32 dest_rate, s64 time) -> std::pair<s64, double> { @@ -657,7 +659,11 @@ sound_manager::sound_manager(running_machine &machine) : m_muted(0), m_nosound_mode(machine.osd().no_sound()), m_unique_id(0), - m_wavfile() + m_wavfile(), + m_resampler_type(RESAMPLER_LOFI), + m_resampler_hq_latency(0.005), + m_resampler_hq_length(400), + m_resampler_hq_phases(200) { // register callbacks machine.configuration().config_register( @@ -2462,14 +2468,62 @@ void sound_manager::streams_update() } //**// Resampler management - const audio_resampler *sound_manager::get_resampler(u32 fs, u32 ft) { auto key = std::make_pair(fs, ft); auto i = m_resamplers.find(key); if(i != m_resamplers.end()) return i->second.get(); - auto *res = new audio_resampler(fs, ft); + audio_resampler *res; + if(m_resampler_type == RESAMPLER_HQ) + res = new audio_resampler_hq(fs, ft, m_resampler_hq_latency, m_resampler_hq_length, m_resampler_hq_phases); + else + res = new audio_resampler_lofi(fs, ft); m_resamplers[key].reset(res); return res; } + +void sound_manager::rebuild_all_resamplers() +{ + m_resamplers.clear(); + + for(auto &stream : m_stream_list) + stream->create_resamplers(); + + for(auto &stream : m_stream_list) + stream->lookup_history_sizes(); +} + +void sound_manager::set_resampler_type(u32 type) +{ + m_resampler_type = type; + rebuild_all_resamplers(); +} + +void sound_manager::set_resampler_hq_latency(double latency) +{ + m_resampler_hq_latency = latency; + rebuild_all_resamplers(); +} + +void sound_manager::set_resampler_hq_length(u32 length) +{ + m_resampler_hq_length = length; + rebuild_all_resamplers(); +} + +void sound_manager::set_resampler_hq_phases(u32 phases) +{ + m_resampler_hq_phases = phases; + rebuild_all_resamplers(); +} + +const char *sound_manager::resampler_type_names(u32 type) const +{ + using util::lang_translate; + + if(type == RESAMPLER_HQ) + return _("HQ"); + else + return _("LoFi"); +} diff --git a/src/emu/sound.h b/src/emu/sound.h index 8039948362b..6d699dbb8d9 100644 --- a/src/emu/sound.h +++ b/src/emu/sound.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Aaron Giles +// copyright-holders:O. Galibert, Aaron Giles /*************************************************************************** sound.h @@ -379,6 +379,11 @@ class sound_manager public: using sample_t = sound_stream::sample_t; + enum { + RESAMPLER_LOFI, + RESAMPLER_HQ + }; + struct mapping { struct node_mapping { u32 m_node; @@ -465,6 +470,18 @@ public: void mapping_update(); + const char *resampler_type_names(u32 type) const; + + u32 resampler_type() const { return m_resampler_type; } + double resampler_hq_latency() const { return m_resampler_hq_latency; } + u32 resampler_hq_length() const { return m_resampler_hq_length; } + u32 resampler_hq_phases() const { return m_resampler_hq_phases; } + + void set_resampler_type(u32 type); + void set_resampler_hq_latency(double latency); + void set_resampler_hq_length(u32 length); + void set_resampler_hq_phases(u32 phases); + private: struct effect_step { std::unique_ptr<audio_effect> m_effect; @@ -583,7 +600,7 @@ private: void update_osd_streams(); void update_osd_input(); void speakers_update(attotime endtime); - + void rebuild_all_resamplers(); void run_effects(); u64 rate_and_time_to_index(attotime time, u32 sample_rate) const; @@ -642,6 +659,11 @@ private: std::vector<std::unique_ptr<sound_stream>> m_stream_list; // list of streams std::vector<sound_stream *> m_ordered_streams; // Streams in update order u32 m_outputs_count; + + // resampler data + u32 m_resampler_type; + double m_resampler_hq_latency; + u32 m_resampler_hq_length, m_resampler_hq_phases; }; diff --git a/src/frontend/mame/ui/audioeffects.cpp b/src/frontend/mame/ui/audioeffects.cpp index 6ac84e22954..750ef69815b 100644 --- a/src/frontend/mame/ui/audioeffects.cpp +++ b/src/frontend/mame/ui/audioeffects.cpp @@ -32,9 +32,64 @@ menu_audio_effects::~menu_audio_effects() { } +double menu_audio_effects::change_f(const double *table, double value, int change) +{ + u32 bi = 0; + double dt = 1e300; + u32 index; + for(index = 0; table[index]; index++) { + double d1 = value - table[index]; + if(d1 < 0) + d1 = -d1; + if(d1 < dt) { + dt = d1; + bi = index; + } + } + if((change != -1 || bi != 0) && (change != 1 || bi != index-1)) + bi += change; + return table[bi]; +} + +u32 menu_audio_effects::change_u32(const u32 *table, u32 value, int change) +{ + u32 bi = 0; + s32 dt = 2e9; + u32 index; + for(index = 0; table[index]; index++) { + s32 d1 = value - table[index]; + if(d1 < 0) + d1 = -d1; + if(d1 < dt) { + dt = d1; + bi = index; + } + } + if((change != -1 || bi != 0) && (change != 1 || bi != index-1)) + bi += change; + return table[bi]; +} + bool menu_audio_effects::handle(event const *ev) { - if(ev && (ev->iptkey == IPT_UI_SELECT)) { + static const double latencies[] = { + 0.0005, 0.0010, 0.0025, 0.0050, 0.0100, 0.0250, 0.0500, 0 + }; + + static const u32 lengths[] = { + 10, 20, 30, 40, 50, 75, 100, 200, 300, 400, 500, 0 + }; + + static const u32 phases[] = { + 10, 20, 30, 40, 50, 75, 100, 200, 300, 400, 500, 1000, 0 + }; + + + if(!ev) + return false; + + switch(ev->iptkey) { + case IPT_UI_SELECT: { u16 chain = (uintptr_t(ev->itemref)) >> 16; u16 entry = (uintptr_t(ev->itemref)) & 0xffff; audio_effect *eff = chain == 0xffff ? machine().sound().default_effect_chain()[entry] : machine().sound().effect_chain(chain)[entry]; @@ -50,10 +105,115 @@ bool menu_audio_effects::handle(event const *ev) return true; } + case IPT_UI_LEFT: { + switch(uintptr_t(ev->itemref)) { + case RS_TYPE: + machine().sound().set_resampler_type(sound_manager::RESAMPLER_LOFI); + reset(reset_options::REMEMBER_POSITION); + return true; + + case RS_LATENCY: + machine().sound().set_resampler_hq_latency(change_f(latencies, machine().sound().resampler_hq_latency(), -1)); + reset(reset_options::REMEMBER_POSITION); + return true; + + case RS_LENGTH: + machine().sound().set_resampler_hq_length(change_u32(lengths, machine().sound().resampler_hq_length(), -1)); + reset(reset_options::REMEMBER_POSITION); + return true; + + case RS_PHASES: + machine().sound().set_resampler_hq_phases(change_u32(phases, machine().sound().resampler_hq_phases(), -1)); + reset(reset_options::REMEMBER_POSITION); + return true; + } + break; + } + + case IPT_UI_RIGHT: { + switch(uintptr_t(ev->itemref)) { + case RS_TYPE: + machine().sound().set_resampler_type(sound_manager::RESAMPLER_HQ); + reset(reset_options::REMEMBER_POSITION); + return true; + + case RS_LATENCY: + machine().sound().set_resampler_hq_latency(change_f(latencies, machine().sound().resampler_hq_latency(), 1)); + reset(reset_options::REMEMBER_POSITION); + return true; + + case RS_LENGTH: + machine().sound().set_resampler_hq_length(change_u32(lengths, machine().sound().resampler_hq_length(), 1)); + reset(reset_options::REMEMBER_POSITION); + return true; + + case RS_PHASES: + machine().sound().set_resampler_hq_phases(change_u32(phases, machine().sound().resampler_hq_phases(), 1)); + reset(reset_options::REMEMBER_POSITION); + return true; + } + break; + } + } + return false; } +std::string menu_audio_effects::format_lat(double latency) +{ + return util::string_format("%3.1fms", 1000*latency); +} + +std::string menu_audio_effects::format_u32(u32 val) +{ + return util::string_format("%u", val); +} + +u32 menu_audio_effects::flag_type() const +{ + u32 flag = 0; + u32 type = machine().sound().resampler_type(); + if(type != sound_manager::RESAMPLER_LOFI) + flag |= FLAG_LEFT_ARROW; + if(type != sound_manager::RESAMPLER_HQ) + flag |= FLAG_RIGHT_ARROW; + return flag; +} + +u32 menu_audio_effects::flag_lat() const +{ + u32 flag = 0; + double latency = machine().sound().resampler_hq_latency(); + if(latency > 0.0005) + flag |= FLAG_LEFT_ARROW; + if(latency < 0.0500) + flag |= FLAG_RIGHT_ARROW; + return flag; +} + +u32 menu_audio_effects::flag_length() const +{ + u32 flag = 0; + double latency = machine().sound().resampler_hq_length(); + if(latency > 10) + flag |= FLAG_LEFT_ARROW; + if(latency < 500) + flag |= FLAG_RIGHT_ARROW; + return flag; +} + +u32 menu_audio_effects::flag_phases() const +{ + u32 flag = 0; + double latency = machine().sound().resampler_hq_phases(); + if(latency > 10) + flag |= FLAG_LEFT_ARROW; + if(latency < 1000) + flag |= FLAG_RIGHT_ARROW; + return flag; +} + void menu_audio_effects::populate() { auto &sound = machine().sound(); @@ -68,6 +228,11 @@ void menu_audio_effects::populate() auto eff = sound.default_effect_chain(); for(u32 e = 0; e != eff.size(); e++) item_append(_(audio_effect::effect_names[eff[e]->type()]), 0, (void *)intptr_t((0xffff << 16) | e)); + item_append(_("Resampler"), FLAG_UI_HEADING | FLAG_DISABLE, nullptr); + item_append(_("Type"), sound.resampler_type_names(sound.resampler_type()), flag_type(), (void *)RS_TYPE); + item_append(_("HQ latency"), format_lat(sound.resampler_hq_latency()), flag_lat(), (void *)RS_LATENCY); + item_append(_("HQ filter max size"), format_u32(sound.resampler_hq_length()), flag_length(), (void *)RS_LENGTH); + item_append(_("HQ filter max phases"), format_u32(sound.resampler_hq_phases()), flag_phases(), (void *)RS_PHASES); item_append(menu_item_type::SEPARATOR); } diff --git a/src/frontend/mame/ui/audioeffects.h b/src/frontend/mame/ui/audioeffects.h index 1ee15da82f9..f61d82fe825 100644 --- a/src/frontend/mame/ui/audioeffects.h +++ b/src/frontend/mame/ui/audioeffects.h @@ -31,8 +31,21 @@ protected: virtual void menu_deactivated() override; private: + enum { RS_TYPE, RS_LATENCY, RS_LENGTH, RS_PHASES }; + virtual void populate() override; virtual bool handle(event const *ev) override; + + u32 flag_type() const; + u32 flag_lat() const; + u32 flag_length() const; + u32 flag_phases() const; + + static double change_f(const double *table, double value, int change); + static u32 change_u32(const u32 *table, u32 value, int change); + + static std::string format_lat(double latency); + static std::string format_u32(u32 val); }; } // namespace ui diff --git a/src/mame/act/victor9k.cpp b/src/mame/act/victor9k.cpp index 87299548c54..cfcc84f3672 100644 --- a/src/mame/act/victor9k.cpp +++ b/src/mame/act/victor9k.cpp @@ -102,6 +102,7 @@ public: m_maincpu(*this, I8088_TAG), m_ieee488(*this, IEEE488_TAG), m_pic(*this, I8259A_TAG), + m_pit(*this, I8253_TAG), m_upd7201(*this, UPD7201_TAG), m_ssda(*this, MC6852_TAG), m_via1(*this, M6522_1_TAG), @@ -138,6 +139,7 @@ private: required_device<cpu_device> m_maincpu; required_device<ieee488_device> m_ieee488; required_device<pic8259_device> m_pic; + required_device<pit8253_device> m_pit; required_device<upd7201_device> m_upd7201; required_device<mc6852_device> m_ssda; required_device<via6522_device> m_via1; @@ -188,9 +190,6 @@ private: MC6845_UPDATE_ROW( crtc_update_row ); MC6845_BEGIN_UPDATE( crtc_begin_update ); - void mux_serial_b_w(int state); - void mux_serial_a_w(int state); - void victor9k_palette(palette_device &palette) const; // video state @@ -228,7 +227,7 @@ void victor9k_state::victor9k_mem(address_map &map) map(0x00000, 0x1ffff).ram(); map(0x20000, 0xdffff).noprw(); map(0xe0000, 0xe0001).mirror(0x7f00).rw(m_pic, FUNC(pic8259_device::read), FUNC(pic8259_device::write)); - map(0xe0020, 0xe0023).mirror(0x7f00).rw(I8253_TAG, FUNC(pit8253_device::read), FUNC(pit8253_device::write)); + map(0xe0020, 0xe0023).mirror(0x7f00).rw(m_pit, FUNC(pit8253_device::read), FUNC(pit8253_device::write)); map(0xe0040, 0xe0043).mirror(0x7f00).rw(m_upd7201, FUNC(upd7201_device::cd_ba_r), FUNC(upd7201_device::cd_ba_w)); map(0xe8000, 0xe8000).mirror(0x7f00).rw(m_crtc, FUNC(mc6845_device::status_r), FUNC(mc6845_device::address_w)); map(0xe8001, 0xe8001).mirror(0x7f00).rw(m_crtc, FUNC(mc6845_device::register_r), FUNC(mc6845_device::register_w)); @@ -358,14 +357,6 @@ void victor9k_state::vert_w(int state) m_pic->ir7_w(state); } -void victor9k_state::mux_serial_b_w(int state) -{ -} - -void victor9k_state::mux_serial_a_w(int state) -{ -} - //------------------------------------------------- // PIC8259 //------------------------------------------------- @@ -770,13 +761,15 @@ void victor9k_state::victor9k(machine_config &config) PIC8259(config, m_pic, 0); m_pic->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); - pit8253_device &pit(PIT8253(config, I8253_TAG, 0)); - pit.set_clk<0>(2500000); - pit.out_handler<0>().set(FUNC(victor9k_state::mux_serial_b_w)); - pit.set_clk<1>(2500000); - pit.out_handler<1>().set(FUNC(victor9k_state::mux_serial_a_w)); - pit.set_clk<2>(100000); - pit.out_handler<2>().set(I8259A_TAG, FUNC(pic8259_device::ir2_w)); + PIT8253(config, m_pit, 0); + m_pit->set_clk<0>(15_MHz_XTAL / 12); + m_pit->out_handler<0>().set(m_upd7201, FUNC(upd7201_device::rxca_w)); + m_pit->out_handler<0>().append(m_upd7201, FUNC(upd7201_device::txca_w)); + m_pit->set_clk<1>(15_MHz_XTAL / 12); + m_pit->out_handler<1>().set(m_upd7201, FUNC(upd7201_device::rxcb_w)); + m_pit->out_handler<1>().append(m_upd7201, FUNC(upd7201_device::txcb_w)); + m_pit->set_clk<2>(125000); + m_pit->out_handler<2>().set(I8259A_TAG, FUNC(pic8259_device::ir2_w)); UPD7201(config, m_upd7201, 15_MHz_XTAL / 6); m_upd7201->out_txda_callback().set(RS232_A_TAG, FUNC(rs232_port_device::write_txd)); diff --git a/src/mame/bmc/koftball.cpp b/src/mame/bmc/koftball.cpp index a29413b5391..c986aa05b91 100644 --- a/src/mame/bmc/koftball.cpp +++ b/src/mame/bmc/koftball.cpp @@ -35,6 +35,30 @@ ft5_v6_c2.u60 | Graphics ft5_v6_c3.u61 | ft5_v6_c4.u58 / + +koftball has a full set of soft settings accessible from the bookeeping menu: + +English translation Default Chinese + +odds adjustment 機率調整 +five of a kind boost 0 五梅加强 +royal flush boost 0 同花大順加强 +straight flush boost 0 同花順加强 +four of a kind boost 0 四梅加强 + 0 小牌加强 +odds 98.5 機率 +double up odds 98 比倍 + +system settings 系統設定 +minimum bet to win jackpot 30 中彩金最小押分 +payout unit 100 退分單位 +maximum bet 100 押分上限 +bet unit 2 押分單位 +minimum bet 20 最小押分 +key-in unit 200 上分單位 +key-in limit 5000 上分上限 +credit limit 50000 得分上限 + */ #include "emu.h" @@ -111,7 +135,8 @@ private: u8 m_pixpal = 0; void irq_ack_w(u8 data); - void outputs_w(u8 data); + void koftball_outputs_w(u8 data); + void kaimenhu_outputs_w(u8 data); u16 random_number_r(); u16 prot_r(); u16 kaimenhu_prot_r(); @@ -125,9 +150,10 @@ private: u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); TIMER_DEVICE_CALLBACK_MEMBER(interrupt); + + void koftball_mem(address_map &map) ATTR_COLD; void jxzh_mem(address_map &map) ATTR_COLD; void kaimenhu_mem(address_map &map) ATTR_COLD; - void koftball_mem(address_map &map) ATTR_COLD; void ramdac_map(address_map &map) ATTR_COLD; }; @@ -300,7 +326,15 @@ void koftball_state::irq_ack_w(u8 data) m_maincpu->set_input_line(i, CLEAR_LINE); } -void koftball_state::outputs_w(u8 data) +void koftball_state::koftball_outputs_w(u8 data) +{ + machine().bookkeeping().coin_counter_w(1, BIT(data, 0)); // credits paid out by key-out + machine().bookkeeping().coin_counter_w(0, BIT(data, 1)); // credits in + // bit 3 always set? + // bit 7 always set? +} + +void koftball_state::kaimenhu_outputs_w(u8 data) { m_hopper->motor_w(BIT(data, 0)); machine().bookkeeping().coin_counter_w(0, BIT(data, 1)); // credits in @@ -339,7 +373,7 @@ void koftball_state::koftball_mem(address_map &map) map(0x2dc000, 0x2dc000).rw("oki", FUNC(okim6295_device::read), FUNC(okim6295_device::write)); map(0x2f0000, 0x2f0003).portr("INPUTS"); - map(0x300000, 0x300001).nopw(); + map(0x300001, 0x300001).w(FUNC(koftball_state::koftball_outputs_w)); map(0x320000, 0x320000).lw8(NAME([this] (u8 data) { m_gfx_ctrl = data; LOGGFX("GFX ctrl $320000 (layer enable) %02x\n", data); })); map(0x340000, 0x340001).r(FUNC(koftball_state::prot_r)); map(0x360000, 0x360001).w(FUNC(koftball_state::prot_w)); @@ -375,7 +409,7 @@ void koftball_state::jxzh_mem(address_map &map) map(0x2dc000, 0x2dc000).rw("oki", FUNC(okim6295_device::read), FUNC(okim6295_device::write)); map(0x2f0000, 0x2f0001).portr("INPUTS"); - map(0x300001, 0x300001).w(FUNC(koftball_state::outputs_w)); + map(0x300001, 0x300001).w(FUNC(koftball_state::kaimenhu_outputs_w)); map(0x320000, 0x320000).lw8(NAME([this] (u8 data) { m_gfx_ctrl = data; LOGGFX("GFX ctrl $320000 (layer enable) %02x\n", data); })); map(0x340000, 0x340001).r(FUNC(koftball_state::prot_r)); map(0x360000, 0x360001).w(FUNC(koftball_state::prot_w)); @@ -399,71 +433,71 @@ static INPUT_PORTS_START( koftball ) PORT_START("INPUTS") PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) // also decrease in sound test - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) // also increase in sound test - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) // Decrease in settings menus + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) // Down in settings menus + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) // Up in settings menus + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) // Increase in settings menus PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) + PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) // Default in settings menus PORT_SERVICE_NO_TOGGLE( 0x1000, IP_ACTIVE_LOW ) // test mode enter PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) PORT_START("DSW") - PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:!8") - PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:!7") - PORT_DIPSETTING( 0x0002, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:!6") - PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:!5") - PORT_DIPSETTING( 0x0008, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:!4") - PORT_DIPSETTING( 0x0010, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:!3") - PORT_DIPSETTING( 0x0020, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:!2") - PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:!1") - PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:!8") - PORT_DIPSETTING( 0x0100, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:!7") - PORT_DIPSETTING( 0x0200, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:!6") - PORT_DIPSETTING( 0x0400, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:!5") - PORT_DIPSETTING( 0x0800, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:!4") - PORT_DIPSETTING( 0x1000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:!3") - PORT_DIPSETTING( 0x2000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:!2") - PORT_DIPSETTING( 0x4000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x8000, 0x0000, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:!1") - PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0001, 0x0001, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW1:8") + PORT_DIPSETTING( 0x0001, DEF_STR(Off) ) + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) + PORT_DIPNAME( 0x0002, 0x0002, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW1:7") + PORT_DIPSETTING( 0x0002, DEF_STR(Off) ) + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) + PORT_DIPNAME( 0x0004, 0x0004, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW1:6") + PORT_DIPSETTING( 0x0004, DEF_STR(Off) ) + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) + PORT_DIPNAME( 0x0008, 0x0008, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW1:5") + PORT_DIPSETTING( 0x0008, DEF_STR(Off) ) + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) + PORT_DIPNAME( 0x0010, 0x0010, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW1:4") + PORT_DIPSETTING( 0x0010, DEF_STR(Off) ) + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) + PORT_DIPNAME( 0x0020, 0x0020, "Show Spend" ) PORT_DIPLOCATION("SW1:3") // shows the amount you've spent as well above current credits when on + PORT_DIPSETTING( 0x0020, DEF_STR(Off) ) + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) + PORT_DIPNAME( 0x0040, 0x0040, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW1:2") + PORT_DIPSETTING( 0x0040, DEF_STR(Off) ) + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) + PORT_DIPNAME( 0x0080, 0x0080, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW1:1") + PORT_DIPSETTING( 0x0080, DEF_STR(Off) ) + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) + PORT_DIPNAME( 0x0100, 0x0100, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW2:8") + PORT_DIPSETTING( 0x0100, DEF_STR(Off) ) + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) + PORT_DIPNAME( 0x0200, 0x0200, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW2:7") + PORT_DIPSETTING( 0x0200, DEF_STR(Off) ) + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) + PORT_DIPNAME( 0x0400, 0x0400, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW2:6") + PORT_DIPSETTING( 0x0400, DEF_STR(Off) ) + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) + PORT_DIPNAME( 0x0800, 0x0800, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW2:5") + PORT_DIPSETTING( 0x0800, DEF_STR(Off) ) + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) + PORT_DIPNAME( 0x1000, 0x1000, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW2:4") + PORT_DIPSETTING( 0x1000, DEF_STR(Off) ) + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) + PORT_DIPNAME( 0x2000, 0x2000, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW2:3") + PORT_DIPSETTING( 0x2000, DEF_STR(Off) ) + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) + PORT_DIPNAME( 0x4000, 0x4000, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW2:2") + PORT_DIPSETTING( 0x4000, DEF_STR(Off) ) + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) + PORT_DIPNAME( 0x8000, 0x0000, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("SW2:1") + PORT_DIPSETTING( 0x8000, DEF_STR(Off) ) + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) INPUT_PORTS_END static INPUT_PORTS_START( kaimenhu ) @@ -632,6 +666,7 @@ void koftball_state::kaimenhu(machine_config &config) } +// 足球王 (Zúqiú Wáng), BMC 1995 ROM_START( koftball ) ROM_REGION( 0x20000, "maincpu", 0 ) // 68000 Code ROM_LOAD16_BYTE( "ft5_v16_c6.u15", 0x00000, 0x10000, CRC(5e1784a5) SHA1(5690d315500fb533b12b598cb0a51bd1eadd0505) ) @@ -769,6 +804,6 @@ void koftball_state::init_koftball() } // anonymous namespace -GAME( 1995, koftball, 0, koftball, koftball, koftball_state, init_koftball, ROT0, "BMC", "King of Football", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) -GAME( 1996, jxzh, 0, jxzh, jxzh, koftball_state, empty_init, ROT0, "BMC", "Jinxiu Zhonghua", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) -GAME( 1996, kaimenhu, jxzh, kaimenhu, kaimenhu, koftball_state, empty_init, ROT0, "BMC", "Kaimen Hu", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) +GAME( 1995, koftball, 0, koftball, koftball, koftball_state, init_koftball, ROT0, "BMC", "Zuqiu Wang - King of Football", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) +GAME( 1996, jxzh, 0, jxzh, jxzh, koftball_state, empty_init, ROT0, "BMC", "Jinxiu Zhonghua", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) +GAME( 1996, kaimenhu, jxzh, kaimenhu, kaimenhu, koftball_state, empty_init, ROT0, "BMC", "Kaimen Hu", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/capcom/cps2.cpp b/src/mame/capcom/cps2.cpp index 13e356aba0e..44c61e0a4e4 100644 --- a/src/mame/capcom/cps2.cpp +++ b/src/mame/capcom/cps2.cpp @@ -2891,6 +2891,30 @@ ROM_START( choko ) ROM_LOAD( "choko.key", 0x000000, 0x000014, CRC(08505e8b) SHA1(5c481ffaa93faec57d0b80b678c8c0cca1a699c0) ) ROM_END +ROM_START( chokop ) + ROM_REGION( CODE_SIZE, "maincpu", 0 ) // 68000 code + ROM_LOAD16_WORD_SWAP( "tkojp_03.bin", 0x000000, 0x80000, CRC(4d857f39) SHA1(bc941e8333889345da58f20370e758d4a15f587f) ) + ROM_LOAD16_WORD_SWAP( "tkojp_04.bin", 0x080000, 0x80000, CRC(137afb29) SHA1(a020b5f2d8cdcd9d6c8302f1535a3502297a55c2) ) + + ROM_REGION( 0x1000000, "gfx", 0 ) + ROM_FILL( 0x000000, 0x800000, 0x00 ) + ROM_LOAD64_WORD( "tko_14.bin", 0x800000, 0x200000, CRC(336e8aa2) SHA1(bebe4f56bcd96d573a4fa0e887b8b9aaabff58eb) ) + ROM_LOAD64_WORD( "tko_16.bin", 0x800002, 0x200000, CRC(e8429b54) SHA1(9833db4c6378f1f04d1747a0daa268503bc7cc5e) ) + ROM_LOAD64_WORD( "tko_18.bin", 0x800004, 0x200000, CRC(62092fbd) SHA1(293abb3ab4f43323ea4b11a1786532549bcac8e1) ) + ROM_LOAD64_WORD( "tko_20.bin", 0x800006, 0x200000, CRC(b468a666) SHA1(86c228152ae778ab8459e813a80c67e7e1eee80e) ) + + ROM_REGION(QSOUND_SIZE, "audiocpu", 0 ) // 64k for the audio CPU (+banks) + ROM_LOAD( "tko_01.bin", 0x00000, 0x08000, CRC(6eda50c2) SHA1(7e67c104094a3ced8b3fdd81f52ee42483b30fc5) ) + ROM_CONTINUE( 0x10000, 0x18000 ) + + ROM_REGION( 0x300000, "qsound", 0 ) // QSound samples + ROM_LOAD16_WORD_SWAP( "tko_11.bin", 0x000000, 0x200000, CRC(ca7179b1) SHA1(98d0c9d8766843b289d49ccae7083b262adfc83a) ) + ROM_LOAD16_WORD_SWAP( "tko_12.bin", 0x200000, 0x100000, CRC(83a4e635) SHA1(933d02264ce922fb12a2c08b8c06167c75fe2241) ) + + ROM_REGION( 0x20, "key", 0 ) + ROM_LOAD( "phoenix.key", 0x000000, 0x000014, CRC(2cf772b0) SHA1(eff33c65a4f3862c231f9e4d6fefa7b34398dbf2) ) +ROM_END + ROM_START( csclub ) ROM_REGION( CODE_SIZE, "maincpu", 0 ) // 68000 code ROM_LOAD16_WORD_SWAP( "csce.03a", 0x000000, 0x80000, CRC(824082be) SHA1(a44e7e17d73e089b4e7784317f2387d135d01482) ) @@ -6691,6 +6715,35 @@ ROM_START( pzloop2jr1 ) ROM_LOAD( "pzloop2.key", 0x000000, 0x000014, CRC(ae13be78) SHA1(5c715f0ef1e0664027faa6c2a7f0f878462cb7ae) ) ROM_END +ROM_START( pzloop2jp ) + ROM_REGION( CODE_SIZE, "maincpu", 0 ) // 68000 code + ROM_LOAD16_WORD_SWAP( "pl2j_03.bin", 0x000000, 0x80000, CRC(e9f904c3) SHA1(544fdcf9ca121d34b20108b459ab2aba6f225210) ) + ROM_LOAD16_WORD_SWAP( "pl2j_04.bin", 0x080000, 0x80000, CRC(61c7c18f) SHA1(45c889ca68357604cec5426bb76ca83c72c3a381) ) + ROM_LOAD16_WORD_SWAP( "pl2j_05.bin", 0x100000, 0x80000, CRC(ee6da97c) SHA1(ac098327b58b5d84d6df61d076d1030ae4cf492d) ) + ROM_LOAD16_WORD_SWAP( "pl2j_06.bin", 0x180000, 0x80000, CRC(97e1c3ac) SHA1(70e590e6897a6e3eabaf2190c178da5f72439b0f) ) + + ROM_REGION( 0x1000000, "gfx", 0 ) + ROM_LOAD64_WORD( "pl2-13m.bin", 0x0000000, 0x200000, CRC(5f3b5f91) SHA1(ad2a27bbbf5a903df6e2e583e5b374baa19ae891) ) + ROM_LOAD64_WORD( "pl2-15m.bin", 0x0000002, 0x200000, CRC(3702f309) SHA1(72b95a87405c04f322afbe24d1f32b5714e0c2b3) ) + ROM_LOAD64_WORD( "pl2-17m.bin", 0x0000004, 0x200000, CRC(62d3fce9) SHA1(b80e0c4ad6c889cecdfa6166b5eb0f432614f37b) ) + ROM_LOAD64_WORD( "pl2-19m.bin", 0x0000006, 0x200000, CRC(6dcbd8ce) SHA1(eddb5638f159d3d77262ffb1367ddbe9ee2c447b) ) + ROM_LOAD64_WORD( "pl2-14m.bin", 0x0800000, 0x200000, CRC(2e22e71a) SHA1(6cc1b72d4323eccc8cdf2deee3668c38e1b356c4) ) + ROM_LOAD64_WORD( "pl2-16m.bin", 0x0800002, 0x200000, CRC(38090022) SHA1(4db7ea3f75da31d32e1c94f512d89ce51c90a122) ) + ROM_LOAD64_WORD( "pl2-18m.bin", 0x0800004, 0x200000, CRC(33afdd44) SHA1(1ea971bc2551dcdfe2849c44a373bcad6915d02d) ) + ROM_LOAD64_WORD( "pl2-20m.bin", 0x0800006, 0x200000, CRC(d4ae0278) SHA1(f25fd5b6f079194b0bffabd3d9e63f023bca59b3) ) + + ROM_REGION( QSOUND_SIZE, "audiocpu", 0 ) // 64k for the audio CPU (+banks) + ROM_LOAD( "pl2_01.bin", 0x00000, 0x08000, CRC(35697569) SHA1(13718923cffb9ec53cef9e22d8875370b5f3dd74) ) + ROM_CONTINUE( 0x10000, 0x18000 ) + + ROM_REGION( 0x400000, "qsound", 0 ) // QSound samples + ROM_LOAD16_WORD_SWAP( "pl2-11m.bin", 0x000000, 0x200000, CRC(85d8fbe8) SHA1(c19d5e9084d07e610379b6e1b6be7bdf0b9b7f7f) ) // ROM on a SIMM + ROM_LOAD16_WORD_SWAP( "pl2-12m.bin", 0x200000, 0x200000, CRC(1ed62584) SHA1(28411f610f48cca6424a2d53e2a4ac691e826317) ) // ROM on a SIMM + + ROM_REGION( 0x20, "key", 0 ) + ROM_LOAD( "phoenix.key", 0x000000, 0x000014, CRC(2cf772b0) SHA1(eff33c65a4f3862c231f9e4d6fefa7b34398dbf2) ) +ROM_END + ROM_START( qndream ) ROM_REGION(CODE_SIZE, "maincpu", 0 ) // 68000 code ROM_LOAD16_WORD_SWAP( "tqzj.03a", 0x000000, 0x80000, CRC(7acf3e30) SHA1(5e2a697f98185731afc4130286a2699033dd02af) ) @@ -12848,7 +12901,9 @@ GAME( 2000, mpanga, mpang, cps2, cps2_2p1b, cps2_state, init_cps2, RO GAME( 2001, pzloop2, 0, cps2, pzloop2, cps2_state, init_pzloop2, ROT0, "Mitchell (Capcom license)", "Puzz Loop 2 (Europe 010302)", MACHINE_SUPPORTS_SAVE ) GAME( 2001, pzloop2j, pzloop2, cps2, pzloop2, cps2_state, init_pzloop2, ROT0, "Mitchell (Capcom license)", "Puzz Loop 2 (Japan 010226)", MACHINE_SUPPORTS_SAVE ) GAME( 2001, pzloop2jr1, pzloop2, cps2, pzloop2, cps2_state, init_pzloop2, ROT0, "Mitchell (Capcom license)", "Puzz Loop 2 (Japan 010205)", MACHINE_SUPPORTS_SAVE ) +GAME( 2001, pzloop2jp, pzloop2, dead_cps2, pzloop2,cps2_state, init_pzloop2,ROT0, "Mitchell (Capcom license)", "Puzz Loop 2 (Japan 010201 Publicity)", MACHINE_SUPPORTS_SAVE ) GAME( 2001, choko, 0, cps2, choko, cps2_state, init_cps2, ROT0, "Mitchell (Capcom license)", "Janpai Puzzle Choukou (Japan 010820)", MACHINE_SUPPORTS_SAVE ) +GAME( 2001, chokop, 0, dead_cps2, choko,cps2_state, init_cps2, ROT0, "Mitchell (Capcom license)", "Janpai Puzzle Choukou (Japan 010820 Publicity)", MACHINE_SUPPORTS_SAVE ) // Games released on CPS-2 hardware by Eighting/Raizing diff --git a/src/mame/casio/pickytlk.cpp b/src/mame/casio/pickytlk.cpp index 508b82cc636..9830111499c 100644 --- a/src/mame/casio/pickytlk.cpp +++ b/src/mame/casio/pickytlk.cpp @@ -570,6 +570,13 @@ ROM_START(jd364) ROM_LOAD("d23c8000lwgx-c12.lsi5", 0x00000, 0x100000, CRC(c023b709) SHA1(0c081a62f00d0fbee496a5c9067fb145cb79c8cd)) ROM_END +ROM_START(jd366) + CPU_ROM_MULTICOLOR + + ROM_REGION(0x100000, "mask_rom", 0) + ROM_LOAD("d23c8000xgx-c15.lsi5", 0x00000, 0x100000, CRC(d8a84c6a) SHA1(6a64dff0070c0016457c69fc0518df57da9c1b75)) +ROM_END + ROM_START(jd368) CPU_ROM_MULTICOLOR @@ -610,6 +617,9 @@ COMP(1995?, pickydis, 0, 0, pickytlk_monocolor, pickytlk, pickytlk_monocolor_sta // Release date 1995-10 from "Casio Game Perfect Catalogue" COMP(1995, jd364, 0, 0, pickytlk_multicolor, pickytlk, pickytlk_multicolor_state, empty_init, "Casio", "Color Picky Talk - Super Denshi Techou", MACHINE_NO_SOUND | MACHINE_NOT_WORKING) +// ROM date 9635K7021 +COMP(1996?, jd366, 0, 0, pickytlk_multicolor, pickytlk, pickytlk_multicolor_state, empty_init, "Casio", "Super Picky Talk - My room fantasy", MACHINE_NO_SOUND | MACHINE_NOT_WORKING) + // ROM date 9737K7041 COMP(1997?, jd368, 0, 0, pickytlk_multicolor, pickytlk, pickytlk_multicolor_state, empty_init, "Casio", "Super Picky Talk - Access Pet", MACHINE_NO_SOUND | MACHINE_NOT_WORKING) diff --git a/src/mame/gaelco/gaelco2.cpp b/src/mame/gaelco/gaelco2.cpp index 06fd46a43b3..9887972d73b 100644 --- a/src/mame/gaelco/gaelco2.cpp +++ b/src/mame/gaelco/gaelco2.cpp @@ -1903,11 +1903,37 @@ NOTE: It's unknown if Player 1 & Player 2 controls are connected through the JAM Wires run to male JAMMA board with corresponding JP1, JP2, JP3 & JP4 connectors for cabinet 2 JAMMA harness */ +ROM_START( touchgo ) // REF: 950510-1 + ROM_REGION( 0x100000, "maincpu", 0 ) // 68000 code + ROM_LOAD16_BYTE( "tg_873d_56_5-2.ic56", 0x000000, 0x080000, CRC(6d0f5c65) SHA1(00db7a7da3ec1676169aa78fe4f08a7746c3accf) ) // IC63 for REF: 950510-1, IC56 for REF: 950906 + ROM_LOAD16_BYTE( "tg_cee8_57_5-2.ic57", 0x000001, 0x080000, CRC(845787b5) SHA1(27c9910cd9f38328326ecb5cd093dfeb6d4f6244) ) // IC64 for REF: 950510-1, IC57 for REF: 950906 + + ROM_REGION( 0x8000, "gaelco_ds5002fp:sram", 0 ) // DS5002FP code + ROM_LOAD( "touchgo_ds5002fp_sram.bin", 0x00000, 0x8000, CRC(6a238adb) SHA1(4ac5ff8e3d90454f764477146a0b8dc8c8062420) ) -ROM_START( touchgo ) // REF: 950906 + ROM_REGION( 0x100, "gaelco_ds5002fp:mcu:internal", ROMREGION_ERASE00 ) + // touchgo requires some values in scratchram to be initialized or it won't copy the high score table when it boots + ROM_LOAD( "touchgo_scratch", 0x00, 0x80, CRC(f9ca54ff) SHA1(416f7bd89442dc1f736efe457b0f9a7f4f9f0bd5) ) + // these are the default states stored in NVRAM + DS5002FP_SET_MON( 0x19 ) + DS5002FP_SET_RPCTL( 0x00 ) + DS5002FP_SET_CRCR( 0x80 ) + + ROM_REGION( 0x1400000, "gfx", 0 ) // GFX + Sound + // 0x0000000-0x0ffffff filled in in the DRIVER_INIT + ROM_LOAD( "tg_ic69.ic69", 0x1000000, 0x0200000, CRC(18bb12d4) SHA1(ee6e7a63b86c56d71e62db0ae5892ab3ab94b0a0) ) // GFX only + + ROM_REGION( 0x0c00000, "gfx_temp", 0 ) // Temporary storage + ROM_LOAD( "tg_ic65.ic65", 0x0000000, 0x0400000, CRC(91b89c7c) SHA1(1c24b494b56845b0f21be40ab737f251d7683c7d) ) // GFX only + ROM_LOAD( "tg_ic66.ic66", 0x0400000, 0x0200000, CRC(52682953) SHA1(82cde061bdd827ed4a47a9a4256cd0e887ebc29d) ) // Sound only + ROM_FILL( 0x0600000, 0x0200000, 0x00 ) // Empty + ROM_LOAD( "tg_ic67.ic67", 0x0800000, 0x0400000, CRC(c0a2ce5b) SHA1(94b024373c7c546c0f4fe9737639f02e9c7ebbdb) ) // GFX only +ROM_END + +ROM_START( touchgoa ) // REF: 950906 ROM_REGION( 0x100000, "maincpu", 0 ) // 68000 code - ROM_LOAD16_BYTE( "tg_56.ic56", 0x000000, 0x080000, CRC(8ab065f3) SHA1(7664abd7e5f66ffca4a2865bba56ac36bd04f4e9) ) - ROM_LOAD16_BYTE( "tg_57.ic57", 0x000001, 0x080000, CRC(0dfd3f65) SHA1(afb2ce8988c84f211ac71b84928ce4c421de7fee) ) + ROM_LOAD16_BYTE( "tg_be51_5.6_11-12.ic56", 0x000000, 0x080000, CRC(8ab065f3) SHA1(7664abd7e5f66ffca4a2865bba56ac36bd04f4e9) ) + ROM_LOAD16_BYTE( "tg_6701_5.7_11-12.ic57", 0x000001, 0x080000, CRC(0dfd3f65) SHA1(afb2ce8988c84f211ac71b84928ce4c421de7fee) ) ROM_REGION( 0x8000, "gaelco_ds5002fp:sram", 0 ) // DS5002FP code ROM_LOAD( "touchgo_ds5002fp_sram.bin", 0x00000, 0x8000, CRC(6a238adb) SHA1(4ac5ff8e3d90454f764477146a0b8dc8c8062420) ) @@ -1931,10 +1957,92 @@ ROM_START( touchgo ) // REF: 950906 ROM_LOAD( "tg_ic67.ic67", 0x0800000, 0x0400000, CRC(c0a2ce5b) SHA1(94b024373c7c546c0f4fe9737639f02e9c7ebbdb) ) // GFX only ROM_END -ROM_START( touchgon ) // REF 950906, no plug-in daughterboard, Non North America Notice, also found on REF: 950510-1 with daughterboard +ROM_START( touchgona ) ROM_REGION( 0x100000, "maincpu", 0 ) // 68000 code - ROM_LOAD16_BYTE( "1.ic63", 0x000000, 0x080000, CRC(fd3b4642) SHA1(3cab42aecad5ee641711763c6047b56784c2bcf3) ) // IC63 for REF: 950510-1, IC56 for REF: 950906 - ROM_LOAD16_BYTE( "2.ic64", 0x000001, 0x080000, CRC(ee891835) SHA1(9f8c60e5e3696b70f756c3521e10313005053cc7) ) // IC64 for REF: 950510-1, IC57 for REF: 950906 + ROM_LOAD16_BYTE( "v_us_56_f546_14-11.ic56", 0x000000, 0x080000, CRC(3bfe2010) SHA1(bd1584e89c6201dd0e88be3f7c19e5820c43bfee) ) + ROM_LOAD16_BYTE( "v_us_57_d888_14-11.ic57", 0x000001, 0x080000, CRC(c8a9e7bd) SHA1(4d84c34713f63789b51fdee17ca0d77c0e259740) ) + ROM_FILL( 0x1, 1, 0xfe ) // initial stack pointer in u57 points to ROM not RAM, but checksum matched label?! + + ROM_REGION( 0x8000, "gaelco_ds5002fp:sram", 0 ) // DS5002FP code + ROM_LOAD( "touchgo_ds5002fp_sram.bin", 0x00000, 0x8000, CRC(6a238adb) SHA1(4ac5ff8e3d90454f764477146a0b8dc8c8062420) ) + + ROM_REGION( 0x100, "gaelco_ds5002fp:mcu:internal", ROMREGION_ERASE00 ) + // touchgo requires some values in scratchram to be initialized or it won't copy the high score table when it boots + ROM_LOAD( "touchgo_scratch", 0x00, 0x80, CRC(f9ca54ff) SHA1(416f7bd89442dc1f736efe457b0f9a7f4f9f0bd5) ) + // these are the default states stored in NVRAM + DS5002FP_SET_MON( 0x19 ) + DS5002FP_SET_RPCTL( 0x00 ) + DS5002FP_SET_CRCR( 0x80 ) + + ROM_REGION( 0x1400000, "gfx", 0 ) // GFX + Sound + // 0x0000000-0x0ffffff filled in in the DRIVER_INIT + ROM_LOAD( "tg_ic69.ic69", 0x1000000, 0x0200000, CRC(18bb12d4) SHA1(ee6e7a63b86c56d71e62db0ae5892ab3ab94b0a0) ) // GFX only + + ROM_REGION( 0x0c00000, "gfx_temp", 0 ) // Temporary storage + ROM_LOAD( "tg_ic65.ic65", 0x0000000, 0x0400000, CRC(91b89c7c) SHA1(1c24b494b56845b0f21be40ab737f251d7683c7d) ) // GFX only + ROM_LOAD( "tg_ic66.ic66", 0x0400000, 0x0200000, CRC(52682953) SHA1(82cde061bdd827ed4a47a9a4256cd0e887ebc29d) ) // Sound only + ROM_FILL( 0x0600000, 0x0200000, 0x00 ) // Empty + ROM_LOAD( "tg_ic67.ic67", 0x0800000, 0x0400000, CRC(c0a2ce5b) SHA1(94b024373c7c546c0f4fe9737639f02e9c7ebbdb) ) // GFX only +ROM_END + +ROM_START( touchgonna ) + ROM_REGION( 0x100000, "maincpu", 0 ) // 68000 code + ROM_LOAD16_BYTE( "v_e_56_ef33_16-11.ic56", 0x000000, 0x080000, CRC(c2715874) SHA1(3df2c19a2ce74fa3c6eccea7938004a03c0381ff) ) + ROM_LOAD16_BYTE( "v_o_57_9c10_16-11.ic57", 0x000001, 0x080000, CRC(3acefb06) SHA1(0fc67855cd7e310a9c06d11feb260b463657a6a7) ) + + ROM_REGION( 0x8000, "gaelco_ds5002fp:sram", 0 ) // DS5002FP code + ROM_LOAD( "touchgo_ds5002fp_sram.bin", 0x00000, 0x8000, CRC(6a238adb) SHA1(4ac5ff8e3d90454f764477146a0b8dc8c8062420) ) + + ROM_REGION( 0x100, "gaelco_ds5002fp:mcu:internal", ROMREGION_ERASE00 ) + // touchgo requires some values in scratchram to be initialized or it won't copy the high score table when it boots + ROM_LOAD( "touchgo_scratch", 0x00, 0x80, CRC(f9ca54ff) SHA1(416f7bd89442dc1f736efe457b0f9a7f4f9f0bd5) ) + // these are the default states stored in NVRAM + DS5002FP_SET_MON( 0x19 ) + DS5002FP_SET_RPCTL( 0x00 ) + DS5002FP_SET_CRCR( 0x80 ) + + ROM_REGION( 0x1400000, "gfx", 0 ) // GFX + Sound + // 0x0000000-0x0ffffff filled in in the DRIVER_INIT + ROM_LOAD( "tg_ic69.ic69", 0x1000000, 0x0200000, CRC(18bb12d4) SHA1(ee6e7a63b86c56d71e62db0ae5892ab3ab94b0a0) ) // GFX only + + ROM_REGION( 0x0c00000, "gfx_temp", 0 ) // Temporary storage + ROM_LOAD( "tg_ic65.ic65", 0x0000000, 0x0400000, CRC(91b89c7c) SHA1(1c24b494b56845b0f21be40ab737f251d7683c7d) ) // GFX only + ROM_LOAD( "tg_ic66.ic66", 0x0400000, 0x0200000, CRC(52682953) SHA1(82cde061bdd827ed4a47a9a4256cd0e887ebc29d) ) // Sound only + ROM_FILL( 0x0600000, 0x0200000, 0x00 ) // Empty + ROM_LOAD( "tg_ic67.ic67", 0x0800000, 0x0400000, CRC(c0a2ce5b) SHA1(94b024373c7c546c0f4fe9737639f02e9c7ebbdb) ) // GFX only +ROM_END + +ROM_START( touchgonnaa ) + ROM_REGION( 0x100000, "maincpu", 0 ) // 68000 code + ROM_LOAD16_BYTE( "v_e_c79b_56_15-11.ic56", 0x000000, 0x080000, CRC(d92bb02a) SHA1(06ba060b00b6dcc734eaac9771dcecf508be1aff) ) + ROM_LOAD16_BYTE( "v_e_b34a_57_15-11.ic57", 0x000001, 0x080000, CRC(0711c8ba) SHA1(b4d2d20421ec2f6ef9ee0259cf2be85641272359) ) + + ROM_REGION( 0x8000, "gaelco_ds5002fp:sram", 0 ) // DS5002FP code + ROM_LOAD( "touchgo_ds5002fp_sram.bin", 0x00000, 0x8000, CRC(6a238adb) SHA1(4ac5ff8e3d90454f764477146a0b8dc8c8062420) ) + + ROM_REGION( 0x100, "gaelco_ds5002fp:mcu:internal", ROMREGION_ERASE00 ) + // touchgo requires some values in scratchram to be initialized or it won't copy the high score table when it boots + ROM_LOAD( "touchgo_scratch", 0x00, 0x80, CRC(f9ca54ff) SHA1(416f7bd89442dc1f736efe457b0f9a7f4f9f0bd5) ) + // these are the default states stored in NVRAM + DS5002FP_SET_MON( 0x19 ) + DS5002FP_SET_RPCTL( 0x00 ) + DS5002FP_SET_CRCR( 0x80 ) + + ROM_REGION( 0x1400000, "gfx", 0 ) // GFX + Sound + // 0x0000000-0x0ffffff filled in in the DRIVER_INIT + ROM_LOAD( "tg_ic69.ic69", 0x1000000, 0x0200000, CRC(18bb12d4) SHA1(ee6e7a63b86c56d71e62db0ae5892ab3ab94b0a0) ) // GFX only + + ROM_REGION( 0x0c00000, "gfx_temp", 0 ) // Temporary storage + ROM_LOAD( "tg_ic65.ic65", 0x0000000, 0x0400000, CRC(91b89c7c) SHA1(1c24b494b56845b0f21be40ab737f251d7683c7d) ) // GFX only + ROM_LOAD( "tg_ic66.ic66", 0x0400000, 0x0200000, CRC(52682953) SHA1(82cde061bdd827ed4a47a9a4256cd0e887ebc29d) ) // Sound only + ROM_FILL( 0x0600000, 0x0200000, 0x00 ) // Empty + ROM_LOAD( "tg_ic67.ic67", 0x0800000, 0x0400000, CRC(c0a2ce5b) SHA1(94b024373c7c546c0f4fe9737639f02e9c7ebbdb) ) // GFX only +ROM_END + +ROM_START( touchgonnab ) + ROM_REGION( 0x100000, "maincpu", 0 ) // 68000 code + ROM_LOAD16_BYTE( "v_alt_e_56_15-11.ic56", 0x000000, 0x080000, CRC(64b83556) SHA1(917c30f391c5bc2ce3ab3687c35ce3c429033cf1) ) + ROM_LOAD16_BYTE( "v_alt_o_57_15-11.ic57", 0x000001, 0x080000, CRC(e9ceb77a) SHA1(aaeb5d51b6df4273a5ae2b0c160aa26d33f89c1d) ) ROM_REGION( 0x8000, "gaelco_ds5002fp:sram", 0 ) // DS5002FP code ROM_LOAD( "touchgo_ds5002fp_sram.bin", 0x00000, 0x8000, CRC(6a238adb) SHA1(4ac5ff8e3d90454f764477146a0b8dc8c8062420) ) @@ -1958,10 +2066,10 @@ ROM_START( touchgon ) // REF 950906, no plug-in daughterboard, Non North America ROM_LOAD( "tg_ic67.ic67", 0x0800000, 0x0400000, CRC(c0a2ce5b) SHA1(94b024373c7c546c0f4fe9737639f02e9c7ebbdb) ) // GFX only ROM_END -ROM_START( touchgoe ) // REF: 950510-1 +ROM_START( touchgonnac ) // REF 950906, no plug-in daughterboard, non North America notice, also found on REF: 950510-1 with daughterboard ROM_REGION( 0x100000, "maincpu", 0 ) // 68000 code - ROM_LOAD16_BYTE( "tg56.ic63", 0x000000, 0x080000, CRC(6d0f5c65) SHA1(00db7a7da3ec1676169aa78fe4f08a7746c3accf) ) // IC63 for REF: 950510-1, IC56 for REF: 950906 - ROM_LOAD16_BYTE( "tg57.ic64", 0x000001, 0x080000, CRC(845787b5) SHA1(27c9910cd9f38328326ecb5cd093dfeb6d4f6244) ) // IC64 for REF: 950510-1, IC57 for REF: 950906 + ROM_LOAD16_BYTE( "1.ic63", 0x000000, 0x080000, CRC(fd3b4642) SHA1(3cab42aecad5ee641711763c6047b56784c2bcf3) ) // IC63 for REF: 950510-1, IC56 for REF: 950906 + ROM_LOAD16_BYTE( "2.ic64", 0x000001, 0x080000, CRC(ee891835) SHA1(9f8c60e5e3696b70f756c3521e10313005053cc7) ) // IC64 for REF: 950510-1, IC57 for REF: 950906 ROM_REGION( 0x8000, "gaelco_ds5002fp:sram", 0 ) // DS5002FP code ROM_LOAD( "touchgo_ds5002fp_sram.bin", 0x00000, 0x8000, CRC(6a238adb) SHA1(4ac5ff8e3d90454f764477146a0b8dc8c8062420) ) @@ -1985,10 +2093,10 @@ ROM_START( touchgoe ) // REF: 950510-1 ROM_LOAD( "tg_ic67.ic67", 0x0800000, 0x0400000, CRC(c0a2ce5b) SHA1(94b024373c7c546c0f4fe9737639f02e9c7ebbdb) ) // GFX only ROM_END -ROM_START( touchgok ) // REF: 950510-1 - ds5002fp unpopulated, game is unprotected +ROM_START( touchgoun ) // REF: 950510-1 - ds5002fp unpopulated, game is unprotected ROM_REGION( 0x100000, "maincpu", 0 ) // 68000 code - ROM_LOAD16_BYTE( "56.ic56", 0x000000, 0x080000, CRC(cbb87505) SHA1(f19832af60fb6273c3263ebdd93bb7705ab61e20) ) // IC63 for REF: 950510-1, IC56 for REF: 950906 - ROM_LOAD16_BYTE( "57.ic57", 0x000001, 0x080000, CRC(36bcc7e7) SHA1(2fff881ba0a99ebcfe3c03fdc61f4bf40e152c7f) ) // IC64 for REF: 950510-1, IC57 for REF: 950906 + ROM_LOAD16_BYTE( "tg_d_56_1e4b_no_dallas.ic56", 0x000000, 0x080000, CRC(cbb87505) SHA1(f19832af60fb6273c3263ebdd93bb7705ab61e20) ) // IC63 for REF: 950510-1, IC56 for REF: 950906 + ROM_LOAD16_BYTE( "tg_d_57_060d_no_dallas.ic57", 0x000001, 0x080000, CRC(36bcc7e7) SHA1(2fff881ba0a99ebcfe3c03fdc61f4bf40e152c7f) ) // IC64 for REF: 950510-1, IC57 for REF: 950906 ROM_REGION( 0x1400000, "gfx", 0 ) // GFX + Sound // 0x0000000-0x0ffffff filled in in the DRIVER_INIT @@ -2001,6 +2109,7 @@ ROM_START( touchgok ) // REF: 950510-1 - ds5002fp unpopulated, game is unprotect ROM_LOAD( "tg_ic67.ic67", 0x0800000, 0x0400000, CRC(c0a2ce5b) SHA1(94b024373c7c546c0f4fe9737639f02e9c7ebbdb) ) // GFX only ROM_END + /*============================================================================ SNOW BOARD ============================================================================*/ @@ -2733,32 +2842,36 @@ GAME( 1994, aligatorun, aligator, alighunt, alighunt, gaelco2_state, GAME( 1994, aligatoruna, aligator, alighunt, alighunt, gaelco2_state, init_alighunt, ROT0, "Gaelco", "Alligator Hunt (unprotected, set 2)", 0 ) // strange version, starts on space stages, but clearly a recompile not a trivial hack of the above, show version maybe? GAME( 1994, aligatorp, aligator, alighunt_d5002fp, alighunt, gaelco2_state, empty_init, ROT0, "Gaelco", "Alligator Hunt (protected, prototype?)", MACHINE_NOT_WORKING ) // requires different protection program / data -GAME( 1995, touchgo, 0, touchgo_d5002fp, touchgo, gaelco2_state, init_touchgo, ROT0, "Gaelco", "Touch and Go (World)", 0 ) -GAME( 1995, touchgon, touchgo, touchgo_d5002fp, touchgo, gaelco2_state, init_touchgo, ROT0, "Gaelco", "Touch and Go (Non North America)", 0 ) -GAME( 1995, touchgoe, touchgo, touchgo_d5002fp, touchgo, gaelco2_state, init_touchgo, ROT0, "Gaelco", "Touch and Go (earlier revision)", 0 ) -GAME( 1995, touchgok, touchgo, touchgo, touchgo, gaelco2_state, init_touchgo, ROT0, "Gaelco", "Touch and Go (Korea, unprotected)", 0 ) // doesn't say 'Korea' but was sourced there, shows 2 copyright lines like the 'earlier revision' +GAME( 1996, touchgo, 0, touchgo_d5002fp, touchgo, gaelco2_state, init_touchgo, ROT0, "Gaelco", "Touch and Go (World, 05/Feb/1996, checksum 059D0235)", 0 ) +GAME( 1995, touchgoa, touchgo, touchgo_d5002fp, touchgo, gaelco2_state, init_touchgo, ROT0, "Gaelco", "Touch and Go (World, 11/Dec/1995, checksum 05A0C7FB)", 0 ) +GAME( 1995, touchgona, touchgo, touchgo_d5002fp, touchgo, gaelco2_state, init_touchgo, ROT0, "Gaelco", "Touch and Go (North America, 14/Nov/1995, checksum 05737572)", 0 ) +GAME( 1995, touchgonna, touchgo, touchgo_d5002fp, touchgo, gaelco2_state, init_touchgo, ROT0, "Gaelco", "Touch and Go (non North America, 16/Nov/1995, checksum 056533F0)", 0 ) +GAME( 1995, touchgonnaa, touchgo, touchgo_d5002fp, touchgo, gaelco2_state, init_touchgo, ROT0, "Gaelco", "Touch and Go (non North America, 15/Nov/1995, checksum 056C2336)", 0 ) +GAME( 1995, touchgonnab, touchgo, touchgo_d5002fp, touchgo, gaelco2_state, init_touchgo, ROT0, "Gaelco", "Touch and Go (non North America, 15/Nov/1995, checksum 056C138F)", 0 ) +GAME( 1995, touchgonnac, touchgo, touchgo_d5002fp, touchgo, gaelco2_state, init_touchgo, ROT0, "Gaelco", "Touch and Go (non North America, 11/Nov/2005, checksum 056AA304)", 0 ) +GAME( 1995, touchgoun, touchgo, touchgo, touchgo, gaelco2_state, init_touchgo, ROT0, "Gaelco", "Touch and Go (unprotected, checksum 059CC336)", 0 ) GAME( 1995, wrally2, 0, wrally2, wrally2, wrally2_state, init_wrally2, ROT0, "Gaelco", "World Rally 2: Twin Racing (mask ROM version)", 0 ) GAME( 1995, wrally2a, wrally2, wrally2, wrally2, wrally2_state, empty_init, ROT0, "Gaelco", "World Rally 2: Twin Racing (EPROM version)", 0 ) // All sets identify as Version 1.0, but are clearly different revisions -GAME( 1996, maniacsq, 0, maniacsq_d5002fp, maniacsq, gaelco2_state, empty_init, ROT0, "Gaelco", "Maniac Square (protected, Version 1.0, Checksum DEEE)", 0 ) -GAME( 1996, maniacsqa, maniacsq, maniacsq_d5002fp, maniacsq, gaelco2_state, empty_init, ROT0, "Gaelco", "Maniac Square (protected, Version 1.0, Checksum CF2D)", 0 ) -GAME( 1996, maniacsqu, maniacsq, maniacsq, maniacsq, gaelco2_state, empty_init, ROT0, "Gaelco", "Maniac Square (unprotected, Version 1.0, Checksum BB73)", 0 ) -GAME( 1996, maniacsqs, maniacsq, maniacsqs, snowboar, snowboar_state, empty_init, ROT0, "Gaelco", "Maniac Square (unprotected, Version 1.0, Checksum 66B1, 960419/1 PCB)", 0 ) // Official version on Snow Board Championship PCB, doesn't use the protection +GAME( 1996, maniacsq, 0, maniacsq_d5002fp, maniacsq, gaelco2_state, empty_init, ROT0, "Gaelco", "Maniac Square (protected, version 1.0, checksum DEEE)", 0 ) +GAME( 1996, maniacsqa, maniacsq, maniacsq_d5002fp, maniacsq, gaelco2_state, empty_init, ROT0, "Gaelco", "Maniac Square (protected, version 1.0, checksum CF2D)", 0 ) +GAME( 1996, maniacsqu, maniacsq, maniacsq, maniacsq, gaelco2_state, empty_init, ROT0, "Gaelco", "Maniac Square (unprotected, version 1.0, checksum BB73)", 0 ) +GAME( 1996, maniacsqs, maniacsq, maniacsqs, snowboar, snowboar_state, empty_init, ROT0, "Gaelco", "Maniac Square (unprotected, version 1.0, checksum 66B1, 960419/1 PCB)", 0 ) // Official version on Snow Board Championship PCB, doesn't use the protection -GAME( 1997, snowboar, 0, snowboar, snowboar, snowboar_state, empty_init, ROT0, "Gaelco / OMK", "Snow Board Championship (Version 2.1)", 0 ) -GAME( 1996, snowboara, snowboar, snowboar, snowboar, snowboar_state, init_snowboara, ROT0, "Gaelco / OMK", "Snow Board Championship (Version 2.0)", 0 ) +GAME( 1997, snowboar, 0, snowboar, snowboar, snowboar_state, empty_init, ROT0, "Gaelco / OMK", "Snow Board Championship (version 2.1)", 0 ) +GAME( 1996, snowboara, snowboar, snowboar, snowboar, snowboar_state, init_snowboara, ROT0, "Gaelco / OMK", "Snow Board Championship (version 2.0)", 0 ) -GAME( 1998, bang, 0, bang, bang, bang_state, empty_init, ROT0, "Gaelco / Bit Managers", "Bang!", 0 ) +GAME( 1998, bang, 0, bang, bang, bang_state, empty_init, ROT0, "Gaelco / Bit Managers", "Bang!", 0 ) GAME( 1999, bangj, bang, bang, bang, bang_state, empty_init, ROT0, "Gaelco / Bit Managers (GM Shoji license)", "Gun Gabacho (Japan)", 0 ) // Hardware manufactured by Gaelco for Nova Desitec but without any Gaelco branding. // 2-in-1 gambling game, these are Italian versions, English versions also exist -GAME( 1999, play2000, 0, play2000, play2000, gaelco2_state, init_play2000, ROT0, "Nova Desitec", "Play 2000 (Super Slot & Gran Tesoro) (v7.0i) (Italy)", 0 ) -GAME( 1999, play2000_50i,play2000, play2000, play2000, gaelco2_state, empty_init, ROT0, "Nova Desitec", "Play 2000 (Super Slot & Gran Tesoro) (v5.0i) (Italy)", MACHINE_NOT_WORKING ) // bad dump -GAME( 1999, play2000_40i,play2000, play2000, play2000, gaelco2_state, init_play2000, ROT0, "Nova Desitec", "Play 2000 (Super Slot & Gran Tesoro) (v4.0i) (Italy)", 0 ) +GAME( 1999, play2000, 0, play2000, play2000, gaelco2_state, init_play2000, ROT0, "Nova Desitec", "Play 2000 (Super Slot & Gran Tesoro) (v7.0i) (Italy)", 0 ) +GAME( 1999, play2000_50i,play2000, play2000, play2000, gaelco2_state, empty_init, ROT0, "Nova Desitec", "Play 2000 (Super Slot & Gran Tesoro) (v5.0i) (Italy)", MACHINE_NOT_WORKING ) // bad dump +GAME( 1999, play2000_40i,play2000, play2000, play2000, gaelco2_state, init_play2000, ROT0, "Nova Desitec", "Play 2000 (Super Slot & Gran Tesoro) (v4.0i) (Italy)", 0 ) GAME( 1998, srollnd, 0, srollnd, play2000, gaelco2_state, init_play2000, ROT0, "Nova Desitec", "Super Roller (v7.0)", MACHINE_NOT_WORKING ) // missing ds5002fp dump @@ -2767,6 +2880,6 @@ GAME( 1999, chmppool, 0, srollnd, play2000, gaelco2_state, GAME( 1999, jungleani, 0, srollnd, play2000, gaelco2_state, init_play2000, ROT0, "New Impeuropex Corp. / New Chitarrina", "Jungle's Animals (v3.0)", MACHINE_NOT_WORKING ) // Developed by Nova Desitec, missing ds5002fp dump // Gym equipment -GAME( 1997, sltpcycl, 0, saltcrdi, saltcrdi, gaelco2_state, init_play2000, ROT0, "Salter Fitness / Gaelco", "Pro Cycle Tele Cardioline (Salter Fitness Bike V.1.0, Checksum 02AB)", 0 ) // Same board and ROM as Pro Reclimber -GAME( 1997, sltpstep, 0, saltcrdi, saltcrdi, gaelco2_state, init_play2000, ROT0, "Salter Fitness / Gaelco", "Pro Stepper Tele Cardioline (Salter Fitness Stepper V.1.0, Checksum F208)", 0 ) +GAME( 1997, sltpcycl, 0, saltcrdi, saltcrdi, gaelco2_state, init_play2000, ROT0, "Salter Fitness / Gaelco", "Pro Cycle Tele Cardioline (Salter fitness bike, V.1.0, checksum 02AB)", 0 ) // Same board and ROM as Pro Reclimber +GAME( 1997, sltpstep, 0, saltcrdi, saltcrdi, gaelco2_state, init_play2000, ROT0, "Salter Fitness / Gaelco", "Pro Stepper Tele Cardioline (Salter fitness stepper, V.1.0, checksum F208)", 0 ) // there are other devices in Cardioline series but they don't use displays and aren't on Gaelco hardware diff --git a/src/mame/igs/igs011.cpp b/src/mame/igs/igs011.cpp index ec6c08faa8a..a10619ea2b5 100644 --- a/src/mame/igs/igs011.cpp +++ b/src/mame/igs/igs011.cpp @@ -60,7 +60,7 @@ To do: Also the background palette is wrong since the fade routine is called with wrong parameters, but in this case the PCB does the same. -- lhb3: DIP definitions +- lhb3: emulated game crashes with an illegal instruction error on bookkeeping menu - xymga: stop during attract mode with 'RECORD ERROR 3' @@ -151,11 +151,11 @@ public: protected: struct blitter_t { - u16 x, y, w, h, - gfx_lo, gfx_hi, - depth, - pen, - flags; + u16 x = 0, y = 0, w = 0, h = 0, + gfx_lo = 0, gfx_hi = 0, + depth = 0, + pen = 0, + flags = 0; }; /* devices */ @@ -179,29 +179,29 @@ protected: optional_ioport m_io_coin; std::unique_ptr<u8[]> m_layer[8]; - u16 m_priority; - u8 m_blitter_pen_hi; - u16 m_dips_sel; - u16 m_input_sel; - u16 m_hopper_bit; - u8 m_prot1; - u8 m_prot1_swap; - u32 m_prot1_addr; - u8 m_prot2; - u8 m_igs012_prot; - u8 m_igs012_prot_swap; - u8 m_igs012_prot_mode; - u16 m_igs003_reg; - u16 m_lhb_irq_enable; + u16 m_priority = 0; + u8 m_blitter_pen_hi = 0; + u16 m_dips_sel = 0; + u16 m_input_sel = 0; + u16 m_hopper_bit = 0; + u8 m_prot1 = 0; + u8 m_prot1_swap = 0; + u32 m_prot1_addr = 0; + u8 m_prot2 = 0; + u8 m_igs012_prot = 0; + u8 m_igs012_prot_swap = 0; + u8 m_igs012_prot_mode = 0; + u16 m_igs003_reg = 0; + u16 m_lhb_irq_enable = 0; blitter_t m_blitter; - u16 m_igs003_prot_hold; - u8 m_igs003_prot_x; - u8 m_igs003_prot_y; - u8 m_igs003_prot_z; - u8 m_igs003_prot_h1; - u8 m_igs003_prot_h2; + u16 m_igs003_prot_hold = 0; + u8 m_igs003_prot_x = 0; + u8 m_igs003_prot_y = 0; + u8 m_igs003_prot_z = 0; + u8 m_igs003_prot_h1 = 0; + u8 m_igs003_prot_h2 = 0; virtual void machine_start() override ATTR_COLD; virtual void video_start() override ATTR_COLD; @@ -592,17 +592,14 @@ void igs011_state::igs011_blit_flags_w(offs_t offset, u16 data, u16 mem_mask) clear_pen = m_blitter.pen; } - const int xstart = (m_blitter.x & 0x1ff) - (m_blitter.x & 0x200); - const int ystart = (m_blitter.y & 0x0ff) - (m_blitter.y & 0x100); - - int xend, xinc; - int yend, yinc; - - if (flipx) { xend = xstart - (m_blitter.w & 0x1ff) - 1; xinc = -1; } - else { xend = xstart + (m_blitter.w & 0x1ff) + 1; xinc = 1; } - - if (flipy) { yend = ystart - (m_blitter.h & 0x0ff) - 1; yinc = -1; } - else { yend = ystart + (m_blitter.h & 0x0ff) + 1; yinc = 1; } + const int xstart = util::sext(m_blitter.x, 10); + const int ystart = util::sext(m_blitter.y, 9); + const int xsize = (m_blitter.w & 0x1ff) + 1; + const int ysize = (m_blitter.h & 0x0ff) + 1; + const int xend = flipx ? (xstart - xsize) : (xstart + xsize); + const int yend = flipy ? (ystart - ysize) : (ystart + ysize); + const int xinc = flipx ? -1 : 1; + const int yinc = flipy ? -1 : 1; for (int y = ystart; y != yend; y += yinc) { @@ -2910,7 +2907,7 @@ void igs011_state::lhb2_mem(address_map &map) map(0x000000, 0x07ffff).rom(); // lhb2: IGS011 protection dynamically mapped at 1ff8x -// map(0x01ff80, 0x01ff87).w(FUNC(igs011_state::igs011_prot1_w)).umask16(0xff00); +// map(0x01ff80, 0x01ff87).umask16(0xff00).w(FUNC(igs011_state::igs011_prot1_w)); // map(0x01ff88, 0x01ff89).r(FUNC(igs011_state::igs011_prot1_r)); map(0x020000, 0x0201ff).w(FUNC(igs011_state::igs011_prot2_inc_w)); // inc (55) @@ -2920,12 +2917,12 @@ void igs011_state::lhb2_mem(address_map &map) map(0x100000, 0x103fff).ram().share("nvram"); map(0x200001, 0x200001).rw(m_oki, FUNC(okim6295_device::read), FUNC(okim6295_device::write)); - map(0x204000, 0x204003).w("ymsnd", FUNC(ym2413_device::write)).umask16(0x00ff); + map(0x204000, 0x204003).umask16(0x00ff).w("ymsnd", FUNC(ym2413_device::write)); map(0x208000, 0x208001).nopr().w(FUNC(igs011_state::igs003_w)); map(0x208002, 0x208003).rw(FUNC(igs011_state::lhb2_igs003_r), FUNC(igs011_state::lhb2_igs003_w)); map(0x20c000, 0x20cfff).ram().share(m_priority_ram); - map(0x210000, 0x210fff).rw(m_palette, FUNC(palette_device::read8), FUNC(palette_device::write8)).umask16(0x00ff).share("palette"); - map(0x211000, 0x211fff).rw(m_palette, FUNC(palette_device::read8_ext), FUNC(palette_device::write8_ext)).umask16(0x00ff).share("palette_ext"); + map(0x210000, 0x210fff).umask16(0x00ff).rw(m_palette, FUNC(palette_device::read8), FUNC(palette_device::write8)).share("palette"); + map(0x211000, 0x211fff).umask16(0x00ff).rw(m_palette, FUNC(palette_device::read8_ext), FUNC(palette_device::write8_ext)).share("palette_ext"); map(0x214000, 0x214001).portr("COIN"); map(0x300000, 0x3fffff).rw(FUNC(igs011_state::igs011_layers_r), FUNC(igs011_state::igs011_layers_w)); map(0xa20000, 0xa20001).w(FUNC(igs011_state::igs011_priority_w)); @@ -3397,7 +3394,7 @@ static INPUT_PORTS_START( lhb2 ) PORT_DIPSETTING( 0x02, "70%" ) PORT_DIPSETTING( 0x01, "74%" ) PORT_DIPSETTING( 0x00, "78%" ) - PORT_DIPNAME( 0x08, 0x00, "Odds Rate" ) PORT_DIPLOCATION("SW1:4") // 倍數? + PORT_DIPNAME( 0x08, 0x00, "Odds Rate" ) PORT_DIPLOCATION("SW1:4") // 倍數表 PORT_DIPSETTING( 0x00, "1,2,3,4,5,6,7,8" ) PORT_DIPSETTING( 0x08, "1,2,3,5,8,15,30,50" ) PORT_DIPNAME( 0x10, 0x00, "Maximum Bet" ) PORT_DIPLOCATION("SW1:5") // 最大押注 @@ -3408,9 +3405,9 @@ static INPUT_PORTS_START( lhb2 ) PORT_DIPSETTING( 0x40, "2" ) PORT_DIPSETTING( 0x20, "3" ) PORT_DIPSETTING( 0x00, "5" ) - PORT_DIPNAME( 0x80, 0x80, "Credit Timer" ) PORT_DIPLOCATION("SW1:8") // ??清除 (clears credits after timeout if you don't start a game) - PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) // ? - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) // ? + PORT_DIPNAME( 0x80, 0x80, "Credit Timer" ) PORT_DIPLOCATION("SW1:8") // 自動清除 (clears credits after timeout if you don't start a game) + PORT_DIPSETTING( 0x80, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x00, DEF_STR(On) ) // ? PORT_START("DSW2") PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW2:1,2") // 投幣比率 @@ -3430,22 +3427,24 @@ static INPUT_PORTS_START( lhb2 ) PORT_DIPNAME( 0x20, 0x20, "Payout Mode" ) PORT_DIPLOCATION("SW2:6") // 退分方式 PORT_DIPSETTING( 0x20, "Key-Out" ) // 洗分 PORT_DIPSETTING( 0x00, "Return Coins" ) // 退幣 (doesn't seem to work properly) - PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "SW2:7" ) // ???? - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:8") // ??音? - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) // ? - PORT_DIPSETTING( 0x80, DEF_STR( On ) ) // ? + PORT_DIPNAME( 0x40, 0x40, "Auto Reach" ) PORT_DIPLOCATION("SW2:7") // 自動摸打 (automatically draws and discards tiles after reach) + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // ? + PORT_DIPSETTING( 0x40, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x80, 0x80, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("SW2:8") // 示範音樂 + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x80, DEF_STR(On) ) // 有 PORT_START("DSW3") - PORT_DIPNAME( 0x03, 0x03, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:1,2") // ??限? + PORT_DIPNAME( 0x03, 0x03, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:1,2") // 破台限制 PORT_DIPSETTING( 0x03, "500" ) PORT_DIPSETTING( 0x02, "1000" ) PORT_DIPSETTING( 0x01, "2000" ) PORT_DIPSETTING( 0x00, "?" ) // ?限? PORT_DIPNAME( 0x0c, 0x0c, "Gals" ) PORT_DIPLOCATION("SW3:3,4") // 美女 - PORT_DIPSETTING( 0x0c, "0?" ) // ?美女 - PORT_DIPSETTING( 0x08, "1?" ) // ?美女 - PORT_DIPSETTING( 0x04, "2?" ) // ?開女 - PORT_DIPSETTING( 0x00, "3?" ) // ?開女 + PORT_DIPSETTING( 0x0c, DEF_STR(Off) ) // 無美女 + PORT_DIPSETTING( 0x08, "1?" ) // ?? + PORT_DIPSETTING( 0x04, "2?" ) // 開? + PORT_DIPSETTING( 0x00, "3?" ) // 開? PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "SW3:5" ) // (not shown in settings display) PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "SW3:6" ) // (not shown in settings display) PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "SW3:7" ) // (not shown in settings display) @@ -3582,37 +3581,39 @@ INPUT_PORTS_END // basically same game as lhb2 and nkishusp but with joystick controls static INPUT_PORTS_START( tygn ) PORT_START("DSW1") - PORT_DIPNAME( 0x07, 0x07, "Pay Out (%)" ) PORT_DIPLOCATION("DSW1:1,2,3") - PORT_DIPSETTING( 0x07, "50" ) - PORT_DIPSETTING( 0x06, "54" ) - PORT_DIPSETTING( 0x05, "58" ) - PORT_DIPSETTING( 0x04, "62" ) - PORT_DIPSETTING( 0x03, "66" ) - PORT_DIPSETTING( 0x02, "70" ) - PORT_DIPSETTING( 0x01, "74" ) - PORT_DIPSETTING( 0x00, "78" ) - PORT_DIPNAME( 0x08, 0x08, "Minimum Bet" ) PORT_DIPLOCATION("DSW1:4") + PORT_DIPNAME( 0x07, 0x02, "Payout Rate" ) PORT_DIPLOCATION("SW1:1,2,3") // 機率調整 + PORT_DIPSETTING( 0x07, "50%" ) + PORT_DIPSETTING( 0x06, "54%" ) + PORT_DIPSETTING( 0x05, "58%" ) + PORT_DIPSETTING( 0x04, "62%" ) + PORT_DIPSETTING( 0x03, "66%" ) + PORT_DIPSETTING( 0x02, "70%" ) + PORT_DIPSETTING( 0x01, "74%" ) + PORT_DIPSETTING( 0x00, "78%" ) + PORT_DIPNAME( 0x08, 0x08, "Minimum Bet" ) PORT_DIPLOCATION("SW1:4") // 最小押注 PORT_DIPSETTING( 0x08, "1" ) PORT_DIPSETTING( 0x00, "2" ) - PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DSW1:5,6") - PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x20, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 1C_3C ) ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("DSW1:7") - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x40, DEF_STR( On ) ) - PORT_DIPUNKNOWN( 0x80, 0x80 ) PORT_DIPLOCATION("DSW1:8") + PORT_DIPNAME( 0x30, 0x30, DEF_STR(Coinage) ) PORT_DIPLOCATION("SW1:5,6") // 投幣比率 + PORT_DIPSETTING( 0x00, DEF_STR(2C_1C) ) + PORT_DIPSETTING( 0x30, DEF_STR(1C_1C) ) + PORT_DIPSETTING( 0x20, DEF_STR(1C_2C) ) + PORT_DIPSETTING( 0x10, DEF_STR(1C_3C) ) + PORT_DIPNAME( 0x40, 0x40, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("SW1:7") // 示範音樂 + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // ? + PORT_DIPSETTING( 0x40, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x80, 0x80, "Credit Timer" ) PORT_DIPLOCATION("SW1:8") // 自動清除 (clears credits after timeout if you don't start a game) + PORT_DIPSETTING( 0x80, DEF_STR(Off) ) // ? + PORT_DIPSETTING( 0x00, DEF_STR(On) ) // ? PORT_START("DSW2") // not shown in test mode - PORT_DIPUNKNOWN( 0x01, 0x01 ) PORT_DIPLOCATION("DSW2:1") - PORT_DIPUNKNOWN( 0x02, 0x02 ) PORT_DIPLOCATION("DSW2:2") - PORT_DIPUNKNOWN( 0x04, 0x04 ) PORT_DIPLOCATION("DSW2:3") - PORT_DIPUNKNOWN( 0x08, 0x08 ) PORT_DIPLOCATION("DSW2:4") - PORT_DIPUNKNOWN( 0x10, 0x10 ) PORT_DIPLOCATION("DSW2:5") - PORT_DIPUNKNOWN( 0x20, 0x20 ) PORT_DIPLOCATION("DSW2:6") - PORT_DIPUNKNOWN( 0x40, 0x40 ) PORT_DIPLOCATION("DSW2:7") - PORT_DIPUNKNOWN( 0x80, 0x80 ) PORT_DIPLOCATION("DSW2:8") + PORT_DIPUNKNOWN( 0x01, 0x01 ) PORT_DIPLOCATION("SW2:1") + PORT_DIPUNKNOWN( 0x02, 0x02 ) PORT_DIPLOCATION("SW2:2") + PORT_DIPUNKNOWN( 0x04, 0x04 ) PORT_DIPLOCATION("SW2:3") + PORT_DIPUNKNOWN( 0x08, 0x08 ) PORT_DIPLOCATION("SW2:4") + PORT_DIPUNKNOWN( 0x10, 0x10 ) PORT_DIPLOCATION("SW2:5") + PORT_DIPUNKNOWN( 0x20, 0x20 ) PORT_DIPLOCATION("SW2:6") + PORT_DIPUNKNOWN( 0x40, 0x40 ) PORT_DIPLOCATION("SW2:7") + PORT_DIPUNKNOWN( 0x80, 0x80 ) PORT_DIPLOCATION("SW2:8") PORT_START("DSW3") // only 2 out of 4 DIP banks phisically present PORT_DIPNAME( 0xff, 0xff, DEF_STR( Unused ) ) @@ -3659,8 +3660,53 @@ static INPUT_PORTS_START( tygn ) INPUT_PORTS_END -static INPUT_PORTS_START( wlcc ) +static INPUT_PORTS_START( xymg ) PORT_START("DSW1") + PORT_DIPNAME( 0x03, 0x03, DEF_STR(Coinage) ) PORT_DIPLOCATION("SW1:1,2") // 投幣比率 + PORT_DIPSETTING( 0x03, DEF_STR(1C_1C) ) + PORT_DIPSETTING( 0x02, DEF_STR(1C_2C) ) + PORT_DIPSETTING( 0x01, DEF_STR(1C_3C) ) + PORT_DIPSETTING( 0x00, DEF_STR(1C_4C) ) + PORT_DIPNAME( 0x0c, 0x0c, "Key-in Rate" ) PORT_DIPLOCATION("SW1:3,4") // 開分比率 + PORT_DIPSETTING( 0x0c, "10" ) + PORT_DIPSETTING( 0x08, "20" ) + PORT_DIPSETTING( 0x04, "50" ) + PORT_DIPSETTING( 0x00, "100" ) + PORT_DIPNAME( 0x10, 0x10, "Credit Limit" ) PORT_DIPLOCATION("SW1:5") // 進分上限 + PORT_DIPSETTING( 0x10, "500" ) + PORT_DIPSETTING( 0x00, "Unlimited" ) // 無限制 (if you have 10,000 or more credits, further credits will be rejected) + PORT_DIPNAME( 0x20, 0x20, "Credit Mode" ) PORT_DIPLOCATION("SW1:6") // 進分方式 + PORT_DIPSETTING( 0x20, "Coin Acceptor" ) // 投幣 + PORT_DIPSETTING( 0x00, "Key-In" ) // 開分 + PORT_DIPNAME( 0x40, 0x40, "Payout Mode" ) PORT_DIPLOCATION("SW1:7") // 退分方式 + PORT_DIPSETTING( 0x40, "Return Coins" ) // 退幣 + PORT_DIPSETTING( 0x00, "Key-Out" ) // 洗分 + PORT_DIPNAME( 0x80, 0x80, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("SW1:8") // 示範音樂 + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x80, DEF_STR(On) ) // 有 + + PORT_START("DSW2") + PORT_DIPNAME( 0x03, 0x03, "Double Up Jackpot" ) PORT_DIPLOCATION("SW2:1,2") // 比倍爆機 + PORT_DIPSETTING( 0x03, "1000" ) + PORT_DIPSETTING( 0x02, "1500" ) + PORT_DIPSETTING( 0x01, "2000" ) + PORT_DIPSETTING( 0x00, "3000" ) + PORT_DIPNAME( 0x0c, 0x0c, "Minimum Bet" ) PORT_DIPLOCATION("SW2:3,4") // 最小押注 + PORT_DIPSETTING( 0x0c, "1" ) + PORT_DIPSETTING( 0x08, "2" ) + PORT_DIPSETTING( 0x04, "3" ) + PORT_DIPSETTING( 0x00, "5" ) + PORT_DIPNAME( 0x10, 0x10, "Double Up Game" ) PORT_DIPLOCATION("SW2:5") // 比倍遊戲 + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x10, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x20, 0x20, "Title Screen" ) PORT_DIPLOCATION("SW2:6" ) // (not shown in settings display) + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // (shows disclaimer and copyright message over black background) + PORT_DIPSETTING( 0x20, DEF_STR(On) ) + PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "SW2:7" ) // (not shown in settings display) + PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "SW2:8" ) // (not shown in settings display) + + // FIXME: SW3 doesn't respond in input test - are these hooked up correctly? + PORT_START("DSW3") PORT_DIPUNKNOWN( 0x01, 0x01 ) PORT_DIPUNKNOWN( 0x02, 0x02 ) PORT_DIPUNKNOWN( 0x04, 0x04 ) @@ -3670,77 +3716,113 @@ static INPUT_PORTS_START( wlcc ) PORT_DIPUNKNOWN( 0x40, 0x40 ) PORT_DIPUNKNOWN( 0x80, 0x80 ) + // TODO: hook up SW4 shown in input test but not settings display + // TODO: hook up SW5 shown in input test but not settings display + + PORT_START("COIN") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(FUNC(igs011_state::igs_hopper_r)) // hopper switch + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) // keep pressed while booting + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // stats + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CONDITION("DSW1", 0x20, EQUALS, 0x20) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) PORT_CONDITION("DSW1", 0x20, EQUALS, 0x00) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CONDITION("DSW1", 0x40, EQUALS, 0x40) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_CONDITION("DSW1", 0x40, EQUALS, 0x00) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + + PORT_INCLUDE(igs_mahjong_matrix) +INPUT_PORTS_END + + +static INPUT_PORTS_START( wlcc ) + PORT_START("DSW1") + PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x01, "SW3:1" ) // (not shown in settings display) + PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x02, "SW3:2" ) // (not shown in settings display) + PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x04, "SW3:3" ) // (not shown in settings display) + PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "SW3:4" ) // (not shown in settings display) + PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "SW3:5" ) // (not shown in settings display) + PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "SW3:6" ) // (not shown in settings display) + PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "SW3:7" ) // (not shown in settings display) + PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "SW3:8" ) // (not shown in settings display) + PORT_START("DSW2") - PORT_DIPNAME( 0x03, 0x03, DEF_STR( Unknown ) ) + PORT_DIPNAME( 0x03, 0x03, "Double Up Jackpot" ) PORT_DIPLOCATION("SW2:1,2") // 比倍爆機 PORT_DIPSETTING( 0x03, "1000" ) PORT_DIPSETTING( 0x02, "1500" ) PORT_DIPSETTING( 0x01, "2000" ) PORT_DIPSETTING( 0x00, "3000" ) - PORT_DIPNAME( 0x0c, 0x0c, "Min Bet" ) + PORT_DIPNAME( 0x0c, 0x0c, "Minimum Bet" ) PORT_DIPLOCATION("SW2:3,4") // 最小押注 PORT_DIPSETTING( 0x0c, "1" ) PORT_DIPSETTING( 0x08, "2" ) PORT_DIPSETTING( 0x04, "3" ) PORT_DIPSETTING( 0x00, "5" ) - PORT_DIPUNKNOWN( 0x10, 0x10 ) // shown in test mode - PORT_DIPUNKNOWN( 0x20, 0x20 ) - PORT_DIPNAME( 0x40, 0x40, "Hide Title" ) - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPUNKNOWN( 0x80, 0x80 ) + PORT_DIPNAME( 0x10, 0x10, "Double Up Game" ) PORT_DIPLOCATION("SW2:5") // 比倍遊戲 + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x10, DEF_STR(On) ) // 有 + PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "SW2:6" ) // (not shown in settings display) + PORT_DIPNAME( 0x40, 0x40, "Title Screen" ) PORT_DIPLOCATION("SW2:7" ) // (not shown in settings display) + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // (shows disclaimer and copyright message over black background) + PORT_DIPSETTING( 0x40, DEF_STR(On) ) + PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "SW2:8" ) // (not shown in settings display) PORT_START("DSW3") - PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 1C_4C ) ) - PORT_DIPNAME( 0x0c, 0x0c, "Credits Per Note" ) + PORT_DIPNAME( 0x03, 0x03, DEF_STR(Coinage) ) PORT_DIPLOCATION("SW1:1,2") // 投幣比率 + PORT_DIPSETTING( 0x03, DEF_STR(1C_1C) ) + PORT_DIPSETTING( 0x02, DEF_STR(1C_2C) ) + PORT_DIPSETTING( 0x01, DEF_STR(1C_3C) ) + PORT_DIPSETTING( 0x00, DEF_STR(1C_4C) ) + PORT_DIPNAME( 0x0c, 0x0c, "Key-in Rate" ) PORT_DIPLOCATION("SW1:3,4") // 開分比率 PORT_DIPSETTING( 0x0c, "10" ) PORT_DIPSETTING( 0x08, "20" ) PORT_DIPSETTING( 0x04, "50" ) PORT_DIPSETTING( 0x00, "100" ) - PORT_DIPNAME( 0x10, 0x10, "Max Note Credits" ) + PORT_DIPNAME( 0x10, 0x10, "Credit Limit" ) PORT_DIPLOCATION("SW1:5") // 進分上限 PORT_DIPSETTING( 0x10, "500" ) - PORT_DIPSETTING( 0x00, "9999" ) - PORT_DIPNAME( 0x20, 0x20, "Money Type" ) - PORT_DIPSETTING( 0x20, "Coins" ) // use bits 0-1 - PORT_DIPSETTING( 0x00, "Notes" ) // use bits 2-3 - PORT_DIPNAME( 0x40, 0x00, "Pay Out Type" ) - PORT_DIPSETTING( 0x00, "Coins" ) - PORT_DIPSETTING( 0x40, "Notes" ) - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Demo_Sounds ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x80, DEF_STR( On ) ) + PORT_DIPSETTING( 0x00, "Unlimited" ) // 無限制 (if you have 10,000 or more credits, further credits will be rejected) + PORT_DIPNAME( 0x20, 0x20, "Credit Mode" ) PORT_DIPLOCATION("SW1:6") // 進分方式 + PORT_DIPSETTING( 0x20, "Coin Acceptor" ) // 投幣 + PORT_DIPSETTING( 0x00, "Key-In" ) // 開分 + PORT_DIPNAME( 0x40, 0x40, "Payout Mode" ) PORT_DIPLOCATION("SW1:7") // 退分方式 + PORT_DIPSETTING( 0x40, "Return Coins" ) // 退幣 + PORT_DIPSETTING( 0x00, "Key-Out" ) // 洗分 + PORT_DIPNAME( 0x80, 0x80, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("SW1:8") // 示範音樂 + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x80, DEF_STR(On) ) // 有 PORT_START("DSW4") - PORT_DIPUNKNOWN( 0x01, 0x01 ) - PORT_DIPUNKNOWN( 0x02, 0x02 ) - PORT_DIPUNKNOWN( 0x04, 0x04 ) - PORT_DIPUNKNOWN( 0x08, 0x08 ) - PORT_DIPUNKNOWN( 0x10, 0x10 ) - PORT_DIPUNKNOWN( 0x20, 0x20 ) - PORT_DIPUNKNOWN( 0x40, 0x40 ) - PORT_DIPUNKNOWN( 0x80, 0x80 ) + PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x01, "SW4:1" ) // (not shown in settings display) + PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x02, "SW4:2" ) // (not shown in settings display) + PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x04, "SW4:3" ) // (not shown in settings display) + PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "SW4:4" ) // (not shown in settings display) + PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "SW4:5" ) // (not shown in settings display) + PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "SW4:6" ) // (not shown in settings display) + PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "SW4:7" ) // (not shown in settings display) + PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "SW4:8" ) // (not shown in settings display) + + // TODO: hook up SW5 shown in input test but not settings display PORT_START("COIN") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) // keep pressed while booting - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE2 ) // shown in test mode - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Pay Out") PORT_CODE(KEYCODE_O) // clear coin - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(FUNC(igs011_state::igs_hopper_r)) // hopper switch + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CONDITION("DSW3", 0x20, EQUALS, 0x20) // 投幣 + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) PORT_CONDITION("DSW3", 0x20, EQUALS, 0x00) // 投幣 + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) // 測試 + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // 査帳 + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // 清除 + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CONDITION("DSW3", 0x40, EQUALS, 0x40) // 退幣 + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_CONDITION("DSW3", 0x40, EQUALS, 0x00) // 退幣 + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(FUNC(igs011_state::igs_hopper_r)) // hopper switch PORT_START("IN0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) // 開始/得分 PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) // bet - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) // 摸/捨 大/雙比倍 + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) // 押注 全比倍 + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 ) // 功能 小/半比倍 INPUT_PORTS_END @@ -4018,76 +4100,6 @@ static INPUT_PORTS_START( vbowlj ) INPUT_PORTS_END -static INPUT_PORTS_START( xymg ) - PORT_START("DSW1") - PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:1,2") // 投幣比率 - PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 1C_4C ) ) - PORT_DIPNAME( 0x0c, 0x0c, "Key-in Rate" ) PORT_DIPLOCATION("SW1:3,4") // 開分比率 - PORT_DIPSETTING( 0x0c, "10" ) - PORT_DIPSETTING( 0x08, "20" ) - PORT_DIPSETTING( 0x04, "50" ) - PORT_DIPSETTING( 0x00, "100" ) - PORT_DIPNAME( 0x10, 0x10, "Credit Limit" ) PORT_DIPLOCATION("SW1:5") // 進分上限 - PORT_DIPSETTING( 0x10, "500" ) - PORT_DIPSETTING( 0x00, "Unlimited" ) // 無限制 (if you have 10,000 or more credits, further credits will be rejected) - PORT_DIPNAME( 0x20, 0x20, "Credit Mode" ) PORT_DIPLOCATION("SW1:6") // 進分方式 - PORT_DIPSETTING( 0x20, "Coin Acceptor" ) // 投幣 - PORT_DIPSETTING( 0x00, "Key-In" ) // 開分 - PORT_DIPNAME( 0x40, 0x40, "Payout Mode" ) PORT_DIPLOCATION("SW1:7") // 退分方式 - PORT_DIPSETTING( 0x40, "Return Coins" ) // 退幣 - PORT_DIPSETTING( 0x00, "Key-Out" ) // 洗分 - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:8") // 示範音樂 - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) // 無 - PORT_DIPSETTING( 0x80, DEF_STR( On ) ) // 有 - - PORT_START("DSW2") - PORT_DIPNAME( 0x03, 0x03, "Double Up Jackpot" ) PORT_DIPLOCATION("SW2:1,2") // 比倍爆機 - PORT_DIPSETTING( 0x03, "1000" ) - PORT_DIPSETTING( 0x02, "1500" ) - PORT_DIPSETTING( 0x01, "2000" ) - PORT_DIPSETTING( 0x00, "3000" ) - PORT_DIPNAME( 0x0c, 0x0c, "Minimum Bet" ) PORT_DIPLOCATION("SW2:3,4") // 最小押注 - PORT_DIPSETTING( 0x0c, "1" ) - PORT_DIPSETTING( 0x08, "2" ) - PORT_DIPSETTING( 0x04, "3" ) - PORT_DIPSETTING( 0x00, "5" ) - PORT_DIPNAME( 0x10, 0x10, "Double Up Game" ) PORT_DIPLOCATION("SW2:5") // 比倍遊戲 - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) // 無 - PORT_DIPSETTING( 0x10, DEF_STR( On ) ) // 有 - PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "SW2:6" ) // (not shown in settings display) - PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "SW2:7" ) // (not shown in settings display) - PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "SW2:8" ) // (not shown in settings display) - - // FIXME: SW3 doesn't respond in input test - are these hooked up correctly? - PORT_START("DSW3") - PORT_DIPUNKNOWN( 0x01, 0x01 ) - PORT_DIPUNKNOWN( 0x02, 0x02 ) - PORT_DIPUNKNOWN( 0x04, 0x04 ) - PORT_DIPUNKNOWN( 0x08, 0x08 ) - PORT_DIPUNKNOWN( 0x10, 0x10 ) - PORT_DIPUNKNOWN( 0x20, 0x20 ) - PORT_DIPUNKNOWN( 0x40, 0x40 ) - PORT_DIPUNKNOWN( 0x80, 0x80 ) - - PORT_START("COIN") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(FUNC(igs011_state::igs_hopper_r)) // hopper switch - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) // keep pressed while booting - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // stats - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CONDITION("DSW1", 0x20, EQUALS, 0x20) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) PORT_CONDITION("DSW1", 0x20, EQUALS, 0x00) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CONDITION("DSW1", 0x40, EQUALS, 0x40) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_CONDITION("DSW1", 0x40, EQUALS, 0x00) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - PORT_INCLUDE(igs_mahjong_matrix) -INPUT_PORTS_END - - /*************************************************************************** Machine Drivers @@ -4141,7 +4153,8 @@ void igs011_state::igs011_base(machine_config &config) PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 0x2000/4); m_palette->set_membits(8); -// GFXDECODE(config, "gfxdecode", m_palette, gfx_igs011); + + //GFXDECODE(config, "gfxdecode", m_palette, gfx_igs011); /* sound hardware */ SPEAKER(config, "mono").front_center(); @@ -4158,8 +4171,10 @@ TIMER_DEVICE_CALLBACK_MEMBER( igs011_state::timer_irq_cb ) void igs011_state::drgnwrld(machine_config &config) { igs011_base(config); + m_maincpu->set_addrmap(AS_PROGRAM, &igs011_state::drgnwrld_mem); m_maincpu->set_vblank_int("screen", FUNC(igs011_state::irq6_line_hold)); + TIMER(config, "timer_irq").configure_periodic(FUNC(igs011_state::timer_irq_cb<5>), attotime::from_hz(240)); // lev5 frequency drives the music tempo YM3812(config, "ymsnd", XTAL(3'579'545)).add_route(ALL_OUTPUTS, "mono", 2.0); @@ -4168,6 +4183,7 @@ void igs011_state::drgnwrld(machine_config &config) void igs011_state::drgnwrld_igs012(machine_config &config) { drgnwrld(config); + m_maincpu->set_addrmap(AS_PROGRAM, &igs011_state::drgnwrld_igs012_mem); } @@ -4191,8 +4207,10 @@ TIMER_DEVICE_CALLBACK_MEMBER( igs011_state::lhb_timer_irq_cb ) void igs011_state::lhb(machine_config &config) { igs011_base(config); + m_maincpu->set_addrmap(AS_PROGRAM, &igs011_state::lhb_mem); m_maincpu->set_vblank_int("screen", FUNC(igs011_state::lhb_vblank_irq)); + TIMER(config, "timer_irq").configure_periodic(FUNC(igs011_state::lhb_timer_irq_cb), attotime::from_hz(240)); // lev5 frequency drives the music tempo // irq 3 points to an apparently unneeded routine } @@ -4200,8 +4218,10 @@ void igs011_state::lhb(machine_config &config) void igs011_state::wlcc(machine_config &config) { igs011_base(config); + m_maincpu->set_addrmap(AS_PROGRAM, &igs011_state::wlcc_mem); m_maincpu->set_vblank_int("screen", FUNC(igs011_state::irq6_line_hold)); + TIMER(config, "timer_irq").configure_periodic(FUNC(igs011_state::timer_irq_cb<3>), attotime::from_hz(240)); // lev3 frequency drives the music tempo } @@ -4209,8 +4229,10 @@ void igs011_state::wlcc(machine_config &config) void igs011_state::xymg(machine_config &config) { igs011_base(config); + m_maincpu->set_addrmap(AS_PROGRAM, &igs011_state::xymg_mem); m_maincpu->set_vblank_int("screen", FUNC(igs011_state::irq6_line_hold)); + TIMER(config, "timer_irq").configure_periodic(FUNC(igs011_state::timer_irq_cb<3>), attotime::from_hz(240)); // lev3 frequency drives the music tempo } @@ -4218,6 +4240,7 @@ void igs011_state::xymg(machine_config &config) void igs011_state::xymga(machine_config &config) { xymg(config); + m_maincpu->set_addrmap(AS_PROGRAM, &igs011_state::xymga_mem); } @@ -4225,11 +4248,13 @@ void igs011_state::xymga(machine_config &config) void igs011_state::lhb2(machine_config &config) { igs011_base(config); + m_maincpu->set_addrmap(AS_PROGRAM, &igs011_state::lhb2_mem); m_maincpu->set_vblank_int("screen", FUNC(igs011_state::irq6_line_hold)); + TIMER(config, "timer_irq").configure_periodic(FUNC(igs011_state::timer_irq_cb<5>), attotime::from_hz(240)); // lev5 frequency drives the music tempo -// GFXDECODE(config, "gfxdecode", m_palette, gfx_igs011_hi); + //GFXDECODE(config, "gfxdecode", m_palette, gfx_igs011_hi); YM2413(config, "ymsnd", XTAL(3'579'545)).add_route(ALL_OUTPUTS, "mono", 2.0); } @@ -4238,13 +4263,15 @@ void igs011_state::lhb2(machine_config &config) void igs011_state::nkishusp(machine_config &config) { igs011_base(config); + m_maincpu->set_addrmap(AS_PROGRAM, &igs011_state::nkishusp_mem); m_maincpu->set_vblank_int("screen", FUNC(igs011_state::irq6_line_hold)); + TIMER(config, "timer_irq").configure_periodic(FUNC(igs011_state::timer_irq_cb<3>), attotime::from_hz(240)); // lev3 frequency drives the music tempo // VSync 60.0052Hz, HSync 15.620kHz -// GFXDECODE(config, "gfxdecode", m_palette, gfx_igs011_hi); + //GFXDECODE(config, "gfxdecode", m_palette, gfx_igs011_hi); YM2413(config, "ymsnd", XTAL(3'579'545)).add_route(ALL_OUTPUTS, "mono", 2.0); } @@ -4253,28 +4280,32 @@ void igs011_state::nkishusp(machine_config &config) void igs011_state::tygn(machine_config &config) { nkishusp(config); + m_maincpu->set_addrmap(AS_PROGRAM, &igs011_state::tygn_mem); } void vbowl_state::sound_irq(int state) { -// m_maincpu->set_input_line(3, state); + //m_maincpu->set_input_line(3, state); } void vbowl_state::vbowl(machine_config &config) { igs011_base(config); + m_maincpu->set_addrmap(AS_PROGRAM, &vbowl_state::vbowl_mem); m_maincpu->set_vblank_int("screen", FUNC(vbowl_state::irq6_line_hold)); + TIMER(config, "timer_irq").configure_periodic(FUNC(vbowl_state::timer_irq_cb<3>), attotime::from_hz(240)); // lev3 frequency drives the music tempo // irq 5 points to a debug function (all routines are clearly patched out) // irq 4 points to an apparently unneeded routine m_screen->screen_vblank().set(FUNC(vbowl_state::screen_vblank)); -// GFXDECODE(config, "gfxdecode", m_palette, gfx_igs011_hi); + //GFXDECODE(config, "gfxdecode", m_palette, gfx_igs011_hi); config.device_remove("oki"); + ICS2115(config, m_ics, 33.8688_MHz_XTAL); m_ics->irq().set(FUNC(vbowl_state::sound_irq)); m_ics->add_route(ALL_OUTPUTS, "mono", 5.0); @@ -4283,6 +4314,7 @@ void vbowl_state::vbowl(machine_config &config) void vbowl_state::vbowlhk(machine_config &config) { vbowl(config); + m_maincpu->set_addrmap(AS_PROGRAM, &vbowl_state::vbowlhk_mem); } @@ -4592,7 +4624,7 @@ ROM_END /*************************************************************************** - 龙虎榜/Lóng hǔ bǎng (V035C) + 龙虎榜/Lóng Hǔ Bǎng (V035C) Other files in the zip: @@ -5108,7 +5140,7 @@ GAME( 1995, dbc, lhb, lhb, lhb, igs011_state, i GAME( 1995, ryukobou, lhb, lhb, lhb, igs011_state, init_ryukobou, ROT0, "IGS / Alta", "Mahjong Ryukobou (Japan, V030J)", MACHINE_SUPPORTS_SAVE ) GAME( 1996, lhb2, 0, lhb2, lhb2, igs011_state, init_lhb2, ROT0, "IGS", "Lung Fu Bong II (Hong Kong, V185H)", MACHINE_SUPPORTS_SAVE ) GAME( 1996, tygn, lhb2, tygn, tygn, igs011_state, init_tygn, ROT0, "IGS", "Te Yi Gong Neng (China, V632C)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION ) // ROM patches -GAME( 1996, lhb3, lhb2, nkishusp, nkishusp, igs011_state, init_lhb3, ROT0, "IGS", "Long Hu Bang III: Cuo Pai Gaoshou (China, V242C)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION ) // ROM patches +GAME( 1996, lhb3, lhb2, nkishusp, lhb2, igs011_state, init_lhb3, ROT0, "IGS", "Long Hu Bang III: Cuo Pai Gaoshou (China, V242C)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION ) // ROM patches GAME( 1996, xymg, 0, xymg, xymg, igs011_state, init_xymg, ROT0, "IGS", "Xingyun Manguan (China, V651C, set 1)", MACHINE_SUPPORTS_SAVE ) GAME( 1996, xymga, xymg, xymga, xymg, igs011_state, init_xymga, ROT0, "IGS", "Xingyun Manguan (China, V651C, set 2)", MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) // different encryption and without IGS003 GAME( 1996, wlcc, xymg, wlcc, wlcc, igs011_state, init_wlcc, ROT0, "IGS", "Wanli Changcheng (China, V638C)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index e0748b1b59a..50e3d6a2d8d 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -15622,6 +15622,7 @@ batcira batcird batcirj choko +chokop csclub csclub1 csclub1d @@ -15759,6 +15760,7 @@ progearud pzloop2 pzloop2j pzloop2jd +pzloop2jp pzloop2jr1 qndream ringdest @@ -16247,6 +16249,7 @@ pb2000c @source:casio/pickytlk.cpp jd363 jd364 +jd366 jd368 pickydis pickytlk @@ -18639,9 +18642,13 @@ snowboar snowboara srollnd touchgo -touchgoe -touchgon -touchgok +touchgoa +touchgona +touchgonna +touchgonnaa +touchgonnab +touchgonnac +touchgoun wrally2 wrally2a @@ -28577,6 +28584,7 @@ tvpoker @source:misc/acefruit.cpp acefruit +flshback sidewndr spellbnd starspnr diff --git a/src/mame/misc/acefruit.cpp b/src/mame/misc/acefruit.cpp index 700a493d163..2202ab7620d 100644 --- a/src/mame/misc/acefruit.cpp +++ b/src/mame/misc/acefruit.cpp @@ -41,9 +41,9 @@ public: m_refresh_timer(nullptr) { } - void acefruit(machine_config &config); + void acefruit(machine_config &config) ATTR_COLD; - void init_sidewndr(); + void init_sidewndr() ATTR_COLD; template <int Mask> int sidewndr_payout_r(); template <int Mask> int starspnr_coinage_r(); @@ -88,14 +88,14 @@ private: void acefruit_state::update_irq(int vpos) { - int row = vpos / 8; + const int row = vpos / 8; - for( int col = 0; col < 32; col++ ) + for (int col = 0; col < 32; col++) { - int tile_index = ( col * 32 ) + row; - int color = m_colorram[ tile_index ]; + const int tile_index = (col * 32) + row; + const int color = m_colorram[tile_index]; - switch( color ) + switch (color) { case 0x0c: m_maincpu->set_input_line(0, HOLD_LINE); @@ -106,14 +106,14 @@ void acefruit_state::update_irq(int vpos) TIMER_CALLBACK_MEMBER(acefruit_state::refresh_tick) { - int vpos = m_screen->vpos(); + const int vpos = m_screen->vpos(); m_screen->update_partial(vpos); update_irq(vpos); - vpos = ((vpos / 8) + 1) * 8; + const int next_vpos = ((vpos / 8) + 1) * 8; - m_refresh_timer->adjust(m_screen->time_until_pos(vpos)); + m_refresh_timer->adjust(m_screen->time_until_pos(next_vpos)); } void acefruit_state::machine_start() @@ -129,46 +129,46 @@ void acefruit_state::video_start() INTERRUPT_GEN_MEMBER(acefruit_state::vblank) { - device.execute().set_input_line(0, HOLD_LINE ); - m_refresh_timer->adjust( attotime::zero ); + device.execute().set_input_line(0, HOLD_LINE); + m_refresh_timer->adjust(attotime::zero); } uint32_t acefruit_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - int startrow = cliprect.min_y / 8; - int endrow = cliprect.max_y / 8; + const int startrow = cliprect.min_y / 8; + const int endrow = cliprect.max_y / 8; - for( int row = startrow; row <= endrow; row++ ) + for (int row = startrow; row <= endrow; row++) { int spriterow = 0; int spriteindex = 0; int spriteparameter = 0; - for( int col = 0; col < 32; col++ ) + for (int col = 0; col < 32; col++) { - int tile_index = ( col * 32 ) + row; - int code = m_videoram[ tile_index ]; - int color = m_colorram[ tile_index ]; + const int tile_index = (col * 32) + row; + const int code = m_videoram[tile_index]; + const int color = m_colorram[tile_index]; - if( color < 0x4 ) + if (color < 0x4) { m_gfxdecode->gfx(1)->opaque(bitmap,cliprect, code, color, 0, 0, col * 16, row * 8 ); } - else if( color >= 0x5 && color <= 0x7 ) + else if (color >= 0x5 && color <= 0x7) { - static const int spriteskip[] = { 1, 2, 4 }; - int spritesize = spriteskip[ color - 5 ]; - gfx_element *gfx = m_gfxdecode->gfx(0); + constexpr int spriteskip[] = { 1, 2, 4 }; + const int spritesize = spriteskip[color - 5]; + gfx_element &gfx = *m_gfxdecode->gfx(0); - for( int x = 0; x < 16; x++ ) + for (int x = 0; x < 16; x++) { - int sprite = ( m_spriteram[ ( spriteindex / 64 ) % 6 ] & 0xf ) ^ 0xf; - const uint8_t *gfxdata = gfx->get_data(sprite); + const int sprite = (m_spriteram[(spriteindex / 64) % 6] & 0xf) ^ 0xf; + uint8_t const *const gfxdata = gfx.get_data(sprite); - for( int y = 0; y < 8; y++ ) + for (int y = 0; y < 8; y++) { - uint16_t *dst = &bitmap.pix(y + ( row * 8 ), x + ( col * 16 ) ); - *( dst ) = *( gfxdata + ( ( spriterow + y ) * gfx->rowbytes() ) + ( ( spriteindex % 64 ) >> 1 ) ); + uint16_t &dst = bitmap.pix(y + (row * 8), x + (col * 16)); + dst = gfxdata[((spriterow + y) * gfx.rowbytes()) + ((spriteindex % 64) >> 1)]; } spriteindex += spritesize; @@ -176,30 +176,30 @@ uint32_t acefruit_state::screen_update(screen_device &screen, bitmap_ind16 &bitm } else { - for( int x = 0; x < 16; x++ ) + for (int x = 0; x < 16; x++) { - for( int y = 0; y < 8; y++ ) + for (int y = 0; y < 8; y++) { - uint16_t *dst = &bitmap.pix(y + ( row * 8 ), x + ( col * 16 ) ); - *( dst ) = 0; + uint16_t &dst = bitmap.pix(y + (row * 8), x + (col * 16)); + dst = 0; } } - if( color == 0x8 ) + if (color == 0x8) { - if( spriteparameter == 0 ) + if (spriteparameter == 0) { spriteindex = code & 0xf; } else { - spriterow = ( ( code >> 0 ) & 0x3 ) * 8; - spriteindex += ( ( code >> 2 ) & 0x1 ) * 16; + spriterow = ((code >> 0) & 0x3) * 8; + spriteindex += ((code >> 2) & 0x1) * 16; } spriteparameter = !spriteparameter; } - else if( color == 0xc ) + else if (color == 0xc) { /* irq generated in update_irq() */ } @@ -242,7 +242,7 @@ int acefruit_state::starspnr_payout_r() void acefruit_state::colorram_w(offs_t offset, uint8_t data) { - m_colorram[ offset ] = data & 0xf; + m_colorram[offset] = data & 0xf; } void acefruit_state::coin_w(uint8_t data) @@ -252,7 +252,22 @@ void acefruit_state::coin_w(uint8_t data) void acefruit_state::sound_w(uint8_t data) { - /* TODO: ? */ + /* TODO: + PCB pictures suggest that the sound hardware has the part numbers scraped + off. There's a 14 pin package that looks involved. + + Pin 36 10V on P2 seems to go to possibly a low voltage reset circuit + (mentioned in the manual) at the top left of the board H 13. + + Pin 35 (sound output) seems to go to the TIP120 transistor at position F2 on + the board. The emitter is connected to ground, and the collector goes to + pin 35 of P2. The base is connected to pin 8 of the 14 pin IC located at H3 + on the board near the crystal via the 1K resistor just above the transistor. + + 7048 maybe? + + */ + } void acefruit_state::lamp_w(offs_t offset, uint8_t data) @@ -264,30 +279,32 @@ void acefruit_state::lamp_w(offs_t offset, uint8_t data) void acefruit_state::solenoid_w(uint8_t data) { for (int i = 0; i < 8; i++) + { m_solenoids[i] = BIT(data, i); + } } void acefruit_state::palette_init(palette_device &palette) const { /* sprites */ - palette.set_pen_color( 0, rgb_t(0x00, 0x00, 0x00) ); - palette.set_pen_color( 1, rgb_t(0x00, 0x00, 0xff) ); - palette.set_pen_color( 2, rgb_t(0x00, 0xff, 0x00) ); - palette.set_pen_color( 3, rgb_t(0xff, 0x7f, 0x00) ); - palette.set_pen_color( 4, rgb_t(0xff, 0x00, 0x00) ); - palette.set_pen_color( 5, rgb_t(0xff, 0xff, 0x00) ); - palette.set_pen_color( 6, rgb_t(0xff, 0xff, 0xff) ); - palette.set_pen_color( 7, rgb_t(0x7f, 0x3f, 0x1f) ); + palette.set_pen_color(0, rgb_t(0x00, 0x00, 0x00)); + palette.set_pen_color(1, rgb_t(0x00, 0x00, 0xff)); + palette.set_pen_color(2, rgb_t(0x00, 0xff, 0x00)); + palette.set_pen_color(3, rgb_t(0xff, 0x7f, 0x00)); + palette.set_pen_color(4, rgb_t(0xff, 0x00, 0x00)); + palette.set_pen_color(5, rgb_t(0xff, 0xff, 0x00)); + palette.set_pen_color(6, rgb_t(0xff, 0xff, 0xff)); + palette.set_pen_color(7, rgb_t(0x7f, 0x3f, 0x1f)); /* tiles */ - palette.set_pen_color( 8, rgb_t(0x00, 0x00, 0x00) ); - palette.set_pen_color( 9, rgb_t(0xff, 0xff, 0xff) ); - palette.set_pen_color( 10, rgb_t(0x00, 0x00, 0x00) ); - palette.set_pen_color( 11, rgb_t(0x00, 0x00, 0xff) ); - palette.set_pen_color( 12, rgb_t(0x00, 0x00, 0x00) ); - palette.set_pen_color( 13, rgb_t(0x00, 0xff, 0x00) ); - palette.set_pen_color( 14, rgb_t(0x00, 0x00, 0x00) ); - palette.set_pen_color( 15, rgb_t(0xff, 0x00, 0x00) ); + palette.set_pen_color(8, rgb_t(0x00, 0x00, 0x00) ); + palette.set_pen_color(9, rgb_t(0xff, 0xff, 0xff) ); + palette.set_pen_color(10, rgb_t(0x00, 0x00, 0x00) ); + palette.set_pen_color(11, rgb_t(0xff, 0x00, 0x00) ); + palette.set_pen_color(12, rgb_t(0x00, 0x00, 0x00) ); + palette.set_pen_color(13, rgb_t(0x00, 0xff, 0x00) ); + palette.set_pen_color(14, rgb_t(0x00, 0x00, 0x00) ); + palette.set_pen_color(15, rgb_t(0x00, 0x00, 0xff) ); } void acefruit_state::main_map(address_map &map) @@ -331,7 +348,7 @@ static INPUT_PORTS_START( sidewndr ) PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME( "Sidewind" ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME( "Collect" ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) /* "Cash in" */ - PORT_DIPNAME( 0x08, 0x00, "Accountacy System Texts" ) + PORT_DIPNAME( 0x08, 0x00, "Accountancy System Texts" ) PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -395,6 +412,7 @@ static INPUT_PORTS_START( sidewndr ) PORT_DIPSETTING( 0x03, "86%" ) INPUT_PORTS_END + static INPUT_PORTS_START( spellbnd ) PORT_INCLUDE(sidewndr) @@ -413,7 +431,7 @@ static INPUT_PORTS_START( spellbnd ) PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME( "Cancel" ) /* see IN4 bit 0 in "Accountancy System" mode */ PORT_MODIFY("IN4") - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE3 ) PORT_NAME( "Clear Data" ) /* in "Accountancy System" mode */ + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_NAME( "Clear Data" ) /* in "Accountancy System" mode */ /* Similar to 'sidewndr' but different addresses */ PORT_DIPNAME( 0x04, 0x04, "Lamp 11 always ON" ) /* code at 0x072a - write lamp status at 0x00ff */ PORT_DIPSETTING( 0x00, DEF_STR( No ) ) @@ -609,12 +627,13 @@ void acefruit_state::acefruit(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); /* sound hardware */ + } void acefruit_state::init_sidewndr() { uint8_t *ROM = memregion("maincpu")->base(); - /* replace "ret nc" ( 0xd0 ) with "di" */ + /* replace "ret nc" (0xd0) with "di" */ ROM[0] = 0xf3; /* this is either a bad dump or the cpu core should set the carry flag on reset */ } @@ -625,6 +644,20 @@ void acefruit_state::init_sidewndr() ***************************************************************************/ +ROM_START( flshback ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "h9.bin", 0x000000, 0x000800, CRC(158717a1) SHA1(8dd498853e5e74aafb52bb1dd3fcf07a387c3fb3) ) + ROM_LOAD( "h10.bin", 0x000800, 0x000800, CRC(1f35df6e) SHA1(b371b6bc34d082a4740af34b2f285a2f3c6fd5e6) ) + ROM_LOAD( "h11.bin", 0x001000, 0x000800, CRC(7db05abe) SHA1(81d01569050b4145f9f30075b0f7164873734b23) ) + ROM_LOAD( "h12.bin", 0x001800, 0x000800, CRC(5506468a) SHA1(00c0188f227e9be109bf512295798f0059f73216) ) + + ROM_REGION( 0x2000, "gfx1", 0 ) /* 8k for graphics */ + ROM_LOAD( "h5.bin", 0x000000, 0x000800, CRC(198da32c) SHA1(bf6c4ddcda0503095d310e08057dd88154952ef4) ) + ROM_LOAD( "h6.bin", 0x000800, 0x000800, CRC(e777130f) SHA1(3421c6f399e5ec749f1908f6b4ebff7761c6c5d9) ) + ROM_LOAD( "h7.bin", 0x001000, 0x000800, CRC(bfed5b8f) SHA1(f95074e8809297eec67da9d7e33ae1dd1c5eabc0) ) + ROM_LOAD( "h8.bin", 0x001800, 0x000800, CRC(562079ab) SHA1(4f1ee028d43b831d2d43352e2a0f2ddc6c212f69) ) +ROM_END + ROM_START( sidewndr ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "2_h09.bin", 0x000000, 0x000800, BAD_DUMP CRC(141f3b0c) SHA1(1704feba950fe7aa939b9ed54c37264d10527d11) ) @@ -753,6 +786,7 @@ ROM_END GAMEL( 1981?, sidewndr, 0, acefruit, sidewndr, acefruit_state, init_sidewndr, ROT270, "ACE", "Sidewinder", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_SOUND, layout_sidewndr ) GAMEL( 1981?, spellbnd, 0, acefruit, spellbnd, acefruit_state, empty_init, ROT270, "ACE", "Spellbound", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_SOUND, layout_sidewndr ) +GAME( 1982?, flshback, 0, acefruit, spellbnd, acefruit_state, empty_init, ROT270, "ACE", "Flashback", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) GAME( 1982?, starspnr, 0, acefruit, starspnr, acefruit_state, empty_init, ROT270, "ACE", "Starspinner (Dutch/Nederlands)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) GAME( 1982?, acefruit, 0, acefruit, spellbnd, acefruit_state, empty_init, ROT270, "ACE", "Silhouette", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) // inputs and video in bonus game need fixing on this one // not dumped: Magnum? diff --git a/src/mame/namco/mappy.cpp b/src/mame/namco/mappy.cpp index 794a02e5816..3feb0ef2f8c 100644 --- a/src/mame/namco/mappy.cpp +++ b/src/mame/namco/mappy.cpp @@ -839,7 +839,7 @@ static INPUT_PORTS_START( pacnpal ) PORT_DIPSETTING( 0x00, "30k Only" ) PORT_CONDITION("DSW1",0xc0,NOTEQUALS,0x00) PORT_DIPSETTING( 0x18, "30k & 70k Only" ) PORT_CONDITION("DSW1",0xc0,NOTEQUALS,0x00) PORT_DIPSETTING( 0x10, "30k & 80k Only" ) PORT_CONDITION("DSW1",0xc0,NOTEQUALS,0x00) - PORT_DIPSETTING( 0x28, "30k, 100k & Every 80k" ) PORT_CONDITION("DSW1",0xc0,NOTEQUALS,0x00) + PORT_DIPSETTING( 0x28, "30k, 80k & Every 80k" ) PORT_CONDITION("DSW1",0xc0,NOTEQUALS,0x00) PORT_DIPSETTING( 0x08, "30k & 100k Only" ) PORT_CONDITION("DSW1",0xc0,NOTEQUALS,0x00) PORT_DIPSETTING( 0x08, "30k Only" ) PORT_CONDITION("DSW1",0xc0,EQUALS,0x00) PORT_DIPSETTING( 0x00, "40k Only" ) PORT_CONDITION("DSW1",0xc0,EQUALS,0x00) diff --git a/src/mame/sega/m50dass.cpp b/src/mame/sega/m50dass.cpp index 5ed59972527..189f073261a 100644 --- a/src/mame/sega/m50dass.cpp +++ b/src/mame/sega/m50dass.cpp @@ -32,7 +32,7 @@ void m50dass_device::device_start() void m50dass_device::device_add_mconfig(machine_config &config) { - Z80(config, m_maincpu, 8_MHz_XTAL / 2); // Z0840004PSC, divider not verified + Z80(config, m_maincpu, 8_MHz_XTAL / 2).set_disable(); // Z0840004PSC, divider not verified SPEAKER(config, "mono").front_center(); YM2413(config, m_ym2413, 8_MHz_XTAL / 2).add_route(ALL_OUTPUTS, "mono", 0.8); // divider and configuration unknown diff --git a/src/mame/sega/model2_v.cpp b/src/mame/sega/model2_v.cpp index f0405ee7e2e..5706eae8dcc 100644 --- a/src/mame/sega/model2_v.cpp +++ b/src/mame/sega/model2_v.cpp @@ -2563,9 +2563,10 @@ void model2_state::geo_parse( void ) u32 address = (m_geo_read_start_address & 0x1ffff)/4; u32 *input = &m_bufferram[address]; u32 opcode; + u32 op_count = 0; bool end_code = false; - while( end_code == false && (input - m_bufferram) < 0x20000/4 ) + while( end_code == false && (input - m_bufferram) < 0x20000/4 && op_count++ < 0x8000 ) { /* read in the opcode */ opcode = *input++; |