microtch: convert to devcb2 (nw)

meritm: convert to use ns16550 (nw)
--
Only remaining user of pc16552d.c is firebeat.c.
This commit is contained in:
cracyc 2013-06-02 18:46:57 +00:00
parent 6919d66a5e
commit 3f5f8a0bbb
10 changed files with 77 additions and 152 deletions

View File

@ -613,7 +613,7 @@ void ns16550_device::set_fcr(UINT8 data)
}
m_rintlvl = bytes_per_int[(data>>6)&3];
m_regs.iir |= 0xc0;
m_regs.fcr = data & ~0xc9;
m_regs.fcr = data & 0xc9;
m_regs.lsr |= 0x20;
trigger_int(COM_INT_PENDING_TRANSMITTER_HOLDING_REGISTER_EMPTY);
}

View File

@ -16,12 +16,20 @@
const device_type MICROTOUCH = &device_creator<microtouch_device>;
microtouch_device::microtouch_device(const machine_config &mconfig, device_type type, const char* name, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, type, name, tag, owner, clock)
: device_t(mconfig, type, name, tag, owner, clock),
m_out_tx_func(*this),
m_touch(*this, "TOUCH"),
m_touchx(*this, "TOUCH_X"),
m_touchy(*this, "TOUCH_Y")
{
}
microtouch_device::microtouch_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, MICROTOUCH, "Microtouch Touchscreen", tag, owner, clock)
: device_t(mconfig, MICROTOUCH, "Microtouch Touchscreen", tag, owner, clock),
m_out_tx_func(*this),
m_touch(*this, "TOUCH"),
m_touchx(*this, "TOUCH_X"),
m_touchy(*this, "TOUCH_Y")
{
}
@ -82,10 +90,10 @@ void microtouch_device::send_format_decimal_packet(int x, int y)
void microtouch_device::send_touch_packet()
{
int tx = ioport("TOUCH_X")->read();
int ty = ioport("TOUCH_Y")->read();
int tx = m_touchx->read();
int ty = m_touchy->read();
if ( m_out_touch_cb == NULL ||
if ( m_out_touch_cb.isnull() ||
m_out_touch_cb( &tx, &ty ) != 0 )
{
ty = 0x4000 - ty;
@ -127,7 +135,7 @@ void microtouch_device::device_timer(emu_timer &timer, device_timer_id id, int p
}
// send format tablet packet
if ( ioport("TOUCH")->read() & 0x01 )
if (m_touch->read())
{
send_touch_packet();
}
@ -151,18 +159,6 @@ void microtouch_device::device_timer(emu_timer &timer, device_timer_id id, int p
}
}
void microtouch_device::device_config_complete()
{
const microtouch_interface *intf = reinterpret_cast<const microtouch_interface *>(static_config());
if(intf != NULL)
*static_cast<microtouch_interface *>(this) = *intf;
else
{
memset(&m_out_tx_cb, 0, sizeof(m_out_tx_cb));
memset(&m_out_touch_cb, 0, sizeof(m_out_touch_cb));
}
}
void microtouch_device::device_start()
{
memset(m_rx_buffer, 0, sizeof(m_rx_buffer));
@ -194,7 +190,7 @@ void microtouch_device::device_start()
save_item(NAME(m_tx_buffer_ptr));
save_item(NAME(m_format));
save_item(NAME(m_mode));
m_out_tx_func.resolve(m_out_tx_cb, *this);
m_out_tx_func.resolve_safe();
}
@ -288,30 +284,18 @@ const device_type MICROTOUCH_SERIAL = &device_creator<microtouch_serial_device>;
microtouch_serial_device::microtouch_serial_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: microtouch_device(mconfig, MICROTOUCH_SERIAL, "Microtouch Serial Touchscreen", tag, owner, clock),
device_serial_interface(mconfig, *this)
device_serial_interface(mconfig, *this),
m_out_stx_func(*this)
{
}
void microtouch_serial_device::device_config_complete()
{
const microtouch_serial_interface *intf = reinterpret_cast<const microtouch_serial_interface *>(static_config());
if(intf != NULL)
*static_cast<microtouch_serial_interface *>(this) = *intf;
else
{
memset(&m_out_stx_cb, 0, sizeof(m_out_stx_cb));
}
memset(&(microtouch_interface::m_out_tx_cb), 0, sizeof(microtouch_interface::m_out_tx_cb));
memset(&m_out_touch_cb, 0, sizeof(m_out_touch_cb));
}
void microtouch_serial_device::device_start()
{
microtouch_device::device_start();
set_data_frame(8, 1, SERIAL_PARITY_NONE); //8N1?
set_tra_rate(clock());
set_rcv_rate(clock());
m_out_stx_func.resolve(m_out_stx_cb, *this);
m_out_stx_func.resolve_safe();
m_output_valid = false;
save_item(NAME(m_output_valid));

View File

@ -3,31 +3,25 @@
#include "emu.h"
typedef int (*microtouch_touch_func)(int *touch_x, int *touch_y);
#define MICROTOUCH_TOUCH(name) int name(int *touch_x, int *touch_y)
struct microtouch_interface
{
devcb_write8 m_out_tx_cb;
microtouch_touch_func m_out_touch_cb;
};
class microtouch_device :
public device_t,
public microtouch_interface
public device_t
{
public:
microtouch_device(const machine_config &mconfig, device_type type, const char* name, const char *tag, device_t *owner, UINT32 clock);
microtouch_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
template<class _Object> static devcb2_base &static_set_tx_callback(device_t &device, _Object object) { return downcast<microtouch_device &>(device).m_out_tx_func.set_callback(object); }
virtual ioport_constructor device_input_ports() const;
DECLARE_WRITE8_MEMBER(rx);
DECLARE_INPUT_CHANGED_MEMBER(touch);
typedef delegate<int (int *, int *)> touch_cb;
static void static_set_touch_callback(device_t &device, touch_cb object) { downcast<microtouch_device &>(device).m_out_touch_cb = object; }
protected:
virtual void device_start();
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
virtual void device_config_complete();
virtual void tx(UINT8 data) { m_out_tx_func(0, data); }
virtual void tx(UINT8 data) { m_out_tx_func(data); }
emu_timer* m_timer;
private:
int check_command( const char* commandtocheck, int command_len, UINT8* command_data );
@ -58,32 +52,31 @@ private:
int m_last_touch_state;
int m_last_x;
int m_last_y;
devcb_resolved_write8 m_out_tx_func;
devcb2_write8 m_out_tx_func;
touch_cb m_out_touch_cb;
required_ioport m_touch;
required_ioport m_touchx;
required_ioport m_touchy;
};
extern const device_type MICROTOUCH;
#define MCFG_MICROTOUCH_ADD(_tag, _intrf) \
#define MCFG_MICROTOUCH_ADD(_tag, _devcb) \
MCFG_DEVICE_ADD(_tag, MICROTOUCH, 0) \
MCFG_DEVICE_CONFIG(_intrf)
devcb = &microtouch_serial_device::static_set_tx_callback(*device, DEVCB2_##_devcb);
struct microtouch_serial_interface
{
devcb_write_line m_out_stx_cb;
};
class microtouch_serial_device
: public microtouch_device,
public device_serial_interface,
public microtouch_serial_interface
public device_serial_interface
{
public:
microtouch_serial_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
template<class _Object> static devcb2_base &static_set_stx_callback(device_t &device, _Object object) { return downcast<microtouch_serial_device &>(device).m_out_stx_func.set_callback(object); }
DECLARE_WRITE_LINE_MEMBER(rx) { check_for_start(state); }
protected:
virtual void device_start();
virtual void device_config_complete();
virtual void tx(UINT8 data);
virtual void input_callback(UINT8 state) { m_input_state = state; }
virtual void tra_callback();
@ -92,13 +85,17 @@ protected:
private:
bool m_output_valid;
UINT8 m_output;
devcb_resolved_write_line m_out_stx_func;
devcb2_write_line m_out_stx_func;
};
extern const device_type MICROTOUCH_SERIAL;
#define MCFG_MICROTOUCH_SERIAL_ADD(_tag, _intrf, _clock) \
#define MCFG_MICROTOUCH_SERIAL_ADD(_tag, _clock, _devcb) \
MCFG_DEVICE_ADD(_tag, MICROTOUCH_SERIAL, _clock) \
MCFG_DEVICE_CONFIG(_intrf)
devcb = &microtouch_serial_device::static_set_stx_callback(*device, DEVCB2_##_devcb);
#define MCFG_MICROTOUCH_TOUCH_CB(_class, _touch_cb) \
microtouch_device::static_set_touch_callback(*device, microtouch_device::touch_cb(FUNC(_class::_touch_cb), (_class *)owner));
#endif //_MICROTOUCH_H

View File

@ -294,12 +294,6 @@ static UINT8 duart_input( device_t *device )
return device->machine().root_device().ioport("DSW1")->read();
}
static const microtouch_interface adb_microtouch_config =
{
DEVCB_DRIVER_MEMBER(adp_state, microtouch_tx),
NULL
};
MACHINE_START_MEMBER(adp_state,skattv)
{
m_duart = machine().device("duart68681");
@ -667,7 +661,7 @@ static MACHINE_CONFIG_START( quickjac, adp_state )
MCFG_MACHINE_RESET_OVERRIDE(adp_state,skattv)
MCFG_DUART68681_ADD( "duart68681", XTAL_8_664MHz / 2, skattv_duart68681_config )
MCFG_MICROTOUCH_ADD( "microtouch", adb_microtouch_config )
MCFG_MICROTOUCH_ADD( "microtouch", WRITE8(adp_state, microtouch_tx) )
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(60)
@ -699,7 +693,7 @@ static MACHINE_CONFIG_START( skattv, adp_state )
MCFG_MACHINE_RESET_OVERRIDE(adp_state,skattv)
MCFG_DUART68681_ADD( "duart68681", XTAL_8_664MHz / 2, skattv_duart68681_config )
MCFG_MICROTOUCH_ADD( "microtouch", adb_microtouch_config )
MCFG_MICROTOUCH_ADD( "microtouch", WRITE8(adp_state, microtouch_tx) )
MCFG_SCREEN_ADD("screen", RASTER)
MCFG_SCREEN_REFRESH_RATE(60)
@ -727,7 +721,7 @@ static MACHINE_CONFIG_START( backgamn, adp_state )
MCFG_CPU_PROGRAM_MAP(backgamn_mem)
MCFG_DUART68681_ADD( "duart68681", XTAL_8_664MHz / 2, skattv_duart68681_config )
MCFG_MICROTOUCH_ADD( "microtouch", adb_microtouch_config )
MCFG_MICROTOUCH_ADD( "microtouch", WRITE8(adp_state, microtouch_tx) )
MCFG_MACHINE_START_OVERRIDE(adp_state,skattv)
MCFG_MACHINE_RESET_OVERRIDE(adp_state,skattv)

View File

@ -769,12 +769,6 @@ static const i2cmem_interface i2cmem_interface =
I2CMEM_SLAVE_ADDRESS, NVRAM_PAGE_SIZE, NVRAM_SIZE
};
static const microtouch_interface cd32_microtouch_config =
{
DEVCB_DRIVER_MEMBER(cd32_state, microtouch_tx),
NULL
};
static MACHINE_CONFIG_START( cd32base, cd32_state )
/* basic machine hardware */
@ -817,7 +811,7 @@ static MACHINE_CONFIG_START( cd32base, cd32_state )
MCFG_LEGACY_MOS8520_ADD("cia_0", AMIGA_68EC020_PAL_CLOCK / 10, 0, cia_0_intf)
MCFG_LEGACY_MOS8520_ADD("cia_1", AMIGA_68EC020_PAL_CLOCK / 10, 0, cia_1_intf)
MCFG_MICROTOUCH_ADD( "microtouch", cd32_microtouch_config )
MCFG_MICROTOUCH_ADD( "microtouch", WRITE8(cd32_state, microtouch_tx) )
/* fdc */
MCFG_AMIGA_FDC_ADD("fdc", AMIGA_68000_NTSC_CLOCK)

View File

@ -115,11 +115,6 @@ static const ins8250_interface magtouch_com0_interface =
DEVCB_NULL
};
static const microtouch_serial_interface magtouch_microtouch_interface =
{
DEVCB_DEVICE_LINE_MEMBER("ns16450_0", ins8250_uart_device, rx_w)
};
/*************************************
*
* ROM banking
@ -181,8 +176,6 @@ void magtouch_state::machine_start()
membank("rombank")->configure_entries(0, 0x80, memregion("game_prg")->base(), 0x8000 );
membank("rombank")->set_entry(0);
// microtouch_init(machine(), magtouch_microtouch_tx_callback, NULL);
}
static MACHINE_CONFIG_START( magtouch, magtouch_state )
@ -200,7 +193,7 @@ static MACHINE_CONFIG_START( magtouch, magtouch_state )
MCFG_FRAGMENT_ADD( pcat_common )
MCFG_NS16450_ADD( "ns16450_0", magtouch_com0_interface, XTAL_1_8432MHz )
MCFG_MICROTOUCH_SERIAL_ADD( "microtouch", magtouch_microtouch_interface, 9600 ) // rate?
MCFG_MICROTOUCH_SERIAL_ADD( "microtouch", 9600, DEVWRITELINE("ns16450_0", ins8250_uart_device, rx_w) ) // rate?
MACHINE_CONFIG_END

View File

@ -161,7 +161,7 @@ Not all regional versions are available for each Megatouch series
#include "video/v9938.h"
#include "machine/i8255.h"
#include "machine/z80pio.h"
#include "machine/pc16552d.h"
#include "machine/ins8250.h"
#include "machine/microtch.h"
#include "machine/nvram.h"
@ -188,7 +188,8 @@ public:
m_v9938_0(*this, "v9938_0"),
m_v9938_1(*this, "v9938_1"),
m_microtouch(*this, "microtouch") ,
m_maincpu(*this, "maincpu") { }
m_uart(*this, "ns16550"),
m_maincpu(*this, "maincpu") { }
DECLARE_WRITE8_MEMBER(microtouch_tx);
UINT8* m_ram;
@ -205,7 +206,8 @@ public:
ds1204_t m_ds1204;
required_device<v9938_device> m_v9938_0;
required_device<v9938_device> m_v9938_1;
required_device<microtouch_device> m_microtouch;
optional_device<microtouch_serial_device> m_microtouch;
optional_device<ns16550_device> m_uart;
DECLARE_WRITE8_MEMBER(meritm_crt250_bank_w);
DECLARE_WRITE8_MEMBER(meritm_psd_a15_w);
DECLARE_WRITE8_MEMBER(meritm_bank_w);
@ -251,6 +253,7 @@ public:
void ds1204_init(const UINT8* key, const UINT8* nvram);
void meritm_crt250_switch_banks( );
void meritm_switch_banks( );
int meritm_touch_coord_transform(int *touch_x, int *touch_y);
UINT8 binary_to_BCD(UINT8 data);
DECLARE_WRITE_LINE_MEMBER(meritm_vdp0_interrupt);
DECLARE_WRITE_LINE_MEMBER(meritm_vdp1_interrupt);
@ -259,7 +262,7 @@ public:
#define SYSTEM_CLK 21470000
#define UART_CLK XTAL_18_432MHz
#define UART_CLK XTAL_1_8432MHz // standard 8250 clock
@ -377,28 +380,26 @@ void meritm_state::ds1204_init(const UINT8* key, const UINT8* nvram)
/*************************************
*
* Microtouch <-> pc16650 interface
* Microtouch <-> pc16550 interface
*
*************************************/
static void pc16650d_tx_callback(running_machine &machine, int channel, int count, UINT8* data)
static const ins8250_interface meritm_ns16550_interface =
{
meritm_state *state = machine.driver_data<meritm_state>();
for(int i = 0; i < count; i++)
state->m_microtouch->rx(machine.driver_data()->generic_space(), 0, data[i]);
}
WRITE8_MEMBER(meritm_state::microtouch_tx)
{
pc16552d_rx_data(space.machine(), 0, 0, data);
}
DEVCB_DEVICE_LINE_MEMBER("microtouch", microtouch_serial_device, rx),
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL,
DEVCB_NULL
};
/*************************************
*
* Microtouch touch coordinate transformation
*
*************************************/
MICROTOUCH_TOUCH(meritm_touch_coord_transform)
int meritm_state::meritm_touch_coord_transform(int *touch_x, int *touch_y)
{
int xscr = (int)((double)(*touch_x)/0x4000*544);
int yscr = (int)((double)(*touch_y)/0x4000*480);
@ -423,12 +424,6 @@ MICROTOUCH_TOUCH(meritm_touch_coord_transform)
return 1;
}
static const microtouch_interface meritm_microtouch_config =
{
DEVCB_DRIVER_MEMBER(meritm_state, microtouch_tx),
meritm_touch_coord_transform
};
/*************************************
*
* Video
@ -698,7 +693,7 @@ static ADDRESS_MAP_START( meritm_crt250_crt258_io_map, AS_IO, 8, meritm_state )
AM_RANGE(0x30, 0x33) AM_DEVREADWRITE("ppi8255", i8255_device, read, write)
AM_RANGE(0x40, 0x43) AM_DEVREADWRITE("z80pio_0", z80pio_device, read, write)
AM_RANGE(0x50, 0x53) AM_DEVREADWRITE("z80pio_1", z80pio_device, read, write)
AM_RANGE(0x60, 0x67) AM_READWRITE_LEGACY(pc16552d_0_r,pc16552d_0_w)
AM_RANGE(0x60, 0x67) AM_DEVREADWRITE("ns16550", ns16550_device, ins8250_r, ins8250_w)
AM_RANGE(0x80, 0x80) AM_DEVREAD("aysnd", ay8910_device, data_r)
AM_RANGE(0x80, 0x81) AM_DEVWRITE("aysnd", ay8910_device, address_data_w)
AM_RANGE(0xff, 0xff) AM_WRITE(meritm_crt250_bank_w)
@ -719,7 +714,7 @@ static ADDRESS_MAP_START( meritm_io_map, AS_IO, 8, meritm_state )
AM_RANGE(0x30, 0x33) AM_DEVREADWRITE("ppi8255", i8255_device, read, write)
AM_RANGE(0x40, 0x43) AM_DEVREADWRITE("z80pio_0", z80pio_device, read, write)
AM_RANGE(0x50, 0x53) AM_DEVREADWRITE("z80pio_1", z80pio_device, read, write)
AM_RANGE(0x60, 0x67) AM_READWRITE_LEGACY(pc16552d_0_r,pc16552d_0_w)
AM_RANGE(0x60, 0x67) AM_DEVREADWRITE("ns16550", ns16550_device, ins8250_r, ins8250_w)
AM_RANGE(0x80, 0x80) AM_DEVREAD("aysnd", ay8910_device, data_r)
AM_RANGE(0x80, 0x81) AM_DEVWRITE("aysnd", ay8910_device, address_data_w)
AM_RANGE(0xff, 0xff) AM_WRITE(meritm_bank_w)
@ -1129,7 +1124,6 @@ MACHINE_START_MEMBER(meritm_state,meritm_crt250_questions)
MACHINE_START_MEMBER(meritm_state,meritm_crt250_crt252_crt258)
{
MACHINE_START_CALL_MEMBER(meritm_crt250_questions);
pc16552d_init(machine(), 0, UART_CLK, NULL, pc16650d_tx_callback);
}
MACHINE_START_MEMBER(meritm_state,meritm_crt260)
@ -1144,7 +1138,6 @@ MACHINE_START_MEMBER(meritm_state,meritm_crt260)
m_psd_a15 = 0;
meritm_switch_banks();
MACHINE_START_CALL_MEMBER(merit_common);
pc16552d_init(machine(), 0, UART_CLK, NULL, pc16650d_tx_callback);
save_item(NAME(m_bank));
save_item(NAME(m_psd_a15));
save_pointer(NAME(m_ram), 0x8000);
@ -1215,8 +1208,6 @@ static MACHINE_CONFIG_START( meritm_crt250, meritm_state )
MCFG_SOUND_ADD("aysnd", AY8910, SYSTEM_CLK/12)
MCFG_SOUND_CONFIG(ay8910_config)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_MICROTOUCH_ADD("microtouch", meritm_microtouch_config)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( meritm_crt250_questions, meritm_crt250 )
@ -1229,6 +1220,10 @@ static MACHINE_CONFIG_DERIVED( meritm_crt250_crt252_crt258, meritm_crt250_questi
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_IO_MAP(meritm_crt250_crt258_io_map)
MCFG_MACHINE_START_OVERRIDE(meritm_state,meritm_crt250_crt252_crt258)
MCFG_NS16550_ADD("ns16550", meritm_ns16550_interface, UART_CLK)
MCFG_MICROTOUCH_SERIAL_ADD("microtouch", 9600, DEVWRITELINE("ns16550", ins8250_uart_device, rx_w))
MCFG_MICROTOUCH_TOUCH_CB(meritm_state, meritm_touch_coord_transform)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( meritm_crt260, meritm_crt250 )
@ -1242,6 +1237,9 @@ static MACHINE_CONFIG_DERIVED( meritm_crt260, meritm_crt250 )
MCFG_WATCHDOG_TIME_INIT(attotime::from_msec(1200)) // DS1232, TD connected to VCC
MCFG_MACHINE_START_OVERRIDE(meritm_state,meritm_crt260)
MCFG_NS16550_ADD("ns16550", meritm_ns16550_interface, UART_CLK)
MCFG_MICROTOUCH_SERIAL_ADD("microtouch", 9600, DEVWRITELINE("ns16550", ins8250_uart_device, rx_w))
MCFG_MICROTOUCH_TOUCH_CB(meritm_state, meritm_touch_coord_transform)
MACHINE_CONFIG_END

View File

@ -101,45 +101,22 @@ public:
required_device<ns16450_device> m_uart;
required_device<microtouch_serial_device> m_microtouch;
DECLARE_WRITE_LINE_MEMBER(microtouch_out);
DECLARE_WRITE_LINE_MEMBER(microtouch_in);
DECLARE_WRITE8_MEMBER(pcat_nit_rombank_w);
DECLARE_READ8_MEMBER(pcat_nit_io_r);
DECLARE_WRITE_LINE_MEMBER(at_com_interrupt_1);
DECLARE_DRIVER_INIT(pcat_nit);
virtual void machine_start();
};
WRITE_LINE_MEMBER(pcat_nit_state::microtouch_out)
{
m_microtouch->rx(state);
}
WRITE_LINE_MEMBER(pcat_nit_state::microtouch_in)
{
m_uart->rx_w(state);
}
WRITE_LINE_MEMBER(pcat_nit_state::at_com_interrupt_1)
{
m_pic8259_1->ir4_w(state);
}
static const ins8250_interface pcat_nit_com0_interface =
{
DEVCB_DRIVER_LINE_MEMBER(pcat_nit_state, microtouch_out),
DEVCB_DEVICE_LINE_MEMBER("microtouch", microtouch_serial_device, rx),
DEVCB_NULL,
DEVCB_NULL,
DEVCB_DRIVER_LINE_MEMBER(pcat_nit_state,at_com_interrupt_1),
DEVCB_DEVICE_LINE_MEMBER("pic8259_1", pic8259_device, ir4_w),
DEVCB_NULL,
DEVCB_NULL
};
static const microtouch_serial_interface pcat_nit_microtouch_interface =
{
DEVCB_DRIVER_LINE_MEMBER(pcat_nit_state, microtouch_in)
};
/*************************************
*
* ROM banking
@ -244,10 +221,9 @@ static MACHINE_CONFIG_START( pcat_nit, pcat_nit_state )
MCFG_SCREEN_REFRESH_RATE(60)
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */
// MCFG_FRAGMENT_ADD( at_kbdc8042 )
MCFG_FRAGMENT_ADD( pcat_common )
MCFG_NS16450_ADD( "ns16450_0", pcat_nit_com0_interface, XTAL_1_8432MHz )
MCFG_MICROTOUCH_SERIAL_ADD( "microtouch", pcat_nit_microtouch_interface, 9600 ) // rate?
MCFG_MICROTOUCH_SERIAL_ADD( "microtouch", 9600, DEVWRITELINE("ns16450_0", ins8250_uart_device, rx_w) ) // rate?
MCFG_NVRAM_ADD_0FILL("nvram")
MACHINE_CONFIG_END

View File

@ -242,12 +242,6 @@ WRITE8_MEMBER( tmaster_state::microtouch_tx )
duart68681_rx_data(m_duart68681, 0, data);
}
static const microtouch_interface tmaster_microtouch_config =
{
DEVCB_DRIVER_MEMBER(tmaster_state, microtouch_tx),
NULL
};
/***************************************************************************
DS1644 RTC
@ -936,7 +930,7 @@ static MACHINE_CONFIG_START( tm3k, tmaster_state )
MCFG_MACHINE_RESET_OVERRIDE(tmaster_state,tmaster)
MCFG_DUART68681_ADD( "duart68681", XTAL_8_664MHz / 2 /*??*/, tmaster_duart68681_config )
MCFG_MICROTOUCH_ADD( "microtouch", tmaster_microtouch_config )
MCFG_MICROTOUCH_ADD( "microtouch", WRITE8(tmaster_state, microtouch_tx) )
MCFG_NVRAM_ADD_0FILL("nvram")

View File

@ -439,11 +439,6 @@ WRITE8_MEMBER( nevada_state::microtouch_tx )
duart68681_rx_data(m_duart40_68681, 0, data);
}
static const microtouch_interface nevada_microtouch_config =
{
DEVCB_DRIVER_MEMBER(nevada_state, microtouch_tx),
NULL
};
/***************************************************************************/
static UINT8 duart40_input( device_t *device )
{
@ -741,7 +736,7 @@ static MACHINE_CONFIG_START( nevada, nevada_state )
MCFG_DUART68681_ADD( "duart18_68681", XTAL_3_6864MHz , nevada_duart18_68681_config ) // UARTA = Modem 1200Baud
MCFG_DUART68681_ADD( "duart39_68681", XTAL_3_6864MHz , nevada_duart39_68681_config ) // UARTA = Printer
MCFG_DUART68681_ADD( "duart40_68681", XTAL_3_6864MHz , nevada_duart40_68681_config ) // UARTA = Touch , UARTB = Bill Acceptor
MCFG_MICROTOUCH_ADD( "microtouch", nevada_microtouch_config )
MCFG_MICROTOUCH_ADD( "microtouch", WRITE8(nevada_state, microtouch_tx) )
/* devices */
MCFG_MSM6242_ADD("rtc", nevada_rtc_intf)