diff options
Diffstat (limited to 'src')
67 files changed, 6559 insertions, 4277 deletions
diff --git a/src/devices/bus/isa/ide.cpp b/src/devices/bus/isa/ide.cpp index 9565851fafc..22ac0defe64 100644 --- a/src/devices/bus/isa/ide.cpp +++ b/src/devices/bus/isa/ide.cpp @@ -50,8 +50,8 @@ void isa16_ide_device::ide_interrupt(int state) void isa16_ide_device::cdrom_headphones(device_t *device) { cdda_device *cdda = device->subdevice<cdda_device>("cdda"); - cdda->add_route(0, "^^lheadphone", 1.0); - cdda->add_route(1, "^^rheadphone", 1.0); + cdda->add_route(0, "^^headphone", 1.0, 0); + cdda->add_route(1, "^^headphone", 1.0, 1); } static INPUT_PORTS_START( ide ) @@ -76,8 +76,7 @@ void isa16_ide_device::device_add_mconfig(machine_config &config) IDE_CONTROLLER(config, m_ide).options(ata_devices, "hdd", nullptr, false); m_ide->irq_handler().set(FUNC(isa16_ide_device::ide_interrupt)); - SPEAKER(config, "lheadphone").front_left(); - SPEAKER(config, "rheadphone").front_right(); + SPEAKER(config, "headphone", 2).front(); m_ide->slot(0).set_option_machine_config("cdrom", cdrom_headphones); m_ide->slot(1).set_option_machine_config("cdrom", cdrom_headphones); diff --git a/src/devices/bus/isa/mcd.cpp b/src/devices/bus/isa/mcd.cpp index 085ab3676b9..0b78d68a98f 100644 --- a/src/devices/bus/isa/mcd.cpp +++ b/src/devices/bus/isa/mcd.cpp @@ -26,11 +26,10 @@ DEFINE_DEVICE_TYPE(ISA16_MCD, mcd_isa_device, "mcd_isa", "Mitsumi ISA CD-ROM Ada void mcd_isa_device::device_add_mconfig(machine_config &config) { - SPEAKER(config, "lheadphone").front_left(); - SPEAKER(config, "rheadphone").front_right(); + SPEAKER(config, "headphone", 2).front(); CDDA(config, m_cdda); - m_cdda->add_route(0, "lheadphone", 1.0); - m_cdda->add_route(1, "rheadphone", 1.0); + m_cdda->add_route(0, "headphone", 1.0, 0); + m_cdda->add_route(1, "headphone", 1.0, 1); m_cdda->set_cdrom_tag(*this); } diff --git a/src/devices/bus/odyssey2/voice.cpp b/src/devices/bus/odyssey2/voice.cpp index 9ca1ea26101..678757bb775 100644 --- a/src/devices/bus/odyssey2/voice.cpp +++ b/src/devices/bus/odyssey2/voice.cpp @@ -139,7 +139,7 @@ void o2_voice_device::device_add_mconfig(machine_config &config) // The Voice uses a speaker with its own volume control so the relative volumes to use are subjective, these sound good m_speech->add_route(ALL_OUTPUTS, "mono", 1.00); - O2_CART_SLOT(config, m_subslot, o2_cart, nullptr); + O2_CART_SLOT(config, m_subslot, o2_cart, nullptr).set_must_be_loaded(true); } ROM_START( o2voice ) 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/i960/i960.cpp b/src/devices/cpu/i960/i960.cpp index 7d31ad031bf..738037e60b5 100644 --- a/src/devices/cpu/i960/i960.cpp +++ b/src/devices/cpu/i960/i960.cpp @@ -469,7 +469,7 @@ void i960_cpu_device::take_interrupt(int vector, int lvl) } SP = (SP + 63) & ~63; - SP += 128; // emulate ElSemi's core, this fixes the crash in sonic the fighters + SP += 64; // add padding to prevent buffer underflow when saving processor state do_call(IRQV, 7, SP); 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/devices/cpu/z80/r800.cpp b/src/devices/cpu/z80/r800.cpp index 648735462e6..419bbacef05 100644 --- a/src/devices/cpu/z80/r800.cpp +++ b/src/devices/cpu/z80/r800.cpp @@ -63,11 +63,6 @@ void r800_device::device_validity_check(validity_checker &valid) const /*************************************************************** - * adjust cycle count by n T-states - ***************************************************************/ -#define T(icount) { m_icount -= icount; } - -/*************************************************************** * SLL r8 ***************************************************************/ u8 r800_device::r800_sll(u8 value) diff --git a/src/devices/cpu/z80/z80.cpp b/src/devices/cpu/z80/z80.cpp index c95474999d5..9d2c5958dd7 100644 --- a/src/devices/cpu/z80/z80.cpp +++ b/src/devices/cpu/z80/z80.cpp @@ -571,7 +571,6 @@ void z80_device::device_start() save_item(NAME(m_ea)); save_item(NAME(m_service_attention)); save_item(NAME(m_tmp_irq_vector)); - save_item(NAME(m_shared_addr.w)); save_item(NAME(m_shared_data.w)); save_item(NAME(m_shared_data2.w)); save_item(NAME(m_rtemp)); diff --git a/src/devices/cpu/z80/z80.h b/src/devices/cpu/z80/z80.h index b40e697d81f..3498f100dcd 100644 --- a/src/devices/cpu/z80/z80.h +++ b/src/devices/cpu/z80/z80.h @@ -181,7 +181,6 @@ protected: int m_icount; int m_tmp_irq_vector; - PAIR16 m_shared_addr; PAIR16 m_shared_data; PAIR16 m_shared_data2; u8 m_rtemp; diff --git a/src/devices/cpu/z80/z80.inc b/src/devices/cpu/z80/z80.inc index caf7ce22c8f..1c7dd7843a0 100644 --- a/src/devices/cpu/z80/z80.inc +++ b/src/devices/cpu/z80/z80.inc @@ -60,9 +60,6 @@ #define WZ_L m_wz.b.l -#define TADR m_shared_addr.w // Typically represents values from A0..15 pins. 16bit input in steps. -#define TADR_H m_shared_addr.b.h -#define TADR_L m_shared_addr.b.l #define TDAT m_shared_data.w // 16bit input(if use as second parameter) or output in steps. #define TDAT2 m_shared_data2.w #define TDAT_H m_shared_data.b.h diff --git a/src/devices/cpu/z80/z80.lst b/src/devices/cpu/z80/z80.lst index a31e651748b..17298dffca5 100644 --- a/src/devices/cpu/z80/z80.lst +++ b/src/devices/cpu/z80/z80.lst @@ -3,76 +3,85 @@ ########################################################## # macros ########################################################## -macro nomreq_addr +macro nomreq_addr %addr if (nomemrq_en) - m_nomreq_cb(TADR, 0x00, 0xff); + m_nomreq_cb(%addr, 0x00, 0xff); + 1 macro nomreq_ir %cycles - TADR = (m_i << 8) | (m_r2 & 0x80) | (m_r & 0x7f); - %cycles * call nomreq_addr + %cycles * @nomreq_addr (m_i << 8) | (m_r2 & 0x80) | (m_r & 0x7f) -macro in - m_iorq_cycles !! TDAT8 = m_io.read_interruptible(TADR); +macro in %port + m_iorq_cycles !! TDAT8 = m_io.read_interruptible(%port); -macro out - m_iorq_cycles !! m_io.write_interruptible(TADR, TDAT8); +macro out %port + m_iorq_cycles !! m_io.write_interruptible(%port, TDAT8); -macro rm - m_memrq_cycles !! TDAT8 = data_read(TADR); +macro rm %addr + m_memrq_cycles !! TDAT8 = data_read(%addr); -macro rm_reg - call rm - call nomreq_addr +macro rm_reg %addr + @rm %addr + @nomreq_addr %addr -macro rm16 - call rm - TDAT_H = TDAT_L; TADR++; - call rm - using std::swap; std::swap(TDAT_H, TDAT_L); +macro rm16 %addr + @rm %addr + TDAT_H = TDAT_L; + @rm %addr+1 + using std::swap; + swap(TDAT_H, TDAT_L); -macro wm - m_memrq_cycles !! data_write(TADR, TDAT8); +macro wm %addr + m_memrq_cycles !! data_write(%addr, TDAT8); -macro wm16 - call wm - TADR++; TDAT8 = TDAT_H; - call wm +macro wm16 %addr + @wm %addr + TDAT8 = TDAT_H; + @wm %addr+1 -macro wm16_sp +macro wm16_sp %d16 SP--; - m_memrq_cycles !! stack_write(SP, TDAT_H); + m_memrq_cycles !! stack_write(SP, (%d16) >> 8); SP--; - m_memrq_cycles !! stack_write(SP, TDAT_L); + m_memrq_cycles !! stack_write(SP, %d16); macro rop m_m1_cycles-2 !! TDAT8 = opcode_read(); if (refresh_en) m_refresh_cb((I << 8) | (R2 & 0x80) | (R & 0x7f), 0x00, 0xff); + 2 - PC++; R++; Q = QT; QT = YF | XF; + PC++; + R++; + Q = QT; + QT = YF | XF; macro r800:rop m_m1_cycles !! TDAT8 = opcode_read(); - PC++; R++; Q = QT; QT = YF | XF; + PC++; + R++; + Q = QT; + QT = YF | XF; macro arg m_memrq_cycles !! TDAT8 = arg_read(); PC++; macro arg16 - call arg + @arg TDAT_H = TDAT_L; - call arg - using std::swap; swap(TDAT_H, TDAT_L); + @arg + using std::swap; + swap(TDAT_H, TDAT_L); macro eax - call arg - m_ea = (u16)(IX + (s8)TDAT8); WZ = m_ea; + @arg + m_ea = (u16)(IX + (s8)TDAT8); + WZ = m_ea; macro eay - call arg - m_ea = (u16)(IY + (s8)TDAT8); WZ = m_ea; + @arg + m_ea = (u16)(IY + (s8)TDAT8); + WZ = m_ea; macro pop m_memrq_cycles !! TDAT_L = stack_read(SP); @@ -80,463 +89,690 @@ macro pop m_memrq_cycles !! TDAT_H = stack_read(SP); SP++; -macro push - call nomreq_ir 1 - call wm16_sp +macro push %d16 + @nomreq_ir 1 + @wm16_sp %d16 macro jp - call arg16 - PC = TDAT; WZ = PC; + @arg16 + PC = TDAT; + WZ = PC; macro t6a84:jp - call arg16 - PC = TDAT; WZ = PC; + @arg16 + PC = TDAT; + WZ = PC; paged_jump(); macro jp_cond if (TDAT8) { - call arg16 - PC = TDAT; WZ = PC; + @arg16 + PC = TDAT; + WZ = PC; } else { // implicit do PC += 2 - call arg16 + @arg16 WZ = TDAT; } macro t6a84:jp_cond if (TDAT8) { - call arg16 - PC = TDAT; WZ = PC; + @arg16 + PC = TDAT; + WZ = PC; paged_jump(); } else { // implicit do PC += 2 - call arg16 + @arg16 WZ = TDAT; } macro jr - call arg - TADR = PC-1; - 5 * call nomreq_addr - PC += (s8)TDAT8; WZ = PC; + @arg + 5 * @nomreq_addr PC-1 + PC += (s8)TDAT8; + WZ = PC; macro t6a84:jr - call arg - TADR = PC-1; - 5 * call nomreq_addr - PC += (s8)TDAT8; WZ = PC; + @arg + 5 * @nomreq_addr PC-1 + PC += (s8)TDAT8; + WZ = PC; paged_jump(); macro r800:jr - call arg - TADR = PC-1; + @arg + 1 - PC += (s8)TDAT8; WZ = PC; + PC += (s8)TDAT8; + WZ = PC; macro jr_cond if (TDAT8) { - call jr + @jr } else { - call arg + @arg } macro arg16_call - call arg16 - m_ea = TDAT; TADR = PC-1; - call nomreq_addr - WZ = m_ea; TDAT = PC; - call wm16_sp + @arg16 + m_ea = TDAT; + @nomreq_addr PC-1 + WZ = m_ea; + @wm16_sp PC PC = m_ea; macro r800:arg16_call - call arg16 - m_ea = TDAT; TADR = PC-1; - call nomreq_addr - WZ = m_ea; TDAT = PC; - call wm16_sp + @arg16 + m_ea = TDAT; + @nomreq_addr PC-1 + WZ = m_ea; + @wm16_sp PC PC = m_ea; macro call_cond if (TDAT8) { - call arg16_call + @arg16_call } else { - call arg16 + @arg16 WZ = TDAT; } macro ret_cond - call nomreq_ir 1 + @nomreq_ir 1 if (TDAT8) { - call pop - PC = TDAT; WZ = PC; + @pop + PC = TDAT; + WZ = PC; } macro retn - call pop - PC = TDAT; LOGMASKED(LOG_INT, "RETN m_iff1:%d m_iff2:%d\n", m_iff1, m_iff2); WZ = PC; m_iff1 = m_iff2; + @pop + PC = TDAT; + LOGMASKED(LOG_INT, "RETN m_iff1:%d m_iff2:%d\n", m_iff1, m_iff2); + WZ = PC; + m_iff1 = m_iff2; macro z80n:retn m_out_retn_seen_cb(0); - call pop + @pop if (m_stackless) { m_pc.b.l = m_in_nextreg_cb(0xc2); m_pc.b.h = m_in_nextreg_cb(0xc3); } else { PC = TDAT; } - LOGMASKED(LOG_INT, "RETN m_iff1:%d m_iff2:%d\n", m_iff1, m_iff2); WZ = PC; m_iff1 = m_iff2; + LOGMASKED(LOG_INT, "RETN m_iff1:%d m_iff2:%d\n", m_iff1, m_iff2); + WZ = PC; + m_iff1 = m_iff2; macro reti - call pop - PC = TDAT; WZ = PC; m_iff1 = m_iff2; + @pop + PC = TDAT; + WZ = PC; + m_iff1 = m_iff2; daisy_call_reti_device(); macro t6a84:reti - call pop - PC = TDAT; WZ = PC; m_iff1 = m_iff2; + @pop + PC = TDAT; + WZ = PC; + m_iff1 = m_iff2; paged_reti(); daisy_call_reti_device(); macro ld_r_a - call nomreq_ir 1 - m_r = A; m_r2 = A & 0x80; // keep bit 7 of r + @nomreq_ir 1 + m_r = A; + m_r2 = A & 0x80; // keep bit 7 of r macro r800:ld_r_a - m_r = A; m_r2 = A & 0x80; // keep bit 7 of r + m_r = A; + m_r2 = A & 0x80; // keep bit 7 of r macro ld_a_r - call nomreq_ir 1 - A = (m_r & 0x7f) | m_r2; set_f((F & CF) | SZ[A] | (m_iff2 << 2)); + @nomreq_ir 1 + A = (m_r & 0x7f) | m_r2; + set_f((F & CF) | SZ[A] | (m_iff2 << 2)); if (HAS_LDAIR_QUIRK) set_service_attention<SA_AFTER_LDAIR, 1>(); macro r800:ld_a_r - A = (m_r & 0x7f) | m_r2; set_f((F & CF) | SZ[A] | (m_iff2 << 2)); + A = (m_r & 0x7f) | m_r2; + set_f((F & CF) | SZ[A] | (m_iff2 << 2)); if (HAS_LDAIR_QUIRK) set_service_attention<SA_AFTER_LDAIR, 1>(); macro ld_i_a - call nomreq_ir 1 + @nomreq_ir 1 m_i = A; macro r800:ld_i_a m_i = A; macro ld_a_i - call nomreq_ir 1 - A = m_i; set_f((F & CF) | SZ[A] | (m_iff2 << 2)); + @nomreq_ir 1 + A = m_i; + set_f((F & CF) | SZ[A] | (m_iff2 << 2)); if (HAS_LDAIR_QUIRK) set_service_attention<SA_AFTER_LDAIR, 1>(); macro r800:ld_a_i - A = m_i; set_f((F & CF) | SZ[A] | (m_iff2 << 2)); + A = m_i; + set_f((F & CF) | SZ[A] | (m_iff2 << 2)); if (HAS_LDAIR_QUIRK) set_service_attention<SA_AFTER_LDAIR, 1>(); macro rst addr - TDAT = PC; - call push - PC = addr; WZ = PC; + @push PC + PC = addr; + WZ = PC; macro rrd - TADR = HL; - call rm + @rm HL WZ = HL+1; - 4 * call nomreq_addr - TDAT_H = TDAT8; TDAT8 = (TDAT8 >> 4) | (A << 4); - call wm - A = (A & 0xf0) | (TDAT_H & 0x0f); set_f((F & CF) | SZP[A]); + 4 * @nomreq_addr HL + TDAT_H = TDAT8; + TDAT8 = (TDAT8 >> 4) | (A << 4); + @wm HL + A = (A & 0xf0) | (TDAT_H & 0x0f); + set_f((F & CF) | SZP[A]); macro rld - TADR = HL; - call rm + @rm HL WZ = HL+1; - 4 * call nomreq_addr - TDAT_H = TDAT8; TDAT8 = (TDAT8 << 4) | (A & 0x0f); - call wm - A = (A & 0xf0) | (TDAT_H >> 4); set_f((F & CF) | SZP[A]); - -macro ex_sp - TDAT2 = TDAT; - call pop - TADR = SP-1; - call nomreq_addr - using std::swap; std::swap(TDAT, TDAT2); - call wm16_sp - TADR = SP; - 2 * call nomreq_addr - using std::swap; std::swap(TDAT, TDAT2); WZ = TDAT; + 4 * @nomreq_addr HL + TDAT_H = TDAT8; + TDAT8 = (TDAT8 << 4) | (A & 0x0f); + @wm HL + A = (A & 0xf0) | (TDAT_H >> 4); + set_f((F & CF) | SZP[A]); + +macro ex_sp %d16 + @pop + @nomreq_addr SP-1 + @wm16_sp %d16 + %d16 = TDAT; + 2 * @nomreq_addr SP + WZ = TDAT; macro add16 - call nomreq_ir 7 - { u32 res = TDAT + TDAT2; WZ = TDAT + 1; set_f((F & (SF | ZF | VF)) | (((TDAT ^ res ^ TDAT2) >> 8) & HF) | ((res >> 16) & CF) | ((res >> 8) & (YF | XF))); TDAT = (u16)res; } +{ + @nomreq_ir 7 + u32 res = TDAT + TDAT2; + WZ = TDAT + 1; + set_f((F & (SF | ZF | VF)) | (((TDAT ^ res ^ TDAT2) >> 8) & HF) | ((res >> 16) & CF) | ((res >> 8) & (YF | XF))); + TDAT = (u16)res; +} macro r800:add16 - { u32 res = TDAT + TDAT2; WZ = TDAT + 1; set_f((F & (SF | ZF | VF)) | (((TDAT ^ res ^ TDAT2) >> 8) & HF) | ((res >> 16) & CF) | ((res >> 8) & (YF | XF))); TDAT = (u16)res; } +{ + u32 res = TDAT + TDAT2; + WZ = TDAT + 1; + set_f((F & (SF | ZF | VF)) | (((TDAT ^ res ^ TDAT2) >> 8) & HF) | ((res >> 16) & CF) | ((res >> 8) & (YF | XF))); + TDAT = (u16)res; +} macro adc_hl - call nomreq_ir 7 - { u32 res = HL + TDAT + (F & CF); WZ = HL + 1; set_f((((HL ^ res ^ TDAT) >> 8) & HF) | ((res >> 16) & CF) | ((res >> 8) & (SF | YF | XF)) | ((res & 0xffff) ? 0 : ZF) | (((TDAT ^ HL ^ 0x8000) & (TDAT ^ res) & 0x8000) >> 13)); HL = (u16)res; } +{ + @nomreq_ir 7 + u32 res = HL + TDAT + (F & CF); + WZ = HL + 1; + set_f((((HL ^ res ^ TDAT) >> 8) & HF) | ((res >> 16) & CF) | ((res >> 8) & (SF | YF | XF)) | ((res & 0xffff) ? 0 : ZF) | (((TDAT ^ HL ^ 0x8000) & (TDAT ^ res) & 0x8000) >> 13)); + HL = (u16)res; +} macro r800:adc_hl - { u32 res = HL + TDAT + (F & CF); WZ = HL + 1; set_f((((HL ^ res ^ TDAT) >> 8) & HF) | ((res >> 16) & CF) | ((res >> 8) & (SF | YF | XF)) | ((res & 0xffff) ? 0 : ZF) | (((TDAT ^ HL ^ 0x8000) & (TDAT ^ res) & 0x8000) >> 13)); HL = (u16)res; } +{ + u32 res = HL + TDAT + (F & CF); + WZ = HL + 1; + set_f((((HL ^ res ^ TDAT) >> 8) & HF) | ((res >> 16) & CF) | ((res >> 8) & (SF | YF | XF)) | ((res & 0xffff) ? 0 : ZF) | (((TDAT ^ HL ^ 0x8000) & (TDAT ^ res) & 0x8000) >> 13)); + HL = (u16)res; +} macro sbc_hl - call nomreq_ir 7 - { u32 res = HL - TDAT - (F & CF); WZ = HL + 1; set_f((((HL ^ res ^ TDAT) >> 8) & HF) | NF | ((res >> 16) & CF) | ((res >> 8) & (SF | YF | XF)) | ((res & 0xffff) ? 0 : ZF) | (((TDAT ^ HL) & (HL ^ res) &0x8000) >> 13)); HL = (u16)res; } +{ + @nomreq_ir 7 + u32 res = HL - TDAT - (F & CF); + WZ = HL + 1; + set_f((((HL ^ res ^ TDAT) >> 8) & HF) | NF | ((res >> 16) & CF) | ((res >> 8) & (SF | YF | XF)) | ((res & 0xffff) ? 0 : ZF) | (((TDAT ^ HL) & (HL ^ res) & 0x8000) >> 13)); + HL = (u16)res; +} macro r800:sbc_hl - { u32 res = HL - TDAT - (F & CF); WZ = HL + 1; set_f((((HL ^ res ^ TDAT) >> 8) & HF) | NF | ((res >> 16) & CF) | ((res >> 8) & (SF | YF | XF)) | ((res & 0xffff) ? 0 : ZF) | (((TDAT ^ HL) & (HL ^ res) &0x8000) >> 13)); HL = (u16)res; } +{ + u32 res = HL - TDAT - (F & CF); + WZ = HL + 1; + set_f((((HL ^ res ^ TDAT) >> 8) & HF) | NF | ((res >> 16) & CF) | ((res >> 8) & (SF | YF | XF)) | ((res & 0xffff) ? 0 : ZF) | (((TDAT ^ HL) & (HL ^ res) & 0x8000) >> 13)); + HL = (u16)res; +} macro ldi - TADR = HL; - call rm - TADR = DE; - call wm - 2 * call nomreq_addr - set_f(F & (SF | ZF | CF)); if ((A + TDAT8) & 0x02) F |= YF; if ((A + TDAT8) & 0x08) F |= XF; HL++; DE++; BC--; if(BC) F |= VF; + @rm HL + @wm DE + 2 * @nomreq_addr DE + set_f(F & (SF | ZF | CF)); + if ((A + TDAT8) & 0x02) + F |= YF; + if ((A + TDAT8) & 0x08) + F |= XF; + HL++; + DE++; + BC--; + if (BC) + F |= VF; macro r800:ldi - TADR = HL; - call rm - TADR = DE; - call wm - call nomreq_addr - set_f(F & (SF | ZF | CF)); if ((A + TDAT8) & 0x02) F |= YF; if ((A + TDAT8) & 0x08) F |= XF; HL++; DE++; BC--; if(BC) F |= VF; + @rm HL + @wm DE + @nomreq_addr DE + set_f(F & (SF | ZF | CF)); + if ((A + TDAT8) & 0x02) + F |= YF; + if ((A + TDAT8) & 0x08) + F |= XF; + HL++; + DE++; + BC--; + if (BC) + F |= VF; macro cpi - TADR = HL; - call rm - 5 * call nomreq_addr - { u8 res = A - TDAT8; WZ++; HL++; BC--; set_f((F & CF) | (SZ[res]&~(YF|XF)) | ((A^TDAT8^res)&HF) | NF); if (F & HF) res -= 1; if (res & 0x02) F |= YF; if (res & 0x08) F |= XF; if (BC) F |= VF; } +{ + @rm HL + 5 * @nomreq_addr HL + u8 res = A - TDAT8; + WZ++; + HL++; + BC--; + set_f((F & CF) | (SZ[res]&~(YF|XF)) | ((A^TDAT8^res)&HF) | NF); + if (F & HF) + res -= 1; + if (res & 0x02) + F |= YF; + if (res & 0x08) + F |= XF; + if (BC) + F |= VF; +} macro r800:cpi - TADR = HL; - call rm - call nomreq_addr - { u8 res = A - TDAT8; WZ++; HL++; BC--; set_f((F & CF) | (SZ[res]&~(YF|XF)) | ((A^TDAT8^res)&HF) | NF); if (F & HF) res -= 1; if (res & 0x02) F |= YF; if (res & 0x08) F |= XF; if (BC) F |= VF; } +{ + @rm HL + @nomreq_addr HL + u8 res = A - TDAT8; + WZ++; + HL++; + BC--; + set_f((F & CF) | (SZ[res]&~(YF|XF)) | ((A^TDAT8^res)&HF) | NF); + if (F & HF) + res -= 1; + if (res & 0x02) + F |= YF; + if (res & 0x08) + F |= XF; + if (BC) + F |= VF; +} macro ini - call nomreq_ir 1 - TADR = BC; - call in - WZ = BC + 1; B--; TADR = HL; - call wm - { HL++; set_f(SZ[B]); unsigned t = (unsigned)((C + 1) & 0xff) + (unsigned)TDAT8; if (TDAT8 & SF) F |= NF; if (t & 0x100) F |= HF | CF; F |= SZP[(u8)(t & 0x07) ^ B] & PF; } +{ + @nomreq_ir 1 + @in BC + WZ = BC + 1; + B--; + @wm HL + HL++; + set_f(SZ[B]); + unsigned t = (unsigned)((C + 1) & 0xff) + (unsigned)TDAT8; + if (TDAT8 & SF) + F |= NF; + if (t & 0x100) + F |= HF | CF; + F |= SZP[(u8)(t & 0x07) ^ B] & PF; +} macro r800:ini - TADR = BC; - call in - WZ = BC + 1; B--; TADR = HL; - call wm - { HL++; set_f(SZ[B]); unsigned t = (unsigned)((C + 1) & 0xff) + (unsigned)TDAT8; if (TDAT8 & SF) F |= NF; if (t & 0x100) F |= HF | CF; F |= SZP[(u8)(t & 0x07) ^ B] & PF; } +{ + @in BC + WZ = BC + 1; + B--; + @wm HL + HL++; + set_f(SZ[B]); + unsigned t = (unsigned)((C + 1) & 0xff) + (unsigned)TDAT8; + if (TDAT8 & SF) + F |= NF; + if (t & 0x100) + F |= HF | CF; + F |= SZP[(u8)(t & 0x07) ^ B] & PF; +} macro outi - call nomreq_ir 1 - TADR = HL; - call rm - B--; WZ = BC + 1; TADR = BC; - call out - { HL++; set_f(SZ[B]); unsigned t = (unsigned)L + (unsigned)TDAT8; if (TDAT8 & SF) F |= NF; if (t & 0x100) F |= HF | CF; F |= SZP[(u8)(t & 0x07) ^ B] & PF; } +{ + @nomreq_ir 1 + @rm HL + B--; + WZ = BC + 1; + @out BC + HL++; + set_f(SZ[B]); + unsigned t = (unsigned)L + (unsigned)TDAT8; + if (TDAT8 & SF) + F |= NF; + if (t & 0x100) + F |= HF | CF; + F |= SZP[(u8)(t & 0x07) ^ B] & PF; +} macro r800:outi - TADR = HL; - call rm - B--; WZ = BC + 1; TADR = BC; - call out - { HL++; set_f(SZ[B]); unsigned t = (unsigned)L + (unsigned)TDAT8; if (TDAT8 & SF) F |= NF; if (t & 0x100) F |= HF | CF; F |= SZP[(u8)(t & 0x07) ^ B] & PF; } +{ + @rm HL + B--; + WZ = BC + 1; + @out BC + HL++; + set_f(SZ[B]); + unsigned t = (unsigned)L + (unsigned)TDAT8; + if (TDAT8 & SF) + F |= NF; + if (t & 0x100) + F |= HF | CF; + F |= SZP[(u8)(t & 0x07) ^ B] & PF; +} macro ldd - TADR = HL; - call rm - TADR = DE; - call wm - 2 * call nomreq_addr - { set_f(F & (SF | ZF | CF)); if ((A + TDAT8) & 0x02) F |= YF; if ((A + TDAT8) & 0x08) F |= XF; HL--; DE--; BC--; if (BC) F |= VF; } +{ + @rm HL + @wm DE + 2 * @nomreq_addr DE + set_f(F & (SF | ZF | CF)); + if ((A + TDAT8) & 0x02) + F |= YF; + if ((A + TDAT8) & 0x08) + F |= XF; + HL--; + DE--; + BC--; + if (BC) + F |= VF; +} macro r800:ldd - TADR = HL; - call rm - TADR = DE; - call wm - call nomreq_addr - { set_f(F & (SF | ZF | CF)); if ((A + TDAT8) & 0x02) F |= YF; if ((A + TDAT8) & 0x08) F |= XF; HL--; DE--; BC--; if (BC) F |= VF; } +{ + @rm HL + @wm DE + @nomreq_addr DE + set_f(F & (SF | ZF | CF)); + if ((A + TDAT8) & 0x02) + F |= YF; + if ((A + TDAT8) & 0x08) + F |= XF; + HL--; + DE--; + BC--; + if (BC) + F |= VF; +} macro cpd - TADR = HL; - call rm - TADR = HL; - 5 * call nomreq_addr - { u8 res = A - TDAT8; WZ--; HL--; BC--; set_f((F & CF) | (SZ[res]&~(YF|XF)) | ((A^TDAT8^res)&HF) | NF); if (F & HF) res -= 1; if (res & 0x02) F |= YF; if (res & 0x08) F |= XF; if (BC) F |= VF; } +{ + @rm HL + 5 * @nomreq_addr HL + u8 res = A - TDAT8; + WZ--; + HL--; + BC--; + set_f((F & CF) | (SZ[res]&~(YF|XF)) | ((A^TDAT8^res)&HF) | NF); + if (F & HF) + res -= 1; + if (res & 0x02) + F |= YF; + if (res & 0x08) + F |= XF; + if (BC) + F |= VF; +} macro r800:cpd - TADR = HL; - call rm - TADR = HL; - call nomreq_addr - { u8 res = A - TDAT8; WZ--; HL--; BC--; set_f((F & CF) | (SZ[res]&~(YF|XF)) | ((A^TDAT8^res)&HF) | NF); if (F & HF) res -= 1; if (res & 0x02) F |= YF; if (res & 0x08) F |= XF; if (BC) F |= VF; } +{ + @rm HL + @nomreq_addr HL + u8 res = A - TDAT8; + WZ--; + HL--; + BC--; + set_f((F & CF) | (SZ[res]&~(YF|XF)) | ((A^TDAT8^res)&HF) | NF); + if (F & HF) + res -= 1; + if (res & 0x02) + F |= YF; + if (res & 0x08) + F |= XF; + if (BC) + F |= VF; +} macro ind - call nomreq_ir 1 - TADR = BC; - call in - WZ = BC - 1; B--; TADR = HL; - call wm - { HL--; set_f(SZ[B]); unsigned t = ((unsigned)(C - 1) & 0xff) + (unsigned)TDAT8; if (TDAT8 & SF) F |= NF; if (t & 0x100) F |= HF | CF; F |= SZP[(u8)(t & 0x07) ^ B] & PF; } +{ + @nomreq_ir 1 + @in BC + WZ = BC - 1; + B--; + @wm HL + HL--; + set_f(SZ[B]); + unsigned t = ((unsigned)(C - 1) & 0xff) + (unsigned)TDAT8; + if (TDAT8 & SF) + F |= NF; + if (t & 0x100) + F |= HF | CF; + F |= SZP[(u8)(t & 0x07) ^ B] & PF; +} macro r800:ind - TADR = BC; - call in - WZ = BC - 1; B--; TADR = HL; - call wm - { HL--; set_f(SZ[B]); unsigned t = ((unsigned)(C - 1) & 0xff) + (unsigned)TDAT8; if (TDAT8 & SF) F |= NF; if (t & 0x100) F |= HF | CF; F |= SZP[(u8)(t & 0x07) ^ B] & PF; } +{ + @in BC + WZ = BC - 1; + B--; + @wm HL + HL--; + set_f(SZ[B]); + unsigned t = ((unsigned)(C - 1) & 0xff) + (unsigned)TDAT8; + if (TDAT8 & SF) + F |= NF; + if (t & 0x100) + F |= HF | CF; + F |= SZP[(u8)(t & 0x07) ^ B] & PF; +} macro outd - call nomreq_ir 1 - TADR = HL; - call rm - B--; WZ = BC - 1; TADR = BC; - call out - { HL--; set_f(SZ[B]); unsigned t = (unsigned)L + (unsigned)TDAT8; if (TDAT8 & SF) F |= NF; if (t & 0x100) F |= HF | CF; F |= SZP[(u8)(t & 0x07) ^ B] & PF; } +{ + @nomreq_ir 1 + @rm HL + B--; + WZ = BC - 1; + @out BC + HL--; + set_f(SZ[B]); + unsigned t = (unsigned)L + (unsigned)TDAT8; + if (TDAT8 & SF) + F |= NF; + if (t & 0x100) + F |= HF | CF; + F |= SZP[(u8)(t & 0x07) ^ B] & PF; +} macro r800:outd - TADR = HL; - call rm - B--; WZ = BC - 1; TADR = BC; - call out - { HL--; set_f(SZ[B]); unsigned t = (unsigned)L + (unsigned)TDAT8; if (TDAT8 & SF) F |= NF; if (t & 0x100) F |= HF | CF; F |= SZP[(u8)(t & 0x07) ^ B] & PF; } +{ + @rm HL + B--; + WZ = BC - 1; + @out BC + HL--; + set_f(SZ[B]); + unsigned t = (unsigned)L + (unsigned)TDAT8; + if (TDAT8 & SF) + F |= NF; + if (t & 0x100) + F |= HF | CF; + F |= SZP[(u8)(t & 0x07) ^ B] & PF; +} macro ldir - call ldi + @ldi if (BC != 0) { - TADR = DE; - 5 * call nomreq_addr - PC -= 2; WZ = PC + 1; F &= ~(YF | XF); F |= (PC >> 8) & (YF | XF); + 5 * @nomreq_addr DE + PC -= 2; + WZ = PC + 1; + F &= ~(YF | XF); + F |= (PC >> 8) & (YF | XF); } macro r800:ldir - call ldi + @ldi if (BC != 0) { - TADR = DE; - call nomreq_addr - PC -= 2; WZ = PC + 1; F &= ~(YF | XF); F |= (PC >> 8) & (YF | XF); + @nomreq_addr DE + PC -= 2; + WZ = PC + 1; + F &= ~(YF | XF); + F |= (PC >> 8) & (YF | XF); } macro cpir - call cpi + @cpi if (BC != 0 && !(F & ZF)) { - TADR = HL; - 5 * call nomreq_addr - PC -= 2; WZ = PC + 1; F &= ~(YF | XF); F |= (PC >> 8) & (YF | XF); + 5 * @nomreq_addr HL + PC -= 2; + WZ = PC + 1; + F &= ~(YF | XF); + F |= (PC >> 8) & (YF | XF); } macro r800:cpir - call cpi - call nomreq_addr + @cpi + @nomreq_addr HL if (BC != 0 && !(F & ZF)) { - TADR = HL; - PC -= 2; WZ = PC + 1; F &= ~(YF | XF); F |= (PC >> 8) & (YF | XF); + PC -= 2; + WZ = PC + 1; + F &= ~(YF | XF); + F |= (PC >> 8) & (YF | XF); } macro inir - call ini + @ini if (B != 0) { - TADR = HL; - 5 * call nomreq_addr - PC -= 2; block_io_interrupted_flags(); + 5 * @nomreq_addr HL + PC -= 2; + block_io_interrupted_flags(); } macro r800:inir - if (B == 1) - T(1); - call ini + if (B == 1) { + + 1 + ; + } + @ini if (B != 0) { - TADR = HL; - PC -= 2; block_io_interrupted_flags(); + PC -= 2; + block_io_interrupted_flags(); } macro otir - call outi + @outi if (B != 0) { - TADR = BC; - 5 * call nomreq_addr - PC -= 2; block_io_interrupted_flags(); + 5 * @nomreq_addr BC + PC -= 2; + block_io_interrupted_flags(); } macro r800:otir - if (B == 1) - T(1); - call outi + if (B == 1) { + + 1 + ; + } + @outi if (B != 0) { - TADR = BC; - 5 * call nomreq_addr - PC -= 2; block_io_interrupted_flags(); + 5 * @nomreq_addr BC + PC -= 2; + block_io_interrupted_flags(); } macro lddr - call ldd + @ldd if (BC != 0) { - TADR = DE; - 5 * call nomreq_addr - PC -= 2; WZ = PC + 1; F &= ~(YF | XF); F |= (PC >> 8) & (YF | XF); + 5 * @nomreq_addr DE + PC -= 2; + WZ = PC + 1; + F &= ~(YF | XF); + F |= (PC >> 8) & (YF | XF); } macro r800:lddr - call ldd + @ldd if (BC != 0) { - TADR = DE; - call nomreq_addr - PC -= 2; WZ = PC + 1; F &= ~(YF | XF); F |= (PC >> 8) & (YF | XF); + @nomreq_addr DE + PC -= 2; + WZ = PC + 1; + F &= ~(YF | XF); + F |= (PC >> 8) & (YF | XF); } macro cpdr - call cpd + @cpd if (BC != 0 && !(F & ZF)) { - TADR = HL; - 5 * call nomreq_addr - PC -= 2; WZ = PC + 1; F &= ~(YF | XF); F |= (PC >> 8) & (YF | XF); + 5 * @nomreq_addr HL + PC -= 2; + WZ = PC + 1; + F &= ~(YF | XF); + F |= (PC >> 8) & (YF | XF); } macro r800:cpdr - call cpd - call nomreq_addr + @cpd + @nomreq_addr HL /* suspected wrong. must be inside if? */ if (BC != 0 && !(F & ZF)) { - TADR = HL; - PC -= 2; WZ = PC + 1; F &= ~(YF | XF); F |= (PC >> 8) & (YF | XF); + PC -= 2; + WZ = PC + 1; + F &= ~(YF | XF); + F |= (PC >> 8) & (YF | XF); } macro indr - call ind + @ind if (B != 0) { - TADR = HL; - 5 * call nomreq_addr - PC -= 2; block_io_interrupted_flags(); + 5 * @nomreq_addr HL + PC -= 2; + block_io_interrupted_flags(); } macro r800:indr - if (B == 1) - T(1); - call ind + if (B == 1) { + + 1 + ; + } + @ind if (B != 0) { - TADR = HL; - PC -= 2; block_io_interrupted_flags(); + PC -= 2; + block_io_interrupted_flags(); } macro otdr - call outd + @outd if (B != 0) { - TADR = BC; - 5 * call nomreq_addr - PC -= 2; block_io_interrupted_flags(); + 5 * @nomreq_addr BC + PC -= 2; + block_io_interrupted_flags(); } macro r800:otdr - if (B == 1) - T(1); - call outd + if (B == 1) { + + 1 + ; + } + @outd if (B != 0) { - TADR = BC; - PC -= 2; block_io_interrupted_flags(); + PC -= 2; + block_io_interrupted_flags(); } macro jump %po @@ -556,28 +792,27 @@ macro take_nmi m_iff1 = 0; m_r++; + 5 - TDAT = PC; - call wm16_sp + @wm16_sp PC PC = 0x0066; WZ = PC; set_service_attention<SA_NMI_PENDING, 0>(); macro irqfetch - { - // fetch the IRQ vector - device_z80daisy_interface *intf = daisy_get_irq_device(); - m_tmp_irq_vector = (intf != nullptr) ? intf->z80daisy_irq_ack() : standard_irq_callback(0, m_pc.w); - LOGMASKED(LOG_INT, "single INT m_tmp_irq_vector $%02x\n", m_tmp_irq_vector); - } +{ + // fetch the IRQ vector + device_z80daisy_interface *intf = daisy_get_irq_device(); + m_tmp_irq_vector = (intf != nullptr) ? intf->z80daisy_irq_ack() : standard_irq_callback(0, m_pc.w); + LOGMASKED(LOG_INT, "single INT m_tmp_irq_vector $%02x\n", m_tmp_irq_vector); +} macro t6a84:irqfetch - { - // fetch the IRQ vector - paged_irqfetch(); - device_z80daisy_interface *intf = daisy_get_irq_device(); - m_tmp_irq_vector = (intf != nullptr) ? intf->z80daisy_irq_ack() : standard_irq_callback(0, m_pc.w); - LOGMASKED(LOG_INT, "single INT m_tmp_irq_vector $%02x\n", m_tmp_irq_vector); - } +{ + // fetch the IRQ vector + paged_irqfetch(); + device_z80daisy_interface *intf = daisy_get_irq_device(); + m_tmp_irq_vector = (intf != nullptr) ? intf->z80daisy_irq_ack() : standard_irq_callback(0, m_pc.w); + LOGMASKED(LOG_INT, "single INT m_tmp_irq_vector $%02x\n", m_tmp_irq_vector); +} macro take_interrupt // check if processor was halted @@ -588,7 +823,7 @@ macro take_interrupt // Not precise in all cases. z80 must finish current instruction (NOP) to reach this state - in such case frame timings are shifter from cb event if calculated based on it. m_irqack_cb(1); m_r++; - call irqfetch + @irqfetch // 'interrupt latency' cycles + 2 // Interrupt mode 2. Call [i:databyte] @@ -598,11 +833,9 @@ macro take_interrupt // even, and all 8 bits will be used; even $FF is handled normally. // CALL opcode timing + 5 - TDAT = PC; - call wm16_sp + @wm16_sp PC m_tmp_irq_vector = (m_tmp_irq_vector & 0xff) | (m_i << 8); - TADR = m_tmp_irq_vector; - call rm16 + @rm16 m_tmp_irq_vector PC = TDAT; LOGMASKED(LOG_INT, "IM2 [$%04x] = $%04x\n", m_tmp_irq_vector, PC); } else if (m_im == 1) { @@ -610,8 +843,7 @@ macro take_interrupt LOGMASKED(LOG_INT, "'%s' IM1 $0038\n", tag()); // RST $38 + 5 - TDAT = PC; - call wm16_sp + @wm16_sp PC PC = 0x0038; } else { /* Interrupt mode 0. We check for CALL and JP instructions, @@ -624,8 +856,7 @@ macro take_interrupt if ((m_tmp_irq_vector & 0xff0000) == 0xcd0000) { // CALL $xxxx cycles + 11 - TDAT = PC; - call wm16_sp + @wm16_sp PC PC = m_tmp_irq_vector & 0xffff; } else if ((m_tmp_irq_vector & 0xff0000) == 0xc30000) { // JP $xxxx cycles @@ -634,8 +865,7 @@ macro take_interrupt } else if ((m_tmp_irq_vector & 0xc7) == 0xc7) { // RST $xx cycles + 5 - TDAT = PC; - call wm16_sp + @wm16_sp PC PC = m_tmp_irq_vector & 0x0038; } else if (m_tmp_irq_vector == 0xfb) { // EI cycles @@ -653,9 +883,9 @@ macro take_interrupt macro check_interrupts if (get_service_attention<SA_NMI_PENDING>()) { - call take_nmi + @take_nmi } else if (m_irq_state != CLEAR_LINE && m_iff1 && !get_service_attention<SA_AFTER_EI>()) { // SA_IRQ_ON - call take_interrupt + @take_interrupt } macro z80n:check_interrupts @@ -665,9 +895,9 @@ macro z80n:check_interrupts m_out_nextreg_cb(0xc2, m_pc.b.l); m_out_nextreg_cb(0xc3, m_pc.b.h); } - call take_nmi + @take_nmi } else if (m_irq_state != CLEAR_LINE && m_iff1 && !get_service_attention<SA_AFTER_EI>()) { - call take_interrupt + @take_interrupt } macro nsc800_take_interrupt @@ -678,16 +908,13 @@ macro nsc800_take_interrupt // 'interrupt latency' cycles + 7 if (m_nsc800_irq_state[0]) { - TDAT = PC; - call wm16_sp + @wm16_sp PC PC = 0x003c; } else if (m_nsc800_irq_state[1]) { - TDAT = PC; - call wm16_sp + @wm16_sp PC PC = 0x0034; } else if (m_nsc800_irq_state[2]) { - TDAT = PC; - call wm16_sp + @wm16_sp PC PC = 0x002c; } else { + 2 * m_memrq_cycles @@ -700,11 +927,11 @@ macro nsc800_take_interrupt macro nsc800:check_interrupts if (get_service_attention<SA_NMI_PENDING>()) { - call take_nmi + @take_nmi } else if (get_service_attention<SA_NSC800_IRQ_ON>() && m_iff1 && !get_service_attention<SA_AFTER_EI>()) { - call nsc800_take_interrupt + @nsc800_take_interrupt } else if (m_irq_state != CLEAR_LINE && m_iff1 && !get_service_attention<SA_AFTER_EI>()) { // SA_IRQ_ON - call take_interrupt + @take_interrupt } @@ -732,20 +959,20 @@ ffff set_service_attention<SA_BUSACK, 0>(); m_busack_cb(0); } - call check_interrupts - set_service_attention<SA_AFTER_EI, 0>(); // SA_AFTER_EI + @check_interrupts + set_service_attention<SA_AFTER_EI, 0>(); if (HAS_LDAIR_QUIRK) - set_service_attention<SA_AFTER_LDAIR, 0>(); // SA_AFTER_LDAIR + set_service_attention<SA_AFTER_LDAIR, 0>(); if (m_halt) { // SA_HALT debugger_wait_hook(); - call rop + @rop PC--; continue; } } PRVPC = PC; debugger_instruction_hook(PC); - call rop + @rop m_ref = (0x00 << 16) | (TDAT8 << 8); goto process; @@ -773,10 +1000,9 @@ cb05 # RLC L L = rlc(L); cb06 # RLC (HL) - TADR = HL; - call rm_reg + @rm_reg HL TDAT8 = rlc(TDAT8); - call wm + @wm HL cb07 # RLC A A = rlc(A); @@ -800,10 +1026,9 @@ cb0d # RRC L L = rrc(L); cb0e # RRC (HL) - TADR = HL; - call rm_reg + @rm_reg HL TDAT8 = rrc(TDAT8); - call wm + @wm HL cb0f # RRC A A = rrc(A); @@ -827,10 +1052,9 @@ cb15 # RL L L = rl(L); cb16 # RL (HL) - TADR = HL; - call rm_reg + @rm_reg HL TDAT8 = rl(TDAT8); - call wm + @wm HL cb17 # RL A A = rl(A); @@ -854,10 +1078,9 @@ cb1d # RR L L = rr(L); cb1e # RR (HL) - TADR = HL; - call rm_reg + @rm_reg HL TDAT8 = rr(TDAT8); - call wm + @wm HL cb1f # RR A A = rr(A); @@ -881,10 +1104,9 @@ cb25 # SLA L L = sla(L); cb26 # SLA (HL) - TADR = HL; - call rm_reg + @rm_reg HL TDAT8 = sla(TDAT8); - call wm + @wm HL cb27 # SLA A A = sla(A); @@ -908,10 +1130,9 @@ cb2d # SRA L L = sra(L); cb2e # SRA (HL) - TADR = HL; - call rm_reg + @rm_reg HL TDAT8 = sra(TDAT8); - call wm + @wm HL cb2f # SRA A A = sra(A); @@ -935,10 +1156,9 @@ cb35 # SLL L L = sll(L); cb36 # SLL (HL) - TADR = HL; - call rm_reg + @rm_reg HL TDAT8 = sll(TDAT8); - call wm + @wm HL cb37 # SLL A A = sll(A); @@ -962,10 +1182,9 @@ cb3d # SRL L L = srl(L); cb3e # SRL (HL) - TADR = HL; - call rm_reg + @rm_reg HL TDAT8 = srl(TDAT8); - call wm + @wm HL cb3f # SRL A A = srl(A); @@ -989,8 +1208,7 @@ cb45 # BIT 0,L bit(0, L); cb46 # BIT 0,(HL) - TADR = HL; - call rm_reg + @rm_reg HL bit_hl(0, TDAT8); cb47 # BIT 0,A @@ -1015,8 +1233,7 @@ cb4d # BIT 1,L bit(1, L); cb4e # BIT 1,(HL) - TADR = HL; - call rm_reg + @rm_reg HL bit_hl(1, TDAT8); cb4f # BIT 1,A @@ -1041,8 +1258,7 @@ cb55 # BIT 2,L bit(2, L); cb56 # BIT 2,(HL) - TADR = HL; - call rm_reg + @rm_reg HL bit_hl(2, TDAT8); cb57 # BIT 2,A @@ -1067,8 +1283,7 @@ cb5d # BIT 3,L bit(3, L); cb5e # BIT 3,(HL) - TADR = HL; - call rm_reg + @rm_reg HL bit_hl(3, TDAT8); cb5f # BIT 3,A @@ -1093,8 +1308,7 @@ cb65 # BIT 4,L bit(4, L); cb66 # BIT 4,(HL) - TADR = HL; - call rm_reg + @rm_reg HL bit_hl(4, TDAT8); cb67 # BIT 4,A @@ -1119,8 +1333,7 @@ cb6d # BIT 5,L bit(5, L); cb6e # BIT 5,(HL) - TADR = HL; - call rm_reg + @rm_reg HL bit_hl(5, TDAT8); cb6f # BIT 5,A @@ -1145,8 +1358,7 @@ cb75 # BIT 6,L bit(6, L); cb76 # BIT 6,(HL) - TADR = HL; - call rm_reg + @rm_reg HL bit_hl(6, TDAT8); cb77 # BIT 6,A @@ -1171,8 +1383,7 @@ cb7d # BIT 7,L bit(7, L); cb7e # BIT 7,(HL) - TADR = HL; - call rm_reg + @rm_reg HL bit_hl(7, TDAT8); cb7f # BIT 7,A @@ -1197,10 +1408,9 @@ cb85 # RES 0,L L = res(0, L); cb86 # RES 0,(HL) - TADR = HL; - call rm_reg + @rm_reg HL TDAT8 = res(0, TDAT8); - call wm + @wm HL cb87 # RES 0,A A = res(0, A); @@ -1224,10 +1434,9 @@ cb8d # RES 1,L L = res(1, L); cb8e # RES 1,(HL) - TADR = HL; - call rm_reg + @rm_reg HL TDAT8 = res(1, TDAT8); - call wm + @wm HL cb8f # RES 1,A A = res(1, A); @@ -1251,10 +1460,9 @@ cb95 # RES 2,L L = res(2, L); cb96 # RES 2,(HL) - TADR = HL; - call rm_reg + @rm_reg HL TDAT8 = res(2, TDAT8); - call wm + @wm HL cb97 # RES 2,A A = res(2, A); @@ -1278,10 +1486,9 @@ cb9d # RES 3,L L = res(3, L); cb9e # RES 3,(HL) - TADR = HL; - call rm_reg + @rm_reg HL TDAT8 = res(3, TDAT8); - call wm + @wm HL cb9f # RES 3,A A = res(3, A); @@ -1305,10 +1512,9 @@ cba5 # RES 4,L L = res(4, L); cba6 # RES 4,(HL) - TADR = HL; - call rm_reg + @rm_reg HL TDAT8 = res(4, TDAT8); - call wm + @wm HL cba7 # RES 4,A A = res(4, A); @@ -1332,10 +1538,9 @@ cbad # RES 5,L L = res(5, L); cbae # RES 5,(HL) - TADR = HL; - call rm_reg + @rm_reg HL TDAT8 = res(5, TDAT8); - call wm + @wm HL cbaf # RES 5,A A = res(5, A); @@ -1359,10 +1564,9 @@ cbb5 # RES 6,L L = res(6, L); cbb6 # RES 6,(HL) - TADR = HL; - call rm_reg + @rm_reg HL TDAT8 = res(6, TDAT8); - call wm + @wm HL cbb7 # RES 6,A A = res(6, A); @@ -1386,10 +1590,9 @@ cbbd # RES 7,L L = res(7, L); cbbe # RES 7,(HL) - TADR = HL; - call rm_reg + @rm_reg HL TDAT8 = res(7, TDAT8); - call wm + @wm HL cbbf # RES 7,A A = res(7, A); @@ -1413,10 +1616,9 @@ cbc5 # SET 0,L L = set(0, L); cbc6 # SET 0,(HL) - TADR = HL; - call rm_reg + @rm_reg HL TDAT8 = set(0, TDAT8); - call wm + @wm HL cbc7 # SET 0,A A = set(0, A); @@ -1440,10 +1642,9 @@ cbcd # SET 1,L L = set(1, L); cbce # SET 1,(HL) - TADR = HL; - call rm_reg + @rm_reg HL TDAT8 = set(1, TDAT8); - call wm + @wm HL cbcf # SET 1,A A = set(1, A); @@ -1467,10 +1668,9 @@ cbd5 # SET 2,L L = set(2, L); cbd6 # SET 2,(HL) - TADR = HL; - call rm_reg + @rm_reg HL TDAT8 = set(2, TDAT8); - call wm + @wm HL cbd7 # SET 2,A A = set(2, A); @@ -1494,10 +1694,9 @@ cbdd # SET 3,L L = set(3, L); cbde # SET 3,(HL) - TADR = HL; - call rm_reg + @rm_reg HL TDAT8 = set(3, TDAT8); - call wm + @wm HL cbdf # SET 3,A A = set(3, A); @@ -1521,10 +1720,9 @@ cbe5 # SET 4,L L = set(4, L); cbe6 # SET 4,(HL) - TADR = HL; - call rm_reg + @rm_reg HL TDAT8 = set(4, TDAT8); - call wm + @wm HL cbe7 # SET 4,A A = set(4, A); @@ -1548,10 +1746,9 @@ cbed # SET 5,L L = set(5, L); cbee # SET 5,(HL) - TADR = HL; - call rm_reg + @rm_reg HL TDAT8 = set(5, TDAT8); - call wm + @wm HL cbef # SET 5,A A = set(5, A); @@ -1575,10 +1772,9 @@ cbf5 # SET 6,L L = set(6, L); cbf6 # SET 6,(HL) - TADR = HL; - call rm_reg + @rm_reg HL TDAT8 = set(6, TDAT8); - call wm + @wm HL cbf7 # SET 6,A A = set(6, A); @@ -1602,10 +1798,9 @@ cbfd # SET 7,L L = set(7, L); cbfe # SET 7,(HL) - TADR = HL; - call rm_reg + @rm_reg HL TDAT8 = set(7, TDAT8); - call wm + @wm HL cbff # SET 7,A A = set(7, A); @@ -1616,1364 +1811,1332 @@ cbff # SET 7,A # rotate, shift and bit operations with (IX+o) ########################################################## fe00 # RLC B = (XY+o) - TADR = m_ea; - call rm_reg - B = rlc(TDAT8); TDAT8 = B; - call wm + @rm_reg m_ea + B = rlc(TDAT8); + TDAT8 = B; + @wm m_ea fe01 # RLC C = (XY+o) - TADR = m_ea; - call rm_reg - C = rlc(TDAT8); TDAT8 = C; - call wm + @rm_reg m_ea + C = rlc(TDAT8); + TDAT8 = C; + @wm m_ea fe02 # RLC D = (XY+o) - TADR = m_ea; - call rm_reg - D = rlc(TDAT8); TDAT8 = D; - call wm + @rm_reg m_ea + D = rlc(TDAT8); + TDAT8 = D; + @wm m_ea fe03 # RLC E = (XY+o) - TADR = m_ea; - call rm_reg - E = rlc(TDAT8); TDAT8 = E; - call wm + @rm_reg m_ea + E = rlc(TDAT8); + TDAT8 = E; + @wm m_ea fe04 # RLC H = (XY+o) - TADR = m_ea; - call rm_reg - H = rlc(TDAT8); TDAT8 = H; - call wm + @rm_reg m_ea + H = rlc(TDAT8); + TDAT8 = H; + @wm m_ea fe05 # RLC L = (XY+o) - TADR = m_ea; - call rm_reg - L = rlc(TDAT8); TDAT8 = L; - call wm + @rm_reg m_ea + L = rlc(TDAT8); + TDAT8 = L; + @wm m_ea fe06 # RLC (XY+o) - TADR = m_ea; - call rm_reg + @rm_reg m_ea TDAT8 = rlc(TDAT8); - call wm + @wm m_ea fe07 # RLC A = (XY+o) - TADR = m_ea; - call rm_reg - A = rlc(TDAT8); TDAT8 = A; - call wm + @rm_reg m_ea + A = rlc(TDAT8); + TDAT8 = A; + @wm m_ea fe08 # RRC B = (XY+o) - TADR = m_ea; - call rm_reg - B = rrc(TDAT8); TDAT8 = B; - call wm + @rm_reg m_ea + B = rrc(TDAT8); + TDAT8 = B; + @wm m_ea fe09 # RRC C = (XY+o) - TADR = m_ea; - call rm_reg - C = rrc(TDAT8); TDAT8 = C; - call wm + @rm_reg m_ea + C = rrc(TDAT8); + TDAT8 = C; + @wm m_ea fe0a # RRC D = (XY+o) - TADR = m_ea; - call rm_reg - D = rrc(TDAT8); TDAT8 = D; - call wm + @rm_reg m_ea + D = rrc(TDAT8); + TDAT8 = D; + @wm m_ea fe0b # RRC E = (XY+o) - TADR = m_ea; - call rm_reg - E = rrc(TDAT8); TDAT8 = E; - call wm + @rm_reg m_ea + E = rrc(TDAT8); + TDAT8 = E; + @wm m_ea fe0c # RRC H = (XY+o) - TADR = m_ea; - call rm_reg - H = rrc(TDAT8); TDAT8 = H; - call wm + @rm_reg m_ea + H = rrc(TDAT8); + TDAT8 = H; + @wm m_ea fe0d # RRC L = (XY+o) - TADR = m_ea; - call rm_reg - L = rrc(TDAT8); TDAT8 = L; - call wm + @rm_reg m_ea + L = rrc(TDAT8); + TDAT8 = L; + @wm m_ea fe0e # RRC (XY+o) - TADR = m_ea; - call rm_reg + @rm_reg m_ea TDAT8 = rrc(TDAT8); - call wm + @wm m_ea fe0f # RRC A = (XY+o) - TADR = m_ea; - call rm_reg - A = rrc(TDAT8); TDAT8 = A; - call wm + @rm_reg m_ea + A = rrc(TDAT8); + TDAT8 = A; + @wm m_ea fe10 # RL B = (XY+o) - TADR = m_ea; - call rm_reg - B = rl(TDAT8); TDAT8 = B; - call wm + @rm_reg m_ea + B = rl(TDAT8); + TDAT8 = B; + @wm m_ea fe11 # RL C = (XY+o) - TADR = m_ea; - call rm_reg - C = rl(TDAT8); TDAT8 = C; - call wm + @rm_reg m_ea + C = rl(TDAT8); + TDAT8 = C; + @wm m_ea fe12 # RL D = (XY+o) - TADR = m_ea; - call rm_reg - D = rl(TDAT8); TDAT8 = D; - call wm + @rm_reg m_ea + D = rl(TDAT8); + TDAT8 = D; + @wm m_ea fe13 # RL E = (XY+o) - TADR = m_ea; - call rm_reg - E = rl(TDAT8); TDAT8 = E; - call wm + @rm_reg m_ea + E = rl(TDAT8); + TDAT8 = E; + @wm m_ea fe14 # RL H = (XY+o) - TADR = m_ea; - call rm_reg - H = rl(TDAT8); TDAT8 = H; - call wm + @rm_reg m_ea + H = rl(TDAT8); + TDAT8 = H; + @wm m_ea fe15 # RL L = (XY+o) - TADR = m_ea; - call rm_reg - L = rl(TDAT8); TDAT8 = L; - call wm + @rm_reg m_ea + L = rl(TDAT8); + TDAT8 = L; + @wm m_ea fe16 # RL (XY+o) - TADR = m_ea; - call rm_reg + @rm_reg m_ea TDAT8 = rl(TDAT8); - call wm + @wm m_ea fe17 # RL A = (XY+o) - TADR = m_ea; - call rm_reg - A = rl(TDAT8); TDAT8 = A; - call wm + @rm_reg m_ea + A = rl(TDAT8); + TDAT8 = A; + @wm m_ea fe18 # RR B = (XY+o) - TADR = m_ea; - call rm_reg - B = rr(TDAT8); TDAT8 = B; - call wm + @rm_reg m_ea + B = rr(TDAT8); + TDAT8 = B; + @wm m_ea fe19 # RR C = (XY+o) - TADR = m_ea; - call rm_reg - C = rr(TDAT8); TDAT8 = C; - call wm + @rm_reg m_ea + C = rr(TDAT8); + TDAT8 = C; + @wm m_ea fe1a # RR D = (XY+o) - TADR = m_ea; - call rm_reg - D = rr(TDAT8); TDAT8 = D; - call wm + @rm_reg m_ea + D = rr(TDAT8); + TDAT8 = D; + @wm m_ea fe1b # RR E = (XY+o) - TADR = m_ea; - call rm_reg - E = rr(TDAT8); TDAT8 = E; - call wm + @rm_reg m_ea + E = rr(TDAT8); + TDAT8 = E; + @wm m_ea fe1c # RR H = (XY+o) - TADR = m_ea; - call rm_reg - H = rr(TDAT8); TDAT8 = H; - call wm + @rm_reg m_ea + H = rr(TDAT8); + TDAT8 = H; + @wm m_ea fe1d # RR L = (XY+o) - TADR = m_ea; - call rm_reg - L = rr(TDAT8); TDAT8 = L; - call wm + @rm_reg m_ea + L = rr(TDAT8); + TDAT8 = L; + @wm m_ea fe1e # RR (XY+o) - TADR = m_ea; - call rm_reg + @rm_reg m_ea TDAT8 = rr(TDAT8); - call wm + @wm m_ea fe1f # RR A = (XY+o) - TADR = m_ea; - call rm_reg - A = rr(TDAT8); TDAT8 = A; - call wm + @rm_reg m_ea + A = rr(TDAT8); + TDAT8 = A; + @wm m_ea fe20 # SLA B = (XY+o) - TADR = m_ea; - call rm_reg - B = sla(TDAT8); TDAT8 = B; - call wm + @rm_reg m_ea + B = sla(TDAT8); + TDAT8 = B; + @wm m_ea fe21 # SLA C = (XY+o) - TADR = m_ea; - call rm_reg - C = sla(TDAT8); TDAT8 = C; - call wm + @rm_reg m_ea + C = sla(TDAT8); + TDAT8 = C; + @wm m_ea fe22 # SLA D = (XY+o) - TADR = m_ea; - call rm_reg - D = sla(TDAT8); TDAT8 = D; - call wm + @rm_reg m_ea + D = sla(TDAT8); + TDAT8 = D; + @wm m_ea fe23 # SLA E = (XY+o) - TADR = m_ea; - call rm_reg - E = sla(TDAT8); TDAT8 = E; - call wm + @rm_reg m_ea + E = sla(TDAT8); + TDAT8 = E; + @wm m_ea fe24 # SLA H = (XY+o) - TADR = m_ea; - call rm_reg - H = sla(TDAT8); TDAT8 = H; - call wm + @rm_reg m_ea + H = sla(TDAT8); + TDAT8 = H; + @wm m_ea fe25 # SLA L = (XY+o) - TADR = m_ea; - call rm_reg - L = sla(TDAT8); TDAT8 = L; - call wm + @rm_reg m_ea + L = sla(TDAT8); + TDAT8 = L; + @wm m_ea fe26 # SLA (XY+o) - TADR = m_ea; - call rm_reg + @rm_reg m_ea TDAT8 = sla(TDAT8); - call wm + @wm m_ea fe27 # SLA A = (XY+o) - TADR = m_ea; - call rm_reg - A = sla(TDAT8); TDAT8 = A; - call wm + @rm_reg m_ea + A = sla(TDAT8); + TDAT8 = A; + @wm m_ea fe28 # SRA B = (XY+o) - TADR = m_ea; - call rm_reg - B = sra(TDAT8); TDAT8 = B; - call wm + @rm_reg m_ea + B = sra(TDAT8); + TDAT8 = B; + @wm m_ea fe29 # SRA C = (XY+o) - TADR = m_ea; - call rm_reg - C = sra(TDAT8); TDAT8 = C; - call wm + @rm_reg m_ea + C = sra(TDAT8); + TDAT8 = C; + @wm m_ea fe2a # SRA D = (XY+o) - TADR = m_ea; - call rm_reg - D = sra(TDAT8); TDAT8 = D; - call wm + @rm_reg m_ea + D = sra(TDAT8); + TDAT8 = D; + @wm m_ea fe2b # SRA E = (XY+o) - TADR = m_ea; - call rm_reg - E = sra(TDAT8); TDAT8 = E; - call wm + @rm_reg m_ea + E = sra(TDAT8); + TDAT8 = E; + @wm m_ea fe2c # SRA H = (XY+o) - TADR = m_ea; - call rm_reg - H = sra(TDAT8); TDAT8 = H; - call wm + @rm_reg m_ea + H = sra(TDAT8); + TDAT8 = H; + @wm m_ea fe2d # SRA L = (XY+o) - TADR = m_ea; - call rm_reg - L = sra(TDAT8); TDAT8 = L; - call wm + @rm_reg m_ea + L = sra(TDAT8); + TDAT8 = L; + @wm m_ea fe2e # SRA (XY+o) - TADR = m_ea; - call rm_reg + @rm_reg m_ea TDAT8 = sra(TDAT8); - call wm + @wm m_ea fe2f # SRA A = (XY+o) - TADR = m_ea; - call rm_reg - A = sra(TDAT8); TDAT8 = A; - call wm + @rm_reg m_ea + A = sra(TDAT8); + TDAT8 = A; + @wm m_ea fe30 # SLL B = (XY+o) - TADR = m_ea; - call rm_reg - B = sll(TDAT8); TDAT8 = B; - call wm + @rm_reg m_ea + B = sll(TDAT8); + TDAT8 = B; + @wm m_ea fe31 # SLL C = (XY+o) - TADR = m_ea; - call rm_reg - C = sll(TDAT8); TDAT8 = C; - call wm + @rm_reg m_ea + C = sll(TDAT8); + TDAT8 = C; + @wm m_ea fe32 # SLL D = (XY+o) - TADR = m_ea; - call rm_reg - D = sll(TDAT8); TDAT8 = D; - call wm + @rm_reg m_ea + D = sll(TDAT8); + TDAT8 = D; + @wm m_ea fe33 # SLL E = (XY+o) - TADR = m_ea; - call rm_reg - E = sll(TDAT8); TDAT8 = E; - call wm + @rm_reg m_ea + E = sll(TDAT8); + TDAT8 = E; + @wm m_ea fe34 # SLL H = (XY+o) - TADR = m_ea; - call rm_reg - H = sll(TDAT8); TDAT8 = H; - call wm + @rm_reg m_ea + H = sll(TDAT8); + TDAT8 = H; + @wm m_ea fe35 # SLL L = (XY+o) - TADR = m_ea; - call rm_reg - L = sll(TDAT8); TDAT8 = L; - call wm + @rm_reg m_ea + L = sll(TDAT8); + TDAT8 = L; + @wm m_ea fe36 # SLL (XY+o) - TADR = m_ea; - call rm_reg + @rm_reg m_ea TDAT8 = sll(TDAT8); - call wm + @wm m_ea fe37 # SLL A = (XY+o) - TADR = m_ea; - call rm_reg - A = sll(TDAT8); TDAT8 = A; - call wm + @rm_reg m_ea + A = sll(TDAT8); + TDAT8 = A; + @wm m_ea fe38 # SRL B = (XY+o) - TADR = m_ea; - call rm_reg - B = srl(TDAT8); TDAT8 = B; - call wm + @rm_reg m_ea + B = srl(TDAT8); + TDAT8 = B; + @wm m_ea fe39 # SRL C = (XY+o) - TADR = m_ea; - call rm_reg - C = srl(TDAT8); TDAT8 = C; - call wm + @rm_reg m_ea + C = srl(TDAT8); + TDAT8 = C; + @wm m_ea fe3a # SRL D = (XY+o) - TADR = m_ea; - call rm_reg - D = srl(TDAT8); TDAT8 = D; - call wm + @rm_reg m_ea + D = srl(TDAT8); + TDAT8 = D; + @wm m_ea fe3b # SRL E = (XY+o) - TADR = m_ea; - call rm_reg - E = srl(TDAT8); TDAT8 = E; - call wm + @rm_reg m_ea + E = srl(TDAT8); + TDAT8 = E; + @wm m_ea fe3c # SRL H = (XY+o) - TADR = m_ea; - call rm_reg - H = srl(TDAT8); TDAT8 = H; - call wm + @rm_reg m_ea + H = srl(TDAT8); + TDAT8 = H; + @wm m_ea fe3d # SRL L = (XY+o) - TADR = m_ea; - call rm_reg - L = srl(TDAT8); TDAT8 = L; - call wm + @rm_reg m_ea + L = srl(TDAT8); + TDAT8 = L; + @wm m_ea fe3e # SRL (XY+o) - TADR = m_ea; - call rm_reg + @rm_reg m_ea TDAT8 = srl(TDAT8); - call wm + @wm m_ea fe3f # SRL A = (XY+o) - TADR = m_ea; - call rm_reg - A = srl(TDAT8); TDAT8 = A; - call wm + @rm_reg m_ea + A = srl(TDAT8); + TDAT8 = A; + @wm m_ea fe40 # BIT 0,(XY+o) - call jump fe46 + @jump fe46 fe41 # BIT 0,(XY+o) - call jump fe46 + @jump fe46 fe42 # BIT 0,(XY+o) - call jump fe46 + @jump fe46 fe43 # BIT 0,(XY+o) - call jump fe46 + @jump fe46 fe44 # BIT 0,(XY+o) - call jump fe46 + @jump fe46 fe45 # BIT 0,(XY+o) - call jump fe46 + @jump fe46 fe46 # BIT 0,(XY+o) - TADR = m_ea; - call rm_reg + @rm_reg m_ea bit_xy(0, TDAT8); fe47 # BIT 0,(XY+o) - call jump fe46 + @jump fe46 fe48 # BIT 1,(XY+o) - call jump fe4e + @jump fe4e fe49 # BIT 1,(XY+o) - call jump fe4e + @jump fe4e fe4a # BIT 1,(XY+o) - call jump fe4e + @jump fe4e fe4b # BIT 1,(XY+o) - call jump fe4e + @jump fe4e fe4c # BIT 1,(XY+o) - call jump fe4e + @jump fe4e fe4d # BIT 1,(XY+o) - call jump fe4e + @jump fe4e fe4e # BIT 1,(XY+o) - TADR = m_ea; - call rm_reg + @rm_reg m_ea bit_xy(1, TDAT8); fe4f # BIT 1,(XY+o) - call jump fe4e + @jump fe4e fe50 # BIT 2,(XY+o) - call jump fe56 + @jump fe56 fe51 # BIT 2,(XY+o) - call jump fe56 + @jump fe56 fe52 # BIT 2,(XY+o) - call jump fe56 + @jump fe56 fe53 # BIT 2,(XY+o) - call jump fe56 + @jump fe56 fe54 # BIT 2,(XY+o) - call jump fe56 + @jump fe56 fe55 # BIT 2,(XY+o) - call jump fe56 + @jump fe56 fe56 # BIT 2,(XY+o) - TADR = m_ea; - call rm_reg + @rm_reg m_ea bit_xy(2, TDAT8); fe57 # BIT 2,(XY+o) - call jump fe56 + @jump fe56 fe58 # BIT 3,(XY+o) - call jump fe5e + @jump fe5e fe59 # BIT 3,(XY+o) - call jump fe5e + @jump fe5e fe5a # BIT 3,(XY+o) - call jump fe5e + @jump fe5e fe5b # BIT 3,(XY+o) - call jump fe5e + @jump fe5e fe5c # BIT 3,(XY+o) - call jump fe5e + @jump fe5e fe5d # BIT 3,(XY+o) - call jump fe5e + @jump fe5e fe5e # BIT 3,(XY+o) - TADR = m_ea; - call rm_reg + @rm_reg m_ea bit_xy(3, TDAT8); fe5f # BIT 3,(XY+o) - call jump fe5e + @jump fe5e fe60 # BIT 4,(XY+o) - call jump fe66 + @jump fe66 fe61 # BIT 4,(XY+o) - call jump fe66 + @jump fe66 fe62 # BIT 4,(XY+o) - call jump fe66 + @jump fe66 fe63 # BIT 4,(XY+o) - call jump fe66 + @jump fe66 fe64 # BIT 4,(XY+o) - call jump fe66 + @jump fe66 fe65 # BIT 4,(XY+o) - call jump fe66 + @jump fe66 fe66 # BIT 4,(XY+o) - TADR = m_ea; - call rm_reg + @rm_reg m_ea bit_xy(4, TDAT8); fe67 # BIT 4,(XY+o) - call jump fe66 + @jump fe66 fe68 # BIT 5,(XY+o) - call jump fe6e + @jump fe6e fe69 # BIT 5,(XY+o) - call jump fe6e + @jump fe6e fe6a # BIT 5,(XY+o) - call jump fe6e + @jump fe6e fe6b # BIT 5,(XY+o) - call jump fe6e + @jump fe6e fe6c # BIT 5,(XY+o) - call jump fe6e + @jump fe6e fe6d # BIT 5,(XY+o) - call jump fe6e + @jump fe6e fe6e # BIT 5,(XY+o) - TADR = m_ea; - call rm_reg + @rm_reg m_ea bit_xy(5, TDAT8); fe6f # BIT 5,(XY+o) - call jump fe6e + @jump fe6e fe70 # BIT 6,(XY+o) - call jump fe76 + @jump fe76 fe71 # BIT 6,(XY+o) - call jump fe76 + @jump fe76 fe72 # BIT 6,(XY+o) - call jump fe76 + @jump fe76 fe73 # BIT 6,(XY+o) - call jump fe76 + @jump fe76 fe74 # BIT 6,(XY+o) - call jump fe76 + @jump fe76 fe75 # BIT 6,(XY+o) - call jump fe76 + @jump fe76 fe76 # BIT 6,(XY+o) - TADR = m_ea; - call rm_reg + @rm_reg m_ea bit_xy(6, TDAT8); fe77 # BIT 6,(XY+o) - call jump fe76 + @jump fe76 fe78 # BIT 7,(XY+o) - call jump fe7e + @jump fe7e fe79 # BIT 7,(XY+o) - call jump fe7e + @jump fe7e fe7a # BIT 7,(XY+o) - call jump fe7e + @jump fe7e fe7b # BIT 7,(XY+o) - call jump fe7e + @jump fe7e fe7c # BIT 7,(XY+o) - call jump fe7e + @jump fe7e fe7d # BIT 7,(XY+o) - call jump fe7e + @jump fe7e fe7e # BIT 7,(XY+o) - TADR = m_ea; - call rm_reg + @rm_reg m_ea bit_xy(7, TDAT8); fe7f # BIT 7,(XY+o) - call jump fe7e + @jump fe7e fe80 # RES 0,B = (XY+o) - TADR = m_ea; - call rm_reg - B = res(0, TDAT8); TDAT8 = B; - call wm + @rm_reg m_ea + B = res(0, TDAT8); + TDAT8 = B; + @wm m_ea fe81 # RES 0,C = (XY+o) - TADR = m_ea; - call rm_reg - C = res(0, TDAT8); TDAT8 = C; - call wm + @rm_reg m_ea + C = res(0, TDAT8); + TDAT8 = C; + @wm m_ea fe82 # RES 0,D = (XY+o) - TADR = m_ea; - call rm_reg - D = res(0, TDAT8); TDAT8 = D; - call wm + @rm_reg m_ea + D = res(0, TDAT8); + TDAT8 = D; + @wm m_ea fe83 # RES 0,E = (XY+o) - TADR = m_ea; - call rm_reg - E = res(0, TDAT8); TDAT8 = E; - call wm + @rm_reg m_ea + E = res(0, TDAT8); + TDAT8 = E; + @wm m_ea fe84 # RES 0,H = (XY+o) - TADR = m_ea; - call rm_reg - H = res(0, TDAT8); TDAT8 = H; - call wm + @rm_reg m_ea + H = res(0, TDAT8); + TDAT8 = H; + @wm m_ea fe85 # RES 0,L = (XY+o) - TADR = m_ea; - call rm_reg - L = res(0, TDAT8); TDAT8 = L; - call wm + @rm_reg m_ea + L = res(0, TDAT8); + TDAT8 = L; + @wm m_ea fe86 # RES 0,(XY+o) - TADR = m_ea; - call rm_reg + @rm_reg m_ea TDAT8 = res(0, TDAT8); - call wm + @wm m_ea fe87 # RES 0,A = (XY+o) - TADR = m_ea; - call rm_reg - A = res(0, TDAT8); TDAT8 = A; - call wm + @rm_reg m_ea + A = res(0, TDAT8); + TDAT8 = A; + @wm m_ea fe88 # RES 1,B = (XY+o) - TADR = m_ea; - call rm_reg - B = res(1, TDAT8); TDAT8 = B; - call wm + @rm_reg m_ea + B = res(1, TDAT8); + TDAT8 = B; + @wm m_ea fe89 # RES 1,C = (XY+o) - TADR = m_ea; - call rm_reg - C = res(1, TDAT8); TDAT8 = C; - call wm + @rm_reg m_ea + C = res(1, TDAT8); + TDAT8 = C; + @wm m_ea fe8a # RES 1,D = (XY+o) - TADR = m_ea; - call rm_reg - D = res(1, TDAT8); TDAT8 = D; - call wm + @rm_reg m_ea + D = res(1, TDAT8); + TDAT8 = D; + @wm m_ea fe8b # RES 1,E = (XY+o) - TADR = m_ea; - call rm_reg - E = res(1, TDAT8); TDAT8 = E; - call wm + @rm_reg m_ea + E = res(1, TDAT8); + TDAT8 = E; + @wm m_ea fe8c # RES 1,H = (XY+o) - TADR = m_ea; - call rm_reg - H = res(1, TDAT8); TDAT8 = H; - call wm + @rm_reg m_ea + H = res(1, TDAT8); + TDAT8 = H; + @wm m_ea fe8d # RES 1,L = (XY+o) - TADR = m_ea; - call rm_reg - L = res(1, TDAT8); TDAT8 = L; - call wm + @rm_reg m_ea + L = res(1, TDAT8); + TDAT8 = L; + @wm m_ea fe8e # RES 1,(XY+o) - TADR = m_ea; - call rm_reg + @rm_reg m_ea TDAT8 = res(1, TDAT8); - call wm + @wm m_ea fe8f # RES 1,A = (XY+o) - TADR = m_ea; - call rm_reg - A = res(1, TDAT8); TDAT8 = A; - call wm + @rm_reg m_ea + A = res(1, TDAT8); + TDAT8 = A; + @wm m_ea fe90 # RES 2,B = (XY+o) - TADR = m_ea; - call rm_reg - B = res(2, TDAT8); TDAT8 = B; - call wm + @rm_reg m_ea + B = res(2, TDAT8); + TDAT8 = B; + @wm m_ea fe91 # RES 2,C = (XY+o) - TADR = m_ea; - call rm_reg - C = res(2, TDAT8); TDAT8 = C; - call wm + @rm_reg m_ea + C = res(2, TDAT8); + TDAT8 = C; + @wm m_ea fe92 # RES 2,D = (XY+o) - TADR = m_ea; - call rm_reg - D = res(2, TDAT8); TDAT8 = D; - call wm + @rm_reg m_ea + D = res(2, TDAT8); + TDAT8 = D; + @wm m_ea fe93 # RES 2,E = (XY+o) - TADR = m_ea; - call rm_reg - E = res(2, TDAT8); TDAT8 = E; - call wm + @rm_reg m_ea + E = res(2, TDAT8); + TDAT8 = E; + @wm m_ea fe94 # RES 2,H = (XY+o) - TADR = m_ea; - call rm_reg - H = res(2, TDAT8); TDAT8 = H; - call wm + @rm_reg m_ea + H = res(2, TDAT8); + TDAT8 = H; + @wm m_ea fe95 # RES 2,L = (XY+o) - TADR = m_ea; - call rm_reg - L = res(2, TDAT8); TDAT8 = L; - call wm + @rm_reg m_ea + L = res(2, TDAT8); + TDAT8 = L; + @wm m_ea fe96 # RES 2,(XY+o) - TADR = m_ea; - call rm_reg + @rm_reg m_ea TDAT8 = res(2, TDAT8); - call wm + @wm m_ea fe97 # RES 2,A = (XY+o) - TADR = m_ea; - call rm_reg - A = res(2, TDAT8); TDAT8 = A; - call wm + @rm_reg m_ea + A = res(2, TDAT8); + TDAT8 = A; + @wm m_ea fe98 # RES 3,B = (XY+o) - TADR = m_ea; - call rm_reg - B = res(3, TDAT8); TDAT8 = B; - call wm + @rm_reg m_ea + B = res(3, TDAT8); + TDAT8 = B; + @wm m_ea fe99 # RES 3,C = (XY+o) - TADR = m_ea; - call rm_reg - C = res(3, TDAT8); TDAT8 = C; - call wm + @rm_reg m_ea + C = res(3, TDAT8); + TDAT8 = C; + @wm m_ea fe9a # RES 3,D = (XY+o) - TADR = m_ea; - call rm_reg - D = res(3, TDAT8); TDAT8 = D; - call wm + @rm_reg m_ea + D = res(3, TDAT8); + TDAT8 = D; + @wm m_ea fe9b # RES 3,E = (XY+o) - TADR = m_ea; - call rm_reg - E = res(3, TDAT8); TDAT8 = E; - call wm + @rm_reg m_ea + E = res(3, TDAT8); + TDAT8 = E; + @wm m_ea fe9c # RES 3,H = (XY+o) - TADR = m_ea; - call rm_reg - H = res(3, TDAT8); TDAT8 = H; - call wm + @rm_reg m_ea + H = res(3, TDAT8); + TDAT8 = H; + @wm m_ea fe9d # RES 3,L = (XY+o) - TADR = m_ea; - call rm_reg - L = res(3, TDAT8); TDAT8 = L; - call wm + @rm_reg m_ea + L = res(3, TDAT8); + TDAT8 = L; + @wm m_ea fe9e # RES 3,(XY+o) - TADR = m_ea; - call rm_reg + @rm_reg m_ea TDAT8 = res(3, TDAT8); - call wm + @wm m_ea fe9f # RES 3,A = (XY+o) - TADR = m_ea; - call rm_reg - A = res(3, TDAT8); TDAT8 = A; - call wm + @rm_reg m_ea + A = res(3, TDAT8); + TDAT8 = A; + @wm m_ea fea0 # RES 4,B = (XY+o) - TADR = m_ea; - call rm_reg - B = res(4, TDAT8); TDAT8 = B; - call wm + @rm_reg m_ea + B = res(4, TDAT8); + TDAT8 = B; + @wm m_ea fea1 # RES 4,C = (XY+o) - TADR = m_ea; - call rm_reg - C = res(4, TDAT8); TDAT8 = C; - call wm + @rm_reg m_ea + C = res(4, TDAT8); + TDAT8 = C; + @wm m_ea fea2 # RES 4,D = (XY+o) - TADR = m_ea; - call rm_reg - D = res(4, TDAT8); TDAT8 = D; - call wm + @rm_reg m_ea + D = res(4, TDAT8); + TDAT8 = D; + @wm m_ea fea3 # RES 4,E = (XY+o) - TADR = m_ea; - call rm_reg - E = res(4, TDAT8); TDAT8 = E; - call wm + @rm_reg m_ea + E = res(4, TDAT8); + TDAT8 = E; + @wm m_ea fea4 # RES 4,H = (XY+o) - TADR = m_ea; - call rm_reg - H = res(4, TDAT8); TDAT8 = H; - call wm + @rm_reg m_ea + H = res(4, TDAT8); + TDAT8 = H; + @wm m_ea fea5 # RES 4,L = (XY+o) - TADR = m_ea; - call rm_reg - L = res(4, TDAT8); TDAT8 = L; - call wm + @rm_reg m_ea + L = res(4, TDAT8); + TDAT8 = L; + @wm m_ea fea6 # RES 4,(XY+o) - TADR = m_ea; - call rm_reg + @rm_reg m_ea TDAT8 = res(4, TDAT8); - call wm + @wm m_ea fea7 # RES 4,A = (XY+o) - TADR = m_ea; - call rm_reg - A = res(4, TDAT8); TDAT8 = A; - call wm + @rm_reg m_ea + A = res(4, TDAT8); + TDAT8 = A; + @wm m_ea fea8 # RES 5,B = (XY+o) - TADR = m_ea; - call rm_reg - B = res(5, TDAT8); TDAT8 = B; - call wm + @rm_reg m_ea + B = res(5, TDAT8); + TDAT8 = B; + @wm m_ea fea9 # RES 5,C = (XY+o) - TADR = m_ea; - call rm_reg - C = res(5, TDAT8); TDAT8 = C; - call wm + @rm_reg m_ea + C = res(5, TDAT8); + TDAT8 = C; + @wm m_ea feaa # RES 5,D = (XY+o) - TADR = m_ea; - call rm_reg - D = res(5, TDAT8); TDAT8 = D; - call wm + @rm_reg m_ea + D = res(5, TDAT8); + TDAT8 = D; + @wm m_ea feab # RES 5,E = (XY+o) - TADR = m_ea; - call rm_reg - E = res(5, TDAT8); TDAT8 = E; - call wm + @rm_reg m_ea + E = res(5, TDAT8); + TDAT8 = E; + @wm m_ea feac # RES 5,H = (XY+o) - TADR = m_ea; - call rm_reg - H = res(5, TDAT8); TDAT8 = H; - call wm + @rm_reg m_ea + H = res(5, TDAT8); + TDAT8 = H; + @wm m_ea fead # RES 5,L = (XY+o) - TADR = m_ea; - call rm_reg - L = res(5, TDAT8); TDAT8 = L; - call wm + @rm_reg m_ea + L = res(5, TDAT8); + TDAT8 = L; + @wm m_ea feae # RES 5,(XY+o) - TADR = m_ea; - call rm_reg + @rm_reg m_ea TDAT8 = res(5, TDAT8); - call wm + @wm m_ea feaf # RES 5,A = (XY+o) - TADR = m_ea; - call rm_reg - A = res(5, TDAT8); TDAT8 = A; - call wm + @rm_reg m_ea + A = res(5, TDAT8); + TDAT8 = A; + @wm m_ea feb0 # RES 6,B = (XY+o) - TADR = m_ea; - call rm_reg - B = res(6, TDAT8); TDAT8 = B; - call wm + @rm_reg m_ea + B = res(6, TDAT8); + TDAT8 = B; + @wm m_ea feb1 # RES 6,C = (XY+o) - TADR = m_ea; - call rm_reg - C = res(6, TDAT8); TDAT8 = C; - call wm + @rm_reg m_ea + C = res(6, TDAT8); + TDAT8 = C; + @wm m_ea feb2 # RES 6,D = (XY+o) - TADR = m_ea; - call rm_reg - D = res(6, TDAT8); TDAT8 = D; - call wm + @rm_reg m_ea + D = res(6, TDAT8); + TDAT8 = D; + @wm m_ea feb3 # RES 6,E = (XY+o) - TADR = m_ea; - call rm_reg - E = res(6, TDAT8); TDAT8 = E; - call wm + @rm_reg m_ea + E = res(6, TDAT8); + TDAT8 = E; + @wm m_ea feb4 # RES 6,H = (XY+o) - TADR = m_ea; - call rm_reg - H = res(6, TDAT8); TDAT8 = H; - call wm + @rm_reg m_ea + H = res(6, TDAT8); + TDAT8 = H; + @wm m_ea feb5 # RES 6,L = (XY+o) - TADR = m_ea; - call rm_reg - L = res(6, TDAT8); TDAT8 = L; - call wm + @rm_reg m_ea + L = res(6, TDAT8); + TDAT8 = L; + @wm m_ea feb6 # RES 6,(XY+o) - TADR = m_ea; - call rm_reg + @rm_reg m_ea TDAT8 = res(6, TDAT8); - call wm + @wm m_ea feb7 # RES 6,A = (XY+o) - TADR = m_ea; - call rm_reg - A = res(6, TDAT8); TDAT8 = A; - call wm + @rm_reg m_ea + A = res(6, TDAT8); + TDAT8 = A; + @wm m_ea feb8 # RES 7,B = (XY+o) - TADR = m_ea; - call rm_reg - B = res(7, TDAT8); TDAT8 = B; - call wm + @rm_reg m_ea + B = res(7, TDAT8); + TDAT8 = B; + @wm m_ea feb9 # RES 7,C = (XY+o) - TADR = m_ea; - call rm_reg - C = res(7, TDAT8); TDAT8 = C; - call wm + @rm_reg m_ea + C = res(7, TDAT8); + TDAT8 = C; + @wm m_ea feba # RES 7,D = (XY+o) - TADR = m_ea; - call rm_reg - D = res(7, TDAT8); TDAT8 = D; - call wm + @rm_reg m_ea + D = res(7, TDAT8); + TDAT8 = D; + @wm m_ea febb # RES 7,E = (XY+o) - TADR = m_ea; - call rm_reg - E = res(7, TDAT8); TDAT8 = E; - call wm + @rm_reg m_ea + E = res(7, TDAT8); + TDAT8 = E; + @wm m_ea febc # RES 7,H = (XY+o) - TADR = m_ea; - call rm_reg - H = res(7, TDAT8); TDAT8 = H; - call wm + @rm_reg m_ea + H = res(7, TDAT8); + TDAT8 = H; + @wm m_ea febd # RES 7,L = (XY+o) - TADR = m_ea; - call rm_reg - L = res(7, TDAT8); TDAT8 = L; - call wm + @rm_reg m_ea + L = res(7, TDAT8); + TDAT8 = L; + @wm m_ea febe # RES 7,(XY+o) - TADR = m_ea; - call rm_reg + @rm_reg m_ea TDAT8 = res(7, TDAT8); - call wm + @wm m_ea febf # RES 7,A = (XY+o) - TADR = m_ea; - call rm_reg - A = res(7, TDAT8); TDAT8 = A; - call wm + @rm_reg m_ea + A = res(7, TDAT8); + TDAT8 = A; + @wm m_ea fec0 # SET 0,B = (XY+o) - TADR = m_ea; - call rm_reg - B = set(0, TDAT8); TDAT8 = B; - call wm + @rm_reg m_ea + B = set(0, TDAT8); + TDAT8 = B; + @wm m_ea fec1 # SET 0,C = (XY+o) - TADR = m_ea; - call rm_reg - C = set(0, TDAT8); TDAT8 = C; - call wm + @rm_reg m_ea + C = set(0, TDAT8); + TDAT8 = C; + @wm m_ea fec2 # SET 0,D = (XY+o) - TADR = m_ea; - call rm_reg - D = set(0, TDAT8); TDAT8 = D; - call wm + @rm_reg m_ea + D = set(0, TDAT8); + TDAT8 = D; + @wm m_ea fec3 # SET 0,E = (XY+o) - TADR = m_ea; - call rm_reg - E = set(0, TDAT8); TDAT8 = E; - call wm + @rm_reg m_ea + E = set(0, TDAT8); + TDAT8 = E; + @wm m_ea fec4 # SET 0,H = (XY+o) - TADR = m_ea; - call rm_reg - H = set(0, TDAT8); TDAT8 = H; - call wm + @rm_reg m_ea + H = set(0, TDAT8); + TDAT8 = H; + @wm m_ea fec5 # SET 0,L = (XY+o) - TADR = m_ea; - call rm_reg - L = set(0, TDAT8); TDAT8 = L; - call wm + @rm_reg m_ea + L = set(0, TDAT8); + TDAT8 = L; + @wm m_ea fec6 # SET 0,(XY+o) - TADR = m_ea; - call rm_reg + @rm_reg m_ea TDAT8 = set(0, TDAT8); - call wm + @wm m_ea fec7 # SET 0,A = (XY+o) - TADR = m_ea; - call rm_reg - A = set(0, TDAT8); TDAT8 = A; - call wm + @rm_reg m_ea + A = set(0, TDAT8); + TDAT8 = A; + @wm m_ea fec8 # SET 1,B = (XY+o) - TADR = m_ea; - call rm_reg - B = set(1, TDAT8); TDAT8 = B; - call wm + @rm_reg m_ea + B = set(1, TDAT8); + TDAT8 = B; + @wm m_ea fec9 # SET 1,C = (XY+o) - TADR = m_ea; - call rm_reg - C = set(1, TDAT8); TDAT8 = C; - call wm + @rm_reg m_ea + C = set(1, TDAT8); + TDAT8 = C; + @wm m_ea feca # SET 1,D = (XY+o) - TADR = m_ea; - call rm_reg - D = set(1, TDAT8); TDAT8 = D; - call wm + @rm_reg m_ea + D = set(1, TDAT8); + TDAT8 = D; + @wm m_ea fecb # SET 1,E = (XY+o) - TADR = m_ea; - call rm_reg - E = set(1, TDAT8); TDAT8 = E; - call wm + @rm_reg m_ea + E = set(1, TDAT8); + TDAT8 = E; + @wm m_ea fecc # SET 1,H = (XY+o) - TADR = m_ea; - call rm_reg - H = set(1, TDAT8); TDAT8 = H; - call wm + @rm_reg m_ea + H = set(1, TDAT8); + TDAT8 = H; + @wm m_ea fecd # SET 1,L = (XY+o) - TADR = m_ea; - call rm_reg - L = set(1, TDAT8); TDAT8 = L; - call wm + @rm_reg m_ea + L = set(1, TDAT8); + TDAT8 = L; + @wm m_ea fece # SET 1,(XY+o) - TADR = m_ea; - call rm_reg + @rm_reg m_ea TDAT8 = set(1, TDAT8); - call wm + @wm m_ea fecf # SET 1,A = (XY+o) - TADR = m_ea; - call rm_reg - A = set(1, TDAT8); TDAT8 = A; - call wm + @rm_reg m_ea + A = set(1, TDAT8); + TDAT8 = A; + @wm m_ea fed0 # SET 2,B = (XY+o) - TADR = m_ea; - call rm_reg - B = set(2, TDAT8); TDAT8 = B; - call wm + @rm_reg m_ea + B = set(2, TDAT8); + TDAT8 = B; + @wm m_ea fed1 # SET 2,C = (XY+o) - TADR = m_ea; - call rm_reg - C = set(2, TDAT8); TDAT8 = C; - call wm + @rm_reg m_ea + C = set(2, TDAT8); + TDAT8 = C; + @wm m_ea fed2 # SET 2,D = (XY+o) - TADR = m_ea; - call rm_reg - D = set(2, TDAT8); TDAT8 = D; - call wm + @rm_reg m_ea + D = set(2, TDAT8); + TDAT8 = D; + @wm m_ea fed3 # SET 2,E = (XY+o) - TADR = m_ea; - call rm_reg - E = set(2, TDAT8); TDAT8 = E; - call wm + @rm_reg m_ea + E = set(2, TDAT8); + TDAT8 = E; + @wm m_ea fed4 # SET 2,H = (XY+o) - TADR = m_ea; - call rm_reg - H = set(2, TDAT8); TDAT8 = H; - call wm + @rm_reg m_ea + H = set(2, TDAT8); + TDAT8 = H; + @wm m_ea fed5 # SET 2,L = (XY+o) - TADR = m_ea; - call rm_reg - L = set(2, TDAT8); TDAT8 = L; - call wm + @rm_reg m_ea + L = set(2, TDAT8); + TDAT8 = L; + @wm m_ea fed6 # SET 2,(XY+o) - TADR = m_ea; - call rm_reg + @rm_reg m_ea TDAT8 = set(2, TDAT8); - call wm + @wm m_ea fed7 # SET 2,A = (XY+o) - TADR = m_ea; - call rm_reg - A = set(2, TDAT8); TDAT8 = A; - call wm + @rm_reg m_ea + A = set(2, TDAT8); + TDAT8 = A; + @wm m_ea fed8 # SET 3,B = (XY+o) - TADR = m_ea; - call rm_reg - B = set(3, TDAT8); TDAT8 = B; - call wm + @rm_reg m_ea + B = set(3, TDAT8); + TDAT8 = B; + @wm m_ea fed9 # SET 3,C = (XY+o) - TADR = m_ea; - call rm_reg - C = set(3, TDAT8); TDAT8 = C; - call wm + @rm_reg m_ea + C = set(3, TDAT8); + TDAT8 = C; + @wm m_ea feda # SET 3,D = (XY+o) - TADR = m_ea; - call rm_reg - D = set(3, TDAT8); TDAT8 = D; - call wm + @rm_reg m_ea + D = set(3, TDAT8); + TDAT8 = D; + @wm m_ea fedb # SET 3,E = (XY+o) - TADR = m_ea; - call rm_reg - E = set(3, TDAT8); TDAT8 = E; - call wm + @rm_reg m_ea + E = set(3, TDAT8); + TDAT8 = E; + @wm m_ea fedc # SET 3,H = (XY+o) - TADR = m_ea; - call rm_reg - H = set(3, TDAT8); TDAT8 = H; - call wm + @rm_reg m_ea + H = set(3, TDAT8); + TDAT8 = H; + @wm m_ea fedd # SET 3,L = (XY+o) - TADR = m_ea; - call rm_reg - L = set(3, TDAT8); TDAT8 = L; - call wm + @rm_reg m_ea + L = set(3, TDAT8); + TDAT8 = L; + @wm m_ea fede # SET 3,(XY+o) - TADR = m_ea; - call rm_reg + @rm_reg m_ea TDAT8 = set(3, TDAT8); - call wm + @wm m_ea fedf # SET 3,A = (XY+o) - TADR = m_ea; - call rm_reg - A = set(3, TDAT8); TDAT8 = A; - call wm + @rm_reg m_ea + A = set(3, TDAT8); + TDAT8 = A; + @wm m_ea fee0 # SET 4,B = (XY+o) - TADR = m_ea; - call rm_reg - B = set(4, TDAT8); TDAT8 = B; - call wm + @rm_reg m_ea + B = set(4, TDAT8); + TDAT8 = B; + @wm m_ea fee1 # SET 4,C = (XY+o) - TADR = m_ea; - call rm_reg - C = set(4, TDAT8); TDAT8 = C; - call wm + @rm_reg m_ea + C = set(4, TDAT8); + TDAT8 = C; + @wm m_ea fee2 # SET 4,D = (XY+o) - TADR = m_ea; - call rm_reg - D = set(4, TDAT8); TDAT8 = D; - call wm + @rm_reg m_ea + D = set(4, TDAT8); + TDAT8 = D; + @wm m_ea fee3 # SET 4,E = (XY+o) - TADR = m_ea; - call rm_reg - E = set(4, TDAT8); TDAT8 = E; - call wm + @rm_reg m_ea + E = set(4, TDAT8); + TDAT8 = E; + @wm m_ea fee4 # SET 4,H = (XY+o) - TADR = m_ea; - call rm_reg - H = set(4, TDAT8); TDAT8 = H; - call wm + @rm_reg m_ea + H = set(4, TDAT8); + TDAT8 = H; + @wm m_ea fee5 # SET 4,L = (XY+o) - TADR = m_ea; - call rm_reg - L = set(4, TDAT8); TDAT8 = L; - call wm + @rm_reg m_ea + L = set(4, TDAT8); + TDAT8 = L; + @wm m_ea fee6 # SET 4,(XY+o) - TADR = m_ea; - call rm_reg + @rm_reg m_ea TDAT8 = set(4, TDAT8); - call wm + @wm m_ea fee7 # SET 4,A = (XY+o) - TADR = m_ea; - call rm_reg - A = set(4, TDAT8); TDAT8 = A; - call wm + @rm_reg m_ea + A = set(4, TDAT8); + TDAT8 = A; + @wm m_ea fee8 # SET 5,B = (XY+o) - TADR = m_ea; - call rm_reg - B = set(5, TDAT8); TDAT8 = B; - call wm + @rm_reg m_ea + B = set(5, TDAT8); + TDAT8 = B; + @wm m_ea fee9 # SET 5,C = (XY+o) - TADR = m_ea; - call rm_reg - C = set(5, TDAT8); TDAT8 = C; - call wm + @rm_reg m_ea + C = set(5, TDAT8); + TDAT8 = C; + @wm m_ea feea # SET 5,D = (XY+o) - TADR = m_ea; - call rm_reg - D = set(5, TDAT8); TDAT8 = D; - call wm + @rm_reg m_ea + D = set(5, TDAT8); + TDAT8 = D; + @wm m_ea feeb # SET 5,E = (XY+o) - TADR = m_ea; - call rm_reg - E = set(5, TDAT8); TDAT8 = E; - call wm + @rm_reg m_ea + E = set(5, TDAT8); + TDAT8 = E; + @wm m_ea feec # SET 5,H = (XY+o) - TADR = m_ea; - call rm_reg - H = set(5, TDAT8); TDAT8 = H; - call wm + @rm_reg m_ea + H = set(5, TDAT8); + TDAT8 = H; + @wm m_ea feed # SET 5,L = (XY+o) - TADR = m_ea; - call rm_reg - L = set(5, TDAT8); TDAT8 = L; - call wm + @rm_reg m_ea + L = set(5, TDAT8); + TDAT8 = L; + @wm m_ea feee # SET 5,(XY+o) - TADR = m_ea; - call rm_reg + @rm_reg m_ea TDAT8 = set(5, TDAT8); - call wm + @wm m_ea feef # SET 5,A = (XY+o) - TADR = m_ea; - call rm_reg - A = set(5, TDAT8); TDAT8 = A; - call wm + @rm_reg m_ea + A = set(5, TDAT8); + TDAT8 = A; + @wm m_ea fef0 # SET 6,B = (XY+o) - TADR = m_ea; - call rm_reg - B = set(6, TDAT8); TDAT8 = B; - call wm + @rm_reg m_ea + B = set(6, TDAT8); + TDAT8 = B; + @wm m_ea fef1 # SET 6,C = (XY+o) - TADR = m_ea; - call rm_reg - C = set(6, TDAT8); TDAT8 = C; - call wm + @rm_reg m_ea + C = set(6, TDAT8); + TDAT8 = C; + @wm m_ea fef2 # SET 6,D = (XY+o) - TADR = m_ea; - call rm_reg - D = set(6, TDAT8); TDAT8 = D; - call wm + @rm_reg m_ea + D = set(6, TDAT8); + TDAT8 = D; + @wm m_ea fef3 # SET 6,E = (XY+o) - TADR = m_ea; - call rm_reg - E = set(6, TDAT8); TDAT8 = E; - call wm + @rm_reg m_ea + E = set(6, TDAT8); + TDAT8 = E; + @wm m_ea fef4 # SET 6,H = (XY+o) - TADR = m_ea; - call rm_reg - H = set(6, TDAT8); TDAT8 = H; - call wm + @rm_reg m_ea + H = set(6, TDAT8); + TDAT8 = H; + @wm m_ea fef5 # SET 6,L = (XY+o) - TADR = m_ea; - call rm_reg - L = set(6, TDAT8); TDAT8 = L; - call wm + @rm_reg m_ea + L = set(6, TDAT8); + TDAT8 = L; + @wm m_ea fef6 # SET 6,(XY+o) - TADR = m_ea; - call rm_reg + @rm_reg m_ea TDAT8 = set(6, TDAT8); - call wm + @wm m_ea fef7 # SET 6,A = (XY+o) - TADR = m_ea; - call rm_reg - A = set(6, TDAT8); TDAT8 = A; - call wm + @rm_reg m_ea + A = set(6, TDAT8); + TDAT8 = A; + @wm m_ea fef8 # SET 7,B = (XY+o) - TADR = m_ea; - call rm_reg - B = set(7, TDAT8); TDAT8 = B; - call wm + @rm_reg m_ea + B = set(7, TDAT8); + TDAT8 = B; + @wm m_ea fef9 # SET 7,C = (XY+o) - TADR = m_ea; - call rm_reg - C = set(7, TDAT8); TDAT8 = C; - call wm + @rm_reg m_ea + C = set(7, TDAT8); + TDAT8 = C; + @wm m_ea fefa # SET 7,D = (XY+o) - TADR = m_ea; - call rm_reg - D = set(7, TDAT8); TDAT8 = D; - call wm + @rm_reg m_ea + D = set(7, TDAT8); + TDAT8 = D; + @wm m_ea fefb # SET 7,E = (XY+o) - TADR = m_ea; - call rm_reg - E = set(7, TDAT8); TDAT8 = E; - call wm + @rm_reg m_ea + E = set(7, TDAT8); + TDAT8 = E; + @wm m_ea fefc # SET 7,H = (XY+o) - TADR = m_ea; - call rm_reg - H = set(7, TDAT8); TDAT8 = H; - call wm + @rm_reg m_ea + H = set(7, TDAT8); + TDAT8 = H; + @wm m_ea fefd # SET 7,L = (XY+o) - TADR = m_ea; - call rm_reg - L = set(7, TDAT8); TDAT8 = L; - call wm + @rm_reg m_ea + L = set(7, TDAT8); + TDAT8 = L; + @wm m_ea fefe # SET 7,(XY+o) - TADR = m_ea; - call rm_reg + @rm_reg m_ea TDAT8 = set(7, TDAT8); - call wm + @wm m_ea feff # SET 7,A = (XY+o) - TADR = m_ea; - call rm_reg - A = set(7, TDAT8); TDAT8 = A; - call wm + @rm_reg m_ea + A = set(7, TDAT8); + TDAT8 = A; + @wm m_ea ########################################################## @@ -2981,150 +3144,153 @@ feff # SET 7,A = (XY+o) ########################################################## dd00 # DB DD illegal_1(); - call jump 0000 + @jump 0000 dd01 # DB DD illegal_1(); - call jump 0001 + @jump 0001 dd02 # DB DD illegal_1(); - call jump 0002 + @jump 0002 dd03 # DB DD illegal_1(); - call jump 0003 + @jump 0003 dd04 # DB DD illegal_1(); - call jump 0004 + @jump 0004 dd05 # DB DD illegal_1(); - call jump 0005 + @jump 0005 dd06 # DB DD illegal_1(); - call jump 0006 + @jump 0006 dd07 # DB DD illegal_1(); - call jump 0007 + @jump 0007 dd08 # DB DD illegal_1(); - call jump 0008 + @jump 0008 dd09 # ADD IX,BC - TDAT = IX; TDAT2 = BC; - call add16 + TDAT = IX; + TDAT2 = BC; + @add16 IX = TDAT; dd0a # DB DD illegal_1(); - call jump 000a + @jump 000a dd0b # DB DD illegal_1(); - call jump 000b + @jump 000b dd0c # DB DD illegal_1(); - call jump 000c + @jump 000c dd0d # DB DD illegal_1(); - call jump 000d + @jump 000d dd0e # DB DD illegal_1(); - call jump 000e + @jump 000e dd0f # DB DD illegal_1(); - call jump 000f + @jump 000f dd10 # DB DD illegal_1(); - call jump 0010 + @jump 0010 dd11 # DB DD illegal_1(); - call jump 0011 + @jump 0011 dd12 # DB DD illegal_1(); - call jump 0012 + @jump 0012 dd13 # DB DD illegal_1(); - call jump 0013 + @jump 0013 dd14 # DB DD illegal_1(); - call jump 0014 + @jump 0014 dd15 # DB DD illegal_1(); - call jump 0015 + @jump 0015 dd16 # DB DD illegal_1(); - call jump 0016 + @jump 0016 dd17 # DB DD illegal_1(); - call jump 0017 + @jump 0017 dd18 # DB DD illegal_1(); - call jump 0018 + @jump 0018 dd19 # ADD IX,DE - TDAT = IX; TDAT2 = DE; - call add16 + TDAT = IX; + TDAT2 = DE; + @add16 IX = TDAT; dd1a # DB DD illegal_1(); - call jump 001a + @jump 001a dd1b # DB DD illegal_1(); - call jump 001b + @jump 001b dd1c # DB DD illegal_1(); - call jump 001c + @jump 001c dd1d # DB DD illegal_1(); - call jump 001d + @jump 001d dd1e # DB DD illegal_1(); - call jump 001e + @jump 001e dd1f # DB DD illegal_1(); - call jump 001f + @jump 001f dd20 # DB DD illegal_1(); - call jump 0020 + @jump 0020 dd21 # LD IX,w - call arg16 + @arg16 IX = TDAT; dd22 # LD (w),IX - call arg16 - m_ea = TDAT; TADR = m_ea; TDAT = IX; - call wm16 + @arg16 + m_ea = TDAT; + TDAT = IX; + @wm16 m_ea WZ = m_ea + 1; dd23 # INC IX - call nomreq_ir 2 + @nomreq_ir 2 IX++; dd24 # INC HX @@ -3134,30 +3300,32 @@ dd25 # DEC HX dec(HX); dd26 # LD HX,n - call arg + @arg HX = TDAT8; dd27 # DB DD illegal_1(); - call jump 0027 + @jump 0027 dd28 # DB DD illegal_1(); - call jump 0028 + @jump 0028 dd29 # ADD IX,IX - TDAT = IX; TDAT2 = IX; - call add16 + TDAT = IX; + TDAT2 = IX; + @add16 IX = TDAT; dd2a # LD IX,(w) - call arg16 - m_ea = TDAT; TADR = m_ea; - call rm16 - IX = TDAT; WZ = m_ea + 1; + @arg16 + m_ea = TDAT; + @rm16 m_ea + IX = TDAT; + WZ = m_ea + 1; dd2b # DEC IX - call nomreq_ir 2 + @nomreq_ir 2 IX--; dd2c # INC LX @@ -3167,107 +3335,102 @@ dd2d # DEC LX dec(LX); dd2e # LD LX,n - call arg + @arg LX = TDAT8; dd2f # DB DD illegal_1(); - call jump 002f + @jump 002f dd30 # DB DD illegal_1(); - call jump 0030 + @jump 0030 dd31 # DB DD illegal_1(); - call jump 0031 + @jump 0031 dd32 # DB DD illegal_1(); - call jump 0032 + @jump 0032 dd33 # DB DD illegal_1(); - call jump 0033 + @jump 0033 dd34 # INC (IX+o) - call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm_reg + @eax + 5 * @nomreq_addr PC-1 + @rm_reg m_ea inc(TDAT8); - call wm + @wm m_ea dd35 # DEC (IX+o) - call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm_reg + @eax + 5 * @nomreq_addr PC-1 + @rm_reg m_ea dec(TDAT8); - call wm + @wm m_ea dd36 # LD (IX+o),n - call eax - call arg - TADR = PC-1; - 2 * call nomreq_addr - TADR = m_ea; - call wm + @eax + @arg + 2 * @nomreq_addr PC-1 + @wm m_ea dd37 # DB DD illegal_1(); - call jump 0037 + @jump 0037 dd38 # DB DD illegal_1(); - call jump 0038 + @jump 0038 dd39 # ADD IX,SP - TDAT = IX; TDAT2 = SP; - call add16 + TDAT = IX; + TDAT2 = SP; + @add16 IX = TDAT; dd3a # DB DD illegal_1(); - call jump 003a + @jump 003a dd3b # DB DD illegal_1(); - call jump 003b + @jump 003b dd3c # DB DD illegal_1(); - call jump 003c + @jump 003c dd3d # DB DD illegal_1(); - call jump 003d + @jump 003d dd3e # DB DD illegal_1(); - call jump 003e + @jump 003e dd3f # DB DD illegal_1(); - call jump 003f + @jump 003f dd40 # DB DD illegal_1(); - call jump 0040 + @jump 0040 dd41 # DB DD illegal_1(); - call jump 0041 + @jump 0041 dd42 # DB DD illegal_1(); - call jump 0042 + @jump 0042 dd43 # DB DD illegal_1(); - call jump 0043 + @jump 0043 dd44 # LD B,HX B = HX; @@ -3276,32 +3439,30 @@ dd45 # LD B,LX B = LX; dd46 # LD B,(IX+o) - call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + @eax + 5 * @nomreq_addr PC-1 + @rm m_ea B = TDAT8; dd47 # DB DD illegal_1(); - call jump 0047 + @jump 0047 dd48 # DB DD illegal_1(); - call jump 0048 + @jump 0048 dd49 # DB DD illegal_1(); - call jump 0049 + @jump 0049 dd4a # DB DD illegal_1(); - call jump 004a + @jump 004a dd4b # DB DD illegal_1(); - call jump 004b + @jump 004b dd4c # LD C,HX C = HX; @@ -3310,32 +3471,30 @@ dd4d # LD C,LX C = LX; dd4e # LD C,(IX+o) - call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + @eax + 5 * @nomreq_addr PC-1 + @rm m_ea C = TDAT8; dd4f # DB DD illegal_1(); - call jump 004f + @jump 004f dd50 # DB DD illegal_1(); - call jump 0050 + @jump 0050 dd51 # DB DD illegal_1(); - call jump 0051 + @jump 0051 dd52 # DB DD illegal_1(); - call jump 0052 + @jump 0052 dd53 # DB DD illegal_1(); - call jump 0053 + @jump 0053 dd54 # LD D,HX D = HX; @@ -3344,32 +3503,30 @@ dd55 # LD D,LX D = LX; dd56 # LD D,(IX+o) - call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + @eax + 5 * @nomreq_addr PC-1 + @rm m_ea D = TDAT8; dd57 # DB DD illegal_1(); - call jump 0057 + @jump 0057 dd58 # DB DD illegal_1(); - call jump 0058 + @jump 0058 dd59 # DB DD illegal_1(); - call jump 0059 + @jump 0059 dd5a # DB DD illegal_1(); - call jump 005a + @jump 005a dd5b # DB DD illegal_1(); - call jump 005b + @jump 005b dd5c # LD E,HX E = HX; @@ -3378,16 +3535,14 @@ dd5d # LD E,LX E = LX; dd5e # LD E,(IX+o) - call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + @eax + 5 * @nomreq_addr PC-1 + @rm m_ea E = TDAT8; dd5f # DB DD illegal_1(); - call jump 005f + @jump 005f dd60 # LD HX,B HX = B; @@ -3407,11 +3562,9 @@ dd65 # LD HX,LX HX = LX; dd66 # LD H,(IX+o) - call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + @eax + 5 * @nomreq_addr PC-1 + @rm m_ea H = TDAT8; dd67 # LD HX,A @@ -3435,84 +3588,75 @@ dd6c # LD LX,HX dd6d # LD LX,LX dd6e # LD L,(IX+o) - call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + @eax + 5 * @nomreq_addr PC-1 + @rm m_ea L = TDAT8; dd6f # LD LX,A LX = A; dd70 # LD (IX+o),B - call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; TDAT8 = B; - call wm + @eax + 5 * @nomreq_addr PC-1 + TDAT8 = B; + @wm m_ea dd71 # LD (IX+o),C - call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; TDAT8 = C; - call wm + @eax + 5 * @nomreq_addr PC-1 + TDAT8 = C; + @wm m_ea dd72 # LD (IX+o),D - call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; TDAT8 = D; - call wm + @eax + 5 * @nomreq_addr PC-1 + TDAT8 = D; + @wm m_ea dd73 # LD (IX+o),E - call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; TDAT8 = E; - call wm + @eax + 5 * @nomreq_addr PC-1 + TDAT8 = E; + @wm m_ea dd74 # LD (IX+o),H - call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; TDAT8 = H; - call wm + @eax + 5 * @nomreq_addr PC-1 + TDAT8 = H; + @wm m_ea dd75 # LD (IX+o),L - call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; TDAT8 = L; - call wm + @eax + 5 * @nomreq_addr PC-1 + TDAT8 = L; + @wm m_ea dd76 # DB DD illegal_1(); - call jump 0076 + @jump 0076 dd77 # LD (IX+o),A - call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; TDAT8 = A; - call wm + @eax + 5 * @nomreq_addr PC-1 + TDAT8 = A; + @wm m_ea dd78 # DB DD illegal_1(); - call jump 0078 + @jump 0078 dd79 # DB DD illegal_1(); - call jump 0079 + @jump 0079 dd7a # DB DD illegal_1(); - call jump 007a + @jump 007a dd7b # DB DD illegal_1(); - call jump 007b + @jump 007b dd7c # LD A,HX A = HX; @@ -3521,32 +3665,30 @@ dd7d # LD A,LX A = LX; dd7e # LD A,(IX+o) - call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + @eax + 5 * @nomreq_addr PC-1 + @rm m_ea A = TDAT8; dd7f # DB DD illegal_1(); - call jump 007f + @jump 007f dd80 # DB DD illegal_1(); - call jump 0080 + @jump 0080 dd81 # DB DD illegal_1(); - call jump 0081 + @jump 0081 dd82 # DB DD illegal_1(); - call jump 0082 + @jump 0082 dd83 # DB DD illegal_1(); - call jump 0083 + @jump 0083 dd84 # ADD A,HX add_a(HX); @@ -3555,32 +3697,30 @@ dd85 # ADD A,LX add_a(LX); dd86 # ADD A,(IX+o) - call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + @eax + 5 * @nomreq_addr PC-1 + @rm m_ea add_a(TDAT8); dd87 # DB DD illegal_1(); - call jump 0087 + @jump 0087 dd88 # DB DD illegal_1(); - call jump 0088 + @jump 0088 dd89 # DB DD illegal_1(); - call jump 0089 + @jump 0089 dd8a # DB DD illegal_1(); - call jump 008a + @jump 008a dd8b # DB DD illegal_1(); - call jump 008b + @jump 008b dd8c # ADC A,HX adc_a(HX); @@ -3589,32 +3729,30 @@ dd8d # ADC A,LX adc_a(LX); dd8e # ADC A,(IX+o) - call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + @eax + 5 * @nomreq_addr PC-1 + @rm m_ea adc_a(TDAT8); dd8f # DB DD illegal_1(); - call jump 008f + @jump 008f dd90 # DB DD illegal_1(); - call jump 0090 + @jump 0090 dd91 # DB DD illegal_1(); - call jump 0091 + @jump 0091 dd92 # DB DD illegal_1(); - call jump 0092 + @jump 0092 dd93 # DB DD illegal_1(); - call jump 0093 + @jump 0093 dd94 # SUB HX sub_a(HX); @@ -3623,32 +3761,30 @@ dd95 # SUB LX sub_a(LX); dd96 # SUB (IX+o) - call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + @eax + 5 * @nomreq_addr PC-1 + @rm m_ea sub_a(TDAT8); dd97 # DB DD illegal_1(); - call jump 0097 + @jump 0097 dd98 # DB DD illegal_1(); - call jump 0098 + @jump 0098 dd99 # DB DD illegal_1(); - call jump 0099 + @jump 0099 dd9a # DB DD illegal_1(); - call jump 009a + @jump 009a dd9b # DB DD illegal_1(); - call jump 009b + @jump 009b dd9c # SBC A,HX sbc_a(HX); @@ -3657,32 +3793,30 @@ dd9d # SBC A,LX sbc_a(LX); dd9e # SBC A,(IX+o) - call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + @eax + 5 * @nomreq_addr PC-1 + @rm m_ea sbc_a(TDAT8); dd9f # DB DD illegal_1(); - call jump 009f + @jump 009f dda0 # DB DD illegal_1(); - call jump 00a0 + @jump 00a0 dda1 # DB DD illegal_1(); - call jump 00a1 + @jump 00a1 dda2 # DB DD illegal_1(); - call jump 00a2 + @jump 00a2 dda3 # DB DD illegal_1(); - call jump 00a3 + @jump 00a3 dda4 # AND HX and_a(HX); @@ -3691,32 +3825,30 @@ dda5 # AND LX and_a(LX); dda6 # AND (IX+o) - call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + @eax + 5 * @nomreq_addr PC-1 + @rm m_ea and_a(TDAT8); dda7 # DB DD illegal_1(); - call jump 00a7 + @jump 00a7 dda8 # DB DD illegal_1(); - call jump 00a8 + @jump 00a8 dda9 # DB DD illegal_1(); - call jump 00a9 + @jump 00a9 ddaa # DB DD illegal_1(); - call jump 00aa + @jump 00aa ddab # DB DD illegal_1(); - call jump 00ab + @jump 00ab ddac # XOR HX xor_a(HX); @@ -3725,32 +3857,30 @@ ddad # XOR LX xor_a(LX); ddae # XOR (IX+o) - call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + @eax + 5 * @nomreq_addr PC-1 + @rm m_ea xor_a(TDAT8); ddaf # DB DD illegal_1(); - call jump 00af + @jump 00af ddb0 # DB DD illegal_1(); - call jump 00b0 + @jump 00b0 ddb1 # DB DD illegal_1(); - call jump 00b1 + @jump 00b1 ddb2 # DB DD illegal_1(); - call jump 00b2 + @jump 00b2 ddb3 # DB DD illegal_1(); - call jump 00b3 + @jump 00b3 ddb4 # OR HX or_a(HX); @@ -3759,32 +3889,30 @@ ddb5 # OR LX or_a(LX); ddb6 # OR (IX+o) - call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + @eax + 5 * @nomreq_addr PC-1 + @rm m_ea or_a(TDAT8); ddb7 # DB DD illegal_1(); - call jump 00b7 + @jump 00b7 ddb8 # DB DD illegal_1(); - call jump 00b8 + @jump 00b8 ddb9 # DB DD illegal_1(); - call jump 00b9 + @jump 00b9 ddba # DB DD illegal_1(); - call jump 00ba + @jump 00ba ddbb # DB DD illegal_1(); - call jump 00bb + @jump 00bb ddbc # CP HX cp(HX); @@ -3793,275 +3921,269 @@ ddbd # CP LX cp(LX); ddbe # CP (IX+o) - call eax - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + @eax + 5 * @nomreq_addr PC-1 + @rm m_ea cp(TDAT8); ddbf # DB DD illegal_1(); - call jump 00bf + @jump 00bf ddc0 # DB DD illegal_1(); - call jump 00c0 + @jump 00c0 ddc1 # DB DD illegal_1(); - call jump 00c1 + @jump 00c1 ddc2 # DB DD illegal_1(); - call jump 00c2 + @jump 00c2 ddc3 # DB DD illegal_1(); - call jump 00c3 + @jump 00c3 ddc4 # DB DD illegal_1(); - call jump 00c4 + @jump 00c4 ddc5 # DB DD illegal_1(); - call jump 00c5 + @jump 00c5 ddc6 # DB DD illegal_1(); - call jump 00c6 + @jump 00c6 ddc7 # DB DD illegal_1(); - call jump 00c7 + @jump 00c7 ddc8 # DB DD illegal_1(); - call jump 00c8 + @jump 00c8 ddc9 # DB DD illegal_1(); - call jump 00c9 + @jump 00c9 ddca # DB DD illegal_1(); - call jump 00ca + @jump 00ca ddcb # ** DD CB xx - call eax - call arg - TADR = PC-1; - 2 * call nomreq_addr - call jump_prefixed 0xfe + @eax + @arg + 2 * @nomreq_addr PC-1 + @jump_prefixed 0xfe ddcc # DB DD illegal_1(); - call jump 00cc + @jump 00cc ddcd # DB DD illegal_1(); - call jump 00cd + @jump 00cd ddce # DB DD illegal_1(); - call jump 00ce + @jump 00ce ddcf # DB DD illegal_1(); - call jump 00cf + @jump 00cf ddd0 # DB DD illegal_1(); - call jump 00d0 + @jump 00d0 ddd1 # DB DD illegal_1(); - call jump 00d1 + @jump 00d1 ddd2 # DB DD illegal_1(); - call jump 00d2 + @jump 00d2 ddd3 # DB DD illegal_1(); - call jump 00d3 + @jump 00d3 ddd4 # DB DD illegal_1(); - call jump 00d4 + @jump 00d4 ddd5 # DB DD illegal_1(); - call jump 00d5 + @jump 00d5 ddd6 # DB DD illegal_1(); - call jump 00d6 + @jump 00d6 ddd7 # DB DD illegal_1(); - call jump 00d7 + @jump 00d7 ddd8 # DB DD illegal_1(); - call jump 00d8 + @jump 00d8 ddd9 # DB DD illegal_1(); - call jump 00d9 + @jump 00d9 ddda # DB DD illegal_1(); - call jump 00da + @jump 00da dddb # DB DD illegal_1(); - call jump 00db + @jump 00db dddc # DB DD illegal_1(); - call jump 00dc + @jump 00dc dddd # DB DD illegal_1(); - call jump 00dd + @jump 00dd ddde # DB DD illegal_1(); - call jump 00de + @jump 00de dddf # DB DD illegal_1(); - call jump 00df + @jump 00df dde0 # DB DD illegal_1(); - call jump 00e0 + @jump 00e0 dde1 # POP IX - call pop + @pop IX = TDAT; dde2 # DB DD illegal_1(); - call jump 00e2 + @jump 00e2 dde3 # EX (SP),IX - TDAT = IX; - call ex_sp - IX = TDAT; + @ex_sp IX dde4 # DB DD illegal_1(); - call jump 00e4 + @jump 00e4 dde5 # PUSH IX - TDAT = IX; - call push + @push IX dde6 # DB DD illegal_1(); - call jump 00e6 + @jump 00e6 dde7 # DB DD illegal_1(); - call jump 00e7 + @jump 00e7 dde8 # DB DD illegal_1(); - call jump 00e8 + @jump 00e8 dde9 # JP (IX) PC = IX; ddea # DB DD illegal_1(); - call jump 00ea + @jump 00ea ddeb # DB DD illegal_1(); - call jump 00eb + @jump 00eb ddec # DB DD illegal_1(); - call jump 00ec + @jump 00ec dded # DB DD illegal_1(); - call jump 00ed + @jump 00ed ddee # DB DD illegal_1(); - call jump 00ee + @jump 00ee ddef # DB DD illegal_1(); - call jump 00ef + @jump 00ef ddf0 # DB DD illegal_1(); - call jump 00f0 + @jump 00f0 ddf1 # DB DD illegal_1(); - call jump 00f1 + @jump 00f1 ddf2 # DB DD illegal_1(); - call jump 00f2 + @jump 00f2 ddf3 # DB DD illegal_1(); - call jump 00f3 + @jump 00f3 ddf4 # DB DD illegal_1(); - call jump 00f4 + @jump 00f4 ddf5 # DB DD illegal_1(); - call jump 00f5 + @jump 00f5 ddf6 # DB DD illegal_1(); - call jump 00f6 + @jump 00f6 ddf7 # DB DD illegal_1(); - call jump 00f7 + @jump 00f7 ddf8 # DB DD illegal_1(); - call jump 00f8 + @jump 00f8 ddf9 # LD SP,IX - call nomreq_ir 2 + @nomreq_ir 2 SP = IX; ddfa # DB DD illegal_1(); - call jump 00fa + @jump 00fa ddfb # DB DD illegal_1(); - call jump 00fb + @jump 00fb ddfc # DB DD illegal_1(); - call jump 00fc + @jump 00fc ddfd # DB DD illegal_1(); - call jump 00fd + @jump 00fd ddfe # DB DD illegal_1(); - call jump 00fe + @jump 00fe ddff # DB DD illegal_1(); - call jump 00ff + @jump 00ff ########################################################## @@ -4069,150 +4191,153 @@ ddff # DB DD ########################################################## fd00 # DB FD illegal_1(); - call jump 0000 + @jump 0000 fd01 # DB FD illegal_1(); - call jump 0001 + @jump 0001 fd02 # DB FD illegal_1(); - call jump 0002 + @jump 0002 fd03 # DB FD illegal_1(); - call jump 0003 + @jump 0003 fd04 # DB FD illegal_1(); - call jump 0004 + @jump 0004 fd05 # DB FD illegal_1(); - call jump 0005 + @jump 0005 fd06 # DB FD illegal_1(); - call jump 0006 + @jump 0006 fd07 # DB FD illegal_1(); - call jump 0007 + @jump 0007 fd08 # DB FD illegal_1(); - call jump 0008 + @jump 0008 fd09 # ADD IY,BC - TDAT = IY; TDAT2 = BC; - call add16 + TDAT = IY; + TDAT2 = BC; + @add16 IY = TDAT; fd0a # DB FD illegal_1(); - call jump 000a + @jump 000a fd0b # DB FD illegal_1(); - call jump 000b + @jump 000b fd0c # DB FD illegal_1(); - call jump 000c + @jump 000c fd0d # DB FD illegal_1(); - call jump 000d + @jump 000d fd0e # DB FD illegal_1(); - call jump 000e + @jump 000e fd0f # DB FD illegal_1(); - call jump 000f + @jump 000f fd10 # DB FD illegal_1(); - call jump 0010 + @jump 0010 fd11 # DB FD illegal_1(); - call jump 0011 + @jump 0011 fd12 # DB FD illegal_1(); - call jump 0012 + @jump 0012 fd13 # DB FD illegal_1(); - call jump 0013 + @jump 0013 fd14 # DB FD illegal_1(); - call jump 0014 + @jump 0014 fd15 # DB FD illegal_1(); - call jump 0015 + @jump 0015 fd16 # DB FD illegal_1(); - call jump 0016 + @jump 0016 fd17 # DB FD illegal_1(); - call jump 0017 + @jump 0017 fd18 # DB FD illegal_1(); - call jump 0018 + @jump 0018 fd19 # ADD IY,DE - TDAT = IY; TDAT2 = DE; - call add16 + TDAT = IY; + TDAT2 = DE; + @add16 IY = TDAT; fd1a # DB FD illegal_1(); - call jump 001a + @jump 001a fd1b # DB FD illegal_1(); - call jump 001b + @jump 001b fd1c # DB FD illegal_1(); - call jump 001c + @jump 001c fd1d # DB FD illegal_1(); - call jump 001d + @jump 001d fd1e # DB FD illegal_1(); - call jump 001e + @jump 001e fd1f # DB FD illegal_1(); - call jump 001f + @jump 001f fd20 # DB FD illegal_1(); - call jump 0020 + @jump 0020 fd21 # LD IY,w - call arg16 + @arg16 IY = TDAT; fd22 # LD (w),IY - call arg16 - m_ea = TDAT; TADR = m_ea; TDAT = IY; - call wm16 + @arg16 + m_ea = TDAT; + TDAT = IY; + @wm16 m_ea WZ = m_ea + 1; fd23 # INC IY - call nomreq_ir 2 + @nomreq_ir 2 IY++; fd24 # INC HY @@ -4222,30 +4347,32 @@ fd25 # DEC HY dec(HY); fd26 # LD HY,n - call arg + @arg HY = TDAT8; fd27 # DB FD illegal_1(); - call jump 0027 + @jump 0027 fd28 # DB FD illegal_1(); - call jump 0028 + @jump 0028 fd29 # ADD IY,IY - TDAT = IY; TDAT2 = IY; - call add16 + TDAT = IY; + TDAT2 = IY; + @add16 IY = TDAT; fd2a # LD IY,(w) - call arg16 - m_ea = TDAT; TADR = m_ea; - call rm16 - IY = TDAT; WZ = m_ea + 1; + @arg16 + m_ea = TDAT; + @rm16 m_ea + IY = TDAT; + WZ = m_ea + 1; fd2b # DEC IY - call nomreq_ir 2 + @nomreq_ir 2 IY--; fd2c # INC LY @@ -4255,107 +4382,102 @@ fd2d # DEC LY dec(LY); fd2e # LD LY,n - call arg + @arg LY = TDAT8; fd2f # DB FD illegal_1(); - call jump 002f + @jump 002f fd30 # DB FD illegal_1(); - call jump 0030 + @jump 0030 fd31 # DB FD illegal_1(); - call jump 0031 + @jump 0031 fd32 # DB FD illegal_1(); - call jump 0032 + @jump 0032 fd33 # DB FD illegal_1(); - call jump 0033 + @jump 0033 fd34 # INC (IY+o) - call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm_reg + @eay + 5 * @nomreq_addr PC-1 + @rm_reg m_ea inc(TDAT8); - call wm + @wm m_ea fd35 # DEC (IY+o) - call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm_reg + @eay + 5 * @nomreq_addr PC-1 + @rm_reg m_ea dec(TDAT8); - call wm + @wm m_ea fd36 # LD (IY+o),n - call eay - call arg - TADR = PC-1; - 2 * call nomreq_addr - TADR = m_ea; - call wm + @eay + @arg + 2 * @nomreq_addr PC-1 + @wm m_ea fd37 # DB FD illegal_1(); - call jump 0037 + @jump 0037 fd38 # DB FD illegal_1(); - call jump 0038 + @jump 0038 fd39 # ADD IY,SP - TDAT = IY; TDAT2 = SP; - call add16 + TDAT = IY; + TDAT2 = SP; + @add16 IY = TDAT; fd3a # DB FD illegal_1(); - call jump 003a + @jump 003a fd3b # DB FD illegal_1(); - call jump 003b + @jump 003b fd3c # DB FD illegal_1(); - call jump 003c + @jump 003c fd3d # DB FD illegal_1(); - call jump 003d + @jump 003d fd3e # DB FD illegal_1(); - call jump 003e + @jump 003e fd3f # DB FD illegal_1(); - call jump 003f + @jump 003f fd40 # DB FD illegal_1(); - call jump 0040 + @jump 0040 fd41 # DB FD illegal_1(); - call jump 0041 + @jump 0041 fd42 # DB FD illegal_1(); - call jump 0042 + @jump 0042 fd43 # DB FD illegal_1(); - call jump 0043 + @jump 0043 fd44 # LD B,HY B = HY; @@ -4364,32 +4486,30 @@ fd45 # LD B,LY B = LY; fd46 # LD B,(IY+o) - call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + @eay + 5 * @nomreq_addr PC-1 + @rm m_ea B = TDAT8; fd47 # DB FD illegal_1(); - call jump 0047 + @jump 0047 fd48 # DB FD illegal_1(); - call jump 0048 + @jump 0048 fd49 # DB FD illegal_1(); - call jump 0049 + @jump 0049 fd4a # DB FD illegal_1(); - call jump 004a + @jump 004a fd4b # DB FD illegal_1(); - call jump 004b + @jump 004b fd4c # LD C,HY C = HY; @@ -4398,32 +4518,30 @@ fd4d # LD C,LY C = LY; fd4e # LD C,(IY+o) - call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + @eay + 5 * @nomreq_addr PC-1 + @rm m_ea C = TDAT8; fd4f # DB FD illegal_1(); - call jump 004f + @jump 004f fd50 # DB FD illegal_1(); - call jump 0050 + @jump 0050 fd51 # DB FD illegal_1(); - call jump 0051 + @jump 0051 fd52 # DB FD illegal_1(); - call jump 0052 + @jump 0052 fd53 # DB FD illegal_1(); - call jump 0053 + @jump 0053 fd54 # LD D,HY D = HY; @@ -4432,32 +4550,30 @@ fd55 # LD D,LY D = LY; fd56 # LD D,(IY+o) - call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + @eay + 5 * @nomreq_addr PC-1 + @rm m_ea D = TDAT8; fd57 # DB FD illegal_1(); - call jump 0057 + @jump 0057 fd58 # DB FD illegal_1(); - call jump 0058 + @jump 0058 fd59 # DB FD illegal_1(); - call jump 0059 + @jump 0059 fd5a # DB FD illegal_1(); - call jump 005a + @jump 005a fd5b # DB FD illegal_1(); - call jump 005b + @jump 005b fd5c # LD E,HY E = HY; @@ -4466,16 +4582,14 @@ fd5d # LD E,LY E = LY; fd5e # LD E,(IY+o) - call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + @eay + 5 * @nomreq_addr PC-1 + @rm m_ea E = TDAT8; fd5f # DB FD illegal_1(); - call jump 005f + @jump 005f fd60 # LD HY,B HY = B; @@ -4495,11 +4609,9 @@ fd65 # LD HY,LY HY = LY; fd66 # LD H,(IY+o) - call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + @eay + 5 * @nomreq_addr PC-1 + @rm m_ea H = TDAT8; fd67 # LD HY,A @@ -4523,84 +4635,75 @@ fd6c # LD LY,HY fd6d # LD LY,LY fd6e # LD L,(IY+o) - call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + @eay + 5 * @nomreq_addr PC-1 + @rm m_ea L = TDAT8; fd6f # LD LY,A LY = A; fd70 # LD (IY+o),B - call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; TDAT8 = B; - call wm + @eay + 5 * @nomreq_addr PC-1 + TDAT8 = B; + @wm m_ea fd71 # LD (IY+o),C - call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; TDAT8 = C; - call wm + @eay + 5 * @nomreq_addr PC-1 + TDAT8 = C; + @wm m_ea fd72 # LD (IY+o),D - call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; TDAT8 = D; - call wm + @eay + 5 * @nomreq_addr PC-1 + TDAT8 = D; + @wm m_ea fd73 # LD (IY+o),E - call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; TDAT8 = E; - call wm + @eay + 5 * @nomreq_addr PC-1 + TDAT8 = E; + @wm m_ea fd74 # LD (IY+o),H - call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; TDAT8 = H; - call wm + @eay + 5 * @nomreq_addr PC-1 + TDAT8 = H; + @wm m_ea fd75 # LD (IY+o),L - call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; TDAT8 = L; - call wm + @eay + 5 * @nomreq_addr PC-1 + TDAT8 = L; + @wm m_ea fd76 # DB FD illegal_1(); - call jump 0076 + @jump 0076 fd77 # LD (IY+o),A - call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; TDAT8 = A; - call wm + @eay + 5 * @nomreq_addr PC-1 + TDAT8 = A; + @wm m_ea fd78 # DB FD illegal_1(); - call jump 0078 + @jump 0078 fd79 # DB FD illegal_1(); - call jump 0079 + @jump 0079 fd7a # DB FD illegal_1(); - call jump 007a + @jump 007a fd7b # DB FD illegal_1(); - call jump 007b + @jump 007b fd7c # LD A,HY A = HY; @@ -4609,32 +4712,30 @@ fd7d # LD A,LY A = LY; fd7e # LD A,(IY+o) - call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + @eay + 5 * @nomreq_addr PC-1 + @rm m_ea A = TDAT8; fd7f # DB FD illegal_1(); - call jump 007f + @jump 007f fd80 # DB FD illegal_1(); - call jump 0080 + @jump 0080 fd81 # DB FD illegal_1(); - call jump 0081 + @jump 0081 fd82 # DB FD illegal_1(); - call jump 0082 + @jump 0082 fd83 # DB FD illegal_1(); - call jump 0083 + @jump 0083 fd84 # ADD A,HY add_a(HY); @@ -4643,32 +4744,30 @@ fd85 # ADD A,LY add_a(LY); fd86 # ADD A,(IY+o) - call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + @eay + 5 * @nomreq_addr PC-1 + @rm m_ea add_a(TDAT8); fd87 # DB FD illegal_1(); - call jump 0087 + @jump 0087 fd88 # DB FD illegal_1(); - call jump 0088 + @jump 0088 fd89 # DB FD illegal_1(); - call jump 0089 + @jump 0089 fd8a # DB FD illegal_1(); - call jump 008a + @jump 008a fd8b # DB FD illegal_1(); - call jump 008b + @jump 008b fd8c # ADC A,HY adc_a(HY); @@ -4677,32 +4776,30 @@ fd8d # ADC A,LY adc_a(LY); fd8e # ADC A,(IY+o) - call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + @eay + 5 * @nomreq_addr PC-1 + @rm m_ea adc_a(TDAT8); fd8f # DB FD illegal_1(); - call jump 008f + @jump 008f fd90 # DB FD illegal_1(); - call jump 0090 + @jump 0090 fd91 # DB FD illegal_1(); - call jump 0091 + @jump 0091 fd92 # DB FD illegal_1(); - call jump 0092 + @jump 0092 fd93 # DB FD illegal_1(); - call jump 0093 + @jump 0093 fd94 # SUB HY sub_a(HY); @@ -4711,32 +4808,30 @@ fd95 # SUB LY sub_a(LY); fd96 # SUB (IY+o) - call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + @eay + 5 * @nomreq_addr PC-1 + @rm m_ea sub_a(TDAT8); fd97 # DB FD illegal_1(); - call jump 0097 + @jump 0097 fd98 # DB FD illegal_1(); - call jump 0098 + @jump 0098 fd99 # DB FD illegal_1(); - call jump 0099 + @jump 0099 fd9a # DB FD illegal_1(); - call jump 009a + @jump 009a fd9b # DB FD illegal_1(); - call jump 009b + @jump 009b fd9c # SBC A,HY sbc_a(HY); @@ -4745,32 +4840,30 @@ fd9d # SBC A,LY sbc_a(LY); fd9e # SBC A,(IY+o) - call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + @eay + 5 * @nomreq_addr PC-1 + @rm m_ea sbc_a(TDAT8); fd9f # DB FD illegal_1(); - call jump 009f + @jump 009f fda0 # DB FD illegal_1(); - call jump 00a0 + @jump 00a0 fda1 # DB FD illegal_1(); - call jump 00a1 + @jump 00a1 fda2 # DB FD illegal_1(); - call jump 00a2 + @jump 00a2 fda3 # DB FD illegal_1(); - call jump 00a3 + @jump 00a3 fda4 # AND HY and_a(HY); @@ -4779,32 +4872,30 @@ fda5 # AND LY and_a(LY); fda6 # AND (IY+o) - call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + @eay + 5 * @nomreq_addr PC-1 + @rm m_ea and_a(TDAT8); fda7 # DB FD illegal_1(); - call jump 00a7 + @jump 00a7 fda8 # DB FD illegal_1(); - call jump 00a8 + @jump 00a8 fda9 # DB FD illegal_1(); - call jump 00a9 + @jump 00a9 fdaa # DB FD illegal_1(); - call jump 00aa + @jump 00aa fdab # DB FD illegal_1(); - call jump 00ab + @jump 00ab fdac # XOR HY xor_a(HY); @@ -4813,32 +4904,30 @@ fdad # XOR LY xor_a(LY); fdae # XOR (IY+o) - call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + @eay + 5 * @nomreq_addr PC-1 + @rm m_ea xor_a(TDAT8); fdaf # DB FD illegal_1(); - call jump 00af + @jump 00af fdb0 # DB FD illegal_1(); - call jump 00b0 + @jump 00b0 fdb1 # DB FD illegal_1(); - call jump 00b1 + @jump 00b1 fdb2 # DB FD illegal_1(); - call jump 00b2 + @jump 00b2 fdb3 # DB FD illegal_1(); - call jump 00b3 + @jump 00b3 fdb4 # OR HY or_a(HY); @@ -4847,32 +4936,30 @@ fdb5 # OR LY or_a(LY); fdb6 # OR (IY+o) - call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + @eay + 5 * @nomreq_addr PC-1 + @rm m_ea or_a(TDAT8); fdb7 # DB FD illegal_1(); - call jump 00b7 + @jump 00b7 fdb8 # DB FD illegal_1(); - call jump 00b8 + @jump 00b8 fdb9 # DB FD illegal_1(); - call jump 00b9 + @jump 00b9 fdba # DB FD illegal_1(); - call jump 00ba + @jump 00ba fdbb # DB FD illegal_1(); - call jump 00bb + @jump 00bb fdbc # CP HY cp(HY); @@ -4881,275 +4968,269 @@ fdbd # CP LY cp(LY); fdbe # CP (IY+o) - call eay - TADR = PC-1; - 5 * call nomreq_addr - TADR = m_ea; - call rm + @eay + 5 * @nomreq_addr PC-1 + @rm m_ea cp(TDAT8); fdbf # DB FD illegal_1(); - call jump 00bf + @jump 00bf fdc0 # DB FD illegal_1(); - call jump 00c0 + @jump 00c0 fdc1 # DB FD illegal_1(); - call jump 00c1 + @jump 00c1 fdc2 # DB FD illegal_1(); - call jump 00c2 + @jump 00c2 fdc3 # DB FD illegal_1(); - call jump 00c3 + @jump 00c3 fdc4 # DB FD illegal_1(); - call jump 00c4 + @jump 00c4 fdc5 # DB FD illegal_1(); - call jump 00c5 + @jump 00c5 fdc6 # DB FD illegal_1(); - call jump 00c6 + @jump 00c6 fdc7 # DB FD illegal_1(); - call jump 00c7 + @jump 00c7 fdc8 # DB FD illegal_1(); - call jump 00c8 + @jump 00c8 fdc9 # DB FD illegal_1(); - call jump 00c9 + @jump 00c9 fdca # DB FD illegal_1(); - call jump 00ca + @jump 00ca fdcb # ** FD CB xx - call eay - call arg - TADR = PC-1; - 2 * call nomreq_addr - call jump_prefixed 0xfe + @eay + @arg + 2 * @nomreq_addr PC-1 + @jump_prefixed 0xfe fdcc # DB FD illegal_1(); - call jump 00cc + @jump 00cc fdcd # DB FD illegal_1(); - call jump 00cd + @jump 00cd fdce # DB FD illegal_1(); - call jump 00ce + @jump 00ce fdcf # DB FD illegal_1(); - call jump 00cf + @jump 00cf fdd0 # DB FD illegal_1(); - call jump 00d0 + @jump 00d0 fdd1 # DB FD illegal_1(); - call jump 00d1 + @jump 00d1 fdd2 # DB FD illegal_1(); - call jump 00d2 + @jump 00d2 fdd3 # DB FD illegal_1(); - call jump 00d3 + @jump 00d3 fdd4 # DB FD illegal_1(); - call jump 00d4 + @jump 00d4 fdd5 # DB FD illegal_1(); - call jump 00d5 + @jump 00d5 fdd6 # DB FD illegal_1(); - call jump 00d6 + @jump 00d6 fdd7 # DB FD illegal_1(); - call jump 00d7 + @jump 00d7 fdd8 # DB FD illegal_1(); - call jump 00d8 + @jump 00d8 fdd9 # DB FD illegal_1(); - call jump 00d9 + @jump 00d9 fdda # DB FD illegal_1(); - call jump 00da + @jump 00da fddb # DB FD illegal_1(); - call jump 00db + @jump 00db fddc # DB FD illegal_1(); - call jump 00dc + @jump 00dc fddd # DB FD illegal_1(); - call jump 00dd + @jump 00dd fdde # DB FD illegal_1(); - call jump 00de + @jump 00de fddf # DB FD illegal_1(); - call jump 00df + @jump 00df fde0 # DB FD illegal_1(); - call jump 00e0 + @jump 00e0 fde1 # POP IY - call pop + @pop IY = TDAT; fde2 # DB FD illegal_1(); - call jump 00e2 + @jump 00e2 fde3 # EX (SP),IY - TDAT = IY; - call ex_sp - IY = TDAT; + @ex_sp IY fde4 # DB FD illegal_1(); - call jump 00e4 + @jump 00e4 fde5 # PUSH IY - TDAT = IY; - call push + @push IY fde6 # DB FD illegal_1(); - call jump 00e6 + @jump 00e6 fde7 # DB FD illegal_1(); - call jump 00e7 + @jump 00e7 fde8 # DB FD illegal_1(); - call jump 00e8 + @jump 00e8 fde9 # JP (IY) PC = IY; fdea # DB FD illegal_1(); - call jump 00ea + @jump 00ea fdeb # DB FD illegal_1(); - call jump 00eb + @jump 00eb fdec # DB FD illegal_1(); - call jump 00ec + @jump 00ec fded # DB FD illegal_1(); - call jump 00ed + @jump 00ed fdee # DB FD illegal_1(); - call jump 00ee + @jump 00ee fdef # DB FD illegal_1(); - call jump 00ef + @jump 00ef fdf0 # DB FD illegal_1(); - call jump 00f0 + @jump 00f0 fdf1 # DB FD illegal_1(); - call jump 00f1 + @jump 00f1 fdf2 # DB FD illegal_1(); - call jump 00f2 + @jump 00f2 fdf3 # DB FD illegal_1(); - call jump 00f3 + @jump 00f3 fdf4 # DB FD illegal_1(); - call jump 00f4 + @jump 00f4 fdf5 # DB FD illegal_1(); - call jump 00f5 + @jump 00f5 fdf6 # DB FD illegal_1(); - call jump 00f6 + @jump 00f6 fdf7 # DB FD illegal_1(); - call jump 00f7 + @jump 00f7 fdf8 # DB FD illegal_1(); - call jump 00f8 + @jump 00f8 fdf9 # LD SP,IY - call nomreq_ir 2 + @nomreq_ir 2 SP = IY; fdfa # DB FD illegal_1(); - call jump 00fa + @jump 00fa fdfb # DB FD illegal_1(); - call jump 00fb + @jump 00fb fdfc # DB FD illegal_1(); - call jump 00fc + @jump 00fc fdfd # DB FD illegal_1(); - call jump 00fd + @jump 00fd fdfe # DB FD illegal_1(); - call jump 00fe + @jump 00fe fdff # DB FD illegal_1(); - call jump 00ff + @jump 00ff ########################################################## @@ -5348,222 +5429,235 @@ ed3f # DB ED illegal_2(); ed40 # IN B,(C) - TADR = BC; - call in - B = TDAT8; set_f((F & CF) | SZP[B]); WZ = TADR + 1; + @in BC + B = TDAT8; + set_f((F & CF) | SZP[B]); + WZ = BC + 1; ed41 # OUT (C),B - TADR = BC; TDAT8 = B; - call out - WZ = TADR + 1; + TDAT8 = B; + @out BC + WZ = BC + 1; ed42 # SBC HL,BC TDAT = BC; - call sbc_hl + @sbc_hl ed43 # LD (w),BC - call arg16 - m_ea = TDAT; TADR = m_ea; TDAT = BC; - call wm16 + @arg16 + m_ea = TDAT; + TDAT = BC; + @wm16 m_ea WZ = m_ea + 1; ed44 # NEG neg(); ed45 # RETN - call retn + @retn ed46 # IM 0 m_im = 0; ed47 # LD i,A - call ld_i_a + @ld_i_a ed48 # IN C,(C) - TADR = BC; - call in - C = TDAT8; set_f((F & CF) | SZP[C]); WZ = TADR + 1; + @in BC + C = TDAT8; + set_f((F & CF) | SZP[C]); + WZ = BC + 1; ed49 # OUT (C),C - TADR = BC; TDAT8 = C; - call out - WZ = TADR + 1; + TDAT8 = C; + @out BC + WZ = BC + 1; ed4a # ADC HL,BC TDAT = BC; - call adc_hl + @adc_hl ed4b # LD BC,(w) - call arg16 - m_ea = TDAT; TADR = m_ea; - call rm16 - BC = TDAT; WZ = m_ea + 1; + @arg16 + m_ea = TDAT; + @rm16 m_ea + BC = TDAT; + WZ = m_ea + 1; ed4c # NEG neg(); ed4d # RETI - call reti + @reti ed4e # IM 0 m_im = 0; ed4f # LD r,A - call ld_r_a + @ld_r_a ed50 # IN D,(C) - TADR = BC; - call in - D = TDAT8; set_f((F & CF) | SZP[D]); WZ = TADR + 1; + @in BC + D = TDAT8; + set_f((F & CF) | SZP[D]); + WZ = BC + 1; ed51 # OUT (C),D - TADR = BC; TDAT8 = D; - call out - WZ = TADR + 1; + TDAT8 = D; + @out BC + WZ = BC + 1; ed52 # SBC HL,DE TDAT = DE; - call sbc_hl + @sbc_hl ed53 # LD (w),DE - call arg16 - m_ea = TDAT; TADR = m_ea; TDAT = DE; - call wm16 + @arg16 + m_ea = TDAT; + TDAT = DE; + @wm16 m_ea WZ = m_ea + 1; ed54 # NEG neg(); ed55 # RETN - call retn + @retn ed56 # IM 1 m_im = 1; ed57 # LD A,i - call ld_a_i + @ld_a_i ed58 # IN E,(C) - TADR = BC; - call in - E = TDAT8; set_f((F & CF) | SZP[E]); WZ = TADR + 1; + @in BC + E = TDAT8; + set_f((F & CF) | SZP[E]); + WZ = BC + 1; ed59 # OUT (C),E - TADR = BC; TDAT8 = E; - call out - WZ = TADR + 1; + TDAT8 = E; + @out BC + WZ = BC + 1; ed5a # ADC HL,DE TDAT = DE; - call adc_hl + @adc_hl ed5b # LD DE,(w) - call arg16 - m_ea = TDAT; TADR = m_ea; - call rm16 - DE = TDAT; WZ = m_ea + 1; + @arg16 + m_ea = TDAT; + @rm16 m_ea + DE = TDAT; + WZ = m_ea + 1; ed5c # NEG neg(); ed5d # RETI - call reti + @reti ed5e # IM 2 m_im = 2; ed5f # LD A,r - call ld_a_r + @ld_a_r ed60 # IN H,(C) - TADR = BC; - call in - H = TDAT8; set_f((F & CF) | SZP[H]); WZ = TADR + 1; + @in BC + H = TDAT8; + set_f((F & CF) | SZP[H]); + WZ = BC + 1; ed61 # OUT (C),H - TADR = BC; TDAT8 = H; - call out - WZ = TADR + 1; + TDAT8 = H; + @out BC + WZ = BC + 1; ed62 # SBC HL,HL TDAT = HL; - call sbc_hl + @sbc_hl ed63 # LD (w),HL - call arg16 - m_ea = TDAT; TADR = m_ea; TDAT = HL; - call wm16 + @arg16 + m_ea = TDAT; + TDAT = HL; + @wm16 m_ea WZ = m_ea + 1; ed64 # NEG neg(); ed65 # RETN - call retn + @retn ed66 # IM 0 m_im = 0; ed67 # RRD (HL) - call rrd + @rrd ed68 # IN L,(C) - TADR = BC; - call in - L = TDAT8; set_f((F & CF) | SZP[L]); WZ = TADR + 1; + @in BC + L = TDAT8; + set_f((F & CF) | SZP[L]); + WZ = BC + 1; ed69 # OUT (C),L - TADR = BC; TDAT8 = L; - call out - WZ = TADR + 1; + TDAT8 = L; + @out BC + WZ = BC + 1; ed6a # ADC HL,HL TDAT = HL; - call adc_hl + @adc_hl ed6b # LD HL,(w) - call arg16 - m_ea = TDAT; TADR = m_ea; - call rm16 - HL = TDAT; WZ = m_ea + 1; + @arg16 + m_ea = TDAT; + @rm16 m_ea + HL = TDAT; + WZ = m_ea + 1; ed6c # NEG neg(); ed6d # RETI - call reti + @reti ed6e # IM 0 m_im = 0; ed6f # RLD (HL) - call rld + @rld ed70 # IN 0,(C) - TADR = BC; - call in - set_f((F & CF) | SZP[TDAT8]); WZ = TADR + 1; + @in BC + set_f((F & CF) | SZP[TDAT8]); + WZ = BC + 1; ed71 # OUT (C),0 - TADR = BC; TDAT8 = 0; - call out - WZ = TADR + 1; + TDAT8 = 0; + @out BC + WZ = BC + 1; ed72 # SBC HL,SP TDAT = SP; - call sbc_hl + @sbc_hl ed73 # LD (w),SP - call arg16 - m_ea = TDAT; TADR = m_ea; TDAT = SP; - call wm16 + @arg16 + m_ea = TDAT; + TDAT = SP; + @wm16 m_ea WZ = m_ea + 1; ed74 # NEG neg(); ed75 # RETN - call retn + @retn ed76 # IM 1 m_im = 1; @@ -5572,30 +5666,32 @@ ed77 # DB ED,77 illegal_2(); ed78 # IN A,(C) - TADR = BC; - call in - A = TDAT8; set_f((F & CF) | SZP[A]); WZ = TADR + 1; + @in BC + A = TDAT8; + set_f((F & CF) | SZP[A]); + WZ = BC + 1; ed79 # OUT (C),A - TADR = BC; TDAT8 = A; - call out - WZ = TADR + 1; + TDAT8 = A; + @out BC + WZ = BC + 1; ed7a # ADC HL,SP TDAT = SP; - call adc_hl + @adc_hl ed7b # LD SP,(w) - call arg16 - m_ea = TDAT; TADR = m_ea; - call rm16 - SP = TDAT; WZ = m_ea + 1; + @arg16 + m_ea = TDAT; + @rm16 m_ea + SP = TDAT; + WZ = m_ea + 1; ed7c # NEG neg(); ed7d # RETI - call reti + @reti ed7e # IM 2 m_im = 2; @@ -5700,16 +5796,16 @@ ed9f # DB ED illegal_2(); eda0 # LDI - call ldi + @ldi eda1 # CPI - call cpi + @cpi eda2 # INI - call ini + @ini eda3 # OUTI - call outi + @outi eda4 # DB ED illegal_2(); @@ -5724,16 +5820,16 @@ eda7 # DB ED illegal_2(); eda8 # LDD - call ldd + @ldd eda9 # CPD - call cpd + @cpd edaa # IND - call ind + @ind edab # OUTD - call outd + @outd edac # DB ED illegal_2(); @@ -5748,16 +5844,16 @@ edaf # DB ED illegal_2(); edb0 # LDIR - call ldir + @ldir edb1 # CPIR - call cpir + @cpir edb2 # INIR - call inir + @inir edb3 # OTIR - call otir + @otir edb4 # DB ED illegal_2(); @@ -5772,16 +5868,16 @@ edb7 # DB ED illegal_2(); edb8 # LDDR - call lddr + @lddr edb9 # CPDR - call cpdr + @cpdr edba # INDR - call indr + @indr edbb # OTDR - call otdr + @otdr edbc # DB ED illegal_2(); @@ -5994,16 +6090,17 @@ edff # DB ED 0000 # NOP 0001 # LD BC,w - call arg16 + @arg16 BC = TDAT; 0002 # LD (BC),A - TADR = BC; TDAT8 = A; - call wm - WZ_L = (BC + 1) & 0xFF; WZ_H = A; + TDAT8 = A; + @wm BC + WZ_L = (BC + 1) & 0xFF; + WZ_H = A; 0003 # INC BC - call nomreq_ir 2 + @nomreq_ir 2 BC++; 0004 # INC B @@ -6013,27 +6110,29 @@ edff # DB ED dec(B); 0006 # LD B,n - call arg + @arg B = TDAT8; 0007 # RLCA rlca(); 0008 # EX AF,AF' - using std::swap; swap(m_af, m_af2); + using std::swap; + swap(m_af, m_af2); 0009 # ADD HL,BC - TDAT = HL; TDAT2 = BC; - call add16 + TDAT = HL; + TDAT2 = BC; + @add16 HL = TDAT; 000a # LD A,(BC) - TADR = BC; - call rm - A = TDAT8; WZ = BC+1; + @rm BC + A = TDAT8; + WZ = BC+1; 000b # DEC BC - call nomreq_ir 2 + @nomreq_ir 2 BC--; 000c # INC C @@ -6043,28 +6142,29 @@ edff # DB ED dec(C); 000e # LD C,n - call arg + @arg C = TDAT8; 000f # RRCA rrca(); 0010 # DJNZ o - call nomreq_ir 1 + @nomreq_ir 1 TDAT8 = --B; - call jr_cond + @jr_cond 0011 # LD DE,w - call arg16 + @arg16 DE = TDAT; 0012 # LD (DE),A - TADR = DE; TDAT8 = A; - call wm - WZ_L = (DE + 1) & 0xFF; WZ_H = A; + TDAT8 = A; + @wm DE + WZ_L = (DE + 1) & 0xFF; + WZ_H = A; 0013 # INC DE - call nomreq_ir 2 + @nomreq_ir 2 DE++; 0014 # INC D @@ -6074,27 +6174,28 @@ edff # DB ED dec(D); 0016 # LD D,n - call arg + @arg D = TDAT8; 0017 # RLA rla(); 0018 # JR o - call jr + @jr 0019 # ADD HL,DE - TDAT = HL; TDAT2 = DE; - call add16 + TDAT = HL; + TDAT2 = DE; + @add16 HL = TDAT; 001a # LD A,(DE) - TADR = DE; - call rm - A = TDAT8; WZ = DE + 1; + @rm DE + A = TDAT8; + WZ = DE + 1; 001b # DEC DE - call nomreq_ir 2 + @nomreq_ir 2 DE--; 001c # INC E @@ -6104,7 +6205,7 @@ edff # DB ED dec(E); 001e # LD E,n - call arg + @arg E = TDAT8; 001f # RRA @@ -6112,20 +6213,21 @@ edff # DB ED 0020 # JR NZ,o TDAT8 = !(F & ZF); - call jr_cond + @jr_cond 0021 # LD HL,w - call arg16 + @arg16 HL = TDAT; 0022 # LD (w),HL - call arg16 - m_ea = TDAT; TADR = TDAT; TDAT = HL; - call wm16 + @arg16 + m_ea = TDAT; + TDAT = HL; + @wm16 m_ea WZ = m_ea + 1; 0023 # INC HL - call nomreq_ir 2 + @nomreq_ir 2 HL++; 0024 # INC H @@ -6135,7 +6237,7 @@ edff # DB ED dec(H); 0026 # LD H,n - call arg + @arg H = TDAT8; 0027 # DAA @@ -6143,21 +6245,23 @@ edff # DB ED 0028 # JR Z,o TDAT8 = F & ZF; - call jr_cond + @jr_cond 0029 # ADD HL,HL - TDAT = HL; TDAT2 = HL; - call add16 + TDAT = HL; + TDAT2 = HL; + @add16 HL = TDAT; 002a # LD HL,(w) - call arg16 - m_ea = TDAT; TADR = TDAT; - call rm16 - HL = TDAT; WZ = m_ea + 1; + @arg16 + m_ea = TDAT; + @rm16 m_ea + HL = TDAT; + WZ = m_ea + 1; 002b # DEC HL - call nomreq_ir 2 + @nomreq_ir 2 HL--; 002c # INC L @@ -6167,67 +6271,69 @@ edff # DB ED dec(L); 002e # LD L,n - call arg + @arg L = TDAT8; 002f # CPL - A ^= 0xff; set_f((F & (SF | ZF | PF | CF)) | HF | NF | (A & (YF | XF))); + A ^= 0xff; + set_f((F & (SF | ZF | PF | CF)) | HF | NF | (A & (YF | XF))); 0030 # JR NC,o TDAT8 = !(F & CF); - call jr_cond + @jr_cond 0031 # LD SP,w - call arg16 + @arg16 SP = TDAT; 0032 # LD (w),A - call arg16 - m_ea = TDAT; TADR = m_ea; TDAT8 = A; - call wm - WZ_L = (m_ea + 1) & 0xFF; WZ_H = A; + @arg16 + m_ea = TDAT; + TDAT8 = A; + @wm m_ea + WZ_L = (m_ea + 1) & 0xFF; + WZ_H = A; 0033 # INC SP - call nomreq_ir 2 + @nomreq_ir 2 SP++; 0034 # INC (HL) - TADR = HL; - call rm_reg + @rm_reg HL inc(TDAT8); - call wm + @wm HL 0035 # DEC (HL) - TADR = HL; - call rm_reg + @rm_reg HL dec(TDAT8); - call wm + @wm HL 0036 # LD (HL),n - call arg - TADR = HL; - call wm + @arg + @wm HL 0037 # SCF set_f((F & (SF | ZF | PF)) | CF | (((F & Q) | A) & (YF | XF))); 0038 # JR C,o TDAT8 = F & CF; - call jr_cond + @jr_cond 0039 # ADD HL,SP - TDAT = HL; TDAT2 = SP; - call add16 + TDAT = HL; + TDAT2 = SP; + @add16 HL = TDAT; 003a # LD A,(w) - call arg16 - m_ea = TDAT; TADR = TDAT; - call rm - A = TDAT8; WZ = m_ea + 1; + @arg16 + m_ea = TDAT; + @rm m_ea + A = TDAT8; + WZ = m_ea + 1; 003b # DEC SP - call nomreq_ir 2 + @nomreq_ir 2 SP--; 003c # INC A @@ -6237,7 +6343,7 @@ edff # DB ED dec(A); 003e # LD A,n - call arg + @arg A = TDAT8; 003f # CCF @@ -6261,8 +6367,7 @@ edff # DB ED B = L; 0046 # LD B,(HL) - TADR = HL; - call rm + @rm HL B = TDAT8; 0047 # LD B,A @@ -6286,8 +6391,7 @@ edff # DB ED C = L; 004e # LD C,(HL) - TADR = HL; - call rm + @rm HL C = TDAT8; 004f # LD C,A @@ -6311,8 +6415,7 @@ edff # DB ED D = L; 0056 # LD D,(HL) - TADR = HL; - call rm + @rm HL D = TDAT8; 0057 # LD D,A @@ -6336,8 +6439,7 @@ edff # DB ED E = L; 005e # LD E,(HL) - TADR = HL; - call rm + @rm HL E = TDAT8; 005f # LD E,A @@ -6361,8 +6463,7 @@ edff # DB ED H = L; 0066 # LD H,(HL) - TADR = HL; - call rm + @rm HL H = TDAT8; 0067 # LD H,A @@ -6386,43 +6487,42 @@ edff # DB ED 006d # LD L,L 006e # LD L,(HL) - TADR = HL; - call rm + @rm HL L = TDAT8; 006f # LD L,A L = A; 0070 # LD (HL),B - TADR = HL; TDAT = B; - call wm + TDAT = B; + @wm HL 0071 # LD (HL),C - TADR = HL; TDAT = C; - call wm + TDAT = C; + @wm HL 0072 # LD (HL),D - TADR = HL; TDAT = D; - call wm + TDAT = D; + @wm HL 0073 # LD (HL),E - TADR = HL; TDAT = E; - call wm + TDAT = E; + @wm HL 0074 # LD (HL),H - TADR = HL; TDAT = H; - call wm + TDAT = H; + @wm HL 0075 # LD (HL),L - TADR = HL; TDAT = L; - call wm + TDAT = L; + @wm HL 0076 # HALT halt(); 0077 # LD (HL),A - TADR = HL; TDAT = A; - call wm + TDAT = A; + @wm HL 0078 # LD A,B A = B; @@ -6443,8 +6543,7 @@ edff # DB ED A = L; 007e # LD A,(HL) - TADR = HL; - call rm + @rm HL A = TDAT8; 007f # LD A,A @@ -6468,8 +6567,7 @@ edff # DB ED add_a(L); 0086 # ADD A,(HL) - TADR = HL; - call rm + @rm HL add_a(TDAT8); 0087 # ADD A,A @@ -6494,8 +6592,7 @@ edff # DB ED adc_a(L); 008e # ADC A,(HL) - TADR = HL; - call rm + @rm HL adc_a(TDAT8); 008f # ADC A,A @@ -6520,8 +6617,7 @@ edff # DB ED sub_a(L); 0096 # SUB (HL) - TADR = HL; - call rm + @rm HL sub_a(TDAT8); 0097 # SUB A @@ -6546,8 +6642,7 @@ edff # DB ED sbc_a(L); 009e # SBC A,(HL) - TADR = HL; - call rm + @rm HL sbc_a(TDAT8); 009f # SBC A,A @@ -6572,8 +6667,7 @@ edff # DB ED and_a(L); 00a6 # AND (HL) - TADR = HL; - call rm + @rm HL and_a(TDAT8); 00a7 # AND A @@ -6598,8 +6692,7 @@ edff # DB ED xor_a(L); 00ae # XOR (HL) - TADR = HL; - call rm + @rm HL xor_a(TDAT8); 00af # XOR A @@ -6624,8 +6717,7 @@ edff # DB ED or_a(L); 00b6 # OR (HL) - TADR = HL; - call rm + @rm HL or_a(TDAT8); 00b7 # OR A @@ -6650,8 +6742,7 @@ edff # DB ED cp(L); 00be # CP (HL) - TADR = HL; - call rm + @rm HL cp(TDAT8); 00bf # CP A @@ -6659,249 +6750,248 @@ edff # DB ED 00c0 # RET NZ TDAT8 = !(F & ZF); - call ret_cond + @ret_cond 00c1 # POP BC - call pop + @pop BC = TDAT; 00c2 # JP NZ,a TDAT8 = !(F & ZF); - call jp_cond + @jp_cond 00c3 # JP a - call jp + @jp 00c4 # CALL NZ,a TDAT8 = !(F & ZF); - call call_cond + @call_cond 00c5 # PUSH BC - TDAT = BC; - call push + @push BC 00c6 # ADD A,n - call arg + @arg add_a(TDAT8); 00c7 # RST 0 - call rst 0x00 + @rst 0x00 00c8 # RET Z TDAT8 = (F & ZF); - call ret_cond + @ret_cond 00c9 # RET - call pop - PC = TDAT; WZ = PC; + @pop + PC = TDAT; + WZ = PC; 00ca # JP Z,a TDAT8 = F & ZF; - call jp_cond + @jp_cond 00cb # **** CB xx - call rop - call jump_prefixed 0xcb + @rop + @jump_prefixed 0xcb 00cc # CALL Z,a TDAT8 = F & ZF; - call call_cond + @call_cond 00cd # CALL a - call arg16_call + @arg16_call 00ce # ADC A,n - call arg + @arg adc_a(TDAT8); 00cf # RST 1 - call rst 0x08 + @rst 0x08 00d0 # RET NC TDAT8 = !(F & CF); - call ret_cond + @ret_cond 00d1 # POP DE - call pop + @pop DE = TDAT; 00d2 # JP NC,a TDAT8 = !(F & CF); - call jp_cond + @jp_cond 00d3 # OUT (n),A - call arg - TADR = TDAT8 | (A << 8); TDAT = A; - call out - WZ_L = ((TADR & 0xff) + 1) & 0xff; WZ_H = A; + @arg + TDAT2 = TDAT8 | (A << 8); + TDAT = A; + @out TDAT2 + WZ_L = ((TDAT2 & 0xff) + 1) & 0xff; + WZ_H = A; 00d4 # CALL NC,a TDAT8 = !(F & CF); - call call_cond + @call_cond 00d5 # PUSH DE - TDAT = DE; - call push + @push DE 00d6 # SUB n - call arg + @arg sub_a(TDAT8); 00d7 # RST 2 - call rst 0x10 + @rst 0x10 00d8 # RET C TDAT8 = (F & CF); - call ret_cond + @ret_cond 00d9 # EXX exx(); 00da # JP C,a TDAT8 = F & CF; - call jp_cond + @jp_cond 00db # IN A,(n) - call arg - TADR = TDAT8 | (A << 8); - call in - A = TDAT8; WZ = TADR + 1; + @arg + TDAT2 = TDAT8 | (A << 8); + @in TDAT2 + A = TDAT8; + WZ = TDAT2 + 1; 00dc # CALL C,a TDAT8 = F & CF; - call call_cond + @call_cond 00dd # **** DD xx - call rop - call jump_prefixed 0xdd + @rop + @jump_prefixed 0xdd 00de # SBC A,n - call arg + @arg sbc_a(TDAT8); 00df # RST 3 - call rst 0x18 + @rst 0x18 00e0 # RET PO TDAT8 = !(F & PF); - call ret_cond + @ret_cond 00e1 # POP HL - call pop + @pop HL = TDAT; 00e2 # JP PO,a TDAT8 = !(F & PF); - call jp_cond + @jp_cond 00e3 # EX HL,(SP) - TDAT = HL; - call ex_sp - HL = TDAT; + @ex_sp HL 00e4 # CALL PO,a TDAT8 = !(F & PF); - call call_cond + @call_cond 00e5 # PUSH HL - TDAT = HL; - call push + @push HL 00e6 # AND n - call arg + @arg and_a(TDAT8); 00e7 # RST 4 - call rst 0x20 + @rst 0x20 00e8 # RET PE TDAT8 = (F & PF); - call ret_cond + @ret_cond 00e9 # JP (HL) PC = HL; 00ea # JP PE,a TDAT8 = F & PF; - call jp_cond + @jp_cond 00eb # EX DE,HL - using std::swap; swap(DE, HL); + using std::swap; + swap(DE, HL); 00ec # CALL PE,a TDAT8 = F & PF; - call call_cond + @call_cond 00ed # **** ED xx - call rop - call jump_prefixed 0xed + @rop + @jump_prefixed 0xed 00ee # XOR n - call arg + @arg xor_a(TDAT8); 00ef # RST 5 - call rst 0x28 + @rst 0x28 00f0 # RET P TDAT8 = !(F & SF); - call ret_cond + @ret_cond 00f1 # POP AF - call pop + @pop AF = TDAT; 00f2 # JP P,a TDAT8 = !(F & SF); - call jp_cond + @jp_cond 00f3 # DI m_iff1 = m_iff2 = 0; 00f4 # CALL P,a TDAT8 = !(F & SF); - call call_cond + @call_cond 00f5 # PUSH AF - TDAT = AF; - call push + @push AF 00f6 # OR n - call arg + @arg or_a(TDAT8); 00f7 # RST 6 - call rst 0x30 + @rst 0x30 00f8 # RET M TDAT8 = (F & SF); - call ret_cond + @ret_cond 00f9 # LD SP,HL - call nomreq_ir 2 + @nomreq_ir 2 SP = HL; 00fa # JP M,a TDAT8 = F & SF; - call jp_cond + @jp_cond 00fb # EI ei(); 00fc # CALL M,a TDAT8 = F & SF; - call call_cond + @call_cond 00fd # **** FD xx - call rop - call jump_prefixed 0xfd + @rop + @jump_prefixed 0xfd 00fe # CP n - call arg + @arg cp(TDAT8); 00ff # RST 7 - call rst 0x38 + @rst 0x38 @@ -7600,10 +7690,9 @@ r800:cb35 # SLL L L = r800_sll(L); r800:cb36 # SLL (HL) - TADR = HL; - call rm_reg + @rm_reg HL TDAT8 = r800_sll(TDAT8); - call wm + @wm HL r800:cb37 # SLL A A = r800_sll(A); @@ -8629,7 +8718,8 @@ r800:fdff # illegal illegal_1(); r800:ed46 # IM 0 - m_im = 0; T(1); + m_im = 0; + + 1 r800:ed4c # illegal illegal_2(); @@ -8644,7 +8734,8 @@ r800:ed55 # illegal illegal_2(); r800:ed56 # IM 1 - m_im = 1; T(1); + m_im = 1; + + 1 r800:ed5c # illegal illegal_2(); @@ -8653,7 +8744,8 @@ r800:ed5d # illegal illegal_2(); r800:ed5e # IM 2 - m_im = 2; T(1); + m_im = 2; + + 1 r800:ed64 # illegal illegal_2(); @@ -8668,7 +8760,8 @@ r800:ed6c # illegal illegal_2(); r800:ed6e # IM 0 - m_im = 0; T(1); + m_im = 0; + + 1 # ed70 became legal IN F,(C) @@ -8697,37 +8790,48 @@ r800:ed7f # illegal illegal_2(); r800:edc1 # MULUB A,B - mulub(B); T(12); + mulub(B); + + 12 r800:edc3 # MULUW HL,BC - muluw(BC); T(34); + muluw(BC); + + 34 r800:edc9 # MULUB A,C - mulub(C); T(12); + mulub(C); + + 12 r800:edd1 # MULUB A,D - mulub(D); T(12); + mulub(D); + + 12 r800:edd9 # MULUB A,E - mulub(E); T(12); + mulub(E); + + 12 r800:ede1 # MULUB A,H (undocumented) - mulub(H); T(12); + mulub(H); + + 12 r800:ede9 # MULUB A,L (undocumented) - mulub(L); T(12); + mulub(L); + + 12 r800:edf1 # MULUB A,A (undocumented) - mulub(A); T(12); + mulub(A); + + 12 r800:edf3 # MULUW HL,SP - muluw(SP); T(34); + muluw(SP); + + 34 r800:edf9 # MULUB A,A (undocumented) - mulub(A); T(12); + mulub(A); + + 12 r800:00f3 # DI - m_iff1 = m_iff2 = 0; T(1); + m_iff1 = m_iff2 = 0; + + 1 @@ -8735,32 +8839,28 @@ r800:00f3 # DI # Z80N ########################################################## macro ldix - { - TADR = HL; - call rm - if (TDAT8 != A) { - TADR = DE; - call wm - ; - } - HL++; - DE++; - BC--; +{ + @rm HL + if (TDAT8 != A) { + @wm DE + ; } + HL++; + DE++; + BC--; +} macro lddx - { - TADR = HL; - call rm - if (TDAT8 != A) { - TADR = DE; - call wm - ; - } - DE++; - HL--; - BC--; +{ + @rm HL + if (TDAT8 != A) { + @wm DE + ; } + DE++; + HL--; + BC--; +} z80n:ed23 # swapnib A = (A << 4) | (A >> 4); @@ -8770,7 +8870,7 @@ z80n:ed24 # mirror a z80n:ed27 # test * TDAT_H = A; - call arg + @arg and_a(TDAT8); A = TDAT_H; @@ -8778,10 +8878,10 @@ z80n:ed28 # bsla de,b DE <<= std::min(B & 31, 16); z80n:ed29 # bsra de,b - { - const u16 fill = (DE & 0x8000) ? ~u16(0) : u16(0); - DE = (DE >> std::min(B & 31, 16)) | (fill << (16 - std::min(B & 31, 16))); - } +{ + const u16 fill = (DE & 0x8000) ? ~u16(0) : u16(0); + DE = (DE >> std::min(B & 31, 16)) | (fill << (16 - std::min(B & 31, 16))); +} z80n:ed2a # bsrl de,b DE >>= std::min(B & 31, 16); @@ -8805,35 +8905,34 @@ z80n:ed33 # add bc,a BC += A; z80n:ed34 # add hl,** - call arg16 + @arg16 HL += TDAT; z80n:ed35 # add de,** - call arg16 + @arg16 DE += TDAT; z80n:ed36 # add bc,** - call arg16 + @arg16 BC += TDAT; z80n:ed8a # push ** - call arg16 - using std::swap; swap(TDAT_H, TDAT_L); - call push + @arg + TDAT_H = TDAT_L; + @arg + @push TDAT z80n:ed90 # outinb - TADR = HL; - call rm - TADR = BC; - call out + @rm HL + @out BC HL++; z80n:ed91 # nextreg *,* - call arg16 + @arg16 m_out_nextreg_cb(TDAT_L, TDAT_H); z80n:ed92 # nextreg *,a - call arg + @arg m_out_nextreg_cb(TDAT8, A); z80n:ed93 # pixeldn @@ -8851,35 +8950,30 @@ z80n:ed95 # setae A = 0x80 >> (E & 7); z80n:ed98 # jp (c) - TADR = BC; - call in + @in BC PC = (PC & 0xc000) + (TDAT8 << 6); z80n:eda4 # ldix - call ldix + @ldix z80n:eda5 # ldws - TADR = HL; - call rm - TADR = DE; - call wm + @rm HL + @wm DE L++; inc(D); z80n:edac # lddx - call lddx + @lddx z80n:edb4 # ldirx - call ldix + @ldix if (BC != 0) PC -= 2; z80n:edb7 # ldpirx - TADR = (HL & 0xfff8) + (E & 7); - call rm + @rm (HL & 0xfff8) + (E & 7) if (TDAT8 != A) { - TADR = DE; - call wm + @wm DE ; } DE++; @@ -8888,6 +8982,6 @@ z80n:edb7 # ldpirx PC -= 2; z80n:edbc # lddrx - call lddx + @lddx if (BC != 0) PC -= 2; diff --git a/src/devices/cpu/z80/z80make.py b/src/devices/cpu/z80/z80make.py index 023cdfd29ba..c1c75d12fb6 100644 --- a/src/devices/cpu/z80/z80make.py +++ b/src/devices/cpu/z80/z80make.py @@ -29,7 +29,7 @@ class IndStr: return not self.str def has_indent(self): - return self.indent != '' + return self.indent != '' or self.str[0] == "{" or self.str[0] == "}" def strip_indent(self, n): if self.indent != '': @@ -240,11 +240,11 @@ class OpcodeList: line_toc = line_toc[2:] line = " ".join(line_toc) for i in range(times): - if line_toc[0] == 'call': - name = line_toc[1] + if line_toc[0].startswith('@'): + name = line_toc[0][1:] arg = None - if len(line_toc) > 2: - arg = " ".join(line_toc[2:]) + if len(line_toc) > 1: + arg = " ".join(line_toc[1:]) if name in self.macros: macro = self.macros[name] ([out.extend(self.pre_process(il)) for il in macro.apply(arg)]) diff --git a/src/devices/machine/netlist.cpp b/src/devices/machine/netlist.cpp index 8d4d6cedf4d..a3d6ae3e656 100644 --- a/src/devices/machine/netlist.cpp +++ b/src/devices/machine/netlist.cpp @@ -322,6 +322,7 @@ class NETLIB_NAME(sound_in) : public sound_in_type public: using base_type = sound_in_type; using base_type::base_type; + sound_stream *m_stream = nullptr; }; netlist::setup_t &netlist_mame_device::setup() @@ -1387,6 +1388,11 @@ void netlist_mame_sound_device::device_start() std::vector<nld_sound_in *> indevs = netlist().get_device_list<nld_sound_in>(); for (auto &e : indevs) { + // We cannot use the resampler because the stream is not + // always audio. In particular the ay8910 may send a stream + // of resistor values, which would be destroyed by resampling. + + e->m_stream = stream_alloc(1, 0, SAMPLE_RATE_INPUT_ADAPTIVE); m_in.emplace(e->id(), e); const auto sample_time = netlist::netlist_time::from_raw(static_cast<netlist::netlist_time::internal_type>(nltime_from_attotime(m_attotime_per_clock).as_raw())); e->resolve_params(sample_time); @@ -1399,7 +1405,7 @@ void netlist_mame_sound_device::device_start() m_inbuffer.resize(m_in.size()); /* initialize the stream(s) */ - m_stream = stream_alloc(m_in.size(), m_out.size(), m_sound_clock); + m_stream = stream_alloc(0, m_out.size(), m_sound_clock); LOGDEVCALLS("sound device_start exit\n"); } @@ -1444,21 +1450,30 @@ void netlist_mame_sound_device::update_to_current_time() void netlist_mame_sound_device::sound_stream_update(sound_stream &stream) { - for (auto &e : m_in) + if (stream.input_count() == 1) { - auto clock_period = stream.sample_period(); - auto sample_time = netlist::netlist_time::from_raw(static_cast<netlist::netlist_time::internal_type>(nltime_from_attotime(clock_period).as_raw())); - m_inbuffer[e.first] = netlist_mame_sound_input_buffer(stream, e.first); - e.second->buffer_reset(sample_time, stream.samples(), &m_inbuffer[e.first]); + for (auto &e : m_in) + if (e.second->m_stream == &stream) + { + auto clock_period = stream.sample_period(); + auto sample_time = netlist::netlist_time::from_raw(static_cast<netlist::netlist_time::internal_type>(nltime_from_attotime(clock_period).as_raw())); + m_inbuffer[e.first] = netlist_mame_sound_input_buffer(stream); + e.second->buffer_reset(sample_time, stream.samples(), &m_inbuffer[e.first]); + return; + } + fatalerror("netlist: Got input from an unknown stream\n"); } int samples = stream.samples(); LOGDEBUG("samples %d\n", samples); - // end_time() is the time at the END of the last sample we're generating - // however, the sample value is the value at the START of that last sample, - // so subtract one sample period so that we only process up to the minimum - auto nl_target_time = nltime_from_attotime(stream.end_time() - stream.sample_period()); + // Ensure all input streams are up-to-date + for (auto &e : m_in) + if (e.second->m_stream) + e.second->m_stream->update(); + + // Get the start time of the last sample to generate + auto nl_target_time = nltime_from_attotime(stream.sample_to_time(stream.end_index() - 1)); auto nltime(netlist().exec().time()); if (nltime < nl_target_time) diff --git a/src/devices/machine/netlist.h b/src/devices/machine/netlist.h index 67b6b7d143c..57fc6b05c3a 100644 --- a/src/devices/machine/netlist.h +++ b/src/devices/machine/netlist.h @@ -255,14 +255,18 @@ private: class netlist_mame_sound_input_buffer { public: - sound_stream *m_stream = nullptr; - int m_stream_input = 0; + std::vector<sound_stream::sample_t> m_buffer; netlist_mame_sound_input_buffer() {} - netlist_mame_sound_input_buffer(sound_stream &stream, int input) : m_stream(&stream), m_stream_input(input) { } + netlist_mame_sound_input_buffer(sound_stream &stream) { + int samples = stream.samples(); + m_buffer.resize(samples); + for (int i=0; i != samples; i++) + m_buffer[i] = stream.get(0, i); + } - sound_stream::sample_t operator[](std::size_t index) { return m_stream->get(m_stream_input, index); } + sound_stream::sample_t operator[](std::size_t index) { return m_buffer[index]; } }; // ---------------------------------------------------------------------------------------- diff --git a/src/devices/sound/disc_cls.h b/src/devices/sound/disc_cls.h index 2ea8498d2f1..72a5c39920a 100644 --- a/src/devices/sound/disc_cls.h +++ b/src/devices/sound/disc_cls.h @@ -120,14 +120,14 @@ public: /* Add gain to the output and put into the buffers */ /* Clipping will be handled by the main sound system */ double val = DISCRETE_INPUT(0) * DISCRETE_INPUT(1); - m_stream->put(m_stream_output, m_outview_sample++, val * (1.0 / 32768.0)); + m_stream->put(m_stream_output, m_stream_sample++, val * (1.0 / 32768.0)); } virtual int max_output() override { return 0; } - virtual void set_output_ptr(sound_stream &stream, int output) override { m_stream = &stream; m_stream_output = output; m_outview_sample = 0; } + virtual void set_output_ptr(sound_stream &stream, int output) override { m_stream = &stream; m_stream_output = output; m_stream_sample = 0; } private: sound_stream *m_stream = nullptr; int m_stream_output = 0; - u32 m_outview_sample = 0U; + u32 m_stream_sample = 0U; }; DISCRETE_CLASS(dso_csvlog, 0, @@ -228,13 +228,15 @@ public: virtual void start() override; virtual void input_write(int sub_node, uint8_t data ) override; virtual bool is_buffered() { return false; } + void set_input_ptr(sound_stream &stream, int input) { m_stream = &stream; m_stream_input = input; m_stream_sample = 0; } /* This is called by discrete_sound_device */ void stream_start(); -//protected: - uint32_t m_stream_in_number = 0; - uint32_t m_inview_sample = 0; +protected: + sound_stream *m_stream = nullptr; + uint32_t m_stream_input = 0; + uint32_t m_stream_sample = 0; private: double m_gain = 0.0; /* node gain */ double m_offset = 0.0; /* node offset */ diff --git a/src/devices/sound/disc_inp.hxx b/src/devices/sound/disc_inp.hxx index 432f8c076bf..ef000e6b331 100644 --- a/src/devices/sound/disc_inp.hxx +++ b/src/devices/sound/disc_inp.hxx @@ -246,12 +246,9 @@ DISCRETE_STEP(dss_input_stream) { /* the context pointer is set to point to the current input stream data in discrete_stream_update */ if (m_is_buffered) - { set_output(0, m_data * m_gain + m_offset); - m_inview_sample++; - } else - set_output(0, 0); + set_output(0, m_stream->get(m_stream_input, m_stream_sample ++) * 32768.0 * m_gain + m_offset); } DISCRETE_RESET(dss_input_stream) @@ -282,8 +279,6 @@ DISCRETE_START(dss_input_stream) { discrete_base_node::start(); - /* Stream out number is set during start */ - m_stream_in_number = DSS_INPUT_STREAM__STREAM; m_gain = DSS_INPUT_STREAM__GAIN; m_offset = DSS_INPUT_STREAM__OFFSET; diff --git a/src/devices/sound/discrete.cpp b/src/devices/sound/discrete.cpp index 5e5c1a05ecf..3e97bff89da 100644 --- a/src/devices/sound/discrete.cpp +++ b/src/devices/sound/discrete.cpp @@ -1056,10 +1056,13 @@ void discrete_sound_device::sound_stream_update(sound_stream &stream) outputnum++; } + int inputnum = 0; + /* Setup any input streams */ for (discrete_dss_input_stream_node *node : m_input_stream_list) { - node->m_inview_sample = 0; + node->set_input_ptr(stream, inputnum); + inputnum++; } /* just process it */ diff --git a/src/devices/sound/spkrdev.cpp b/src/devices/sound/spkrdev.cpp index 841656ab4ac..16dc6199c2f 100644 --- a/src/devices/sound/spkrdev.cpp +++ b/src/devices/sound/spkrdev.cpp @@ -268,7 +268,7 @@ void speaker_sound_device::level_w(int new_level) /* This is redundant because time update has to be done within sound_stream_update() anyway, * however this ensures synchronization between the speaker and stream timing: */ - m_channel_last_sample_time = m_channel->sample_time(); + m_channel_last_sample_time = m_channel->end_time(); /* sample_time() may be ahead of us */ if (m_channel_last_sample_time > time) 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..2cae08f733d 100644 --- a/src/emu/debug/debugvw.cpp +++ b/src/emu/debug/debugvw.cpp @@ -511,7 +511,19 @@ bool debug_view_expression::recompute() } catch (expression_error &) { - 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 &) + { + // 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"); + } } } diff --git a/src/emu/resampler.cpp b/src/emu/resampler.cpp index b95fe80dfba..5c5a38eba13 100644 --- a/src/emu/resampler.cpp +++ b/src/emu/resampler.cpp @@ -149,7 +149,7 @@ // Having the sum of coefficients being 1 ensures that. -audio_resampler::audio_resampler(u32 fs, u32 ft) +audio_resampler_hq::audio_resampler_hq(u32 fs, u32 ft, float latency, u32 max_order_per_lane, u32 max_lanes) { m_ft = ft; m_fs = fs; @@ -160,13 +160,13 @@ audio_resampler::audio_resampler(u32 fs, u32 ft) m_fsm = ft / gcd; // Compute the per-phase filter length to limit the latency to 5ms and capping it - m_order_per_lane = u32(fs * 0.005 * 2); - if(m_order_per_lane > 400) - m_order_per_lane = 400; + m_order_per_lane = u32(fs * latency * 2); + if(m_order_per_lane > max_order_per_lane) + m_order_per_lane = max_order_per_lane; - // Reduce the number of phases to be less than 200 + // Reduce the number of phases to be less than max_lanes m_phase_shift = 0; - while(((m_fsm - 1) >> m_phase_shift) >= 200) + while(((m_fsm - 1) >> m_phase_shift) >= max_lanes) m_phase_shift ++; m_phases = ((m_fsm - 1) >> m_phase_shift) + 1; @@ -217,7 +217,7 @@ audio_resampler::audio_resampler(u32 fs, u32 ft) m_skip = m_ftm / m_fsm; } -u32 audio_resampler::compute_gcd(u32 fs, u32 ft) +u32 audio_resampler_hq::compute_gcd(u32 fs, u32 ft) { u32 v1 = fs > ft ? fs : ft; u32 v2 = fs > ft ? ft : fs; @@ -229,7 +229,12 @@ u32 audio_resampler::compute_gcd(u32 fs, u32 ft) return v1; } -void audio_resampler::apply(const emu::detail::output_buffer_flat<sample_t> &src, std::vector<sample_t> &dest, u64 dest_sample, u32 srcc, float gain, u32 samples) const +u32 audio_resampler_hq::history_size() const +{ + return m_order_per_lane + m_skip + 1; +} + +void audio_resampler_hq::apply(const emu::detail::output_buffer_flat<sample_t> &src, std::vector<sample_t> &dest, u64 dest_sample, u32 srcc, float gain, u32 samples) const { u32 seconds = dest_sample / m_ft; u32 dsamp = dest_sample % m_ft; @@ -255,7 +260,7 @@ void audio_resampler::apply(const emu::detail::output_buffer_flat<sample_t> &src } } -void audio_resampler::apply(const emu::detail::output_buffer_interleaved<s16> &src, std::vector<sample_t> &dest, u64 dest_sample, u32 srcc, float gain, u32 samples) const +void audio_resampler_hq::apply(const emu::detail::output_buffer_interleaved<s16> &src, std::vector<sample_t> &dest, u64 dest_sample, u32 srcc, float gain, u32 samples) const { u32 seconds = dest_sample / m_ft; u32 dsamp = dest_sample % m_ft; @@ -287,7 +292,7 @@ void audio_resampler::apply(const emu::detail::output_buffer_interleaved<s16> &s } -void audio_resampler::apply(const emu::detail::output_buffer_flat<sample_t> &src, std::vector<s16> &dest, u32 destc, int dchannels, u64 dest_sample, u32 srcc, float gain, u32 samples) const +void audio_resampler_hq::apply(const emu::detail::output_buffer_flat<sample_t> &src, std::vector<s16> &dest, u32 destc, int dchannels, u64 dest_sample, u32 srcc, float gain, u32 samples) const { u32 seconds = dest_sample / m_ft; u32 dsamp = dest_sample % m_ft; @@ -315,3 +320,123 @@ void audio_resampler::apply(const emu::detail::output_buffer_flat<sample_t> &src } } } + + +// Now for the lo-fi version +// +// We mostly forget about filtering, and just try to do a decent +// interpolation. There's a nice 4-point formula used in yamaha +// devices from around 2000: +// f0(t) = (t - t**3)/6 +// f1(t) = t + (t**2 - t**3)/2 +// +// The polynoms are used with the decimal part 'p' (as in phase) of +// the sample position. The computation from the four samples s0..s3 +// is: +// s = - s0 * f0(1-p) + s1 * f1(1-p) + s2 * f1(p) - s3 * f0(p) +// +// The target sample must be between s1 and s2. +// +// When upsampling, that's enough. When downsampling, it feels like a +// good idea to filter a little with a moving average, dividing the +// source frequency by an integer just big enough to make the final +// source frequency lower. + +// Sample interpolation functions f0 and f1 + +const std::array<std::array<float, 0x1001>, 2> audio_resampler_lofi::interpolation_table = []() { + std::array<std::array<float, 0x1001>, 2> result; + + // The exact way of doing the computations replicate the values + // actually used by the chip (which are very probably a rom, of + // course). + + for(u32 i=1; i != 4096; i++) { + float p = i / 4096.0; + result[0][i] = (p - p*p*p) / 6; + } + for(u32 i=1; i != 2049; i++) { + float p = i / 4096.0; + result[1][i] = p + (p*p - p*p*p) / 2; + } + for(u32 i=2049; i != 4096; i++) + // When interpolating, f1 is added and f0 is subtracted, and the total must be 1 + result[1][i] = 1.0 + result[0][i] + result[0][4096-i] - result[1][4096-i]; + + result[0][ 0] = 0.0; + result[0][0x1000] = 0.0; + result[1][ 0] = 0.0; + result[1][0x1000] = 1.0; + return result; +}(); + +audio_resampler_lofi::audio_resampler_lofi(u32 fs, u32 ft) +{ + m_fs = fs; + m_ft = ft; + + m_source_divide = fs <= ft ? 1 : 1+fs/ft; + m_step = u64(fs) * 0x1000000 / ft / m_source_divide; +} + + +u32 audio_resampler_lofi::history_size() const +{ + return 5 * m_source_divide + m_fs / m_ft + 1; +} + +void audio_resampler_lofi::apply(const emu::detail::output_buffer_flat<sample_t> &src, std::vector<sample_t> &dest, u64 dest_sample, u32 srcc, float gain, u32 samples) const +{ + u32 seconds = dest_sample / m_ft; + u32 dsamp = dest_sample % m_ft; + u64 ssamp = (u64(dsamp) * m_fs * 0x1000) / m_ft; + u64 ssample = (ssamp >> 12) + u64(m_fs) * seconds; + u32 phase = ssamp & 0xfff; + if(m_source_divide > 1) { + u32 delta = ssample % m_source_divide; + phase = (phase | (delta << 12)) / m_source_divide; + ssample -= delta; + } + + // We're getting 2 samples latency, which is small enough + + ssample -= 4*m_source_divide; + + const sample_t *s = src.ptrs(srcc, ssample - src.sync_sample()); + + std::function<sample_t()> reader; + if(m_source_divide == 1) + reader = [s]() mutable -> sample_t { return *s++; }; + else + reader = [s, count = m_source_divide]() mutable -> sample_t { sample_t sm = 0; for(u32 i=0; i != count; i++) { sm += *s++; } return sm / count; }; + + phase <<= 12; + + sample_t s0 = reader(); + sample_t s1 = reader(); + sample_t s2 = reader(); + sample_t s3 = reader(); + + sample_t *d = dest.data(); + for(u32 sample = 0; sample != samples; sample++) { + u32 cphase = phase >> 12; + *d++ += gain * (- s0 * interpolation_table[0][0x1000-cphase] + s1 * interpolation_table[1][0x1000-cphase] + s2 * interpolation_table[1][cphase] - s3 * interpolation_table[0][cphase]); + + phase += m_step; + if(phase & 0x1000000) { + phase &= 0xffffff; + s0 = s1; + s1 = s2; + s2 = s3; + s3 = reader(); + } + } +} + +void audio_resampler_lofi::apply(const emu::detail::output_buffer_interleaved<s16> &src, std::vector<sample_t> &dest, u64 dest_sample, u32 srcc, float gain, u32 samples) const +{ +} + +void audio_resampler_lofi::apply(const emu::detail::output_buffer_flat<sample_t> &src, std::vector<s16> &dest, u32 destc, int dchannels, u64 dest_sample, u32 srcc, float gain, u32 samples) const +{ +} diff --git a/src/emu/resampler.h b/src/emu/resampler.h index c1b2f88f3e9..d0758b5ae7e 100644 --- a/src/emu/resampler.h +++ b/src/emu/resampler.h @@ -15,13 +15,26 @@ class audio_resampler public: using sample_t = sound_stream::sample_t; - audio_resampler(u32 fs, u32 ft); + virtual ~audio_resampler() = default; - u32 history_size() const { return m_order_per_lane; } + virtual u32 history_size() const = 0; - void apply(const emu::detail::output_buffer_flat<sample_t> &src, std::vector<sample_t> &dest, u64 dest_sample, u32 srcc, float gain, u32 samples) const; - void apply(const emu::detail::output_buffer_interleaved<s16> &src, std::vector<sample_t> &dest, u64 dest_sample, u32 srcc, float gain, u32 samples) const; - void apply(const emu::detail::output_buffer_flat<sample_t> &src, std::vector<s16> &dest, u32 destc, int dchannels, u64 dest_sample, u32 srcc, float gain, u32 samples) const; + virtual void apply(const emu::detail::output_buffer_flat<sample_t> &src, std::vector<sample_t> &dest, u64 dest_sample, u32 srcc, float gain, u32 samples) const = 0; + virtual void apply(const emu::detail::output_buffer_interleaved<s16> &src, std::vector<sample_t> &dest, u64 dest_sample, u32 srcc, float gain, u32 samples) const = 0; + virtual void apply(const emu::detail::output_buffer_flat<sample_t> &src, std::vector<s16> &dest, u32 destc, int dchannels, u64 dest_sample, u32 srcc, float gain, u32 samples) const = 0; +}; + +class audio_resampler_hq : public audio_resampler +{ +public: + audio_resampler_hq(u32 fs, u32 ft, float latency, u32 max_order_per_lane, u32 max_lanes); + virtual ~audio_resampler_hq() = default; + + virtual u32 history_size() const override; + + virtual void apply(const emu::detail::output_buffer_flat<sample_t> &src, std::vector<sample_t> &dest, u64 dest_sample, u32 srcc, float gain, u32 samples) const override; + virtual void apply(const emu::detail::output_buffer_interleaved<s16> &src, std::vector<sample_t> &dest, u64 dest_sample, u32 srcc, float gain, u32 samples) const override; + virtual void apply(const emu::detail::output_buffer_flat<sample_t> &src, std::vector<s16> &dest, u32 destc, int dchannels, u64 dest_sample, u32 srcc, float gain, u32 samples) const override; private: u32 m_order_per_lane, m_ftm, m_fsm, m_ft, m_fs, m_delta, m_skip, m_phases, m_phase_shift; @@ -31,5 +44,23 @@ private: static u32 compute_gcd(u32 fs, u32 ft); }; +class audio_resampler_lofi : public audio_resampler +{ +public: + audio_resampler_lofi(u32 fs, u32 ft); + virtual ~audio_resampler_lofi() = default; + + virtual u32 history_size() const override; + + virtual void apply(const emu::detail::output_buffer_flat<sample_t> &src, std::vector<sample_t> &dest, u64 dest_sample, u32 srcc, float gain, u32 samples) const override; + virtual void apply(const emu::detail::output_buffer_interleaved<s16> &src, std::vector<sample_t> &dest, u64 dest_sample, u32 srcc, float gain, u32 samples) const override; + virtual void apply(const emu::detail::output_buffer_flat<sample_t> &src, std::vector<s16> &dest, u32 destc, int dchannels, u64 dest_sample, u32 srcc, float gain, u32 samples) const override; + +private: + static const std::array<std::array<float, 0x1001>, 2> interpolation_table; + u32 m_source_divide, m_fs, m_ft; + u32 m_step; +}; + #endif diff --git a/src/emu/sound.cpp b/src/emu/sound.cpp index 5ff9e86e1ed..a08ede3f471 100644 --- a/src/emu/sound.cpp +++ b/src/emu/sound.cpp @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Aaron Giles +// copyright-holders:O. Galibert, Aaron Giles /*************************************************************************** sound.cpp @@ -23,6 +23,8 @@ #include "osdepend.h" +#include "util/language.h" + #include <algorithm> //************************************************************************** @@ -189,7 +191,7 @@ template<typename S> void emu::detail::output_buffer_flat<S>::resample(u32 previ return; auto si = [](attotime time, u32 rate) -> s64 { - return time.m_seconds * rate + ((time.m_attoseconds / 100'000'000) * rate) / 10'000'000'000LL; + return time.m_seconds * rate + ((time.m_attoseconds / 100000000) * rate) / 10000000000LL; }; auto cv = [](u32 source_rate, u32 dest_rate, s64 time) -> std::pair<s64, double> { @@ -496,12 +498,12 @@ u64 sound_stream::get_current_sample_index() const void sound_stream::update() { - if(!is_active() || m_in_update) + if(!is_active() || m_in_update || m_device.machine().phase() <= machine_phase::RESET) return; // Find out where we are and how much we have to do u64 idx = get_current_sample_index(); - m_samples_to_update = idx - m_output_buffer.write_sample(); + m_samples_to_update = idx - m_output_buffer.write_sample() + 1; // We want to include the current sample, hence the +1 if(m_samples_to_update > 0) { m_in_update = true; @@ -518,12 +520,12 @@ void sound_stream::update() void sound_stream::update_nodeps() { - if(!is_active() || m_in_update) + if(!is_active() || m_in_update || m_device.machine().phase() <= machine_phase::RESET) return; // Find out where we are and how much we have to do u64 idx = get_current_sample_index(); - m_samples_to_update = idx - m_output_buffer.write_sample(); + m_samples_to_update = idx - m_output_buffer.write_sample() + 1; // We want to include the current sample, hence the +1 if(m_samples_to_update > 0) { m_in_update = true; @@ -635,7 +637,7 @@ void sound_stream::reprime_sync_timer() u64 next_sample = m_output_buffer.write_sample() + 1; attotime next_time = sample_to_time(next_sample); - next_time.m_attoseconds += 1'000'000'000; // Go to the next nanosecond + next_time.m_attoseconds += 1'000'000'000; // Go to the next nanosecond ' m_sync_timer->adjust(next_time - m_device.machine().time()); } @@ -657,7 +659,11 @@ sound_manager::sound_manager(running_machine &machine) : m_muted(0), m_nosound_mode(machine.osd().no_sound()), m_unique_id(0), - m_wavfile() + m_wavfile(), + m_resampler_type(RESAMPLER_LOFI), + m_resampler_hq_latency(0.005), + m_resampler_hq_length(400), + m_resampler_hq_phases(200) { // register callbacks machine.configuration().config_register( @@ -838,13 +844,8 @@ void sound_manager::after_devices_init() m_record_buffer.resize(m_outputs_count * machine().sample_rate(), 0); m_record_samples = 0; - // Have all streams create their initial resamplers - for(auto &stream : m_stream_list) - stream->create_resamplers(); - - // Then get the initial history sizes - for(auto &stream : m_stream_list) - stream->lookup_history_sizes(); + // Create resamplers and setup history + rebuild_all_resamplers(); m_effects_done = false; @@ -858,7 +859,7 @@ void sound_manager::after_devices_init() void sound_manager::input_get(int id, sound_stream &stream) { u32 samples = stream.samples(); - u64 end_pos = stream.sample_index(); + u64 end_pos = stream.end_index(); u32 skip = stream.output_count(); for(const auto &step : m_microphones[id].m_input_mixing_steps) { @@ -911,6 +912,7 @@ void sound_manager::output_push(int id, sound_stream &stream) *outb1 = std::clamp(int(*inb++ * 32768), -32768, 32767); outb1 += m_outputs_count; } + outb++; } } @@ -1116,11 +1118,24 @@ void sound_manager::config_load(config_type cfg_type, config_level cfg_level, ut // In the global config, get the default effect chain configuration util::xml::data_node const *efl_node = parentnode->get_child("default_audio_effects"); - for(util::xml::data_node const *ef_node = efl_node->get_child("effect"); ef_node != nullptr; ef_node = ef_node->get_next_sibling("effect")) { - unsigned int id = ef_node->get_attribute_int("step", 0); - std::string type = ef_node->get_attribute_string("type", ""); - if(id >= 1 && id <= m_default_effects.size() && audio_effect::effect_names[m_default_effects[id-1]->type()] == type) - m_default_effects[id-1]->config_load(ef_node); + if(efl_node) { + for(util::xml::data_node const *ef_node = efl_node->get_child("effect"); ef_node != nullptr; ef_node = ef_node->get_next_sibling("effect")) { + unsigned int id = ef_node->get_attribute_int("step", 0); + std::string type = ef_node->get_attribute_string("type", ""); + if(id >= 1 && id <= m_default_effects.size() && audio_effect::effect_names[m_default_effects[id-1]->type()] == type) + m_default_effects[id-1]->config_load(ef_node); + } + } + + // and the resampler configuration + util::xml::data_node const *rs_node = parentnode->get_child("resampler"); + if(rs_node) { + m_resampler_hq_latency = rs_node->get_attribute_float("hq_latency", 0.0050); + m_resampler_hq_length = rs_node->get_attribute_int("hq_length", 400); + m_resampler_hq_phases = rs_node->get_attribute_int("hq_phases", 200); + + // this also applies the hq settings if resampler is hq + set_resampler_type(rs_node->get_attribute_int("type", RESAMPLER_LOFI)); } break; } @@ -1211,6 +1226,12 @@ void sound_manager::config_save(config_type cfg_type, util::xml::data_node *pare ef_node->set_attribute("type", audio_effect::effect_names[e->type()]); e->config_save(ef_node); } + + util::xml::data_node *const rs_node = parentnode->add_child("resampler", nullptr); + rs_node->set_attribute_int("type", m_resampler_type); + rs_node->set_attribute_float("hq_latency", m_resampler_hq_latency); + rs_node->set_attribute_int("hq_length", m_resampler_hq_length); + rs_node->set_attribute_int("hq_phases", m_resampler_hq_phases); break; } @@ -2390,7 +2411,7 @@ void sound_manager::mapping_update() u64 sound_manager::rate_and_time_to_index(attotime time, u32 sample_rate) const { - return time.m_seconds * sample_rate + ((time.m_attoseconds / 100'000'000) * sample_rate) / 10'000'000'000LL; + return time.m_seconds * sample_rate + ((time.m_attoseconds / 100'000'000) * sample_rate) / 10'000'000'000LL; //' } void sound_manager::update(s32) @@ -2456,20 +2477,77 @@ void sound_manager::streams_update() machine().osd().add_audio_to_recording(m_record_buffer.data(), m_record_samples); machine().video().add_sound_to_recording(m_record_buffer.data(), m_record_samples); if(m_wavfile) - util::wav_add_data_16(*m_wavfile, m_record_buffer.data(), m_record_samples); + util::wav_add_data_16(*m_wavfile, m_record_buffer.data(), m_record_samples * m_outputs_count); m_effects_condition.notify_all(); } //**// Resampler management - const audio_resampler *sound_manager::get_resampler(u32 fs, u32 ft) { auto key = std::make_pair(fs, ft); auto i = m_resamplers.find(key); if(i != m_resamplers.end()) return i->second.get(); - auto *res = new audio_resampler(fs, ft); + + audio_resampler *res; + if(m_resampler_type == RESAMPLER_HQ) + res = new audio_resampler_hq(fs, ft, m_resampler_hq_latency, m_resampler_hq_length, m_resampler_hq_phases); + else + res = new audio_resampler_lofi(fs, ft); m_resamplers[key].reset(res); return res; } + +void sound_manager::rebuild_all_resamplers() +{ + m_resamplers.clear(); + + for(auto &stream : m_stream_list) + stream->create_resamplers(); + + for(auto &stream : m_stream_list) + stream->lookup_history_sizes(); +} + +void sound_manager::set_resampler_type(u32 type) +{ + if(type != m_resampler_type) { + m_resampler_type = type; + rebuild_all_resamplers(); + } +} + +void sound_manager::set_resampler_hq_latency(double latency) +{ + if(latency != m_resampler_hq_latency) { + m_resampler_hq_latency = latency; + rebuild_all_resamplers(); + } +} + +void sound_manager::set_resampler_hq_length(u32 length) +{ + if(length != m_resampler_hq_length) { + m_resampler_hq_length = length; + rebuild_all_resamplers(); + } +} + +void sound_manager::set_resampler_hq_phases(u32 phases) +{ + if(phases != m_resampler_hq_phases) { + m_resampler_hq_phases = phases; + rebuild_all_resamplers(); + } +} + +const char *sound_manager::resampler_type_names(u32 type) const +{ + using util::lang_translate; + + if(type == RESAMPLER_HQ) + return _("HQ"); + else + return _("LoFi"); +} diff --git a/src/emu/sound.h b/src/emu/sound.h index 8039948362b..57c96683f0a 100644 --- a/src/emu/sound.h +++ b/src/emu/sound.h @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Aaron Giles +// copyright-holders:O. Galibert, Aaron Giles /*************************************************************************** sound.h @@ -35,7 +35,7 @@ For example, if you have a 10Hz clock, and call stream.update() at t=0.91, it will compute 10 samples (for clock edges 0.0, 0.1, 0.2, ..., 0.7, 0.8, and 0.9). And then if you ask the stream what its - current end time is (via stream.sample_time()), it will say t=1.0, + current end time is (via stream.end_time()), it will say t=1.0, which is in the future, because it knows it will hold that last sample until 1.0s. @@ -210,11 +210,9 @@ public: // sample id and timing of the first and last sample of the current update block, and first of the next sample block u64 start_index() const { return m_output_buffer.write_sample(); } - u64 end_index() const { return m_output_buffer.write_sample() + samples() - 1; } - u64 sample_index() const { return m_output_buffer.write_sample() + samples(); } + u64 end_index() const { return m_output_buffer.write_sample() + samples(); } attotime start_time() const { return sample_to_time(start_index()); } attotime end_time() const { return sample_to_time(end_index()); } - attotime sample_time() const { return sample_to_time(sample_index()); } // convert from absolute sample index to time attotime sample_to_time(u64 index) const; @@ -379,6 +377,11 @@ class sound_manager public: using sample_t = sound_stream::sample_t; + enum { + RESAMPLER_LOFI, + RESAMPLER_HQ + }; + struct mapping { struct node_mapping { u32 m_node; @@ -465,6 +468,18 @@ public: void mapping_update(); + const char *resampler_type_names(u32 type) const; + + u32 resampler_type() const { return m_resampler_type; } + double resampler_hq_latency() const { return m_resampler_hq_latency; } + u32 resampler_hq_length() const { return m_resampler_hq_length; } + u32 resampler_hq_phases() const { return m_resampler_hq_phases; } + + void set_resampler_type(u32 type); + void set_resampler_hq_latency(double latency); + void set_resampler_hq_length(u32 length); + void set_resampler_hq_phases(u32 phases); + private: struct effect_step { std::unique_ptr<audio_effect> m_effect; @@ -583,7 +598,7 @@ private: void update_osd_streams(); void update_osd_input(); void speakers_update(attotime endtime); - + void rebuild_all_resamplers(); void run_effects(); u64 rate_and_time_to_index(attotime time, u32 sample_rate) const; @@ -642,6 +657,11 @@ private: std::vector<std::unique_ptr<sound_stream>> m_stream_list; // list of streams std::vector<sound_stream *> m_ordered_streams; // Streams in update order u32 m_outputs_count; + + // resampler data + u32 m_resampler_type; + double m_resampler_hq_latency; + u32 m_resampler_hq_length, m_resampler_hq_phases; }; diff --git a/src/frontend/mame/ui/audioeffects.cpp b/src/frontend/mame/ui/audioeffects.cpp index 6ac84e22954..eb94667f99f 100644 --- a/src/frontend/mame/ui/audioeffects.cpp +++ b/src/frontend/mame/ui/audioeffects.cpp @@ -32,9 +32,64 @@ menu_audio_effects::~menu_audio_effects() { } +double menu_audio_effects::change_f(const double *table, double value, int change) +{ + u32 bi = 0; + double dt = 1e300; + u32 index; + for(index = 0; table[index]; index++) { + double d1 = value - table[index]; + if(d1 < 0) + d1 = -d1; + if(d1 < dt) { + dt = d1; + bi = index; + } + } + if((change != -1 || bi != 0) && (change != 1 || bi != index-1)) + bi += change; + return table[bi]; +} + +u32 menu_audio_effects::change_u32(const u32 *table, u32 value, int change) +{ + u32 bi = 0; + s32 dt = 2e9; + u32 index; + for(index = 0; table[index]; index++) { + s32 d1 = value - table[index]; + if(d1 < 0) + d1 = -d1; + if(d1 < dt) { + dt = d1; + bi = index; + } + } + if((change != -1 || bi != 0) && (change != 1 || bi != index-1)) + bi += change; + return table[bi]; +} + bool menu_audio_effects::handle(event const *ev) { - if(ev && (ev->iptkey == IPT_UI_SELECT)) { + static const double latencies[] = { + 0.0005, 0.0010, 0.0025, 0.0050, 0.0100, 0.0250, 0.0500, 0 + }; + + static const u32 lengths[] = { + 10, 20, 30, 40, 50, 75, 100, 200, 300, 400, 500, 0 + }; + + static const u32 phases[] = { + 10, 20, 30, 40, 50, 75, 100, 200, 300, 400, 500, 1000, 0 + }; + + + if(!ev) + return false; + + switch(ev->iptkey) { + case IPT_UI_SELECT: { u16 chain = (uintptr_t(ev->itemref)) >> 16; u16 entry = (uintptr_t(ev->itemref)) & 0xffff; audio_effect *eff = chain == 0xffff ? machine().sound().default_effect_chain()[entry] : machine().sound().effect_chain(chain)[entry]; @@ -50,10 +105,146 @@ bool menu_audio_effects::handle(event const *ev) return true; } + case IPT_UI_CLEAR: { + switch(uintptr_t(ev->itemref)) { + case RS_TYPE: + machine().sound().set_resampler_type(sound_manager::RESAMPLER_LOFI); + reset(reset_options::REMEMBER_POSITION); + return true; + + case RS_LATENCY: + machine().sound().set_resampler_hq_latency(0.005); + reset(reset_options::REMEMBER_POSITION); + return true; + + case RS_LENGTH: + machine().sound().set_resampler_hq_length(400); + reset(reset_options::REMEMBER_POSITION); + return true; + + case RS_PHASES: + machine().sound().set_resampler_hq_phases(200); + reset(reset_options::REMEMBER_POSITION); + return true; + } + break; + } + + case IPT_UI_LEFT: { + switch(uintptr_t(ev->itemref)) { + case RS_TYPE: + machine().sound().set_resampler_type(sound_manager::RESAMPLER_LOFI); + reset(reset_options::REMEMBER_POSITION); + return true; + + case RS_LATENCY: + machine().sound().set_resampler_hq_latency(change_f(latencies, machine().sound().resampler_hq_latency(), -1)); + reset(reset_options::REMEMBER_POSITION); + return true; + + case RS_LENGTH: + machine().sound().set_resampler_hq_length(change_u32(lengths, machine().sound().resampler_hq_length(), -1)); + reset(reset_options::REMEMBER_POSITION); + return true; + + case RS_PHASES: + machine().sound().set_resampler_hq_phases(change_u32(phases, machine().sound().resampler_hq_phases(), -1)); + reset(reset_options::REMEMBER_POSITION); + return true; + } + break; + } + + case IPT_UI_RIGHT: { + switch(uintptr_t(ev->itemref)) { + case RS_TYPE: + machine().sound().set_resampler_type(sound_manager::RESAMPLER_HQ); + reset(reset_options::REMEMBER_POSITION); + return true; + + case RS_LATENCY: + machine().sound().set_resampler_hq_latency(change_f(latencies, machine().sound().resampler_hq_latency(), 1)); + reset(reset_options::REMEMBER_POSITION); + return true; + + case RS_LENGTH: + machine().sound().set_resampler_hq_length(change_u32(lengths, machine().sound().resampler_hq_length(), 1)); + reset(reset_options::REMEMBER_POSITION); + return true; + + case RS_PHASES: + machine().sound().set_resampler_hq_phases(change_u32(phases, machine().sound().resampler_hq_phases(), 1)); + reset(reset_options::REMEMBER_POSITION); + return true; + } + break; + } + } + return false; } +std::string menu_audio_effects::format_lat(double latency) +{ + return util::string_format("%3.1fms", 1000*latency); +} + +std::string menu_audio_effects::format_u32(u32 val) +{ + return util::string_format("%u", val); +} + +u32 menu_audio_effects::flag_type() const +{ + u32 flag = 0; + u32 type = machine().sound().resampler_type(); + if(type != sound_manager::RESAMPLER_LOFI) + flag |= FLAG_LEFT_ARROW; + if(type != sound_manager::RESAMPLER_HQ) + flag |= FLAG_RIGHT_ARROW; + return flag; +} + +u32 menu_audio_effects::flag_lat() const +{ + u32 flag = 0; + double latency = machine().sound().resampler_hq_latency(); + if(latency > 0.0005) + flag |= FLAG_LEFT_ARROW; + if(latency < 0.0500) + flag |= FLAG_RIGHT_ARROW; + if(machine().sound().resampler_type() != sound_manager::RESAMPLER_HQ) + flag |= FLAG_INVERT | FLAG_DISABLE; + return flag; +} + +u32 menu_audio_effects::flag_length() const +{ + u32 flag = 0; + double latency = machine().sound().resampler_hq_length(); + if(latency > 10) + flag |= FLAG_LEFT_ARROW; + if(latency < 500) + flag |= FLAG_RIGHT_ARROW; + if(machine().sound().resampler_type() != sound_manager::RESAMPLER_HQ) + flag |= FLAG_INVERT | FLAG_DISABLE; + return flag; +} + +u32 menu_audio_effects::flag_phases() const +{ + u32 flag = 0; + double latency = machine().sound().resampler_hq_phases(); + if(latency > 10) + flag |= FLAG_LEFT_ARROW; + if(latency < 1000) + flag |= FLAG_RIGHT_ARROW; + if(machine().sound().resampler_type() != sound_manager::RESAMPLER_HQ) + flag |= FLAG_INVERT | FLAG_DISABLE; + return flag; +} + void menu_audio_effects::populate() { auto &sound = machine().sound(); @@ -68,6 +259,12 @@ void menu_audio_effects::populate() auto eff = sound.default_effect_chain(); for(u32 e = 0; e != eff.size(); e++) item_append(_(audio_effect::effect_names[eff[e]->type()]), 0, (void *)intptr_t((0xffff << 16) | e)); + + item_append(_("Resampler"), FLAG_UI_HEADING | FLAG_DISABLE, nullptr); + item_append(_("Type"), sound.resampler_type_names(sound.resampler_type()), flag_type(), (void *)RS_TYPE); + item_append(_("HQ latency"), format_lat(sound.resampler_hq_latency()), flag_lat(), (void *)RS_LATENCY); + item_append(_("HQ filter max size"), format_u32(sound.resampler_hq_length()), flag_length(), (void *)RS_LENGTH); + item_append(_("HQ filter max phases"), format_u32(sound.resampler_hq_phases()), flag_phases(), (void *)RS_PHASES); item_append(menu_item_type::SEPARATOR); } diff --git a/src/frontend/mame/ui/audioeffects.h b/src/frontend/mame/ui/audioeffects.h index 1ee15da82f9..f61d82fe825 100644 --- a/src/frontend/mame/ui/audioeffects.h +++ b/src/frontend/mame/ui/audioeffects.h @@ -31,8 +31,21 @@ protected: virtual void menu_deactivated() override; private: + enum { RS_TYPE, RS_LATENCY, RS_LENGTH, RS_PHASES }; + virtual void populate() override; virtual bool handle(event const *ev) override; + + u32 flag_type() const; + u32 flag_lat() const; + u32 flag_length() const; + u32 flag_phases() const; + + static double change_f(const double *table, double value, int change); + static u32 change_u32(const u32 *table, u32 value, int change); + + static std::string format_lat(double latency); + static std::string format_u32(u32 val); }; } // namespace ui diff --git a/src/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 95c0ec5808e..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) @@ -681,7 +684,7 @@ static INPUT_PORTS_START( bmcpokr ) PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("DIP1:1") PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) PORT_DIPSETTING( 0x01, DEF_STR( No ) ) - PORT_DIPNAME( 0x02, 0x00, "Double-Up Game" ) PORT_DIPLOCATION("DIP1:2") + PORT_DIPNAME( 0x02, 0x00, "Double Up Game" ) PORT_DIPLOCATION("DIP1:2") PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) PORT_DIPSETTING( 0x02, DEF_STR( No ) ) PORT_DIPNAME( 0x04, 0x00, "Slot Machine" ) PORT_DIPLOCATION("DIP1:3") @@ -719,7 +722,7 @@ static INPUT_PORTS_START( bmcpokr ) PORT_DIPSETTING( 0x01, "97" ) PORT_DIPSETTING( 0x03, "98" ) PORT_DIPSETTING( 0x00, "99" ) - PORT_DIPNAME( 0x0c, 0x0c, "Double-Up Rate" ) PORT_DIPLOCATION("DIP3:3,4") + PORT_DIPNAME( 0x0c, 0x0c, "Double Up Rate" ) PORT_DIPLOCATION("DIP3:3,4") PORT_DIPSETTING( 0x08, "93" ) PORT_DIPSETTING( 0x04, "94" ) PORT_DIPSETTING( 0x00, "95" ) @@ -780,21 +783,21 @@ static INPUT_PORTS_START( mjmaglmp ) PORT_START("DSW1") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("DIP1:1") - PORT_DIPSETTING( 0x01, DEF_STR( No ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) - PORT_DIPNAME( 0x02, 0x00, "Double-Up Game" ) PORT_DIPLOCATION("DIP1:2") - PORT_DIPSETTING( 0x02, DEF_STR( No ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) + PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x02, 0x00, "Double Up Game" ) PORT_DIPLOCATION("DIP1:2") + PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x04, 0x04, "Coin Sw. Function" ) PORT_DIPLOCATION("DIP1:3") PORT_DIPSETTING( 0x00, "Coin" ) PORT_DIPSETTING( 0x04, "Note" ) PORT_DIPNAME( 0x08, 0x08, "Pay Sw. Function" ) PORT_DIPLOCATION("DIP1:4") PORT_DIPSETTING( 0x00, "Pay-Out" ) - PORT_DIPSETTING( 0x08, "Key-Down" ) + PORT_DIPSETTING( 0x08, "Key-Out" ) PORT_DIPNAME( 0x10, 0x10, "Game Hint" ) PORT_DIPLOCATION("DIP1:5") PORT_DIPSETTING( 0x10, DEF_STR( No ) ) PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) - PORT_DIPNAME( 0x20, 0x20, "Direct Double" ) PORT_DIPLOCATION("DIP1:6") + PORT_DIPNAME( 0x20, 0x20, "Direct Double Up" ) PORT_DIPLOCATION("DIP1:6") PORT_DIPSETTING( 0x20, DEF_STR( No ) ) PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) PORT_DIPNAME( 0x40, 0x40, "Coin Acceptor" ) PORT_DIPLOCATION("DIP1:7") @@ -822,42 +825,42 @@ static INPUT_PORTS_START( mjmaglmp ) PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "DIP2:8" ) PORT_START("DSW3") - PORT_DIPNAME( 0x03, 0x03, "Pay-Out Rate" ) PORT_DIPLOCATION("DIP3:1,2") - PORT_DIPSETTING( 0x02, "75" ) - PORT_DIPSETTING( 0x01, "82" ) - PORT_DIPSETTING( 0x03, "85" ) - PORT_DIPSETTING( 0x00, "88" ) - PORT_DIPNAME( 0x0c, 0x0c, "Double-Up Rate" ) PORT_DIPLOCATION("DIP3:3,4") - PORT_DIPSETTING( 0x08, "95" ) - PORT_DIPSETTING( 0x04, "96" ) - PORT_DIPSETTING( 0x00, "97" ) - PORT_DIPSETTING( 0x0c, "98" ) - PORT_DIPNAME( 0x30, 0x30, "Game Enhance Type" ) PORT_DIPLOCATION("DIP3:5,6") + PORT_DIPNAME( 0x03, 0x03, "Payout Rate" ) PORT_DIPLOCATION("DIP3:1,2") + PORT_DIPSETTING( 0x02, "75%" ) + PORT_DIPSETTING( 0x01, "82%" ) + PORT_DIPSETTING( 0x03, "85%" ) + PORT_DIPSETTING( 0x00, "88%" ) + PORT_DIPNAME( 0x0c, 0x0c, "Double Up Game Payout Rate" ) PORT_DIPLOCATION("DIP3:3,4") + PORT_DIPSETTING( 0x08, "95%" ) + PORT_DIPSETTING( 0x04, "96%" ) + PORT_DIPSETTING( 0x00, "97%" ) + PORT_DIPSETTING( 0x0c, "98%" ) + PORT_DIPNAME( 0x30, 0x30, "Game Enhance Type" ) PORT_DIPLOCATION("DIP3:5,6") PORT_DIPSETTING( 0x10, "Small" ) PORT_DIPSETTING( 0x00, "Big" ) PORT_DIPSETTING( 0x30, "Normal" ) PORT_DIPSETTING( 0x20, "Bonus" ) - PORT_DIPNAME( 0xc0, 0xc0, "Credit Limit" ) PORT_DIPLOCATION("DIP3:7,8") + PORT_DIPNAME( 0xc0, 0xc0, "Credit Limit" ) PORT_DIPLOCATION("DIP3:7,8") PORT_DIPSETTING( 0x00, "300" ) PORT_DIPSETTING( 0x80, "500" ) PORT_DIPSETTING( 0x40, "1000" ) PORT_DIPSETTING( 0xc0, "2000" ) PORT_START("DSW4") - PORT_DIPNAME( 0x01, 0x01, "Max Bet" ) PORT_DIPLOCATION("DIP4:1") + PORT_DIPNAME( 0x01, 0x01, "Maximum Bet" ) PORT_DIPLOCATION("DIP4:1") PORT_DIPSETTING( 0x01, "10" ) PORT_DIPSETTING( 0x00, "20" ) - PORT_DIPNAME( 0x06, 0x06, "Min Bet" ) PORT_DIPLOCATION("DIP4:2,3") + PORT_DIPNAME( 0x06, 0x06, "Minimum Bet" ) PORT_DIPLOCATION("DIP4:2,3") PORT_DIPSETTING( 0x00, "1" ) PORT_DIPSETTING( 0x06, "3" ) PORT_DIPSETTING( 0x04, "6" ) PORT_DIPSETTING( 0x02, "9" ) - PORT_DIPNAME( 0x18, 0x18, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DIP4:4,5") + PORT_DIPNAME( 0x18, 0x18, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DIP4:4,5") PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) PORT_DIPSETTING( 0x18, DEF_STR( 1C_1C ) ) PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) ) PORT_DIPSETTING( 0x08, DEF_STR( 1C_3C ) ) - PORT_DIPNAME( 0x60, 0x60, "Credits Per Key-In" ) PORT_DIPLOCATION("DIP4:6,7") + PORT_DIPNAME( 0x60, 0x60, "Credits Per Key-In" ) PORT_DIPLOCATION("DIP4:6,7") PORT_DIPSETTING( 0x40, "5" ) PORT_DIPSETTING( 0x60, "10" ) PORT_DIPSETTING( 0x20, "50" ) @@ -889,92 +892,95 @@ static INPUT_PORTS_START( fengyunh ) MAHJONG_KEYS_COMMON("DSW3", 0x01) PORT_START("DSW1") - PORT_DIPNAME( 0x01, 0x01, "Max Bet" ) PORT_DIPLOCATION("DIP4:1") // 最大押分 + PORT_DIPNAME( 0x01, 0x01, "Maximum Bet" ) PORT_DIPLOCATION("DIP4:1") // 最大押分 PORT_DIPSETTING( 0x01, "10" ) PORT_DIPSETTING( 0x00, "20" ) - PORT_DIPNAME( 0x06, 0x06, "Min Bet" ) PORT_DIPLOCATION("DIP4:2,3") // 最小押分 + PORT_DIPNAME( 0x06, 0x06, "Minimum Bet" ) PORT_DIPLOCATION("DIP4:2,3") // 最小押分 PORT_DIPSETTING( 0x00, "1" ) PORT_DIPSETTING( 0x04, "3" ) PORT_DIPSETTING( 0x06, "6" ) PORT_DIPSETTING( 0x02, "9" ) - PORT_DIPNAME( 0x18, 0x18, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DIP4:4,5") // 投幣單位 - PORT_DIPSETTING( 0x18, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) - PORT_DIPNAME( 0x60, 0x60, "Credits Per Key-In" ) PORT_DIPLOCATION("DIP4:6,7") // 開分單位 + PORT_DIPNAME( 0x18, 0x18, DEF_STR(Coinage) ) PORT_DIPLOCATION("DIP4:4,5") // 投幣單位 + PORT_DIPSETTING( 0x18, DEF_STR(1C_1C) ) + PORT_DIPSETTING( 0x10, DEF_STR(1C_2C) ) + PORT_DIPSETTING( 0x08, DEF_STR(1C_3C) ) + PORT_DIPSETTING( 0x00, DEF_STR(1C_5C) ) + PORT_DIPNAME( 0x60, 0x60, "Key-In Unit" ) PORT_DIPLOCATION("DIP4:6,7") // 開分單位 PORT_DIPSETTING( 0x40, "5" ) PORT_DIPSETTING( 0x60, "10" ) PORT_DIPSETTING( 0x20, "50" ) PORT_DIPSETTING( 0x00, "100" ) - PORT_DIPNAME( 0x80, 0x80, "Score Display Mode" ) PORT_DIPLOCATION("DIP4:8") // 計分方式 (sets how points, credits, bets, etc. are displayed) - PORT_DIPSETTING( 0x80, "Numbers" ) // 數字 (Arabic numerals) - PORT_DIPSETTING( 0x00, "Circle Tiles" ) // 筒子 (tong mahjong tiles representing digits) + PORT_DIPNAME( 0x80, 0x80, "Score Display Mode" ) PORT_DIPLOCATION("DIP4:8") // 計分方式 (sets how points, credits, bets, etc. are displayed) + PORT_DIPSETTING( 0x80, "Numbers" ) // 數字 (Arabic numerals) + PORT_DIPSETTING( 0x00, "Circle Tiles" ) // 筒子 (tong mahjong tiles representing digits) PORT_START("DSW2") - PORT_DIPNAME( 0x03, 0x03, "Pay-Out Rate" ) PORT_DIPLOCATION("DIP3:1,2") // 遊戲機率 - PORT_DIPSETTING( 0x02, "75" ) - PORT_DIPSETTING( 0x01, "78" ) - PORT_DIPSETTING( 0x03, "80" ) - PORT_DIPSETTING( 0x00, "85" ) - PORT_DIPNAME( 0x0c, 0x0c, "Double-Up Rate" ) PORT_DIPLOCATION("DIP3:3,4") // 比倍機率 - PORT_DIPSETTING( 0x08, "95" ) - PORT_DIPSETTING( 0x04, "96" ) - PORT_DIPSETTING( 0x00, "97" ) - PORT_DIPSETTING( 0x0c, "98" ) - PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "DIP3:5" ) // 出牌方式 - PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "DIP3:6" ) // " - PORT_DIPNAME( 0xc0, 0xc0, "Credit Limit" ) PORT_DIPLOCATION("DIP3:7,8") + PORT_DIPNAME( 0x03, 0x03, "Payout Rate" ) PORT_DIPLOCATION("DIP3:1,2") // 遊戲機率 + PORT_DIPSETTING( 0x02, "75%" ) + PORT_DIPSETTING( 0x01, "78%" ) + PORT_DIPSETTING( 0x03, "80%" ) + PORT_DIPSETTING( 0x00, "85%" ) + PORT_DIPNAME( 0x0c, 0x0c, "Double Up Game Payout Rate" ) PORT_DIPLOCATION("DIP3:3,4") // 比倍機率 + PORT_DIPSETTING( 0x08, "95%" ) + PORT_DIPSETTING( 0x04, "96%" ) + PORT_DIPSETTING( 0x00, "97%" ) + PORT_DIPSETTING( 0x0c, "98%" ) + PORT_DIPNAME( 0x30, 0x30, "Deal Mode" ) PORT_DIPLOCATION("DIP3:5,6") // 出牌方式 + PORT_DIPSETTING( 0x30, DEF_STR(Normal) ) // 正常 + PORT_DIPSETTING( 0x20, "Increase Manguan" ) // 滿貫加強 + PORT_DIPSETTING( 0x10, "Increase Xiaopai" ) // 小牌加強 + PORT_DIPSETTING( 0x00, "Increase Dapai" ) // 大牌加強 + PORT_DIPNAME( 0xc0, 0xc0, "Credit Limit" ) PORT_DIPLOCATION("DIP3:7,8") // 破台限制 PORT_DIPSETTING( 0x80, "500" ) PORT_DIPSETTING( 0x40, "1000" ) PORT_DIPSETTING( 0xc0, "2000" ) PORT_DIPSETTING( 0x00, "3000" ) PORT_START("DSW3") - PORT_DIPNAME( 0x01, 0x01, DEF_STR( Controls ) ) PORT_DIPLOCATION("DIP2:1") // not displayed in test mode + PORT_DIPNAME( 0x01, 0x01, DEF_STR(Controls) ) PORT_DIPLOCATION("DIP2:1") // not displayed in test mode PORT_DIPSETTING( 0x01, "Keyboard" ) - PORT_DIPSETTING( 0x00, DEF_STR( Joystick ) ) - PORT_DIPNAME( 0x02, 0x02, "Key-In Limit" ) PORT_DIPLOCATION("DIP2:2") // 開分限制 + PORT_DIPSETTING( 0x00, DEF_STR(Joystick) ) + PORT_DIPNAME( 0x02, 0x02, "Key-In Limit" ) PORT_DIPLOCATION("DIP2:2") // 開分限制 PORT_DIPSETTING( 0x02, "1000" ) PORT_DIPSETTING( 0x00, "5000" ) - PORT_DIPNAME( 0x04, 0x04, "Jackpot" ) PORT_DIPLOCATION("DIP2:3") // 累積彩金 + PORT_DIPNAME( 0x04, 0x04, "Jackpot" ) PORT_DIPLOCATION("DIP2:3") // 累積彩金 PORT_DIPSETTING( 0x00, "50" ) PORT_DIPSETTING( 0x04, "100" ) - PORT_DIPNAME( 0x18, 0x18, "Double Over / Round Bonus" ) PORT_DIPLOCATION("DIP2:4,5") + PORT_DIPNAME( 0x18, 0x18, "Double Over / Round Bonus" ) PORT_DIPLOCATION("DIP2:4,5") // 比倍破台/比倍贈分 PORT_DIPSETTING( 0x10, "100 / 10" ) PORT_DIPSETTING( 0x18, "200 / 10" ) PORT_DIPSETTING( 0x08, "300 / 15" ) PORT_DIPSETTING( 0x00, "500 / 25" ) - PORT_DIPNAME( 0x60, 0x60, "Credits Per Key-Out" ) PORT_DIPLOCATION("DIP2:6,7") // 洗分單位 + PORT_DIPNAME( 0x60, 0x60, "Credits Per Key-Out" ) PORT_DIPLOCATION("DIP2:6,7") // 洗分單位 PORT_DIPSETTING( 0x40, "10" ) PORT_DIPSETTING( 0x20, "20" ) PORT_DIPSETTING( 0x60, "30" ) PORT_DIPSETTING( 0x00, "50" ) - PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "DIP2:8" ) // not displayed in test mode + PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "DIP2:8" ) // not displayed in test mode PORT_START("DSW4") - PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("DIP1:1") // not displayed in test mode - PORT_DIPSETTING( 0x01, DEF_STR( No ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) - PORT_DIPNAME( 0x02, 0x00, "Double-Up Game" ) PORT_DIPLOCATION("DIP1:2") // 比倍遊戲 - PORT_DIPSETTING( 0x02, DEF_STR( No ) ) // 無 - PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) // 有 - PORT_DIPNAME( 0x04, 0x04, "Credit Mode" ) PORT_DIPLOCATION("DIP1:3") // 進分方式 (sets coin input function) - PORT_DIPSETTING( 0x04, "Key-In" ) // 開分 - PORT_DIPSETTING( 0x00, "Coin" ) // 投幣 - PORT_DIPNAME( 0x08, 0x08, "Payout Mode" ) PORT_DIPLOCATION("DIP1:4") // 退分方式 - PORT_DIPSETTING( 0x08, "Key-Out" ) // 洗分 (Pay Out key pays out score at Key-Out rate) - PORT_DIPSETTING( 0x00, "Cash Out" ) // 退幣 (Pay Out key pays out score at rate set for coin input) - PORT_DIPNAME( 0x10, 0x10, "Game Hint" ) PORT_DIPLOCATION("DIP1:5") // 吃碰提示 - PORT_DIPSETTING( 0x10, DEF_STR( No ) ) // 無 - PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) // 有 - PORT_DIPNAME( 0x20, 0x20, "Direct Double" ) PORT_DIPLOCATION("DIP1:6") // 直接比倍 - PORT_DIPSETTING( 0x20, DEF_STR( No ) ) // 無 - PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) // 有 - PORT_DIPNAME( 0x40, 0x40, "Coin Acceptor" ) PORT_DIPLOCATION("DIP1:7") // 投幣器 - PORT_DIPSETTING( 0x00, "Mechanical" ) // 機械式 - PORT_DIPSETTING( 0x40, "Electronic" ) // 電子式 - PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "DIP1:8" ) // not displayed in test mode + PORT_DIPNAME( 0x01, 0x00, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("DIP1:1") // not displayed in test mode + PORT_DIPSETTING( 0x01, DEF_STR(Off) ) + PORT_DIPSETTING( 0x00, DEF_STR(On) ) + PORT_DIPNAME( 0x02, 0x00, "Double Up Game" ) PORT_DIPLOCATION("DIP1:2") // 比倍遊戲 + PORT_DIPSETTING( 0x02, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x04, 0x04, "Credit Mode" ) PORT_DIPLOCATION("DIP1:3") // 進分方式 (sets coin input function) + PORT_DIPSETTING( 0x04, "Key-In" ) // 開分 + PORT_DIPSETTING( 0x00, "Coin" ) // 投幣 + PORT_DIPNAME( 0x08, 0x08, "Payout Mode" ) PORT_DIPLOCATION("DIP1:4") // 退分方式 + PORT_DIPSETTING( 0x08, "Key-Out" ) // 洗分 (Pay Out key pays out score at Key-Out rate) + PORT_DIPSETTING( 0x00, "Return Coins" ) // 退幣 (Pay Out key pays out score at rate set for coin input) + PORT_DIPNAME( 0x10, 0x10, "Game Hint" ) PORT_DIPLOCATION("DIP1:5") // 吃碰提示 + PORT_DIPSETTING( 0x10, DEF_STR( No ) ) // 無 + PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) // 有 + PORT_DIPNAME( 0x20, 0x20, "Direct Double Up" ) PORT_DIPLOCATION("DIP1:6") // 直接比倍 + PORT_DIPSETTING( 0x20, DEF_STR( No ) ) // 無 + PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) // 有 + PORT_DIPNAME( 0x40, 0x40, "Coin Acceptor" ) PORT_DIPLOCATION("DIP1:7") // 投幣器 + PORT_DIPSETTING( 0x00, "Mechanical" ) // 機械式 + PORT_DIPSETTING( 0x40, "Electronic" ) // 電子式 + PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "DIP1:8" ) // not displayed in test mode // Credit Mode Payout Mode | Pay Out Rate Key Out Rate // -----------------------------+------------------------------ @@ -988,95 +994,98 @@ static INPUT_PORTS_START( shendeng ) PORT_INCLUDE(fengyunh) PORT_MODIFY("DSW1") - PORT_DIPNAME( 0x01, 0x01, "Max Bet" ) PORT_DIPLOCATION("DIP4:1") // 最大押分 + PORT_DIPNAME( 0x01, 0x01, "Maximum Bet" ) PORT_DIPLOCATION("DIP4:1") // 最大押分 PORT_DIPSETTING( 0x01, "10" ) PORT_DIPSETTING( 0x00, "20" ) - PORT_DIPNAME( 0x06, 0x06, "Min Bet" ) PORT_DIPLOCATION("DIP4:2,3") // 最小押分 + PORT_DIPNAME( 0x06, 0x06, "Minimum Bet" ) PORT_DIPLOCATION("DIP4:2,3") // 最小押分 PORT_DIPSETTING( 0x06, "1" ) PORT_DIPSETTING( 0x04, "2" ) PORT_DIPSETTING( 0x02, "3" ) PORT_DIPSETTING( 0x00, "5" ) - PORT_DIPNAME( 0x18, 0x18, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DIP4:4,5") // 投幣單位 - PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x18, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x10, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x08, DEF_STR( 1C_3C ) ) - PORT_DIPNAME( 0x60, 0x60, "Credits Per Key-In" ) PORT_DIPLOCATION("DIP4:6,7") // 開分單位 + PORT_DIPNAME( 0x18, 0x18, DEF_STR(Coinage) ) PORT_DIPLOCATION("DIP4:4,5") // 投幣單位 + PORT_DIPSETTING( 0x00, DEF_STR(2C_1C) ) + PORT_DIPSETTING( 0x18, DEF_STR(1C_1C) ) + PORT_DIPSETTING( 0x10, DEF_STR(1C_2C) ) + PORT_DIPSETTING( 0x08, DEF_STR(1C_3C) ) + PORT_DIPNAME( 0x60, 0x60, "Key-In Unit" ) PORT_DIPLOCATION("DIP4:6,7") // 開分單位 PORT_DIPSETTING( 0x40, "5" ) PORT_DIPSETTING( 0x60, "10" ) PORT_DIPSETTING( 0x20, "50" ) PORT_DIPSETTING( 0x00, "100" ) - PORT_DIPNAME( 0x80, 0x80, "Score Display Mode" ) PORT_DIPLOCATION("DIP4:8") // 計分方式 (sets how points, credits, bets, etc. are displayed) - PORT_DIPSETTING( 0x80, "Numbers" ) // 數字 (Arabic numerals) - PORT_DIPSETTING( 0x00, "Bamboo Tiles" ) // 索子 (suo mahjong tiles representing digits) + PORT_DIPNAME( 0x80, 0x80, "Score Display Mode" ) PORT_DIPLOCATION("DIP4:8") // 計分方式 (sets how points, credits, bets, etc. are displayed) + PORT_DIPSETTING( 0x80, "Numbers" ) // 數字 (Arabic numerals) + PORT_DIPSETTING( 0x00, "Bamboo Tiles" ) // 索子 (suo mahjong tiles representing digits) PORT_MODIFY("DSW2") - PORT_DIPNAME( 0x03, 0x03, "Pay-Out Rate" ) PORT_DIPLOCATION("DIP3:1,2") // 遊戲機率 - PORT_DIPSETTING( 0x02, "82" ) - PORT_DIPSETTING( 0x01, "88" ) - PORT_DIPSETTING( 0x03, "90" ) - PORT_DIPSETTING( 0x00, "93" ) - PORT_DIPNAME( 0x0c, 0x0c, "Double-Up Rate" ) PORT_DIPLOCATION("DIP3:3,4") // 比倍機率 - PORT_DIPSETTING( 0x08, "93" ) - PORT_DIPSETTING( 0x04, "94" ) - PORT_DIPSETTING( 0x00, "95" ) - PORT_DIPSETTING( 0x0c, "96" ) - PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "DIP3:5" ) // 出牌方式 - PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "DIP3:6" ) // " - PORT_DIPNAME( 0xc0, 0xc0, "Credit Limit" ) PORT_DIPLOCATION("DIP3:7,8") + PORT_DIPNAME( 0x03, 0x03, "Payout Rate" ) PORT_DIPLOCATION("DIP3:1,2") // 遊戲機率 + PORT_DIPSETTING( 0x02, "82%" ) + PORT_DIPSETTING( 0x01, "88%" ) + PORT_DIPSETTING( 0x03, "90%" ) + PORT_DIPSETTING( 0x00, "93%" ) + PORT_DIPNAME( 0x0c, 0x0c, "Double Up Game Payout Rate" ) PORT_DIPLOCATION("DIP3:3,4") // 比倍機率 + PORT_DIPSETTING( 0x08, "93%" ) + PORT_DIPSETTING( 0x04, "94%" ) + PORT_DIPSETTING( 0x00, "95%" ) + PORT_DIPSETTING( 0x0c, "96%" ) + PORT_DIPNAME( 0x30, 0x30, "Deal Mode" ) PORT_DIPLOCATION("DIP3:5,6") // 出牌方式 + PORT_DIPSETTING( 0x30, DEF_STR(Normal) ) // 正常 + PORT_DIPSETTING( 0x20, "Increase Zhima" ) // 芝麻加強 + PORT_DIPSETTING( 0x10, "Increase Xiaopai" ) // 小牌加強 + PORT_DIPSETTING( 0x00, "Increase Dapai" ) // 大牌加強 + PORT_DIPNAME( 0xc0, 0xc0, "Credit Limit" ) PORT_DIPLOCATION("DIP3:7,8") // 破台限制 PORT_DIPSETTING( 0x80, "500" ) PORT_DIPSETTING( 0xc0, "1000" ) PORT_DIPSETTING( 0x40, "2000" ) PORT_DIPSETTING( 0x00, "3000" ) PORT_MODIFY("DSW3") - PORT_DIPNAME( 0x01, 0x01, DEF_STR( Controls ) ) PORT_DIPLOCATION("DIP2:1") // not displayed in test mode + PORT_DIPNAME( 0x01, 0x01, DEF_STR(Controls) ) PORT_DIPLOCATION("DIP2:1") // not displayed in test mode PORT_DIPSETTING( 0x01, "Keyboard" ) - PORT_DIPSETTING( 0x00, DEF_STR( Joystick ) ) - PORT_DIPNAME( 0x02, 0x02, "Key-In Limit" ) PORT_DIPLOCATION("DIP2:2") // 開分限制 + PORT_DIPSETTING( 0x00, DEF_STR(Joystick) ) + PORT_DIPNAME( 0x02, 0x02, "Key-In Limit" ) PORT_DIPLOCATION("DIP2:2") // 開分限制 PORT_DIPSETTING( 0x02, "1000" ) PORT_DIPSETTING( 0x00, "5000" ) - PORT_DIPNAME( 0x04, 0x04, "Jackpot" ) PORT_DIPLOCATION("DIP2:3") // 累積彩金 + PORT_DIPNAME( 0x04, 0x04, "Jackpot" ) PORT_DIPLOCATION("DIP2:3") // 累積彩金 PORT_DIPSETTING( 0x00, "50" ) PORT_DIPSETTING( 0x04, "100" ) - PORT_DIPNAME( 0x18, 0x18, "Double Over / Round Bonus" ) PORT_DIPLOCATION("DIP2:4,5") + PORT_DIPNAME( 0x18, 0x18, "Double Over / Round Bonus" ) PORT_DIPLOCATION("DIP2:4,5") // 比倍破台/比倍贈分 PORT_DIPSETTING( 0x10, "100 / 10" ) PORT_DIPSETTING( 0x18, "200 / 10" ) PORT_DIPSETTING( 0x08, "300 / 15" ) PORT_DIPSETTING( 0x00, "500 / 25" ) - PORT_DIPNAME( 0xe0, 0xe0, "Cash Out Per Credit" ) PORT_DIPLOCATION("DIP2:6,7,8") // 彩票單位 (sets coins/tickets paid out per credit in cash out mode) - PORT_DIPSETTING( 0xe0, "1" ) - PORT_DIPSETTING( 0xc0, "2" ) - PORT_DIPSETTING( 0xa0, "5" ) - PORT_DIPSETTING( 0x80, "6" ) - PORT_DIPSETTING( 0x60, "7" ) - PORT_DIPSETTING( 0x40, "8" ) - PORT_DIPSETTING( 0x20, "9" ) - PORT_DIPSETTING( 0x00, "10" ) + PORT_DIPNAME( 0xe0, 0xe0, "Payout Unit" ) PORT_DIPLOCATION("DIP2:6,7,8") // 彩票單位 (sets coins/tickets paid out per credit in cash out mode) + PORT_DIPSETTING( 0xe0, DEF_STR(1C_1C) ) + PORT_DIPSETTING( 0xc0, DEF_STR(2C_1C) ) + PORT_DIPSETTING( 0xa0, DEF_STR(5C_1C) ) + PORT_DIPSETTING( 0x80, DEF_STR(6C_1C) ) + PORT_DIPSETTING( 0x60, DEF_STR(7C_1C) ) + PORT_DIPSETTING( 0x40, DEF_STR(8C_1C) ) + PORT_DIPSETTING( 0x20, DEF_STR(9C_1C) ) + PORT_DIPSETTING( 0x00, "10 Coins/1 Credit" ) PORT_MODIFY("DSW4") - PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("DIP1:1") // not displayed in test mode - PORT_DIPSETTING( 0x01, DEF_STR( No ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) - PORT_DIPNAME( 0x02, 0x00, "Double-Up Game" ) PORT_DIPLOCATION("DIP1:2") // 比倍遊戲 - PORT_DIPSETTING( 0x02, DEF_STR( No ) ) // 無 - PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) // 有 - PORT_DIPNAME( 0x04, 0x04, "Credit Mode" ) PORT_DIPLOCATION("DIP1:3") // 進分方式 (sets coin input function) - PORT_DIPSETTING( 0x04, "Key-In" ) // 開分 - PORT_DIPSETTING( 0x00, "Coin" ) // 投幣 - PORT_DIPNAME( 0x08, 0x08, "Payout Mode" ) PORT_DIPLOCATION("DIP1:4") // 退分方式 - PORT_DIPSETTING( 0x08, "Key-Out" ) // 洗分 (Pay Out key pays out score at rate set for coin input) - PORT_DIPSETTING( 0x00, "Cash Out" ) // 退幣 (Pay Out key pays out score at cash out rate) - PORT_DIPNAME( 0x10, 0x10, "Game Hint" ) PORT_DIPLOCATION("DIP1:5") // 吃碰提示 - PORT_DIPSETTING( 0x10, DEF_STR( No ) ) // 無 - PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) // 有 - PORT_DIPNAME( 0x20, 0x20, "Direct Double" ) PORT_DIPLOCATION("DIP1:6") // 直接比倍 - PORT_DIPSETTING( 0x20, DEF_STR( No ) ) // 無 - PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) // 有 - PORT_DIPNAME( 0x40, 0x40, "Coin Acceptor" ) PORT_DIPLOCATION("DIP1:7") // 投幣器 - PORT_DIPSETTING( 0x00, "Mechanical" ) // 機械式 - PORT_DIPSETTING( 0x40, "Electronic" ) // 電子式 - PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "DIP1:8" ) // not displayed in test mode + PORT_DIPNAME( 0x01, 0x00, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("DIP1:1") // not displayed in test mode + PORT_DIPSETTING( 0x01, DEF_STR(Off) ) + PORT_DIPSETTING( 0x00, DEF_STR(On) ) + PORT_DIPNAME( 0x02, 0x00, "Double Up Game" ) PORT_DIPLOCATION("DIP1:2") // 比倍遊戲 + PORT_DIPSETTING( 0x02, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x04, 0x04, "Credit Mode" ) PORT_DIPLOCATION("DIP1:3") // 進分方式 (sets coin input function) + PORT_DIPSETTING( 0x04, "Key-In" ) // 開分 + PORT_DIPSETTING( 0x00, "Coin" ) // 投幣 + PORT_DIPNAME( 0x08, 0x08, "Payout Mode" ) PORT_DIPLOCATION("DIP1:4") // 退分方式 + PORT_DIPSETTING( 0x08, "Key-Out" ) // 洗分 (Pay Out key pays out score at rate set for coin input) + PORT_DIPSETTING( 0x00, "Return Coins" ) // 退幣 (Pay Out key pays out score at cash out rate) + PORT_DIPNAME( 0x10, 0x10, "Game Hint" ) PORT_DIPLOCATION("DIP1:5") // 吃碰提示 + PORT_DIPSETTING( 0x10, DEF_STR( No ) ) // 無 + PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) // 有 + PORT_DIPNAME( 0x20, 0x20, "Direct Double Up" ) PORT_DIPLOCATION("DIP1:6") // 直接比倍 + PORT_DIPSETTING( 0x20, DEF_STR( No ) ) // 無 + PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) // 有 + PORT_DIPNAME( 0x40, 0x40, "Coin Acceptor" ) PORT_DIPLOCATION("DIP1:7") // 投幣器 + PORT_DIPSETTING( 0x00, "Mechanical" ) // 機械式 + PORT_DIPSETTING( 0x40, "Electronic" ) // 電子式 + PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "DIP1:8" ) // not displayed in test mode // Credit Mode Payout Mode | Pay Out Rate Key Out Rate // -----------------------------+------------------------------ @@ -1089,22 +1098,22 @@ INPUT_PORTS_END static INPUT_PORTS_START( xyddzhh ) PORT_START("INPUTS") // Entertainment controls: - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START1 ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) // choose - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) - PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Pay Out") PORT_CODE(KEYCODE_O) - PORT_BIT( 0x0200, IP_ACTIVE_HIGH,IPT_CUSTOM ) PORT_READ_LINE_MEMBER(FUNC(bmcpokr_state::hopper_r)) // TODO: verify? - PORT_SERVICE_NO_TOGGLE( 0x0400, IP_ACTIVE_LOW ) - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_SERVICE1 ) - PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) // no effect in test mode - PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) - PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) // pass - PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) + PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_O) + PORT_BIT( 0x0200, IP_ACTIVE_HIGH,IPT_CUSTOM ) PORT_READ_LINE_MEMBER(FUNC(bmcpokr_state::hopper_r)) + PORT_SERVICE_NO_TOGGLE( 0x0400, IP_ACTIVE_LOW ) + PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_SERVICE1 ) + PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) // no effect in test mode + PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) // bet + PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CONDITION("DSW2",0x01,EQUALS,0x00) // pass + PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_COIN1 ) MAHJONG_KEYS_COMMON("DSW2", 0x01) @@ -1113,22 +1122,22 @@ static INPUT_PORTS_START( xyddzhh ) // Maximum Bet is fixed to 40 according to test mode (no DIP determines it) PORT_START("DSW1") - PORT_DIPNAME( 0x01, 0x00, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("DIP1:1") - PORT_DIPSETTING( 0x01, DEF_STR(Off) ) - PORT_DIPSETTING( 0x00, DEF_STR(On) ) - PORT_DIPNAME( 0x02, 0x02, "Key-Out Rate" ) PORT_DIPLOCATION("DIP1:2") - PORT_DIPSETTING( 0x02, "Key-In Rate" ) - PORT_DIPSETTING( 0x00, DEF_STR(Coinage) ) - PORT_DIPNAME( 0x04, 0x04, "Return Coins" ) PORT_DIPLOCATION("DIP1:3") - PORT_DIPSETTING( 0x04, DEF_STR(No) ) - PORT_DIPSETTING( 0x00, DEF_STR(Yes) ) - PORT_DIPNAME( 0x08, 0x08, "Siren Sound" ) PORT_DIPLOCATION("DIP1:4") - PORT_DIPSETTING( 0x00, DEF_STR(Off) ) - PORT_DIPSETTING( 0x08, DEF_STR(On) ) - PORT_DIPNAME( 0x10, 0x10, "Auto Pass" ) PORT_DIPLOCATION("DIP1:5") - PORT_DIPSETTING( 0x00, DEF_STR(Off) ) - PORT_DIPSETTING( 0x10, DEF_STR(On) ) - PORT_DIPNAME( 0xe0, 0xe0, "Double-Up Game Jackpot" ) PORT_DIPLOCATION("DIP1:6,7,8") + PORT_DIPNAME( 0x01, 0x00, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("DIP1:1") // 示範音樂 + PORT_DIPSETTING( 0x01, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x02, 0x02, "Key-Out Rate" ) PORT_DIPLOCATION("DIP1:2") // 洗分錶同 + PORT_DIPSETTING( 0x02, "Key-In Rate" ) // 開分 + PORT_DIPSETTING( 0x00, DEF_STR(Coinage) ) // 投幣 + PORT_DIPNAME( 0x04, 0x04, "Return Coins" ) PORT_DIPLOCATION("DIP1:3") // 退幣有無 + PORT_DIPSETTING( 0x04, DEF_STR(No) ) // 無 + PORT_DIPSETTING( 0x00, DEF_STR(Yes) ) // 有 + PORT_DIPNAME( 0x08, 0x08, "Siren Sound" ) PORT_DIPLOCATION("DIP1:4") // 報警音效 + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x08, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x10, 0x10, "Auto Pass" ) PORT_DIPLOCATION("DIP1:5") // 自動PASS + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x10, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0xe0, 0xe0, "Double Up Game Jackpot" ) PORT_DIPLOCATION("DIP1:6,7,8") // 續玩破台 PORT_DIPSETTING( 0xc0, "5,000" ) PORT_DIPSETTING( 0xe0, "10,000" ) PORT_DIPSETTING( 0xa0, "15,000" ) @@ -1139,18 +1148,18 @@ static INPUT_PORTS_START( xyddzhh ) PORT_DIPSETTING( 0x00, "50,000" ) PORT_START("DSW2") - PORT_DIPNAME( 0x01, 0x00, "Controls" ) PORT_DIPLOCATION("DIP2:1") - PORT_DIPSETTING( 0x01, "Mahjong" ) - PORT_DIPSETTING( 0x00, "Entertainment" ) - PORT_DIPNAME( 0x06, 0x06, "Double-Up Game Threshold" ) PORT_DIPLOCATION("DIP2:2,3") + PORT_DIPNAME( 0x01, 0x00, "Controls" ) PORT_DIPLOCATION("DIP2:1") // 版本 + PORT_DIPSETTING( 0x01, "Mahjong" ) // 麻將版 + PORT_DIPSETTING( 0x00, DEF_STR(Joystick) ) // 娛樂版 + PORT_DIPNAME( 0x06, 0x06, "Double Up Game Threshold" ) PORT_DIPLOCATION("DIP2:2,3") // 續玩過關 PORT_DIPSETTING( 0x06, "3000" ) PORT_DIPSETTING( 0x04, "4000" ) PORT_DIPSETTING( 0x02, "5000" ) PORT_DIPSETTING( 0x01, "6000" ) - PORT_DIPNAME( 0x08, 0x08, "Accumulated Bonus" ) PORT_DIPLOCATION("DIP2:4") + PORT_DIPNAME( 0x08, 0x08, "Accumulated Bonus" ) PORT_DIPLOCATION("DIP2:4") // 累積彩金 PORT_DIPSETTING( 0x08, "300" ) PORT_DIPSETTING( 0x00, "400" ) - PORT_DIPNAME( 0x70, 0x70, "Double-Up Game Payout Rate" ) PORT_DIPLOCATION("DIP2:5,6,7") + PORT_DIPNAME( 0x70, 0x70, "Double Up Game Payout Rate" ) PORT_DIPLOCATION("DIP2:5,6,7") // 續玩機率 PORT_DIPSETTING( 0x60, "92%" ) PORT_DIPSETTING( 0x50, "93%" ) PORT_DIPSETTING( 0x40, "94%" ) @@ -1159,12 +1168,12 @@ static INPUT_PORTS_START( xyddzhh ) PORT_DIPSETTING( 0x20, "97%" ) PORT_DIPSETTING( 0x10, "98%" ) PORT_DIPSETTING( 0x00, "99%" ) - PORT_DIPNAME( 0x80, 0x80, "Double-Up Game" ) PORT_DIPLOCATION("DIP2:8") - PORT_DIPSETTING( 0x00, DEF_STR(Off) ) - PORT_DIPSETTING( 0x80, DEF_STR(On) ) + PORT_DIPNAME( 0x80, 0x80, "Double Up Game" ) PORT_DIPLOCATION("DIP2:8") // 續玩遊戲 + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x80, DEF_STR(On) ) // 有 PORT_START("DSW3") - PORT_DIPNAME( 0x07, 0x07, DEF_STR(Coinage) ) PORT_DIPLOCATION("DIP3:1,2,3") + PORT_DIPNAME( 0x07, 0x07, DEF_STR(Coinage) ) PORT_DIPLOCATION("DIP3:1,2,3") // 投幣單位 PORT_DIPSETTING( 0x06, DEF_STR(1C_1C) ) PORT_DIPSETTING( 0x05, DEF_STR(1C_2C) ) PORT_DIPSETTING( 0x04, DEF_STR(1C_5C) ) @@ -1173,7 +1182,7 @@ static INPUT_PORTS_START( xyddzhh ) PORT_DIPSETTING( 0x01, "1 Coin/50 Credits" ) PORT_DIPSETTING( 0x07, "1 Coin/100 Credits" ) PORT_DIPSETTING( 0x00, "1 Coin/200 Credits" ) - PORT_DIPNAME( 0x38, 0x38, "Key-In Rate" ) PORT_DIPLOCATION("DIP3:4,5,6") + PORT_DIPNAME( 0x38, 0x38, "Key-In Unit" ) PORT_DIPLOCATION("DIP3:4,5,6") // 開分單位 PORT_DIPSETTING( 0x30, "40" ) PORT_DIPSETTING( 0x28, "50" ) PORT_DIPSETTING( 0x38, "100" ) @@ -1182,15 +1191,15 @@ static INPUT_PORTS_START( xyddzhh ) PORT_DIPSETTING( 0x10, "500" ) PORT_DIPSETTING( 0x08, "1000" ) PORT_DIPSETTING( 0x00, "2000" ) - PORT_DIPNAME( 0x40, 0x40, "Credit Limit" ) PORT_DIPLOCATION("DIP3:7") + PORT_DIPNAME( 0x40, 0x40, "Key-In Limit" ) PORT_DIPLOCATION("DIP3:7") // 開分限制 PORT_DIPSETTING( 0x00, "10,000" ) PORT_DIPSETTING( 0x40, "99,000" ) - PORT_DIPNAME( 0x80, 0x80, "Card Type" ) PORT_DIPLOCATION("DIP3:8") - PORT_DIPSETTING( 0x80, DEF_STR ( Normal ) ) - PORT_DIPSETTING( 0x00, "Graphics" ) + PORT_DIPNAME( 0x80, 0x80, "Card Type" ) PORT_DIPLOCATION("DIP3:8") // 牌型選項 + PORT_DIPSETTING( 0x80, DEF_STR(Normal) ) // 正常 + PORT_DIPSETTING( 0x00, "Graphics" ) // 圖型 PORT_START("DSW4") - PORT_DIPNAME( 0x07, 0x07, "Minimum Bet" ) PORT_DIPLOCATION("DIP4:1,2,3") + PORT_DIPNAME( 0x07, 0x07, "Minimum Bet" ) PORT_DIPLOCATION("DIP4:1,2,3") // 最小押分 PORT_DIPSETTING( 0x06, "1" ) PORT_DIPSETTING( 0x05, "2" ) PORT_DIPSETTING( 0x04, "3" ) @@ -1199,7 +1208,7 @@ static INPUT_PORTS_START( xyddzhh ) PORT_DIPSETTING( 0x02, "15" ) PORT_DIPSETTING( 0x01, "20" ) PORT_DIPSETTING( 0x00, "40" ) - PORT_DIPNAME( 0x38, 0x38, "Payout Rate" ) PORT_DIPLOCATION("DIP4:4,5,6") + PORT_DIPNAME( 0x38, 0x38, "Payout Rate" ) PORT_DIPLOCATION("DIP4:4,5,6") // 遊戲機率 PORT_DIPSETTING( 0x30, "90%" ) PORT_DIPSETTING( 0x28, "91%" ) PORT_DIPSETTING( 0x20, "92%" ) @@ -1208,10 +1217,10 @@ static INPUT_PORTS_START( xyddzhh ) PORT_DIPSETTING( 0x10, "95%" ) PORT_DIPSETTING( 0x08, "96%" ) PORT_DIPSETTING( 0x00, "97%" ) - PORT_DIPNAME( 0x40, 0x40, "Market Setting" ) PORT_DIPLOCATION("DIP4:7") - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x40, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, "Jackpot" ) PORT_DIPLOCATION("DIP4:8") + PORT_DIPNAME( 0x40, 0x40, "Market Setting" ) PORT_DIPLOCATION("DIP4:7") // 炒場設定 + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x40, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x80, 0x80, "Jackpot" ) PORT_DIPLOCATION("DIP4:8") // 系統破台 PORT_DIPSETTING( 0x00, "50,000" ) PORT_DIPSETTING( 0x80, "100,000" ) INPUT_PORTS_END diff --git a/src/mame/bmc/koftball.cpp b/src/mame/bmc/koftball.cpp index a29413b5391..c4e74b498e3 100644 --- a/src/mame/bmc/koftball.cpp +++ b/src/mame/bmc/koftball.cpp @@ -7,14 +7,16 @@ King Of Football (c)1995 BMC preliminary driver by Tomasz Slanina TODO: -- lots of unknown writes / reads; -- one of the customs could contain a VIA6522-like core. bmc/bmcbowl.cpp uses the VIA6522 and the - accesses are similar; -- probably jxzh also supports the mahjong keyboard. Check if one of the dips enable it and where it - is read; -- better understanding of the koftball protection. +- Lots of unknown writes/reads. +- One of the customs could contain a VIA6522-like core. bmc/bmcbowl.cpp + uses the VIA6522 and the accesses are similar. +- Better understanding / implementation of the video registers. +- jxzh and kaimenhu show a full mahjong keyboard in their key tests - is + this actually supported or is it vestigial? +- jxzh stops responding to inputs properly after winning a hand if + stripping sequences are enabled. +- Better understanding of the koftball protection. --- MC68000P10 M28 (OKI 6295, next to ROM C9) @@ -22,7 +24,7 @@ BMC ADB40817(80 Pin PQFP - Google hits, but no datasheet or description) RAMDAC TRC1710-80PCA (Monolithic 256-word by 18bit Look-up Table & Triple Video DAC with 6-bit DACs) File 89C67 (Clone of YM2413. Next to 3.57954MHz OSC) OSC: 21.47727MHz & 3.57954MHz -2 8-way dipswitches +2 8-way DIP switches part # scratched 64 pin PLCC (soccer ball sticker over this chip ;-) ft5_v16_c5.u14 \ @@ -35,6 +37,61 @@ ft5_v6_c2.u60 | Graphics ft5_v6_c3.u61 | ft5_v6_c4.u58 / + +koftball has a full set of soft settings accessible from the bookeeping menu: + +English translation Default Chinese + +odds adjustment 機率調整 +five of a kind boost 0 五梅加强 +royal flush boost 0 同花大順加强 +straight flush boost 0 同花順加强 +four of a kind boost 0 四梅加强 + 0 小牌加强 +odds 98.5 機率 +double up odds 98 比倍 + +system settings 系統設定 +minimum bet to win jackpot 30 中彩金最小押分 +payout unit 100 退分單位 +maximum bet 100 押分上限 +bet unit 2 押分單位 +minimum bet 20 最小押分 +key-in unit 200 上分單位 +key-in limit 5000 上分上限 +credit limit 50000 得分上限 + + +jxzh uses an unusual control scheme: +* use Start to draw a tile +* use Big (left) and Small (right) to select a tile to discard +* use Start to discard the selected tile +* Kan, Pon, Chi, Reach, Ron, Flip Flop and Bet function as expected in the main game +* use Big (left) and Small (right) to select a tile to exchange during "first chance" +* use Flip Flop to exchange the selected tile during "first chance" +* use Start to end "first chance" +* use Start to select a tile during "last chance" +* use Flip Flop to stake winnings on the double up game +* use Ron to take winnings + +kaimenhu appears to be just the first chance and double up games from +jxzh (i.e. like a draw poker game but with mahjong tiles and hands). + + +jxzh/kaimenhu test menu: + +pon input test 碰:按鍵測試 +kan graphics test 槓:圖型測試 +reach sound test 聽:音樂測試 +ron memory test 胡:記憶體測試 +chi DIP switch test 吃:DIP 測試 +big last hand test 大:前手牌測試 +test exit 離開 按《測試》 + + +kaimenhu has a full set of soft settings accessible from the bookeeping menu +(default password is Start eight times) + */ #include "emu.h" @@ -102,16 +159,18 @@ 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; - std::unique_ptr<bitmap_ind16> m_pixbitmap; u8 m_pixpal = 0; void irq_ack_w(u8 data); - void outputs_w(u8 data); + void koftball_outputs_w(u8 data); + void kaimenhu_outputs_w(u8 data); u16 random_number_r(); u16 prot_r(); u16 kaimenhu_prot_r(); @@ -119,15 +178,16 @@ 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); TIMER_DEVICE_CALLBACK_MEMBER(interrupt); + + void common_mem(address_map &map) ATTR_COLD; + void koftball_mem(address_map &map) ATTR_COLD; void jxzh_mem(address_map &map) ATTR_COLD; void kaimenhu_mem(address_map &map) ATTR_COLD; - void koftball_mem(address_map &map) ATTR_COLD; void ramdac_map(address_map &map) ATTR_COLD; }; @@ -164,12 +224,11 @@ 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 = std::make_unique<bitmap_ind16>(512, 256); + m_pixbitmap.allocate(512, 256); } // linear 512x256x4bpp @@ -179,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; } } } @@ -201,39 +260,50 @@ 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 tile race over under prev screen prev screen 0x17 0x98 0x00 0x00 girl select after coin up prev screen prev screen over under 0x13 0x3a + + 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(0, 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); - if (BIT(m_priority, 3)) - copyscrollbitmap_trans(bitmap, *m_pixbitmap, 0, 0, 0, 0, cliprect, 0); + if (bitmap_enable && BIT(m_priority, 3)) + copyscrollbitmap_trans(bitmap, m_pixbitmap, 0, 0, 0, 0, cliprect, 0); - // TODO: or bit 1? - if (BIT(m_gfx_ctrl, 5)) + if (tmap3_enable) { m_tilemap[3]->draw(screen, bitmap, cliprect, 0, 0); - m_tilemap[2]->draw(screen, bitmap, cliprect, 0, 0); } else { @@ -241,8 +311,11 @@ u32 koftball_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, c m_tilemap[0]->draw(screen, bitmap, cliprect, 0, 0); } - if (!BIT(m_priority, 3)) - copyscrollbitmap_trans(bitmap, *m_pixbitmap, 0, 0, 0, 0, cliprect, 0); + if (tmap2_enable) + m_tilemap[2]->draw(screen, bitmap, cliprect, 0, 0); + + if (bitmap_enable && !BIT(m_priority, 3)) + copyscrollbitmap_trans(bitmap, m_pixbitmap, 0, 0, 0, 0, cliprect, 0); return 0; } @@ -300,7 +373,15 @@ void koftball_state::irq_ack_w(u8 data) m_maincpu->set_input_line(i, CLEAR_LINE); } -void koftball_state::outputs_w(u8 data) +void koftball_state::koftball_outputs_w(u8 data) +{ + machine().bookkeeping().coin_counter_w(1, BIT(data, 0)); // credits paid out by key-out + machine().bookkeeping().coin_counter_w(0, BIT(data, 1)); // credits in + // bit 3 always set? + // bit 7 always set? +} + +void koftball_state::kaimenhu_outputs_w(u8 data) { m_hopper->motor_w(BIT(data, 0)); machine().bookkeeping().coin_counter_w(0, BIT(data, 1)); // credits in @@ -308,28 +389,25 @@ void koftball_state::outputs_w(u8 data) // bit 7 always set? } -// FIXME: merge video maps -void koftball_state::koftball_mem(address_map &map) +void koftball_state::common_mem(address_map &map) { - map(0x000000, 0x01ffff).rom(); - map(0x220000, 0x22ffff).ram().share(m_main_ram); - map(0x260000, 0x260fff).ram().w(FUNC(koftball_state::videoram_w<0>)).share(m_videoram[0]); map(0x261000, 0x261fff).ram().w(FUNC(koftball_state::videoram_w<1>)).share(m_videoram[1]); map(0x262000, 0x262fff).ram().w(FUNC(koftball_state::videoram_w<2>)).share(m_videoram[2]); map(0x263000, 0x263fff).ram().w(FUNC(koftball_state::videoram_w<3>)).share(m_videoram[3]); + map(0x268000, 0x26ffff).ram(); map(0x280000, 0x29ffff).ram().share(m_pixram); + map(0x2a0007, 0x2a0007).w(FUNC(koftball_state::irq_ack_w)); map(0x2a0009, 0x2a0009).lw8(NAME([this] (u8 data) { m_irq_enable = data; })); map(0x2a000f, 0x2a000f).lw8(NAME([this] (u8 data) { m_priority = data; LOGGFX("GFX ctrl $2a000f (priority) %02x\n", data); })); map(0x2a0017, 0x2a0017).w(FUNC(koftball_state::pixpal_w)); map(0x2a0019, 0x2a0019).lw8(NAME([this] (u8 data) { m_backpen = data; LOGGFX("GFX ctrl $2a0019 (backpen) %02x\n", data); })); - map(0x2a001a, 0x2a001b).nopw(); - map(0x2a0000, 0x2a001f).r(FUNC(koftball_state::random_number_r)); + map(0x2b0000, 0x2b0001).portr("DSW"); - map(0x2d8000, 0x2d8001).r(FUNC(koftball_state::random_number_r)); + map(0x2da000, 0x2da003).w("ymsnd", FUNC(ym2413_device::write)).umask16(0xff00); map(0x2db001, 0x2db001).w("ramdac", FUNC(ramdac_device::index_w)); @@ -338,45 +416,43 @@ void koftball_state::koftball_mem(address_map &map) map(0x2db005, 0x2db005).w("ramdac", FUNC(ramdac_device::mask_w)); map(0x2dc000, 0x2dc000).rw("oki", FUNC(okim6295_device::read), FUNC(okim6295_device::write)); - map(0x2f0000, 0x2f0003).portr("INPUTS"); - map(0x300000, 0x300001).nopw(); + + map(0x2f0000, 0x2f0001).portr("INPUTS"); + map(0x320000, 0x320000).lw8(NAME([this] (u8 data) { m_gfx_ctrl = data; LOGGFX("GFX ctrl $320000 (layer enable) %02x\n", data); })); +} + +void koftball_state::koftball_mem(address_map &map) +{ + common_mem(map); + + map(0x000000, 0x01ffff).rom(); + map(0x220000, 0x22ffff).ram().share(m_main_ram); + + map(0x2a001a, 0x2a001b).nopw(); + map(0x2a0000, 0x2a001f).r(FUNC(koftball_state::random_number_r)); + map(0x2d8000, 0x2d8001).r(FUNC(koftball_state::random_number_r)); + + map(0x300001, 0x300001).w(FUNC(koftball_state::koftball_outputs_w)); + map(0x340000, 0x340001).r(FUNC(koftball_state::prot_r)); map(0x360000, 0x360001).w(FUNC(koftball_state::prot_w)); } void koftball_state::jxzh_mem(address_map &map) { + common_mem(map); + map(0x000000, 0x03ffff).rom(); map(0x200000, 0x200fff).ram().share("nvram"); - map(0x260000, 0x260fff).ram().w(FUNC(koftball_state::videoram_w<0>)).share(m_videoram[0]); - map(0x261000, 0x261fff).ram().w(FUNC(koftball_state::videoram_w<1>)).share(m_videoram[1]); - map(0x262000, 0x262fff).ram().w(FUNC(koftball_state::videoram_w<2>)).share(m_videoram[2]); - map(0x263000, 0x263fff).ram().w(FUNC(koftball_state::videoram_w<3>)).share(m_videoram[3]); map(0x264b00, 0x264dff).ram(); // TODO: writes here at least at girl selection after coin up. Some kind of effect? - map(0x268000, 0x26ffff).ram(); - map(0x280000, 0x29ffff).ram().share(m_pixram); - map(0x2a0007, 0x2a0007).w(FUNC(koftball_state::irq_ack_w)); - map(0x2a0009, 0x2a0009).lw8(NAME([this] (u8 data) { m_irq_enable = data; })); - map(0x2a000f, 0x2a000f).lw8(NAME([this] (u8 data) { m_priority = data; LOGGFX("GFX ctrl $2a000f (priority) %02x\n", data); })); - map(0x2a0017, 0x2a0017).w(FUNC(koftball_state::pixpal_w)); - map(0x2a0019, 0x2a0019).lw8(NAME([this] (u8 data) { m_backpen = data; LOGGFX("GFX ctrl $2a0019 (backpen) %02x\n", data); })); map(0x2a001a, 0x2a001d).nopw(); map(0x2a0000, 0x2a001f).r(FUNC(koftball_state::random_number_r)); - map(0x2b0000, 0x2b0001).portr("DSW"); - map(0x2da000, 0x2da003).umask16(0xff00).w("ymsnd", FUNC(ym2413_device::write)); - map(0x2db001, 0x2db001).w("ramdac", FUNC(ramdac_device::index_w)); - map(0x2db002, 0x2db003).nopr(); // reads here during some scene changes - map(0x2db003, 0x2db003).w("ramdac", FUNC(ramdac_device::pal_w)); - map(0x2db005, 0x2db005).w("ramdac", FUNC(ramdac_device::mask_w)); + map(0x300001, 0x300001).w(FUNC(koftball_state::kaimenhu_outputs_w)); - map(0x2dc000, 0x2dc000).rw("oki", FUNC(okim6295_device::read), FUNC(okim6295_device::write)); - map(0x2f0000, 0x2f0001).portr("INPUTS"); - map(0x300001, 0x300001).w(FUNC(koftball_state::outputs_w)); - map(0x320000, 0x320000).lw8(NAME([this] (u8 data) { m_gfx_ctrl = data; LOGGFX("GFX ctrl $320000 (layer enable) %02x\n", data); })); map(0x340000, 0x340001).r(FUNC(koftball_state::prot_r)); map(0x360000, 0x360001).w(FUNC(koftball_state::prot_w)); map(0x380000, 0x380001).w(FUNC(koftball_state::prot_w)); @@ -399,71 +475,71 @@ static INPUT_PORTS_START( koftball ) PORT_START("INPUTS") PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) // also decrease in sound test - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) // also increase in sound test - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) // Decrease in settings menus + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) // Down in settings menus + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) // Up in settings menus + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) // Increase in settings menus PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) + PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) // Default in settings menus PORT_SERVICE_NO_TOGGLE( 0x1000, IP_ACTIVE_LOW ) // test mode enter PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) PORT_START("DSW") - PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:!8") - PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:!7") - PORT_DIPSETTING( 0x0002, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:!6") - PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:!5") - PORT_DIPSETTING( 0x0008, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:!4") - PORT_DIPSETTING( 0x0010, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:!3") - PORT_DIPSETTING( 0x0020, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:!2") - PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:!1") - PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0100, 0x0100, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:!8") - PORT_DIPSETTING( 0x0100, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:!7") - PORT_DIPSETTING( 0x0200, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0400, 0x0400, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:!6") - PORT_DIPSETTING( 0x0400, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0800, 0x0800, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:!5") - PORT_DIPSETTING( 0x0800, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:!4") - PORT_DIPSETTING( 0x1000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:!3") - PORT_DIPSETTING( 0x2000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x4000, 0x4000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:!2") - PORT_DIPSETTING( 0x4000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x8000, 0x0000, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW2:!1") - PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0001, 0x0001, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW1:8") + PORT_DIPSETTING( 0x0001, DEF_STR(Off) ) + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) + PORT_DIPNAME( 0x0002, 0x0002, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW1:7") + PORT_DIPSETTING( 0x0002, DEF_STR(Off) ) + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) + PORT_DIPNAME( 0x0004, 0x0004, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW1:6") + PORT_DIPSETTING( 0x0004, DEF_STR(Off) ) + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) + PORT_DIPNAME( 0x0008, 0x0008, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW1:5") + PORT_DIPSETTING( 0x0008, DEF_STR(Off) ) + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) + PORT_DIPNAME( 0x0010, 0x0010, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW1:4") + PORT_DIPSETTING( 0x0010, DEF_STR(Off) ) + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) + PORT_DIPNAME( 0x0020, 0x0020, "Show Spend" ) PORT_DIPLOCATION("SW1:3") // shows the amount you've spent as well above current credits when on + PORT_DIPSETTING( 0x0020, DEF_STR(Off) ) + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) + PORT_DIPNAME( 0x0040, 0x0040, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW1:2") + PORT_DIPSETTING( 0x0040, DEF_STR(Off) ) + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) + PORT_DIPNAME( 0x0080, 0x0080, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW1:1") + PORT_DIPSETTING( 0x0080, DEF_STR(Off) ) + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) + PORT_DIPNAME( 0x0100, 0x0100, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW2:8") + PORT_DIPSETTING( 0x0100, DEF_STR(Off) ) + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) + PORT_DIPNAME( 0x0200, 0x0200, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW2:7") + PORT_DIPSETTING( 0x0200, DEF_STR(Off) ) + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) + PORT_DIPNAME( 0x0400, 0x0400, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW2:6") + PORT_DIPSETTING( 0x0400, DEF_STR(Off) ) + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) + PORT_DIPNAME( 0x0800, 0x0800, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW2:5") + PORT_DIPSETTING( 0x0800, DEF_STR(Off) ) + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) + PORT_DIPNAME( 0x1000, 0x1000, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW2:4") + PORT_DIPSETTING( 0x1000, DEF_STR(Off) ) + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) + PORT_DIPNAME( 0x2000, 0x2000, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW2:3") + PORT_DIPSETTING( 0x2000, DEF_STR(Off) ) + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) + PORT_DIPNAME( 0x4000, 0x4000, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW2:2") + PORT_DIPSETTING( 0x4000, DEF_STR(Off) ) + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) + PORT_DIPNAME( 0x8000, 0x0000, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("SW2:1") + PORT_DIPSETTING( 0x8000, DEF_STR(Off) ) + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) INPUT_PORTS_END static INPUT_PORTS_START( kaimenhu ) @@ -475,16 +551,16 @@ static INPUT_PORTS_START( kaimenhu ) PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_KAN ) PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_MAHJONG_CHI ) PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE ) + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_MAHJONG_RON ) PORT_NAME("%p Mahjong Ron / Take Score" ) // called take score (得分) in key test PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(hopper_device::line_r)) + PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(hopper_device::line_r)) PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_SERVICE_NO_TOGGLE( 0x1000, IP_ACTIVE_LOW ) - PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) PORT_NAME("%p Mahjong Small / Right") - PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_MAHJONG_BIG ) PORT_NAME("%p Mahjong Big / Left") - PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP) PORT_NAME("%p Mahjong Double Up / Change Tile") + PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) PORT_NAME("%p Mahjong Small / Right") + PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_MAHJONG_BIG ) PORT_NAME("%p Mahjong Big / Left") + PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_MAHJONG_FLIP_FLOP ) PORT_NAME("%p Mahjong Flip Flop / Double Up" ) // called double up (比倍) in key test PORT_START("DSW") PORT_DIPNAME( 0x0001, 0x0001, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW1:8") @@ -508,7 +584,7 @@ static INPUT_PORTS_START( kaimenhu ) PORT_DIPNAME( 0x0040, 0x0040, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW1:2") PORT_DIPSETTING( 0x0040, DEF_STR(Off) ) PORT_DIPSETTING( 0x0000, DEF_STR(On) ) - PORT_DIPNAME( 0x0080, 0x0080, DEF_STR(Unknown) ) PORT_DIPLOCATION("SW1:1") + PORT_DIPNAME( 0x0080, 0x0080, "Double Up Game" ) PORT_DIPLOCATION("SW1:1") PORT_DIPSETTING( 0x0080, DEF_STR(Off) ) PORT_DIPSETTING( 0x0000, DEF_STR(On) ) PORT_DIPNAME( 0x0100, 0x0100, DEF_STR(Service_Mode) ) PORT_DIPLOCATION("SW2:8") @@ -546,6 +622,18 @@ static INPUT_PORTS_START( jxzh ) PORT_DIPSETTING( 0x0002, "1 2 4 8 12 16 24 32" ) PORT_DIPSETTING( 0x0001, "1 2 3 5 8 15 30 50" ) PORT_DIPSETTING( 0x0000, "1 2 3 5 10 25 50 100" ) + PORT_DIPNAME( 0x0040, 0x0040, "Last Chance Type" ) PORT_DIPLOCATION("SW1:2") + PORT_DIPSETTING( 0x0040, "A" ) // choose three of ten tiles + PORT_DIPSETTING( 0x0000, "B" ) // draw ten tiles + PORT_DIPNAME( 0x0400, 0x0400, "Nudity" ) PORT_DIPLOCATION("SW2:6") + PORT_DIPSETTING( 0x0400, DEF_STR(Off) ) + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) + PORT_DIPNAME( 0x0800, 0x0800, "Auto Last Chance B" ) PORT_DIPLOCATION("SW2:5") + PORT_DIPSETTING( 0x0800, DEF_STR(Off) ) + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) // automatically draws tiles for last chance type B + PORT_DIPNAME( 0x2000, 0x0000, "Gal Voice" ) PORT_DIPLOCATION("SW2:3") + PORT_DIPSETTING( 0x2000, DEF_STR(Off) ) + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) // calls discarded tiles INPUT_PORTS_END @@ -632,6 +720,7 @@ void koftball_state::kaimenhu(machine_config &config) } +// 足球王 (Zúqiú Wáng), BMC 1995 ROM_START( koftball ) ROM_REGION( 0x20000, "maincpu", 0 ) // 68000 Code ROM_LOAD16_BYTE( "ft5_v16_c6.u15", 0x00000, 0x10000, CRC(5e1784a5) SHA1(5690d315500fb533b12b598cb0a51bd1eadd0505) ) @@ -769,6 +858,6 @@ void koftball_state::init_koftball() } // anonymous namespace -GAME( 1995, koftball, 0, koftball, koftball, koftball_state, init_koftball, ROT0, "BMC", "King of Football", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) -GAME( 1996, jxzh, 0, jxzh, jxzh, koftball_state, empty_init, ROT0, "BMC", "Jinxiu Zhonghua", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) -GAME( 1996, kaimenhu, jxzh, kaimenhu, kaimenhu, koftball_state, empty_init, ROT0, "BMC", "Kaimen Hu", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) +GAME( 1995, koftball, 0, koftball, koftball, koftball_state, init_koftball, ROT0, "BMC", "Zuqiu Wang - King of Football", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) +GAME( 1996, jxzh, 0, jxzh, jxzh, koftball_state, empty_init, ROT0, "BMC", "Jinxiu Zhonghua", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE | MACHINE_NOT_WORKING ) +GAME( 1996, kaimenhu, 0, kaimenhu, kaimenhu, koftball_state, empty_init, ROT0, "BMC", "Kaimen Hu", MACHINE_UNEMULATED_PROTECTION | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/capcom/cps2.cpp b/src/mame/capcom/cps2.cpp index 44c61e0a4e4..f7d6e36bdce 100644 --- a/src/mame/capcom/cps2.cpp +++ b/src/mame/capcom/cps2.cpp @@ -12893,17 +12893,17 @@ GAME( 2000, mmatrixj, mmatrix, cps2, cps2_2p1b, cps2_state, init_cps2, RO // Games released on CPS-2 hardware by Mitchell -GAME( 2000, mpang, 0, cps2, cps2_2p1b, cps2_state, init_cps2, ROT0, "Mitchell (Capcom license)", "Mighty! Pang (Europe 001010)", MACHINE_SUPPORTS_SAVE ) -GAME( 2000, mpangr1, mpang, cps2, cps2_2p1b, cps2_state, init_cps2, ROT0, "Mitchell (Capcom license)", "Mighty! Pang (Europe 000925)", MACHINE_SUPPORTS_SAVE ) -GAME( 2000, mpangu, mpang, cps2, cps2_2p1b, cps2_state, init_cps2, ROT0, "Mitchell (Capcom license)", "Mighty! Pang (USA 001010)", MACHINE_SUPPORTS_SAVE ) -GAME( 2000, mpangj, mpang, cps2, cps2_2p1b, cps2_state, init_cps2, ROT0, "Mitchell (Capcom license)", "Mighty! Pang (Japan 001011)", MACHINE_SUPPORTS_SAVE ) -GAME( 2000, mpanga, mpang, cps2, cps2_2p1b, cps2_state, init_cps2, ROT0, "Mitchell (Capcom license)", "Mighty! Pang (Asia 001010)", MACHINE_SUPPORTS_SAVE ) -GAME( 2001, pzloop2, 0, cps2, pzloop2, cps2_state, init_pzloop2, ROT0, "Mitchell (Capcom license)", "Puzz Loop 2 (Europe 010302)", MACHINE_SUPPORTS_SAVE ) -GAME( 2001, pzloop2j, pzloop2, cps2, pzloop2, cps2_state, init_pzloop2, ROT0, "Mitchell (Capcom license)", "Puzz Loop 2 (Japan 010226)", MACHINE_SUPPORTS_SAVE ) -GAME( 2001, pzloop2jr1, pzloop2, cps2, pzloop2, cps2_state, init_pzloop2, ROT0, "Mitchell (Capcom license)", "Puzz Loop 2 (Japan 010205)", MACHINE_SUPPORTS_SAVE ) -GAME( 2001, pzloop2jp, pzloop2, dead_cps2, pzloop2,cps2_state, init_pzloop2,ROT0, "Mitchell (Capcom license)", "Puzz Loop 2 (Japan 010201 Publicity)", MACHINE_SUPPORTS_SAVE ) -GAME( 2001, choko, 0, cps2, choko, cps2_state, init_cps2, ROT0, "Mitchell (Capcom license)", "Janpai Puzzle Choukou (Japan 010820)", MACHINE_SUPPORTS_SAVE ) -GAME( 2001, chokop, 0, dead_cps2, choko,cps2_state, init_cps2, ROT0, "Mitchell (Capcom license)", "Janpai Puzzle Choukou (Japan 010820 Publicity)", MACHINE_SUPPORTS_SAVE ) +GAME( 2000, mpang, 0, cps2, cps2_2p1b, cps2_state, init_cps2, ROT0, "Mitchell (Capcom license)", "Mighty! Pang (Europe 001010)", MACHINE_SUPPORTS_SAVE ) +GAME( 2000, mpangr1, mpang, cps2, cps2_2p1b, cps2_state, init_cps2, ROT0, "Mitchell (Capcom license)", "Mighty! Pang (Europe 000925)", MACHINE_SUPPORTS_SAVE ) +GAME( 2000, mpangu, mpang, cps2, cps2_2p1b, cps2_state, init_cps2, ROT0, "Mitchell (Capcom license)", "Mighty! Pang (USA 001010)", MACHINE_SUPPORTS_SAVE ) +GAME( 2000, mpangj, mpang, cps2, cps2_2p1b, cps2_state, init_cps2, ROT0, "Mitchell (Capcom license)", "Mighty! Pang (Japan 001011)", MACHINE_SUPPORTS_SAVE ) +GAME( 2000, mpanga, mpang, cps2, cps2_2p1b, cps2_state, init_cps2, ROT0, "Mitchell (Capcom license)", "Mighty! Pang (Asia 001010)", MACHINE_SUPPORTS_SAVE ) +GAME( 2001, pzloop2, 0, cps2, pzloop2, cps2_state, init_pzloop2, ROT0, "Mitchell (Capcom license)", "Puzz Loop 2 (Europe 010302)", MACHINE_SUPPORTS_SAVE ) +GAME( 2001, pzloop2j, pzloop2, cps2, pzloop2, cps2_state, init_pzloop2, ROT0, "Mitchell (Capcom license)", "Puzz Loop 2 (Japan 010226)", MACHINE_SUPPORTS_SAVE ) +GAME( 2001, pzloop2jr1, pzloop2, cps2, pzloop2, cps2_state, init_pzloop2, ROT0, "Mitchell (Capcom license)", "Puzz Loop 2 (Japan 010205)", MACHINE_SUPPORTS_SAVE ) +GAME( 2001, pzloop2jp, pzloop2, dead_cps2, pzloop2, cps2_state, init_pzloop2, ROT0, "Mitchell (Capcom license)", "Puzz Loop 2 (Japan 010201 Publicity)", MACHINE_SUPPORTS_SAVE ) +GAME( 2001, choko, 0, cps2, choko, cps2_state, init_cps2, ROT0, "Mitchell (Capcom license)", "Janpai Puzzle Choukou (Japan 010820)", MACHINE_SUPPORTS_SAVE ) +GAME( 2001, chokop, choko, dead_cps2, choko, cps2_state, init_cps2, ROT0, "Mitchell (Capcom license)", "Janpai Puzzle Choukou (Japan 010820 Publicity)", MACHINE_SUPPORTS_SAVE ) // Games released on CPS-2 hardware by Eighting/Raizing diff --git a/src/mame/casio/cps2000.cpp b/src/mame/casio/cps2000.cpp index eba186ad19a..df68b1f60a3 100644 --- a/src/mame/casio/cps2000.cpp +++ b/src/mame/casio/cps2000.cpp @@ -312,8 +312,7 @@ void cps2000_state::cps2000(machine_config &config) MSM6200(config, m_kbd, 4.9468_MHz_XTAL); m_kbd->irq_cb().set_inputline(m_maincpu, UPD7810_INTF1); - SPEAKER(config, "lspeaker").front_left(); - SPEAKER(config, "rspeaker").front_right(); + SPEAKER(config, "speaker", 2).front(); // UPD932(config, "upd932a", 4.9468_MHz_XTAL); // UPD932(config, "upd932b", 4.9468_MHz_XTAL); @@ -326,17 +325,17 @@ void cps2000_state::cps2000(machine_config &config) FILTER_RC(config, "bass_rc1").set_lowpass(RES_K(47), CAP_N(47)).add_route(0, "bass_rc2", 1.0); FILTER_RC(config, "bass_rc2").set_lowpass(RES_K(22), CAP_N(47)) - .add_route(0, "lspeaker", 0.25).add_route(0, "rspeaker", 0.25); + .add_route(0, "speaker", 0.25, 0).add_route(0, "speaker", 0.25, 1); UPD934G(config, m_pcm, 4.9468_MHz_XTAL / 4); - m_pcm->add_route(0, "lspeaker", 0.25); - m_pcm->add_route(0, "rspeaker", 0.125); - m_pcm->add_route(1, "lspeaker", 0.25); - m_pcm->add_route(1, "rspeaker", 0.125); - m_pcm->add_route(2, "lspeaker", 0.125); - m_pcm->add_route(2, "rspeaker", 0.25); - m_pcm->add_route(3, "lspeaker", 0.125); - m_pcm->add_route(3, "rspeaker", 0.25); + m_pcm->add_route(0, "speaker", 0.25, 0); + m_pcm->add_route(0, "speaker", 0.125, 1); + m_pcm->add_route(1, "speaker", 0.25, 0); + m_pcm->add_route(1, "speaker", 0.125, 1); + m_pcm->add_route(2, "speaker", 0.125, 0); + m_pcm->add_route(2, "speaker", 0.25, 1); + m_pcm->add_route(3, "speaker", 0.125, 0); + m_pcm->add_route(3, "speaker", 0.25, 1); } /**************************************************************************/ 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/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/igs/igs_m027.cpp b/src/mame/igs/igs_m027.cpp index 45a2f96fba3..1d2297a4c1d 100644 --- a/src/mame/igs/igs_m027.cpp +++ b/src/mame/igs/igs_m027.cpp @@ -725,7 +725,7 @@ INPUT_PORTS_START( jking02 ) PORT_DIPNAME( 0x10, 0x10, "Password" ) PORT_DIPLOCATION("SW2:5") PORT_DIPSETTING( 0x10, DEF_STR(No) ) PORT_DIPSETTING( 0x00, DEF_STR(Yes) ) - PORT_DIPNAME( 0x20, 0x20, "Double-Up Game" ) PORT_DIPLOCATION("SW2:6") + PORT_DIPNAME( 0x20, 0x20, "Double Up Game" ) PORT_DIPLOCATION("SW2:6") PORT_DIPSETTING( 0x20, DEF_STR(Off) ) PORT_DIPSETTING( 0x00, DEF_STR(On) ) PORT_DIPNAME( 0x40, 0x40, "Auto Stop" ) PORT_DIPLOCATION("SW2:7") @@ -1418,10 +1418,10 @@ INPUT_PORTS_START( oceanpar101us ) PORT_DIPNAME( 0x10, 0x10, "Auto Take" ) PORT_DIPLOCATION("SW1:5") PORT_DIPSETTING( 0x10, DEF_STR(No) ) PORT_DIPSETTING( 0x00, DEF_STR(Yes) ) - PORT_DIPNAME( 0x20, 0x20, "Double-Up Game" ) PORT_DIPLOCATION("SW1:6") + PORT_DIPNAME( 0x20, 0x20, "Double Up Game" ) PORT_DIPLOCATION("SW1:6") PORT_DIPSETTING( 0x00, DEF_STR(Off) ) PORT_DIPSETTING( 0x20, DEF_STR(On) ) - PORT_DIPNAME( 0xc0, 0xc0, "Double-Up Game Type" ) PORT_DIPLOCATION("SW1:7,8") + PORT_DIPNAME( 0xc0, 0xc0, "Double Up Game Type" ) PORT_DIPLOCATION("SW1:7,8") PORT_DIPSETTING( 0xc0, "Poker 1" ) PORT_DIPSETTING( 0x80, "Poker 2" ) PORT_DIPSETTING( 0x40, "Symbol" ) diff --git a/src/mame/itech/itech32.cpp b/src/mame/itech/itech32.cpp index ceb01d738a1..ca31776556d 100644 --- a/src/mame/itech/itech32.cpp +++ b/src/mame/itech/itech32.cpp @@ -1867,12 +1867,13 @@ void drivedge_state::drivedge(machine_config &config) m_screen->screen_vblank().set_nop(); // interrupt not used? - SPEAKER(config, "left_back").front_left(); // Sound PCB has hook-ups & AMPs for 5 channels - SPEAKER(config, "right_back").front_right(); // As per Sound Tests Menu: Left Front, Right Front, Left Rear, Right Rear, Under Seat + // Sound PCB has hook-ups & AMPs for 5 channels + // As per Sound Tests Menu: Left Front, Right Front, Left Rear, Right Rear, Under Seat + SPEAKER(config, "back", 2).rear(); m_ensoniq->set_channels(2); - m_ensoniq->add_route(2, "right_back", 0.1); // swapped stereo - m_ensoniq->add_route(3, "left_back", 0.1); + m_ensoniq->add_route(2, "back", 0.1, 1); // swapped stereo + m_ensoniq->add_route(3, "back", 0.1, 0); } void shoottv_state::shoottv(machine_config &config) 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 50e3d6a2d8d..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 @@ -39722,9 +39737,6 @@ st1707 st1708 st1714 -@source:sealy/sealy.cpp -crzyddz - @source:sealy/sealy_8031.cpp jinsanse @@ -39734,6 +39746,18 @@ qczl @source:sealy/sealy_fr.cpp snowbwar +@source:sealy/sealy_m16c.cpp +crzyddz +fdjqb +fkddz +gbsf +sandaha + +@source:sealy/sealy_z80.cpp +bbddz +ddz2 +djddz + @source:sega/angelkds.cpp angelkds spcpostn @@ -42650,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/carrera.cpp b/src/mame/misc/carrera.cpp index 9e2bb3242db..3ad4b5be6d0 100644 --- a/src/mame/misc/carrera.cpp +++ b/src/mame/misc/carrera.cpp @@ -1,56 +1,117 @@ // license:BSD-3-Clause -// copyright-holders: David Haywood - -/* - -This is a simple 'Pairs' game called -Carrera or Bomberman by BS Electronics - - - -PCB Layout ----------- - -|----------------------------------------------| -| 22.1184MHz Z80 | -| ROM.IC1 | -|_ BATTERY ROM.IC22 | - | | - _| 6116 ROM.IC2 | -| | -| | -|J AY-3-8910 ROM.IC3 | -|A DSW1(8) | -|M | -|M DSW2(8) ROM.IC4 | -|A | -| DSW3(8) | -| ROM.IC5 | -|_ PROM.IC39 DSW4(8) | - | 6116 | - _| | -| HD6845 6116 | -|----------------------------------------------| -Notes: - Z80 @ 3.6864MHz [22.1184/6] - AY-3-8910 @ 1.8432MHz [22.1184/12] - - -Emulation Notes: - Corrupt Tile on the first R in Carrera? (unlikely to be a bug, HW is very simple..) - -TODO: -- Are colors 100% correct? Needs a reference to be sure. -- There are reel GFXs on the ROMs (near the end), left-over or there's a way to enable it? - Update: if you trigger a normal irq 0 instead of a NMI the game will change into a proper 8 liner game without inputs. Investigate on it... - Update 2: alantin, bsebmanbl, bsebmanbl2, drkseal start directly with the 8 liner game -- ncarrera has an undumped AT90S8515 MCU (8 bit AVR RISC core) - -*/ +// copyright-holders: David Haywood, Roberto Fresca, Grull Osgo + +/*********************************************************************** + + Carrera / Bomberman + by BS Electronics. + + Video slots stealth games with selectable bomberman or fruits themes. + The front game is normally a "memory" pairs game, where the objetive + is to clear the screen. + + You can change the tileset, the game title (Carrera/Bomberman), and + switch the type of game (amusement/gambling). + + Some sets don't allow the title change. + + + PCB Layout + ---------- + + |----------------------------------------------| + | 22.1184MHz Z80 | + | ROM.IC1 | + |_ BATTERY ROM.IC22 | + | | + _| 6116 ROM.IC2 | + | | + | | + |J AY-3-8910 ROM.IC3 | + |A DSW1(8) | + |M | + |M DSW2(8) ROM.IC4 | + |A | + | DSW3(8) | + | ROM.IC5 | + |_ PROM.IC39 DSW4(8) | + | 6116 | + _| | + | HD6845 6116 | + |----------------------------------------------| + + Notes: + Z80 @ 3.6864MHz [22.1184/6] + AY-3-8910 @ 1.8432MHz [22.1184/12] + + +************************************************************************ + + Technical notes: + ---------------- + + The two first sets (carrera and bsebman) have a "bug" in the title if + the NVRAM was created from zero. This "bug" is intended to see at first + sight if the game NVRAM was manipulated in some way. + + In fact, each boot the code paint the game title properly, and then + force the graphics bug if a special value hardcoded in NVRAM doesn't + match the expected. + + $1da3.......$1dd6 ; loops to paint the title/logo on screen. + + then... + + $1dd7 ld, a ($e300) 3a 00 e3 ; take the hardcoded value from NVRAM. + $1dda ld, ($f616), a 32 16 f6 ; place this value as tile index, + ; halfway the title top line ($f616), + ; creating the intended GFX bug. + + $1ddd ret c9 ; return from subroutine. + + + For other bootleg sets, if the hardcoded value doesn't match, they force + another tile index very close to the original, so is way less notorious + and only the technical trained people can see these minimal differences. + + Note: This behavior is by design and should not be interpreted as a software + defect. It allows operators to instantly identify units with reset or modified + NVRAM and maintains system integrity without preventing gameplay functionality. + + +************************************************************************ + + Updates: + + [2025-05] + + - Fix color bipolar PROM decode and palette calculation, + based on real games screenshots. + - Added NVRAM support for all games. + - Created default NVRAM for carrera and bsebman sets, + with harcoded critical values/registers needed to get + the games working. + - Workaround that fix the titles corruption for both + carrera and bsebman sets. + - Inputs and DIP switches. + - Fix alantin colors, based on the real game screenshots. + - Changed bsebman description to: + Carrera (Version 6.7) / Bomberman (Version 6.6) + - Added technical and game notes. + + + TODO: + + - Analyze the carrera/bomberman sets and rename them accordingly. + - ncarrera has an undumped AT90S8515 MCU (8 bit AVR RISC core) + + +***********************************************************************/ #include "emu.h" #include "cpu/z80/z80.h" +#include "machine/nvram.h" #include "sound/ay8910.h" #include "video/mc6845.h" @@ -88,10 +149,69 @@ private: }; +/************************************************* +* Video Hardware * +*************************************************/ + +uint32_t carrera_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) +{ + int count = 0; + + for (int y = 0; y < 32; y++) + { + for (int x = 0; x < 64; x++) + { + int tile = m_tileram[count & 0x7ff] | m_tileram[(count & 0x7ff) + 0x800] << 8; + + m_gfxdecode->gfx(0)->opaque(bitmap, cliprect, tile, 0, 0, 0, x * 8, y * 8); + count++; + } + } + return 0; +} + +void carrera_state::palette(palette_device &palette) const +{ + uint8_t const *const color_prom = memregion("proms")->base(); + for (int i = 0; i < 0x20; ++i) + { + int bit0, bit1; + int const br_bit0 = BIT(color_prom[i], 6); + int const br_bit1 = BIT(color_prom[i], 7); + + bit0 = BIT(color_prom[i], 0); + bit1 = BIT(color_prom[i], 3); + int const b = 0x0e * br_bit1 + 0x1f * br_bit0 + 0x43 * bit0 + 0x8f * bit1; + bit0 = BIT(color_prom[i], 1); + bit1 = BIT(color_prom[i], 4); + int const g = 0x0e * br_bit1 + 0x1f * br_bit0 + 0x43 * bit0 + 0x8f * bit1; + bit0 = BIT(color_prom[i], 2); + bit1 = BIT(color_prom[i], 5); + int const r = 0x0e * br_bit1 + 0x1f * br_bit0 + 0x43 * bit0 + 0x8f * bit1; + + palette.set_pen_color(i, rgb_t(r, g, b)); + } +} + + +/************************************************* +* Read Write Handlers * +*************************************************/ + +uint8_t carrera_state::unknown_r() +{ + return machine().rand(); +} + + +/************************************************* +* Memory map information * +*************************************************/ + void carrera_state::prg_map(address_map &map) { map(0x0000, 0x7fff).rom(); - map(0xe000, 0xe7ff).ram(); + map(0xe000, 0xe7ff).ram().share("nvram"); map(0xe800, 0xe800).w("crtc", FUNC(mc6845_device::address_w)); map(0xe801, 0xe801).w("crtc", FUNC(mc6845_device::register_w)); map(0xf000, 0xffff).ram().share(m_tileram); @@ -106,48 +226,35 @@ void carrera_state::io_map(address_map &map) map(0x03, 0x03).portr("IN3"); map(0x04, 0x04).portr("IN4"); map(0x05, 0x05).portr("IN5"); - map(0x06, 0x06).nopw(); // ? + map(0x06, 0x06).nopw(); // ? map(0x08, 0x09).w("aysnd", FUNC(ay8910_device::address_data_w)); } + +/************************************************* +* Input ports * +*************************************************/ + static INPUT_PORTS_START( carrera ) PORT_START("IN0") // Port 0 - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) - // unused / unknown inputs, not dips - PORT_DIPNAME( 0x20, 0x20, "0" ) - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Master Reset") - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_NAME("Up - Bet") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_NAME("Down - Start") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Auto Start") // autoplay + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("0-6") PORT_CODE(KEYCODE_Z) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Master Reset") + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_START("IN1") // Port 1 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) - // unused / unknown inputs, not dips - PORT_DIPNAME( 0x04, 0x04, "1" ) - PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1-3") PORT_CODE(KEYCODE_A) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1-4") PORT_CODE(KEYCODE_S) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1-5") PORT_CODE(KEYCODE_D) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1-6") PORT_CODE(KEYCODE_F) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("1-7") PORT_CODE(KEYCODE_G) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Reset") // I suspect the 4 below are the 4xDSWs PORT_START("IN2") // Port 2 @@ -175,7 +282,7 @@ static INPUT_PORTS_START( carrera ) PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - + PORT_START("IN3") // Port 3 PORT_DIPNAME( 0x01, 0x01, "3" ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) @@ -203,58 +310,67 @@ static INPUT_PORTS_START( carrera ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_START("IN4") // Port 4 - PORT_DIPNAME( 0x01, 0x01, "4" ) - PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x07, 0x00, "Coinage B" ) PORT_DIPLOCATION("IN4:6,7,8") + PORT_DIPSETTING( 0x07, "5" ) + PORT_DIPSETTING( 0x00, "10" ) + PORT_DIPSETTING( 0x01, "20" ) + PORT_DIPSETTING( 0x02, "50" ) + PORT_DIPSETTING( 0x03, "100" ) + PORT_DIPSETTING( 0x04, "500" ) + PORT_DIPSETTING( 0x05, "1000" ) + PORT_DIPSETTING( 0x06, "1100" ) + PORT_DIPNAME( 0x08, 0x08, "Game Name" ) PORT_DIPLOCATION("IN4:5") + PORT_DIPSETTING( 0x08, "Bomber Man" ) + PORT_DIPSETTING( 0x00, "Carrera" ) + PORT_DIPNAME( 0x10, 0x10, "Bonus 10%" ) PORT_DIPLOCATION("IN4:4") + PORT_DIPSETTING( 0x10, DEF_STR( No ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) + PORT_DIPNAME( 0x20, 0x20, "Key Out" ) PORT_DIPLOCATION("IN4:3") + PORT_DIPSETTING( 0x00, "10" ) + PORT_DIPSETTING( 0x20, "100" ) + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Difficult ) ) PORT_DIPLOCATION("IN4:2") + PORT_DIPSETTING( 0x40, DEF_STR( Normal ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Easy ) ) + PORT_DIPNAME( 0x80, 0x80, "Max Bet" ) PORT_DIPLOCATION("IN4:1") + PORT_DIPSETTING( 0x80, "9" ) + PORT_DIPSETTING( 0x00, "5" ) PORT_START("IN5") // Port 5 - PORT_DIPNAME( 0x01, 0x01, "5" ) - PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x08, "Playing Graphics" ) + PORT_DIPNAME( 0x07, 0x00, "Coinage A" ) PORT_DIPLOCATION("IN5:1,2,3") + PORT_DIPSETTING( 0x07, "5" ) + PORT_DIPSETTING( 0x00, "10" ) + PORT_DIPSETTING( 0x01, "20" ) + PORT_DIPSETTING( 0x02, "50" ) + PORT_DIPSETTING( 0x03, "100" ) + PORT_DIPSETTING( 0x04, "500" ) + PORT_DIPSETTING( 0x05, "1000" ) + PORT_DIPSETTING( 0x06, "1100" ) + PORT_DIPNAME( 0x08, 0x00, "Playing Graphics" ) PORT_DIPLOCATION("IN5:4") PORT_DIPSETTING( 0x08, "Bricks" ) PORT_DIPSETTING( 0x00, "Fruits" ) - PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) + + PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("IN5:5") PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("IN5:6") PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, "Debug?" ) // displays numbers over the game area + + PORT_DIPNAME( 0x40, 0x40, "Game Mode" ) PORT_DIPLOCATION("IN5:7") + PORT_DIPSETTING( 0x40, "Gamble" ) + PORT_DIPSETTING( 0x00, "Amusement" ) + + // this one displays numbers over the game area + PORT_DIPNAME( 0x80, 0x80, "Debug?" ) PORT_DIPLOCATION("IN5:8") PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) INPUT_PORTS_END + +/************************************************* +* Graphics Layouts * +*************************************************/ + static const gfx_layout tiles8x8_layout = { 8,8, @@ -266,55 +382,19 @@ static const gfx_layout tiles8x8_layout = 8*8 }; + +/************************************************* +* Graphics Decode Information * +*************************************************/ + static GFXDECODE_START( gfx_carrera ) GFXDECODE_ENTRY( "tiles", 0, tiles8x8_layout, 0, 1 ) GFXDECODE_END -uint32_t carrera_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) -{ - int count = 0; - - for (int y = 0; y < 32; y++) - { - for (int x = 0; x < 64; x++) - { - int tile = m_tileram[count & 0x7ff] | m_tileram[(count & 0x7ff) + 0x800] << 8; - - m_gfxdecode->gfx(0)->opaque(bitmap, cliprect, tile, 0, 0, 0, x * 8, y * 8); - count++; - } - } - return 0; -} - -uint8_t carrera_state::unknown_r() -{ - return machine().rand(); -} - -void carrera_state::palette(palette_device &palette) const -{ - uint8_t const *const color_prom = memregion("proms")->base(); - for (int i = 0; i < 0x20; ++i) - { - int bit0, bit1; - int const br_bit0 = BIT(color_prom[i], 6); - int const br_bit1 = BIT(color_prom[i], 7); - - bit0 = BIT(color_prom[i], 0); - bit1 = BIT(color_prom[i], 3); - int const b = 0x0e * br_bit0 + 0x1f * br_bit1 + 0x43 * bit0 + 0x8f * bit1; - bit0 = BIT(color_prom[i], 1); - bit1 = BIT(color_prom[i], 4); - int const g = 0x0e * br_bit0 + 0x1f * br_bit1 + 0x43 * bit0 + 0x8f * bit1; - bit0 = BIT(color_prom[i], 2); - bit1 = BIT(color_prom[i], 5); - int const r = 0x0e * br_bit0 + 0x1f * br_bit1 + 0x43 * bit0 + 0x8f * bit1; - - palette.set_pen_color(i, rgb_t(r, g, b)); - } -} +/************************************************* +* Machine Drivers * +*************************************************/ void carrera_state::carrera(machine_config &config) { @@ -325,10 +405,11 @@ void carrera_state::carrera(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &carrera_state::prg_map); m_maincpu->set_addrmap(AS_IO, &carrera_state::io_map); + NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); + // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(60); - screen.set_vblank_time(ATTOSECONDS_IN_USEC(0)); screen.set_size(512, 256); screen.set_visarea_full(); screen.set_screen_update(FUNC(carrera_state::screen_update)); @@ -353,6 +434,10 @@ void carrera_state::carrera(machine_config &config) } +/************************************************* +* ROM Load * +*************************************************/ + ROM_START( carrera ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "27512.ic22", 0x00000, 0x10000, CRC(2385b9c8) SHA1(12d4397779e074096fbb23b114985f104366b79c) ) @@ -364,6 +449,9 @@ ROM_START( carrera ) ROM_LOAD( "27512.ic4", 0x30000, 0x10000, CRC(97433f36) SHA1(39f3c6b76ad540693682832aba6e4fc400ca3753) ) ROM_LOAD( "27512.ic5", 0x40000, 0x10000, CRC(ffa75920) SHA1(aa5619f5aabcdfa250bb24bcad101a8c512a1776) ) + ROM_REGION( 0x800, "nvram", 0 ) // default NVRAM + ROM_LOAD( "carrera_nvram.bin", 0x0000, 0x0800, CRC(b2ac3ddd) SHA1(22886fba71badbdfa754489057889b5326bbaf78) ) + ROM_REGION( 0x20, "proms", 0 ) ROM_LOAD( "82s123.ic39", 0x00, 0x20, CRC(af16359f) SHA1(1ff5c9d7807e52be09c0ded56fb68a47e41b3fcf) ) ROM_END @@ -379,15 +467,18 @@ ROM_START( bsebman ) ROM_LOAD( "ic4", 0x30000, 0x10000, CRC(6b569989) SHA1(e00263fae310094ad5119e3a9673fb342f643ddc) ) ROM_LOAD( "ic5", 0x40000, 0x10000, CRC(21635791) SHA1(514078694269582c33fb7dddd6171089f9e21ee2) ) + ROM_REGION( 0x800, "nvram", 0 ) // default NVRAM + ROM_LOAD( "carrera_nvram.bin", 0x0000, 0x0800, CRC(b2ac3ddd) SHA1(22886fba71badbdfa754489057889b5326bbaf78) ) + ROM_REGION( 0x20, "proms", 0 ) ROM_LOAD( "am27s19.ic39", 0x00, 0x20, CRC(af16359f) SHA1(1ff5c9d7807e52be09c0ded56fb68a47e41b3fcf) ) ROM_END ROM_START( bsebmanbl ) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "27512.ic22", 0x00000, 0x10000, CRC(7b896b33) SHA1(841d5c7853e18109b74cad44c9f0d91398add146) ) // SLDH + ROM_LOAD( "27512.ic22", 0x00000, 0x10000, CRC(7b896b33) SHA1(841d5c7853e18109b74cad44c9f0d91398add146) ) // SLDH - ROM_REGION( 0x50000, "tiles", 0 ) // still has BS GFX + ROM_REGION( 0x50000, "tiles", 0 ) // still has BS GFX ROM_LOAD( "27512.ic1", 0x00000, 0x10000, CRC(a16e914e) SHA1(09f2271f193a7bffd62ef6e428ecbf9aa1154860) ) ROM_LOAD( "27512.ic2", 0x10000, 0x10000, CRC(147036a5) SHA1(34b4818fe61c5b13220b0a2001987b68b655b2cb) ) ROM_LOAD( "27512.ic3", 0x20000, 0x10000, CRC(920eee0e) SHA1(85e6d5292b751c57c64d17858bd00292356599e3) ) @@ -399,10 +490,10 @@ ROM_START( bsebmanbl ) ROM_END ROM_START( bsebmanbl2 ) - ROM_REGION( 0x10000, "maincpu", 0 ) // has Carrera, Avraam and Ballas strings + ROM_REGION( 0x10000, "maincpu", 0 ) // has Carrera, Avraam and Ballas strings ROM_LOAD( "27512.ic22", 0x00000, 0x10000, CRC(ca2c8962) SHA1(140a217bb0365ec55116ba483208bdf1d820a7af) ) - ROM_REGION( 0x50000, "tiles", 0 ) // hacked J.T. GFX instead of BS + ROM_REGION( 0x50000, "tiles", 0 ) // hacked J.T. GFX instead of BS ROM_LOAD( "27512.ic1", 0x00000, 0x10000, CRC(65ad616a) SHA1(e87d6d187ec5c99628d767a9720dd9d634e39c2d) ) ROM_LOAD( "27512.ic2", 0x10000, 0x10000, CRC(64004dcb) SHA1(f9af56035f00d3d914c8e83e941762cb6153fc16) ) ROM_LOAD( "27512.ic3", 0x20000, 0x10000, CRC(c6e0a838) SHA1(e30d0f28845f331839afc44fb7358be72d2a88cb) ) @@ -415,24 +506,24 @@ ROM_END ROM_START( alantin ) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "alpro.ic22", 0x00000, 0x10000, CRC(1eb97b31) SHA1(7097cf344734a2b553356f9b9fd6453e584a6e3f) ) // 27512 + ROM_LOAD( "alpro.ic22", 0x00000, 0x10000, CRC(1eb97b31) SHA1(7097cf344734a2b553356f9b9fd6453e584a6e3f) ) // 27512 - ROM_REGION( 0x50000, "tiles", 0 ) // still has BS GFX + ROM_REGION( 0x50000, "tiles", 0 ) // still has BS GFX ROM_LOAD( "alantin1.ic1", 0x00000, 0x10000, CRC(feb49cfd) SHA1(696683375c832b4cd6db9eef0edf4919b90c97ef) ) ROM_LOAD( "alantin2.ic2", 0x10000, 0x10000, CRC(e79da4b9) SHA1(a80c5f6431fc755645a0c8cd0cb290669f0cbada) ) ROM_LOAD( "alantin3.ic3", 0x20000, 0x10000, CRC(73d7c748) SHA1(bf688b8f506859ed3c514915676b13cecfec0a81) ) ROM_LOAD( "alantin4.ic4", 0x30000, 0x10000, CRC(6a061afd) SHA1(f6d736bd284e97ab915adb249c371617daa02a36) ) ROM_LOAD( "alantin5.ic5", 0x40000, 0x10000, CRC(35d8fb1b) SHA1(5d7ff8089e16ebb792543eeb9cc682f9f5eba6fe) ) - ROM_REGION( 0x20, "proms", 0 ) - ROM_LOAD( "82s123.ic39", 0x00, 0x20, CRC(5b0e598f) SHA1(99a8e80229d684f2083634ae2d96bf1d4f13677c) ) + ROM_REGION( 0x20, "proms", 0 ) // swapping bytes through a driver init has no palette response. + ROM_LOAD16_WORD_SWAP( "82s123.ic39", 0x00, 0x20, CRC(5b0e598f) SHA1(99a8e80229d684f2083634ae2d96bf1d4f13677c) ) ROM_END ROM_START( drkseal ) - ROM_REGION( 0x10000, "maincpu", 0 ) // still shows Alantin and Avraam strings - ROM_LOAD( "27512.ic22", 0x00000, 0x10000, CRC(8a1732e5) SHA1(191de15d0ccf439991e3c0c258cbfeb79ef19002) ) // 1xxxxxxxxxxxxxxx = 0xFF + ROM_REGION( 0x10000, "maincpu", 0 ) // still shows Alantin and Avraam strings + ROM_LOAD( "27512.ic22", 0x00000, 0x10000, CRC(8a1732e5) SHA1(191de15d0ccf439991e3c0c258cbfeb79ef19002) ) // 1xxxxxxxxxxxxxxx = 0xFF - ROM_REGION( 0x50000, "tiles", 0 ) // shows Vegas copyright + ROM_REGION( 0x50000, "tiles", 0 ) // shows Vegas copyright ROM_LOAD( "27512.ic1", 0x00000, 0x10000, CRC(fd3b6bbc) SHA1(b1fe09772a5d9a07077038244517fc7169266893) ) ROM_LOAD( "27512.ic2", 0x10000, 0x10000, CRC(d3a048e3) SHA1(687d58b84ca5985f51755b09c8a8b2ef68d16399) ) ROM_LOAD( "27512.ic3", 0x20000, 0x10000, CRC(50b8f9ee) SHA1(4f31e36eb54fde40e409f0ac18bf87126174be33) ) @@ -443,16 +534,17 @@ ROM_START( drkseal ) ROM_LOAD( "82s123.ic39", 0x00, 0x20, CRC(03aadf73) SHA1(e5baf8c5e7276eb207357e4cbb694c75e8caab6a) ) ROM_END -// this set uses a newer 'TYPE C-2000' board with a 'Rania Original 2000 Type 8515' riser board (the Z80 and MC6845 have been moved here along with a AT90S8515 MCU) +// this set uses a newer 'TYPE C-2000' board with a 'Rania Original 2000 Type 8515' riser board +// (the Z80 and MC6845 have been moved here along with a AT90S8515 MCU) ROM_START( ncarrera ) - ROM_REGION( 0x10000, "maincpu", 0 ) // has 2001, Mpampis and Avraam strings - ROM_LOAD( "27512.ic22", 0x00000, 0x10000, CRC(3ec2dbca) SHA1(896fbccaf844c1fa5861b176c09e4a3707b3524f) ) // 1xxxxxxxxxxxxxxx = 0xFF + ROM_REGION( 0x10000, "maincpu", 0 ) // has 2001, Mpampis and Avraam strings + ROM_LOAD( "27512.ic22", 0x00000, 0x10000, CRC(3ec2dbca) SHA1(896fbccaf844c1fa5861b176c09e4a3707b3524f) ) // 1xxxxxxxxxxxxxxx = 0xFF ROM_REGION( 0x2200, "mcu", 0 ) ROM_LOAD( "internal_eeprom", 0x0000, 0x0200, NO_DUMP ) ROM_LOAD( "internal_flash", 0x0200, 0x2000, NO_DUMP ) - ROM_REGION( 0x50000, "tiles", 0 ) // has both New Carrera and New Bomberman GFX + ROM_REGION( 0x50000, "tiles", 0 ) // has both New Carrera and New Bomberman GFX ROM_LOAD( "27512.ic1", 0x00000, 0x10000, CRC(dbec54c7) SHA1(ca7e54c198ca8abeffba1b323a514678384c35f9) ) ROM_LOAD( "27512.ic2", 0x10000, 0x10000, CRC(8e8c2b6d) SHA1(001121e0b91d8e0efdc3f5f99c43e1751b4be758) ) ROM_LOAD( "27512.ic3", 0x20000, 0x10000, CRC(ac66cda8) SHA1(65fae21de9f9727c5d8198ff57b27d703a7518fc) ) @@ -466,10 +558,15 @@ ROM_END } // anonymous namespace -GAME( 19??, carrera, 0, carrera, carrera, carrera_state, empty_init, ROT0, "BS Electronics", "Carrera (Version 6.7)", MACHINE_SUPPORTS_SAVE ) -GAME( 19??, bsebman, carrera, carrera, carrera, carrera_state, empty_init, ROT0, "BS Electronics", "Bomberman (Version 6.6)", MACHINE_SUPPORTS_SAVE ) -GAME( 1999, bsebmanbl, carrera, carrera, carrera, carrera_state, empty_init, ROT0, "bootleg (Ballas / Avraam)", "Bomberman (Version 6.6, Avraam bootleg)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs verifying of inputs -GAME( 1999, bsebmanbl2, carrera, carrera, carrera, carrera_state, empty_init, ROT0, "bootleg (J.T.)", "Bomberman (Version 6.6, J.T. bootleg)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs verifying of inputs -GAME( 1999, alantin, 0, carrera, carrera, carrera_state, empty_init, ROT0, "bootleg (Robert / Avraam)", "Alantin - Aladdin's Magic Lamp", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs verifying of inputs -GAME( 1999, drkseal, 0, carrera, carrera, carrera_state, empty_init, ROT0, "bootleg (Vegas)", "Dark Seal (8-liner)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs verifying of inputs -GAME( 2001, ncarrera, 0, carrera, carrera, carrera_state, empty_init, ROT0, "bootleg (J.T.)", "New Carrera - Version 2000", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs MCU dump +/********************************************* +* Game Drivers * +*********************************************/ + +// YEAR NAME PARENT MACHINE INPUT CLASS INIT ROT COMPANY FULLNAME FLAGS +GAME( 19??, carrera, 0, carrera, carrera, carrera_state, empty_init, ROT0, "BS Electronics", "Carrera (Version 6.7)", MACHINE_SUPPORTS_SAVE ) +GAME( 19??, bsebman, carrera, carrera, carrera, carrera_state, empty_init, ROT0, "BS Electronics", "Carrera (Version 6.7) / Bomberman (Version 6.6)", MACHINE_SUPPORTS_SAVE ) +GAME( 1999, bsebmanbl, carrera, carrera, carrera, carrera_state, empty_init, ROT0, "bootleg (Ballas / Avraam)", "Bomberman (Version 6.6, Avraam bootleg)", MACHINE_SUPPORTS_SAVE ) +GAME( 1999, bsebmanbl2, carrera, carrera, carrera, carrera_state, empty_init, ROT0, "bootleg (J.T.)", "Bomberman (Version 6.6, J.T. bootleg)", MACHINE_SUPPORTS_SAVE ) +GAME( 1999, alantin, 0, carrera, carrera, carrera_state, empty_init, ROT0, "bootleg (Robert / Avraam)", "Alantin - Aladdin's Magic Lamp", MACHINE_SUPPORTS_SAVE ) +GAME( 1999, drkseal, 0, carrera, carrera, carrera_state, empty_init, ROT0, "bootleg (Vegas)", "Dark Seal (8-liner)", MACHINE_SUPPORTS_SAVE ) +GAME( 2001, ncarrera, 0, carrera, carrera, carrera_state, empty_init, ROT0, "bootleg (J.T.)", "New Carrera - Version 2000", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // needs MCU dump diff --git a/src/mame/misc/gms.cpp b/src/mame/misc/gms.cpp index c35e44609ca..8d9e7b48137 100644 --- a/src/mame/misc/gms.cpp +++ b/src/mame/misc/gms.cpp @@ -64,20 +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 reset (F3) to enter service mode. +The default assignments for Mahjong I and Payout are identical. This can +cause the games to ignore Payout if they see Mahjong I first (in mahjong +keyboard mode). You can work around this by reassigning Payout. TODO: +- work out how Flip Flop input is read in mahjong games in mahjong keyboard mode - 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 -- keyboard inputs for mahjong games - 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 in baile seems broken (you always win), maybe due to the patches? +- 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 @@ -93,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" @@ -130,7 +133,9 @@ 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) { } @@ -150,6 +155,9 @@ public: void init_sscs() ATTR_COLD; 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; @@ -164,7 +172,10 @@ 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; uint16_t m_reels_toggle = 0; uint16_t m_tilebank = 0; @@ -225,6 +236,25 @@ private: TILE_GET_INFO_MEMBER(get_tile1_info); }; +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 = 0x7f; + for (unsigned i = 0; 5 > i; ++i) + { + if (BIT(select, i)) + result &= m_key[i]->read(); + } + 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(); @@ -286,6 +316,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)); @@ -293,13 +325,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)); } } @@ -457,45 +487,162 @@ void gms_2layers_state::mcu_io(address_map &map) map(0x0ff00, 0x0ffff).rw(FUNC(gms_2layers_state::mcu_io_r), FUNC(gms_2layers_state::mcu_io_w)); } + +#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_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( 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_START("IN2") \ + 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_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_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_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_UNKNOWN ) PORT_CONDITION(dsw_port, dsw_bit, EQUALS, 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") /* 投幣比例 */ \ + PORT_DIPSETTING( 0x0000, DEF_STR(1C_1C) ) \ + PORT_DIPSETTING( 0x0001, DEF_STR(1C_2C) ) \ + PORT_DIPSETTING( 0x0002, DEF_STR(1C_3C) ) \ + PORT_DIPSETTING( 0x0003, DEF_STR(1C_5C) ) \ + PORT_DIPSETTING( 0x0004, "1 Coin/10 Credits" ) \ + PORT_DIPSETTING( 0x0005, "1 Coin/20 Credits" ) \ + PORT_DIPSETTING( 0x0006, "1 Coin/50 Credits" ) \ + PORT_DIPSETTING( 0x0007, "1 Coin/100 Credits" ) \ + PORT_DIPNAME( 0x0018, 0x0000, "Key-In Rate" ) PORT_DIPLOCATION(loc ":4,5") /* 投幣×開分倍率 */ \ + PORT_DIPSETTING( 0x0018, "5" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0000) \ + PORT_DIPSETTING( 0x0000, "10" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0000) \ + PORT_DIPSETTING( 0x0008, "20" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0000) \ + PORT_DIPSETTING( 0x0010, "50" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0000) \ + PORT_DIPSETTING( 0x0018, "10" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0001) \ + PORT_DIPSETTING( 0x0000, "20" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0001) \ + PORT_DIPSETTING( 0x0008, "40" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0001) \ + PORT_DIPSETTING( 0x0010, "100" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0001) \ + PORT_DIPSETTING( 0x0018, "15" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0002) \ + PORT_DIPSETTING( 0x0000, "30" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0002) \ + PORT_DIPSETTING( 0x0008, "60" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0002) \ + PORT_DIPSETTING( 0x0010, "150" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0002) \ + PORT_DIPSETTING( 0x0018, "25" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0003) \ + PORT_DIPSETTING( 0x0000, "50" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0003) \ + PORT_DIPSETTING( 0x0008, "100" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0003) \ + PORT_DIPSETTING( 0x0010, "250" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0003) \ + PORT_DIPSETTING( 0x0018, "50" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0004) \ + PORT_DIPSETTING( 0x0000, "100" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0004) \ + PORT_DIPSETTING( 0x0008, "200" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0004) \ + PORT_DIPSETTING( 0x0010, "500" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0004) \ + PORT_DIPSETTING( 0x0018, "100" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0005) \ + PORT_DIPSETTING( 0x0000, "200" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0005) \ + PORT_DIPSETTING( 0x0008, "400" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0005) \ + PORT_DIPSETTING( 0x0010, "1000" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0005) \ + PORT_DIPSETTING( 0x0018, "250" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0006) \ + PORT_DIPSETTING( 0x0000, "500" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0006) \ + PORT_DIPSETTING( 0x0008, "1000" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0006) \ + PORT_DIPSETTING( 0x0010, "2500" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0006) \ + PORT_DIPSETTING( 0x0018, "500" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0007) \ + PORT_DIPSETTING( 0x0000, "1000" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0007) \ + PORT_DIPSETTING( 0x0008, "2000" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0007) \ + PORT_DIPSETTING( 0x0010, "5000" ) PORT_CONDITION(tag, 0x0007, EQUALS, 0x0007) + + static INPUT_PORTS_START( rbmk ) - PORT_START("IN1") // 16bit - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_SERVICE1 ) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP ) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) - 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_BUTTON1 ) - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON2 ) - 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 ) + GMS_MAHJONG_COMMON("DSW2", 0x0080, 0x0000) - PORT_START("IN2") // 16bit - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_TOGGLE - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_TOGGLE - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN2 ) - 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") // 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_MODIFY("IN2") // 16bit 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%" ) @@ -544,31 +691,17 @@ static INPUT_PORTS_START( rbmk ) PORT_DIPSETTING( 0x8000, "Mahjong" ) PORT_DIPSETTING( 0x0000, "Chess" ) - PORT_START("DSW2") // 16bit, in test mode first 8 are recognized as dsw2, second 8 as dsw5 - PORT_DIPNAME( 0x0007, 0x0000, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DSW2:1,2,3") - PORT_DIPSETTING( 0x0000, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x0001, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x0002, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0003, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0004, "1 Coin/10 Credits" ) - PORT_DIPSETTING( 0x0005, "1 Coin/20 Credits" ) - PORT_DIPSETTING( 0x0006, "1 Coin/50 Credits" ) - PORT_DIPSETTING( 0x0007, "1 Coin/100 Credits" ) - PORT_DIPNAME( 0x0018, 0x0000, "Credits per Note" ) PORT_DIPLOCATION("DSW2:4,5,") - PORT_DIPSETTING( 0x0018, "1 Note/5 Credits" ) - PORT_DIPSETTING( 0x0000, "1 Note/10 Credits" ) - PORT_DIPSETTING( 0x0008, "1 Note/20 Credits" ) - PORT_DIPSETTING( 0x0010, "1 Note/50 Credits" ) + GMS_MAHJONG_COINAGE("DSW2", "DSW2") PORT_DIPNAME( 0x0020, 0x0000, "Show Tiles after Reach" ) PORT_DIPLOCATION("DSW2:6") PORT_DIPSETTING( 0x0020, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) PORT_DIPNAME( 0x0040, 0x0000, "Pay Out Type" ) PORT_DIPLOCATION("DSW2:7") PORT_DIPSETTING( 0x0040, "Credits" ) PORT_DIPSETTING( 0x0000, "Coins" ) - PORT_DIPNAME( 0x0080, 0x0080, "Controls" ) PORT_DIPLOCATION("DSW2:8") // should default to keyboard, but set on joystick since the former isn't emulated yet + PORT_DIPNAME( 0x0080, 0x0080, "Controls" ) PORT_DIPLOCATION("DSW2:8") + PORT_DIPSETTING( 0x0000, "Mahjong" ) PORT_DIPSETTING( 0x0080, DEF_STR( Joystick ) ) - PORT_DIPSETTING( 0x0000, "Keyboard" ) PORT_DIPNAME( 0x0100, 0x0000, DEF_STR( Unused ) ) PORT_DIPLOCATION("DSW5:1") PORT_DIPSETTING( 0x0100, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) @@ -654,69 +787,34 @@ INPUT_PORTS_END static INPUT_PORTS_START( ssanguoj ) - PORT_START("IN1") // 16bit - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_SERVICE1 ) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP ) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) - 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_BUTTON1 ) - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON2 ) - 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 ) + GMS_MAHJONG_COMMON("DSW1", 0x0080, 0x0000) - PORT_START("IN2") // 16bit - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_TOGGLE - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_TOGGLE - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN2 ) - 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") // 16bit + 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( 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. - // TODO: dips - PORT_START("DSW1") // 16bit, in test mode first 8 are recognized as dsw1, second 8 as dsw4. - PORT_DIPNAME( 0x0001, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW1:1") - PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0002, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW1:2") - PORT_DIPSETTING( 0x0002, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0004, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW1:3") - PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0008, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW1:4") - PORT_DIPSETTING( 0x0008, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0010, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW1:5") - PORT_DIPSETTING( 0x0010, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + // TODO: DIPs (apparently no settings display in game) + PORT_START("DSW1") // 16bit, in test mode first 8 are recognized as DSW1, second 8 as DSW4. + GMS_MAHJONG_COINAGE("DSW1", "DSW1") PORT_DIPNAME( 0x0020, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW1:6") PORT_DIPSETTING( 0x0020, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) PORT_DIPNAME( 0x0040, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW1:7") PORT_DIPSETTING( 0x0040, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0080, 0x0080, "Controls" ) PORT_DIPLOCATION("DSW1:8") // should default to keyboard, but set on joystick since the former isn't emulated yet - PORT_DIPSETTING( 0x0080, DEF_STR( Joystick ) ) - PORT_DIPSETTING( 0x0000, "Keyboard" ) + PORT_DIPNAME( 0x0080, 0x0000, "Controls" ) PORT_DIPLOCATION("DSW1:8") + PORT_DIPSETTING( 0x0000, "Mahjong" ) + PORT_DIPSETTING( 0x0080, DEF_STR(Joystick) ) PORT_DIPNAME( 0x0100, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW4:1") PORT_DIPSETTING( 0x0100, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) @@ -742,11 +840,10 @@ static INPUT_PORTS_START( ssanguoj ) PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - - PORT_START("DSW2") // 16bit, in test mode first 8 are recognized as dsw2, second 8 as dsw5 - PORT_DIPNAME( 0x0001, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW2:1") - PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_START("DSW2") // 16bit, in test mode first 8 are recognized as DSW2, second 8 as DSW5 + PORT_DIPNAME( 0x0001, 0x0000, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("DSW2:1") + PORT_DIPSETTING( 0x0001, DEF_STR(Off) ) + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) PORT_DIPNAME( 0x0002, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW2:2") PORT_DIPSETTING( 0x0002, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) @@ -765,9 +862,9 @@ static INPUT_PORTS_START( ssanguoj ) PORT_DIPNAME( 0x0040, 0x0000, DEF_STR( Version ) ) PORT_DIPLOCATION("DSW2:7") PORT_DIPSETTING( 0x0040, "8.9" ) PORT_DIPSETTING( 0x0000, "8.9-" ) - PORT_DIPNAME( 0x0080, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW2:8") - PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0080, 0x0000, "Score Display Mode" ) PORT_DIPLOCATION("DSW2:8") // sets how points, credits, bets, etc. are displayed + PORT_DIPSETTING( 0x0080, "Numbers" ) // Arabic numerals + PORT_DIPSETTING( 0x0000, "Circle Tiles" ) // tong mahjong tiles representing digits PORT_DIPNAME( 0x0100, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW5:1") PORT_DIPSETTING( 0x0100, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) @@ -793,7 +890,7 @@ static INPUT_PORTS_START( ssanguoj ) PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_START("DSW3") // 16bit, in test mode first 8 are recognized as dsw3, second 8 as dsw6 + PORT_START("DSW3") // 16bit, in test mode first 8 are recognized as DSW3, second 8 as DSW6 PORT_DIPNAME( 0x0001, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW3:1") PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) @@ -803,9 +900,9 @@ static INPUT_PORTS_START( ssanguoj ) PORT_DIPNAME( 0x0004, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW3:3") PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0008, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW3:4") - PORT_DIPSETTING( 0x0008, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0008, 0x0000, "Odds Rate" ) PORT_DIPLOCATION("DSW3:4") + PORT_DIPSETTING( 0x0000, DEF_STR(Low) ) // 1 1 1 1 10 10 / 10 10 10 10 10 10) + PORT_DIPSETTING( 0x0008, DEF_STR(High) ) // 2 2 3 3 20 60 / 20 30 30 40 40 40) PORT_DIPNAME( 0x0010, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW3:5") PORT_DIPSETTING( 0x0010, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) @@ -846,6 +943,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 ) @@ -964,6 +1068,13 @@ 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) @@ -1087,69 +1198,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 ) - - 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 ) + // 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_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("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("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("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" ) @@ -1160,55 +1271,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) @@ -1266,127 +1414,160 @@ static INPUT_PORTS_START( sc2in1 ) INPUT_PORTS_END static INPUT_PORTS_START( jinpaish ) - PORT_INCLUDE( sc2in1 ) - - 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 ) + // 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") + 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 ) - - 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 ) + // 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") + 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_BUTTON2 ) 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_BUTTON1 ) PORT_NAME("Bet on Player / Big") PORT_CONDITION("DSW1", 0x80, NOTEQUALS, 0x80) + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Bet on Banker / Small") PORT_CONDITION("DSW1", 0x80, NOTEQUALS, 0x80) + PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Bet Multiplier") PORT_CONDITION("DSW1", 0x80, NOTEQUALS, 0x80) + PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON5 ) 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 static INPUT_PORTS_START( yyhm ) - PORT_INCLUDE( sc2in1 ) + GMS_MAHJONG_COMMON("DSW1", 0x0080, 0x0080) - 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_UNKNOWN ) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) - 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_BUTTON1 ) - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON2 ) // also used to select in test mode - 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 ) + PORT_MODIFY("IN1") + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0000) + PORT_BIT( 0xf800, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW1", 0x0080, EQUALS, 0x0000) - // Only 1 8-DIP bank on PCB. Dips' effects as per test mode. - PORT_MODIFY("DSW1") - PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Test ) ) PORT_DIPLOCATION("SW1:1") - PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0002, 0x0002, "Voice Announcements" ) PORT_DIPLOCATION("SW1:2") - PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0002, DEF_STR( On ) ) - PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:3") - PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0004, DEF_STR( On ) ) - PORT_DIPNAME( 0x0008, 0x0008, "Scoring Type" ) PORT_DIPLOCATION("SW1:4") - PORT_DIPSETTING( 0x0000, "Mahjong Tile Scoring" ) - PORT_DIPSETTING( 0x0008, "Numeric Scoring" ) + PORT_MODIFY("IN2") + 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. + PORT_START("DSW1") + PORT_DIPNAME( 0x0001, 0x0001, DEF_STR(Service_Mode) ) PORT_DIPLOCATION("SW1:1") // 遊戲設定 + PORT_DIPSETTING( 0x0001, DEF_STR(Off) ) // 正常 + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) // 開機進入 + PORT_DIPNAME( 0x0002, 0x0002, "Gal Voice" ) PORT_DIPLOCATION("SW1:2") // 語音報牌 + PORT_DIPSETTING( 0x0000, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x0002, DEF_STR(On) ) // 有 (calls discarded tiles) + PORT_DIPNAME( 0x0004, 0x0004, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("SW1:3") // 示範音樂 + PORT_DIPSETTING( 0x0000, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x0004, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x0008, 0x0008, "Score Display" ) PORT_DIPLOCATION("SW1:4") // 計分方式 + PORT_DIPSETTING( 0x0008, "Numbers" ) // 數字計分 + PORT_DIPSETTING( 0x0000, "Circle Tiles" ) // 筒子計分 PORT_DIPUNUSED_DIPLOC( 0x0010, 0x0010, "SW1:5") // No effect listed in test mode PORT_DIPUNUSED_DIPLOC( 0x0020, 0x0020, "SW1:6") // " PORT_DIPUNUSED_DIPLOC( 0x0040, 0x0040, "SW1:7") // " - PORT_DIPNAME( 0x0080, 0x0000, "Connector" ) PORT_DIPLOCATION("SW1:8") - PORT_DIPSETTING( 0x0000, "Joystick" ) - PORT_DIPSETTING( 0x0080, "Mahjong" ) + PORT_DIPNAME( 0x0080, 0x0080, DEF_STR(Controls) ) PORT_DIPLOCATION("SW1:8") // 操作方式 + PORT_DIPSETTING( 0x0080, "Mahjong" ) // 鍵盤 + PORT_DIPSETTING( 0x0000, DEF_STR(Joystick) ) // 搖桿 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) @@ -1504,6 +1685,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) @@ -1624,6 +1812,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 ) @@ -1718,193 +1913,134 @@ static INPUT_PORTS_START( sball2k1 ) // default password for accessing game sett PORT_DIPUNKNOWN_DIPLOC( 0x0080, 0x0080, "SW3:8" ) INPUT_PORTS_END -static INPUT_PORTS_START( cjdlz ) // TODO - PORT_START("IN1") // 16bit - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_SERVICE1 ) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP ) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN ) - 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_BUTTON1 ) - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON2 ) - 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 ) +static INPUT_PORTS_START( cjdlz ) + GMS_MAHJONG_COMMON("DSW2", 0x0080, 0x0000) - PORT_START("IN2") // 16bit - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_TOGGLE - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) PORT_TOGGLE - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN2 ) - 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") // 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_MODIFY("IN2") // 16bit 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, but test mode reads all 6. - // TODO: dips - 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, "72" ) - PORT_DIPSETTING( 0x0001, "75" ) - PORT_DIPSETTING( 0x0002, "78" ) - PORT_DIPSETTING( 0x0003, "80" ) - PORT_DIPSETTING( 0x0004, "82" ) - PORT_DIPSETTING( 0x0005, "85" ) - PORT_DIPSETTING( 0x0006, "88" ) - PORT_DIPSETTING( 0x0007, "90" ) - PORT_DIPNAME( 0x0008, 0x0000, "Odd Rate" ) PORT_DIPLOCATION("DSW1:4") - PORT_DIPSETTING( 0x0008, DEF_STR( High ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( Low ) ) - PORT_DIPNAME( 0x0010, 0x0000, "Double Up Direct" ) PORT_DIPLOCATION("DSW1:5") - PORT_DIPSETTING( 0x0010, DEF_STR( No ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( Yes ) ) - PORT_DIPNAME( 0x0020, 0x0000, "Double Up" ) PORT_DIPLOCATION("DSW1:6") - PORT_DIPSETTING( 0x0020, DEF_STR( No ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( Yes ) ) - PORT_DIPNAME( 0x00c0, 0x0000, "Double Up Rate" ) PORT_DIPLOCATION("DSW1:7,8") - PORT_DIPSETTING( 0x0000, "70" ) - PORT_DIPSETTING( 0x0040, "75" ) - PORT_DIPSETTING( 0x0080, "80" ) - PORT_DIPSETTING( 0x00c0, "85" ) - PORT_DIPNAME( 0x0100, 0x0000, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("DSW4:1") - PORT_DIPSETTING( 0x0100, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0e00, 0x0000, "Break Max" ) PORT_DIPLOCATION("DSW4:2,3,4") - PORT_DIPSETTING( 0x0000, "1000" ) - PORT_DIPSETTING( 0x0200, "2000" ) - PORT_DIPSETTING( 0x0400, "3000" ) - PORT_DIPSETTING( 0x0600, "5000" ) - PORT_DIPSETTING( 0x0800, "10000" ) - PORT_DIPSETTING( 0x0a00, "20000" ) - PORT_DIPSETTING( 0x0c00, "30000" ) - PORT_DIPSETTING( 0x0e00, "50000" ) - PORT_DIPNAME( 0x3000, 0x0000, "Credits Max" ) PORT_DIPLOCATION("DSW4:5,6") + PORT_START("DSW1") // 16bit, in test mode first 8 are recognized as DSW1, second 8 as DSW4. + PORT_DIPNAME( 0x0007, 0x0000, "Payout Rate" ) PORT_DIPLOCATION("DSW1:1,2,3") // 出牌率 + PORT_DIPSETTING( 0x0000, "72%" ) + PORT_DIPSETTING( 0x0001, "75%" ) + PORT_DIPSETTING( 0x0002, "78%" ) + PORT_DIPSETTING( 0x0003, "80%" ) + PORT_DIPSETTING( 0x0004, "82%" ) + PORT_DIPSETTING( 0x0005, "85%" ) + PORT_DIPSETTING( 0x0006, "88%" ) + PORT_DIPSETTING( 0x0007, "90%" ) + PORT_DIPNAME( 0x0008, 0x0000, "Odds Rate" ) PORT_DIPLOCATION("DSW1:4") // 役牌倍率 + PORT_DIPSETTING( 0x0000, DEF_STR(Low) ) // 低倍率 (1 2 3 3 5 20 / 5 8 10 10 10 10) + PORT_DIPSETTING( 0x0008, DEF_STR(High) ) // 高倍率 (2 3 5 5 10 50 / 10 20 30 40 40 40) + PORT_DIPNAME( 0x0010, 0x0000, "Direct Double Up" ) PORT_DIPLOCATION("DSW1:5") // 直接比倍 + PORT_DIPSETTING( 0x0000, DEF_STR(No) ) // 無 + PORT_DIPSETTING( 0x0010, DEF_STR(Yes) ) // 有 + PORT_DIPNAME( 0x0020, 0x0000, "Double Up Game" ) PORT_DIPLOCATION("DSW1:6") // 比倍有無 + PORT_DIPSETTING( 0x0020, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x00c0, 0x0000, "Double Up Game Payout Rate" ) PORT_DIPLOCATION("DSW1:7,8") // 比倍機率 + PORT_DIPSETTING( 0x0000, "70%" ) + PORT_DIPSETTING( 0x0040, "75%" ) + PORT_DIPSETTING( 0x0080, "80%" ) + PORT_DIPSETTING( 0x00c0, "85%" ) + PORT_DIPNAME( 0x0100, 0x0000, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("DSW4:1") // 示範音樂 + PORT_DIPSETTING( 0x0100, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x0e00, 0x0000, "Score Limit" ) PORT_DIPLOCATION("DSW4:2,3,4") // 破台限制 (presumably limits winnings) + PORT_DIPSETTING( 0x0000, "1,000" ) + PORT_DIPSETTING( 0x0200, "2,000" ) + PORT_DIPSETTING( 0x0400, "3,000" ) + PORT_DIPSETTING( 0x0600, "5,000" ) + PORT_DIPSETTING( 0x0800, "10,000" ) + PORT_DIPSETTING( 0x0a00, "20,000" ) + PORT_DIPSETTING( 0x0c00, "30,000" ) + PORT_DIPSETTING( 0x0e00, "50,000" ) + PORT_DIPNAME( 0x3000, 0x0000, "Credit Limit" ) PORT_DIPLOCATION("DSW4:5,6") // 進分上限 (presumably limits credits purchased) PORT_DIPSETTING( 0x0000, "500" ) PORT_DIPSETTING( 0x1000, "1000" ) PORT_DIPSETTING( 0x2000, "2000" ) PORT_DIPSETTING( 0x3000, "5000" ) - PORT_DIPNAME( 0x4000, 0x0000, "Golden Rush" ) PORT_DIPLOCATION("DSW4:7") - PORT_DIPSETTING( 0x4000, "Less" ) - PORT_DIPSETTING( 0x0000, "More" ) - PORT_DIPNAME( 0x8000, 0x0000, "Number Type" ) PORT_DIPLOCATION("DSW4:8") - PORT_DIPSETTING( 0x8000, "Dice" ) - PORT_DIPSETTING( 0x0000, "Number" ) - - - PORT_START("DSW2") // 16bit, in test mode first 8 are recognized as dsw2, second 8 as dsw5 - PORT_DIPNAME( 0x0007, 0x0000, DEF_STR( Coinage ) ) PORT_DIPLOCATION("DSW2:1,2,3") - PORT_DIPSETTING( 0x0000, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x0001, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x0002, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0003, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x0004, "1 Coin/10 Credits" ) - PORT_DIPSETTING( 0x0005, "1 Coin/20 Credits" ) - PORT_DIPSETTING( 0x0006, "1 Coin/50 Credits" ) - PORT_DIPSETTING( 0x0007, "1 Coin/100 Credits" ) - PORT_DIPNAME( 0x0018, 0x0000, "Credits per Note" ) PORT_DIPLOCATION("DSW2:4,5,") - PORT_DIPSETTING( 0x0018, "1 Note/5 Credits" ) - PORT_DIPSETTING( 0x0000, "1 Note/10 Credits" ) - PORT_DIPSETTING( 0x0008, "1 Note/20 Credits" ) - PORT_DIPSETTING( 0x0010, "1 Note/50 Credits" ) - PORT_DIPNAME( 0x0020, 0x0000, "Show Credits" ) PORT_DIPLOCATION("DSW2:6") - PORT_DIPSETTING( 0x0020, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0040, 0x0000, "Pay Out Type" ) PORT_DIPLOCATION("DSW2:7") - PORT_DIPSETTING( 0x0040, "Credits" ) - PORT_DIPSETTING( 0x0000, "Coins" ) - PORT_DIPNAME( 0x0080, 0x0080, "Controls" ) PORT_DIPLOCATION("DSW2:8") // should default to keyboard, but set on joystick since the former isn't emulated yet - PORT_DIPSETTING( 0x0080, DEF_STR( Joystick ) ) - PORT_DIPSETTING( 0x0000, "Keyboard" ) - PORT_DIPNAME( 0x0100, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW5:1") - PORT_DIPSETTING( 0x0100, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0200, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW5:2") - PORT_DIPSETTING( 0x0200, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0400, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW5:3") - PORT_DIPSETTING( 0x0400, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0800, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW5:4") - PORT_DIPSETTING( 0x0800, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x1000, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW5:5") - PORT_DIPSETTING( 0x1000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x2000, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW5:6") - PORT_DIPSETTING( 0x2000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x4000, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW5:7") - PORT_DIPSETTING( 0x4000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x8000, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW5:8") - PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - - PORT_START("DSW3") // 16bit, in test mode first 8 are recognized as dsw3, second 8 as dsw6 - PORT_DIPNAME( 0x0003, 0x0000, "Min Bet" ) PORT_DIPLOCATION("DSW3:1,2") + PORT_DIPNAME( 0x4000, 0x0000, "Dapai Frequency" ) PORT_DIPLOCATION("DSW4:7") // 大牌出現 + PORT_DIPSETTING( 0x4000, DEF_STR(Low) ) // 少 + PORT_DIPSETTING( 0x0000, DEF_STR(High) ) // 多 + PORT_DIPNAME( 0x8000, 0x0000, "Score Display Mode" ) PORT_DIPLOCATION("DSW4:8") // 計分方式 (sets how points, credits, bets, etc. are displayed) + PORT_DIPSETTING( 0x0000, "Numbers" ) // 數字計分 (Arabic numerals) + PORT_DIPSETTING( 0x8000, "Circle Tiles" ) // 筒子計分 (tong mahjong tiles representing digits) + + PORT_START("DSW2") // 16bit, in test mode first 8 are recognized as DSW2, second 8 as DSW5 + GMS_MAHJONG_COINAGE("DSW2", "DSW2") + PORT_DIPNAME( 0x0020, 0x0000, "Hide Credits" ) PORT_DIPLOCATION("DSW2:6") // 遊戲分數 + PORT_DIPSETTING( 0x0000, DEF_STR(Off) ) // 顯示 + PORT_DIPSETTING( 0x0020, DEF_STR(On) ) // 不顯示 + PORT_DIPNAME( 0x0040, 0x0000, "Payout Mode" ) PORT_DIPLOCATION("DSW2:7") // 退幣退票方式 + PORT_DIPSETTING( 0x0000, "Return Coins" ) // 以投幣計 + PORT_DIPSETTING( 0x0040, "Key-Out" ) // 以開分計 + PORT_DIPNAME( 0x0080, 0x0000, DEF_STR(Controls) ) PORT_DIPLOCATION("DSW2:8") // 操作方式 + PORT_DIPSETTING( 0x0000, "Mahjong" ) // 鍵盤 + PORT_DIPSETTING( 0x0080, DEF_STR(Joystick) ) // 搖桿 + PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) // DSW5 shown in input test but not physically present + //PORT_DIPUNUSED_DIPLOC( 0x0100, 0x0000, "DSW5:1") + //PORT_DIPUNUSED_DIPLOC( 0x0200, 0x0000, "DSW5:2") + //PORT_DIPUNUSED_DIPLOC( 0x0400, 0x0000, "DSW5:3") + //PORT_DIPUNUSED_DIPLOC( 0x0800, 0x0000, "DSW5:4") + //PORT_DIPUNUSED_DIPLOC( 0x1000, 0x0000, "DSW5:5") + //PORT_DIPUNUSED_DIPLOC( 0x2000, 0x0000, "DSW5:6") + //PORT_DIPUNUSED_DIPLOC( 0x4000, 0x0000, "DSW5:7") + //PORT_DIPUNUSED_DIPLOC( 0x8000, 0x0000, "DSW5:8") + + PORT_START("DSW3") // 16bit, in test mode first 8 are recognized as DSW3, second 8 as DSW6 + PORT_DIPNAME( 0x0003, 0x0000, "Minimum Bet" ) PORT_DIPLOCATION("DSW3:1,2") // 最小押分 PORT_DIPSETTING( 0x0000, "1" ) PORT_DIPSETTING( 0x0001, "2" ) PORT_DIPSETTING( 0x0002, "5" ) PORT_DIPSETTING( 0x0003, "10" ) - PORT_DIPNAME( 0x000c, 0x0000, "Max Bet" ) PORT_DIPLOCATION("DSW3:3,4") + PORT_DIPNAME( 0x000c, 0x0000, "Maximum Bet" ) PORT_DIPLOCATION("DSW3:3,4") // 最大押分 PORT_DIPSETTING( 0x0000, "10" ) PORT_DIPSETTING( 0x0004, "20" ) PORT_DIPSETTING( 0x0008, "30" ) PORT_DIPSETTING( 0x000c, "50" ) - PORT_DIPNAME( 0x0010, 0x0000, "Main Credits Game" ) PORT_DIPLOCATION("DSW3:5") - PORT_DIPSETTING( 0x0010, "Introduction" ) - PORT_DIPSETTING( 0x0000, "Lucky Door" ) - PORT_DIPNAME( 0x0020, 0x0000, "Insert Coin Continue" ) PORT_DIPLOCATION("DSW3:6") - PORT_DIPSETTING( 0x0000, "30 Seconds" ) - PORT_DIPSETTING( 0x0020, "Unlimited" ) - PORT_DIPNAME( 0x0040, 0x0000, "Introduction" ) PORT_DIPLOCATION("DSW3:7") + PORT_DIPNAME( 0x0010, 0x0000, "Main Credits Game" ) PORT_DIPLOCATION("DSW3:5") // 餘分遊戲 + PORT_DIPSETTING( 0x0010, "Introduction" ) // 入門篇 + PORT_DIPSETTING( 0x0000, "Lucky Door" ) // 幸運門 + PORT_DIPNAME( 0x0020, 0x0000, "Credit Timer" ) PORT_DIPLOCATION("DSW3:6") // 等待投幣時間 + PORT_DIPSETTING( 0x0020, DEF_STR(Off) ) // 無限 + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) // 30 + PORT_DIPNAME( 0x0040, 0x0000, "Introduction" ) PORT_DIPLOCATION("DSW3:7") // 入門篇 PORT_DIPSETTING( 0x0040, "1" ) PORT_DIPSETTING( 0x0000, "2" ) - PORT_DIPNAME( 0x0080, 0x0000, "Tiles Sound" ) PORT_DIPLOCATION("DSW3:8") - PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0100, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW6:1") - PORT_DIPSETTING( 0x0100, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0200, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW6:2") - PORT_DIPSETTING( 0x0200, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0400, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW6:3") - PORT_DIPSETTING( 0x0400, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x0800, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW6:4") - PORT_DIPSETTING( 0x0800, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x1000, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW6:5") - PORT_DIPSETTING( 0x1000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x2000, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW6:6") - PORT_DIPSETTING( 0x2000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x4000, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW6:7") - PORT_DIPSETTING( 0x4000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) - PORT_DIPNAME( 0x8000, 0x0000, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW6:8") - PORT_DIPSETTING( 0x8000, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0080, 0x0000, "Gal Voice" ) PORT_DIPLOCATION("DSW3:8") // 語音報牌 + PORT_DIPSETTING( 0x0080, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x0000, DEF_STR(On) ) // 有 (calls discarded tiles) + PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED ) // DSW6 shown in input test but not physically present + //PORT_DIPUNUSED_DIPLOC( 0x0100, 0x0000, "DSW6:1") + //PORT_DIPUNUSED_DIPLOC( 0x0200, 0x0000, "DSW6:2") + //PORT_DIPUNUSED_DIPLOC( 0x0400, 0x0000, "DSW6:3") + //PORT_DIPUNUSED_DIPLOC( 0x0800, 0x0000, "DSW6:4") + //PORT_DIPUNUSED_DIPLOC( 0x1000, 0x0000, "DSW6:5") + //PORT_DIPUNUSED_DIPLOC( 0x2000, 0x0000, "DSW6:6") + //PORT_DIPUNUSED_DIPLOC( 0x4000, 0x0000, "DSW6:7") + //PORT_DIPUNUSED_DIPLOC( 0x8000, 0x0000, "DSW6:8") 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) @@ -2274,6 +2410,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 @@ -2304,13 +2442,13 @@ void gms_2layers_state::ssanguoj(machine_config &config) config.device_remove("ymsnd"); ym3812_device &ym(YM3812(config, "ym3812", 22_MHz_XTAL / 8)); - ym.add_route(0, "speaker", 0.60, 0); - ym.add_route(1, "speaker", 0.60, 1); + ym.add_route(ALL_OUTPUTS, "speaker", 0.60); } void gms_2layers_state::super555(machine_config &config) { rbmk(config); + m_maincpu->set_addrmap(AS_PROGRAM, &gms_2layers_state::super555_mem); config.device_remove("mcu"); @@ -2320,6 +2458,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); @@ -2707,7 +2846,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 --------------------- @@ -2806,8 +2945,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() { @@ -3003,6 +3142,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/misc/xtom3d.cpp b/src/mame/misc/xtom3d.cpp index d714f134d9b..e479ac7a535 100644 --- a/src/mame/misc/xtom3d.cpp +++ b/src/mame/misc/xtom3d.cpp @@ -661,8 +661,8 @@ void xtom3d_state::romdisk_config(device_t *device) void xtom3d_state::piu10_config(device_t *device) { isa16_piu10 &piu10 = *downcast<isa16_piu10 *>(device); - piu10.add_route(0, ":lmicrophone", 0.25); - piu10.add_route(1, ":rmicrophone", 0.25); + piu10.add_route(0, ":microphone", 0.25, 0); + piu10.add_route(1, ":microphone", 0.25, 1); } // TODO: unverified PCI config space @@ -728,16 +728,15 @@ void xtom3d_state::xtom3d(machine_config &config) // TODO: stub for drive options (speed/drive type etc.) static void cdrom_config(device_t *device) { - device->subdevice<cdda_device>("cdda")->add_route(0, ":lmicrophone", 0.25); - device->subdevice<cdda_device>("cdda")->add_route(1, ":rmicrophone", 0.25); + device->subdevice<cdda_device>("cdda")->add_route(0, ":microphone", 0.25, 0); + device->subdevice<cdda_device>("cdda")->add_route(1, ":microphone", 0.25, 1); } void xtom3d_state::pumpitup(machine_config &config) { xtom3d(config); - SPEAKER(config, "lmicrophone").front_left(); - SPEAKER(config, "rmicrophone").front_right(); + SPEAKER(config, "microphone", 2).front(); m_pci_ide->subdevice<bus_master_ide_controller_device>("ide1")->slot(0).set_default_option("cdrom"); m_pci_ide->subdevice<bus_master_ide_controller_device>("ide1")->slot(0).set_option_machine_config("cdrom", cdrom_config); 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/nec/pc9801.cpp b/src/mame/nec/pc9801.cpp index c9e7bcb0211..641d6426563 100644 --- a/src/mame/nec/pc9801.cpp +++ b/src/mame/nec/pc9801.cpp @@ -2343,14 +2343,13 @@ void pc9801_state::pc9801_sasi(machine_config &config) void pc9801vm_state::cdrom_headphones(device_t *device) { cdda_device *cdda = device->subdevice<cdda_device>("cdda"); - cdda->add_route(0, "^^lheadphone", 1.0); - cdda->add_route(1, "^^rheadphone", 1.0); + cdda->add_route(0, "^^headphone", 1.0, 0); + cdda->add_route(1, "^^headphone", 1.0, 1); } void pc9801vm_state::pc9801_ide(machine_config &config) { - SPEAKER(config, "lheadphone").front_left(); - SPEAKER(config, "rheadphone").front_right(); + SPEAKER(config, "headphone", 2).front(); ATA_INTERFACE(config, m_ide[0]).options(ata_devices, "hdd", nullptr, false); m_ide[0]->irq_handler().set("ideirq", FUNC(input_merger_device::in_w<0>)); ATA_INTERFACE(config, m_ide[1]).options(pc9801_atapi_devices, "pc98_cd", nullptr, false); diff --git a/src/mame/phoenix/phoenix.cpp b/src/mame/phoenix/phoenix.cpp index b169b73c689..63e62fec3dc 100644 --- a/src/mame/phoenix/phoenix.cpp +++ b/src/mame/phoenix/phoenix.cpp @@ -1349,17 +1349,16 @@ ROM_START( nextfase ) ROM_LOAD( "7910cg", 0x000, 0x800, NO_DUMP ) // actual size unknown, needs decapping ROM_REGION( 0x1000, "bgtiles", 0 ) - ROM_LOAD( "nf11.bin", 0x0000, 0x0800, CRC(3c7e623f) SHA1(e7ff5fc371664af44785c079e92eeb2d8530187b) ) - ROM_LOAD( "nf12.bin", 0x0800, 0x0800, CRC(59916d3b) SHA1(71aec70a8e096ed1f0c2297b3ae7dca1b8ecc38d) ) + ROM_LOAD( "nf11.bin", 0x0000, 0x0800, CRC(3c7e623f) SHA1(e7ff5fc371664af44785c079e92eeb2d8530187b) ) + ROM_LOAD( "nf12.bin", 0x0800, 0x0800, CRC(59916d3b) SHA1(71aec70a8e096ed1f0c2297b3ae7dca1b8ecc38d) ) ROM_REGION( 0x1000, "fgtiles", 0 ) ROM_LOAD( "nf09.bin", 0x0000, 0x0800, CRC(bacbfa88) SHA1(bf378a729726db01448f2cc4820f06e17659d674) ) ROM_LOAD( "nf10.bin", 0x0800, 0x0800, CRC(3143a9ee) SHA1(371bb314dc9e4ec6ed469eb81391061296c547ec) ) - // PROMs were missing from this dump, these might not be correct ROM_REGION( 0x0200, "proms", 0 ) - ROM_LOAD( "mmi6301.ic40", 0x0000, 0x0100, CRC(79350b25) SHA1(57411be4c1d89677f7919ae295446da90612c8a8) ) // palette low bits - ROM_LOAD( "mmi6301.ic41", 0x0100, 0x0100, CRC(e176b768) SHA1(e2184dd495ed579f10b6da0b78379e02d7a6229f) ) // palette high bits + ROM_LOAD( "nf.ic40", 0x0000, 0x0100, CRC(725747be) SHA1(c8a4cc47149230ac859c19a24d2860d7d58885f2) ) // palette low bits + ROM_LOAD( "nf.ic41", 0x0100, 0x0100, CRC(a91055ab) SHA1(14273bde9e05b7e2e14e77cac400ffda0ce7e71f) ) // palette high bits ROM_END ROM_START( phoenixs ) diff --git a/src/mame/pinball/macp.cpp b/src/mame/pinball/macp.cpp index 9ae7e1ae167..3805fa57246 100644 --- a/src/mame/pinball/macp.cpp +++ b/src/mame/pinball/macp.cpp @@ -363,20 +363,20 @@ void macp_state::mac16k(machine_config &config) genpin_audio(config); //2x AY8910 - SPEAKER(config, "lspkr").front_left(); + SPEAKER(config, "speaker", 2).front(); + AY8910(config, m_ay8910[0], 3'800'000/2); m_ay8910[0]->set_resistors_load(10e3,10e3,10e3); m_ay8910[0]->port_a_write_callback().set(FUNC(macp_state::ay0_a_w)); m_ay8910[0]->port_b_write_callback().set(FUNC(macp_state::ay0_b_w)); - m_ay8910[0]->add_route(ALL_OUTPUTS, "lspkr", 0.50); + m_ay8910[0]->add_route(ALL_OUTPUTS, "speaker", 0.50, 0); - SPEAKER(config, "rspkr").front_right(); AY8910(config, m_ay8910[1], 3'800'000/2); m_ay8910[1]->set_resistors_load(10e3,10e3,10e3); m_ay8910[1]->port_a_write_callback().set(FUNC(macp_state::ay1_a_w)); m_ay8910[1]->port_b_write_callback().set(FUNC(macp_state::ay1_b_w)); m_ay8910[1]->port_b_read_callback().set(FUNC(macp_state::ay1_b_r)); - m_ay8910[1]->add_route(ALL_OUTPUTS, "rspkr", 0.50); + m_ay8910[1]->add_route(ALL_OUTPUTS, "speaker", 0.50, 1); } void macp_state::mac32k(machine_config &config) diff --git a/src/mame/sealy/sealy.cpp b/src/mame/sealy/sealy.cpp deleted file mode 100644 index d29476a25aa..00000000000 --- a/src/mame/sealy/sealy.cpp +++ /dev/null @@ -1,148 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Luca Elia -/*************************************************************************** - -Crazy Dou Di Zhu -Sealy, 2004? - -Skeleton driver - -PCB Layout: - -SEALY 2004.9 -|-------------------------| -| 3 | -| 1| -|J 13.0MHz ACTEL | -|A HY-02 A54SX16| -|M M6295 | -|M | -|A BATT | -| SW M30624 6264 2| -|-------------------------| -Notes: - M30624 - 16-bit microcontroller with 20k RAM and 256k ROM - chip will be protected and likely contain the main program. - HY-02 - unknown DIP8 chip (maybe EEPROM?) - -***************************************************************************/ - -#include "emu.h" -#include "cpu/h8/h83048.h" -#include "sound/okim6295.h" -#include "emupal.h" -#include "screen.h" -#include "speaker.h" - - -namespace { - -// 13.0 MHz? PCB is labeled with 13.5M -#define MAIN_CLOCK 13000000 - -class sealy_state : public driver_device -{ -public: - sealy_state(const machine_config &mconfig, device_type type, const char *tag) : - driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_palette(*this, "palette") - { } - - void sealy(machine_config &config); - -private: - // devices - required_device<cpu_device> m_maincpu; - required_device<palette_device> m_palette; - - // screen updates - void sealy_palette(palette_device &palette) const; - uint32_t screen_update_sealy(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - void sealy_map(address_map &map) ATTR_COLD; -}; - - -void sealy_state::sealy_palette(palette_device &palette) const -{ -// for (int i = 0; i < 32768; i++) -// palette.set_pen_color(i, pal5bit(i >> 5), pal5bit(i >> 10), pal5bit(i >> 0)); -} - -uint32_t sealy_state::screen_update_sealy(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) -{ - bitmap.fill(m_palette->black_pen(), cliprect); - return 0; -} - - -void sealy_state::sealy_map(address_map &map) -{ - map(0x00000, 0x3ffff).rom(); -} - - -static INPUT_PORTS_START( sealy ) -INPUT_PORTS_END - - -static const gfx_layout gfxlayout_8x8x16 = -{ - 8,8, - RGN_FRAC(1,1), - 8, - { STEP8(0, 2) }, - { STEP8(0, 8*2) }, - { STEP8(0, 8*8*2) }, - 8*8*16 -}; - - -static GFXDECODE_START( gfx_sealy ) - GFXDECODE_ENTRY( "gfx1", 0, gfxlayout_8x8x16, 0, 1 ) - GFXDECODE_ENTRY( "gfx2", 0, gfxlayout_8x8x16, 0, 1 ) -GFXDECODE_END - - -void sealy_state::sealy(machine_config &config) -{ - /* basic machine hardware */ - H83044(config, m_maincpu, MAIN_CLOCK); /* wrong CPU, but we have not a M16C core ATM */ - m_maincpu->set_addrmap(AS_PROGRAM, &sealy_state::sealy_map); - - /* video hardware */ - screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_refresh_hz(60); - screen.set_vblank_time(ATTOSECONDS_IN_USEC(0)); - screen.set_size(512, 256); - screen.set_visarea(0, 512-1, 0, 256-1); - screen.set_screen_update(FUNC(sealy_state::screen_update_sealy)); - - GFXDECODE(config, "gfxdecode", m_palette, gfx_sealy); - PALETTE(config, m_palette, FUNC(sealy_state::sealy_palette), 32768); - - /* sound hardware */ - SPEAKER(config, "mono").front_center(); - OKIM6295(config, "oki", MAIN_CLOCK/13, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); -} - - -ROM_START( crzyddz ) - ROM_REGION( 0x40000, "maincpu", 0 ) - ROM_LOAD( "crzyddz_m30624.mcu", 0x00000, 0x40000, NO_DUMP ) - ROM_FILL( 0x00000, 0x40000, 0x00 ) - - ROM_REGION( 0x200000, "gfx1", 0 ) - ROM_LOAD( "1", 0x000000, 0x200000, CRC(d202a278) SHA1(3ae75d6942527e58a56a703e40de22e70535b332) ) - - ROM_REGION( 0x200000, "gfx2", 0 ) - ROM_LOAD( "2", 0x000000, 0x200000, CRC(c1382873) SHA1(7e506ee013e2c97f8d4f88cf33871a27fd034841) ) - - ROM_REGION( 0x80000, "oki", 0 ) - ROM_LOAD( "3", 0x00000, 0x80000, CRC(cb626168) SHA1(652b20e92c82de480e3cd41c2e3c984fcb0c120a) ) -ROM_END - -} // anonymous namespace - - -GAME( 2004?, crzyddz, 0, sealy, sealy, sealy_state, empty_init, ROT0, "Sealy", "Crazy Dou Di Zhu", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) diff --git a/src/mame/sealy/sealy_m16c.cpp b/src/mame/sealy/sealy_m16c.cpp new file mode 100644 index 00000000000..128c399d6e7 --- /dev/null +++ b/src/mame/sealy/sealy_m16c.cpp @@ -0,0 +1,228 @@ +// license:BSD-3-Clause +// copyright-holders: Luca Elia + +/*************************************************************************** + +Crazy Dou Di Zhu +Sealy, 2004? + +Skeleton driver + +PCB Layout: + +SEALY 2004.9 +|-------------------------| +| 3 | +| 1| +|J 13.0MHz ACTEL | +|A HY-02 A54SX16| +|M M6295 | +|M | +|A BATT | +| SW M30624 6264 2| +|-------------------------| +Notes: + M30624 - 16-bit microcontroller with 20k RAM and 256k ROM + chip will be protected and likely contain the main program. + HY-02 - unknown DIP8 chip (maybe some PIC?) + +***************************************************************************/ + +#include "emu.h" + +#include "cpu/h8/h83048.h" +#include "sound/okim6295.h" + +#include "emupal.h" +#include "screen.h" +#include "speaker.h" + + +namespace { + +class sealy_m16c_state : public driver_device +{ +public: + sealy_m16c_state(const machine_config &mconfig, device_type type, const char *tag) : + driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_palette(*this, "palette") + { } + + void sealy(machine_config &config) ATTR_COLD; + +private: + required_device<cpu_device> m_maincpu; + required_device<palette_device> m_palette; + + void palette_init(palette_device &palette) const ATTR_COLD; + uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + + void program_map(address_map &map) ATTR_COLD; +}; + + +void sealy_m16c_state::palette_init(palette_device &palette) const +{ +// for (int i = 0; i < 32768; i++) +// palette.set_pen_color(i, pal5bit(i >> 5), pal5bit(i >> 10), pal5bit(i >> 0)); +} + +uint32_t sealy_m16c_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) +{ + bitmap.fill(m_palette->black_pen(), cliprect); + return 0; +} + + +void sealy_m16c_state::program_map(address_map &map) +{ + map(0x00000, 0x3ffff).rom(); +} + + +static INPUT_PORTS_START( sealy ) +// no DIP switches +INPUT_PORTS_END + + +static const gfx_layout gfxlayout_8x8x16 = +{ + 8,8, + RGN_FRAC(1,1), + 8, + { STEP8(0, 2) }, + { STEP8(0, 8*2) }, + { STEP8(0, 8*8*2) }, + 8*8*16 +}; + + +static GFXDECODE_START( gfx_sealy ) + GFXDECODE_ENTRY( "gfx1", 0, gfxlayout_8x8x16, 0, 1 ) + GFXDECODE_ENTRY( "gfx2", 0, gfxlayout_8x8x16, 0, 1 ) +GFXDECODE_END + + +void sealy_m16c_state::sealy(machine_config &config) +{ + // basic machine hardware + H83044(config, m_maincpu, 13.5_MHz_XTAL); // wrong CPU, but we only have a M16C disassembler ATM. XTAL not readable, but marked 13.5M on PCB + m_maincpu->set_addrmap(AS_PROGRAM, &sealy_m16c_state::program_map); + + // video hardware + screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); + screen.set_refresh_hz(60); + screen.set_vblank_time(ATTOSECONDS_IN_USEC(0)); + screen.set_size(512, 256); + screen.set_visarea(0, 512-1, 0, 256-1); + screen.set_screen_update(FUNC(sealy_m16c_state::screen_update)); + + GFXDECODE(config, "gfxdecode", m_palette, gfx_sealy); + PALETTE(config, m_palette, FUNC(sealy_m16c_state::palette_init), 32768); + + // sound hardware + SPEAKER(config, "mono").front_center(); + OKIM6295(config, "oki", 13.5_MHz_XTAL / 13, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); // divider and pin 7 not verified +} + + +ROM_START( crzyddz ) + ROM_REGION( 0x40000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD( "crzyddz_m30624.mcu", 0x00000, 0x40000, NO_DUMP ) + + ROM_REGION( 0x200000, "gfx1", 0 ) + ROM_LOAD( "1", 0x000000, 0x200000, CRC(d202a278) SHA1(3ae75d6942527e58a56a703e40de22e70535b332) ) + + ROM_REGION( 0x200000, "gfx2", 0 ) + ROM_LOAD( "2", 0x000000, 0x200000, CRC(c1382873) SHA1(7e506ee013e2c97f8d4f88cf33871a27fd034841) ) + + ROM_REGION( 0x80000, "oki", 0 ) + ROM_LOAD( "3", 0x00000, 0x80000, CRC(cb626168) SHA1(652b20e92c82de480e3cd41c2e3c984fcb0c120a) ) + + ROM_REGION( 0x4280, "pic", 0 ) + ROM_LOAD( "hy-02", 0x0000, 0x4280, NO_DUMP ) +ROM_END + +// 三打哈 (Sān Dǎ Hā) +// PCB is extremely similar to the one documented at the top, but has a 62256 instead of the 6264 +ROM_START( sandaha ) + ROM_REGION( 0x40000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD( "sandaha_m30624.mcu", 0x00000, 0x40000, NO_DUMP ) + + ROM_REGION( 0x200000, "gfx1", 0 ) + ROM_LOAD( "1.u1", 0x000000, 0x200000, CRC(bb92334f) SHA1(f8530f9519ba28fe696fa3ddab463413d30b37a7) ) // 27C160 + + ROM_REGION( 0x200000, "gfx2", 0 ) + ROM_LOAD( "2.u2", 0x000000, 0x200000, CRC(c3f1711b) SHA1(2adeaca9785489a8ebbfc931050ff5f1447c9972) ) // 27C160 + + ROM_REGION( 0x80000, "oki", 0 ) + ROM_LOAD( "3", 0x00000, 0x80000, NO_DUMP ) + + ROM_REGION( 0x4280, "pic", 0 ) + ROM_LOAD( "hy-01", 0x0000, 0x4280, NO_DUMP ) +ROM_END + +// 疯狂斗地主 (Fēngkuáng Dòu Dìzhǔ) +// This could be very similar to crzyddz above (GFX ROMs have few differences) +// PCB is extremely similar to the one documented at the top, but has a 62256 instead of the 6264 and a Altera MAX EPM3256AOC208-10 instead of the A54SX16 +ROM_START( fkddz ) + ROM_REGION( 0x40000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD( "fkddz_m30624.mcu", 0x00000, 0x40000, NO_DUMP ) + + ROM_REGION( 0x200000, "gfx1", 0 ) + ROM_LOAD( "1.u1", 0x000000, 0x200000, CRC(c70937b2) SHA1(62308c59a3176c796bc64be585b6382614bbe0d4) ) // 27C160 + + ROM_REGION( 0x200000, "gfx2", 0 ) + ROM_LOAD( "2.u2", 0x000000, 0x200000, CRC(13b77a6d) SHA1(df12653d7b9bdd2409994b548d085c31f24e68c6) ) // 27C160 + + ROM_REGION( 0x80000, "oki", 0 ) + ROM_LOAD( "3", 0x00000, 0x80000, NO_DUMP ) + + ROM_REGION( 0x4280, "pic", 0 ) + ROM_LOAD( "pic", 0x0000, 0x4280, NO_DUMP ) // scratched / unreadable +ROM_END + +// 疯斗加强版 (Fēngdòu Jiāqiáng Bǎn) +// PCB is extremely similar to the one documented at the top, but has a 62256 instead of the 6264 +ROM_START( fdjqb ) + ROM_REGION( 0x40000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD( "fdjqb_m30624.mcu", 0x00000, 0x40000, NO_DUMP ) + + ROM_REGION( 0x200000, "gfx1", 0 ) + ROM_LOAD( "1.u1", 0x000000, 0x200000, CRC(c70937b2) SHA1(62308c59a3176c796bc64be585b6382614bbe0d4) ) // 27C160, same as fkddz + + ROM_REGION( 0x200000, "gfx2", 0 ) + ROM_LOAD( "2.u2", 0x000000, 0x200000, CRC(13b77a6d) SHA1(df12653d7b9bdd2409994b548d085c31f24e68c6) ) // 27C160, same as fkddz + + ROM_REGION( 0x80000, "oki", 0 ) + ROM_LOAD( "3.u3", 0x00000, 0x80000, CRC(cb626168) SHA1(652b20e92c82de480e3cd41c2e3c984fcb0c120a) ) // 27C040, same as crzyddz + + ROM_REGION( 0x4280, "pic", 0 ) + ROM_LOAD( "key-02", 0x0000, 0x4280, NO_DUMP ) +ROM_END + +// 杜爆四方 (Gāngbào Sìfāng) +// Has 2x 62256 instead of the 6264, 14.31818 XTAL instead of 13.5, Altera MAX EPM7256SRC208-12 instead of the A54SX16, no HY-02 +ROM_START( gbsf ) + ROM_REGION( 0x40000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD( "gbsf_m30624.mcu", 0x00000, 0x40000, NO_DUMP ) + + ROM_REGION( 0x200000, "gfx1", 0 ) + ROM_LOAD( "03084586-4.u20", 0x000000, 0x200000, CRC(d410152b) SHA1(be51b55130b09dd1b0b56d175a33837775eb0d90) ) + + ROM_REGION( 0x200000, "gfx2", 0 ) + ROM_LOAD( "03084586-4.u21", 0x000000, 0x200000, CRC(338eac71) SHA1(aee6c6fb166c529bf179594ebfbe06c11bdb3f4d) ) + + ROM_REGION( 0x80000, "oki", 0 ) + ROM_LOAD( "3", 0x00000, 0x80000, NO_DUMP ) +ROM_END +} // anonymous namespace + + +// years were taken from GFX ROMs +GAME( 2004, crzyddz, 0, sealy, sealy, sealy_m16c_state, empty_init, ROT0, "Sealy", "Crazy Dou Di Zhu", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 2004, sandaha, 0, sealy, sealy, sealy_m16c_state, empty_init, ROT0, "Sealy", "San Da Ha", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 2004, fkddz, 0, sealy, sealy, sealy_m16c_state, empty_init, ROT0, "Sealy", "Fengkuang Dou Dizhu", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 2004, fdjqb, 0, sealy, sealy, sealy_m16c_state, empty_init, ROT0, "Sealy", "Fengdou Jiaqiang Ban", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 2003, gbsf, 0, sealy, sealy, sealy_m16c_state, empty_init, ROT0, "Sealy", "Gangbao Sifang", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) diff --git a/src/mame/sealy/sealy_z80.cpp b/src/mame/sealy/sealy_z80.cpp new file mode 100644 index 00000000000..5f3b3e3f5c9 --- /dev/null +++ b/src/mame/sealy/sealy_z80.cpp @@ -0,0 +1,269 @@ +// license:BSD-3-Clause +// copyright-holders: + +/* +Sealy Z80-based games + +Main components: +Z80C0006PEC or equivalent +12.000 MHz XTAL +6264 RAM (manufacturer and latency may vary) +62256 RAM (manufacturer and latency may vary) +Altera MAX EPM3256AOC208-10 +93C46 EEPROM +U6295 (Oki M6295 clone) + +TODO: +- program ROMs are encrypted +*/ + + +#include "emu.h" + +#include "cpu/z80/z80.h" +#include "machine/eepromser.h" +#include "sound/okim6295.h" + +#include "emupal.h" +#include "screen.h" +#include "speaker.h" +#include "tilemap.h" + + +namespace { + +class sealy_z80_state : public driver_device +{ +public: + sealy_z80_state(const machine_config &mconfig, device_type type, const char *tag) : + driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu") + { } + + void sealy(machine_config &config) ATTR_COLD; + + void init_djddz() ATTR_COLD; + +private: + required_device<cpu_device> m_maincpu; + + uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + + void program_map(address_map &map) ATTR_COLD; +}; + + +uint32_t sealy_z80_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) +{ + return 0; +} + + +void sealy_z80_state::program_map(address_map &map) +{ + map(0x0000, 0x7fff).rom(); +} + + +static INPUT_PORTS_START( djddz ) // TODO + PORT_START("IN0") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + + PORT_START("IN1") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) + +// no DIP switches, just one reset push button +INPUT_PORTS_END + + +static const gfx_layout gfxlayout_8x8x16 = +{ + 8,8, + RGN_FRAC(1,1), + 8, + { STEP8(0, 2) }, + { STEP8(0, 8*2) }, + { STEP8(0, 8*8*2) }, + 8*8*16 +}; + + +static GFXDECODE_START( gfx ) // TODO: not 100% correct, but enough to see some stuff + GFXDECODE_ENTRY( "gfx1", 0, gfxlayout_8x8x16, 0, 1 ) + GFXDECODE_ENTRY( "gfx2", 0, gfxlayout_8x8x16, 0, 1 ) +GFXDECODE_END + + +void sealy_z80_state::sealy(machine_config &config) +{ + Z80(config, m_maincpu, 12_MHz_XTAL / 2); // divider not verified, but part rated for 6 MHz + m_maincpu->set_addrmap(AS_PROGRAM, &sealy_z80_state::program_map); + + EEPROM_93C46_8BIT(config, "eeprom"); + + screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); // TODO + screen.set_refresh_hz(60); + screen.set_vblank_time(ATTOSECONDS_IN_USEC(0)); + screen.set_size(512, 256); + screen.set_visarea(0, 512-1, 0, 256-1); + screen.set_screen_update(FUNC(sealy_z80_state::screen_update)); + + GFXDECODE(config, "gfxdecode", "palette", gfx); + PALETTE(config, "palette").set_entries(0x100); // TODO + + SPEAKER(config, "mono").front_center(); + OKIM6295(config, "oki", 12_MHz_XTAL / 12, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); // divider and pin 7 not verified +} + + +// 百变斗地主 (Bǎi Biàn Dòu Dìzhǔ). All labels have 百变斗地主 +ROM_START( bbddz ) + ROM_REGION( 0x20000, "maincpu", 0 ) + ROM_LOAD( "u7", 0x00000, 0x20000, CRC(d82df292) SHA1(f354a3d9b29abb61a447d507b37d28f49983e59d) ) // 27c1001a + + ROM_REGION( 0x200000, "gfx1", 0 ) + ROM_LOAD( "u15", 0x000000, 0x200000, CRC(937e9e76) SHA1(95907ddadc2bf260d88a391ab1f61e8931ec7cc3) ) // 29f1611 + + ROM_REGION( 0x200000, "gfx2", 0 ) + ROM_LOAD( "u13", 0x000000, 0x200000, CRC(1ee033bb) SHA1(14ab0702e17add44dfc82ce21dd5a37c05a1b2a2) ) // 29f1611 + + ROM_REGION( 0x80000, "oki", 0 ) + ROM_LOAD( "u9", 0x00000, 0x80000, NO_DUMP ) // 29f040 + + ROM_REGION( 0x80, "eeprom", ROMREGION_ERASE00 ) + ROM_LOAD( "93c46", 0x00, 0x80, NO_DUMP ) +ROM_END + +// 斗地主Ⅱ (Dòu Dìzhǔ II). All labels prepend 斗地主Ⅱ to what's below +ROM_START( ddz2 ) + ROM_REGION( 0x20000, "maincpu", 0 ) + ROM_LOAD( "3.u11", 0x00000, 0x20000, CRC(01cbe7a5) SHA1(f46339bec4e898afaa78831632cea4013877258d) ) // 27c4010 + + ROM_REGION( 0x200000, "gfx1", 0 ) + ROM_LOAD( "1.u18", 0x000000, 0x200000, CRC(200ece45) SHA1(ab9b19464850c9e75646e382334a5d28a360195c) ) // 27c4096 + + ROM_REGION( 0x200000, "gfx2", 0 ) + ROM_LOAD( "2.u21", 0x000000, 0x200000, CRC(c62be0a4) SHA1(1cbfecba43b475f1a175f69fda498e662ac26720) ) // 27c4096 + + ROM_REGION( 0x80000, "oki", ROMREGION_ERASE00 ) + ROM_LOAD( "4.u23", 0x00000, 0x80000, NO_DUMP ) + + ROM_REGION( 0x80, "eeprom", ROMREGION_ERASE00 ) + ROM_LOAD( "93c46", 0x00, 0x80, NO_DUMP ) +ROM_END + +// 顶级斗地主 (Dǐngjí Dòu Dìzhǔ). All labels prepend 顶级斗地主 to what's below +ROM_START( djddz ) + ROM_REGION( 0x20000, "maincpu", 0 ) + ROM_LOAD( "3.u11", 0x00000, 0x20000, CRC(54abc7a0) SHA1(25494e0862aa6b03398270efe2a3659180be38ec) ) // 27c010 + + ROM_REGION( 0x200000, "gfx1", 0 ) + ROM_LOAD( "1.u18", 0x000000, 0x200000, CRC(6fa8f11e) SHA1(731f90a929b5b638fa45de24918df6377136276d) ) // 27c4096, FIXED BITS (xxxxxxxx0xxxxxxx) + + ROM_REGION( 0x200000, "gfx2", 0 ) + ROM_LOAD( "2.u21", 0x000000, 0x200000, CRC(74997b0f) SHA1(1c2b0aeaf71fa000856b8aa405d7853f8e652257) ) // 27c4096 + + ROM_REGION( 0x80000, "oki", 0 ) + ROM_LOAD( "4.u23", 0x00000, 0x80000, CRC(249b1a34) SHA1(94af1a9c64fb7d06a7510d527c176b2fa6845885) ) // 27c020 + + ROM_REGION( 0x80, "eeprom", ROMREGION_ERASE00 ) + ROM_LOAD( "93c46", 0x00, 0x80, NO_DUMP ) +ROM_END + + +void sealy_z80_state::init_djddz() // TODO: not enough +{ + uint8_t *rom = memregion("maincpu")->base(); + + for (int i = 0; i < 0x20000; i++) + { + switch (i & 0x14ca) + { + case 0x0000: rom[i] ^= 0xc0; break; + case 0x0002: rom[i] ^= 0x41; break; + case 0x0008: rom[i] ^= 0xc0; break; + case 0x000a: rom[i] ^= 0x30; break; + case 0x0040: rom[i] ^= 0x64; break; + case 0x0042: rom[i] ^= 0x41; break; + case 0x0048: rom[i] ^= 0x30; break; + case 0x004a: rom[i] ^= 0x41; break; + case 0x0080: rom[i] ^= 0x30; break; + case 0x0082: rom[i] ^= 0x81; break; + case 0x0088: rom[i] ^= 0x41; break; + case 0x008a: rom[i] ^= 0x64; break; + case 0x00c0: rom[i] ^= 0x30; break; + case 0x00c2: rom[i] ^= 0x81; break; + case 0x00c8: rom[i] ^= 0x41; break; + case 0x00ca: rom[i] ^= 0x30; break; + case 0x0400: rom[i] ^= 0xc0; break; + case 0x0402: rom[i] ^= 0x30; break; + case 0x0408: rom[i] ^= 0x81; break; + case 0x040a: rom[i] ^= 0xc0; break; + case 0x0440: rom[i] ^= 0x64; break; + case 0x0442: rom[i] ^= 0x41; break; + case 0x0448: rom[i] ^= 0x64; break; + case 0x044a: rom[i] ^= 0x81; break; + case 0x0480: rom[i] ^= 0x41; break; + case 0x0482: rom[i] ^= 0x81; break; + case 0x0488: rom[i] ^= 0x30; break; + case 0x048a: rom[i] ^= 0xc0; break; + case 0x04c0: rom[i] ^= 0x64; break; + case 0x04c2: rom[i] ^= 0x81; break; + case 0x04c8: rom[i] ^= 0xc0; break; + case 0x04ca: rom[i] ^= 0x64; break; + case 0x1000: rom[i] ^= 0x30; break; + case 0x1002: rom[i] ^= 0x81; break; + case 0x1008: rom[i] ^= 0xc0; break; + case 0x100a: rom[i] ^= 0x64; break; + case 0x1040: rom[i] ^= 0xc0; break; + case 0x1042: rom[i] ^= 0x30; break; + case 0x1048: rom[i] ^= 0x81; break; + case 0x104a: rom[i] ^= 0x41; break; + case 0x1080: rom[i] ^= 0x81; break; + case 0x1082: rom[i] ^= 0x64; break; + case 0x1088: rom[i] ^= 0xc0; break; + case 0x108a: rom[i] ^= 0x41; break; + case 0x10c0: rom[i] ^= 0x30; break; + case 0x10c2: rom[i] ^= 0x64; break; + case 0x10c8: rom[i] ^= 0x81; break; + case 0x10ca: rom[i] ^= 0x64; break; + case 0x1400: rom[i] ^= 0x41; break; + case 0x1402: rom[i] ^= 0xc0; break; + case 0x1408: rom[i] ^= 0x41; break; + case 0x140a: rom[i] ^= 0x81; break; + case 0x1440: rom[i] ^= 0x30; break; + case 0x1442: rom[i] ^= 0xc0; break; + case 0x1448: rom[i] ^= 0x41; break; + case 0x144a: rom[i] ^= 0x64; break; + case 0x1480: rom[i] ^= 0xc0; break; + case 0x1482: rom[i] ^= 0x81; break; + case 0x1488: rom[i] ^= 0x30; break; + case 0x148a: rom[i] ^= 0xc0; break; + case 0x14c0: rom[i] ^= 0x41; break; + case 0x14c2: rom[i] ^= 0x64; break; + case 0x14c8: rom[i] ^= 0x30; break; + case 0x14ca: rom[i] ^= 0x81; break; + } + } +} + +} // anonymous namespace + + +GAME( 2005, bbddz, 0, sealy, djddz, sealy_z80_state, init_djddz, ROT0, "Sealy", "Bai Bian Dou Dizhu", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 200?, ddz2, 0, sealy, djddz, sealy_z80_state, empty_init, ROT0, "Sealy", "Dou Dizhu II", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 200?, djddz, 0, sealy, djddz, sealy_z80_state, init_djddz, ROT0, "Sealy", "Dingji Dou Dizhu", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) 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/alesis_qs.cpp b/src/mame/skeleton/alesis_qs.cpp index af28367e06e..73fe9aa2683 100644 --- a/src/mame/skeleton/alesis_qs.cpp +++ b/src/mame/skeleton/alesis_qs.cpp @@ -71,11 +71,10 @@ void qs_state::qs7(machine_config &config) //TODO: add LCD display controller here /* sound hardware */ - //SPEAKER(config, "left").front_left(); - //SPEAKER(config, "right").front_right(); + //SPEAKER(config, "speaker", 2).front(); //alesis_qs_series_device &sound(ALESIS_QS_SERIES(config, "sound", SND_CLOCK)); - //sound.add_route(0, "left", 1.0); - //sound.add_route(1, "right", 1.0); + //sound.add_route(0, "speaker", 1.0, 0); + //sound.add_route(1, "speaker", 1.0, 1); /* Interfaces */ //PCMCIA 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/sunwise/jankmg2.cpp b/src/mame/sunwise/jankmg2.cpp index 4195277eecf..330415391ed 100644 --- a/src/mame/sunwise/jankmg2.cpp +++ b/src/mame/sunwise/jankmg2.cpp @@ -2,7 +2,7 @@ // copyright-holders: /* -Janken Man 2 +Ganso Janken Man 2 'S9405021 CPU-DM-NEW' PCB Z0840004PSC @@ -164,4 +164,4 @@ ROM_END } // anonymous namespace // title machine translated from auction, not verified -GAME( 199?, jankmg2, 0, jankmg2, jankmg2, jankmg2_state, empty_init, ROT0, "Sunwise", "Janken Man Ganso 2", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) +GAME( 199?, jankmg2, 0, jankmg2, jankmg2, jankmg2_state, empty_init, ROT0, "Sunwise", "Ganso Janken Man 2", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) 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/mame/tvgames/generalplus_gp327902.cpp b/src/mame/tvgames/generalplus_gp327902.cpp index 6b142d7c26a..b9ca53e121e 100644 --- a/src/mame/tvgames/generalplus_gp327902.cpp +++ b/src/mame/tvgames/generalplus_gp327902.cpp @@ -133,8 +133,7 @@ void generalplus_gp327902_game_state::gp327902(machine_config &config) m_screen->set_visarea(0, 320-1, 0, 240-1); m_screen->set_screen_update(FUNC(generalplus_gp327902_game_state::screen_update_gp327902)); - SPEAKER(config, "lspeaker").front_left(); - SPEAKER(config, "rspeaker").front_right(); + SPEAKER(config, "speaker", 2).front(); TIMER(config, "timer").configure_periodic(FUNC(generalplus_gp327902_game_state::timer), attotime::from_hz(1000)); } diff --git a/src/mame/tvgames/generalplus_gpm453x_nand.cpp b/src/mame/tvgames/generalplus_gpm453x_nand.cpp index 124e4825bda..90daafa1b53 100644 --- a/src/mame/tvgames/generalplus_gpm453x_nand.cpp +++ b/src/mame/tvgames/generalplus_gpm453x_nand.cpp @@ -91,8 +91,7 @@ void generalplus_gpm453x_game_state::gpm453x(machine_config &config) m_screen->set_visarea(0, 320-1, 0, 240-1); m_screen->set_screen_update(FUNC(generalplus_gpm453x_game_state::screen_update)); - SPEAKER(config, "lspeaker").front_left(); - SPEAKER(config, "rspeaker").front_right(); + SPEAKER(config, "speaker", 2).front(); } ROM_START( leapland ) diff --git a/src/osd/modules/sound/pulse_sound.cpp b/src/osd/modules/sound/pulse_sound.cpp index 4b7c87b6b9b..820ca149c39 100644 --- a/src/osd/modules/sound/pulse_sound.cpp +++ b/src/osd/modules/sound/pulse_sound.cpp @@ -152,7 +152,6 @@ void sound_pulse::generic_pa_error(const char *msg, int err) void sound_pulse::context_notify() { - fprintf(stderr, "context notify\n"); pa_context_state state = pa_context_get_state(m_context); if(state == PA_CONTEXT_READY) { pa_context_subscribe(m_context, PA_SUBSCRIPTION_MASK_ALL, nullptr, this); @@ -173,7 +172,6 @@ void sound_pulse::stream_notify(stream_info *stream) { pa_stream_state state = pa_stream_get_state(stream->m_stream); - fprintf(stderr, "stream notify\n"); if(state == PA_STREAM_READY || state == PA_STREAM_FAILED || state == PA_STREAM_TERMINATED) { m_wait_stream = false; pa_threaded_mainloop_signal(m_mainloop, 0); @@ -216,7 +214,6 @@ void sound_pulse::server_info(const pa_server_info *i) { m_default_audio_sink = i->default_sink_name; m_default_audio_source = i->default_source_name; - fprintf(stderr, "defaults %s %s\n", i->default_sink_name, i->default_source_name); m_generation++; if(m_wait_init) { m_wait_init = false; @@ -243,7 +240,6 @@ void sound_pulse::source_info(const pa_source_info *i, int eol) return; } - fprintf(stderr, "new source %d (%s)\n", i->index, i->description); m_node_osdid_to_id[m_node_current_id] = i->index; auto &node = m_nodes.emplace(i->index, node_info(this, i->index, m_node_current_id++, AREC, i->name, i->description)).first->second; @@ -274,8 +270,6 @@ void sound_pulse::sink_info_new(const pa_sink_info *i, int eol) return; } - fprintf(stderr, "new sink %d (%s)\n", i->index, i->description); - fprintf(stderr, "rate %d\n", i->sample_spec.rate); m_node_osdid_to_id[m_node_current_id] = i->index; auto &node = m_nodes.emplace(i->index, node_info(this, i->index, m_node_current_id++, APLAY, i->name, i->description)).first->second; @@ -312,13 +306,11 @@ void sound_pulse::sink_input_info_change(stream_info *stream, const pa_sink_inpu for(uint32_t port = 0; port != stream->m_channels; port++) stream->m_volumes[port] = pa_sw_volume_to_dB(i->volume.values[port]); - fprintf(stderr, "change stream %d/%d sink=%s [%f %f]\n", stream->m_osdid, stream->m_pulse_id, stream->m_target_node->m_desc.c_str(), stream->m_volumes[0], stream->m_volumes[1]); m_generation++; } void sound_pulse::i_sink_input_info_change(pa_context *, const pa_sink_input_info *i, int eol, void *self) { - fprintf(stderr, "i_sink_input_info_change %p %d\n", i, eol); stream_info *stream = static_cast<stream_info *>(self); stream->m_pulse->sink_input_info_change(stream, i, eol); } @@ -326,15 +318,12 @@ void sound_pulse::i_sink_input_info_change(pa_context *, const pa_sink_input_inf void sound_pulse::context_subscribe(pa_subscription_event_type_t t, uint32_t idx) { // This is called with the thread locked - static const char *const evt[] = { "sink", "source", "sink-input", "source-output", "module", "client", "cache", "server", "autoload", "card" }; - static const char *const evt2[] = { "new", "change", "remove" }; switch(int(t)) { case PA_SUBSCRIPTION_EVENT_REMOVE | PA_SUBSCRIPTION_EVENT_SINK: case PA_SUBSCRIPTION_EVENT_REMOVE | PA_SUBSCRIPTION_EVENT_SOURCE: { auto si = m_nodes.find(idx); if(si == m_nodes.end()) break; - fprintf(stderr, "removing %s\n", si->second.m_desc.c_str()); for(auto &istream : m_streams) if(istream.second.m_target_node == &si->second) istream.second.m_target_node = nullptr; @@ -367,7 +356,7 @@ void sound_pulse::context_subscribe(pa_subscription_event_type_t t, uint32_t idx } default: - fprintf(stderr, "event %s %s %d\n", evt2[t>>4], evt[t&15], idx); + break; } } @@ -489,7 +478,6 @@ uint32_t sound_pulse::stream_sink_open(uint32_t node, std::string name, uint32_t stream.m_pulse_id = pa_stream_get_index(stream.m_stream); m_stream_pulse_id_to_osdid[stream.m_pulse_id] = id; - fprintf(stderr, "stream id %d\n", stream.m_pulse_id); pa_threaded_mainloop_unlock(m_mainloop); return id; 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 |