mirror of
https://github.com/holub/mame
synced 2025-04-23 08:49:55 +03:00
poly88, poly8813: Add PolyMorphic 16K RAM card and make one the default
This commit is contained in:
parent
94f87336f9
commit
b5e018a5ab
@ -1686,6 +1686,8 @@ if (BUSES["S100"]~=null) then
|
||||
MAME_DIR .. "src/devices/bus/s100/nsmdsa.h",
|
||||
MAME_DIR .. "src/devices/bus/s100/nsmdsad.cpp",
|
||||
MAME_DIR .. "src/devices/bus/s100/nsmdsad.h",
|
||||
MAME_DIR .. "src/devices/bus/s100/poly16k.cpp",
|
||||
MAME_DIR .. "src/devices/bus/s100/poly16k.h",
|
||||
MAME_DIR .. "src/devices/bus/s100/polyfdc.cpp",
|
||||
MAME_DIR .. "src/devices/bus/s100/polyfdc.h",
|
||||
MAME_DIR .. "src/devices/bus/s100/polyvti.cpp",
|
||||
|
137
src/devices/bus/s100/poly16k.cpp
Normal file
137
src/devices/bus/s100/poly16k.cpp
Normal file
@ -0,0 +1,137 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:AJR
|
||||
/**********************************************************************
|
||||
|
||||
PolyMorphic Systems 16K RAM Card
|
||||
|
||||
This is a mostly straightforward S-100 dynamic RAM board using
|
||||
the Intel 3242 controller to generate refresh timings. The one
|
||||
slightly unexpected IC on this board is a SN74LS283 adder, which
|
||||
allows the RAM to be addressed in a contiguous block beginning at
|
||||
any 4K boundary.
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#include "emu.h"
|
||||
#include "poly16k.h"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
|
||||
// ======================> poly_16k_ram_device
|
||||
|
||||
class poly_16k_ram_device : public device_t, public device_s100_card_interface
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
poly_16k_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
|
||||
|
||||
protected:
|
||||
// device-specific overrides
|
||||
virtual ioport_constructor device_input_ports() const override;
|
||||
virtual void device_start() override;
|
||||
|
||||
// S-100 memory access handlers
|
||||
virtual u8 s100_smemr_r(offs_t offset) override;
|
||||
virtual void s100_mwrt_w(offs_t offset, u8 data) override;
|
||||
|
||||
// internal state
|
||||
std::unique_ptr<u8[]> m_ram;
|
||||
|
||||
private:
|
||||
// object finder
|
||||
required_ioport m_dsw;
|
||||
};
|
||||
|
||||
DEFINE_DEVICE_TYPE_PRIVATE(S100_POLY_16K, device_s100_card_interface, poly_16k_ram_device, "poly16k", "PolyMorphic Systems 16K RAM Card")
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// CONFIGURATION SETTINGS
|
||||
//**************************************************************************
|
||||
|
||||
static INPUT_PORTS_START(poly16k)
|
||||
PORT_START("DSW")
|
||||
PORT_DIPNAME(0xf, 0xd, "RAM Space") PORT_DIPLOCATION("SW:1,2,3,4")
|
||||
PORT_DIPSETTING(0xf, "0000-3FFFH")
|
||||
PORT_DIPSETTING(0xe, "1000-4FFFH")
|
||||
PORT_DIPSETTING(0xd, "2000-5FFFH")
|
||||
PORT_DIPSETTING(0xc, "3000-6FFFH")
|
||||
PORT_DIPSETTING(0xb, "4000-7FFFH")
|
||||
PORT_DIPSETTING(0xa, "5000-8FFFH")
|
||||
PORT_DIPSETTING(0x9, "6000-9FFFH")
|
||||
PORT_DIPSETTING(0x8, "7000-AFFFH")
|
||||
PORT_DIPSETTING(0x7, "8000-BFFFH")
|
||||
PORT_DIPSETTING(0x6, "9000-CFFFH")
|
||||
PORT_DIPSETTING(0x5, "A000-DFFFH")
|
||||
PORT_DIPSETTING(0x4, "B000-EFFFH")
|
||||
PORT_DIPSETTING(0x3, "C000-FFFFH")
|
||||
PORT_DIPSETTING(0x2, "D000-FFFFH, 0000-0FFFH")
|
||||
PORT_DIPSETTING(0x1, "E000-FFFFH, 0000-1FFFH")
|
||||
PORT_DIPSETTING(0x0, "F000-FFFFH, 0000-2FFFH")
|
||||
INPUT_PORTS_END
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// DEVICE DEFINITION
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// poly_16k_ram_device - constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
poly_16k_ram_device::poly_16k_ram_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
|
||||
: device_t(mconfig, S100_POLY_16K, tag, owner, clock)
|
||||
, device_s100_card_interface(mconfig, *this)
|
||||
, m_dsw(*this, "DSW")
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_input_ports - input port construction
|
||||
//-------------------------------------------------
|
||||
|
||||
ioport_constructor poly_16k_ram_device::device_input_ports() const
|
||||
{
|
||||
return INPUT_PORTS_NAME(poly16k);
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_start - device-specific startup
|
||||
//-------------------------------------------------
|
||||
|
||||
void poly_16k_ram_device::device_start()
|
||||
{
|
||||
m_ram = make_unique_clear<u8[]>(0x4000);
|
||||
save_pointer(NAME(m_ram), 0x4000);
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// s100_smemr_r - memory read
|
||||
//-------------------------------------------------
|
||||
|
||||
u8 poly_16k_ram_device::s100_smemr_r(offs_t offset)
|
||||
{
|
||||
u16 addr = offset + (u16(m_dsw->read() + 1) << 12);
|
||||
if (addr < 0x4000)
|
||||
return m_ram[addr];
|
||||
else
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// s100_mwrt_w - memory write
|
||||
//-------------------------------------------------
|
||||
|
||||
void poly_16k_ram_device::s100_mwrt_w(offs_t offset, u8 data)
|
||||
{
|
||||
u16 addr = offset + (u16(m_dsw->read() + 1) << 12);
|
||||
if (addr < 0x4000)
|
||||
m_ram[addr] = data;
|
||||
}
|
18
src/devices/bus/s100/poly16k.h
Normal file
18
src/devices/bus/s100/poly16k.h
Normal file
@ -0,0 +1,18 @@
|
||||
// license:BSD-3-Clause
|
||||
// copyright-holders:AJR
|
||||
/**********************************************************************
|
||||
|
||||
PolyMorphic Systems 16K RAM Card
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#ifndef MAME_BUS_S100_POLY16K_H
|
||||
#define MAME_BUS_S100_POLY16K_H
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "bus/s100/s100.h"
|
||||
|
||||
DECLARE_DEVICE_TYPE(S100_POLY_16K, device_s100_card_interface)
|
||||
|
||||
#endif // MAME_BUS_S100_POLY16K_H
|
@ -43,6 +43,7 @@ at least some models of the Poly-88 are known to have used.)
|
||||
#include "emu.h"
|
||||
#include "includes/poly88.h"
|
||||
|
||||
#include "bus/s100/poly16k.h"
|
||||
#include "bus/s100/polyfdc.h"
|
||||
#include "bus/s100/polyvti.h"
|
||||
#include "bus/s100/seals8k.h"
|
||||
@ -99,6 +100,7 @@ static void poly88_s100_devices(device_slot_interface &device)
|
||||
device.option_add("vti", S100_POLY_VTI);
|
||||
device.option_add("8ksc", S100_8K_SC);
|
||||
device.option_add("8kscbb", S100_8K_SC_BB);
|
||||
device.option_add("poly16k", S100_POLY_16K);
|
||||
device.option_add("polyfdc", S100_POLY_FDC);
|
||||
}
|
||||
|
||||
@ -106,8 +108,16 @@ DEVICE_INPUT_DEFAULTS_START(poly88_vti_1800)
|
||||
DEVICE_INPUT_DEFAULTS("ADDRESS", 0x3f, 0x06) // 1800-1FFF
|
||||
DEVICE_INPUT_DEFAULTS_END
|
||||
|
||||
DEVICE_INPUT_DEFAULTS_START(poly88_8ksc_2000)
|
||||
DEVICE_INPUT_DEFAULTS("DSW", 0xff, 0xfd) // 2000-3FFF
|
||||
DEVICE_INPUT_DEFAULTS_START(poly88_16k_2000)
|
||||
DEVICE_INPUT_DEFAULTS("DSW", 0xf, 0xd) // 2000-5FFF
|
||||
DEVICE_INPUT_DEFAULTS_END
|
||||
|
||||
DEVICE_INPUT_DEFAULTS_START(poly88_16k_6000)
|
||||
DEVICE_INPUT_DEFAULTS("DSW", 0xf, 0x9) // 6000-9FFF
|
||||
DEVICE_INPUT_DEFAULTS_END
|
||||
|
||||
DEVICE_INPUT_DEFAULTS_START(poly88_16k_a000)
|
||||
DEVICE_INPUT_DEFAULTS("DSW", 0xf, 0x5) // A000-DFFF
|
||||
DEVICE_INPUT_DEFAULTS_END
|
||||
|
||||
void poly88_state::poly88(machine_config &config)
|
||||
@ -152,10 +162,15 @@ void poly88_state::poly88(machine_config &config)
|
||||
m_s100->vi2().set(FUNC(poly88_state::vi2_w));
|
||||
m_s100->vi5().set(FUNC(poly88_state::vi5_w));
|
||||
|
||||
// Poly-88 backplane has 5 slots, but CPU uses one
|
||||
S100_SLOT(config, m_s100_slot[0], poly88_s100_devices, "vti");
|
||||
S100_SLOT(config, m_s100_slot[1], poly88_s100_devices, nullptr);
|
||||
S100_SLOT(config, m_s100_slot[1], poly88_s100_devices, "poly16k");
|
||||
S100_SLOT(config, m_s100_slot[2], poly88_s100_devices, nullptr);
|
||||
S100_SLOT(config, m_s100_slot[3], poly88_s100_devices, nullptr);
|
||||
|
||||
m_s100_slot[1]->set_option_device_input_defaults("poly16k", DEVICE_INPUT_DEFAULTS_NAME(poly88_16k_2000));
|
||||
m_s100_slot[2]->set_option_device_input_defaults("poly16k", DEVICE_INPUT_DEFAULTS_NAME(poly88_16k_6000));
|
||||
m_s100_slot[3]->set_option_device_input_defaults("poly16k", DEVICE_INPUT_DEFAULTS_NAME(poly88_16k_a000));
|
||||
}
|
||||
|
||||
void poly88_state::poly8813(machine_config &config)
|
||||
@ -164,9 +179,8 @@ void poly88_state::poly8813(machine_config &config)
|
||||
m_onboard_io->set_addrmap(0, &poly88_state::poly8813_io);
|
||||
|
||||
m_s100_slot[0]->set_option_device_input_defaults("vti", DEVICE_INPUT_DEFAULTS_NAME(poly88_vti_1800));
|
||||
m_s100_slot[1]->set_default_option("8ksc");
|
||||
m_s100_slot[1]->set_option_device_input_defaults("8ksc", DEVICE_INPUT_DEFAULTS_NAME(poly88_8ksc_2000));
|
||||
m_s100_slot[2]->set_default_option("polyfdc");
|
||||
m_s100_slot[1]->set_default_option("polyfdc");
|
||||
m_s100_slot[2]->set_default_option("poly16k");
|
||||
|
||||
// Poly-8813 backplane has 10 slots, but CPU uses one
|
||||
S100_SLOT(config, m_s100_slot[4], poly88_s100_devices, nullptr);
|
||||
@ -174,6 +188,10 @@ void poly88_state::poly8813(machine_config &config)
|
||||
S100_SLOT(config, m_s100_slot[6], poly88_s100_devices, nullptr);
|
||||
S100_SLOT(config, m_s100_slot[7], poly88_s100_devices, nullptr);
|
||||
S100_SLOT(config, m_s100_slot[8], poly88_s100_devices, nullptr);
|
||||
|
||||
m_s100_slot[2]->set_option_device_input_defaults("poly16k", DEVICE_INPUT_DEFAULTS_NAME(poly88_16k_2000));
|
||||
m_s100_slot[3]->set_option_device_input_defaults("poly16k", DEVICE_INPUT_DEFAULTS_NAME(poly88_16k_6000));
|
||||
m_s100_slot[4]->set_option_device_input_defaults("poly16k", DEVICE_INPUT_DEFAULTS_NAME(poly88_16k_a000));
|
||||
}
|
||||
|
||||
/* ROM definition */
|
||||
|
Loading…
Reference in New Issue
Block a user