From 0fdfafc2b62d17ee14b15f9a416ce8e470b6e043 Mon Sep 17 00:00:00 2001 From: AJR Date: Thu, 11 Jun 2020 11:10:14 -0400 Subject: Add DS80C320, SAB80(C)515 and RUPI-44 disassemblers --- src/devices/cpu/mcs51/mcs51.cpp | 33 ++++ src/devices/cpu/mcs51/mcs51.h | 34 ++++ src/devices/cpu/mcs51/mcs51dasm.cpp | 305 ++++++++++++++++++++++++++++++++++++ src/devices/cpu/mcs51/mcs51dasm.h | 32 ++++ src/mame/drivers/acvirus.cpp | 2 +- src/mame/drivers/island.cpp | 2 +- src/mame/drivers/wxstar4000.cpp | 2 +- src/tools/unidasm.cpp | 4 + 8 files changed, 411 insertions(+), 3 deletions(-) diff --git a/src/devices/cpu/mcs51/mcs51.cpp b/src/devices/cpu/mcs51/mcs51.cpp index c5850610cc7..99c6950ef74 100644 --- a/src/devices/cpu/mcs51/mcs51.cpp +++ b/src/devices/cpu/mcs51/mcs51.cpp @@ -243,6 +243,9 @@ DEFINE_DEVICE_TYPE(I80C51GB, i80c51gb_device, "i80c51gb", "Intel 80C51GB") DEFINE_DEVICE_TYPE(AT89C52, at89c52_device, "at89c52", "Atmel AT89C52") DEFINE_DEVICE_TYPE(AT89S52, at89s52_device, "at89s52", "Atmel AT89S52") DEFINE_DEVICE_TYPE(AT89C4051, at89c4051_device, "at89c4051", "Atmel AT89C4051") +DEFINE_DEVICE_TYPE(DS80C320, ds80c320_device, "ds80c320", "Dallas DS80C320 HSM") +DEFINE_DEVICE_TYPE(SAB80C535, sab80c535_device, "sab80c535", "Siemens SAB80C535") +DEFINE_DEVICE_TYPE(I8344, i8344_device, "i8344", "Intel 8344AH RUPI-44") DEFINE_DEVICE_TYPE(DS5002FP, ds5002fp_device, "ds5002fp", "Dallas DS5002FP") @@ -406,6 +409,21 @@ at89c4051_device::at89c4051_device(const machine_config &mconfig, const char *ta { } +ds80c320_device::ds80c320_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + : i80c52_device(mconfig, DS80C320, tag, owner, clock, 0, 8) +{ +} + +sab80c535_device::sab80c535_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + : i80c51_device(mconfig, SAB80C535, tag, owner, clock, 0, 8) +{ +} + +i8344_device::i8344_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + : mcs51_cpu_device(mconfig, I8344, tag, owner, clock, 0, 8) +{ +} + /* program width field is set to 0 because technically the SRAM isn't internal */ ds5002fp_device::ds5002fp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : mcs51_cpu_device(mconfig, DS5002FP, tag, owner, clock, 0, 7, FEATURE_DS5002FP | FEATURE_CMOS) @@ -2547,6 +2565,21 @@ std::unique_ptr i80c51gb_device::create_disassembler() return std::make_unique(); } +std::unique_ptr ds80c320_device::create_disassembler() +{ + return std::make_unique(); +} + +std::unique_ptr sab80c535_device::create_disassembler() +{ + return std::make_unique(); +} + +std::unique_ptr i8344_device::create_disassembler() +{ + return std::make_unique(); +} + std::unique_ptr ds5002fp_device::create_disassembler() { return std::make_unique(); diff --git a/src/devices/cpu/mcs51/mcs51.h b/src/devices/cpu/mcs51/mcs51.h index 8755e854ba9..a7e17d71b10 100644 --- a/src/devices/cpu/mcs51/mcs51.h +++ b/src/devices/cpu/mcs51/mcs51.h @@ -342,9 +342,13 @@ DECLARE_DEVICE_TYPE(I87C51FA, i87c51fa_device) DECLARE_DEVICE_TYPE(I80C51GB, i80c51gb_device) DECLARE_DEVICE_TYPE(AT89C52, at89c52_device) DECLARE_DEVICE_TYPE(AT89S52, at89s52_device) +DECLARE_DEVICE_TYPE(DS80C320, ds80c320_device) +DECLARE_DEVICE_TYPE(SAB80C535, sab80c535_device) /* 4k internal perom and 128 internal ram and 2 analog comparators */ DECLARE_DEVICE_TYPE(AT89C4051, at89c4051_device) +DECLARE_DEVICE_TYPE(I8344, i8344_device) + DECLARE_DEVICE_TYPE(DS5002FP, ds5002fp_device) @@ -511,6 +515,36 @@ public: at89c4051_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); }; +class ds80c320_device : public i80c52_device +{ +public: + // construction/destruction + ds80c320_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + +protected: + virtual std::unique_ptr create_disassembler() override; +}; + +class sab80c535_device : public i80c51_device +{ +public: + // construction/destruction + sab80c535_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + +protected: + virtual std::unique_ptr create_disassembler() override; +}; + +class i8344_device : public mcs51_cpu_device +{ +public: + // construction/destruction + i8344_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + +protected: + virtual std::unique_ptr create_disassembler() override; +}; + /* * The DS5002FP has 2 16 bits data address buses (the byte-wide bus and the expanded bus). The exact memory position accessed depends on the * partition mode, the memory range and the expanded bus select. The partition mode and the expanded bus select can be changed at any time. diff --git a/src/devices/cpu/mcs51/mcs51dasm.cpp b/src/devices/cpu/mcs51/mcs51dasm.cpp index ebd77aece33..365ffe915cd 100644 --- a/src/devices/cpu/mcs51/mcs51dasm.cpp +++ b/src/devices/cpu/mcs51/mcs51dasm.cpp @@ -360,6 +360,295 @@ const mcs51_disassembler::mem_info mcs51_disassembler::i8xc751_names[] = { { -1 } }; +const mcs51_disassembler::mem_info mcs51_disassembler::ds80c320_names[] = { + { 0x84, "dpl1" }, + { 0x85, "dph1" }, + { 0x86, "dps" }, + { 0x8e, "ckcon" }, + { 0x91, "exif" }, + { 0x98, "scon0" }, + { 0x99, "sbuf0" }, + { 0xa9, "saddr0" }, + { 0xaa, "saddr1" }, + { 0xb9, "saden0" }, + { 0xba, "saden1" }, + { 0xc0, "scon1" }, + { 0xc1, "sbuf1" }, + { 0xc5, "status" }, + { 0xc7, "ta" }, + { 0xc9, "t2mod" }, + { 0xd8, "wdcon" }, + { 0xe8, "eie" }, + { 0xf8, "eip" }, + + { 0x198, "sm0_0" }, + { 0x199, "sm1_0" }, + { 0x19a, "sm2_0" }, + { 0x19b, "ren_0" }, + { 0x19c, "tb8_0" }, + { 0x19d, "rb8_0" }, + { 0x19e, "ti_0" }, + { 0x19f, "ri_0" }, + + { 0x1ac, "es0" }, + { 0x1ae, "es1" }, + + { 0x1bc, "ps0" }, + { 0x1be, "ps1" }, + + { 0x1c0, "sm0_1" }, + { 0x1c1, "sm1_1" }, + { 0x1c2, "sm2_1" }, + { 0x1c3, "ren_1" }, + { 0x1c4, "tb8_1" }, + { 0x1c5, "rb8_1" }, + { 0x1c6, "ti_1" }, + { 0x1c7, "ri_1" }, + + { 0x1d5, "f1" }, + + { 0x1d8, "rwt" }, + { 0x1d9, "ewt" }, + { 0x1da, "wtrf" }, + { 0x1db, "wdif" }, + { 0x1dc, "pf1" }, + { 0x1dd, "epf1" }, + { 0x1de, "por" }, + { 0x1df, "smod_1" }, + + { 0x1e8, "ex2" }, + { 0x1e9, "ex3" }, + { 0x1ea, "ex4" }, + { 0x1eb, "ex5" }, + { 0x1ec, "ewdi" }, + { 0x1ed, "eie.5" }, + { 0x1ee, "eie.6" }, + { 0x1ef, "eie.7" }, + + { 0x1f8, "px2" }, + { 0x1f9, "px3" }, + { 0x1fa, "px4" }, + { 0x1fb, "px5" }, + { 0x1fc, "pwdi" }, + { 0x1fd, "eip.5" }, + { 0x1fe, "eip.6" }, + { 0x1ff, "eip.7" }, + + { -1 } +}; + +const mcs51_disassembler::mem_info mcs51_disassembler::sab80515_names[] = { + { 0xa8, "ien0" }, + { 0xa9, "ip0" }, + { 0xb8, "ien1" }, + { 0xb9, "ip1" }, + { 0xc0, "ircon" }, + { 0xc1, "ccen" }, + { 0xc2, "ccl1" }, + { 0xc3, "cch1" }, + { 0xc4, "ccl2" }, + { 0xc5, "cch2" }, + { 0xc6, "ccl3" }, + { 0xc7, "cch3" }, + { 0xc8, "t2con" }, + { 0xca, "crcl" }, + { 0xcb, "crch" }, + { 0xcc, "tl2" }, + { 0xcd, "th2" }, + { 0xd8, "adcon" }, + { 0xd9, "addat" }, + { 0xda, "dapr" }, + { 0xe8, "p4" }, + { 0xf8, "p5" }, + + { 0x190, "cc0" }, + { 0x191, "cc1" }, + { 0x192, "cc2" }, + { 0x193, "cc3" }, + { 0x194, "int2" }, + { 0x195, "t2ex" }, + { 0x196, "clkout" }, + { 0x197, "t2" }, + + { 0x1ad, "et2" }, + { 0x1ae, "wdt" }, + + { 0x1b8, "eadc" }, + { 0x1b9, "ex2" }, + { 0x1ba, "ex3" }, + { 0x1bb, "ex4" }, + { 0x1bc, "ex5" }, + { 0x1bd, "ex6" }, + { 0x1be, "swdt" }, + { 0x1bf, "exen2" }, + + { 0x1c0, "iadc" }, + { 0x1c1, "iex2" }, + { 0x1c2, "iex3" }, + { 0x1c3, "iex4" }, + { 0x1c4, "iex5" }, + { 0x1c5, "iex6" }, + { 0x1c6, "tf2" }, + { 0x1c7, "exf2" }, + + { 0x1c8, "t2i0" }, + { 0x1c9, "t2i1" }, + { 0x1ca, "t2cm" }, + { 0x1cb, "t2r0" }, + { 0x1cc, "t2r1" }, + { 0x1cd, "i2fr" }, + { 0x1ce, "i3fr" }, + { 0x1cf, "t2ps" }, + + { 0x1d8, "mx0" }, + { 0x1d9, "mx1" }, + { 0x1da, "mx2" }, + { 0x1db, "adm" }, + { 0x1dc, "bsy" }, + { 0x1dd, "adex" }, + { 0x1de, "clk" }, + { 0x1df, "bd" }, + + { -1 } +}; + +const mcs51_disassembler::mem_info mcs51_disassembler::sab80c515_names[] = { + { 0xdb, "p6" }, + + { -1 } +}; + +const mcs51_disassembler::mem_info mcs51_disassembler::rupi44_names[] = { + { 0x00, "rb0r0" }, + { 0x01, "rb0r1" }, + { 0x02, "rb0r2" }, + { 0x03, "rb0r3" }, + { 0x04, "rb0r4" }, + { 0x05, "rb0r5" }, + { 0x06, "rb0r6" }, + { 0x07, "rb0r7" }, + { 0x08, "rb1r0" }, + { 0x09, "rb1r1" }, + { 0x0a, "rb1r2" }, + { 0x0b, "rb1r3" }, + { 0x0c, "rb1r4" }, + { 0x0d, "rb1r5" }, + { 0x0e, "rb1r6" }, + { 0x0f, "rb1r7" }, + { 0x10, "rb2r0" }, + { 0x11, "rb2r1" }, + { 0x12, "rb2r2" }, + { 0x13, "rb2r3" }, + { 0x14, "rb2r4" }, + { 0x15, "rb2r5" }, + { 0x16, "rb2r6" }, + { 0x17, "rb2r7" }, + { 0x18, "rb3r0" }, + { 0x19, "rb3r1" }, + { 0x1a, "rb3r2" }, + { 0x1b, "rb3r3" }, + { 0x1c, "rb3r4" }, + { 0x1d, "rb3r5" }, + { 0x1e, "rb3r6" }, + { 0x1f, "rb3r7" }, + + { 0x80, "p0" }, + { 0x81, "sp" }, + { 0x82, "dpl" }, + { 0x83, "dph" }, + { 0x87, "pcon" }, + { 0x88, "tcon" }, + { 0x89, "tmod" }, + { 0x8a, "tl0" }, + { 0x8b, "tl1" }, + { 0x8c, "th0" }, + { 0x8d, "th1" }, + { 0x90, "p1" }, + { 0xa0, "p2" }, + { 0xa8, "ie" }, + { 0xb0, "p3" }, + { 0xb8, "ip" }, + { 0xc8, "sts" }, + { 0xc9, "smd" }, + { 0xca, "rcb" }, + { 0xcb, "rbl" }, + { 0xcc, "rbs" }, + { 0xcd, "rfl" }, + { 0xce, "stad" }, + { 0xd0, "psw" }, + { 0xd8, "nsnr" }, + { 0xda, "tcb" }, + { 0xdb, "tbl" }, + { 0xdc, "tbc" }, + { 0xe0, "acc" }, + { 0xf0, "b" }, + + { 0x188, "it0" }, + { 0x189, "ie0" }, + { 0x18a, "it1" }, + { 0x18b, "ie1" }, + { 0x18c, "tr0" }, + { 0x18d, "tf0" }, + { 0x18e, "tr1" }, + { 0x18f, "tf1" }, + + { 0x1a8, "ex0" }, + { 0x1a9, "et0" }, + { 0x1aa, "ex1" }, + { 0x1ab, "et1" }, + { 0x1ac, "es" }, + { 0x1ad, "ie.5" }, + { 0x1ae, "ie.6" }, + { 0x1af, "ea" }, + + { 0x1b0, "io" }, + { 0x1b1, "data" }, + { 0x1b2, "int0" }, + { 0x1b3, "int1" }, + { 0x1b4, "t0" }, + { 0x1b5, "t1" }, + { 0x1b6, "wr" }, + { 0x1b7, "rd" }, + + { 0x1b8, "px0" }, + { 0x1b9, "pt0" }, + { 0x1ba, "px1" }, + { 0x1bb, "pt1" }, + { 0x1bc, "ps" }, + { 0x1bd, "ip.5" }, + { 0x1be, "ip.6" }, + { 0x1bf, "ip.7" }, + + { 0x1c8, "rbp" }, + { 0x1c9, "am" }, + { 0x1ca, "opb" }, + { 0x1cb, "bov" }, + { 0x1cc, "si" }, + { 0x1cd, "rts" }, + { 0x1ce, "rbe" }, + { 0x1cf, "tbf" }, + + { 0x1d0, "p" }, + { 0x1d1, "psw.1" }, + { 0x1d2, "ov" }, + { 0x1d3, "rs0" }, + { 0x1d4, "rs1" }, + { 0x1d5, "f0" }, + { 0x1d6, "ac" }, + { 0x1d7, "cy" }, + + { 0x1d8, "ser" }, + { 0x1d9, "nr0" }, + { 0x1da, "nr1" }, + { 0x1db, "nr2" }, + { 0x1dc, "ses" }, + { 0x1dd, "ns0" }, + { 0x1de, "ns1" }, + { 0x1df, "ns2" }, + + { -1 } +}; + mcs51_disassembler::mcs51_disassembler() { } @@ -1266,3 +1555,19 @@ i8xc51gb_disassembler::i8xc51gb_disassembler() : mcs51_disassembler(default_name ds5002fp_disassembler::ds5002fp_disassembler() : mcs51_disassembler(default_names, i8052_names, i80c52_names, ds5002fp_names, i8xc751_names) { } + +ds80c320_disassembler::ds80c320_disassembler() : mcs51_disassembler(default_names, i8052_names, ds80c320_names) +{ +} + +sab80515_disassembler::sab80515_disassembler() : mcs51_disassembler(default_names, sab80515_names) +{ +} + +sab80c515_disassembler::sab80c515_disassembler() : mcs51_disassembler(default_names, sab80515_names, sab80c515_names) +{ +} + +rupi44_disassembler::rupi44_disassembler() : mcs51_disassembler(rupi44_names) +{ +} diff --git a/src/devices/cpu/mcs51/mcs51dasm.h b/src/devices/cpu/mcs51/mcs51dasm.h index 9ae251af8ea..b643ed150b9 100644 --- a/src/devices/cpu/mcs51/mcs51dasm.h +++ b/src/devices/cpu/mcs51/mcs51dasm.h @@ -46,6 +46,10 @@ public: static const mem_info i8xc51gb_names[]; static const mem_info ds5002fp_names[]; static const mem_info i8xc751_names[]; + static const mem_info ds80c320_names[]; + static const mem_info sab80515_names[]; + static const mem_info sab80c515_names[]; + static const mem_info rupi44_names[]; template mcs51_disassembler(Names &&... names) : mcs51_disassembler() { add_names(names...); @@ -126,5 +130,33 @@ public: virtual ~ds5002fp_disassembler() = default; }; +class ds80c320_disassembler : public mcs51_disassembler +{ +public: + ds80c320_disassembler(); + virtual ~ds80c320_disassembler() = default; +}; + +class sab80515_disassembler : public mcs51_disassembler +{ +public: + sab80515_disassembler(); + virtual ~sab80515_disassembler() = default; +}; + +class sab80c515_disassembler : public mcs51_disassembler +{ +public: + sab80c515_disassembler(); + virtual ~sab80c515_disassembler() = default; +}; + +class rupi44_disassembler : public mcs51_disassembler +{ +public: + rupi44_disassembler(); + virtual ~rupi44_disassembler() = default; +}; + #endif diff --git a/src/mame/drivers/acvirus.cpp b/src/mame/drivers/acvirus.cpp index a95efbdd4de..a18a3c9bbd4 100644 --- a/src/mame/drivers/acvirus.cpp +++ b/src/mame/drivers/acvirus.cpp @@ -108,7 +108,7 @@ void acvirus_state::virus_map(address_map &map) void acvirus_state::virus(machine_config &config) { - I8052(config, m_maincpu, XTAL(12'000'000)); + SAB80C535(config, m_maincpu, XTAL(12'000'000)); m_maincpu->set_addrmap(AS_PROGRAM, &acvirus_state::virus_map); SPEAKER(config, "lspeaker").front_left(); diff --git a/src/mame/drivers/island.cpp b/src/mame/drivers/island.cpp index 4724ff44f7d..0c6e032618c 100644 --- a/src/mame/drivers/island.cpp +++ b/src/mame/drivers/island.cpp @@ -54,7 +54,7 @@ INPUT_PORTS_END void island_state::vortex(machine_config &config) { - I80C32(config, m_maincpu, 20_MHz_XTAL); // FIXME: actually DS80C320 (more registers, faster machine cycles) + DS80C320(config, m_maincpu, 20_MHz_XTAL); // FIXME: has more registers, faster machine cycles m_maincpu->set_addrmap(AS_PROGRAM, &island_state::prog_map); m_maincpu->set_addrmap(AS_IO, &island_state::ext_map); diff --git a/src/mame/drivers/wxstar4000.cpp b/src/mame/drivers/wxstar4000.cpp index dfa504814ce..522f351b7b7 100644 --- a/src/mame/drivers/wxstar4000.cpp +++ b/src/mame/drivers/wxstar4000.cpp @@ -240,7 +240,7 @@ void wxstar4k_state::wxstar4k(machine_config &config) m_gfxsubcpu->set_addrmap(AS_PROGRAM, &wxstar4k_state::vidbd_sub); m_gfxsubcpu->set_addrmap(AS_IO, &wxstar4k_state::vidbd_sub_io); - I8051(config, m_datacpu, XTAL(7'372'800)); // 7.3728 MHz crystal connected directly to the CPU + I8344(config, m_datacpu, XTAL(7'372'800)); // 7.3728 MHz crystal connected directly to the CPU m_datacpu->set_addrmap(AS_PROGRAM, &wxstar4k_state::databd_main); m_datacpu->set_addrmap(AS_IO, &wxstar4k_state::databd_main_io); diff --git a/src/tools/unidasm.cpp b/src/tools/unidasm.cpp index 59a58ff23ac..d668d1a18aa 100644 --- a/src/tools/unidasm.cpp +++ b/src/tools/unidasm.cpp @@ -378,6 +378,7 @@ static const dasm_table_entry dasm_table[] = { "cquestsnd", be, -3, []() -> util::disasm_interface * { return new cquestsnd_disassembler; } }, { "dp8344", le, -1, []() -> util::disasm_interface * { return new dp8344_disassembler; } }, { "ds5002fp", le, 0, []() -> util::disasm_interface * { return new ds5002fp_disassembler; } }, + { "ds80c320", le, 0, []() -> util::disasm_interface * { return new ds80c320_disassembler; } }, { "dsp16", le, -1, []() -> util::disasm_interface * { return new dsp16_disassembler; } }, { "dsp32c", le, 0, []() -> util::disasm_interface * { return new dsp32c_disassembler; } }, { "dsp56000", be, -2, []() -> util::disasm_interface * { return new dsp56000_disassembler; } }, @@ -492,8 +493,11 @@ static const dasm_table_entry dasm_table[] = { "r65c19", le, 0, []() -> util::disasm_interface * { return new r65c19_disassembler; } }, { "romp", be, 0, []() -> util::disasm_interface * { return new romp_disassembler; } }, { "rsp", le, 0, []() -> util::disasm_interface * { return new rsp_disassembler; } }, + { "rupi44", le, 0, []() -> util::disasm_interface * { return new rupi44_disassembler; } }, { "rx01", le, 0, []() -> util::disasm_interface * { return new rx01_disassembler; } }, { "s2650", be, 0, []() -> util::disasm_interface * { return new s2650_disassembler(&s2650_unidasm); } }, + { "sab80515", le, 0, []() -> util::disasm_interface * { return new sab80515_disassembler; } }, + { "sab80c515", le, 0, []() -> util::disasm_interface * { return new sab80c515_disassembler; } }, { "saturn", le, 0, []() -> util::disasm_interface * { return new saturn_disassembler(&saturn_unidasm); } }, { "sc61860", le, 0, []() -> util::disasm_interface * { return new sc61860_disassembler; } }, { "scmp", le, 0, []() -> util::disasm_interface * { return new scmp_disassembler; } }, -- cgit v1.2.3