diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/devices/cpu/rsp/rsp.cpp | 282 | ||||
-rw-r--r-- | src/devices/cpu/rsp/rsp.h | 46 | ||||
-rw-r--r-- | src/devices/cpu/z80/nsc800.cpp | 12 | ||||
-rw-r--r-- | src/devices/cpu/z80/z80.cpp | 33 | ||||
-rw-r--r-- | src/devices/cpu/z80/z80.h | 15 | ||||
-rw-r--r-- | src/devices/cpu/z80/z80.lst | 110 | ||||
-rw-r--r-- | src/devices/cpu/z80/z80make.py | 28 | ||||
-rw-r--r-- | src/devices/cpu/z80/z80n.h | 2 | ||||
-rw-r--r-- | src/frontend/mame/ui/info.cpp | 5 | ||||
-rw-r--r-- | src/mame/act/victor9k.cpp | 31 | ||||
-rw-r--r-- | src/mame/bmc/koftball.cpp | 158 | ||||
-rw-r--r-- | src/mame/gaelco/gaelco2.cpp | 169 | ||||
-rw-r--r-- | src/mame/igs/igs011.cpp | 97 | ||||
-rw-r--r-- | src/mame/mame.lst | 10 | ||||
-rw-r--r-- | src/mame/misc/sshanghai.cpp | 146 | ||||
-rw-r--r-- | src/mame/namco/mappy.cpp | 2 |
16 files changed, 684 insertions, 462 deletions
diff --git a/src/devices/cpu/rsp/rsp.cpp b/src/devices/cpu/rsp/rsp.cpp index f39d79b21bb..b58b7169e80 100644 --- a/src/devices/cpu/rsp/rsp.cpp +++ b/src/devices/cpu/rsp/rsp.cpp @@ -62,11 +62,6 @@ DEFINE_DEVICE_TYPE(RSP, rsp_device, "rsp", "Nintendo & SGI Reality Signal Proces #define ZERO 3 #define CLIP2 4 -#define SLICE_H 3 -#define SLICE_M 2 -#define SLICE_L 1 -#define SLICE_LL 0 - #define WRITEBACK_RESULT() memcpy(m_v[VDREG].s, vres, sizeof(uint16_t) * 8); static const int vector_elements_2[16][8] = @@ -265,7 +260,7 @@ void rsp_device::device_start() for (int regIdx = 0; regIdx < 32; regIdx++) m_r[regIdx] = 0; - for(auto & elem : m_v) + for (auto & elem : m_v) { elem.d[0] = 0; elem.d[1] = 0; @@ -284,7 +279,7 @@ void rsp_device::device_start() m_vector_busy = false; m_paired_busy = false; - for(auto & elem : m_accum) + for (auto & elem : m_accum) { elem.q = 0; } @@ -294,6 +289,35 @@ void rsp_device::device_start() m_sr = RSP_STATUS_HALT; m_step_count = 0; + // register for savestates + save_item(NAME(m_pc)); + save_item(NAME(m_r)); + save_item(NAME(m_ideduct)); + save_item(NAME(m_scalar_busy)); + save_item(NAME(m_vector_busy)); + save_item(NAME(m_paired_busy)); + + save_item(NAME(m_sr)); + save_item(NAME(m_step_count)); + save_item(NAME(m_ppc)); + save_item(NAME(m_nextpc)); + + save_item(NAME(m_vres)); + save_item(NAME(m_accum)); + save_item(NAME(m_vcarry)); + save_item(NAME(m_vcompare)); + save_item(NAME(m_vclip1)); + save_item(NAME(m_vzero)); + save_item(NAME(m_vclip2)); + + for (int i = 0; i < std::size(m_v); i++) + save_item(NAME(m_v[i].d), i); + + save_item(NAME(m_reciprocal_res)); + save_item(NAME(m_reciprocal_high)); + save_item(NAME(m_dp_allowed)); + + // register state for debugger state_add( RSP_PC, "PC", m_pc).callimport().callexport().formatstr("%08X"); state_add( RSP_R0, "R0", m_r[0]).formatstr("%08X"); state_add( RSP_R1, "R1", m_r[1]).formatstr("%08X"); @@ -528,15 +552,15 @@ void rsp_device::device_reset() uint16_t rsp_device::SATURATE_ACCUM(int accum, int slice, uint16_t negative, uint16_t positive) { - if ((int16_t)m_accum[accum].w[SLICE_H] < 0) + if ((int16_t)m_accum[accum].w.h3 < 0) { - if ((uint16_t)m_accum[accum].w[SLICE_H] != 0xffff) + if ((uint16_t)m_accum[accum].w.h3 != 0xffff) { return negative; } else { - if ((int16_t)m_accum[accum].w[SLICE_M] >= 0) + if ((int16_t)m_accum[accum].w.h2 >= 0) { return negative; } @@ -544,24 +568,24 @@ uint16_t rsp_device::SATURATE_ACCUM(int accum, int slice, uint16_t negative, uin { if (slice == 0) { - return m_accum[accum].w[SLICE_L]; + return m_accum[accum].w.h; } else if (slice == 1) { - return m_accum[accum].w[SLICE_M]; + return m_accum[accum].w.h2; } } } } else { - if ((uint16_t)m_accum[accum].w[SLICE_H] != 0) + if ((uint16_t)m_accum[accum].w.h3 != 0) { return positive; } else { - if ((int16_t)m_accum[accum].w[SLICE_M] < 0) + if ((int16_t)m_accum[accum].w.h2 < 0) { return positive; } @@ -569,11 +593,11 @@ uint16_t rsp_device::SATURATE_ACCUM(int accum, int slice, uint16_t negative, uin { if (slice == 0) { - return m_accum[accum].w[SLICE_L]; + return m_accum[accum].w.h; } else { - return m_accum[accum].w[SLICE_M]; + return m_accum[accum].w.h2; } } } @@ -610,19 +634,19 @@ void rsp_device::handle_vector_ops(uint32_t op) if (s1 == -32768 && s2 == -32768) { // overflow - m_accum[i].w[SLICE_H] = 0; - m_accum[i].w[SLICE_M] = -32768; - m_accum[i].w[SLICE_L] = -32768; + m_accum[i].w.h3 = 0; + m_accum[i].w.h2 = -32768; + m_accum[i].w.h = -32768; vres[i] = 0x7fff; } else { int64_t r = s1 * s2 * 2; r += 0x8000; // rounding ? - m_accum[i].w[SLICE_H] = (r < 0) ? 0xffff : 0; // Sign-extend to 48-bit - m_accum[i].w[SLICE_M] = (int16_t)(r >> 16); - m_accum[i].w[SLICE_L] = (uint16_t)r; - vres[i] = m_accum[i].w[SLICE_M]; + m_accum[i].w.h3 = (r < 0) ? 0xffff : 0; // Sign-extend to 48-bit + m_accum[i].w.h2 = (int16_t)(r >> 16); + m_accum[i].w.h = (uint16_t)r; + vres[i] = m_accum[i].w.h2; } } WRITEBACK_RESULT(); @@ -645,21 +669,21 @@ void rsp_device::handle_vector_ops(uint32_t op) int64_t r = s1 * s2 * 2; r += 0x8000; // rounding ? - m_accum[i].w[SLICE_H] = (uint16_t)(r >> 32); - m_accum[i].w[SLICE_M] = (uint16_t)(r >> 16); - m_accum[i].w[SLICE_L] = (uint16_t)r; + m_accum[i].w.h3 = (uint16_t)(r >> 32); + m_accum[i].w.h2 = (uint16_t)(r >> 16); + m_accum[i].w.h = (uint16_t)r; if (r < 0) { vres[i] = 0; } - else if (((int16_t)m_accum[i].w[SLICE_H] ^ (int16_t)m_accum[i].w[SLICE_M]) < 0) + else if (((int16_t)m_accum[i].w.h3 ^ (int16_t)m_accum[i].w.h2) < 0) { vres[i] = -1; } else { - vres[i] = m_accum[i].w[SLICE_M]; + vres[i] = m_accum[i].w.h2; } } WRITEBACK_RESULT(); @@ -683,11 +707,11 @@ void rsp_device::handle_vector_ops(uint32_t op) uint32_t s2 = m_v[VS2REG].w[VEC_EL_2(EL, i)]; uint32_t r = s1 * s2; - m_accum[i].w[SLICE_H] = 0; - m_accum[i].w[SLICE_M] = 0; - m_accum[i].w[SLICE_L] = (uint16_t)(r >> 16); + m_accum[i].w.h3 = 0; + m_accum[i].w.h2 = 0; + m_accum[i].w.h = (uint16_t)(r >> 16); - vres[i] = m_accum[i].w[SLICE_L]; + vres[i] = m_accum[i].w.h; } WRITEBACK_RESULT(); break; @@ -710,11 +734,11 @@ void rsp_device::handle_vector_ops(uint32_t op) int32_t s2 = m_v[VS2REG].w[VEC_EL_2(EL, i)]; // not sign-extended int32_t r = s1 * s2; - m_accum[i].w[SLICE_H] = (r < 0) ? 0xffff : 0; // sign-extend to 48-bit - m_accum[i].w[SLICE_M] = (int16_t)(r >> 16); - m_accum[i].w[SLICE_L] = (uint16_t)r; + m_accum[i].w.h3 = (r < 0) ? 0xffff : 0; // sign-extend to 48-bit + m_accum[i].w.h2 = (int16_t)(r >> 16); + m_accum[i].w.h = (uint16_t)r; - vres[i] = m_accum[i].w[SLICE_M]; + vres[i] = m_accum[i].w.h2; } WRITEBACK_RESULT(); break; @@ -737,11 +761,11 @@ void rsp_device::handle_vector_ops(uint32_t op) int32_t s2 = m_v[VS2REG].s[VEC_EL_2(EL, i)]; int32_t r = s1 * s2; - m_accum[i].w[SLICE_H] = (r < 0) ? 0xffff : 0; // sign-extend to 48-bit - m_accum[i].w[SLICE_M] = (int16_t)(r >> 16); - m_accum[i].w[SLICE_L] = (uint16_t)(r); + m_accum[i].w.h3 = (r < 0) ? 0xffff : 0; // sign-extend to 48-bit + m_accum[i].w.h2 = (int16_t)(r >> 16); + m_accum[i].w.h = (uint16_t)(r); - vres[i] = m_accum[i].w[SLICE_L]; + vres[i] = m_accum[i].w.h; } WRITEBACK_RESULT(); break; @@ -764,9 +788,9 @@ void rsp_device::handle_vector_ops(uint32_t op) int32_t s2 = m_v[VS2REG].s[VEC_EL_2(EL, i)]; int32_t r = s1 * s2; - m_accum[i].w[SLICE_H] = (int16_t)(r >> 16); - m_accum[i].w[SLICE_M] = (uint16_t)(r); - m_accum[i].w[SLICE_L] = 0; + m_accum[i].w.h3 = (int16_t)(r >> 16); + m_accum[i].w.h2 = (uint16_t)(r); + m_accum[i].w.h = 0; if (r < -32768) r = -32768; if (r > 32767) r = 32767; @@ -792,17 +816,17 @@ void rsp_device::handle_vector_ops(uint32_t op) int32_t s2 = m_v[VS2REG].s[VEC_EL_2(EL, i)]; int32_t r = s1 * s2; - uint64_t q = (uint64_t)(uint16_t)m_accum[i].w[SLICE_LL]; - q |= (((uint64_t)(uint16_t)m_accum[i].w[SLICE_L]) << 16); - q |= (((uint64_t)(uint16_t)m_accum[i].w[SLICE_M]) << 32); - q |= (((uint64_t)(uint16_t)m_accum[i].w[SLICE_H]) << 48); + uint64_t q = (uint64_t)(uint16_t)m_accum[i].w.l; + q |= (((uint64_t)(uint16_t)m_accum[i].w.h) << 16); + q |= (((uint64_t)(uint16_t)m_accum[i].w.h2) << 32); + q |= (((uint64_t)(uint16_t)m_accum[i].w.h3) << 48); q += (int64_t)(r) << 17; - m_accum[i].w[SLICE_LL] = (uint16_t)q; - m_accum[i].w[SLICE_L] = (uint16_t)(q >> 16); - m_accum[i].w[SLICE_M] = (uint16_t)(q >> 32); - m_accum[i].w[SLICE_H] = (uint16_t)(q >> 48); + m_accum[i].w.l = (uint16_t)q; + m_accum[i].w.h = (uint16_t)(q >> 16); + m_accum[i].w.h2 = (uint16_t)(q >> 32); + m_accum[i].w.h3 = (uint16_t)(q >> 48); vres[i] = SATURATE_ACCUM(i, 1, 0x8000, 0x7fff); } @@ -823,32 +847,32 @@ void rsp_device::handle_vector_ops(uint32_t op) int32_t s1 = m_v[VS1REG].s[i]; int32_t s2 = m_v[VS2REG].s[VEC_EL_2(EL, i)]; int32_t r1 = s1 * s2; - uint32_t r2 = m_accum[i].w[SLICE_L] + ((uint16_t)r1 * 2); - uint32_t r3 = m_accum[i].w[SLICE_M] + (uint16_t)((r1 >> 16) * 2) + (uint16_t)(r2 >> 16); + uint32_t r2 = m_accum[i].w.h + ((uint16_t)r1 * 2); + uint32_t r3 = m_accum[i].w.h2 + (uint16_t)((r1 >> 16) * 2) + (uint16_t)(r2 >> 16); - m_accum[i].w[SLICE_L] = (uint16_t)r2; - m_accum[i].w[SLICE_M] = (uint16_t)r3; - m_accum[i].w[SLICE_H] += (uint16_t)(r3 >> 16) + (uint16_t)(r1 >> 31); + m_accum[i].w.h = (uint16_t)r2; + m_accum[i].w.h2 = (uint16_t)r3; + m_accum[i].w.h3 += (uint16_t)(r3 >> 16) + (uint16_t)(r1 >> 31); - if ((int16_t)m_accum[i].w[SLICE_H] < 0) + if ((int16_t)m_accum[i].w.h3 < 0) { vres[i] = 0; } else { - if (m_accum[i].w[SLICE_H] != 0) + if (m_accum[i].w.h3 != 0) { vres[i] = 0xffff; } else { - if ((int16_t)m_accum[i].w[SLICE_M] < 0) + if ((int16_t)m_accum[i].w.h2 < 0) { vres[i] = 0xffff; } else { - vres[i] = m_accum[i].w[SLICE_M]; + vres[i] = m_accum[i].w.h2; } } } @@ -873,12 +897,12 @@ void rsp_device::handle_vector_ops(uint32_t op) uint32_t s1 = m_v[VS1REG].w[i]; uint32_t s2 = m_v[VS2REG].w[VEC_EL_2(EL, i)]; uint32_t r1 = s1 * s2; - uint32_t r2 = m_accum[i].w[SLICE_L] + (r1 >> 16); - uint32_t r3 = m_accum[i].w[SLICE_M] + (r2 >> 16); + uint32_t r2 = m_accum[i].w.h + (r1 >> 16); + uint32_t r3 = m_accum[i].w.h2 + (r2 >> 16); - m_accum[i].w[SLICE_L] = (uint16_t)r2; - m_accum[i].w[SLICE_M] = (uint16_t)r3; - m_accum[i].w[SLICE_H] += (int16_t)(r3 >> 16); + m_accum[i].w.h = (uint16_t)r2; + m_accum[i].w.h2 = (uint16_t)r3; + m_accum[i].w.h3 += (int16_t)(r3 >> 16); vres[i] = SATURATE_ACCUM(i, 0, 0x0000, 0xffff); } @@ -902,14 +926,14 @@ void rsp_device::handle_vector_ops(uint32_t op) uint32_t s1 = m_v[VS1REG].s[i]; uint32_t s2 = m_v[VS2REG].w[VEC_EL_2(EL, i)]; // not sign-extended uint32_t r1 = s1 * s2; - uint32_t r2 = (uint16_t)m_accum[i].w[SLICE_L] + (uint16_t)(r1); - uint32_t r3 = (uint16_t)m_accum[i].w[SLICE_M] + (r1 >> 16) + (r2 >> 16); + uint32_t r2 = (uint16_t)m_accum[i].w.h + (uint16_t)(r1); + uint32_t r3 = (uint16_t)m_accum[i].w.h2 + (r1 >> 16) + (r2 >> 16); - m_accum[i].w[SLICE_L] = (uint16_t)r2; - m_accum[i].w[SLICE_M] = (uint16_t)r3; - m_accum[i].w[SLICE_H] += (uint16_t)(r3 >> 16); + m_accum[i].w.h = (uint16_t)r2; + m_accum[i].w.h2 = (uint16_t)r3; + m_accum[i].w.h3 += (uint16_t)(r3 >> 16); if ((int32_t)r1 < 0) - m_accum[i].w[SLICE_H] -= 1; + m_accum[i].w.h3 -= 1; vres[i] = SATURATE_ACCUM(i, 1, 0x8000, 0x7fff); } @@ -933,16 +957,16 @@ void rsp_device::handle_vector_ops(uint32_t op) int32_t s1 = m_v[VS1REG].w[i]; // not sign-extended int32_t s2 = m_v[VS2REG].s[VEC_EL_2(EL, i)]; - uint64_t q = (uint64_t)m_accum[i].w[SLICE_LL]; - q |= (((uint64_t)m_accum[i].w[SLICE_L]) << 16); - q |= (((uint64_t)m_accum[i].w[SLICE_M]) << 32); - q |= (((uint64_t)m_accum[i].w[SLICE_H]) << 48); + uint64_t q = (uint64_t)m_accum[i].w.l; + q |= (((uint64_t)m_accum[i].w.h) << 16); + q |= (((uint64_t)m_accum[i].w.h2) << 32); + q |= (((uint64_t)m_accum[i].w.h3) << 48); q += (int64_t)(s1*s2) << 16; - m_accum[i].w[SLICE_LL] = (uint16_t)q; - m_accum[i].w[SLICE_L] = (uint16_t)(q >> 16); - m_accum[i].w[SLICE_M] = (uint16_t)(q >> 32); - m_accum[i].w[SLICE_H] = (uint16_t)(q >> 48); + m_accum[i].w.l = (uint16_t)q; + m_accum[i].w.h = (uint16_t)(q >> 16); + m_accum[i].w.h2 = (uint16_t)(q >> 32); + m_accum[i].w.h3 = (uint16_t)(q >> 48); vres[i] = SATURATE_ACCUM(i, 0, 0x0000, 0xffff); } @@ -967,12 +991,12 @@ void rsp_device::handle_vector_ops(uint32_t op) int32_t s1 = m_v[VS1REG].s[i]; int32_t s2 = m_v[VS2REG].s[VEC_EL_2(EL, i)]; - int32_t accum = (uint32_t)(uint16_t)m_accum[i].w[SLICE_M]; - accum |= ((uint32_t)((uint16_t)m_accum[i].w[SLICE_H])) << 16; + int32_t accum = (uint32_t)(uint16_t)m_accum[i].w.h2; + accum |= ((uint32_t)((uint16_t)m_accum[i].w.h3)) << 16; accum += s1 * s2; - m_accum[i].w[SLICE_H] = (uint16_t)(accum >> 16); - m_accum[i].w[SLICE_M] = (uint16_t)accum; + m_accum[i].w.h3 = (uint16_t)(accum >> 16); + m_accum[i].w.h2 = (uint16_t)accum; vres[i] = SATURATE_ACCUM(i, 1, 0x8000, 0x7fff); } @@ -997,7 +1021,7 @@ void rsp_device::handle_vector_ops(uint32_t op) int32_t s2 = m_v[VS2REG].s[VEC_EL_2(EL, i)]; int32_t r = s1 + s2 + BIT(m_vcarry, i); - m_accum[i].w[SLICE_L] = (int16_t)r; + m_accum[i].w.h = (int16_t)r; if (r > 32767) r = 32767; if (r < -32768) r = -32768; @@ -1026,7 +1050,7 @@ void rsp_device::handle_vector_ops(uint32_t op) int32_t s2 = m_v[VS2REG].s[VEC_EL_2(EL, i)]; int32_t r = s1 - s2 - BIT(m_vcarry, i); - m_accum[i].w[SLICE_L] = (int16_t)r; + m_accum[i].w.h = (int16_t)r; if (r > 32767) r = 32767; if (r < -32768) r = -32768; @@ -1074,7 +1098,7 @@ void rsp_device::handle_vector_ops(uint32_t op) vres[i] = 0; } - m_accum[i].w[SLICE_L] = vres[i]; + m_accum[i].w.h = vres[i]; } WRITEBACK_RESULT(); break; @@ -1101,7 +1125,7 @@ void rsp_device::handle_vector_ops(uint32_t op) int32_t r = s1 + s2; vres[i] = (int16_t)r; - m_accum[i].w[SLICE_L] = (int16_t)r; + m_accum[i].w.h = (int16_t)r; if (r & 0xffff0000) { @@ -1133,7 +1157,7 @@ void rsp_device::handle_vector_ops(uint32_t op) int32_t r = s1 - s2; vres[i] = (int16_t)(r); - m_accum[i].w[SLICE_L] = (uint16_t)r; + m_accum[i].w.h = (uint16_t)r; if ((uint16_t)r != 0) { @@ -1163,7 +1187,7 @@ void rsp_device::handle_vector_ops(uint32_t op) { for (int i = 0; i < 8; i++) { - m_v[VDREG].w[i] = m_accum[i].w[SLICE_H]; + m_v[VDREG].w[i] = m_accum[i].w.h3; } break; } @@ -1171,7 +1195,7 @@ void rsp_device::handle_vector_ops(uint32_t op) { for (int i = 0; i < 8; i++) { - m_v[VDREG].w[i] = m_accum[i].w[SLICE_M]; + m_v[VDREG].w[i] = m_accum[i].w.h2; } break; } @@ -1179,7 +1203,7 @@ void rsp_device::handle_vector_ops(uint32_t op) { for (int i = 0; i < 8; i++) { - m_v[VDREG].w[i] = m_accum[i].w[SLICE_L]; + m_v[VDREG].w[i] = m_accum[i].w.h; } break; } @@ -1228,7 +1252,7 @@ void rsp_device::handle_vector_ops(uint32_t op) vres[i] = s2; } - m_accum[i].w[SLICE_L] = vres[i]; + m_accum[i].w.h = vres[i]; } m_vzero = 0; @@ -1264,7 +1288,7 @@ void rsp_device::handle_vector_ops(uint32_t op) { vres[i] = s2; } - m_accum[i].w[SLICE_L] = vres[i]; + m_accum[i].w.h = vres[i]; } m_vzero = 0; @@ -1301,7 +1325,7 @@ void rsp_device::handle_vector_ops(uint32_t op) vres[i] = s2; } - m_accum[i].w[SLICE_L] = vres[i]; + m_accum[i].w.h = vres[i]; } m_vzero = 0; @@ -1338,7 +1362,7 @@ void rsp_device::handle_vector_ops(uint32_t op) vres[i] = s2; } - m_accum[i].w[SLICE_L] = vres[i]; + m_accum[i].w.h = vres[i]; } m_vzero = 0; @@ -1367,11 +1391,11 @@ void rsp_device::handle_vector_ops(uint32_t op) { if (BIT(m_vcompare, i)) // vcc_lo { - m_accum[i].w[SLICE_L] = -(uint16_t)s2; + m_accum[i].w.h = -(uint16_t)s2; } else { - m_accum[i].w[SLICE_L] = s1; + m_accum[i].w.h = s1; } } else @@ -1380,12 +1404,12 @@ void rsp_device::handle_vector_ops(uint32_t op) { if (((uint32_t)(uint16_t)(s1) + (uint32_t)(uint16_t)(s2)) > 0x10000) { - m_accum[i].w[SLICE_L] = s1; + m_accum[i].w.h = s1; m_vcompare &= ~(1 << i); } else { - m_accum[i].w[SLICE_L] = -(uint16_t)s2; + m_accum[i].w.h = -(uint16_t)s2; m_vcompare |= 1 << i; } } @@ -1393,12 +1417,12 @@ void rsp_device::handle_vector_ops(uint32_t op) { if (((uint32_t)(uint16_t)(s1) + (uint32_t)(uint16_t)(s2)) != 0) { - m_accum[i].w[SLICE_L] = s1; + m_accum[i].w.h = s1; m_vcompare &= ~(1 << i); } else { - m_accum[i].w[SLICE_L] = -(uint16_t)s2; + m_accum[i].w.h = -(uint16_t)s2; m_vcompare |= 1 << i; } } @@ -1410,29 +1434,29 @@ void rsp_device::handle_vector_ops(uint32_t op) { if (BIT(m_vclip2, i)) // vcc_hi { - m_accum[i].w[SLICE_L] = s2; + m_accum[i].w.h = s2; } else { - m_accum[i].w[SLICE_L] = s1; + m_accum[i].w.h = s1; } } else { if (((int32_t)(uint16_t)s1 - (int32_t)(uint16_t)s2) >= 0) { - m_accum[i].w[SLICE_L] = s2; + m_accum[i].w.h = s2; m_vclip2 |= 1 << i; } else { - m_accum[i].w[SLICE_L] = s1; + m_accum[i].w.h = s1; m_vclip2 &= ~(1 << i); } } } - vres[i] = m_accum[i].w[SLICE_L]; + vres[i] = m_accum[i].w.h; } m_vzero = 0; @@ -1521,7 +1545,7 @@ void rsp_device::handle_vector_ops(uint32_t op) m_vclip1 |= 1 << i; } - m_accum[i].w[SLICE_L] = vres[i]; + m_accum[i].w.h = vres[i]; } WRITEBACK_RESULT(); break; @@ -1555,12 +1579,12 @@ void rsp_device::handle_vector_ops(uint32_t op) } if ((s1 + s2) <= 0) { - m_accum[i].w[SLICE_L] = ~(uint16_t)s2; + m_accum[i].w.h = ~(uint16_t)s2; m_vcompare |= 1 << i; } else { - m_accum[i].w[SLICE_L] = s1; + m_accum[i].w.h = s1; } } else @@ -1571,16 +1595,16 @@ void rsp_device::handle_vector_ops(uint32_t op) } if ((s1 - s2) >= 0) { - m_accum[i].w[SLICE_L] = s2; + m_accum[i].w.h = s2; m_vclip2 |= 1 << i; } else { - m_accum[i].w[SLICE_L] = s1; + m_accum[i].w.h = s1; } } - vres[i] = m_accum[i].w[SLICE_L]; + vres[i] = m_accum[i].w.h; } WRITEBACK_RESULT(); break; @@ -1606,7 +1630,7 @@ void rsp_device::handle_vector_ops(uint32_t op) vres[i] = m_v[VS2REG].s[VEC_EL_2(EL, i)]; } - m_accum[i].w[SLICE_L] = vres[i]; + m_accum[i].w.h = vres[i]; } WRITEBACK_RESULT(); break; @@ -1624,7 +1648,7 @@ void rsp_device::handle_vector_ops(uint32_t op) for (int i = 0; i < 8; i++) { vres[i] = m_v[VS1REG].w[i] & m_v[VS2REG].w[VEC_EL_2(EL, i)]; - m_accum[i].w[SLICE_L] = vres[i]; + m_accum[i].w.h = vres[i]; } WRITEBACK_RESULT(); break; @@ -1642,7 +1666,7 @@ void rsp_device::handle_vector_ops(uint32_t op) for (int i = 0; i < 8; i++) { vres[i] = ~(m_v[VS1REG].w[i] & m_v[VS2REG].w[VEC_EL_2(EL, i)]); - m_accum[i].w[SLICE_L] = vres[i]; + m_accum[i].w.h = vres[i]; } WRITEBACK_RESULT(); break; @@ -1660,7 +1684,7 @@ void rsp_device::handle_vector_ops(uint32_t op) for (int i = 0; i < 8; i++) { vres[i] = m_v[VS1REG].w[i] | m_v[VS2REG].w[VEC_EL_2(EL, i)]; - m_accum[i].w[SLICE_L] = vres[i]; + m_accum[i].w.h = vres[i]; } WRITEBACK_RESULT(); break; @@ -1678,7 +1702,7 @@ void rsp_device::handle_vector_ops(uint32_t op) for (int i = 0; i < 8; i++) { vres[i] = ~(m_v[VS1REG].w[i] | m_v[VS2REG].w[VEC_EL_2(EL, i)]); - m_accum[i].w[SLICE_L] = vres[i]; + m_accum[i].w.h = vres[i]; } WRITEBACK_RESULT(); break; @@ -1696,7 +1720,7 @@ void rsp_device::handle_vector_ops(uint32_t op) for (int i = 0; i < 8; i++) { vres[i] = m_v[VS1REG].w[i] ^ m_v[VS2REG].w[VEC_EL_2(EL, i)]; - m_accum[i].w[SLICE_L] = vres[i]; + m_accum[i].w.h = vres[i]; } WRITEBACK_RESULT(); break; @@ -1714,7 +1738,7 @@ void rsp_device::handle_vector_ops(uint32_t op) for (int i = 0; i < 8; i++) { vres[i] = ~(m_v[VS1REG].w[i] ^ m_v[VS2REG].w[VEC_EL_2(EL, i)]); - m_accum[i].w[SLICE_L] = vres[i]; + m_accum[i].w.h = vres[i]; } WRITEBACK_RESULT(); break; @@ -1737,7 +1761,7 @@ void rsp_device::handle_vector_ops(uint32_t op) vres[i] = 0; uint16_t e1 = m_v[VS1REG].w[i]; uint16_t e2 = m_v[VS2REG].w[VEC_EL_2(EL, i)]; - m_accum[i].w[SLICE_L] = e1 + e2; + m_accum[i].w.h = e1 + e2; } WRITEBACK_RESULT(); break; @@ -1796,7 +1820,7 @@ void rsp_device::handle_vector_ops(uint32_t op) for (int i = 0; i < 8; i++) { - m_accum[i].w[SLICE_L] = m_v[VS2REG].w[VEC_EL_2(EL, i)]; + m_accum[i].w.h = m_v[VS2REG].w[VEC_EL_2(EL, i)]; } break; } @@ -1871,7 +1895,7 @@ void rsp_device::handle_vector_ops(uint32_t op) for (int i = 0; i < 8; i++) { - m_accum[i].w[SLICE_L] = m_v[VS2REG].w[VEC_EL_2(EL, i)]; + m_accum[i].w.h = m_v[VS2REG].w[VEC_EL_2(EL, i)]; } break; } @@ -1890,7 +1914,7 @@ void rsp_device::handle_vector_ops(uint32_t op) for (int i = 0; i < 8; i++) { - m_accum[i].w[SLICE_L] = m_v[VS2REG].w[VEC_EL_2(EL, i)]; + m_accum[i].w.h = m_v[VS2REG].w[VEC_EL_2(EL, i)]; } m_v[VDREG].s[VS1REG & 7] = (int16_t)(m_reciprocal_res >> 16); @@ -1909,7 +1933,7 @@ void rsp_device::handle_vector_ops(uint32_t op) m_v[VDREG].w[VS1REG & 7] = m_v[VS2REG].w[VEC_EL_2(EL, VS1REG & 7)]; for (int i = 0; i < 8; i++) { - m_accum[i].w[SLICE_L] = m_v[VS2REG].w[i]; + m_accum[i].w.h = m_v[VS2REG].w[i]; } break; } @@ -1969,7 +1993,7 @@ void rsp_device::handle_vector_ops(uint32_t op) for (int i = 0; i < 8; i++) { - m_accum[i].w[SLICE_L] = m_v[VS2REG].w[VEC_EL_2(EL, i)]; + m_accum[i].w.h = m_v[VS2REG].w[VEC_EL_2(EL, i)]; } break; @@ -2048,7 +2072,7 @@ void rsp_device::handle_vector_ops(uint32_t op) for (int i = 0; i < 8; i++) { - m_accum[i].w[SLICE_L] = m_v[VS2REG].w[VEC_EL_2(EL, i)]; + m_accum[i].w.h = m_v[VS2REG].w[VEC_EL_2(EL, i)]; } break; @@ -2068,7 +2092,7 @@ void rsp_device::handle_vector_ops(uint32_t op) for (int i = 0; i < 8; i++) { - m_accum[i].w[SLICE_L] = m_v[VS2REG].w[VEC_EL_2(EL, i)]; + m_accum[i].w.h = m_v[VS2REG].w[VEC_EL_2(EL, i)]; } m_v[VDREG].s[VS1REG & 7] = (int16_t)(m_reciprocal_res >> 16); // store high part @@ -2103,7 +2127,7 @@ void rsp_device::handle_vector_ops(uint32_t op) vres[i] = 0; uint16_t e1 = m_v[VS1REG].w[i]; uint16_t e2 = m_v[VS2REG].w[VEC_EL_2(EL, i)]; - m_accum[i].w[SLICE_L] = e1 + e2; + m_accum[i].w.h = e1 + e2; } WRITEBACK_RESULT(); break; @@ -2123,7 +2147,7 @@ void rsp_device::handle_vector_ops(uint32_t op) for (int i = 0; i < 8; i++) { vres[i] = m_v[VS1REG].w[i]; - m_accum[i].w[SLICE_L] = 0; + m_accum[i].w.h = 0; } WRITEBACK_RESULT(); break; diff --git a/src/devices/cpu/rsp/rsp.h b/src/devices/cpu/rsp/rsp.h index 0007e96714c..4e7378af089 100644 --- a/src/devices/cpu/rsp/rsp.h +++ b/src/devices/cpu/rsp/rsp.h @@ -148,7 +148,7 @@ protected: memory_access<12, 2, 0, ENDIANNESS_BIG>::specific m_dmem; private: - union VECTOR_REG + union VECTOR_REG // PAIR128 { uint64_t d[2]; uint32_t l[4]; @@ -157,13 +157,6 @@ private: uint8_t b[16]; }; - union ACCUMULATOR_REG - { - uint64_t q; - uint32_t l[2]; - uint16_t w[4]; - }; - uint32_t m_debugger_temp; uint16_t m_pc_temp; uint16_t m_ppc_temp; @@ -188,26 +181,23 @@ private: // COP2 (vectors) uint16_t SATURATE_ACCUM(int accum, int slice, uint16_t negative, uint16_t positive); - uint16_t m_vres[8]; - VECTOR_REG m_v[32]; - ACCUMULATOR_REG m_accum[8]; - uint8_t m_vcarry; - uint8_t m_vcompare; - uint8_t m_vclip1; - uint8_t m_vzero; - uint8_t m_vclip2; - - int32_t m_reciprocal_res; - uint32_t m_reciprocal_high; - int32_t m_dp_allowed; - - void handle_cop2(uint32_t op); - void handle_lwc2(uint32_t op); - void handle_swc2(uint32_t op); - void handle_vector_ops(uint32_t op); - - uint32_t m_div_in; - uint32_t m_div_out; + uint16_t m_vres[8]; + VECTOR_REG m_v[32]; + PAIR64 m_accum[8]; + uint8_t m_vcarry; + uint8_t m_vcompare; + uint8_t m_vclip1; + uint8_t m_vzero; + uint8_t m_vclip2; + + int32_t m_reciprocal_res; + uint32_t m_reciprocal_high; + int32_t m_dp_allowed; + + void handle_cop2(uint32_t op); + void handle_lwc2(uint32_t op); + void handle_swc2(uint32_t op); + void handle_vector_ops(uint32_t op); }; DECLARE_DEVICE_TYPE(RSP, rsp_device) diff --git a/src/devices/cpu/z80/nsc800.cpp b/src/devices/cpu/z80/nsc800.cpp index d7af9a67fe2..e2c0bfd0087 100644 --- a/src/devices/cpu/z80/nsc800.cpp +++ b/src/devices/cpu/z80/nsc800.cpp @@ -54,17 +54,21 @@ void nsc800_device::execute_run() void nsc800_device::execute_set_input(int inputnum, int state) { + bool update_irq_attention = false; switch (inputnum) { case NSC800_RSTA: + update_irq_attention = true; m_nsc800_irq_state[0] = state; break; case NSC800_RSTB: + update_irq_attention = true; m_nsc800_irq_state[1] = state; break; case NSC800_RSTC: + update_irq_attention = true; m_nsc800_irq_state[2] = state; break; @@ -72,4 +76,12 @@ void nsc800_device::execute_set_input(int inputnum, int state) z80_device::execute_set_input(inputnum, state); break; } + + if (update_irq_attention) + { + if (m_nsc800_irq_state[0] != CLEAR_LINE || m_nsc800_irq_state[1] != CLEAR_LINE || m_nsc800_irq_state[2] != CLEAR_LINE) + set_service_attention<SA_NSC800_IRQ_ON, 1>(); + else + set_service_attention<SA_NSC800_IRQ_ON, 0>(); + } } diff --git a/src/devices/cpu/z80/z80.cpp b/src/devices/cpu/z80/z80.cpp index ab4d79d5120..c95474999d5 100644 --- a/src/devices/cpu/z80/z80.cpp +++ b/src/devices/cpu/z80/z80.cpp @@ -50,6 +50,7 @@ void z80_device::halt() if (!m_halt) { m_halt = 1; + set_service_attention<SA_HALT, 1>(); m_halt_cb(1); } } @@ -62,6 +63,7 @@ void z80_device::leave_halt() if (m_halt) { m_halt = 0; + set_service_attention<SA_HALT, 0>(); m_halt_cb(0); } } @@ -468,7 +470,7 @@ void z80_device::block_io_interrupted_flags() void z80_device::ei() { m_iff1 = m_iff2 = 1; - m_after_ei = true; + set_service_attention<SA_AFTER_EI, 1>(); } void z80_device::set_f(u8 f) @@ -562,14 +564,12 @@ void z80_device::device_start() save_item(NAME(m_im)); save_item(NAME(m_i)); save_item(NAME(m_nmi_state)); - save_item(NAME(m_nmi_pending)); save_item(NAME(m_irq_state)); save_item(NAME(m_wait_state)); save_item(NAME(m_busrq_state)); save_item(NAME(m_busack_state)); - save_item(NAME(m_after_ei)); - save_item(NAME(m_after_ldair)); 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)); @@ -602,14 +602,12 @@ void z80_device::device_start() m_im = 0; m_i = 0; m_nmi_state = 0; - m_nmi_pending = false; m_irq_state = 0; m_wait_state = 0; m_busrq_state = 0; m_busack_state = 0; - m_after_ei = false; - m_after_ldair = false; m_ea = 0; + m_service_attention = 0; m_rtemp = 0; space(AS_PROGRAM).cache(m_args); @@ -667,11 +665,9 @@ void z80_device::device_reset() m_i = 0; m_r = 0; m_r2 = 0; - m_nmi_pending = false; - m_after_ei = false; - m_after_ldair = false; m_iff1 = 0; m_iff2 = 0; + m_service_attention = 0; } /**************************************************************************** @@ -688,12 +684,18 @@ void z80_device::execute_set_input(int inputnum, int state) { case Z80_INPUT_LINE_BUSRQ: m_busrq_state = state; + if (state != CLEAR_LINE) + set_service_attention<SA_BUSRQ, 1>(); + else + set_service_attention<SA_BUSRQ, 0>(); break; case INPUT_LINE_NMI: // mark an NMI pending on the rising edge if (m_nmi_state == CLEAR_LINE && state != CLEAR_LINE) - m_nmi_pending = true; + { + set_service_attention<SA_NMI_PENDING, 1>(); + } m_nmi_state = state; break; @@ -702,6 +704,10 @@ void z80_device::execute_set_input(int inputnum, int state) m_irq_state = state; if (daisy_chain_present()) m_irq_state = (daisy_update_irq_state() == ASSERT_LINE) ? ASSERT_LINE : m_irq_state; + if (state != CLEAR_LINE) + set_service_attention<SA_IRQ_ON, 1>(); + else + set_service_attention<SA_IRQ_ON, 0>(); // the main execute loop will take the interrupt break; @@ -728,8 +734,9 @@ void z80_device::state_import(const device_state_entry &entry) case STATE_GENPC: m_prvpc = m_pc; m_ref = 0xffff00; - m_after_ei = false; - m_after_ldair = false; + set_service_attention<SA_AFTER_EI, 0>(); + if (HAS_LDAIR_QUIRK) + set_service_attention<SA_AFTER_LDAIR, 0>(); break; case Z80_R: diff --git a/src/devices/cpu/z80/z80.h b/src/devices/cpu/z80/z80.h index ec111c3cd32..b40e697d81f 100644 --- a/src/devices/cpu/z80/z80.h +++ b/src/devices/cpu/z80/z80.h @@ -78,6 +78,8 @@ protected: void illegal_1(); void illegal_2(); u8 flags_szyxc(u16 value); + template <u8 Bit, bool State> void set_service_attention() { static_assert(Bit < 8, "out of range bit index"); if (State) m_service_attention |= (1 << Bit); else m_service_attention &= ~(1 << Bit); }; + template <u8 Bit> bool get_service_attention() { static_assert(Bit < 8, "out of range bit index"); return m_service_attention & (1 << Bit); }; void halt(); void leave_halt(); @@ -137,6 +139,16 @@ protected: devcb_write_line m_halt_cb; devcb_write_line m_busack_cb; + static constexpr u8 SA_BUSRQ = 0; + static constexpr u8 SA_BUSACK = 1; + static constexpr u8 SA_NMI_PENDING = 2; + static constexpr u8 SA_IRQ_ON = 3; + static constexpr u8 SA_HALT = 4; + static constexpr u8 SA_AFTER_EI = 5; + static constexpr u8 SA_AFTER_LDAIR = 6; + static constexpr u8 SA_NSC800_IRQ_ON = 7; + u8 m_service_attention; // bitmap for required handling in service step + PAIR16 m_prvpc; PAIR16 m_pc; PAIR16 m_sp; @@ -161,13 +173,10 @@ protected: u8 m_im; u8 m_i; u8 m_nmi_state; // nmi pin state - bool m_nmi_pending; // nmi pending u8 m_irq_state; // irq pin state int m_wait_state; // wait pin state int m_busrq_state; // bus request pin state u8 m_busack_state; // bus acknowledge pin state - bool m_after_ei; // are we in the EI shadow? - bool m_after_ldair; // same, but for LD A,I or LD A,R u16 m_ea; int m_icount; diff --git a/src/devices/cpu/z80/z80.lst b/src/devices/cpu/z80/z80.lst index 12bd39360ba..a31e651748b 100644 --- a/src/devices/cpu/z80/z80.lst +++ b/src/devices/cpu/z80/z80.lst @@ -206,10 +206,14 @@ macro r800:ld_r_a macro ld_a_r call nomreq_ir 1 - A = (m_r & 0x7f) | m_r2; set_f((F & CF) | SZ[A] | (m_iff2 << 2)); m_after_ldair = true; + A = (m_r & 0x7f) | m_r2; set_f((F & CF) | SZ[A] | (m_iff2 << 2)); + if (HAS_LDAIR_QUIRK) + set_service_attention<SA_AFTER_LDAIR, 1>(); macro r800:ld_a_r - A = (m_r & 0x7f) | m_r2; set_f((F & CF) | SZ[A] | (m_iff2 << 2)); m_after_ldair = true; + A = (m_r & 0x7f) | m_r2; set_f((F & CF) | SZ[A] | (m_iff2 << 2)); + if (HAS_LDAIR_QUIRK) + set_service_attention<SA_AFTER_LDAIR, 1>(); macro ld_i_a call nomreq_ir 1 @@ -220,10 +224,14 @@ macro r800:ld_i_a macro ld_a_i call nomreq_ir 1 - A = m_i; set_f((F & CF) | SZ[A] | (m_iff2 << 2)); m_after_ldair = true; + A = m_i; set_f((F & CF) | SZ[A] | (m_iff2 << 2)); + if (HAS_LDAIR_QUIRK) + set_service_attention<SA_AFTER_LDAIR, 1>(); macro r800:ld_a_i - A = m_i; set_f((F & CF) | SZ[A] | (m_iff2 << 2)); m_after_ldair = true; + A = m_i; set_f((F & CF) | SZ[A] | (m_iff2 << 2)); + if (HAS_LDAIR_QUIRK) + set_service_attention<SA_AFTER_LDAIR, 1>(); macro rst addr TDAT = PC; @@ -531,8 +539,8 @@ macro r800:otdr PC -= 2; block_io_interrupted_flags(); } -macro jump %opcode - m_ref = 0x%opcode00; +macro jump %po + m_ref = 0x%po00; goto process; macro jump_prefixed %prefix @@ -542,10 +550,9 @@ macro jump_prefixed %prefix macro take_nmi // Check if processor was halted leave_halt(); - #if HAS_LDAIR_QUIRK + if (HAS_LDAIR_QUIRK) // reset parity flag after LD A,I or LD A,R - if (m_after_ldair) F &= ~PF; - #endif + if (get_service_attention<SA_AFTER_LDAIR>()) F &= ~PF; m_iff1 = 0; m_r++; + 5 @@ -553,7 +560,7 @@ macro take_nmi call wm16_sp PC = 0x0066; WZ = PC; - m_nmi_pending = false; + set_service_attention<SA_NMI_PENDING, 0>(); macro irqfetch { @@ -640,27 +647,26 @@ macro take_interrupt } } WZ = PC; - #if HAS_LDAIR_QUIRK + if (HAS_LDAIR_QUIRK) // reset parity flag after LD A,I or LD A,R - if (m_after_ldair) F &= ~PF; - #endif + if (get_service_attention<SA_AFTER_LDAIR>()) F &= ~PF; macro check_interrupts - if (m_nmi_pending) { + if (get_service_attention<SA_NMI_PENDING>()) { call take_nmi - } else if (m_irq_state != CLEAR_LINE && m_iff1 && !m_after_ei) { + } else if (m_irq_state != CLEAR_LINE && m_iff1 && !get_service_attention<SA_AFTER_EI>()) { // SA_IRQ_ON call take_interrupt } macro z80n:check_interrupts - if (m_nmi_pending) { + if (get_service_attention<SA_NMI_PENDING>()) { if (m_stackless) { // on take_nmi m_out_nextreg_cb(0xc2, m_pc.b.l); m_out_nextreg_cb(0xc3, m_pc.b.h); } call take_nmi - } else if (m_irq_state != CLEAR_LINE && m_iff1 && !m_after_ei) { + } else if (m_irq_state != CLEAR_LINE && m_iff1 && !get_service_attention<SA_AFTER_EI>()) { call take_interrupt } @@ -688,17 +694,16 @@ macro nsc800_take_interrupt ; } WZ = PC; - #if HAS_LDAIR_QUIRK + if (HAS_LDAIR_QUIRK) // reset parity flag after LD A,I or LD A,R - if (m_after_ldair) F &= ~PF; - #endif + if (get_service_attention<SA_AFTER_LDAIR>()) F &= ~PF; macro nsc800:check_interrupts - if (m_nmi_pending) { + if (get_service_attention<SA_NMI_PENDING>()) { call take_nmi - } else if ((m_nsc800_irq_state[0] != CLEAR_LINE || m_nsc800_irq_state[1] != CLEAR_LINE || m_nsc800_irq_state[2] != CLEAR_LINE) && m_iff1 && !m_after_ei) { + } else if (get_service_attention<SA_NSC800_IRQ_ON>() && m_iff1 && !get_service_attention<SA_AFTER_EI>()) { call nsc800_take_interrupt - } else if (m_irq_state != CLEAR_LINE && m_iff1 && !m_after_ei) { + } else if (m_irq_state != CLEAR_LINE && m_iff1 && !get_service_attention<SA_AFTER_EI>()) { // SA_IRQ_ON call take_interrupt } @@ -707,35 +712,42 @@ macro nsc800:check_interrupts # ROP ########################################################## ffff - m_ref = 0xffff00; - if (m_icount <= 0) return; - if (m_busrq_state) { - if (!m_busack_state) { - m_busack_state = 1; - m_busack_cb(1); - } - if (m_icount > 0) - m_icount = 0; + if (m_icount <= 0) { + m_ref = 0xffff00; return; - } else if (m_busack_state) { - m_busack_state = 0; - m_busack_cb(0); } - call check_interrupts - m_after_ei = false; - m_after_ldair = false; - if (m_halt) { - debugger_wait_hook(); - call rop - PC--; - continue; - } else { - PRVPC = PC; - debugger_instruction_hook(PC); - call rop - m_ref = (0x00 << 16) | (TDAT8 << 8); - goto process; + if (m_service_attention) { + if (m_busrq_state) { // SA_BUSRQ + if (!m_busack_state) { + m_busack_state = 1; + set_service_attention<SA_BUSACK, 1>(); + m_busack_cb(1); + } + if (m_icount > 0) + m_icount = 0; + m_ref = 0xffff00; + return; + } else if (m_busack_state) { // SA_BUSACK + m_busack_state = 0; + set_service_attention<SA_BUSACK, 0>(); + m_busack_cb(0); + } + call check_interrupts + set_service_attention<SA_AFTER_EI, 0>(); // SA_AFTER_EI + if (HAS_LDAIR_QUIRK) + set_service_attention<SA_AFTER_LDAIR, 0>(); // SA_AFTER_LDAIR + if (m_halt) { // SA_HALT + debugger_wait_hook(); + call rop + PC--; + continue; + } } + PRVPC = PC; + debugger_instruction_hook(PC); + call rop + m_ref = (0x00 << 16) | (TDAT8 << 8); + goto process; ########################################################## diff --git a/src/devices/cpu/z80/z80make.py b/src/devices/cpu/z80/z80make.py index 0aa7ee1a55e..023cdfd29ba 100644 --- a/src/devices/cpu/z80/z80make.py +++ b/src/devices/cpu/z80/z80make.py @@ -31,6 +31,10 @@ class IndStr: def has_indent(self): return self.indent != '' + def strip_indent(self, n): + if self.indent != '': + self.indent = self.indent[n:] + def replace(self, new): self.str = new @@ -77,7 +81,7 @@ class Opcode: for i in range(0, len(self.source)): il = self.source[i] if not has_steps or not step_switch: - il.indent = "" + il.strip_indent(1) line = il.line() tokens = line.split() last_line = i + 1 == len(self.source) @@ -240,7 +244,7 @@ class OpcodeList: name = line_toc[1] arg = None if len(line_toc) > 2: - arg = line_toc[2] + arg = " ".join(line_toc[2:]) if name in self.macros: macro = self.macros[name] ([out.extend(self.pre_process(il)) for il in macro.apply(arg)]) @@ -260,21 +264,22 @@ class OpcodeList: for prefix in sorted(prefixes): is_rop = prefix == 'ff' + opc_switch = not is_rop if prefix_switch: print("case 0x%s:" % (prefix), file=f) print("{", file=f) - if not is_rop: + if opc_switch: print("\tswitch (u8(m_ref >> 8)) // opcode", file=f) print("\t{", file=f) for opc in self.opcode_info[prefix]: # reenter loop only process steps > 0 if not reenter or opc.with_steps(): - if not is_rop: + if opc_switch: print("\tcase 0x%s:" % (opc.code), file=f) opc.save_dasm(step_switch=reenter, f=f) print("\t\tcontinue;", file=f) print("", file=f) - if not is_rop: + if opc_switch: print("\t}", file=f) if prefix_switch: @@ -295,6 +300,7 @@ class OpcodeList: print("", file=f) print("bool interrupted = true;", file=f) print("while (u8(m_ref) != 0x00) {", file=f) + print("// slow re-enter", file=f) print("\t// workaround to simulate main loop behavior where continue statement relays on having it set after", file=f) print("\tif (!interrupted) {", file=f) print("\t\tm_ref = 0xffff00;", file=f) @@ -305,19 +311,17 @@ class OpcodeList: self.switch_prefix(self.opcode_info.keys(), reenter=True, f=f) print("", file=f) print('assert((void("switch statement above must cover all possible cases!"), false));', file=f) - print("}", file=f) - print("", file=f) + print("} // end: slow", file=f) print("if (m_ref != 0xffff00) goto process;", file=f) print("", file=f) - print("while (true) {", file=f) - print("", file=f) - print("\t\t// unwrapped ff prefix", file=f) + print("while (true) { // fast process", file=f) + print("\t\t// rop: unwrapped ff prefix", file=f) self.switch_prefix(['ff'], reenter=False, f=f) print("", file=f) print("process:", file=f) self.switch_prefix(self.opcode_info.keys() - ['ff'], reenter=False, f=f) - print("", file=f) - print("} // while (true)", file=f) + print("} // end: fast", file=f) + print('assert((void("unreachable!"), false));', file=f) def main(argv): if len(argv) != 3 and len(argv) != 4: diff --git a/src/devices/cpu/z80/z80n.h b/src/devices/cpu/z80/z80n.h index 8198412074c..d4d452955fd 100644 --- a/src/devices/cpu/z80/z80n.h +++ b/src/devices/cpu/z80/z80n.h @@ -20,7 +20,7 @@ public: bool nmi_stackless_r() { return m_stackless; } void nmi_stackless_w(bool data) { m_stackless = data; } - void nmi() { m_nmi_pending = true; } + void nmi() { set_service_attention<SA_NMI_PENDING, 1>(); } protected: virtual void device_start() override ATTR_COLD; diff --git a/src/frontend/mame/ui/info.cpp b/src/frontend/mame/ui/info.cpp index 8c08af9a4c6..8db48046bc4 100644 --- a/src/frontend/mame/ui/info.cpp +++ b/src/frontend/mame/ui/info.cpp @@ -182,7 +182,7 @@ void get_system_warnings( std::set<std::add_pointer_t<device_type> > seen; for (device_t &device : device_enumerator(machine.root_device())) { - if ((device.type().emulation_flags() & device_t::flags::NOT_WORKING) && seen.insert(&device.type()).second) + if ((&machine.root_device() != &device) && (device.type().emulation_flags() & device_t::flags::NOT_WORKING) && seen.insert(&device.type()).second) { util::stream_format(buf, first ? _("%s") : _(", %s"), device.type().fullname()); first = false; @@ -281,7 +281,8 @@ machine_static_info::machine_static_info(const ui_options &options, machine_conf m_emulation_flags |= device.type().emulation_flags() & ~device_t::flags::NOT_WORKING; m_unemulated_features |= device.type().unemulated_features(); m_imperfect_features |= device.type().imperfect_features(); - m_has_nonworking_devices = m_has_nonworking_devices || (device.type().emulation_flags() & device_t::flags::NOT_WORKING); + if (&config.root_device() != &device) + m_has_nonworking_devices = m_has_nonworking_devices || (device.type().emulation_flags() & device_t::flags::NOT_WORKING); // look for BIOS options device_t const *const parent(device.owner()); 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 56944d3e4f9..a29413b5391 100644 --- a/src/mame/bmc/koftball.cpp +++ b/src/mame/bmc/koftball.cpp @@ -41,6 +41,7 @@ ft5_v6_c4.u58 / #include "cpu/m68000/m68000.h" #include "machine/nvram.h" +#include "machine/ticket.h" #include "machine/timer.h" #include "sound/okim6295.h" #include "sound/ymopl.h" @@ -77,7 +78,8 @@ public: m_videoram(*this, "videoram%u", 0U), m_pixram(*this, "pixram"), m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette") + m_palette(*this, "palette"), + m_hopper(*this, "hopper") { } void jxzh(machine_config &config) ATTR_COLD; @@ -97,6 +99,8 @@ private: required_shared_ptr<u16> m_pixram; required_device<gfxdecode_device> m_gfxdecode; required_device<palette_device> m_palette; + optional_device<hopper_device> m_hopper; + tilemap_t *m_tilemap[4]{}; u16 m_prot_data = 0; u8 m_irq_enable = 0; @@ -107,6 +111,7 @@ private: u8 m_pixpal = 0; void irq_ack_w(u8 data); + void outputs_w(u8 data); u16 random_number_r(); u16 prot_r(); u16 kaimenhu_prot_r(); @@ -295,6 +300,14 @@ void koftball_state::irq_ack_w(u8 data) m_maincpu->set_input_line(i, CLEAR_LINE); } +void koftball_state::outputs_w(u8 data) +{ + m_hopper->motor_w(BIT(data, 0)); + machine().bookkeeping().coin_counter_w(0, BIT(data, 1)); // credits in + machine().bookkeeping().coin_counter_w(1, BIT(data, 4)); // credits paid out by hopper or key-out + // bit 7 always set? +} + // FIXME: merge video maps void koftball_state::koftball_mem(address_map &map) { @@ -353,7 +366,7 @@ void koftball_state::jxzh_mem(address_map &map) map(0x2a001a, 0x2a001d).nopw(); map(0x2a0000, 0x2a001f).r(FUNC(koftball_state::random_number_r)); map(0x2b0000, 0x2b0001).portr("DSW"); - map(0x2da000, 0x2da003).w("ymsnd", FUNC(ym2413_device::write)).umask16(0xff00); + map(0x2da000, 0x2da003).umask16(0xff00).w("ymsnd", FUNC(ym2413_device::write)); map(0x2db001, 0x2db001).w("ramdac", FUNC(ramdac_device::index_w)); map(0x2db002, 0x2db003).nopr(); // reads here during some scene changes @@ -362,7 +375,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(0x300000, 0x300001).nopw(); + map(0x300001, 0x300001).w(FUNC(koftball_state::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)); @@ -384,23 +397,23 @@ void koftball_state::ramdac_map(address_map &map) static INPUT_PORTS_START( koftball ) PORT_START("INPUTS") - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BILL1 ) + 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( 0x0040, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("unknown1") PORT_CODE(KEYCODE_A) + 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_OTHER ) PORT_NAME("unknown2") PORT_CODE(KEYCODE_S) + 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_SERVICE_NO_TOGGLE( 0x1000, IP_ACTIVE_LOW ) // test mode enter - PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("unknown3") PORT_CODE(KEYCODE_D) - PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("unknown4") PORT_CODE(KEYCODE_F) - PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("unknown5") PORT_CODE(KEYCODE_G) + 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") @@ -453,75 +466,86 @@ static INPUT_PORTS_START( koftball ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) INPUT_PORTS_END -static INPUT_PORTS_START( jxzh ) +static INPUT_PORTS_START( kaimenhu ) PORT_START("INPUTS") - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE ) PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("hopper switch") PORT_CODE(KEYCODE_H) + PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(hopper_device::line_r)) PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_SERVICE_NO_TOGGLE( 0x1000, IP_ACTIVE_LOW ) - PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) - PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) - PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP) PORT_NAME("Change Tile / Double Up") + PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) PORT_NAME("%p Mahjong Small / Right") + PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_MAHJONG_BIG ) PORT_NAME("%p Mahjong Big / Left") + PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP) PORT_NAME("%p Mahjong Double Up / Change Tile") 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( Service_Mode ) ) 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, 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(Service_Mode) ) 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, 0x0000, "In-Game Music" ) 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( jxzh ) + PORT_INCLUDE(kaimenhu) + + PORT_MODIFY("DSW") + PORT_DIPNAME( 0x0003, 0x0003, "Odds Rate" ) PORT_DIPLOCATION("SW1:8,7") + PORT_DIPSETTING( 0x0003, "1 2 3 4 6 8 10 15" ) + PORT_DIPSETTING( 0x0002, "1 2 4 8 12 16 24 32" ) + PORT_DIPSETTING( 0x0001, "1 2 3 5 8 15 30 50" ) + PORT_DIPSETTING( 0x0000, "1 2 3 5 10 25 50 100" ) INPUT_PORTS_END @@ -596,6 +620,8 @@ void koftball_state::jxzh(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &koftball_state::jxzh_mem); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); + + HOPPER(config, m_hopper, attotime::from_msec(50)); } void koftball_state::kaimenhu(machine_config &config) @@ -745,4 +771,4 @@ void koftball_state::init_koftball() 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, jxzh, koftball_state, empty_init, ROT0, "BMC", "Kaimen Hu", 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/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..8513a663336 100644 --- a/src/mame/igs/igs011.cpp +++ b/src/mame/igs/igs011.cpp @@ -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) { @@ -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,13 +3427,15 @@ 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" ) @@ -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 ) ) @@ -5108,7 +5109,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..3c87124d514 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -18639,9 +18639,13 @@ snowboar snowboara srollnd touchgo -touchgoe -touchgon -touchgok +touchgoa +touchgona +touchgonna +touchgonnaa +touchgonnab +touchgonnac +touchgoun wrally2 wrally2a diff --git a/src/mame/misc/sshanghai.cpp b/src/mame/misc/sshanghai.cpp index 9a5eb3e6b74..9a215d83e33 100644 --- a/src/mame/misc/sshanghai.cpp +++ b/src/mame/misc/sshanghai.cpp @@ -6,14 +6,37 @@ Super Shanghai 2000. Super Shanghai 2000 - Wrestle Fiesta. + 3-reel 5-liner with an extra reel, plus a front game to hide the slots game. + + Rare stealth video slots machine platform based on a Z80 CPU and a AY-3-8910 for sound. + 5 DIP switches banks. + Driver by Roberto Fresca & Grull Osgo. - 3-reel 5-liner with an extra reel. - Rare video slots machine platform based on a Z80 CPU and a AY-3-8910 for sound. - 5 DIP switchs banks. +********************************************************************************************* + + Notes: + + This platform hosts various slot games featuring different themes, + including classic fruit symbols (7s, bells, plums, oranges, grapes, etc.), + Easter-themed graphics (eggs, rabbits), and fish-themed designs. - Unknown manufacturer. + To comply with local gambling restrictions, these games are concealed behind + a front-game interface. The system initially boots into a Pairs-style front-game. + Hidden input sequences allow switching between the slots game and the front-game. + Some machines further protect this mechanism with a 4-digit password, which can + be entered using the joystick or directional buttons and confirmed with the action button. + + The platform support games with three operational modes: + + * Pairs Mode (front-game only) + * Stealth Mode (hides the slots game) + * Direct Slots Mode (boots directly into the slots game) + + + If a set request password, use Right, Left, Up, Down, to change the code digits in order. + Action button to validate and switch to slots mode. ********************************************************************************************/ @@ -246,10 +269,10 @@ static INPUT_PORTS_START( ssh2000 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_9) PORT_NAME("Clear/Reset") PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_CODE(KEYCODE_Z) PORT_NAME("Fire 1") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_CODE(KEYCODE_Z) PORT_NAME("Action") PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_0) PORT_NAME("Port Test") - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_CODE(KEYCODE_X) PORT_NAME("Fire 2") - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3) PORT_CODE(KEYCODE_C) PORT_NAME("Fire 3") + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2) PORT_CODE(KEYCODE_X) PORT_NAME("Switch to Slots (gambling game)") + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3) PORT_CODE(KEYCODE_C) PORT_NAME("Switch to Pairs (front Game)") PORT_START("IN1") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) @@ -258,108 +281,109 @@ static INPUT_PORTS_START( ssh2000 ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_S) PORT_NAME("Test 2") PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) PORT_NAME("Coin A") PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) PORT_NAME("Coin B") - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Start (Automatic)") + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Start (Automatic Mode)") PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_NAME("Bet / Stop / Up") PORT_START("DSWA") - PORT_DIPNAME( 0x03, 0x00, "Percentage" ) PORT_DIPLOCATION("DSWA:8,7") + PORT_DIPNAME( 0x03, 0x00, "Percentage" ) PORT_DIPLOCATION("DSWA:8,7") PORT_DIPSETTING( 0x00, "80%" ) PORT_DIPSETTING( 0x01, "75%" ) PORT_DIPSETTING( 0x02, "70%" ) PORT_DIPSETTING( 0x03, "65%" ) - PORT_DIPNAME( 0x04, 0x04, "Sprites" ) PORT_DIPLOCATION("DSWA:6") + PORT_DIPNAME( 0x04, 0x04, "Sprites" ) PORT_DIPLOCATION("DSWA:6") PORT_DIPSETTING( 0x04, "Fruits") PORT_DIPSETTING( 0x00, "Tiles") - PORT_DIPNAME( 0x08, 0x00, "Game Name" ) PORT_DIPLOCATION("DSWA:5") + PORT_DIPNAME( 0x08, 0x00, "Game Name" ) PORT_DIPLOCATION("DSWA:5") PORT_DIPSETTING( 0x08, "NAME 2") PORT_DIPSETTING( 0x00, "NAME 1") - PORT_DIPNAME( 0x10, 0x00, "Extra Take") PORT_DIPLOCATION("DSWA:4") + PORT_DIPNAME( 0x10, 0x00, "Extra Take") PORT_DIPLOCATION("DSWA:4") PORT_DIPSETTING( 0x10, "OFF: NO" ) PORT_DIPSETTING( 0x00, "ON: YES" ) - PORT_DIPNAME( 0x20, 0x00, "Demo Sound" ) PORT_DIPLOCATION("DSWA:3") + PORT_DIPNAME( 0x20, 0x00, "Demo Sound" ) PORT_DIPLOCATION("DSWA:3") PORT_DIPSETTING( 0x20, "OFF: NO" ) PORT_DIPSETTING( 0x00, "ON: YES" ) - PORT_DIPNAME( 0x40, 0x00, "Max. BET" ) PORT_DIPLOCATION("DSWA:2") + PORT_DIPNAME( 0x40, 0x00, "Max. BET" ) PORT_DIPLOCATION("DSWA:2") PORT_DIPSETTING( 0x40, "OFF: 9" ) PORT_DIPSETTING( 0x00, "ON: 5" ) - PORT_DIPNAME( 0x80, 0x00, "Demostration") PORT_DIPLOCATION("DSWA:1") + PORT_DIPNAME( 0x80, 0x00, "Demostration") PORT_DIPLOCATION("DSWA:1") PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_START("DSWB") - PORT_DIPNAME( 0x0f, 0x0f, "Coinage A") PORT_DIPLOCATION("DSWB:8,7,6,5") + PORT_DIPNAME( 0x0f, 0x00, "Coinage A") PORT_DIPLOCATION("DSWB:8,7,6,5") PORT_DIPSETTING( 0x00, "1" ) - PORT_DIPSETTING( 0x1, "2" ) - PORT_DIPSETTING( 0x2, "5" ) - PORT_DIPSETTING( 0x3, "10" ) - PORT_DIPSETTING( 0x4, "20" ) - PORT_DIPSETTING( 0x5, "50" ) - PORT_DIPSETTING( 0x6, "100" ) - PORT_DIPSETTING( 0x7, "500" ) - PORT_DIPSETTING( 0x8, "1000" ) - PORT_DIPSETTING( 0x9, "4" ) - PORT_DIPSETTING( 0xa, "8" ) - PORT_DIPSETTING( 0xb, "20" ) - PORT_DIPSETTING( 0xc, "40" ) - PORT_DIPSETTING( 0xd, "200" ) - PORT_DIPSETTING( 0xe, "400" ) - PORT_DIPSETTING( 0xf, "10" ) - PORT_DIPNAME( 0xf0, 0xf0, "Coinage B") PORT_DIPLOCATION("DSWB:4,3,2,1") + PORT_DIPSETTING( 0x01, "2" ) + PORT_DIPSETTING( 0x09, "4" ) + PORT_DIPSETTING( 0x02, "5" ) + PORT_DIPSETTING( 0x0a, "8" ) + PORT_DIPSETTING( 0x03, "10" ) + PORT_DIPSETTING( 0x0f, "10" ) + PORT_DIPSETTING( 0x04, "20" ) + PORT_DIPSETTING( 0x0b, "20" ) + PORT_DIPSETTING( 0x0c, "40" ) + PORT_DIPSETTING( 0x05, "50" ) + PORT_DIPSETTING( 0x06, "100" ) + PORT_DIPSETTING( 0x0d, "200" ) + PORT_DIPSETTING( 0x0e, "400" ) + PORT_DIPSETTING( 0x07, "500" ) + PORT_DIPSETTING( 0x08, "1000" ) + PORT_DIPNAME( 0xf0, 0x00, "Coinage B") PORT_DIPLOCATION("DSWB:4,3,2,1") PORT_DIPSETTING( 0x00, "1" ) PORT_DIPSETTING( 0x10, "2" ) + PORT_DIPSETTING( 0x90, "4" ) PORT_DIPSETTING( 0x20, "5" ) + PORT_DIPSETTING( 0xa0, "8" ) PORT_DIPSETTING( 0x30, "10" ) + PORT_DIPSETTING( 0xf0, "10" ) PORT_DIPSETTING( 0x40, "20" ) - PORT_DIPSETTING( 0x50, "50" ) - PORT_DIPSETTING( 0x60, "100" ) - PORT_DIPSETTING( 0x70, "500" ) - PORT_DIPSETTING( 0x80, "1000" ) - PORT_DIPSETTING( 0x90, "4" ) - PORT_DIPSETTING( 0xa0, "8" ) PORT_DIPSETTING( 0xb0, "20" ) PORT_DIPSETTING( 0xc0, "40" ) + PORT_DIPSETTING( 0x50, "50" ) + PORT_DIPSETTING( 0x60, "100" ) PORT_DIPSETTING( 0xd0, "200" ) PORT_DIPSETTING( 0xe0, "400" ) - PORT_DIPSETTING( 0xf0, "10" ) + PORT_DIPSETTING( 0x70, "500" ) + PORT_DIPSETTING( 0x80, "1000" ) PORT_START("DSWC") - PORT_DIPNAME( 0x01, 0x01, "Found") PORT_DIPLOCATION("DSWC:8") + PORT_DIPNAME( 0x01, 0x00, "Found") PORT_DIPLOCATION("DSWC:8") PORT_DIPSETTING( 0x01, "Auto" ) PORT_DIPSETTING( 0x00, "Hand" ) - PORT_DIPNAME( 0x02, 0x02, "Found Pay" ) PORT_DIPLOCATION("DSWC:7") + PORT_DIPNAME( 0x02, 0x00, "Found Pay" ) PORT_DIPLOCATION("DSWC:7") PORT_DIPSETTING( 0x02, "By One" ) PORT_DIPSETTING( 0x00, "All" ) - PORT_DIPNAME( 0x04, 0x04, "Papas Pay" ) PORT_DIPLOCATION("DSWC:6") + PORT_DIPNAME( 0x04, 0x00, "Papas Pay" ) PORT_DIPLOCATION("DSWC:6") PORT_DIPSETTING( 0x04, "By One" ) PORT_DIPSETTING( 0x00, "All" ) - PORT_DIPNAME( 0x08, 0x08, "Flip Type" ) PORT_DIPLOCATION("DSWC:5") + PORT_DIPNAME( 0x08, 0x00, "Flip Type" ) PORT_DIPLOCATION("DSWC:5") PORT_DIPSETTING( 0x08, "on Tape" ) PORT_DIPSETTING( 0x00, "on Kare" ) - PORT_DIPNAME( 0xf0, 0xf0, "Coinage C") PORT_DIPLOCATION("DSWC:4,3,2,1") + PORT_DIPNAME( 0xf0, 0x00, "Coinage C") PORT_DIPLOCATION("DSWC:4,3,2,1") PORT_DIPSETTING( 0x00, "1" ) PORT_DIPSETTING( 0x10, "2" ) + PORT_DIPSETTING( 0x90, "4" ) PORT_DIPSETTING( 0x20, "5" ) + PORT_DIPSETTING( 0xa0, "8" ) PORT_DIPSETTING( 0x30, "10" ) + PORT_DIPSETTING( 0xf0, "10" ) PORT_DIPSETTING( 0x40, "20" ) - PORT_DIPSETTING( 0x50, "50" ) - PORT_DIPSETTING( 0x60, "100" ) - PORT_DIPSETTING( 0x70, "500" ) - PORT_DIPSETTING( 0x80, "1000" ) - PORT_DIPSETTING( 0x90, "4" ) - PORT_DIPSETTING( 0xa0, "8" ) PORT_DIPSETTING( 0xb0, "20" ) PORT_DIPSETTING( 0xc0, "40" ) + PORT_DIPSETTING( 0x50, "50" ) + PORT_DIPSETTING( 0x60, "100" ) PORT_DIPSETTING( 0xd0, "200" ) PORT_DIPSETTING( 0xe0, "400" ) - PORT_DIPSETTING( 0xf0, "10" ) + PORT_DIPSETTING( 0x70, "500" ) + PORT_DIPSETTING( 0x80, "1000" ) PORT_START("DSWD") - PORT_DIPNAME( 0x0f, 0x0f, "Credit Limit") PORT_DIPLOCATION("DSWD:8,7,6,5") + PORT_DIPNAME( 0x0f, 0x00, "Credit Limit") PORT_DIPLOCATION("DSWD:8,7,6,5") PORT_DIPSETTING( 0x00, " 5000" ) PORT_DIPSETTING( 0x01, " 7500" ) PORT_DIPSETTING( 0x02, "10000" ) PORT_DIPSETTING( 0x03, "15000" ) PORT_DIPSETTING( 0x04, "20000" ) + PORT_DIPSETTING( 0x0f, "20000" ) PORT_DIPSETTING( 0x05, "25000" ) PORT_DIPSETTING( 0x06, "30000" ) PORT_DIPSETTING( 0x07, "35000" ) @@ -370,21 +394,20 @@ static INPUT_PORTS_START( ssh2000 ) PORT_DIPSETTING( 0x0c, "70000" ) PORT_DIPSETTING( 0x0d, "80000" ) PORT_DIPSETTING( 0x0e, "90000" ) - PORT_DIPSETTING( 0x0f, "20000" ) - PORT_DIPNAME( 0x10, 0x10, "Swap Code" ) PORT_DIPLOCATION("DSWD:4") + PORT_DIPNAME( 0x10, 0x00, "Swap Code" ) PORT_DIPLOCATION("DSWD:4") PORT_DIPSETTING( 0x10, "Code 2" ) PORT_DIPSETTING( 0x00, "Code 1" ) - PORT_DIPNAME( 0x20, 0x20, "Return In" ) PORT_DIPLOCATION("DSWD:3") + PORT_DIPNAME( 0x20, 0x00, "Return In" ) PORT_DIPLOCATION("DSWD:3") PORT_DIPSETTING( 0x20, "Main" ) PORT_DIPSETTING( 0x00, "Amusement" ) - PORT_DIPNAME( 0x40, 0x40, "Must be Off" ) PORT_DIPLOCATION("DSWD:2") + PORT_DIPNAME( 0x40, 0x00, "Must be Off" ) PORT_DIPLOCATION("DSWD:2") PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPNAME( 0x80, 0x80, "Amusement" ) PORT_DIPLOCATION("DSWD:1") + PORT_DIPNAME( 0x80, 0x00, "Amusement" ) PORT_DIPLOCATION("DSWD:1") PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_START("DSWE") - PORT_DIPNAME( 0x0f, 0x0f, "CoinIn Limit") PORT_DIPLOCATION("DSWE:8,7,6,5") + PORT_DIPNAME( 0x0f, 0x00, "CoinIn Limit") PORT_DIPLOCATION("DSWE:8,7,6,5") PORT_DIPSETTING( 0x00, " 1000" ) PORT_DIPSETTING( 0x01, " 2000" ) PORT_DIPSETTING( 0x02, " 3000" ) @@ -401,12 +424,12 @@ static INPUT_PORTS_START( ssh2000 ) PORT_DIPSETTING( 0x0d, "40000" ) PORT_DIPSETTING( 0x0e, "50000" ) PORT_DIPSETTING( 0x0f, " 5000" ) - PORT_DIPNAME( 0x30, 0x30, "Preset BONUS" ) PORT_DIPLOCATION("DSWE:4,3") + PORT_DIPNAME( 0x30, 0x00, "Preset BONUS" ) PORT_DIPLOCATION("DSWE:4,3") PORT_DIPSETTING( 0x00, "1000" ) PORT_DIPSETTING( 0x10, "2000" ) PORT_DIPSETTING( 0x20, "3000" ) PORT_DIPSETTING( 0x30, "4000" ) - PORT_DIPNAME( 0xc0, 0xc0, "Preset LEFT" ) PORT_DIPLOCATION("DSWE:2,1") + PORT_DIPNAME( 0xc0, 0x00, "Preset LEFT" ) PORT_DIPLOCATION("DSWE:2,1") PORT_DIPSETTING( 0x00, "1000" ) PORT_DIPSETTING( 0x40, "2000" ) PORT_DIPSETTING( 0x80, "3000" ) @@ -466,6 +489,7 @@ void ssh2000_state::ssh2000(machine_config &config) /* Super Shanghai 2000 (set 1) + No code to enter the game. type: SHG-47 version: 2000 @@ -510,6 +534,7 @@ ROM_END /* Super Shanghai 2000 (set 2) + Code 1234 to enter the game. type: SHG-47 version: 2000 @@ -545,6 +570,7 @@ ROM_END Super Shanghai 2000 Wrestle Fiesta. Main program 30% bonus by Vegas (red board) + No code to enter the game. type: SHG-47 version: 2000 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) |