diff options
author | 2020-01-14 00:28:24 +0100 | |
---|---|---|
committer | 2020-01-14 00:40:40 +0100 | |
commit | 39d9fefdd0862ff7feaf1ef430578869266a562a (patch) | |
tree | fcb9009fb813acf059ff620586062359a221ec8e | |
parent | 63d3459d3d8257f18c454f603090d07cdba017ab (diff) |
pic16c62x: enable ability to set configuration word (nw)
-rw-r--r-- | src/devices/cpu/pic16c62x/pic16c62x.cpp | 5 | ||||
-rw-r--r-- | src/devices/cpu/pic16c62x/pic16c62x.h | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/devices/cpu/pic16c62x/pic16c62x.cpp b/src/devices/cpu/pic16c62x/pic16c62x.cpp index bc4b8a3676f..6263fd04f42 100644 --- a/src/devices/cpu/pic16c62x/pic16c62x.cpp +++ b/src/devices/cpu/pic16c62x/pic16c62x.cpp @@ -131,6 +131,7 @@ pic16c62x_device::pic16c62x_device(const machine_config &mconfig, device_type ty ( ( picmodel == 0x16C622 ) ? address_map_constructor(FUNC(pic16c62x_device::pic16c622_ram), this) : address_map_constructor(FUNC(pic16c62x_device::pic16c62xa_ram), this) ) ) ) , m_io_config("io", ENDIANNESS_LITTLE, 8, 5, 0) + , m_CONFIG(0x3fff) , m_reset_vector(0x0) , m_picmodel(picmodel) , m_picRAMmask(0xff) @@ -891,8 +892,6 @@ void pic16c62x_device::device_start() m_data = &space(AS_DATA); m_io = &space(AS_IO); - m_CONFIG = 0x3fff; - /* ensure the internal ram pointers are set before get_info is called */ update_internalram_ptr(); @@ -1051,7 +1050,7 @@ void pic16c62x_device::pic16c62x_soft_reset() pic16c62x_reset_regs(); } -void pic16c62x_device::pic16c62x_set_config(int data) +void pic16c62x_device::set_config(int data) { logerror("Writing %04x to the PIC16C62x configuration bits\n",data); m_CONFIG = (data & 0x3fff); diff --git a/src/devices/cpu/pic16c62x/pic16c62x.h b/src/devices/cpu/pic16c62x/pic16c62x.h index a3be8637765..517191f7f37 100644 --- a/src/devices/cpu/pic16c62x/pic16c62x.h +++ b/src/devices/cpu/pic16c62x/pic16c62x.h @@ -53,6 +53,9 @@ DECLARE_DEVICE_TYPE(PIC16C622A, pic16c622a_device) class pic16c62x_device : public cpu_device { +public: + void set_config(int data); + protected: // construction/destruction pic16c62x_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int program_width, int picmodel); @@ -189,7 +192,6 @@ private: void build_opcode_table(void); void pic16c62x_reset_regs(); void pic16c62x_soft_reset(); - void pic16c62x_set_config(int data); void pic16c62x_update_watchdog(int counts); void pic16c62x_update_timer(int counts); |