mirror of
https://github.com/holub/mame
synced 2025-04-20 23:42:22 +03:00
added RS232 loopback [smf]
This commit is contained in:
parent
487efaf26f
commit
37c2d0587d
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -1160,6 +1160,8 @@ src/emu/bus/plus4/user.c svneol=native#text/plain
|
||||
src/emu/bus/plus4/user.h svneol=native#text/plain
|
||||
src/emu/bus/rs232/keyboard.c svneol=native#text/plain
|
||||
src/emu/bus/rs232/keyboard.h svneol=native#text/plain
|
||||
src/emu/bus/rs232/loopback.c svneol=native#text/plain
|
||||
src/emu/bus/rs232/loopback.h svneol=native#text/plain
|
||||
src/emu/bus/rs232/null_modem.c svneol=native#text/plain
|
||||
src/emu/bus/rs232/null_modem.h svneol=native#text/plain
|
||||
src/emu/bus/rs232/rs232.c svneol=native#text/plain
|
||||
|
@ -703,6 +703,7 @@ endif
|
||||
ifneq ($(filter RS232,$(BUSES)),)
|
||||
OBJDIRS += $(BUSOBJ)/rs232
|
||||
BUSOBJS += $(BUSOBJ)/rs232/keyboard.o
|
||||
BUSOBJS += $(BUSOBJ)/rs232/loopback.o
|
||||
BUSOBJS += $(BUSOBJ)/rs232/null_modem.o
|
||||
BUSOBJS += $(BUSOBJ)/rs232/rs232.o
|
||||
BUSOBJS += $(BUSOBJ)/rs232/ser_mouse.o
|
||||
|
16
src/emu/bus/rs232/loopback.c
Normal file
16
src/emu/bus/rs232/loopback.c
Normal file
@ -0,0 +1,16 @@
|
||||
// license:MAME
|
||||
// copyright-holders:smf
|
||||
|
||||
#include "loopback.h"
|
||||
|
||||
const device_type RS232_LOOPBACK = &device_creator<rs232_loopback_device>;
|
||||
|
||||
rs232_loopback_device::rs232_loopback_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: device_t(mconfig, RS232_LOOPBACK, "RS232 Loopback", tag, owner, clock, "rs232_loopback", __FILE__),
|
||||
device_rs232_port_interface(mconfig, *this)
|
||||
{
|
||||
}
|
||||
|
||||
void rs232_loopback_device::device_start()
|
||||
{
|
||||
}
|
25
src/emu/bus/rs232/loopback.h
Normal file
25
src/emu/bus/rs232/loopback.h
Normal file
@ -0,0 +1,25 @@
|
||||
// license:MAME
|
||||
// copyright-holders:smf
|
||||
|
||||
#ifndef RS232_LOOPBACK_H_
|
||||
#define RS232_LOOPBACK_H_
|
||||
|
||||
#include "bus/rs232/rs232.h"
|
||||
|
||||
class rs232_loopback_device : public device_t,
|
||||
public device_rs232_port_interface
|
||||
{
|
||||
public:
|
||||
rs232_loopback_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
virtual WRITE_LINE_MEMBER( input_txd ) { output_rxd(state); }
|
||||
virtual WRITE_LINE_MEMBER( input_rts ) { output_ri(state); output_cts(state); }
|
||||
virtual WRITE_LINE_MEMBER( input_dtr ) { output_dsr(state); output_dcd(state); }
|
||||
|
||||
protected:
|
||||
virtual void device_start();
|
||||
};
|
||||
|
||||
extern const device_type RS232_LOOPBACK;
|
||||
|
||||
#endif
|
@ -96,10 +96,12 @@ device_rs232_port_interface::~device_rs232_port_interface()
|
||||
{
|
||||
}
|
||||
|
||||
#include "loopback.h"
|
||||
#include "null_modem.h"
|
||||
#include "terminal.h"
|
||||
|
||||
SLOT_INTERFACE_START( default_rs232_devices )
|
||||
SLOT_INTERFACE("serial_terminal", SERIAL_TERMINAL)
|
||||
SLOT_INTERFACE("loopback", SERIAL_LOOPBACK)
|
||||
SLOT_INTERFACE("null_modem", NULL_MODEM)
|
||||
SLOT_INTERFACE("serial_terminal", SERIAL_TERMINAL)
|
||||
SLOT_INTERFACE_END
|
||||
|
Loading…
Reference in New Issue
Block a user