diff options
author | 2013-10-20 16:35:08 +0000 | |
---|---|---|
committer | 2013-10-20 16:35:08 +0000 | |
commit | c26cf28cba55c3323a0fcc733bf22221f37bcd9d (patch) | |
tree | 161a950cc91c86a4070d09bc44cf77826bac2391 /src/emu/bus/cbmiec/serialbox.c | |
parent | 16b2d6a2114050713fdf496702ba5bc866e0febd (diff) |
(MESS) cbmiec: Moved under emu/bus. (nw)
Diffstat (limited to 'src/emu/bus/cbmiec/serialbox.c')
-rw-r--r-- | src/emu/bus/cbmiec/serialbox.c | 153 |
1 files changed, 153 insertions, 0 deletions
diff --git a/src/emu/bus/cbmiec/serialbox.c b/src/emu/bus/cbmiec/serialbox.c new file mode 100644 index 00000000000..25ec2da40fc --- /dev/null +++ b/src/emu/bus/cbmiec/serialbox.c @@ -0,0 +1,153 @@ +// license:BSD-3-Clause +// copyright-holders:Curt Coder +/********************************************************************** + + Serial Box 64K Serial Port Buffer emulation + + Copyright MESS Team. + Visit http://mamedev.org for licensing and usage restrictions. + +**********************************************************************/ + +#include "serialbox.h" + + + +//************************************************************************** +// MACROS / CONSTANTS +//************************************************************************** + +#define M6502_TAG "u1" +#define M8520_TAG "u5" +#define WD1770_TAG "u4" + + +enum +{ + LED_POWER = 0, + LED_ACT +}; + + + +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +const device_type SERIAL_BOX = &device_creator<serial_box_device>; + + +//------------------------------------------------- +// ROM( serial_box ) +//------------------------------------------------- + +ROM_START( serial_box ) + ROM_REGION( 0x1000, M6502_TAG, 0 ) + ROM_LOAD( "serialbx.bin", 0x0000, 0x1000, CRC(d0e0218c) SHA1(9b922f1e9f9b71e771361c52d4df2aa5695488a5) ) +ROM_END + + +//------------------------------------------------- +// rom_region - device-specific ROM region +//------------------------------------------------- + +const rom_entry *serial_box_device::device_rom_region() const +{ + return ROM_NAME( serial_box ); +} + + +//------------------------------------------------- +// ADDRESS_MAP( serial_box_mem ) +//------------------------------------------------- + +static ADDRESS_MAP_START( serial_box_mem, AS_PROGRAM, 8, serial_box_device ) + AM_RANGE(0xf000, 0xffff) AM_ROM AM_REGION(M6502_TAG, 0) +ADDRESS_MAP_END + + +//------------------------------------------------- +// MACHINE_DRIVER( serial_box ) +//------------------------------------------------- + +static MACHINE_CONFIG_FRAGMENT( serial_box ) + MCFG_CPU_ADD(M6502_TAG, M65C02, XTAL_4MHz/4) + MCFG_CPU_PROGRAM_MAP(serial_box_mem) +MACHINE_CONFIG_END + + +//------------------------------------------------- +// machine_config_additions - device-specific +// machine configurations +//------------------------------------------------- + +machine_config_constructor serial_box_device::device_mconfig_additions() const +{ + return MACHINE_CONFIG_NAME( serial_box ); +} + + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// serial_box_device - constructor +//------------------------------------------------- + +serial_box_device::serial_box_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, SERIAL_BOX, "Serial Box", tag, owner, clock, "serbox", __FILE__), + device_cbm_iec_interface(mconfig, *this), + m_maincpu(*this, M6502_TAG) +{ +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void serial_box_device::device_start() +{ +} + + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void serial_box_device::device_reset() +{ +} + + +//------------------------------------------------- +// cbm_iec_atn - +//------------------------------------------------- + +void serial_box_device::cbm_iec_atn(int state) +{ +} + + +//------------------------------------------------- +// cbm_iec_data - +//------------------------------------------------- + +void serial_box_device::cbm_iec_data(int state) +{ +} + + +//------------------------------------------------- +// cbm_iec_reset - +//------------------------------------------------- + +void serial_box_device::cbm_iec_reset(int state) +{ + if (!state) + { + device_reset(); + } +} |