summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/jade.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/jade.cpp')
-rw-r--r--src/mame/drivers/jade.cpp31
1 files changed, 23 insertions, 8 deletions
diff --git a/src/mame/drivers/jade.cpp b/src/mame/drivers/jade.cpp
index e12e6f00530..e9bf5ee37f9 100644
--- a/src/mame/drivers/jade.cpp
+++ b/src/mame/drivers/jade.cpp
@@ -2,7 +2,10 @@
// copyright-holders:Robbbert
/***************************************************************************
- Jade JGZ80 Single board computer on a S100 card.
+ Jade JGZ80 (with Serial Parallel Interrupt Controller)
+
+ Single board Z80 computer on a S100 card.
+ The SPIO board adds four CTCs, two SIOs and one PIO.
2013-09-12 Skeleton driver.
@@ -15,8 +18,9 @@
#include "emu.h"
#include "cpu/z80/z80.h"
-#include "machine/z80sio.h"
#include "machine/clock.h"
+#include "machine/z80ctc.h"
+#include "machine/z80sio.h"
#include "bus/rs232/rs232.h"
@@ -42,15 +46,20 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START(jade_io, AS_IO, 8, jade_state)
ADDRESS_MAP_UNMAP_HIGH
ADDRESS_MAP_GLOBAL_MASK(0xff)
- AM_RANGE(0x28, 0x28) // writes 45, 0D at start
+ AM_RANGE(0x28, 0x2b) AM_DEVREADWRITE("ctc2", z80ctc_device, read, write)
AM_RANGE(0x30, 0x33) AM_DEVREADWRITE("sio", z80sio_device, cd_ba_r, cd_ba_w)
- AM_RANGE(0x43, 0x43) AM_READNOP // writes 01, 80 then continually reads
+ AM_RANGE(0x40, 0x43) AM_DEVREADWRITE("ctc1", z80ctc_device, read, write)
ADDRESS_MAP_END
/* Input ports */
static INPUT_PORTS_START( jade )
INPUT_PORTS_END
+static DEVICE_INPUT_DEFAULTS_START( terminal )
+ DEVICE_INPUT_DEFAULTS( "RS232_RXBAUD", 0xff, RS232_BAUD_9615 )
+ DEVICE_INPUT_DEFAULTS( "RS232_TXBAUD", 0xff, RS232_BAUD_9615 )
+DEVICE_INPUT_DEFAULTS_END
+
static MACHINE_CONFIG_START( jade )
/* basic machine hardware */
@@ -58,9 +67,14 @@ static MACHINE_CONFIG_START( jade )
MCFG_CPU_PROGRAM_MAP(jade_mem)
MCFG_CPU_IO_MAP(jade_io)
- MCFG_DEVICE_ADD("uart_clock", CLOCK, 153600)
- MCFG_CLOCK_SIGNAL_HANDLER(DEVWRITELINE("sio", z80sio_device, txca_w))
- MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("sio", z80sio_device, rxca_w))
+ MCFG_DEVICE_ADD("ctc1", Z80CTC, XTAL_4MHz)
+
+ MCFG_DEVICE_ADD("ctc2", Z80CTC, XTAL_4MHz)
+ MCFG_Z80CTC_ZC0_CB(DEVWRITELINE("sio", z80sio_device, rxca_w))
+ MCFG_DEVCB_CHAIN_OUTPUT(DEVWRITELINE("sio", z80sio_device, txca_w))
+
+ MCFG_DEVICE_ADD("trg0", CLOCK, XTAL_4MHz / 2)
+ MCFG_CLOCK_SIGNAL_HANDLER(DEVWRITELINE("ctc2", z80ctc_device, trg0))
/* Devices */
MCFG_DEVICE_ADD("sio", Z80SIO, XTAL_4MHz)
@@ -72,6 +86,7 @@ static MACHINE_CONFIG_START( jade )
MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, "terminal")
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("sio", z80sio_device, rxa_w))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE("sio", z80sio_device, ctsa_w))
+ MCFG_DEVICE_CARD_DEVICE_INPUT_DEFAULTS("terminal", terminal)
MACHINE_CONFIG_END
/* ROM definition */
@@ -83,4 +98,4 @@ ROM_END
/* Driver */
// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS
-COMP( 1983, jade, 0, 0, jade, jade, jade_state, 0, "Jade", "JGZ80", MACHINE_NOT_WORKING | MACHINE_NO_SOUND_HW )
+COMP( 1983, jade, 0, 0, jade, jade, jade_state, 0, "Jade Computer Products", "JGZ80", MACHINE_NOT_WORKING | MACHINE_NO_SOUND_HW )