diff --git a/scripts/src/sound.lua b/scripts/src/sound.lua index ab5c7e5ebfb..848f5649099 100644 --- a/scripts/src/sound.lua +++ b/scripts/src/sound.lua @@ -1624,14 +1624,26 @@ if (SOUNDS["XT446"]~=null) then end --------------------------------------------------- --- Roland sample players ---@src/devices/sound/rolandpcm.h,SOUNDS["ROLANDPCM"] = true +-- Roland LP-based sample players +--@src/devices/sound/roland_lp.h,SOUNDS["ROLANDLP"] = true --------------------------------------------------- -if (SOUNDS["ROLANDPCM"]~=null) then +if (SOUNDS["ROLANDLP"]~=null) then files { - MAME_DIR .. "src/devices/sound/rolandpcm.cpp", - MAME_DIR .. "src/devices/sound/rolandpcm.h", + MAME_DIR .. "src/devices/sound/roland_lp.cpp", + MAME_DIR .. "src/devices/sound/roland_lp.h", + } +end + +--------------------------------------------------- +-- Roland GP-based sample players +--@src/devices/sound/roland_gp.h,SOUNDS["ROLANDGP"] = true +--------------------------------------------------- + +if (SOUNDS["ROLANDGP"]~=null) then + files { + MAME_DIR .. "src/devices/sound/roland_gp.cpp", + MAME_DIR .. "src/devices/sound/roland_gp.h", } end diff --git a/src/devices/bus/nscsi/cd.cpp b/src/devices/bus/nscsi/cd.cpp index 1aea67056fd..0e629186b46 100644 --- a/src/devices/bus/nscsi/cd.cpp +++ b/src/devices/bus/nscsi/cd.cpp @@ -83,6 +83,7 @@ nscsi_cdrom_device::nscsi_cdrom_device(const machine_config &mconfig, device_typ : nscsi_full_device(mconfig, type, tag, owner, clock) , image(*this, "image") , cdda(*this, "cdda") + , m_removal_prevented(false) , bytes_per_block(bytes_per_sector) , lba(0) , cur_sector(0) @@ -549,6 +550,7 @@ void nscsi_cdrom_device::scsi_command() case SC_PREVENT_ALLOW_MEDIUM_REMOVAL: // TODO: support eject prevention LOG("command %s MEDIUM REMOVAL\n", (scsi_cmdbuf[4] & 0x1) ? "PREVENT" : "ALLOW"); + m_removal_prevented = BIT(scsi_cmdbuf[4], 0); scsi_status_complete(SS_GOOD); break; @@ -883,11 +885,21 @@ void nscsi_cdrom_apple_device::device_start() } /* - The Apple II SCSI Card firmware demands that ASC on a failing TEST_UNIT_READY be either 0x28 or 0xb0. - 0x28 is MEDIA_CHANGED, 0xb0 is vendor-specific. If the drive returns the normal 0x3A for disc-not-present, + The Apple II SCSI Card firmware demands that ASC on a failing TEST_UNIT_READY be either 0x28 or 0xB0. + 0x28 is MEDIA_CHANGED, 0xB0 is vendor-specific. If the drive returns the normal 0x3A for disc-not-present, the firmware assumes the drive is broken and retries the TEST_UNIT_READY for 60 seconds before giving up and booting the machine. + + MacOS will see the normal 0x3A disc-not-present and simply disbelieve it and hammer on the drive while + asking the user to format it because it's unreadable. 0xB0 makes it behave as expected. */ + +void nscsi_cdrom_apple_device::return_no_cd() +{ + sense(false, SK_NOT_READY, 0xb0); + scsi_status_complete(SS_CHECK_CONDITION); +} + void nscsi_cdrom_apple_device::scsi_command() { if (scsi_cmdbuf[0] != 8 && scsi_cmdbuf[0] != 0x28 && scsi_cmdbuf[0] != 0 && scsi_cmdbuf[0] != 0x03) @@ -908,8 +920,7 @@ void nscsi_cdrom_apple_device::scsi_command() } else { - sense(false, SK_NOT_READY, 0xb0); - scsi_status_complete(SS_CHECK_CONDITION); + return_no_cd(); } break; @@ -1312,15 +1323,33 @@ void nscsi_cdrom_apple_device::scsi_command() case APPLE_AUDIO_CONTROL: LOG("command APPLE AUDIO CONTROL, size %d\n", scsi_cmdbuf[8]); - scsi_data_out(3, scsi_cmdbuf[8]); - scsi_status_complete(SS_GOOD); + if (image->exists()) + { + scsi_data_out(3, scsi_cmdbuf[8]); + scsi_status_complete(SS_GOOD); + } + else + { + return_no_cd(); + } break; case APPLE_EJECT: LOG("command APPLE EJECT\n"); - cdda->stop_audio(); - m_stopped = true; - scsi_status_complete(SS_GOOD); + if (!m_removal_prevented) + { + cdda->stop_audio(); + m_stopped = true; + image->unload(); + sense(false, SK_NOT_READY, SK_ASC_MEDIUM_NOT_PRESENT); + scsi_status_complete(SS_GOOD); + } + else + { + LOG("Eject not allowed by PREVENT_ALLOW_MEDIA_REMOVAL\n"); + sense(false, SK_ILLEGAL_REQUEST, 0x80); // "Prevent bit is set" + scsi_status_complete(SS_CHECK_CONDITION); + } break; case SC_READ_6: diff --git a/src/devices/bus/nscsi/cd.h b/src/devices/bus/nscsi/cd.h index 274e19f9ab5..189f43d343a 100644 --- a/src/devices/bus/nscsi/cd.h +++ b/src/devices/bus/nscsi/cd.h @@ -43,9 +43,11 @@ class nscsi_cdrom_device : public nscsi_full_device virtual uint8_t scsi_get_data(int id, int pos) override; virtual void scsi_put_data(int buf, int offset, uint8_t data) override; - void return_no_cd(); + virtual void return_no_cd(); static int to_msf(int frame); + bool m_removal_prevented; + private: static constexpr uint32_t bytes_per_sector = 2048; @@ -133,6 +135,7 @@ class nscsi_cdrom_apple_device : public nscsi_cdrom_device virtual void scsi_command() override; virtual bool scsi_command_done(uint8_t command, uint8_t length) override; virtual void scsi_put_data(int buf, int offset, uint8_t data) override; + virtual void return_no_cd() override; private: bool m_stopped; diff --git a/src/devices/bus/vme/mvme180.cpp b/src/devices/bus/vme/mvme180.cpp index 2e95c4b5962..087780f86cd 100644 --- a/src/devices/bus/vme/mvme180.cpp +++ b/src/devices/bus/vme/mvme180.cpp @@ -67,14 +67,11 @@ void vme_mvme180_card_device::device_add_mconfig(machine_config &config) { MC88100(config, m_cpu, 40_MHz_XTAL / 2); m_cpu->set_addrmap(AS_PROGRAM, &vme_mvme180_card_device::cpu_mem); + m_cpu->set_cmmu_code([this](u32 const address) -> mc88200_device & { return *m_mmu[0]; }); + m_cpu->set_cmmu_data([this](u32 const address) -> mc88200_device & { return *m_mmu[1]; }); - MC88200(config, m_mmu[0], 40_MHz_XTAL / 2, 0x7e); - m_mmu[0]->set_mbus(m_cpu, AS_PROGRAM); - m_cpu->set_cmmu_i(m_mmu[0]); - - MC88200(config, m_mmu[1], 40_MHz_XTAL / 2, 0x7f); - m_mmu[1]->set_mbus(m_cpu, AS_PROGRAM); - m_cpu->set_cmmu_d(m_mmu[1]); + MC88200(config, m_mmu[0], 40_MHz_XTAL / 2, 0x7e).set_mbus(m_cpu, AS_PROGRAM); + MC88200(config, m_mmu[1], 40_MHz_XTAL / 2, 0x7f).set_mbus(m_cpu, AS_PROGRAM); SCN2681(config, m_duart, 3.6864_MHz_XTAL); m_duart->irq_cb().set(FUNC(vme_mvme180_card_device::irq_w<6>)); diff --git a/src/devices/bus/vme/mvme181.cpp b/src/devices/bus/vme/mvme181.cpp index 998959cbc32..55d5d601035 100644 --- a/src/devices/bus/vme/mvme181.cpp +++ b/src/devices/bus/vme/mvme181.cpp @@ -96,14 +96,11 @@ void vme_mvme181_card_device::device_add_mconfig(machine_config &config) { MC88100(config, m_cpu, 40_MHz_XTAL / 2); m_cpu->set_addrmap(AS_PROGRAM, &vme_mvme181_card_device::cpu_mem); + m_cpu->set_cmmu_code([this](u32 const address) -> mc88200_device & { return *m_mmu[0]; }); + m_cpu->set_cmmu_data([this](u32 const address) -> mc88200_device & { return *m_mmu[1]; }); - MC88200(config, m_mmu[0], 40_MHz_XTAL / 2, 0x7e); - m_mmu[0]->set_mbus(m_cpu, AS_PROGRAM); - m_cpu->set_cmmu_i(m_mmu[0]); - - MC88200(config, m_mmu[1], 40_MHz_XTAL / 2, 0x7f); - m_mmu[1]->set_mbus(m_cpu, AS_PROGRAM); - m_cpu->set_cmmu_d(m_mmu[1]); + MC88200(config, m_mmu[0], 40_MHz_XTAL / 2, 0x7e).set_mbus(m_cpu, AS_PROGRAM); + MC88200(config, m_mmu[1], 40_MHz_XTAL / 2, 0x7f).set_mbus(m_cpu, AS_PROGRAM); DS1315(config, m_rtc, 0); // DS1216 diff --git a/src/devices/bus/vme/mvme187.cpp b/src/devices/bus/vme/mvme187.cpp index 96e8b54eb0d..7fd1633838f 100644 --- a/src/devices/bus/vme/mvme187.cpp +++ b/src/devices/bus/vme/mvme187.cpp @@ -106,14 +106,11 @@ void vme_mvme187_card_device::device_add_mconfig(machine_config &config) { MC88100(config, m_cpu, 50_MHz_XTAL / 2); m_cpu->set_addrmap(AS_PROGRAM, &vme_mvme187_card_device::cpu_mem); + m_cpu->set_cmmu_code([this](u32 const address) -> mc88200_device & { return *m_mmu[0]; }); + m_cpu->set_cmmu_data([this](u32 const address) -> mc88200_device & { return *m_mmu[1]; }); - MC88200(config, m_mmu[0], 50_MHz_XTAL / 2, 0x77); - m_mmu[0]->set_mbus(m_cpu, AS_PROGRAM); - m_cpu->set_cmmu_i(m_mmu[0]); - - MC88200(config, m_mmu[1], 50_MHz_XTAL / 2, 0x7f); - m_mmu[1]->set_mbus(m_cpu, AS_PROGRAM); - m_cpu->set_cmmu_d(m_mmu[1]); + MC88200(config, m_mmu[0], 50_MHz_XTAL / 2, 0x77).set_mbus(m_cpu, AS_PROGRAM); + MC88200(config, m_mmu[1], 50_MHz_XTAL / 2, 0x7f).set_mbus(m_cpu, AS_PROGRAM); DS1643(config, m_rtc); diff --git a/src/devices/bus/vme/tp881v.cpp b/src/devices/bus/vme/tp881v.cpp index e4cac6ef524..30cd01a568b 100644 --- a/src/devices/bus/vme/tp881v.cpp +++ b/src/devices/bus/vme/tp881v.cpp @@ -86,14 +86,11 @@ void vme_tp881v_card_device::device_add_mconfig(machine_config &config) { MC88100(config, m_cpu, 40_MHz_XTAL / 2); m_cpu->set_addrmap(AS_PROGRAM, &vme_tp881v_card_device::cpu_mem); + m_cpu->set_cmmu_code([this](u32 const address) -> mc88200_device & { return *m_mmu[0]; }); + m_cpu->set_cmmu_data([this](u32 const address) -> mc88200_device & { return *m_mmu[1]; }); - MC88200(config, m_mmu[0], 40_MHz_XTAL / 2, 0x00); - m_mmu[0]->set_mbus(m_cpu, AS_PROGRAM); - m_cpu->set_cmmu_i(m_mmu[0]); - - MC88200(config, m_mmu[1], 40_MHz_XTAL / 2, 0x01); - m_mmu[1]->set_mbus(m_cpu, AS_PROGRAM); - m_cpu->set_cmmu_d(m_mmu[1]); + MC88200(config, m_mmu[0], 40_MHz_XTAL / 2, 0x00).set_mbus(m_cpu, AS_PROGRAM); + MC88200(config, m_mmu[1], 40_MHz_XTAL / 2, 0x01).set_mbus(m_cpu, AS_PROGRAM); // per-jp interrupt controllers // 4MHz input clock, ct3 gives 100Hz clock, ct2 counts at 10kHz diff --git a/src/devices/cpu/m88000/m88000.cpp b/src/devices/cpu/m88000/m88000.cpp index ef088f49a80..73351cfdf2f 100644 --- a/src/devices/cpu/m88000/m88000.cpp +++ b/src/devices/cpu/m88000/m88000.cpp @@ -148,8 +148,8 @@ mc88100_device::mc88100_device(const machine_config &mconfig, const char *tag, d : cpu_device(mconfig, MC88100, tag, owner, clock) , m_code_config("code", ENDIANNESS_BIG, 32, 32, 0) , m_data_config("data", ENDIANNESS_BIG, 32, 32, 0) - , m_cmmu_d(*this, finder_base::DUMMY_TAG) - , m_cmmu_i(*this, finder_base::DUMMY_TAG) + , m_cmmu_code(nullptr) + , m_cmmu_data(nullptr) , m_sb(0) , m_r{ 0 } , m_cr{ 0 } @@ -183,13 +183,13 @@ bool mc88100_device::memory_translate(int spacenum, int intention, offs_t &addre { case TR_READ: case TR_WRITE: - if (m_cmmu_d) - return m_cmmu_d->translate(intention, address, m_cr[PSR] & PSR_MODE); + if (m_cmmu_data) + return m_cmmu_data(address).translate(intention, address, m_cr[PSR] & PSR_MODE); break; case TR_FETCH: - if (m_cmmu_i) - return m_cmmu_i->translate(intention, address, m_cr[PSR] & PSR_MODE); + if (m_cmmu_code) + return m_cmmu_code(address).translate(intention, address, m_cr[PSR] & PSR_MODE); break; } @@ -198,7 +198,7 @@ bool mc88100_device::memory_translate(int spacenum, int intention, offs_t &addre void mc88100_device::device_start() { - space(AS_PROGRAM).specific(m_inst_space); + space(AS_PROGRAM).specific(m_code_space); if (has_configured_map(AS_DATA)) space(AS_DATA).specific(m_data_space); @@ -1525,16 +1525,16 @@ void mc88100_device::fset(unsigned const td, unsigned const d, float64_t const d void mc88100_device::fetch(u32 &address, u32 &inst) { - if (m_cmmu_i) + if (m_cmmu_code) { - std::optional data = m_cmmu_i->read(address & IP_A, m_cr[PSR] & PSR_MODE); + std::optional data = m_cmmu_code(address & IP_A).read(address & IP_A, m_cr[PSR] & PSR_MODE); if (data.has_value()) inst = data.value(); else address |= IP_E; } else - inst = m_inst_space.read_dword(address & IP_A); + inst = m_code_space.read_dword(address & IP_A); } template void mc88100_device::ld(u32 address, unsigned const reg) @@ -1552,11 +1552,11 @@ template void mc88100_device::ld(u32 address, unsigned co address &= ~(sizeof(T) - 1); } - if (m_cmmu_d) + if (m_cmmu_data) { if constexpr (sizeof(T) < 8) { - std::optional const data = m_cmmu_d->read::type>(address, (m_cr[PSR] & PSR_MODE) && !Usr); + std::optional const data = m_cmmu_data(address).read::type>(address, (m_cr[PSR] & PSR_MODE) && !Usr); if (data.has_value() && reg) m_r[reg] = std::is_signed() ? s32(data.value()) : data.value(); @@ -1585,8 +1585,8 @@ template void mc88100_device::ld(u32 address, unsigned co } else { - std::optional const hi = m_cmmu_d->read(address + 0, (m_cr[PSR] & PSR_MODE) && !Usr); - std::optional const lo = m_cmmu_d->read(address + 4, (m_cr[PSR] & PSR_MODE) && !Usr); + std::optional const hi = m_cmmu_data(address + 0).read(address + 0, (m_cr[PSR] & PSR_MODE) && !Usr); + std::optional const lo = m_cmmu_data(address + 4).read(address + 4, (m_cr[PSR] & PSR_MODE) && !Usr); if (lo.has_value() && hi.has_value()) { if (reg != 0) @@ -1673,11 +1673,11 @@ template void mc88100_device::st(u32 address, unsigned co address &= ~(sizeof(T) - 1); } - if (m_cmmu_d) + if (m_cmmu_data) { if constexpr (sizeof(T) < 8) { - if (!m_cmmu_d->write(address, T(m_r[reg]), (m_cr[PSR] & PSR_MODE) && !Usr)) + if (!m_cmmu_data(address).write(address, T(m_r[reg]), (m_cr[PSR] & PSR_MODE) && !Usr)) { m_cr[DMT0] = DMT_EN(address) | DMT_WRITE | DMT_VALID; m_cr[DMT1] = 0; @@ -1701,8 +1701,8 @@ template void mc88100_device::st(u32 address, unsigned co else { bool result = true; - result &= m_cmmu_d->write(address + 0, m_r[(reg + 0) & 31], (m_cr[PSR] & PSR_MODE) && !Usr); - result &= m_cmmu_d->write(address + 4, m_r[(reg + 1) & 31], (m_cr[PSR] & PSR_MODE) && !Usr); + result &= m_cmmu_data(address + 0).write(address + 0, m_r[(reg + 0) & 31], (m_cr[PSR] & PSR_MODE) && !Usr); + result &= m_cmmu_data(address + 4).write(address + 4, m_r[(reg + 1) & 31], (m_cr[PSR] & PSR_MODE) && !Usr); if (!result) { @@ -1762,10 +1762,10 @@ template void mc88100_device::xmem(u32 address, unsigned // save source value T const src = m_r[reg]; - if (m_cmmu_d) + if (m_cmmu_data) { // read destination - std::optional const dst = m_cmmu_d->read(address, (m_cr[PSR] & PSR_MODE) && !Usr); + std::optional const dst = m_cmmu_data(address).read(address, (m_cr[PSR] & PSR_MODE) && !Usr); if (dst.has_value()) { // update register @@ -1773,7 +1773,7 @@ template void mc88100_device::xmem(u32 address, unsigned m_r[reg] = dst.value(); // write destination - if (m_cmmu_d->write(address, src, (m_cr[PSR] & PSR_MODE) && !Usr)) + if (m_cmmu_data(address).write(address, src, (m_cr[PSR] & PSR_MODE) && !Usr)) return; } diff --git a/src/devices/cpu/m88000/m88000.h b/src/devices/cpu/m88000/m88000.h index 2588f821885..8e1d2e9e127 100644 --- a/src/devices/cpu/m88000/m88000.h +++ b/src/devices/cpu/m88000/m88000.h @@ -20,8 +20,8 @@ class mc88100_device : public cpu_device // construction/destruction mc88100_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); - template void set_cmmu_d(T &&tag) { m_cmmu_d.set_tag(std::forward(tag)); } - template void set_cmmu_i(T &&tag) { m_cmmu_i.set_tag(std::forward(tag)); } + void set_cmmu_code(std::function f) { m_cmmu_code = f; } + void set_cmmu_data(std::function f) { m_cmmu_data = f; } protected: // device_t implementation @@ -64,11 +64,11 @@ class mc88100_device : public cpu_device // address spaces address_space_config m_code_config; address_space_config m_data_config; - memory_access<32, 2, 0, ENDIANNESS_BIG>::specific m_inst_space; + memory_access<32, 2, 0, ENDIANNESS_BIG>::specific m_code_space; memory_access<32, 2, 0, ENDIANNESS_BIG>::specific m_data_space; - optional_device m_cmmu_d; - optional_device m_cmmu_i; + std::function m_cmmu_code; + std::function m_cmmu_data; // register storage u32 m_xip; // execute instruction pointer diff --git a/src/devices/machine/fm_scsi.cpp b/src/devices/machine/fm_scsi.cpp index 4747f8ab856..717b52f8e0e 100644 --- a/src/devices/machine/fm_scsi.cpp +++ b/src/devices/machine/fm_scsi.cpp @@ -67,13 +67,17 @@ fmscsi_device::fmscsi_device(const machine_config &mconfig, const char *tag, dev void fmscsi_device::device_start() { - m_input_lines = 0; - m_output_lines = 0; - m_data = 0; - m_command_index = 0; - m_last_id = 0; - m_target = 0; - m_phase = SCSI_PHASE_BUS_FREE; + save_item(NAME(m_command)); + save_item(NAME(m_command_index)); + save_item(NAME(m_result_length)); + save_item(NAME(m_result_index)); + save_item(NAME(m_input_lines)); + save_item(NAME(m_output_lines)); + save_item(NAME(m_data)); + save_item(NAME(m_last_id)); + save_item(NAME(m_phase)); + save_item(NAME(m_target)); + save_item(NAME(m_buffer)); // allocate read timer m_transfer_timer = timer_alloc(FUNC(fmscsi_device::update_transfer), this); diff --git a/src/devices/machine/mc88200.cpp b/src/devices/machine/mc88200.cpp index 0419c279588..ecfdf5d6517 100644 --- a/src/devices/machine/mc88200.cpp +++ b/src/devices/machine/mc88200.cpp @@ -10,7 +10,6 @@ * TODO: * - probe commands * - mbus snooping - * - multiple cmmus per pbus * - cycle counting * - cache inhibited accesses invalidate matching cache tags (no writeback) * - mc88204 64k variant @@ -798,7 +797,7 @@ template std::optional mc88200_device::read(u32 virtual_address, // copy back modified line if (cs.modified(l.value())) if (!cs.line[l.value()].copy_back(*this, cs.line[l.value()].tag | (s << 4))) - return false; + return std::nullopt; // mark line invalid cs.set_invalid(l.value()); @@ -808,7 +807,7 @@ template std::optional mc88200_device::read(u32 virtual_address, // load line from memory if (!cs.line[l.value()].load_line(*this, physical_address & 0xfffffff0U)) - return false; + return std::nullopt; // mark line shared unmodified cs.set_shared(l.value()); @@ -941,6 +940,8 @@ template std::optional mc88200_device::mbus_read(u32 address) { std::optional data; + m_bus_error = false; + switch (sizeof(T)) { case 1: data = m_mbus->read_byte(address); break; @@ -952,7 +953,6 @@ template std::optional mc88200_device::mbus_read(u32 address) { if (!machine().side_effects_disabled()) { - m_bus_error = false; m_pfar = address; m_pfsr = PFSR_BE; } @@ -964,6 +964,8 @@ template std::optional mc88200_device::mbus_read(u32 address) template bool mc88200_device::mbus_write(u32 address, T data, bool flush) { + m_bus_error = false; + switch (sizeof(T)) { case 1: m_mbus->write_byte(address, data); break; @@ -973,7 +975,6 @@ template bool mc88200_device::mbus_write(u32 address, T data, bool if (m_bus_error) { - m_bus_error = false; if (!flush) { m_pfar = address; diff --git a/src/devices/machine/ncr5385.cpp b/src/devices/machine/ncr5385.cpp index fe76078fa95..10451885345 100644 --- a/src/devices/machine/ncr5385.cpp +++ b/src/devices/machine/ncr5385.cpp @@ -421,6 +421,9 @@ void ncr5385_device::cmd_w(u8 data) case 0x18: case 0x19: case 0x1a: case 0x1b: case 0x1c: case 0x1d: case 0x1e: case 0x1f: // reserved + LOGMASKED(LOG_COMMAND, "reserved / invalid cmd\n"); + m_int_status |= INT_INVALID_CMD; + update_int(); break; } } @@ -814,7 +817,8 @@ void ncr5385_device::set_dreq(bool dreq) void ncr5385_device::update_int() { - bool const int_state = m_int_status & 0x5f; + bool const int_state = m_int_status & (INT_FUNC_COMPLETE | INT_BUS_SERVICE | + INT_DISCONNECTED | INT_SELECTED | INT_RESELECTED | INT_INVALID_CMD); if (m_int_state != int_state) { diff --git a/src/devices/machine/r65c52.cpp b/src/devices/machine/r65c52.cpp index c1f5d70c153..91e1f573f54 100644 --- a/src/devices/machine/r65c52.cpp +++ b/src/devices/machine/r65c52.cpp @@ -56,23 +56,24 @@ r65c52_device::r65c52_device(const machine_config &mconfig, const char *tag, dev } const int r65c52_device::internal_divider[16] = - { - 4608, - 2096, - 1713, - 1536, - 768, - 384, - 192, - 128, - 96, - 64, - 48, - 32, - 24, - 12, - 6, - 1}; +{ + 4608, + 2096, + 1713, + 1536, + 768, + 384, + 192, + 128, + 96, + 64, + 48, + 32, + 24, + 12, + 6, + 1 +}; void r65c52_device::device_add_mconfig(machine_config &config) { @@ -258,19 +259,8 @@ void r65c52_device::output_dtr(int idx, int dtr) void r65c52_device::update_irq(int idx) { - bool irq = false; LOG("R65C52: %x IER %x ISR %x\n", idx + 1, m_ier[idx], m_isr[idx]); - for (int i = 0; i < 7; i++) - { - int ier_bit = BIT(m_ier[idx],i); - int isr_bit = BIT(m_isr[idx],i); - - if ((ier_bit == isr_bit) && (ier_bit ==1)) - { - irq = true; - } - } - output_irq(idx, irq); + output_irq(idx, (m_ier[idx] & m_isr[idx] & 0x7f) ? 1 : 0); } void r65c52_device::update_divider(int idx) @@ -310,21 +300,27 @@ void r65c52_device::update_divider(int idx) u8 r65c52_device::read_rdr(int idx) { - m_status[idx] &= ~(SR_BRK | SR_FRAMING_ERROR); - m_isr[idx] &= ~(IRQ_PAR | IRQ_FOB | IRQ_RDRF); - m_rdrf[idx] = false; - m_parity_err[idx] = false; - m_overrun[idx] = false; - update_irq(idx); - LOG("R65C52: %x RDR %x \n", idx + 1, m_rdr[idx]); + if (!machine().side_effects_disabled()) + { + m_status[idx] &= ~(SR_BRK | SR_FRAMING_ERROR); + m_isr[idx] &= ~(IRQ_PAR | IRQ_FOB | IRQ_RDRF); + m_rdrf[idx] = false; + m_parity_err[idx] = false; + m_overrun[idx] = false; + LOG("R65C52: %x RDR %x \n", idx + 1, m_rdr[idx]); + update_irq(idx); + } return m_rdr[idx]; } u8 r65c52_device::read_status(int idx) { - LOG("R65C52: %x STATUS %x \n", idx + 1, m_status[idx]); - m_dtr[idx] = false; - m_rts[idx] = false; + if (!machine().side_effects_disabled()) + { + LOG("R65C52: %x STATUS %x \n", idx + 1, m_status[idx]); + m_dtr[idx] = false; + m_rts[idx] = false; + } return m_status[idx]; } @@ -340,6 +336,7 @@ void r65c52_device::write_ier(int idx, u8 data) } LOG("R65C52: %x IER %x \n", idx + 1, m_ier[idx]); + update_irq(idx); } void r65c52_device::write_tdr(int idx, u8 data) @@ -347,7 +344,9 @@ void r65c52_device::write_tdr(int idx, u8 data) m_tdr[idx] = data; m_tdre[idx] = false; m_isr[idx] &= ~IRQ_TDRE; + LOG("R65C52: %x TDR %x \n", idx + 1, m_tdr[idx]); + update_irq(idx); } void r65c52_device::write_control(int idx, u8 data) @@ -416,15 +415,14 @@ void r65c52_device::write_compare(int idx, u8 data) u8 r65c52_device::read_isr(int idx) { + u8 isr = m_isr[idx]; if (m_status[idx] & SR_BRK || m_status[idx] & SR_FRAMING_ERROR || m_overrun[idx]) { - m_isr[idx] |= IRQ_FOB; + isr |= IRQ_FOB; } - u8 isr = m_isr[idx]; - - if (isr != 0) + if ((isr & 0x7f) != 0) { isr |= 0x80; } @@ -440,9 +438,14 @@ u8 r65c52_device::read_isr(int idx) isr &= ~0x80; } - m_isr[idx] &= ~(IRQ_CTS | IRQ_DCD | IRQ_DSR | IRQ_FOB); + isr &= ~(IRQ_CTS | IRQ_DCD | IRQ_DSR | IRQ_FOB); - LOG("R65C52: %x ISR %x \n", idx + 1, m_isr[idx]); + if (!machine().side_effects_disabled()) + { + m_isr[idx] = isr; + LOG("R65C52: %x ISR %x \n", idx + 1, m_isr[idx]); + update_irq(idx); + } return isr; } diff --git a/src/devices/sound/roland_gp.cpp b/src/devices/sound/roland_gp.cpp new file mode 100644 index 00000000000..fb6c4f208c2 --- /dev/null +++ b/src/devices/sound/roland_gp.cpp @@ -0,0 +1,78 @@ +// license:BSD-3-Clause +// copyright-holders:giulioz + +// Initial skeleton based on the RE work by nukeykt + +#include "emu.h" +#include "roland_gp.h" + +// Original chip (GP-2) TODO +// DEFINE_DEVICE_TYPE(TC24SC201AF, tc6116_device, "tc24sc201af", "Roland GP TC24SC201AF PCM") + +// Newer chip (GP-4) including bugfixes and H8/500 cpu glue logic +DEFINE_DEVICE_TYPE(TC6116, tc6116_device, "tc6116", "Roland GP TC6116 PCM") + + +tc6116_device::tc6116_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + : device_t(mconfig, TC6116, tag, owner, clock) + , device_sound_interface(mconfig, *this) + , device_rom_interface(mconfig, *this) + , m_int_callback(*this) + , m_clock(0) + , m_rate(0) + , m_stream(nullptr) + , m_sel_chn(0) +{ +} + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void tc6116_device::device_start() +{ + m_clock = clock() / 2; + m_rate = m_clock / 512; // usually 32 KHz + + m_stream = stream_alloc(0, 2, m_rate); + + logerror("Roland GP: Clock %u, Rate %u\n", m_clock, m_rate); +} + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void tc6116_device::device_reset() +{ + m_int_callback(CLEAR_LINE); +} + +//------------------------------------------------- +// rom_bank_pre_change - refresh the stream if the +// ROM banking changes +//------------------------------------------------- + +void tc6116_device::rom_bank_pre_change() +{ + // unused right now + m_stream->update(); +} + + +u8 tc6116_device::read(offs_t offset) +{ + return 0xff; +} + +void tc6116_device::write(offs_t offset, u8 data) +{ +} + +//------------------------------------------------- +// sound_stream_update - handle a stream update +//------------------------------------------------- + +void tc6116_device::sound_stream_update(sound_stream &stream, std::vector const &inputs, std::vector &outputs) +{ +} diff --git a/src/devices/sound/roland_gp.h b/src/devices/sound/roland_gp.h new file mode 100644 index 00000000000..70f22085bed --- /dev/null +++ b/src/devices/sound/roland_gp.h @@ -0,0 +1,84 @@ +// license:BSD-3-Clause +// copyright-holders:giulioz +#ifndef MAME_SOUND_ROLANDGP_H +#define MAME_SOUND_ROLANDGP_H + +#pragma once + +#include "dirom.h" + +class tc6116_device : public device_t, public device_sound_interface, public device_rom_interface<23> +{ +public: + tc6116_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + + auto int_callback() { return m_int_callback.bind(); } + + u8 read(offs_t offset); + void write(offs_t offset, u8 data); + +protected: + // device_t implementation + virtual void device_start() override; + virtual void device_reset() override; + + // device_sound_interface implementation + virtual void sound_stream_update(sound_stream &stream, std::vector const &inputs, std::vector &outputs) override; + + // device_rom_interface implementation + virtual void rom_bank_pre_change() override; + +private: + static constexpr unsigned NUM_CHANNELS = 28; + + struct pcm_channel + { + pcm_channel() { } + + // registers + uint8_t pitch_coarse; + uint8_t pitch_fine; + uint8_t pan_l; + uint8_t pan_r; + uint8_t rev_send; + uint8_t chorus_send; + uint8_t volume1; + uint8_t volume1_speed; + uint8_t volume2; + uint8_t volume2_speed; + uint8_t cutoff; + uint8_t cutoff_speed; + + bool irq_enable; // 0 + bool filter_mode; // 1 (0:lpf, 1:hpf) + uint8_t resonance_flags; // 8-15 + + uint8_t sub_phase_addr; // 0-4 + bool key; // 5 + bool alt_loop; // 6 + bool reverse_play; // 7 + uint8_t hiaddr; // 8-11 + uint8_t nibble; // 2-15 + + // work variables + uint16_t sub_phase_state; // 0-13 + bool irq_disable; // 14 + bool alt_loop_state; // 15 + + uint16_t volume1_tv; + uint16_t volume2_tv; + uint16_t cutoff_tv; + }; + + devcb_write_line m_int_callback; + + uint32_t m_clock; // clock + uint32_t m_rate; // sample rate (usually 32000 Hz) + sound_stream* m_stream; // stream handle + pcm_channel m_chns[NUM_CHANNELS]; // channel memory + [[maybe_unused]] uint8_t m_sel_chn; // selected channel +}; + +DECLARE_DEVICE_TYPE(TC6116, tc6116_device) + +#endif // MAME_SOUND_ROLANDGP_H diff --git a/src/devices/sound/rolandpcm.cpp b/src/devices/sound/roland_lp.cpp similarity index 99% rename from src/devices/sound/rolandpcm.cpp rename to src/devices/sound/roland_lp.cpp index d1ec25c8f5c..fd63f56cf76 100644 --- a/src/devices/sound/rolandpcm.cpp +++ b/src/devices/sound/roland_lp.cpp @@ -21,10 +21,10 @@ // 02/03 - ?? (read after writing to 10/12) #include "emu.h" -#include "rolandpcm.h" +#include "roland_lp.h" -DEFINE_DEVICE_TYPE(MB87419_MB87420, mb87419_mb87420_device, "mb87419_mb87420", "Roland MB87419/MB87420 PCM") +DEFINE_DEVICE_TYPE(MB87419_MB87420, mb87419_mb87420_device, "mb87419_mb87420", "Roland LP MB87419/MB87420 PCM") mb87419_mb87420_device::mb87419_mb87420_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, MB87419_MB87420, tag, owner, clock) diff --git a/src/devices/sound/rolandpcm.h b/src/devices/sound/roland_lp.h similarity index 95% rename from src/devices/sound/rolandpcm.h rename to src/devices/sound/roland_lp.h index c8f1ebb5c08..24db843fd36 100644 --- a/src/devices/sound/rolandpcm.h +++ b/src/devices/sound/roland_lp.h @@ -1,7 +1,7 @@ // license:BSD-3-Clause // copyright-holders:Valley Bell -#ifndef MAME_SOUND_ROLANDPCM_H -#define MAME_SOUND_ROLANDPCM_H +#ifndef MAME_SOUND_ROLANDLP_H +#define MAME_SOUND_ROLANDLP_H #pragma once @@ -66,4 +66,4 @@ class mb87419_mb87420_device : public device_t, public device_sound_interface, p DECLARE_DEVICE_TYPE(MB87419_MB87420, mb87419_mb87420_device) -#endif // MAME_SOUND_ROLANDPCM_H +#endif // MAME_SOUND_ROLANDLP_H diff --git a/src/devices/video/t6963c.cpp b/src/devices/video/t6963c.cpp index bf0841450c0..a2e254809c7 100644 --- a/src/devices/video/t6963c.cpp +++ b/src/devices/video/t6963c.cpp @@ -5,6 +5,12 @@ Toshiba T6963C Dot Matrix LCD Controller Sharp LM24014H Dot Matrix LCD Unit + TODO: + - cursor + - screen peek + - screen copy + - auto read mode + **********************************************************************/ #include "emu.h" @@ -51,6 +57,7 @@ t6963c_device::t6963c_device(const machine_config &mconfig, const char *tag, dev , m_font_size(6) , m_number_cols(40) , m_number_lines(8) + , m_read_data(0) { } @@ -89,6 +96,7 @@ void t6963c_device::device_start() save_item(NAME(m_font_size)); save_item(NAME(m_number_cols)); save_item(NAME(m_number_lines)); + save_item(NAME(m_read_data)); } @@ -117,7 +125,7 @@ void t6963c_device::device_reset() u8 t6963c_device::read(offs_t offset) { - return BIT(offset, 0) ? 0x2b : 0x00; + return BIT(offset, 0) ? 0x2b : m_read_data; } @@ -219,7 +227,7 @@ void t6963c_device::do_command(u8 cmd) if (cmd == 0x90) LOG("%s: Display off\n", machine().describe_context()); else - LOG("%s: Text %s, graphic %s, cursor %s, blink %s\n", + LOG("%s: Graphic %s, text %s, cursor %s, blink %s\n", machine().describe_context(), BIT(cmd, 3) ? "on" : "off", BIT(cmd, 2) ? "on" : "off", @@ -251,6 +259,7 @@ void t6963c_device::do_command(u8 cmd) : (cmd & 0x0e) == 0x02 ? "decrement" : (cmd & 0x0e) == 0x04 ? "nonvariable" : "invalid"); + m_read_data = m_display_ram->read_byte(m_adp); } else { @@ -327,7 +336,7 @@ uint32_t t6963c_device::screen_update(screen_device &screen, bitmap_ind16 &bitma bitmap.fill(0, cliprect); // Text layer - if (BIT(m_display_mode, 3)) + if (BIT(m_display_mode, 2)) { offs = m_text_home; for(int y=0; y lm24014h_device diff --git a/src/devices/video/x1_001.cpp b/src/devices/video/x1_001.cpp index 59ea53bd062..b0502765a54 100644 --- a/src/devices/video/x1_001.cpp +++ b/src/devices/video/x1_001.cpp @@ -82,7 +82,7 @@ void x1_001_device::device_start() perspective. jjsquawk has a garbage tile in the bottom left instead, but in this case the entire - m_spriteylow is initalized (to 0), but sprite entry 0 for the other tables is never + m_spriteylow is initialized (to 0), but sprite entry 0 for the other tables is never written to, again meaning it picks up whatever we clear the RAM to as positional values. diff --git a/src/mame/apple/maciifx.cpp b/src/mame/apple/maciifx.cpp index 443da50dde4..a4cac3b7baa 100644 --- a/src/mame/apple/maciifx.cpp +++ b/src/mame/apple/maciifx.cpp @@ -19,8 +19,8 @@ #include "macadb.h" #include "macrtc.h" -#include "macscsi.h" #include "mactoolbox.h" +#include "scsidma.h" #include "bus/nscsi/cd.h" #include "bus/nscsi/devices.h" @@ -59,11 +59,9 @@ class maciifx_state : public driver_device m_macadb(*this, "macadb"), m_ram(*this, RAM_TAG), m_rtc(*this, "rtc"), + m_scsidma(*this, "scsidma"), m_fdc(*this, "fdc"), m_floppy(*this, "fdc:%d", 0U), - m_scsibus1(*this, "scsi"), - m_ncr5380(*this, "scsi:7:ncr5380"), - m_scsihelp(*this, "scsihelp"), m_scc(*this, "scc"), m_asc(*this, "asc"), m_cur_floppy(nullptr), @@ -89,11 +87,9 @@ class maciifx_state : public driver_device required_device m_macadb; required_device m_ram; required_device m_rtc; + required_device m_scsidma; required_device m_fdc; required_device_array m_floppy; - required_device m_scsibus1; - required_device m_ncr5380; - required_device m_scsihelp; required_device m_scc; required_device m_asc; @@ -110,16 +106,6 @@ class maciifx_state : public driver_device int m_adb_in; - u16 scsi_r(offs_t offset, u16 mem_mask = ~0); - void scsi_w(offs_t offset, u16 data, u16 mem_mask = ~0); - u32 scsi_drq_r(offs_t offset, u32 mem_mask = ~0); - void scsi_drq_w(offs_t offset, u32 data, u32 mem_mask = ~0); - - void scsi_berr_w(u8 data) - { - m_maincpu->pulse_input_line(M68K_LINE_BUSERROR, attotime::zero); - } - void phases_w(uint8_t phases); void devsel_w(uint8_t devsel); void fdc_hdsel(int state); @@ -132,8 +118,6 @@ class maciifx_state : public driver_device uint8_t oss_r(offs_t offset); void oss_w(offs_t offset, uint8_t data); uint32_t buserror_r(); - uint8_t maciifx_8010_r(); - uint8_t maciifx_8040_r(); uint16_t via_r(offs_t offset); void via_w(offs_t offset, uint16_t data, uint16_t mem_mask); @@ -209,12 +193,7 @@ void maciifx_state::maciifx_map(address_map &map) map(0x50000000, 0x50001fff).rw(FUNC(maciifx_state::via_r), FUNC(maciifx_state::via_w)).mirror(0x00f00000); map(0x50004000, 0x50005fff).rw("sccpic", FUNC(applepic_device::host_r), FUNC(applepic_device::host_w)).mirror(0x00f00000).umask32(0xff00ff00); map(0x50004000, 0x50005fff).rw("sccpic", FUNC(applepic_device::host_r), FUNC(applepic_device::host_w)).mirror(0x00f00000).umask32(0x00ff00ff); - map(0x50008010, 0x50008010).r(FUNC(maciifx_state::maciifx_8010_r)).mirror(0x00f00000); - map(0x50008040, 0x50008040).r(FUNC(maciifx_state::maciifx_8040_r)).mirror(0x00f00000); - map(0x5000a000, 0x5000bfff).rw(FUNC(maciifx_state::scsi_r), FUNC(maciifx_state::scsi_w)).mirror(0x00f00000); - map(0x5000c060, 0x5000c063).r(FUNC(maciifx_state::scsi_drq_r)).mirror(0x00f00000); - map(0x5000d000, 0x5000d003).w(FUNC(maciifx_state::scsi_drq_w)).mirror(0x00f00000); - map(0x5000d060, 0x5000d063).r(FUNC(maciifx_state::scsi_drq_r)).mirror(0x00f00000); + map(0x50008000, 0x50009fff).m(m_scsidma, FUNC(scsidma_device::map)).mirror(0x0ff80000); map(0x50010000, 0x50011fff).rw(m_asc, FUNC(asc_device::read), FUNC(asc_device::write)).mirror(0x00f00000); map(0x50012000, 0x50013fff).rw("swimpic", FUNC(applepic_device::host_r), FUNC(applepic_device::host_w)).mirror(0x00f00000).umask32(0xff00ff00); map(0x50012000, 0x50013fff).rw("swimpic", FUNC(applepic_device::host_r), FUNC(applepic_device::host_w)).mirror(0x00f00000).umask32(0x00ff00ff); @@ -296,68 +275,6 @@ void maciifx_state::via_out_b(uint8_t data) m_rtc->clk_w((data >> 1) & 0x01); } -u16 maciifx_state::scsi_r(offs_t offset, u16 mem_mask) -{ - const int reg = (offset >> 3) & 0xf; - const bool pseudo_dma = (reg == 6) && (offset == 0x130); - - return m_scsihelp->read_wrapper(pseudo_dma, reg) << 8; -} - -void maciifx_state::scsi_w(offs_t offset, u16 data, u16 mem_mask) -{ - const int reg = (offset >> 3) & 0xf; - const bool pseudo_dma = (reg == 0) && (offset == 0x100); - - m_scsihelp->write_wrapper(pseudo_dma, reg, data >> 8); -} - -u32 maciifx_state::scsi_drq_r(offs_t offset, u32 mem_mask) -{ - switch (mem_mask) - { - case 0xff000000: - return m_scsihelp->read_wrapper(true, 6) << 24; - - case 0xffff0000: - return (m_scsihelp->read_wrapper(true, 6) << 24) | (m_scsihelp->read_wrapper(true, 6) << 16); - - case 0xffffffff: - return (m_scsihelp->read_wrapper(true, 6) << 24) | (m_scsihelp->read_wrapper(true, 6) << 16) | (m_scsihelp->read_wrapper(true, 6) << 8) | m_scsihelp->read_wrapper(true, 6); - - default: - logerror("scsi_drq_r: unknown mem_mask %08x\n", mem_mask); - } - - return 0; -} - -void maciifx_state::scsi_drq_w(offs_t offset, u32 data, u32 mem_mask) -{ - switch (mem_mask) - { - case 0xff000000: - m_scsihelp->write_wrapper(true, 0, data >> 24); - break; - - case 0xffff0000: - m_scsihelp->write_wrapper(true, 0, data >> 24); - m_scsihelp->write_wrapper(true, 0, data >> 16); - break; - - case 0xffffffff: - m_scsihelp->write_wrapper(true, 0, data >> 24); - m_scsihelp->write_wrapper(true, 0, data >> 16); - m_scsihelp->write_wrapper(true, 0, data >> 8); - m_scsihelp->write_wrapper(true, 0, data & 0xff); - break; - - default: - logerror("scsi_drq_w: unknown mem_mask %08x\n", mem_mask); - break; - } -} - void maciifx_state::phases_w(uint8_t phases) { if (m_cur_floppy) @@ -485,16 +402,6 @@ uint32_t maciifx_state::buserror_r() return 0; } -uint8_t maciifx_state::maciifx_8010_r() -{ - return 0x40; -} - -uint8_t maciifx_state::maciifx_8040_r() -{ - return 0; -} - /*************************************************************************** DEVICE CONFIG ***************************************************************************/ @@ -524,7 +431,7 @@ void maciifx_state::maciifx(machine_config &config) applefdintf_device::add_35_nc(config, m_floppy[1]); SOFTWARE_LIST(config, "flop35hd_list").set_original("mac_hdflop"); - SOFTWARE_LIST(config, "cd_list").set_original("mac_cdrom").set_filter("MC68030"); + SOFTWARE_LIST(config, "cd_list").set_original("mac_cdrom").set_filter("MC68030,MC68030_32"); SCC85C30(config, m_scc, C7M); m_scc->configure_channels(3'686'400, 3'686'400, 3'686'400, 3'686'400); @@ -541,33 +448,9 @@ void maciifx_state::maciifx(machine_config &config) rs232b.dcd_handler().set(m_scc, FUNC(z80scc_device::dcdb_w)); rs232b.cts_handler().set(m_scc, FUNC(z80scc_device::ctsb_w)); - NSCSI_BUS(config, "scsi"); - NSCSI_CONNECTOR(config, "scsi:0", mac_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:1", mac_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:2", mac_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:3").option_set("cdrom", NSCSI_CDROM_APPLE).machine_config( - [](device_t *device) - { - device->subdevice("cdda")->add_route(0, "^^lspeaker", 1.0); - device->subdevice("cdda")->add_route(1, "^^rspeaker", 1.0); - }); - NSCSI_CONNECTOR(config, "scsi:4", mac_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:5", mac_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsi:6", mac_scsi_devices, "harddisk"); - NSCSI_CONNECTOR(config, "scsi:7").option_set("ncr5380", NCR53C80).machine_config([this](device_t *device) - { - ncr53c80_device &adapter = downcast(*device); - adapter.irq_handler().set(*this, FUNC(maciifx_state::oss_interrupt<9>)); - adapter.drq_handler().set(m_scsihelp, FUNC(mac_scsi_helper_device::drq_w)); - }); - - MAC_SCSI_HELPER(config, m_scsihelp); - m_scsihelp->scsi_read_callback().set(m_ncr5380, FUNC(ncr53c80_device::read)); - m_scsihelp->scsi_write_callback().set(m_ncr5380, FUNC(ncr53c80_device::write)); - m_scsihelp->scsi_dma_read_callback().set(m_ncr5380, FUNC(ncr53c80_device::dma_r)); - m_scsihelp->scsi_dma_write_callback().set(m_ncr5380, FUNC(ncr53c80_device::dma_w)); - m_scsihelp->cpu_halt_callback().set_inputline(m_maincpu, INPUT_LINE_HALT); - m_scsihelp->timeout_error_callback().set(FUNC(maciifx_state::scsi_berr_w)); + SCSIDMA(config, m_scsidma, C15M); + m_scsidma->set_maincpu_tag("maincpu"); + m_scsidma->write_irq().set(FUNC(maciifx_state::oss_interrupt<9>)); SOFTWARE_LIST(config, "hdd_list").set_original("mac_hdd"); @@ -638,4 +521,4 @@ ROM_END } // anonymous namespace -COMP(1990, maciifx, 0, 0, maciifx, maciifx, maciifx_state, empty_init, "Apple Computer", "Macintosh IIfx", MACHINE_NOT_WORKING) +COMP(1990, maciifx, 0, 0, maciifx, maciifx, maciifx_state, empty_init, "Apple Computer", "Macintosh IIfx", MACHINE_SUPPORTS_SAVE) diff --git a/src/mame/apple/scsidma.cpp b/src/mame/apple/scsidma.cpp new file mode 100644 index 00000000000..d73e2ccb548 --- /dev/null +++ b/src/mame/apple/scsidma.cpp @@ -0,0 +1,292 @@ +// license:BSD-3-Clause +// copyright-holders:R. Belmont +/* + Apple SCSI DMA ASIC (343S0064) + Emulation by R. Belmont + + This ASIC consists of an NCR 53C80 standard cell plus custom Apple + circuitry to do hardware handshaking on blind MOVE.L (A0), (A2)+ + style transfers. True DMA to the full 32-bit address space is also + available, along with automated SCSI bus arbitration. + + However, no shipped version of MacOS supports the full DMA mode. When + A/UX is supported we will check out if that uses it. +*/ + +#include "emu.h" +#include "scsidma.h" + +#include "bus/nscsi/cd.h" +#include "bus/nscsi/devices.h" +#include "machine/nscsi_bus.h" + +#define LOG_IRQ (1U << 1) +#define LOG_DRQ (1U << 2) +#define LOG_HANDSHAKE (1U << 3) + +#define VERBOSE (0) +#define LOG_OUTPUT_FUNC osd_printf_info +#include "logmacro.h" + +static constexpr u16 CTRL_DMAEN = 0x0001; +static constexpr u16 CTRL_IRQEN = 0x0002; +static constexpr u16 CTRL_HNDSHK = 0x0008; +static constexpr u16 CTRL_SCIRQEN = 0x0040; +static constexpr u16 CTRL_WDIRQ = 0x0080; +static constexpr u16 CTRL_DMABERR = 0x0100; +static constexpr u16 CTRL_ARBEN = 0x1000; +static constexpr u16 CTRL_WONARB = 0x2000; + +DEFINE_DEVICE_TYPE(SCSIDMA, scsidma_device, "scsidma", "Apple SCSIDMA ASIC") + +void scsidma_device::map(address_map &map) +{ + map(0x0000, 0x007f).rw(FUNC(scsidma_device::scsi_r), FUNC(scsidma_device::scsi_w)); + map(0x0000, 0x0003).w(FUNC(scsidma_device::handshake_w)); + map(0x0060, 0x0063).r(FUNC(scsidma_device::handshake_r)); + map(0x0080, 0x0083).rw(FUNC(scsidma_device::control_r), FUNC(scsidma_device::control_w)); +} + +void scsidma_device::device_add_mconfig(machine_config &config) +{ + NSCSI_BUS(config, m_scsibus); + NSCSI_CONNECTOR(config, "scsi:0", mac_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:1", mac_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:2", mac_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:3").option_set("cdrom", NSCSI_CDROM_APPLE).machine_config([](device_t *device) + { + device->subdevice("cdda")->add_route(0, "^^^lspeaker", 1.0); + device->subdevice("cdda")->add_route(1, "^^^rspeaker", 1.0); + }); + NSCSI_CONNECTOR(config, "scsi:4", mac_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:5", mac_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:6", mac_scsi_devices, "harddisk"); + NSCSI_CONNECTOR(config, "scsi:7").option_set("ncr53c80", NCR53C80).machine_config([this](device_t *device) + { + ncr5380_device &adapter = downcast(*device); + adapter.irq_handler().set(*this, FUNC(scsidma_device::scsi_irq_w)); + adapter.drq_handler().set(*this, FUNC(scsidma_device::scsi_drq_w)); + }); +} + +scsidma_device::scsidma_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + device_t(mconfig, SCSIDMA, tag, owner, clock), + m_maincpu(*this, finder_base::DUMMY_TAG), + m_scsibus(*this, "scsi"), + m_ncr(*this, "scsi:7:ncr53c80"), + m_irq(*this), + m_scsi_irq(0), + m_control(0), + m_holding(0), + m_holding_remaining(0) +{ +} + +void scsidma_device::device_start() +{ + m_maincpu->set_emmu_enable(true); + + save_item(NAME(m_control)); + save_item(NAME(m_holding)); + save_item(NAME(m_holding_remaining)); +} + +void scsidma_device::device_reset() +{ + m_control = 0; + m_holding = 0; + m_holding_remaining = 0; +} + +u32 scsidma_device::control_r() +{ + return m_control; +} + +void scsidma_device::control_w(u32 data) +{ + LOGMASKED(LOG_GENERAL, "%s: control_w %08x (PC=%08x)\n", tag(), data, m_maincpu->pc()); + + // check for unemulated features + if (data & CTRL_DMAEN) + { + fatalerror("%s: DMA mode enabled, but not supported!\n", tag()); + } + if (data & CTRL_ARBEN) + { + fatalerror("%s: Auto-arbitration enabled, but not supported!\n", tag()); + } + + m_control &= CTRL_SCIRQEN | CTRL_WDIRQ | CTRL_DMABERR | CTRL_WONARB; + m_control |= data & ~(CTRL_SCIRQEN | CTRL_WDIRQ | CTRL_DMABERR | CTRL_WONARB); +} + +u8 scsidma_device::scsi_r(offs_t offset) +{ + return m_ncr->read(offset>>4); +} + +void scsidma_device::scsi_w(offs_t offset, u8 data) +{ + m_ncr->write(offset>>4, data); +} + +u32 scsidma_device::handshake_r(offs_t offset, u32 mem_mask) +{ + if (mem_mask == 0xff000000) + { + if (m_control & CTRL_HNDSHK) + { + if (m_drq) + { + return m_ncr->dma_r() << 24; + } + else + { + LOGMASKED(LOG_HANDSHAKE, "Handshaking single byte, no DRQ\n"); + m_maincpu->restart_this_instruction(); + m_maincpu->spin_until_time(attotime::from_usec(50)); + return 0xffffffff; + } + } + else + { + LOGMASKED(LOG_HANDSHAKE, "Non-handshake single byte\n"); + if (m_drq) + { + return m_ncr->dma_r() << 24; + } + else + { + return m_ncr->read(6) << 24; + } + } + } + else if ((mem_mask == 0xffffffff) || (mem_mask == 0xffff0000)) + { + // are we here from a restart? + if (!m_holding_remaining) + { + m_holding = 0; + if (mem_mask == 0xffffffff) + { + m_holding_remaining = 4; + } + else if (mem_mask == 0xffff0000) + { + m_holding_remaining = 2; + } + } + + // is a new byte available? + while (m_drq && m_holding_remaining) + { + m_holding <<= 8; + m_holding |= m_ncr->dma_r(); + m_holding_remaining--; + LOGMASKED(LOG_HANDSHAKE, "Holding %08x, remain %d\n", m_holding, m_holding_remaining); + } + + if (!m_holding_remaining) + { + return m_holding; + } + + LOGMASKED(LOG_HANDSHAKE, "Handshaking %d byte read\n", m_holding_remaining); + m_maincpu->restart_this_instruction(); + m_maincpu->spin_until_time(attotime::from_usec(50)); + return 0xffffffff; + } + fatalerror("%s: Unhandled handshake read mask %08x\n", tag(), mem_mask); + return 0xffffffff; +} + +void scsidma_device::handshake_w(offs_t offset, u32 data, u32 mem_mask) +{ + if (mem_mask == 0xff000000) + { + if (m_control & CTRL_HNDSHK) + { + if (m_drq) + { + m_ncr->dma_w(data >> 24); + return; + } + else + { + LOGMASKED(LOG_HANDSHAKE, "Handshake single byte write\n"); + m_maincpu->restart_this_instruction(); + m_maincpu->spin_until_time(attotime::from_usec(50)); + return; + } + } + else + { + LOGMASKED(LOG_HANDSHAKE, "Non-handshake single byte write, DRQ %d\n", m_drq); + if (m_drq) + { + m_ncr->dma_w(data >> 24); + return; + } + else + { + m_ncr->write(0, data >> 24); + return; + } + } + } + else if ((mem_mask == 0xffffffff) || (mem_mask == 0xffff0000)) + { + // are we here from a restart? + if (!m_holding_remaining) + { + m_holding = data; + if (mem_mask == 0xffffffff) + { + m_holding_remaining = 4; + } + else if (mem_mask == 0xffff0000) + { + m_holding_remaining = 2; + } + } + + // is a new byte available? + while (m_drq && m_holding_remaining) + { + m_ncr->dma_w(m_holding >> 24); + m_holding <<= 8; + m_holding_remaining--; + LOGMASKED(LOG_HANDSHAKE, "Holding write %08x, remain %d\n", m_holding, m_holding_remaining); + } + + if (!m_holding_remaining) + { + return; + } + + LOGMASKED(LOG_HANDSHAKE, "Handshaking %d byte write\n", m_holding_remaining); + m_maincpu->restart_this_instruction(); + m_maincpu->spin_until_time(attotime::from_usec(50)); + return; + } + fatalerror("%s: Unhandled handshake write mask %08x\n", tag(), mem_mask); +} + +void scsidma_device::scsi_irq_w(int state) +{ + LOGMASKED(LOG_IRQ, "%s: 53C80 IRQ: %d (was %d)\n", tag(), state, m_scsi_irq); + m_scsi_irq = state; + m_control &= ~CTRL_SCIRQEN; + m_control |= state ? CTRL_SCIRQEN : 0; + if (m_control & CTRL_IRQEN) + { + m_irq(state); + } +} + +void scsidma_device::scsi_drq_w(int state) +{ + LOGMASKED(LOG_DRQ, "%s: 53C80 DRQ %d (was %d)\n", tag(), state, m_drq); + m_drq = state; +} diff --git a/src/mame/apple/scsidma.h b/src/mame/apple/scsidma.h new file mode 100644 index 00000000000..fe0ba49112b --- /dev/null +++ b/src/mame/apple/scsidma.h @@ -0,0 +1,56 @@ +// license:BSD-3-Clause +// copyright-holders:R. Belmont + +#ifndef MAME_APPLE_SCSIDMA_H +#define MAME_APPLE_SCSIDMA_H + +#pragma once + +#include "cpu/m68000/m68030.h" +#include "machine/ncr5380.h" + +class scsidma_device : public device_t +{ +public: + // construction/destruction + scsidma_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + + template void set_maincpu_tag(T &&... args) { m_maincpu.set_tag(std::forward(args)...); } + + auto write_irq() { return m_irq.bind(); } + + void map(address_map &map); + +protected: + // device-level overrides + virtual void device_start() override; + virtual void device_reset() override; + virtual void device_add_mconfig(machine_config &config) override; + + required_device m_maincpu; + required_device m_scsibus; + required_device m_ncr; + + devcb_write_line m_irq; + +private: + void scsi_irq_w(int state); + void scsi_drq_w(int state); + + u8 scsi_r(offs_t offset); + void scsi_w(offs_t offset, u8 data); + u32 control_r(); + void control_w(u32 data); + u32 handshake_r(offs_t offset, u32 mem_mask); + void handshake_w(offs_t offset, u32 data, u32 mem_mask); + + s32 m_drq, m_scsi_irq; + u32 m_control; + u32 m_holding; + u8 m_holding_remaining; +}; + +// device type definition +DECLARE_DEVICE_TYPE(SCSIDMA, scsidma_device) + +#endif // MAME_APPLE_SCSIDMA_H diff --git a/src/mame/atari/atetris.cpp b/src/mame/atari/atetris.cpp index 9d4ffc4b739..b964d54c2de 100644 --- a/src/mame/atari/atetris.cpp +++ b/src/mame/atari/atetris.cpp @@ -201,6 +201,8 @@ class atetris_mcu_state : public atetris_state } void atetrisb3(machine_config &config); + void atetrisb3_11mhz(machine_config &config); + protected: uint8_t mcu_bus_r(); @@ -672,12 +674,16 @@ void atetris_mcu_state::atetrisb3(machine_config &config) SN76489A(config, m_sn[i], 4_MHz_XTAL).add_route(ALL_OUTPUTS, "mono", 0.50); } - -void atetris_m5205_state::atetb5205(machine_config &config) +void atetris_mcu_state::atetrisb3_11mhz(machine_config &config) { atetrisb3(config); m_mcu->set_clock(11_MHz_XTAL); +} + +void atetris_m5205_state::atetb5205(machine_config &config) +{ + atetrisb3_11mhz(config); // TODO: Properly hook up OKI M5205 MSM5205(config, m_msm, 400_kHz_XTAL); @@ -808,6 +814,32 @@ ROM_START( atetrisb3 ) ROM_LOAD( "pal16r4b-2cn.6", 0xa00, 0x104, NO_DUMP ) ROM_END +// Korean bootleg titled 링크. 11 MHz xtal for the 8749. 1 bank of 4 dip switches. +ROM_START( link ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "prg.bin", 0x0000, 0x10000, CRC(2bcab107) SHA1(3cfb8df8cd3782f3ff7f6b32ff15c461352061ee) ) + + ROM_REGION( 0x10000, "tiles", 0 ) + ROM_LOAD( "a2.bin", 0x0000, 0x10000, BAD_DUMP CRC(49fa3d01) SHA1(af4c646b9c8fbe2803c17b90d3a7e4f6523f2745) ) // Damaged ROM + + // 8749 (11 MHz OSC) emulates POKEYs + ROM_REGION( 0x0800, "mcu", 0 ) + ROM_LOAD( "8749h.bin", 0x0000, 0x0800, CRC(a66a9c47) SHA1(fbebd755a5e826c7d94ebcafdff2f9a01c9fd1a5) ) + ROM_FILL( 0x06e2, 1, 0x96 ) // patch illegal opcode + + // currently unused + ROM_REGION( 0x0020, "proms", 0 ) + ROM_LOAD( "82s123.bin", 0x00000, 0x0020, NO_DUMP ) + + ROM_REGION( 0xc00, "plds", 0 ) + ROM_LOAD( "gal18v8a-25lp.1", 0x000, 0x117, NO_DUMP ) + ROM_LOAD( "gal18v8a-25lp.2", 0x200, 0x117, NO_DUMP ) + ROM_LOAD( "palce18v8h-25pc.3", 0x400, 0x117, NO_DUMP ) + ROM_LOAD( "palce18v8h-25pc.4", 0x600, 0x117, NO_DUMP ) + ROM_LOAD( "pal16r4b-2cn.5", 0x800, 0x104, NO_DUMP ) + ROM_LOAD( "pal16r4b-2cn.6", 0xa00, 0x104, NO_DUMP ) +ROM_END + ROM_START( atetrisb4 ) // bootleg on an unusually big PCB for this game ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "1.bin", 0x0000, 0x10000, CRC(56589096) SHA1(df0ff776f3e3506c86d703d2283db59a576abea6) ) // only difference is the credits for 'video graphics' where changed @@ -872,7 +904,7 @@ ROM_START( atetb3482 ) ROM_REGION( 0x8000, "soundcpu", 0 ) // Not hooked up ROM_LOAD( "k1-d3.bin", 0x0000, 0x8000, CRC(ce51c82b) SHA1(f90ed16f817e6b2a22b69db20348386b9c1ecb67) ) // Same 8K repeated four times - // See http://www.seanriddle.com/um348x/ for notes about the UM3482 + // See http://www.seanriddle.com/um348x/ and http://arcadehacker.blogspot.com/2020/07/um3481a-series-multi-instrument-melody.html for notes about the UM3482 ROM_REGION( 0x01f0, "um3482", 0 ) // Not hooked up /* Notes (3584 bits, which matches the datasheet's 512 7-bit notes). @@ -943,8 +975,8 @@ ROM_START( atetb5205 ) ROM_REGION( 0x40000, "oki", 0) ROM_LOAD( "1_am27c512.bin", 0x00000, 0x10000, CRC(3aecab3f) SHA1(f072ca51298a2c88ff1feb24933f2ffdb7f8eb63) ) - ROM_LOAD( "2_tms27c512.bin", 0x10000, 0x10000, CRC(953d0ec4) SHA1(af2586332411d9b552241300e61c73463b0ffc5f) ) - ROM_LOAD( "3_m5l27512.bin", 0x20000, 0x10000, BAD_DUMP CRC(20c1e632) SHA1(b33d276775e1f81a0c4799f2779c4d378436f7be) ) // Bitrotten, 0x1136 address bad + ROM_LOAD( "2_tms27c512.bin", 0x10000, 0x10000, CRC(b0c7353c) SHA1(f452ad0a055027d32da30104d1ad40f7fbcc34fb) ) + ROM_LOAD( "3_m5l27512.bin", 0x20000, 0x10000, CRC(20c1e632) SHA1(b33d276775e1f81a0c4799f2779c4d378436f7be) ) ROM_LOAD( "4_am27c512.bin", 0x30000, 0x10000, CRC(a3a7fe78) SHA1(babbbe332a2b15efb67476e3563aeabaede2b55a) ) // PROM on main PCB @@ -1026,15 +1058,16 @@ ROM_END * *************************************/ -GAME( 1988, atetris, 0, atetris, atetris, atetris_state, empty_init, ROT0, "Atari Games", "Tetris (set 1)", MACHINE_SUPPORTS_SAVE ) -GAME( 1988, atetrisa, atetris, atetris, atetris, atetris_state, empty_init, ROT0, "Atari Games", "Tetris (set 2)", MACHINE_SUPPORTS_SAVE ) -GAME( 1988, atetrisb, atetris, atetris, atetris, atetris_state, empty_init, ROT0, "bootleg", "Tetris (bootleg set 1)", MACHINE_SUPPORTS_SAVE ) -GAME( 1988, atetrisb2, atetris, atetrisb2, atetris, atetris_state, empty_init, ROT0, "bootleg", "Tetris (bootleg set 2)", MACHINE_SUPPORTS_SAVE ) -GAME( 1988, atetrisb3, atetris, atetrisb3, atetris, atetris_mcu_state, empty_init, ROT0, "bootleg", "Tetris (bootleg set 3)", MACHINE_SUPPORTS_SAVE ) -GAME( 1988, atetrisb4, atetris, atetris, atetris, atetris_state, empty_init, ROT0, "bootleg", "Tetris (bootleg set 4)", MACHINE_SUPPORTS_SAVE ) -GAME( 1988, atetrisb5, atetris, atetrisb5, atetris, atetris_state, empty_init, ROT0, "bootleg", "Tetris (bootleg set 5)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) -GAME( 1988, atetb3482, atetris, atetris, atetris, atetris_state, empty_init, ROT0, "bootleg", "Tetris (bootleg set 6, with UM3482)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) -GAME( 1988, atetb5205, atetris, atetb5205, atetris, atetris_m5205_state, empty_init, ROT0, "bootleg", "Tetris (bootleg set 7, with OKI M5205)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) -GAME( 1989, atetrisbp, atetris, atetrisbp, atetris, atetris_bartop_state, empty_init, ROT0, "Atari Games", "Tetris (bartop, prototype)", MACHINE_SUPPORTS_SAVE ) -GAME( 1989, atetrisc, atetris, atetris, atetrisc, atetris_state, empty_init, ROT270, "Atari Games", "Tetris (cocktail set 1)", MACHINE_SUPPORTS_SAVE ) -GAME( 1989, atetrisc2, atetris, atetris, atetrisc, atetris_state, empty_init, ROT270, "Atari Games", "Tetris (cocktail set 2)", MACHINE_SUPPORTS_SAVE ) +GAME( 1988, atetris, 0, atetris, atetris, atetris_state, empty_init, ROT0, "Atari Games", "Tetris (set 1)", MACHINE_SUPPORTS_SAVE ) +GAME( 1988, atetrisa, atetris, atetris, atetris, atetris_state, empty_init, ROT0, "Atari Games", "Tetris (set 2)", MACHINE_SUPPORTS_SAVE ) +GAME( 1988, atetrisb, atetris, atetris, atetris, atetris_state, empty_init, ROT0, "bootleg", "Tetris (bootleg set 1)", MACHINE_SUPPORTS_SAVE ) +GAME( 1988, atetrisb2, atetris, atetrisb2, atetris, atetris_state, empty_init, ROT0, "bootleg", "Tetris (bootleg set 2)", MACHINE_SUPPORTS_SAVE ) +GAME( 1988, atetrisb3, atetris, atetrisb3, atetris, atetris_mcu_state, empty_init, ROT0, "bootleg", "Tetris (bootleg set 3)", MACHINE_SUPPORTS_SAVE ) +GAME( 1988, atetrisb4, atetris, atetris, atetris, atetris_state, empty_init, ROT0, "bootleg", "Tetris (bootleg set 4)", MACHINE_SUPPORTS_SAVE ) +GAME( 1988, atetrisb5, atetris, atetrisb5, atetris, atetris_state, empty_init, ROT0, "bootleg", "Tetris (bootleg set 5)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) +GAME( 1988, atetb3482, atetris, atetris, atetris, atetris_state, empty_init, ROT0, "bootleg", "Tetris (bootleg set 6, with UM3482)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) +GAME( 1988, atetb5205, atetris, atetb5205, atetris, atetris_m5205_state, empty_init, ROT0, "bootleg", "Tetris (bootleg set 7, with OKI M5205)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) +GAME( 1988, link, atetris, atetrisb3_11mhz, atetris, atetris_mcu_state, empty_init, ROT0, "bootleg", "Link (Korean bootleg of Atari Tetris)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS ) // Bad gfx ROM +GAME( 1989, atetrisbp, atetris, atetrisbp, atetris, atetris_bartop_state, empty_init, ROT0, "Atari Games", "Tetris (bartop, prototype)", MACHINE_SUPPORTS_SAVE ) +GAME( 1989, atetrisc, atetris, atetris, atetrisc, atetris_state, empty_init, ROT270, "Atari Games", "Tetris (cocktail set 1)", MACHINE_SUPPORTS_SAVE ) +GAME( 1989, atetrisc2, atetris, atetris, atetrisc, atetris_state, empty_init, ROT270, "Atari Games", "Tetris (cocktail set 2)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/casio/pv1000.cpp b/src/mame/casio/pv1000.cpp index 9ec3b3b2632..6b3206f6bec 100644 --- a/src/mame/casio/pv1000.cpp +++ b/src/mame/casio/pv1000.cpp @@ -353,23 +353,23 @@ DEVICE_IMAGE_LOAD_MEMBER(pv1000_state::cart_load) uint32_t pv1000_state::screen_update_pv1000(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - bitmap.fill(m_border_col); // TODO: might be either black or colored by this register + bitmap.fill(m_border_col); // border is on top and bottom for (int y = 0; y < 24; y++) { - for (int x = 2; x < 30; x++) // left-right most columns are definitely masked by the border color + for (int x = 2; x < 30; x++) // left-right most columns never even drawn, black instead { uint16_t tile = m_p_videoram[y * 32 + x]; if (tile < 0xe0 || m_force_pattern) { tile += (m_pcg_bank << 8); - m_gfxdecode->gfx(0)->opaque(bitmap,cliprect, tile, 0, 0, 0, x*8, y*8); + m_gfxdecode->gfx(0)->opaque(bitmap,cliprect, tile, 0, 0, 0, x*8-16, y*8+26); } else { tile -= 0xe0; - m_gfxdecode->gfx(1)->opaque(bitmap,cliprect, tile, 0, 0, 0, x*8, y*8); + m_gfxdecode->gfx(1)->opaque(bitmap,cliprect, tile, 0, 0, 0, x*8-16, y*8+26); } } } @@ -380,7 +380,7 @@ uint32_t pv1000_state::screen_update_pv1000(screen_device &screen, bitmap_ind16 /* Interrupt is triggering 16 times during vblank. */ -/* we have chosen to trigger on scanlines 195, 199, 203, 207, 211, 215, 219, 223, 227, 231, 235, 239, 243, 247, 251, 255 */ +/* They are spaced every 4 scanlines, with equal padding before and after */ TIMER_CALLBACK_MEMBER(pv1000_state::d65010_irq_on_cb) { int vpos = m_screen->vpos(); @@ -394,11 +394,11 @@ TIMER_CALLBACK_MEMBER(pv1000_state::d65010_irq_on_cb) m_irq_off_timer->adjust(m_screen->time_until_pos(vpos, 380/2)); /* Schedule next IRQ trigger */ - if (vpos >= 255) + if (vpos >= 281) { - next_vpos = 195; + next_vpos = 221; } - m_irq_on_timer->adjust(m_screen->time_until_pos(next_vpos, 0)); + m_irq_on_timer->adjust(m_screen->time_until_pos(next_vpos, 224)); } @@ -478,7 +478,7 @@ void pv1000_state::pv1000(machine_config &config) /* D65010G031 - Video & sound chip */ SCREEN(config, m_screen, SCREEN_TYPE_RASTER); - m_screen->set_raw(17897725/3, 380, 0, 256, 262, 0, 192); + m_screen->set_raw(17897725/4, 288, 0, 224, 262, 0, 244); m_screen->set_screen_update(FUNC(pv1000_state::screen_update_pv1000)); m_screen->set_palette(m_palette); diff --git a/src/mame/excalibur/ivant.cpp b/src/mame/excalibur/ivant.cpp index 0b0e5e87904..863fca1a7b2 100644 --- a/src/mame/excalibur/ivant.cpp +++ b/src/mame/excalibur/ivant.cpp @@ -3,7 +3,7 @@ // thanks-to:Sean Riddle /******************************************************************************* -Excalibur Ivan The Terrible +Excalibur Ivan The Terrible (model 701E) The chess engine is by Ron Nelson, similar to the one in Excalibur Mirage. It has speech, and also sound effects that are reminiscent of Battle Chess. diff --git a/src/mame/fujitsu/fmtowns.cpp b/src/mame/fujitsu/fmtowns.cpp index 6208cc12c42..fa70c5b0bd0 100644 --- a/src/mame/fujitsu/fmtowns.cpp +++ b/src/mame/fujitsu/fmtowns.cpp @@ -1353,9 +1353,16 @@ TIMER_CALLBACK_MEMBER(towns_state::towns_delay_cdda) towns_cdrom_play_cdda(m_cdrom.target()); } +TIMER_CALLBACK_MEMBER(towns_state::towns_delay_seek) +{ + m_towns_cd.extra_status = 0; + towns_cd_set_status(0x04,0x00,0x00,0x00); +} + void towns_state::towns_cdrom_execute_command(cdrom_image_device* device) { towns_cdrom_set_irq(TOWNS_CD_IRQ_MPU,0); // TODO: this isn't sufficiently tested + m_towns_seek_timer->adjust(attotime::never); if(!device->exists() && (m_towns_cd.command != 0xa0)) { // No CD in drive if(m_towns_cd.command & 0x20) @@ -1372,8 +1379,9 @@ void towns_state::towns_cdrom_execute_command(cdrom_image_device* device) case 0x00: // Seek if(m_towns_cd.command & 0x20) { - m_towns_cd.extra_status = 1; + m_towns_cd.extra_status = 0; towns_cd_set_status(0x00,0x00,0x00,0x00); + m_towns_seek_timer->adjust(attotime::from_msec(500)); } LOGMASKED(LOG_CD, "CD: Command 0x00: SEEK\n"); break; @@ -1500,10 +1508,6 @@ uint8_t towns_state::towns_cdrom_r(offs_t offset) { switch(m_towns_cd.command & 0x9f) { - case 0x00: // seek - towns_cd_set_status(0x04,0x00,0x00,0x00); - m_towns_cd.extra_status = 0; - break; case 0x02: // read if(m_towns_cd.extra_status == 2) towns_cd_set_status(0x22,0x00,0x00,0x00); @@ -2356,6 +2360,7 @@ void towns_state::driver_start() m_towns_intervaltimer2 = timer_alloc(FUNC(towns_state::intervaltimer2_timeout), this); m_towns_status_timer = timer_alloc(FUNC(towns_state::towns_cd_status_ready), this); m_towns_cdda_timer = timer_alloc(FUNC(towns_state::towns_delay_cdda), this); + m_towns_seek_timer = timer_alloc(FUNC(towns_state::towns_delay_seek), this); m_video = towns_video_controller(); m_towns_cd = towns_cdrom_controller(); @@ -2363,6 +2368,109 @@ void towns_state::driver_start() m_towns_cd.buffer_ptr = -1; m_towns_cd.read_timer = timer_alloc(FUNC(towns_state::towns_cdrom_read_byte), this); + save_item(NAME(m_ftimer)); + save_item(NAME(m_freerun_timer)); + save_item(NAME(m_intervaltimer2_period)); + save_item(NAME(m_intervaltimer2_irqmask)); + save_item(NAME(m_intervaltimer2_timeout_flag)); + save_item(NAME(m_intervaltimer2_timeout_flag2)); + save_item(NAME(m_nmi_mask)); + save_item(NAME(m_compat_mode)); + save_item(NAME(m_towns_system_port)); + save_item(NAME(m_towns_ankcg_enable)); + save_item(NAME(m_towns_mainmem_enable)); + save_item(NAME(m_towns_ram_enable)); + save_pointer(NAME(m_towns_vram), 0x20000); + save_pointer(NAME(m_towns_gfxvram), 0x80000); + save_pointer(NAME(m_towns_txtvram), 0x20000);; + save_item(NAME(m_towns_selected_drive)); + save_item(NAME(m_towns_fdc_irq6mask)); + save_pointer(NAME(m_towns_serial_rom), 256/8); + save_item(NAME(m_towns_srom_position)); + save_item(NAME(m_towns_srom_clk)); + save_item(NAME(m_towns_srom_reset)); + save_item(NAME(m_towns_rtc_select)); + save_item(NAME(m_towns_rtc_data)); + save_item(NAME(m_towns_timer_mask)); + save_item(NAME(m_towns_kb_status)); + save_item(NAME(m_towns_kb_irq1_enable)); + save_item(NAME(m_towns_kb_output)); // key output + save_item(NAME(m_towns_kb_extend)); // extended key output + save_item(NAME(m_towns_fm_irq_flag)); + save_item(NAME(m_towns_pcm_irq_flag)); + save_item(NAME(m_towns_pcm_channel_flag)); + save_item(NAME(m_towns_pcm_channel_mask)); + save_item(NAME(m_towns_pad_mask)); + save_item(NAME(m_towns_volume)); // volume ports + save_item(NAME(m_towns_volume_select)); + save_item(NAME(m_towns_scsi_control)); + save_item(NAME(m_towns_scsi_status)); + save_item(NAME(m_towns_spkrdata)); + save_item(NAME(m_pit_out0)); + save_item(NAME(m_pit_out1)); + save_item(NAME(m_pit_out2)); + save_item(NAME(m_serial_irq_source)); + + save_item(NAME(m_kb_prev)); + save_item(NAME(m_prev_pad_mask)); + save_item(NAME(m_prev_x)); + save_item(NAME(m_prev_y)); + save_item(NAME(m_rtc_d)); + save_item(NAME(m_rtc_busy)); + save_item(NAME(m_vram_mask)); + save_item(NAME(m_vram_mask_addr)); + + save_item(STRUCT_MEMBER(m_towns_cd, command)); + save_item(STRUCT_MEMBER(m_towns_cd, status)); + save_item(STRUCT_MEMBER(m_towns_cd, cmd_status)); + save_item(STRUCT_MEMBER(m_towns_cd, cmd_status_ptr)); + save_item(STRUCT_MEMBER(m_towns_cd, extra_status)); + save_item(STRUCT_MEMBER(m_towns_cd, parameter)); + save_item(STRUCT_MEMBER(m_towns_cd, mpu_irq_enable)); + save_item(STRUCT_MEMBER(m_towns_cd, dma_irq_enable)); + save_item(STRUCT_MEMBER(m_towns_cd, buffer)); + save_item(STRUCT_MEMBER(m_towns_cd, buffer_ptr)); + save_item(STRUCT_MEMBER(m_towns_cd, lba_current)); + save_item(STRUCT_MEMBER(m_towns_cd, lba_last)); + save_item(STRUCT_MEMBER(m_towns_cd, cdda_current)); + save_item(STRUCT_MEMBER(m_towns_cd, cdda_length)); + save_item(STRUCT_MEMBER(m_towns_cd, software_tx)); + + save_item(STRUCT_MEMBER(m_video, towns_vram_wplane)); + save_item(STRUCT_MEMBER(m_video, towns_vram_rplane)); + save_item(STRUCT_MEMBER(m_video, towns_vram_page_sel)); + save_item(STRUCT_MEMBER(m_video, towns_palette_select)); + save_item(STRUCT_MEMBER(m_video, towns_palette_r)); + save_item(STRUCT_MEMBER(m_video, towns_palette_g)); + save_item(STRUCT_MEMBER(m_video, towns_palette_b)); + save_item(STRUCT_MEMBER(m_video, towns_degipal)); + save_item(STRUCT_MEMBER(m_video, towns_dpmd_flag)); + save_item(STRUCT_MEMBER(m_video, towns_crtc_mix)); + save_item(STRUCT_MEMBER(m_video, towns_crtc_sel)); + save_item(STRUCT_MEMBER(m_video, towns_crtc_reg)); + save_item(STRUCT_MEMBER(m_video, towns_video_sel)); + save_item(STRUCT_MEMBER(m_video, towns_video_reg)); + save_item(STRUCT_MEMBER(m_video, towns_sprite_sel)); + save_item(STRUCT_MEMBER(m_video, towns_sprite_reg)); + save_item(STRUCT_MEMBER(m_video, towns_sprite_flag)); + save_item(STRUCT_MEMBER(m_video, towns_sprite_page)); + save_item(STRUCT_MEMBER(m_video, towns_tvram_enable)); + save_item(STRUCT_MEMBER(m_video, towns_kanji_offset)); + save_item(STRUCT_MEMBER(m_video, towns_kanji_code_h)); + save_item(STRUCT_MEMBER(m_video, towns_kanji_code_l)); + save_item(STRUCT_MEMBER(m_video, towns_display_plane)); + save_item(STRUCT_MEMBER(m_video, towns_display_page_sel)); + save_item(STRUCT_MEMBER(m_video, towns_vblank_flag)); + save_item(STRUCT_MEMBER(m_video, towns_layer_ctrl)); + save_item(NAME(m_video.towns_crtc_layerscr[0].min_x)); + save_item(NAME(m_video.towns_crtc_layerscr[0].max_x)); + save_item(NAME(m_video.towns_crtc_layerscr[0].min_y)); + save_item(NAME(m_video.towns_crtc_layerscr[0].max_y)); + save_item(NAME(m_video.towns_crtc_layerscr[1].min_x)); + save_item(NAME(m_video.towns_crtc_layerscr[1].max_x)); + save_item(NAME(m_video.towns_crtc_layerscr[1].min_y)); + save_item(NAME(m_video.towns_crtc_layerscr[1].max_y)); + save_pointer(m_video.towns_crtc_reg,"CRTC registers",32); save_pointer(m_video.towns_video_reg,"Video registers",2); diff --git a/src/mame/fujitsu/fmtowns.h b/src/mame/fujitsu/fmtowns.h index 525d7c384f0..1f5eb4345a7 100644 --- a/src/mame/fujitsu/fmtowns.h +++ b/src/mame/fujitsu/fmtowns.h @@ -259,6 +259,7 @@ class towns_state : public driver_device emu_timer* m_towns_wait_timer = nullptr; emu_timer* m_towns_status_timer = nullptr; emu_timer* m_towns_cdda_timer = nullptr; + emu_timer* m_towns_seek_timer = nullptr; struct towns_cdrom_controller m_towns_cd; struct towns_video_controller m_video; @@ -375,6 +376,7 @@ class towns_state : public driver_device void towns_cdrom_read(cdrom_image_device* device); TIMER_CALLBACK_MEMBER(towns_cd_status_ready); TIMER_CALLBACK_MEMBER(towns_delay_cdda); + TIMER_CALLBACK_MEMBER(towns_delay_seek); u8 m_rtc_d = 0; bool m_rtc_busy = false; diff --git a/src/mame/heathzenith/z29.cpp b/src/mame/heathzenith/z29.cpp index d54273430fe..9aa72786d82 100644 --- a/src/mame/heathzenith/z29.cpp +++ b/src/mame/heathzenith/z29.cpp @@ -74,11 +74,30 @@ void z29_state::keyin_w(int state) m_keyin = state; } +/** + * Port 1 (based on ROM listing) + * + * bit 0 - KB output line + * bit 1 - KB input line + * bit 2 - 0 = normal video 1 = suppressed + * bit 3 - 0 = setup mode locked 1 = normal + * bit 4 - Data Terminal Ready + * bit 5 - Ready to Send + * bit 6 - Expansion socket + * bit 7 - Clock run for CRT controller + */ u8 z29_state::p1_r() { return m_keyin ? 0xfd : 0xff; } +/** + * Port 3 (based on ROM listing) + * + * bit 1 - predefined serial port transmit pin + * bit 4 - 0 = clear memory 1 = DMA CRTC + * bit 5 - Clear to Send + */ void z29_state::p3_w(u8 data) { m_dmatype = BIT(data, 4); diff --git a/src/mame/hegenerglaser/berlin.cpp b/src/mame/hegenerglaser/berlin.cpp index 5b4ab1ce6ae..e51819eb972 100644 --- a/src/mame/hegenerglaser/berlin.cpp +++ b/src/mame/hegenerglaser/berlin.cpp @@ -5,6 +5,22 @@ Mephisto Berlin 68000 / Berlin Professional 68020 Berlin Professional has the same engine as Mephisto Genius. +Hardware notes: + +Berlin 68000: +- MC68HC000FN12 @ 12.288MHz +- 128KB ROM (2*M27C512-15XF1) +- 512KB DRAM (4*TC514256AP-80) +- 8KB SRAM (HM6264ALP-12 or equivalent), CR2032 battery +- HD44780, 2-line LCD display (small daughterboard) +- 8*8 chessboard buttons, 64 leds, piezo + +Berlin Professional 68020: +- MC68EC020RP25 @ 24.576MHz +- 256KB ROM (D27C020-200V10) +- 1MB DRAM (8*MCM514256AP70) +- rest is similar to Berlin 68000 + Undocumented buttons: - holding ENTER and LEFT cursor on boot runs diagnostics - holding CLEAR on boot clears battery backed RAM diff --git a/src/mame/hegenerglaser/brikett.cpp b/src/mame/hegenerglaser/brikett.cpp index b36b2780bac..85d0b5e996b 100644 --- a/src/mame/hegenerglaser/brikett.cpp +++ b/src/mame/hegenerglaser/brikett.cpp @@ -69,7 +69,7 @@ ESB 6000 board interface (via external port): - TC4081, TC4082, TC4017, 74373, 74374 ESB II/6000 chessboard: -- 64 reed switches (magnet sensors) +- 128 reed switches (magnet sensors, 2 per square) - 64 leds + power led ESB 3000 hardware is probably same as ESB 6000. @@ -317,7 +317,7 @@ void brikett_state::esb6_w(u8 data) int brikett_state::esb6_r() { - // EF1: read chessboard sensor + // EF1: read chessboard square if (m_inputs[5].read_safe(0)) return (m_board->read_file(m_esb_select - 2) & ~m_esb_row) ? 0 : 1; else diff --git a/src/mame/hegenerglaser/mm1.cpp b/src/mame/hegenerglaser/mm1.cpp index af11a53bac3..9544068575c 100644 --- a/src/mame/hegenerglaser/mm1.cpp +++ b/src/mame/hegenerglaser/mm1.cpp @@ -76,7 +76,7 @@ class mm1_state : public driver_device protected: virtual void machine_start() override; - virtual void machine_reset() override; + virtual void machine_reset() override { m_reset = true; } private: // devices/pointers @@ -109,11 +109,6 @@ void mm1_state::machine_start() save_item(NAME(m_kp_mux)); } -void mm1_state::machine_reset() -{ - m_reset = true; -} - /******************************************************************************* @@ -319,8 +314,8 @@ ROM_END Drivers *******************************************************************************/ -// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS -SYST( 1983, mm1, 0, 0, mm1, mm1, mm1_state, empty_init, "Hegener + Glaser", "Mephisto MM I (ver. B)", MACHINE_SUPPORTS_SAVE ) -SYST( 1983, mm1a, mm1, 0, mm1, mm1, mm1_state, empty_init, "Hegener + Glaser", "Mephisto MM I (ver. A)", MACHINE_SUPPORTS_SAVE ) +// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS +SYST( 1983, mm1, 0, 0, mm1, mm1, mm1_state, empty_init, "Hegener + Glaser", "Mephisto MM I (ver. B)", MACHINE_SUPPORTS_SAVE ) +SYST( 1983, mm1a, mm1, 0, mm1, mm1, mm1_state, empty_init, "Hegener + Glaser", "Mephisto MM I (ver. A)", MACHINE_SUPPORTS_SAVE ) -SYST( 1984, mmirage, 0, 0, mirage, mirage, mm1_state, empty_init, "Hegener + Glaser", "Mephisto Mirage", MACHINE_SUPPORTS_SAVE ) +SYST( 1984, mmirage, 0, 0, mirage, mirage, mm1_state, empty_init, "Hegener + Glaser", "Mephisto Mirage", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/hegenerglaser/mm2.cpp b/src/mame/hegenerglaser/mm2.cpp index e820d50e135..af977d7f1aa 100644 --- a/src/mame/hegenerglaser/mm2.cpp +++ b/src/mame/hegenerglaser/mm2.cpp @@ -32,7 +32,7 @@ Open Computer Chess Championship. MM IV TurboKit 18MHz - (mm4tk) This is a replacement ROM combining the TurboKit initial ROM with the original MM IV. -The TurboKit powers up to it's tiny ROM, copies itself to RAM, banks in normal ROM, +The TurboKit powers up to its tiny ROM, copies itself to RAM, banks in normal ROM, copies that to faster SRAM, then patches the checksum and the LED blink delays. There is an undumped MM V TurboKit, which will be the exact same except for location diff --git a/src/mame/hegenerglaser/polgar.cpp b/src/mame/hegenerglaser/polgar.cpp index 4a2e37300f2..a71514031b7 100644 --- a/src/mame/hegenerglaser/polgar.cpp +++ b/src/mame/hegenerglaser/polgar.cpp @@ -39,8 +39,8 @@ class polgar_state : public driver_device m_keys(*this, "KEY") { } - void polgar10(machine_config &config); void polgar(machine_config &config); + void polgar10(machine_config &config); private: required_device m_maincpu; diff --git a/src/mame/hegenerglaser/risc.cpp b/src/mame/hegenerglaser/risc.cpp index c65c201d30a..d50a7ca3275 100644 --- a/src/mame/hegenerglaser/risc.cpp +++ b/src/mame/hegenerglaser/risc.cpp @@ -5,6 +5,7 @@ Mephisto Risc 1MB/II (stylized "risc") The chess engine in Mephisto Risc is also compatible with Tasc's The ChessMachine, +it is more or less equivalent to Gideon 3.0 (Risc 1MB) and Gideon 3.1 (Risc II), see ROM defs for details. "Main" CPU is slow, but all the chess calculations are done with the ARM. diff --git a/src/mame/igs/pgmcrypt.cpp b/src/mame/igs/pgmcrypt.cpp index e56fcdc54b0..a8dad4bf08d 100644 --- a/src/mame/igs/pgmcrypt.cpp +++ b/src/mame/igs/pgmcrypt.cpp @@ -1395,7 +1395,6 @@ void lhzb4_decrypt(running_machine &machine) ////////////////////////////////////////////////////////////////////// -// should fearless and superkds be using the same decrypt? fearless will fail ROM check with superkds function at the moment static const uint8_t superkds_tab[256] = { 0x49, 0x47, 0x53, 0x30, 0x32, 0x30, 0x32, 0x52, 0x44, 0x32, 0x30, 0x35, 0x30, 0x31, 0x30, 0x33, @@ -1453,13 +1452,12 @@ void fearless_decrypt(running_machine &machine) { uint16_t x = src[i]; - // might not be 100% correct... IGS27_CRYPT1 - // IGS27_CRYPT2 - IGS27_CRYPT3_ALT2 + IGS27_CRYPT2_ALT + IGS27_CRYPT3 IGS27_CRYPT4 // IGS27_CRYPT5 - IGS27_CRYPT6_ALT + IGS27_CRYPT6 IGS27_CRYPT7 IGS27_CRYPT8 diff --git a/src/mame/layout/mpf1.lay b/src/mame/layout/mpf1.lay index 8e856d41ffc..b89156e9164 100644 --- a/src/mame/layout/mpf1.lay +++ b/src/mame/layout/mpf1.lay @@ -21,12 +21,6 @@ license:CC0-1.0 - - - - - - @@ -35,43 +29,24 @@ license:CC0-1.0 - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - diff --git a/src/mame/layout/mpf1b.lay b/src/mame/layout/mpf1b.lay index 8e856d41ffc..b89156e9164 100644 --- a/src/mame/layout/mpf1b.lay +++ b/src/mame/layout/mpf1b.lay @@ -21,12 +21,6 @@ license:CC0-1.0 - - - - - - @@ -35,43 +29,24 @@ license:CC0-1.0 - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - diff --git a/src/mame/layout/mt80z.lay b/src/mame/layout/mt80z.lay index 8e856d41ffc..b89156e9164 100644 --- a/src/mame/layout/mt80z.lay +++ b/src/mame/layout/mt80z.lay @@ -21,12 +21,6 @@ license:CC0-1.0 - - - - - - @@ -35,43 +29,24 @@ license:CC0-1.0 - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 66aa33e039f..21a7237a3b3 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -1649,6 +1649,7 @@ atetb5205 // (bootleg, with OKI M5205) atetrisbp // atetrisc // 136066 (c) 1989 atetrisc2 // 136066 (c) 1989 +link // (bootleg) @source:atari/avalnche.cpp avalnche // 030574 1978/04 [6502] @@ -45497,9 +45498,11 @@ ekaramix // ekaraphs // ekaras // epitch // +epo_crok epo_dmon // epo_efdx // epo_epp // +epo_epp2 epo_epp3 // epo_eppk // epo_esdx // @@ -45509,6 +45512,7 @@ epo_tfp2 // evio // gcslottv // gungunad // +gungunrv has_wamg // hikara // jarajal // @@ -45550,6 +45554,7 @@ taitons2 // tak_geig // tcarnavi // tomcpin // +tomshoot // tomplc // tvpc_dor tvpc_tom diff --git a/src/mame/merit/merit.cpp b/src/mame/merit/merit.cpp index 03b6c69a226..afb78065c52 100644 --- a/src/mame/merit/merit.cpp +++ b/src/mame/merit/merit.cpp @@ -851,7 +851,12 @@ static INPUT_PORTS_START( rivierab ) INPUT_PORTS_END static INPUT_PORTS_START( mosdraw ) - PORT_INCLUDE( riviera ) + PORT_INCLUDE( meritpoker ) + + PORT_MODIFY("DSW") // DSW affects only points per coins, everything seems hard coded values + PORT_DIPNAME( 0x10, 0x00, "Points Per Coin" ) PORT_DIPLOCATION("SW1:5") + PORT_DIPSETTING( 0x00, "5" ) + PORT_DIPSETTING( 0x10, "1" ) PORT_MODIFY("IN2") PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // to bypass printer check TODO: proper emulation @@ -1995,7 +2000,6 @@ ROM_END // Sub board CRT-203 includes 2 P8255A, parallel printer connection & MM58174AN RTC that plugs in through the CRT-200's P8255 socket. // There is a battery that connects to the PCB to keep the CRT-200's Mosel MS6264L-10PC RAM active and also runs to the CRT-203 for the RTC (guess) -// Currently the game starts with an error, press F2 to configure RTC then press Deal (2) ROM_START( mosdraw ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "4436-05_u5-0.u5", 0x0000, 0x8000, CRC(d0194059) SHA1(4e106c7e38fd92e005f5e1899b6fbca4ab62ce6d) ) // 4436-05 U5-0 041790 @@ -2007,6 +2011,9 @@ ROM_START( mosdraw ) ROM_REGION( 0x2000, "gfx2", 0 ) ROM_LOAD( "tana_u40.u40", 0x00000, 0x2000, CRC(a45cae66) SHA1(499759badc006fa09706d349e252284949d20a2d) ) + + ROM_REGION( 0x2000, "nvram", 0 ) + ROM_LOAD( "nvram", 0x0000, 0x2000, CRC(61351962) SHA1(b2a18563c41b58385d6b0ccbc621fddd0d82f1b5) ) // preconfigured NVRAM to avoid error on boot ROM_END ROM_START( bigappg ) @@ -2989,7 +2996,7 @@ GAME( 1984, chkndrawa, chkndraw, pitboss, chkndraw, merit_state, empty_ GAME( 1987, riviera, 0, riviera, riviera, merit_state, empty_init, ROT0, "Merit", "Riviera Hi-Score (2131-08, U5-4A)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS ) GAME( 1986, rivieraa, riviera, riviera, riviera, merit_state, empty_init, ROT0, "Merit", "Riviera Hi-Score (2131-08, U5-4)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS ) GAME( 1986, rivierab, riviera, riviera, rivierab, merit_state, empty_init, ROT0, "Merit", "Riviera Hi-Score (2131-08, U5-2D)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS ) -GAME( 1990, mosdraw, 0, mosdraw, mosdraw, merit_state, empty_init, ROT0, "Merit", "Montana Super Draw (4436-05, U5-0)", MACHINE_NOT_WORKING | MACHINE_NODEVICE_PRINTER | MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS ) // needs printer and RTC hook up +GAME( 1990, mosdraw, 0, mosdraw, mosdraw, merit_state, empty_init, ROT0, "Merit", "Montana Super Draw (4436-05, U5-0)", MACHINE_NODEVICE_PRINTER | MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS ) // needs printer and RTC hook up GAME( 1986, bigappg, 0, bigappg, bigappg, merit_state, empty_init, ROT0, "Big Apple Games / Merit", "The Big Apple (2131-13, U5-0)", MACHINE_SUPPORTS_SAVE ) GAME( 1986, misdraw, 0, misdraw, bigappg, merit_state, empty_init, ROT0, "Big Apple Games / Merit", "Michigan Super Draw (2131-16, U5-2)", MACHINE_SUPPORTS_SAVE ) @@ -3008,33 +3015,33 @@ GAME( 1985, trvwza, trvwz, trvwhiz, trivia, merit_quiz_state, empty_ GAME( 1985, trvwzb, trvwz, trvwhiz, trivia, merit_quiz_state, empty_init, ROT0, "Merit", "Trivia ? Whiz (6221-00, Alt Gen trivia)", MACHINE_SUPPORTS_SAVE ) GAME( 1985, trvwzv, trvwz, trvwhiz, trivia, merit_quiz_state, empty_init, ROT90, "Merit", "Trivia ? Whiz (6221-02, Vertical)", MACHINE_SUPPORTS_SAVE ) -GAME( 1985, trvwz2, 0, trvwhiz, trivia, merit_quiz_state, init_key<2>, ROT90, "Merit", "Trivia ? Whiz (6221-05, Edition 2)", MACHINE_SUPPORTS_SAVE ) -GAME( 1985, trvwz2a, trvwz2, trvwhiz, trivia, merit_quiz_state, init_key<2>, ROT90, "Merit", "Trivia ? Whiz (6221-05, Edition 2 Alt Sex trivia)", MACHINE_SUPPORTS_SAVE ) +GAME( 1985, trvwz2, 0, trvwhiz, trivia, merit_quiz_state, init_key<2>, ROT90, "Merit", "Trivia ? Whiz Edition 2 (6221-05)", MACHINE_SUPPORTS_SAVE ) +GAME( 1985, trvwz2a, trvwz2, trvwhiz, trivia, merit_quiz_state, init_key<2>, ROT90, "Merit", "Trivia ? Whiz Edition 2 (6221-05, Alt Sex trivia)", MACHINE_SUPPORTS_SAVE ) -GAME( 1985, trvwz3, 0, trvwhiz, trivia, merit_quiz_state, empty_init, ROT0, "Merit", "Trivia ? Whiz (6221-05, U5-0D, Edition 3)", MACHINE_SUPPORTS_SAVE ) -GAME( 1985, trvwz3a, trvwz3, trvwhiz, trivia, merit_quiz_state, empty_init, ROT0, "Merit", "Trivia ? Whiz (6221-05, U5-0C, Edition 3)", MACHINE_SUPPORTS_SAVE ) -GAME( 1985, trvwz3b, trvwz3, trvwhiz, trivia, merit_quiz_state, empty_init, ROT0, "Merit", "Trivia ? Whiz (6221-05, Edition 3 Sex trivia III)", MACHINE_SUPPORTS_SAVE ) -GAME( 1985, trvwz3v, trvwz3, trvwhiz, trivia, merit_quiz_state, empty_init, ROT90, "Merit", "Trivia ? Whiz (6221-04, U5-0E, Edition 3 Vertical)", MACHINE_SUPPORTS_SAVE ) +GAME( 1985, trvwz3, 0, trvwhiz, trivia, merit_quiz_state, empty_init, ROT0, "Merit", "Trivia ? Whiz Edition 3 (6221-05, U5-0D)", MACHINE_SUPPORTS_SAVE ) +GAME( 1985, trvwz3a, trvwz3, trvwhiz, trivia, merit_quiz_state, empty_init, ROT0, "Merit", "Trivia ? Whiz Edition 3 (6221-05, U5-0C)", MACHINE_SUPPORTS_SAVE ) +GAME( 1985, trvwz3b, trvwz3, trvwhiz, trivia, merit_quiz_state, empty_init, ROT0, "Merit", "Trivia ? Whiz Edition 3 (6221-05, with Sex trivia III)", MACHINE_SUPPORTS_SAVE ) +GAME( 1985, trvwz3v, trvwz3, trvwhiz, trivia, merit_quiz_state, empty_init, ROT90, "Merit", "Trivia ? Whiz Edition 3 (6221-04, U5-0E, Vertical)", MACHINE_SUPPORTS_SAVE ) -GAME( 1985, trvwz4, 0, trvwhziv, trvwhziv, merit_quiz_state, init_key<5>, ROT0, "Merit", "Trivia ? Whiz (6221-10, U5-0A, Edition 4)", MACHINE_SUPPORTS_SAVE ) -GAME( 1985, trvwz4v, trvwz4, trvwhziv, trvwhziv, merit_quiz_state, init_key<5>, ROT90, "Merit", "Trivia ? Whiz (6221-13, U5-0B, Edition 4 Vertical)", MACHINE_SUPPORTS_SAVE ) -GAME( 1985, trvwz4va, trvwz4, trvwhziv, trvwhziv, merit_quiz_state, init_key<5>, ROT90, "Merit", "Trivia ? Whiz (6221-13, U5-0B, Edition 4 Vertical Alt Sex trivia)", MACHINE_SUPPORTS_SAVE ) +GAME( 1985, trvwz4, 0, trvwhziv, trvwhziv, merit_quiz_state, init_key<5>, ROT0, "Merit", "Trivia ? Whiz Edition 4 (6221-10, U5-0A)", MACHINE_SUPPORTS_SAVE ) +GAME( 1985, trvwz4v, trvwz4, trvwhziv, trvwhziv, merit_quiz_state, init_key<5>, ROT90, "Merit", "Trivia ? Whiz Edition 4 (6221-13, U5-0B, Vertical)", MACHINE_SUPPORTS_SAVE ) +GAME( 1985, trvwz4va, trvwz4, trvwhziv, trvwhziv, merit_quiz_state, init_key<5>, ROT90, "Merit", "Trivia ? Whiz Edition 4 (6221-13, U5-0B, alt Sex trivia)", MACHINE_SUPPORTS_SAVE ) GAME( 1985, tictac, 0, tictac, tictac, merit_quiz_state, init_key<8>, ROT0, "Merit", "Tic Tac Trivia (6221-23, U5-0C, 07/07/86)", MACHINE_SUPPORTS_SAVE ) // all new trivia categories GAME( 1985, tictaca, tictac, tictac, tictac, merit_quiz_state, init_key<4>, ROT0, "Merit", "Tic Tac Trivia (6221-23, U5-0C, 02/11/86)", MACHINE_SUPPORTS_SAVE ) -GAME( 1985, tictacv, tictac, tictac, tictac, merit_quiz_state, init_key<4>, ROT90, "Merit", "Tic Tac Trivia (6221-22, U5-0 Vertical)", MACHINE_SUPPORTS_SAVE ) +GAME( 1985, tictacv, tictac, tictac, tictac, merit_quiz_state, init_key<4>, ROT90, "Merit", "Tic Tac Trivia (6221-22, U5-0, Vertical)", MACHINE_SUPPORTS_SAVE ) -GAME( 1986, phrcraze, 0, phrcraze, phrcrazs, merit_quiz_state, init_key<7>, ROT0, "Merit", "Phraze Craze (6221-40, U5-3A Expanded Questions)", MACHINE_SUPPORTS_SAVE ) -GAME( 1986, phrcrazea, phrcraze, phrcraze, phrcrazs, merit_quiz_state, init_key<7>, ROT0, "Merit", "Phraze Craze (6221-40, U5-3 Expanded Questions)", MACHINE_SUPPORTS_SAVE ) +GAME( 1986, phrcraze, 0, phrcraze, phrcrazs, merit_quiz_state, init_key<7>, ROT0, "Merit", "Phraze Craze (6221-40, U5-3A, Expanded Questions)", MACHINE_SUPPORTS_SAVE ) +GAME( 1986, phrcrazea, phrcraze, phrcraze, phrcrazs, merit_quiz_state, init_key<7>, ROT0, "Merit", "Phraze Craze (6221-40, U5-3, Expanded Questions)", MACHINE_SUPPORTS_SAVE ) GAME( 1986, phrcrazeb, phrcraze, phrcraze, phrcraze, merit_quiz_state, init_key<7>, ROT0, "Merit", "Phraze Craze (6221-40, U5-0A)", MACHINE_SUPPORTS_SAVE ) GAME( 1986, phrcrazec, phrcraze, phrcraze, phrcraza, merit_quiz_state, init_key<7>, ROT0, "Merit", "Phraze Craze (6221-40, U5-0)", MACHINE_SUPPORTS_SAVE ) -GAME( 1986, phrcrazev, phrcraze, phrcraze, phrcrazs, merit_quiz_state, init_key<7>, ROT90, "Merit", "Phraze Craze (6221-45, U5-2 Vertical)", MACHINE_SUPPORTS_SAVE ) +GAME( 1986, phrcrazev, phrcraze, phrcraze, phrcrazs, merit_quiz_state, init_key<7>, ROT90, "Merit", "Phraze Craze (6221-45, U5-2, Vertical)", MACHINE_SUPPORTS_SAVE ) -GAME( 1987, dtrvwz5, 0, dtrvwz5, dtrvwz5, merit_quiz_state, init_dtrvwz5, ROT0, "Merit", "Deluxe Trivia ? Whiz (6221-70, U5-0A Edition 5)", MACHINE_SUPPORTS_SAVE ) -GAME( 1987, dtrvwz5v, dtrvwz5, dtrvwz5, dtrvwz5, merit_quiz_state, init_dtrvwz5, ROT90, "Merit", "Deluxe Trivia ? Whiz (6221-75, U5-0 Edition 5 Vertical)", MACHINE_SUPPORTS_SAVE ) +GAME( 1987, dtrvwz5, 0, dtrvwz5, dtrvwz5, merit_quiz_state, init_dtrvwz5, ROT0, "Merit", "Deluxe Trivia ? Whiz Edition 5 (6221-70, U5-0A)", MACHINE_SUPPORTS_SAVE ) +GAME( 1987, dtrvwz5v, dtrvwz5, dtrvwz5, dtrvwz5, merit_quiz_state, init_dtrvwz5, ROT90, "Merit", "Deluxe Trivia ? Whiz Edition 5 (6221-75, U5-0, Vertical)", MACHINE_SUPPORTS_SAVE ) GAME( 1986, matchem, 0, couple, matchem, merit_state, init_crt209, ROT0, "Merit", "Match'em Up (6221-51, U5-1)", MACHINE_SUPPORTS_SAVE ) -GAME( 1986, matchemg, matchem, couple, matchemg, merit_state, init_crt209, ROT0, "Merit", "Match'em Up (6221-55, U5-1 German)", MACHINE_SUPPORTS_SAVE ) +GAME( 1986, matchemg, matchem, couple, matchemg, merit_state, init_crt209, ROT0, "Merit", "Match'em Up (6221-55, U5-1, German)", MACHINE_SUPPORTS_SAVE ) GAME( 1988, couple, matchem, couple, couple, merit_state, init_crt209, ROT0, "bootleg", "The Couples (set 1)", MACHINE_SUPPORTS_SAVE ) GAME( 1988, couplep, matchem, couple, couplep, merit_state, init_crt209, ROT0, "bootleg", "The Couples (set 2)", MACHINE_SUPPORTS_SAVE ) GAME( 1988, couplei, matchem, couple, couple, merit_state, init_crt209, ROT0, "bootleg", "The Couples (set 3)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/merit/merit3xx.cpp b/src/mame/merit/merit3xx.cpp index d01c8c0c7e2..867d9ed88de 100644 --- a/src/mame/merit/merit3xx.cpp +++ b/src/mame/merit/merit3xx.cpp @@ -20,8 +20,8 @@ Games generically named Superstar, but also Superstar 2000, Superstar 4000 both - ma6710 hangs at UART device check (PC=5e44). Bypassing it, game stops with 'TOD CLOCK ERROR'; - Never initializes RAMDAC; - Never initializes CRTC on CRT-352 games; -- Map secondary NVRAM moduleM -- Map / connect up Dallas DS1216 RTCM +- Map secondary NVRAM module; +- Map / connect up Dallas DS1216 RTC; - ma6710a/ma9800 start with game malfunction message. It can be started by switching IN2:2 on, then pressing discard 3. Games 'Super Eight' and 'Black Jack' show GFX banking logic isn't correct. 'Black Jack' GFX are over 0x8000 in ROM but proper GFX bank bit hasn't been identified. @@ -762,11 +762,11 @@ lamps for control panel buttons */ static INPUT_PORTS_START( merit3xx ) PORT_START("IN0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("Discard 1") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("Discard 1") // "Double Down" button in Blackjack PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) PORT_NAME("Discard 2") - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) PORT_NAME("Discard 3") - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) PORT_NAME("Discard 4") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) PORT_NAME("Discard 5") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) PORT_NAME("Discard 3") // "Split" button in Blackjack + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) PORT_NAME("Discard 4") // "Stand" button in Blackjack + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) PORT_NAME("Discard 5") // "Hit" button in Blackjack PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) @@ -836,10 +836,27 @@ static INPUT_PORTS_START( merit3xx ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) INPUT_PORTS_END + +/* +Translations of on screen messages for ma9800: +Bedobott Ermek = Inserted Coins +Hivja A Gepkezelot = Call Attendant +Feketedoboz Hiba = Blackbox Error + +Button labels: + TET = Bet + OSZT = Deal + KIFIZET = Collect + BEFEJEZ = Stand +ELDOB/VISSZAVESZ = Discard/Recover + +It seems that this set uses a hopper instead of a printer like other sets. +*/ + static INPUT_PORTS_START( ma9800 ) PORT_INCLUDE( merit3xx ) -// PORT_START("IN1") +// PORT_MODIFY("IN1") // PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) // Button labeled ELDOB/VISSZAVESZ // PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) // Button labeled ELDOB/VISSZAVESZ // PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) // Button labeled ELDOB/VISSZAVESZ @@ -853,12 +870,8 @@ static INPUT_PORTS_START( ma9800 ) PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) // gives 1 credit at a time (25 cents) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) // gives 4 credits at a time ($1.00) // PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_STAND ) // Button labeled BEFEJEZ - PORT_DIPNAME( 0x20, 0x20, "IN1.6 Door" ) PORT_TOGGLE // <-- for ma9800 set, ON results in DOOR OPEN error - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, "IN1.7 Door" ) PORT_TOGGLE // <-- for ma9800 set, ON results in DOOR OPEN error - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Door 2") PORT_CODE(KEYCODE_U) PORT_TOGGLE // Unknown what these 2 are but will give DOOR OPEN errors + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Door 3") PORT_CODE(KEYCODE_Y) PORT_TOGGLE // Unknown what these 2 are but will give DOOR OPEN errors PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_IMPULSE(2) // gives 4 credits at a time ($1.00) INPUT_PORTS_END diff --git a/src/mame/multitech/mkit09.cpp b/src/mame/multitech/mkit09.cpp index ef7dd136142..10170716154 100644 --- a/src/mame/multitech/mkit09.cpp +++ b/src/mame/multitech/mkit09.cpp @@ -40,8 +40,8 @@ Test Paste: #include "cpu/m6809/m6809.h" #include "imagedev/cassette.h" #include "machine/6821pia.h" -#include "speaker.h" #include "video/pwm.h" +#include "speaker.h" #include "mkit09.lh" diff --git a/src/mame/multitech/mpf1.cpp b/src/mame/multitech/mpf1.cpp index cd72bf8ff2f..681bec6a4eb 100644 --- a/src/mame/multitech/mpf1.cpp +++ b/src/mame/multitech/mpf1.cpp @@ -45,11 +45,11 @@ #include "emu.h" #include "cpu/z80/z80.h" #include "machine/i8255.h" -#include "machine/timer.h" #include "machine/z80ctc.h" #include "machine/z80daisy.h" #include "machine/z80pio.h" #include "sound/spkrdev.h" +#include "video/pwm.h" #include "bus/generic/carts.h" #include "bus/generic/slot.h" @@ -73,12 +73,12 @@ class mpf1_state : public driver_device : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") , m_speaker(*this, "speaker") + , m_7seg_pwm(*this, "7seg_pwm") , m_cassette(*this, "cassette") , m_rom_region(*this, "maincpu") , m_rom_u7(*this, "rom_u7") , m_pc(*this, "PC%u", 0U) , m_special(*this, "SPECIAL") - , m_digits(*this, "digit%u", 0U) , m_leds(*this, "led%u", 0U) { } @@ -95,12 +95,12 @@ class mpf1_state : public driver_device private: required_device m_maincpu; required_device m_speaker; + required_device m_7seg_pwm; required_device m_cassette; required_region_ptr m_rom_region; required_device m_rom_u7; required_ioport_array<6> m_pc; required_ioport m_special; - output_finder<6> m_digits; output_finder<2> m_leds; void mpf1_io_map(address_map &map); @@ -116,11 +116,7 @@ class mpf1_state : public driver_device int m_break = 0; int m_m1 = 0; - uint8_t m_lednum = 0; - - emu_timer *m_led_refresh_timer = nullptr; - - TIMER_CALLBACK_MEMBER(led_refresh); + uint8_t m_select = 0; }; /* Address Maps */ @@ -339,20 +335,13 @@ INPUT_PORTS_END /* Intel 8255A Interface */ -TIMER_CALLBACK_MEMBER(mpf1_state::led_refresh) -{ - for (int digit = 0; digit < 6; digit++) - if (BIT(m_lednum, 5 - digit)) - m_digits[digit] = param; -} - uint8_t mpf1_state::ppi_pa_r() { uint8_t data = 0x7f; /* bit 0 to 5, keyboard rows 0 to 5 */ for (int row = 0; row < 6; row++) - if (!BIT(m_lednum, row)) + if (!BIT(m_select, row)) data &= m_pc[row]->read(); /* bit 6, user key */ @@ -367,17 +356,14 @@ uint8_t mpf1_state::ppi_pa_r() void mpf1_state::ppi_pb_w(uint8_t data) { /* swap bits around for the 7-segment emulation */ - uint8_t led_data = bitswap<8>(data, 6, 1, 2, 0, 7, 5, 4, 3); - - /* timer to update segments */ - m_led_refresh_timer->adjust(attotime::from_usec(70), led_data); + m_7seg_pwm->write_mx(bitswap<8>(data, 6, 1, 2, 0, 7, 5, 4, 3)); } void mpf1_state::ppi_pc_w(uint8_t data) { /* bits 0-5, led select and keyboard latch */ - m_lednum = data & 0x3f; - m_led_refresh_timer->adjust(attotime::never); + m_select = data & 0x3f; + m_7seg_pwm->write_my(m_select); /* bit 6, monitor break control */ m_break = BIT(data, 6); @@ -422,19 +408,17 @@ static const z80_daisy_config mpf1_daisy_chain[] = void mpf1_state::machine_start() { - m_led_refresh_timer = timer_alloc(FUNC(mpf1_state::led_refresh), this); - m_digits.resolve(); m_leds.resolve(); /* register for state saving */ save_item(NAME(m_break)); save_item(NAME(m_m1)); - save_item(NAME(m_lednum)); + save_item(NAME(m_select)); } void mpf1_state::machine_reset() { - m_lednum = 0; + m_select = 0; } @@ -466,6 +450,9 @@ void mpf1_state::mpf1(machine_config &config) m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED); /* video hardware */ + PWM_DISPLAY(config, m_7seg_pwm).set_size(6, 8); + m_7seg_pwm->set_segmask(0x3f, 0xff); + config.set_default_layout(layout_mpf1); /* sound hardware */ diff --git a/src/mame/multitech/mpf1p.cpp b/src/mame/multitech/mpf1p.cpp index e8e1c061364..766338fc8db 100644 --- a/src/mame/multitech/mpf1p.cpp +++ b/src/mame/multitech/mpf1p.cpp @@ -8,15 +8,15 @@ * RAM: 4 kilobytes * * Input: 49 key keyboard * * Storage: Cassette tape * -* Video: 20x 16-segment LED display * +* Video: 20x 16-segment VFD * * Sound: Speaker * \************************************************/ #include "emu.h" #include "cpu/z80/z80.h" #include "machine/i8255.h" -#include "machine/timer.h" #include "sound/spkrdev.h" +#include "video/pwm.h" #include "bus/generic/carts.h" #include "bus/generic/slot.h" @@ -38,10 +38,10 @@ class mpf1p_state : public driver_device : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") , m_speaker(*this, "speaker") + , m_vfd_pwm(*this, "vfd_pwm") , m_cassette(*this, "cassette") , m_key(*this, "PC%u", 1U) , m_special(*this, "SPECIAL") - , m_digits(*this, "digit%u", 0U) , m_leds(*this, "led%u", 0U) { } @@ -55,10 +55,10 @@ class mpf1p_state : public driver_device private: required_device m_maincpu; required_device m_speaker; + required_device m_vfd_pwm; required_device m_cassette; required_ioport_array<20> m_key; required_ioport m_special; - output_finder<20> m_digits; output_finder<2> m_leds; void mpf1_step(address_map &map); @@ -80,10 +80,10 @@ class mpf1p_state : public driver_device int m_break = 0; int m_m1 = 0; - uint32_t m_lednum = 0; - uint16_t m_led_data = 0; + uint32_t m_select = 0; + uint16_t m_vfd_data = 0; - void led_refresh(uint16_t data); + void vfd_refresh(); }; @@ -231,13 +231,9 @@ static INPUT_PORTS_START( mpf1p ) INPUT_PORTS_END -void mpf1p_state::led_refresh(uint16_t data) +void mpf1p_state::vfd_refresh() { - for (int digit = 0; digit < 20; digit++) - { - if (!BIT(m_lednum, digit)) - m_digits[digit] = data ^ 0xffff; - } + m_vfd_pwm->matrix(~m_select, ~m_vfd_data); } @@ -253,23 +249,20 @@ uint8_t mpf1p_state::ppi1_pc_r() void mpf1p_state::ppi1_pa_w(uint8_t data) { - m_lednum = (m_lednum & 0xffffff00) | data; - - led_refresh(m_led_data); + m_select = (m_select & 0xffffff00) | data; + vfd_refresh(); } void mpf1p_state::ppi1_pb_w(uint8_t data) { - m_lednum = (m_lednum & 0xffff00ff) | (data << 8); - - led_refresh(m_led_data); + m_select = (m_select & 0xffff00ff) | (data << 8); + vfd_refresh(); } void mpf1p_state::ppi1_pc_w(uint8_t data) { - m_lednum = (m_lednum & 0xfff0ffff) | (data << 16); - - led_refresh(m_led_data); + m_select = (m_select & 0xff00ffff) | (data << 16); + vfd_refresh(); } uint8_t mpf1p_state::ppi2_pc_r() @@ -278,7 +271,7 @@ uint8_t mpf1p_state::ppi2_pc_r() // bit 0 to 2, keyboard rows 0 to 20 for (int row = 0; row < 20; row++) - if (!BIT(m_lednum, row)) + if (!BIT(m_select, row)) data &= m_key[row]->read(); // bit 3, tape input @@ -289,7 +282,8 @@ uint8_t mpf1p_state::ppi2_pc_r() void mpf1p_state::ppi2_pa_w(uint8_t data) { - m_led_data = (m_led_data & 0xff00) | data; + m_vfd_data = (m_vfd_data & 0xff00) | data; + vfd_refresh(); } void mpf1p_state::ppi2_pb_w(uint8_t data) @@ -297,7 +291,8 @@ void mpf1p_state::ppi2_pb_w(uint8_t data) // swap bits around for the 14-segment emulation data = bitswap<8>(data, 7, 6, 4, 2, 3, 5, 1, 0); - m_led_data = (m_led_data & 0x00ff) | (data << 8); + m_vfd_data = (m_vfd_data & 0x00ff) | (data << 8); + vfd_refresh(); } void mpf1p_state::ppi2_pc_w(uint8_t data) @@ -334,13 +329,12 @@ uint8_t mpf1p_state::step_r(offs_t offset) void mpf1p_state::machine_start() { - m_digits.resolve(); m_leds.resolve(); // register for state saving */ save_item(NAME(m_break)); save_item(NAME(m_m1)); - save_item(NAME(m_lednum)); + save_item(NAME(m_select)); } @@ -366,6 +360,9 @@ void mpf1p_state::mpf1p(machine_config &config) ppi_2.out_pc_callback().set(FUNC(mpf1p_state::ppi2_pc_w)); ppi_2.in_pc_callback().set(FUNC(mpf1p_state::ppi2_pc_r)); + PWM_DISPLAY(config, m_vfd_pwm).set_size(20, 16); + m_vfd_pwm->set_segmask(0xfffff, 0xffff); + CASSETTE(config, m_cassette); m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED | CASSETTE_MOTOR_ENABLED); diff --git a/src/mame/namco/namcos11.cpp b/src/mame/namco/namcos11.cpp index e621de9e6f1..2a827980116 100644 --- a/src/mame/namco/namcos11.cpp +++ b/src/mame/namco/namcos11.cpp @@ -2052,8 +2052,8 @@ ROM_END */ GAME( 1994, tekken, 0, tekken, tekken, namcos11_state, empty_init, ROT0, "Namco", "Tekken (World, TE2/VER.C)", 0 ) -GAME( 1994, tekkenac, tekken, tekken, tekken, namcos11_state, empty_init, ROT0, "Namco", "Tekken (Asia, TE4/VER.C)", 0 ) GAME( 1994, tekkenb, tekken, tekken, tekken, namcos11_state, empty_init, ROT0, "Namco", "Tekken (World, TE2/VER.B)", 0 ) +GAME( 1994, tekkenac, tekken, tekken, tekken, namcos11_state, empty_init, ROT0, "Namco", "Tekken (Asia, TE4/VER.C)", 0 ) GAME( 1994, tekkenjb, tekken, tekken, tekken, namcos11_state, empty_init, ROT0, "Namco", "Tekken (Japan, TE1/VER.B)", 0 ) GAME( 1996, tekken2, 0, tekken2, tekken, namcos11_state, empty_init, ROT0, "Namco", "Tekken 2 Ver.B (World, TES2/VER.D)", 0 ) GAME( 1995, tekken2b, tekken2, tekken2o, tekken, namcos11_state, empty_init, ROT0, "Namco", "Tekken 2 Ver.B (World, TES2/VER.B)", 0 ) diff --git a/src/mame/namco/namcos12.cpp b/src/mame/namco/namcos12.cpp index f8c3698e570..e0f05baaf3a 100644 --- a/src/mame/namco/namcos12.cpp +++ b/src/mame/namco/namcos12.cpp @@ -3565,8 +3565,8 @@ ROM_END // YEAR NAME PARENT MACHINE INPUT CLASS INIT ROT COMPANY FULLNAME, FLAGS GAME( 1996, tekken3, 0, coh700, namcos12, namcos12_state, init_namcos12, ROT0, "Namco", "Tekken 3 (World, TET2/VER.E1)", 0 ) /* KC006 */ GAME( 1996, tekken3d, tekken3, coh700, namcos12, namcos12_state, init_namcos12, ROT0, "Namco", "Tekken 3 (World, TET2/VER.D)", 0 ) /* KC006 */ -GAME( 1996, tekken3b, tekken3, coh700, namcos12, namcos12_state, init_namcos12, ROT0, "Namco", "Tekken 3 (World, TET2/VER.B)", 0 ) /* KC006 */ GAME( 1996, tekken3c, tekken3, coh700, namcos12, namcos12_state, init_namcos12, ROT0, "Namco", "Tekken 3 (World, TET2/VER.C)", 0 ) /* KC006 */ +GAME( 1996, tekken3b, tekken3, coh700, namcos12, namcos12_state, init_namcos12, ROT0, "Namco", "Tekken 3 (World, TET2/VER.B)", 0 ) /* KC006 */ GAME( 1996, tekken3a, tekken3, coh700, namcos12, namcos12_state, init_namcos12, ROT0, "Namco", "Tekken 3 (World, TET2/VER.A)", 0 ) /* KC006 */ GAME( 1996, tekken3ud, tekken3, coh700, namcos12, namcos12_state, init_namcos12, ROT0, "Namco", "Tekken 3 (US, TET3/VER.D)", 0 ) /* KC006 */ GAME( 1996, tekken3ua, tekken3, coh700, namcos12, namcos12_state, init_namcos12, ROT0, "Namco", "Tekken 3 (US, TET3/VER.A)", 0 ) /* KC006 */ diff --git a/src/mame/nichibutsu/cclimber.cpp b/src/mame/nichibutsu/cclimber.cpp index d51d472dc22..3d21c5f62eb 100644 --- a/src/mame/nichibutsu/cclimber.cpp +++ b/src/mame/nichibutsu/cclimber.cpp @@ -2946,7 +2946,7 @@ GAME( 1981, rpatrolb, rpatrol, rpatrol, rpatrol, cclimber_state, empty_i GAME( 1981, silvland, rpatrol, rpatrol, rpatrol, cclimber_state, empty_init, ROT0, "Falcon", "Silver Land (hack of River Patrol)", MACHINE_SUPPORTS_SAVE ) // see pacman.cpp for parent -GAME( 1985, cannonb, cannonbp, cannonb, cannonb, cclimber_state, init_cannonb, ROT90, "bootleg (Soft)", "Cannon Ball (bootleg on Crazy Kong hardware) (set 1, buggy)" , MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) // bootleggers missed protection after bonus game +GAME( 1985, cannonb, cannonbp, cannonb, cannonb, cclimber_state, init_cannonb, ROT90, "bootleg (Soft)", "Cannon Ball (bootleg on Crazy Kong hardware) (set 1, buggy)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) // bootleggers missed protection after bonus game GAME( 1985, cannonb2, cannonbp, cannonb, cannonb, cclimber_state, init_cannonb2, ROT90, "bootleg (TV Game Gruenberg)", "Cannon Ball (bootleg on Crazy Kong hardware) (set 2, buggy)", MACHINE_SUPPORTS_SAVE ) // bootleggers missed protection after bonus game GAME( 1985, cannonb3, cannonbp, cannonb, cannonb, cclimber_state, init_cannonb2, ROT90, "bootleg (Soft)", "Cannon Ball (bootleg on Crazy Kong hardware) (set 3, no bonus game)", MACHINE_SUPPORTS_SAVE ) // the bonus game is patched out, thus avoiding the protection issue @@ -2957,7 +2957,7 @@ GAME( 1982, swimmerb, swimmer, swimmer, swimmerb, swimmer_state, empty_i GAME( 1983, guzzler, 0, guzzler, guzzler, swimmer_state, empty_init, ROT90, "Tehkan", "Guzzler", MACHINE_SUPPORTS_SAVE ) GAME( 1983, guzzlers, guzzler, guzzler, guzzler, swimmer_state, empty_init, ROT90, "Tehkan", "Guzzler (Swimmer conversion)", MACHINE_SUPPORTS_SAVE ) -GAME( 1983, au, 0, au, au, swimmer_state, empty_init, ROT90, "hack", "Au (Swimmer conversion?)", MACHINE_SUPPORTS_SAVE ) // suspect ROM has been tampered with +GAME( 1983, au, 0, au, au, swimmer_state, empty_init, ROT90, "Tehkan", "Au (Swimmer conversion)", MACHINE_SUPPORTS_SAVE ) GAME( 1983, yamato, 0, yamato, yamato, yamato_state, init_yamato, ROT90, "Sega", "Yamato (US)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) GAME( 1983, yamato2, yamato, yamato, yamato, yamato_state, init_yamato, ROT90, "Sega", "Yamato (World?)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/nmk/nmk16.cpp b/src/mame/nmk/nmk16.cpp index debcfc88570..0a371088ac3 100644 --- a/src/mame/nmk/nmk16.cpp +++ b/src/mame/nmk/nmk16.cpp @@ -403,6 +403,7 @@ void nmk16_state::vandyke_map(address_map &map) map(0x080008, 0x080009).portr("DSW1"); map(0x08000a, 0x08000b).portr("DSW2"); map(0x08000f, 0x08000f).r(m_nmk004, FUNC(nmk004_device::read)); + map(0x080015, 0x080015).w(FUNC(nmk16_state::vandyke_flipscreen_w)); map(0x080016, 0x080017).w(FUNC(nmk16_state::nmk004_x0016_w)); map(0x080019, 0x080019).w(FUNC(nmk16_state::tilebank_w)); map(0x08001f, 0x08001f).w(m_nmk004, FUNC(nmk004_device::write)); @@ -423,6 +424,7 @@ void nmk16_state::vandykeb_map(address_map &map) map(0x08000a, 0x08000b).portr("DSW2"); // map(0x08000f, 0x08000f).r(m_nmk004, FUNC(nmk004_device::read)); map(0x080010, 0x08001d).w(FUNC(nmk16_state::vandykeb_scroll_w)); // 10, 12, 1a, 1c + map(0x080015, 0x080015).w(FUNC(nmk16_state::vandyke_flipscreen_w)); map(0x080016, 0x080017).nopw(); // IRQ enable? map(0x080019, 0x080019).w(FUNC(nmk16_state::tilebank_w)); // map(0x08001f, 0x08001f).w(m_nmk004, FUNC(nmk004_device::write)); @@ -656,7 +658,7 @@ void nmk16_state::bioship_map(address_map &map) map(0x080008, 0x080009).portr("DSW1"); map(0x08000a, 0x08000b).portr("DSW2"); map(0x08000f, 0x08000f).r(m_nmk004, FUNC(nmk004_device::read)); -// map(0xc0015, 0xc0015).w(FUNC(nmk16_state::flipscreen_w)); + map(0x080015, 0x080015).w(FUNC(nmk16_state::flipscreen_w)); map(0x080016, 0x080017).w(FUNC(nmk16_state::nmk004_bioship_x0016_w)); map(0x08001f, 0x08001f).w(m_nmk004, FUNC(nmk004_device::write)); map(0x084001, 0x084001).w(FUNC(nmk16_state::bioship_bank_w)); @@ -3814,17 +3816,20 @@ LV4 LV2 LV1 LV1 CPU is stopped during DMA + - 1 line = 1 / (6MHz / 384 px) = 64 usec + - 1 frame = 278 lines * 64 usec = 17792 usec + - VBlank = 54 lines * 64 usec = 3456 usec + - Active = 224 lines * 64 usec = 14336 usec + - IRQ1 gap = 128 lines * 64 usec = 8192 usec */ -// todo:total scanlines is 263, adjust according to that! -// todo: replace with raw screen timings TIMER_DEVICE_CALLBACK_MEMBER(nmk16_state::nmk16_scanline) { - const int NUM_SCANLINES = 256; - const int IRQ1_SCANLINE = 25; // guess - const int VBIN_SCANLINE = 0; - const int VBOUT_SCANLINE = 240; - const int SPRDMA_SCANLINE = 241; // 256 USEC after VBOUT + const int VBIN_SCANLINE = 16; + const int VBOUT_SCANLINE = VBIN_SCANLINE + 224; // VBIN + 224 lines high of active video + const int SPRDMA_SCANLINE = VBOUT_SCANLINE + 4; // 256 usec after VBOUT = 4 lines (each line is 64 USEC) + const int IRQ1_SCANLINE_1 = VBIN_SCANLINE + 52; // 52 lines after VBIN and 68 from the start of frame + const int IRQ1_SCANLINE_2 = IRQ1_SCANLINE_1 + 128; // 128 lines after IRQ1_SCANLINE_1 int scanline = param; @@ -3839,12 +3844,12 @@ TIMER_DEVICE_CALLBACK_MEMBER(nmk16_state::nmk16_scanline) if (scanline == VBIN_SCANLINE) m_maincpu->set_input_line(2, HOLD_LINE); - // time from IRQ2 to first IRQ1 fire. is not stated, 25 is a guess - if (scanline == IRQ1_SCANLINE) + // time from IRQ2 to first IRQ1 fire + if (scanline == IRQ1_SCANLINE_1) m_maincpu->set_input_line(1, HOLD_LINE); - // 8.9ms from first IRQ1 to second IRQ1 fire. approx 128 lines (half frame time) - if (scanline == IRQ1_SCANLINE+(NUM_SCANLINES/2)) // if this happens too late bioship sprites will glitch on the left edge + // 8.192ms from first IRQ1 to second IRQ1 fire. 128 lines + if (scanline == IRQ1_SCANLINE_2) // if this happens too late bioship sprites will glitch on the left edge m_maincpu->set_input_line(1, HOLD_LINE); } @@ -3864,32 +3869,25 @@ void nmk16_state::set_hacky_interrupt_timing(machine_config &config) void nmk16_state::set_hacky_screen_lowres(machine_config &config) { SCREEN(config, m_screen, SCREEN_TYPE_RASTER); - //m_screen->set_raw(XTAL(12'000'000)/2, 384, 0, 256, 278, 16, 240); // confirmed - m_screen->set_refresh_hz(56.18); - m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(3450)); - m_screen->set_size(256, 256); - m_screen->set_visarea(0*8, 32*8-1, 2*8, 30*8-1); + m_screen->set_raw(XTAL(12'000'000)/2, 384, 92, 348, 278, 16, 240); // confirmed m_screen->set_palette(m_palette); NMK_16BIT_SPRITE(config, m_spritegen, XTAL(12'000'000)/2); - m_spritegen->set_screen_size(384, 256); + m_spritegen->set_screen_size(92+348, 16+240); m_spritegen->set_max_sprite_clock(384 * 263); // from hardware manual + m_spritegen->set_videoshift(92); } void nmk16_state::set_hacky_screen_hires(machine_config &config) { SCREEN(config, m_screen, SCREEN_TYPE_RASTER); - //m_screen->set_raw(XTAL(16'000'000)/2, 512, 0, 384, 278, 16, 240); // confirmed - m_screen->set_refresh_hz(56.18); - m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(3450)); - m_screen->set_size(512, 256); - m_screen->set_visarea(0*8, 48*8-1, 2*8, 30*8-1); + m_screen->set_raw(XTAL(16'000'000)/2, 512, 28, 412, 278, 16, 240); // confirmed m_screen->set_palette(m_palette); NMK_16BIT_SPRITE(config, m_spritegen, XTAL(16'000'000)/2); - m_spritegen->set_screen_size(384, 256); - m_spritegen->set_max_sprite_clock(512 * 263); // not verified? - m_spritegen->set_videoshift(64); + m_spritegen->set_screen_size(28+412, 16+240); + m_spritegen->set_max_sprite_clock(384 * 263); // not verified? + m_spritegen->set_videoshift(28+64); } // OSC : 10MHz, 12MHz, 4MHz, 4.9152MHz @@ -9112,8 +9110,8 @@ ROM_END ***************************************************************************/ -GAME( 1989, tharrier, 0, tharrier, tharrier, nmk16_state, init_tharrier, ROT270, "UPL", "Task Force Harrier", 0 ) -GAME( 1989, tharrieru, tharrier, tharrier, tharrier, nmk16_state, init_tharrier, ROT270, "UPL (American Sammy license)", "Task Force Harrier (US)", 0 ) // US version but no regional notice +GAME( 1989, tharrier, 0, tharrier, tharrier, nmk16_state, init_tharrier, ROT270, "UPL", "Task Force Harrier", MACHINE_NO_COCKTAIL ) +GAME( 1989, tharrieru, tharrier, tharrier, tharrier, nmk16_state, init_tharrier, ROT270, "UPL (American Sammy license)", "Task Force Harrier (US)", MACHINE_NO_COCKTAIL ) // US version but no regional notice GAME( 1990, mustang, 0, mustang, mustang, nmk16_state, empty_init, ROT0, "UPL", "US AAF Mustang (25th May. 1990)", 0 ) GAME( 1990, mustangs, mustang, mustang, mustang, nmk16_state, empty_init, ROT0, "UPL (Seoul Trading license)", "US AAF Mustang (25th May. 1990 / Seoul Trading)", 0 ) @@ -9124,7 +9122,7 @@ GAME( 1990, sbsgomo, bioship, bioship, bioship, nmk16_state, GAME( 1990, vandyke, 0, vandyke, vandyke, nmk16_state, empty_init, ROT270, "UPL", "Vandyke (Japan)", 0 ) GAME( 1990, vandykejal, vandyke, vandyke, vandyke, nmk16_state, empty_init, ROT270, "UPL (Jaleco license)", "Vandyke (Jaleco, set 1)", 0 ) GAME( 1990, vandykejal2,vandyke, vandyke, vandyke, nmk16_state, empty_init, ROT270, "UPL (Jaleco license)", "Vandyke (Jaleco, set 2)", 0 ) -GAME( 1990, vandykeb, vandyke, vandykeb, vandykeb, nmk16_state, init_vandykeb, ROT270, "bootleg", "Vandyke (bootleg with PIC16c57)", MACHINE_NO_SOUND ) +GAME( 1990, vandykeb, vandyke, vandykeb, vandykeb, nmk16_state, init_vandykeb, ROT270, "bootleg", "Vandyke (bootleg with PIC16c57)", MACHINE_NO_SOUND ) GAME( 1991, blkheart, 0, blkheart, blkheart, nmk16_state, empty_init, ROT0, "UPL", "Black Heart", 0 ) GAME( 1991, blkheartj, blkheart, blkheart, blkheart, nmk16_state, empty_init, ROT0, "UPL", "Black Heart (Japan)", 0 ) @@ -9149,32 +9147,32 @@ GAME( 1993, gunnail, 0, gunnail_prot, gunnail, macross_prot_state GAME( 1992, gunnailp, gunnail, gunnail_prot, gunnail, macross_prot_state, empty_init, ROT270, "NMK", "GunNail (location test)", 0 ) // still has the 28th May. 1992 string, so unlikely that was the release date for either version. // a 1992 version of Gunnail exists, see https://www.youtube.com/watch?v=tf15Wz0zUiA 3:10; is this bootleg version 'gunnailb'? -GAME( 1993, macross2, 0, macross2, macross2, nmk16_state, init_banked_audiocpu, ROT0, "Banpresto", "Super Spacefortress Macross II / Chou-Jikuu Yousai Macross II", MACHINE_NO_COCKTAIL ) -GAME( 1993, macross2g, macross2, macross2, macross2, nmk16_state, init_banked_audiocpu, ROT0, "Banpresto", "Super Spacefortress Macross II / Chou-Jikuu Yousai Macross II (Gamest review build)", MACHINE_NO_COCKTAIL ) // Service switch pauses game -GAME( 1993, macross2k, macross2, macross2, macross2, nmk16_state, init_banked_audiocpu, ROT0, "Banpresto", "Macross II (Korea)", MACHINE_NO_COCKTAIL ) // Title screen only shows Macross II +GAME( 1993, macross2, 0, macross2, macross2, nmk16_state, init_banked_audiocpu, ROT0, "Banpresto", "Super Spacefortress Macross II / Chou-Jikuu Yousai Macross II", 0 ) +GAME( 1993, macross2g, macross2, macross2, macross2, nmk16_state, init_banked_audiocpu, ROT0, "Banpresto", "Super Spacefortress Macross II / Chou-Jikuu Yousai Macross II (Gamest review build)", 0 ) // Service switch pauses game +GAME( 1993, macross2k, macross2, macross2, macross2, nmk16_state, init_banked_audiocpu, ROT0, "Banpresto", "Macross II (Korea)", 0 ) // Title screen only shows Macross II -GAME( 1993, tdragon2, 0, tdragon2, tdragon2, nmk16_state, init_banked_audiocpu, ROT270, "NMK", "Thunder Dragon 2 (9th Nov. 1993)", MACHINE_NO_COCKTAIL ) -GAME( 1993, tdragon2a, tdragon2, tdragon2, tdragon2, nmk16_state, init_banked_audiocpu, ROT270, "NMK", "Thunder Dragon 2 (1st Oct. 1993)", MACHINE_NO_COCKTAIL ) -GAME( 1993, bigbang, tdragon2, tdragon2, tdragon2, nmk16_state, init_banked_audiocpu, ROT270, "NMK", "Big Bang (9th Nov. 1993, set 1)", MACHINE_NO_COCKTAIL ) -GAME( 1993, bigbanga, tdragon2, tdragon2, tdragon2, nmk16_state, init_banked_audiocpu, ROT270, "NMK", "Big Bang (9th Nov. 1993, set 2)", MACHINE_NO_COCKTAIL ) -GAME( 1996, tdragon3h, tdragon2, tdragon3h, tdragon2, nmk16_state, init_banked_audiocpu, ROT270, "bootleg (Conny Co Ltd.)", "Thunder Dragon 3 (bootleg of Thunder Dragon 2)", MACHINE_NO_SOUND | MACHINE_NO_COCKTAIL ) // based on 1st Oct. 1993 set, needs emulation of the mechanism used to simulate the missing YM2203' IRQs +GAME( 1993, tdragon2, 0, tdragon2, tdragon2, nmk16_state, init_banked_audiocpu, ROT270, "NMK", "Thunder Dragon 2 (9th Nov. 1993)", 0 ) +GAME( 1993, tdragon2a, tdragon2, tdragon2, tdragon2, nmk16_state, init_banked_audiocpu, ROT270, "NMK", "Thunder Dragon 2 (1st Oct. 1993)", 0 ) +GAME( 1993, bigbang, tdragon2, tdragon2, tdragon2, nmk16_state, init_banked_audiocpu, ROT270, "NMK", "Big Bang (9th Nov. 1993, set 1)", 0 ) +GAME( 1993, bigbanga, tdragon2, tdragon2, tdragon2, nmk16_state, init_banked_audiocpu, ROT270, "NMK", "Big Bang (9th Nov. 1993, set 2)", 0 ) +GAME( 1996, tdragon3h, tdragon2, tdragon3h, tdragon2, nmk16_state, init_banked_audiocpu, ROT270, "bootleg (Conny Co Ltd.)", "Thunder Dragon 3 (bootleg of Thunder Dragon 2)", MACHINE_NO_SOUND | 0 ) // based on 1st Oct. 1993 set, needs emulation of the mechanism used to simulate the missing YM2203' IRQs GAME( 1994, arcadian, 0, raphero, raphero, nmk16_state, init_banked_audiocpu, ROT270, "NMK", "Arcadia (NMK)", 0 ) // 23rd July 1993 in test mode, (c)1994 on title screen GAME( 1994, raphero, arcadian, raphero, raphero, nmk16_state, init_banked_audiocpu, ROT270, "NMK", "Rapid Hero (NMK)", 0 ) // ^^ GAME( 1994, rapheroa, arcadian, raphero, raphero, nmk16_state, init_banked_audiocpu, ROT270, "NMK (Media Trading license)", "Rapid Hero (Media Trading)", 0 ) // ^^ - note that all ROM sets have Media Trading(aka Media Shoji) in the tile graphics, but this is the only set that shows it on the titlescreen // both sets of both these games show a date of 9th Mar 1992 in the test mode, they look like different revisions so I doubt this is accurate -GAME( 1992, sabotenb, 0, bjtwin_prot, sabotenb, macross_prot_state, empty_init, ROT0, "NMK / Tecmo", "Saboten Bombers (set 1)", MACHINE_NO_COCKTAIL ) -GAME( 1992, sabotenba, sabotenb, bjtwin_prot, sabotenb, macross_prot_state, empty_init, ROT0, "NMK / Tecmo", "Saboten Bombers (set 2)", MACHINE_NO_COCKTAIL ) -GAME( 1992, cactus, sabotenb, bjtwin, sabotenb, nmk16_state, init_nmk, ROT0, "bootleg", "Cactus (bootleg of Saboten Bombers)", MACHINE_NO_COCKTAIL ) // PCB marked 'Cactus', no title screen +GAME( 1992, sabotenb, 0, bjtwin_prot, sabotenb, macross_prot_state, empty_init, ROT0, "NMK / Tecmo", "Saboten Bombers (set 1)", 0 ) +GAME( 1992, sabotenba, sabotenb, bjtwin_prot, sabotenb, macross_prot_state, empty_init, ROT0, "NMK / Tecmo", "Saboten Bombers (set 2)", 0 ) +GAME( 1992, cactus, sabotenb, bjtwin, sabotenb, nmk16_state, init_nmk, ROT0, "bootleg", "Cactus (bootleg of Saboten Bombers)", 0 ) // PCB marked 'Cactus', no title screen -GAME( 1993, bjtwin, 0, bjtwin_prot, bjtwin, macross_prot_state, empty_init, ROT270, "NMK", "Bombjack Twin (set 1)", MACHINE_NO_COCKTAIL ) -GAME( 1993, bjtwina, bjtwin, bjtwin_prot, bjtwin, macross_prot_state, empty_init, ROT270, "NMK", "Bombjack Twin (set 2)", MACHINE_NO_COCKTAIL ) -GAME( 1993, bjtwinp, bjtwin, bjtwin, bjtwin, nmk16_state, empty_init, ROT270, "NMK", "Bombjack Twin (prototype? with adult pictures, set 1)", MACHINE_NO_COCKTAIL ) // Cheap looking PCB, but Genuine NMK PCB, GFX aren't encrypted (maybe Korean version not proto?) -GAME( 1993, bjtwinpa, bjtwin, bjtwin_prot, bjtwin, macross_prot_state, empty_init, ROT270, "NMK", "Bombjack Twin (prototype? with adult pictures, set 2)", MACHINE_NO_COCKTAIL ) // same PCB as above, different program revision, GFX are encrypted +GAME( 1993, bjtwin, 0, bjtwin_prot, bjtwin, macross_prot_state, empty_init, ROT270, "NMK", "Bombjack Twin (set 1)", 0 ) +GAME( 1993, bjtwina, bjtwin, bjtwin_prot, bjtwin, macross_prot_state, empty_init, ROT270, "NMK", "Bombjack Twin (set 2)", 0 ) +GAME( 1993, bjtwinp, bjtwin, bjtwin, bjtwin, nmk16_state, empty_init, ROT270, "NMK", "Bombjack Twin (prototype? with adult pictures, set 1)", 0 ) // Cheap looking PCB, but Genuine NMK PCB, GFX aren't encrypted (maybe Korean version not proto?) +GAME( 1993, bjtwinpa, bjtwin, bjtwin_prot, bjtwin, macross_prot_state, empty_init, ROT270, "NMK", "Bombjack Twin (prototype? with adult pictures, set 2)", 0 ) // same PCB as above, different program revision, GFX are encrypted -GAME( 1995, nouryoku, 0, bjtwin_prot, nouryoku, macross_prot_state, empty_init, ROT0, "Tecmo", "Nouryoku Koujou Iinkai", MACHINE_NO_COCKTAIL ) -GAME( 1995, nouryokup, nouryoku, bjtwin, nouryoku, nmk16_state, empty_init, ROT0, "Tecmo", "Nouryoku Koujou Iinkai (prototype)", MACHINE_NO_COCKTAIL ) // GFX aren't encrypted +GAME( 1995, nouryoku, 0, bjtwin_prot, nouryoku, macross_prot_state, empty_init, ROT0, "Tecmo", "Nouryoku Koujou Iinkai", 0 ) +GAME( 1995, nouryokup, nouryoku, bjtwin, nouryoku, nmk16_state, empty_init, ROT0, "Tecmo", "Nouryoku Koujou Iinkai (prototype)", 0 ) // GFX aren't encrypted // Non NMK boards @@ -9203,10 +9201,10 @@ GAME( 1991, tdragonb2, tdragon, tdragonb2, tdragon, nmk16_state, empty GAME( 1992, gunnailb, gunnail, gunnailb, gunnail, nmk16_state, init_gunnailb, ROT270, "bootleg", "GunNail (bootleg)", MACHINE_IMPERFECT_SOUND ) // crappy sound, unknown how much of it is incomplete emulation and how much bootleg quality // these are from Comad, based on the Thunder Dragon code? -GAME( 1992, ssmissin, 0, ssmissin, ssmissin, nmk16_state, init_ssmissin, ROT270, "Comad", "S.S. Mission", MACHINE_NO_COCKTAIL ) +GAME( 1992, ssmissin, 0, ssmissin, ssmissin, nmk16_state, init_ssmissin, ROT270, "Comad", "S.S. Mission", 0 ) -GAME( 1996, airattck, 0, ssmissin, airattck, nmk16_state, init_ssmissin, ROT270, "Comad", "Air Attack (set 1)", MACHINE_NO_COCKTAIL ) -GAME( 1996, airattcka, airattck, ssmissin, airattck, nmk16_state, init_ssmissin, ROT270, "Comad", "Air Attack (set 2)", MACHINE_NO_COCKTAIL ) +GAME( 1996, airattck, 0, ssmissin, airattck, nmk16_state, init_ssmissin, ROT270, "Comad", "Air Attack (set 1)", 0 ) +GAME( 1996, airattcka, airattck, ssmissin, airattck, nmk16_state, init_ssmissin, ROT270, "Comad", "Air Attack (set 2)", 0 ) // afega & clones GAME( 1995, twinactn, 0, twinactn, twinactn, nmk16_state, init_twinactn, ROT0, "Afega", "Twin Action", 0 ) // hacked from USSAF Mustang @@ -9214,7 +9212,7 @@ GAME( 1995, twinactn, 0, twinactn, twinactn, nmk16_state, init_ GAME( 1995, dolmen, 0, twinactn, dolmen, nmk16_state, init_twinactn, ROT0, "Afega", "Dolmen", 0 ) GAME( 1995, dolmenk, dolmen, twinactn, dolmenk, nmk16_state, init_twinactn, ROT0, "Afega", "Goindol (Afega)", 0 ) -GAME( 1998, stagger1, 0, stagger1, stagger1, afega_state, empty_init, ROT270, "Afega", "Stagger I (Japan)", 0 ) +GAME( 1998, stagger1, 0, stagger1, stagger1, afega_state, empty_init, ROT270, "Afega", "Stagger I (Japan)", 0 ) // flip-screen doesn't work on sprites for all sets GAME( 1997, redhawk, stagger1, stagger1, stagger1, afega_state, init_redhawk, ROT270, "Afega (New Vision Ent. license)", "Red Hawk (USA, Canada & South America)", 0 ) GAME( 1997, redhawki, stagger1, redhawki, stagger1, afega_state, init_redhawki, ROT0, "Afega (Hae Dong Corp license)", "Red Hawk (horizontal, Italy)", 0 ) // bootleg? strange scroll regs GAME( 1997, redhawks, stagger1, redhawki, stagger1, afega_state, empty_init, ROT0, "Afega (Hae Dong Corp license)", "Red Hawk (horizontal, Spain, set 1)", 0 ) @@ -9224,7 +9222,7 @@ GAME( 1997, redhawke, stagger1, stagger1, stagger1, afega_state, empty GAME( 1997, redhawkk, stagger1, stagger1, stagger1, afega_state, empty_init, ROT270, "Afega", "Red Hawk (Korea)", 0 ) GAME( 1997, redhawkb, stagger1, redhawkb, redhawkb, afega_state, empty_init, ROT0, "bootleg (Vince)", "Red Hawk (horizontal, bootleg)", 0 ) -GAME( 1998, grdnstrm, 0, grdnstrm, grdnstrm, afega_state, empty_init, ORIENTATION_FLIP_Y, "Afega (Apples Industries license)", "Guardian Storm (horizontal, not encrypted)", 0 ) +GAME( 1998, grdnstrm, 0, grdnstrm, grdnstrm, afega_state, empty_init, ORIENTATION_FLIP_Y, "Afega (Apples Industries license)", "Guardian Storm (horizontal, not encrypted)", 0 ) // flip-screen doesn't work on sprites for all sets GAME( 1998, grdnstrmv, grdnstrm, grdnstrmk, grdnstrk, afega_state, init_grdnstrm, ROT270, "Afega (Apples Industries license)", "Guardian Storm (vertical)", 0 ) GAME( 1998, grdnstrmj, grdnstrm, grdnstrmk, grdnstrk, afega_state, init_grdnstrmg, ROT270, "Afega", "Sen Jing - Guardian Storm (Japan)", 0 ) GAME( 1998, grdnstrmk, grdnstrm, grdnstrmk, grdnstrk, afega_state, init_grdnstrm, ROT270, "Afega", "Jeon Sin - Guardian Storm (Korea)", 0 ) diff --git a/src/mame/nmk/nmk16.h b/src/mame/nmk/nmk16.h index 73a34511a2d..72183e630fb 100644 --- a/src/mame/nmk/nmk16.h +++ b/src/mame/nmk/nmk16.h @@ -95,6 +95,7 @@ class nmk16_state : public driver_device, public seibu_sound_common void txvideoram_w(offs_t offset, u16 data, u16 mem_mask = ~0); void flipscreen_w(u8 data); + void vandyke_flipscreen_w(u8 data); void tilebank_w(u8 data); void macross2_sound_bank_w(u8 data); diff --git a/src/mame/nmk/nmk16_v.cpp b/src/mame/nmk/nmk16_v.cpp index d70a6191d82..2112495f8ff 100644 --- a/src/mame/nmk/nmk16_v.cpp +++ b/src/mame/nmk/nmk16_v.cpp @@ -106,6 +106,9 @@ VIDEO_START_MEMBER(nmk16_state, bioship) video_init(); m_bioship_background_bank=0; save_item(NAME(m_bioship_background_bank)); + m_bg_tilemap[0]->set_scrolldx(92, 92); + m_bg_tilemap[1]->set_scrolldx(92, 92); + m_tx_tilemap->set_scrolldx(92, 92); } VIDEO_START_MEMBER(nmk16_state,macross) @@ -117,6 +120,8 @@ VIDEO_START_MEMBER(nmk16_state,macross) m_tx_tilemap->set_transparent_pen(15); video_init(); + m_bg_tilemap[0]->set_scrolldx(92, 92); + m_tx_tilemap->set_scrolldx(92, 92); } VIDEO_START_MEMBER(nmk16_state,strahl) @@ -126,6 +131,7 @@ VIDEO_START_MEMBER(nmk16_state,strahl) m_bg_tilemap[1]->set_transparent_pen(15); m_sprdma_base = 0xf000; + m_bg_tilemap[1]->set_scrolldx(92, 92); } VIDEO_START_MEMBER(nmk16_state,macross2) @@ -138,8 +144,8 @@ VIDEO_START_MEMBER(nmk16_state,macross2) video_init(); // 384x224 screen, leftmost 64 pixels have to be retrieved from the other side of the tilemap (!) - m_bg_tilemap[0]->set_scrolldx(64,64); - m_tx_tilemap->set_scrolldx(64,64); + m_bg_tilemap[0]->set_scrolldx(28+64, 28+64); + m_tx_tilemap->set_scrolldx(28+64, 28+64); } VIDEO_START_MEMBER(nmk16_state,gunnail) @@ -155,7 +161,7 @@ VIDEO_START_MEMBER(nmk16_state, bjtwin) video_init(); // 384x224 screen, leftmost 64 pixels have to be retrieved from the other side of the tilemap (!) - m_bg_tilemap[0]->set_scrolldx(64,64); + m_bg_tilemap[0]->set_scrolldx(28+64, 28+64); } void nmk16_state::mustang_scroll_w(u16 data) @@ -226,6 +232,12 @@ void nmk16_state::flipscreen_w(u8 data) m_spritegen->set_flip_screen(flip_screen()); } +// vandyke writes a 0 value when flip screen is enabled, contrary to rest of games that write 1 +void nmk16_state::vandyke_flipscreen_w(u8 data) +{ + flipscreen_w(~data); +} + void nmk16_state::tilebank_w(u8 data) { if (m_bgbank != data) @@ -416,6 +428,8 @@ VIDEO_START_MEMBER(afega_state,grdnstrm) m_tx_tilemap->set_transparent_pen(15); video_init(); + m_bg_tilemap[0]->set_scrolldx(92, 92); + m_tx_tilemap->set_scrolldx(92, 92); } diff --git a/src/mame/omron/luna_88k.cpp b/src/mame/omron/luna_88k.cpp index 2faa903769e..75f9db65bf2 100644 --- a/src/mame/omron/luna_88k.cpp +++ b/src/mame/omron/luna_88k.cpp @@ -386,13 +386,11 @@ void luna_88k_state_base::common_config(machine_config &config, XTAL clock) { MC88100(config, m_cpu, clock.value()); m_cpu->set_addrmap(AS_PROGRAM, &luna_88k_state_base::cpu_map); + m_cpu->set_cmmu_code([this](u32 const address) -> mc88200_device & { return *m_cmmu[0]; }); + m_cpu->set_cmmu_data([this](u32 const address) -> mc88200_device & { return *m_cmmu[1]; }); - MC88200(config, m_cmmu[0], clock.value(), 0x07); // cpu0 cmmu i0 - m_cmmu[0]->set_mbus(m_cpu, AS_PROGRAM); - m_cpu->set_cmmu_i(m_cmmu[0]); - MC88200(config, m_cmmu[1], clock.value(), 0x06); // cpu0 cmmu d0 - m_cmmu[1]->set_mbus(m_cpu, AS_PROGRAM); - m_cpu->set_cmmu_d(m_cmmu[1]); + MC88200(config, m_cmmu[0], clock.value(), 0x07).set_mbus(m_cpu, AS_PROGRAM); // cpu0 cmmu i0 + MC88200(config, m_cmmu[1], clock.value(), 0x06).set_mbus(m_cpu, AS_PROGRAM); // cpu0 cmmu d0 // 6 SIMMs for RAM arranged as three groups of 2? RAM(config, m_ram); diff --git a/src/mame/robotron/z9001.cpp b/src/mame/robotron/z9001.cpp index 99532785021..33d7230eb7d 100644 --- a/src/mame/robotron/z9001.cpp +++ b/src/mame/robotron/z9001.cpp @@ -1,5 +1,5 @@ // license:BSD-3-Clause -// copyright-holders:Miodrag Milanovic , Robbbert +// copyright-holders:Miodrag Milanovic, Robbbert /************************************************************************************* Robotron Z9001 (KC85/1) diff --git a/src/mame/roland/roland_cm32p.cpp b/src/mame/roland/roland_cm32p.cpp index 943171392d1..81f6882cd69 100644 --- a/src/mame/roland/roland_cm32p.cpp +++ b/src/mame/roland/roland_cm32p.cpp @@ -256,7 +256,7 @@ Some routine locations #include "cpu/mcs96/i8x9x.h" #include "machine/ram.h" #include "machine/timer.h" -#include "sound/rolandpcm.h" +#include "sound/roland_lp.h" #include "video/msm6222b.h" #include "bus/generic/slot.h" #include "bus/generic/carts.h" diff --git a/src/mame/roland/roland_d50.cpp b/src/mame/roland/roland_d50.cpp index 6f57dee5436..3412c714957 100644 --- a/src/mame/roland/roland_d50.cpp +++ b/src/mame/roland/roland_d50.cpp @@ -122,7 +122,7 @@ ROM_START(d50) // Newer PCB with silkscreen "Roland || D-50, D-550 || MAIN BOARD // missing 2.00 ROM_REGION(0x2000, "maincpu", 0) - ROM_LOAD("d78312g-022_15179266.ic25", 0x0000, 0x2000, NO_DUMP) // 8-digit Roland part number not printed on IC + ROM_LOAD("d78312g-022_15179266.ic25", 0x0000, 0x2000, CRC(9564903f) SHA1(f68ed97a06764ee000fe6e9d7b39017165f0efc4)) // 8-digit Roland part number not printed on IC ROM_COPY("progrom", 0x0000, 0x0000, 0x2000) ROM_REGION(0x80000, "pcm", 0) diff --git a/src/mame/roland/roland_d70.cpp b/src/mame/roland/roland_d70.cpp index 05b03e2db17..7f73a6f4813 100644 --- a/src/mame/roland/roland_d70.cpp +++ b/src/mame/roland/roland_d70.cpp @@ -16,7 +16,7 @@ #include "cpu/mcs96/i8x9x.h" #include "cpu/mcs96/i8xc196.h" #include "machine/timer.h" -#include "sound/rolandpcm.h" +#include "sound/roland_lp.h" #include "video/t6963c.h" #include "emupal.h" @@ -352,12 +352,12 @@ void roland_d70_state::dsp_io_w(offs_t offset, u8 data) { } u8 roland_d70_state::tvf_io_r(offs_t offset) { - logerror("tvf read %x\n", offset); + logerror("tvf read %04x\n", offset); return 0; } void roland_d70_state::tvf_io_w(offs_t offset, u8 data) { - logerror("twf write $x= %x\n", offset, data); + logerror("tvf write %04x= %02x\n", offset, data); } u8 roland_d70_state::snd_io_r(offs_t offset) { @@ -494,11 +494,11 @@ void roland_d70_state::init_d70() { u8 *dst = reinterpret_cast(memregion("pcm")->base()); // descramble internal ROMs descramble_rom_internal(&dst[0x000000], &src[0x000000]); + descramble_rom_internal(&dst[0x080000], &src[0x080000]); descramble_rom_internal(&dst[0x100000], &src[0x100000]); + descramble_rom_internal(&dst[0x180000], &src[0x180000]); descramble_rom_internal(&dst[0x200000], &src[0x200000]); descramble_rom_internal(&dst[0x300000], &src[0x300000]); - descramble_rom_internal(&dst[0x400000], &src[0x400000]); - descramble_rom_internal(&dst[0x500000], &src[0x500000]); } void roland_d70_state::descramble_rom_internal(u8 *dst, const u8 *src) { @@ -515,11 +515,11 @@ ROM_START(d70) ROM_REGION(0x600000, "pcmorg", 0) // ROMs before descrambling ROM_LOAD("roland_d70_waverom-a.bin", 0x000000, 0x80000, CRC(8e53b2a3) SHA1(4872530870d5079776e80e477febe425dc0ec1df)) + ROM_LOAD("roland_d70_waverom-e.bin", 0x080000, 0x80000, CRC(d46cc7a4) SHA1(d378ac89a5963e37f7c157b3c8e71892c334fd7b)) ROM_LOAD("roland_d70_waverom-b.bin", 0x100000, 0x80000, CRC(c8220761) SHA1(49e55fa672020f95fd9c858ceaae94d6db93df7d)) + ROM_LOAD("roland_d70_waverom-f.bin", 0x180000, 0x80000, CRC(d4b01f5e) SHA1(acd867d68e49e5f59f1006ed14a7ca197b6dc4af)) ROM_LOAD("roland_d70_waverom-c.bin", 0x200000, 0x80000, CRC(733c4054) SHA1(9b6b59ab74e5bf838702abb087c408aaa85b7b1f)) ROM_LOAD("roland_d70_waverom-d.bin", 0x300000, 0x80000, CRC(b6c662d2) SHA1(3fcbcfd0d8d0fa419c710304c12482e2f79a907f)) - ROM_LOAD("roland_d70_waverom-e.bin", 0x400000, 0x80000, CRC(d46cc7a4) SHA1(d378ac89a5963e37f7c157b3c8e71892c334fd7b)) - ROM_LOAD("roland_d70_waverom-f.bin", 0x500000, 0x80000, CRC(d4b01f5e) SHA1(acd867d68e49e5f59f1006ed14a7ca197b6dc4af)) ROM_REGION(0x600000, "pcm", ROMREGION_ERASEFF) // ROMs after descrambling ROM_REGION(0x400, "lcd:cgrom", 0) diff --git a/src/mame/roland/roland_jv80.cpp b/src/mame/roland/roland_jv80.cpp index bf6088d3102..0cb55583747 100644 --- a/src/mame/roland/roland_jv80.cpp +++ b/src/mame/roland/roland_jv80.cpp @@ -2,13 +2,15 @@ // copyright-holders:AJR /**************************************************************************** - Skeleton driver for Roland JV-80 & JV-880 synthesizers. + Skeleton driver for Roland JV-80, JV-880 and related synthesizers. ****************************************************************************/ #include "emu.h" +#include "cpu/h8500/h8510.h" #include "cpu/h8500/h8532.h" #include "machine/nvram.h" +#include "sound/roland_gp.h" namespace { @@ -19,25 +21,30 @@ class roland_jv80_state : public driver_device roland_jv80_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") + , m_pcm(*this, "pcm") { } void jv880(machine_config &config); private: - void mem_map(address_map &map); + void jv880_mem_map(address_map &map); required_device m_maincpu; + required_device m_pcm; }; -void roland_jv80_state::mem_map(address_map &map) +void roland_jv80_state::jv880_mem_map(address_map &map) { - map(0x08000, 0x09fff).ram(); + map(0x00000, 0x07fff).rom().region("maincpu", 0); + map(0x08000, 0x0dfff).ram().mirror(0xa0000); + map(0x0f000, 0x0f3ff).rw(m_pcm, FUNC(tc6116_device::read), FUNC(tc6116_device::write)); map(0x10000, 0x3ffff).rom().region("progrom", 0x10000); map(0x40000, 0x4ffff).rom().region("progrom", 0); - map(0xa0000, 0xa7fff).ram(); - map(0xe0000, 0xe7fff).ram().share("nvram"); + map(0xa0000, 0xbffff).ram(); + map(0xc0000, 0xd7fff).ram().share("nvram"); + // map(0xe0000, 0xf7fff).ram().share("cardram"); } static INPUT_PORTS_START(jv880) @@ -46,11 +53,61 @@ INPUT_PORTS_END void roland_jv80_state::jv880(machine_config &config) { HD6435328(config, m_maincpu, 20_MHz_XTAL); - m_maincpu->set_addrmap(AS_PROGRAM, &roland_jv80_state::mem_map); + m_maincpu->set_addrmap(AS_PROGRAM, &roland_jv80_state::jv880_mem_map); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // LC36256AML-10 (IC18) + CR2032 battery - //TC6116(config, "pcm", 23.2_MHz_XTAL); + TC6116(config, "pcm", 23.2_MHz_XTAL); +} + +class roland_rd500_state : public driver_device +{ +public: + roland_rd500_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_pcm(*this, "pcm") + { + } + + void rd500(machine_config &config); + +private: + void rd500_mem_map(address_map &map); + + u8 keyscan_r(offs_t offset); + void keyscan_w(offs_t offset, u8 data); + + required_device m_maincpu; + required_device m_pcm; +}; + +void roland_rd500_state::rd500_mem_map(address_map &map) +{ + map(0x000000, 0x8fffff).rom().region("progrom", 0); + map(0x900000, 0x90ffff).ram(); + map(0xa00000, 0xa0ffff).rw(m_pcm, FUNC(tc6116_device::read), FUNC(tc6116_device::write)); + map(0xc00000, 0xc0ffff).rw(FUNC(roland_rd500_state::keyscan_r), FUNC(roland_rd500_state::keyscan_w)); +} + +u8 roland_rd500_state::keyscan_r(offs_t offset) +{ + return 0; +} + +void roland_rd500_state::keyscan_w(offs_t offset, u8 data) +{ +} + +static INPUT_PORTS_START(rd500) +INPUT_PORTS_END + +void roland_rd500_state::rd500(machine_config &config) +{ + HD6415108(config, m_maincpu, 20_MHz_XTAL); + m_maincpu->set_addrmap(AS_PROGRAM, &roland_rd500_state::rd500_mem_map); + + TC6116(config, "pcm", 23.2_MHz_XTAL); } ROM_START(jv880) @@ -70,8 +127,20 @@ ROM_START(jv880) ROM_LOAD("roland-b_r15209313_lh5375n3.ic25", 0x200000, 0x200000, CRC(d55fcf90) SHA1(963ce75b6668dab377d3a2fd895630a745491be5)) ROM_END +ROM_START(rd500) + ROM_REGION(0x80000, "progrom", 0) + ROM_LOAD("rd500_rom.bin", 0x00000, 0x80000, CRC(668fc7e9) SHA1(59e28d3e2190902dd6fd02a9820f96e383781178)) + + ROM_REGION(0x400000, "waverom", 0) + ROM_LOAD("roland-a_r00342978.ic4", 0x000000, 0x200000, CRC(c885bf4f) SHA1(e14f0f4a8181e09fae7db10130e4ed3cd6bf5a34)) + ROM_LOAD("roland-b_r00343012.ic5", 0x200000, 0x200000, CRC(ceb02d33) SHA1(9f6969d94598c68902188085d0c91fb8b300d762)) + ROM_LOAD("roland-c_r00343023.ic6", 0x400000, 0x200000, CRC(f627cdb7) SHA1(7b834fee5db5a7377ec7f66172d0fa3096cefbc9)) + ROM_LOAD("roland-d_r00343034.ic7", 0x600000, 0x200000, CRC(c06be973) SHA1(2e7ce8a91a6f92648f73d7ff8c1d608f62df9aab)) +ROM_END + } // anonymous namespace //SYST(1992, jv80, 0, 0, jv80, jv80, roland_jv80_state, empty_init, "Roland", "JV-80 Multi Timbral Synthesizer", MACHINE_IS_SKELETON) SYST(1992, jv880, 0, 0, jv880, jv880, roland_jv80_state, empty_init, "Roland", "JV-880 Multi Timbral Synthesizer Module", MACHINE_IS_SKELETON) +SYST(1994, rd500, 0, 0, rd500, rd500, roland_rd500_state, empty_init, "Roland", "RD-500 Digital Piano", MACHINE_IS_SKELETON) diff --git a/src/mame/roland/roland_r8.cpp b/src/mame/roland/roland_r8.cpp index 4280953c9d9..064259cce44 100644 --- a/src/mame/roland/roland_r8.cpp +++ b/src/mame/roland/roland_r8.cpp @@ -79,7 +79,7 @@ R8 mkII doesn't seem to store the tone list in the program ROM. #include "bus/generic/slot.h" #include "cpu/upd78k/upd78k2.h" #include "machine/nvram.h" -#include "sound/rolandpcm.h" +#include "sound/roland_lp.h" #include "softlist_dev.h" #include "speaker.h" diff --git a/src/mame/roland/roland_u20.cpp b/src/mame/roland/roland_u20.cpp index cfa0e9d1b42..04289961732 100644 --- a/src/mame/roland/roland_u20.cpp +++ b/src/mame/roland/roland_u20.cpp @@ -8,7 +8,7 @@ #include "emu.h" #include "cpu/mcs96/i8x9x.h" -#include "sound/rolandpcm.h" +#include "sound/roland_lp.h" #include "speaker.h" diff --git a/src/mame/saitek/companion2.cpp b/src/mame/saitek/companion2.cpp index e44fb043b29..b98f23d7f0a 100644 --- a/src/mame/saitek/companion2.cpp +++ b/src/mame/saitek/companion2.cpp @@ -14,7 +14,7 @@ If this is not done, NVRAM won't save properly. TODO: - if/when MAME supports an exit callback, hook up power-off switch to that -******************************************************************************** +================================================================================ Hardware notes: @@ -50,7 +50,7 @@ is either VCC or GND to distinguish between the two. The Tandy clones run at a lower clock frequency, 3MHz and 6MHz respectively. -******************************************************************************** +================================================================================ CXG Enterprise "S" / Star Chess is on very similar hardware, so it's emulated in this driver too. diff --git a/src/mame/sega/model1.cpp b/src/mame/sega/model1.cpp index 61da3ea21d9..e781e70701e 100644 --- a/src/mame/sega/model1.cpp +++ b/src/mame/sega/model1.cpp @@ -14,6 +14,7 @@ Known functional issues: Sega Model 1 Hardware Overview ------------------------------ +Documented by Guru Note! This document is a Work-In-Progress and covers all the dumped Sega Model 1 games, including... @@ -1752,7 +1753,7 @@ void model1_state::model1(machine_config &config) I8251(config, m_m1uart, 8000000); // uPD71051C, clock unknown m_m1uart->txd_handler().set(m_m1audio, FUNC(segam1audio_device::write_txd)); - clock_device &m1uart_clock(CLOCK(config, "m1uart_clock", 500000)); // 16 times 31.25MHz (standard Sega/MIDI sound data rate) + clock_device &m1uart_clock(CLOCK(config, "m1uart_clock", 16_MHz_XTAL / 2 / 16)); // 16 times 31.25kHz (standard Sega/MIDI sound data rate) m1uart_clock.signal_handler().set(m_m1uart, FUNC(i8251_device::write_txc)); m1uart_clock.signal_handler().append(m_m1uart, FUNC(i8251_device::write_rxc)); } diff --git a/src/mame/sega/model2.cpp b/src/mame/sega/model2.cpp index f9eca11243f..dbf27632be5 100644 --- a/src/mame/sega/model2.cpp +++ b/src/mame/sega/model2.cpp @@ -2544,7 +2544,7 @@ void model2o_state::model2o(machine_config &config) I8251(config, m_uart, 8000000); // uPD71051C, clock unknown m_uart->txd_handler().set(m_m1audio, FUNC(segam1audio_device::write_txd)); - clock_device &uart_clock(CLOCK(config, "uart_clock", 500000)); // 16 times 31.25MHz (standard Sega/MIDI sound data rate) + clock_device &uart_clock(CLOCK(config, "uart_clock", 16_MHz_XTAL / 2 / 16)); // 16 times 31.25kHz (standard Sega/MIDI sound data rate) uart_clock.signal_handler().set(m_uart, FUNC(i8251_device::write_txc)); uart_clock.signal_handler().append(m_uart, FUNC(i8251_device::write_rxc)); diff --git a/src/mame/seta/seta.cpp b/src/mame/seta/seta.cpp index 377093e3df0..a924c5f89b3 100644 --- a/src/mame/seta/seta.cpp +++ b/src/mame/seta/seta.cpp @@ -1439,7 +1439,6 @@ class seta_state : public driver_device void seta_vregs_w(u8 data); u16 seta_dsw_r(offs_t offset); - u16 zingzipbl_unknown_r(); void blockcar_interrupt_w(u8 data); u16 extdwnhl_watchdog_r(); void utoukond_sound_control_w(u8 data); @@ -2497,41 +2496,36 @@ void zombraid_state::zombraid_x1_map(address_map &map) map(0x80000, 0xfffff).bankr("x1_bank"); } -u16 seta_state::zingzipbl_unknown_r() -{ - return 0x0000; -} - void seta_state::zingzipbl_map(address_map &map) { - map(0x000000, 0x07ffff).rom(); // ROM (up to 2MB) - map(0x200000, 0x20ffff).ram().share("workram"); // RAM (pointer for zombraid crosshair hack) -// map(0x400000, 0x400001).port_r("P1"); // P1 -// map(0x400002, 0x400003).port_r("P2"); // P2 - map(0x400002, 0x400003).r(FUNC(seta_state::zingzipbl_unknown_r)); // P2 -// map(0x400004, 0x400005).port_r("COINS"); // Coins - map(0x500001, 0x500001).w(FUNC(seta_state::seta_coin_lockout_w)); // Coin Lockout - map(0x500003, 0x500003).w(FUNC(seta_state::seta_vregs_w)); // Video Registers - map(0x500004, 0x500005).nopw(); - //map(0x600000, 0x600003).r(FUNC(seta_state::seta_dsw_r)); // DSW - map(0x700400, 0x700fff).ram().share("paletteram1"); // Palette - map(0x800000, 0x803fff).ram().w(m_layers[0], FUNC(x1_012_device::vram_w)).share("layer1"); // VRAM 0&1 - map(0x880000, 0x883fff).ram().w(m_layers[1], FUNC(x1_012_device::vram_w)).share("layer2"); // VRAM 2&3 - map(0x900000, 0x900005).rw(m_layers[0], FUNC(x1_012_device::vctrl_r), FUNC(x1_012_device::vctrl_w)); // VRAM 0&1 Ctrl - - //map(0x902006, 0x902007).w // writes 0 here on start up - map(0x902010, 0x902013).r(FUNC(seta_state::zingzipbl_unknown_r)); - - map(0x980000, 0x980005).rw(m_layers[1], FUNC(x1_012_device::vctrl_r), FUNC(x1_012_device::vctrl_w)); // VRAM 2&3 Ctrl + map(0x000000, 0x07ffff).rom(); // ok + map(0x200000, 0x20ffff).ram(); // ok + // TODO: coins (possibly 0x400000). For now only free-play 'works'. + map(0x500001, 0x500001).w(FUNC(seta_state::seta_coin_lockout_w)); // ok + map(0x500003, 0x500003).w(FUNC(seta_state::seta_vregs_w)); // maybe? + map(0x700400, 0x700fff).ram().share("paletteram1"); // ok + map(0x800000, 0x803fff).ram().w(m_layers[0], FUNC(x1_012_device::vram_w)).share("layer1"); // ok + map(0x880000, 0x883fff).ram().w(m_layers[1], FUNC(x1_012_device::vram_w)).share("layer2"); // ok + map(0x902001, 0x902001).rw("oki", FUNC(okim6295_device::read), FUNC(okim6295_device::write)); // should be ok, but bad ROM + // the following appear to be video registers, but laid out differently than in the original. Trampoline galore for now. TODO: verify + map(0x902004, 0x902005).lw16(NAME([this] (offs_t offset, uint16_t data, uint16_t mem_mask) { m_layers[1]->vctrl_w(1, data, mem_mask); })); + map(0x902006, 0x902007).lw16(NAME([this] (offs_t offset, uint16_t data, uint16_t mem_mask) { m_layers[1]->vctrl_w(0, data, mem_mask); })); + map(0x902008, 0x902009).lw16(NAME([this] (offs_t offset, uint16_t data, uint16_t mem_mask) { m_layers[0]->vctrl_w(1, data, mem_mask); })); + map(0x90200a, 0x90200b).lw16(NAME([this] (offs_t offset, uint16_t data, uint16_t mem_mask) { m_layers[0]->vctrl_w(0, data, mem_mask); })); + map(0x900004, 0x900005).lw16(NAME([this] (offs_t offset, uint16_t data, uint16_t mem_mask) { m_layers[0]->vctrl_w(2, data, mem_mask); })); + map(0x980004, 0x980005).lw16(NAME([this] (offs_t offset, uint16_t data, uint16_t mem_mask) { m_layers[1]->vctrl_w(2, data, mem_mask); })); + map(0x902010, 0x902013).r(FUNC(seta_state::seta_dsw_r)); // ok + map(0x902014, 0x902015).portr("P1"); // ok + map(0x902016, 0x902017).portr("P2"); // ok + + // TODO: sprites also seem to have different registers, need correct implementation map(0xa00000, 0xa005ff).ram().rw(m_spritegen, FUNC(x1_001_device::spriteylow_r16), FUNC(x1_001_device::spriteylow_w16)); // Sprites Y map(0xa00600, 0xa00607).ram().rw(m_spritegen, FUNC(x1_001_device::spritectrl_r16), FUNC(x1_001_device::spritectrl_w16)); map(0xa00608, 0xa00fff).ram(); // zeroed on start up - map(0xa00600, 0xa00607).ram().rw(m_spritegen, FUNC(x1_001_device::spritectrl_r16), FUNC(x1_001_device::spritectrl_w16)); - map(0xa80000, 0xa80001).ram(); // ? 0x4000 map(0xb00000, 0xb03fff).ram().rw(m_spritegen, FUNC(x1_001_device::spritecode_r16), FUNC(x1_001_device::spritecode_w16)); // Sprites Code + X + Attr - map(0xc00000, 0xc000ff).ram(); // zeroed on startup - map(0xe00000, 0xe00001).nopw(); // ? VBlank IRQ Ack - map(0xf00000, 0xf00001).nopw(); // ? Sound IRQ Ack + + map(0xc00000, 0xc000ff).ram(); // zeroed on startup, doesn't seem to be used later + map(0xe00000, 0xe00001).w(m_watchdog, FUNC(watchdog_timer_device::reset16_w)); } void seta_state::jjsquawb_map(address_map &map) @@ -9016,8 +9010,8 @@ void seta_state::zingzipbl(machine_config &config) M68000(config.replace(), m_maincpu, 16000000); // 16 MHz m_maincpu->set_addrmap(AS_PROGRAM, &seta_state::zingzipbl_map); - TIMER(config, "scantimer").configure_scanline(FUNC(seta_state::seta_interrupt_1_and_2), "screen", 0, 1); - subdevice("screen")->screen_vblank().set_nop(); + + subdevice("screen")->screen_vblank().set_inputline(m_maincpu, 6, HOLD_LINE); // TODO: there's probably more then this config.device_remove("x1snd"); @@ -9731,8 +9725,8 @@ ROM_START( zingzipbl ) ROM_COPY( "gfxtemp", 0x080000, 0x000000, 0x80000 ) ROM_COPY( "gfxtemp", 0x180000, 0x080000, 0x80000 ) - ROM_REGION( 0x100000, "oki", 0 ) // OKI Samples - Not Seta - ROM_LOAD( "8", 0x000000, 0x40000, CRC(7927a200) SHA1(fd6163d2867959ec14b418d6207ae024afd3b654) ) + ROM_REGION( 0x40000, "oki", 0 ) // OKI Samples - Not Seta + ROM_LOAD( "8", 0x00000, 0x40000, BAD_DUMP CRC(7927a200) SHA1(fd6163d2867959ec14b418d6207ae024afd3b654) ) // BADADDR xxxxxxxxxxxxxxx-xx ROM_END ROM_START( atehate ) @@ -11346,7 +11340,7 @@ GAME( 1992, neobattl, 0, umanclub, neobattl, seta_state, empty_ini GAME( 1992, umanclub, 0, umanclub, umanclub, seta_state, empty_init, ROT0, "Banpresto", "Ultraman Club - Tatakae! Ultraman Kyoudai!!", 0 ) GAME( 1992, zingzip, 0, zingzip, zingzip, seta_state, empty_init, ROT270, "Allumer / Tecmo", "Zing Zing Zip (World) / Zhen Zhen Ji Pao (China?)", 0 ) // This set has Chinese Characters in Title screen, it distributed for Chinese market/or Title: DSW? -GAME( 1992, zingzipbl, zingzip, zingzipbl, zingzip, seta_state, empty_init, ROT270, "bootleg", "Zing Zing Zip (bootleg)", MACHINE_NOT_WORKING ) +GAME( 1992, zingzipbl, zingzip, zingzipbl, zingzip, seta_state, empty_init, ROT270, "bootleg", "Zing Zing Zip (bootleg)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) // different video registers, bad Oki ROM dump GAME( 1993, atehate, 0, atehate, atehate, seta_state, empty_init, ROT0, "Athena", "Athena no Hatena?", 0 ) diff --git a/src/mame/shared/segam1audio.cpp b/src/mame/shared/segam1audio.cpp index 70a8fc8b1a7..d57d6350c7a 100644 --- a/src/mame/shared/segam1audio.cpp +++ b/src/mame/shared/segam1audio.cpp @@ -52,33 +52,37 @@ DEFINE_DEVICE_TYPE(SEGAM1AUDIO, segam1audio_device, "segam1audio", "Sega Model 1 void segam1audio_device::device_add_mconfig(machine_config &config) { - M68000(config, m_audiocpu, 10000000); // verified on real h/w + M68000(config, m_audiocpu, 20_MHz_XTAL / 2); // verified on real h/w m_audiocpu->set_addrmap(AS_PROGRAM, &segam1audio_device::segam1audio_map); SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - YM3438(config, m_ym, 8_MHz_XTAL); + YM3438(config, m_ym, 16_MHz_XTAL / 2); m_ym->add_route(0, "lspeaker", 0.30); m_ym->add_route(1, "rspeaker", 0.30); - MULTIPCM(config, m_multipcm_1, 10_MHz_XTAL); + MULTIPCM(config, m_multipcm_1, 20_MHz_XTAL / 2); m_multipcm_1->set_addrmap(0, &segam1audio_device::mpcm1_map); m_multipcm_1->add_route(0, "lspeaker", 0.5); m_multipcm_1->add_route(1, "rspeaker", 0.5); - MULTIPCM(config, m_multipcm_2, 10_MHz_XTAL); + MULTIPCM(config, m_multipcm_2, 20_MHz_XTAL / 2); m_multipcm_2->set_addrmap(0, &segam1audio_device::mpcm2_map); m_multipcm_2->add_route(0, "lspeaker", 0.5); m_multipcm_2->add_route(1, "rspeaker", 0.5); - I8251(config, m_uart, 8_MHz_XTAL); // T82C51, clock unknown + I8251(config, m_uart, 16_MHz_XTAL / 2); // T82C51 m_uart->rxrdy_handler().set_inputline(m_audiocpu, M68K_IRQ_2); m_uart->txd_handler().set(FUNC(segam1audio_device::output_txd)); - clock_device &uart_clock(CLOCK(config, "uart_clock", 500000)); // 16 times 31.25MHz (standard Sega/MIDI sound data rate) + clock_device &uart_clock(CLOCK(config, "uart_clock", 16_MHz_XTAL / 2 / 16)); // 16 times 31.25kHz (standard Sega/MIDI sound data rate) uart_clock.signal_handler().set(m_uart, FUNC(i8251_device::write_txc)); uart_clock.signal_handler().append(m_uart, FUNC(i8251_device::write_rxc)); + + // DAC output clocks measures: + // BYTECLK = 10/8 (1.25MHz) + // WORDCLK = 10/8/28 (44.642857kHz) } //************************************************************************** diff --git a/src/mame/skeleton/ramstar.cpp b/src/mame/skeleton/ramstar.cpp index ea99f67769c..3ca803b9479 100644 --- a/src/mame/skeleton/ramstar.cpp +++ b/src/mame/skeleton/ramstar.cpp @@ -45,6 +45,7 @@ It only contains a 27C512 or 27C1024 and a X24C04. #include "machine/6522via.h" #include "machine/i2cmem.h" #include "machine/msm6242.h" +#include "machine/r65c52.h" #include "sound/ay8910.h" #include "emupal.h" @@ -165,7 +166,7 @@ void ramstar_state::ramstar(machine_config &config) R65C22(config, "via", 3.6864_MHz_XTAL / 2); // divider not verified - // TODO: R65C52 DACIA + R65C52(config, "dacia", 3.6864_MHz_XTAL / 2); // divider not verified I80C31(config, m_cartcpu, 6_MHz_XTAL); // (absence of) divider not verified m_cartcpu->set_addrmap(AS_PROGRAM, &ramstar_state::cart_program_map); diff --git a/src/mame/tektronix/xd88.cpp b/src/mame/tektronix/xd88.cpp index 1c0688effc3..e87ee3cab75 100644 --- a/src/mame/tektronix/xd88.cpp +++ b/src/mame/tektronix/xd88.cpp @@ -72,13 +72,11 @@ void xd88_state::xd88_01(machine_config &config) { MC88100(config, m_cpu, 20'000'000); m_cpu->set_addrmap(AS_PROGRAM, &xd88_state::cpu_map); + m_cpu->set_cmmu_code([this](u32 const address) -> mc88200_device & { return *m_cmmu[4]; }); + m_cpu->set_cmmu_data([this](u32 const address) -> mc88200_device & { return *m_cmmu[0]; }); for (unsigned i = 0; i < std::size(m_cmmu); i++) MC88200(config, m_cmmu[i], 20'000'000, i).set_mbus(m_cpu, AS_PROGRAM); - - // TODO: multiple i&d cmmu's - m_cpu->set_cmmu_d(m_cmmu[0]); - m_cpu->set_cmmu_i(m_cmmu[4]); } ROM_START(xd88_01) diff --git a/src/mame/trs/gime.cpp b/src/mame/trs/gime.cpp index 8abaef7878e..da6eba56a63 100644 --- a/src/mame/trs/gime.cpp +++ b/src/mame/trs/gime.cpp @@ -79,6 +79,8 @@ POP*STAR PILOT: Timer is synchronized with scanlines. + Cloud Kingdoms: 512K bank switch on scanline. + **********************************************************************/ @@ -1217,8 +1219,7 @@ inline offs_t gime_device::get_video_base() } result += ((offs_t) (m_gime_registers[0x0E] & ff9e_mask) * 0x00008) - | ((offs_t) (m_gime_registers[0x0D] & ff9d_mask) * 0x00800) - | ((offs_t) (m_gime_registers[0x0B] & 0x0F) * 0x80000); + | ((offs_t) (m_gime_registers[0x0D] & ff9d_mask) * 0x00800); return result; } @@ -1409,6 +1410,8 @@ template inline uint32_t gime_device::record_scanline_res(int scanline) { int column; + /* capture 512K memory bank per scan line */ + uint32_t bank_512k = (m_gime_registers[0x0B] & 0x0F) * 0x80000; uint32_t base_offset = m_legacy_video ? 0 : (m_gime_registers[0x0F] & 0x7F) * 2; uint32_t offset = 0; @@ -1417,7 +1420,7 @@ inline uint32_t gime_device::record_scanline_res(int scanline) { /* input data */ uint8_t data, mode; - offset += ((*this).*(get_data))(m_video_position + ((base_offset + offset) & 0xFF), &data, &mode); + offset += ((*this).*(get_data))((m_video_position + ((base_offset + offset) & 0xFF)) | bank_512k, &data, &mode); /* and record the pertinent values */ if (record_mode) diff --git a/src/mame/tvgames/xavix.cpp b/src/mame/tvgames/xavix.cpp index 10de1c27f51..36fa48111c7 100644 --- a/src/mame/tvgames/xavix.cpp +++ b/src/mame/tvgames/xavix.cpp @@ -328,8 +328,8 @@ void xavix_state::xavix_lowbus_map(address_map &map) // Lightgun / pen 1 control // map(0x6ffc, 0x6fff) - // Sound RAM - // map(0x7400, 0x757f) + // Sound RAM (tested by Gun Gun Revolution, games don't write here, so it's probably just RAM the sound hardware makes use of directly when mixing) + map(0x7400, 0x757f).ram(); // Sound Control map(0x75f0, 0x75f1).rw(FUNC(xavix_state::sound_startstop_r), FUNC(xavix_state::sound_startstop_w)); // r/w tested read/written 8 times in a row @@ -543,7 +543,12 @@ static INPUT_PORTS_START( xavix_i2c ) PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("i2cmem", i2cmem_device, read_sda) INPUT_PORTS_END +static INPUT_PORTS_START( gungunrv ) + PORT_INCLUDE(xavix_i2c) + PORT_MODIFY("IN1") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // needed to boot +INPUT_PORTS_END static INPUT_PORTS_START( tomcpin ) PORT_INCLUDE(xavix_i2c) @@ -1898,6 +1903,12 @@ ROM_START( epo_eppk ) ROM_LOAD("sonokongpingpong.bin", 0x000000, 0x100000, CRC(ea81ced6) SHA1(ef8961d3670148501a478c17cd09f5088e32ad41) ) ROM_END +ROM_START( epo_epp2 ) + ROM_REGION(0x200000, "bios", ROMREGION_ERASE00) + // there are some corrupt graphics here, reads were consistent so needs verifying against another unit + ROM_LOAD("excitepingpong2.u3", 0x000000, 0x200000, BAD_DUMP CRC(06665866) SHA1(96f6cdf10ee0f3a748960cc3346bb3114d1318f6) ) +ROM_END + ROM_START( epo_epp3 ) ROM_REGION(0x200000, "bios", ROMREGION_ERASE00) ROM_LOAD("excitepingpong3.bin", 0x000000, 0x200000, CRC(a2ee8bff) SHA1(6e16dbaac9680e1f311c08e3f573d0cf8708b446)) @@ -1940,6 +1951,10 @@ ROM_START( ltv_tam ) ROM_LOAD("letstvtamagotchi.bin", 0x000000, 0x400000, CRC(e3723272) SHA1(e72e128a7a24afb96baafe5f13e13a0d74db4033) ) ROM_END +ROM_START( epo_crok ) + ROM_REGION( 0x400000, "bios", ROMREGION_ERASE00) + ROM_LOAD("sgm3244.u2", 0x000000, 0x400000, CRC(a801779b) SHA1(e6e4235dc7c7db3073737b10ba4bc5b00deca2c3) ) +ROM_END ROM_START( tak_geig ) ROM_REGION(0x400000, "bios", ROMREGION_ERASE00) @@ -1951,6 +1966,11 @@ ROM_START( jarajal ) ROM_LOAD("takaraslots.bin", 0x000000, 0x200000, CRC(afae0b72) SHA1(b1c5d80a8dc8466982efd79d54cd82a58f0ff997) ) ROM_END +ROM_START( tomshoot ) + ROM_REGION(0x200000, "bios", ROMREGION_ERASE00) + ROM_LOAD("airgun.u4", 0x000000, 0x200000, CRC(3e4f7b65) SHA1(4e1660d4952c498e250526c2c3f027253e1fcbe1) ) +ROM_END + ROM_START( tcarnavi ) ROM_REGION(0x400000, "bios", ROMREGION_ERASE00) ROM_LOAD("navi.bin", 0x000000, 0x400000, CRC(f4e693fb) SHA1(be37b35f1e1e661e10187253c2c3aa9858a90812) ) @@ -1980,6 +2000,13 @@ ROM_START( gungunad ) ROM_CONTINUE(0x1c0000,0x040000) ROM_END + +ROM_START( gungunrv ) + ROM_REGION(0x400000, "bios", ROMREGION_ERASE00) + ROM_LOAD("gungunrevolution.u1", 0x000000, 0x400000, CRC(4e34f624) SHA1(7acdd0991df78ecffd156381817ed4f85f6aef09) ) +ROM_END + + /* The e-kara cartridges require the BIOS rom to map into 2nd external bus space as they fetch palette data from it etc. @@ -2187,9 +2214,9 @@ CONS( 2002, epo_tenn, 0, 0, xavix, epo_epp, xavix_state, CONS( 2000, epo_epp, 0, 0, xavix, epo_epp, xavix_state, init_xavix, "Epoch / SSD Company LTD", "Excite Ping Pong (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) CONS( 2000, epo_eppk, epo_epp, 0, xavix, epo_epp, xavix_state, init_xavix, "Epoch / SSD Company LTD / Sonokong", "Real Ping Pong (Korea)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) -// Excite Ping Pong 2 is from 2003 +CONS( 2003, epo_epp2, 0, 0, xavix, epo_epp, xavix_state, init_xavix, "Epoch / SSD Company LTD", "Excite Ping Pong 2 (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) -CONS( 2006, epo_epp3, 0, 0, xavix, epo_epp, xavix_state, init_xavix, "Epoch / SSD Company LTD", "Challenge Ai-chan! Excite Ping Pong (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) +CONS( 2006, epo_epp3, 0, 0, xavix, epo_epp, xavix_state, init_xavix, "Epoch / SSD Company LTD", "Challenge Ai-chan! Excite Ping Pong (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) CONS( 2003, epo_efdx, 0, 0, xavix_i2c_24c08, epo_efdx, xavix_i2c_state, init_xavix, "Epoch / SSD Company LTD", "Excite Fishing DX (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) @@ -2197,6 +2224,8 @@ CONS( 2005, epo_guru, 0, 0, xavix_guru, epo_guru, xavix_guru_st CONS( 2002, epo_dmon, 0, 0, xavix_i2c_24c02, xavix_i2c,xavix_i2c_state, init_xavix, "Epoch / SSD Company LTD", "Doraemon Wakuwaku Kuukihou (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) // full / proper title? +CONS( 2003, epo_crok, 0, 0, xavix_i2c_24lc04, xavix_i2c,xavix_i2c_state, init_xavix, "Epoch / SSD Company LTD", "Croket! Itada Kinka! Banker Battle!! (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) + CONS( 2005, has_wamg, 0, 0, xavix, has_wamg, xavix_state, init_xavix, "Hasbro / Milton Bradley / SSD Company LTD", "TV Wild Adventure Mini Golf (NTSC)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) CONS( 2002, tak_geig, 0, 0, xavix_nv, tak_geig, xavix_state, init_xavix, "Takara / SSD Company LTD", "Geigeki Go Go Shooting (Japan)", MACHINE_IMPERFECT_SOUND ) @@ -2204,6 +2233,8 @@ CONS( 2002, tak_geig, 0, 0, xavix_nv, tak_geig, xavix_state, // was also distributed by Atlus as an arcade cabinet in 2005, ROM almost certainly different (this one will auto-power off after inactivity, an arcade wouldn't do that) CONS( 2003, jarajal, 0, 0, xavix_nv, jarajal, xavix_state, init_xavix, "Takara / SSD Company LTD", "Jara-Ja Land (Japan, home version)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) +CONS( 2002, tomshoot, 0, 0, xavix_i2c_24c02, xavix_i2c,xavix_i2c_state, init_xavix, "Tomy / SSD Company LTD", "Shooting King (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) + CONS( 2003, tcarnavi, 0, 0, xavix_nv, tcarnavi, xavix_state, init_xavix, "Tomy / SSD Company LTD", "Tomica Carnavi Drive (Japan)", MACHINE_IMPERFECT_SOUND ) CONS( 2003, tomcpin, 0, 0, xavix_i2c_24c08, tomcpin, xavix_i2c_state, init_xavix, "Tomy / SSD Company LTD", "Champiyon Pinball (Japan)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) @@ -2212,6 +2243,8 @@ CONS( 2004, tomplc, 0, 0, xavix_i2c_24c02_43mhz,tomplc,xavix_i2c_st CONS( 2001, gungunad, 0, 0, xavix_nv, xavix, xavix_state, init_xavix, "Takara / SSD Company LTD", "Gun Gun Adventure (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) +CONS( 2004, gungunrv, 0, 0, xavix_i2c_24lc04, gungunrv, xavix_i2c_state, init_xavix, "Takara / SSD Company LTD", "Gun Gun Revolution (Japan)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) + /* Music titles: Emulation note: Timers might not be 100%, PAL stuff uses different ways to do timing. */