mirror of
https://github.com/holub/mame
synced 2025-04-30 11:50:30 +03:00
prose2k: Use real serial terminal
This commit is contained in:
parent
aaff2f9c47
commit
c5ee763de0
@ -113,7 +113,9 @@
|
|||||||
#include "emu.h"
|
#include "emu.h"
|
||||||
#include "includes/tsispch.h"
|
#include "includes/tsispch.h"
|
||||||
|
|
||||||
|
#include "bus/rs232/rs232.h"
|
||||||
#include "cpu/i86/i86.h"
|
#include "cpu/i86/i86.h"
|
||||||
|
#include "machine/clock.h"
|
||||||
#include "machine/i8251.h"
|
#include "machine/i8251.h"
|
||||||
#include "sound/dac.h"
|
#include "sound/dac.h"
|
||||||
#include "sound/volt_reg.h"
|
#include "sound/volt_reg.h"
|
||||||
@ -391,19 +393,27 @@ MACHINE_CONFIG_START(tsispch_state::prose2k)
|
|||||||
|
|
||||||
/* uarts */
|
/* uarts */
|
||||||
MCFG_DEVICE_ADD("i8251a_u15", I8251, 0)
|
MCFG_DEVICE_ADD("i8251a_u15", I8251, 0)
|
||||||
// (todo: proper hookup, currently using hack w/i8251_receive_character())
|
MCFG_I8251_TXD_HANDLER(WRITELINE("rs232", rs232_port_device, write_txd))
|
||||||
|
MCFG_I8251_DTR_HANDLER(WRITELINE("rs232", rs232_port_device, write_dtr))
|
||||||
|
MCFG_I8251_RTS_HANDLER(WRITELINE("rs232", rs232_port_device, write_rts))
|
||||||
MCFG_I8251_RXRDY_HANDLER(WRITELINE(*this, tsispch_state, i8251_rxrdy_int))
|
MCFG_I8251_RXRDY_HANDLER(WRITELINE(*this, tsispch_state, i8251_rxrdy_int))
|
||||||
MCFG_I8251_TXRDY_HANDLER(WRITELINE(*this, tsispch_state, i8251_txrdy_int))
|
MCFG_I8251_TXRDY_HANDLER(WRITELINE(*this, tsispch_state, i8251_txrdy_int))
|
||||||
MCFG_I8251_TXEMPTY_HANDLER(WRITELINE(*this, tsispch_state, i8251_txempty_int))
|
MCFG_I8251_TXEMPTY_HANDLER(WRITELINE(*this, tsispch_state, i8251_txempty_int))
|
||||||
|
|
||||||
|
clock_device &clock(CLOCK(config, "baudclock", 153600));
|
||||||
|
clock.signal_handler().set("i8251a_u15", FUNC(i8251_device::write_txc));
|
||||||
|
clock.signal_handler().append("i8251a_u15", FUNC(i8251_device::write_rxc));
|
||||||
|
|
||||||
/* sound hardware */
|
/* sound hardware */
|
||||||
SPEAKER(config, "speaker").front_center();
|
SPEAKER(config, "speaker").front_center();
|
||||||
MCFG_DEVICE_ADD("dac", DAC_12BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) // unknown DAC (TODO: correctly figure out how the DAC works; apparently it is connected to the serial output of the upd7720, which will be "fun" to connect up)
|
MCFG_DEVICE_ADD("dac", DAC_12BIT_R2R, 0) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "speaker", 1.0) // unknown DAC (TODO: correctly figure out how the DAC works; apparently it is connected to the serial output of the upd7720, which will be "fun" to connect up)
|
||||||
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
|
MCFG_DEVICE_ADD("vref", VOLTAGE_REGULATOR, 0) MCFG_VOLTAGE_REGULATOR_OUTPUT(5.0)
|
||||||
MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
|
MCFG_SOUND_ROUTE(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
|
||||||
|
|
||||||
MCFG_DEVICE_ADD(TERMINAL_TAG, GENERIC_TERMINAL, 0)
|
rs232_port_device &rs232(RS232_PORT(config, "rs232", default_rs232_devices, "terminal"));
|
||||||
MCFG_GENERIC_TERMINAL_KEYBOARD_CB(DEVPUT("i8251a_u15", i8251_device, receive_character))
|
rs232.rxd_handler().set("i8251a_u15", FUNC(i8251_device::write_rxd));
|
||||||
|
rs232.dsr_handler().set("i8251a_u15", FUNC(i8251_device::write_dsr));
|
||||||
|
rs232.cts_handler().set("i8251a_u15", FUNC(i8251_device::write_cts));
|
||||||
MACHINE_CONFIG_END
|
MACHINE_CONFIG_END
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
@ -13,9 +13,6 @@
|
|||||||
|
|
||||||
#include "cpu/upd7725/upd7725.h"
|
#include "cpu/upd7725/upd7725.h"
|
||||||
#include "machine/pic8259.h"
|
#include "machine/pic8259.h"
|
||||||
#include "machine/terminal.h"
|
|
||||||
|
|
||||||
#define TERMINAL_TAG "terminal"
|
|
||||||
|
|
||||||
class tsispch_state : public driver_device
|
class tsispch_state : public driver_device
|
||||||
{
|
{
|
||||||
@ -24,7 +21,6 @@ public:
|
|||||||
: driver_device(mconfig, type, tag),
|
: driver_device(mconfig, type, tag),
|
||||||
m_maincpu(*this, "maincpu"),
|
m_maincpu(*this, "maincpu"),
|
||||||
m_dsp(*this, "dsp"),
|
m_dsp(*this, "dsp"),
|
||||||
m_terminal(*this, TERMINAL_TAG),
|
|
||||||
m_pic(*this, "pic8259")
|
m_pic(*this, "pic8259")
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -55,7 +51,6 @@ private:
|
|||||||
|
|
||||||
required_device<cpu_device> m_maincpu;
|
required_device<cpu_device> m_maincpu;
|
||||||
required_device<upd7725_device> m_dsp;
|
required_device<upd7725_device> m_dsp;
|
||||||
required_device<generic_terminal_device> m_terminal;
|
|
||||||
required_device<pic8259_device> m_pic;
|
required_device<pic8259_device> m_pic;
|
||||||
|
|
||||||
uint8_t m_paramReg; // status leds and resets and etc
|
uint8_t m_paramReg; // status leds and resets and etc
|
||||||
|
Loading…
Reference in New Issue
Block a user