From 6e70f5a928d9fac478465b7d43bf3f2aa6e65dfe Mon Sep 17 00:00:00 2001 From: hap Date: Wed, 19 Apr 2017 21:52:37 +0200 Subject: [PATCH] ucom4: added D546 (nw) --- src/devices/cpu/ucom4/ucom4.cpp | 21 +++++++++++++-------- src/devices/cpu/ucom4/ucom4.h | 16 ++++++++++++---- 2 files changed, 25 insertions(+), 12 deletions(-) diff --git a/src/devices/cpu/ucom4/ucom4.cpp b/src/devices/cpu/ucom4/ucom4.cpp index 551b2d437e6..bb07aca4b3e 100644 --- a/src/devices/cpu/ucom4/ucom4.cpp +++ b/src/devices/cpu/ucom4/ucom4.cpp @@ -25,15 +25,16 @@ #include "debugger.h" -// uCOM-43 products: 2000x8 ROM, RAM size custom, supports full instruction set -const device_type NEC_D553 = device_creator; // 42-pin PMOS, 35 pins for I/O, Open Drain output, 96x4 RAM -const device_type NEC_D557L = device_creator; // 28-pin PMOS, 21 pins for I/O, Open Drain output, 96x4 RAM -const device_type NEC_D650 = device_creator; // 42-pin CMOS, 35 pins for I/O, push-pull output, 96x4 RAM +// uCOM-43 products: 2000x8 ROM, 96x4 RAM, supports full instruction set +const device_type NEC_D546 = device_creator; // 42-pin PMOS, 35 pins for I/O +const device_type NEC_D553 = device_creator; // 42-pin PMOS, 35 pins for I/O, high voltage +const device_type NEC_D557L = device_creator; // 28-pin PMOS, 21 pins for I/O +const device_type NEC_D650 = device_creator; // 42-pin CMOS, 35 pins for I/O -// uCOM-44 products: 1000x8 ROM, 64x4 RAM, does not support external interrupt -const device_type NEC_D552 = device_creator; // 42-pin PMOS, 35 pins for I/O, Open Drain output +// uCOM-44 products: 1000x8 ROM, 64x4 RAM, 1-level stack, does not support external interrupt +const device_type NEC_D552 = device_creator; // 42-pin PMOS, 35 pins for I/O, high voltage -// uCOM-45 products: ROM size custom, 32x4 RAM +// uCOM-45 products: 1000x8 or 640x8 ROM, 32x4 RAM, 1-level stack //.. @@ -59,8 +60,12 @@ ADDRESS_MAP_END // device definitions +upd546_cpu_device::upd546_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : ucom4_cpu_device(mconfig, NEC_D546, "uPD546", tag, owner, clock, NEC_UCOM43, 3 /* stack levels */, 11 /* prg width */, ADDRESS_MAP_NAME(program_2k), 7 /* data width */, ADDRESS_MAP_NAME(data_96x4), "upd546", __FILE__) +{ } + upd553_cpu_device::upd553_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) - : ucom4_cpu_device(mconfig, NEC_D553, "uPD553", tag, owner, clock, NEC_UCOM43, 3 /* stack levels */, 11 /* prg width */, ADDRESS_MAP_NAME(program_2k), 7 /* data width */, ADDRESS_MAP_NAME(data_96x4), "upd553", __FILE__) + : ucom4_cpu_device(mconfig, NEC_D553, "uPD553", tag, owner, clock, NEC_UCOM43, 3, 11, ADDRESS_MAP_NAME(program_2k), 7, ADDRESS_MAP_NAME(data_96x4), "upd553", __FILE__) { } upd557l_cpu_device::upd557l_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) diff --git a/src/devices/cpu/ucom4/ucom4.h b/src/devices/cpu/ucom4/ucom4.h index 851ac4ad423..bdc0399bafc 100644 --- a/src/devices/cpu/ucom4/ucom4.h +++ b/src/devices/cpu/ucom4/ucom4.h @@ -76,10 +76,10 @@ enum /INT 6 | | 37 PB0 RESET 7 | | 36 PA3 PD0 8 | | 35 PA2 - PD1 9 | uPD552 | 34 PA1 - PD2 10 | uPD553 | 33 PA0 - PD3 11 | uPD650* | 32 PI2 - PE0 12 | | 31 PI1 + PD1 9 | uPD546 | 34 PA1 + PD2 10 | uPD552 | 33 PA0 + PD3 11 | uPD553 | 32 PI2 + PE0 12 | uPD650* | 31 PI1 PE1 13 | | 30 PI0 PE2 14 | | 29 PH3 PE3 15 | | 28 PH2 @@ -312,6 +312,13 @@ protected: }; +class upd546_cpu_device : public ucom4_cpu_device +{ +public: + upd546_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); +}; + + class upd553_cpu_device : public ucom4_cpu_device { public: @@ -345,6 +352,7 @@ public: +extern const device_type NEC_D546; extern const device_type NEC_D553; extern const device_type NEC_D557L; extern const device_type NEC_D650;