mirror of
https://github.com/holub/mame
synced 2025-04-26 10:13:37 +03:00
-lh5810: De-MCFG, nw
This commit is contained in:
parent
43cba38b7e
commit
85699f365d
@ -11,49 +11,18 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
//*************************************************************************
|
||||
// INTERFACE CONFIGURATION MACROS
|
||||
//*************************************************************************
|
||||
|
||||
#define MCFG_LH5810_PORTA_R_CB(_devcb) \
|
||||
downcast<lh5810_device &>(*device).set_porta_r_callback(DEVCB_##_devcb);
|
||||
|
||||
#define MCFG_LH5810_PORTA_W_CB(_devcb) \
|
||||
downcast<lh5810_device &>(*device).set_porta_w_callback(DEVCB_##_devcb);
|
||||
|
||||
#define MCFG_LH5810_PORTB_R_CB(_devcb) \
|
||||
downcast<lh5810_device &>(*device).set_portb_r_callback(DEVCB_##_devcb);
|
||||
|
||||
#define MCFG_LH5810_PORTB_W_CB(_devcb) \
|
||||
downcast<lh5810_device &>(*device).set_portb_w_callback(DEVCB_##_devcb);
|
||||
|
||||
#define MCFG_LH5810_PORTC_W_CB(_devcb) \
|
||||
downcast<lh5810_device &>(*device).set_portc_w_callback(DEVCB_##_devcb);
|
||||
|
||||
#define MCFG_LH5810_OUT_INT_CB(_devcb) \
|
||||
downcast<lh5810_device &>(*device).set_out_int_callback(DEVCB_##_devcb); //currently unused
|
||||
|
||||
|
||||
|
||||
//*************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//*************************************************************************
|
||||
|
||||
// ======================> lh5810_device
|
||||
|
||||
class lh5810_device : public device_t
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
lh5810_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
lh5810_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
|
||||
|
||||
template <class Object> devcb_base &set_porta_r_callback(Object &&cb) { return m_porta_r_cb.set_callback(std::forward<Object>(cb)); }
|
||||
template <class Object> devcb_base &set_porta_w_callback(Object &&cb) { return m_porta_w_cb.set_callback(std::forward<Object>(cb)); }
|
||||
template <class Object> devcb_base &set_portb_r_callback(Object &&cb) { return m_portb_r_cb.set_callback(std::forward<Object>(cb)); }
|
||||
template <class Object> devcb_base &set_portb_w_callback(Object &&cb) { return m_portb_w_cb.set_callback(std::forward<Object>(cb)); }
|
||||
template <class Object> devcb_base &set_portc_w_callback(Object &&cb) { return m_portc_w_cb.set_callback(std::forward<Object>(cb)); }
|
||||
template <class Object> devcb_base &set_out_int_callback(Object &&cb) { return m_out_int_cb.set_callback(std::forward<Object>(cb)); }
|
||||
auto porta_r() { return m_porta_r_cb.bind(); }
|
||||
auto porta_w() { return m_porta_w_cb.bind(); }
|
||||
auto portb_r() { return m_portb_r_cb.bind(); }
|
||||
auto portb_w() { return m_portb_w_cb.bind(); }
|
||||
auto portc_w() { return m_portc_w_cb.bind(); }
|
||||
auto out_int() { return m_out_int_cb.bind(); }
|
||||
|
||||
DECLARE_READ8_MEMBER( data_r );
|
||||
DECLARE_WRITE8_MEMBER( data_w );
|
||||
@ -77,8 +46,6 @@ private:
|
||||
uint8_t m_irq;
|
||||
};
|
||||
|
||||
|
||||
// device type definition
|
||||
DECLARE_DEVICE_TYPE(LH5810, lh5810_device)
|
||||
|
||||
#endif // MAME_MACHINE_LH5810_H
|
||||
|
@ -288,12 +288,12 @@ MACHINE_CONFIG_START(pc1500_state::pc1500)
|
||||
MCFG_PALETTE_ADD("palette", 2)
|
||||
MCFG_PALETTE_INIT_OWNER(pc1500_state, pc1500)
|
||||
|
||||
MCFG_DEVICE_ADD("lh5810", LH5810, 0)
|
||||
MCFG_LH5810_PORTA_R_CB(READ8(*this, pc1500_state, port_a_r))
|
||||
MCFG_LH5810_PORTA_W_CB(WRITE8(*this, pc1500_state, kb_matrix_w))
|
||||
MCFG_LH5810_PORTB_R_CB(READ8(*this, pc1500_state, port_b_r))
|
||||
MCFG_LH5810_PORTC_W_CB(WRITE8(*this, pc1500_state, port_c_w))
|
||||
MCFG_LH5810_OUT_INT_CB(INPUTLINE("maincpu", LH5801_LINE_MI))
|
||||
lh5810_device &ioports(LH5810(config, "lh5810"));
|
||||
ioports.porta_r().set(FUNC(pc1500_state::port_a_r));
|
||||
ioports.porta_w().set(FUNC(pc1500_state::kb_matrix_w));
|
||||
ioports.portb_r().set(FUNC(pc1500_state::port_b_r));
|
||||
ioports.portc_w().set(FUNC(pc1500_state::port_c_w));
|
||||
ioports.out_int().set_inputline("maincpu", LH5801_LINE_MI);
|
||||
|
||||
MCFG_UPD1990A_ADD("upd1990a", XTAL(32'768), NOOP, NOOP)
|
||||
MACHINE_CONFIG_END
|
||||
|
Loading…
Reference in New Issue
Block a user