mirror of
https://github.com/holub/mame
synced 2025-07-05 18:08:04 +03:00
ti99: Added console connector "ioport" with PEB as slot option
This commit is contained in:
parent
2cf7003f6b
commit
1e77ec65c1
@ -2377,6 +2377,8 @@ if (BUSES["TI99"]~=null) then
|
||||
MAME_DIR .. "src/devices/bus/ti99/internal/genboard.h",
|
||||
MAME_DIR .. "src/devices/bus/ti99/internal/gromport.cpp",
|
||||
MAME_DIR .. "src/devices/bus/ti99/internal/gromport.h",
|
||||
MAME_DIR .. "src/devices/bus/ti99/internal/ioport.cpp",
|
||||
MAME_DIR .. "src/devices/bus/ti99/internal/ioport.h",
|
||||
MAME_DIR .. "src/devices/bus/ti99/colorbus/busmouse.cpp",
|
||||
MAME_DIR .. "src/devices/bus/ti99/colorbus/busmouse.h",
|
||||
MAME_DIR .. "src/devices/bus/ti99/colorbus/colorbus.cpp",
|
||||
|
@ -157,7 +157,7 @@ mainboard8_device::mainboard8_device(const machine_config &mconfig, const char *
|
||||
m_sound(*owner, TISOUNDCHIP_TAG),
|
||||
m_speech(*owner, SPEECHSYN_TAG),
|
||||
m_gromport(*owner, GROMPORT_TAG),
|
||||
m_peb(*owner, PERIBOX_TAG),
|
||||
m_ioport(*owner, TI99_IOPORT_TAG),
|
||||
m_sram(*owner, SRAM_TAG),
|
||||
m_dram(*owner, DRAM_TAG),
|
||||
m_sgrom_idle(true),
|
||||
@ -214,9 +214,9 @@ READ8_MEMBER( mainboard8_device::debugger_read )
|
||||
// Internal DSR, Hexbus DSR, or PEB
|
||||
if (m_mofetta->hexbus_access_debug()) return m_rom1[(physical_address & 0x1fff) | 0x6000];
|
||||
if (m_mofetta->intdsr_access_debug()) return m_rom1[(physical_address & 0x1fff) | 0x4000];
|
||||
m_peb->memen_in(ASSERT_LINE);
|
||||
m_peb->readz(space, physical_address & 0xffff, &value);
|
||||
m_peb->memen_in(CLEAR_LINE);
|
||||
m_ioport->memen_in(ASSERT_LINE);
|
||||
m_ioport->readz(space, physical_address & 0xffff, &value);
|
||||
m_ioport->memen_in(CLEAR_LINE);
|
||||
return value;
|
||||
}
|
||||
if ((physical_address & 0x00ffe000)==0x00ff6000)
|
||||
@ -295,10 +295,9 @@ WRITE8_MEMBER( mainboard8_device::debugger_write )
|
||||
{
|
||||
if (m_mofetta->hexbus_access_debug()) return;
|
||||
if (m_mofetta->intdsr_access_debug()) return;
|
||||
m_peb->memen_in(ASSERT_LINE);
|
||||
m_peb->write(space, physical_address & 0xffff, data & 0xff);
|
||||
m_peb->memen_in(CLEAR_LINE);
|
||||
return;
|
||||
m_ioport->memen_in(ASSERT_LINE);
|
||||
m_ioport->write(space, physical_address & 0xffff, data & 0xff);
|
||||
m_ioport->memen_in(CLEAR_LINE); return;
|
||||
}
|
||||
if ((physical_address & 0x00ffe000)==0x00ff6000)
|
||||
{
|
||||
@ -325,7 +324,7 @@ WRITE8_MEMBER( mainboard8_device::debugger_write )
|
||||
|
||||
READ8Z_MEMBER(mainboard8_device::crureadz)
|
||||
{
|
||||
m_peb->crureadz(space, offset, value);
|
||||
m_ioport->crureadz(space, offset, value);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -334,7 +333,7 @@ READ8Z_MEMBER(mainboard8_device::crureadz)
|
||||
WRITE8_MEMBER(mainboard8_device::cruwrite)
|
||||
{
|
||||
m_mofetta->cruwrite(space, offset, data);
|
||||
m_peb->cruwrite(space, offset, data);
|
||||
m_ioport->cruwrite(space, offset, data);
|
||||
}
|
||||
|
||||
// =============== Memory bus access ==================
|
||||
@ -508,7 +507,7 @@ WRITE_LINE_MEMBER( mainboard8_device::clock_in )
|
||||
|
||||
if (m_mofetta->dbc_out()==ASSERT_LINE)
|
||||
{
|
||||
m_peb->write(*m_space, m_physical_address, m_latched_data);
|
||||
m_ioport->write(*m_space, m_physical_address, m_latched_data);
|
||||
m_pending_write = false;
|
||||
if (TRACE_MEM) logerror("Write %04x (phys %06x, PEB) <- %02x\n", m_logical_address, m_physical_address, m_latched_data);
|
||||
}
|
||||
@ -609,7 +608,7 @@ void mainboard8_device::set_paddress(int address)
|
||||
if (TRACE_DETAIL) logerror("Setting physical address %06x\n", m_physical_address);
|
||||
|
||||
m_mofetta->set_address(*m_space, address, m_dbin_level);
|
||||
m_peb->setaddress_dbin(*m_space, address, m_dbin_level);
|
||||
m_ioport->setaddress_dbin(*m_space, address, m_dbin_level);
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER( mainboard8_device::msast_in )
|
||||
@ -620,10 +619,10 @@ WRITE_LINE_MEMBER( mainboard8_device::msast_in )
|
||||
if (state==CLEAR_LINE)
|
||||
{
|
||||
m_mofetta->pmemen_in(ASSERT_LINE);
|
||||
m_peb->memen_in(ASSERT_LINE);
|
||||
m_ioport->memen_in(ASSERT_LINE);
|
||||
}
|
||||
m_mofetta->msast_in(state);
|
||||
m_peb->msast_in(state);
|
||||
m_ioport->msast_in(state);
|
||||
}
|
||||
|
||||
|
||||
@ -785,7 +784,7 @@ READ8_MEMBER( mainboard8_device::read )
|
||||
|
||||
if (m_mofetta->dbc_out()==ASSERT_LINE)
|
||||
{
|
||||
m_peb->readz(*m_space, m_physical_address & 0xffff, &value);
|
||||
m_ioport->readz(*m_space, m_physical_address & 0xffff, &value);
|
||||
what = "PEB";
|
||||
goto readdonephys;
|
||||
}
|
||||
@ -815,7 +814,7 @@ void mainboard8_device::cycle_end()
|
||||
m_vaquerro->memen_in(CLEAR_LINE);
|
||||
m_amigo->memen_in(CLEAR_LINE);
|
||||
m_mofetta->pmemen_in(CLEAR_LINE);
|
||||
m_peb->memen_in(CLEAR_LINE);
|
||||
m_ioport->memen_in(CLEAR_LINE);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "bus/ti99/ti99defs.h"
|
||||
#include "gromport.h"
|
||||
|
||||
#include "bus/ti99/peb/peribox.h"
|
||||
#include "bus/ti99/internal/ioport.h"
|
||||
#include "machine/ram.h"
|
||||
#include "machine/tmc0430.h"
|
||||
#include "sound/sn76496.h"
|
||||
@ -509,8 +509,9 @@ private:
|
||||
required_device<tms9928a_device> m_video;
|
||||
required_device<sn76496_base_device> m_sound;
|
||||
required_device<cd2501ecd_device> m_speech;
|
||||
required_device<gromport_device> m_gromport;
|
||||
required_device<bus::ti99::peb::peribox_device> m_peb;
|
||||
required_device<bus::ti99::internal::gromport_device> m_gromport;
|
||||
required_device<bus::ti99::internal::ioport_device> m_ioport;
|
||||
|
||||
required_device<ram_device> m_sram;
|
||||
required_device<ram_device> m_dram;
|
||||
|
||||
|
@ -82,7 +82,7 @@ datamux_device::datamux_device(const machine_config &mconfig, const char *tag, d
|
||||
: device_t(mconfig, TI99_DATAMUX, tag, owner, clock),
|
||||
m_video(*owner, VDP_TAG),
|
||||
m_sound(*owner, TISOUNDCHIP_TAG),
|
||||
m_peb(*owner, PERIBOX_TAG),
|
||||
m_ioport(*owner, TI99_IOPORT_TAG),
|
||||
m_gromport(*owner, GROMPORT_TAG),
|
||||
m_ram16b(*owner, EXPRAM_TAG),
|
||||
m_padram(*owner, PADRAM_TAG),
|
||||
@ -144,9 +144,9 @@ void datamux_device::read_all(address_space& space, uint16_t addr, uint8_t *valu
|
||||
// GROMport (ROMs)
|
||||
if ((addr & 0xe000)==0x6000) m_gromport->readz(space, addr, value);
|
||||
|
||||
// PEB gets all accesses
|
||||
m_peb->readz(space, addr, value);
|
||||
m_peb->memen_in(CLEAR_LINE);
|
||||
// I/O port gets all accesses
|
||||
m_ioport->readz(space, addr, value);
|
||||
m_ioport->memen_in(CLEAR_LINE);
|
||||
}
|
||||
|
||||
void datamux_device::write_all(address_space& space, uint16_t addr, uint8_t value)
|
||||
@ -180,9 +180,9 @@ void datamux_device::write_all(address_space& space, uint16_t addr, uint8_t valu
|
||||
if (m_video != nullptr) m_video->write(space, addr>>1, value); // A14 determines data or register write
|
||||
}
|
||||
|
||||
// PEB gets all accesses
|
||||
m_peb->write(space, addr, value);
|
||||
m_peb->memen_in(CLEAR_LINE);
|
||||
// I/O port gets all accesses
|
||||
m_ioport->write(space, addr, value);
|
||||
m_ioport->memen_in(CLEAR_LINE);
|
||||
}
|
||||
|
||||
void datamux_device::setaddress_all(address_space& space, uint16_t addr)
|
||||
@ -217,9 +217,9 @@ void datamux_device::setaddress_all(address_space& space, uint16_t addr)
|
||||
// GROMport (ROMs)
|
||||
m_gromport->romgq_line(iscartrom? ASSERT_LINE : CLEAR_LINE);
|
||||
|
||||
// PEB gets all accesses
|
||||
m_peb->memen_in(ASSERT_LINE);
|
||||
m_peb->setaddress_dbin(space, addr, m_dbin);
|
||||
// I/O port gets all accesses
|
||||
m_ioport->memen_in(ASSERT_LINE);
|
||||
m_ioport->setaddress_dbin(space, addr, m_dbin);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -263,10 +263,10 @@ uint16_t datamux_device::debugger_read(address_space& space, uint16_t addr)
|
||||
m_gromport->readz(space, addrb, &hval);
|
||||
m_gromport->romgq_line(CLEAR_LINE);
|
||||
}
|
||||
m_peb->memen_in(ASSERT_LINE);
|
||||
m_peb->readz(space, addrb+1, &lval);
|
||||
m_peb->readz(space, addrb, &hval);
|
||||
m_peb->memen_in(CLEAR_LINE);
|
||||
m_ioport->memen_in(ASSERT_LINE);
|
||||
m_ioport->readz(space, addrb+1, &lval);
|
||||
m_ioport->readz(space, addrb, &hval);
|
||||
m_ioport->memen_in(CLEAR_LINE);
|
||||
value = ((hval << 8)&0xff00) | (lval & 0xff);
|
||||
}
|
||||
}
|
||||
@ -309,10 +309,10 @@ void datamux_device::debugger_write(address_space& space, uint16_t addr, uint16_
|
||||
m_gromport->romgq_line(CLEAR_LINE);
|
||||
}
|
||||
|
||||
m_peb->memen_in(ASSERT_LINE);
|
||||
m_peb->write(space, addr+1, data & 0xff);
|
||||
m_peb->write(space, addr, (data>>8) & 0xff);
|
||||
m_peb->memen_in(CLEAR_LINE);
|
||||
m_ioport->memen_in(ASSERT_LINE);
|
||||
m_ioport->write(space, addr+1, data & 0xff);
|
||||
m_ioport->write(space, addr, (data>>8) & 0xff);
|
||||
m_ioport->memen_in(CLEAR_LINE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include "bus/ti99/ti99defs.h"
|
||||
#include "machine/tmc0430.h"
|
||||
#include "gromport.h"
|
||||
#include "bus/ti99/peb/peribox.h"
|
||||
#include "bus/ti99/internal/ioport.h"
|
||||
#include "sound/sn76496.h"
|
||||
#include "video/tms9928a.h"
|
||||
#include "machine/ram.h"
|
||||
@ -63,8 +63,8 @@ private:
|
||||
// Link to the sound processor
|
||||
optional_device<sn76496_base_device> m_sound;
|
||||
|
||||
// Link to the peripheral expansion box
|
||||
required_device<bus::ti99::peb::peribox_device> m_peb;
|
||||
// Link to the I/O port
|
||||
required_device<bus::ti99::internal::ioport_device> m_ioport;
|
||||
|
||||
// Link to the cartridge port (aka GROM port)
|
||||
required_device<gromport_device> m_gromport;
|
||||
@ -142,5 +142,5 @@ private:
|
||||
} } } // end namespace bus::ti99::internal
|
||||
|
||||
DECLARE_DEVICE_TYPE_NS(TI99_DATAMUX, bus::ti99::internal, datamux_device)
|
||||
|
||||
|
||||
#endif // MAME_BUS_TI99_INTERNAL_DATAMUX_H
|
||||
|
173
src/devices/bus/ti99/internal/ioport.cpp
Normal file
173
src/devices/bus/ti99/internal/ioport.cpp
Normal file
@ -0,0 +1,173 @@
|
||||
// license:LGPL-2.1+
|
||||
// copyright-holders:Michael Zapf
|
||||
/****************************************************************************
|
||||
I/O port
|
||||
|
||||
This is the connector on the right side of the TI-99/4(A) console and the
|
||||
TI-99/8 console.
|
||||
|
||||
XXXXXXXXXXXXXXXXXXX
|
||||
XXXXXXXXXXXXXX+__________+XXXX rear
|
||||
front XXXXXXXXXXXXXXXXXXXX+ +XXXX
|
||||
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
In previous MAME/MESS releases, the I/O port was not explicitly modeled,
|
||||
making the Peripheral Expansion Box (PEB) a subdevice of the console.
|
||||
With this change it becomes possible to emulate the side-car devices and
|
||||
also game cartriges that were plugged into the I/O port.
|
||||
|
||||
However, this also means the PEB must be plugged into the I/O port
|
||||
("-ioport peb"), and that all PEB slot cards require an "ioport"
|
||||
qualifier at the beginning like "-ioport:peb:slot8 hfdc".
|
||||
|
||||
-----
|
||||
|
||||
The TI-99/8 features a different layout with more lines, requiring
|
||||
a specific adapter for connecting the Peripheral Expansion Box, called
|
||||
the "Armadillo round cable interface". Despite offering this connection,
|
||||
TI promoted a different peripheral concept by the "Hexbus". The I/O port
|
||||
can be considered a support for legacy peripheral devices.
|
||||
|
||||
Since the TI-99/8 development was stopped with TI's withdrawal from the
|
||||
home computer market, no specific peripheral cards were made available.
|
||||
The legacy cards of the TI-99/4(A) can be used with limitations. However,
|
||||
memory expansion cards do not work. Since the operating system inside the
|
||||
99/8 console already assumes that the Hexbus devices are used, it fails
|
||||
to correctly operate the floppy controllers, and thus Extended Basic II
|
||||
locks up on startup.
|
||||
|
||||
The lines of the 99/8 I/O port starting with P refer to the external bus
|
||||
after the AMIGO custom chip, which translates the logical addresses
|
||||
to physical addresses (hence the P). There was a first layout (v1) that
|
||||
was changed in the last prototypes (v2).
|
||||
|
||||
TI-99/4(A) TI-99/8 (v2)
|
||||
|
||||
bot Front top top Rear bot
|
||||
--------------------- ---------------------
|
||||
+5V 1||2 SBE +5V/XBC 2||1 EXTINT*
|
||||
RESET* 3||4 EXTINT* D2 4||3 AUDIOIN
|
||||
A5 5||6 A10 D1 6||5 PA09
|
||||
A4 7||8 A11 D3 8||7 D0
|
||||
DBIN 9||10 A3 D5 10||9 D4
|
||||
A12 11||12 READY D7 12||11 D6
|
||||
LOAD* 13||14 A8 SRESET* 14||13 GND
|
||||
A13 15||16 A14 MSAST* 16||15 GND
|
||||
A7 17||18 A9 CRUCLK* 18||17 GND
|
||||
A15/CRUOUT 19||20 A2 HOLD* 20||19 GND
|
||||
GND 21||22 CRUCLK* PA11 22||21 PA12
|
||||
GND 23||24 PHI3* PA15/CRUOUT 24||23 nc
|
||||
GND 25||26 WE* SCLK 26||25 GND
|
||||
GND 27||28 MBE* PA14 28||27 PA01
|
||||
A6 29||30 A1 PA08 30||29 PA13
|
||||
A0 31||32 MEMEN* PA00 32||31 PA05
|
||||
CRUIN 33||34 D7 PA10 34||33 PA04
|
||||
D4 35||36 D6 SRDY 36||35 CRUIN
|
||||
D0 37||38 D5 PA06 38||37 PA07
|
||||
D2 39||40 D1 PA03 40||39 PA02
|
||||
IAQ 41||42 D3 PDBIN 42||41 IAQ/HOLDA
|
||||
-5V 43||44 AUDIOIN LOAD* 44||43 GND
|
||||
--------------------- PHI3* 46||45 GND
|
||||
bot Rear top PMEMEN* 48||47 GND
|
||||
PWE* 50||49 GND
|
||||
-----------------------
|
||||
top Front bot
|
||||
May 2017, Michael Zapf
|
||||
|
||||
*****************************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "ioport.h"
|
||||
#include "bus/ti99/peb/peribox.h"
|
||||
|
||||
DEFINE_DEVICE_TYPE_NS(TI99_IOPORT, bus::ti99::internal, ioport_device, "ti99_ioport", "TI-99 I/O Port")
|
||||
|
||||
namespace bus { namespace ti99 { namespace internal {
|
||||
|
||||
ioport_device::ioport_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: bus8z_device(mconfig, TI99_IOPORT, tag, owner, clock),
|
||||
device_slot_interface(mconfig, *this),
|
||||
m_console_extint(*this),
|
||||
m_console_ready(*this),
|
||||
m_connected(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
READ8Z_MEMBER(ioport_device::readz)
|
||||
{
|
||||
if (m_connected != nullptr)
|
||||
m_connected->readz(space, offset, value);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(ioport_device::write)
|
||||
{
|
||||
if (m_connected != nullptr)
|
||||
m_connected->write(space, offset, data);
|
||||
}
|
||||
|
||||
SETADDRESS_DBIN_MEMBER(ioport_device::setaddress_dbin)
|
||||
{
|
||||
if (m_connected != nullptr)
|
||||
m_connected->setaddress_dbin(space, offset, state);
|
||||
}
|
||||
|
||||
READ8Z_MEMBER(ioport_device::crureadz)
|
||||
{
|
||||
if (m_connected != nullptr)
|
||||
m_connected->crureadz(space, offset, value);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(ioport_device::cruwrite)
|
||||
{
|
||||
if (m_connected != nullptr)
|
||||
m_connected->cruwrite(space, offset, data);
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER(ioport_device::memen_in)
|
||||
{
|
||||
if (m_connected != nullptr)
|
||||
m_connected->memen_in(state);
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER(ioport_device::msast_in)
|
||||
{
|
||||
if (m_connected != nullptr)
|
||||
m_connected->msast_in(state);
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER(ioport_device::clock_in)
|
||||
{
|
||||
if (m_connected != nullptr)
|
||||
m_connected->clock_in(state);
|
||||
}
|
||||
|
||||
void ioport_device::device_start()
|
||||
{
|
||||
m_console_extint.resolve();
|
||||
m_console_ready.resolve();
|
||||
if (m_connected != nullptr)
|
||||
m_connected->set_ioport(this);
|
||||
}
|
||||
|
||||
void ioport_device::device_config_complete()
|
||||
{
|
||||
m_connected = static_cast<ioport_attached_device*>(subdevices().first());
|
||||
}
|
||||
|
||||
|
||||
WRITE_LINE_MEMBER(ioport_attached_device::set_extint)
|
||||
{
|
||||
m_ioport->m_console_extint(state);
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER(ioport_attached_device::set_ready)
|
||||
{
|
||||
m_ioport->m_console_ready(state);
|
||||
}
|
||||
|
||||
} } } // end namespace bus::ti99::internal
|
||||
|
||||
SLOT_INTERFACE_START( ti99_io_port )
|
||||
SLOT_INTERFACE("peb", TI99_PERIBOX)
|
||||
SLOT_INTERFACE_END
|
||||
|
101
src/devices/bus/ti99/internal/ioport.h
Normal file
101
src/devices/bus/ti99/internal/ioport.h
Normal file
@ -0,0 +1,101 @@
|
||||
// license:LGPL-2.1+
|
||||
// copyright-holders:Michael Zapf
|
||||
/****************************************************************************
|
||||
I/O port
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef MAME_BUS_TI99_INTERNAL_IOPORT_H
|
||||
#define MAME_BUS_TI99_INTERNAL_IOPORT_H
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "bus/ti99/ti99defs.h"
|
||||
|
||||
namespace bus { namespace ti99 { namespace internal {
|
||||
|
||||
extern const device_type IOPORT;
|
||||
|
||||
class ioport_device;
|
||||
|
||||
/********************************************************************
|
||||
Common parent class of all devices attached to the I/O port
|
||||
********************************************************************/
|
||||
class ioport_attached_device : public bus8z_device
|
||||
{
|
||||
public:
|
||||
ioport_attached_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
|
||||
: bus8z_device(mconfig, type, tag, owner, clock), m_ioport(nullptr)
|
||||
{ }
|
||||
|
||||
// Methods called from the console / ioport
|
||||
virtual DECLARE_READ8Z_MEMBER( readz ) override { };
|
||||
virtual DECLARE_WRITE8_MEMBER( write ) override { };
|
||||
virtual DECLARE_SETADDRESS_DBIN_MEMBER( setaddress_dbin ) override { };
|
||||
virtual DECLARE_READ8Z_MEMBER( crureadz ) { };
|
||||
virtual DECLARE_WRITE8_MEMBER( cruwrite ) { };
|
||||
virtual DECLARE_WRITE_LINE_MEMBER( memen_in ) { };
|
||||
virtual DECLARE_WRITE_LINE_MEMBER( msast_in ) { };
|
||||
virtual DECLARE_WRITE_LINE_MEMBER( clock_in ) { };
|
||||
|
||||
void set_ioport(ioport_device* ioport) { m_ioport = ioport; }
|
||||
|
||||
protected:
|
||||
// Methods called from the external device
|
||||
DECLARE_WRITE_LINE_MEMBER( set_extint );
|
||||
DECLARE_WRITE_LINE_MEMBER( set_ready );
|
||||
private:
|
||||
ioport_device* m_ioport;
|
||||
};
|
||||
|
||||
/********************************************************************
|
||||
I/O port
|
||||
********************************************************************/
|
||||
|
||||
class ioport_device : public bus8z_device, public device_slot_interface
|
||||
{
|
||||
friend class ioport_attached_device;
|
||||
|
||||
public:
|
||||
ioport_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
template<class _Object> static devcb_base &static_set_extint_callback(device_t &device, _Object object) { return downcast<ioport_device &>(device).m_console_extint.set_callback(object); }
|
||||
template<class _Object> static devcb_base &static_set_ready_callback(device_t &device, _Object object) { return downcast<ioport_device &>(device).m_console_ready.set_callback(object); }
|
||||
|
||||
// Methods called from the console
|
||||
DECLARE_READ8Z_MEMBER( readz ) override;
|
||||
DECLARE_WRITE8_MEMBER( write ) override;
|
||||
DECLARE_SETADDRESS_DBIN_MEMBER( setaddress_dbin ) override;
|
||||
DECLARE_READ8Z_MEMBER( crureadz );
|
||||
DECLARE_WRITE8_MEMBER( cruwrite );
|
||||
DECLARE_WRITE_LINE_MEMBER( memen_in );
|
||||
DECLARE_WRITE_LINE_MEMBER( msast_in );
|
||||
DECLARE_WRITE_LINE_MEMBER( clock_in );
|
||||
|
||||
protected:
|
||||
void device_start() override;
|
||||
void device_config_complete() override;
|
||||
|
||||
// Methods called back from the external device
|
||||
devcb_write_line m_console_extint; // EXTINT line
|
||||
devcb_write_line m_console_ready; // READY line
|
||||
|
||||
private:
|
||||
ioport_attached_device* m_connected;
|
||||
};
|
||||
} } } // end namespace bus::ti99::internal
|
||||
|
||||
DECLARE_DEVICE_TYPE_NS(TI99_IOPORT, bus::ti99::internal, ioport_device)
|
||||
|
||||
SLOT_INTERFACE_EXTERN(ti99_io_port);
|
||||
|
||||
#define MCFG_IOPORT_ADD( _tag ) \
|
||||
MCFG_DEVICE_ADD(_tag, TI99_IOPORT, 0) \
|
||||
MCFG_DEVICE_SLOT_INTERFACE(ti99_io_port, nullptr, false)
|
||||
|
||||
#define MCFG_IOPORT_EXTINT_HANDLER( _extint ) \
|
||||
devcb = &bus::ti99::internal::ioport_device::static_set_extint_callback( *device, DEVCB_##_extint );
|
||||
|
||||
#define MCFG_IOPORT_READY_HANDLER( _ready ) \
|
||||
devcb = &bus::ti99::internal::ioport_device::static_set_ready_callback( *device, DEVCB_##_ready );
|
||||
|
||||
#endif /* __TI99IOPORT__ */
|
@ -45,8 +45,8 @@ DEFINE_DEVICE_TYPE_NS(TI99_HANDSET, bus::ti99::joyport, ti99_handset_device, "ti
|
||||
|
||||
namespace bus { namespace ti99 { namespace joyport {
|
||||
|
||||
#define LOG logerror
|
||||
#define VERBOSE 1
|
||||
#define TRACE_HANDSET 0
|
||||
#define TRACE_JOYSTICK 0
|
||||
|
||||
static const char *const joynames[2][4] =
|
||||
{
|
||||
@ -81,7 +81,7 @@ uint8_t ti99_handset_device::read_dev()
|
||||
|
||||
void ti99_handset_device::write_dev(uint8_t data)
|
||||
{
|
||||
if (VERBOSE>7) LOG("ti99_handset_device: Set ack %d\n", data);
|
||||
if (TRACE_HANDSET) logerror("Set ack %d\n", data);
|
||||
set_acknowledge(data);
|
||||
}
|
||||
|
||||
@ -146,7 +146,7 @@ void ti99_handset_device::post_message(int message)
|
||||
m_clock_high = true;
|
||||
m_buf = ~message;
|
||||
m_buflen = 3;
|
||||
if (VERBOSE>5) LOG("ti99_handset_device: trigger interrupt\n");
|
||||
if (TRACE_HANDSET) logerror("trigger interrupt\n");
|
||||
m_joyport->set_interrupt(ASSERT_LINE);
|
||||
}
|
||||
|
||||
@ -335,7 +335,7 @@ void ti99_handset_device::device_start()
|
||||
|
||||
void ti99_handset_device::device_reset()
|
||||
{
|
||||
if (VERBOSE>5) LOG("ti99_handset_device: Reset\n");
|
||||
if (TRACE_HANDSET) logerror("Reset\n");
|
||||
m_delay_timer->enable(true);
|
||||
m_buf = 0;
|
||||
m_buflen = 0;
|
||||
@ -523,13 +523,13 @@ uint8_t ti99_twin_joystick_device::read_dev()
|
||||
if (m_joystick==2) value = ioport("JOY2")->read();
|
||||
else value = 0xff;
|
||||
}
|
||||
if (VERBOSE>6) LOG("ti99_twin_joystick_device: joy%d = %02x\n", m_joystick, value);
|
||||
if (TRACE_JOYSTICK) logerror("joy%d = %02x\n", m_joystick, value);
|
||||
return value;
|
||||
}
|
||||
|
||||
void ti99_twin_joystick_device::write_dev(uint8_t data)
|
||||
{
|
||||
if (VERBOSE>7) LOG("ti99_twin_joystick_device: Select joystick %d\n", data);
|
||||
if (TRACE_JOYSTICK) logerror("Select joystick %d\n", data);
|
||||
m_joystick = data & 0x03;
|
||||
}
|
||||
|
||||
|
@ -196,13 +196,19 @@ CRUCLK* 51||52 DBIN
|
||||
#include "memex.h"
|
||||
#include "horizon.h"
|
||||
|
||||
DEFINE_DEVICE_TYPE_NS(PERIBOX, bus::ti99::peb, peribox_device, "peribox", "Peripheral expansion box")
|
||||
DEFINE_DEVICE_TYPE_NS(PERIBOX_SLOT, bus::ti99::peb, peribox_slot_device, "peribox_slot", "TI P-Box slot")
|
||||
// Peripheral box that is attached to the TI console (also TI with EVPC)
|
||||
// and has the Flex Cable Interface in slot 1
|
||||
// This is a device that plugs into the slot "ioport" of the console
|
||||
DEFINE_DEVICE_TYPE_NS(TI99_PERIBOX, bus::ti99::peb, peribox_device, "peribox", "Peripheral expansion box")
|
||||
|
||||
DEFINE_DEVICE_TYPE_NS(PERIBOX_EV, bus::ti99::peb, peribox_ev_device, "peribox_ev", "Peripheral expansion box EVPC")
|
||||
DEFINE_DEVICE_TYPE_NS(PERIBOX_SG, bus::ti99::peb, peribox_sg_device, "peribox_sg", "Peripheral expansion box SGCPU")
|
||||
DEFINE_DEVICE_TYPE_NS(PERIBOX_GEN, bus::ti99::peb, peribox_gen_device, "peribox_gen", "Peripheral expansion box Geneve")
|
||||
DEFINE_DEVICE_TYPE_NS(PERIBOX_998, bus::ti99::peb, peribox_998_device, "peribox_998", "Peripheral expansion box 99/8")
|
||||
// Peripheral box which hosts the SGCPU card in slot 1
|
||||
DEFINE_DEVICE_TYPE_NS(TI99_PERIBOX_SG, bus::ti99::peb, peribox_sg_device, "peribox_sg", "Peripheral expansion box SGCPU")
|
||||
|
||||
// Peripheral box which hosts the Geneve 9640 in slot 1
|
||||
DEFINE_DEVICE_TYPE_NS(TI99_PERIBOX_GEN, bus::ti99::peb, peribox_gen_device, "peribox_gen", "Peripheral expansion box Geneve")
|
||||
|
||||
// Single slot of the PEB
|
||||
DEFINE_DEVICE_TYPE_NS(TI99_PERIBOX_SLOT, bus::ti99::peb, peribox_slot_device, "peribox_slot", "TI P-Box slot")
|
||||
|
||||
namespace bus { namespace ti99 { namespace peb {
|
||||
|
||||
@ -226,9 +232,21 @@ namespace bus { namespace ti99 { namespace peb {
|
||||
#define PEBSLOT7 "slot7"
|
||||
#define PEBSLOT8 "slot8"
|
||||
|
||||
peribox_device::peribox_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: peribox_device(mconfig, PERIBOX, tag, owner, clock)
|
||||
peribox_device::peribox_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock):
|
||||
bus::ti99::internal::ioport_attached_device(mconfig, TI99_PERIBOX, tag, owner, clock),
|
||||
m_slot1_inta(*this),
|
||||
m_slot1_intb(*this),
|
||||
m_slot1_lcp(*this),
|
||||
m_slot1_ready(*this),
|
||||
m_inta_flag(0),
|
||||
m_intb_flag(0),
|
||||
m_lcp_flag(0),
|
||||
m_ready_flag(0),
|
||||
m_msast(false),
|
||||
m_memen(false),
|
||||
m_ioport_connected(false)
|
||||
{
|
||||
for (int i=2; i <= 8; i++) m_slot[i] = nullptr;
|
||||
// The address prefix is actually created by the "Flex cable interface"
|
||||
// which sits in slot 1.
|
||||
m_address_prefix = 0x70000;
|
||||
@ -237,13 +255,18 @@ peribox_device::peribox_device(const machine_config &mconfig, const char *tag, d
|
||||
/*
|
||||
Constructor called from subclasses.
|
||||
*/
|
||||
peribox_device::peribox_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
|
||||
: bus8z_device(mconfig, type, tag, owner, clock),
|
||||
m_console_inta(*this),
|
||||
m_console_intb(*this),
|
||||
m_sgcpu_lcp(*this),
|
||||
m_datamux_ready(*this),
|
||||
m_inta_flag(0), m_intb_flag(0), m_ready_flag(0), m_address_prefix(0), m_msast(false), m_memen(false)
|
||||
peribox_device::peribox_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock):
|
||||
bus::ti99::internal::ioport_attached_device(mconfig, TI99_PERIBOX, tag, owner, clock),
|
||||
m_slot1_inta(*this),
|
||||
m_slot1_intb(*this),
|
||||
m_slot1_lcp(*this),
|
||||
m_slot1_ready(*this),
|
||||
m_inta_flag(0),
|
||||
m_intb_flag(0),
|
||||
m_ready_flag(0),
|
||||
m_address_prefix(0),
|
||||
m_msast(false),
|
||||
m_memen(false)
|
||||
{
|
||||
for (int i=2; i <= 8; i++) m_slot[i] = nullptr;
|
||||
}
|
||||
@ -372,7 +395,10 @@ void peribox_device::inta_join(int slot, int state)
|
||||
else
|
||||
m_inta_flag &= ~(1 << slot);
|
||||
|
||||
m_console_inta((m_inta_flag != 0)? ASSERT_LINE : CLEAR_LINE);
|
||||
if (m_ioport_connected)
|
||||
set_extint((m_inta_flag != 0)? ASSERT_LINE : CLEAR_LINE);
|
||||
else
|
||||
m_slot1_inta((m_inta_flag != 0)? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
void peribox_device::intb_join(int slot, int state)
|
||||
@ -383,7 +409,9 @@ void peribox_device::intb_join(int slot, int state)
|
||||
else
|
||||
m_intb_flag &= ~(1 << slot);
|
||||
|
||||
m_console_intb((m_intb_flag != 0)? ASSERT_LINE : CLEAR_LINE);
|
||||
// Not propagated to console
|
||||
if (!m_ioport_connected)
|
||||
m_slot1_intb((m_intb_flag != 0)? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
void peribox_device::lcp_join(int slot, int state)
|
||||
@ -394,7 +422,9 @@ void peribox_device::lcp_join(int slot, int state)
|
||||
else
|
||||
m_lcp_flag &= ~(1 << slot);
|
||||
|
||||
m_sgcpu_lcp((m_lcp_flag != 0)? ASSERT_LINE : CLEAR_LINE);
|
||||
// Not propagated to console
|
||||
if (!m_ioport_connected)
|
||||
m_slot1_lcp((m_lcp_flag != 0)? ASSERT_LINE : CLEAR_LINE);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -409,7 +439,10 @@ void peribox_device::ready_join(int slot, int state)
|
||||
else
|
||||
m_ready_flag &= ~(1 << slot);
|
||||
|
||||
m_datamux_ready((m_ready_flag != 0)? CLEAR_LINE : ASSERT_LINE);
|
||||
if (m_ioport_connected)
|
||||
set_ready((m_ready_flag != 0)? CLEAR_LINE : ASSERT_LINE);
|
||||
else
|
||||
m_slot1_ready((m_ready_flag != 0)? CLEAR_LINE : ASSERT_LINE);
|
||||
}
|
||||
|
||||
void peribox_device::set_slot_loaded(int slot, peribox_slot_device* slotdev)
|
||||
@ -422,10 +455,12 @@ void peribox_device::device_start()
|
||||
if (TRACE_EMU) logerror("%s: started\n", tag());
|
||||
|
||||
// Resolve the callback lines to the console
|
||||
m_console_inta.resolve();
|
||||
m_console_intb.resolve();
|
||||
m_sgcpu_lcp.resolve();
|
||||
m_datamux_ready.resolve();
|
||||
m_slot1_inta.resolve();
|
||||
m_slot1_intb.resolve();
|
||||
m_slot1_lcp.resolve();
|
||||
m_slot1_ready.resolve();
|
||||
|
||||
m_ioport_connected = (m_slot1_inta.isnull()); // TODO: init
|
||||
|
||||
if (TRACE_EMU)
|
||||
{
|
||||
@ -454,6 +489,7 @@ void peribox_device::device_config_complete()
|
||||
|
||||
SLOT_INTERFACE_START( peribox_slot )
|
||||
SLOT_INTERFACE("32kmem", TI99_32KMEM)
|
||||
SLOT_INTERFACE("evpc", TI99_EVPC )
|
||||
SLOT_INTERFACE("myarcmem", TI99_MYARCMEM)
|
||||
SLOT_INTERFACE("samsmem", TI99_SAMSMEM)
|
||||
SLOT_INTERFACE("pcode", TI99_P_CODE)
|
||||
@ -488,7 +524,7 @@ machine_config_constructor peribox_device::device_mconfig_additions() const
|
||||
*****************************************************************************/
|
||||
|
||||
peribox_gen_device::peribox_gen_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: peribox_device(mconfig, PERIBOX_GEN, tag, owner, clock)
|
||||
: peribox_device(mconfig, TI99_PERIBOX_GEN, tag, owner, clock)
|
||||
{
|
||||
// The Geneve sits in slot 1; there is no prefix here - it can control
|
||||
// a maximum address space of 512 KiB in the box. With the Genmod
|
||||
@ -525,50 +561,12 @@ machine_config_constructor peribox_gen_device::device_mconfig_additions() const
|
||||
return MACHINE_CONFIG_NAME( peribox_gen_device );
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
A variant of the box used for the TI-99/8
|
||||
*****************************************************************************/
|
||||
|
||||
peribox_998_device::peribox_998_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: peribox_device(mconfig, PERIBOX_998, tag, owner, clock)
|
||||
{
|
||||
m_address_prefix = 0x70000;
|
||||
}
|
||||
|
||||
// The BwG controller will not run with the TI-99/8 for the same reason why
|
||||
// it won't work with the Geneve.
|
||||
// We don't have many options here. The P-Box is not the prefered device for
|
||||
// the 99/8; it was intended to use the Hexbus interface. None of the memory
|
||||
// expansions are really supposed to work here.
|
||||
SLOT_INTERFACE_START( peribox_slot998 )
|
||||
SLOT_INTERFACE("ide", TI99_IDE)
|
||||
SLOT_INTERFACE("usbsm", TI99_USBSM)
|
||||
SLOT_INTERFACE("tirs232", TI99_RS232)
|
||||
SLOT_INTERFACE("tifdc", TI99_FDC)
|
||||
SLOT_INTERFACE("hfdc", TI99_HFDC)
|
||||
SLOT_INTERFACE_END
|
||||
|
||||
MACHINE_CONFIG_START( peribox_998_device )
|
||||
MCFG_PERIBOX_SLOT_ADD( PEBSLOT2, peribox_slot998 )
|
||||
MCFG_PERIBOX_SLOT_ADD( PEBSLOT3, peribox_slot998 )
|
||||
MCFG_PERIBOX_SLOT_ADD( PEBSLOT4, peribox_slot998 )
|
||||
MCFG_PERIBOX_SLOT_ADD( PEBSLOT5, peribox_slot998 )
|
||||
MCFG_PERIBOX_SLOT_ADD( PEBSLOT6, peribox_slot998 )
|
||||
MCFG_PERIBOX_SLOT_ADD( PEBSLOT7, peribox_slot998 )
|
||||
MCFG_PERIBOX_SLOT_ADD( PEBSLOT8, peribox_slot998 )
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
machine_config_constructor peribox_998_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( peribox_998_device );
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
A variant of the box used for the SGCPU (aka TI-99/4P).
|
||||
*****************************************************************************/
|
||||
|
||||
peribox_sg_device::peribox_sg_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: peribox_device(mconfig, PERIBOX_SG, tag, owner, clock)
|
||||
: peribox_device(mconfig, TI99_PERIBOX_SG, tag, owner, clock)
|
||||
{
|
||||
m_address_prefix = 0x70000;
|
||||
}
|
||||
@ -610,32 +608,6 @@ machine_config_constructor peribox_sg_device::device_mconfig_additions() const
|
||||
return MACHINE_CONFIG_NAME( peribox_sg_device );
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
Another variant of the box; used for the TI with EVPC. The EVPC is
|
||||
obviously required.
|
||||
*****************************************************************************/
|
||||
|
||||
peribox_ev_device::peribox_ev_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: peribox_device(mconfig, PERIBOX_EV, tag, owner, clock)
|
||||
{
|
||||
m_address_prefix = 0x70000;
|
||||
}
|
||||
|
||||
MACHINE_CONFIG_START( peribox_ev_device )
|
||||
MCFG_PERIBOX_SLOT_ADD_DEF( PEBSLOT2, peribox_ev_slot, "evpc" )
|
||||
MCFG_PERIBOX_SLOT_ADD( PEBSLOT3, peribox_slot )
|
||||
MCFG_PERIBOX_SLOT_ADD( PEBSLOT4, peribox_slot )
|
||||
MCFG_PERIBOX_SLOT_ADD( PEBSLOT5, peribox_slot )
|
||||
MCFG_PERIBOX_SLOT_ADD( PEBSLOT6, peribox_slot )
|
||||
MCFG_PERIBOX_SLOT_ADD( PEBSLOT7, peribox_slot )
|
||||
MCFG_PERIBOX_SLOT_ADD( PEBSLOT8, peribox_slot )
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
machine_config_constructor peribox_ev_device::device_mconfig_additions() const
|
||||
{
|
||||
return MACHINE_CONFIG_NAME( peribox_ev_device );
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
Implementation of a slot within the box.
|
||||
****************************************************************************/
|
||||
@ -652,7 +624,7 @@ int peribox_slot_device::get_index_from_tagname()
|
||||
}
|
||||
|
||||
peribox_slot_device::peribox_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||
: bus8z_device(mconfig, PERIBOX_SLOT, tag, owner, clock), device_slot_interface(mconfig, *this), m_card(nullptr), m_slotnumber(0)
|
||||
: bus8z_device(mconfig, TI99_PERIBOX_SLOT, tag, owner, clock), device_slot_interface(mconfig, *this), m_card(nullptr), m_slotnumber(0)
|
||||
{
|
||||
}
|
||||
|
||||
@ -717,14 +689,6 @@ void peribox_slot_device::device_config_complete()
|
||||
peb->set_slot_loaded(m_slotnumber, m_card ? this : nullptr);
|
||||
}
|
||||
|
||||
/*
|
||||
Delivers the drives that are installed in the box. Called from a card.
|
||||
*/
|
||||
device_t* peribox_slot_device::get_drive(const char* name)
|
||||
{
|
||||
return owner()->subdevice(name);
|
||||
}
|
||||
|
||||
/*
|
||||
These methods are called from the expansion cards. They add the
|
||||
slot number to identify the slot to the box.
|
||||
|
@ -17,6 +17,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "bus/ti99/ti99defs.h"
|
||||
#include "bus/ti99/internal/ioport.h"
|
||||
|
||||
namespace bus { namespace ti99 { namespace peb {
|
||||
|
||||
@ -28,31 +29,32 @@ class peribox_slot_device;
|
||||
See ti99defs.h for bus8z_device
|
||||
******************************************************************************/
|
||||
|
||||
class peribox_device : public bus8z_device
|
||||
class peribox_device : public bus::ti99::internal::ioport_attached_device
|
||||
{
|
||||
friend class peribox_slot_device;
|
||||
public:
|
||||
peribox_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
template <class Object> static devcb_base &static_set_inta_callback(device_t &device, Object &&cb) { return downcast<peribox_device &>(device).m_console_inta.set_callback(std::forward<Object>(cb)); }
|
||||
template <class Object> static devcb_base &static_set_intb_callback(device_t &device, Object &&cb) { return downcast<peribox_device &>(device).m_console_intb.set_callback(std::forward<Object>(cb)); }
|
||||
template <class Object> static devcb_base &static_set_ready_callback(device_t &device, Object &&cb) { return downcast<peribox_device &>(device).m_datamux_ready.set_callback(std::forward<Object>(cb)); }
|
||||
template <class Object> static devcb_base &static_set_lcp_callback(device_t &device, Object &&cb) { return downcast<peribox_device &>(device).m_sgcpu_lcp.set_callback(std::forward<Object>(cb)); }
|
||||
template <class Object> static devcb_base &static_set_inta_callback(device_t &device, Object &&cb) { return downcast<peribox_device &>(device).m_slot1_inta.set_callback(std::forward<Object>(cb)); }
|
||||
template <class Object> static devcb_base &static_set_intb_callback(device_t &device, Object &&cb) { return downcast<peribox_device &>(device).m_slot1_intb.set_callback(std::forward<Object>(cb)); }
|
||||
template <class Object> static devcb_base &static_set_ready_callback(device_t &device, Object &&cb) { return downcast<peribox_device &>(device).m_slot1_ready.set_callback(std::forward<Object>(cb)); }
|
||||
template <class Object> static devcb_base &static_set_lcp_callback(device_t &device, Object &&cb) { return downcast<peribox_device &>(device).m_slot1_lcp.set_callback(std::forward<Object>(cb)); }
|
||||
|
||||
// Next eight methods are called from the console
|
||||
DECLARE_READ8Z_MEMBER(readz) override;
|
||||
DECLARE_WRITE8_MEMBER(write) override;
|
||||
DECLARE_SETADDRESS_DBIN_MEMBER(setaddress_dbin) override;
|
||||
|
||||
DECLARE_READ8Z_MEMBER(crureadz);
|
||||
DECLARE_WRITE8_MEMBER(cruwrite);
|
||||
DECLARE_READ8Z_MEMBER(crureadz) override;
|
||||
DECLARE_WRITE8_MEMBER(cruwrite) override;
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(senila);
|
||||
DECLARE_WRITE_LINE_MEMBER(senilb);
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER( memen_in );
|
||||
DECLARE_WRITE_LINE_MEMBER( msast_in );
|
||||
DECLARE_WRITE_LINE_MEMBER( memen_in ) override;
|
||||
DECLARE_WRITE_LINE_MEMBER( msast_in ) override;
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER( clock_in );
|
||||
DECLARE_WRITE_LINE_MEMBER( clock_in ) override;
|
||||
|
||||
// Part of configuration
|
||||
void set_prefix(int prefix) { m_address_prefix = prefix; }
|
||||
@ -69,11 +71,11 @@ protected:
|
||||
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
|
||||
// Next three methods call back the console
|
||||
devcb_write_line m_console_inta; // INTA line (Box to console)
|
||||
devcb_write_line m_console_intb; // INTB line
|
||||
devcb_write_line m_sgcpu_lcp; // For EVPC with SGCPU only
|
||||
devcb_write_line m_datamux_ready; // READY line (to the datamux)
|
||||
// Next three methods call back the console via slot 1
|
||||
devcb_write_line m_slot1_inta; // INTA line (Box to console)
|
||||
devcb_write_line m_slot1_intb; // INTB line
|
||||
devcb_write_line m_slot1_lcp; // For EVPC with SGCPU only
|
||||
devcb_write_line m_slot1_ready; // READY line (to the datamux)
|
||||
|
||||
void set_slot_loaded(int slot, peribox_slot_device* slotdev);
|
||||
peribox_slot_device *m_slot[9]; // for the sake of simplicity we donate the first two positions (0,1)
|
||||
@ -98,23 +100,14 @@ protected:
|
||||
|
||||
// Memory enable.
|
||||
bool m_memen;
|
||||
|
||||
// Configured as a slot device (of the ioport)
|
||||
bool m_ioport_connected;
|
||||
};
|
||||
|
||||
/************************************************************************
|
||||
Specific Box compositions
|
||||
************************************************************************/
|
||||
/*
|
||||
Variation for EVPC. We'd like to offer the EVPC slot device only if
|
||||
we started the ti99_4ev driver.
|
||||
*/
|
||||
class peribox_ev_device : public peribox_device
|
||||
{
|
||||
public:
|
||||
peribox_ev_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
protected:
|
||||
virtual machine_config_constructor device_mconfig_additions() const override;
|
||||
};
|
||||
|
||||
/*
|
||||
Variation for SGCPU (TI-99/4P). We put the EVPC and the HSGPL in slots 2 and 3.
|
||||
@ -183,8 +176,6 @@ public:
|
||||
// called from the box itself
|
||||
void set_genmod(bool set);
|
||||
|
||||
device_t* get_drive(const char* name);
|
||||
|
||||
protected:
|
||||
void device_start() override;
|
||||
void device_config_complete() override;
|
||||
@ -244,11 +235,11 @@ protected:
|
||||
};
|
||||
|
||||
#define MCFG_PERIBOX_SLOT_ADD(_tag, _slot_intf) \
|
||||
MCFG_DEVICE_ADD(_tag, PERIBOX_SLOT, 0) \
|
||||
MCFG_DEVICE_ADD(_tag, TI99_PERIBOX_SLOT, 0) \
|
||||
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, nullptr, false)
|
||||
|
||||
#define MCFG_PERIBOX_SLOT_ADD_DEF(_tag, _slot_intf, _default) \
|
||||
MCFG_DEVICE_ADD(_tag, PERIBOX_SLOT, 0) \
|
||||
MCFG_DEVICE_ADD(_tag, TI99_PERIBOX_SLOT, 0) \
|
||||
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _default, false)
|
||||
|
||||
#define MCFG_PERIBOX_INTA_HANDLER( _inta ) \
|
||||
@ -265,12 +256,9 @@ protected:
|
||||
|
||||
} } } // end namespace bus::ti99::peb
|
||||
|
||||
DECLARE_DEVICE_TYPE_NS(PERIBOX, bus::ti99::peb, peribox_device)
|
||||
DECLARE_DEVICE_TYPE_NS(PERIBOX_SLOT, bus::ti99::peb, peribox_slot_device)
|
||||
|
||||
DECLARE_DEVICE_TYPE_NS(PERIBOX_EV, bus::ti99::peb, peribox_ev_device)
|
||||
DECLARE_DEVICE_TYPE_NS(PERIBOX_SG, bus::ti99::peb, peribox_sg_device)
|
||||
DECLARE_DEVICE_TYPE_NS(PERIBOX_GEN, bus::ti99::peb, peribox_gen_device)
|
||||
DECLARE_DEVICE_TYPE_NS(PERIBOX_998, bus::ti99::peb, peribox_998_device)
|
||||
DECLARE_DEVICE_TYPE_NS(TI99_PERIBOX, bus::ti99::peb, peribox_device)
|
||||
DECLARE_DEVICE_TYPE_NS(TI99_PERIBOX_SLOT, bus::ti99::peb, peribox_slot_device)
|
||||
DECLARE_DEVICE_TYPE_NS(TI99_PERIBOX_SG, bus::ti99::peb, peribox_sg_device)
|
||||
DECLARE_DEVICE_TYPE_NS(TI99_PERIBOX_GEN, bus::ti99::peb, peribox_gen_device)
|
||||
|
||||
#endif // MAME_BUS_TI99_PEB_PERIBOX_H
|
||||
|
@ -24,6 +24,7 @@
|
||||
#define GROM0_TAG "console_grom_0"
|
||||
#define GROM1_TAG "console_grom_1"
|
||||
#define GROM2_TAG "console_grom_2"
|
||||
#define TI99_IOPORT_TAG "ioport"
|
||||
#define JOYPORT_TAG "joyport"
|
||||
#define EVPC_CONN_TAG "evpc_conn"
|
||||
#define DATAMUX_TAG "datamux_16_8"
|
||||
|
@ -720,7 +720,7 @@ static MACHINE_CONFIG_START( geneve_60hz )
|
||||
MCFG_MM58274C_DAY1(0) // sunday
|
||||
|
||||
// Peripheral expansion box (Geneve composition)
|
||||
MCFG_DEVICE_ADD( PERIBOX_TAG, PERIBOX_GEN, 0)
|
||||
MCFG_DEVICE_ADD( PERIBOX_TAG, TI99_PERIBOX_GEN, 0)
|
||||
MCFG_PERIBOX_INTA_HANDLER( WRITELINE(geneve_state, inta) )
|
||||
MCFG_PERIBOX_INTB_HANDLER( WRITELINE(geneve_state, intb) )
|
||||
MCFG_PERIBOX_READY_HANDLER( WRITELINE(geneve_state, ext_ready) )
|
||||
|
@ -1011,7 +1011,7 @@ static MACHINE_CONFIG_START( ti99_4p_60hz )
|
||||
MCFG_TMS9901_INTLEVEL_HANDLER( WRITE8( ti99_4p_state, tms9901_interrupt) )
|
||||
|
||||
// Peripheral expansion box (SGCPU composition)
|
||||
MCFG_DEVICE_ADD( PERIBOX_TAG, PERIBOX_SG, 0)
|
||||
MCFG_DEVICE_ADD( PERIBOX_TAG, TI99_PERIBOX_SG, 0)
|
||||
MCFG_PERIBOX_INTA_HANDLER( WRITELINE(ti99_4p_state, extint) )
|
||||
MCFG_PERIBOX_INTB_HANDLER( WRITELINE(ti99_4p_state, notconnected) )
|
||||
MCFG_PERIBOX_READY_HANDLER( WRITELINE(ti99_4p_state, ready_line) )
|
||||
|
@ -52,7 +52,7 @@
|
||||
#include "bus/ti99/internal/evpcconn.h"
|
||||
|
||||
#include "bus/ti99/joyport/joyport.h"
|
||||
#include "bus/ti99/peb/peribox.h"
|
||||
#include "bus/ti99/internal/ioport.h"
|
||||
#include "machine/ram.h"
|
||||
|
||||
#include "softlist.h"
|
||||
@ -82,7 +82,7 @@ public:
|
||||
m_cpu(*this, "maincpu"),
|
||||
m_tms9901(*this, TMS9901_TAG),
|
||||
m_gromport(*this, GROMPORT_TAG),
|
||||
m_peribox(*this, PERIBOX_TAG),
|
||||
m_ioport(*this, TI99_IOPORT_TAG),
|
||||
m_joyport(*this, JOYPORT_TAG),
|
||||
m_datamux(*this, DATAMUX_TAG),
|
||||
m_video(*this, VDP_TAG),
|
||||
@ -167,7 +167,7 @@ private:
|
||||
required_device<tms9900_device> m_cpu;
|
||||
required_device<tms9901_device> m_tms9901;
|
||||
required_device<bus::ti99::internal::gromport_device> m_gromport;
|
||||
required_device<bus::ti99::peb::peribox_device> m_peribox;
|
||||
required_device<bus::ti99::internal::ioport_device> m_ioport;
|
||||
required_device<bus::ti99::joyport::joyport_device> m_joyport;
|
||||
required_device<bus::ti99::internal::datamux_device> m_datamux;
|
||||
optional_device<tms9928a_device> m_video;
|
||||
@ -397,7 +397,7 @@ READ8_MEMBER( ti99_4x_state::cruread )
|
||||
|
||||
// The QI version does not propagate the CRU signals to the cartridge slot
|
||||
if (m_model != MODEL_4QI) m_gromport->crureadz(space, offset<<4, &value);
|
||||
m_peribox->crureadz(space, offset<<4, &value);
|
||||
m_ioport->crureadz(space, offset<<4, &value);
|
||||
|
||||
return value;
|
||||
}
|
||||
@ -407,7 +407,7 @@ WRITE8_MEMBER( ti99_4x_state::cruwrite )
|
||||
if (TRACE_CRU) logerror("ti99_4x: write access to CRU address %04x\n", offset << 1);
|
||||
// The QI version does not propagate the CRU signals to the cartridge slot
|
||||
if (m_model != MODEL_4QI) m_gromport->cruwrite(space, offset<<1, data);
|
||||
m_peribox->cruwrite(space, offset<<1, data);
|
||||
m_ioport->cruwrite(space, offset<<1, data);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( ti99_4x_state::external_operation )
|
||||
@ -637,7 +637,7 @@ READ8_MEMBER( ti99_4x_state::interrupt_level )
|
||||
WRITE_LINE_MEMBER( ti99_4x_state::clock_out )
|
||||
{
|
||||
m_datamux->clock_in(state);
|
||||
m_peribox->clock_in(state);
|
||||
m_ioport->clock_in(state);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -811,8 +811,6 @@ void ti99_4x_state::register_save_state()
|
||||
|
||||
MACHINE_START_MEMBER(ti99_4x_state,ti99_4)
|
||||
{
|
||||
m_peribox->senila(CLEAR_LINE);
|
||||
m_peribox->senilb(CLEAR_LINE);
|
||||
m_nready_combined = 0;
|
||||
m_model = MODEL_4;
|
||||
register_save_state();
|
||||
@ -875,11 +873,10 @@ static MACHINE_CONFIG_START( ti99_4 )
|
||||
// Software list
|
||||
MCFG_SOFTWARE_LIST_ADD("cart_list_ti99", "ti99_cart")
|
||||
|
||||
// Peripheral expansion box
|
||||
MCFG_DEVICE_ADD( PERIBOX_TAG, PERIBOX, 0)
|
||||
MCFG_PERIBOX_INTA_HANDLER( WRITELINE(ti99_4x_state, extint) )
|
||||
MCFG_PERIBOX_INTB_HANDLER( WRITELINE(ti99_4x_state, notconnected) )
|
||||
MCFG_PERIBOX_READY_HANDLER( DEVWRITELINE(DATAMUX_TAG, bus::ti99::internal::datamux_device, ready_line) )
|
||||
// Input/output port
|
||||
MCFG_IOPORT_ADD( TI99_IOPORT_TAG )
|
||||
MCFG_IOPORT_EXTINT_HANDLER( WRITELINE(ti99_4x_state, extint) )
|
||||
MCFG_IOPORT_READY_HANDLER( DEVWRITELINE(DATAMUX_TAG, bus::ti99::internal::datamux_device, ready_line) )
|
||||
|
||||
// Sound hardware
|
||||
MCFG_SPEAKER_STANDARD_MONO("sound_out")
|
||||
@ -935,8 +932,6 @@ MACHINE_CONFIG_END
|
||||
|
||||
MACHINE_START_MEMBER(ti99_4x_state,ti99_4a)
|
||||
{
|
||||
m_peribox->senila(CLEAR_LINE);
|
||||
m_peribox->senilb(CLEAR_LINE);
|
||||
m_nready_combined = 0;
|
||||
m_model = MODEL_4A;
|
||||
register_save_state();
|
||||
@ -995,11 +990,10 @@ static MACHINE_CONFIG_START( ti99_4a )
|
||||
// Software list
|
||||
MCFG_SOFTWARE_LIST_ADD("cart_list_ti99", "ti99_cart")
|
||||
|
||||
// Peripheral expansion box
|
||||
MCFG_DEVICE_ADD( PERIBOX_TAG, PERIBOX, 0)
|
||||
MCFG_PERIBOX_INTA_HANDLER( WRITELINE(ti99_4x_state, extint) )
|
||||
MCFG_PERIBOX_INTB_HANDLER( WRITELINE(ti99_4x_state, notconnected) )
|
||||
MCFG_PERIBOX_READY_HANDLER( DEVWRITELINE(DATAMUX_TAG, bus::ti99::internal::datamux_device, ready_line) )
|
||||
// Input/output port
|
||||
MCFG_IOPORT_ADD( TI99_IOPORT_TAG )
|
||||
MCFG_IOPORT_EXTINT_HANDLER( WRITELINE(ti99_4x_state, extint) )
|
||||
MCFG_IOPORT_READY_HANDLER( DEVWRITELINE(DATAMUX_TAG, bus::ti99::internal::datamux_device, ready_line) )
|
||||
|
||||
// Sound hardware
|
||||
MCFG_SPEAKER_STANDARD_MONO("sound_out")
|
||||
@ -1059,8 +1053,6 @@ MACHINE_CONFIG_END
|
||||
|
||||
MACHINE_START_MEMBER(ti99_4x_state, ti99_4qi)
|
||||
{
|
||||
m_peribox->senila(CLEAR_LINE);
|
||||
m_peribox->senilb(CLEAR_LINE);
|
||||
m_model = MODEL_4QI;
|
||||
m_nready_combined = 0;
|
||||
register_save_state();
|
||||
@ -1093,8 +1085,6 @@ MACHINE_CONFIG_END
|
||||
|
||||
MACHINE_START_MEMBER(ti99_4x_state, ti99_4ev)
|
||||
{
|
||||
m_peribox->senila(CLEAR_LINE);
|
||||
m_peribox->senilb(CLEAR_LINE);
|
||||
m_nready_combined = 0;
|
||||
m_model = MODEL_4A;
|
||||
// Removing the TMS9928a requires to add a replacement for the GROMCLK.
|
||||
@ -1159,11 +1149,10 @@ static MACHINE_CONFIG_START( ti99_4ev_60hz )
|
||||
// Software list
|
||||
MCFG_SOFTWARE_LIST_ADD("cart_list_ti99", "ti99_cart")
|
||||
|
||||
// Peripheral expansion box
|
||||
MCFG_DEVICE_ADD( PERIBOX_TAG, PERIBOX_EV, 0)
|
||||
MCFG_PERIBOX_INTA_HANDLER( WRITELINE(ti99_4x_state, extint) )
|
||||
MCFG_PERIBOX_INTB_HANDLER( WRITELINE(ti99_4x_state, notconnected) )
|
||||
MCFG_PERIBOX_READY_HANDLER( DEVWRITELINE(DATAMUX_TAG, bus::ti99::internal::datamux_device, ready_line) )
|
||||
// Input/output port
|
||||
MCFG_IOPORT_ADD( TI99_IOPORT_TAG )
|
||||
MCFG_IOPORT_EXTINT_HANDLER( WRITELINE(ti99_4x_state, extint) )
|
||||
MCFG_IOPORT_READY_HANDLER( DEVWRITELINE(DATAMUX_TAG, bus::ti99::internal::datamux_device, ready_line) )
|
||||
|
||||
// Cassette drives
|
||||
MCFG_SPEAKER_STANDARD_MONO("cass_out")
|
||||
|
@ -185,7 +185,7 @@ Known Issues (MZ, 2010-11-07)
|
||||
#include "bus/ti99/internal/gromport.h"
|
||||
|
||||
#include "bus/ti99/joyport/joyport.h"
|
||||
#include "bus/ti99/peb/peribox.h"
|
||||
#include "bus/ti99/internal/ioport.h"
|
||||
|
||||
#include "softlist.h"
|
||||
#include "speaker.h"
|
||||
@ -218,7 +218,7 @@ public:
|
||||
m_cpu(*this, "maincpu"),
|
||||
m_tms9901(*this, TMS9901_TAG),
|
||||
m_gromport(*this, GROMPORT_TAG),
|
||||
m_peribox(*this, PERIBOX_TAG),
|
||||
m_ioport(*this, TI99_IOPORT_TAG),
|
||||
m_mainboard(*this, MAINBOARD8_TAG),
|
||||
m_joyport(*this, JOYPORT_TAG),
|
||||
m_cassette(*this, "cassette")
|
||||
@ -276,7 +276,7 @@ private:
|
||||
required_device<tms9995_device> m_cpu;
|
||||
required_device<tms9901_device> m_tms9901;
|
||||
required_device<bus::ti99::internal::gromport_device> m_gromport;
|
||||
required_device<bus::ti99::peb::peribox_device> m_peribox;
|
||||
required_device<bus::ti99::internal::ioport_device> m_ioport;
|
||||
required_device<bus::ti99::internal::mainboard8_device> m_mainboard;
|
||||
required_device<bus::ti99::joyport::joyport_device> m_joyport;
|
||||
required_device<cassette_image_device> m_cassette;
|
||||
@ -418,7 +418,7 @@ READ8_MEMBER( ti99_8_state::cruread )
|
||||
// Also, we translate the bit addresses to base addresses
|
||||
m_mainboard->crureadz(space, offset<<4, &value);
|
||||
m_gromport->crureadz(space, offset<<4, &value);
|
||||
m_peribox->crureadz(space, offset<<4, &value);
|
||||
m_ioport->crureadz(space, offset<<4, &value);
|
||||
|
||||
if (TRACE_CRU) logerror("ti99_8: CRU %04x -> %02x\n", offset<<4, value);
|
||||
return value;
|
||||
@ -429,7 +429,7 @@ WRITE8_MEMBER( ti99_8_state::cruwrite )
|
||||
if (TRACE_CRU) logerror("ti99_8: CRU %04x <- %x\n", offset<<1, data);
|
||||
m_mainboard->cruwrite(space, offset<<1, data);
|
||||
m_gromport->cruwrite(space, offset<<1, data);
|
||||
m_peribox->cruwrite(space, offset<<1, data);
|
||||
m_ioport->cruwrite(space, offset<<1, data);
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
@ -685,10 +685,6 @@ WRITE_LINE_MEMBER( ti99_8_state::dbin_line )
|
||||
|
||||
MACHINE_START_MEMBER(ti99_8_state,ti99_8)
|
||||
{
|
||||
m_peribox->senila(CLEAR_LINE);
|
||||
m_peribox->senilb(CLEAR_LINE);
|
||||
// m_mainboard->set_gromport(m_gromport);
|
||||
|
||||
// Need to configure the speech ROM for inverse bit order
|
||||
speechrom_device* mem = subdevice<speechrom_device>(SPEECHROM_REG);
|
||||
mem->set_reverse_bit_order(true);
|
||||
@ -762,11 +758,10 @@ static MACHINE_CONFIG_START( ti99_8 )
|
||||
/* Software list */
|
||||
MCFG_SOFTWARE_LIST_ADD("cart_list_ti99", "ti99_cart")
|
||||
|
||||
// Peripheral expansion box
|
||||
MCFG_DEVICE_ADD( PERIBOX_TAG, PERIBOX_998, 0)
|
||||
MCFG_PERIBOX_INTA_HANDLER( WRITELINE(ti99_8_state, extint) )
|
||||
MCFG_PERIBOX_INTB_HANDLER( WRITELINE(ti99_8_state, notconnected) )
|
||||
MCFG_PERIBOX_READY_HANDLER( DEVWRITELINE(MAINBOARD8_TAG, bus::ti99::internal::mainboard8_device, pbox_ready) )
|
||||
// I/O port
|
||||
MCFG_IOPORT_ADD( TI99_IOPORT_TAG )
|
||||
MCFG_IOPORT_EXTINT_HANDLER( WRITELINE(ti99_8_state, extint) )
|
||||
MCFG_IOPORT_READY_HANDLER( DEVWRITELINE(MAINBOARD8_TAG, bus::ti99::internal::mainboard8_device, pbox_ready) )
|
||||
|
||||
// Sound hardware
|
||||
MCFG_SPEAKER_STANDARD_MONO("sound_out")
|
||||
|
Loading…
Reference in New Issue
Block a user