summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/ti99/peb/peribox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/ti99/peb/peribox.cpp')
-rw-r--r--src/devices/bus/ti99/peb/peribox.cpp97
1 files changed, 51 insertions, 46 deletions
diff --git a/src/devices/bus/ti99/peb/peribox.cpp b/src/devices/bus/ti99/peb/peribox.cpp
index b4e047c9815..4df80e153d5 100644
--- a/src/devices/bus/ti99/peb/peribox.cpp
+++ b/src/devices/bus/ti99/peb/peribox.cpp
@@ -198,13 +198,15 @@ CRUCLK* 51||52 DBIN
#include "forti.h"
#include "pgram.h"
#include "sidmaster.h"
+#include "scsicard.h"
+#include "tipi.h"
-#define LOG_WARN (1U<<1) // Warnings
-#define LOG_CONFIG (1U<<2) // Configuration
-#define LOG_INT (1U<<3)
-#define LOG_READY (1U<<4)
+#define LOG_WARN (1U << 1) // Warnings
+#define LOG_CONFIG (1U << 2) // Configuration
+#define LOG_INT (1U << 3)
+#define LOG_READY (1U << 4)
-#define VERBOSE ( LOG_CONFIG | LOG_WARN )
+#define VERBOSE (LOG_CONFIG | LOG_WARN)
#include "logmacro.h"
@@ -321,7 +323,7 @@ void peribox_device::cruwrite(offs_t offset, uint8_t data)
/*
RESET line from the console.
*/
-WRITE_LINE_MEMBER(peribox_device::reset_in)
+void peribox_device::reset_in(int state)
{
for (int i=2; i <= 8; i++)
{
@@ -333,7 +335,7 @@ WRITE_LINE_MEMBER(peribox_device::reset_in)
And here are finally the two mythical lines SENILA* and SENILB*; mythical
since there is no report of any software that ever used them.
*/
-WRITE_LINE_MEMBER(peribox_device::senila)
+void peribox_device::senila(int state)
{
for (int i=2; i <= 8; i++)
{
@@ -341,7 +343,7 @@ WRITE_LINE_MEMBER(peribox_device::senila)
}
}
-WRITE_LINE_MEMBER(peribox_device::senilb)
+void peribox_device::senilb(int state)
{
for (int i=2; i <= 8; i++)
{
@@ -352,7 +354,7 @@ WRITE_LINE_MEMBER(peribox_device::senilb)
/*
MEMEN input. Used to start the external memory access cycle.
*/
-WRITE_LINE_MEMBER(peribox_device::memen_in)
+void peribox_device::memen_in(int state)
{
m_memen = (state==ASSERT_LINE);
}
@@ -360,7 +362,7 @@ WRITE_LINE_MEMBER(peribox_device::memen_in)
/*
MSAST input. Defined by TI-99/8; we ignore this part in the PEB.
*/
-WRITE_LINE_MEMBER(peribox_device::msast_in)
+void peribox_device::msast_in(int state)
{
m_msast = (state==ASSERT_LINE);
}
@@ -369,7 +371,7 @@ WRITE_LINE_MEMBER(peribox_device::msast_in)
CLKOUT line
*/
-WRITE_LINE_MEMBER(peribox_device::clock_in)
+void peribox_device::clock_in(int state)
{
for (int i=2; i <= 8; i++)
{
@@ -450,13 +452,7 @@ void peribox_device::set_slot_loaded(int slot, peribox_slot_device* slotdev)
void peribox_device::device_start()
{
- // Resolve the callback lines to the console
- 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
+ m_ioport_connected = (m_slot1_inta.isunset()); // TODO: init
LOGMASKED(LOG_CONFIG, "AMA/B/C address prefix set to %05x\n", m_address_prefix);
for (int i=2; i < 9; i++)
@@ -501,6 +497,8 @@ void ti99_peribox_slot_standard(device_slot_interface &device)
device.option_add("ddcc1", TI99_DDCC1);
device.option_add("forti", TI99_FORTI);
device.option_add("sidmaster", TI99_SIDMASTER);
+ device.option_add("whtscsi", TI99_WHTSCSI);
+ device.option_add("tipi", TI99_TIPI);
}
void peribox_device::device_add_mconfig(machine_config &config)
@@ -546,6 +544,8 @@ void ti99_peribox_slot_evpc(device_slot_interface &device)
device.option_add("ddcc1", TI99_DDCC1);
device.option_add("forti", TI99_FORTI);
device.option_add("sidmaster", TI99_SIDMASTER);
+ device.option_add("whtscsi", TI99_WHTSCSI);
+ device.option_add("tipi", TI99_TIPI);
}
void peribox_ev_device::device_add_mconfig(machine_config &config)
@@ -602,6 +602,8 @@ void ti99_peribox_slot_geneve(device_slot_interface &device)
device.option_add("ddcc1", TI99_DDCC1);
device.option_add("forti", TI99_FORTI);
device.option_add("sidmaster", TI99_SIDMASTER);
+ device.option_add("whtscsi", TI99_WHTSCSI);
+ device.option_add("tipi", TI99_TIPI);
}
void peribox_gen_device::device_add_mconfig(machine_config &config)
@@ -658,6 +660,8 @@ void ti99_peribox_slot_sgcpu(device_slot_interface &device)
device.option_add("ddcc1", TI99_DDCC1);
device.option_add("forti", TI99_FORTI);
device.option_add("sidmaster", TI99_SIDMASTER);
+ device.option_add("whtscsi", TI99_WHTSCSI);
+ device.option_add("tipi", TI99_TIPI);
}
void peribox_sg_device::device_add_mconfig(machine_config &config)
@@ -679,6 +683,7 @@ peribox_slot_device::peribox_slot_device(const machine_config &mconfig, const ch
device_t(mconfig, TI99_PERIBOX_SLOT, tag, owner, clock),
device_single_card_slot_interface<device_ti99_peribox_card_interface>(mconfig, *this),
m_card(nullptr),
+ m_peb(nullptr),
m_slotnumber(0)
{
}
@@ -708,22 +713,22 @@ void peribox_slot_device::cruwrite(offs_t offset, uint8_t data)
m_card->cruwrite(offset, data);
}
-WRITE_LINE_MEMBER( peribox_slot_device::senila )
+void peribox_slot_device::senila(int state)
{
m_card->set_senila(state);
}
-WRITE_LINE_MEMBER( peribox_slot_device::senilb )
+void peribox_slot_device::senilb(int state)
{
m_card->set_senilb(state);
}
-WRITE_LINE_MEMBER( peribox_slot_device::clock_in )
+void peribox_slot_device::clock_in(int state)
{
m_card->clock_in(state);
}
-WRITE_LINE_MEMBER( peribox_slot_device::reset_in )
+void peribox_slot_device::reset_in(int state)
{
m_card->reset_in(state);
}
@@ -735,37 +740,37 @@ void peribox_slot_device::device_start()
void peribox_slot_device::device_config_complete()
{
m_card = get_card_device();
- peribox_device *peb = dynamic_cast<peribox_device*>(owner());
- if (peb)
- peb->set_slot_loaded(m_slotnumber, m_card ? this : nullptr);
+ m_peb = dynamic_cast<peribox_device*>(owner());
+ if (m_peb)
+ m_peb->set_slot_loaded(m_slotnumber, m_card ? this : nullptr);
}
/*
These methods are called from the expansion cards. They add the
slot number to identify the slot to the box.
*/
-WRITE_LINE_MEMBER( peribox_slot_device::set_inta )
+void peribox_slot_device::set_inta(int state)
{
- peribox_device *peb = static_cast<peribox_device*>(owner());
- peb->inta_join(m_slotnumber, state);
+ if (m_peb)
+ m_peb->inta_join(m_slotnumber, state);
}
-WRITE_LINE_MEMBER( peribox_slot_device::set_intb )
+void peribox_slot_device::set_intb(int state)
{
- peribox_device *peb = static_cast<peribox_device*>(owner());
- peb->intb_join(m_slotnumber, state);
+ if (m_peb)
+ m_peb->intb_join(m_slotnumber, state);
}
-WRITE_LINE_MEMBER( peribox_slot_device::lcp_line )
+void peribox_slot_device::lcp_line(int state)
{
- peribox_device *peb = static_cast<peribox_device*>(owner());
- peb->lcp_join(m_slotnumber, state);
+ if (m_peb)
+ m_peb->lcp_join(m_slotnumber, state);
}
-WRITE_LINE_MEMBER( peribox_slot_device::set_ready )
+void peribox_slot_device::set_ready(int state)
{
- peribox_device *peb = static_cast<peribox_device*>(owner());
- peb->ready_join(m_slotnumber, state);
+ if (m_peb)
+ m_peb->ready_join(m_slotnumber, state);
}
/***************************************************************************/
@@ -786,18 +791,18 @@ void device_ti99_peribox_card_interface::interface_config_complete()
bool device_ti99_peribox_card_interface::in_dsr_space(offs_t offset, bool amadec)
{
- if (amadec)
- return (offset & 0x7e000)==0x74000;
- else
- return (offset & 0x0e000)==0x04000;
+ if (amadec && !amabc_is_set(offset)) return false;
+ return (offset & 0x0e000)==0x04000;
}
-bool device_ti99_peribox_card_interface::in_cart_space(offs_t offset, bool amadec)
+/*
+ Some cards do not decode the additional address lines AMA, AMB, AMC.
+ This leads to errors when using the card with Genmod. The typical procedure
+ to decode the lines is the same for each card.
+*/
+bool device_ti99_peribox_card_interface::amabc_is_set(offs_t offset)
{
- if (amadec)
- return (offset & 0x7e000)==0x76000;
- else
- return (offset & 0x0e000)==0x06000;
+ return (((offset >> 16)&0x07)==0x07);
}
} // end namespace bus::ti99::peb