mirror of
https://github.com/holub/mame
synced 2025-04-24 17:30:55 +03:00
pic16c5x: changed rtcc pin to inputline (nw)
This commit is contained in:
parent
440e660181
commit
8db8177624
@ -50,7 +50,7 @@
|
||||
* Fixes the case where the status register is the destination. *
|
||||
* hap (12-Feb-2017) Ver 1.16 *
|
||||
* - Added basic support for the old GI PIC1650 and PIC1655. *
|
||||
* - Made RTCC(aka T0CKI) pin a writeline handler. *
|
||||
* - Made RTCC(aka T0CKI) pin an inputline handler. *
|
||||
* *
|
||||
* *
|
||||
* **** Notes: **** *
|
||||
@ -1128,16 +1128,21 @@ void pic16c5x_device::pic16c5x_update_timer(int counts)
|
||||
}
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER(pic16c5x_device::write_rtcc)
|
||||
void pic16c5x_device::execute_set_input(int line, int state)
|
||||
{
|
||||
state = (state) ? 1 : 0;
|
||||
switch (line)
|
||||
{
|
||||
case PIC16C5x_RTCC:
|
||||
if (T0CS && state != m_rtcc) /* Count mode, edge triggered */
|
||||
if ((T0SE && !state) || (!T0SE && state))
|
||||
m_count_pending = true;
|
||||
|
||||
/* Count mode, edge triggered */
|
||||
if (T0CS && state != m_rtcc)
|
||||
if ((T0SE && !state) || (!T0SE && state))
|
||||
m_count_pending = true;
|
||||
m_rtcc = state;
|
||||
break;
|
||||
|
||||
m_rtcc = state;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -16,6 +16,11 @@
|
||||
#ifndef __PIC16C5X_H__
|
||||
#define __PIC16C5X_H__
|
||||
|
||||
// input lines
|
||||
enum
|
||||
{
|
||||
PIC16C5x_RTCC = 0
|
||||
};
|
||||
|
||||
// i/o ports
|
||||
enum
|
||||
@ -83,8 +88,6 @@ public:
|
||||
template<class _Object> static devcb_base &set_write_c_callback(device_t &device, _Object object) { return downcast<pic16c5x_device &>(device).m_write_c.set_callback(object); }
|
||||
template<class _Object> static devcb_base &set_write_d_callback(device_t &device, _Object object) { return downcast<pic16c5x_device &>(device).m_write_d.set_callback(object); }
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(write_rtcc); // RTCC pin
|
||||
|
||||
/****************************************************************************
|
||||
* Function to configure the CONFIG register. This is actually hard-wired
|
||||
* during ROM programming, so should be called in the driver INIT, with
|
||||
@ -115,6 +118,7 @@ protected:
|
||||
virtual uint32_t execute_input_lines() const override { return 1; }
|
||||
virtual uint32_t execute_default_irq_vector() const override { return 0; }
|
||||
virtual void execute_run() override;
|
||||
virtual void execute_set_input(int line, int state) override;
|
||||
|
||||
// device_memory_interface overrides
|
||||
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override
|
||||
|
@ -356,7 +356,7 @@ static MACHINE_CONFIG_START( touchme, touchme_state )
|
||||
MCFG_PIC16C5x_WRITE_C_CB(WRITE8(touchme_state, write_c))
|
||||
|
||||
MCFG_DEVICE_ADD("clock", CLOCK, 300000/4) // PIC CLKOUT, tied to RTCC
|
||||
MCFG_CLOCK_SIGNAL_HANDLER(DEVWRITELINE("maincpu", pic1655_device, write_rtcc))
|
||||
MCFG_CLOCK_SIGNAL_HANDLER(INPUTLINE("maincpu", PIC16C5x_RTCC))
|
||||
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("display_decay", hh_pic16_state, display_decay_tick, attotime::from_msec(1))
|
||||
MCFG_DEFAULT_LAYOUT(layout_touchme)
|
||||
|
Loading…
Reference in New Issue
Block a user