diff options
Diffstat (limited to 'src')
32 files changed, 2222 insertions, 1046 deletions
diff --git a/src/devices/cpu/dspp/dspp.cpp b/src/devices/cpu/dspp/dspp.cpp index 0a82905bec1..1e889a32bec 100644 --- a/src/devices/cpu/dspp/dspp.cpp +++ b/src/devices/cpu/dspp/dspp.cpp @@ -157,11 +157,11 @@ void dspp_device::device_start() // Register our state for the debugger state_add(DSPP_PC, "PC", m_core->m_pc); - state_add(DSPP_ACC, "ACC", m_core->m_acc); + state_add(DSPP_ACC, "ACC", m_core->m_acc).mask(0xfffff); state_add(STATE_GENPC, "GENPC", m_core->m_pc).noshow(); + state_add(STATE_GENPCBASE, "GENPCBASE", m_core->m_pc).noshow(); #if 0 state_add(STATE_GENFLAGS, "GENFLAGS", m_core->m_flags).callimport().callexport().formatstr("%6s").noshow(); - state_add(STATE_GENPCBASE, "GENPCBASE", m_ppc).noshow(); state_add(DSPP_PS, "PS", m_core->m_flagsio).callimport().callexport(); for (int regnum = 0; regnum < 32; regnum++) @@ -441,18 +441,15 @@ void dspp_device::parse_operands(uint32_t numops) // Immediate value if ((operand & 0xc000) == 0xc000) { - val = operand & 0x1fff; - if (operand & 0x2000) { // Left justify - val = val << 3; + val = (operand & 0x1fff) << 3; } else { // Sign extend if right justified - if (val & 0x1000) - val |= 0xe000; + val = uint16_t(util::sext(operand, 13)); } m_core->m_operands[opidx++].value = val; } @@ -949,38 +946,6 @@ inline void dspp_device::exec_control() } } -//------------------------------------------------- -// sign_extend8 - Sign extend 8-bits to 32-bits -//------------------------------------------------- - -static inline int32_t sign_extend8(uint8_t val) -{ - return (int32_t)(int8_t)val; -} - - -//------------------------------------------------- -// sign_extend16 - Sign extend 16-bits to 32-bits -//------------------------------------------------- - -static inline int32_t sign_extend16(uint16_t val) -{ - return (int32_t)(int16_t)val; -} - - -//------------------------------------------------- -// sign_extend20 - Sign extend 20-bits to 32-bits -//------------------------------------------------- - -static inline int32_t sign_extend20(uint32_t val) -{ - if (val & 0x00080000) - return (int32_t)(0xfff00000 | val); - else - return (int32_t)val; -} - //------------------------------------------------- // exec_arithmetic - Execute an arithmetic op @@ -1013,8 +978,8 @@ inline void dspp_device::exec_arithmetic() { uint32_t mul_sel = (m_core->m_op >> 12) & 1; - int32_t op1 = sign_extend16(read_next_operand()); - int32_t op2 = sign_extend16(mul_sel ? read_next_operand() : m_core->m_acc >> 4); + int32_t op1 = int16_t(read_next_operand()); + int32_t op2 = int16_t(mul_sel ? read_next_operand() : m_core->m_acc >> 4); mul_res = (op1 * op2) >> 11; } @@ -1202,7 +1167,7 @@ inline void dspp_device::exec_arithmetic() if (alu_op < 8) { // Arithmetic - m_core->m_acc = sign_extend20(alu_res) >> shift; + m_core->m_acc = util::sext(alu_res, 20) >> shift; } else { @@ -1222,11 +1187,11 @@ inline void dspp_device::exec_arithmetic() if (m_core->m_flag_over) m_core->m_acc = m_core->m_flag_neg ? 0x7ffff : 0xfff80000; else - m_core->m_acc = sign_extend20(alu_res); + m_core->m_acc = util::sext(alu_res, 20); } else { - m_core->m_acc = sign_extend20(alu_res) << shift; + m_core->m_acc = util::sext(alu_res << shift, 20); } } @@ -1458,7 +1423,7 @@ void dspp_device::process_next_dma(int32_t channel) int16_t dspp_device::decode_sqxd(int8_t data, int16_t prev) { - int16_t temp = sign_extend8(data & 0xfe); + int16_t temp = int8_t(data & 0xfe); int32_t expanded = (temp * iabs(temp)) << 1; int16_t output; diff --git a/src/devices/cpu/dspp/dsppdasm.cpp b/src/devices/cpu/dspp/dsppdasm.cpp index 6b43df5d452..ff534ac79c7 100644 --- a/src/devices/cpu/dspp/dsppdasm.cpp +++ b/src/devices/cpu/dspp/dsppdasm.cpp @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Philip Bennett +// copyright-holders:Philip Bennett, AJR /*************************************************************************** dsppdasm.c @@ -18,107 +18,583 @@ uint32_t dspp_disassembler::opcode_alignment() const { - return 2; + return 1; +} + + +//------------------------------------------------- +// format_operand - Format the value encoded by +// an instruction operand +//------------------------------------------------- + +void dspp_disassembler::format_operand(std::ostream &stream, uint16_t operand) +{ + uint32_t numregs = 0; + + if (operand & 0x8000) + { + // Immediate value + if ((operand & 0xc000) == 0xc000) + { + uint16_t val; + + if (operand & 0x2000) + { + // Left justify + val = (operand & 0x1fff) << 3; + } + else + { + // Sign extend if right justified + val = util::sext(operand, 13); + } + util::stream_format(stream, "#0x%04X", val); + } + else if((operand & 0xe000) == 0x8000) + { + // Address operand + uint16_t addr = operand & 0x03ff; + + if (operand & 0x0400) + { + // Indirect + stream << '@'; + } + util::stream_format(stream, "[0x%03X]", addr); + + if (operand & 0x0800) + { + // Write Back + stream << '!'; + } + } + else if ((operand & 0xe000) == 0xa000) + { + // 1 or 2 register operand + numregs = (operand & 0x0400) ? 2 : 1; + } + } + else + { + numregs = 3; + } + + if (numregs > 0) + { + uint32_t shifter, regdi; + + // Shift successive register operands from a single operand word + for (uint32_t i = 0; i < numregs; ++i) + { + if (i > 0) + stream << ", "; + + shifter = ((numregs - i) - 1) * 5; + regdi = (operand >> shifter) & 0x1f; + + if (regdi & 0x0010) + { + // Indirect? + stream << '@'; + } + util::stream_format(stream, "[R%d]", regdi & 0xf); + + if (numregs == 2) + { + if ((i == 0) && (operand & 0x1000)) + stream << '!'; + else if ((i == 1) && (operand & 0x0800)) + stream << '!'; + } + else if (numregs == 1) + { + if (operand & 0x800) + stream << '!'; + } + } + } +} + + + +//************************************************************************** +// OPCODE DISASSEMBLY +//************************************************************************** + +//------------------------------------------------- +// dasm_super_special - Disassemble a super +// special control op +//------------------------------------------------- + +offs_t dspp_disassembler::dasm_super_special(std::ostream &stream, uint16_t op) +{ + uint32_t sel = (op >> 7) & 7; + + switch (sel) + { + case 1: // BAC + { + stream << "BAC"; + return 1 | SUPPORTED; + } + + case 4: // RTS + { + stream << "RTS"; + return 1 | STEP_OUT | SUPPORTED; + } + + case 5: // OP_MASK + { + stream << "OP_MASK"; + return 1 | SUPPORTED; + } + + case 7: // SLEEP + { + stream << "SLEEP"; + return 1 | SUPPORTED; + } + + case 0: // NOP + { + stream << "NOP"; + return 1 | SUPPORTED; + } + + default: // Unused + { + util::stream_format(stream, "0x%04X", op); + return 1 | SUPPORTED; + } + } +} + + +//------------------------------------------------- +// dasm_special - Disassemble a special control op +//------------------------------------------------- + +offs_t dspp_disassembler::dasm_special(std::ostream &stream, offs_t pc, const data_buffer &opcodes, uint16_t op) +{ + switch ((op >> 10) & 7) + { + case 0: + { + return dasm_super_special(stream, op); + } + case 1: // JUMP + { + util::stream_format(stream, "JUMP 0x%03X", op & 0x3ff); + return 1 | SUPPORTED; + } + case 2: // JSR + { + util::stream_format(stream, "JSR 0x%03X", op & 0x3ff); + return 1 | STEP_OVER | SUPPORTED; + } + case 3: // BFM + { + util::stream_format(stream, "BFM 0x%03X", op & 0x3ff); + return 1 | SUPPORTED; + } + case 4: // MOVEREG + { + uint32_t regdi = op & 0x3f; + + util::stream_format(stream, "MOVEREG %sR%d, ", (regdi & 0x0010) ? "@" : "", regdi & 0xf); + format_operand(stream, opcodes.r16(pc + 1)); + return 2 | SUPPORTED; + } + case 5: // RBASE + { + util::stream_format(stream, "RBASE%d 0x%03X", (op & 3) << 2, op & 0x3fc); + return 1 | SUPPORTED; + } + case 6: // MOVED + { + util::stream_format(stream, "MOVE [0x%03X], ", op & 0x3ff); + format_operand(stream, opcodes.r16(pc + 1)); + return 2 | SUPPORTED; + } + case 7: // MOVEI + { + util::stream_format(stream, "MOVE @[0x%03X], ", op & 0x3ff); + format_operand(stream, opcodes.r16(pc + 1)); + return 2 | SUPPORTED; + } + + default: + { + util::stream_format(stream, "0x%04X", op); + return 1 | SUPPORTED; + } + } +} + + +//------------------------------------------------- +// dasm_branch - Disassemble a branch control op +//------------------------------------------------- + +offs_t dspp_disassembler::dasm_branch(std::ostream &stream, uint16_t op) +{ + uint32_t mode = (op >> 13) & 3; + uint32_t select = (op >> 12) & 1; + uint32_t mask = (op >> 10) & 3; + + char flag0, flag1; + + if (select == 0) + { + flag0 = 'N'; + flag1 = 'V'; + } + else + { + flag0 = 'C'; + flag1 = 'Z'; + } + + bool mask0 = (mask & 2) != 0; + bool mask1 = (mask & 1) != 0; + + if (mode == 2) + stream << "BFC "; + else + stream << "BTC "; + + if (mask0 && mask1) + { + stream << flag1; + stream << flag0; + } + else if (mask0) + { + stream << flag0; + } + else if (mask1) + { + stream << flag1; + } + else + { + stream << '0'; + } + + util::stream_format(stream, ", 0x%03X", op & 0x3ff); + return 1 | (mask0 || mask1 ? STEP_COND : 0) | SUPPORTED; +} + + +//------------------------------------------------- +// dasm_complex_branch - Disassemble a complex +// branch control op +//------------------------------------------------- + +offs_t dspp_disassembler::dasm_complex_branch(std::ostream &stream, uint16_t op) +{ + uint32_t type = (op >> 10) & 7; + + switch (type) + { + case 0: // BLT + stream << "BLT"; + break; + case 1: // BLE + stream << "BLE"; + break; + case 2: // BGE + stream << "BGE"; + break; + case 3: // BGT + stream << "BGT"; + break; + case 4: // BHI + stream << "BHI"; + break; + case 5: // BLS + stream << "BLS"; + break; + case 6: // BXS + stream << "BXS"; + break; + case 7: // BXC + stream << "BXC"; + break; + } + + util::stream_format(stream, " 0x%03X", op & 0x3ff); + return 1 | STEP_COND | SUPPORTED; +} + + +//------------------------------------------------- +// dasm_control - Disassemble a control op +//------------------------------------------------- + +offs_t dspp_disassembler::dasm_control(std::ostream &stream, offs_t pc, const data_buffer &opcodes, uint16_t op) +{ + uint32_t mode = (op >> 13) & 3; + + switch (mode) + { + // Special + case 0: + { + return dasm_special(stream, pc, opcodes, op); + } + + // Branches + case 1: case 2: + { + return dasm_branch(stream, op); + } + + // Complex branches + case 3: + { + return dasm_complex_branch(stream, op); + } + + default: + { + util::stream_format(stream, "0x%04X", op); + return 1 | SUPPORTED; + } + } +} + + +//------------------------------------------------- +// dasm_arithmetic - Disassemble an arithmetic op +//------------------------------------------------- + +offs_t dspp_disassembler::dasm_arithmetic(std::ostream &stream, offs_t pc, const data_buffer &opcodes, uint16_t op) +{ + // Decode the various fields + uint32_t numops = (op >> 13) & 3; + uint32_t muxa = (op >> 10) & 3; + uint32_t muxb = (op >> 8) & 3; + uint32_t alu_op = (op >> 4) & 0xf; + uint32_t barrel_code = op & 0xf; + + uint32_t opidx = 0; + + // Check for operand overflow + if (numops == 0 && ((muxa == 1) || (muxa == 2) || (muxb == 1) || (muxb == 2))) + numops = 4; + + // Implicit barrel shift + if (barrel_code == 8) + ++numops; + + if (muxa == 3 || muxb == 3) + { + uint32_t mul_sel = (op >> 12) & 1; + + ++opidx; + if (mul_sel) + ++opidx; + } + + if (alu_op < 8) + stream << "TRA "; + else + stream << "TRL "; + + if (alu_op != 1) + { + if (alu_op == 9) + stream << "NOT "; + + switch (muxa) + { + case 0: + { + stream << "ACC"; + break; + } + case 1: case 2: + { + format_operand(stream, opcodes.r16(pc + 1 + opidx++)); + break; + } + case 3: + { + uint32_t mul_sel = (op >> 12) & 1; + + format_operand(stream, opcodes.r16(pc + 1)); + stream << " * "; + if (mul_sel) + format_operand(stream, opcodes.r16(pc + 2)); + else + stream << "ACC"; + break; + } + } + } + + switch (alu_op) + { + case 0: // _TRA + { + break; + } + case 1: // _NEG + { + stream << "-"; + break; + } + case 2: // _+ + { + stream << " + "; + break; + } + case 3: // _+C + { + stream << " + C"; + break; + } + case 4: // _- + { + stream << " - "; + break; + } + case 5: // _-B + { + stream << " - B"; + break; + } + case 6: // _++ + { + stream << "++"; + break; + } + case 7: // _-- + { + stream << "--"; + break; + } + case 8: // _TRL + { + break; + } + case 9: // _NOT + { + break; + } + case 10: // _AND + { + stream << " AND "; + break; + } + case 11: // _NAND + { + stream << " NAND "; + break; + } + case 12: // _OR + { + stream << " OR "; + break; + } + case 13: // _NOR + { + stream << " NOR "; + break; + } + case 14: // _XOR + { + stream << " XOR "; + break; + } + case 15: // _XNOR + { + stream << " XNOR "; + break; + } + } + + if (alu_op == 1 || alu_op == 2 || alu_op == 4 || alu_op >= 10) + { + switch (muxb) + { + case 0: + { + stream << "ACC"; + break; + } + case 1: case 2: + { + format_operand(stream, opcodes.r16(pc + 1 + opidx++)); + break; + } + case 3: + { + uint32_t mul_sel = (op >> 12) & 1; + + format_operand(stream, opcodes.r16(pc + 1)); + stream << " * "; + if (mul_sel) + format_operand(stream, opcodes.r16(pc + 2)); + else + stream << "ACC"; + break; + } + } + } + + // Barrel shift + static const int32_t shifts[8] = { 0, 1, 2, 3, 4, 5, 8, 16 }; + + if (barrel_code == 8) + { + stream << " SHIFT "; + format_operand(stream, opcodes.r16(pc + 1 + opidx++)); + } + + else if (barrel_code & 8) + { + // Right shift + uint32_t shift = shifts[(~barrel_code + 1) & 7]; + + if (shift != 0) + { + util::stream_format(stream, " >> %d", shift); + } + } + else + { + // Left shift + uint32_t shift = shifts[barrel_code]; + + if (shift == 16) + { + // Clip and saturate + stream << " SAT"; + } + else if (shift != 0) + { + util::stream_format(stream, " << %d", shift); + } + } + + if (opidx < numops) + { + stream << ", "; + format_operand(stream, opcodes.r16(pc + 1 + opidx)); + } + + return (numops + 1) | SUPPORTED; } offs_t dspp_disassembler::disassemble(std::ostream &stream, offs_t pc, const data_buffer &opcodes, const data_buffer ¶ms) { -#if 0 - uint32_t op = oprom[0] | (oprom[1] << 8) | (oprom[2] << 16) | (oprom[3] << 24); - int opcode = op >> 27; - int cond = (op >> 21) & 1; - int rdst = (op >> 22) & 31; - int rsrc1 = (op >> 16) & 31; - int rsrc2 = op & 0xffff; - int rsrc2_iszero = (!rsrc2 || rsrc2 == 0xffe0); - uint32_t flags = 0; - - switch (opcode) - { - case 0x00: sprintf(buffer, "trap $00"); flags = DASMFLAG_STEP_OVER; break; - case 0x01: sprintf(buffer, "b%s $%08x", condition[rdst & 15], pc + ((INT32)(op << 10) >> 8)); break; - case 0x02: if ((op & 0x003fffff) == 3) - { - uint32_t nextop = oprom[4] | (oprom[5] << 8) | (oprom[6] << 16) | (oprom[7] << 24); - if ((nextop >> 27) == 0x10 && ((nextop >> 22) & 31) == rdst && (nextop & 0xffff) == 0) - { - uint32_t nextnextop = oprom[8] | (oprom[9] << 8) | (oprom[10] << 16) | (oprom[11] << 24); - sprintf(buffer, "llit%s $%08x,%s", setcond[cond], nextnextop, reg[rdst]); - return 12 | DASMFLAG_STEP_OVER | DASMFLAG_SUPPORTED; - } - } - if (rdst) - { - flags = DASMFLAG_STEP_OVER | DASMFLAG_STEP_OVER_EXTRA(1); - sprintf(buffer, "bsr %s,$%08x", reg[rdst], pc + ((INT32)(op << 10) >> 8)); - } - else - sprintf(buffer, "bra $%08x", pc + ((INT32)(op << 10) >> 8)); - break; - case 0x03: sprintf(buffer, "lea%s %s[%s],%s", setcond[cond], reg[rsrc1], src2(op,2), reg[rdst]); break; - case 0x04: sprintf(buffer, "leah%s %s[%s],%s", setcond[cond], reg[rsrc1], src2(op,1), reg[rdst]); break; - case 0x05: sprintf(buffer, "subr%s %s,%s,%s", setcond[cond], reg[rsrc1], src2(op,0), reg[rdst]); break; - case 0x06: sprintf(buffer, "xor%s %s,%s,%s", setcond[cond], reg[rsrc1], src2(op,0), reg[rdst]); break; - case 0x07: sprintf(buffer, "xorn%s %s,%s,%s", setcond[cond], reg[rsrc1], src2(op,0), reg[rdst]); break; - case 0x08: if (!rsrc1 && !rdst && rsrc2_iszero) - sprintf(buffer, "nop"); - else if (!rsrc1) - sprintf(buffer, "mov%s %s,%s", setcond[cond], src2(op,0), reg[rdst]); - else if (rsrc2_iszero) - sprintf(buffer, "mov%s %s,%s", setcond[cond], reg[rsrc1], reg[rdst]); - else - sprintf(buffer, "add%s %s,%s,%s", setcond[cond], reg[rsrc1], src2(op,0), reg[rdst]); break; - case 0x09: sprintf(buffer, "sub%s %s,%s,%s", setcond[cond], reg[rsrc1], src2(op,0), reg[rdst]); break; - case 0x0a: sprintf(buffer, "addc%s %s,%s,%s", setcond[cond], reg[rsrc1], src2(op,0), reg[rdst]); break; - case 0x0b: sprintf(buffer, "subc%s %s,%s,%s", setcond[cond], reg[rsrc1], src2(op,0), reg[rdst]); break; - case 0x0c: sprintf(buffer, "and%s %s,%s,%s", setcond[cond], reg[rsrc1], src2(op,0), reg[rdst]); break; - case 0x0d: sprintf(buffer, "andn%s %s,%s,%s", setcond[cond], reg[rsrc1], src2(op,0), reg[rdst]); break; - case 0x0e: if (!rsrc1 && !rdst && rsrc2_iszero) - sprintf(buffer, "nop"); - else if (!rsrc1) - sprintf(buffer, "mov%s %s,%s", setcond[cond], src2(op,0), reg[rdst]); - else if (rsrc2_iszero) - sprintf(buffer, "mov%s %s,%s", setcond[cond], reg[rsrc1], reg[rdst]); - else - sprintf(buffer, "or%s %s,%s,%s", setcond[cond], reg[rsrc1], src2(op,0), reg[rdst]); break; - case 0x0f: sprintf(buffer, "orn%s %s,%s,%s", setcond[cond], reg[rsrc1], src2(op,0), reg[rdst]); break; - case 0x10: sprintf(buffer, "ld%s %s[%s],%s", setcond[cond], reg[rsrc1], src2(op,2), reg[rdst]); break; - case 0x11: sprintf(buffer, "ldh%s %s[%s],%s", setcond[cond], reg[rsrc1], src2(op,1), reg[rdst]); break; - case 0x12: sprintf(buffer, "lduh%s %s[%s],%s", setcond[cond], reg[rsrc1], src2(op,1), reg[rdst]); break; - case 0x13: sprintf(buffer, "sth%s %s[%s],%s", setcond[cond], reg[rsrc1], src2(op,1), reg[rdst]); break; - case 0x14: sprintf(buffer, "st%s %s[%s],%s", setcond[cond], reg[rsrc1], src2(op,2), reg[rdst]); break; - case 0x15: sprintf(buffer, "ldb%s %s[%s],%s", setcond[cond], reg[rsrc1], src2(op,0), reg[rdst]); break; - case 0x16: sprintf(buffer, "ldub%s %s[%s],%s", setcond[cond], reg[rsrc1], src2(op,0), reg[rdst]); break; - case 0x17: sprintf(buffer, "stb%s %s[%s],%s", setcond[cond], reg[rsrc1], src2(op,0), reg[rdst]); break; - case 0x18: sprintf(buffer, "ashr%s %s,%s,%s", setcond[cond], reg[rsrc1], src2(op,0), reg[rdst]); break; - case 0x19: sprintf(buffer, "lshr%s %s,%s,%s", setcond[cond], reg[rsrc1], src2(op,0), reg[rdst]); break; - case 0x1a: sprintf(buffer, "ashl%s %s,%s,%s", setcond[cond], reg[rsrc1], src2(op,0), reg[rdst]); break; - case 0x1b: sprintf(buffer, "rotl%s %s,%s,%s", setcond[cond], reg[rsrc1], src2(op,0), reg[rdst]); break; - case 0x1c: sprintf(buffer, "getps %s", reg[rdst]); break; - case 0x1d: sprintf(buffer, "putps %s", src2(op,0)); break; - case 0x1e: if (rdst && rsrc2_iszero) - { - flags = DASMFLAG_STEP_OVER | DASMFLAG_STEP_OVER_EXTRA(1); - sprintf(buffer, "jsr%s %s,%s", setcond[cond], reg[rdst], reg[rsrc1]); - } - else if (rdst) - { - flags = DASMFLAG_STEP_OVER | DASMFLAG_STEP_OVER_EXTRA(1); - sprintf(buffer, "jsr%s %s,%s[%s]", setcond[cond], reg[rdst], reg[rsrc1], src2(op,2)); - } - else if (rsrc2_iszero) - { - if (rsrc1 == 28) - flags = DASMFLAG_STEP_OUT; - sprintf(buffer, "jmp%s %s", setcond[cond], reg[rsrc1]); - } - else - sprintf(buffer, "jmp%s %s[%s]", setcond[cond], reg[rsrc1], src2(op,2)); - break; - case 0x1f: sprintf(buffer, "trap $1f"); flags = DASMFLAG_STEP_OVER; break; - } - - sprintf(buffer, "????"); -#endif - return 4 | 2 | SUPPORTED; + // Decode and disassemble + uint16_t op = opcodes.r16(pc); + if (op & 0x8000) + return dasm_control(stream, pc, opcodes, op); + else + return dasm_arithmetic(stream, pc, opcodes, op); } diff --git a/src/devices/cpu/dspp/dsppdasm.h b/src/devices/cpu/dspp/dsppdasm.h index 538f0a96c0e..b7af27ccccd 100644 --- a/src/devices/cpu/dspp/dsppdasm.h +++ b/src/devices/cpu/dspp/dsppdasm.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Philip Bennett +// copyright-holders:Philip Bennett, AJR /* DSPP disassembler shim */ @@ -17,6 +17,16 @@ public: virtual uint32_t opcode_alignment() const override; virtual offs_t disassemble(std::ostream &stream, offs_t pc, const data_buffer &opcodes, const data_buffer ¶ms) override; + +private: + static void format_operand(std::ostream &stream, uint16_t operand); + + static offs_t dasm_control(std::ostream &stream, offs_t pc, const data_buffer &opcodes, uint16_t op); + static offs_t dasm_super_special(std::ostream &stream, uint16_t op); + static offs_t dasm_special(std::ostream &stream, offs_t pc, const data_buffer &opcodes, uint16_t op); + static offs_t dasm_branch(std::ostream &stream, uint16_t op); + static offs_t dasm_complex_branch(std::ostream &stream, uint16_t op); + static offs_t dasm_arithmetic(std::ostream &stream, offs_t pc, const data_buffer &opcodes, uint16_t op); }; #endif // MAME_CPU_DSPP_DSPPDASM_H diff --git a/src/devices/cpu/sh/sh4fe.cpp b/src/devices/cpu/sh/sh4fe.cpp index cb3afaba6fe..8474cb48171 100644 --- a/src/devices/cpu/sh/sh4fe.cpp +++ b/src/devices/cpu/sh/sh4fe.cpp @@ -28,7 +28,8 @@ uint16_t sh4_frontend::read_word(opcode_desc &desc) if (desc.physpc >= 0xe0000000) return m_sh->m_pr16(desc.physpc); - return m_sh->m_pr16(desc.physpc & SH34_AM); + desc.physpc &= SH34_AM; // TODO: mmu translate + return m_sh->m_pr16(desc.physpc); } diff --git a/src/emu/audio_effects/eq.cpp b/src/emu/audio_effects/eq.cpp index 799b2f8c9b5..c2db2680e5b 100644 --- a/src/emu/audio_effects/eq.cpp +++ b/src/emu/audio_effects/eq.cpp @@ -120,6 +120,9 @@ void audio_effect_eq::config_load(util::xml::data_node const *ef_node) } else reset_db(band); } + + for(u32 i = 0; i != BANDS; i++) + build_filter(i); } void audio_effect_eq::config_save(util::xml::data_node *ef_node) const diff --git a/src/emu/audio_effects/filter.cpp b/src/emu/audio_effects/filter.cpp index 70cf7ddc967..947f4b7af58 100644 --- a/src/emu/audio_effects/filter.cpp +++ b/src/emu/audio_effects/filter.cpp @@ -113,6 +113,9 @@ void audio_effect_filter::config_load(util::xml::data_node const *ef_node) m_isset_qh = true; } else reset_qh(); + + build_highpass(); + build_lowpass(); } void audio_effect_filter::config_save(util::xml::data_node *ef_node) const diff --git a/src/emu/debug/debugvw.cpp b/src/emu/debug/debugvw.cpp index 7412ddd2f60..fe997596137 100644 --- a/src/emu/debug/debugvw.cpp +++ b/src/emu/debug/debugvw.cpp @@ -509,9 +509,21 @@ bool debug_view_expression::recompute() { m_parsed.parse(m_string); } - catch (expression_error &) + catch (expression_error const &) { - m_parsed.parse(oldstring); + try + { + // If we got here because the user typed in a new expression, + // then going back to the previous expression should work + m_parsed.parse(oldstring); + } + catch (expression_error const &) + { + // If that didn't work, perhaps the user switched sources + // and the previous expression doesn't evaluate with the + // new symbol table. Try "0" as last resort + m_parsed.parse("0"); + } } } @@ -528,7 +540,7 @@ bool debug_view_expression::recompute() changed = true; } } - catch (expression_error &) + catch (expression_error const &) { } } diff --git a/src/emu/inpttype.ipp b/src/emu/inpttype.ipp index c51afa8ce31..dbf1250347f 100644 --- a/src/emu/inpttype.ipp +++ b/src/emu/inpttype.ipp @@ -105,13 +105,13 @@ namespace { INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, GAMBLE_SERVICE, N_p("input-name", "Service"), input_seq(KEYCODE_9) ) \ INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, GAMBLE_BOOK, N_p("input-name", "Book-Keeping"), input_seq(KEYCODE_0) ) \ INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, GAMBLE_DOOR, N_p("input-name", "Door"), input_seq(KEYCODE_O) ) \ - INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, GAMBLE_PAYOUT, N_p("input-name", "Payout"), input_seq(KEYCODE_I) ) \ + INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, GAMBLE_PAYOUT, N_p("input-name", "Payout"), input_seq(KEYCODE_4) ) \ INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, GAMBLE_BET, N_p("input-name", "Bet"), input_seq(KEYCODE_M) ) \ INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, GAMBLE_DEAL, N_p("input-name", "Deal"), input_seq(KEYCODE_2) ) \ INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, GAMBLE_STAND, N_p("input-name", "Stand"), input_seq(KEYCODE_L) ) \ - INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, GAMBLE_TAKE, N_p("input-name", "Take Score"), input_seq(KEYCODE_4) ) \ - INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, GAMBLE_D_UP, N_p("input-name", "Double Up"), input_seq(KEYCODE_3) ) \ - INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, GAMBLE_HALF, N_p("input-name", "Half Gamble"), input_seq(KEYCODE_D) ) \ + INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, GAMBLE_TAKE, N_p("input-name", "Take Score"), input_seq(KEYCODE_G) ) \ + INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, GAMBLE_D_UP, N_p("input-name", "Double Up"), input_seq(KEYCODE_D) ) \ + INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, GAMBLE_HALF, N_p("input-name", "Half Gamble"), input_seq(KEYCODE_F) ) \ INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, GAMBLE_HIGH, N_p("input-name", "High"), input_seq(KEYCODE_A) ) \ INPUT_PORT_DIGITAL_TYPE( 1, PLAYER1, GAMBLE_LOW, N_p("input-name", "Low"), input_seq(KEYCODE_S) ) \ CORE_INPUT_TYPES_END() @@ -187,7 +187,7 @@ namespace { INPUT_PORT_DIGITAL_TYPE( 2, PLAYER2, MAHJONG_M, N_p("input-name", "%p Mahjong M"), input_seq(KEYCODE_M_INDEXED(1)) ) \ INPUT_PORT_DIGITAL_TYPE( 2, PLAYER2, MAHJONG_N, N_p("input-name", "%p Mahjong N"), input_seq(KEYCODE_N_INDEXED(1)) ) \ INPUT_PORT_DIGITAL_TYPE( 2, PLAYER2, MAHJONG_O, N_p("input-name", "%p Mahjong O"), input_seq(KEYCODE_O_INDEXED(1)) ) \ - INPUT_PORT_DIGITAL_TYPE( 2, PLAYER2, MAHJONG_P, N_p("input-name", "%p Mahjong P"), input_seq(KEYCODE_COLON_INDEXED(1)) ) \ + INPUT_PORT_DIGITAL_TYPE( 2, PLAYER2, MAHJONG_P, N_p("input-name", "%p Mahjong P"), input_seq(KEYCODE_P_INDEXED(1)) ) \ INPUT_PORT_DIGITAL_TYPE( 2, PLAYER2, MAHJONG_Q, N_p("input-name", "%p Mahjong Q"), input_seq(KEYCODE_Q_INDEXED(1)) ) \ INPUT_PORT_DIGITAL_TYPE( 2, PLAYER2, MAHJONG_KAN, N_p("input-name", "%p Mahjong Kan"), input_seq(KEYCODE_LCONTROL_INDEXED(1)) ) \ INPUT_PORT_DIGITAL_TYPE( 2, PLAYER2, MAHJONG_PON, N_p("input-name", "%p Mahjong Pon"), input_seq(KEYCODE_LALT_INDEXED(1)) ) \ diff --git a/src/frontend/mame/ui/confswitch.cpp b/src/frontend/mame/ui/confswitch.cpp index cf69bb7cfbb..27340eda2ba 100644 --- a/src/frontend/mame/ui/confswitch.cpp +++ b/src/frontend/mame/ui/confswitch.cpp @@ -356,19 +356,19 @@ void menu_settings_dip_switches::custom_render(uint32_t flags, void *selectedref // calculate optimal width float const maxwidth(1.0f - (lr_border() * 2.0f)); + float const separation(0.5F * line_height() * x_aspect()); m_single_width = (line_height() * SINGLE_TOGGLE_SWITCH_FIELD_WIDTH * x_aspect()); - float width(0.0f); unsigned maxswitches(0U); + float maxnamewidth(0.0f); for (switch_group_descriptor const &group : switch_groups()) { if (group.mask) { maxswitches = (std::max)(group.switch_count(), maxswitches); - float const namewidth(get_string_width(group.name)); - float const switchwidth(m_single_width * maxswitches); - width = (std::min)((std::max)(namewidth + switchwidth + (line_height() * x_aspect()), width), maxwidth); + maxnamewidth = (std::max)(get_string_width(group.name), maxnamewidth); } } + float const width((std::min)(maxnamewidth + (m_single_width * maxswitches) + separation, maxwidth)); // draw extra menu area float const boxwidth((std::max)(width + (lr_border() * 2.0f), origx2 - origx1)); @@ -378,7 +378,7 @@ void menu_settings_dip_switches::custom_render(uint32_t flags, void *selectedref // calculate centred layout float const nameleft((1.0f - width) * 0.5f); float const switchleft(nameleft + width - (m_single_width * maxswitches)); - float const namewidth(width - (m_single_width * maxswitches) - (line_height() * x_aspect())); + float const namewidth(width - (m_single_width * maxswitches) - separation); // iterate over switch groups ioport_field *const field((uintptr_t(selectedref) != 1U) ? reinterpret_cast<ioport_field *>(selectedref) : nullptr); diff --git a/src/frontend/mame/ui/info.cpp b/src/frontend/mame/ui/info.cpp index 8db48046bc4..7bfbcc8f9f0 100644 --- a/src/frontend/mame/ui/info.cpp +++ b/src/frontend/mame/ui/info.cpp @@ -343,7 +343,7 @@ machine_static_info::machine_static_info(const ui_options &options, machine_conf bool machine_static_info::has_warnings() const noexcept { return - (machine_flags() & (MACHINE_ERRORS | MACHINE_WARNINGS)) || + (machine_flags() & (MACHINE_ERRORS | MACHINE_WARNINGS | MACHINE_BTANB)) || (emulation_flags() & DEVICE_ERRORS) || unemulated_features() || imperfect_features() || diff --git a/src/frontend/mame/ui/mainmenu.cpp b/src/frontend/mame/ui/mainmenu.cpp index 84c6b3d1500..84eee41f239 100644 --- a/src/frontend/mame/ui/mainmenu.cpp +++ b/src/frontend/mame/ui/mainmenu.cpp @@ -165,7 +165,8 @@ void menu_main::populate() item_append(_("menu-main", "Audio Effects"), 0, (void *)AUDIO_EFFECTS); - item_append(_("menu-main", "Slider Controls"), 0, (void *)SLIDERS); + if (!ui().get_slider_list().empty()) + item_append(_("menu-main", "Slider Controls"), 0, (void *)SLIDERS); item_append(_("menu-main", "Video Options"), 0, (void *)VIDEO_TARGETS); diff --git a/src/frontend/mame/ui/ui.cpp b/src/frontend/mame/ui/ui.cpp index a3977a310c0..251ce604efa 100644 --- a/src/frontend/mame/ui/ui.cpp +++ b/src/frontend/mame/ui/ui.cpp @@ -1593,7 +1593,7 @@ uint32_t mame_ui_manager::handler_ingame(render_container &container) } // if the on-screen display isn't up and the user has toggled it, turn it on - if (!(machine().debug_flags & DEBUG_FLAG_ENABLED) && machine().ui_input().pressed(IPT_UI_ON_SCREEN_DISPLAY)) + if (!get_slider_list().empty() && !(machine().debug_flags & DEBUG_FLAG_ENABLED) && machine().ui_input().pressed(IPT_UI_ON_SCREEN_DISPLAY)) { ui::menu::stack_push<ui::menu_sliders>(*this, machine().render().ui_container(), true); show_menu(); @@ -1859,16 +1859,17 @@ std::vector<ui::menu_item> mame_ui_manager::slider_init(running_machine &machine m_sliders.clear(); - // add overall volume - slider_alloc(_("Master Volume"), -960, 0, 120, 10, std::bind(&mame_ui_manager::slider_volume, this, _1, _2)); - // add per-sound device and per-sound device channel volume for (device_sound_interface &snd : sound_interface_enumerator(machine.root_device())) { - // Don't add microphones, speakers or devices without outputs + // don't add microphones, speakers or devices without outputs if (dynamic_cast<sound_io_device *>(&snd) || !snd.outputs()) continue; + // add overall volume first + if (m_sliders.empty()) + slider_alloc(_("Master Volume"), -960, 0, 120, 10, std::bind(&mame_ui_manager::slider_volume, this, _1, _2)); + slider_alloc(util::string_format(_("%1$s volume"), snd.device().tag()), -960, 0, 120, 10, std::bind(&mame_ui_manager::slider_devvol, this, &snd, _1, _2)); if (snd.outputs() != 1) for (int channel = 0; channel != snd.outputs(); channel ++) diff --git a/src/mame/bmc/bmcpokr.cpp b/src/mame/bmc/bmcpokr.cpp index 5b94ac115a4..ad45533a3c3 100644 --- a/src/mame/bmc/bmcpokr.cpp +++ b/src/mame/bmc/bmcpokr.cpp @@ -88,8 +88,19 @@ private: required_shared_ptr<uint16_t> m_layerctrl; required_shared_ptr<uint16_t> m_backpen; - // Protection + required_ioport_array<4> m_dsw; + optional_ioport_array<5> m_key; + required_ioport m_inputs; + + tilemap_t *m_tilemap[2]{}; + bitmap_ind16 m_pixbitmap; + uint16_t m_prot_val = 0; + uint8_t m_mux = 0; + uint8_t m_irq_enable = 0; + uint8_t m_pixpal = 0; + + // Protection uint16_t bmcpokr_prot_r(); uint16_t fengyunh_prot_r(); uint16_t shendeng_prot_r(); @@ -98,10 +109,6 @@ private: uint16_t unk_r(); // I/O - uint8_t m_mux = 0; - required_ioport_array<4> m_dsw; - optional_ioport_array<5> m_key; - required_ioport m_inputs; void mux_w(offs_t offset, uint8_t data, uint8_t mem_mask = ~0); uint16_t mahjong_key_r(); uint16_t dsw_r(); @@ -109,19 +116,15 @@ private: uint16_t xyddzhh_dsw_r(); // Interrupts - uint8_t m_irq_enable = 0; void irq_enable_w(offs_t offset, uint8_t data, uint8_t mem_mask = ~0); void irq_ack_w(uint8_t data); TIMER_DEVICE_CALLBACK_MEMBER(interrupt); // Video - tilemap_t *m_tilemap[2]{}; template<unsigned N> TILE_GET_INFO_MEMBER(get_tile_info); template<unsigned N> void videoram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - std::unique_ptr<bitmap_ind16> m_pixbitmap; void pixbitmap_redraw(); - uint8_t m_pixpal = 0; void pixram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); void pixpal_w(offs_t offset, uint8_t data, uint8_t mem_mask = ~0); @@ -169,7 +172,7 @@ void bmcpokr_state::video_start() m_tilemap[0]->set_scroll_cols(1); m_tilemap[1]->set_scroll_cols(1); - m_pixbitmap = std::make_unique<bitmap_ind16>(0x400, 0x200); + m_pixbitmap.allocate(0x400, 0x200); } // 1024 x 512 bitmap. 4 bits per pixel (every byte encodes 2 pixels) + palette register @@ -186,13 +189,13 @@ void bmcpokr_state::pixram_w(offs_t offset, uint16_t data, uint16_t mem_mask) uint16_t pen; if (ACCESSING_BITS_8_15) { - pen = (data >> 12) & 0xf; m_pixbitmap->pix(y, x + 0) = pen ? pixpal + pen : 0; - pen = (data >> 8) & 0xf; m_pixbitmap->pix(y, x + 1) = pen ? pixpal + pen : 0; + pen = (data >> 12) & 0xf; m_pixbitmap.pix(y, x + 0) = pen ? (pixpal + pen) : 0; + pen = (data >> 8) & 0xf; m_pixbitmap.pix(y, x + 1) = pen ? (pixpal + pen) : 0; } if (ACCESSING_BITS_0_7) { - pen = (data >> 4) & 0xf; m_pixbitmap->pix(y, x + 2) = pen ? pixpal + pen : 0; - pen = (data >> 0) & 0xf; m_pixbitmap->pix(y, x + 3) = pen ? pixpal + pen : 0; + pen = (data >> 4) & 0xf; m_pixbitmap.pix(y, x + 2) = pen ? (pixpal + pen) : 0; + pen = (data >> 0) & 0xf; m_pixbitmap.pix(y, x + 3) = pen ? (pixpal + pen) : 0; } } @@ -206,10 +209,10 @@ void bmcpokr_state::pixbitmap_redraw() { uint16_t const data = m_pixram[offset++]; uint16_t pen; - pen = (data >> 12) & 0xf; m_pixbitmap->pix(y, x + 0) = pen ? pixpal + pen : 0; - pen = (data >> 8) & 0xf; m_pixbitmap->pix(y, x + 1) = pen ? pixpal + pen : 0; - pen = (data >> 4) & 0xf; m_pixbitmap->pix(y, x + 2) = pen ? pixpal + pen : 0; - pen = (data >> 0) & 0xf; m_pixbitmap->pix(y, x + 3) = pen ? pixpal + pen : 0; + pen = (data >> 12) & 0xf; m_pixbitmap.pix(y, x + 0) = pen ? (pixpal + pen) : 0; + pen = (data >> 8) & 0xf; m_pixbitmap.pix(y, x + 1) = pen ? (pixpal + pen) : 0; + pen = (data >> 4) & 0xf; m_pixbitmap.pix(y, x + 2) = pen ? (pixpal + pen) : 0; + pen = (data >> 0) & 0xf; m_pixbitmap.pix(y, x + 3) = pen ? (pixpal + pen) : 0; } } } @@ -270,7 +273,7 @@ void bmcpokr_state::draw_layer(screen_device &screen, bitmap_ind16 &bitmap, cons { sx = -sx; sy = -sy; - copyscrollbitmap_trans(bitmap, *m_pixbitmap, 1, &sx, 1, &sy, cliprect, 0); + copyscrollbitmap_trans(bitmap, m_pixbitmap, 1, &sx, 1, &sy, cliprect, 0); } if (!linescroll) diff --git a/src/mame/bmc/koftball.cpp b/src/mame/bmc/koftball.cpp index 015cf7db235..c4e74b498e3 100644 --- a/src/mame/bmc/koftball.cpp +++ b/src/mame/bmc/koftball.cpp @@ -159,12 +159,13 @@ private: optional_device<hopper_device> m_hopper; tilemap_t *m_tilemap[4]{}; + bitmap_ind16 m_pixbitmap; + u16 m_prot_data = 0; u8 m_irq_enable = 0; u8 m_gfx_ctrl = 0; u8 m_priority = 0; u8 m_backpen = 0; - bitmap_ind16 m_pixbitmap; u8 m_pixpal = 0; void irq_ack_w(u8 data); @@ -177,7 +178,6 @@ private: void pixpal_w(offs_t offset, u8 data, u8 mem_mask = ~0); template <u8 Which> void videoram_w(offs_t offset, u16 data, u16 mem_mask = ~0); - template <u8 Which> TILE_GET_INFO_MEMBER(get_tile_info); void draw_pixlayer(bitmap_ind16 &bitmap, const rectangle &cliprect); u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); @@ -224,9 +224,8 @@ void koftball_state::video_start() m_tilemap[3] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(koftball_state::get_tile_info<3>)), TILEMAP_SCAN_ROWS, 8, 8, 64, 32); m_tilemap[0]->set_transparent_pen(0); - m_tilemap[2]->set_transparent_pen(0); - m_tilemap[1]->set_transparent_pen(0); + m_tilemap[2]->set_transparent_pen(0); m_tilemap[3]->set_transparent_pen(0); m_pixbitmap.allocate(512, 256); @@ -239,15 +238,15 @@ void koftball_state::draw_pixlayer(bitmap_ind16 &bitmap, const rectangle &clipre for (int y = cliprect.min_y; y <= cliprect.max_y; y++) { - const u16 pitch = y * 0x80; - for (int x = cliprect.min_x; x <= cliprect.max_x >> 2; x++) + const u16 pitch = y << 7; + for (int x = cliprect.min_x >> 2; x <= cliprect.max_x >> 2; x++) { const u16 tile_data = m_pixram[(pitch + x) & 0xffff]; for (int xi = 0; xi < 4; xi++) { - const u8 nibble = (tile_data >> ((3 - xi) * 4)) & 0xf; + const u8 nibble = (tile_data >> ((3 - xi) << 2)) & 0xf; if (nibble) - bitmap.pix(y, (x << 2) + xi) = pix_bank | nibble; + bitmap.pix(y, (x << 2) | xi) = pix_bank | nibble; } } } @@ -261,18 +260,18 @@ u32 koftball_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, c Bit 1 and 5 of 0x320000 are the only ones that give correct layer results (see table below). What is the meaning of the others? More games running on this hw would help. - The following table describes the attract mode sequence for jxzh. koftball is relatively simpler as it almost - only uses the first 2 layers (only noted use of the 3rd layer is for the bookkeeping screen). + The following table describes the attract mode sequence for jxzh. koftball is relatively simpler as + it mostly uses the first 2 layers (only noted use of the 3rd layer is for the bookkeeping screen). layer0 layer 1 layer 2 layer 3 0x2a000f 0x320000 title screen over under off off 0x13 0x98 girl with scrolling tiles prev screen prev screen over under 0x1b 0xba 0x00 0x00 - demon over under prev screen prev screen 0x1f 0x98 + odds over under prev screen prev screen 0x1f 0x98 0x00 0x00 - slot with road signs prev screen prev screen over under 0x17 0xba + roulette with road signs prev screen prev screen over under 0x17 0xba Chinese lanterns prev screen prev screen over under 0x17 0xba - slot with numbers prev screen prev screen over under 0x17 0xba + slots with numbers prev screen prev screen over under 0x17 0xba 0x00 0x00 pirates over under prev screen prev screen 0x17 0x98 0x00 0x00 @@ -282,35 +281,40 @@ u32 koftball_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, c During game: last chance over under on top prev screen 0x17 0x9a + double up over under prev screen prev screen 0x1f 0x98 bookkeeping prev screen prev screen prev screen prev screen 0x14 0x98 (pixmap on top) */ - m_pixbitmap.fill(m_backpen, cliprect); - draw_pixlayer(m_pixbitmap, cliprect); + const bool tmap2_enable = BIT(m_gfx_ctrl, 1); + const bool tmap3_enable = BIT(m_gfx_ctrl, 5); + const bool bitmap_enable = BIT(m_gfx_ctrl, 7); + + if (bitmap_enable) + { + m_pixbitmap.fill(m_backpen, cliprect); + draw_pixlayer(m_pixbitmap, cliprect); + } bitmap.fill(m_backpen, cliprect); - // TODO: this drawing routine seems too special-cased. Correct it when more evidence becomes available - if (BIT(m_gfx_ctrl, 7) && BIT(m_priority, 3)) + if (bitmap_enable && BIT(m_priority, 3)) copyscrollbitmap_trans(bitmap, m_pixbitmap, 0, 0, 0, 0, cliprect, 0); - if (BIT(m_gfx_ctrl, 5) && BIT(m_gfx_ctrl, 1)) + if (tmap3_enable) { m_tilemap[3]->draw(screen, bitmap, cliprect, 0, 0); - m_tilemap[2]->draw(screen, bitmap, cliprect, 0, 0); } - if (!BIT(m_gfx_ctrl, 5)) + else { m_tilemap[1]->draw(screen, bitmap, cliprect, 0, 0); m_tilemap[0]->draw(screen, bitmap, cliprect, 0, 0); } - if (!BIT(m_gfx_ctrl, 5) && BIT(m_gfx_ctrl, 1)) - { + + if (tmap2_enable) m_tilemap[2]->draw(screen, bitmap, cliprect, 0, 0); - } - if (BIT(m_gfx_ctrl, 7) && !BIT(m_priority, 3)) + if (bitmap_enable && !BIT(m_priority, 3)) copyscrollbitmap_trans(bitmap, m_pixbitmap, 0, 0, 0, 0, cliprect, 0); return 0; diff --git a/src/mame/dataeast/brkthru.cpp b/src/mame/dataeast/brkthru.cpp index 7ee85f602b1..c5da348ca4e 100644 --- a/src/mame/dataeast/brkthru.cpp +++ b/src/mame/dataeast/brkthru.cpp @@ -808,6 +808,45 @@ void brkthru_state::darwin(machine_config &config) ROM_START( brkthru ) ROM_REGION( 0x20000, "maincpu", 0 ) + ROM_LOAD( "1.f9", 0x04000, 0x4000, CRC(0f21b4c5) SHA1(e5ef67006394d475571196dcdc181d28a0831bdf) ) + ROM_LOAD( "2.f11", 0x08000, 0x8000, CRC(51c7c378) SHA1(b779df719b89bb41e342c472b38e20d8fc71ca6d) ) + ROM_LOAD( "4.f14", 0x10000, 0x8000, CRC(209484c2) SHA1(da7311768b675b833066a7403fd507969d74699e) ) + ROM_LOAD( "3.f12", 0x18000, 0x8000, CRC(2f2c40c2) SHA1(fcb78941453520a3a07f272127dae7c2cc1999ea) ) + + ROM_REGION( 0x02000, "chars", 0 ) + ROM_LOAD( "12.bin", 0x00000, 0x2000, CRC(58c0b29b) SHA1(9dc075f8afae7e8fe164a9fe325e9948cdc7e4bb) ) + + ROM_REGION( 0x20000, "tiles", 0 ) + // background + // we do a lot of scatter loading here, to place the data in a format which can be decoded by MAME's standard functions + ROM_LOAD( "7.b6", 0x00000, 0x4000, CRC(920cc56a) SHA1(c75806691073f1f3bd54dcaca4c14155ecf4471d) ) // bitplanes 1,2 for bank 1,2 + ROM_CONTINUE( 0x08000, 0x4000 ) // bitplanes 1,2 for bank 3,4 + ROM_LOAD( "6.b4", 0x10000, 0x4000, CRC(fd3cee40) SHA1(3308b96bb69e0fa6dffbdff296273fafa16d5e70) ) // bitplanes 1,2 for bank 5,6 + ROM_CONTINUE( 0x18000, 0x4000 ) // bitplanes 1,2 for bank 7,8 + ROM_LOAD( "8.b7", 0x04000, 0x1000, CRC(f67ee64e) SHA1(75634bd481ae44b8aa02acb4f9b4d7ff973a4c71) ) // bitplane 3 for bank 1,2 + ROM_CONTINUE( 0x06000, 0x1000 ) + ROM_CONTINUE( 0x0c000, 0x1000 ) // bitplane 3 for bank 3,4 + ROM_CONTINUE( 0x0e000, 0x1000 ) + ROM_CONTINUE( 0x14000, 0x1000 ) // bitplane 3 for bank 5,6 + ROM_CONTINUE( 0x16000, 0x1000 ) + ROM_CONTINUE( 0x1c000, 0x1000 ) // bitplane 3 for bank 7,8 + ROM_CONTINUE( 0x1e000, 0x1000 ) + + ROM_REGION( 0x18000, "sprites", 0 ) + ROM_LOAD( "9.bin", 0x00000, 0x8000, CRC(f54e50a7) SHA1(eccf4d859c26944271ec6586644b4730a72851fd) ) + ROM_LOAD( "10.bin", 0x08000, 0x8000, CRC(fd156945) SHA1(a0575a4164217e63317886176ab7e59d255fc771) ) + ROM_LOAD( "11.bin", 0x10000, 0x8000, CRC(c152a99b) SHA1(f96133aa01219eda357b9e906bd9577dbfe359c0) ) + + ROM_REGION( 0x0200, "proms", 0 ) + ROM_LOAD( "13.bin", 0x0000, 0x0100, CRC(aae44269) SHA1(7c66aeb93577104109d264ee8b848254256c81eb) ) // red and green component + ROM_LOAD( "14.bin", 0x0100, 0x0100, CRC(f2d4822a) SHA1(f535e91b87ff01f2a73662856fd3f72907ca62e9) ) // blue component + + ROM_REGION( 0x10000, "audiocpu", 0 ) + ROM_LOAD( "5.d6", 0x8000, 0x8000, CRC(c309435f) SHA1(82914004c2b169a7c31aa49af83a699ebbc7b33f) ) +ROM_END + +ROM_START( brkthruu ) + ROM_REGION( 0x20000, "maincpu", 0 ) ROM_LOAD( "brkthru.1", 0x04000, 0x4000, CRC(cfb4265f) SHA1(4cd748fa06fd2727de1694196912d605672d4883) ) ROM_LOAD( "brkthru.2", 0x08000, 0x8000, CRC(fa8246d9) SHA1(d6da03b2a3d8a83411191351ee110b89352a3ead) ) ROM_LOAD( "brkthru.4", 0x10000, 0x8000, CRC(8cabf252) SHA1(45e8847b2e6b278989f67e0b27b827a9b3b92581) ) @@ -1069,7 +1108,8 @@ ROM_END * *************************************/ -GAME( 1986, brkthru, 0, brkthru, brkthru, brkthru_state, empty_init, ROT0, "Data East USA", "Break Thru (US)", MACHINE_SUPPORTS_SAVE ) +GAME( 1986, brkthru, 0, brkthru, brkthru, brkthru_state, empty_init, ROT0, "Data East Corporation", "Break Thru (World)", MACHINE_SUPPORTS_SAVE ) +GAME( 1986, brkthruu, brkthru, brkthru, brkthru, brkthru_state, empty_init, ROT0, "Data East USA", "Break Thru (US)", MACHINE_SUPPORTS_SAVE ) GAME( 1986, brkthruj, brkthru, brkthru, brkthruj, brkthru_state, empty_init, ROT0, "Data East Corporation", "Kyohkoh-Toppa (Japan)", MACHINE_SUPPORTS_SAVE ) GAME( 1986, brkthrut, brkthru, brkthru, brkthruj, brkthru_state, empty_init, ROT0, "Data East Corporation (Tecfri license)", "Break Thru (Tecfri license)", MACHINE_SUPPORTS_SAVE ) GAME( 1986, forcebrk, brkthru, brkthru, brkthruj, brkthru_state, empty_init, ROT0, "bootleg", "Force Break (bootleg)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/dynax/ddenlovr.cpp b/src/mame/dynax/ddenlovr.cpp index bfa90f002c4..d2061d5a95b 100644 --- a/src/mame/dynax/ddenlovr.cpp +++ b/src/mame/dynax/ddenlovr.cpp @@ -5048,8 +5048,8 @@ static INPUT_PORTS_START( htengoku ) // SW 4 OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF PORT_START("COINS") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) PORT_CONDITION("DSW4", 0x10, EQUALS, 0x00) // pay - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_CONDITION("DSW4", 0x10, EQUALS, 0x10) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CONDITION("DSW4", 0x10, EQUALS, 0x00) // pay + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_CONDITION("DSW4", 0x10, EQUALS, 0x10) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR(Test)) PORT_TOGGLE PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // analyzer @@ -5644,7 +5644,7 @@ INPUT_PORTS_END static INPUT_PORTS_START( hanakanz ) PORT_START("SYSTEM") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CONDITION("BET",0x40,EQUALS,0x00) PORT_CODE(KEYCODE_4) // pay + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CONDITION("BET",0x40,EQUALS,0x00) // pay PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("BET",0x40,EQUALS,0x40) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR(Test)) // Test @@ -5815,9 +5815,9 @@ static INPUT_PORTS_START( hkagerou ) // SW 4 ON ON OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF PORT_START("SYSTEM") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) // pay + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) // pay PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) // Test + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR(Test)) // Test PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // analyzer PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // data clear PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) // key-in @@ -6195,7 +6195,7 @@ INPUT_PORTS_END static INPUT_PORTS_START( mjreach1 ) PORT_START("SYSTEM") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) // pay + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) // pay PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN) PORT_SERVICE(0x04, IP_ACTIVE_LOW) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // analyzer @@ -6350,7 +6350,7 @@ INPUT_PORTS_END static INPUT_PORTS_START( jongtei ) PORT_START("SYSTEM") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) // pay + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) // pay PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN) PORT_SERVICE(0x04, IP_ACTIVE_LOW) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // analyzer @@ -6561,7 +6561,7 @@ INPUT_PORTS_END static INPUT_PORTS_START( mjchuuka ) PORT_START("SYSTEM") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) // pay + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) // pay PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN) PORT_SERVICE(0x04, IP_ACTIVE_LOW) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // analyzer @@ -6716,7 +6716,7 @@ INPUT_PORTS_END static INPUT_PORTS_START( mjschuka ) PORT_START("SYSTEM") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) // pay + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) // pay PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN) PORT_SERVICE(0x04, IP_ACTIVE_LOW) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // analyzer @@ -6979,9 +6979,9 @@ static INPUT_PORTS_START( mjmyster ) // SW 4 Off On On On On Off Off Off Off Off On On On On On Off Off Off Off Off On On On On On Off Off Off Off Off PORT_START("SYSTEM") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) PORT_CONDITION("DSW3", 0x03, EQUALS, 0x02) // pay - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_CONDITION("DSW3", 0x03, EQUALS, 0x03) - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW3", 0x02, EQUALS, 0x00) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CONDITION("DSW3", 0x03, EQUALS, 0x02) // pay + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_CONDITION("DSW3", 0x03, EQUALS, 0x03) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW3", 0x02, EQUALS, 0x00) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN) PORT_SERVICE_NO_TOGGLE(0x04, IP_ACTIVE_LOW) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // analyzer @@ -7139,9 +7139,9 @@ static INPUT_PORTS_START( hginga ) // SW 4 ON OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF PORT_START("SYSTEM") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) PORT_CONDITION("DSW3", 0x03, EQUALS, 0x02) // pay - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_CONDITION("DSW3", 0x03, EQUALS, 0x03) - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW3", 0x02, EQUALS, 0x00) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CONDITION("DSW3", 0x03, EQUALS, 0x02) // pay + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_CONDITION("DSW3", 0x03, EQUALS, 0x03) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW3", 0x02, EQUALS, 0x00) // PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) // Test PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // analyzer @@ -7377,9 +7377,9 @@ INPUT_PORTS_END static INPUT_PORTS_START( hgokou ) PORT_START("SYSTEM") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) // pay + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) // pay PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR(Test)) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // analyzer PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // data clear PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) @@ -7526,9 +7526,9 @@ static INPUT_PORTS_START( mjmyornt ) // SW 4 OFF ON ON ON ON ON OFF OFF OFF OFF ON ON ON ON ON ON OFF OFF OFF OFF ON ON ON ON ON ON OFF OFF OFF OFF PORT_START("SYSTEM") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) // pay + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) // pay PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // 18B - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_TOGGLE PORT_NAME(DEF_STR( Test )) // Test + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_TOGGLE PORT_NAME(DEF_STR(Test)) // Test PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // analyzer PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // data clear PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BILL1 ) PORT_CODE(KEYCODE_6) // note @@ -8014,7 +8014,7 @@ INPUT_PORTS_END static INPUT_PORTS_START( sryudens ) PORT_START("SYSTEM") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) // pay + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) // pay PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_SERVICE( 0x04, IP_ACTIVE_LOW ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // analyzer @@ -8169,7 +8169,7 @@ INPUT_PORTS_END static INPUT_PORTS_START( seljan2 ) PORT_START("SYSTEM") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) // pay + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) // pay PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_SERVICE( 0x04, IP_ACTIVE_LOW ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // analyzer @@ -8324,7 +8324,7 @@ INPUT_PORTS_END static INPUT_PORTS_START( janshinp ) PORT_START("SYSTEM") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) // pay + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) // pay PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_SERVICE(0x04, IP_ACTIVE_LOW) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // analyzer @@ -8478,7 +8478,7 @@ INPUT_PORTS_END static INPUT_PORTS_START( dtoyoken ) PORT_START("SYSTEM") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) // pay + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) // pay PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_SERVICE(0x04, IP_ACTIVE_LOW) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // analyzer @@ -8641,7 +8641,7 @@ static INPUT_PORTS_START( daimyojn ) // SW 4 OFF ON ON ON ON OFF OFF OFF OFF OFF OFF ON ON ON ON OFF OFF OFF OFF OFF OFF OFF ON ON ON OFF OFF OFF ON OFF OFF OFF ON ON ON OFF OFF OFF ON OFF PORT_START("SYSTEM") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) // pay + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) // pay PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_TOGGLE PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // analyzer @@ -8775,7 +8775,7 @@ INPUT_PORTS_END static INPUT_PORTS_START( hnrose ) PORT_START("SYSTEM") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) // pay + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) // pay PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR(Test)) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // analyzer diff --git a/src/mame/dynax/dynax.cpp b/src/mame/dynax/dynax.cpp index 86796b4a35c..056e4af83a5 100644 --- a/src/mame/dynax/dynax.cpp +++ b/src/mame/dynax/dynax.cpp @@ -1586,7 +1586,7 @@ INPUT_PORTS_END #define MAHJONG_COIN_TEST(ct, cm) \ PORT_START("COINS") \ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) PORT_CONDITION(ct, cm, EQUALS, 0) /* Pay */ \ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CONDITION(ct, cm, EQUALS, 0) /* Pay */ \ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_CONDITION(ct, cm, EQUALS, cm) \ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* 18B */ \ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_TOGGLE /* Test */ \ @@ -1793,12 +1793,12 @@ static INPUT_PORTS_START( hnkochou ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_START("COINS") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) // Pay + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) // Pay PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_SERVICE_NO_TOGGLE(0x04, IP_ACTIVE_LOW ) // Test (there isn't a dip switch) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // Analyzer - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // Memory Reset - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN3 ) // Note + PORT_SERVICE_NO_TOGGLE(0x04, IP_ACTIVE_LOW ) // Test (there isn't a DIP switch) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // Analyzer + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // Memory Reset + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN3 ) // Note PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -2019,7 +2019,7 @@ static INPUT_PORTS_START( hjingi ) PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "DIPSW 4:8") // OFF固定 PORT_START("COINS") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) // Pay + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) // Pay PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE4 ) // 18B PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR(Test)) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // Analyzer @@ -3104,7 +3104,7 @@ INPUT_PORTS_END static INPUT_PORTS_START( mjelctrn ) PORT_START("COINS") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) // Pay + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) // Pay PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // 18B PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_TOGGLE // Test PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // Analyzer @@ -3199,7 +3199,7 @@ INPUT_PORTS_END static INPUT_PORTS_START( majxtal7 ) PORT_START("COINS") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) PORT_CONDITION("DSW0", 0x40, EQUALS, 0x00) // Pay + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CONDITION("DSW0", 0x40, EQUALS, 0x00) // Pay PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_CONDITION("DSW0", 0x40, EQUALS, 0x40) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // 18B PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) // Test @@ -3748,13 +3748,13 @@ static INPUT_PORTS_START( gekisha ) PORT_DIPSETTING( 0x40, DEF_STR( Yes ) ) PORT_START("COINS") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) // Pay + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) // Pay PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) // Test - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // Analyzer - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // Memory Reset - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) // Note - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) // Coin + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) // Test + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // Analyzer + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // Memory Reset + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) // Note + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) // Coin PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_INCLUDE( mahjong_matrix_2p_bet_wup ) diff --git a/src/mame/dynax/royalmah.cpp b/src/mame/dynax/royalmah.cpp index f377d4f3c85..e0013695d5e 100644 --- a/src/mame/dynax/royalmah.cpp +++ b/src/mame/dynax/royalmah.cpp @@ -1687,7 +1687,7 @@ static INPUT_PORTS_START( mjctrl2 ) PORT_INCLUDE( mjctrl1 ) PORT_MODIFY("KEY0") - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) INPUT_PORTS_END diff --git a/src/mame/gaelco/mastboy.cpp b/src/mame/gaelco/mastboy.cpp index bcb1ae21643..db2fb2cc9ea 100644 --- a/src/mame/gaelco/mastboy.cpp +++ b/src/mame/gaelco/mastboy.cpp @@ -243,201 +243,9 @@ Color bit 1 is 1K ohms Color bit 2 is 500 ohms Color bit 3 is 250 ohms - - About the dump - - Bytes that were 0x7F or 0x5C couldn't be dumped, and read as 0x23. - The ROM has been patched with the correct data, this is just for reference - in case something seems wrong. The address checking and patching was - automatic so there aren't any human errors: - - Potential bad addresses that are either 0x7F or 0x5C: - - 0x0300, - 0x0534, - 0x05B1, - 0x05B5, - 0x0E4E, - 0x1090, - 0x10E0, - 0x110F, - 0x11B5, - 0x1259, - 0x1271, - 0x1278, - 0x14AC, - 0x14CC, - 0x14DC, - 0x15D9, - 0x178D, - 0x17AA, - 0x17B4, - 0x186C, - 0x1884, - 0x1A0A, - 0x1A66, - 0x1ABB, - 0x1AE9, - 0x1CAD, - 0x1CB9, - 0x1CC1, - 0x1CCF, - 0x1CD5, - 0x1CE3, - 0x1CF3, - 0x1D85, - 0x1DC7, - 0x1E00, - 0x1E26, - 0x1E2A, - 0x1E5E, - 0x1E6F, - 0x1E89, - 0x1EA2, - 0x1EC9, - 0x1F14, - 0x1F23, - 0x1F33, - 0x1F4D, - 0x1F61, - 0x1FE3, - 0x1FEA, - 0x1FFD, - 0x200D, - 0x2046, - 0x2054, - 0x2069, - 0x206F, - 0x207D, - 0x208A, - 0x20A2, - 0x20BA, - 0x2149, - 0x215D, - 0x2179, - 0x2189, - 0x21A7, - 0x21D7, - 0x21F2, - 0x2211, - 0x23E6, - 0x23EA, - 0x23F4, - 0x2442, - 0x2558, - 0x2559, - 0x2569, - 0x2586, - 0x258C, - 0x2592, - 0x2612, - 0x2613, - 0x26BF, - 0x26FF, - 0x2706, - 0x27A7, - 0x27AB, - 0x27BE, - 0x2867, - 0x2896, - 0x2977, - 0x29E2, - 0x2A03, - 0x2A79, - 0x2AA3, - 0x2ACA, - 0x2AE9, - 0x2C1A, - 0x2C30, - 0x2C41, - 0x2C4A, - 0x2C8D, - 0x2CAC, - 0x2D3A, - 0x2D88, - 0x2DAC, - 0x2E09, - 0x2EBD, - 0x2EF2, - 0x2F26, - 0x2F8B, - 0x2FA6, - 0x2FB1, - 0x2FC9, - 0x2FDA, - 0x2FE6, - 0x30FE, - 0x3101, - 0x31A3, - 0x31C0, - 0x31C7, - 0x3213, - 0x323D, - 0x3247, - 0x3271, - 0x32B3, - 0x332D, - 0x333A, - 0x334F, - 0x33C7, - 0x33F1, - 0x3430, - 0x345D, - 0x3467, - 0x3478, - 0x351D, - 0x353F, - 0x3540, - 0x36CC, - 0x36D1, - 0x37C5, - 0x37C9, - 0x3806, - 0x3944, - 0x394C, - 0x39CD, - 0x3A39, - 0x3A99, - 0x3A9F, - 0x3AC8, - 0x3B05, - 0x3B08, - 0x3B15, - 0x3B4A, - 0x3B62, - 0x3B8F, - 0x3C5F, - 0x3D36, - 0x3D8B, - 0x3E62 - - Addresses from the above which were determined to be 0x5C: - - 0x05B1, // 0x5C, newline - 0x0E4E, // 0x5C, newline - 0x1259, // 0x5C, newline - 0x1271, // 0x5C, newline - 0x1278, // 0x5C, newline - 0x1D85, // 0x5C, newline - 0x2189, // 0x5C, newline - 0x21D7, // 0x5C, newline - 0x23EA, // 0x5C, newline - 0x2442, // 0x5C, newline - 0x2559, // 0x5C, newline - 0x2586, // 0x5C, newline - 0x258C, // 0x5C, newline - 0x2592, // 0x5C, newline - 0x2613, // 0x5C, newline - 0x3101, // 0x5C, newline - 0x351D, // 0x5C, newline - 0x3540, // 0x5C, newline - 0x394C, // 0x5C, newline - 0x3D8B, // 0x5C, newline - - - */ + #include "emu.h" #include "cpu/z180/hd647180x.h" @@ -572,7 +380,7 @@ void mastboy_state::tileram_w(offs_t offset, uint8_t data) void mastboy_state::bank_w(uint8_t data) { - // controls access to banked ram / rom + // controls access to banked RAM / ROM m_bank_c000->set_bank(data); } @@ -824,134 +632,517 @@ void mastboy_state::mastboy(machine_config &config) // Romsets +// On the test screen at boot, most games show an error on "3 RAMM" until NVRAM is recorded after a full demo loop. + +/* Gaelco had an internal version of this set with no internal ROM for the MCU, having the first 0x4000 bytes of the EPROM with actual code, and this hash: + CRC(50a8feaf) SHA1(bf912fbc6883f06aaccbe5e5e71553976fd836d3) */ ROM_START( mastboy ) ROM_REGION( 0x20000, "maincpu", 0 ) - ROM_LOAD( "hd647180.bin", 0x00000, 0x4000, CRC(75716dd1) SHA1(9b14b9b889b29b6022a3815de95487fb6a720d7a) ) // game code is internal to the CPU! - ROM_LOAD( "3.ic77", 0x04000, 0x4000, CRC(64a712ba) SHA1(a8318fa6f5b3fe1aaff4cef07aced927e3503542) ) // data (1ST AND 2ND HALF IDENTICAL) - ROM_CONTINUE( 0x04000, 0x4000 ) - ROM_CONTINUE( 0x04000, 0x4000 ) - ROM_CONTINUE( 0x04000, 0x4000 ) // only the last 16kb matters + ROM_LOAD( "hd647180.bin", 0x0000, 0x4000, CRC(75716dd1) SHA1(9b14b9b889b29b6022a3815de95487fb6a720d7a) ) // game code is internal to the CPU! + ROM_LOAD( "3.ic77", 0x4000, 0x4000, CRC(64a712ba) SHA1(a8318fa6f5b3fe1aaff4cef07aced927e3503542) ) // data (1ST AND 2ND HALF IDENTICAL) + ROM_CONTINUE( 0x4000, 0x4000 ) + ROM_CONTINUE( 0x4000, 0x4000 ) + ROM_CONTINUE( 0x4000, 0x4000 ) // only the last 16kb matters ROM_REGION( 0x10000, "vrom", ROMREGION_INVERT ) // ROM accessed by the video chip ROM_LOAD( "04.bin", 0x00000, 0x10000, CRC(565932f4) SHA1(4b184aa445b5671072031ad4a2ccb13868d6d3a4) ) ROM_REGION( 0x200000, "bankedrom", 0 ) // banked data - 8 banks, 6 'question' slots - ROM_LOAD( "01.bin", 0x000000, 0x040000, CRC(36755831) SHA1(706fba5fc765502774643bfef8a3c9d2c01eb01b) ) // 99% gfx - ROM_LOAD( "02.bin", 0x040000, 0x020000, CRC(69cf6b7c) SHA1(a7bdc62051d09636dcd54db102706a9b42465e63) ) // data - ROM_RELOAD( 0x060000, 0x020000) // 128kb ROMs are mirrored + ROM_LOAD( "01.bin", 0x00000, 0x40000, CRC(36755831) SHA1(706fba5fc765502774643bfef8a3c9d2c01eb01b) ) // 99% gfx + ROM_LOAD( "02.bin", 0x40000, 0x20000, CRC(69cf6b7c) SHA1(a7bdc62051d09636dcd54db102706a9b42465e63) ) // data + ROM_RELOAD( 0x60000, 0x20000 ) // 128kb ROMs are mirrored /* SOCIALES - GEOGRAFIA ESP. 110691 7659 0412 SOCIALES - HISTORIA 110691 7635 0428 ESPECTACULOS - CINE 110691 7455 0318 CIENCIAS - GENERAL 110691 7482 0347 */ - ROM_LOAD( "05.bin", 0x080000, 0x020000, CRC(394cb674) SHA1(1390c666772f1e1e2da8866b960a3d24dc660e68) ) // questions - ROM_RELOAD( 0x0a0000, 0x020000) // 128kb ROMs are mirrored + ROM_LOAD( "05.bin", 0x080000, 0x020000, CRC(394cb674) SHA1(1390c666772f1e1e2da8866b960a3d24dc660e68) ) // questions + ROM_RELOAD( 0x0a0000, 0x020000 ) // 128kb ROMs are mirrored /* SOCIALES - GEOGRAFIA MUN. 110691 7054 0513 VARIOS - CULTURA GENERAL 110691 7419 0352 */ - ROM_LOAD( "06.bin", 0x0c0000, 0x020000, CRC(aace7120) SHA1(5655b56a7c241bc7908081088042601174c0a0b2) ) // questions - ROM_RELOAD( 0x0e0000, 0x020000) // 128kb ROMs are mirrored + ROM_LOAD( "06.bin", 0x0c0000, 0x020000, CRC(aace7120) SHA1(5655b56a7c241bc7908081088042601174c0a0b2) ) // questions + ROM_RELOAD( 0x0e0000, 0x020000 ) // 128kb ROMs are mirrored /* DEPORTES - GENERAL 011091 9700 1045 */ - ROM_LOAD( "07.bin", 0x100000, 0x020000, CRC(6618b002) SHA1(79942350da335a3362b6fc43527b6568ce134ceb) ) // questions - ROM_RELOAD( 0x120000, 0x020000) // 128kb ROMs are mirrored + ROM_LOAD( "07.bin", 0x100000, 0x020000, CRC(6618b002) SHA1(79942350da335a3362b6fc43527b6568ce134ceb) ) // questions + ROM_RELOAD( 0x120000, 0x020000 ) // 128kb ROMs are mirrored /* VARIOS - CULTURA GENERAL 041091 5970 0585 VARIOS - CULTURA GENERAL 061091 5300 0245 CIENCIAS - GENERAL 041091 5630 0275 */ - ROM_LOAD( "08.bin", 0x140000, 0x020000, CRC(6a4870dd) SHA1(f8ca94a5bc4ba3f512767901e4ae3579c2c6355a) ) // questions - ROM_RELOAD( 0x160000, 0x020000) // 128kb ROMs are mirrored + ROM_LOAD( "08.bin", 0x140000, 0x020000, CRC(6a4870dd) SHA1(f8ca94a5bc4ba3f512767901e4ae3579c2c6355a) ) // questions + ROM_RELOAD( 0x160000, 0x020000 ) // 128kb ROMs are mirrored - /* 0x180000 to 0x1bffff EMPTY */ - /* 0x1c0000 tt 0x1fffff EMPTY */ + // 0x180000 to 0x1bffff EMPTY + // 0x1c0000 to 0x1fffff EMPTY - ROM_REGION( 0x00345, "plds", 0 ) - ROM_LOAD( "gal16v8-25.ic32", 0x000000, 0x000117, NO_DUMP ) - ROM_LOAD( "gal16v8-25.ic49", 0x000117, 0x000117, NO_DUMP ) - ROM_LOAD( "gal16v8-25.ic84", 0x00022e, 0x000117, NO_DUMP ) + ROM_REGION( 0x117, "plds", 0 ) + ROM_LOAD( "gal16v8-25.ic32", 0x000, 0x117, NO_DUMP ) + ROM_LOAD( "gal16v8-25.ic49", 0x000, 0x117, NO_DUMP ) + ROM_LOAD( "gal16v8-25.ic84", 0x000, 0x117, NO_DUMP ) ROM_END // this set has a number of strings used in the boot-up display intentionally terminated at the first character so they don't display ROM_START( mastboya ) ROM_REGION( 0x20000, "maincpu", 0 ) - ROM_LOAD( "hd647180.bin", 0x00000, 0x4000, CRC(75716dd1) SHA1(9b14b9b889b29b6022a3815de95487fb6a720d7a) ) // game code is internal to the CPU! - ROM_LOAD( "03.bin", 0x04000, 0x4000, CRC(5020a37f) SHA1(8bc75623232f3ab457b47d5af6cd1c3fb24c0d0e) ) // data (1ST AND 2ND HALF IDENTICAL) - ROM_CONTINUE( 0x04000, 0x4000 ) - ROM_CONTINUE( 0x04000, 0x4000 ) - ROM_CONTINUE( 0x04000, 0x4000 ) // only the last 16kb matters + ROM_LOAD( "hd647180.bin", 0x0000, 0x4000, CRC(75716dd1) SHA1(9b14b9b889b29b6022a3815de95487fb6a720d7a) ) // game code is internal to the CPU! + ROM_LOAD( "03.bin", 0x4000, 0x4000, CRC(5020a37f) SHA1(8bc75623232f3ab457b47d5af6cd1c3fb24c0d0e) ) // data (1ST AND 2ND HALF IDENTICAL) + ROM_CONTINUE( 0x4000, 0x4000 ) + ROM_CONTINUE( 0x4000, 0x4000 ) + ROM_CONTINUE( 0x4000, 0x4000 ) // only the last 16kb matters ROM_REGION( 0x10000, "vrom", ROMREGION_INVERT ) // ROM accessed by the video chip ROM_LOAD( "04.bin", 0x00000, 0x10000, CRC(565932f4) SHA1(4b184aa445b5671072031ad4a2ccb13868d6d3a4) ) ROM_REGION( 0x200000, "bankedrom", 0 ) // banked data - 8 banks, 6 'question' slots - ROM_LOAD( "01.bin", 0x000000, 0x040000, CRC(36755831) SHA1(706fba5fc765502774643bfef8a3c9d2c01eb01b) ) // 99% gfx - ROM_LOAD( "02.bin", 0x040000, 0x020000, CRC(69cf6b7c) SHA1(a7bdc62051d09636dcd54db102706a9b42465e63) ) // data - ROM_RELOAD( 0x060000, 0x020000) // 128kb ROMs are mirrored + ROM_LOAD( "01.bin", 0x00000, 0x40000, CRC(36755831) SHA1(706fba5fc765502774643bfef8a3c9d2c01eb01b) ) // 99% gfx + ROM_LOAD( "02.bin", 0x40000, 0x20000, CRC(69cf6b7c) SHA1(a7bdc62051d09636dcd54db102706a9b42465e63) ) // data + ROM_RELOAD( 0x60000, 0x20000 ) // 128kb ROMs are mirrored + +/* SOCIALES - GEOGRAFIA ESP. 110691 7659 0412 + SOCIALES - HISTORIA 110691 7635 0428 + ESPECTACULOS - CINE 110691 7455 0318 + CIENCIAS - GENERAL 110691 7482 0347 */ + ROM_LOAD( "05.bin", 0x080000, 0x020000, CRC(394cb674) SHA1(1390c666772f1e1e2da8866b960a3d24dc660e68) ) // questions + ROM_RELOAD( 0x0a0000, 0x020000 ) // 128kb ROMs are mirrored + +/* SOCIALES - GEOGRAFIA MUN. 110691 7054 0513 + VARIOS - CULTURA GENERAL 110691 7419 0352 */ + ROM_LOAD( "06.bin", 0x0c0000, 0x020000, CRC(aace7120) SHA1(5655b56a7c241bc7908081088042601174c0a0b2) ) // questions + ROM_RELOAD( 0x0e0000, 0x020000 ) // 128kb ROMs are mirrored + +/* DEPORTES - GENERAL 011091 9700 1045 */ + ROM_LOAD( "07.bin", 0x100000, 0x020000, CRC(6618b002) SHA1(79942350da335a3362b6fc43527b6568ce134ceb) ) // questions + ROM_RELOAD( 0x120000, 0x020000 ) // 128kb ROMs are mirrored + +/* VARIOS - CULTURA GENERAL 041091 5970 0585 + VARIOS - CULTURA GENERAL 061091 5300 0245 + CIENCIAS - GENERAL 041091 5630 0275 */ + ROM_LOAD( "08.bin", 0x140000, 0x020000, CRC(6a4870dd) SHA1(f8ca94a5bc4ba3f512767901e4ae3579c2c6355a) ) // questions + ROM_RELOAD( 0x160000, 0x020000 ) // 128kb ROMs are mirrored + + // 0x180000 to 0x1bffff EMPTY + // 0x1c0000 tt 0x1fffff EMPTY + + ROM_REGION( 0x117, "plds", 0 ) + ROM_LOAD( "gal16v8-25.ic32", 0x000, 0x117, NO_DUMP ) + ROM_LOAD( "gal16v8-25.ic49", 0x000, 0x117, NO_DUMP ) + ROM_LOAD( "gal16v8-25.ic84", 0x000, 0x117, NO_DUMP ) +ROM_END + +/* No internal ROM on the MCU, all the code is on the EPROM. + Romset labeled "MB ESPANYA ORIGINAL - *CUSTOM I PROG. NOV". */ +ROM_START( mastboyb ) + ROM_REGION( 0x20000, "maincpu", 0 ) + ROM_LOAD( "mboy_espana_programa_tablas_27-oct-92.bin", 0x0000, 0x8000, CRC(8280774c) SHA1(0a850647a9ffe728e800efba8bea033e11b4d559) ) // data (1ST AND 2ND HALF IDENTICAL) + ROM_CONTINUE( 0x0000, 0x8000 ) + + ROM_REGION( 0x10000, "vrom", ROMREGION_INVERT ) // ROM accessed by the video chip + ROM_LOAD( "4.bin", 0x000000, 0x10000, CRC(565932f4) SHA1(4b184aa445b5671072031ad4a2ccb13868d6d3a4) ) + + ROM_REGION( 0x200000, "bankedrom", 0 ) // banked data - 8 banks, 6 'question' slots + ROM_LOAD( "s.master.bin", 0x00000, 0x40000, CRC(36755831) SHA1(706fba5fc765502774643bfef8a3c9d2c01eb01b) ) // 99% gfx + ROM_LOAD( "montajes_sonido_colores.bin", 0x40000, 0x20000, CRC(ad54e36e) SHA1(8d29319937c7594ec360c9fa71e1101f2351f444) ) // data + ROM_RELOAD( 0x060000, 0x020000 ) // 128kb ROMs are mirrored + +/* SOCIALES - GEOGRAFIA ESP. 110691 7659 0412 + SOCIALES - HISTORIA 110691 7635 0428 + ESPECTACULOS - CINE 110691 7455 0318 + CIENCIAS - GENERAL 110691 7482 0347 */ + ROM_LOAD( "05.bin", 0x080000, 0x020000, CRC(394cb674) SHA1(1390c666772f1e1e2da8866b960a3d24dc660e68) ) // questions + ROM_RELOAD( 0x0a0000, 0x020000 ) // 128kb ROMs are mirrored + +/* SOCIALES - GEOGRAFIA MUN. 110691 7054 0513 + VARIOS - CULTURA GENERAL 110691 7419 0352 */ + ROM_LOAD( "06.bin", 0x0c0000, 0x020000, CRC(aace7120) SHA1(5655b56a7c241bc7908081088042601174c0a0b2) ) // questions + ROM_RELOAD( 0x0e0000, 0x020000 ) // 128kb ROMs are mirrored + +/* DEPORTES - GENERAL 011091 9700 1045 */ + ROM_LOAD( "07.bin", 0x100000, 0x020000, CRC(6618b002) SHA1(79942350da335a3362b6fc43527b6568ce134ceb) ) // questions + ROM_RELOAD( 0x120000, 0x020000 ) // 128kb ROMs are mirrored + +/* VARIOS - CULTURA GENERAL 041091 5970 0585 + VARIOS - CULTURA GENERAL 061091 5300 0245 + CIENCIAS - GENERAL 041091 5630 0275 */ + ROM_LOAD( "08.bin", 0x140000, 0x020000, CRC(6a4870dd) SHA1(f8ca94a5bc4ba3f512767901e4ae3579c2c6355a) ) // questions + ROM_RELOAD( 0x160000, 0x020000 ) // 128kb ROMs are mirrored + + // 0x180000 to 0x1bffff EMPTY + // 0x1c0000 tt 0x1fffff EMPTY + + ROM_REGION( 0x117, "plds", 0 ) + ROM_LOAD( "gal16v8-25.ic32", 0x000, 0x117, NO_DUMP ) + ROM_LOAD( "gal16v8-25.ic49", 0x000, 0x117, NO_DUMP ) + ROM_LOAD( "gal16v8-25.ic84", 0x000, 0x117, NO_DUMP ) +ROM_END + +/* No internal ROM on the MCU, all the code is on the EPROM. + Romset labeled "MASTER BOY. 2.". */ +ROM_START( mastboyc ) + ROM_REGION( 0x20000, "maincpu", 0 ) + ROM_LOAD( "3_mb_23-10-91_27c512.bin", 0x0000, 0x8000, CRC(c0bbddf6) SHA1(02759bbe2ad2699c5e0f71cdaf3d0e8d877ef601) ) // data (1ST AND 2ND HALF IDENTICAL) + ROM_CONTINUE( 0x0000, 0x8000 ) + + ROM_REGION( 0x10000, "vrom", ROMREGION_INVERT ) // ROM accessed by the video chip + ROM_LOAD( "original_4_27c512.bin", 0x000000, 0x10000, CRC(eb5fa30d) SHA1(e4acedb70691985fe0de1b4429325d18b791fb90) ) + + ROM_REGION( 0x200000, "bankedrom", 0 ) // banked data - 8 banks, 6 'question' slots + ROM_LOAD( "original_1_27c020.bin", 0x00000, 0x40000, CRC(36755831) SHA1(706fba5fc765502774643bfef8a3c9d2c01eb01b) ) // 99% gfx + ROM_LOAD( "original_2_27c010.bin", 0x40000, 0x20000, CRC(ad54e36e) SHA1(8d29319937c7594ec360c9fa71e1101f2351f444) ) // data + ROM_RELOAD( 0x060000, 0x020000 ) // 128kb ROMs are mirrored + +/* SOCIALES - GEOGRAFIA ESP. 110691 7659 0412 + SOCIALES - HISTORIA 110691 7635 0428 + ESPECTACULOS - CINE 110691 7455 0318 + CIENCIAS - GENERAL 110691 7482 0347 */ + ROM_LOAD( "mb_0_preg_5_27c010.bin", 0x080000, 0x020000, CRC(394cb674) SHA1(1390c666772f1e1e2da8866b960a3d24dc660e68) ) // questions + ROM_RELOAD( 0x0a0000, 0x020000 ) // 128kb ROMs are mirrored + +/* SOCIALES - GEOGRAFIA MUN. 110691 7054 0513 + VARIOS - CULTURA GENERAL 110691 7419 0352 */ + ROM_LOAD( "mb_1_preg_6_27c010.bin", 0x0c0000, 0x020000, CRC(aace7120) SHA1(5655b56a7c241bc7908081088042601174c0a0b2) ) // questions + ROM_RELOAD( 0x0e0000, 0x020000 ) // 128kb ROMs are mirrored + +/* DEPORTES - GENERAL 011091 9700 1045 */ + ROM_LOAD( "mb_2_preg_7_27c010.bin", 0x100000, 0x020000, CRC(6618b002) SHA1(79942350da335a3362b6fc43527b6568ce134ceb) ) // questions + ROM_RELOAD( 0x120000, 0x020000 ) // 128kb ROMs are mirrored + +/* VARIOS - CULTURA GENERAL 041091 5970 0585 + VARIOS - CULTURA GENERAL 061091 5300 0245 + CIENCIAS - GENERAL 041091 5630 0275 */ + ROM_LOAD( "mb_3_preg_8_27c010.bin", 0x140000, 0x020000, CRC(6a4870dd) SHA1(f8ca94a5bc4ba3f512767901e4ae3579c2c6355a) ) // questions + ROM_RELOAD( 0x160000, 0x020000 ) // 128kb ROMs are mirrored + + // 0x180000 to 0x1bffff EMPTY + // 0x1c0000 tt 0x1fffff EMPTY + + ROM_REGION( 0x117, "plds", 0 ) + ROM_LOAD( "gal16v8-25.ic32", 0x000, 0x117, NO_DUMP ) + ROM_LOAD( "gal16v8-25.ic49", 0x000, 0x117, NO_DUMP ) + ROM_LOAD( "gal16v8-25.ic84", 0x000, 0x117, NO_DUMP ) +ROM_END + +ROM_START( mastboyv2 ) + ROM_REGION( 0x20000, "maincpu", 0 ) + ROM_LOAD( "hd647180_sp_v2.bin", 0x0000, 0x4000, CRC(f4c4ae83) SHA1(b131dcf1e4f2a274aed515054d43b316628a3c58) ) // game code is internal to the CPU! + ROM_LOAD( "mboy_espana_tablas.bin", 0x4000, 0x4000, CRC(3dcd71bd) SHA1(67ceee75c8329c51cf83b56ddfd37c5257f8d8dd) ) // data (1ST AND 2ND HALF IDENTICAL) + ROM_CONTINUE( 0x4000, 0x4000 ) + ROM_CONTINUE( 0x4000, 0x4000 ) + ROM_CONTINUE( 0x4000, 0x4000 ) // only the last 16kb matters + + ROM_REGION( 0x10000, "vrom", ROMREGION_INVERT ) // ROM accessed by the video chip + ROM_LOAD( "fi6_esp_4.bin", 0x000000, 0x10000, CRC(eb5fa30d) SHA1(e4acedb70691985fe0de1b4429325d18b791fb90) ) + + ROM_REGION( 0x200000, "bankedrom", 0 ) // banked data - 8 banks, 6 'question' slots + ROM_LOAD( "fi6_esp_3.bin", 0x00000, 0x40000, CRC(c491998d) SHA1(10cd8855391d24fc09831e7e812dda3de24b789b) ) // 99% gfx + ROM_LOAD( "mont_sonid_esp_color.bin", 0x40000, 0x20000, CRC(514b1c71) SHA1(cbdd8cef90afe547ead34d6f71c092ed07d7781d) ) // data + ROM_RELOAD( 0x060000, 0x020000 ) // 128kb ROMs are mirrored + +/* SOCIALES - GEOGRAFIA ESP. 110691 7659 0412 + SOCIALES - HISTORIA 110691 7635 0428 + ESPECTACULOS - CINE 110691 7455 0318 + CIENCIAS - GENERAL 110691 7482 0347 */ + ROM_LOAD( "05.bin", 0x080000, 0x020000, CRC(394cb674) SHA1(1390c666772f1e1e2da8866b960a3d24dc660e68) ) // questions + ROM_RELOAD( 0x0a0000, 0x020000 ) // 128kb ROMs are mirrored + +/* SOCIALES - GEOGRAFIA MUN. 110691 7054 0513 + VARIOS - CULTURA GENERAL 110691 7419 0352 */ + ROM_LOAD( "06.bin", 0x0c0000, 0x020000, CRC(aace7120) SHA1(5655b56a7c241bc7908081088042601174c0a0b2) ) // questions + ROM_RELOAD( 0x0e0000, 0x020000 ) // 128kb ROMs are mirrored + +/* DEPORTES - GENERAL 011091 9700 1045 */ + ROM_LOAD( "07.bin", 0x100000, 0x020000, CRC(6618b002) SHA1(79942350da335a3362b6fc43527b6568ce134ceb) ) // questions + ROM_RELOAD( 0x120000, 0x020000 ) // 128kb ROMs are mirrored + +/* VARIOS - CULTURA GENERAL 041091 5970 0585 + VARIOS - CULTURA GENERAL 061091 5300 0245 + CIENCIAS - GENERAL 041091 5630 0275 */ + ROM_LOAD( "08.bin", 0x140000, 0x020000, CRC(6a4870dd) SHA1(f8ca94a5bc4ba3f512767901e4ae3579c2c6355a) ) // questions + ROM_RELOAD( 0x160000, 0x020000 ) // 128kb ROMs are mirrored + + // 0x180000 to 0x1bffff EMPTY + // 0x1c0000 tt 0x1fffff EMPTY + + ROM_REGION( 0x117, "plds", 0 ) + ROM_LOAD( "gal16v8-25.ic32", 0x000, 0x117, NO_DUMP ) + ROM_LOAD( "gal16v8-25.ic49", 0x000, 0x117, NO_DUMP ) + ROM_LOAD( "gal16v8-25.ic84", 0x000, 0x117, NO_DUMP ) +ROM_END + +ROM_START( mastboyv2a ) + ROM_REGION( 0x20000, "maincpu", 0 ) + ROM_LOAD( "hd647180_sp_v2.bin", 0x0000, 0x4000, CRC(f4c4ae83) SHA1(b131dcf1e4f2a274aed515054d43b316628a3c58) ) // game code is internal to the CPU! + ROM_LOAD( "mboy_espana_tablas_alt.bin", 0x4000, 0x4000, CRC(71ac5623) SHA1(53a6ca20745a92a40e6168804164903bec2c2bbd) ) // data (1ST AND 2ND HALF IDENTICAL) + ROM_CONTINUE( 0x4000, 0x4000 ) + ROM_CONTINUE( 0x4000, 0x4000 ) + ROM_CONTINUE( 0x4000, 0x4000 ) // only the last 16kb matters + + ROM_REGION( 0x10000, "vrom", ROMREGION_INVERT ) // ROM accessed by the video chip + ROM_LOAD( "fi6_esp_4.bin", 0x000000, 0x10000, CRC(eb5fa30d) SHA1(e4acedb70691985fe0de1b4429325d18b791fb90) ) + + ROM_REGION( 0x200000, "bankedrom", 0 ) // banked data - 8 banks, 6 'question' slots + ROM_LOAD( "fi6_esp_3.bin", 0x00000, 0x40000, CRC(c491998d) SHA1(10cd8855391d24fc09831e7e812dda3de24b789b) ) // 99% gfx + ROM_LOAD( "mont_sonid_esp_color.bin", 0x40000, 0x20000, CRC(514b1c71) SHA1(cbdd8cef90afe547ead34d6f71c092ed07d7781d) ) // data + ROM_RELOAD( 0x060000, 0x020000 ) // 128kb ROMs are mirrored /* SOCIALES - GEOGRAFIA ESP. 110691 7659 0412 SOCIALES - HISTORIA 110691 7635 0428 ESPECTACULOS - CINE 110691 7455 0318 CIENCIAS - GENERAL 110691 7482 0347 */ - ROM_LOAD( "05.bin", 0x080000, 0x020000, CRC(394cb674) SHA1(1390c666772f1e1e2da8866b960a3d24dc660e68) ) // questions - ROM_RELOAD( 0x0a0000, 0x020000) // 128kb ROMs are mirrored + ROM_LOAD( "05.bin", 0x080000, 0x020000, CRC(394cb674) SHA1(1390c666772f1e1e2da8866b960a3d24dc660e68) ) // questions + ROM_RELOAD( 0x0a0000, 0x020000 ) // 128kb ROMs are mirrored + +/* SOCIALES - GEOGRAFIA MUN. 110691 7054 0513 + VARIOS - CULTURA GENERAL 110691 7419 0352 */ + ROM_LOAD( "06.bin", 0x0c0000, 0x020000, CRC(aace7120) SHA1(5655b56a7c241bc7908081088042601174c0a0b2) ) // questions + ROM_RELOAD( 0x0e0000, 0x020000 ) // 128kb ROMs are mirrored + +/* DEPORTES - GENERAL 011091 9700 1045 */ + ROM_LOAD( "07.bin", 0x100000, 0x020000, CRC(6618b002) SHA1(79942350da335a3362b6fc43527b6568ce134ceb) ) // questions + ROM_RELOAD( 0x120000, 0x020000 ) // 128kb ROMs are mirrored + +/* VARIOS - CULTURA GENERAL 041091 5970 0585 + VARIOS - CULTURA GENERAL 061091 5300 0245 + CIENCIAS - GENERAL 041091 5630 0275 */ + ROM_LOAD( "08.bin", 0x140000, 0x020000, CRC(6a4870dd) SHA1(f8ca94a5bc4ba3f512767901e4ae3579c2c6355a) ) // questions + ROM_RELOAD( 0x160000, 0x020000 ) // 128kb ROMs are mirrored + + // 0x180000 to 0x1bffff EMPTY + // 0x1c0000 tt 0x1fffff EMPTY + + ROM_REGION( 0x117, "plds", 0 ) + ROM_LOAD( "gal16v8-25.ic32", 0x000, 0x117, NO_DUMP ) + ROM_LOAD( "gal16v8-25.ic49", 0x000, 0x117, NO_DUMP ) + ROM_LOAD( "gal16v8-25.ic84", 0x000, 0x117, NO_DUMP ) +ROM_END + +/* Romset labeled "MB ESPANYA OLIMPIADES". + Gaelco had an internal version of this set with no internal ROM for the MCU, having the first 0x4000 bytes of the EPROM with actual code, and this hash: + CRC(ce6f4be5) SHA1(8190f0d7579cedf4f995edbc4632d74a1af218be) */ +ROM_START( mastboyol ) + ROM_REGION( 0x20000, "maincpu", 0 ) + ROM_LOAD( "hd647180_sp.bin", 0x0000, 0x4000, CRC(826f56fb) SHA1(70ee8ff1d7a87ac6425327a93ac51a9e34d9ebef) ) // game code is internal to the CPU! + ROM_LOAD( "mboy_espana_tablas_18-oct-92.bin", 0x4000, 0x4000, CRC(a463b5f9) SHA1(87348613d4200c485b66f98184a8c0cc2ce23883) ) // data (1ST AND 2ND HALF IDENTICAL) + ROM_CONTINUE( 0x4000, 0x4000 ) + ROM_CONTINUE( 0x4000, 0x4000 ) + ROM_CONTINUE( 0x4000, 0x4000 ) // only the last 16kb matters + + ROM_REGION( 0x10000, "vrom", ROMREGION_INVERT ) // ROM accessed by the video chip + ROM_LOAD( "mb_4a_fig_esp_18-oct-92.bin", 0x000000, 0x10000, CRC(eb5fa30d) SHA1(e4acedb70691985fe0de1b4429325d18b791fb90) ) + + ROM_REGION( 0x200000, "bankedrom", 0 ) // banked data - 8 banks, 6 'question' slots + ROM_LOAD( "mb_1a_fig_esp-18-oct-92.bin", 0x00000, 0x40000, CRC(2dde3ae0) SHA1(b7f771340d7ce207e75c6c77f8bc93ffc54f649b) ) // 99% gfx + ROM_LOAD( "mb_2a_montaje_sonido_colores_18-oct-92.bin", 0x40000, 0x20000, CRC(523789d5) SHA1(db29debda088f9ad35f5cfdb51b21c0eb8642593) ) // data + ROM_RELOAD( 0x060000, 0x020000 ) // 128kb ROMs are mirrored + +/* SOCIALES - GEOGRAFIA ESP. 110691 7659 0412 + SOCIALES - HISTORIA 110691 7635 0428 + ESPECTACULOS - CINE 110691 7455 0318 + CIENCIAS - GENERAL 110691 7482 0347 */ + ROM_LOAD( "mb_0_preg_5_27c010.bin", 0x080000, 0x020000, CRC(394cb674) SHA1(1390c666772f1e1e2da8866b960a3d24dc660e68) ) // questions + ROM_RELOAD( 0x0a0000, 0x020000 ) // 128kb ROMs are mirrored + +/* SOCIALES - GEOGRAFIA MUN. 110691 7054 0513 + VARIOS - CULTURA GENERAL 110691 7419 0352 */ + ROM_LOAD( "mb_1_preg_6_27c010.bin", 0x0c0000, 0x020000, CRC(aace7120) SHA1(5655b56a7c241bc7908081088042601174c0a0b2) ) // questions + ROM_RELOAD( 0x0e0000, 0x020000 ) // 128kb ROMs are mirrored + +/* DEPORTES - GENERAL 011091 9700 1045 */ + ROM_LOAD( "mb_2_preg_7_27c010.bin", 0x100000, 0x020000, CRC(6618b002) SHA1(79942350da335a3362b6fc43527b6568ce134ceb) ) // questions + ROM_RELOAD( 0x120000, 0x020000 ) // 128kb ROMs are mirrored + +/* VARIOS - CULTURA GENERAL 041091 5970 0585 + VARIOS - CULTURA GENERAL 061091 5300 0245 + CIENCIAS - GENERAL 041091 5630 0275 */ + ROM_LOAD( "mb_3_preg_8_27c010.bin", 0x140000, 0x020000, CRC(6a4870dd) SHA1(f8ca94a5bc4ba3f512767901e4ae3579c2c6355a) ) // questions + ROM_RELOAD( 0x160000, 0x020000 ) // 128kb ROMs are mirrored + +/* DEPORTES - BARCELONA'92 011092 6526 0385 */ + ROM_LOAD( "mb_9b_pregunt_espana_6-11-92.bin", 0x180000, 0x020000, CRC(60b52d6b) SHA1(29eda481bce073ae0555bb75a72c7ec3926d499f) ) // questions + ROM_RELOAD( 0x1A0000, 0x020000 ) // 128kb ROMs are mirrored + + // 0x1c0000 tt 0x1fffff EMPTY + + ROM_REGION( 0x117, "plds", 0 ) + ROM_LOAD( "gal16v8-25.ic32", 0x000, 0x117, NO_DUMP ) + ROM_LOAD( "gal16v8-25.ic49", 0x000, 0x117, NO_DUMP ) + ROM_LOAD( "gal16v8-25.ic84", 0x000, 0x117, NO_DUMP ) +ROM_END + +// Romset labeled "MB ESPANYA OLIMPIADES *". +ROM_START( mastboyola ) + ROM_REGION( 0x20000, "maincpu", 0 ) + ROM_LOAD( "hd647180_sp.bin", 0x0000, 0x4000, CRC(826f56fb) SHA1(70ee8ff1d7a87ac6425327a93ac51a9e34d9ebef) ) // game code is internal to the CPU! + ROM_LOAD( "mboy_espana_tablas_alt_18-oct_92.bin", 0x4000, 0x4000, CRC(e2691a11) SHA1(f624e7f92c3f6b88bb9f008a8f00970815c7910e) ) // data (1ST AND 2ND HALF IDENTICAL) + ROM_CONTINUE( 0x4000, 0x4000 ) + ROM_CONTINUE( 0x4000, 0x4000 ) + ROM_CONTINUE( 0x4000, 0x4000 ) // only the last 16kb matters + + ROM_REGION( 0x10000, "vrom", ROMREGION_INVERT ) // ROM accessed by the video chip + ROM_LOAD( "mb_4a_fig_esp_18-oct-92.bin", 0x000000, 0x10000, CRC(eb5fa30d) SHA1(e4acedb70691985fe0de1b4429325d18b791fb90) ) + + ROM_REGION( 0x200000, "bankedrom", 0 ) // banked data - 8 banks, 6 'question' slots + ROM_LOAD( "mb_1a_fig_esp-18-oct-92.bin", 0x00000, 0x40000, CRC(2dde3ae0) SHA1(b7f771340d7ce207e75c6c77f8bc93ffc54f649b) ) // 99% gfx + ROM_LOAD( "mb_2a_montaje_sonido_colores_18-oct-92.bin", 0x40000, 0x20000, CRC(523789d5) SHA1(db29debda088f9ad35f5cfdb51b21c0eb8642593) ) // data + ROM_RELOAD( 0x060000, 0x020000 ) // 128kb ROMs are mirrored + +/* SOCIALES - GEOGRAFIA ESP. 110691 7659 0412 + SOCIALES - HISTORIA 110691 7635 0428 + ESPECTACULOS - CINE 110691 7455 0318 + CIENCIAS - GENERAL 110691 7482 0347 */ + ROM_LOAD( "mb_0_preg_5_27c010.bin", 0x080000, 0x020000, CRC(394cb674) SHA1(1390c666772f1e1e2da8866b960a3d24dc660e68) ) // questions + ROM_RELOAD( 0x0a0000, 0x020000 ) // 128kb ROMs are mirrored /* SOCIALES - GEOGRAFIA MUN. 110691 7054 0513 VARIOS - CULTURA GENERAL 110691 7419 0352 */ - ROM_LOAD( "06.bin", 0x0c0000, 0x020000, CRC(aace7120) SHA1(5655b56a7c241bc7908081088042601174c0a0b2) ) // questions - ROM_RELOAD( 0x0e0000, 0x020000) // 128kb ROMs are mirrored + ROM_LOAD( "mb_1_preg_6_27c010.bin", 0x0c0000, 0x020000, CRC(aace7120) SHA1(5655b56a7c241bc7908081088042601174c0a0b2) ) // questions + ROM_RELOAD( 0x0e0000, 0x020000 ) // 128kb ROMs are mirrored /* DEPORTES - GENERAL 011091 9700 1045 */ - ROM_LOAD( "07.bin", 0x100000, 0x020000, CRC(6618b002) SHA1(79942350da335a3362b6fc43527b6568ce134ceb) ) // questions - ROM_RELOAD( 0x120000, 0x020000) // 128kb ROMs are mirrored + ROM_LOAD( "mb_2_preg_7_27c010.bin", 0x100000, 0x020000, CRC(6618b002) SHA1(79942350da335a3362b6fc43527b6568ce134ceb) ) // questions + ROM_RELOAD( 0x120000, 0x020000 ) // 128kb ROMs are mirrored /* VARIOS - CULTURA GENERAL 041091 5970 0585 VARIOS - CULTURA GENERAL 061091 5300 0245 CIENCIAS - GENERAL 041091 5630 0275 */ - ROM_LOAD( "08.bin", 0x140000, 0x020000, CRC(6a4870dd) SHA1(f8ca94a5bc4ba3f512767901e4ae3579c2c6355a) ) // questions - ROM_RELOAD( 0x160000, 0x020000) // 128kb ROMs are mirrored + ROM_LOAD( "mb_3_preg_8_27c010.bin", 0x140000, 0x020000, CRC(6a4870dd) SHA1(f8ca94a5bc4ba3f512767901e4ae3579c2c6355a) ) // questions + ROM_RELOAD( 0x160000, 0x020000 ) // 128kb ROMs are mirrored + +/* DEPORTES - BARCELONA'92 011092 6526 0385 */ + ROM_LOAD( "mb_9b_alt_pregunt_espana_10-10-92.bin", 0x180000, 0x020000, CRC(eeaf0a6d) SHA1(4e4ce87b9e4e552bab9c41c767fe5f4b32e0eb73) ) // questions + ROM_RELOAD( 0x1A0000, 0x020000 ) // 128kb ROMs are mirrored - /* 0x180000 to 0x1bffff EMPTY */ - /* 0x1c0000 tt 0x1fffff EMPTY */ + // 0x1c0000 tt 0x1fffff EMPTY - ROM_REGION( 0x00345, "plds", 0 ) - ROM_LOAD( "gal16v8-25.ic32", 0x000000, 0x000117, NO_DUMP ) - ROM_LOAD( "gal16v8-25.ic49", 0x000117, 0x000117, NO_DUMP ) - ROM_LOAD( "gal16v8-25.ic84", 0x00022e, 0x000117, NO_DUMP ) + ROM_REGION( 0x117, "plds", 0 ) + ROM_LOAD( "gal16v8-25.ic32", 0x000, 0x117, NO_DUMP ) + ROM_LOAD( "gal16v8-25.ic49", 0x000, 0x117, NO_DUMP ) + ROM_LOAD( "gal16v8-25.ic84", 0x000, 0x117, NO_DUMP ) ROM_END -/* The internal ROM should be different on the Italian sets, as it indexes the wrong strings on the startup screens, + +// Italian sets + +/* The internal ROM should be different on the (v1) Italian sets, as it indexes the wrong strings on the startup screens, showing MARK instead of PLAY MARK etc. So, marked as BAD_DUMP on these sets */ -// PCB dated 03/02/92 -ROM_START( mastboyiv2 ) +ROM_START( mastboyi ) + ROM_REGION( 0x20000, "maincpu", 0 ) + ROM_LOAD( "hd647180_i.bin", 0x0000, 0x4000, BAD_DUMP CRC(75716dd1) SHA1(9b14b9b889b29b6022a3815de95487fb6a720d7a) ) // game code is internal to the CPU! + ROM_LOAD( "3-mem-a.ic77", 0x4000, 0x4000, CRC(3ee33282) SHA1(26371e3bb436869461e9870409b69aa9fb1845d6) ) // sound data? (+ 1 piece of) 1ST AND 2ND HALF IDENTICAL + ROM_CONTINUE( 0x4000, 0x4000 ) + ROM_CONTINUE( 0x4000, 0x4000 ) + ROM_CONTINUE( 0x4000, 0x4000 ) // only the last 16kb matters + + ROM_REGION( 0x10000, "vrom", ROMREGION_INVERT ) // ROM accessed by the video chip + ROM_LOAD( "4.ic91", 0x00000, 0x10000, CRC(858d7b27) SHA1(b0ddf49df5665003f3616d67f7fc27408433483b) ) + + ROM_REGION( 0x200000, "bankedrom", 0 ) // question data - 6 sockets + ROM_LOAD( "1-mem-c.ic75", 0x00000, 0x40000, CRC(7c7b1cc5) SHA1(73ad7bdb61d1f99ce09ef3a5a3ae0f1e72364eee) ) // 99% gfx + ROM_LOAD( "2-mem-b.ic76", 0x40000, 0x20000, CRC(87015c18) SHA1(a16bf2707ce847da0923662796195b75719a6d77) ) // data + ROM_RELOAD( 0x60000, 0x20000 ) // 128kb ROMs are mirrored + +/* TEMPO LIBERO - HOBBY GIOCHI 011091 5457 0300 + SCIENZA - NATURA 011091 5657 0400 + SPORT - MONDIALI-90 011091 5999 0212 + MUSICA - AUTORI CANZONI 011091 5496 0314 */ + ROM_LOAD( "5-rom.ic95", 0x080000, 0x020000, CRC(adc07f12) SHA1(2e0b46ac5884ad459bc354f56ff384ff1932f147) ) + ROM_RELOAD( 0x0a0000, 0x020000 ) // 128kb ROMs are mirrored + +/* SPORT- GENERALE 011091 5294 0713 + SPETTACOLO - CINE-TV 011091 5657 0400 */ + ROM_LOAD( "6-rom.ic96", 0x0c0000, 0x020000, CRC(2c52cb1e) SHA1(d58f21c09bd3983497f74ab6c5a37977d9e30f0c) ) + ROM_RELOAD( 0x0e0000, 0x020000 ) // 128kb ROMs are mirrored + +/* SCIENZA - STORIA 011091 5430 0375 + SCIENZA - GEOGRAFIA 011091 5010 0565 */ + ROM_LOAD( "7-rom.ic97", 0x100000, 0x020000, CRC(7818408f) SHA1(2a69688b6cda5baf2a45966dd86f10b2fcd54b66) ) + ROM_RELOAD( 0x120000, 0x020000 ) // 128kb ROMs are mirrored + + // 0x140000 to 0x17ffff EMPTY + // 0x180000 to 0x1bffff EMPTY + // 0x1c0000 to 0x1fffff EMPTY + + ROM_REGION( 0x117, "plds", 0 ) + ROM_LOAD( "gal16v8-25.ic32", 0x000, 0x117, NO_DUMP ) + ROM_LOAD( "gal16v8-25.ic49", 0x000, 0x117, NO_DUMP ) + ROM_LOAD( "gal16v8-25.ic84", 0x000, 0x117, NO_DUMP ) +ROM_END + +// Only one of the question ROMs differs from 'mastboyi' (minor wording / spelling changes in most cases). +ROM_START( mastboyia ) ROM_REGION( 0x20000, "maincpu", 0 ) - ROM_LOAD( "hd647180.bin", 0x00000, 0x4000, BAD_DUMP CRC(75716dd1) SHA1(9b14b9b889b29b6022a3815de95487fb6a720d7a) ) // game code is internal to the CPU! - ROM_LOAD( "13_mem-a.ic77", 0x04000, 0x4000, CRC(06465aa5) SHA1(c2958197cf5d0f36efb1654d9d0f7c660768f4d1) ) // sound data? (+ 1 piece of) 1ST AND 2ND HALF IDENTICAL - ROM_CONTINUE( 0x04000, 0x4000 ) - ROM_CONTINUE( 0x04000, 0x4000 ) - ROM_CONTINUE( 0x04000, 0x4000 ) // only the last 16kb matters + ROM_LOAD( "hd647180_i.bin", 0x0000, 0x4000, BAD_DUMP CRC(75716dd1) SHA1(9b14b9b889b29b6022a3815de95487fb6a720d7a) ) // game code is internal to the CPU! + ROM_LOAD( "3-mem-a.ic77", 0x4000, 0x4000, CRC(3ee33282) SHA1(26371e3bb436869461e9870409b69aa9fb1845d6) ) // sound data? (+ 1 piece of) 1ST AND 2ND HALF IDENTICAL + ROM_CONTINUE( 0x4000, 0x4000 ) + ROM_CONTINUE( 0x4000, 0x4000 ) + ROM_CONTINUE( 0x4000, 0x4000 ) // only the last 16kb matters ROM_REGION( 0x10000, "vrom", ROMREGION_INVERT ) // ROM accessed by the video chip - ROM_LOAD( "14.ic91", 0x00000, 0x10000, CRC(388beade) SHA1(2161ac884d5537293e2dd9786b3556bbc8ebdce6) ) // RAMM err. + ROM_LOAD( "4.ic91", 0x00000, 0x10000, CRC(858d7b27) SHA1(b0ddf49df5665003f3616d67f7fc27408433483b) ) ROM_REGION( 0x200000, "bankedrom", 0 ) // question data - 6 sockets - ROM_LOAD( "11_mem-c.ic75", 0x000000, 0x040000, CRC(4030846a) SHA1(8782bae43d506f8b9e584087d9325a88f7020f4f) ) // 99% gfx - ROM_LOAD( "12_mem-b.ic76", 0x040000, 0x020000, CRC(a38293eb) SHA1(07be32df7dd689b6262f0da2e4e0500bf29d4428) ) // data - ROM_RELOAD( 0x060000, 0x020000) // 128kb ROMs are mirrored + ROM_LOAD( "1-mem-c.ic75", 0x00000, 0x40000, CRC(7c7b1cc5) SHA1(73ad7bdb61d1f99ce09ef3a5a3ae0f1e72364eee) ) // 99% gfx + ROM_LOAD( "2-mem-b.ic76", 0x40000, 0x20000, CRC(87015c18) SHA1(a16bf2707ce847da0923662796195b75719a6d77) ) // data + ROM_RELOAD( 0x60000, 0x20000 ) // 128kb ROMs are mirrored + +/* TEMPO LIBERO - HOBBY GIOCHI 011091 5457 0300 + SCIENZA - NATURA 011091 5657 0400 + SPORT - MONDIALI-90 011091 5999 0212 + MUSICA - AUTORI CANZONI 011091 5496 0314 */ + ROM_LOAD( "5-alt.ic95", 0x080000, 0x020000, CRC(efa442fa) SHA1(5211ea122083120028348418e33cb71b4ce52b8f) ) + ROM_RELOAD( 0x0a0000, 0x020000 ) // 128kb ROMs are mirrored + +/* SPORT- GENERALE 011091 5294 0713 + SPETTACOLO - CINE-TV 011091 5657 0400 */ + ROM_LOAD( "6-rom.ic96", 0x0c0000, 0x020000, CRC(2c52cb1e) SHA1(d58f21c09bd3983497f74ab6c5a37977d9e30f0c) ) + ROM_RELOAD( 0x0e0000, 0x020000 ) // 128kb ROMs are mirrored + +/* SCIENZA - STORIA 011091 5430 0375 + SCIENZA - GEOGRAFIA 011091 5010 0565 */ + ROM_LOAD( "7-rom.ic97", 0x100000, 0x020000, CRC(7818408f) SHA1(2a69688b6cda5baf2a45966dd86f10b2fcd54b66) ) + ROM_RELOAD( 0x120000, 0x020000 ) // 128kb ROMs are mirrored + + // 0x140000 to 0x17ffff EMPTY + // 0x180000 to 0x1bffff EMPTY + // 0x1c0000 to 0x1fffff EMPTY + + ROM_REGION( 0x117, "plds", 0 ) + ROM_LOAD( "gal16v8-25.ic32", 0x000, 0x117, NO_DUMP ) + ROM_LOAD( "gal16v8-25.ic49", 0x000, 0x117, NO_DUMP ) + ROM_LOAD( "gal16v8-25.ic84", 0x000, 0x117, NO_DUMP ) +ROM_END + +ROM_START( mastboyib ) + ROM_REGION( 0x20000, "maincpu", 0 ) + ROM_LOAD( "hd647180_ia.bin", 0x0000, 0x4000, CRC(a0556932) SHA1(0fc3cd8ff497002f22fcb236c8b77ec840bf1bb3) ) // game code is internal to the CPU! + ROM_LOAD( "mboy_italia_tablas_27-oct-92_27c512.bin", 0x4000, 0x4000, CRC(21e1fd0a) SHA1(71ab677f6af5cb2c4a40a156289f5af29c6c4a9a) ) // sound data? (+ 1 piece of) 1ST AND 2ND HALF IDENTICAL + ROM_CONTINUE( 0x4000, 0x4000 ) + ROM_CONTINUE( 0x4000, 0x4000 ) + ROM_CONTINUE( 0x4000, 0x4000 ) // only the last 16kb matters + + ROM_REGION( 0x10000, "vrom", ROMREGION_INVERT ) // ROM accessed by the video chip + ROM_LOAD( "figuras_mboy_italia_18-3-92_27c512.bin", 0x00000, 0x10000, CRC(388beade) SHA1(2161ac884d5537293e2dd9786b3556bbc8ebdce6) ) + + ROM_REGION( 0x200000, "bankedrom", 0 ) // question data - 6 sockets + ROM_LOAD( "figuras_mboy_italia_18-3-92_27c020.bin", 0x00000, 0x40000, CRC(cecbde31) SHA1(5fbe5fbceb9864ede0cf9c593b66df1c9ff88822) ) // 99% gfx + ROM_LOAD( "montajes_parlante_mboy_italia_20-ene-92_27c010.bin", 0x40000, 0x20000, CRC(439ad40a) SHA1(9235bb1c63f852a26a9467fec8c029a2974ef51b) ) // data + ROM_RELOAD( 0x60000, 0x20000 ) // 128kb ROMs are mirrored /* SPORT - GENERALE 011092 7515 1329 */ ROM_LOAD( "15_domande-rom.ic92", 0x080000, 0x020000, CRC(45dd77e3) SHA1(856fbd1b7f888e1768abceb2465d5bb97a685332) ) - ROM_RELOAD( 0x0a0000, 0x020000) // 128kb ROMs are mirrored + ROM_RELOAD( 0x0a0000, 0x020000 ) // 128kb ROMs are mirrored /* SCIENZA - STORIA 011092 6361 0808 MUSICA - GENERALE 011092 6875 0719 */ ROM_LOAD( "16_domande-rom.ic93", 0x0c0000, 0x020000, CRC(31ececb2) SHA1(a62b1ecdedf8c587afefef4a7d5cdc9746abb093) ) - ROM_RELOAD( 0x0e0000, 0x020000) // 128kb ROMs are mirrored + ROM_RELOAD( 0x0e0000, 0x020000 ) // 128kb ROMs are mirrored /* SCIENZA - GEOGRAFIA 011092 6756 0565 SPETTACOLOS - CINE-TV 011092 6171 0918 */ ROM_LOAD( "17_domande-rom.ic94", 0x100000, 0x020000, CRC(bdce54df) SHA1(b30a3adcdeba26f91f7de8e174f54a158d173dba) ) - ROM_RELOAD( 0x120000, 0x020000) // 128kb ROMs are mirrored + ROM_RELOAD( 0x120000, 0x020000 ) // 128kb ROMs are mirrored /* TEMPO LIBERO - CULTURA 011092 6913 0424 SCIENZA - NATURA 011092 6969 0400 @@ -959,114 +1150,295 @@ ROM_START( mastboyiv2 ) SPORT - WC_90 011092 6072 0212 SCIENZA - SESSUOLOGIA 011092 6098 0276 */ ROM_LOAD( "18_domande-rom.ic95", 0x140000, 0x020000, CRC(3ea4dd86) SHA1(6db92010ab6d6adbdf6bea9b257423bb7607c7f2) ) - ROM_RELOAD( 0x160000, 0x020000) // 128kb ROMs are mirrored + ROM_RELOAD( 0x160000, 0x020000 ) // 128kb ROMs are mirrored /* SPETTACOLOS - FUMETTI 011092 6938 0496 TEMPO LIBERO - PAROLE 011092 6075 0219 */ ROM_LOAD( "19_domande-rom.ic96", 0x180000, 0x020000, CRC(146c46f9) SHA1(a6b09ffb98146ed2eb67a9d43465abc076758d60) ) - ROM_RELOAD( 0x1a0000, 0x020000) // 128kb ROMs are mirrored + ROM_RELOAD( 0x1a0000, 0x020000 ) // 128kb ROMs are mirrored - /* 0x1c0000 to 0x1fffff EMPTY */ + // 0x1c0000 to 0x1fffff EMPTY - ROM_REGION( 0x00345, "plds", 0 ) - ROM_LOAD( "gal16v8-25.ic32", 0x000000, 0x000117, NO_DUMP ) - ROM_LOAD( "gal16v8-25.ic49", 0x000117, 0x000117, NO_DUMP ) - ROM_LOAD( "gal16v8-25.ic84", 0x00022e, 0x000117, NO_DUMP ) + ROM_REGION( 0x117, "plds", 0 ) + ROM_LOAD( "gal16v8-25.ic32", 0x000, 0x117, NO_DUMP ) + ROM_LOAD( "gal16v8-25.ic49", 0x000, 0x117, NO_DUMP ) + ROM_LOAD( "gal16v8-25.ic84", 0x000, 0x117, NO_DUMP ) ROM_END -ROM_START( mastboyi ) +// No internal ROM on the MCU, all the code is on the EPROM. +ROM_START( mastboyic ) + ROM_REGION( 0x20000, "maincpu", 0 ) + ROM_LOAD( "mboy_italia_programa_tablas_27-oct-92_27c512.bin", 0x0000, 0x8000, CRC(1d14ea03) SHA1(c521d3a640db72e350452ab293e04c56271825de) ) // data (1ST AND 2ND HALF IDENTICAL) + ROM_CONTINUE( 0x0000, 0x8000 ) + + ROM_REGION( 0x10000, "vrom", ROMREGION_INVERT ) // ROM accessed by the video chip + ROM_LOAD( "figuras_mboy_italia_18-3-92_27c512.bin", 0x00000, 0x10000, CRC(388beade) SHA1(2161ac884d5537293e2dd9786b3556bbc8ebdce6) ) + + ROM_REGION( 0x200000, "bankedrom", 0 ) // question data - 6 sockets + ROM_LOAD( "figuras_mboy_italia_18-3-92_27c020.bin", 0x00000, 0x40000, CRC(cecbde31) SHA1(5fbe5fbceb9864ede0cf9c593b66df1c9ff88822) ) // 99% gfx + ROM_LOAD( "montajes_parlante_mboy_italia_20-ene-92_27c010.bin", 0x40000, 0x20000, CRC(439ad40a) SHA1(9235bb1c63f852a26a9467fec8c029a2974ef51b) ) // data + ROM_RELOAD( 0x60000, 0x20000 ) // 128kb ROMs are mirrored + +/* SPORT - GENERALE 011092 7515 1329 */ + ROM_LOAD( "15_domande-rom.ic92", 0x080000, 0x020000, CRC(45dd77e3) SHA1(856fbd1b7f888e1768abceb2465d5bb97a685332) ) + ROM_RELOAD( 0x0a0000, 0x020000 ) // 128kb ROMs are mirrored + +/* SCIENZA - STORIA 011092 6361 0808 + MUSICA - GENERALE 011092 6875 0719 */ + ROM_LOAD( "16_domande-rom.ic93", 0x0c0000, 0x020000, CRC(31ececb2) SHA1(a62b1ecdedf8c587afefef4a7d5cdc9746abb093) ) + ROM_RELOAD( 0x0e0000, 0x020000 ) // 128kb ROMs are mirrored + +/* SCIENZA - GEOGRAFIA 011092 6756 0565 + SPETTACOLOS - CINE-TV 011092 6171 0918 */ + ROM_LOAD( "17_domande-rom.ic94", 0x100000, 0x020000, CRC(bdce54df) SHA1(b30a3adcdeba26f91f7de8e174f54a158d173dba) ) + ROM_RELOAD( 0x120000, 0x020000 ) // 128kb ROMs are mirrored + +/* TEMPO LIBERO - CULTURA 011092 6913 0424 + SCIENZA - NATURA 011092 6969 0400 + TEMPO LIBERO - HOBBY 011092 6569 0300 + SPORT - WC_90 011092 6072 0212 + SCIENZA - SESSUOLOGIA 011092 6098 0276 */ + ROM_LOAD( "18_domande-rom.ic95", 0x140000, 0x020000, CRC(3ea4dd86) SHA1(6db92010ab6d6adbdf6bea9b257423bb7607c7f2) ) + ROM_RELOAD( 0x160000, 0x020000 ) // 128kb ROMs are mirrored + +/* SPETTACOLOS - FUMETTI 011092 6938 0496 + TEMPO LIBERO - PAROLE 011092 6075 0219 */ + ROM_LOAD( "19_domande-rom.ic96", 0x180000, 0x020000, CRC(146c46f9) SHA1(a6b09ffb98146ed2eb67a9d43465abc076758d60) ) + ROM_RELOAD( 0x1a0000, 0x020000 ) // 128kb ROMs are mirrored + + // 0x1c0000 to 0x1fffff EMPTY + + ROM_REGION( 0x117, "plds", 0 ) + ROM_LOAD( "gal16v8-25.ic32", 0x000, 0x117, NO_DUMP ) + ROM_LOAD( "gal16v8-25.ic49", 0x000, 0x117, NO_DUMP ) + ROM_LOAD( "gal16v8-25.ic84", 0x000, 0x117, NO_DUMP ) +ROM_END + +ROM_START( mastboyiol ) + ROM_REGION( 0x20000, "maincpu", 0 ) + ROM_LOAD( "hd647180_ia.bin", 0x0000, 0x4000, CRC(a0556932) SHA1(0fc3cd8ff497002f22fcb236c8b77ec840bf1bb3) ) // game code is internal to the CPU! + ROM_LOAD( "3a_i.bin", 0x4000, 0x4000, CRC(b0c424f8) SHA1(b1f71298acd5b6fea4088a7c9db9f32cb06c54d6) ) // sound data? (+ 1 piece of) 1ST AND 2ND HALF IDENTICAL + ROM_CONTINUE( 0x4000, 0x4000 ) + ROM_CONTINUE( 0x4000, 0x4000 ) + ROM_CONTINUE( 0x4000, 0x4000 ) // only the last 16kb matters + + ROM_REGION( 0x10000, "vrom", ROMREGION_INVERT ) // ROM accessed by the video chip + ROM_LOAD( "4a_i.bin", 0x00000, 0x10000, CRC(388beade) SHA1(2161ac884d5537293e2dd9786b3556bbc8ebdce6) ) + + ROM_REGION( 0x200000, "bankedrom", 0 ) // question data - 6 sockets + ROM_LOAD( "1a_i.bin", 0x00000, 0x40000, CRC(67d07e14) SHA1(ce198facd05948010f104f52e30ce8103ec4fff9) ) // 99% gfx + ROM_LOAD( "2a_i_bin", 0x40000, 0x20000, CRC(c8840f36) SHA1(38393988ef1ab440043aa9728fd8687ed67f3910) ) // data + ROM_RELOAD( 0x60000, 0x20000 ) // 128kb ROMs are mirrored + +/* SPORT - GENERALE 011092 7515 1329 */ + ROM_LOAD( "5a_i_preg_ita_0_18-oct-92.bin", 0x080000, 0x020000, CRC(45dd77e3) SHA1(856fbd1b7f888e1768abceb2465d5bb97a685332) ) + ROM_RELOAD( 0x0a0000, 0x020000 ) // 128kb ROMs are mirrored + +/* SCIENZA - STORIA 011092 6361 0808 + MUSICA - GENERALE 011092 6875 0719 */ + ROM_LOAD( "6a_i_preg_ita_1_18-oct-92.bin", 0x0c0000, 0x020000, CRC(31ececb2) SHA1(a62b1ecdedf8c587afefef4a7d5cdc9746abb093) ) + ROM_RELOAD( 0x0e0000, 0x020000 ) // 128kb ROMs are mirrored + +/* SCIENZA - GEOGRAFIA 011092 6756 0565 + SPETTACOLOS - CINE-TV 011092 6171 0918 */ + ROM_LOAD( "7a_i_preg_ita_2_18-oct-92.bin", 0x100000, 0x020000, CRC(bdce54df) SHA1(b30a3adcdeba26f91f7de8e174f54a158d173dba) ) + ROM_RELOAD( 0x120000, 0x020000 ) // 128kb ROMs are mirrored + +/* TEMPO LIBERO - CULTURA 011092 6913 0424 + SCIENZA - NATURA 011092 6969 0400 + TEMPO LIBERO - HOBBY 011092 6569 0300 + SPORT - WC_90 011092 6072 0212 + SCIENZA - SESSUOLOGIA 011092 6098 0276 */ + ROM_LOAD( "8a_i_preg_ita_3_18-oct-92.bin", 0x140000, 0x020000, CRC(3ea4dd86) SHA1(6db92010ab6d6adbdf6bea9b257423bb7607c7f2) ) + ROM_RELOAD( 0x160000, 0x020000 ) // 128kb ROMs are mirrored + +/* SPETTACOLOS - FUMETTI 011092 6938 0496 + TEMPO LIBERO - PAROLE 011092 6075 0219 */ + ROM_LOAD( "9a_i_preg_ita_4_18-oct-92.bin", 0x180000, 0x020000, CRC(146c46f9) SHA1(a6b09ffb98146ed2eb67a9d43465abc076758d60) ) + ROM_RELOAD( 0x1a0000, 0x020000 ) // 128kb ROMs are mirrored + +// Missing the Italian questions about the Olympic Games ?? + //ROM_LOAD( "olympic_questions_it.bin", 0x180000, 0x020000, NO_DUMP ) // questions about Olympic Games + //ROM_RELOAD( 0x1A0000, 0x020000 ) // 128kb ROMs are mirrored + + ROM_REGION( 0x117, "plds", 0 ) + ROM_LOAD( "gal16v8-25.ic32", 0x000, 0x117, NO_DUMP ) + ROM_LOAD( "gal16v8-25.ic49", 0x000, 0x117, NO_DUMP ) + ROM_LOAD( "gal16v8-25.ic84", 0x000, 0x117, NO_DUMP ) +ROM_END + +// No internal ROM on the MCU, all the code is on the EPROM. +ROM_START( mastboyitst ) ROM_REGION( 0x20000, "maincpu", 0 ) - ROM_LOAD( "hd647180.bin", 0x00000, 0x4000, BAD_DUMP CRC(75716dd1) SHA1(9b14b9b889b29b6022a3815de95487fb6a720d7a) ) // game code is internal to the CPU! - ROM_LOAD( "3-mem-a.ic77", 0x04000, 0x4000, CRC(3ee33282) SHA1(26371e3bb436869461e9870409b69aa9fb1845d6) ) // sound data? (+ 1 piece of) 1ST AND 2ND HALF IDENTICAL - ROM_CONTINUE( 0x04000, 0x4000 ) - ROM_CONTINUE( 0x04000, 0x4000 ) - ROM_CONTINUE( 0x04000, 0x4000 ) // only the last 16kb matters + ROM_LOAD( "mb_test.bin", 0x0000, 0x8000, CRC(bd6f5c2e) SHA1(e5822f480c24f43c1f0a455174d4187e8db5a8a8) ) // data (1ST AND 2ND HALF IDENTICAL) + ROM_CONTINUE( 0x0000, 0x8000 ) ROM_REGION( 0x10000, "vrom", ROMREGION_INVERT ) // ROM accessed by the video chip ROM_LOAD( "4.ic91", 0x00000, 0x10000, CRC(858d7b27) SHA1(b0ddf49df5665003f3616d67f7fc27408433483b) ) ROM_REGION( 0x200000, "bankedrom", 0 ) // question data - 6 sockets - ROM_LOAD( "1-mem-c.ic75", 0x000000, 0x040000, CRC(7c7b1cc5) SHA1(73ad7bdb61d1f99ce09ef3a5a3ae0f1e72364eee) ) // 99% gfx - ROM_LOAD( "2-mem-b.ic76", 0x040000, 0x020000, CRC(87015c18) SHA1(a16bf2707ce847da0923662796195b75719a6d77) ) // data - ROM_RELOAD( 0x060000, 0x020000) // 128kb ROMs are mirrored + ROM_LOAD( "1-mem-c.ic75", 0x00000, 0x40000, CRC(7c7b1cc5) SHA1(73ad7bdb61d1f99ce09ef3a5a3ae0f1e72364eee) ) // 99% gfx + ROM_LOAD( "2-mem-b.ic76", 0x40000, 0x20000, CRC(87015c18) SHA1(a16bf2707ce847da0923662796195b75719a6d77) ) // data + ROM_RELOAD( 0x60000, 0x20000 ) // 128kb ROMs are mirrored /* TEMPO LIBERO - HOBBY GIOCHI 011091 5457 0300 SCIENZA - NATURA 011091 5657 0400 SPORT - MONDIALI-90 011091 5999 0212 MUSICA - AUTORI CANZONI 011091 5496 0314 */ ROM_LOAD( "5-rom.ic95", 0x080000, 0x020000, CRC(adc07f12) SHA1(2e0b46ac5884ad459bc354f56ff384ff1932f147) ) - ROM_RELOAD( 0x0a0000, 0x020000) // 128kb ROMs are mirrored + ROM_RELOAD( 0x0a0000, 0x020000 ) // 128kb ROMs are mirrored /* SPORT- GENERALE 011091 5294 0713 SPETTACOLO - CINE-TV 011091 5657 0400 */ ROM_LOAD( "6-rom.ic96", 0x0c0000, 0x020000, CRC(2c52cb1e) SHA1(d58f21c09bd3983497f74ab6c5a37977d9e30f0c) ) - ROM_RELOAD( 0x0e0000, 0x020000) // 128kb ROMs are mirrored + ROM_RELOAD( 0x0e0000, 0x020000 ) // 128kb ROMs are mirrored /* SCIENZA - STORIA 011091 5430 0375 SCIENZA - GEOGRAFIA 011091 5010 0565 */ ROM_LOAD( "7-rom.ic97", 0x100000, 0x020000, CRC(7818408f) SHA1(2a69688b6cda5baf2a45966dd86f10b2fcd54b66) ) - ROM_RELOAD( 0x120000, 0x020000) // 128kb ROMs are mirrored + ROM_RELOAD( 0x120000, 0x020000 ) // 128kb ROMs are mirrored - /* 0x140000 to 0x17ffff EMPTY */ - /* 0x180000 to 0x1bffff EMPTY */ - /* 0x1c0000 to 0x1fffff EMPTY */ + // 0x140000 to 0x17ffff EMPTY + // 0x180000 to 0x1bffff EMPTY + // 0x1c0000 to 0x1fffff EMPTY - ROM_REGION( 0x00345, "plds", 0 ) - ROM_LOAD( "gal16v8-25.ic32", 0x000000, 0x000117, NO_DUMP ) - ROM_LOAD( "gal16v8-25.ic49", 0x000117, 0x000117, NO_DUMP ) - ROM_LOAD( "gal16v8-25.ic84", 0x00022e, 0x000117, NO_DUMP ) + ROM_REGION( 0x117, "plds", 0 ) + ROM_LOAD( "gal16v8-25.ic32", 0x000, 0x117, NO_DUMP ) + ROM_LOAD( "gal16v8-25.ic49", 0x000, 0x117, NO_DUMP ) + ROM_LOAD( "gal16v8-25.ic84", 0x000, 0x117, NO_DUMP ) ROM_END -// Only one of the question roms differs (minor wording / spelling changes in most cases) -ROM_START( mastboyia ) +/* Gaelco had an internal version of this set with no internal ROM for the MCU, having the first 0x4000 bytes of the EPROM with actual code, and this hash: + CRC(06465aa5) SHA1(c2958197cf5d0f36efb1654d9d0f7c660768f4d1) */ +ROM_START( mastboyiv2 ) ROM_REGION( 0x20000, "maincpu", 0 ) - ROM_LOAD( "hd647180.bin", 0x00000, 0x4000, BAD_DUMP CRC(75716dd1) SHA1(9b14b9b889b29b6022a3815de95487fb6a720d7a) ) // game code is internal to the CPU! - ROM_LOAD( "3-mem-a.ic77", 0x04000, 0x4000, CRC(3ee33282) SHA1(26371e3bb436869461e9870409b69aa9fb1845d6) ) // sound data? (+ 1 piece of) 1ST AND 2ND HALF IDENTICAL - ROM_CONTINUE( 0x04000, 0x4000 ) - ROM_CONTINUE( 0x04000, 0x4000 ) - ROM_CONTINUE( 0x04000, 0x4000 ) // only the last 16kb matters + ROM_LOAD( "hd647180_it_v2.bin", 0x0000, 0x4000, CRC(55a499cc) SHA1(3bd7a175de00f7b102b990bb09b040adf08520f6) ) // game code is internal to the CPU! + ROM_LOAD( "mboy_3_italia_tablas_27-oct-92_27c512.bin", 0x4000, 0x4000, CRC(5fa0f502) SHA1(05d7464b2fec2705bc38b80b09e58ee5d08ee974) ) // sound data? (+ 1 piece of) 1ST AND 2ND HALF IDENTICAL + ROM_CONTINUE( 0x4000, 0x4000 ) + ROM_CONTINUE( 0x4000, 0x4000 ) + ROM_CONTINUE( 0x4000, 0x4000 ) // only the last 16kb matters ROM_REGION( 0x10000, "vrom", ROMREGION_INVERT ) // ROM accessed by the video chip - ROM_LOAD( "4.ic91", 0x00000, 0x10000, BAD_DUMP CRC(858d7b27) SHA1(b0ddf49df5665003f3616d67f7fc27408433483b) ) // RAMM err. + ROM_LOAD( "14.ic91", 0x00000, 0x10000, CRC(388beade) SHA1(2161ac884d5537293e2dd9786b3556bbc8ebdce6) ) ROM_REGION( 0x200000, "bankedrom", 0 ) // question data - 6 sockets - ROM_LOAD( "1-mem-c.ic75", 0x000000, 0x040000, CRC(7c7b1cc5) SHA1(73ad7bdb61d1f99ce09ef3a5a3ae0f1e72364eee) ) // 99% gfx - ROM_LOAD( "2-mem-b.ic76", 0x040000, 0x020000, CRC(87015c18) SHA1(a16bf2707ce847da0923662796195b75719a6d77) ) // data - ROM_RELOAD( 0x060000, 0x020000) // 128kb ROMs are mirrored + ROM_LOAD( "11_mem-c.ic75", 0x00000, 0x40000, CRC(4030846a) SHA1(8782bae43d506f8b9e584087d9325a88f7020f4f) ) // 99% gfx + ROM_LOAD( "12_mem-b.ic76", 0x40000, 0x20000, CRC(a38293eb) SHA1(07be32df7dd689b6262f0da2e4e0500bf29d4428) ) // data + ROM_RELOAD( 0x60000, 0x20000 ) // 128kb ROMs are mirrored -/* TEMPO LIBERO - HOBBY GIOCHI 011091 5457 0300 - SCIENZA - NATURA 011091 5657 0400 - SPORT - MONDIALI-90 011091 5999 0212 - MUSICA - AUTORI CANZONI 011091 5496 0314 */ - ROM_LOAD( "5-alt.ic95", 0x080000, 0x020000, CRC(efa442fa) SHA1(5211ea122083120028348418e33cb71b4ce52b8f) ) - ROM_RELOAD( 0x0a0000, 0x020000) // 128kb ROMs are mirrored +/* SPORT - GENERALE 011092 7515 1329 */ + ROM_LOAD( "15_domande-rom.ic92", 0x080000, 0x020000, CRC(45dd77e3) SHA1(856fbd1b7f888e1768abceb2465d5bb97a685332) ) + ROM_RELOAD( 0x0a0000, 0x020000 ) // 128kb ROMs are mirrored -/* SPORT- GENERALE 011091 5294 0713 - SPETTACOLO - CINE-TV 011091 5657 0400 */ - ROM_LOAD( "6-rom.ic96", 0x0c0000, 0x020000, CRC(2c52cb1e) SHA1(d58f21c09bd3983497f74ab6c5a37977d9e30f0c) ) - ROM_RELOAD( 0x0e0000, 0x020000) // 128kb ROMs are mirrored +/* SCIENZA - STORIA 011092 6361 0808 + MUSICA - GENERALE 011092 6875 0719 */ + ROM_LOAD( "16_domande-rom.ic93", 0x0c0000, 0x020000, CRC(31ececb2) SHA1(a62b1ecdedf8c587afefef4a7d5cdc9746abb093) ) + ROM_RELOAD( 0x0e0000, 0x020000 ) // 128kb ROMs are mirrored -/* SCIENZA - STORIA 011091 5430 0375 - SCIENZA - GEOGRAFIA 011091 5010 0565 */ - ROM_LOAD( "7-rom.ic97", 0x100000, 0x020000, CRC(7818408f) SHA1(2a69688b6cda5baf2a45966dd86f10b2fcd54b66) ) - ROM_RELOAD( 0x120000, 0x020000) // 128kb ROMs are mirrored +/* SCIENZA - GEOGRAFIA 011092 6756 0565 + SPETTACOLOS - CINE-TV 011092 6171 0918 */ + ROM_LOAD( "17_domande-rom.ic94", 0x100000, 0x020000, CRC(bdce54df) SHA1(b30a3adcdeba26f91f7de8e174f54a158d173dba) ) + ROM_RELOAD( 0x120000, 0x020000 ) // 128kb ROMs are mirrored + +/* TEMPO LIBERO - CULTURA 011092 6913 0424 + SCIENZA - NATURA 011092 6969 0400 + TEMPO LIBERO - HOBBY 011092 6569 0300 + SPORT - WC_90 011092 6072 0212 + SCIENZA - SESSUOLOGIA 011092 6098 0276 */ + ROM_LOAD( "18_domande-rom.ic95", 0x140000, 0x020000, CRC(3ea4dd86) SHA1(6db92010ab6d6adbdf6bea9b257423bb7607c7f2) ) + ROM_RELOAD( 0x160000, 0x020000 ) // 128kb ROMs are mirrored + +/* SPETTACOLOS - FUMETTI 011092 6938 0496 + TEMPO LIBERO - PAROLE 011092 6075 0219 */ + ROM_LOAD( "19_domande-rom.ic96", 0x180000, 0x020000, CRC(146c46f9) SHA1(a6b09ffb98146ed2eb67a9d43465abc076758d60) ) + ROM_RELOAD( 0x1a0000, 0x020000 ) // 128kb ROMs are mirrored - /* 0x140000 to 0x17ffff EMPTY */ - /* 0x180000 to 0x1bffff EMPTY */ - /* 0x1c0000 to 0x1fffff EMPTY */ + // 0x1c0000 to 0x1fffff EMPTY - ROM_REGION( 0x00345, "plds", 0 ) - ROM_LOAD( "gal16v8-25.ic32", 0x000000, 0x000117, NO_DUMP ) - ROM_LOAD( "gal16v8-25.ic49", 0x000117, 0x000117, NO_DUMP ) - ROM_LOAD( "gal16v8-25.ic84", 0x00022e, 0x000117, NO_DUMP ) + ROM_REGION( 0x117, "plds", 0 ) + ROM_LOAD( "gal16v8-25.ic32", 0x000, 0x117, NO_DUMP ) + ROM_LOAD( "gal16v8-25.ic49", 0x000, 0x117, NO_DUMP ) + ROM_LOAD( "gal16v8-25.ic84", 0x000, 0x117, NO_DUMP ) ROM_END +// PCB dated 03/02/92 +ROM_START( mastboyiv2a) + ROM_REGION( 0x20000, "maincpu", 0 ) + ROM_LOAD( "hd647180_it_v2.bin", 0x0000, 0x4000, CRC(55a499cc) SHA1(3bd7a175de00f7b102b990bb09b040adf08520f6) ) // game code is internal to the CPU! + ROM_LOAD( "13_mem-a.ic77", 0x4000, 0x4000, CRC(06465aa5) SHA1(c2958197cf5d0f36efb1654d9d0f7c660768f4d1) ) // sound data? (+ 1 piece of) 1ST AND 2ND HALF IDENTICAL + ROM_CONTINUE( 0x4000, 0x4000 ) + ROM_CONTINUE( 0x4000, 0x4000 ) + ROM_CONTINUE( 0x4000, 0x4000 ) // only the last 16kb matters + + ROM_REGION( 0x10000, "vrom", ROMREGION_INVERT ) // ROM accessed by the video chip + ROM_LOAD( "14.ic91", 0x00000, 0x10000, CRC(388beade) SHA1(2161ac884d5537293e2dd9786b3556bbc8ebdce6) ) + + ROM_REGION( 0x200000, "bankedrom", 0 ) // question data - 6 sockets + ROM_LOAD( "11_mem-c.ic75", 0x00000, 0x40000, CRC(4030846a) SHA1(8782bae43d506f8b9e584087d9325a88f7020f4f) ) // 99% gfx + ROM_LOAD( "12_mem-b.ic76", 0x40000, 0x20000, CRC(a38293eb) SHA1(07be32df7dd689b6262f0da2e4e0500bf29d4428) ) // data + ROM_RELOAD( 0x60000, 0x20000 ) // 128kb ROMs are mirrored + +/* SPORT - GENERALE 011092 7515 1329 */ + ROM_LOAD( "15_domande-rom.ic92", 0x080000, 0x020000, CRC(45dd77e3) SHA1(856fbd1b7f888e1768abceb2465d5bb97a685332) ) + ROM_RELOAD( 0x0a0000, 0x020000 ) // 128kb ROMs are mirrored + +/* SCIENZA - STORIA 011092 6361 0808 + MUSICA - GENERALE 011092 6875 0719 */ + ROM_LOAD( "16_domande-rom.ic93", 0x0c0000, 0x020000, CRC(31ececb2) SHA1(a62b1ecdedf8c587afefef4a7d5cdc9746abb093) ) + ROM_RELOAD( 0x0e0000, 0x020000 ) // 128kb ROMs are mirrored + +/* SCIENZA - GEOGRAFIA 011092 6756 0565 + SPETTACOLOS - CINE-TV 011092 6171 0918 */ + ROM_LOAD( "17_domande-rom.ic94", 0x100000, 0x020000, CRC(bdce54df) SHA1(b30a3adcdeba26f91f7de8e174f54a158d173dba) ) + ROM_RELOAD( 0x120000, 0x020000 ) // 128kb ROMs are mirrored + +/* TEMPO LIBERO - CULTURA 011092 6913 0424 + SCIENZA - NATURA 011092 6969 0400 + TEMPO LIBERO - HOBBY 011092 6569 0300 + SPORT - WC_90 011092 6072 0212 + SCIENZA - SESSUOLOGIA 011092 6098 0276 */ + ROM_LOAD( "18_domande-rom.ic95", 0x140000, 0x020000, CRC(3ea4dd86) SHA1(6db92010ab6d6adbdf6bea9b257423bb7607c7f2) ) + ROM_RELOAD( 0x160000, 0x020000 ) // 128kb ROMs are mirrored + +/* SPETTACOLOS - FUMETTI 011092 6938 0496 + TEMPO LIBERO - PAROLE 011092 6075 0219 */ + ROM_LOAD( "19_domande-rom.ic96", 0x180000, 0x020000, CRC(146c46f9) SHA1(a6b09ffb98146ed2eb67a9d43465abc076758d60) ) + ROM_RELOAD( 0x1a0000, 0x020000 ) // 128kb ROMs are mirrored + + // 0x1c0000 to 0x1fffff EMPTY + + ROM_REGION( 0x117, "plds", 0 ) + ROM_LOAD( "gal16v8-25.ic32", 0x000, 0x117, NO_DUMP ) + ROM_LOAD( "gal16v8-25.ic49", 0x000, 0x117, NO_DUMP ) + ROM_LOAD( "gal16v8-25.ic84", 0x000, 0x117, NO_DUMP ) +ROM_END + + } // anonymous namespace -GAME( 1991, mastboy, 0, mastboy, mastboy, mastboy_state, empty_init, ROT0, "Gaelco", "Master Boy (Spanish, rev A)", MACHINE_SUPPORTS_SAVE ) -GAME( 1991, mastboya, mastboy, mastboy, mastboy, mastboy_state, empty_init, ROT0, "Gaelco", "Master Boy (Spanish, rev A, hack?)", MACHINE_SUPPORTS_SAVE ) +// Every known PCB has the MCU sub-PCB silkscreened as "REV- A". The dates on the comments are from the program ROM sticker. + +GAME( 1991, mastboy, 0, mastboy, mastboy, mastboy_state, empty_init, ROT0, "Gaelco", "Master Boy (Spain, set 1, checksum E49B)", MACHINE_SUPPORTS_SAVE ) // 27-Nov-1992 +GAME( 1991, mastboya, mastboy, mastboy, mastboy, mastboy_state, empty_init, ROT0, "Gaelco", "Master Boy (Spain, set 2, checksum E5AD)", MACHINE_SUPPORTS_SAVE ) // No text on license box at boot +GAME( 1991, mastboyb, mastboy, mastboy, mastboy, mastboy_state, empty_init, ROT0, "Gaelco", "Master Boy (Spain, set 3, checksum 6070)", MACHINE_SUPPORTS_SAVE ) // 27-Nov-1992 +GAME( 1991, mastboyc, mastboy, mastboy, mastboy, mastboy_state, empty_init, ROT0, "Gaelco", "Master Boy (Spain, set 4, checksum CC6D)", MACHINE_SUPPORTS_SAVE ) // 23-Oct-1992 + +GAME( 1992, mastboyol, mastboy, mastboy, mastboy, mastboy_state, empty_init, ROT0, "Gaelco", "Master Boy Olympic (Spain, set 1, checksum 7309)", MACHINE_SUPPORTS_SAVE ) // 18-Oct-1992 +GAME( 1992, mastboyola, mastboy, mastboy, mastboy, mastboy_state, empty_init, ROT0, "Gaelco", "Master Boy Olympic (Spain, set 2, checksum 741B)", MACHINE_SUPPORTS_SAVE ) // 18-Oct-1992. No text on license box at boot + +GAME( 1991, mastboyv2, mastboy, mastboy, mastboy, mastboy_state, empty_init, ROT0, "Gaelco", "Master Boy Version II (Spain, set 1, checksum 5A0B)", MACHINE_SUPPORTS_SAVE ) // 17-Oct-1992 +GAME( 1991, mastboyv2a, mastboy, mastboy, mastboy, mastboy_state, empty_init, ROT0, "Gaelco", "Master Boy Version II (Spain, set 2, checksum 5B1D)", MACHINE_SUPPORTS_SAVE ) // 17-Oct-1992. No text on license box at boot // There were specific Gaelco Master Boy PCBs for the Italian market, silkcreened in Italian instead of in Spanish ("DOMANDE ROMS", "MASTER-BOY VERSIONE", etc.). -GAME( 1992, mastboyiv2, mastboy, mastboy, mastboy, mastboy_state, empty_init, ROT0, "Gaelco (Playmark license)", "Master Boy Version II (Italian, rev A)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // Questions from 1992, needs a different MCU program -GAME( 1991, mastboyi, mastboy, mastboy, mastboy, mastboy_state, empty_init, ROT0, "Gaelco (Playmark license)", "Master Boy (Italian, rev A, set 1)", MACHINE_SUPPORTS_SAVE ) -GAME( 1991, mastboyia, mastboy, mastboy, mastboy, mastboy_state, empty_init, ROT0, "Gaelco (Playmark license)", "Master Boy (Italian, rev A, set 2)", MACHINE_SUPPORTS_SAVE ) + +GAME( 1991, mastboyi, mastboy, mastboy, mastboy, mastboy_state, empty_init, ROT0, "Gaelco (Playmark license)", "Master Boy (Italy, set 1, checksum E7C5)", MACHINE_SUPPORTS_SAVE ) +GAME( 1991, mastboyia, mastboy, mastboy, mastboy, mastboy_state, empty_init, ROT0, "Gaelco (Playmark license)", "Master Boy (Italy, set 2, checksum E7C5)", MACHINE_SUPPORTS_SAVE ) // Same checksum as 'mastboyi', only the questions are different +GAME( 1991, mastboyib, mastboy, mastboy, mastboy, mastboy_state, empty_init, ROT0, "Gaelco (Playmark license)", "Master Boy (Italy, set 3, checksum 6918)", MACHINE_SUPPORTS_SAVE ) // 27-Oct-1992 +GAME( 1991, mastboyic, mastboy, mastboy, mastboy, mastboy_state, empty_init, ROT0, "Gaelco (Playmark license)", "Master Boy (Italy, set 4, checksum 680C)", MACHINE_SUPPORTS_SAVE ) // 27-Oct-1992 + +GAME( 1991, mastboyiol, mastboy, mastboy, mastboy, mastboy_state, empty_init, ROT0, "Gaelco (Playmark license)", "Master Boy Olympic (Italy, set 1, checksum 77A8)", MACHINE_SUPPORTS_SAVE ) // 18-Oct-1992 + +GAME( 1991, mastboyitst, mastboy, mastboy, mastboy, mastboy_state, empty_init, ROT0, "Gaelco", "Master Boy (Italy, test version)", MACHINE_SUPPORTS_SAVE ) + +GAME( 1992, mastboyiv2, mastboy, mastboy, mastboy, mastboy_state, empty_init, ROT0, "Gaelco (Playmark license)", "Master Boy Version II (Italy, set 1, checksum 618F)", MACHINE_SUPPORTS_SAVE ) // 27-Oct-1992 +GAME( 1992, mastboyiv2a, mastboy, mastboy, mastboy, mastboy_state, empty_init, ROT0, "Gaelco (Playmark license)", "Master Boy Version II (Italy, set 2, checksum 629B)", MACHINE_SUPPORTS_SAVE ) // 27-Oct-1992. No text on license box at boot diff --git a/src/mame/gaelco/mastboyo.cpp b/src/mame/gaelco/mastboyo.cpp index 67bcb2db399..1c4890e95ef 100644 --- a/src/mame/gaelco/mastboyo.cpp +++ b/src/mame/gaelco/mastboyo.cpp @@ -338,6 +338,26 @@ ROM_START( mastboyoc ) // PCB marked 'MMV-1 FABRICADO POR GAELCO' ROM_LOAD( "l_82s129.ic40", 0x000, 0x100, CRC(4d061216) SHA1(1abf9320da75a3fd23c6bdbcc4088d18e133c4e5) ) ROM_END +// The distributor text is empty on this set +ROM_START( mastboyod ) + ROM_REGION( 0x4000, "maincpu", 0 ) + ROM_LOAD( "mb_p1.ic14", 0x0000, 0x4000, CRC(9ff8d386) SHA1(4bf0df6d5cb605f2a4c9ef3cf0ece229ce8cbb40) ) + + ROM_REGION( 0x4000, "gfx1", 0 ) + ROM_LOAD( "fij_6_27128.bin", 0x0000, 0x4000, CRC(66ebd96b) SHA1(efd836cae7428131d653aa218c28d73b0afc020c) ) + + ROM_REGION( 0x80000, "questions", ROMREGION_ERASEFF ) + ROM_LOAD( "mb_3-4_27c512.bin", 0x60000, 0x10000, CRC(b2819e38) SHA1(e4dd036747221926d0f9f86e00e28f578decc942) ) + ROM_LOAD( "mb_1-2_27c512.bin", 0x70000, 0x10000, CRC(98fd79d2) SHA1(7a12d57abe7738d6ba0d0cdfe367544990c8bc6a) ) + + ROM_REGION( 0x100, "proms", 0 ) // timing or memory mapping? + ROM_LOAD( "d_82s129.ic23", 0x000, 0x100, CRC(d5fd2dfd) SHA1(66e3afa9e73507db0647d125c0be992b27d08adc) ) + + ROM_REGION( 0x200, "palette", 0 ) + ROM_LOAD( "h_82s129.ic39", 0x100, 0x100, CRC(8e965fc3) SHA1(b52c8e505438937c7a5d3e1393d54f0ad0425e78) ) + ROM_LOAD( "l_82s129.ic40", 0x000, 0x100, CRC(4d061216) SHA1(1abf9320da75a3fd23c6bdbcc4088d18e133c4e5) ) +ROM_END + } // anonymous namespace @@ -345,3 +365,4 @@ GAME( 1987, mastboyo, 0, mastboyo, mastboyo, mastboyo_state, empty_init, GAME( 1987, mastboyoa, mastboyo, mastboyo, mastboyo, mastboyo_state, empty_init, ROT0, "Gaelco (Covielsa license)", "Master Boy (1987, Z80 hardware, Covielsa, set 2)", MACHINE_SUPPORTS_SAVE ) GAME( 1987, mastboyob, mastboyo, mastboyo, mastboyo, mastboyo_state, empty_init, ROT0, "Gaelco (Ichi-Funtel license)", "Master Boy (1987, Z80 hardware, Ichi-Funtel, set 1)", MACHINE_SUPPORTS_SAVE ) GAME( 1987, mastboyoc, mastboyo, mastboyo, mastboyo, mastboyo_state, empty_init, ROT0, "Gaelco (Ichi-Funtel license)", "Master Boy (1987, Z80 hardware, Ichi-Funtel, set 2)", MACHINE_SUPPORTS_SAVE ) +GAME( 1987, mastboyod, mastboyo, mastboyo, mastboyo, mastboyo_state, empty_init, ROT0, "Gaelco", "Master Boy (1987, Z80 hardware)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/galaxian/galaxian.cpp b/src/mame/galaxian/galaxian.cpp index 12030b97837..1f34a394a08 100644 --- a/src/mame/galaxian/galaxian.cpp +++ b/src/mame/galaxian/galaxian.cpp @@ -1785,6 +1785,12 @@ void pisces_state::pisces_map(address_map &map) map(0x6002, 0x6002).mirror(0x07f8).w(FUNC(galaxian_state::galaxian_gfxbank_w)); // coin lockout replaced by graphics bank } +void pisces_state::ladybugg2_opcodes_map(address_map &map) +{ + map(0x0000, 0x0fff).rom().region("maincpu", 0x4000); + map(0x1000, 0x3fff).rom().region("maincpu", 0x1000); +} + void galaxian_state::frogg_map(address_map &map) { galaxian_map(map); @@ -7668,6 +7674,12 @@ void pisces_state::pisces(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &pisces_state::pisces_map); } +void pisces_state::ladybugg2(machine_config &config) +{ + pisces(config); + m_maincpu->set_addrmap(AS_OPCODES, &pisces_state::ladybugg2_opcodes_map); +} + void galaxian_state::victoryc(machine_config &config) { galaxian(config); @@ -8676,10 +8688,9 @@ void galaxian_state::decode_dingoe() void galaxian_state::decode_frogger_sound() { uint8_t *rombase = memregion("audiocpu")->base(); - uint32_t offs; // the first ROM of the sound CPU has data lines D0 and D1 swapped - for (offs = 0; offs < 0x800; offs++) + for (uint32_t offs = 0; offs < 0x800; offs++) rombase[offs] = bitswap<8>(rombase[offs], 7,6,5,4,3,2,0,1); } @@ -8687,10 +8698,9 @@ void galaxian_state::decode_frogger_sound() void galaxian_state::decode_froggermc_sound() { uint8_t *rombase = memregion("audiocpu")->base(); - uint32_t offs; // the first ROM of the sound CPU has data lines D0 and D1 swapped - for (offs = 0; offs < 0x1000; offs++) + for (uint32_t offs = 0; offs < 0x1000; offs++) rombase[offs] = bitswap<8>(rombase[offs], 7,6,5,4,3,2,0,1); } @@ -8698,10 +8708,9 @@ void galaxian_state::decode_froggermc_sound() void galaxian_state::decode_frogger_gfx() { uint8_t *rombase = memregion("gfx1")->base(); - uint32_t offs; // the 2nd gfx ROM has data lines D0 and D1 swapped - for (offs = 0x0800; offs < 0x1000; offs++) + for (uint32_t offs = 0x0800; offs < 0x1000; offs++) rombase[offs] = bitswap<8>(rombase[offs], 7,6,5,4,3,2,0,1); } @@ -8929,6 +8938,20 @@ void galaxian_state::init_batman2() common_init(&galaxian_state::galaxian_draw_bullet, &galaxian_state::galaxian_draw_background, &galaxian_state::batman2_extend_tile_info, &galaxian_state::upper_extend_sprite_info); } +void galaxian_state::init_ladybugg2() +{ + init_batman2(); + + uint8_t *romdata = memregion("maincpu")->base(); + + // descramble the content of each 0x100 block + for (int i = 0; i < 0x10000; i += 0x100) + { + using std::swap; + for (int j = 0; j < (0x100 / 2); j++) + swap(romdata[i | j], romdata[i | (j ^ 0xff)]); + } +} void galaxian_state::init_frogg() { @@ -11781,6 +11804,29 @@ ROM_START( ladybugg ) // Arctic Multi-System? ROM_LOAD( "lbuggx.clr", 0x0000, 0x0020, CRC(4e3caeab) SHA1(a25083c3e36d28afdefe4af6e6d4f3155e303625) ) ROM_END +/* Standard Galaxian bootleg PCB with a small sub-board with the five program ROMs, a PAL16L8, a 74540 and two more ICs + with their surfaces scratched-out (and five empty ROM sockets). */ +ROM_START( ladybugg2 ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "5", 0x0000, 0x1000, CRC(78264eab) SHA1(0e59fa4b4c0340d083b13603bde70aa3a4144829) ) // data for first 0x1000 + ROM_LOAD( "2", 0x1000, 0x1000, CRC(eb359d27) SHA1(3109eddf1d1532362fb4862a471ac14323cdbe52) ) + ROM_LOAD( "3", 0x2000, 0x1000, CRC(72eef4f2) SHA1(e04d6b422df232881455a658c0a9e54bc316b435) ) + ROM_LOAD( "4", 0x3000, 0x1000, CRC(887c95dd) SHA1(2109c455a91ccc022d8dfd90393a83d7a24b4460) ) + ROM_LOAD( "1", 0x4000, 0x1000, CRC(e5b777ca) SHA1(6c833e696bc672829aa4bf6a1dd1860a45db8648) ) // opcodes for first 0x1000 + + ROM_REGION( 0x2000, "gfx1", 0 ) + ROM_LOAD( "lbuggx.a", 0x0800, 0x0800, CRC(7efb9dc5) SHA1(5e02ea8cd1a1c8efa6708a8615cc2dc9da65a455) ) + ROM_CONTINUE( 0x0000, 0x0800 ) + ROM_LOAD( "lbuggx.b", 0x1800, 0x0800, CRC(351d4ddc) SHA1(048e8a60e57c6eb0a4d7c2175ddd46c4273756c5) ) + ROM_CONTINUE( 0x1000, 0x0800 ) + + ROM_REGION( 0x0020, "proms", 0 ) + ROM_LOAD( "prom.bin", 0x0000, 0x0020, CRC(4e3caeab) SHA1(a25083c3e36d28afdefe4af6e6d4f3155e303625) ) + + ROM_REGION( 0x0117, "pld", 0 ) + ROM_LOAD( "pal16l8.bin", 0x0000, 0x0117, BAD_DUMP CRC(13ca9897) SHA1(de8dcea2a2a17aa65ac02e389322113320f8d26b) ) // On the program ROMs PCB. Bruteforced (compiled for a GAL16V8), but not verified +ROM_END + ROM_START( atlantisb ) // Artic Multi-System ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "1", 0x0000, 0x0800, CRC(2b612351) SHA1(cfd244946190c062146716c0417c35be216943e4) ) // aka "subfury" @@ -16759,7 +16805,8 @@ GAME( 1982, crazym, puckman, galaxian, pacmanblb, galaxian_state, init_ GAME( 1981, ghostmun, puckman, pacmanbl, streakng, galaxian_state, init_ghostmun, ROT90, "bootleg (Leisure and Allied)", "Ghost Muncher", MACHINE_SUPPORTS_SAVE ) GAME( 1981, phoenxp2, phoenix, pisces, phoenxp2, pisces_state, init_batman2, ROT270, "bootleg", "Phoenix Part 2", MACHINE_SUPPORTS_SAVE ) GAME( 1981, batman2, phoenix, pisces, batman2, pisces_state, init_batman2, ROT270, "bootleg", "Batman Part 2", MACHINE_SUPPORTS_SAVE ) // Similar to pisces, but with different video banking characteristics -GAME( 1983, ladybugg, ladybug, pisces, ladybugg, pisces_state, init_batman2, ROT270, "bootleg", "Lady Bug (bootleg on Galaxian hardware)", MACHINE_SUPPORTS_SAVE ) +GAME( 1983, ladybugg, ladybug, pisces, ladybugg, pisces_state, init_batman2, ROT270, "bootleg", "Lady Bug (bootleg on Galaxian hardware, unencrypted)", MACHINE_SUPPORTS_SAVE ) +GAME( 1983, ladybugg2, ladybug, ladybugg2, ladybugg, pisces_state, init_ladybugg2, ROT270, "bootleg (TAI / DLI)", "Lady Bug (bootleg on Galaxian hardware, encrypted)", MACHINE_SUPPORTS_SAVE ) GAME( 1981, atlantisb, atlantis, galaxian, atlantib, galaxian_state, init_galaxian, ROT270, "bootleg", "Battle of Atlantis (bootleg)", MACHINE_SUPPORTS_SAVE ) // I don't know if this should have a starfield... GAME( 1982, tenspot, 0, tenspot, tenspot, tenspot_state, init_tenspot, ROT270, "Thomas Automatics", "Ten Spot", MACHINE_NOT_WORKING ) // Work out how menu works diff --git a/src/mame/galaxian/galaxian.h b/src/mame/galaxian/galaxian.h index 3800c993c30..d112ced970c 100644 --- a/src/mame/galaxian/galaxian.h +++ b/src/mame/galaxian/galaxian.h @@ -151,56 +151,57 @@ public: void theend_coin_counter_w(uint8_t data); uint8_t explorer_sound_latch_r(); uint8_t frogger_sound_timer_r(); - void init_galaxian(); - void init_nolock(); - void init_azurian(); - void init_batman2(); - void init_highroll(); - void init_frogg(); - void init_mooncrst(); - void init_mooncrsu(); - void init_mooncrgx(); - void init_moonqsr(); - void init_pacmanbl(); - void init_devilfshg(); - void init_jumpbug(); - void init_jumpbugbc(); - void init_checkman(); - void init_checkmaj(); - void init_dingo(); - void init_dingoe(); - void init_kong(); - void init_fantastc(); - void init_timefgtr(); - void init_theend(); - void init_scramble(); - void init_explorer(); - void init_mandinga(); - void init_mandingaeg(); - void init_atlantis(); - void init_scobra(); - void init_scobrae(); - void init_losttomb(); - void init_frogger(); - void init_froggermc(); - void init_froggers(); - void init_quaak(); - void init_turtles(); - void init_ckongs(); - void init_ckonggx(); - void init_anteater(); - void init_anteateruk(); - void init_superbon(); - void init_calipso(); - void init_ghostmun(); - void init_froggrs(); - void init_warofbugg(); - void init_jungsub(); - void init_mimonkey(); - void init_mimonkeyb(); - void init_victoryc(); - void init_bigkonggx(); - void init_crazym(); + void init_galaxian() ATTR_COLD; + void init_nolock() ATTR_COLD; + void init_azurian() ATTR_COLD; + void init_batman2() ATTR_COLD; + void init_ladybugg2() ATTR_COLD; + void init_highroll() ATTR_COLD; + void init_frogg() ATTR_COLD; + void init_mooncrst() ATTR_COLD; + void init_mooncrsu() ATTR_COLD; + void init_mooncrgx() ATTR_COLD; + void init_moonqsr() ATTR_COLD; + void init_pacmanbl() ATTR_COLD; + void init_devilfshg() ATTR_COLD; + void init_jumpbug() ATTR_COLD; + void init_jumpbugbc() ATTR_COLD; + void init_checkman() ATTR_COLD; + void init_checkmaj() ATTR_COLD; + void init_dingo() ATTR_COLD; + void init_dingoe() ATTR_COLD; + void init_kong() ATTR_COLD; + void init_fantastc() ATTR_COLD; + void init_timefgtr() ATTR_COLD; + void init_theend() ATTR_COLD; + void init_scramble() ATTR_COLD; + void init_explorer() ATTR_COLD; + void init_mandinga() ATTR_COLD; + void init_mandingaeg() ATTR_COLD; + void init_atlantis() ATTR_COLD; + void init_scobra() ATTR_COLD; + void init_scobrae() ATTR_COLD; + void init_losttomb() ATTR_COLD; + void init_frogger() ATTR_COLD; + void init_froggermc() ATTR_COLD; + void init_froggers() ATTR_COLD; + void init_quaak() ATTR_COLD; + void init_turtles() ATTR_COLD; + void init_ckongs() ATTR_COLD; + void init_ckonggx() ATTR_COLD; + void init_anteater() ATTR_COLD; + void init_anteateruk() ATTR_COLD; + void init_superbon() ATTR_COLD; + void init_calipso() ATTR_COLD; + void init_ghostmun() ATTR_COLD; + void init_froggrs() ATTR_COLD; + void init_warofbugg() ATTR_COLD; + void init_jungsub() ATTR_COLD; + void init_mimonkey() ATTR_COLD; + void init_mimonkeyb() ATTR_COLD; + void init_victoryc() ATTR_COLD; + void init_bigkonggx() ATTR_COLD; + void init_crazym() ATTR_COLD; TILE_GET_INFO_MEMBER(bg_get_tile_info); void galaxian_palette(palette_device &palette); @@ -265,66 +266,66 @@ public: draw_background_func draw_background, extend_tile_info_func extend_tile_info, extend_sprite_info_func extend_sprite_info); - void galaxian_base(machine_config &config); - void sidam_bootleg_base(machine_config &config); - void konami_base(machine_config &config); - void konami_sound_1x_ay8910(machine_config &config); - void konami_sound_2x_ay8910(machine_config &config); - void scramble_base(machine_config &config); - void timefgtr(machine_config &config); - void moonqsr(machine_config &config); - void frogger(machine_config &config); - void anteatergg(machine_config &config); - void ozon1(machine_config &config); - void theend(machine_config &config); - void turtles(machine_config &config); - void fantastc(machine_config &config); - void jumpbug(machine_config &config); - void jumpbugbrf(machine_config &config); - void checkmaj(machine_config &config); - void pacmanbl(machine_config &config); - void quaak(machine_config &config); - void galaxian(machine_config &config); - void highroll(machine_config &config); - void devilfshg(machine_config &config); - void froggers(machine_config &config); - void froggervd(machine_config &config); - void anteateruk(machine_config &config); - void anteaterg(machine_config &config); - void anteater(machine_config &config); - void turpins(machine_config &config); - void explorer(machine_config &config); - void scramble(machine_config &config); - void scobra(machine_config &config); - void froggermc(machine_config &config); - void froggeram(machine_config &config); - void spactrai(machine_config &config); - void takeoff(machine_config &config); - void mooncrst(machine_config &config); - void eagle(machine_config &config); - void ckongs(machine_config &config); - void frogf(machine_config &config); - void amigo2(machine_config &config); - void checkman(machine_config &config); - void jungsub(machine_config &config); - void victoryc(machine_config &config); - void frogg(machine_config &config); - void mandingarf(machine_config &config); - void mandinka(machine_config &config); - void thepitm(machine_config &config); - void kong(machine_config &config); - void bongo(machine_config &config); - void bongog(machine_config &config); - void scorpnmc(machine_config &config); - void ckongg(machine_config &config); - void ckongmc(machine_config &config); - void astroamb(machine_config &config); - void mimonkey(machine_config &config); - void mimonscr(machine_config &config); - void galartic(machine_config &config); - void bigkonggx(machine_config &config); - void scrammr(machine_config &config); - void turpinnv(machine_config &config); + void galaxian_base(machine_config &config) ATTR_COLD; + void sidam_bootleg_base(machine_config &config) ATTR_COLD; + void konami_base(machine_config &config) ATTR_COLD; + void konami_sound_1x_ay8910(machine_config &config) ATTR_COLD; + void konami_sound_2x_ay8910(machine_config &config) ATTR_COLD; + void scramble_base(machine_config &config) ATTR_COLD; + void timefgtr(machine_config &config) ATTR_COLD; + void moonqsr(machine_config &config) ATTR_COLD; + void frogger(machine_config &config) ATTR_COLD; + void anteatergg(machine_config &config) ATTR_COLD; + void ozon1(machine_config &config) ATTR_COLD; + void theend(machine_config &config) ATTR_COLD; + void turtles(machine_config &config) ATTR_COLD; + void fantastc(machine_config &config) ATTR_COLD; + void jumpbug(machine_config &config) ATTR_COLD; + void jumpbugbrf(machine_config &config) ATTR_COLD; + void checkmaj(machine_config &config) ATTR_COLD; + void pacmanbl(machine_config &config) ATTR_COLD; + void quaak(machine_config &config) ATTR_COLD; + void galaxian(machine_config &config) ATTR_COLD; + void highroll(machine_config &config) ATTR_COLD; + void devilfshg(machine_config &config) ATTR_COLD; + void froggers(machine_config &config) ATTR_COLD; + void froggervd(machine_config &config) ATTR_COLD; + void anteateruk(machine_config &config) ATTR_COLD; + void anteaterg(machine_config &config) ATTR_COLD; + void anteater(machine_config &config) ATTR_COLD; + void turpins(machine_config &config) ATTR_COLD; + void explorer(machine_config &config) ATTR_COLD; + void scramble(machine_config &config) ATTR_COLD; + void scobra(machine_config &config) ATTR_COLD; + void froggermc(machine_config &config) ATTR_COLD; + void froggeram(machine_config &config) ATTR_COLD; + void spactrai(machine_config &config) ATTR_COLD; + void takeoff(machine_config &config) ATTR_COLD; + void mooncrst(machine_config &config) ATTR_COLD; + void eagle(machine_config &config) ATTR_COLD; + void ckongs(machine_config &config) ATTR_COLD; + void frogf(machine_config &config) ATTR_COLD; + void amigo2(machine_config &config) ATTR_COLD; + void checkman(machine_config &config) ATTR_COLD; + void jungsub(machine_config &config) ATTR_COLD; + void victoryc(machine_config &config) ATTR_COLD; + void frogg(machine_config &config) ATTR_COLD; + void mandingarf(machine_config &config) ATTR_COLD; + void mandinka(machine_config &config) ATTR_COLD; + void thepitm(machine_config &config) ATTR_COLD; + void kong(machine_config &config) ATTR_COLD; + void bongo(machine_config &config) ATTR_COLD; + void bongog(machine_config &config) ATTR_COLD; + void scorpnmc(machine_config &config) ATTR_COLD; + void ckongg(machine_config &config) ATTR_COLD; + void ckongmc(machine_config &config) ATTR_COLD; + void astroamb(machine_config &config) ATTR_COLD; + void mimonkey(machine_config &config) ATTR_COLD; + void mimonscr(machine_config &config) ATTR_COLD; + void galartic(machine_config &config) ATTR_COLD; + void bigkonggx(machine_config &config) ATTR_COLD; + void scrammr(machine_config &config) ATTR_COLD; + void turpinnv(machine_config &config) ATTR_COLD; template <int Mask> ioport_value ckongg_coinage_r(); template <int Mask> int ckongs_coinage_r(); @@ -470,8 +471,8 @@ public: { } - void bagmanmc(machine_config &config); - void init_bagmanmc(); + void bagmanmc(machine_config &config) ATTR_COLD; + void init_bagmanmc() ATTR_COLD; protected: void bagmanmc_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x, uint8_t y); @@ -494,12 +495,12 @@ public: , m_rombank(*this, "rombank") { } - void gmgalax(machine_config &config); + void gmgalax(machine_config &config) ATTR_COLD; DECLARE_INPUT_CHANGED_MEMBER(game_changed); template <int N> ioport_value port_r(); - void init_gmgalax(); + void init_gmgalax() ATTR_COLD; protected: virtual void machine_start() override ATTR_COLD; @@ -524,11 +525,12 @@ public: { } - void pisces(machine_config &config); - void porter(machine_config &config); - void skybase(machine_config &config); + void ladybugg2(machine_config &config) ATTR_COLD; + void pisces(machine_config &config) ATTR_COLD; + void porter(machine_config &config) ATTR_COLD; + void skybase(machine_config &config) ATTR_COLD; - void init_pisces(); + void init_pisces() ATTR_COLD; protected: void pisces_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x, uint8_t y); @@ -538,6 +540,7 @@ private: void pisces_map(address_map &map) ATTR_COLD; void skybase_map(address_map &map) ATTR_COLD; void porter_map(address_map &map) ATTR_COLD; + void ladybugg2_opcodes_map (address_map &map) ATTR_COLD; }; @@ -550,8 +553,8 @@ public: { } - void fourplay(machine_config &config); - void init_fourplay(); + void fourplay(machine_config &config) ATTR_COLD; + void init_fourplay() ATTR_COLD; private: void fourplay_rombank_w(offs_t offset, uint8_t data); @@ -569,10 +572,10 @@ public: { } - void mshuttle(machine_config &config); + void mshuttle(machine_config &config) ATTR_COLD; - void init_mshuttle(); - void init_mshuttlj(); + void init_mshuttle() ATTR_COLD; + void init_mshuttlj() ATTR_COLD; protected: virtual void machine_start() override ATTR_COLD; @@ -606,7 +609,7 @@ public: int muxbit_r(); int noise_r(); - void kingball(machine_config &config); + void kingball(machine_config &config) ATTR_COLD; protected: virtual void machine_start() override ATTR_COLD; @@ -638,8 +641,8 @@ public: { } - void namenayo(machine_config &config); - void init_namenayo(); + void namenayo(machine_config &config) ATTR_COLD; + void init_namenayo() ATTR_COLD; private: void namenayo_draw_background(bitmap_rgb32 &bitmap, const rectangle &cliprect); @@ -665,9 +668,8 @@ public: DECLARE_INPUT_CHANGED_MEMBER(tenspot_fake); - void tenspot(machine_config &config); - - void init_tenspot(); + void tenspot(machine_config &config) ATTR_COLD; + void init_tenspot() ATTR_COLD; protected: virtual void machine_start() override ATTR_COLD; @@ -699,8 +701,8 @@ public: { } - void zigzag(machine_config &config); - void init_zigzag(); + void zigzag(machine_config &config) ATTR_COLD; + void init_zigzag() ATTR_COLD; protected: virtual void machine_start() override ATTR_COLD; @@ -724,8 +726,8 @@ public: { } - void videight(machine_config &config); - void init_videight(); + void videight(machine_config &config) ATTR_COLD; + void init_videight() ATTR_COLD; private: void videight_rombank_w(offs_t offset, uint8_t data); @@ -747,10 +749,10 @@ public: { } - void guttangt(machine_config &config); - void guttangts3(machine_config &config); - void init_guttangt(); - void init_guttangts3(); + void guttangt(machine_config &config) ATTR_COLD; + void guttangts3(machine_config &config) ATTR_COLD; + void init_guttangt() ATTR_COLD; + void init_guttangts3() ATTR_COLD; private: void guttangt_map(address_map &map) ATTR_COLD; @@ -770,8 +772,8 @@ public: { } - void scorpion(machine_config &config); - void init_scorpion(); + void scorpion(machine_config &config) ATTR_COLD; + void init_scorpion() ATTR_COLD; private: uint8_t ay8910_r(offs_t offset); @@ -799,9 +801,8 @@ public: { } - void sfx(machine_config &config); - - void init_sfx(); + void sfx(machine_config &config) ATTR_COLD; + void init_sfx() ATTR_COLD; protected: virtual void machine_start() override ATTR_COLD; @@ -834,8 +835,7 @@ public: } void monsterz(machine_config& config); - - void init_monsterz(); + void init_monsterz() ATTR_COLD; protected: virtual void machine_start() override ATTR_COLD; @@ -867,7 +867,7 @@ public: ioport_value dial_r(); - void moonwar(machine_config &config); + void moonwar(machine_config &config) ATTR_COLD; protected: virtual void machine_start() override ATTR_COLD; @@ -896,8 +896,8 @@ public: { } - void sbhoei(machine_config &config); - void init_sbhoei(); + void sbhoei(machine_config &config) ATTR_COLD; + void init_sbhoei() ATTR_COLD; void sbhoei_extend_tile_info(uint16_t *code, uint8_t *color, uint8_t attrib, uint8_t x, uint8_t y); void sbhoei_extend_sprite_info(const uint8_t *base, uint8_t *sx, uint8_t *sy, uint8_t *flipx, uint8_t *flipy, uint16_t *code, uint8_t *color); @@ -932,8 +932,8 @@ public: { } - void bmxstunts(machine_config &config); - void init_bmxstunts(); + void bmxstunts(machine_config &config) ATTR_COLD; + void init_bmxstunts() ATTR_COLD; void bmxstunts_extend_sprite_info(const uint8_t *base, uint8_t *sx, uint8_t *sy, uint8_t *flipx, uint8_t *flipy, uint16_t *code, uint8_t *color); private: diff --git a/src/mame/konami/rollerg.cpp b/src/mame/konami/rollerg.cpp index 2b003a5684c..5d8cfc21f88 100644 --- a/src/mame/konami/rollerg.cpp +++ b/src/mame/konami/rollerg.cpp @@ -54,7 +54,7 @@ public: m_zoomroms_view(*this, "zoomroms_view") { } - void rollerg(machine_config &config); + void rollerg(machine_config &config) ATTR_COLD; protected: virtual void machine_start() override ATTR_COLD; @@ -79,7 +79,6 @@ private: void sound_arm_nmi_w(uint8_t data); void z80_nmi_w(int state); uint8_t pip_r(); - void irq_ack_w(int state); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); K05324X_CB_MEMBER(sprite_callback); K051316_CB_MEMBER(zoom_callback); @@ -320,11 +319,6 @@ INPUT_PORTS_END ***************************************************************************/ -void rollerg_state::irq_ack_w(int state) -{ - m_maincpu->set_input_line(0, CLEAR_LINE); -} - void rollerg_state::machine_start() { uint8_t *ROM = memregion("maincpu")->base(); @@ -378,8 +372,8 @@ void rollerg_state::rollerg(machine_config &config) m_k051316->set_offsets(22, 1); m_k051316->set_zoom_callback(FUNC(rollerg_state::zoom_callback)); - k053252_device &k053252(K053252(config, "k053252", 3000000 * 2)); - k053252.int1_ack().set(FUNC(rollerg_state::irq_ack_w)); + k053252_device &k053252(K053252(config, "k053252", 3'000'000 * 2)); + k053252.int1_ack().set_inputline(m_maincpu, INPUT_LINE_IRQ0, CLEAR_LINE); k053252.set_offsets(14*8, 2*8); // sound hardware @@ -438,6 +432,25 @@ ROM_START( rollergj ) ROM_LOAD( "999h09.c5", 0x000000, 0x080000, CRC(c5188783) SHA1(d9ab69e4197ba2b42e3b0bb713236c8037fc2ab3) ) ROM_END +ROM_START( rollerga ) + ROM_REGION( 0x20000, "maincpu", 0 ) + ROM_LOAD( "g7", 0x00000, 0x20000, CRC(5475c39a) SHA1(7867173245c90b6196dd1c3618217735f81e963f) ) // blank label + + ROM_REGION( 0x10000, "audiocpu", 0 ) + ROM_LOAD( "e11", 0x0000, 0x8000, CRC(1fcfb22f) SHA1(ef058a7de6ba7cf310b91975345113acc6078f8a) ) // blank label + + ROM_REGION( 0x200000, "k053244", 0 ) // sprites + ROM_LOAD32_WORD( "999h06.k2", 0x000000, 0x100000, CRC(eda05130) SHA1(b52073a4a4651035d5f1e112601ceb2d004b2143) ) + ROM_LOAD32_WORD( "999h05.k8", 0x000002, 0x100000, CRC(5f321c7d) SHA1(d60a3480891b83ac109f2fecfe2b958bac310c15) ) + + ROM_REGION( 0x080000, "k051316", 0 ) // zoom + ROM_LOAD( "999h03.d23", 0x000000, 0x040000, CRC(ea1edbd2) SHA1(a17d19f873384287e1e47222d46274e7408b40d4) ) + ROM_LOAD( "999h04.f23", 0x040000, 0x040000, CRC(c1a35355) SHA1(615606d30500a8f2be19171893e985b085fff2fc) ) + + ROM_REGION( 0x80000, "k053260", 0 ) // samples + ROM_LOAD( "999h09.c5", 0x000000, 0x080000, CRC(c5188783) SHA1(d9ab69e4197ba2b42e3b0bb713236c8037fc2ab3) ) +ROM_END + } // anonymous namespace @@ -449,3 +462,4 @@ ROM_END GAME( 1991, rollerg, 0, rollerg, rollerg, rollerg_state, empty_init, ROT0, "Konami", "Rollergames (US)", MACHINE_SUPPORTS_SAVE ) GAME( 1991, rollergj, rollerg, rollerg, rollerg, rollerg_state, empty_init, ROT0, "Konami", "Rollergames (Japan)", MACHINE_SUPPORTS_SAVE ) +GAME( 1991, rollerga, rollerg, rollerg, rollerg, rollerg_state, empty_init, ROT0, "Konami", "Rollergames (Asia)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 2c3441fc434..659f86c2ac8 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -16859,6 +16859,7 @@ brkthru brkthrubl brkthruj brkthrut +brkthruu darwin forcebrk @@ -18690,15 +18691,27 @@ goldartp @source:gaelco/mastboy.cpp mastboy mastboya +mastboyb +mastboyc mastboyi mastboyia +mastboyib +mastboyic +mastboyiol +mastboyitst mastboyiv2 +mastboyiv2a +mastboyol +mastboyola +mastboyv2 +mastboyv2a @source:gaelco/mastboyo.cpp mastboyo mastboyoa mastboyob mastboyoc +mastboyod @source:gaelco/radikaldarts.cpp radikaldrt @@ -18889,6 +18902,7 @@ kingballj komemokos kong ladybugg +ladybugg2 levers losttomb losttombh @@ -25075,6 +25089,7 @@ ropeman @source:konami/rollerg.cpp rollerg +rollerga rollergj @source:konami/rungun.cpp @@ -42659,10 +42674,10 @@ boo1000 @source:skeleton/boramz80.cpp pkboram pkrboram +pkts tpkboram tpkborama tpkg2 -unkboram @source:skeleton/bpmmicro.cpp bp1200 diff --git a/src/mame/misc/gms.cpp b/src/mame/misc/gms.cpp index 1ec7172a253..50ad5cd4c23 100644 --- a/src/mame/misc/gms.cpp +++ b/src/mame/misc/gms.cpp @@ -64,24 +64,22 @@ Notes: B1/M1 - 26C1000 / 27C1001 (PRG/data for 89C51?) S1 - 27C2000 / 232000 mask ROM (OKI samples) -Hold service credit (9) and reset (F3) to enter service mode. - +Hold test (F2) and press reset (F3) to enter service mode. TODO: -- work out how flip flop input is read in mahjong games in mahjong keyboard mode -- work out how payout/key-out input is read in mahjong games in mahjong keyboard mode -- work out how payout/key-out input is read in mahjong games in joystick mode -- correct EEPROM hookup for all games (this would get rid of a lot of ROM patches) +- work out how Flip Flop input is read in mahjong games in mahjong keyboard mode +- in baile, Payout key doesn't work in mahjong keyboard mode (input test + recognises it as both Payout and Flip Flop) +- correct EEPROM hookup for all games (this would get rid of a lot of ROM + patches) - hookup MCU and YM2151 / YM3812 sound for the mahjong games - hookup PIC16F84 for rbspm - emulate protection devices correctly instead of patching - hookup lamps and do layouts -- use real values for reel tilemaps offsets instead of hardcoded ones (would fix magslot) -- complete inputs for baile, yyhm, jinpaish, ssanguoj, cjdlz (needs someone who understands - Chinese and knows how to play) -- game logic seems broken in mahjong games (reach permitted when it shouldn't be, chi not - permitted when it should be, other issues) -- game logic in baile seems broken (you always win), maybe due to the patches? +- use real values for reel tilemaps offsets instead of hardcoded ones (would fix + magslot) +- game logic seems broken in mahjong games (Reach permitted when it shouldn't + be, Chi not permitted when it should be, other issues) - broken title GFX in yyhm (transparent pen problem?) - the newer games seem to use range 0x9e1000-0x9e1fff during gameplay @@ -97,6 +95,7 @@ super555: https://www.youtube.com/watch?v=CCUKdbQ5O-U #include "cpu/mcs51/mcs51.h" #include "cpu/pic16x8x/pic16x8x.h" #include "machine/eepromser.h" +#include "machine/ticket.h" #include "sound/okim6295.h" #include "sound/ymopl.h" #include "sound/ymopm.h" @@ -134,6 +133,7 @@ public: , m_palette(*this, "palette") , m_oki(*this, "oki") , m_ymsnd(*this, "ymsnd") + , m_counters(*this, "COUNTERS") , m_dsw(*this, "DSW%u", 1U) , m_key(*this, "KEY%u", 0U) { @@ -156,6 +156,7 @@ public: void init_super555() ATTR_COLD; template <unsigned Shift> ioport_value keyboard_r(); + template <unsigned N> void counter_w(int state); protected: virtual void video_start() override ATTR_COLD; @@ -171,6 +172,8 @@ protected: required_device<palette_device> m_palette; required_device<okim6295_device> m_oki; optional_device<ym2151_device> m_ymsnd; + + required_ioport m_counters; optional_ioport_array<4> m_dsw; optional_ioport_array<5> m_key; @@ -195,7 +198,7 @@ private: void ssanguoj_mem(address_map &map) ATTR_COLD; uint16_t unk_r(); - uint16_t input_matrix_r(); + uint16_t dipsw_matrix_r(); void input_matrix_w(uint16_t data); void tilebank_w(uint16_t data); void reels_toggle_w(uint16_t data); @@ -237,7 +240,7 @@ template <unsigned Shift> ioport_value gms_2layers_state::keyboard_r() { unsigned const select = bitswap<5>(m_input_matrix, 6, 1, 5, 0, 4); - ioport_value result = 0x3f; + ioport_value result = 0x7f; for (unsigned i = 0; 5 > i; ++i) { if (BIT(select, i)) @@ -246,21 +249,29 @@ ioport_value gms_2layers_state::keyboard_r() return result >> Shift; } +template <unsigned N> +void gms_2layers_state::counter_w(int state) +{ + machine().bookkeeping().coin_counter_w(N, state); +} + uint16_t gms_2layers_state::unk_r() { return machine().rand(); } -uint16_t gms_2layers_state::input_matrix_r() +uint16_t gms_2layers_state::dipsw_matrix_r() { - uint16_t res = 0xffff; + uint16_t result = 0xffff; - // TODO: & 0x00ff are the inputs for keyboard mode in rbmk - if (m_input_matrix & 0x1000) res &= m_dsw[0]->read(); - if (m_input_matrix & 0x2000) res &= m_dsw[1].read_safe(0xffff); - if (m_input_matrix & 0x4000) res &= m_dsw[2].read_safe(0xffff); + if (m_input_matrix & 0x1000) + result &= m_dsw[0]->read(); + if (m_input_matrix & 0x2000) + result &= m_dsw[1].read_safe(0xffff); + if (m_input_matrix & 0x4000) + result &= m_dsw[2].read_safe(0xffff); - return res; + return result; } void gms_2layers_state::tilebank_w(uint16_t data) @@ -307,6 +318,8 @@ void gms_2layers_state::reelram_w(offs_t offset, uint16_t data, uint16_t mem_mas void gms_2layers_state::input_matrix_w(uint16_t data) { + m_counters->write(data); + m_input_matrix = data & 0x7fff; m_oki->set_rom_bank(BIT(data, 15)); @@ -314,13 +327,11 @@ void gms_2layers_state::input_matrix_w(uint16_t data) void gms_2layers_state::eeprom_w(offs_t offset, uint16_t data, uint16_t mem_mask) { - // bad ? if (ACCESSING_BITS_0_7) { - m_eeprom->di_write((data & 0x04) >> 2); - m_eeprom->cs_write((data & 0x01) ? ASSERT_LINE : CLEAR_LINE); - - m_eeprom->clk_write((data & 0x02) ? ASSERT_LINE : CLEAR_LINE); + m_eeprom->cs_write(BIT(data, 0)); + m_eeprom->clk_write(BIT(data, 1)); + m_eeprom->di_write(BIT(data, 2)); } } @@ -343,7 +354,7 @@ void gms_2layers_state::rbmk_mem(address_map &map) map(0x980380, 0x9803ff).ram().share(m_scrolly[3]); map(0x9c0000, 0x9c0fff).ram().w(FUNC(gms_2layers_state::vram_w<0>)).share(m_vidram[0]); map(0xb00000, 0xb00001).w(FUNC(gms_2layers_state::eeprom_w)); - map(0xc00000, 0xc00001).rw(FUNC(gms_2layers_state::input_matrix_r), FUNC(gms_2layers_state::input_matrix_w)); + map(0xc00000, 0xc00001).rw(FUNC(gms_2layers_state::dipsw_matrix_r), FUNC(gms_2layers_state::input_matrix_w)); map(0xc08000, 0xc08001).portr("IN1").w(FUNC(gms_2layers_state::tilebank_w)); map(0xc10000, 0xc10001).portr("IN2"); map(0xc18080, 0xc18081).r(FUNC(gms_2layers_state::unk_r)); // TODO: from MCU? @@ -356,7 +367,7 @@ void gms_2layers_state::rbspm_mem(address_map &map) { map(0x000000, 0x07ffff).rom(); map(0x200000, 0x200001).w(FUNC(gms_2layers_state::reels_toggle_w)); - map(0x300000, 0x300001).rw(FUNC(gms_2layers_state::input_matrix_r), FUNC(gms_2layers_state::input_matrix_w)); + map(0x300000, 0x300001).rw(FUNC(gms_2layers_state::dipsw_matrix_r), FUNC(gms_2layers_state::input_matrix_w)); map(0x308000, 0x308001).portr("IN1").w(FUNC(gms_2layers_state::tilebank_w)); // ok map(0x310000, 0x310001).portr("IN2"); map(0x318080, 0x318081).r(FUNC(gms_2layers_state::unk_r)); @@ -394,7 +405,7 @@ void gms_2layers_state::ssanguoj_mem(address_map &map) map(0x980300, 0x98037f).ram().share(m_scrolly[2]); map(0x980380, 0x9803ff).ram().share(m_scrolly[3]); map(0x9c0000, 0x9c0fff).ram().w(FUNC(gms_2layers_state::vram_w<0>)).share(m_vidram[0]); - map(0xa00000, 0xa00001).rw(FUNC(gms_2layers_state::input_matrix_r), FUNC(gms_2layers_state::input_matrix_w)); + map(0xa00000, 0xa00001).rw(FUNC(gms_2layers_state::dipsw_matrix_r), FUNC(gms_2layers_state::input_matrix_w)); map(0xa08000, 0xa08001).portr("IN1").w(FUNC(gms_2layers_state::tilebank_w)); map(0xa10000, 0xa10001).portr("IN2"); map(0xa18080, 0xa18081).r(FUNC(gms_2layers_state::unk_r)); // TODO: from MCU? @@ -409,7 +420,7 @@ void gms_2layers_state::super555_mem(address_map &map) map(0x000000, 0x07ffff).rom(); map(0x100000, 0x10ffff).ram(); map(0x300000, 0x300001).w(FUNC(gms_2layers_state::reels_toggle_w)); - map(0x600000, 0x600001).rw(FUNC(gms_2layers_state::input_matrix_r), FUNC(gms_2layers_state::input_matrix_w)); + map(0x600000, 0x600001).rw(FUNC(gms_2layers_state::dipsw_matrix_r), FUNC(gms_2layers_state::input_matrix_w)); map(0x608000, 0x608001).portr("IN1").w(FUNC(gms_2layers_state::tilebank_w)); // ok map(0x610000, 0x610001).portr("IN2"); map(0x618080, 0x618081).nopr();//.lr16(NAME([this] () -> uint16_t { return m_prot_data; })); // reads something here from below, if these are hooked up booting stops with '0x09 U64 ERROR', like it's failing some checksum test @@ -479,70 +490,97 @@ void gms_2layers_state::mcu_io(address_map &map) } -#define GMS_MAHJONG_COMMON(dsw_port, dsw_bit, dsw_on) \ +#define GMS_MAHJONG_KEYBOARD(dsw_port, dsw_bit, dsw_on) \ + PORT_START("COUNTERS") \ + PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) PORT_WRITE_LINE_MEMBER(FUNC(gms_2layers_state::counter_w<3>)) /* key-out */ \ + PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) PORT_WRITE_LINE_MEMBER(FUNC(gms_2layers_state::counter_w<0>)) /* coin in */ \ + PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) PORT_WRITE_LINE_MEMBER(FUNC(gms_2layers_state::counter_w<2>)) /* coin out */ \ + PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) PORT_WRITE_LINE_DEVICE_MEMBER("hopper", FUNC(hopper_device::motor_w)) \ + PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) PORT_WRITE_LINE_MEMBER(FUNC(gms_2layers_state::counter_w<1>)) /* key-in */ \ + PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) PORT_WRITE_LINE_MEMBER(FUNC(gms_2layers_state::counter_w<1>)) /* key-in */ \ + PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) PORT_WRITE_LINE_MEMBER(FUNC(gms_2layers_state::counter_w<0>)) /* coin in */ \ + PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) PORT_WRITE_LINE_DEVICE_MEMBER("hopper", FUNC(hopper_device::motor_w)) \ + PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) PORT_WRITE_LINE_MEMBER(FUNC(gms_2layers_state::counter_w<3>)) /* key-out */ \ + PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) PORT_WRITE_LINE_MEMBER(FUNC(gms_2layers_state::counter_w<2>)) /* coin out */ \ PORT_START("IN1") \ PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ - PORT_SERVICE_NO_TOGGLE(0x02, IP_ACTIVE_LOW) \ + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR(Test)) \ PORT_BIT( 0x00fc, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ - PORT_BIT( 0x0c00, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ - PORT_BIT( 0xf000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) PORT_CUSTOM_MEMBER(FUNC(gms_3layers_state::keyboard_r<0>)) \ + PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ + PORT_BIT( 0xf800, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) PORT_CUSTOM_MEMBER(FUNC(gms_2layers_state::keyboard_r<0>)) \ PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \ - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \ - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \ - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \ - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \ - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \ - PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \ - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \ - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \ PORT_START("IN2") \ - PORT_BIT( 0x0003, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) PORT_CUSTOM_MEMBER(FUNC(gms_3layers_state::keyboard_r<4>)) \ + PORT_BIT( 0x0003, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) PORT_CUSTOM_MEMBER(FUNC(gms_2layers_state::keyboard_r<5>)) \ PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(hopper_device::line_r)) \ + PORT_BIT( 0x1ff0, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \ PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \ PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \ + PORT_BIT( 0x00f8, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \ + PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \ + PORT_BIT( 0x0600, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \ + PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \ + PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(hopper_device::line_r)) \ PORT_START("KEY0") \ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_M ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_I ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_E ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_A ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ - PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_M ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_I ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_E ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_MAHJONG_A ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ + PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \ PORT_START("KEY1") \ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_N ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_J ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_F ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_B ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ - PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_REACH ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_N ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_J ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_F ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_MAHJONG_B ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ + PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \ PORT_START("KEY2") \ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_K ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_G ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_C ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ - PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \ + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_K ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_G ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_MAHJONG_C ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ + PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \ PORT_START("KEY3") \ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_L ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_H ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_D ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ - PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \ - PORT_START("KEY4") \ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_BIG ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_LAST_CHANCE ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ - PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_PON ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_L ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_H ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_MAHJONG_D ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ + PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \ + PORT_START("KEY4") \ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) /* newer games show this as both Flip Flop and Payout in input test */ \ + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_BIG ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_MAHJONG_LAST_CHANCE ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, dsw_on) \ + PORT_BIT( 0x7f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) + +#define GMS_MAHJONG_COMMON(dsw_port, dsw_bit, dsw_on) \ + GMS_MAHJONG_KEYBOARD(dsw_port, dsw_bit, dsw_on) \ + PORT_MODIFY("IN1") \ + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \ + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \ + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \ + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \ + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \ + PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \ + PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) \ + PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CONDITION(dsw_port, dsw_bit, NOTEQUALS, dsw_on) #define GMS_MAHJONG_COINAGE(tag, loc) \ PORT_DIPNAME( 0x0007, 0x0000, DEF_STR(Coinage) ) PORT_DIPLOCATION(loc ":1,2,3") /* 投幣比例 */ \ @@ -601,22 +639,12 @@ static INPUT_PORTS_START( rbmk ) PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x0080, EQUALS, 0x0080) PORT_MODIFY("IN2") // 16bit - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", FUNC(eeprom_serial_93cxx_device::do_read)) // Only 4 DIP banks are actually populated on PCBs (2 empty spaces), but test mode reads all 6. - // Dips based on manuals for both rbmk and rbspm + // DIPs based on manuals for both rbmk and rbspm PORT_START("DSW1") // 16bit, in test mode first 8 are recognized as dsw1, second 8 as dsw4. PORT_DIPNAME( 0x0007, 0x0000, "Pay Out Rate" ) PORT_DIPLOCATION("DSW1:1,2,3") PORT_DIPSETTING( 0x0000, "70%" ) @@ -764,24 +792,14 @@ static INPUT_PORTS_START( ssanguoj ) GMS_MAHJONG_COMMON("DSW1", 0x0080, 0x0000) PORT_MODIFY("IN1") // 16bit - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x0080, EQUALS, 0x0080) - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x0080, EQUALS, 0x0080) - PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x0080, EQUALS, 0x0080) - PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x0080, EQUALS, 0x0080) - PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x0080, EQUALS, 0x0080) - PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x0080, EQUALS, 0x0080) + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x0080, NOTEQUALS, 0x0000) + PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x0080, NOTEQUALS, 0x0000) + PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x0080, NOTEQUALS, 0x0000) + PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x0080, NOTEQUALS, 0x0000) + PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x0080, NOTEQUALS, 0x0000) + PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x0080, NOTEQUALS, 0x0000) PORT_MODIFY("IN2") // 16bit - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", FUNC(eeprom_serial_93cxx_device::do_read)) @@ -927,6 +945,13 @@ INPUT_PORTS_END static INPUT_PORTS_START( magslot ) + PORT_START("COUNTERS") + PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_MEMBER(FUNC(gms_2layers_state::counter_w<1>)) // key-in + PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_MEMBER(FUNC(gms_2layers_state::counter_w<0>)) // coin in + PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("hopper", FUNC(hopper_device::motor_w)) + PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_MEMBER(FUNC(gms_2layers_state::counter_w<3>)) // key-out + PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_MEMBER(FUNC(gms_2layers_state::counter_w<2>)) // coin out + PORT_START("IN1") PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_SERVICE1 ) @@ -1045,15 +1070,22 @@ INPUT_PORTS_END static INPUT_PORTS_START( super555 ) + PORT_START("COUNTERS") + PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_MEMBER(FUNC(gms_2layers_state::counter_w<1>)) // key-in + PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_MEMBER(FUNC(gms_2layers_state::counter_w<0>)) // coin in + PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("hopper", FUNC(hopper_device::motor_w)) + PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_MEMBER(FUNC(gms_2layers_state::counter_w<3>)) // key-out + PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_MEMBER(FUNC(gms_2layers_state::counter_w<2>)) // coin out + PORT_START("IN1") PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_SERVICE_NO_TOGGLE(0x02, IP_ACTIVE_LOW) PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME( "Start / Take" ) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) PORT_NAME( "Hold 2 / Double Up" ) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME( "Paytable" ) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME( "Hold 1 / Double Up / Big" ) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) PORT_NAME( "Hold 3 / Double Up / Small" ) + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Start / Take Score") + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) PORT_NAME(u8"Hold 2 / Double Up × 1") + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) PORT_NAME("Show Odds") + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME(u8"Hold 1 / Double Up × 2 / Big") + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) PORT_NAME(u8"Hold 3 / Double Up × ½ / Small") PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) @@ -1066,17 +1098,17 @@ static INPUT_PORTS_START( super555 ) PORT_START("IN2") PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN2 ) + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BILL1 ) PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) + PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(hopper_device::line_r)) PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -1168,69 +1200,69 @@ static INPUT_PORTS_START( super555 ) INPUT_PORTS_END static INPUT_PORTS_START( sscs ) - PORT_START("IN1") // TODO: PORT_NAMEs are machine translated, should be checked and adapted - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_SERVICE_NO_TOGGLE(0x02, IP_ACTIVE_LOW) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME( "Open card" ) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME( "1 key" ) // also used for up in the 'secret' test mode - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON6 ) // used for down in the 'secret' test mode - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) - PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME( "Abandon" ) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME( "Look at the card" ) - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + // Mahjong keyboard controls: + // A Raise × 1 Double Up × 2 Big down in bookkeeping + // C Raise × 5 Double Up × 1 up in bookkeeping + // E Raise × 10 Double Up × ½ Small + // K Big + // M Small + // N Deal Call Take Score + // Kan Showdown + // Chi Fold + // Ron View Hole Card + // Take Score Double Up × 2 Big + // Double Up Double Up × 1 + // Big Double Up × ½ Small + // Small Take Score + GMS_MAHJONG_KEYBOARD("DSW2", 0x80, 0x80) - PORT_START("IN2") - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_MODIFY("IN1") + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x80, NOTEQUALS, 0x80) + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Showdown / Take Score") PORT_CONDITION("DSW2", 0x80, NOTEQUALS, 0x80) // 開牌鍵 + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME(u8"Raise × 5 / Double Up × 1") PORT_CONDITION("DSW2", 0x80, NOTEQUALS, 0x80) // ×5 (up in bookkeeping, up in test mode) + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_CONDITION("DSW2", 0x80, NOTEQUALS, 0x80) // (down in test mode) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME(u8"Raise × 1 / Double Up × 2 / Big") PORT_CONDITION("DSW2", 0x80, NOTEQUALS, 0x80) // ×1 (down in bookkeeping) + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME(u8"Raise × 10 / Double Up × ½ / Small") PORT_CONDITION("DSW2", 0x80, NOTEQUALS, 0x80) // 加押 + PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Call / Bet / Take Score") PORT_CONDITION("DSW2", 0x80, NOTEQUALS, 0x80) // 跟/押鍵 + PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Fold") PORT_CONDITION("DSW2", 0x80, NOTEQUALS, 0x80) // 放棄 + PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("View Hole Card") PORT_CONDITION("DSW2", 0x80, NOTEQUALS, 0x80) // 看牌 (select in test mode) + PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x80, NOTEQUALS, 0x80) + PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x80, NOTEQUALS, 0x80) + PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x80, NOTEQUALS, 0x80) + PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x80, NOTEQUALS, 0x80) + PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x80, NOTEQUALS, 0x80) + + PORT_MODIFY("IN2") PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) //PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", FUNC(eeprom_serial_93cxx_device::do_read)) // TODO: verify - // There are 4 banks of 8 DIP switches on PCB, but only 3 are shown in test mode. // DIP switch settings as per test mode. 'Secret' test mode shows all 4 banks. PORT_START("DSW1") - PORT_DIPNAME( 0x0003, 0x0000, "Main Game Pay Out Rate" ) PORT_DIPLOCATION("SW1:1,2") // 主遊戲機率 - PORT_DIPSETTING( 0x0003, DEF_STR( Easy ) ) // 易 - PORT_DIPSETTING( 0x0000, DEF_STR( Normal ) ) // 中 - PORT_DIPSETTING( 0x0002, DEF_STR( Hard ) ) // 難 - PORT_DIPSETTING( 0x0001, DEF_STR( Hardest ) ) // 最難 - PORT_DIPNAME( 0x000c, 0x0000, "Double-Up Game Pay Out Rate" ) PORT_DIPLOCATION("SW1:3,4") // 比倍遊戲機率 - disabled if SW1:5 is off - PORT_DIPSETTING( 0x000c, DEF_STR( Easy ) ) // 易 - PORT_DIPSETTING( 0x0000, DEF_STR( Normal ) ) // 中 - PORT_DIPSETTING( 0x0008, DEF_STR( Hard ) ) // 難 - PORT_DIPSETTING( 0x0004, DEF_STR( Hardest ) ) // 最難 - PORT_DIPNAME( 0x0010, 0x0000, "Double-Up On/Off" ) PORT_DIPLOCATION("SW1:5") // 比倍有無 - PORT_DIPSETTING( 0x0010, DEF_STR( Off ) ) // 無 - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) // 有 - PORT_DIPNAME( 0x0020, 0x0000, "Double-Up Nudity" ) PORT_DIPLOCATION("SW1:6") // 比倍脫衣 - disabled if SW1:5 is off - PORT_DIPSETTING( 0x0000, DEF_STR( Normal ) ) // 正常 - PORT_DIPSETTING( 0x0020, "Nudity" ) // 脫衣 - PORT_DIPNAME( 0x0040, 0x0000, "Double-Up Win Points" ) PORT_DIPLOCATION("SW1:7") // 比倍爆機分數 - disabled if SW1:5 is off + PORT_DIPNAME( 0x0003, 0x0000, "Main Game Payout Rate" ) PORT_DIPLOCATION("SW1:1,2") // 主遊戲機率 + PORT_DIPSETTING( 0x0003, DEF_STR(Easy) ) // 易 + PORT_DIPSETTING( 0x0000, DEF_STR(Normal) ) // 中 + PORT_DIPSETTING( 0x0002, DEF_STR(Hard) ) // 難 + PORT_DIPSETTING( 0x0001, DEF_STR(Hardest) ) // 最難 + PORT_DIPNAME( 0x000c, 0x0000, "Double Up Game Payout Rate" ) PORT_DIPLOCATION("SW1:3,4") // 比倍遊戲機率 (disabled if SW1:5 is off) + PORT_DIPSETTING( 0x000c, DEF_STR(Easy) ) // 易 + PORT_DIPSETTING( 0x0000, DEF_STR(Normal) ) // 中 + PORT_DIPSETTING( 0x0008, DEF_STR(Hard) ) // 難 + PORT_DIPSETTING( 0x0004, DEF_STR(Hardest) ) // 最難 + PORT_DIPNAME( 0x0010, 0x0000, "Double Up Game" ) PORT_DIPLOCATION("SW1:5") // 比倍有無 + PORT_DIPSETTING( 0x0010, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x0020, 0x0000, "Double Up Game Nudity" ) PORT_DIPLOCATION("SW1:6") // 比倍脫衣 (disabled if SW1:5 is off) + PORT_DIPSETTING( 0x0000, DEF_STR(Off) ) // 正常 + PORT_DIPSETTING( 0x0020, DEF_STR(On) ) // 脫衣 + PORT_DIPNAME( 0x0040, 0x0000, "Double Up Game Jackpot" ) PORT_DIPLOCATION("SW1:7") // 比倍爆機分數 (disabled if SW1:5 is off) PORT_DIPSETTING( 0x0000, "10,000" ) PORT_DIPSETTING( 0x0040, "30,000" ) - PORT_DIPNAME( 0x0080, 0x0000, "Main Game Background Music") PORT_DIPLOCATION("SW1:8") // 主遊戲背景音樂 - PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) // 無 - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) // 有 + PORT_DIPNAME( 0x0080, 0x0000, "Main Game Background Music" ) PORT_DIPLOCATION("SW1:8") // 主遊戲背景音樂 + PORT_DIPSETTING( 0x0080, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) // 有 PORT_DIPUNKNOWN_DIPLOC( 0x0100, 0x0000, "SW4:1" ) PORT_DIPUNKNOWN_DIPLOC( 0x0200, 0x0000, "SW4:2" ) PORT_DIPUNKNOWN_DIPLOC( 0x0400, 0x0000, "SW4:3" ) @@ -1241,55 +1273,92 @@ static INPUT_PORTS_START( sscs ) PORT_DIPUNKNOWN_DIPLOC( 0x8000, 0x0000, "SW4:8" ) PORT_START("DSW2") - PORT_DIPNAME( 0x0007, 0x0000, "Coin Rate" ) PORT_DIPLOCATION("SW2:1,2,3") // 投幣比例 - PORT_DIPSETTING( 0x0001, "5" ) - PORT_DIPSETTING( 0x0002, "10" ) - PORT_DIPSETTING( 0x0003, "20" ) - PORT_DIPSETTING( 0x0004, "30" ) - PORT_DIPSETTING( 0x0000, "50" ) - PORT_DIPSETTING( 0x0005, "100" ) - PORT_DIPSETTING( 0x0006, "200" ) - PORT_DIPSETTING( 0x0007, "300" ) - PORT_DIPNAME( 0x0018, 0x0000, "Coin Rate x Key In Multiplier" ) PORT_DIPLOCATION("SW2:4,5") // 投幣比例x開分倍率 - Key In rate as a multiple of coin rate - PORT_DIPSETTING( 0x0000, "2" ) - PORT_DIPSETTING( 0x0008, "5" ) - PORT_DIPSETTING( 0x0010, "10" ) - PORT_DIPSETTING( 0x0018, "20" ) - PORT_DIPNAME( 0x0020, 0x0000, "Show Title" ) PORT_DIPLOCATION("SW2:6") // 片頭名稱 - PORT_DIPSETTING( 0x0020, DEF_STR( Off ) ) // 無 - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) // 有 - PORT_DIPNAME( 0x0040, 0x0000, "Double-Up Win Points Method" ) PORT_DIPLOCATION("SW2:7") // 比倍爆機得分方式 - PORT_DIPSETTING( 0x0000, "By Key Out" ) // 按洗分键 - PORT_DIPSETTING( 0x0040, "By Pressing Button" ) // 按得键 - PORT_DIPNAME( 0x0080, 0x0000, "Control Panel" ) PORT_DIPLOCATION("SW2:8") // 操作介面 - PORT_DIPSETTING( 0x0000, "Amusement/Poker Panel" ) // 娛樂/撲克介面 - PORT_DIPSETTING( 0x0080, "Mahjong Panel" ) // 麻將介面 + PORT_DIPNAME( 0x0007, 0x0000, DEF_STR(Coinage) ) PORT_DIPLOCATION("SW2:1,2,3") // 投幣比例 + PORT_DIPSETTING( 0x0001, DEF_STR(1C_5C) ) + PORT_DIPSETTING( 0x0002, "1 Coin/10 Credits" ) + PORT_DIPSETTING( 0x0003, "1 Coin/20 Credits" ) + PORT_DIPSETTING( 0x0004, "1 Coin/30 Credits" ) + PORT_DIPSETTING( 0x0000, "1 Coin/50 Credits" ) + PORT_DIPSETTING( 0x0005, "1 Coin/100 Credits" ) + PORT_DIPSETTING( 0x0006, "1 Coin/200 Credits" ) + PORT_DIPSETTING( 0x0007, "1 Coin/300 Credits" ) + PORT_DIPNAME( 0x0018, 0x0000, "Key-In Rate" ) PORT_DIPLOCATION("SW2:4,5") // 投幣比例×開分倍率 (Key-In rate as a multiple of coin rate) + PORT_DIPSETTING( 0x0018, "10" ) PORT_CONDITION("DSW2", 0x0007, EQUALS, 0x0001) + PORT_DIPSETTING( 0x0000, "25" ) PORT_CONDITION("DSW2", 0x0007, EQUALS, 0x0001) + PORT_DIPSETTING( 0x0008, "50" ) PORT_CONDITION("DSW2", 0x0007, EQUALS, 0x0001) + PORT_DIPSETTING( 0x0010, "100" ) PORT_CONDITION("DSW2", 0x0007, EQUALS, 0x0001) + PORT_DIPSETTING( 0x0018, "20" ) PORT_CONDITION("DSW2", 0x0007, EQUALS, 0x0002) + PORT_DIPSETTING( 0x0000, "50" ) PORT_CONDITION("DSW2", 0x0007, EQUALS, 0x0002) + PORT_DIPSETTING( 0x0008, "100" ) PORT_CONDITION("DSW2", 0x0007, EQUALS, 0x0002) + PORT_DIPSETTING( 0x0010, "200" ) PORT_CONDITION("DSW2", 0x0007, EQUALS, 0x0002) + PORT_DIPSETTING( 0x0018, "40" ) PORT_CONDITION("DSW2", 0x0007, EQUALS, 0x0003) + PORT_DIPSETTING( 0x0000, "100" ) PORT_CONDITION("DSW2", 0x0007, EQUALS, 0x0003) + PORT_DIPSETTING( 0x0008, "200" ) PORT_CONDITION("DSW2", 0x0007, EQUALS, 0x0003) + PORT_DIPSETTING( 0x0010, "400" ) PORT_CONDITION("DSW2", 0x0007, EQUALS, 0x0003) + PORT_DIPSETTING( 0x0018, "60" ) PORT_CONDITION("DSW2", 0x0007, EQUALS, 0x0004) + PORT_DIPSETTING( 0x0000, "150" ) PORT_CONDITION("DSW2", 0x0007, EQUALS, 0x0004) + PORT_DIPSETTING( 0x0008, "300" ) PORT_CONDITION("DSW2", 0x0007, EQUALS, 0x0004) + PORT_DIPSETTING( 0x0010, "600" ) PORT_CONDITION("DSW2", 0x0007, EQUALS, 0x0004) + PORT_DIPSETTING( 0x0018, "100" ) PORT_CONDITION("DSW2", 0x0007, EQUALS, 0x0000) + PORT_DIPSETTING( 0x0000, "250" ) PORT_CONDITION("DSW2", 0x0007, EQUALS, 0x0000) + PORT_DIPSETTING( 0x0008, "500" ) PORT_CONDITION("DSW2", 0x0007, EQUALS, 0x0000) + PORT_DIPSETTING( 0x0010, "1000" ) PORT_CONDITION("DSW2", 0x0007, EQUALS, 0x0000) + PORT_DIPSETTING( 0x0018, "200" ) PORT_CONDITION("DSW2", 0x0007, EQUALS, 0x0005) + PORT_DIPSETTING( 0x0000, "500" ) PORT_CONDITION("DSW2", 0x0007, EQUALS, 0x0005) + PORT_DIPSETTING( 0x0008, "1000" ) PORT_CONDITION("DSW2", 0x0007, EQUALS, 0x0005) + PORT_DIPSETTING( 0x0010, "2000" ) PORT_CONDITION("DSW2", 0x0007, EQUALS, 0x0005) + PORT_DIPSETTING( 0x0018, "400" ) PORT_CONDITION("DSW2", 0x0007, EQUALS, 0x0006) + PORT_DIPSETTING( 0x0000, "1000" ) PORT_CONDITION("DSW2", 0x0007, EQUALS, 0x0006) + PORT_DIPSETTING( 0x0008, "2000" ) PORT_CONDITION("DSW2", 0x0007, EQUALS, 0x0006) + PORT_DIPSETTING( 0x0010, "4000" ) PORT_CONDITION("DSW2", 0x0007, EQUALS, 0x0006) + PORT_DIPSETTING( 0x0018, "600" ) PORT_CONDITION("DSW2", 0x0007, EQUALS, 0x0007) + PORT_DIPSETTING( 0x0000, "1500" ) PORT_CONDITION("DSW2", 0x0007, EQUALS, 0x0007) + PORT_DIPSETTING( 0x0008, "3000" ) PORT_CONDITION("DSW2", 0x0007, EQUALS, 0x0007) + PORT_DIPSETTING( 0x0010, "6000" ) PORT_CONDITION("DSW2", 0x0007, EQUALS, 0x0007) + PORT_DIPNAME( 0x0020, 0x0000, "Show Title" ) PORT_DIPLOCATION("SW2:6") // 片頭名稱 + PORT_DIPSETTING( 0x0020, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x0040, 0x0000, "Double Up Jackpot Mode" ) PORT_DIPLOCATION("SW2:7") // 比倍爆機得分方式 + PORT_DIPSETTING( 0x0000, "By Key-Out" ) // 按洗分键 + PORT_DIPSETTING( 0x0040, "By Pressing Button" ) // 按得键 + PORT_DIPNAME( 0x0080, 0x0000, DEF_STR(Controls) ) PORT_DIPLOCATION("SW2:8") // 操作介面 + PORT_DIPSETTING( 0x0000, "Amusement/Poker" ) // 娛樂/撲克介面 + PORT_DIPSETTING( 0x0080, "Mahjong" ) // 麻將介面 + PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("DSW3") - PORT_DIPNAME( 0x0003, 0x0000, "Ante Points" ) PORT_DIPLOCATION("SW3:1,2") // 底注分數 + PORT_DIPNAME( 0x0003, 0x0000, "Ante Points" ) PORT_DIPLOCATION("SW3:1,2") // 底注分數 PORT_DIPSETTING( 0x0000, "10" ) PORT_DIPSETTING( 0x0001, "20" ) PORT_DIPSETTING( 0x0002, "50" ) PORT_DIPSETTING( 0x0003, "80" ) - PORT_DIPNAME( 0x000c, 0x0000, "Main Game Win Points" ) PORT_DIPLOCATION("SW3:3,4") // 主遊戲爆機分數 + PORT_DIPNAME( 0x000c, 0x0000, "Main Game Jackpot" ) PORT_DIPLOCATION("SW3:3,4") // 主遊戲爆機分數 PORT_DIPSETTING( 0x0004, "10,000" ) PORT_DIPSETTING( 0x0000, "20,000" ) PORT_DIPSETTING( 0x0008, "50,000" ) PORT_DIPSETTING( 0x000c, "100.000" ) - PORT_DIPNAME( 0x0010, 0x0000, "Score Upper Limit" ) PORT_DIPLOCATION("SW3:5") // 進分上限 + PORT_DIPNAME( 0x0010, 0x0000, "Credit Limit" ) PORT_DIPLOCATION("SW3:5") // 進分上限 PORT_DIPSETTING( 0x0000, "10,000" ) PORT_DIPSETTING( 0x0010, "20,000" ) - PORT_DIPNAME( 0x0020, 0x0000, "Mahjong Numbers" ) PORT_DIPLOCATION("SW3:6") // 麻將數字 - only affects display when SW3:7,8 set to Mahjong Cards - PORT_DIPSETTING( 0x0020, "Don't Show" ) // 不顯示 - only shows characters for winds - PORT_DIPSETTING( 0x0000, "Show" ) // 顯示 - additionally shows numeric values for winds - PORT_DIPNAME( 0x00c0, 0x0000, "Card Display" ) PORT_DIPLOCATION("SW3:7,8") // 畫面顯示 - changes in-game card face style - PORT_DIPSETTING( 0x0000, "Poker Cards" ) // 撲克畫面 - playing cards - PORT_DIPSETTING( 0x0040, "Mahjong Cards" ) // 麻將畫面 - mahjong numbers and winds - PORT_DIPSETTING( 0x0080, "Caishen Cards" ) // 財神財神 - plain coloured numbers - PORT_DIPSETTING( 0x00c0, "Poker Cards" ) // 撲克畫面 - playing cards + PORT_DIPNAME( 0x0020, 0x0000, "Mahjong Wind Numbers" ) PORT_DIPLOCATION("SW3:6") // 麻將數字 (only affects display when SW3:7,8 set to Mahjong Tiles) + PORT_DIPSETTING( 0x0020, DEF_STR(Off) ) // 不顯示 (only shows characters for winds) + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) // 顯示 (additionally shows numeric values for winds) + PORT_DIPNAME( 0x00c0, 0x0000, "Card Display" ) PORT_DIPLOCATION("SW3:7,8") // 畫面顯示 (changes in-game card face style) + PORT_DIPSETTING( 0x0000, "Poker Cards" ) // 撲克畫面 (playing cards) + PORT_DIPSETTING( 0x0040, "Mahjong Tiles" ) // 麻將畫面 (mahjong numbers and winds) + PORT_DIPSETTING( 0x0080, "Caishen Cards" ) // 財神財神 (plain coloured numbers) + PORT_DIPSETTING( 0x00c0, "Poker Cards" ) // 撲克畫面 (playing cards) + PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) INPUT_PORTS_END static INPUT_PORTS_START( sc2in1 ) + PORT_START("COUNTERS") + PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_MEMBER(FUNC(gms_2layers_state::counter_w<1>)) // key-in + PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_MEMBER(FUNC(gms_2layers_state::counter_w<0>)) // coin in + PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("hopper", FUNC(hopper_device::motor_w)) + PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_MEMBER(FUNC(gms_2layers_state::counter_w<3>)) // key-out + PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_MEMBER(FUNC(gms_2layers_state::counter_w<2>)) // coin out + PORT_START("IN1") PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_SERVICE_NO_TOGGLE(0x02, IP_ACTIVE_LOW) @@ -1347,80 +1416,116 @@ static INPUT_PORTS_START( sc2in1 ) INPUT_PORTS_END static INPUT_PORTS_START( jinpaish ) - PORT_INCLUDE( sc2in1 ) + // Mahjong keyboard controls: + // A Select Opponent + // B Select Opponent + // C Select Opponent + // Start Start Take Score Select Opponent + // Bet Bet Select Opponent + // Kan Bet Select Opponent + // Pon Start Take Score Select Opponent + // Chi Select/Confirm Take Score Big Select Opponent + // Reach Down Double Up Select Opponent + // Ron View Hole Card Small Select Opponent + // Take Score Select Take Score Select Opponent + // Double Up Down Double Up Select Opponent + // Big View Hole Card Small Select Opponent + // Small Take Score Select Opponent + // Seems to be no Up control in mahjong keyboard mode. + GMS_MAHJONG_KEYBOARD("DSW1", 0x80, 0x80) - PORT_MODIFY("IN1") // TODO: likely incomplete - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_SERVICE_NO_TOGGLE(0x02, IP_ACTIVE_LOW) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME( "Select" ) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME( "Show Card" ) - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_MODIFY("IN1") + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x80, NOTEQUALS, 0x80) + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Start / Take Score") PORT_CONDITION("DSW1", 0x80, NOTEQUALS, 0x80) // 開始鍵 + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_NAME("Up") PORT_CONDITION("DSW1", 0x80, NOTEQUALS, 0x80) + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_NAME("Down / Double Up") PORT_CONDITION("DSW1", 0x80, NOTEQUALS, 0x80) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW1", 0x80, NOTEQUALS, 0x80) // (would be left, seems to be unused) + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW1", 0x80, NOTEQUALS, 0x80) // (would be right, seems to be unused) + PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_CONDITION("DSW1", 0x80, NOTEQUALS, 0x80) // 押分鍵 + PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Select / Confirm / Big") PORT_CONDITION("DSW1", 0x80, NOTEQUALS, 0x80) // 選擇鍵 / 確認鍵 + PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("View Hole Card / Small") PORT_CONDITION("DSW1", 0x80, NOTEQUALS, 0x80) // 看牌鍵 + PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x80, NOTEQUALS, 0x80) + PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x80, NOTEQUALS, 0x80) + PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x80, NOTEQUALS, 0x80) + PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x80, NOTEQUALS, 0x80) + PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x80, NOTEQUALS, 0x80) + + PORT_MODIFY("IN2") PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + //PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", FUNC(eeprom_serial_93cxx_device::do_read)) // TODO: verify - // Only 1 8-DIP bank on PCB. Dips' effects as per test mode. - PORT_MODIFY("DSW1") - PORT_DIPUNUSED_DIPLOC( 0x0001, 0x0000, "SW1:1") // first 5 seem hardcoded to Single Player / No connection + // Only 1 8-DIP bank on PCB. DIPs' effects as per test mode. + PORT_START("DSW1") + PORT_DIPUNUSED_DIPLOC( 0x0001, 0x0000, "SW1:1") // first 5 seem hardcoded to Single Player / No connection (單機/無連線) PORT_DIPUNUSED_DIPLOC( 0x0002, 0x0000, "SW1:2") PORT_DIPUNUSED_DIPLOC( 0x0004, 0x0000, "SW1:3") PORT_DIPUNUSED_DIPLOC( 0x0008, 0x0000, "SW1:4") PORT_DIPUNUSED_DIPLOC( 0x0010, 0x0000, "SW1:5") - PORT_DIPNAME( 0x0020, 0x0000, "Display Game Title" ) PORT_DIPLOCATION("SW1:6") - PORT_DIPSETTING( 0x0020, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0040, 0x0000, "Game Password" ) PORT_DIPLOCATION("SW1:7") - PORT_DIPSETTING( 0x0000, DEF_STR( Normal ) ) - PORT_DIPSETTING( 0x0040, "Power On" ) - PORT_DIPNAME( 0x0080, 0x0000, "Connector" ) PORT_DIPLOCATION("SW1:8") - PORT_DIPSETTING( 0x0000, "Joystick" ) - PORT_DIPSETTING( 0x0080, "Mahjong" ) + PORT_DIPNAME( 0x0020, 0x0000, "Show Title" ) PORT_DIPLOCATION("SW1:6") // 遊戲名稱 + PORT_DIPSETTING( 0x0020, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x0040, 0x0000, DEF_STR(Service_Mode) ) PORT_DIPLOCATION("SW1:7") // 遊戲設定 + PORT_DIPSETTING( 0x0000, DEF_STR(Off) ) // 正常 + PORT_DIPSETTING( 0x0040, "Power On" ) // 開機進入 (boots to setup menu - default password is Start eight times) + PORT_DIPNAME( 0x0080, 0x0000, DEF_STR(Controls) ) PORT_DIPLOCATION("SW1:8") // 操作介面 + PORT_DIPSETTING( 0x0000, DEF_STR(Joystick) ) // 娛樂 + PORT_DIPSETTING( 0x0080, "Mahjong" ) // 麻將 INPUT_PORTS_END static INPUT_PORTS_START( baile ) - PORT_INCLUDE( sc2in1 ) + // Mahjong keyboard controls: + // I Bet on Player / Big Confirm in test mode + // K Bet on Tie + // M Bet on Banker / Small Select in test mode + // N Start / Deal / Take Score Exit in test mode + // Kan Bet Multiplier + // Chi Double Up + // Reach Cancel Bet + // Ron Peek at Card + // Take Score Bet on Player / Big Confirm in test mode + // Double Up Double Up + // Big Bet on Banker / Small Select in test mode + GMS_MAHJONG_KEYBOARD("DSW1", 0x80, 0x80) - PORT_MODIFY("IN1") // TODO: likely incomplete - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_SERVICE_NO_TOGGLE(0x02, IP_ACTIVE_LOW) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME( "Tie Bet" ) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME( "Player Bet" ) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME( "Banker Bet" ) - PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME( "Bet Modifier" ) - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME( "Flip Card / Show Odds" ) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_MODIFY("IN1") + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x80, NOTEQUALS, 0x80) + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Start / Draw / Take Score") PORT_CONDITION("DSW1", 0x80, NOTEQUALS, 0x80) + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) PORT_NAME("Bet on Tie") PORT_CONDITION("DSW1", 0x80, NOTEQUALS, 0x80) + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) PORT_CONDITION("DSW1", 0x80, NOTEQUALS, 0x80) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("Bet on Player / Big") PORT_CONDITION("DSW1", 0x80, NOTEQUALS, 0x80) + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) PORT_NAME("Bet on Banker / Small") PORT_CONDITION("DSW1", 0x80, NOTEQUALS, 0x80) + PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_NAME("Bet Multiplier") PORT_CONDITION("DSW1", 0x80, NOTEQUALS, 0x80) + PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) PORT_NAME("Peek at Card / Show Odds") PORT_CONDITION("DSW1", 0x80, NOTEQUALS, 0x80) + PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) PORT_NAME("Cancel Bets") PORT_CONDITION("DSW1", 0x80, NOTEQUALS, 0x80) + PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x80, NOTEQUALS, 0x80) + PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x80, NOTEQUALS, 0x80) + PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x80, NOTEQUALS, 0x80) + PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x80, NOTEQUALS, 0x80) + PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x80, NOTEQUALS, 0x80) + + PORT_MODIFY("IN2") PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) + //PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", FUNC(eeprom_serial_93cxx_device::do_read)) // TODO: verify - // Only 1 8-DIP bank on PCB. Most options appear to be software settings. - PORT_MODIFY("DSW1") - PORT_DIPNAME( 0x0001, 0x0000, DEF_STR( Test ) ) PORT_DIPLOCATION("SW1:1") - PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0001, DEF_STR( On ) ) - PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:2") - PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0002, DEF_STR( On ) ) - PORT_DIPUNKNOWN_DIPLOC( 0x0004, 0x0004, "SW1:3") - PORT_DIPUNKNOWN_DIPLOC( 0x0008, 0x0008, "SW1:4") - PORT_DIPUNKNOWN_DIPLOC( 0x0010, 0x0010, "SW1:5") - PORT_DIPUNKNOWN_DIPLOC( 0x0020, 0x0020, "SW1:6") - PORT_DIPUNKNOWN_DIPLOC( 0x0040, 0x0040, "SW1:7") - PORT_DIPNAME( 0x0080, 0x0000, "Connector" ) PORT_DIPLOCATION("SW1:8") - PORT_DIPSETTING( 0x0000, "Joystick" ) + // Only 1 8-DIP bank on PCB. Most options appear to be soft settings. + PORT_START("DSW1") + PORT_DIPNAME( 0x0001, 0x0000, DEF_STR(Service_Mode) ) PORT_DIPLOCATION("SW1:1") + PORT_DIPSETTING( 0x0000, DEF_STR(Off) ) + PORT_DIPSETTING( 0x0001, DEF_STR(On) ) + PORT_DIPNAME( 0x0002, 0x0002, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("SW1:2") + PORT_DIPSETTING( 0x0000, DEF_STR(Off) ) + PORT_DIPSETTING( 0x0002, DEF_STR(On) ) + PORT_DIPUNKNOWN_DIPLOC( 0x0004, 0x0000, "SW1:3") + PORT_DIPUNKNOWN_DIPLOC( 0x0008, 0x0000, "SW1:4") + PORT_DIPUNKNOWN_DIPLOC( 0x0010, 0x0000, "SW1:5") + PORT_DIPUNKNOWN_DIPLOC( 0x0020, 0x0000, "SW1:6") + PORT_DIPUNKNOWN_DIPLOC( 0x0040, 0x0000, "SW1:7") + PORT_DIPNAME( 0x0080, 0x0000, "Connector" ) PORT_DIPLOCATION("SW1:8") + PORT_DIPSETTING( 0x0000, DEF_STR(Joystick) ) PORT_DIPSETTING( 0x0080, "Mahjong" ) INPUT_PORTS_END @@ -1432,7 +1537,7 @@ static INPUT_PORTS_START( yyhm ) PORT_BIT( 0xf800, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0000) PORT_MODIFY("IN2") - PORT_BIT( 0xfff8, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0xe000, IP_ACTIVE_LOW, IPT_UNKNOWN ) //PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", FUNC(eeprom_serial_93cxx_device::do_read)) // TODO: verify // Only 1 8-DIP bank on PCB. DIPs' effects as per test mode. @@ -1458,6 +1563,13 @@ static INPUT_PORTS_START( yyhm ) INPUT_PORTS_END static INPUT_PORTS_START( ballch ) + PORT_START("COUNTERS") + PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_MEMBER(FUNC(gms_2layers_state::counter_w<1>)) // key-in + PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_MEMBER(FUNC(gms_2layers_state::counter_w<0>)) // coin in + PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("hopper", FUNC(hopper_device::motor_w)) + PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_MEMBER(FUNC(gms_2layers_state::counter_w<3>)) // key-out + PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_MEMBER(FUNC(gms_2layers_state::counter_w<2>)) // coin out + PORT_START("IN1") PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_SERVICE_NO_TOGGLE(0x02, IP_ACTIVE_LOW) @@ -1575,6 +1687,13 @@ static INPUT_PORTS_START( ballch ) INPUT_PORTS_END static INPUT_PORTS_START( cots ) + PORT_START("COUNTERS") + PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_MEMBER(FUNC(gms_2layers_state::counter_w<1>)) // key-in + PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_MEMBER(FUNC(gms_2layers_state::counter_w<0>)) // coin in + PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("hopper", FUNC(hopper_device::motor_w)) + PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_MEMBER(FUNC(gms_2layers_state::counter_w<3>)) // key-out + PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_MEMBER(FUNC(gms_2layers_state::counter_w<2>)) // coin out + PORT_START("IN1") PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_SERVICE_NO_TOGGLE(0x02, IP_ACTIVE_LOW) @@ -1695,6 +1814,13 @@ INPUT_PORTS_END static INPUT_PORTS_START( sball2k1 ) // default password for accessing game settings is all Start + PORT_START("COUNTERS") + PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_MEMBER(FUNC(gms_2layers_state::counter_w<1>)) // key-in + PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_MEMBER(FUNC(gms_2layers_state::counter_w<0>)) // coin in + PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("hopper", FUNC(hopper_device::motor_w)) + PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_MEMBER(FUNC(gms_2layers_state::counter_w<3>)) // key-out + PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_MEMBER(FUNC(gms_2layers_state::counter_w<2>)) // coin out + PORT_START("IN1") PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) @@ -1801,16 +1927,6 @@ static INPUT_PORTS_START( cjdlz ) PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW2", 0x0080, EQUALS, 0x0080) PORT_MODIFY("IN2") // 16bit - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", FUNC(eeprom_serial_93cxx_device::do_read)) @@ -1920,6 +2036,13 @@ static INPUT_PORTS_START( cjdlz ) INPUT_PORTS_END static INPUT_PORTS_START( hgly ) + PORT_START("COUNTERS") + PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_MEMBER(FUNC(gms_2layers_state::counter_w<1>)) // key-in + PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_MEMBER(FUNC(gms_2layers_state::counter_w<0>)) // coin in + PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("hopper", FUNC(hopper_device::motor_w)) + PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_MEMBER(FUNC(gms_2layers_state::counter_w<3>)) // key-out + PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_MEMBER(FUNC(gms_2layers_state::counter_w<2>)) // coin out + PORT_START("IN1") PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_SERVICE_NO_TOGGLE(0x02, IP_ACTIVE_LOW) @@ -2289,6 +2412,8 @@ void gms_2layers_state::rbmk(machine_config &config) EEPROM_93C46_16BIT(config, m_eeprom); + HOPPER(config, "hopper", attotime::from_msec(50)); + SPEAKER(config, "speaker", 2).front(); OKIM6295(config, m_oki, 22_MHz_XTAL / 20, okim6295_device::PIN7_HIGH); // pin 7 not verified, but seems to match recordings @@ -2335,6 +2460,7 @@ void gms_2layers_state::super555(machine_config &config) void gms_3layers_state::magslot(machine_config &config) { super555(config); + m_maincpu->set_addrmap(AS_PROGRAM, &gms_3layers_state::magslot_mem); m_gfxdecode->set_info(gfx_magslot); @@ -2722,7 +2848,7 @@ ROM_START( ballch ) ROM_END /* -皇冠樂園 Huáng Guàn Lè Yuán (Crown Amusement Park), GMS, 1999 +皇冠樂園 Huángguàn Lèyuán (Crown Amusement Park), GMS, 1999 超级大连庄 Chāojí Dà Liánzhuāng, GMS, 1999 Hardware info by Guru --------------------- @@ -2821,8 +2947,8 @@ ROM_START( cjdlz ) ROM_END - // the following inits patch out protection (?) checks to allow for testing - // unfortunately the various U errors shown don't always correspond to correct PCB locations +// the following inits patch out protection (?) checks to allow for testing +// unfortunately the various U errors shown don't always correspond to correct PCB locations void gms_2layers_state::init_rbspm() { @@ -3018,6 +3144,6 @@ GAME( 2005, baile, 0, magslot, baile, gms_3layers_state, init_baile, R GAME( 2003, magslot, 0, magslot, magslot, gms_3layers_state, empty_init, ROT0, "GMS", "Magic Slot (normal 1.0C)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING ) // reel / tilemaps priorities are wrong, inputs to be verified. Also needs EEPROM support. // train games -GAME( 1999, hgly, 0, super555, hgly, gms_2layers_state, init_hgly, ROT0, "GMS", "Huang Guan Le Yuan (990726 CRG1.1)", MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING ) // stops during boot, patched for now. Also needs EEPROM support. +GAME( 1999, hgly, 0, super555, hgly, gms_2layers_state, init_hgly, ROT0, "GMS", "Huangguan Leyuan (990726 CRG1.1)", MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING ) // stops during boot, patched for now. Also needs EEPROM support. GAME( 2002, ballch, 0, super555, ballch, gms_2layers_state, init_ballch, ROT0, "TVE", "Ball Challenge (20020607 1.0 OVERSEA)", MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING ) // stops during boot, patched for now. Also needs EEPROM support. GAME( 2005, cots, 0, super555, cots, gms_2layers_state, init_cots, ROT0, "ECM", "Creatures of the Sea (20050328 USA 6.3)", MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING ) // stops during boot, patched for now. Also needs EEPROM support. diff --git a/src/mame/moog/nl_source.h b/src/mame/moog/nl_source.h new file mode 100644 index 00000000000..b0421a657c4 --- /dev/null +++ b/src/mame/moog/nl_source.h @@ -0,0 +1,12 @@ +// license:BSD-3-Clause +// copyright-holders:m1macrophage +#ifndef MAME_MOOG_NL_SOURCE_H +#define MAME_MOOG_NL_SOURCE_H + +#pragma once + +#include "netlist/nl_setup.h" + +NETLIST_EXTERNAL(moogsource) + +#endif // MAME_MOOG_NL_SOURCE_H diff --git a/src/mame/moog/source.cpp b/src/mame/moog/source.cpp index 939c39c1dc3..2d48cfbff05 100644 --- a/src/mame/moog/source.cpp +++ b/src/mame/moog/source.cpp @@ -35,6 +35,8 @@ interactive layout, and is intended as an educational tool. #include "emu.h" +#include "nl_source.h" + #include "cpu/z80/z80.h" #include "machine/netlist.h" #include "machine/nvram.h" @@ -42,8 +44,6 @@ interactive layout, and is intended as an educational tool. #include "machine/timer.h" #include "sound/va_eg.h" -#include "netlist/nl_setup.h" - #include "moog_source.lh" #define LOG_CV (1U << 1) @@ -60,8 +60,6 @@ interactive layout, and is intended as an educational tool. #include "logmacro.h" -NETLIST_EXTERNAL(moogsource) // In nl_source.cpp. - namespace { constexpr const char MAINCPU_TAG[] = "z80"; diff --git a/src/mame/namco/namcos12.cpp b/src/mame/namco/namcos12.cpp index 203cee1f160..b9c73152a91 100644 --- a/src/mame/namco/namcos12.cpp +++ b/src/mame/namco/namcos12.cpp @@ -60,15 +60,15 @@ Super World Stadium 2000 (SS01/VER.A3) (C) Namco, 2000 COH-700 SYS Super World Stadium 2001 (SS11/VER.A2) (C) Namco, 2001 COH-716 SYSTEM12 MOTHER(C) SYSTEM12 F2M5 KC061 Tenkomori Shooting (TKM1/VER.A1) (C) Namco, 1998 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M4F6 KC036 Tenkomori Shooting (TKM2/VER.A1) (C) Namco, 1998 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M4F6 KC036 -Tekken 3 (TET1/VER.A) (C) Namco, 1996 COH-700 SYSTEM12 MOTHER SYSTEM12 M8F2F KC006 -Tekken 3 (TET2/VER.A) (C) Namco, 1996 COH-700 SYSTEM12 MOTHER SYSTEM12 M8F2F KC006 -Tekken 3 (TET3/VER.A) (C) Namco, 1996 COH-700 SYSTEM12 MOTHER SYSTEM12 M8F2F KC006 -Tekken 3 (TET3/VER.B) (C) Namco, 1996 COH-700 SYSTEM12 MOTHER SYSTEM12 M8F2F KC006 -Tekken 3 (TET2/VER.C) (C) Namco, 1996 COH-700 SYSTEM12 MOTHER SYSTEM12 M8F2F KC006 -Tekken 3 (TET2/VER.D) (C) Namco, 1996 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M8F2F KC006 -Tekken 3 (TET3/VER.D) (C) Namco, 1996 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M8F2F KC006 -Tekken 3 (TET1/VER.E1) (C) Namco, 1996 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M8F2F KC006 -Tekken 3 (TET2/VER.E1) (C) Namco, 1996 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M8F2F KC006 +Tekken 3 (TET1/VER.A) (C) Namco, 1997 COH-700 SYSTEM12 MOTHER SYSTEM12 M8F2F KC006 +Tekken 3 (TET2/VER.A) (C) Namco, 1997 COH-700 SYSTEM12 MOTHER SYSTEM12 M8F2F KC006 +Tekken 3 (TET3/VER.A) (C) Namco, 1997 COH-700 SYSTEM12 MOTHER SYSTEM12 M8F2F KC006 +Tekken 3 (TET3/VER.B) (C) Namco, 1997 COH-700 SYSTEM12 MOTHER SYSTEM12 M8F2F KC006 +Tekken 3 (TET2/VER.C) (C) Namco, 1997 COH-700 SYSTEM12 MOTHER SYSTEM12 M8F2F KC006 +Tekken 3 (TET2/VER.D) (C) Namco, 1997 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M8F2F KC006 +Tekken 3 (TET3/VER.D) (C) Namco, 1997 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M8F2F KC006 +Tekken 3 (TET1/VER.E1) (C) Namco, 1997 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M8F2F KC006 +Tekken 3 (TET2/VER.E1) (C) Namco, 1997 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M8F2F KC006 Tekken Tag Tournament (TEG3/VER.C1) (C) Namco, 1999 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M8F4 KC044 Tekken Tag Tournament (TEG3/VER.B) (C) Namco, 1999 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M8F4 KC044 Toukon Retsuden 3 (TR1/VER.A) (C) Namco, 1997 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M8F2F KC019 @@ -3588,15 +3588,15 @@ ROM_END // YEAR NAME PARENT MACHINE INPUT CLASS INIT ROT COMPANY FULLNAME, FLAGS -GAME( 1996, tekken3, 0, coh700, tekken3, namcos12_state, empty_init, ROT0, "Namco", "Tekken 3 (World, TET2/VER.E1)", 0 ) /* KC006 */ -GAME( 1996, tekken3a, tekken3, coh700, tekken3, namcos12_state, empty_init, ROT0, "Namco", "Tekken 3 (World, TET2/VER.A)", 0 ) /* KC006 */ -GAME( 1996, tekken3b, tekken3, coh700, tekken3, namcos12_state, empty_init, ROT0, "Namco", "Tekken 3 (World, TET2/VER.B)", 0 ) /* KC006 */ -GAME( 1996, tekken3c, tekken3, coh700, tekken3, namcos12_state, empty_init, ROT0, "Namco", "Tekken 3 (World, TET2/VER.C)", 0 ) /* KC006 */ -GAME( 1996, tekken3d, tekken3, coh700, tekken3, namcos12_state, empty_init, ROT0, "Namco", "Tekken 3 (World, TET2/VER.D)", 0 ) /* KC006 */ -GAME( 1996, tekken3ua, tekken3, coh700, tekken3, namcos12_state, empty_init, ROT0, "Namco", "Tekken 3 (US, TET3/VER.A)", 0 ) /* KC006 */ -GAME( 1996, tekken3ud, tekken3, coh700, tekken3, namcos12_state, empty_init, ROT0, "Namco", "Tekken 3 (US, TET3/VER.D)", 0 ) /* KC006 */ -GAME( 1996, tekken3ja, tekken3, coh700, tekken3, namcos12_state, empty_init, ROT0, "Namco", "Tekken 3 (Japan, TET1/VER.A)", 0 ) /* KC006 */ -GAME( 1996, tekken3je1, tekken3, coh700, tekken3, namcos12_state, empty_init, ROT0, "Namco", "Tekken 3 (Japan, TET1/VER.E1)", 0 ) /* KC006 */ +GAME( 1997, tekken3, 0, coh700, tekken3, namcos12_state, empty_init, ROT0, "Namco", "Tekken 3 (World, TET2/VER.E1)", 0 ) /* KC006 */ +GAME( 1997, tekken3a, tekken3, coh700, tekken3, namcos12_state, empty_init, ROT0, "Namco", "Tekken 3 (World, TET2/VER.A)", 0 ) /* KC006 */ +GAME( 1997, tekken3b, tekken3, coh700, tekken3, namcos12_state, empty_init, ROT0, "Namco", "Tekken 3 (World, TET2/VER.B)", 0 ) /* KC006 */ +GAME( 1997, tekken3c, tekken3, coh700, tekken3, namcos12_state, empty_init, ROT0, "Namco", "Tekken 3 (World, TET2/VER.C)", 0 ) /* KC006 */ +GAME( 1997, tekken3d, tekken3, coh700, tekken3, namcos12_state, empty_init, ROT0, "Namco", "Tekken 3 (World, TET2/VER.D)", 0 ) /* KC006 */ +GAME( 1997, tekken3ua, tekken3, coh700, tekken3, namcos12_state, empty_init, ROT0, "Namco", "Tekken 3 (US, TET3/VER.A)", 0 ) /* KC006 */ +GAME( 1997, tekken3ud, tekken3, coh700, tekken3, namcos12_state, empty_init, ROT0, "Namco", "Tekken 3 (US, TET3/VER.D)", 0 ) /* KC006 */ +GAME( 1997, tekken3ja, tekken3, coh700, tekken3, namcos12_state, empty_init, ROT0, "Namco", "Tekken 3 (Japan, TET1/VER.A)", 0 ) /* KC006 */ +GAME( 1997, tekken3je1, tekken3, coh700, tekken3, namcos12_state, empty_init, ROT0, "Namco", "Tekken 3 (Japan, TET1/VER.E1)", 0 ) /* KC006 */ GAME( 1997, lbgrande, 0, coh700, lbgrande, namcos12_state, empty_init, ROT0, "Namco", "Libero Grande (World, LG2/VER.A)", 0 ) /* KC014 */ GAME( 1997, toukon3, 0, coh700, lbgrande, namcos12_state, empty_init, ROT0, "Namco / Tomy", "Shin Nihon Pro Wrestling Toukon Retsuden 3 Arcade Edition (Japan, TR1/VER.A)", MACHINE_IMPERFECT_GRAPHICS ) /* KC019 */ GAME( 1998, soulclbr, 0, coh700, namcos12, namcos12_state, empty_init, ROT0, "Namco", "Soul Calibur (World, SOC12/VER.A2)", 0 ) /* KC020 */ diff --git a/src/mame/sega/dccons.cpp b/src/mame/sega/dccons.cpp index bb6e47db32b..43fead5f79a 100644 --- a/src/mame/sega/dccons.cpp +++ b/src/mame/sega/dccons.cpp @@ -370,8 +370,8 @@ void dc_cons_state::gdrom_config(device_t *device) { cdda_device *cdda = device->subdevice<cdda_device>("cdda"); cdda->audio_end_cb().set(*device, FUNC(gdrom_device::cdda_end_mark_cb)); - cdda->add_route(0, "^^aica", 1.0); - cdda->add_route(1, "^^aica", 1.0); + cdda->add_route(0, "^^aica", 1.0, 0); + cdda->add_route(1, "^^aica", 1.0, 1); } void dc_cons_state::dc_base(machine_config &config) diff --git a/src/mame/skeleton/boramz80.cpp b/src/mame/skeleton/boramz80.cpp index 841f9b80ccf..c0dcd978cd9 100644 --- a/src/mame/skeleton/boramz80.cpp +++ b/src/mame/skeleton/boramz80.cpp @@ -17,6 +17,14 @@ on 0211 PCB: 2x 8-DIP banks on 0300 III PCB: 4x 8-DIP banks Some PCBs have been seen mixing different sets of GFX ROMs with the same program ROM. + +TODO: +- black screen after first attract cycle (interrupts?) +- colors +- inputs +- outputs +- decryption for tpkborama +- are the tpkg2 GFX ROMs correct for that set? */ @@ -48,7 +56,7 @@ public: void pk(machine_config &config) ATTR_COLD; - void init_tpkborama(); + void init_tpkborama() ATTR_COLD; protected: virtual void video_start() override ATTR_COLD; @@ -60,7 +68,14 @@ private: required_shared_ptr<uint8_t> m_char_ram; required_shared_ptr<uint8_t> m_tile_ram; + tilemap_t *m_bg_tilemap = nullptr; + tilemap_t *m_fg_tilemap = nullptr; + uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + void charram_w(offs_t offset, uint8_t data); + void tileram_w(offs_t offset, uint8_t data); + TILE_GET_INFO_MEMBER(get_bg_tile_info); + TILE_GET_INFO_MEMBER(get_fg_tile_info); void program_map(address_map &map) ATTR_COLD; void io_map(address_map &map) ATTR_COLD; @@ -69,12 +84,47 @@ private: void boramz80_state::video_start() { + m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(boramz80_state::get_bg_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 40, 25); + m_fg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(boramz80_state::get_fg_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 40, 25); + + m_fg_tilemap->set_transparent_pen(0); +} + +TILE_GET_INFO_MEMBER(boramz80_state::get_bg_tile_info) +{ + int const tile = m_tile_ram[2 * tile_index] | (m_tile_ram[2 * tile_index + 1] << 8); + //int const color =; // TODO + + tileinfo.set(1, tile, 0, 0); +} + +TILE_GET_INFO_MEMBER(boramz80_state::get_fg_tile_info) +{ + int const tile = m_char_ram[2 * tile_index] | ((m_char_ram[2 * tile_index + 1] & 0x03) << 8); + //int const color =; // TODO + + tileinfo.set(0, tile, 2, 0); +} + +void boramz80_state::charram_w(offs_t offset, uint8_t data) +{ + m_char_ram[offset] = data; + m_fg_tilemap->mark_tile_dirty(offset / 2); +} + +void boramz80_state::tileram_w(offs_t offset, uint8_t data) +{ + m_tile_ram[offset] = data; + m_bg_tilemap->mark_tile_dirty(offset / 2); } uint32_t boramz80_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { bitmap.fill(rgb_t::black(), cliprect); + m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0); + m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0); + return 0; } @@ -83,8 +133,8 @@ void boramz80_state::program_map(address_map &map) { map(0x0000, 0x7fff).rom(); map(0x8000, 0x8fff).ram(); // TODO: only 0x800 for pkboram - map(0xa000, 0xa7ff).ram().share(m_char_ram); - map(0xc000, 0xc7ff).ram().share(m_tile_ram); + map(0xa000, 0xa7ff).ram().w(FUNC(boramz80_state::charram_w)).share(m_char_ram); + map(0xc000, 0xc7ff).ram().w(FUNC(boramz80_state::tileram_w)).share(m_tile_ram); map(0xe000, 0xe3ff).ram().w("palette", FUNC(palette_device::write8)).share("palette"); map(0xf000, 0xf3ff).ram().w("palette", FUNC(palette_device::write8_ext)).share("palette_ext"); } @@ -182,9 +232,9 @@ static INPUT_PORTS_START( tpkboram ) INPUT_PORTS_END -static GFXDECODE_START( gfx_boram ) - GFXDECODE_ENTRY( "chars", 0, gfx_8x8x2_planar, 0, 16 ) - GFXDECODE_ENTRY( "tiles", 0, gfx_8x8x4_planar, 0, 16 ) // probably wrong +static GFXDECODE_START( gfx_boram ) // TODO + GFXDECODE_ENTRY( "chars", 0, gfx_8x8x2_planar, 0x000, 8 ) + GFXDECODE_ENTRY( "tiles", 0, gfx_8x8x4_planar, 0x200, 8 ) GFXDECODE_END @@ -194,7 +244,6 @@ void boramz80_state::pk(machine_config &config) Z80(config, m_maincpu, 4_MHz_XTAL); m_maincpu->set_addrmap(AS_PROGRAM, &boramz80_state::program_map); m_maincpu->set_addrmap(AS_IO, &boramz80_state::io_map); - //m_maincpu->set_vblank_int("screen", FUNC(boramz80_state::irq0_line_hold)); i8255_device &ppi(I8255A(config, "ppi")); ppi.in_pa_callback().set([this] () { logerror("%s: PPI port A read\n", machine().describe_context()); return ioport("IN0")->read(); }); @@ -205,7 +254,7 @@ void boramz80_state::pk(machine_config &config) screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); // TODO: everything screen.set_refresh_hz(60); screen.set_vblank_time(ATTOSECONDS_IN_USEC(0)); - screen.set_size(32*8, 32*8); + screen.set_size(40*8, 25*8); screen.set_visarea_full(); screen.set_screen_update(FUNC(boramz80_state::screen_update)); @@ -213,15 +262,16 @@ void boramz80_state::pk(machine_config &config) crtc.set_screen("screen"); crtc.set_show_border_area(false); crtc.set_char_width(8); + crtc.out_vsync_callback().set_inputline(m_maincpu, 0); GFXDECODE(config, "gfxdecode", "palette", gfx_boram); - PALETTE(config, "palette").set_format(palette_device::xRGB_555, 0x400); // TODO: verify once it works + PALETTE(config, "palette").set_format(palette_device::xRGB_555, 0x400); // TODO: wrong format SPEAKER(config, "mono").front_center(); ay8910_device &aysnd(AY8910(config, "aysnd", 4_MHz_XTAL / 4)); // not sure, could derive from 13 MHz XTAL - aysnd.port_a_read_callback().set_ioport("DSW1"); // TODO: verify once it works - aysnd.port_b_read_callback().set_ioport("DSW2"); // TODO: verify once it works + aysnd.port_a_read_callback().set([this] () { logerror("%s: AY port A read\n", machine().describe_context()); return 0; }); + aysnd.port_b_read_callback().set([this] () { logerror("%s: AY port B read\n", machine().describe_context()); return 0; }); aysnd.port_a_write_callback().set([this] (uint8_t data) { logerror("%s: AY port A write %02x\n", machine().describe_context(), data); }); aysnd.add_route(ALL_OUTPUTS, "mono", 0.50); } @@ -332,7 +382,7 @@ ROM_START( tpkg2 ) // ATPK-BORAM PK-0500 PCB, same GFX as pkrboram ROM_LOAD( "10.pg8", 0x70000, 0x10000, CRC(2c810312) SHA1(df055c7828da2b49bcbd22721309011b7d2143f9) ) ROM_END -ROM_START( unkboram ) // ATPK-BORAM PK-0500 PCB +ROM_START( pkts ) // ATPK-BORAM PK-0500 PCB ROM_REGION( 0x8000, "maincpu", 0 ) ROM_LOAD( "11.rom", 0x0000, 0x8000, CRC(822af541) SHA1(621c88bdc2ddca90127eb7ab10ca4ef6ec0cded0) ) @@ -366,9 +416,9 @@ void boramz80_state::init_tpkborama() } // anonymous namespace -GAME( 1987, pkboram, 0, pk, pkboram, boramz80_state, empty_init, ROT0, "Boram", "PK - New Exciting Poker!", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) // PK-BORAM 0211 aug.04.1987. BORAM CORP -GAME( 1988, tpkboram, 0, pk, tpkboram, boramz80_state, empty_init, ROT0, "Boram", "PK Turbo", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) // PK-TURBO jan.29.1988. BORAM CORP. -GAME( 1998, tpkborama, tpkboram, pk, tpkboram, boramz80_state, init_tpkborama, ROT0, "Boram", "PK Turbo (Ver 2.3B2, encrypted)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) // dep inctype-23B1998 0519Ver 2.3B2 -GAME( 1990, pkrboram, 0, pk, tpkboram, boramz80_state, empty_init, ROT0, "Boram", "PK Rainbow (v 1.5)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) // PK RAINBOW v1.5 BORAM Corp. 1990.11.06� -GAME( 1992, tpkg2, 0, pk, tpkboram, boramz80_state, empty_init, ROT0, "Boram", "PK Turbo Great 2", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) // PK TURBO GREAT2 1992.06.04 BORAM CORP. -GAME( 19??, unkboram, 0, pk, tpkboram, boramz80_state, empty_init, ROT0, "Boram", "unknown Boram poker game", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) // PKS v100 BORAM CORP +GAME( 1987, pkboram, 0, pk, pkboram, boramz80_state, empty_init, ROT0, "Boram", "PK - New Exciting Poker!", MACHINE_IMPERFECT_GRAPHICS | MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) // PK-BORAM 0211 aug.04.1987. BORAM CORP +GAME( 1988, tpkboram, 0, pk, tpkboram, boramz80_state, empty_init, ROT0, "Boram", "PK Turbo", MACHINE_IMPERFECT_GRAPHICS | MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) // PK-TURBO jan.29.1988. BORAM CORP. +GAME( 1998, tpkborama, tpkboram, pk, tpkboram, boramz80_state, init_tpkborama, ROT0, "Boram", "PK Turbo (Ver 2.3B2, encrypted)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) // dep inctype-23B1998 0519Ver 2.3B2 +GAME( 1990, pkrboram, 0, pk, tpkboram, boramz80_state, empty_init, ROT0, "Boram", "PK Rainbow (v 1.5)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) // PK RAINBOW v1.5 BORAM Corp. 1990.11.06� +GAME( 1992, tpkg2, 0, pk, tpkboram, boramz80_state, empty_init, ROT0, "Boram", "PK Turbo Great 2", MACHINE_IMPERFECT_GRAPHICS | MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) // PK TURBO GREAT2 1992.06.04 BORAM CORP. +GAME( 19??, pkts, 0, pk, tpkboram, boramz80_state, empty_init, ROT0, "Boram", "PK Turbo Special", MACHINE_IMPERFECT_GRAPHICS | MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) // PKS v100 BORAM CORP diff --git a/src/mame/taito/taitojc.cpp b/src/mame/taito/taitojc.cpp index dad6ca5f292..17ae0c84975 100644 --- a/src/mame/taito/taitojc.cpp +++ b/src/mame/taito/taitojc.cpp @@ -2235,7 +2235,7 @@ GAMEL(1996, dendegoa, dendego, dendego, dendego, dendego_state, init_taitojc, GAMEL(1996, dendegox, dendego, dendego, dendego, dendego_state, init_taitojc, ROT0, "Taito", "Densha de GO! EX (Ver 2.4 J)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_TIMING, layout_dendego ) // DENSYA DE GO VER 2.4 J 1997/ 4/18 13:38:34 GAME( 1997, sidebs2, 0, taitojc, sidebs, taitojc_state, init_taitojc, ROT0, "Taito", "Side by Side 2 (Ver 2.6 OK)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_TIMING | MACHINE_NODEVICE_LAN ) // SIDE BY SIDE2 VER 2.6 OK 1997/ 6/ 4 17:27:37 GAME( 1997, sidebs2u, sidebs2, taitojc, sidebs, taitojc_state, init_taitojc, ROT0, "Taito", "Side by Side 2 (Ver 2.6 A)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_TIMING | MACHINE_NODEVICE_LAN ) // SIDE BY SIDE2 VER 2.6 A 1997/ 6/19 09:39:22 -GAME( 1997, sidebs2j, sidebs2, taitojc, sidebs, taitojc_state, init_taitojc, ROT0, "Taito", "Side by Side 2 Evoluzione RR (Ver 3.1 J)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_TIMING | MACHINE_NODEVICE_LAN ) // SIDE BY SIDE2 VER 3.1 J 1997/10/ 7 13:55:38 +GAME( 1997, sidebs2j, sidebs2, taitojc, sidebs, taitojc_state, init_taitojc, ROT0, "Taito", "Side by Side 2 Evoluzione RR (Ver 3.1 J)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_TIMING | MACHINE_NODEVICE_LAN ) // SIDE BY SIDE2 RR VER 3.1 J 1997/10/ 7 13:55:38 GAME( 1997, sidebs2ja, sidebs2, taitojc, sidebs, taitojc_state, init_taitojc, ROT0, "Taito", "Side by Side 2 Evoluzione (Ver 2.4 J)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_TIMING | MACHINE_NODEVICE_LAN ) // SIDE BY SIDE2 VER 2.4 J 1997/ 5/26 13:06:37 GAMEL(1998, dendego2, 0, dendego, dendego, dendego_state, init_dendego2, ROT0, "Taito", "Densha de GO! 2 Kousoku-hen (Ver 2.5 J)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_TIMING, layout_dendego ) // DENSYA DE GO2 VER 2.5 J 1998/ 3/ 2 15:30:55 GAMEL(1998, dendego23k,dendego2, dendego, dendego, dendego_state, init_dendego2, ROT0, "Taito", "Densha de GO! 2 Kousoku-hen 3000-bandai (Ver 2.20 J)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_TIMING, layout_dendego ) // DENSYA DE GO! 2 3000 VER 2.20 J 1998/ 7/15 17:42:38 diff --git a/src/tools/unidasm.cpp b/src/tools/unidasm.cpp index be64dc9cb72..46f5430681f 100644 --- a/src/tools/unidasm.cpp +++ b/src/tools/unidasm.cpp @@ -48,6 +48,7 @@ using util::BIT; #include "cpu/dsp32/dsp32dis.h" #include "cpu/dsp56000/dsp56000d.h" #include "cpu/dsp56156/dsp56dsm.h" +#include "cpu/dspp/dsppdasm.h" #include "cpu/e0c6200/e0c6200d.h" #include "cpu/e132xs/32xsdasm.h" #include "cpu/es5510/es5510d.h" @@ -452,6 +453,7 @@ static const dasm_table_entry dasm_table[] = { "dsp32c", le, 0, []() -> util::disasm_interface * { return new dsp32c_disassembler; } }, { "dsp56000", be, -2, []() -> util::disasm_interface * { return new dsp56000_disassembler; } }, { "dsp56156", le, -1, []() -> util::disasm_interface * { return new dsp56156_disassembler; } }, + { "dspp", be, -1, []() -> util::disasm_interface * { return new dspp_disassembler; } }, { "e0c6200", be, -1, []() -> util::disasm_interface * { return new e0c6200_disassembler; } }, { "epg3231", le, -1, []() -> util::disasm_interface * { return new epg3231_disassembler; } }, // { "es5510", be, 0, []() -> util::disasm_interface * { return new es5510_disassembler; } }, // Currently does nothing |