mirror of
https://github.com/holub/mame
synced 2025-04-21 07:52:35 +03:00
created src\emu\bus\rs232 & src\emu\bus\midi directories and separated rs232 and midi devices, changed h89 to use an rs232 port to communicate with the serial terminal to instead of connecting it directly. [smf]
This commit is contained in:
parent
88bc8a4673
commit
b37d92de72
34
.gitattributes
vendored
34
.gitattributes
vendored
@ -756,6 +756,12 @@ src/emu/bus/kc/ram.c svneol=native#text/plain
|
||||
src/emu/bus/kc/ram.h svneol=native#text/plain
|
||||
src/emu/bus/kc/rom.c svneol=native#text/plain
|
||||
src/emu/bus/kc/rom.h svneol=native#text/plain
|
||||
src/emu/bus/midi/midi.c svneol=native#text/plain
|
||||
src/emu/bus/midi/midi.h svneol=native#text/plain
|
||||
src/emu/bus/midi/midiinport.c svneol=native#text/plain
|
||||
src/emu/bus/midi/midiinport.h svneol=native#text/plain
|
||||
src/emu/bus/midi/midioutport.c svneol=native#text/plain
|
||||
src/emu/bus/midi/midioutport.h svneol=native#text/plain
|
||||
src/emu/bus/nubus/nubus.c svneol=native#text/plain
|
||||
src/emu/bus/nubus/nubus.h svneol=native#text/plain
|
||||
src/emu/bus/nubus/nubus_48gc.c svneol=native#text/plain
|
||||
@ -836,6 +842,16 @@ src/emu/bus/plus4/std.c svneol=native#text/plain
|
||||
src/emu/bus/plus4/std.h svneol=native#text/plain
|
||||
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/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
|
||||
src/emu/bus/rs232/rs232.h svneol=native#text/plain
|
||||
src/emu/bus/rs232/ser_mouse.c svneol=native#text/plain
|
||||
src/emu/bus/rs232/ser_mouse.h svneol=native#text/plain
|
||||
src/emu/bus/rs232/terminal.c svneol=native#text/plain
|
||||
src/emu/bus/rs232/terminal.h svneol=native#text/plain
|
||||
src/emu/bus/s100/dj2db.c svneol=native#text/plain
|
||||
src/emu/bus/s100/dj2db.h svneol=native#text/plain
|
||||
src/emu/bus/s100/djdma.c svneol=native#text/plain
|
||||
@ -1927,6 +1943,8 @@ src/emu/machine/k053252.c svneol=native#text/plain
|
||||
src/emu/machine/k053252.h svneol=native#text/plain
|
||||
src/emu/machine/k056230.c svneol=native#text/plain
|
||||
src/emu/machine/k056230.h svneol=native#text/plain
|
||||
src/emu/machine/keyboard.c svneol=native#text/plain
|
||||
src/emu/machine/keyboard.h svneol=native#text/plain
|
||||
src/emu/machine/laserdsc.c svneol=native#text/plain
|
||||
src/emu/machine/laserdsc.h svneol=native#text/plain
|
||||
src/emu/machine/latch.c svneol=native#text/plain
|
||||
@ -2104,6 +2122,8 @@ src/emu/machine/t10spc.c svneol=native#text/plain
|
||||
src/emu/machine/t10spc.h svneol=native#text/plain
|
||||
src/emu/machine/tc009xlvc.c svneol=native#text/plain
|
||||
src/emu/machine/tc009xlvc.h svneol=native#text/plain
|
||||
src/emu/machine/terminal.c svneol=native#text/plain
|
||||
src/emu/machine/terminal.h svneol=native#text/plain
|
||||
src/emu/machine/timekpr.c svneol=native#text/plain
|
||||
src/emu/machine/timekpr.h svneol=native#text/plain
|
||||
src/emu/machine/tmp68301.c svneol=native#text/plain
|
||||
@ -8068,8 +8088,6 @@ src/mess/machine/kb_poisk1.h svneol=native#text/plain
|
||||
src/mess/machine/kc.c svneol=native#text/plain
|
||||
src/mess/machine/kc_keyb.c svneol=native#text/plain
|
||||
src/mess/machine/kc_keyb.h svneol=native#text/plain
|
||||
src/mess/machine/keyboard.c svneol=native#text/plain
|
||||
src/mess/machine/keyboard.h svneol=native#text/plain
|
||||
src/mess/machine/kr2376.c svneol=native#text/plain
|
||||
src/mess/machine/kr2376.h svneol=native#text/plain
|
||||
src/mess/machine/kramermc.c svneol=native#text/plain
|
||||
@ -8123,10 +8141,6 @@ src/mess/machine/microdrv.h svneol=native#text/plain
|
||||
src/mess/machine/micropolis.c svneol=native#text/plain
|
||||
src/mess/machine/micropolis.h svneol=native#text/plain
|
||||
src/mess/machine/microtan.c svneol=native#text/plain
|
||||
src/mess/machine/midiinport.c svneol=native#text/plain
|
||||
src/mess/machine/midiinport.h svneol=native#text/plain
|
||||
src/mess/machine/midioutport.c svneol=native#text/plain
|
||||
src/mess/machine/midioutport.h svneol=native#text/plain
|
||||
src/mess/machine/mikro80.c svneol=native#text/plain
|
||||
src/mess/machine/mpc105.c svneol=native#text/plain
|
||||
src/mess/machine/mpc105.h svneol=native#text/plain
|
||||
@ -8249,8 +8263,6 @@ src/mess/machine/nextmo.c svneol=native#text/plain
|
||||
src/mess/machine/nextmo.h svneol=native#text/plain
|
||||
src/mess/machine/northbridge.c svneol=native#text/plain
|
||||
src/mess/machine/northbridge.h svneol=native#text/plain
|
||||
src/mess/machine/null_modem.c svneol=native#text/plain
|
||||
src/mess/machine/null_modem.h svneol=native#text/plain
|
||||
src/mess/machine/omti8621.c svneol=native#text/plain
|
||||
src/mess/machine/omti8621.h svneol=native#text/plain
|
||||
src/mess/machine/ondra.c svneol=native#text/plain
|
||||
@ -8352,10 +8364,6 @@ src/mess/machine/sega8_rom.c svneol=native#text/plain
|
||||
src/mess/machine/sega8_rom.h svneol=native#text/plain
|
||||
src/mess/machine/sega8_slot.c svneol=native#text/plain
|
||||
src/mess/machine/sega8_slot.h svneol=native#text/plain
|
||||
src/mess/machine/ser_mouse.c svneol=native#text/plain
|
||||
src/mess/machine/ser_mouse.h svneol=native#text/plain
|
||||
src/mess/machine/serial.c svneol=native#text/plain
|
||||
src/mess/machine/serial.h svneol=native#text/plain
|
||||
src/mess/machine/sgi.c svneol=native#text/plain
|
||||
src/mess/machine/sgi.h svneol=native#text/plain
|
||||
src/mess/machine/smartmed.c svneol=native#text/plain
|
||||
@ -8426,8 +8434,6 @@ src/mess/machine/tandy2kb.c svneol=native#text/plain
|
||||
src/mess/machine/tandy2kb.h svneol=native#text/plain
|
||||
src/mess/machine/teleprinter.c svneol=native#text/plain
|
||||
src/mess/machine/teleprinter.h svneol=native#text/plain
|
||||
src/mess/machine/terminal.c svneol=native#text/plain
|
||||
src/mess/machine/terminal.h svneol=native#text/plain
|
||||
src/mess/machine/tf20.c svneol=native#text/plain
|
||||
src/mess/machine/tf20.h svneol=native#text/plain
|
||||
src/mess/machine/thomflop.c svneol=native#text/plain
|
||||
|
@ -6,9 +6,10 @@
|
||||
|
||||
*********************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/apple2.h"
|
||||
#include "a2midi.h"
|
||||
#include "bus/midi/midi.h"
|
||||
#include "bus/midi/midiinport.h"
|
||||
#include "bus/midi/midioutport.h"
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
@ -36,7 +37,7 @@ static ACIA6850_INTERFACE( acia_interface )
|
||||
{
|
||||
31250*16, // tx clock
|
||||
0, // rx clock (we manually clock rx)
|
||||
DEVCB_DEVICE_LINE_MEMBER("mdout", serial_port_device, tx), // tx out
|
||||
DEVCB_DEVICE_LINE_MEMBER("mdout", midi_port_device, write_txd), // tx out
|
||||
DEVCB_NULL, // rts out
|
||||
DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, a2bus_midi_device, acia_irq_w)
|
||||
};
|
||||
@ -53,10 +54,10 @@ MACHINE_CONFIG_FRAGMENT( midi )
|
||||
MCFG_PTM6840_ADD(MIDI_PTM_TAG, ptm_interface)
|
||||
MCFG_ACIA6850_ADD(MIDI_ACIA_TAG, acia_interface)
|
||||
|
||||
MCFG_SERIAL_PORT_ADD("mdin", midiin_slot, "midiin")
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE(DEVICE_SELF, a2bus_midi_device, midi_rx_w))
|
||||
MCFG_MIDI_PORT_ADD("mdin", midiin_slot, "midiin")
|
||||
MCFG_MIDI_RX_HANDLER(DEVWRITELINE(DEVICE_SELF, a2bus_midi_device, midi_rx_w))
|
||||
|
||||
MCFG_SERIAL_PORT_ADD("mdout", midiout_slot, "midiout")
|
||||
MCFG_MIDI_PORT_ADD("mdout", midiout_slot, "midiout")
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
//-------------------------------------------------
|
||||
|
@ -9,13 +9,9 @@
|
||||
#ifndef __A2BUS_MIDI__
|
||||
#define __A2BUS_MIDI__
|
||||
|
||||
#include "emu.h"
|
||||
#include "a2bus.h"
|
||||
#include "machine/6840ptm.h"
|
||||
#include "machine/6850acia.h"
|
||||
#include "machine/serial.h"
|
||||
#include "machine/midiinport.h"
|
||||
#include "machine/midioutport.h"
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
|
@ -6,12 +6,8 @@
|
||||
|
||||
*********************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "includes/apple2.h"
|
||||
#include "a2ssc.h"
|
||||
#include "machine/terminal.h"
|
||||
#include "machine/null_modem.h"
|
||||
#include "machine/serial.h"
|
||||
#include "bus/rs232/rs232.h"
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
@ -31,13 +27,13 @@ const device_type A2BUS_SSC = &device_creator<a2bus_ssc_device>;
|
||||
MACHINE_CONFIG_FRAGMENT( ssc )
|
||||
MCFG_DEVICE_ADD(SSC_ACIA_TAG, MOS6551, XTAL_1_8432MHz)
|
||||
MCFG_MOS6551_IRQ_HANDLER(WRITELINE(a2bus_ssc_device, acia_irq_w))
|
||||
MCFG_MOS6551_TXD_HANDLER(DEVWRITELINE(SSC_RS232_TAG, rs232_port_device, tx))
|
||||
MCFG_MOS6551_TXD_HANDLER(DEVWRITELINE(SSC_RS232_TAG, rs232_port_device, write_txd))
|
||||
|
||||
MCFG_RS232_PORT_ADD(SSC_RS232_TAG, default_rs232_devices, NULL)
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE(SSC_ACIA_TAG, mos6551_device, rxd_w))
|
||||
MCFG_RS232_OUT_DCD_HANDLER(DEVWRITELINE(SSC_ACIA_TAG, mos6551_device, dcd_w))
|
||||
MCFG_RS232_OUT_DSR_HANDLER(DEVWRITELINE(SSC_ACIA_TAG, mos6551_device, dsr_w))
|
||||
MCFG_RS232_OUT_CTS_HANDLER(DEVWRITELINE(SSC_ACIA_TAG, mos6551_device, cts_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(SSC_ACIA_TAG, mos6551_device, rxd_w))
|
||||
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(SSC_ACIA_TAG, mos6551_device, dcd_w))
|
||||
MCFG_RS232_DSR_HANDLER(DEVWRITELINE(SSC_ACIA_TAG, mos6551_device, dsr_w))
|
||||
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(SSC_ACIA_TAG, mos6551_device, cts_w))
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
ROM_START( ssc )
|
||||
|
@ -9,7 +9,6 @@
|
||||
#ifndef __A2BUS_SSC__
|
||||
#define __A2BUS_SSC__
|
||||
|
||||
#include "emu.h"
|
||||
#include "a2bus.h"
|
||||
#include "machine/mos6551.h"
|
||||
|
||||
|
@ -579,3 +579,27 @@ BUSOBJS += $(BUSOBJ)/centronics/covox.o
|
||||
BUSOBJS += $(BUSOBJ)/centronics/dsjoy.o
|
||||
BUSOBJS += $(BUSOBJ)/centronics/image.o
|
||||
endif
|
||||
|
||||
#-------------------------------------------------
|
||||
#
|
||||
#@src/emu/bus/rs232/rs232.h,BUSES += RS232
|
||||
#-------------------------------------------------
|
||||
|
||||
ifneq ($(filter RS232,$(BUSES)),)
|
||||
BUSOBJS += $(BUSOBJ)/rs232/keyboard.o
|
||||
BUSOBJS += $(BUSOBJ)/rs232/null_modem.o
|
||||
BUSOBJS += $(BUSOBJ)/rs232/rs232.o
|
||||
BUSOBJS += $(BUSOBJ)/rs232/ser_mouse.o
|
||||
BUSOBJS += $(BUSOBJ)/rs232/terminal.o
|
||||
endif
|
||||
|
||||
#-------------------------------------------------
|
||||
#
|
||||
#@src/emu/bus/midi/midi.h,BUSES += MIDI
|
||||
#-------------------------------------------------
|
||||
|
||||
ifneq ($(filter MIDI,$(BUSES)),)
|
||||
BUSOBJS += $(BUSOBJ)/midi/midi.o
|
||||
BUSOBJS += $(BUSOBJ)/midi/midiinport.o
|
||||
BUSOBJS += $(BUSOBJ)/midi/midioutport.o
|
||||
endif
|
||||
|
@ -10,6 +10,9 @@
|
||||
**********************************************************************/
|
||||
|
||||
#include "midi_maplin.h"
|
||||
#include "bus/midi/midi.h"
|
||||
#include "bus/midi/midiinport.h"
|
||||
#include "bus/midi/midioutport.h"
|
||||
|
||||
|
||||
|
||||
@ -41,7 +44,7 @@ static ACIA6850_INTERFACE( acia_intf )
|
||||
{
|
||||
500000,
|
||||
0, // rx clock (we manually clock rx)
|
||||
DEVCB_DEVICE_LINE_MEMBER("mdout", serial_port_device, tx),
|
||||
DEVCB_DEVICE_LINE_MEMBER("mdout", midi_port_device, write_txd),
|
||||
DEVCB_NULL,
|
||||
DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, c64_maplin_midi_cartridge_device, acia_irq_w)
|
||||
};
|
||||
@ -82,10 +85,10 @@ SLOT_INTERFACE_END
|
||||
static MACHINE_CONFIG_FRAGMENT( c64_maplin_midi )
|
||||
MCFG_ACIA6850_ADD(MC6850_TAG, acia_intf)
|
||||
|
||||
MCFG_SERIAL_PORT_ADD("mdin", midiin_slot, "midiin")
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE(DEVICE_SELF, c64_maplin_midi_cartridge_device, midi_rx_w))
|
||||
MCFG_MIDI_PORT_ADD("mdin", midiin_slot, "midiin")
|
||||
MCFG_MIDI_RX_HANDLER(DEVWRITELINE(DEVICE_SELF, c64_maplin_midi_cartridge_device, midi_rx_w))
|
||||
|
||||
MCFG_SERIAL_PORT_ADD("mdout", midiout_slot, "midiout")
|
||||
MCFG_MIDI_PORT_ADD("mdout", midiout_slot, "midiout")
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
|
@ -14,12 +14,8 @@
|
||||
#ifndef __C64_MIDI_MAPLIN__
|
||||
#define __C64_MIDI_MAPLIN__
|
||||
|
||||
#include "emu.h"
|
||||
#include "exp.h"
|
||||
#include "machine/6850acia.h"
|
||||
#include "machine/serial.h"
|
||||
#include "machine/midiinport.h"
|
||||
#include "machine/midioutport.h"
|
||||
|
||||
|
||||
|
||||
|
@ -10,6 +10,9 @@
|
||||
**********************************************************************/
|
||||
|
||||
#include "midi_namesoft.h"
|
||||
#include "bus/midi/midi.h"
|
||||
#include "bus/midi/midiinport.h"
|
||||
#include "bus/midi/midioutport.h"
|
||||
|
||||
|
||||
|
||||
@ -41,7 +44,7 @@ static ACIA6850_INTERFACE( acia_intf )
|
||||
{
|
||||
500000,
|
||||
0, // rx clock (we manually clock rx)
|
||||
DEVCB_DEVICE_LINE_MEMBER("mdout", serial_port_device, tx),
|
||||
DEVCB_DEVICE_LINE_MEMBER("mdout", midi_port_device, write_txd),
|
||||
DEVCB_NULL,
|
||||
DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, c64_namesoft_midi_cartridge_device, acia_irq_w)
|
||||
};
|
||||
@ -82,10 +85,10 @@ SLOT_INTERFACE_END
|
||||
static MACHINE_CONFIG_FRAGMENT( c64_passport_midi )
|
||||
MCFG_ACIA6850_ADD(MC6850_TAG, acia_intf)
|
||||
|
||||
MCFG_SERIAL_PORT_ADD("mdin", midiin_slot, "midiin")
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE(DEVICE_SELF, c64_namesoft_midi_cartridge_device, midi_rx_w))
|
||||
MCFG_MIDI_PORT_ADD("mdin", midiin_slot, "midiin")
|
||||
MCFG_MIDI_RX_HANDLER(DEVWRITELINE(DEVICE_SELF, c64_namesoft_midi_cartridge_device, midi_rx_w))
|
||||
|
||||
MCFG_SERIAL_PORT_ADD("mdout", midiout_slot, "midiout")
|
||||
MCFG_MIDI_PORT_ADD("mdout", midiout_slot, "midiout")
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
|
@ -14,12 +14,8 @@
|
||||
#ifndef __C64_MIDI_NAMESOFT__
|
||||
#define __C64_MIDI_NAMESOFT__
|
||||
|
||||
#include "emu.h"
|
||||
#include "exp.h"
|
||||
#include "machine/6850acia.h"
|
||||
#include "machine/serial.h"
|
||||
#include "machine/midiinport.h"
|
||||
#include "machine/midioutport.h"
|
||||
|
||||
|
||||
|
||||
|
@ -10,6 +10,9 @@
|
||||
**********************************************************************/
|
||||
|
||||
#include "midi_passport.h"
|
||||
#include "bus/midi/midi.h"
|
||||
#include "bus/midi/midiinport.h"
|
||||
#include "bus/midi/midioutport.h"
|
||||
|
||||
|
||||
|
||||
@ -64,7 +67,7 @@ static ACIA6850_INTERFACE( acia_intf )
|
||||
{
|
||||
500000,
|
||||
0, // rx clock (we manually clock rx)
|
||||
DEVCB_DEVICE_LINE_MEMBER("mdout", serial_port_device, tx),
|
||||
DEVCB_DEVICE_LINE_MEMBER("mdout", midi_port_device, write_txd),
|
||||
DEVCB_NULL,
|
||||
DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, c64_passport_midi_cartridge_device, acia_irq_w)
|
||||
};
|
||||
@ -106,10 +109,10 @@ static MACHINE_CONFIG_FRAGMENT( c64_passport_midi )
|
||||
MCFG_ACIA6850_ADD(MC6850_TAG, acia_intf)
|
||||
MCFG_PTM6840_ADD(MC6840_TAG, ptm_intf)
|
||||
|
||||
MCFG_SERIAL_PORT_ADD("mdin", midiin_slot, "midiin")
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE(DEVICE_SELF, c64_passport_midi_cartridge_device, midi_rx_w))
|
||||
MCFG_MIDI_PORT_ADD("mdin", midiin_slot, "midiin")
|
||||
MCFG_MIDI_RX_HANDLER(DEVWRITELINE(DEVICE_SELF, c64_passport_midi_cartridge_device, midi_rx_w))
|
||||
|
||||
MCFG_SERIAL_PORT_ADD("mdout", midiout_slot, "midiout")
|
||||
MCFG_MIDI_PORT_ADD("mdout", midiout_slot, "midiout")
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
|
@ -14,13 +14,9 @@
|
||||
#ifndef __C64_MIDI_PASSPORT__
|
||||
#define __C64_MIDI_PASSPORT__
|
||||
|
||||
#include "emu.h"
|
||||
#include "exp.h"
|
||||
#include "machine/6840ptm.h"
|
||||
#include "machine/6850acia.h"
|
||||
#include "machine/serial.h"
|
||||
#include "machine/midiinport.h"
|
||||
#include "machine/midioutport.h"
|
||||
|
||||
|
||||
|
||||
|
@ -10,6 +10,9 @@
|
||||
**********************************************************************/
|
||||
|
||||
#include "midi_sci.h"
|
||||
#include "bus/midi/midi.h"
|
||||
#include "bus/midi/midiinport.h"
|
||||
#include "bus/midi/midioutport.h"
|
||||
|
||||
|
||||
|
||||
@ -41,7 +44,7 @@ static ACIA6850_INTERFACE( acia_intf )
|
||||
{
|
||||
500000,
|
||||
0, // rx clock (we manually clock rx)
|
||||
DEVCB_DEVICE_LINE_MEMBER("mdout", serial_port_device, tx),
|
||||
DEVCB_DEVICE_LINE_MEMBER("mdout", midi_port_device, write_txd),
|
||||
DEVCB_NULL,
|
||||
DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, c64_sequential_midi_cartridge_device, acia_irq_w)
|
||||
};
|
||||
@ -82,10 +85,10 @@ SLOT_INTERFACE_END
|
||||
static MACHINE_CONFIG_FRAGMENT( c64_sequential_midi )
|
||||
MCFG_ACIA6850_ADD(MC6850_TAG, acia_intf)
|
||||
|
||||
MCFG_SERIAL_PORT_ADD("mdin", midiin_slot, "midiin")
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE(DEVICE_SELF, c64_sequential_midi_cartridge_device, midi_rx_w))
|
||||
MCFG_MIDI_PORT_ADD("mdin", midiin_slot, "midiin")
|
||||
MCFG_MIDI_RX_HANDLER(DEVWRITELINE(DEVICE_SELF, c64_sequential_midi_cartridge_device, midi_rx_w))
|
||||
|
||||
MCFG_SERIAL_PORT_ADD("mdout", midiout_slot, "midiout")
|
||||
MCFG_MIDI_PORT_ADD("mdout", midiout_slot, "midiout")
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
|
@ -14,12 +14,8 @@
|
||||
#ifndef __C64_MIDI_SCI__
|
||||
#define __C64_MIDI_SCI__
|
||||
|
||||
#include "emu.h"
|
||||
#include "exp.h"
|
||||
#include "machine/6850acia.h"
|
||||
#include "machine/serial.h"
|
||||
#include "machine/midiinport.h"
|
||||
#include "machine/midioutport.h"
|
||||
|
||||
|
||||
|
||||
|
@ -10,6 +10,9 @@
|
||||
**********************************************************************/
|
||||
|
||||
#include "midi_siel.h"
|
||||
#include "bus/midi/midi.h"
|
||||
#include "bus/midi/midiinport.h"
|
||||
#include "bus/midi/midioutport.h"
|
||||
|
||||
|
||||
|
||||
@ -41,7 +44,7 @@ static ACIA6850_INTERFACE( acia_intf )
|
||||
{
|
||||
XTAL_2MHz,
|
||||
0, // rx clock (we manually clock rx)
|
||||
DEVCB_DEVICE_LINE_MEMBER("mdout", serial_port_device, tx),
|
||||
DEVCB_DEVICE_LINE_MEMBER("mdout", midi_port_device, write_txd),
|
||||
DEVCB_NULL,
|
||||
DEVCB_DEVICE_LINE_MEMBER(DEVICE_SELF_OWNER, c64_siel_midi_cartridge_device, acia_irq_w)
|
||||
};
|
||||
@ -82,10 +85,10 @@ SLOT_INTERFACE_END
|
||||
static MACHINE_CONFIG_FRAGMENT( c64_siel_midi )
|
||||
MCFG_ACIA6850_ADD(MC6850_TAG, acia_intf)
|
||||
|
||||
MCFG_SERIAL_PORT_ADD("mdin", midiin_slot, "midiin")
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE(DEVICE_SELF, c64_siel_midi_cartridge_device, midi_rx_w))
|
||||
MCFG_MIDI_PORT_ADD("mdin", midiin_slot, "midiin")
|
||||
MCFG_MIDI_RX_HANDLER(DEVWRITELINE(DEVICE_SELF, c64_siel_midi_cartridge_device, midi_rx_w))
|
||||
|
||||
MCFG_SERIAL_PORT_ADD("mdout", midiout_slot, "midiout")
|
||||
MCFG_MIDI_PORT_ADD("mdout", midiout_slot, "midiout")
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
|
@ -14,12 +14,8 @@
|
||||
#ifndef __C64_MIDI_SIEL__
|
||||
#define __C64_MIDI_SIEL__
|
||||
|
||||
#include "emu.h"
|
||||
#include "exp.h"
|
||||
#include "machine/6850acia.h"
|
||||
#include "machine/serial.h"
|
||||
#include "machine/midiinport.h"
|
||||
#include "machine/midioutport.h"
|
||||
|
||||
|
||||
|
||||
|
@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
#include "swiftlink.h"
|
||||
#include "bus/rs232/rs232.h"
|
||||
|
||||
|
||||
|
||||
@ -42,13 +43,13 @@ const device_type C64_SWIFTLINK = &device_creator<c64_swiftlink_cartridge_device
|
||||
static MACHINE_CONFIG_FRAGMENT( c64_swiftlink )
|
||||
MCFG_DEVICE_ADD(MOS6551_TAG, MOS6551, XTAL_3_6864MHz)
|
||||
MCFG_MOS6551_IRQ_HANDLER(WRITELINE(c64_swiftlink_cartridge_device, acia_irq_w))
|
||||
MCFG_MOS6551_TXD_HANDLER(DEVWRITELINE(RS232_TAG, rs232_port_device, tx))
|
||||
MCFG_MOS6551_TXD_HANDLER(DEVWRITELINE(RS232_TAG, rs232_port_device, write_txd))
|
||||
|
||||
MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, NULL)
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE(MOS6551_TAG, mos6551_device, rxd_w))
|
||||
MCFG_RS232_OUT_DCD_HANDLER(DEVWRITELINE(MOS6551_TAG, mos6551_device, dcd_w))
|
||||
MCFG_RS232_OUT_DSR_HANDLER(DEVWRITELINE(MOS6551_TAG, mos6551_device, dsr_w))
|
||||
MCFG_RS232_OUT_CTS_HANDLER(DEVWRITELINE(MOS6551_TAG, mos6551_device, cts_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(MOS6551_TAG, mos6551_device, rxd_w))
|
||||
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(MOS6551_TAG, mos6551_device, dcd_w))
|
||||
MCFG_RS232_DSR_HANDLER(DEVWRITELINE(MOS6551_TAG, mos6551_device, dsr_w))
|
||||
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(MOS6551_TAG, mos6551_device, cts_w))
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
|
@ -15,10 +15,8 @@
|
||||
#define __SWIFTLINK__
|
||||
|
||||
|
||||
#include "emu.h"
|
||||
#include "exp.h"
|
||||
#include "machine/mos6551.h"
|
||||
#include "machine/serial.h"
|
||||
|
||||
|
||||
|
||||
|
@ -42,13 +42,13 @@ const device_type C64_TURBO232 = &device_creator<c64_turbo232_cartridge_device>;
|
||||
static MACHINE_CONFIG_FRAGMENT( c64_turbo232 )
|
||||
MCFG_DEVICE_ADD(MOS6551_TAG, MOS6551, XTAL_3_6864MHz)
|
||||
MCFG_MOS6551_IRQ_HANDLER(WRITELINE(c64_turbo232_cartridge_device, acia_irq_w))
|
||||
MCFG_MOS6551_TXD_HANDLER(DEVWRITELINE(RS232_TAG, rs232_port_device, tx))
|
||||
MCFG_MOS6551_TXD_HANDLER(DEVWRITELINE(RS232_TAG, rs232_port_device, write_txd))
|
||||
|
||||
MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, NULL)
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE(MOS6551_TAG, mos6551_device, rxd_w))
|
||||
MCFG_RS232_OUT_DCD_HANDLER(DEVWRITELINE(MOS6551_TAG, mos6551_device, dcd_w))
|
||||
MCFG_RS232_OUT_DSR_HANDLER(DEVWRITELINE(MOS6551_TAG, mos6551_device, dsr_w))
|
||||
MCFG_RS232_OUT_CTS_HANDLER(DEVWRITELINE(MOS6551_TAG, mos6551_device, cts_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(MOS6551_TAG, mos6551_device, rxd_w))
|
||||
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(MOS6551_TAG, mos6551_device, dcd_w))
|
||||
MCFG_RS232_DSR_HANDLER(DEVWRITELINE(MOS6551_TAG, mos6551_device, dsr_w))
|
||||
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(MOS6551_TAG, mos6551_device, cts_w))
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
|
@ -15,12 +15,9 @@
|
||||
#define __TURBO232__
|
||||
|
||||
|
||||
#include "emu.h"
|
||||
#include "exp.h"
|
||||
#include "machine/mos6551.h"
|
||||
#include "machine/null_modem.h"
|
||||
#include "machine/serial.h"
|
||||
#include "machine/terminal.h"
|
||||
#include "bus/rs232/rs232.h"
|
||||
|
||||
|
||||
|
||||
|
@ -43,6 +43,11 @@
|
||||
|
||||
|
||||
#include "hardbox.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "machine/i8251.h"
|
||||
#include "machine/i8255.h"
|
||||
#include "imagedev/harddriv.h"
|
||||
#include "includes/corvushd.h"
|
||||
|
||||
|
||||
|
||||
|
@ -14,13 +14,7 @@
|
||||
#ifndef __PET_HARDBOX__
|
||||
#define __PET_HARDBOX__
|
||||
|
||||
#include "emu.h"
|
||||
#include "ieee488.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "imagedev/harddriv.h"
|
||||
#include "includes/corvushd.h"
|
||||
#include "machine/i8255.h"
|
||||
#include "machine/serial.h"
|
||||
|
||||
|
||||
|
||||
|
@ -10,6 +10,9 @@
|
||||
**********************************************************************/
|
||||
|
||||
#include "shark.h"
|
||||
#include "bus/rs232/rs232.h"
|
||||
#include "cpu/i8085/i8085.h"
|
||||
#include "imagedev/harddriv.h"
|
||||
|
||||
|
||||
|
||||
|
@ -16,11 +16,7 @@
|
||||
#ifndef __SHARK__
|
||||
#define __SHARK__
|
||||
|
||||
#include "emu.h"
|
||||
#include "ieee488.h"
|
||||
#include "cpu/i8085/i8085.h"
|
||||
#include "imagedev/harddriv.h"
|
||||
#include "machine/serial.h"
|
||||
|
||||
|
||||
|
||||
|
@ -18,7 +18,12 @@
|
||||
|
||||
|
||||
#include "softbox.h"
|
||||
|
||||
#include "bus/rs232/rs232.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "imagedev/harddriv.h"
|
||||
#include "includes/corvushd.h"
|
||||
#include "machine/i8251.h"
|
||||
#include "machine/i8255.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
@ -99,9 +104,9 @@ ADDRESS_MAP_END
|
||||
|
||||
static const i8251_interface usart_intf =
|
||||
{
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_TAG, serial_port_device, tx),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_TAG, rs232_port_device, dtr_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_TAG, rs232_port_device, rts_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_TAG, rs232_port_device, write_txd),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_TAG, rs232_port_device, write_dtr),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_TAG, rs232_port_device, write_rts),
|
||||
DEVCB_NULL,
|
||||
DEVCB_NULL,
|
||||
DEVCB_NULL,
|
||||
@ -284,10 +289,12 @@ static MACHINE_CONFIG_FRAGMENT( softbox )
|
||||
MCFG_HARDDISK_ADD("harddisk2")
|
||||
MCFG_HARDDISK_ADD("harddisk3")
|
||||
MCFG_HARDDISK_ADD("harddisk4")
|
||||
|
||||
MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, NULL)
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(I8251_TAG, i8251_device, write_rx))
|
||||
MCFG_RS232_DSR_HANDLER(DEVWRITELINE(I8251_TAG, i8251_device, write_dsr))
|
||||
MCFG_DEVICE_CARD_DEVICE_INPUT_DEFAULTS("serial_terminal", terminal)
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE(I8251_TAG, i8251_device, write_rx))
|
||||
MCFG_RS232_OUT_DSR_HANDLER(DEVWRITELINE(I8251_TAG, i8251_device, write_dsr))
|
||||
|
||||
//MCFG_IMI7000_BUS_ADD("imi5000h", NULL, NULL, NULL)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
@ -14,16 +14,8 @@
|
||||
#ifndef __PET_SOFTBOX__
|
||||
#define __PET_SOFTBOX__
|
||||
|
||||
#include "emu.h"
|
||||
#include "ieee488.h"
|
||||
#include "bus/imi7000/imi7000.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "imagedev/harddriv.h"
|
||||
#include "includes/corvushd.h"
|
||||
#include "machine/com8116.h"
|
||||
#include "machine/i8251.h"
|
||||
#include "machine/i8255.h"
|
||||
#include "machine/serial.h"
|
||||
|
||||
|
||||
|
||||
|
40
src/emu/bus/midi/midi.c
Normal file
40
src/emu/bus/midi/midi.c
Normal file
@ -0,0 +1,40 @@
|
||||
#include "midi.h"
|
||||
|
||||
const device_type MIDI_PORT = &device_creator<midi_port_device>;
|
||||
|
||||
device_midi_port_interface::device_midi_port_interface(const machine_config &mconfig, device_t &device)
|
||||
: device_slot_card_interface(mconfig, device)
|
||||
{
|
||||
}
|
||||
|
||||
device_midi_port_interface::~device_midi_port_interface()
|
||||
{
|
||||
}
|
||||
|
||||
midi_port_device::midi_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: device_t(mconfig, MIDI_PORT, "Midi Port", tag, owner, clock, "midi_port", __FILE__),
|
||||
device_slot_interface(mconfig, *this),
|
||||
m_rxd_handler(*this),
|
||||
m_dev(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
midi_port_device::~midi_port_device()
|
||||
{
|
||||
}
|
||||
|
||||
void midi_port_device::device_config_complete()
|
||||
{
|
||||
m_dev = dynamic_cast<device_midi_port_interface *>(get_card_device());
|
||||
}
|
||||
|
||||
void midi_port_device::device_start()
|
||||
{
|
||||
m_rxd_handler.resolve_safe();
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER( midi_port_device::write_txd )
|
||||
{
|
||||
if(m_dev)
|
||||
m_dev->input_txd(state);
|
||||
}
|
62
src/emu/bus/midi/midi.h
Normal file
62
src/emu/bus/midi/midi.h
Normal file
@ -0,0 +1,62 @@
|
||||
#ifndef __BUS_MIDI_H__
|
||||
#define __BUS_MIDI_H__
|
||||
|
||||
#include "emu.h"
|
||||
|
||||
#define MCFG_MIDI_PORT_ADD(_tag, _slot_intf, _def_slot) \
|
||||
MCFG_DEVICE_ADD(_tag, MIDI_PORT, 0) \
|
||||
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
|
||||
|
||||
#define MCFG_MIDI_RX_HANDLER(_devcb) \
|
||||
devcb = &midi_port_device::set_rx_handler(*device, DEVCB2_##_devcb);
|
||||
|
||||
class device_midi_port_interface;
|
||||
|
||||
class midi_port_device : public device_t,
|
||||
public device_slot_interface
|
||||
{
|
||||
friend class device_midi_port_interface;
|
||||
|
||||
public:
|
||||
midi_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
virtual ~midi_port_device();
|
||||
|
||||
// static configuration helpers
|
||||
template<class _Object> static devcb2_base &set_rx_handler(device_t &device, _Object object) { return downcast<midi_port_device &>(device).m_rxd_handler.set_callback(object); }
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER( write_txd );
|
||||
|
||||
DECLARE_READ_LINE_MEMBER( rx_r ) { return m_rxd; }
|
||||
|
||||
protected:
|
||||
virtual void device_start();
|
||||
virtual void device_config_complete();
|
||||
|
||||
int m_rxd;
|
||||
|
||||
devcb2_write_line m_rxd_handler;
|
||||
|
||||
private:
|
||||
device_midi_port_interface *m_dev;
|
||||
};
|
||||
|
||||
class device_midi_port_interface : public device_slot_card_interface
|
||||
{
|
||||
friend class midi_port_device;
|
||||
|
||||
public:
|
||||
device_midi_port_interface(const machine_config &mconfig, device_t &device);
|
||||
virtual ~device_midi_port_interface();
|
||||
|
||||
virtual DECLARE_WRITE_LINE_MEMBER( input_txd ) {}
|
||||
DECLARE_WRITE_LINE_MEMBER( output_rxd ) { m_port->m_rxd = state; m_port->m_rxd_handler(state); }
|
||||
|
||||
protected:
|
||||
midi_port_device *m_port;
|
||||
};
|
||||
|
||||
extern const device_type MIDI_PORT;
|
||||
|
||||
SLOT_INTERFACE_EXTERN( default_midi_devices );
|
||||
|
||||
#endif
|
@ -6,14 +6,14 @@
|
||||
|
||||
*********************************************************************/
|
||||
|
||||
#include "machine/midiinport.h"
|
||||
#include "midiinport.h"
|
||||
|
||||
const device_type MIDIIN_PORT = &device_creator<midiin_port_device>;
|
||||
|
||||
midiin_port_device::midiin_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: device_t(mconfig, MIDIIN_PORT, "MIDI In port", tag, owner, clock, "midiin_port", __FILE__),
|
||||
device_serial_port_interface(mconfig, *this),
|
||||
m_midiin(*this, "midiinimg")
|
||||
device_midi_port_interface(mconfig, *this),
|
||||
m_midiin(*this, "midiinimg")
|
||||
{
|
||||
}
|
||||
|
@ -2,33 +2,33 @@
|
||||
|
||||
midiinport.h
|
||||
|
||||
MIDI In serial port - glues the image device to the pluggable serial port
|
||||
MIDI In port - glues the image device to the pluggable midi port
|
||||
|
||||
*********************************************************************/
|
||||
|
||||
#ifndef _MIDIINPORT_H_
|
||||
#define _MIDIINPORT_H_
|
||||
|
||||
#include "emu.h"
|
||||
#include "machine/serial.h"
|
||||
#include "midi.h"
|
||||
#include "imagedev/midiin.h"
|
||||
|
||||
class midiin_port_device :
|
||||
public device_t,
|
||||
public device_serial_port_interface
|
||||
class midiin_port_device : public device_t,
|
||||
public device_midi_port_interface
|
||||
{
|
||||
public:
|
||||
midiin_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
virtual machine_config_constructor device_mconfig_additions() const;
|
||||
DECLARE_WRITE_LINE_MEMBER( read ) { m_owner->out_rx(state); }
|
||||
virtual void tx(UINT8 state) { }
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER( read ) { output_rxd(state); }
|
||||
|
||||
protected:
|
||||
virtual void device_start() { m_owner = dynamic_cast<serial_port_device *>(owner()); }
|
||||
virtual machine_config_constructor device_mconfig_additions() const;
|
||||
virtual void device_start() { m_owner = dynamic_cast<midi_port_device *>(owner()); }
|
||||
virtual void device_reset() { }
|
||||
|
||||
private:
|
||||
serial_port_device *m_owner;
|
||||
required_device<midiin_device> m_midiin;
|
||||
};
|
||||
|
||||
extern const device_type MIDIIN_PORT;
|
||||
|
||||
#endif
|
@ -6,14 +6,14 @@
|
||||
|
||||
*********************************************************************/
|
||||
|
||||
#include "machine/midioutport.h"
|
||||
#include "midioutport.h"
|
||||
|
||||
const device_type MIDIOUT_PORT = &device_creator<midiout_port_device>;
|
||||
|
||||
midiout_port_device::midiout_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: device_t(mconfig, MIDIOUT_PORT, "MIDI Out port", tag, owner, clock, "midiout_port", __FILE__),
|
||||
device_serial_port_interface(mconfig, *this),
|
||||
m_midiout(*this, "midioutimg")
|
||||
device_midi_port_interface(mconfig, *this),
|
||||
m_midiout(*this, "midioutimg")
|
||||
{
|
||||
}
|
||||
|
@ -2,33 +2,33 @@
|
||||
|
||||
midioutport.h
|
||||
|
||||
MIDI Out serial port - glues the image device to the pluggable serial port
|
||||
MIDI Out port - glues the image device to the pluggable midi port
|
||||
|
||||
*********************************************************************/
|
||||
|
||||
#ifndef _MIDIOUTPORT_H_
|
||||
#define _MIDIOUTPORT_H_
|
||||
|
||||
#include "emu.h"
|
||||
#include "machine/serial.h"
|
||||
#include "midi.h"
|
||||
#include "imagedev/midiout.h"
|
||||
|
||||
class midiout_port_device :
|
||||
public device_t,
|
||||
public device_serial_port_interface
|
||||
class midiout_port_device : public device_t,
|
||||
public device_midi_port_interface
|
||||
{
|
||||
public:
|
||||
midiout_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
virtual machine_config_constructor device_mconfig_additions() const;
|
||||
DECLARE_WRITE_LINE_MEMBER( read ) { }
|
||||
virtual void tx(UINT8 state) { m_midiout->tx(state); }
|
||||
|
||||
protected:
|
||||
virtual void device_start() { }
|
||||
virtual void device_reset() { }
|
||||
|
||||
private:
|
||||
//serial_port_device *m_owner;
|
||||
required_device<midiout_device> m_midiout;
|
||||
};
|
||||
|
||||
extern const device_type MIDIOUT_PORT;
|
||||
|
||||
#endif
|
@ -10,6 +10,8 @@
|
||||
**********************************************************************/
|
||||
|
||||
#include "superpet.h"
|
||||
#include "bus/rs232/rs232.h"
|
||||
#include "cpu/m6809/m6809.h"
|
||||
|
||||
|
||||
|
||||
@ -77,13 +79,13 @@ static MACHINE_CONFIG_FRAGMENT( superpet )
|
||||
|
||||
MCFG_DEVICE_ADD(MOS6551_TAG, MOS6551, XTAL_1_8432MHz)
|
||||
MCFG_MOS6551_IRQ_HANDLER(WRITELINE(superpet_device, acia_irq_w))
|
||||
MCFG_MOS6551_TXD_HANDLER(DEVWRITELINE(RS232_TAG, rs232_port_device, tx))
|
||||
MCFG_MOS6551_TXD_HANDLER(DEVWRITELINE(RS232_TAG, rs232_port_device, write_txd))
|
||||
|
||||
MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, NULL)
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE(MOS6551_TAG, mos6551_device, rxd_w))
|
||||
MCFG_RS232_OUT_DCD_HANDLER(DEVWRITELINE(MOS6551_TAG, mos6551_device, dcd_w))
|
||||
MCFG_RS232_OUT_DSR_HANDLER(DEVWRITELINE(MOS6551_TAG, mos6551_device, dsr_w))
|
||||
MCFG_RS232_OUT_CTS_HANDLER(DEVWRITELINE(MOS6551_TAG, mos6551_device, cts_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(MOS6551_TAG, mos6551_device, rxd_w))
|
||||
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(MOS6551_TAG, mos6551_device, dcd_w))
|
||||
MCFG_RS232_DSR_HANDLER(DEVWRITELINE(MOS6551_TAG, mos6551_device, dsr_w))
|
||||
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(MOS6551_TAG, mos6551_device, cts_w))
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
|
@ -14,12 +14,9 @@
|
||||
#ifndef __SUPERPET__
|
||||
#define __SUPERPET__
|
||||
|
||||
#include "emu.h"
|
||||
#include "exp.h"
|
||||
#include "cpu/m6809/m6809.h"
|
||||
#include "machine/mos6551.h"
|
||||
#include "machine/mos6702.h"
|
||||
#include "machine/serial.h"
|
||||
|
||||
|
||||
|
||||
|
184
src/emu/bus/rs232/keyboard.c
Normal file
184
src/emu/bus/rs232/keyboard.c
Normal file
@ -0,0 +1,184 @@
|
||||
/***************************************************************************
|
||||
Generic ASCII Keyboard
|
||||
|
||||
Use MCFG_SERIAL_KEYBOARD_ADD to attach this as a serial device to a terminal
|
||||
or computer.
|
||||
|
||||
Use MCFG_ASCII_KEYBOARD_ADD to attach as a generic ascii input device in
|
||||
cases where either the driver isn't developed enough yet; or for testing;
|
||||
or for the case of a computer with an inbuilt (not serial) ascii keyboard.
|
||||
|
||||
Example of usage in a driver.
|
||||
|
||||
In MACHINE_CONFIG
|
||||
MCFG_ASCII_KEYBOARD_ADD(KEYBOARD_TAG, keyboard_intf)
|
||||
|
||||
In the code:
|
||||
|
||||
WRITE8_MEMBER( xxx_state::kbd_put )
|
||||
{
|
||||
(code to capture the key as it is pressed)
|
||||
}
|
||||
|
||||
static ASCII_KEYBOARD_INTERFACE( keyboard_intf )
|
||||
{
|
||||
DEVCB_DRIVER_MEMBER(xxx_state, kbd_put)
|
||||
};
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "keyboard.h"
|
||||
|
||||
/***************************************************************************
|
||||
IMPLEMENTATION
|
||||
***************************************************************************/
|
||||
|
||||
static INPUT_PORTS_START(serial_keyboard)
|
||||
PORT_INCLUDE(generic_keyboard)
|
||||
PORT_START("TERM_FRAME")
|
||||
PORT_CONFNAME(0x0f, 0x06, "Baud") PORT_CHANGED_MEMBER(DEVICE_SELF, serial_keyboard_device, update_frame, 0)
|
||||
PORT_CONFSETTING( 0x0d, "110")
|
||||
PORT_CONFSETTING( 0x00, "150")
|
||||
PORT_CONFSETTING( 0x01, "300")
|
||||
PORT_CONFSETTING( 0x02, "600")
|
||||
PORT_CONFSETTING( 0x03, "1200")
|
||||
PORT_CONFSETTING( 0x04, "2400")
|
||||
PORT_CONFSETTING( 0x05, "4800")
|
||||
PORT_CONFSETTING( 0x06, "9600")
|
||||
PORT_CONFSETTING( 0x07, "14400")
|
||||
PORT_CONFSETTING( 0x08, "19200")
|
||||
PORT_CONFSETTING( 0x09, "28800")
|
||||
PORT_CONFSETTING( 0x0a, "38400")
|
||||
PORT_CONFSETTING( 0x0b, "57600")
|
||||
PORT_CONFSETTING( 0x0c, "115200")
|
||||
PORT_CONFNAME(0x30, 0x00, "Format") PORT_CHANGED_MEMBER(DEVICE_SELF, serial_keyboard_device, update_frame, 0)
|
||||
PORT_CONFSETTING( 0x00, "8N1")
|
||||
PORT_CONFSETTING( 0x10, "7E1")
|
||||
PORT_CONFSETTING( 0x20, "8N2")
|
||||
PORT_CONFSETTING( 0x30, "8E1")
|
||||
INPUT_PORTS_END
|
||||
|
||||
ioport_constructor serial_keyboard_device::device_input_ports() const
|
||||
{
|
||||
return INPUT_PORTS_NAME(serial_keyboard);
|
||||
}
|
||||
|
||||
serial_keyboard_device::serial_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: generic_keyboard_device(mconfig, SERIAL_KEYBOARD, "Serial Keyboard", tag, owner, clock, "serial_keyboard", __FILE__),
|
||||
device_serial_interface(mconfig, *this),
|
||||
device_rs232_port_interface(mconfig, *this),
|
||||
m_io_term_frame(*this, "TERM_FRAME")
|
||||
{
|
||||
}
|
||||
|
||||
serial_keyboard_device::serial_keyboard_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
|
||||
: generic_keyboard_device(mconfig, type, name, tag, owner, clock, shortname, source),
|
||||
device_serial_interface(mconfig, *this),
|
||||
device_rs232_port_interface(mconfig, *this),
|
||||
m_io_term_frame(*this, "TERM_FRAME")
|
||||
{
|
||||
}
|
||||
|
||||
void serial_keyboard_device::device_config_complete()
|
||||
{
|
||||
const serial_keyboard_interface *intf = reinterpret_cast<const serial_keyboard_interface *>(static_config());
|
||||
if(intf != NULL)
|
||||
{
|
||||
*static_cast<serial_keyboard_interface *>(this) = *intf;
|
||||
}
|
||||
else
|
||||
{
|
||||
memset(&m_out_tx_cb, 0, sizeof(m_out_tx_cb));
|
||||
}
|
||||
}
|
||||
|
||||
static int rates[] = {150, 300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 28800, 38400, 57600, 115200, 110};
|
||||
|
||||
void serial_keyboard_device::device_start()
|
||||
{
|
||||
int baud = clock();
|
||||
if(!baud) baud = 9600;
|
||||
m_out_tx_func.resolve(m_out_tx_cb, *this);
|
||||
m_timer = timer_alloc();
|
||||
set_data_frame(1, 8, PARITY_NONE, STOP_BITS_1);
|
||||
set_tra_rate(baud);
|
||||
}
|
||||
|
||||
INPUT_CHANGED_MEMBER(serial_keyboard_device::update_frame)
|
||||
{
|
||||
reset();
|
||||
}
|
||||
|
||||
void serial_keyboard_device::device_reset()
|
||||
{
|
||||
generic_keyboard_device::device_reset();
|
||||
m_rbit = 1;
|
||||
if (m_port)
|
||||
output_rxd(m_rbit);
|
||||
else
|
||||
m_out_tx_func(m_rbit);
|
||||
|
||||
UINT8 val = m_io_term_frame->read();
|
||||
set_tra_rate(rates[val & 0x0f]);
|
||||
|
||||
switch(val & 0x30)
|
||||
{
|
||||
case 0x10:
|
||||
set_data_frame(1, 7, PARITY_EVEN, STOP_BITS_1);
|
||||
break;
|
||||
case 0x00:
|
||||
default:
|
||||
set_data_frame(1, 8, PARITY_NONE, STOP_BITS_1);
|
||||
break;
|
||||
case 0x20:
|
||||
set_data_frame(1, 8, PARITY_NONE, STOP_BITS_2);
|
||||
break;
|
||||
case 0x30:
|
||||
set_data_frame(1, 8, PARITY_EVEN, STOP_BITS_1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void serial_keyboard_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
|
||||
{
|
||||
if (id)
|
||||
device_serial_interface::device_timer(timer, id, param, ptr);
|
||||
else
|
||||
generic_keyboard_device::device_timer(timer, id, param, ptr);
|
||||
}
|
||||
|
||||
void serial_keyboard_device::send_key(UINT8 code)
|
||||
{
|
||||
if(is_transmit_register_empty())
|
||||
{
|
||||
transmit_register_setup(code);
|
||||
return;
|
||||
}
|
||||
m_key_valid = true;
|
||||
m_curr_key = code;
|
||||
}
|
||||
|
||||
void serial_keyboard_device::tra_callback()
|
||||
{
|
||||
m_rbit = transmit_register_get_data_bit();
|
||||
if(m_port)
|
||||
output_rxd(m_rbit);
|
||||
else
|
||||
m_out_tx_func(m_rbit);
|
||||
}
|
||||
|
||||
void serial_keyboard_device::tra_complete()
|
||||
{
|
||||
if(m_key_valid)
|
||||
{
|
||||
transmit_register_setup(m_curr_key);
|
||||
m_key_valid = false;
|
||||
}
|
||||
}
|
||||
|
||||
READ_LINE_MEMBER(serial_keyboard_device::tx_r)
|
||||
{
|
||||
return m_rbit;
|
||||
}
|
||||
|
||||
const device_type SERIAL_KEYBOARD = &device_creator<serial_keyboard_device>;
|
64
src/emu/bus/rs232/keyboard.h
Normal file
64
src/emu/bus/rs232/keyboard.h
Normal file
@ -0,0 +1,64 @@
|
||||
#ifndef __RS232_KEYBOARD_H__
|
||||
#define __RS232_KEYBOARD_H__
|
||||
|
||||
#include "rs232.h"
|
||||
#include "machine/keyboard.h"
|
||||
|
||||
/***************************************************************************
|
||||
TYPE DEFINITIONS
|
||||
***************************************************************************/
|
||||
|
||||
struct serial_keyboard_interface
|
||||
{
|
||||
devcb_write_line m_out_tx_cb;
|
||||
};
|
||||
|
||||
/***************************************************************************
|
||||
DEVICE CONFIGURATION MACROS
|
||||
***************************************************************************/
|
||||
|
||||
#define MCFG_SERIAL_KEYBOARD_ADD(_tag, _intrf, _clock) \
|
||||
MCFG_DEVICE_ADD(_tag, SERIAL_KEYBOARD, _clock) \
|
||||
MCFG_DEVICE_CONFIG(_intrf)
|
||||
|
||||
/***************************************************************************
|
||||
FUNCTION PROTOTYPES
|
||||
***************************************************************************/
|
||||
|
||||
class serial_keyboard_device :
|
||||
public generic_keyboard_device,
|
||||
public device_serial_interface,
|
||||
public device_rs232_port_interface,
|
||||
public serial_keyboard_interface
|
||||
{
|
||||
public:
|
||||
serial_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
serial_keyboard_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
|
||||
|
||||
virtual DECLARE_WRITE_LINE_MEMBER( input_txd ) { device_serial_interface::rx_w(state); }
|
||||
DECLARE_READ_LINE_MEMBER(tx_r);
|
||||
|
||||
virtual ioport_constructor device_input_ports() const;
|
||||
|
||||
DECLARE_INPUT_CHANGED_MEMBER(update_frame);
|
||||
|
||||
protected:
|
||||
virtual void device_start();
|
||||
virtual void device_config_complete();
|
||||
virtual void device_reset();
|
||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
|
||||
virtual void tra_callback();
|
||||
virtual void tra_complete();
|
||||
virtual void input_callback(UINT8 state) { m_input_state = state; }
|
||||
virtual void send_key(UINT8 code);
|
||||
private:
|
||||
int m_rbit;
|
||||
UINT8 m_curr_key;
|
||||
bool m_key_valid;
|
||||
devcb_resolved_write_line m_out_tx_func;
|
||||
required_ioport m_io_term_frame;
|
||||
};
|
||||
|
||||
extern const device_type SERIAL_KEYBOARD;
|
||||
|
||||
#endif /* __RS232_KEYBOARD_H__ */
|
@ -1,11 +1,11 @@
|
||||
#include "machine/null_modem.h"
|
||||
#include "null_modem.h"
|
||||
|
||||
const device_type NULL_MODEM = &device_creator<null_modem_device>;
|
||||
|
||||
null_modem_device::null_modem_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: device_t(mconfig, NULL_MODEM, "Null Modem", tag, owner, clock, "null_modem", __FILE__),
|
||||
device_serial_port_interface(mconfig, *this),
|
||||
m_bitbanger(*this, "bitbanger")
|
||||
device_rs232_port_interface(mconfig, *this),
|
||||
m_bitbanger(*this, "bitbanger")
|
||||
{
|
||||
}
|
||||
|
27
src/emu/bus/rs232/null_modem.h
Normal file
27
src/emu/bus/rs232/null_modem.h
Normal file
@ -0,0 +1,27 @@
|
||||
#ifndef NULL_MODEM_H_
|
||||
#define NULL_MODEM_H_
|
||||
|
||||
#include "bus/rs232/rs232.h"
|
||||
#include "imagedev/bitbngr.h"
|
||||
|
||||
class null_modem_device : public device_t,
|
||||
public device_rs232_port_interface
|
||||
{
|
||||
public:
|
||||
null_modem_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
virtual machine_config_constructor device_mconfig_additions() const;
|
||||
|
||||
WRITE_LINE_MEMBER( read ) { output_rxd(state); } /// HACK for DEVCB
|
||||
virtual WRITE_LINE_MEMBER( input_txd ) { m_bitbanger->output(state); }
|
||||
|
||||
protected:
|
||||
virtual void device_start() {}
|
||||
virtual void device_reset() { output_rxd(1); }
|
||||
|
||||
private:
|
||||
required_device<bitbanger_device> m_bitbanger;
|
||||
};
|
||||
|
||||
extern const device_type NULL_MODEM;
|
||||
|
||||
#endif
|
99
src/emu/bus/rs232/rs232.c
Normal file
99
src/emu/bus/rs232/rs232.c
Normal file
@ -0,0 +1,99 @@
|
||||
#include "rs232.h"
|
||||
|
||||
const device_type RS232_PORT = &device_creator<rs232_port_device>;
|
||||
|
||||
rs232_port_device::rs232_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, RS232_PORT, "RS232 Port", tag, owner, clock, "rs232", __FILE__),
|
||||
device_slot_interface(mconfig, *this),
|
||||
m_rxd_handler(*this),
|
||||
m_dcd_handler(*this),
|
||||
m_dsr_handler(*this),
|
||||
m_ri_handler(*this),
|
||||
m_cts_handler(*this),
|
||||
m_dev(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
rs232_port_device::rs232_port_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
|
||||
: device_t(mconfig, type, name, tag, owner, clock, shortname, source),
|
||||
device_slot_interface(mconfig, *this),
|
||||
m_rxd_handler(*this),
|
||||
m_dcd_handler(*this),
|
||||
m_dsr_handler(*this),
|
||||
m_ri_handler(*this),
|
||||
m_cts_handler(*this),
|
||||
m_dev(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
rs232_port_device::~rs232_port_device()
|
||||
{
|
||||
}
|
||||
|
||||
void rs232_port_device::device_config_complete()
|
||||
{
|
||||
m_dev = dynamic_cast<device_rs232_port_interface *>(get_card_device());
|
||||
}
|
||||
|
||||
void rs232_port_device::device_start()
|
||||
{
|
||||
m_rxd_handler.resolve_safe();
|
||||
m_dcd_handler.resolve_safe();
|
||||
m_dsr_handler.resolve_safe();
|
||||
m_ri_handler.resolve_safe();
|
||||
m_cts_handler.resolve_safe();
|
||||
|
||||
save_item(NAME(m_rxd));
|
||||
save_item(NAME(m_dcd));
|
||||
save_item(NAME(m_dsr));
|
||||
save_item(NAME(m_ri));
|
||||
save_item(NAME(m_cts));
|
||||
|
||||
m_rxd = 1;
|
||||
m_dcd = 0;
|
||||
m_dsr = 0;
|
||||
m_ri = 0;
|
||||
m_cts = 0;
|
||||
|
||||
m_rxd_handler(1);
|
||||
m_dcd_handler(0);
|
||||
m_dsr_handler(0);
|
||||
m_ri_handler(0);
|
||||
m_cts_handler(0);
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER( rs232_port_device::write_txd )
|
||||
{
|
||||
if(m_dev)
|
||||
m_dev->input_txd(state);
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER( rs232_port_device::write_dtr )
|
||||
{
|
||||
if(m_dev)
|
||||
m_dev->input_dtr(state);
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER( rs232_port_device::write_rts )
|
||||
{
|
||||
if(m_dev)
|
||||
return m_dev->input_rts(state);
|
||||
}
|
||||
|
||||
#include "null_modem.h"
|
||||
#include "terminal.h"
|
||||
|
||||
device_rs232_port_interface::device_rs232_port_interface(const machine_config &mconfig, device_t &device)
|
||||
: device_slot_card_interface(mconfig, device)
|
||||
{
|
||||
m_port = dynamic_cast<rs232_port_device *>(device.owner());
|
||||
}
|
||||
|
||||
device_rs232_port_interface::~device_rs232_port_interface()
|
||||
{
|
||||
}
|
||||
|
||||
SLOT_INTERFACE_START( default_rs232_devices )
|
||||
SLOT_INTERFACE("serial_terminal", SERIAL_TERMINAL)
|
||||
SLOT_INTERFACE("null_modem", NULL_MODEM)
|
||||
SLOT_INTERFACE_END
|
100
src/emu/bus/rs232/rs232.h
Normal file
100
src/emu/bus/rs232/rs232.h
Normal file
@ -0,0 +1,100 @@
|
||||
#ifndef __BUS_RS232_H__
|
||||
#define __BUS_RS232_H__
|
||||
|
||||
#include "emu.h"
|
||||
|
||||
#define MCFG_RS232_PORT_ADD(_tag, _slot_intf, _def_slot) \
|
||||
MCFG_DEVICE_ADD(_tag, RS232_PORT, 0) \
|
||||
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
|
||||
|
||||
#define MCFG_RS232_RXD_HANDLER(_devcb) \
|
||||
devcb = &rs232_port_device::set_rx_handler(*device, DEVCB2_##_devcb);
|
||||
|
||||
#define MCFG_RS232_DCD_HANDLER(_devcb) \
|
||||
devcb = &rs232_port_device::set_dcd_handler(*device, DEVCB2_##_devcb);
|
||||
|
||||
#define MCFG_RS232_DSR_HANDLER(_devcb) \
|
||||
devcb = &rs232_port_device::set_dsr_handler(*device, DEVCB2_##_devcb);
|
||||
|
||||
#define MCFG_RS232_RI_HANDLER(_devcb) \
|
||||
devcb = &rs232_port_device::set_ri_handler(*device, DEVCB2_##_devcb);
|
||||
|
||||
#define MCFG_RS232_CTS_HANDLER(_devcb) \
|
||||
devcb = &rs232_port_device::set_cts_handler(*device, DEVCB2_##_devcb);
|
||||
|
||||
class device_rs232_port_interface;
|
||||
|
||||
class rs232_port_device : public device_t,
|
||||
public device_slot_interface
|
||||
{
|
||||
friend class device_rs232_port_interface;
|
||||
|
||||
public:
|
||||
rs232_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
rs232_port_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
|
||||
virtual ~rs232_port_device();
|
||||
|
||||
// static configuration helpers
|
||||
template<class _Object> static devcb2_base &set_rx_handler(device_t &device, _Object object) { return downcast<rs232_port_device &>(device).m_rxd_handler.set_callback(object); }
|
||||
template<class _Object> static devcb2_base &set_dcd_handler(device_t &device, _Object object) { return downcast<rs232_port_device &>(device).m_dcd_handler.set_callback(object); }
|
||||
template<class _Object> static devcb2_base &set_dsr_handler(device_t &device, _Object object) { return downcast<rs232_port_device &>(device).m_dsr_handler.set_callback(object); }
|
||||
template<class _Object> static devcb2_base &set_ri_handler(device_t &device, _Object object) { return downcast<rs232_port_device &>(device).m_ri_handler.set_callback(object); }
|
||||
template<class _Object> static devcb2_base &set_cts_handler(device_t &device, _Object object) { return downcast<rs232_port_device &>(device).m_cts_handler.set_callback(object); }
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER( write_txd );
|
||||
DECLARE_WRITE_LINE_MEMBER( write_dtr );
|
||||
DECLARE_WRITE_LINE_MEMBER( write_rts );
|
||||
|
||||
DECLARE_READ_LINE_MEMBER( rxd_r ) { return m_rxd; }
|
||||
DECLARE_READ_LINE_MEMBER( dcd_r ) { return m_dcd; }
|
||||
DECLARE_READ_LINE_MEMBER( dsr_r ) { return m_dsr; }
|
||||
DECLARE_READ_LINE_MEMBER( ri_r ) { return m_ri; }
|
||||
DECLARE_READ_LINE_MEMBER( cts_r ) { return m_cts; }
|
||||
|
||||
protected:
|
||||
virtual void device_start();
|
||||
virtual void device_config_complete();
|
||||
|
||||
int m_rxd;
|
||||
int m_dcd;
|
||||
int m_dsr;
|
||||
int m_ri;
|
||||
int m_cts;
|
||||
|
||||
devcb2_write_line m_rxd_handler;
|
||||
devcb2_write_line m_dcd_handler;
|
||||
devcb2_write_line m_dsr_handler;
|
||||
devcb2_write_line m_ri_handler;
|
||||
devcb2_write_line m_cts_handler;
|
||||
|
||||
private:
|
||||
device_rs232_port_interface *m_dev;
|
||||
};
|
||||
|
||||
class device_rs232_port_interface: public device_slot_card_interface
|
||||
{
|
||||
friend class rs232_port_device;
|
||||
|
||||
public:
|
||||
device_rs232_port_interface(const machine_config &mconfig, device_t &device);
|
||||
virtual ~device_rs232_port_interface();
|
||||
|
||||
virtual DECLARE_WRITE_LINE_MEMBER( input_txd ) {}
|
||||
virtual DECLARE_WRITE_LINE_MEMBER( input_dtr ) {}
|
||||
virtual DECLARE_WRITE_LINE_MEMBER( input_rts ) {}
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER( output_rxd ) { m_port->m_rxd = state; m_port->m_rxd_handler(state); }
|
||||
DECLARE_WRITE_LINE_MEMBER( output_dcd ) { m_port->m_dcd = state; m_port->m_dcd_handler(state); }
|
||||
DECLARE_WRITE_LINE_MEMBER( output_dsr ) { m_port->m_dsr = state; m_port->m_dsr_handler(state); }
|
||||
DECLARE_WRITE_LINE_MEMBER( output_ri ) { m_port->m_ri = state; m_port->m_ri_handler(state); }
|
||||
DECLARE_WRITE_LINE_MEMBER( output_cts ) { m_port->m_cts = state; m_port->m_cts_handler(state); }
|
||||
|
||||
protected:
|
||||
rs232_port_device *m_port;
|
||||
};
|
||||
|
||||
extern const device_type RS232_PORT;
|
||||
|
||||
SLOT_INTERFACE_EXTERN( default_rs232_devices );
|
||||
|
||||
#endif
|
@ -6,27 +6,28 @@
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "machine/ser_mouse.h"
|
||||
#include "ser_mouse.h"
|
||||
|
||||
|
||||
const device_type MSFT_SERIAL_MOUSE = &device_creator<microsoft_mouse_device>;
|
||||
const device_type MSYSTEM_SERIAL_MOUSE = &device_creator<mouse_systems_mouse_device>;
|
||||
|
||||
serial_mouse_device::serial_mouse_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
|
||||
: device_t(mconfig, type, name, tag, owner, clock, shortname, source),
|
||||
device_rs232_port_interface(mconfig, *this),
|
||||
device_serial_interface(mconfig, *this),
|
||||
m_x(*this, "ser_mouse_x"),
|
||||
m_y(*this, "ser_mouse_y"),
|
||||
m_btn(*this, "ser_mouse_btn")
|
||||
device_rs232_port_interface(mconfig, *this),
|
||||
device_serial_interface(mconfig, *this),
|
||||
m_x(*this, "ser_mouse_x"),
|
||||
m_y(*this, "ser_mouse_y"),
|
||||
m_btn(*this, "ser_mouse_btn")
|
||||
{
|
||||
}
|
||||
|
||||
const device_type MSFT_SERIAL_MOUSE = &device_creator<microsoft_mouse_device>;
|
||||
|
||||
microsoft_mouse_device::microsoft_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: serial_mouse_device(mconfig, MSFT_SERIAL_MOUSE, "Microsoft Serial Mouse", tag, owner, clock, "microsoft_mouse", __FILE__)
|
||||
{
|
||||
}
|
||||
|
||||
const device_type MSYSTEM_SERIAL_MOUSE = &device_creator<mouse_systems_mouse_device>;
|
||||
|
||||
mouse_systems_mouse_device::mouse_systems_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: serial_mouse_device(mconfig, MSYSTEM_SERIAL_MOUSE, "Mouse Systems Serial Mouse", tag, owner, clock, "mouse_systems_mouse", __FILE__)
|
||||
{
|
||||
@ -34,7 +35,6 @@ mouse_systems_mouse_device::mouse_systems_mouse_device(const machine_config &mco
|
||||
|
||||
void serial_mouse_device::device_start()
|
||||
{
|
||||
m_owner = dynamic_cast<rs232_port_device *>(owner());
|
||||
m_timer = timer_alloc();
|
||||
m_enabled = false;
|
||||
set_frame();
|
||||
@ -44,15 +44,11 @@ void serial_mouse_device::device_start()
|
||||
void serial_mouse_device::device_reset()
|
||||
{
|
||||
m_head = m_tail = 0;
|
||||
tx(0);
|
||||
m_dcd = 0;
|
||||
m_owner->out_dcd(0);
|
||||
m_dsr = 0;
|
||||
m_owner->out_dsr(0);
|
||||
m_ri = 0;
|
||||
m_owner->out_ri(0);
|
||||
m_cts = 0;
|
||||
m_owner->out_cts(0);
|
||||
output_rxd(0);
|
||||
output_dcd(0);
|
||||
output_dsr(0);
|
||||
output_ri(0);
|
||||
output_cts(0);
|
||||
}
|
||||
|
||||
void serial_mouse_device::tra_complete()
|
||||
@ -63,8 +59,7 @@ void serial_mouse_device::tra_complete()
|
||||
|
||||
void serial_mouse_device::tra_callback()
|
||||
{
|
||||
m_rbit = transmit_register_get_data_bit();
|
||||
m_owner->out_rx(m_rbit);
|
||||
output_rxd(transmit_register_get_data_bit());
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
@ -196,15 +191,13 @@ void serial_mouse_device::set_mouse_enable(bool state)
|
||||
if(state && !m_enabled)
|
||||
{
|
||||
m_timer->adjust(attotime::zero, 0, attotime::from_hz(240));
|
||||
m_rbit = 1;
|
||||
m_owner->out_rx(1);
|
||||
output_rxd(1);
|
||||
}
|
||||
else if(!state && m_enabled)
|
||||
{
|
||||
m_timer->adjust(attotime::never);
|
||||
m_head = m_tail = 0;
|
||||
m_rbit = 0;
|
||||
m_owner->out_rx(0);
|
||||
output_rxd(0);
|
||||
}
|
||||
m_enabled = state;
|
||||
|
@ -7,8 +7,7 @@
|
||||
#ifndef SER_MOUSE_H_
|
||||
#define SER_MOUSE_H_
|
||||
|
||||
#include "emu.h"
|
||||
#include "machine/serial.h"
|
||||
#include "rs232.h"
|
||||
|
||||
class serial_mouse_device :
|
||||
public device_t,
|
||||
@ -37,7 +36,6 @@ private:
|
||||
UINT8 m_head, m_tail, m_mb;
|
||||
|
||||
emu_timer *m_timer;
|
||||
rs232_port_device *m_owner;
|
||||
bool m_enabled;
|
||||
|
||||
required_ioport m_x;
|
||||
@ -49,29 +47,38 @@ class microsoft_mouse_device : public serial_mouse_device
|
||||
{
|
||||
public:
|
||||
microsoft_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
virtual void dtr_w(UINT8 state) { m_dtr = state; check_state(); }
|
||||
virtual void rts_w(UINT8 state) { m_rts = state; check_state(); m_old_rts = state; }
|
||||
virtual DECLARE_WRITE_LINE_MEMBER( input_dtr ) { m_dtr = state; check_state(); }
|
||||
virtual DECLARE_WRITE_LINE_MEMBER( input_rts ) { m_rts = state; check_state(); m_old_rts = state; }
|
||||
|
||||
protected:
|
||||
virtual void set_frame() { set_data_frame(1, 7, PARITY_NONE, STOP_BITS_2); }
|
||||
virtual void mouse_trans(int dx, int dy, int nb, int mbc);
|
||||
virtual void device_reset() {m_old_rts = 0; serial_mouse_device::device_reset();}
|
||||
|
||||
private:
|
||||
void check_state();
|
||||
UINT8 m_old_rts;
|
||||
int m_dtr;
|
||||
int m_rts;
|
||||
int m_old_rts;
|
||||
};
|
||||
|
||||
extern const device_type MSFT_SERIAL_MOUSE;
|
||||
|
||||
class mouse_systems_mouse_device : public serial_mouse_device
|
||||
{
|
||||
public:
|
||||
mouse_systems_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
virtual void dtr_w(UINT8 state) { m_dtr = state; check_state(); }
|
||||
virtual void rts_w(UINT8 state) { m_rts = state; check_state(); }
|
||||
virtual DECLARE_WRITE_LINE_MEMBER( input_dtr ) { m_dtr = state; check_state(); }
|
||||
virtual DECLARE_WRITE_LINE_MEMBER( input_rts ) { m_rts = state; check_state(); }
|
||||
|
||||
protected:
|
||||
virtual void set_frame() { set_data_frame(1, 8, PARITY_NONE, STOP_BITS_2); }
|
||||
virtual void mouse_trans(int dx, int dy, int nb, int mbc);
|
||||
|
||||
private:
|
||||
void check_state() { set_mouse_enable((m_dtr && m_rts)?true:false); }
|
||||
int m_dtr;
|
||||
int m_rts;
|
||||
};
|
||||
|
||||
extern const device_type MSYSTEM_SERIAL_MOUSE;
|
157
src/emu/bus/rs232/terminal.c
Normal file
157
src/emu/bus/rs232/terminal.c
Normal file
@ -0,0 +1,157 @@
|
||||
#include "terminal.h"
|
||||
|
||||
static INPUT_PORTS_START(serial_terminal)
|
||||
PORT_INCLUDE(generic_terminal)
|
||||
PORT_START("TERM_TXBAUD")
|
||||
PORT_CONFNAME(0xff, 0x06, "TX Baud") PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, serial_terminal_device, update_serial)
|
||||
PORT_CONFSETTING( 0x0d, "110")
|
||||
PORT_CONFSETTING( 0x00, "150")
|
||||
PORT_CONFSETTING( 0x01, "300")
|
||||
PORT_CONFSETTING( 0x02, "600")
|
||||
PORT_CONFSETTING( 0x03, "1200")
|
||||
PORT_CONFSETTING( 0x04, "2400")
|
||||
PORT_CONFSETTING( 0x05, "4800")
|
||||
PORT_CONFSETTING( 0x06, "9600")
|
||||
PORT_CONFSETTING( 0x07, "14400")
|
||||
PORT_CONFSETTING( 0x08, "19200")
|
||||
PORT_CONFSETTING( 0x09, "28800")
|
||||
PORT_CONFSETTING( 0x0a, "38400")
|
||||
PORT_CONFSETTING( 0x0b, "57600")
|
||||
PORT_CONFSETTING( 0x0c, "115200")
|
||||
|
||||
PORT_START("TERM_RXBAUD")
|
||||
PORT_CONFNAME(0xff, 0x06, "RX Baud") PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, serial_terminal_device, update_serial)
|
||||
PORT_CONFSETTING( 0x0d, "110")
|
||||
PORT_CONFSETTING( 0x00, "150")
|
||||
PORT_CONFSETTING( 0x01, "300")
|
||||
PORT_CONFSETTING( 0x02, "600")
|
||||
PORT_CONFSETTING( 0x03, "1200")
|
||||
PORT_CONFSETTING( 0x04, "2400")
|
||||
PORT_CONFSETTING( 0x05, "4800")
|
||||
PORT_CONFSETTING( 0x06, "9600")
|
||||
PORT_CONFSETTING( 0x07, "14400")
|
||||
PORT_CONFSETTING( 0x08, "19200")
|
||||
PORT_CONFSETTING( 0x09, "28800")
|
||||
PORT_CONFSETTING( 0x0a, "38400")
|
||||
PORT_CONFSETTING( 0x0b, "57600")
|
||||
PORT_CONFSETTING( 0x0c, "115200")
|
||||
|
||||
PORT_START("TERM_STARTBITS")
|
||||
PORT_CONFNAME(0xff, 0x01, "Start Bits") PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, serial_terminal_device, update_serial)
|
||||
PORT_CONFSETTING( 0x00, "0")
|
||||
PORT_CONFSETTING( 0x01, "1")
|
||||
|
||||
PORT_START("TERM_DATABITS")
|
||||
PORT_CONFNAME(0xff, 0x03, "Data Bits") PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, serial_terminal_device, update_serial)
|
||||
PORT_CONFSETTING( 0x00, "5")
|
||||
PORT_CONFSETTING( 0x01, "6")
|
||||
PORT_CONFSETTING( 0x02, "7")
|
||||
PORT_CONFSETTING( 0x03, "8")
|
||||
PORT_CONFSETTING( 0x04, "9")
|
||||
|
||||
PORT_START("TERM_PARITY")
|
||||
PORT_CONFNAME(0xff, 0x00, "Parity") PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, serial_terminal_device, update_serial)
|
||||
PORT_CONFSETTING( 0x00, "None")
|
||||
PORT_CONFSETTING( 0x01, "Odd")
|
||||
PORT_CONFSETTING( 0x02, "Even")
|
||||
PORT_CONFSETTING( 0x03, "Mark")
|
||||
PORT_CONFSETTING( 0x04, "Space")
|
||||
|
||||
PORT_START("TERM_STOPBITS")
|
||||
PORT_CONFNAME(0xff, 0x01, "Stop Bits") PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, serial_terminal_device, update_serial)
|
||||
PORT_CONFSETTING( 0x00, "0")
|
||||
PORT_CONFSETTING( 0x01, "1")
|
||||
PORT_CONFSETTING( 0x02, "1.5")
|
||||
PORT_CONFSETTING( 0x03, "2")
|
||||
INPUT_PORTS_END
|
||||
|
||||
ioport_constructor serial_terminal_device::device_input_ports() const
|
||||
{
|
||||
return INPUT_PORTS_NAME(serial_terminal);
|
||||
}
|
||||
|
||||
serial_terminal_device::serial_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: generic_terminal_device(mconfig, SERIAL_TERMINAL, "Serial Terminal", tag, owner, clock, "serial_terminal", __FILE__),
|
||||
device_serial_interface(mconfig, *this),
|
||||
device_rs232_port_interface(mconfig, *this),
|
||||
m_io_term_txbaud(*this, "TERM_TXBAUD"),
|
||||
m_io_term_rxbaud(*this, "TERM_RXBAUD"),
|
||||
m_io_term_startbits(*this, "TERM_STARTBITS"),
|
||||
m_io_term_databits(*this, "TERM_DATABITS"),
|
||||
m_io_term_parity(*this, "TERM_PARITY"),
|
||||
m_io_term_stopbits(*this, "TERM_STOPBITS")
|
||||
{
|
||||
}
|
||||
|
||||
void serial_terminal_device::device_start()
|
||||
{
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER(serial_terminal_device::update_serial)
|
||||
{
|
||||
static const int m_baud[] = {150, 300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 28800, 38400, 57600, 115200, 110};
|
||||
static const int m_startbits[] = {0, 1};
|
||||
static const int m_databits[] = {5, 6, 7, 8, 9};
|
||||
static const parity_t m_parity[] = {PARITY_NONE, PARITY_ODD, PARITY_EVEN, PARITY_MARK, PARITY_SPACE};
|
||||
static const stop_bits_t m_stopbits[] = {STOP_BITS_0, STOP_BITS_1, STOP_BITS_1_5, STOP_BITS_2};
|
||||
|
||||
UINT8 startbits = m_io_term_startbits->read();
|
||||
UINT8 databits = m_io_term_databits->read();
|
||||
UINT8 parity = m_io_term_parity->read();
|
||||
UINT8 stopbits = m_io_term_stopbits->read();
|
||||
|
||||
set_data_frame(m_startbits[startbits], m_databits[databits], m_parity[parity], m_stopbits[stopbits]);
|
||||
|
||||
UINT8 txbaud = m_io_term_txbaud->read();
|
||||
set_tra_rate(m_baud[txbaud]);
|
||||
|
||||
UINT8 rxbaud = m_io_term_rxbaud->read();
|
||||
set_rcv_rate(m_baud[rxbaud]);
|
||||
}
|
||||
|
||||
void serial_terminal_device::device_reset()
|
||||
{
|
||||
generic_terminal_device::device_reset();
|
||||
|
||||
output_rxd(1);
|
||||
|
||||
update_serial(0);
|
||||
}
|
||||
|
||||
void serial_terminal_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
|
||||
{
|
||||
device_serial_interface::device_timer(timer, id, param, ptr);
|
||||
}
|
||||
|
||||
void serial_terminal_device::send_key(UINT8 code)
|
||||
{
|
||||
if(is_transmit_register_empty())
|
||||
{
|
||||
transmit_register_setup(code);
|
||||
return;
|
||||
}
|
||||
m_key_valid = true;
|
||||
m_curr_key = code;
|
||||
}
|
||||
|
||||
void serial_terminal_device::tra_callback()
|
||||
{
|
||||
output_rxd(transmit_register_get_data_bit());
|
||||
}
|
||||
|
||||
void serial_terminal_device::tra_complete()
|
||||
{
|
||||
if(m_key_valid)
|
||||
{
|
||||
transmit_register_setup(m_curr_key);
|
||||
m_key_valid = false;
|
||||
}
|
||||
}
|
||||
|
||||
void serial_terminal_device::rcv_complete()
|
||||
{
|
||||
receive_register_extract();
|
||||
term_write(get_received_char());
|
||||
}
|
||||
|
||||
const device_type SERIAL_TERMINAL = &device_creator<serial_terminal_device>;
|
45
src/emu/bus/rs232/terminal.h
Normal file
45
src/emu/bus/rs232/terminal.h
Normal file
@ -0,0 +1,45 @@
|
||||
#ifndef __RS232_TERMINAL_H__
|
||||
#define __RS232_TERMINAL_H__
|
||||
|
||||
#include "rs232.h"
|
||||
#include "machine/terminal.h"
|
||||
|
||||
|
||||
class serial_terminal_device : public generic_terminal_device,
|
||||
public device_serial_interface,
|
||||
public device_rs232_port_interface
|
||||
{
|
||||
public:
|
||||
serial_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
virtual DECLARE_WRITE_LINE_MEMBER( input_txd ) { device_serial_interface::rx_w(state); }
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(update_serial);
|
||||
|
||||
protected:
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
|
||||
virtual ioport_constructor device_input_ports() const;
|
||||
|
||||
virtual void tra_callback();
|
||||
virtual void tra_complete();
|
||||
virtual void rcv_complete();
|
||||
virtual void input_callback(UINT8 state) { m_input_state = state; }
|
||||
virtual void send_key(UINT8 code);
|
||||
|
||||
private:
|
||||
required_ioport m_io_term_txbaud;
|
||||
required_ioport m_io_term_rxbaud;
|
||||
required_ioport m_io_term_startbits;
|
||||
required_ioport m_io_term_databits;
|
||||
required_ioport m_io_term_parity;
|
||||
required_ioport m_io_term_stopbits;
|
||||
|
||||
UINT8 m_curr_key;
|
||||
bool m_key_valid;
|
||||
};
|
||||
|
||||
extern const device_type SERIAL_TERMINAL;
|
||||
|
||||
#endif /* __RS232_TERMINAL_H__ */
|
@ -10,6 +10,7 @@
|
||||
**********************************************************************/
|
||||
|
||||
#include "wunderbus.h"
|
||||
#include "bus/rs232/rs232.h"
|
||||
|
||||
|
||||
|
||||
@ -66,9 +67,9 @@ WRITE_LINE_MEMBER( s100_wunderbus_device::pic_int_w )
|
||||
|
||||
static ins8250_interface ace1_intf =
|
||||
{
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, serial_port_device, tx),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, rs232_port_device, dtr_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, rs232_port_device, rts_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, rs232_port_device, write_txd),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, rs232_port_device, write_dtr),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, rs232_port_device, write_rts),
|
||||
DEVCB_DEVICE_LINE_MEMBER(I8259A_TAG, pic8259_device, ir3_w),
|
||||
DEVCB_NULL,
|
||||
DEVCB_NULL
|
||||
@ -81,9 +82,9 @@ static ins8250_interface ace1_intf =
|
||||
|
||||
static ins8250_interface ace2_intf =
|
||||
{
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_B_TAG, serial_port_device, tx),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_B_TAG, rs232_port_device, dtr_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_B_TAG, rs232_port_device, rts_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_B_TAG, rs232_port_device, write_txd),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_B_TAG, rs232_port_device, write_dtr),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_B_TAG, rs232_port_device, write_rts),
|
||||
DEVCB_DEVICE_LINE_MEMBER(I8259A_TAG, pic8259_device, ir4_w),
|
||||
DEVCB_NULL,
|
||||
DEVCB_NULL
|
||||
@ -96,9 +97,9 @@ static ins8250_interface ace2_intf =
|
||||
|
||||
static ins8250_interface ace3_intf =
|
||||
{
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_C_TAG, serial_port_device, tx),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_C_TAG, rs232_port_device, dtr_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_C_TAG, rs232_port_device, rts_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_C_TAG, rs232_port_device, write_txd),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_C_TAG, rs232_port_device, write_dtr),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_C_TAG, rs232_port_device, write_rts),
|
||||
DEVCB_DEVICE_LINE_MEMBER(I8259A_TAG, pic8259_device, ir5_w),
|
||||
DEVCB_NULL,
|
||||
DEVCB_NULL
|
||||
@ -140,26 +141,26 @@ static MACHINE_CONFIG_FRAGMENT( s100_wunderbus )
|
||||
MCFG_INS8250_ADD(INS8250_3_TAG, ace3_intf, XTAL_18_432MHz/10)
|
||||
|
||||
MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, "serial_terminal")
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE(INS8250_1_TAG, ins8250_uart_device, rx_w))
|
||||
MCFG_RS232_OUT_DCD_HANDLER(DEVWRITELINE(INS8250_1_TAG, ins8250_uart_device, dcd_w))
|
||||
MCFG_RS232_OUT_DSR_HANDLER(DEVWRITELINE(INS8250_1_TAG, ins8250_uart_device, dsr_w))
|
||||
MCFG_RS232_OUT_RI_HANDLER(DEVWRITELINE(INS8250_1_TAG, ins8250_uart_device, ri_w))
|
||||
MCFG_RS232_OUT_CTS_HANDLER(DEVWRITELINE(INS8250_1_TAG, ins8250_uart_device, cts_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(INS8250_1_TAG, ins8250_uart_device, rx_w))
|
||||
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(INS8250_1_TAG, ins8250_uart_device, dcd_w))
|
||||
MCFG_RS232_DSR_HANDLER(DEVWRITELINE(INS8250_1_TAG, ins8250_uart_device, dsr_w))
|
||||
MCFG_RS232_RI_HANDLER(DEVWRITELINE(INS8250_1_TAG, ins8250_uart_device, ri_w))
|
||||
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(INS8250_1_TAG, ins8250_uart_device, cts_w))
|
||||
MCFG_DEVICE_CARD_DEVICE_INPUT_DEFAULTS("serial_terminal", terminal)
|
||||
|
||||
MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, NULL)
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE(INS8250_2_TAG, ins8250_uart_device, rx_w))
|
||||
MCFG_RS232_OUT_DCD_HANDLER(DEVWRITELINE(INS8250_2_TAG, ins8250_uart_device, dcd_w))
|
||||
MCFG_RS232_OUT_DSR_HANDLER(DEVWRITELINE(INS8250_2_TAG, ins8250_uart_device, dsr_w))
|
||||
MCFG_RS232_OUT_RI_HANDLER(DEVWRITELINE(INS8250_2_TAG, ins8250_uart_device, ri_w))
|
||||
MCFG_RS232_OUT_CTS_HANDLER(DEVWRITELINE(INS8250_2_TAG, ins8250_uart_device, cts_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(INS8250_2_TAG, ins8250_uart_device, rx_w))
|
||||
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(INS8250_2_TAG, ins8250_uart_device, dcd_w))
|
||||
MCFG_RS232_DSR_HANDLER(DEVWRITELINE(INS8250_2_TAG, ins8250_uart_device, dsr_w))
|
||||
MCFG_RS232_RI_HANDLER(DEVWRITELINE(INS8250_2_TAG, ins8250_uart_device, ri_w))
|
||||
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(INS8250_2_TAG, ins8250_uart_device, cts_w))
|
||||
|
||||
MCFG_RS232_PORT_ADD(RS232_C_TAG, default_rs232_devices, NULL)
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE(INS8250_3_TAG, ins8250_uart_device, rx_w))
|
||||
MCFG_RS232_OUT_DCD_HANDLER(DEVWRITELINE(INS8250_3_TAG, ins8250_uart_device, dcd_w))
|
||||
MCFG_RS232_OUT_DSR_HANDLER(DEVWRITELINE(INS8250_3_TAG, ins8250_uart_device, dsr_w))
|
||||
MCFG_RS232_OUT_RI_HANDLER(DEVWRITELINE(INS8250_3_TAG, ins8250_uart_device, ri_w))
|
||||
MCFG_RS232_OUT_CTS_HANDLER(DEVWRITELINE(INS8250_3_TAG, ins8250_uart_device, cts_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(INS8250_3_TAG, ins8250_uart_device, rx_w))
|
||||
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(INS8250_3_TAG, ins8250_uart_device, dcd_w))
|
||||
MCFG_RS232_DSR_HANDLER(DEVWRITELINE(INS8250_3_TAG, ins8250_uart_device, dsr_w))
|
||||
MCFG_RS232_RI_HANDLER(DEVWRITELINE(INS8250_3_TAG, ins8250_uart_device, ri_w))
|
||||
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(INS8250_3_TAG, ins8250_uart_device, cts_w))
|
||||
|
||||
MCFG_UPD1990A_ADD(UPD1990C_TAG, XTAL_32_768kHz, NULL, DEVWRITELINE(DEVICE_SELF, s100_wunderbus_device, rtc_tp_w))
|
||||
MACHINE_CONFIG_END
|
||||
|
@ -14,11 +14,9 @@
|
||||
#ifndef __S100_WUNDERBUS__
|
||||
#define __S100_WUNDERBUS__
|
||||
|
||||
#include "emu.h"
|
||||
#include "s100.h"
|
||||
#include "machine/ins8250.h"
|
||||
#include "machine/pic8259.h"
|
||||
#include "machine/serial.h"
|
||||
#include "machine/upd1990a.h"
|
||||
|
||||
|
||||
|
@ -34,10 +34,10 @@ const device_type VIC1011 = &device_creator<vic1011_device>;
|
||||
|
||||
static MACHINE_CONFIG_FRAGMENT( vic1011 )
|
||||
MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, NULL)
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE(DEVICE_SELF, vic1011_device, output_rxd))
|
||||
MCFG_RS232_OUT_DCD_HANDLER(DEVWRITELINE(DEVICE_SELF, vic1011_device, output_h))
|
||||
MCFG_RS232_OUT_CTS_HANDLER(DEVWRITELINE(DEVICE_SELF, vic1011_device, output_k))
|
||||
MCFG_RS232_OUT_DSR_HANDLER(DEVWRITELINE(DEVICE_SELF, vic1011_device, output_l))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(DEVICE_SELF, vic1011_device, output_rxd))
|
||||
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(DEVICE_SELF, vic1011_device, output_h))
|
||||
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(DEVICE_SELF, vic1011_device, output_k))
|
||||
MCFG_RS232_DSR_HANDLER(DEVWRITELINE(DEVICE_SELF, vic1011_device, output_l))
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
@ -85,12 +85,12 @@ WRITE_LINE_MEMBER( vic1011_device::output_rxd )
|
||||
|
||||
void vic1011_device::input_d(int state)
|
||||
{
|
||||
m_rs232->rts_w(state);
|
||||
m_rs232->write_rts(state);
|
||||
}
|
||||
|
||||
void vic1011_device::input_e(int state)
|
||||
{
|
||||
m_rs232->dtr_w(state);
|
||||
m_rs232->write_dtr(state);
|
||||
}
|
||||
|
||||
void vic1011_device::input_j(int state)
|
||||
@ -100,5 +100,5 @@ void vic1011_device::input_j(int state)
|
||||
|
||||
void vic1011_device::input_m(int state)
|
||||
{
|
||||
m_rs232->tx(!state);
|
||||
m_rs232->write_txd(!state);
|
||||
}
|
||||
|
@ -14,9 +14,8 @@
|
||||
#ifndef __VIC1011__
|
||||
#define __VIC1011__
|
||||
|
||||
#include "emu.h"
|
||||
#include "user.h"
|
||||
#include "machine/serial.h"
|
||||
#include "bus/rs232/rs232.h"
|
||||
|
||||
|
||||
|
||||
|
@ -35,6 +35,7 @@ OBJDIRS += \
|
||||
$(EMUOBJ)/bus/c64 \
|
||||
$(EMUOBJ)/bus/cbm2 \
|
||||
$(EMUOBJ)/bus/cbmiec \
|
||||
$(EMUOBJ)/bus/centronics \
|
||||
$(EMUOBJ)/bus/comx35 \
|
||||
$(EMUOBJ)/bus/ecbbus \
|
||||
$(EMUOBJ)/bus/econet \
|
||||
@ -42,9 +43,11 @@ OBJDIRS += \
|
||||
$(EMUOBJ)/bus/ieee488 \
|
||||
$(EMUOBJ)/bus/imi7000 \
|
||||
$(EMUOBJ)/bus/isbx \
|
||||
$(EMUOBJ)/bus/midi \
|
||||
$(EMUOBJ)/bus/pc_kbd \
|
||||
$(EMUOBJ)/bus/pet \
|
||||
$(EMUOBJ)/bus/plus4 \
|
||||
$(EMUOBJ)/bus/rs232 \
|
||||
$(EMUOBJ)/bus/s100 \
|
||||
$(EMUOBJ)/bus/vcs \
|
||||
$(EMUOBJ)/bus/vic10 \
|
||||
@ -54,7 +57,6 @@ OBJDIRS += \
|
||||
$(EMUOBJ)/bus/wangpc \
|
||||
$(EMUOBJ)/bus/a2bus \
|
||||
$(EMUOBJ)/bus/nubus \
|
||||
$(EMUOBJ)/bus/centronics \
|
||||
$(EMUOBJ)/bus/iq151 \
|
||||
$(EMUOBJ)/bus/kc \
|
||||
$(EMUOBJ)/bus/tvc \
|
||||
@ -190,12 +192,14 @@ EMUDRIVEROBJS = \
|
||||
EMUMACHINEOBJS = \
|
||||
$(EMUMACHINE)/bcreader.o \
|
||||
$(EMUMACHINE)/buffer.o \
|
||||
$(EMUMACHINE)/latch.o \
|
||||
$(EMUMACHINE)/generic.o \
|
||||
$(EMUMACHINE)/ram.o \
|
||||
$(EMUMACHINE)/nvram.o \
|
||||
$(EMUMACHINE)/keyboard.o \
|
||||
$(EMUMACHINE)/laserdsc.o \
|
||||
$(EMUMACHINE)/latch.o \
|
||||
$(EMUMACHINE)/netlist.o \
|
||||
$(EMUMACHINE)/nvram.o \
|
||||
$(EMUMACHINE)/ram.o \
|
||||
$(EMUMACHINE)/terminal.o \
|
||||
|
||||
EMUIMAGEDEVOBJS = \
|
||||
$(EMUIMAGEDEV)/bitbngr.o \
|
||||
|
@ -1,9 +1,6 @@
|
||||
/***************************************************************************
|
||||
Generic ASCII Keyboard
|
||||
|
||||
Use MCFG_SERIAL_KEYBOARD_ADD to attach this as a serial device to a terminal
|
||||
or computer.
|
||||
|
||||
Use MCFG_ASCII_KEYBOARD_ADD to attach as a generic ascii input device in
|
||||
cases where either the driver isn't developed enough yet; or for testing;
|
||||
or for the case of a computer with an inbuilt (not serial) ascii keyboard.
|
||||
@ -35,30 +32,30 @@ static ASCII_KEYBOARD_INTERFACE( keyboard_intf )
|
||||
|
||||
|
||||
generic_keyboard_device::generic_keyboard_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
|
||||
: device_t(mconfig, type, name, tag, owner, clock, shortname, source)
|
||||
, m_io_kbd0(*this, "TERM_LINE0")
|
||||
, m_io_kbd1(*this, "TERM_LINE1")
|
||||
, m_io_kbd2(*this, "TERM_LINE2")
|
||||
, m_io_kbd3(*this, "TERM_LINE3")
|
||||
, m_io_kbd4(*this, "TERM_LINE4")
|
||||
, m_io_kbd5(*this, "TERM_LINE5")
|
||||
, m_io_kbd6(*this, "TERM_LINE6")
|
||||
, m_io_kbd7(*this, "TERM_LINE7")
|
||||
, m_io_kbdc(*this, "TERM_LINEC")
|
||||
: device_t(mconfig, type, name, tag, owner, clock, shortname, source),
|
||||
m_io_kbd0(*this, "TERM_LINE0"),
|
||||
m_io_kbd1(*this, "TERM_LINE1"),
|
||||
m_io_kbd2(*this, "TERM_LINE2"),
|
||||
m_io_kbd3(*this, "TERM_LINE3"),
|
||||
m_io_kbd4(*this, "TERM_LINE4"),
|
||||
m_io_kbd5(*this, "TERM_LINE5"),
|
||||
m_io_kbd6(*this, "TERM_LINE6"),
|
||||
m_io_kbd7(*this, "TERM_LINE7"),
|
||||
m_io_kbdc(*this, "TERM_LINEC")
|
||||
{
|
||||
}
|
||||
|
||||
generic_keyboard_device::generic_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: device_t(mconfig, GENERIC_KEYBOARD, "Generic Keyboard", tag, owner, clock, "generic_keyboard", __FILE__)
|
||||
, m_io_kbd0(*this, "TERM_LINE0")
|
||||
, m_io_kbd1(*this, "TERM_LINE1")
|
||||
, m_io_kbd2(*this, "TERM_LINE2")
|
||||
, m_io_kbd3(*this, "TERM_LINE3")
|
||||
, m_io_kbd4(*this, "TERM_LINE4")
|
||||
, m_io_kbd5(*this, "TERM_LINE5")
|
||||
, m_io_kbd6(*this, "TERM_LINE6")
|
||||
, m_io_kbd7(*this, "TERM_LINE7")
|
||||
, m_io_kbdc(*this, "TERM_LINEC")
|
||||
: device_t(mconfig, GENERIC_KEYBOARD, "Generic Keyboard", tag, owner, clock, "generic_keyboard", __FILE__),
|
||||
m_io_kbd0(*this, "TERM_LINE0"),
|
||||
m_io_kbd1(*this, "TERM_LINE1"),
|
||||
m_io_kbd2(*this, "TERM_LINE2"),
|
||||
m_io_kbd3(*this, "TERM_LINE3"),
|
||||
m_io_kbd4(*this, "TERM_LINE4"),
|
||||
m_io_kbd5(*this, "TERM_LINE5"),
|
||||
m_io_kbd6(*this, "TERM_LINE6"),
|
||||
m_io_kbd7(*this, "TERM_LINE7"),
|
||||
m_io_kbdc(*this, "TERM_LINEC")
|
||||
{
|
||||
}
|
||||
|
||||
@ -207,7 +204,7 @@ MACHINE_CONFIG_END
|
||||
|
||||
machine_config_constructor generic_keyboard_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME(generic_keyboard);
|
||||
return MACHINE_CONFIG_NAME(generic_keyboard);
|
||||
}
|
||||
|
||||
void generic_keyboard_device::device_start()
|
||||
@ -273,7 +270,7 @@ Char Dec Oct Hex | Char Dec Oct Hex | Char Dec Oct Hex | Char Dec Oct
|
||||
(us) 31 0037 0x1f | ? 63 0077 0x3f | _ 95 0137 0x5f | (del) 127 0177 0x7f
|
||||
|
||||
*/
|
||||
static INPUT_PORTS_START( generic_keyboard )
|
||||
INPUT_PORTS_START( generic_keyboard )
|
||||
PORT_START("TERM_LINEC")
|
||||
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL)
|
||||
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1)
|
||||
@ -365,155 +362,3 @@ ioport_constructor generic_keyboard_device::device_input_ports() const
|
||||
}
|
||||
|
||||
const device_type GENERIC_KEYBOARD = &device_creator<generic_keyboard_device>;
|
||||
|
||||
static INPUT_PORTS_START(serial_keyboard)
|
||||
PORT_INCLUDE(generic_keyboard)
|
||||
PORT_START("TERM_FRAME")
|
||||
PORT_CONFNAME(0x0f, 0x06, "Baud") PORT_CHANGED_MEMBER(DEVICE_SELF, serial_keyboard_device, update_frame, 0)
|
||||
PORT_CONFSETTING( 0x0d, "110")
|
||||
PORT_CONFSETTING( 0x00, "150")
|
||||
PORT_CONFSETTING( 0x01, "300")
|
||||
PORT_CONFSETTING( 0x02, "600")
|
||||
PORT_CONFSETTING( 0x03, "1200")
|
||||
PORT_CONFSETTING( 0x04, "2400")
|
||||
PORT_CONFSETTING( 0x05, "4800")
|
||||
PORT_CONFSETTING( 0x06, "9600")
|
||||
PORT_CONFSETTING( 0x07, "14400")
|
||||
PORT_CONFSETTING( 0x08, "19200")
|
||||
PORT_CONFSETTING( 0x09, "28800")
|
||||
PORT_CONFSETTING( 0x0a, "38400")
|
||||
PORT_CONFSETTING( 0x0b, "57600")
|
||||
PORT_CONFSETTING( 0x0c, "115200")
|
||||
PORT_CONFNAME(0x30, 0x00, "Format") PORT_CHANGED_MEMBER(DEVICE_SELF, serial_keyboard_device, update_frame, 0)
|
||||
PORT_CONFSETTING( 0x00, "8N1")
|
||||
PORT_CONFSETTING( 0x10, "7E1")
|
||||
PORT_CONFSETTING( 0x20, "8N2")
|
||||
PORT_CONFSETTING( 0x30, "8E1")
|
||||
INPUT_PORTS_END
|
||||
|
||||
ioport_constructor serial_keyboard_device::device_input_ports() const
|
||||
{
|
||||
return INPUT_PORTS_NAME(serial_keyboard);
|
||||
}
|
||||
|
||||
serial_keyboard_device::serial_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: generic_keyboard_device(mconfig, SERIAL_KEYBOARD, "Serial Keyboard", tag, owner, clock, "serial_keyboard", __FILE__),
|
||||
device_serial_interface(mconfig, *this),
|
||||
device_serial_port_interface(mconfig, *this),
|
||||
m_io_term_frame(*this, "TERM_FRAME")
|
||||
{
|
||||
}
|
||||
|
||||
serial_keyboard_device::serial_keyboard_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
|
||||
: generic_keyboard_device(mconfig, type, name, tag, owner, clock, shortname, source),
|
||||
device_serial_interface(mconfig, *this),
|
||||
device_serial_port_interface(mconfig, *this),
|
||||
m_io_term_frame(*this, "TERM_FRAME")
|
||||
{
|
||||
}
|
||||
|
||||
void serial_keyboard_device::device_config_complete()
|
||||
{
|
||||
const serial_keyboard_interface *intf = reinterpret_cast<const serial_keyboard_interface *>(static_config());
|
||||
if(intf != NULL)
|
||||
{
|
||||
*static_cast<serial_keyboard_interface *>(this) = *intf;
|
||||
}
|
||||
else
|
||||
{
|
||||
memset(&m_out_tx_cb, 0, sizeof(m_out_tx_cb));
|
||||
}
|
||||
}
|
||||
|
||||
static int rates[] = {150, 300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 28800, 38400, 57600, 115200, 110};
|
||||
|
||||
void serial_keyboard_device::device_start()
|
||||
{
|
||||
int baud = clock();
|
||||
if(!baud) baud = 9600;
|
||||
m_owner = dynamic_cast<serial_port_device *>(owner());
|
||||
m_out_tx_func.resolve(m_out_tx_cb, *this);
|
||||
m_slot = m_owner && 1;
|
||||
m_timer = timer_alloc();
|
||||
set_data_frame(1, 8, PARITY_NONE, STOP_BITS_1);
|
||||
set_tra_rate(baud);
|
||||
}
|
||||
|
||||
INPUT_CHANGED_MEMBER(serial_keyboard_device::update_frame)
|
||||
{
|
||||
reset();
|
||||
}
|
||||
|
||||
void serial_keyboard_device::device_reset()
|
||||
{
|
||||
generic_keyboard_device::device_reset();
|
||||
m_rbit = 1;
|
||||
if(m_slot)
|
||||
m_owner->out_rx(m_rbit);
|
||||
else
|
||||
m_out_tx_func(m_rbit);
|
||||
|
||||
UINT8 val = m_io_term_frame->read();
|
||||
set_tra_rate(rates[val & 0x0f]);
|
||||
|
||||
switch(val & 0x30)
|
||||
{
|
||||
case 0x10:
|
||||
set_data_frame(1, 7, PARITY_EVEN, STOP_BITS_1);
|
||||
break;
|
||||
case 0x00:
|
||||
default:
|
||||
set_data_frame(1, 8, PARITY_NONE, STOP_BITS_1);
|
||||
break;
|
||||
case 0x20:
|
||||
set_data_frame(1, 8, PARITY_NONE, STOP_BITS_2);
|
||||
break;
|
||||
case 0x30:
|
||||
set_data_frame(1, 8, PARITY_EVEN, STOP_BITS_1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void serial_keyboard_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
|
||||
{
|
||||
if (id)
|
||||
device_serial_interface::device_timer(timer, id, param, ptr);
|
||||
else
|
||||
generic_keyboard_device::device_timer(timer, id, param, ptr);
|
||||
}
|
||||
|
||||
void serial_keyboard_device::send_key(UINT8 code)
|
||||
{
|
||||
if(is_transmit_register_empty())
|
||||
{
|
||||
transmit_register_setup(code);
|
||||
return;
|
||||
}
|
||||
m_key_valid = true;
|
||||
m_curr_key = code;
|
||||
}
|
||||
|
||||
void serial_keyboard_device::tra_callback()
|
||||
{
|
||||
m_rbit = transmit_register_get_data_bit();
|
||||
if(m_slot)
|
||||
m_owner->out_rx(m_rbit);
|
||||
else
|
||||
m_out_tx_func(m_rbit);
|
||||
}
|
||||
|
||||
void serial_keyboard_device::tra_complete()
|
||||
{
|
||||
if(m_key_valid)
|
||||
{
|
||||
transmit_register_setup(m_curr_key);
|
||||
m_key_valid = false;
|
||||
}
|
||||
}
|
||||
|
||||
READ_LINE_MEMBER(serial_keyboard_device::tx_r)
|
||||
{
|
||||
return m_rbit;
|
||||
}
|
||||
|
||||
const device_type SERIAL_KEYBOARD = &device_creator<serial_keyboard_device>;
|
@ -2,7 +2,6 @@
|
||||
#define __KEYBOARD_H__
|
||||
|
||||
#include "emu.h"
|
||||
#include "machine/serial.h"
|
||||
|
||||
/***************************************************************************
|
||||
TYPE DEFINITIONS
|
||||
@ -15,28 +14,20 @@ struct keyboard_interface
|
||||
|
||||
#define ASCII_KEYBOARD_INTERFACE(name) const keyboard_interface (name) =
|
||||
|
||||
struct serial_keyboard_interface
|
||||
{
|
||||
devcb_write_line m_out_tx_cb;
|
||||
};
|
||||
|
||||
/***************************************************************************
|
||||
DEVICE CONFIGURATION MACROS
|
||||
***************************************************************************/
|
||||
#define KEYBOARD_TAG "keyboard"
|
||||
|
||||
#define MCFG_ASCII_KEYBOARD_ADD(_tag, _intrf) \
|
||||
MCFG_DEVICE_ADD(_tag, GENERIC_KEYBOARD, 0) \
|
||||
MCFG_DEVICE_CONFIG(_intrf)
|
||||
|
||||
#define MCFG_SERIAL_KEYBOARD_ADD(_tag, _intrf, _clock) \
|
||||
MCFG_DEVICE_ADD(_tag, SERIAL_KEYBOARD, _clock) \
|
||||
MCFG_DEVICE_CONFIG(_intrf)
|
||||
|
||||
/***************************************************************************
|
||||
FUNCTION PROTOTYPES
|
||||
***************************************************************************/
|
||||
|
||||
INPUT_PORTS_EXTERN( generic_keyboard );
|
||||
|
||||
class generic_keyboard_device :
|
||||
public device_t,
|
||||
public keyboard_interface
|
||||
@ -75,39 +66,4 @@ private:
|
||||
|
||||
extern const device_type GENERIC_KEYBOARD;
|
||||
|
||||
class serial_keyboard_device :
|
||||
public generic_keyboard_device,
|
||||
public device_serial_interface,
|
||||
public device_serial_port_interface,
|
||||
public serial_keyboard_interface
|
||||
{
|
||||
public:
|
||||
serial_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
serial_keyboard_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(rx_w) { m_tbit = state; device_serial_interface::rx_w(state); }
|
||||
DECLARE_READ_LINE_MEMBER(tx_r);
|
||||
virtual ioport_constructor device_input_ports() const;
|
||||
|
||||
DECLARE_INPUT_CHANGED_MEMBER(update_frame);
|
||||
protected:
|
||||
virtual void device_start();
|
||||
virtual void device_config_complete();
|
||||
virtual void device_reset();
|
||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
|
||||
virtual void tra_callback();
|
||||
virtual void tra_complete();
|
||||
virtual void input_callback(UINT8 state) { m_input_state = state; }
|
||||
virtual void send_key(UINT8 code);
|
||||
private:
|
||||
serial_port_device *m_owner;
|
||||
bool m_slot;
|
||||
UINT8 m_curr_key;
|
||||
bool m_key_valid;
|
||||
devcb_resolved_write_line m_out_tx_func;
|
||||
required_ioport m_io_term_frame;
|
||||
};
|
||||
|
||||
extern const device_type SERIAL_KEYBOARD;
|
||||
|
||||
#endif /* __KEYBOARD_H__ */
|
@ -1,5 +1,7 @@
|
||||
#include "machine/terminal.h"
|
||||
|
||||
#define KEYBOARD_TAG "keyboard"
|
||||
|
||||
/***************************************************************************
|
||||
IMPLEMENTATION
|
||||
***************************************************************************/
|
||||
@ -384,7 +386,7 @@ Char Dec Oct Hex | Char Dec Oct Hex | Char Dec Oct Hex | Char Dec Oct
|
||||
(us) 31 0037 0x1f | ? 63 0077 0x3f | _ 95 0137 0x5f | (del) 127 0177 0x7f
|
||||
|
||||
*/
|
||||
static INPUT_PORTS_START( generic_terminal )
|
||||
INPUT_PORTS_START( generic_terminal )
|
||||
PORT_START("TERM_CONF")
|
||||
PORT_CONFNAME( 0x01, 0x01, "Cursor")
|
||||
PORT_CONFSETTING( 0x00, DEF_STR(No))
|
||||
@ -411,187 +413,3 @@ ioport_constructor generic_terminal_device::device_input_ports() const
|
||||
|
||||
const device_type GENERIC_TERMINAL = &device_creator<generic_terminal_device>;
|
||||
|
||||
static INPUT_PORTS_START(serial_terminal)
|
||||
PORT_INCLUDE(generic_terminal)
|
||||
PORT_START("TERM_TXBAUD")
|
||||
PORT_CONFNAME(0xff, 0x06, "TX Baud") PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, serial_terminal_device, update_serial)
|
||||
PORT_CONFSETTING( 0x0d, "110")
|
||||
PORT_CONFSETTING( 0x00, "150")
|
||||
PORT_CONFSETTING( 0x01, "300")
|
||||
PORT_CONFSETTING( 0x02, "600")
|
||||
PORT_CONFSETTING( 0x03, "1200")
|
||||
PORT_CONFSETTING( 0x04, "2400")
|
||||
PORT_CONFSETTING( 0x05, "4800")
|
||||
PORT_CONFSETTING( 0x06, "9600")
|
||||
PORT_CONFSETTING( 0x07, "14400")
|
||||
PORT_CONFSETTING( 0x08, "19200")
|
||||
PORT_CONFSETTING( 0x09, "28800")
|
||||
PORT_CONFSETTING( 0x0a, "38400")
|
||||
PORT_CONFSETTING( 0x0b, "57600")
|
||||
PORT_CONFSETTING( 0x0c, "115200")
|
||||
|
||||
PORT_START("TERM_RXBAUD")
|
||||
PORT_CONFNAME(0xff, 0x06, "RX Baud") PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, serial_terminal_device, update_serial)
|
||||
PORT_CONFSETTING( 0x0d, "110")
|
||||
PORT_CONFSETTING( 0x00, "150")
|
||||
PORT_CONFSETTING( 0x01, "300")
|
||||
PORT_CONFSETTING( 0x02, "600")
|
||||
PORT_CONFSETTING( 0x03, "1200")
|
||||
PORT_CONFSETTING( 0x04, "2400")
|
||||
PORT_CONFSETTING( 0x05, "4800")
|
||||
PORT_CONFSETTING( 0x06, "9600")
|
||||
PORT_CONFSETTING( 0x07, "14400")
|
||||
PORT_CONFSETTING( 0x08, "19200")
|
||||
PORT_CONFSETTING( 0x09, "28800")
|
||||
PORT_CONFSETTING( 0x0a, "38400")
|
||||
PORT_CONFSETTING( 0x0b, "57600")
|
||||
PORT_CONFSETTING( 0x0c, "115200")
|
||||
|
||||
PORT_START("TERM_STARTBITS")
|
||||
PORT_CONFNAME(0xff, 0x01, "Start Bits") PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, serial_terminal_device, update_serial)
|
||||
PORT_CONFSETTING( 0x00, "0")
|
||||
PORT_CONFSETTING( 0x01, "1")
|
||||
|
||||
PORT_START("TERM_DATABITS")
|
||||
PORT_CONFNAME(0xff, 0x03, "Data Bits") PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, serial_terminal_device, update_serial)
|
||||
PORT_CONFSETTING( 0x00, "5")
|
||||
PORT_CONFSETTING( 0x01, "6")
|
||||
PORT_CONFSETTING( 0x02, "7")
|
||||
PORT_CONFSETTING( 0x03, "8")
|
||||
PORT_CONFSETTING( 0x04, "9")
|
||||
|
||||
PORT_START("TERM_PARITY")
|
||||
PORT_CONFNAME(0xff, 0x00, "Parity") PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, serial_terminal_device, update_serial)
|
||||
PORT_CONFSETTING( 0x00, "None")
|
||||
PORT_CONFSETTING( 0x01, "Odd")
|
||||
PORT_CONFSETTING( 0x02, "Even")
|
||||
PORT_CONFSETTING( 0x03, "Mark")
|
||||
PORT_CONFSETTING( 0x04, "Space")
|
||||
|
||||
PORT_START("TERM_STOPBITS")
|
||||
PORT_CONFNAME(0xff, 0x01, "Stop Bits") PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, serial_terminal_device, update_serial)
|
||||
PORT_CONFSETTING( 0x00, "0")
|
||||
PORT_CONFSETTING( 0x01, "1")
|
||||
PORT_CONFSETTING( 0x02, "1.5")
|
||||
PORT_CONFSETTING( 0x03, "2")
|
||||
INPUT_PORTS_END
|
||||
|
||||
ioport_constructor serial_terminal_device::device_input_ports() const
|
||||
{
|
||||
return INPUT_PORTS_NAME(serial_terminal);
|
||||
}
|
||||
|
||||
serial_terminal_device::serial_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: generic_terminal_device(mconfig, SERIAL_TERMINAL, "Serial Terminal", tag, owner, clock, "serial_terminal", __FILE__),
|
||||
device_serial_interface(mconfig, *this),
|
||||
device_serial_port_interface(mconfig, *this),
|
||||
m_io_term_txbaud(*this, "TERM_TXBAUD"),
|
||||
m_io_term_rxbaud(*this, "TERM_RXBAUD"),
|
||||
m_io_term_startbits(*this, "TERM_STARTBITS"),
|
||||
m_io_term_databits(*this, "TERM_DATABITS"),
|
||||
m_io_term_parity(*this, "TERM_PARITY"),
|
||||
m_io_term_stopbits(*this, "TERM_STOPBITS")
|
||||
{
|
||||
}
|
||||
|
||||
void serial_terminal_device::device_config_complete()
|
||||
{
|
||||
const serial_terminal_interface *intf = reinterpret_cast<const serial_terminal_interface *>(static_config());
|
||||
if(intf != NULL)
|
||||
{
|
||||
*static_cast<serial_terminal_interface *>(this) = *intf;
|
||||
}
|
||||
else
|
||||
{
|
||||
memset(&m_out_tx_cb, 0, sizeof(m_out_tx_cb));
|
||||
}
|
||||
}
|
||||
|
||||
void serial_terminal_device::device_start()
|
||||
{
|
||||
m_owner = dynamic_cast<serial_port_device *>(owner());
|
||||
m_out_tx_func.resolve(m_out_tx_cb, *this);
|
||||
m_slot = m_owner && 1;
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER(serial_terminal_device::update_serial)
|
||||
{
|
||||
static const int m_baud[] = {150, 300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 28800, 38400, 57600, 115200, 110};
|
||||
static const int m_startbits[] = {0, 1};
|
||||
static const int m_databits[] = {5, 6, 7, 8, 9};
|
||||
static const parity_t m_parity[] = {PARITY_NONE, PARITY_ODD, PARITY_EVEN, PARITY_MARK, PARITY_SPACE};
|
||||
static const stop_bits_t m_stopbits[] = {STOP_BITS_0, STOP_BITS_1, STOP_BITS_1_5, STOP_BITS_2};
|
||||
|
||||
UINT8 startbits = m_io_term_startbits->read();
|
||||
UINT8 databits = m_io_term_databits->read();
|
||||
UINT8 parity = m_io_term_parity->read();
|
||||
UINT8 stopbits = m_io_term_stopbits->read();
|
||||
|
||||
set_data_frame(m_startbits[startbits], m_databits[databits], m_parity[parity], m_stopbits[stopbits]);
|
||||
|
||||
UINT8 txbaud = m_io_term_txbaud->read();
|
||||
set_tra_rate(m_baud[txbaud]);
|
||||
|
||||
UINT8 rxbaud = m_io_term_rxbaud->read();
|
||||
set_rcv_rate(m_baud[rxbaud]);
|
||||
}
|
||||
|
||||
void serial_terminal_device::device_reset()
|
||||
{
|
||||
generic_terminal_device::device_reset();
|
||||
|
||||
m_rbit = 1;
|
||||
if(m_slot)
|
||||
m_owner->out_rx(m_rbit);
|
||||
else
|
||||
m_out_tx_func(m_rbit);
|
||||
|
||||
update_serial(0);
|
||||
}
|
||||
|
||||
void serial_terminal_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
|
||||
{
|
||||
device_serial_interface::device_timer(timer, id, param, ptr);
|
||||
}
|
||||
|
||||
void serial_terminal_device::send_key(UINT8 code)
|
||||
{
|
||||
if(is_transmit_register_empty())
|
||||
{
|
||||
transmit_register_setup(code);
|
||||
return;
|
||||
}
|
||||
m_key_valid = true;
|
||||
m_curr_key = code;
|
||||
}
|
||||
|
||||
void serial_terminal_device::tra_callback()
|
||||
{
|
||||
m_rbit = transmit_register_get_data_bit();
|
||||
if(m_slot)
|
||||
m_owner->out_rx(m_rbit);
|
||||
else
|
||||
m_out_tx_func(m_rbit);
|
||||
}
|
||||
|
||||
void serial_terminal_device::tra_complete()
|
||||
{
|
||||
if(m_key_valid)
|
||||
{
|
||||
transmit_register_setup(m_curr_key);
|
||||
m_key_valid = false;
|
||||
}
|
||||
}
|
||||
|
||||
void serial_terminal_device::rcv_complete()
|
||||
{
|
||||
receive_register_extract();
|
||||
term_write(get_received_char());
|
||||
}
|
||||
|
||||
READ_LINE_MEMBER(serial_terminal_device::tx_r)
|
||||
{
|
||||
return m_rbit;
|
||||
}
|
||||
|
||||
const device_type SERIAL_TERMINAL = &device_creator<serial_terminal_device>;
|
@ -1,10 +1,9 @@
|
||||
#ifndef __TERMINAL_H__
|
||||
#define __TERMINAL_H__
|
||||
|
||||
#include "emu.h"
|
||||
#include "machine/serial.h"
|
||||
#include "machine/keyboard.h"
|
||||
|
||||
#define TERMINAL_SCREEN_TAG "terminal_screen"
|
||||
|
||||
/***************************************************************************
|
||||
TYPE DEFINITIONS
|
||||
@ -17,16 +16,9 @@ struct terminal_interface
|
||||
|
||||
#define GENERIC_TERMINAL_INTERFACE(name) const terminal_interface (name) =
|
||||
|
||||
struct serial_terminal_interface
|
||||
{
|
||||
devcb_write_line m_out_tx_cb;
|
||||
};
|
||||
|
||||
/***************************************************************************
|
||||
DEVICE CONFIGURATION MACROS
|
||||
***************************************************************************/
|
||||
#define TERMINAL_TAG "terminal"
|
||||
#define TERMINAL_SCREEN_TAG "terminal_screen"
|
||||
|
||||
#define MCFG_GENERIC_TERMINAL_ADD(_tag, _intrf) \
|
||||
MCFG_DEVICE_ADD(_tag, GENERIC_TERMINAL, 0) \
|
||||
@ -35,10 +27,6 @@ struct serial_terminal_interface
|
||||
#define MCFG_GENERIC_TERMINAL_REMOVE(_tag) \
|
||||
MCFG_DEVICE_REMOVE(_tag)
|
||||
|
||||
#define MCFG_SERIAL_TERMINAL_ADD(_tag, _intrf, _clock) \
|
||||
MCFG_DEVICE_ADD(_tag, SERIAL_TERMINAL, _clock) \
|
||||
MCFG_DEVICE_CONFIG(_intrf)
|
||||
|
||||
/***************************************************************************
|
||||
FUNCTION PROTOTYPES
|
||||
***************************************************************************/
|
||||
@ -46,6 +34,8 @@ struct serial_terminal_interface
|
||||
#define TERMINAL_WIDTH 80
|
||||
#define TERMINAL_HEIGHT 24
|
||||
|
||||
INPUT_PORTS_EXTERN( generic_terminal );
|
||||
|
||||
class generic_terminal_device :
|
||||
public device_t,
|
||||
public terminal_interface
|
||||
@ -82,48 +72,4 @@ private:
|
||||
|
||||
extern const device_type GENERIC_TERMINAL;
|
||||
|
||||
class serial_terminal_device :
|
||||
public generic_terminal_device,
|
||||
public device_serial_interface,
|
||||
public device_serial_port_interface,
|
||||
public serial_terminal_interface
|
||||
{
|
||||
public:
|
||||
serial_terminal_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(rx_w) { m_tbit = state; device_serial_interface::rx_w(state); }
|
||||
DECLARE_READ_LINE_MEMBER(tx_r);
|
||||
virtual void tx(UINT8 state) { rx_w(state); }
|
||||
virtual ioport_constructor device_input_ports() const;
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(update_serial);
|
||||
|
||||
protected:
|
||||
virtual void device_start();
|
||||
virtual void device_config_complete();
|
||||
virtual void device_reset();
|
||||
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
|
||||
virtual void tra_callback();
|
||||
virtual void tra_complete();
|
||||
virtual void rcv_complete();
|
||||
virtual void input_callback(UINT8 state) { m_input_state = state; }
|
||||
virtual void send_key(UINT8 code);
|
||||
|
||||
private:
|
||||
required_ioport m_io_term_txbaud;
|
||||
required_ioport m_io_term_rxbaud;
|
||||
required_ioport m_io_term_startbits;
|
||||
required_ioport m_io_term_databits;
|
||||
required_ioport m_io_term_parity;
|
||||
required_ioport m_io_term_stopbits;
|
||||
|
||||
serial_port_device *m_owner;
|
||||
bool m_slot;
|
||||
UINT8 m_curr_key;
|
||||
bool m_key_valid;
|
||||
devcb_resolved_write_line m_out_tx_func;
|
||||
};
|
||||
|
||||
extern const device_type SERIAL_TERMINAL;
|
||||
|
||||
#endif /* __TERMINAL_H__ */
|
@ -26,10 +26,9 @@
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "bus/rs232/rs232.h"
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "machine/6850acia.h"
|
||||
#include "machine/serial.h"
|
||||
|
||||
|
||||
class c68ksbc_state : public driver_device
|
||||
@ -38,7 +37,8 @@ public:
|
||||
c68ksbc_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu")
|
||||
{ }
|
||||
{
|
||||
}
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
virtual void machine_reset();
|
||||
@ -66,8 +66,8 @@ static ACIA6850_INTERFACE( acia_intf )
|
||||
{
|
||||
153600,
|
||||
153600,
|
||||
DEVCB_DEVICE_LINE_MEMBER("rs232", serial_port_device, tx),
|
||||
DEVCB_DEVICE_LINE_MEMBER("rs232", rs232_port_device, rts_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER("rs232", rs232_port_device, write_txd),
|
||||
DEVCB_DEVICE_LINE_MEMBER("rs232", rs232_port_device, write_rts),
|
||||
DEVCB_NULL
|
||||
};
|
||||
|
||||
@ -79,8 +79,8 @@ static MACHINE_CONFIG_START( c68ksbc, c68ksbc_state )
|
||||
MCFG_ACIA6850_ADD("acia", acia_intf)
|
||||
|
||||
MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, "serial_terminal")
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE("acia", acia6850_device, write_rx))
|
||||
MCFG_RS232_OUT_CTS_HANDLER(DEVWRITELINE("acia", acia6850_device, write_cts))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("acia", acia6850_device, write_rx))
|
||||
MCFG_RS232_CTS_HANDLER(DEVWRITELINE("acia", acia6850_device, write_cts))
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
/* ROM definition */
|
||||
|
@ -616,9 +616,9 @@ static Z80DART_INTERFACE( dart_intf )
|
||||
{
|
||||
0, 0, 0, 0,
|
||||
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_B_TAG, serial_port_device, tx),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_B_TAG, rs232_port_device, dtr_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_B_TAG, rs232_port_device, rts_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_B_TAG, rs232_port_device, write_txd),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_B_TAG, rs232_port_device, write_dtr),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_B_TAG, rs232_port_device, write_rts),
|
||||
DEVCB_NULL,
|
||||
DEVCB_NULL,
|
||||
|
||||
@ -958,7 +958,7 @@ static MACHINE_CONFIG_START( abc1600, abc1600_state )
|
||||
MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, NULL)
|
||||
|
||||
MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, NULL)
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE(Z8470AB1_TAG, z80dart_device, rxa_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z8470AB1_TAG, z80dart_device, rxa_w))
|
||||
|
||||
MCFG_ABC_KEYBOARD_PORT_ADD(ABC_KEYBOARD_PORT_TAG, "abc99")
|
||||
MCFG_ABC_KEYBOARD_OUT_RX_HANDLER(DEVWRITELINE(Z8470AB1_TAG, z80dart_device, rxb_w))
|
||||
|
@ -79,7 +79,7 @@ Notes:
|
||||
|
||||
#include "includes/abc80.h"
|
||||
|
||||
|
||||
#define KEYBOARD_TAG "keyboard"
|
||||
|
||||
//**************************************************************************
|
||||
// MACROS / CONSTANTS
|
||||
@ -322,7 +322,7 @@ READ8_MEMBER( abc80_state::pio_pb_r )
|
||||
UINT8 data = 0;
|
||||
|
||||
// receive data
|
||||
data |= m_rs232->rx();
|
||||
data |= m_rs232->rxd_r();
|
||||
|
||||
// clear to send
|
||||
data |= m_rs232->cts_r() << 1;
|
||||
@ -356,10 +356,10 @@ WRITE8_MEMBER( abc80_state::pio_pb_w )
|
||||
*/
|
||||
|
||||
// transmit data
|
||||
m_rs232->tx(BIT(data, 3));
|
||||
m_rs232->write_txd(BIT(data, 3));
|
||||
|
||||
// request to send
|
||||
m_rs232->rts_w(BIT(data, 4));
|
||||
m_rs232->write_rts(BIT(data, 4));
|
||||
|
||||
// cassette motor
|
||||
if (BIT(data, 5))
|
||||
|
@ -737,9 +737,9 @@ static Z80SIO_INTERFACE( sio_intf )
|
||||
{
|
||||
0, 0, 0, 0,
|
||||
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_B_TAG, serial_port_device, tx),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_B_TAG, rs232_port_device, dtr_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_B_TAG, rs232_port_device, rts_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_B_TAG, rs232_port_device, write_txd),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_B_TAG, rs232_port_device, write_dtr),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_B_TAG, rs232_port_device, write_rts),
|
||||
DEVCB_NULL,
|
||||
DEVCB_NULL,
|
||||
|
||||
@ -765,9 +765,9 @@ static Z80DART_INTERFACE( abc800_dart_intf )
|
||||
{
|
||||
0, 0, 0, 0,
|
||||
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, serial_port_device, tx),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, rs232_port_device, dtr_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, rs232_port_device, rts_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, rs232_port_device, write_txd),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, rs232_port_device, write_dtr),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, rs232_port_device, write_rts),
|
||||
DEVCB_NULL,
|
||||
DEVCB_NULL,
|
||||
|
||||
@ -805,9 +805,9 @@ static Z80DART_INTERFACE( abc802_dart_intf )
|
||||
{
|
||||
0, 0, 0, 0,
|
||||
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, serial_port_device, tx),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, rs232_port_device, dtr_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, rs232_port_device, rts_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, rs232_port_device, write_txd),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, rs232_port_device, write_dtr),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, rs232_port_device, write_rts),
|
||||
DEVCB_NULL,
|
||||
DEVCB_NULL,
|
||||
|
||||
@ -840,9 +840,9 @@ static Z80DART_INTERFACE( abc806_dart_intf )
|
||||
{
|
||||
0, 0, 0, 0,
|
||||
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, serial_port_device, tx),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, rs232_port_device, dtr_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, rs232_port_device, rts_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, rs232_port_device, write_txd),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, rs232_port_device, write_dtr),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, rs232_port_device, write_rts),
|
||||
DEVCB_NULL,
|
||||
DEVCB_NULL,
|
||||
|
||||
@ -1142,14 +1142,14 @@ static MACHINE_CONFIG_START( abc800c, abc800c_state )
|
||||
MCFG_CASSETTE_ADD("cassette", cass_intf)
|
||||
|
||||
MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, NULL)
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, rxa_w))
|
||||
MCFG_RS232_OUT_DCD_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, dcda_w))
|
||||
MCFG_RS232_OUT_CTS_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, ctsa_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, rxa_w))
|
||||
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, dcda_w))
|
||||
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, ctsa_w))
|
||||
|
||||
MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, NULL)
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, rxa_w))
|
||||
MCFG_RS232_OUT_DCD_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, dcda_w))
|
||||
MCFG_RS232_OUT_CTS_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, ctsa_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, rxa_w))
|
||||
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, dcda_w))
|
||||
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, ctsa_w))
|
||||
|
||||
MCFG_ABC_KEYBOARD_PORT_ADD(ABC_KEYBOARD_PORT_TAG, "abc800")
|
||||
MCFG_ABC_KEYBOARD_OUT_RX_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, rxb_w))
|
||||
@ -1197,14 +1197,14 @@ static MACHINE_CONFIG_START( abc800m, abc800m_state )
|
||||
MCFG_CASSETTE_ADD("cassette", cass_intf)
|
||||
|
||||
MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, NULL)
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, rxa_w))
|
||||
MCFG_RS232_OUT_DCD_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, dcda_w))
|
||||
MCFG_RS232_OUT_CTS_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, ctsa_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, rxa_w))
|
||||
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, dcda_w))
|
||||
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, ctsa_w))
|
||||
|
||||
MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, NULL)
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, rxa_w))
|
||||
MCFG_RS232_OUT_DCD_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, dcda_w))
|
||||
MCFG_RS232_OUT_CTS_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, ctsa_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, rxa_w))
|
||||
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, dcda_w))
|
||||
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, ctsa_w))
|
||||
|
||||
MCFG_ABC_KEYBOARD_PORT_ADD(ABC_KEYBOARD_PORT_TAG, "abc800")
|
||||
MCFG_ABC_KEYBOARD_OUT_RX_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, rxb_w))
|
||||
@ -1252,14 +1252,14 @@ static MACHINE_CONFIG_START( abc802, abc802_state )
|
||||
MCFG_CASSETTE_ADD("cassette", cass_intf)
|
||||
|
||||
MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, NULL)
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, rxa_w))
|
||||
MCFG_RS232_OUT_DCD_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, dcda_w))
|
||||
MCFG_RS232_OUT_CTS_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, ctsa_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, rxa_w))
|
||||
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, dcda_w))
|
||||
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, ctsa_w))
|
||||
|
||||
MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, NULL)
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, rxa_w))
|
||||
MCFG_RS232_OUT_DCD_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, dcda_w))
|
||||
MCFG_RS232_OUT_CTS_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, ctsa_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, rxa_w))
|
||||
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, dcda_w))
|
||||
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, ctsa_w))
|
||||
|
||||
MCFG_ABC_KEYBOARD_PORT_ADD(ABC_KEYBOARD_PORT_TAG, "abc55")
|
||||
MCFG_ABC_KEYBOARD_OUT_RX_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, rxb_w))
|
||||
@ -1300,14 +1300,14 @@ static MACHINE_CONFIG_START( abc806, abc806_state )
|
||||
MCFG_Z80DART_ADD(Z80DART_TAG, ABC800_X01/2/2, abc806_dart_intf)
|
||||
|
||||
MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, NULL)
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, rxa_w))
|
||||
MCFG_RS232_OUT_DCD_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, dcda_w))
|
||||
MCFG_RS232_OUT_CTS_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, ctsa_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, rxa_w))
|
||||
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, dcda_w))
|
||||
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, ctsa_w))
|
||||
|
||||
MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, NULL)
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, rxa_w))
|
||||
MCFG_RS232_OUT_DCD_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, dcda_w))
|
||||
MCFG_RS232_OUT_CTS_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, ctsa_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, rxa_w))
|
||||
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, dcda_w))
|
||||
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, ctsa_w))
|
||||
|
||||
MCFG_ABC_KEYBOARD_PORT_ADD(ABC_KEYBOARD_PORT_TAG, "abc77")
|
||||
MCFG_ABC_KEYBOARD_OUT_RX_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, rxb_w))
|
||||
|
@ -18,10 +18,9 @@
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "bus/rs232/rs232.h"
|
||||
#include "cpu/i8085/i8085.h"
|
||||
#include "machine/6850acia.h"
|
||||
#include "machine/serial.h"
|
||||
#include "imagedev/snapquik.h"
|
||||
|
||||
|
||||
@ -90,8 +89,8 @@ static ACIA6850_INTERFACE( acia0_intf )
|
||||
{
|
||||
153600, // TODO: these are set using jumpers S3/S2/S1/S0
|
||||
153600,
|
||||
DEVCB_DEVICE_LINE_MEMBER("rs232", serial_port_device, tx),
|
||||
DEVCB_DEVICE_LINE_MEMBER("rs232", rs232_port_device, rts_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER("rs232", rs232_port_device, write_txd),
|
||||
DEVCB_DEVICE_LINE_MEMBER("rs232", rs232_port_device, write_rts),
|
||||
DEVCB_NULL
|
||||
};
|
||||
|
||||
@ -106,9 +105,9 @@ static MACHINE_CONFIG_START( altair, altair_state )
|
||||
MCFG_ACIA6850_ADD("mc6850", acia0_intf)
|
||||
|
||||
MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, "serial_terminal")
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE("mc6850", acia6850_device, write_rx))
|
||||
MCFG_RS232_OUT_DCD_HANDLER(DEVWRITELINE("mc6850", acia6850_device, write_dcd))
|
||||
MCFG_RS232_OUT_CTS_HANDLER(DEVWRITELINE("mc6850", acia6850_device, write_cts))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("mc6850", acia6850_device, write_rx))
|
||||
MCFG_RS232_DCD_HANDLER(DEVWRITELINE("mc6850", acia6850_device, write_dcd))
|
||||
MCFG_RS232_CTS_HANDLER(DEVWRITELINE("mc6850", acia6850_device, write_cts))
|
||||
|
||||
/* quickload */
|
||||
MCFG_QUICKLOAD_ADD("quickload", altair_state, altair, "bin", 0)
|
||||
|
@ -14,14 +14,13 @@
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "bus/rs232/rs232.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "cpu/z80/z80daisy.h"
|
||||
#include "machine/z80ctc.h"
|
||||
#include "machine/z80pio.h"
|
||||
#include "machine/z80dart.h"
|
||||
#include "machine/z80dma.h"
|
||||
#include "machine/serial.h"
|
||||
#include "machine/wd_fdc.h"
|
||||
|
||||
|
||||
@ -410,9 +409,9 @@ static Z80SIO_INTERFACE( sio_intf )
|
||||
DEVCB_NULL, // SYNC
|
||||
|
||||
// console#1
|
||||
DEVCB_DEVICE_LINE_MEMBER("rs232", serial_port_device, tx),
|
||||
DEVCB_DEVICE_LINE_MEMBER("rs232", rs232_port_device, dtr_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER("rs232", rs232_port_device, rts_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER("rs232", rs232_port_device, write_txd),
|
||||
DEVCB_DEVICE_LINE_MEMBER("rs232", rs232_port_device, write_dtr),
|
||||
DEVCB_DEVICE_LINE_MEMBER("rs232", rs232_port_device, write_rts),
|
||||
DEVCB_NULL,
|
||||
DEVCB_NULL,
|
||||
|
||||
@ -497,10 +496,10 @@ static MACHINE_CONFIG_START( altos5, altos5_state )
|
||||
MCFG_Z80SIO0_ADD("z80sio", XTAL_8MHz / 2, sio_intf )
|
||||
|
||||
MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, "serial_terminal")
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE("z80sio", z80dart_device, rxb_w))
|
||||
MCFG_RS232_OUT_DCD_HANDLER(DEVWRITELINE("z80sio", z80dart_device, dcdb_w))
|
||||
MCFG_RS232_OUT_RI_HANDLER(DEVWRITELINE("z80sio", z80dart_device, rib_w))
|
||||
MCFG_RS232_OUT_CTS_HANDLER(DEVWRITELINE("z80sio", z80dart_device, ctsb_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("z80sio", z80dart_device, rxb_w))
|
||||
MCFG_RS232_DCD_HANDLER(DEVWRITELINE("z80sio", z80dart_device, dcdb_w))
|
||||
MCFG_RS232_RI_HANDLER(DEVWRITELINE("z80sio", z80dart_device, rib_w))
|
||||
MCFG_RS232_CTS_HANDLER(DEVWRITELINE("z80sio", z80dart_device, ctsb_w))
|
||||
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("ctc_tick", altos5_state, ctc_tick, attotime::from_hz(XTAL_8MHz / 4))
|
||||
MCFG_FD1797x_ADD("fdc", XTAL_8MHz / 8)
|
||||
|
@ -21,12 +21,11 @@ ToDo:
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "bus/rs232/rs232.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "cpu/z80/z80daisy.h"
|
||||
#include "machine/z80ctc.h"
|
||||
#include "machine/z80dart.h"
|
||||
#include "machine/serial.h"
|
||||
#include "machine/wd_fdc.h"
|
||||
|
||||
|
||||
@ -122,9 +121,9 @@ static Z80DART_INTERFACE( dart_intf )
|
||||
{
|
||||
0, 0, 0, 0,
|
||||
|
||||
DEVCB_DEVICE_LINE_MEMBER("rs232", serial_port_device, tx),
|
||||
DEVCB_DEVICE_LINE_MEMBER("rs232", rs232_port_device, dtr_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER("rs232", rs232_port_device, rts_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER("rs232", rs232_port_device, write_txd),
|
||||
DEVCB_DEVICE_LINE_MEMBER("rs232", rs232_port_device, write_dtr),
|
||||
DEVCB_DEVICE_LINE_MEMBER("rs232", rs232_port_device, write_rts),
|
||||
DEVCB_NULL,
|
||||
DEVCB_NULL,
|
||||
|
||||
@ -199,7 +198,7 @@ static MACHINE_CONFIG_START( ampro, ampro_state )
|
||||
MCFG_Z80CTC_ADD( "z80ctc", XTAL_16MHz / 4, ctc_intf )
|
||||
MCFG_Z80DART_ADD("z80dart", XTAL_16MHz / 4, dart_intf )
|
||||
MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, "serial_terminal")
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE("z80dart", z80dart_device, rxa_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("z80dart", z80dart_device, rxa_w))
|
||||
|
||||
MCFG_TIMER_DRIVER_ADD_PERIODIC("ctc_tick", ampro_state, ctc_tick, attotime::from_hz(XTAL_16MHz / 8))
|
||||
MCFG_WD1772x_ADD("fdc", XTAL_16MHz / 2)
|
||||
|
@ -24,7 +24,7 @@ More information can be found at http://www.seasip.info/AmstradXT/1640tech/index
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "bus/rs232/ser_mouse.h"
|
||||
#include "cpu/nec/nec.h"
|
||||
#include "cpu/i86/i86.h"
|
||||
#include "sound/speaker.h"
|
||||
@ -269,32 +269,32 @@ static MACHINE_CONFIG_START( pc200, amstrad_pc_state )
|
||||
MCFG_INS8250_ADD( "ins8250_3", ibm5150_com_interface[3], XTAL_1_8432MHz ) /* TODO: Verify model */
|
||||
|
||||
MCFG_RS232_PORT_ADD( "serport0", amstr_com, NULL )
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE("ins8250_0", ins8250_uart_device, rx_w))
|
||||
MCFG_RS232_OUT_DCD_HANDLER(DEVWRITELINE("ins8250_0", ins8250_uart_device, dcd_w))
|
||||
MCFG_RS232_OUT_DSR_HANDLER(DEVWRITELINE("ins8250_0", ins8250_uart_device, dsr_w))
|
||||
MCFG_RS232_OUT_RI_HANDLER(DEVWRITELINE("ins8250_0", ins8250_uart_device, ri_w))
|
||||
MCFG_RS232_OUT_CTS_HANDLER(DEVWRITELINE("ins8250_0", ins8250_uart_device, cts_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("ins8250_0", ins8250_uart_device, rx_w))
|
||||
MCFG_RS232_DCD_HANDLER(DEVWRITELINE("ins8250_0", ins8250_uart_device, dcd_w))
|
||||
MCFG_RS232_DSR_HANDLER(DEVWRITELINE("ins8250_0", ins8250_uart_device, dsr_w))
|
||||
MCFG_RS232_RI_HANDLER(DEVWRITELINE("ins8250_0", ins8250_uart_device, ri_w))
|
||||
MCFG_RS232_CTS_HANDLER(DEVWRITELINE("ins8250_0", ins8250_uart_device, cts_w))
|
||||
|
||||
MCFG_RS232_PORT_ADD( "serport1", amstr_com, NULL )
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE("ins8250_1", ins8250_uart_device, rx_w))
|
||||
MCFG_RS232_OUT_DCD_HANDLER(DEVWRITELINE("ins8250_1", ins8250_uart_device, dcd_w))
|
||||
MCFG_RS232_OUT_DSR_HANDLER(DEVWRITELINE("ins8250_1", ins8250_uart_device, dsr_w))
|
||||
MCFG_RS232_OUT_RI_HANDLER(DEVWRITELINE("ins8250_1", ins8250_uart_device, ri_w))
|
||||
MCFG_RS232_OUT_CTS_HANDLER(DEVWRITELINE("ins8250_1", ins8250_uart_device, cts_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("ins8250_1", ins8250_uart_device, rx_w))
|
||||
MCFG_RS232_DCD_HANDLER(DEVWRITELINE("ins8250_1", ins8250_uart_device, dcd_w))
|
||||
MCFG_RS232_DSR_HANDLER(DEVWRITELINE("ins8250_1", ins8250_uart_device, dsr_w))
|
||||
MCFG_RS232_RI_HANDLER(DEVWRITELINE("ins8250_1", ins8250_uart_device, ri_w))
|
||||
MCFG_RS232_CTS_HANDLER(DEVWRITELINE("ins8250_1", ins8250_uart_device, cts_w))
|
||||
|
||||
MCFG_RS232_PORT_ADD( "serport2", amstr_com, NULL )
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE("ins8250_2", ins8250_uart_device, rx_w))
|
||||
MCFG_RS232_OUT_DCD_HANDLER(DEVWRITELINE("ins8250_2", ins8250_uart_device, dcd_w))
|
||||
MCFG_RS232_OUT_DSR_HANDLER(DEVWRITELINE("ins8250_2", ins8250_uart_device, dsr_w))
|
||||
MCFG_RS232_OUT_RI_HANDLER(DEVWRITELINE("ins8250_2", ins8250_uart_device, ri_w))
|
||||
MCFG_RS232_OUT_CTS_HANDLER(DEVWRITELINE("ins8250_2", ins8250_uart_device, cts_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("ins8250_2", ins8250_uart_device, rx_w))
|
||||
MCFG_RS232_DCD_HANDLER(DEVWRITELINE("ins8250_2", ins8250_uart_device, dcd_w))
|
||||
MCFG_RS232_DSR_HANDLER(DEVWRITELINE("ins8250_2", ins8250_uart_device, dsr_w))
|
||||
MCFG_RS232_RI_HANDLER(DEVWRITELINE("ins8250_2", ins8250_uart_device, ri_w))
|
||||
MCFG_RS232_CTS_HANDLER(DEVWRITELINE("ins8250_2", ins8250_uart_device, cts_w))
|
||||
|
||||
MCFG_RS232_PORT_ADD( "serport3", amstr_com, NULL )
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE("ins8250_3", ins8250_uart_device, rx_w))
|
||||
MCFG_RS232_OUT_DCD_HANDLER(DEVWRITELINE("ins8250_3", ins8250_uart_device, dcd_w))
|
||||
MCFG_RS232_OUT_DSR_HANDLER(DEVWRITELINE("ins8250_3", ins8250_uart_device, dsr_w))
|
||||
MCFG_RS232_OUT_RI_HANDLER(DEVWRITELINE("ins8250_3", ins8250_uart_device, ri_w))
|
||||
MCFG_RS232_OUT_CTS_HANDLER(DEVWRITELINE("ins8250_3", ins8250_uart_device, cts_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("ins8250_3", ins8250_uart_device, rx_w))
|
||||
MCFG_RS232_DCD_HANDLER(DEVWRITELINE("ins8250_3", ins8250_uart_device, dcd_w))
|
||||
MCFG_RS232_DSR_HANDLER(DEVWRITELINE("ins8250_3", ins8250_uart_device, dsr_w))
|
||||
MCFG_RS232_RI_HANDLER(DEVWRITELINE("ins8250_3", ins8250_uart_device, ri_w))
|
||||
MCFG_RS232_CTS_HANDLER(DEVWRITELINE("ins8250_3", ins8250_uart_device, cts_w))
|
||||
|
||||
/* video hardware */
|
||||
MCFG_FRAGMENT_ADD( pcvideo_pc200 )
|
||||
@ -371,32 +371,32 @@ static MACHINE_CONFIG_START( ppc512, amstrad_pc_state )
|
||||
MCFG_INS8250_ADD( "ins8250_3", ibm5150_com_interface[3], XTAL_1_8432MHz ) /* TODO: Verify model */
|
||||
|
||||
MCFG_RS232_PORT_ADD( "serport0", amstr_com, NULL )
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE("ins8250_0", ins8250_uart_device, rx_w))
|
||||
MCFG_RS232_OUT_DCD_HANDLER(DEVWRITELINE("ins8250_0", ins8250_uart_device, dcd_w))
|
||||
MCFG_RS232_OUT_DSR_HANDLER(DEVWRITELINE("ins8250_0", ins8250_uart_device, dsr_w))
|
||||
MCFG_RS232_OUT_RI_HANDLER(DEVWRITELINE("ins8250_0", ins8250_uart_device, ri_w))
|
||||
MCFG_RS232_OUT_CTS_HANDLER(DEVWRITELINE("ins8250_0", ins8250_uart_device, cts_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("ins8250_0", ins8250_uart_device, rx_w))
|
||||
MCFG_RS232_DCD_HANDLER(DEVWRITELINE("ins8250_0", ins8250_uart_device, dcd_w))
|
||||
MCFG_RS232_DSR_HANDLER(DEVWRITELINE("ins8250_0", ins8250_uart_device, dsr_w))
|
||||
MCFG_RS232_RI_HANDLER(DEVWRITELINE("ins8250_0", ins8250_uart_device, ri_w))
|
||||
MCFG_RS232_CTS_HANDLER(DEVWRITELINE("ins8250_0", ins8250_uart_device, cts_w))
|
||||
|
||||
MCFG_RS232_PORT_ADD( "serport1", amstr_com, NULL )
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE("ins8250_1", ins8250_uart_device, rx_w))
|
||||
MCFG_RS232_OUT_DCD_HANDLER(DEVWRITELINE("ins8250_1", ins8250_uart_device, dcd_w))
|
||||
MCFG_RS232_OUT_DSR_HANDLER(DEVWRITELINE("ins8250_1", ins8250_uart_device, dsr_w))
|
||||
MCFG_RS232_OUT_RI_HANDLER(DEVWRITELINE("ins8250_1", ins8250_uart_device, ri_w))
|
||||
MCFG_RS232_OUT_CTS_HANDLER(DEVWRITELINE("ins8250_1", ins8250_uart_device, cts_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("ins8250_1", ins8250_uart_device, rx_w))
|
||||
MCFG_RS232_DCD_HANDLER(DEVWRITELINE("ins8250_1", ins8250_uart_device, dcd_w))
|
||||
MCFG_RS232_DSR_HANDLER(DEVWRITELINE("ins8250_1", ins8250_uart_device, dsr_w))
|
||||
MCFG_RS232_RI_HANDLER(DEVWRITELINE("ins8250_1", ins8250_uart_device, ri_w))
|
||||
MCFG_RS232_CTS_HANDLER(DEVWRITELINE("ins8250_1", ins8250_uart_device, cts_w))
|
||||
|
||||
MCFG_RS232_PORT_ADD( "serport2", amstr_com, NULL )
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE("ins8250_2", ins8250_uart_device, rx_w))
|
||||
MCFG_RS232_OUT_DCD_HANDLER(DEVWRITELINE("ins8250_2", ins8250_uart_device, dcd_w))
|
||||
MCFG_RS232_OUT_DSR_HANDLER(DEVWRITELINE("ins8250_2", ins8250_uart_device, dsr_w))
|
||||
MCFG_RS232_OUT_RI_HANDLER(DEVWRITELINE("ins8250_2", ins8250_uart_device, ri_w))
|
||||
MCFG_RS232_OUT_CTS_HANDLER(DEVWRITELINE("ins8250_2", ins8250_uart_device, cts_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("ins8250_2", ins8250_uart_device, rx_w))
|
||||
MCFG_RS232_DCD_HANDLER(DEVWRITELINE("ins8250_2", ins8250_uart_device, dcd_w))
|
||||
MCFG_RS232_DSR_HANDLER(DEVWRITELINE("ins8250_2", ins8250_uart_device, dsr_w))
|
||||
MCFG_RS232_RI_HANDLER(DEVWRITELINE("ins8250_2", ins8250_uart_device, ri_w))
|
||||
MCFG_RS232_CTS_HANDLER(DEVWRITELINE("ins8250_2", ins8250_uart_device, cts_w))
|
||||
|
||||
MCFG_RS232_PORT_ADD( "serport3", amstr_com, NULL )
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE("ins8250_3", ins8250_uart_device, rx_w))
|
||||
MCFG_RS232_OUT_DCD_HANDLER(DEVWRITELINE("ins8250_3", ins8250_uart_device, dcd_w))
|
||||
MCFG_RS232_OUT_DSR_HANDLER(DEVWRITELINE("ins8250_3", ins8250_uart_device, dsr_w))
|
||||
MCFG_RS232_OUT_RI_HANDLER(DEVWRITELINE("ins8250_3", ins8250_uart_device, ri_w))
|
||||
MCFG_RS232_OUT_CTS_HANDLER(DEVWRITELINE("ins8250_3", ins8250_uart_device, cts_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("ins8250_3", ins8250_uart_device, rx_w))
|
||||
MCFG_RS232_DCD_HANDLER(DEVWRITELINE("ins8250_3", ins8250_uart_device, dcd_w))
|
||||
MCFG_RS232_DSR_HANDLER(DEVWRITELINE("ins8250_3", ins8250_uart_device, dsr_w))
|
||||
MCFG_RS232_RI_HANDLER(DEVWRITELINE("ins8250_3", ins8250_uart_device, ri_w))
|
||||
MCFG_RS232_CTS_HANDLER(DEVWRITELINE("ins8250_3", ins8250_uart_device, cts_w))
|
||||
|
||||
/* video hardware */
|
||||
MCFG_FRAGMENT_ADD( pcvideo_pc200 )
|
||||
|
@ -39,6 +39,8 @@
|
||||
|
||||
#include "apollo_dsp.lh"
|
||||
|
||||
#define TERMINAL_TAG "terminal"
|
||||
|
||||
// we use this to prevent excessive logging (if emulation runs amok)
|
||||
// error.log will be 10 MB for 100000 lines
|
||||
#define APOLLO_MAX_NO_OF_LOG_LINES 1000000
|
||||
|
@ -10,7 +10,8 @@
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "bus/centronics/ctronics.h"
|
||||
#include "bus/rs232/rs232.h"
|
||||
#include "cpu/i86/i86.h"
|
||||
#include "cpu/i8089/i8089.h"
|
||||
#include "machine/ram.h"
|
||||
@ -18,8 +19,6 @@
|
||||
#include "machine/i8255.h"
|
||||
#include "machine/pic8259.h"
|
||||
#include "machine/z80dart.h"
|
||||
#include "machine/serial.h"
|
||||
#include "bus/centronics/ctronics.h"
|
||||
#include "machine/wd_fdc.h"
|
||||
#include "video/mc6845.h"
|
||||
#include "sound/sn76496.h"
|
||||
@ -222,9 +221,9 @@ static Z80SIO_INTERFACE( apricot_z80sio_intf )
|
||||
XTAL_4MHz / 16, XTAL_4MHz / 16,
|
||||
|
||||
// channel a
|
||||
DEVCB_DEVICE_LINE_MEMBER("rs232", serial_port_device, tx),
|
||||
DEVCB_DEVICE_LINE_MEMBER("rs232", rs232_port_device, dtr_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER("rs232", rs232_port_device, rts_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER("rs232", rs232_port_device, write_txd),
|
||||
DEVCB_DEVICE_LINE_MEMBER("rs232", rs232_port_device, write_dtr),
|
||||
DEVCB_DEVICE_LINE_MEMBER("rs232", rs232_port_device, write_rts),
|
||||
DEVCB_DEVICE_LINE_MEMBER("ic71", i8089_device, drq2_w),
|
||||
DEVCB_NULL,
|
||||
|
||||
@ -425,10 +424,10 @@ static MACHINE_CONFIG_START( apricot, apricot_state )
|
||||
MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, NULL)
|
||||
// note: missing a receive clock callback to support external clock mode
|
||||
// (m_data_selector_rts == 1 and m_data_selector_dtr == 0)
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE("ic15", z80dart_device, rxa_w))
|
||||
MCFG_RS232_OUT_DCD_HANDLER(DEVWRITELINE("ic15", z80dart_device, dcda_w))
|
||||
MCFG_RS232_OUT_DSR_HANDLER(DEVWRITELINE("ic15", z80dart_device, synca_w))
|
||||
MCFG_RS232_OUT_CTS_HANDLER(DEVWRITELINE("ic15", z80dart_device, ctsa_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("ic15", z80dart_device, rxa_w))
|
||||
MCFG_RS232_DCD_HANDLER(DEVWRITELINE("ic15", z80dart_device, dcda_w))
|
||||
MCFG_RS232_DSR_HANDLER(DEVWRITELINE("ic15", z80dart_device, synca_w))
|
||||
MCFG_RS232_CTS_HANDLER(DEVWRITELINE("ic15", z80dart_device, ctsa_w))
|
||||
|
||||
// centronics printer
|
||||
MCFG_CENTRONICS_ADD("centronics", centronics_printers, "image")
|
||||
|
@ -1,6 +1,9 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Curt Coder, Olivier Galibert
|
||||
#include "includes/atarist.h"
|
||||
#include "bus/midi/midi.h"
|
||||
#include "bus/midi/midiinport.h"
|
||||
#include "bus/midi/midioutport.h"
|
||||
#include "video/atarist.h"
|
||||
|
||||
/*
|
||||
@ -1753,10 +1756,10 @@ WRITE8_MEMBER( st_state::psg_pa_w )
|
||||
m_fdc->set_floppy(floppy);
|
||||
|
||||
// request to send
|
||||
m_rs232->rts_w(BIT(data, 3));
|
||||
m_rs232->write_rts(BIT(data, 3));
|
||||
|
||||
// data terminal ready
|
||||
m_rs232->dtr_w(BIT(data, 4));
|
||||
m_rs232->write_dtr(BIT(data, 4));
|
||||
|
||||
// centronics strobe
|
||||
m_centronics->write_strobe(BIT(data, 5));
|
||||
@ -1808,10 +1811,10 @@ WRITE8_MEMBER( stbook_state::psg_pa_w )
|
||||
m_fdc->set_floppy(floppy);
|
||||
|
||||
// request to send
|
||||
m_rs232->rts_w(BIT(data, 3));
|
||||
m_rs232->write_rts(BIT(data, 3));
|
||||
|
||||
// data terminal ready
|
||||
m_rs232->dtr_w(BIT(data, 4));
|
||||
m_rs232->write_dtr(BIT(data, 4));
|
||||
|
||||
// centronics strobe
|
||||
m_centronics->write_strobe(BIT(data, 5));
|
||||
@ -1886,7 +1889,7 @@ static ACIA6850_INTERFACE( acia_midi_intf )
|
||||
{
|
||||
Y2/64,
|
||||
0, // rx clock (we manually clock rx)
|
||||
DEVCB_DEVICE_LINE_MEMBER("mdout", serial_port_device, tx),
|
||||
DEVCB_DEVICE_LINE_MEMBER("mdout", midi_port_device, write_txd),
|
||||
DEVCB_NULL,
|
||||
DEVCB_DRIVER_LINE_MEMBER(st_state, acia_midi_irq_w)
|
||||
};
|
||||
@ -1912,7 +1915,7 @@ static MC68901_INTERFACE( mfp_intf )
|
||||
DEVCB_NULL, /* TBO */
|
||||
DEVCB_NULL, /* TCO */
|
||||
DEVCB_DRIVER_LINE_MEMBER(st_state, mfp_tdo_w), /* TDO */
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_TAG, serial_port_device, tx)
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_TAG, rs232_port_device, write_txd)
|
||||
};
|
||||
|
||||
|
||||
@ -1931,7 +1934,7 @@ static MC68901_INTERFACE( atariste_mfp_intf )
|
||||
DEVCB_NULL, /* TBO */
|
||||
DEVCB_NULL, /* TCO */
|
||||
DEVCB_DRIVER_LINE_MEMBER(st_state, mfp_tdo_w), /* TDO */
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_TAG, serial_port_device, tx)
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_TAG, rs232_port_device, write_txd)
|
||||
};
|
||||
|
||||
|
||||
@ -1953,7 +1956,7 @@ static MC68901_INTERFACE( stbook_mfp_intf )
|
||||
DEVCB_NULL, /* TBO */
|
||||
DEVCB_NULL, /* TCO */
|
||||
DEVCB_DRIVER_LINE_MEMBER(st_state, mfp_tdo_w), /* TDO */
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_TAG, serial_port_device, tx)
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_TAG, rs232_port_device, write_txd)
|
||||
};
|
||||
|
||||
void st_state::fdc_intrq_w(bool state)
|
||||
@ -2268,15 +2271,15 @@ static MACHINE_CONFIG_START( st, st_state )
|
||||
MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
|
||||
|
||||
MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, NULL)
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE(MC68901_TAG, mc68901_device, write_rx))
|
||||
MCFG_RS232_OUT_DCD_HANDLER(DEVWRITELINE(MC68901_TAG, mc68901_device, i1_w))
|
||||
MCFG_RS232_OUT_CTS_HANDLER(DEVWRITELINE(MC68901_TAG, mc68901_device, i2_w))
|
||||
MCFG_RS232_OUT_RI_HANDLER(DEVWRITELINE(MC68901_TAG, mc68901_device, i6_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(MC68901_TAG, mc68901_device, write_rx))
|
||||
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(MC68901_TAG, mc68901_device, i1_w))
|
||||
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(MC68901_TAG, mc68901_device, i2_w))
|
||||
MCFG_RS232_RI_HANDLER(DEVWRITELINE(MC68901_TAG, mc68901_device, i6_w))
|
||||
|
||||
MCFG_SERIAL_PORT_ADD("mdin", midiin_slot, "midiin")
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(WRITELINE(st_state, midi_rx_w))
|
||||
MCFG_MIDI_PORT_ADD("mdin", midiin_slot, "midiin")
|
||||
MCFG_MIDI_RX_HANDLER(WRITELINE(st_state, midi_rx_w))
|
||||
|
||||
MCFG_SERIAL_PORT_ADD("mdout", midiout_slot, "midiout")
|
||||
MCFG_MIDI_PORT_ADD("mdout", midiout_slot, "midiout")
|
||||
|
||||
// cartridge
|
||||
MCFG_CARTSLOT_ADD("cart")
|
||||
@ -2335,15 +2338,15 @@ static MACHINE_CONFIG_START( megast, megast_state )
|
||||
MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
|
||||
|
||||
MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, NULL)
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE(MC68901_TAG, mc68901_device, write_rx))
|
||||
MCFG_RS232_OUT_DCD_HANDLER(DEVWRITELINE(MC68901_TAG, mc68901_device, i1_w))
|
||||
MCFG_RS232_OUT_CTS_HANDLER(DEVWRITELINE(MC68901_TAG, mc68901_device, i2_w))
|
||||
MCFG_RS232_OUT_RI_HANDLER(DEVWRITELINE(MC68901_TAG, mc68901_device, i6_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(MC68901_TAG, mc68901_device, write_rx))
|
||||
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(MC68901_TAG, mc68901_device, i1_w))
|
||||
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(MC68901_TAG, mc68901_device, i2_w))
|
||||
MCFG_RS232_RI_HANDLER(DEVWRITELINE(MC68901_TAG, mc68901_device, i6_w))
|
||||
|
||||
MCFG_SERIAL_PORT_ADD("mdin", midiin_slot, "midiin")
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(WRITELINE(st_state, midi_rx_w))
|
||||
MCFG_MIDI_PORT_ADD("mdin", midiin_slot, "midiin")
|
||||
MCFG_MIDI_RX_HANDLER(WRITELINE(st_state, midi_rx_w))
|
||||
|
||||
MCFG_SERIAL_PORT_ADD("mdout", midiout_slot, "midiout")
|
||||
MCFG_MIDI_PORT_ADD("mdout", midiout_slot, "midiout")
|
||||
MCFG_RP5C15_ADD(RP5C15_TAG, XTAL_32_768kHz, rtc_intf)
|
||||
|
||||
// cartridge
|
||||
@ -2411,15 +2414,15 @@ static MACHINE_CONFIG_START( ste, ste_state )
|
||||
MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", "centronics")
|
||||
|
||||
MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, NULL)
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE(MC68901_TAG, mc68901_device, write_rx))
|
||||
MCFG_RS232_OUT_DCD_HANDLER(DEVWRITELINE(MC68901_TAG, mc68901_device, i1_w))
|
||||
MCFG_RS232_OUT_CTS_HANDLER(DEVWRITELINE(MC68901_TAG, mc68901_device, i2_w))
|
||||
MCFG_RS232_OUT_RI_HANDLER(DEVWRITELINE(MC68901_TAG, mc68901_device, i6_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(MC68901_TAG, mc68901_device, write_rx))
|
||||
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(MC68901_TAG, mc68901_device, i1_w))
|
||||
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(MC68901_TAG, mc68901_device, i2_w))
|
||||
MCFG_RS232_RI_HANDLER(DEVWRITELINE(MC68901_TAG, mc68901_device, i6_w))
|
||||
|
||||
MCFG_SERIAL_PORT_ADD("mdin", midiin_slot, "midiin")
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(WRITELINE(st_state, midi_rx_w))
|
||||
MCFG_MIDI_PORT_ADD("mdin", midiin_slot, "midiin")
|
||||
MCFG_MIDI_RX_HANDLER(WRITELINE(st_state, midi_rx_w))
|
||||
|
||||
MCFG_SERIAL_PORT_ADD("mdout", midiout_slot, "midiout")
|
||||
MCFG_MIDI_PORT_ADD("mdout", midiout_slot, "midiout")
|
||||
|
||||
// cartridge
|
||||
MCFG_CARTSLOT_ADD("cart")
|
||||
|
@ -69,7 +69,7 @@
|
||||
******************************************************************************/
|
||||
|
||||
|
||||
#include "emu.h"
|
||||
#include "bus/rs232/null_modem.h"
|
||||
#include "includes/avigo.h"
|
||||
#include "avigo.lh"
|
||||
|
||||
@ -226,9 +226,9 @@ WRITE_LINE_MEMBER( avigo_state::com_interrupt )
|
||||
|
||||
static const ins8250_interface avigo_com_interface =
|
||||
{
|
||||
DEVCB_DEVICE_LINE_MEMBER("serport", serial_port_device, tx),
|
||||
DEVCB_DEVICE_LINE_MEMBER("serport", rs232_port_device, dtr_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER("serport", rs232_port_device, rts_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER("serport", rs232_port_device, write_txd),
|
||||
DEVCB_DEVICE_LINE_MEMBER("serport", rs232_port_device, write_dtr),
|
||||
DEVCB_DEVICE_LINE_MEMBER("serport", rs232_port_device, write_rts),
|
||||
DEVCB_DRIVER_LINE_MEMBER(avigo_state, com_interrupt),
|
||||
DEVCB_NULL,
|
||||
DEVCB_NULL
|
||||
@ -886,11 +886,11 @@ static MACHINE_CONFIG_START( avigo, avigo_state )
|
||||
MCFG_NS16550_ADD( "ns16550", avigo_com_interface, XTAL_1_8432MHz )
|
||||
|
||||
MCFG_RS232_PORT_ADD( "serport", avigo_com, NULL )
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE("ns16550", ins8250_uart_device, rx_w))
|
||||
MCFG_RS232_OUT_DCD_HANDLER(DEVWRITELINE("ns16550", ins8250_uart_device, dcd_w))
|
||||
MCFG_RS232_OUT_DSR_HANDLER(DEVWRITELINE("ns16550", ins8250_uart_device, dsr_w))
|
||||
MCFG_RS232_OUT_RI_HANDLER(DEVWRITELINE("ns16550", ins8250_uart_device, ri_w))
|
||||
MCFG_RS232_OUT_CTS_HANDLER(DEVWRITELINE("ns16550", ins8250_uart_device, cts_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("ns16550", ins8250_uart_device, rx_w))
|
||||
MCFG_RS232_DCD_HANDLER(DEVWRITELINE("ns16550", ins8250_uart_device, dcd_w))
|
||||
MCFG_RS232_DSR_HANDLER(DEVWRITELINE("ns16550", ins8250_uart_device, dsr_w))
|
||||
MCFG_RS232_RI_HANDLER(DEVWRITELINE("ns16550", ins8250_uart_device, ri_w))
|
||||
MCFG_RS232_CTS_HANDLER(DEVWRITELINE("ns16550", ins8250_uart_device, cts_w))
|
||||
|
||||
/* video hardware */
|
||||
MCFG_SCREEN_ADD("screen", LCD)
|
||||
|
@ -37,14 +37,17 @@ to discover the special features of this Basic.
|
||||
#include "machine/i8255.h"
|
||||
#include "machine/terminal.h"
|
||||
|
||||
#define TERMINAL_TAG "terminal"
|
||||
|
||||
class basic52_state : public driver_device
|
||||
{
|
||||
public:
|
||||
basic52_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_terminal(*this, TERMINAL_TAG) { }
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_terminal(*this, TERMINAL_TAG)
|
||||
{
|
||||
}
|
||||
|
||||
DECLARE_WRITE8_MEMBER(kbd_put);
|
||||
DECLARE_READ8_MEMBER(unk_r);
|
||||
|
@ -42,6 +42,7 @@
|
||||
#include "emu.h"
|
||||
|
||||
/* Components */
|
||||
#include "bus/rs232/rs232.h"
|
||||
#include "cpu/m6502/m6502.h"
|
||||
#include "cpu/m6502/m65sc02.h"
|
||||
#include "machine/6522via.h"
|
||||
@ -731,9 +732,9 @@ static MACHINE_CONFIG_START( bbca, bbc_state )
|
||||
/* acia */
|
||||
MCFG_ACIA6850_ADD("acia6850", bbc_acia6850_interface)
|
||||
MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, NULL)
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(WRITELINE(bbc_state, write_rxd_serial))
|
||||
MCFG_RS232_OUT_DCD_HANDLER(WRITELINE(bbc_state, write_dcd_serial))
|
||||
MCFG_RS232_OUT_CTS_HANDLER(WRITELINE(bbc_state, write_cts_serial))
|
||||
MCFG_RS232_RXD_HANDLER(WRITELINE(bbc_state, write_rxd_serial))
|
||||
MCFG_RS232_DCD_HANDLER(WRITELINE(bbc_state, write_dcd_serial))
|
||||
MCFG_RS232_CTS_HANDLER(WRITELINE(bbc_state, write_cts_serial))
|
||||
|
||||
/* system via */
|
||||
MCFG_DEVICE_ADD("via6522_0", VIA6522, 1000000)
|
||||
@ -954,9 +955,9 @@ static MACHINE_CONFIG_START( bbcm, bbc_state )
|
||||
MCFG_ACIA6850_ADD("acia6850", bbc_acia6850_interface)
|
||||
|
||||
MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, NULL)
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(WRITELINE(bbc_state, write_rxd_serial))
|
||||
MCFG_RS232_OUT_DCD_HANDLER(WRITELINE(bbc_state, write_dcd_serial))
|
||||
MCFG_RS232_OUT_CTS_HANDLER(WRITELINE(bbc_state, write_cts_serial))
|
||||
MCFG_RS232_RXD_HANDLER(WRITELINE(bbc_state, write_rxd_serial))
|
||||
MCFG_RS232_DCD_HANDLER(WRITELINE(bbc_state, write_dcd_serial))
|
||||
MCFG_RS232_CTS_HANDLER(WRITELINE(bbc_state, write_cts_serial))
|
||||
|
||||
/* adc */
|
||||
MCFG_UPD7002_ADD("upd7002", bbc_uPD7002)
|
||||
|
@ -25,6 +25,8 @@
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define TERMINAL_TAG "terminal"
|
||||
|
||||
class besta_state : public driver_device
|
||||
{
|
||||
public:
|
||||
@ -32,7 +34,9 @@ public:
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_terminal(*this, TERMINAL_TAG),
|
||||
m_p_ram(*this, "p_ram") { }
|
||||
m_p_ram(*this, "p_ram")
|
||||
{
|
||||
}
|
||||
|
||||
DECLARE_READ8_MEMBER( mpcc_reg_r );
|
||||
DECLARE_WRITE8_MEMBER( mpcc_reg_w );
|
||||
|
@ -92,6 +92,7 @@ X - change banks
|
||||
#include "machine/wd_fdc.h"
|
||||
|
||||
#define SCREEN_TAG "screen"
|
||||
#define KEYBOARD_TAG "keyboard"
|
||||
#define Z80_TAG "u39"
|
||||
#define Z80SIO_TAG "u16"
|
||||
#define Z80CTCA_TAG "u37"
|
||||
@ -102,17 +103,18 @@ class bigbord2_state : public driver_device
|
||||
{
|
||||
public:
|
||||
bigbord2_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag)
|
||||
, m_maincpu(*this, Z80_TAG)
|
||||
, m_6845(*this, "crtc")
|
||||
, m_ctca(*this, Z80CTCA_TAG)
|
||||
, m_ctcb(*this, Z80CTCA_TAG)
|
||||
, m_dma(*this, Z80DMA_TAG)
|
||||
, m_fdc(*this, "fdc")
|
||||
, m_floppy0(*this, "fdc:0")
|
||||
, m_floppy1(*this, "fdc:1")
|
||||
, m_beeper(*this, "beeper")
|
||||
{ }
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, Z80_TAG),
|
||||
m_6845(*this, "crtc"),
|
||||
m_ctca(*this, Z80CTCA_TAG),
|
||||
m_ctcb(*this, Z80CTCA_TAG),
|
||||
m_dma(*this, Z80DMA_TAG),
|
||||
m_fdc(*this, "fdc"),
|
||||
m_floppy0(*this, "fdc:0"),
|
||||
m_floppy1(*this, "fdc:1"),
|
||||
m_beeper(*this, "beeper")
|
||||
{
|
||||
}
|
||||
|
||||
DECLARE_WRITE8_MEMBER(portc8_w );
|
||||
DECLARE_WRITE8_MEMBER(portcc_w );
|
||||
|
@ -50,24 +50,26 @@
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "bus/rs232/keyboard.h"
|
||||
#include "cpu/s2650/s2650.h"
|
||||
#include "machine/keyboard.h"
|
||||
#include "imagedev/cassette.h"
|
||||
#include "sound/wave.h"
|
||||
#include "imagedev/snapquik.h"
|
||||
|
||||
#define KEYBOARD_TAG "keyboard"
|
||||
|
||||
class binbug_state : public driver_device
|
||||
{
|
||||
public:
|
||||
binbug_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_keyboard(*this, KEYBOARD_TAG),
|
||||
m_cass(*this, "cassette"),
|
||||
m_p_videoram(*this, "videoram"),
|
||||
m_p_attribram(*this, "attribram") ,
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
m_keyboard(*this, KEYBOARD_TAG),
|
||||
m_cass(*this, "cassette"),
|
||||
m_p_videoram(*this, "videoram"),
|
||||
m_p_attribram(*this, "attribram"),
|
||||
m_maincpu(*this, "maincpu")
|
||||
{
|
||||
}
|
||||
|
||||
DECLARE_WRITE8_MEMBER(binbug_ctrl_w);
|
||||
DECLARE_READ8_MEMBER(binbug_serial_r);
|
||||
|
@ -59,6 +59,7 @@ Notes:
|
||||
*/
|
||||
|
||||
#include "includes/bullet.h"
|
||||
#include "bus/rs232/rs232.h"
|
||||
|
||||
|
||||
|
||||
@ -759,15 +760,15 @@ static Z80DART_INTERFACE( dart_intf )
|
||||
{
|
||||
0, 0, 0, 0,
|
||||
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, serial_port_device, tx),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, rs232_port_device, dtr_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, rs232_port_device, rts_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, rs232_port_device, write_txd),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, rs232_port_device, write_dtr),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, rs232_port_device, write_rts),
|
||||
DEVCB_DRIVER_LINE_MEMBER(bullet_state, dartardy_w),
|
||||
DEVCB_NULL,
|
||||
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_B_TAG, serial_port_device, tx),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_B_TAG, rs232_port_device, dtr_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_B_TAG, rs232_port_device, rts_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_B_TAG, rs232_port_device, write_txd),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_B_TAG, rs232_port_device, write_dtr),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_B_TAG, rs232_port_device, write_rts),
|
||||
DEVCB_DRIVER_LINE_MEMBER(bullet_state, dartbrdy_w),
|
||||
DEVCB_NULL,
|
||||
|
||||
@ -1259,11 +1260,11 @@ static MACHINE_CONFIG_START( bullet, bullet_state )
|
||||
MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG)
|
||||
|
||||
MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, "serial_terminal")
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, rxa_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, rxa_w))
|
||||
MCFG_DEVICE_CARD_DEVICE_INPUT_DEFAULTS("serial_terminal", terminal)
|
||||
|
||||
MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, NULL)
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, rxb_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, rxb_w))
|
||||
|
||||
// software lists
|
||||
MCFG_SOFTWARE_LIST_ADD("flop_list", "wmbullet")
|
||||
@ -1309,11 +1310,11 @@ static MACHINE_CONFIG_START( bulletf, bulletf_state )
|
||||
MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG)
|
||||
|
||||
MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, "serial_terminal")
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, rxa_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, rxa_w))
|
||||
MCFG_DEVICE_CARD_DEVICE_INPUT_DEFAULTS("serial_terminal", terminal)
|
||||
|
||||
MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, NULL)
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, rxb_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, rxb_w))
|
||||
|
||||
MCFG_SCSIBUS_ADD(SCSIBUS_TAG)
|
||||
MCFG_SCSIDEV_ADD(SCSIBUS_TAG ":harddisk0", SCSIHD, SCSI_ID_0)
|
||||
|
@ -24,6 +24,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "includes/bw12.h"
|
||||
#include "bus/rs232/rs232.h"
|
||||
|
||||
/*
|
||||
|
||||
@ -436,15 +437,15 @@ static Z80SIO_INTERFACE( sio_intf )
|
||||
{
|
||||
0, 0, 0, 0,
|
||||
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, serial_port_device, tx),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, rs232_port_device, dtr_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, rs232_port_device, rts_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, rs232_port_device, write_txd),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, rs232_port_device, write_dtr),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, rs232_port_device, write_rts),
|
||||
DEVCB_NULL,
|
||||
DEVCB_NULL,
|
||||
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_B_TAG, serial_port_device, tx),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_B_TAG, rs232_port_device, dtr_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_B_TAG, rs232_port_device, rts_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_B_TAG, rs232_port_device, write_txd),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_B_TAG, rs232_port_device, write_dtr),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_B_TAG, rs232_port_device, write_rts),
|
||||
DEVCB_NULL,
|
||||
DEVCB_NULL,
|
||||
|
||||
@ -645,14 +646,14 @@ static MACHINE_CONFIG_START( common, bw12_state )
|
||||
MCFG_AY3600_DATA_READY_CB(WRITELINE(bw12_state, ay3600_data_ready_w))
|
||||
|
||||
MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, NULL)
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, rxa_w))
|
||||
MCFG_RS232_OUT_DCD_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, dcda_w))
|
||||
MCFG_RS232_OUT_CTS_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, ctsa_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, rxa_w))
|
||||
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, dcda_w))
|
||||
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, ctsa_w))
|
||||
|
||||
MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, NULL)
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, rxb_w))
|
||||
MCFG_RS232_OUT_DCD_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, dcdb_w))
|
||||
MCFG_RS232_OUT_CTS_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, ctsb_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, rxb_w))
|
||||
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, dcdb_w))
|
||||
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, ctsb_w))
|
||||
|
||||
/* printer */
|
||||
MCFG_CENTRONICS_ADD("centronics", centronics_printers, "image")
|
||||
|
@ -25,6 +25,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include "includes/bw2.h"
|
||||
#include "bus/rs232/rs232.h"
|
||||
|
||||
|
||||
|
||||
@ -555,9 +556,9 @@ static const struct pit8253_interface pit_intf =
|
||||
|
||||
static const i8251_interface usart_intf =
|
||||
{
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_TAG, serial_port_device, tx),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_TAG, rs232_port_device, dtr_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_TAG, rs232_port_device, rts_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_TAG, rs232_port_device, write_txd),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_TAG, rs232_port_device, write_dtr),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_TAG, rs232_port_device, write_rts),
|
||||
DEVCB_NULL,
|
||||
DEVCB_NULL,
|
||||
DEVCB_NULL,
|
||||
@ -671,8 +672,8 @@ static MACHINE_CONFIG_START( bw2, bw2_state )
|
||||
MCFG_BW2_EXPANSION_SLOT_ADD(BW2_EXPANSION_SLOT_TAG, XTAL_16MHz, bw2_expansion_cards, NULL)
|
||||
|
||||
MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, NULL)
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE(I8251_TAG, i8251_device, write_rx))
|
||||
MCFG_RS232_OUT_DSR_HANDLER(DEVWRITELINE(I8251_TAG, i8251_device, write_dsr))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(I8251_TAG, i8251_device, write_rx))
|
||||
MCFG_RS232_DSR_HANDLER(DEVWRITELINE(I8251_TAG, i8251_device, write_dsr))
|
||||
|
||||
// software list
|
||||
MCFG_SOFTWARE_LIST_ADD("flop_list","bw2")
|
||||
|
@ -20,15 +20,17 @@
|
||||
#include "cpu/z8000/z8000.h"
|
||||
#include "machine/terminal.h"
|
||||
|
||||
#define TERMINAL_TAG "terminal"
|
||||
|
||||
class c900_state : public driver_device
|
||||
{
|
||||
public:
|
||||
c900_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag)
|
||||
, m_maincpu(*this, "maincpu")
|
||||
, m_terminal(*this, TERMINAL_TAG)
|
||||
{ }
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_terminal(*this, TERMINAL_TAG)
|
||||
{
|
||||
}
|
||||
|
||||
DECLARE_READ16_MEMBER(port1e_r);
|
||||
DECLARE_READ16_MEMBER(key_r);
|
||||
|
@ -11,6 +11,7 @@
|
||||
*/
|
||||
|
||||
#include "includes/cbm2.h"
|
||||
#include "bus/rs232/rs232.h"
|
||||
|
||||
|
||||
|
||||
@ -2168,7 +2169,7 @@ static MACHINE_CONFIG_START( p500_ntsc, p500_state )
|
||||
|
||||
MCFG_DEVICE_ADD(MOS6551A_TAG, MOS6551, XTAL_1_8432MHz)
|
||||
MCFG_MOS6551_IRQ_HANDLER(DEVWRITELINE(MOS6525_1_TAG, tpi6525_device, i4_w))
|
||||
MCFG_MOS6551_TXD_HANDLER(DEVWRITELINE(RS232_TAG, rs232_port_device, tx))
|
||||
MCFG_MOS6551_TXD_HANDLER(DEVWRITELINE(RS232_TAG, rs232_port_device, write_txd))
|
||||
|
||||
MCFG_MOS6526_ADD(MOS6526_TAG, VIC6567_CLOCK, 60, DEVWRITELINE(MOS6525_1_TAG, tpi6525_device, i2_w))
|
||||
MCFG_MOS6526_SERIAL_CALLBACKS(DEVWRITELINE(CBM2_USER_PORT_TAG, cbm2_user_port_device, cnt_w), DEVWRITELINE(CBM2_USER_PORT_TAG, cbm2_user_port_device, sp_w))
|
||||
@ -2186,10 +2187,10 @@ static MACHINE_CONFIG_START( p500_ntsc, p500_state )
|
||||
MCFG_CBM2_USER_PORT_ADD(CBM2_USER_PORT_TAG, p500_user_intf, cbm2_user_port_cards, NULL)
|
||||
|
||||
MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, NULL)
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE(MOS6551A_TAG, mos6551_device, rxd_w))
|
||||
MCFG_RS232_OUT_DCD_HANDLER(DEVWRITELINE(MOS6551A_TAG, mos6551_device, dcd_w))
|
||||
MCFG_RS232_OUT_DSR_HANDLER(DEVWRITELINE(MOS6551A_TAG, mos6551_device, dsr_w))
|
||||
MCFG_RS232_OUT_CTS_HANDLER(DEVWRITELINE(MOS6551A_TAG, mos6551_device, cts_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(MOS6551A_TAG, mos6551_device, rxd_w))
|
||||
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(MOS6551A_TAG, mos6551_device, dcd_w))
|
||||
MCFG_RS232_DSR_HANDLER(DEVWRITELINE(MOS6551A_TAG, mos6551_device, dsr_w))
|
||||
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(MOS6551A_TAG, mos6551_device, cts_w))
|
||||
|
||||
MCFG_QUICKLOAD_ADD("quickload", p500_state, p500, "p00,prg", CBM_QUICKLOAD_DELAY_SECONDS)
|
||||
|
||||
@ -2234,7 +2235,7 @@ static MACHINE_CONFIG_START( p500_pal, p500_state )
|
||||
|
||||
MCFG_DEVICE_ADD(MOS6551A_TAG, MOS6551, XTAL_1_8432MHz)
|
||||
MCFG_MOS6551_IRQ_HANDLER(DEVWRITELINE(MOS6525_1_TAG, tpi6525_device, i4_w))
|
||||
MCFG_MOS6551_TXD_HANDLER(DEVWRITELINE(RS232_TAG, rs232_port_device, tx))
|
||||
MCFG_MOS6551_TXD_HANDLER(DEVWRITELINE(RS232_TAG, rs232_port_device, write_txd))
|
||||
|
||||
MCFG_MOS6526_ADD(MOS6526_TAG, VIC6569_CLOCK, 50, DEVWRITELINE(MOS6525_1_TAG, tpi6525_device, i2_w))
|
||||
MCFG_MOS6526_SERIAL_CALLBACKS(DEVWRITELINE(CBM2_USER_PORT_TAG, cbm2_user_port_device, cnt_w), DEVWRITELINE(CBM2_USER_PORT_TAG, cbm2_user_port_device, sp_w))
|
||||
@ -2252,10 +2253,10 @@ static MACHINE_CONFIG_START( p500_pal, p500_state )
|
||||
MCFG_CBM2_USER_PORT_ADD(CBM2_USER_PORT_TAG, p500_user_intf, cbm2_user_port_cards, NULL)
|
||||
|
||||
MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, NULL)
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE(MOS6551A_TAG, mos6551_device, rxd_w))
|
||||
MCFG_RS232_OUT_DCD_HANDLER(DEVWRITELINE(MOS6551A_TAG, mos6551_device, dcd_w))
|
||||
MCFG_RS232_OUT_DSR_HANDLER(DEVWRITELINE(MOS6551A_TAG, mos6551_device, dsr_w))
|
||||
MCFG_RS232_OUT_CTS_HANDLER(DEVWRITELINE(MOS6551A_TAG, mos6551_device, cts_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(MOS6551A_TAG, mos6551_device, rxd_w))
|
||||
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(MOS6551A_TAG, mos6551_device, dcd_w))
|
||||
MCFG_RS232_DSR_HANDLER(DEVWRITELINE(MOS6551A_TAG, mos6551_device, dsr_w))
|
||||
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(MOS6551A_TAG, mos6551_device, cts_w))
|
||||
|
||||
MCFG_QUICKLOAD_ADD("quickload", p500_state, p500, "p00,prg", CBM_QUICKLOAD_DELAY_SECONDS)
|
||||
|
||||
@ -2307,7 +2308,7 @@ static MACHINE_CONFIG_START( cbm2lp_ntsc, cbm2_state )
|
||||
|
||||
MCFG_DEVICE_ADD(MOS6551A_TAG, MOS6551, XTAL_1_8432MHz)
|
||||
MCFG_MOS6551_IRQ_HANDLER(DEVWRITELINE(MOS6525_1_TAG, tpi6525_device, i4_w))
|
||||
MCFG_MOS6551_TXD_HANDLER(DEVWRITELINE(RS232_TAG, rs232_port_device, tx))
|
||||
MCFG_MOS6551_TXD_HANDLER(DEVWRITELINE(RS232_TAG, rs232_port_device, write_txd))
|
||||
|
||||
MCFG_MOS6526_ADD(MOS6526_TAG, XTAL_18MHz/9, 60, DEVWRITELINE(MOS6525_1_TAG, tpi6525_device, i2_w))
|
||||
MCFG_MOS6526_SERIAL_CALLBACKS(DEVWRITELINE(CBM2_USER_PORT_TAG, cbm2_user_port_device, cnt_w), DEVWRITELINE(CBM2_USER_PORT_TAG, cbm2_user_port_device, sp_w))
|
||||
@ -2324,10 +2325,10 @@ static MACHINE_CONFIG_START( cbm2lp_ntsc, cbm2_state )
|
||||
MCFG_CBM2_USER_PORT_ADD(CBM2_USER_PORT_TAG, user_intf, cbm2_user_port_cards, NULL)
|
||||
|
||||
MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, NULL)
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE(MOS6551A_TAG, mos6551_device, rxd_w))
|
||||
MCFG_RS232_OUT_DCD_HANDLER(DEVWRITELINE(MOS6551A_TAG, mos6551_device, dcd_w))
|
||||
MCFG_RS232_OUT_DSR_HANDLER(DEVWRITELINE(MOS6551A_TAG, mos6551_device, dsr_w))
|
||||
MCFG_RS232_OUT_CTS_HANDLER(DEVWRITELINE(MOS6551A_TAG, mos6551_device, cts_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(MOS6551A_TAG, mos6551_device, rxd_w))
|
||||
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(MOS6551A_TAG, mos6551_device, dcd_w))
|
||||
MCFG_RS232_DSR_HANDLER(DEVWRITELINE(MOS6551A_TAG, mos6551_device, dsr_w))
|
||||
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(MOS6551A_TAG, mos6551_device, cts_w))
|
||||
|
||||
MCFG_QUICKLOAD_ADD("quickload", cbm2_state, cbmb, "p00,prg,t64", CBM_QUICKLOAD_DELAY_SECONDS)
|
||||
|
||||
|
@ -66,17 +66,19 @@ ToDo:
|
||||
#include "machine/terminal.h"
|
||||
#include "machine/wd_fdc.h"
|
||||
|
||||
#define TERMINAL_TAG "terminal"
|
||||
|
||||
class ccs_state : public driver_device
|
||||
{
|
||||
public:
|
||||
ccs_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag)
|
||||
, m_maincpu(*this, "maincpu")
|
||||
, m_terminal(*this, TERMINAL_TAG)
|
||||
, m_fdc (*this, "fdc")
|
||||
, m_floppy0(*this, "fdc:0")
|
||||
{ }
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_terminal(*this, TERMINAL_TAG),
|
||||
m_fdc (*this, "fdc"),
|
||||
m_floppy0(*this, "fdc:0")
|
||||
{
|
||||
}
|
||||
|
||||
DECLARE_DRIVER_INIT(ccs2810);
|
||||
DECLARE_DRIVER_INIT(ccs2422);
|
||||
|
@ -23,15 +23,17 @@ There's unknown usage of ports 11 thru 1B, 34, and F0 thru F2.
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "machine/terminal.h"
|
||||
|
||||
#define TERMINAL_TAG "terminal"
|
||||
|
||||
class ccs300_state : public driver_device
|
||||
{
|
||||
public:
|
||||
ccs300_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag)
|
||||
, m_maincpu(*this, "maincpu")
|
||||
, m_terminal(*this, TERMINAL_TAG)
|
||||
{ }
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_terminal(*this, TERMINAL_TAG)
|
||||
{
|
||||
}
|
||||
|
||||
DECLARE_DRIVER_INIT(ccs300);
|
||||
DECLARE_MACHINE_RESET(ccs300);
|
||||
|
@ -36,17 +36,19 @@ TODO
|
||||
#include "sound/wave.h"
|
||||
#include "sound/beep.h"
|
||||
|
||||
#define KEYBOARD_TAG "keyboard"
|
||||
|
||||
class cd2650_state : public driver_device
|
||||
{
|
||||
public:
|
||||
cd2650_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag)
|
||||
, m_p_videoram(*this, "videoram")
|
||||
, m_maincpu(*this, "maincpu")
|
||||
, m_beep(*this, "beeper")
|
||||
, m_cass(*this, "cassette")
|
||||
{ }
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_p_videoram(*this, "videoram"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_beep(*this, "beeper"),
|
||||
m_cass(*this, "cassette")
|
||||
{
|
||||
}
|
||||
|
||||
DECLARE_READ8_MEMBER(keyin_r);
|
||||
DECLARE_WRITE8_MEMBER(beep_w);
|
||||
@ -57,6 +59,7 @@ public:
|
||||
const UINT8 *m_p_chargen;
|
||||
UINT32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
required_shared_ptr<UINT8> m_p_videoram;
|
||||
|
||||
private:
|
||||
UINT8 m_term_data;
|
||||
virtual void machine_reset();
|
||||
|
@ -33,15 +33,18 @@
|
||||
#include "cpu/s2650/s2650.h"
|
||||
#include "machine/terminal.h"
|
||||
|
||||
#define TERMINAL_TAG "terminal"
|
||||
|
||||
class chaos_state : public driver_device
|
||||
{
|
||||
public:
|
||||
chaos_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_terminal(*this, TERMINAL_TAG),
|
||||
m_p_ram(*this, "p_ram") ,
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
m_terminal(*this, TERMINAL_TAG),
|
||||
m_p_ram(*this, "p_ram") ,
|
||||
m_maincpu(*this, "maincpu")
|
||||
{
|
||||
}
|
||||
|
||||
DECLARE_READ8_MEMBER(port1e_r);
|
||||
DECLARE_WRITE8_MEMBER(port1f_w);
|
||||
|
@ -10,15 +10,14 @@
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include "emu.h"
|
||||
#include "bus/centronics/ctronics.h"
|
||||
#include "bus/rs232/rs232.h"
|
||||
#include "cpu/m6502/m65c02.h"
|
||||
#include "machine/6522via.h"
|
||||
#include "machine/bankdev.h"
|
||||
#include "machine/mos6551.h"
|
||||
#include "machine/msm58321.h"
|
||||
#include "machine/ram.h"
|
||||
#include "machine/serial.h"
|
||||
#include "sound/speaker.h"
|
||||
#include "rendlay.h"
|
||||
#include "mcfglgcy.h"
|
||||
@ -729,15 +728,15 @@ static MACHINE_CONFIG_START(clcd, clcd_state)
|
||||
|
||||
MCFG_DEVICE_ADD("acia", MOS6551, XTAL_1_8432MHz)
|
||||
MCFG_MOS6551_IRQ_HANDLER(DEVWRITELINE("maincpu", m65c02_device, nmi_line))
|
||||
MCFG_MOS6551_TXD_HANDLER(DEVWRITELINE("rs232", rs232_port_device, tx))
|
||||
MCFG_MOS6551_RTS_HANDLER(DEVWRITELINE("rs232", rs232_port_device, rts_w))
|
||||
MCFG_MOS6551_DTR_HANDLER(DEVWRITELINE("rs232", rs232_port_device, dtr_w))
|
||||
MCFG_MOS6551_TXD_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_txd))
|
||||
MCFG_MOS6551_RTS_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_rts))
|
||||
MCFG_MOS6551_DTR_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_dtr))
|
||||
|
||||
MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, NULL)
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE("acia", mos6551_device, rxd_w))
|
||||
MCFG_RS232_OUT_DCD_HANDLER(DEVWRITELINE("acia", mos6551_device, dcd_w))
|
||||
MCFG_RS232_OUT_DSR_HANDLER(DEVWRITELINE("acia", mos6551_device, dsr_w))
|
||||
MCFG_RS232_OUT_CTS_HANDLER(DEVWRITELINE("via1", via6522_device, write_pb4))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("acia", mos6551_device, rxd_w))
|
||||
MCFG_RS232_DCD_HANDLER(DEVWRITELINE("acia", mos6551_device, dcd_w))
|
||||
MCFG_RS232_DSR_HANDLER(DEVWRITELINE("acia", mos6551_device, dsr_w))
|
||||
MCFG_RS232_CTS_HANDLER(DEVWRITELINE("via1", via6522_device, write_pb4))
|
||||
|
||||
MCFG_CENTRONICS_ADD("centronics", centronics_printers, "image")
|
||||
MCFG_CENTRONICS_BUSY_HANDLER(DEVWRITELINE("via1", via6522_device, write_pb6)) MCFG_DEVCB_XOR(1)
|
||||
|
@ -37,13 +37,17 @@ to be a save command.
|
||||
#include "cpu/i8085/i8085.h"
|
||||
#include "machine/terminal.h"
|
||||
|
||||
#define TERMINAL_TAG "terminal"
|
||||
|
||||
class cm1800_state : public driver_device
|
||||
{
|
||||
public:
|
||||
cm1800_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_terminal(*this, TERMINAL_TAG) ,
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
m_terminal(*this, TERMINAL_TAG) ,
|
||||
m_maincpu(*this, "maincpu")
|
||||
{
|
||||
}
|
||||
|
||||
DECLARE_READ8_MEMBER( term_status_r );
|
||||
DECLARE_READ8_MEMBER( term_r );
|
||||
|
@ -15,16 +15,18 @@
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "machine/terminal.h"
|
||||
|
||||
#define TERMINAL_TAG "terminal"
|
||||
|
||||
class codata_state : public driver_device
|
||||
{
|
||||
public:
|
||||
codata_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag)
|
||||
, m_p_base(*this, "rambase")
|
||||
, m_terminal(*this, TERMINAL_TAG)
|
||||
, m_maincpu(*this, "maincpu")
|
||||
{ }
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_p_base(*this, "rambase"),
|
||||
m_terminal(*this, TERMINAL_TAG),
|
||||
m_maincpu(*this, "maincpu")
|
||||
{
|
||||
}
|
||||
|
||||
DECLARE_READ16_MEMBER(keyin_r);
|
||||
DECLARE_READ16_MEMBER(status_r);
|
||||
|
@ -41,6 +41,7 @@
|
||||
******************************************************************************/
|
||||
|
||||
#include "includes/compis.h"
|
||||
#include "bus/rs232/rs232.h"
|
||||
|
||||
|
||||
|
||||
@ -651,15 +652,15 @@ static I8274_INTERFACE( mpsc_intf )
|
||||
{
|
||||
0, 0, 0, 0,
|
||||
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, serial_port_device, tx),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, rs232_port_device, dtr_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, rs232_port_device, rts_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, rs232_port_device, write_txd),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, rs232_port_device, write_dtr),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_A_TAG, rs232_port_device, write_rts),
|
||||
DEVCB_NULL,
|
||||
DEVCB_NULL,
|
||||
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_B_TAG, serial_port_device, tx),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_B_TAG, rs232_port_device, dtr_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_B_TAG, rs232_port_device, rts_w),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_B_TAG, rs232_port_device, write_txd),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_B_TAG, rs232_port_device, write_dtr),
|
||||
DEVCB_DEVICE_LINE_MEMBER(RS232_B_TAG, rs232_port_device, write_rts),
|
||||
DEVCB_NULL,
|
||||
DEVCB_NULL,
|
||||
|
||||
@ -774,14 +775,14 @@ static MACHINE_CONFIG_START( compis, compis_state )
|
||||
MCFG_CASSETTE_ADD(CASSETTE_TAG, compis_cassette_interface)
|
||||
|
||||
MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, NULL)
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE(I8274_TAG, z80dart_device, rxa_w))
|
||||
MCFG_RS232_OUT_DCD_HANDLER(DEVWRITELINE(I8274_TAG, z80dart_device, dcda_w))
|
||||
MCFG_RS232_OUT_CTS_HANDLER(DEVWRITELINE(I8274_TAG, z80dart_device, ctsa_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(I8274_TAG, z80dart_device, rxa_w))
|
||||
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(I8274_TAG, z80dart_device, dcda_w))
|
||||
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(I8274_TAG, z80dart_device, ctsa_w))
|
||||
|
||||
MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, NULL)
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE(I8274_TAG, z80dart_device, rxb_w))
|
||||
MCFG_RS232_OUT_DCD_HANDLER(DEVWRITELINE(I8274_TAG, z80dart_device, dcdb_w))
|
||||
MCFG_RS232_OUT_CTS_HANDLER(DEVWRITELINE(I8274_TAG, z80dart_device, ctsb_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(I8274_TAG, z80dart_device, rxb_w))
|
||||
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(I8274_TAG, z80dart_device, dcdb_w))
|
||||
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(I8274_TAG, z80dart_device, ctsb_w))
|
||||
|
||||
MCFG_CENTRONICS_ADD(CENTRONICS_TAG, centronics_printers, "image")
|
||||
|
||||
|
@ -25,11 +25,10 @@
|
||||
#define CRT5027_TAG "uf9"
|
||||
#define RS232_TAG "rs232"
|
||||
|
||||
#include "emu.h"
|
||||
#include "bus/rs232/rs232.h"
|
||||
#include "cpu/i8085/i8085.h"
|
||||
#include "machine/compclr_flp.h"
|
||||
#include "machine/ram.h"
|
||||
#include "machine/serial.h"
|
||||
#include "machine/tms5501.h"
|
||||
#include "video/tms9927.h"
|
||||
|
||||
@ -411,15 +410,15 @@ WRITE_LINE_MEMBER( compucolor2_state::xmt_w )
|
||||
switch ((m_xo >> 4) & 0x03)
|
||||
{
|
||||
case 0:
|
||||
m_rs232->tx(state);
|
||||
m_rs232->write_txd(state);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
m_floppy0->tx(state);
|
||||
m_floppy0->write_txd(state);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
m_floppy1->tx(state);
|
||||
m_floppy1->write_txd(state);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -439,8 +438,8 @@ void compucolor2_state::machine_start()
|
||||
|
||||
void compucolor2_state::machine_reset()
|
||||
{
|
||||
m_rs232->rts_w(1);
|
||||
m_rs232->dtr_w(1);
|
||||
m_rs232->write_rts(1);
|
||||
m_rs232->write_dtr(1);
|
||||
}
|
||||
|
||||
void compucolor2_state::palette_init()
|
||||
@ -474,12 +473,15 @@ static MACHINE_CONFIG_START( compucolor2, compucolor2_state )
|
||||
MCFG_TMS5501_XMT_CALLBACK(WRITELINE(compucolor2_state, xmt_w))
|
||||
MCFG_TMS5501_XI_CALLBACK(READ8(compucolor2_state, xi_r))
|
||||
MCFG_TMS5501_XO_CALLBACK(WRITE8(compucolor2_state, xo_w))
|
||||
|
||||
MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, NULL)
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE(TMS5501_TAG, tms5501_device, rcv_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(TMS5501_TAG, tms5501_device, rcv_w))
|
||||
|
||||
MCFG_COMPUCOLOR_FLOPPY_PORT_ADD("cd0", compucolor_floppy_port_devices, "floppy")
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE(TMS5501_TAG, tms5501_device, rcv_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(TMS5501_TAG, tms5501_device, rcv_w))
|
||||
|
||||
MCFG_COMPUCOLOR_FLOPPY_PORT_ADD("cd1", compucolor_floppy_port_devices, NULL)
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE(TMS5501_TAG, tms5501_device, rcv_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(TMS5501_TAG, tms5501_device, rcv_w))
|
||||
|
||||
// internal ram
|
||||
MCFG_RAM_ADD(RAM_TAG)
|
||||
|
@ -49,16 +49,18 @@ I/O ports: These ranges are what is guessed
|
||||
#include "machine/z80ctc.h"
|
||||
#include "machine/terminal.h"
|
||||
|
||||
#define TERMINAL_TAG "terminal"
|
||||
|
||||
class czk80_state : public driver_device
|
||||
{
|
||||
public:
|
||||
czk80_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag)
|
||||
, m_maincpu(*this, "maincpu")
|
||||
, m_terminal(*this, TERMINAL_TAG)
|
||||
, m_fdc(*this, "fdc")
|
||||
{ }
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_terminal(*this, TERMINAL_TAG),
|
||||
m_fdc(*this, "fdc")
|
||||
{
|
||||
}
|
||||
|
||||
DECLARE_DRIVER_INIT(czk80);
|
||||
DECLARE_MACHINE_RESET(czk80);
|
||||
@ -162,8 +164,8 @@ static Z80DART_INTERFACE( dart_intf )
|
||||
0, 0, 0, 0,
|
||||
|
||||
DEVCB_NULL,//DEVCB_DEVICE_LINE_MEMBER("rs232", serial_port_device, tx),
|
||||
DEVCB_NULL,//DEVCB_DEVICE_LINE_MEMBER("rs232", rs232_port_device, dtr_w),
|
||||
DEVCB_NULL,//DEVCB_DEVICE_LINE_MEMBER("rs232", rs232_port_device, rts_w),
|
||||
DEVCB_NULL,//DEVCB_DEVICE_LINE_MEMBER("rs232", rs232_port_device, write_dtr),
|
||||
DEVCB_NULL,//DEVCB_DEVICE_LINE_MEMBER("rs232", rs232_port_device, write_rts),
|
||||
DEVCB_NULL,
|
||||
DEVCB_NULL,
|
||||
|
||||
|
@ -86,15 +86,17 @@ devices.
|
||||
#include "cpu/m6809/m6809.h"
|
||||
#include "machine/terminal.h"
|
||||
|
||||
#define TERMINAL_TAG "terminal"
|
||||
|
||||
class d6809_state : public driver_device
|
||||
{
|
||||
public:
|
||||
d6809_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_terminal(*this, TERMINAL_TAG)
|
||||
{ }
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_terminal(*this, TERMINAL_TAG)
|
||||
{
|
||||
}
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<generic_terminal_device> m_terminal;
|
||||
|
@ -273,13 +273,12 @@ dgc (dg(no!spam)cx@mac.com)
|
||||
#undef SERIAL_TO_STDERR
|
||||
|
||||
/* Core includes */
|
||||
#include "emu.h"
|
||||
#include "bus/rs232/rs232.h"
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "cpu/tms32010/tms32010.h"
|
||||
#include "machine/n68681.h"
|
||||
#include "machine/x2212.h"
|
||||
#include "sound/dac.h"
|
||||
#include "machine/serial.h"
|
||||
|
||||
|
||||
class dectalk_state : public driver_device
|
||||
@ -296,7 +295,9 @@ public:
|
||||
m_dsp(*this, "dsp"),
|
||||
m_duart(*this, "duartn68681"),
|
||||
m_nvram(*this, "x2212"),
|
||||
m_dac(*this, "dac") { }
|
||||
m_dac(*this, "dac")
|
||||
{
|
||||
}
|
||||
|
||||
// input fifo, between m68k and tms32010
|
||||
UINT16 m_infifo[32]; // technically eight 74LS224 4bit*16stage FIFO chips, arranged as a 32 stage, 16-bit wide fifo
|
||||
@ -883,7 +884,7 @@ static MACHINE_CONFIG_START( dectalk, dectalk_state )
|
||||
MCFG_DUARTN68681_ADD( "duartn68681", XTAL_3_6864MHz ) /* 2681 duart (not 68681!); Y3 3.6864MHz Xtal */
|
||||
MCFG_DUARTN68681_IRQ_CALLBACK(WRITELINE(dectalk_state, dectalk_duart_irq_handler))
|
||||
MCFG_DUARTN68681_A_TX_CALLBACK(WRITELINE(dectalk_state, dectalk_duart_txa))
|
||||
MCFG_DUARTN68681_B_TX_CALLBACK(DEVWRITELINE("rs232", serial_port_device, tx))
|
||||
MCFG_DUARTN68681_B_TX_CALLBACK(DEVWRITELINE("rs232", rs232_port_device, write_txd))
|
||||
MCFG_DUARTN68681_INPORT_CALLBACK(READ8(dectalk_state, dectalk_duart_input))
|
||||
MCFG_DUARTN68681_OUTPORT_CALLBACK(WRITE8(dectalk_state, dectalk_duart_output))
|
||||
|
||||
@ -908,7 +909,7 @@ static MACHINE_CONFIG_START( dectalk, dectalk_state )
|
||||
/* Y2 is a 3.579545 MHz xtal for the dtmf decoder chip */
|
||||
|
||||
MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, "serial_terminal")
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE("duartn68681", duartn68681_device, rx_b_w))
|
||||
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("duartn68681", duartn68681_device, rx_b_w))
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
|
||||
|
@ -67,21 +67,22 @@
|
||||
#include "machine/ram.h"
|
||||
#include "digel804.lh"
|
||||
|
||||
#define TERMINAL_TAG "terminal"
|
||||
|
||||
class digel804_state : public driver_device
|
||||
{
|
||||
public:
|
||||
digel804_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_terminal(*this, TERMINAL_TAG),
|
||||
m_speaker(*this, "speaker"),
|
||||
m_acia(*this, "acia"),
|
||||
m_vfd(*this, "vfd"),
|
||||
m_kb(*this, "74c923"),
|
||||
m_ram(*this, RAM_TAG)
|
||||
//, m_main_ram(*this, "main_ram")
|
||||
{ }
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_terminal(*this, TERMINAL_TAG),
|
||||
m_speaker(*this, "speaker"),
|
||||
m_acia(*this, "acia"),
|
||||
m_vfd(*this, "vfd"),
|
||||
m_kb(*this, "74c923"),
|
||||
m_ram(*this, RAM_TAG)
|
||||
{
|
||||
}
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<generic_terminal_device> m_terminal;
|
||||
|
@ -26,15 +26,17 @@ the monitor and goes straight to "Joining HiNet".
|
||||
#include "cpu/i86/i86.h"
|
||||
#include "machine/terminal.h"
|
||||
|
||||
#define TERMINAL_TAG "terminal"
|
||||
|
||||
class dms86_state : public driver_device
|
||||
{
|
||||
public:
|
||||
dms86_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_terminal(*this, TERMINAL_TAG)
|
||||
{ }
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_terminal(*this, TERMINAL_TAG)
|
||||
{
|
||||
}
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<generic_terminal_device> m_terminal;
|
||||
|
@ -22,15 +22,17 @@ Both roms contain Z80 code.
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "machine/terminal.h"
|
||||
|
||||
#define TERMINAL_TAG "terminal"
|
||||
|
||||
class dsb46_state : public driver_device
|
||||
{
|
||||
public:
|
||||
dsb46_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag)
|
||||
, m_maincpu(*this, "maincpu")
|
||||
, m_terminal(*this, TERMINAL_TAG)
|
||||
{ }
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_terminal(*this, TERMINAL_TAG)
|
||||
{
|
||||
}
|
||||
|
||||
DECLARE_READ8_MEMBER(port00_r);
|
||||
DECLARE_READ8_MEMBER(port01_r);
|
||||
|
@ -11,16 +11,18 @@
|
||||
#include "cpu/i8085/i8085.h"
|
||||
#include "machine/terminal.h"
|
||||
|
||||
#define TERMINAL_TAG "terminal"
|
||||
|
||||
class dual68_state : public driver_device
|
||||
{
|
||||
public:
|
||||
dual68_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_terminal(*this, TERMINAL_TAG)
|
||||
,
|
||||
m_p_ram(*this, "p_ram"){ }
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_terminal(*this, TERMINAL_TAG),
|
||||
m_p_ram(*this, "p_ram")
|
||||
{
|
||||
}
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<generic_terminal_device> m_terminal;
|
||||
|
@ -22,6 +22,7 @@
|
||||
#define VIA6522_0_TAG "via6522_0"
|
||||
#define VIA6522_1_TAG "via6522_1"
|
||||
#define MC6845_TAG "mc6845"
|
||||
#define KEYBOARD_TAG "keyboard"
|
||||
|
||||
class ec65_state : public driver_device
|
||||
{
|
||||
@ -31,7 +32,9 @@ public:
|
||||
m_via_0(*this, VIA6522_0_TAG),
|
||||
m_via_1(*this, VIA6522_1_TAG),
|
||||
m_p_videoram(*this, "videoram"),
|
||||
m_maincpu(*this, "maincpu") { }
|
||||
m_maincpu(*this, "maincpu")
|
||||
{
|
||||
}
|
||||
|
||||
DECLARE_WRITE8_MEMBER(kbd_put);
|
||||
UINT8 *m_p_chargen;
|
||||
|
@ -254,7 +254,7 @@ READ8_MEMBER( ep64_state::rd1_r )
|
||||
data |= m_centronics_busy << 3;
|
||||
|
||||
// serial
|
||||
data |= m_rs232->rx() << 4;
|
||||
data |= m_rs232->rxd_r() << 4;
|
||||
data |= m_rs232->cts_r() << 5;
|
||||
|
||||
// cassette
|
||||
@ -286,8 +286,8 @@ WRITE8_MEMBER( ep64_state::wr2_w )
|
||||
*/
|
||||
|
||||
// serial
|
||||
m_rs232->tx(!BIT(data, 0));
|
||||
m_rs232->rts_w(!BIT(data, 1));
|
||||
m_rs232->write_txd(!BIT(data, 0));
|
||||
m_rs232->write_rts(!BIT(data, 1));
|
||||
}
|
||||
|
||||
|
||||
@ -540,7 +540,7 @@ static MACHINE_CONFIG_START( ep64, ep64_state )
|
||||
MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG)
|
||||
|
||||
MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, NULL)
|
||||
MCFG_RS232_OUT_CTS_HANDLER(DEVWRITELINE(DAVE_TAG, dave_device, int2_w))
|
||||
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(DAVE_TAG, dave_device, int2_w))
|
||||
|
||||
MCFG_CASSETTE_ADD(CASSETTE1_TAG, cass_intf)
|
||||
MCFG_CASSETTE_ADD(CASSETTE2_TAG, cass_intf)
|
||||
|
@ -178,16 +178,14 @@ NOTES:
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "bus/midi/midi.h"
|
||||
#include "bus/midi/midiinport.h"
|
||||
#include "bus/midi/midioutport.h"
|
||||
#include "cpu/m6809/m6809.h"
|
||||
#include "sound/es5503.h"
|
||||
#include "machine/n68681.h"
|
||||
#include "machine/wd_fdc.h"
|
||||
|
||||
#include "machine/esqpanel.h"
|
||||
#include "machine/serial.h"
|
||||
#include "machine/midiinport.h"
|
||||
#include "machine/midioutport.h"
|
||||
|
||||
#define WD1772_TAG "wd1772"
|
||||
|
||||
@ -399,7 +397,7 @@ public:
|
||||
required_device<esq1_filters> m_filters;
|
||||
optional_device<wd1772_t> m_fdc;
|
||||
optional_device<esqpanel2x40_device> m_panel;
|
||||
optional_device<serial_port_device> m_mdout;
|
||||
optional_device<midi_port_device> m_mdout;
|
||||
|
||||
DECLARE_READ8_MEMBER(wd1772_r);
|
||||
DECLARE_WRITE8_MEMBER(wd1772_w);
|
||||
@ -559,7 +557,7 @@ WRITE8_MEMBER(esq1_state::duart_output)
|
||||
// MIDI send
|
||||
WRITE_LINE_MEMBER(esq1_state::duart_tx_a)
|
||||
{
|
||||
m_mdout->tx(state);
|
||||
m_mdout->write_txd(state);
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER(esq1_state::duart_tx_b)
|
||||
@ -613,10 +611,10 @@ static MACHINE_CONFIG_START( esq1, esq1_state )
|
||||
|
||||
MCFG_ESQPANEL2x40_ADD("panel", esqpanel_config)
|
||||
|
||||
MCFG_SERIAL_PORT_ADD("mdin", midiin_slot, "midiin")
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE("duart", duartn68681_device, rx_a_w)) // route MIDI Tx send directly to 68681 channel A Rx
|
||||
MCFG_MIDI_PORT_ADD("mdin", midiin_slot, "midiin")
|
||||
MCFG_MIDI_RX_HANDLER(DEVWRITELINE("duart", duartn68681_device, rx_a_w)) // route MIDI Tx send directly to 68681 channel A Rx
|
||||
|
||||
MCFG_SERIAL_PORT_ADD("mdout", midiout_slot, "midiout")
|
||||
MCFG_MIDI_PORT_ADD("mdout", midiout_slot, "midiout")
|
||||
|
||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||
|
||||
|
@ -126,7 +126,9 @@
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
#include "emu.h"
|
||||
#include "bus/midi/midi.h"
|
||||
#include "bus/midi/midiinport.h"
|
||||
#include "bus/midi/midioutport.h"
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "sound/es5506.h"
|
||||
#include "sound/esqpump.h"
|
||||
@ -137,9 +139,6 @@
|
||||
#include "formats/esq16_dsk.h"
|
||||
#include "machine/esqvfd.h"
|
||||
#include "machine/esqpanel.h"
|
||||
#include "machine/serial.h"
|
||||
#include "machine/midiinport.h"
|
||||
#include "machine/midioutport.h"
|
||||
|
||||
#define GENERIC (0)
|
||||
#define EPS (1)
|
||||
@ -183,7 +182,7 @@ public:
|
||||
optional_device<wd1772_t> m_fdc;
|
||||
required_device<esqpanel_device> m_panel;
|
||||
optional_device<hd63450_device> m_dmac;
|
||||
required_device<serial_port_device> m_mdout;
|
||||
required_device<midi_port_device> m_mdout;
|
||||
|
||||
virtual void machine_start();
|
||||
virtual void machine_reset();
|
||||
@ -502,7 +501,7 @@ WRITE8_MEMBER(esq5505_state::duart_output)
|
||||
// MIDI send
|
||||
WRITE_LINE_MEMBER(esq5505_state::duart_tx_a)
|
||||
{
|
||||
m_mdout->tx(state);
|
||||
m_mdout->write_txd(state);
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER(esq5505_state::duart_tx_b)
|
||||
@ -660,10 +659,10 @@ static MACHINE_CONFIG_START( vfx, esq5505_state )
|
||||
MCFG_DUARTN68681_OUTPORT_CALLBACK(WRITE8(esq5505_state, duart_output))
|
||||
MCFG_DUARTN68681_SET_EXTERNAL_CLOCKS(500000, 500000, 1000000, 1000000)
|
||||
|
||||
MCFG_SERIAL_PORT_ADD("mdin", midiin_slot, "midiin")
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE("duart", duartn68681_device, rx_a_w)) // route MIDI Tx send directly to 68681 channel A Rx
|
||||
MCFG_MIDI_PORT_ADD("mdin", midiin_slot, "midiin")
|
||||
MCFG_MIDI_RX_HANDLER(DEVWRITELINE("duart", duartn68681_device, rx_a_w)) // route MIDI Tx send directly to 68681 channel A Rx
|
||||
|
||||
MCFG_SERIAL_PORT_ADD("mdout", midiout_slot, "midiout")
|
||||
MCFG_MIDI_PORT_ADD("mdout", midiout_slot, "midiout")
|
||||
|
||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||
|
||||
@ -722,10 +721,10 @@ static MACHINE_CONFIG_START(vfx32, esq5505_state)
|
||||
MCFG_DUARTN68681_OUTPORT_CALLBACK(WRITE8(esq5505_state, duart_output))
|
||||
MCFG_DUARTN68681_SET_EXTERNAL_CLOCKS(500000, 500000, 1000000, 1000000)
|
||||
|
||||
MCFG_SERIAL_PORT_ADD("mdin", midiin_slot, "midiin")
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE("duart", duartn68681_device, rx_a_w)) // route MIDI Tx send directly to 68681 channel A Rx
|
||||
MCFG_MIDI_PORT_ADD("mdin", midiin_slot, "midiin")
|
||||
MCFG_MIDI_RX_HANDLER(DEVWRITELINE("duart", duartn68681_device, rx_a_w)) // route MIDI Tx send directly to 68681 channel A Rx
|
||||
|
||||
MCFG_SERIAL_PORT_ADD("mdout", midiout_slot, "midiout")
|
||||
MCFG_MIDI_PORT_ADD("mdout", midiout_slot, "midiout")
|
||||
|
||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||
|
||||
|
@ -21,15 +21,14 @@
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "bus/midi/midi.h"
|
||||
#include "bus/midi/midiinport.h"
|
||||
#include "bus/midi/midioutport.h"
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "cpu/es5510/es5510.h"
|
||||
#include "sound/es5506.h"
|
||||
#include "machine/n68681.h"
|
||||
#include "machine/esqpanel.h"
|
||||
#include "machine/serial.h"
|
||||
#include "machine/midiinport.h"
|
||||
#include "machine/midioutport.h"
|
||||
|
||||
class esqkt_state : public driver_device
|
||||
{
|
||||
@ -47,7 +46,7 @@ public:
|
||||
required_device<es5510_device> m_esp;
|
||||
required_device<duartn68681_device> m_duart;
|
||||
required_device<esqpanel2x40_sq1_device> m_sq1panel;
|
||||
required_device<serial_port_device> m_mdout;
|
||||
required_device<midi_port_device> m_mdout;
|
||||
|
||||
virtual void machine_reset();
|
||||
|
||||
@ -189,7 +188,7 @@ WRITE8_MEMBER(esqkt_state::duart_output)
|
||||
|
||||
WRITE_LINE_MEMBER(esqkt_state::duart_tx_a)
|
||||
{
|
||||
m_mdout->tx(state);
|
||||
m_mdout->write_txd(state);
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER(esqkt_state::duart_tx_b)
|
||||
@ -250,10 +249,10 @@ static MACHINE_CONFIG_START( kt, esqkt_state )
|
||||
MCFG_DUARTN68681_SET_EXTERNAL_CLOCKS(500000, 500000, 1000000, 1000000)
|
||||
MCFG_DUARTN68681_SET_EXTERNAL_CLOCKS(500000, 500000, 1000000, 1000000)
|
||||
|
||||
MCFG_SERIAL_PORT_ADD("mdin", midiin_slot, "midiin")
|
||||
MCFG_SERIAL_OUT_RX_HANDLER(DEVWRITELINE("duart", duartn68681_device, rx_a_w)) // route MIDI Tx send directly to 68681 channel A Rx
|
||||
MCFG_MIDI_PORT_ADD("mdin", midiin_slot, "midiin")
|
||||
MCFG_MIDI_RX_HANDLER(DEVWRITELINE("duart", duartn68681_device, rx_a_w)) // route MIDI Tx send directly to 68681 channel A Rx
|
||||
|
||||
MCFG_SERIAL_PORT_ADD("mdout", midiout_slot, "midiout")
|
||||
MCFG_MIDI_PORT_ADD("mdout", midiout_slot, "midiout")
|
||||
|
||||
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
|
||||
MCFG_SOUND_ADD("ensoniq", ES5506, XTAL_16MHz)
|
||||
|
@ -15,14 +15,17 @@
|
||||
#include "cpu/tms9900/tms9995.h"
|
||||
#include "machine/terminal.h"
|
||||
|
||||
#define TERMINAL_TAG "terminal"
|
||||
|
||||
class evmbug_state : public driver_device
|
||||
{
|
||||
public:
|
||||
evmbug_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag)
|
||||
, m_maincpu(*this, "maincpu")
|
||||
, m_terminal(*this, TERMINAL_TAG)
|
||||
{ }
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_terminal(*this, TERMINAL_TAG)
|
||||
{
|
||||
}
|
||||
|
||||
DECLARE_READ8_MEMBER(rs232_r);
|
||||
DECLARE_WRITE8_MEMBER(rs232_w);
|
||||
|
@ -151,7 +151,7 @@ READ_LINE_MEMBER( exp85_state::sid_r )
|
||||
}
|
||||
else
|
||||
{
|
||||
data = m_rs232->rx();
|
||||
data = m_rs232->rxd_r();
|
||||
}
|
||||
|
||||
return data;
|
||||
@ -165,7 +165,7 @@ WRITE_LINE_MEMBER( exp85_state::sod_w )
|
||||
}
|
||||
else
|
||||
{
|
||||
m_rs232->tx(state);
|
||||
m_rs232->write_txd(state);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -17,15 +17,18 @@ Interrupts: INT6 is output of Timer 2, INT7 is output of Timer 3 (refresh),
|
||||
#include "cpu/m68000/m68000.h"
|
||||
#include "machine/terminal.h"
|
||||
|
||||
#define TERMINAL_TAG "terminal"
|
||||
|
||||
class ft68m_state : public driver_device
|
||||
{
|
||||
public:
|
||||
ft68m_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag)
|
||||
, m_p_base(*this, "rambase")
|
||||
, m_maincpu(*this, "maincpu")
|
||||
, m_terminal(*this, TERMINAL_TAG)
|
||||
{ }
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_p_base(*this, "rambase"),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_terminal(*this, TERMINAL_TAG)
|
||||
{
|
||||
}
|
||||
|
||||
DECLARE_WRITE8_MEMBER(kbd_put);
|
||||
DECLARE_READ16_MEMBER(keyin_r);
|
||||
|
@ -39,6 +39,7 @@
|
||||
#include "machine/ins8250.h"
|
||||
#include "machine/keyboard.h"
|
||||
|
||||
#define KEYBOARD_TAG "keyboard"
|
||||
|
||||
#define H19_CLOCK (XTAL_12_288MHz / 6)
|
||||
#define H19_BEEP_FRQ (H19_CLOCK / 1024)
|
||||
@ -54,12 +55,13 @@ public:
|
||||
|
||||
h19_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_crtc(*this, "crtc"),
|
||||
m_ace(*this, "ins8250"),
|
||||
m_beep(*this, "beeper"),
|
||||
m_p_videoram(*this, "videoram")
|
||||
{ }
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_crtc(*this, "crtc"),
|
||||
m_ace(*this, "ins8250"),
|
||||
m_beep(*this, "beeper"),
|
||||
m_p_videoram(*this, "videoram")
|
||||
{
|
||||
}
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<mc6845_device> m_crtc;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user