mirror of
https://github.com/holub/mame
synced 2025-10-05 16:50:57 +03:00
parent
380eb6eeb5
commit
f34174de56
@ -2416,6 +2416,7 @@ if (BUSES["COCO"]~=null) then
|
||||
MAME_DIR .. "src/devices/bus/coco/coco_dwsock.cpp",
|
||||
MAME_DIR .. "src/devices/bus/coco/coco_dwsock.h",
|
||||
MAME_DIR .. "src/devices/bus/coco/dragon_fdc.cpp",
|
||||
MAME_DIR .. "src/devices/bus/coco/coco_t4426.cpp",
|
||||
}
|
||||
end
|
||||
|
||||
|
201
src/devices/bus/coco/coco_t4426.cpp
Normal file
201
src/devices/bus/coco/coco_t4426.cpp
Normal file
@ -0,0 +1,201 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Joakim Larsson Edstrom
|
||||
/***************************************************************************
|
||||
*
|
||||
* coco_t4426.c
|
||||
*
|
||||
* Terco T4426 CNC Programming Station multi cart
|
||||
*
|
||||
* The code here is heavily inspired by coco_pak and coco_232
|
||||
*
|
||||
* +-------------------------------------------------------------------------------+
|
||||
* ||__|+-----+ oo 75 |O ||||||||||||||| O| |
|
||||
* |XTL||MC | oo 110 |
|
||||
* |1.8||14411| oo .. +--+ +--+ |
|
||||
* |432||BRG | == 600 |74| |74| +------+ |
|
||||
* |MHz|| | oo .. |LS| |LS| |MC1488| |
|
||||
* +---+| | oo 7200 |139 |00| +------+ |
|
||||
* | +-----+ oo 9600 +--+ +--+ +--+ |
|
||||
* | +-------------+ |MC| |
|
||||
* | +-----+ +-----+ +-----+ | EF68B50P | |14| |
|
||||
* | | 2764| | 2764| | | | ACIA | |89| |
|
||||
* | | | | | | | +-------------+ +--+ |
|
||||
* | |CA | |CA | |PMOS | |
|
||||
* | | 4426| | 4426| | 4426| +-------------------+ |
|
||||
* | | -6 | | -7 | | | | EP68B21P | |
|
||||
* | | | | | | | | PIA | |
|
||||
* | | | | | +-----+ +-------------------+ |
|
||||
* | +-----+ +-----+ |
|
||||
* | +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ |
|
||||
* | | 2764| | 2764| | 2764| | 2764| | 2764| | 2764| |
|
||||
* | | | | | | | | | | | | | |
|
||||
* | |CA | |CA | |PD | |PD | |ED | |ED | |
|
||||
* | | 4426| | 4426| | 4426| | 4426| | 4426| | 4426| |
|
||||
* | | -5 | | -4 | | -3 | | -2 | | -1 | | -0 | |
|
||||
* | | | | | | | | | | | | | OO |
|
||||
* | | | | | | | | | | | | | |
|
||||
* | +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ |
|
||||
* +-------------------------------------------------------------------------------+
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "coco_t4426.h"
|
||||
#include "includes/coco.h"
|
||||
|
||||
#define LOG_GENERAL 0x01
|
||||
#define LOG_SETUP 0x02
|
||||
#define LOG_PRINTF 0x04
|
||||
|
||||
#define VERBOSE 0 // (LOG_PRINTF | LOG_SETUP | LOG_GENERAL)
|
||||
|
||||
#define LOGMASK(mask, ...) do { if (VERBOSE & mask) logerror(__VA_ARGS__); } while (0)
|
||||
#define LOGLEVEL(mask, level, ...) do { if ((VERBOSE & mask) >= level) logerror(__VA_ARGS__); } while (0)
|
||||
|
||||
#define LOG(...) LOGMASK(LOG_GENERAL, __VA_ARGS__)
|
||||
#define LOGSETUP(...) LOGMASK(LOG_SETUP, __VA_ARGS__)
|
||||
|
||||
#if VERBOSE & LOG_PRINTF
|
||||
#define logerror printf
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define FUNCNAME __func__
|
||||
#else
|
||||
#define FUNCNAME __PRETTY_FUNCTION__
|
||||
#endif
|
||||
|
||||
/***************************************************************************
|
||||
CONSTANTS
|
||||
***************************************************************************/
|
||||
|
||||
#define UART_TAG "acia"
|
||||
#define PIA_TAG "pia"
|
||||
#define CARTSLOT_TAG "t4426"
|
||||
|
||||
/***************************************************************************
|
||||
IMPLEMENTATION
|
||||
***************************************************************************/
|
||||
|
||||
// TODO: Figure out address mapping for these devices
|
||||
static MACHINE_CONFIG_FRAGMENT(coco_t4426)
|
||||
MCFG_DEVICE_ADD(UART_TAG, ACIA6850, 0)
|
||||
MCFG_DEVICE_ADD(PIA_TAG, PIA6821, 0)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
ROM_START( coco_t4426 )
|
||||
ROM_REGION(0x8000, CARTSLOT_TAG, ROMREGION_ERASE00)
|
||||
// First of 8 banked ROM:s TODO: Add the banking and the other ROM:s
|
||||
ROM_LOAD("tercoED4426-0-8549-5.3.bin", 0x0000, 0x2000, CRC(45665428) SHA1(ff49a79275772c4c4ab1ae29db662c9b10a744a7))
|
||||
|
||||
// Main cartridge ROM
|
||||
ROM_LOAD("tercoPMOS4426-8549-4.31.bin", 0x2000, 0x1000, CRC(bc65c45c) SHA1(e50cfd1d61e29fe05eb795d8bf6303e7b91ed8e5))
|
||||
ROM_END
|
||||
|
||||
//**************************************************************************
|
||||
// GLOBAL VARIABLES
|
||||
//**************************************************************************
|
||||
|
||||
const device_type COCO_T4426 = &device_creator<coco_t4426_device>;
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// coco_t4426_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
coco_t4426_device::coco_t4426_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source)
|
||||
: device_t(mconfig, type, name, tag, owner, clock, shortname, source)
|
||||
,device_cococart_interface( mconfig, *this )
|
||||
,m_cart(nullptr)
|
||||
,m_owner(nullptr)
|
||||
,m_autostart(*this, ":" CART_AUTOSTART_TAG)
|
||||
,m_uart(*this, UART_TAG)
|
||||
,m_pia(*this, PIA_TAG)
|
||||
{
|
||||
}
|
||||
|
||||
coco_t4426_device::coco_t4426_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: device_t(mconfig, COCO_T4426, "Terco CNC Programming Station 4426 multi cart", tag, owner, clock, "coco_t4426", __FILE__)
|
||||
,device_cococart_interface( mconfig, *this )
|
||||
,m_cart(nullptr)
|
||||
,m_owner(nullptr)
|
||||
,m_autostart(*this, ":" CART_AUTOSTART_TAG)
|
||||
,m_uart(*this, UART_TAG)
|
||||
,m_pia(*this, PIA_TAG)
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void coco_t4426_device::device_start()
|
||||
{
|
||||
m_cart = dynamic_cast<device_image_interface *>(owner());
|
||||
m_owner = dynamic_cast<cococart_slot_device *>(owner());
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// machine_config_additions - device-specific
|
||||
// machine configurations
|
||||
//-------------------------------------------------
|
||||
|
||||
machine_config_constructor coco_t4426_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( coco_t4426 );
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// rom_region - device-specific ROM region
|
||||
//-------------------------------------------------
|
||||
|
||||
const tiny_rom_entry *coco_t4426_device::device_rom_region() const
|
||||
{
|
||||
return ROM_NAME( coco_t4426 );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------
|
||||
device_reset - device-specific startup
|
||||
-------------------------------------------------*/
|
||||
|
||||
void coco_t4426_device::device_reset()
|
||||
{
|
||||
auto cart_line = cococart_slot_device::line_value::Q;
|
||||
m_owner->cart_set_line(cococart_slot_device::line::CART, cart_line);
|
||||
}
|
||||
|
||||
/*-------------------------------------------------
|
||||
get_cart_base
|
||||
-------------------------------------------------*/
|
||||
|
||||
uint8_t* coco_t4426_device::get_cart_base()
|
||||
{
|
||||
return memregion(CARTSLOT_TAG)->base();
|
||||
}
|
||||
|
||||
/*-------------------------------------------------
|
||||
read
|
||||
-------------------------------------------------*/
|
||||
|
||||
READ8_MEMBER(coco_t4426_device::read)
|
||||
{
|
||||
uint8_t result = 0x00;
|
||||
|
||||
LOG("%s()\n", FUNCNAME);
|
||||
LOGSETUP(" * Offs:%02x -> %02x\n", offset, result);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------
|
||||
write
|
||||
-------------------------------------------------*/
|
||||
|
||||
WRITE8_MEMBER(coco_t4426_device::write)
|
||||
{
|
||||
LOG("%s(%02x)\n", FUNCNAME, data);
|
||||
LOGSETUP(" * Offs:%02x <- %02x\n", offset, data);
|
||||
}
|
56
src/devices/bus/coco/coco_t4426.h
Normal file
56
src/devices/bus/coco/coco_t4426.h
Normal file
@ -0,0 +1,56 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:Nathan Woods
|
||||
#ifndef MAME_BUS_COCO_T4426_H
|
||||
#define MAME_BUS_COCO_T4426_H
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "emu.h"
|
||||
#include "cococart.h"
|
||||
#include "machine/6850acia.h"
|
||||
#include "machine/6821pia.h"
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
// ======================> coco_t4426_device
|
||||
|
||||
class coco_t4426_device :
|
||||
public device_t,
|
||||
public device_cococart_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
coco_t4426_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source);
|
||||
coco_t4426_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
// optional information overrides
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
virtual const tiny_rom_entry *device_rom_region() const override;
|
||||
|
||||
virtual uint8_t* get_cart_base() override;
|
||||
protected:
|
||||
// device-level overrides
|
||||
virtual void device_start() override;
|
||||
virtual void device_reset() override;
|
||||
|
||||
// internal state
|
||||
device_image_interface *m_cart;
|
||||
cococart_slot_device *m_owner;
|
||||
|
||||
optional_ioport m_autostart;
|
||||
|
||||
virtual DECLARE_READ8_MEMBER(read) override;
|
||||
virtual DECLARE_WRITE8_MEMBER(write) override;
|
||||
private:
|
||||
// internal state
|
||||
required_device<acia6850_device> m_uart;
|
||||
required_device<pia6821_device> m_pia;
|
||||
};
|
||||
|
||||
|
||||
// device type definition
|
||||
extern const device_type COCO_T4426;
|
||||
|
||||
#endif /* MAME_BUS_COCO_T4426_H */
|
@ -24,6 +24,7 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include "includes/coco12.h"
|
||||
#include "bus/coco/coco_t4426.h"
|
||||
#include "bus/coco/coco_232.h"
|
||||
#include "bus/coco/coco_orch90.h"
|
||||
#include "bus/coco/coco_pak.h"
|
||||
@ -264,7 +265,13 @@ SLOT_INTERFACE_START( coco_cart )
|
||||
SLOT_INTERFACE("multi", COCO_MULTIPAK)
|
||||
SLOT_INTERFACE_END
|
||||
|
||||
//-------------------------------------------------
|
||||
// SLOT_INTERFACE_START(t4426_cart)
|
||||
//-------------------------------------------------
|
||||
|
||||
SLOT_INTERFACE_START( t4426_cart )
|
||||
SLOT_INTERFACE("t4426", COCO_T4426)
|
||||
SLOT_INTERFACE_END
|
||||
|
||||
//-------------------------------------------------
|
||||
// MACHINE_CONFIG_FRAGMENT( coco_sound )
|
||||
@ -392,6 +399,14 @@ static MACHINE_CONFIG_DERIVED( cp400, coco )
|
||||
MCFG_COCO_CARTRIDGE_HALT_CB(INPUTLINE(MAINCPU_TAG, INPUT_LINE_HALT))
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
static MACHINE_CONFIG_DERIVED( t4426, coco2 )
|
||||
MCFG_COCO_CARTRIDGE_REMOVE(CARTRIDGE_TAG)
|
||||
MCFG_COCO_CARTRIDGE_ADD(CARTRIDGE_TAG, t4426_cart, "t4426")
|
||||
MCFG_COCO_CARTRIDGE_CART_CB(WRITELINE(coco_state, cart_w))
|
||||
MCFG_COCO_CARTRIDGE_NMI_CB(INPUTLINE(MAINCPU_TAG, INPUT_LINE_NMI))
|
||||
MCFG_COCO_CARTRIDGE_HALT_CB(INPUTLINE(MAINCPU_TAG, INPUT_LINE_HALT))
|
||||
MCFG_SLOT_FIXED(true) // This cart is fixed so no way to change it
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
//**************************************************************************
|
||||
// ROMS
|
||||
@ -431,6 +446,12 @@ ROM_START(mx1600 )
|
||||
ROM_LOAD("mx1600extbas.rom", 0x0000, 0x2000, CRC(322a3d58) SHA1(9079a477c3f22e46cebb1e68b61df5bd607c71a4))
|
||||
ROM_END
|
||||
|
||||
ROM_START( t4426 )
|
||||
ROM_REGION(0x8000,MAINCPU_TAG,0)
|
||||
ROM_LOAD("SOFT4426-U13-1.2.bin", 0x2000, 0x2000, CRC(3c1af94a) SHA1(1dc57b3e4a6ef6a743ca21d8f111a74b1ea9d54e))
|
||||
ROM_LOAD("SOFT4426-U14-1.2.bin", 0x0000, 0x2000, CRC(e031d076) SHA1(7275f1e3f165ff6a4657e4e5e24cb8b817239f54))
|
||||
ROM_END
|
||||
|
||||
ROM_START(lzcolor64 )
|
||||
ROM_REGION(0x8000,MAINCPU_TAG,0)
|
||||
ROM_LOAD("color64bas.rom", 0x2000, 0x2000, CRC(b0717d71) SHA1(ad1beef9d6f095ada69f91d0b8ad75985172d86f))
|
||||
@ -444,8 +465,9 @@ ROM_END
|
||||
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */
|
||||
COMP( 1980, coco, 0, 0, coco, coco, driver_device, 0, "Tandy Radio Shack", "Color Computer", 0)
|
||||
COMP( 1981, cocoe, coco, 0, cocoe, coco, driver_device, 0, "Tandy Radio Shack", "Color Computer (Extended BASIC 1.0)", 0)
|
||||
COMP( 1983, coco2, coco, 0, coco2, coco, driver_device, 0, "Tandy Radio Shack", "Color Computer 2", 0)
|
||||
COMP( 1985?, coco2b, coco, 0, coco2b, coco, driver_device, 0, "Tandy Radio Shack", "Color Computer 2B", 0)
|
||||
COMP( 1983, coco2, coco, 0, coco2, coco, driver_device, 0, "Tandy Radio Shack", "Color Computer 2", 0)
|
||||
COMP( 1985?, coco2b, coco, 0, coco2b, coco, driver_device, 0, "Tandy Radio Shack", "Color Computer 2B", 0)
|
||||
COMP( 1984, cp400, coco, 0, cp400, coco, driver_device, 0, "Prologica", "CP400", 0)
|
||||
COMP( 1984, lzcolor64, coco, 0, coco, coco, driver_device, 0, "Digiponto", "LZ Color64", 0)
|
||||
COMP( 1984, mx1600, coco, 0, coco, coco, driver_device, 0, "Dynacom", "MX-1600", 0)
|
||||
COMP( 1986, t4426, coco, 0, t4426, coco, driver_device, 0, "Terco AB", "Terco 4426 CNC Programming station", MACHINE_NOT_WORKING)
|
||||
|
@ -9612,6 +9612,7 @@ cocoe // Color Computer (Extended BASIC 1.0)
|
||||
cp400 // Prologica CP400
|
||||
lzcolor64 // Digiponto LZ Color64
|
||||
mx1600 // Dynacom MX-1600
|
||||
t4426 // Terco T4426 CNC programming station
|
||||
|
||||
@source:coco3.cpp
|
||||
coco3 // Color Computer 3 (NTSC)
|
||||
|
Loading…
Reference in New Issue
Block a user