pic16c62x: enable ability to set configuration word (nw)

This commit is contained in:
yz70s 2020-01-14 00:28:24 +01:00
parent 63d3459d3d
commit 39d9fefdd0
2 changed files with 5 additions and 4 deletions

View File

@ -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);

View File

@ -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);