mirror of
https://github.com/holub/mame
synced 2025-04-25 17:56:43 +03:00
cosmac: Added WAIT/CLEAR input lines. [Curt Coder]
This commit is contained in:
parent
009917fa77
commit
818cb0f6bb
@ -324,8 +324,8 @@ cdp1802_device::cdp1802_device(const machine_config &mconfig, const char *tag, d
|
||||
void cosmac_device::device_start()
|
||||
{
|
||||
// resolve callbacks
|
||||
m_read_wait.resolve_safe(0);
|
||||
m_read_clear.resolve_safe(0);
|
||||
m_read_wait.resolve();
|
||||
m_read_clear.resolve();
|
||||
m_read_ef1.resolve();
|
||||
m_read_ef2.resolve();
|
||||
m_read_ef3.resolve();
|
||||
@ -648,6 +648,14 @@ void cosmac_device::execute_set_input(int inputnum, int state)
|
||||
case COSMAC_INPUT_LINE_EF4:
|
||||
EF[inputnum - COSMAC_INPUT_LINE_EF1] = state;
|
||||
break;
|
||||
|
||||
case COSMAC_INPUT_LINE_CLEAR:
|
||||
m_clear = state;
|
||||
break;
|
||||
|
||||
case COSMAC_INPUT_LINE_WAIT:
|
||||
m_wait = state;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -792,11 +800,11 @@ inline void cosmac_device::debug()
|
||||
|
||||
inline void cosmac_device::sample_wait_clear()
|
||||
{
|
||||
int wait = m_read_wait();
|
||||
int clear = m_read_clear();
|
||||
if (!m_read_wait.isnull()) m_wait = m_read_wait();
|
||||
if (!m_read_clear.isnull()) m_clear = m_read_clear();
|
||||
|
||||
m_pmode = m_mode;
|
||||
m_mode = (cosmac_mode) ((clear << 1) | wait);
|
||||
m_mode = (cosmac_mode) ((m_clear << 1) | m_wait);
|
||||
}
|
||||
|
||||
|
||||
|
@ -126,7 +126,9 @@
|
||||
// input lines
|
||||
enum
|
||||
{
|
||||
COSMAC_INPUT_LINE_INT = 0,
|
||||
COSMAC_INPUT_LINE_WAIT = 0,
|
||||
COSMAC_INPUT_LINE_CLEAR,
|
||||
COSMAC_INPUT_LINE_INT,
|
||||
COSMAC_INPUT_LINE_DMAIN,
|
||||
COSMAC_INPUT_LINE_DMAOUT,
|
||||
COSMAC_INPUT_LINE_EF1,
|
||||
@ -205,6 +207,8 @@ public:
|
||||
// public interfaces
|
||||
offs_t get_memory_address();
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER( wait_w ) { set_input_line(COSMAC_INPUT_LINE_WAIT, state); }
|
||||
DECLARE_WRITE_LINE_MEMBER( clear_w ) { set_input_line(COSMAC_INPUT_LINE_CLEAR, state); }
|
||||
DECLARE_WRITE_LINE_MEMBER( int_w ) { set_input_line(COSMAC_INPUT_LINE_INT, state); }
|
||||
DECLARE_WRITE_LINE_MEMBER( dma_in_w ) { set_input_line(COSMAC_INPUT_LINE_DMAIN, state); }
|
||||
DECLARE_WRITE_LINE_MEMBER( dma_out_w ) { set_input_line(COSMAC_INPUT_LINE_DMAOUT, state); }
|
||||
@ -411,6 +415,8 @@ protected:
|
||||
cosmac_state m_state; // state
|
||||
cosmac_mode m_mode; // control mode
|
||||
cosmac_mode m_pmode; // previous control mode
|
||||
bool m_wait;
|
||||
bool m_clear;
|
||||
int m_irq; // interrupt request
|
||||
int m_dmain; // DMA input request
|
||||
int m_dmaout; // DMA output request
|
||||
|
Loading…
Reference in New Issue
Block a user