electron: Added cartridge devices for:

- P.R.E.S. Advanced Plus 3/4
- Advanced Quarter Meg Ram
- Cumana Floppy Disk System
- Sound Expansion
- Sound Expansion v3
- Stop Press 64
- Solidisk EFS

New working software list additions
-----------------------------------
electron_cart: Solidisk EFS 2.1E

New NOT_WORKING software list additions
---------------------------------------
electron_cart: Stop Press 64

Software list items promoted to working
---------------------------------------
electron_cart: Advanced Plus 3, Advanced Quarter Meg RAM, Slogger Electron Disk System, Sound Expansion v3
This commit is contained in:
Nigel Barnes 2018-01-31 18:29:49 +00:00
parent 9d725affde
commit 91da52721e
21 changed files with 1617 additions and 148 deletions

View File

@ -254,6 +254,20 @@
</part>
</software>
<software name="sp64" supported="partial">
<description>Stop Press 64</description>
<year>1991</year>
<publisher>Slogger</publisher>
<info name="usage" value="Requires Master RAM board" />
<part name="cart" interface="electron_cart">
<feature name="slot" value="sp64" />
<dataarea name="rom" size="32768">
<rom name="stoppress64-1.00.rom" size="32768" crc="4918221c" sha1="f185873106e7e7225b2e0c718803dc1ec4ebc685" offset="0" />
</dataarea>
<dataarea name="ram" size="8192" />
</part>
</software>
<software name="view">
<description>View</description>
<year>1984</year>
@ -283,7 +297,7 @@
<software name="abr">
<description>Advanced Battery-Backed RAM</description>
<year>1987</year>
<publisher>P.R.E.S.</publisher>
<publisher>Advanced Computer Products</publisher>
<part name="cart" interface="electron_cart">
<feature name="slot" value="abr" />
<dataarea name="nvram" size="32768">
@ -292,9 +306,9 @@
</part>
</software>
<software name="ap3" cloneof="ap34" supported="no">
<software name="ap3" cloneof="ap34">
<description>Advanced Plus 3</description>
<year>1988</year>
<year>1987</year>
<publisher>P.R.E.S.</publisher>
<part name="cart" interface="electron_cart">
<feature name="slot" value="ap34" />
@ -317,8 +331,8 @@
</part>
</software>
<software name="ap34" supported="no">
<description>Advanced Plus 34</description>
<software name="ap34" supported="partial">
<description>Advanced Plus 3/4</description>
<year>1988</year>
<publisher>P.R.E.S.</publisher>
<part name="cart" interface="electron_cart">
@ -333,51 +347,52 @@
</part>
</software>
<software name="aqr" supported="no">
<software name="aqr">
<description>Advanced Quarter Meg RAM</description>
<year>1988</year>
<publisher>P.R.E.S.</publisher>
<year>1987</year>
<publisher>Advanced Computer Products</publisher>
<part name="cart" interface="electron_cart">
<feature name="slot" value="aqr" />
<dataarea name="ram" size="262144" />
</part>
</software>
<software name="cumana100" cloneof="cumana" supported="no">
<software name="cumana100" cloneof="cumana" supported="partial">
<description>Cumana Floppy Disc System v1.00</description>
<year>1984</year>
<year>1985</year>
<publisher>Cumana</publisher>
<part name="cart" interface="electron_cart">
<feature name="slot" value="cumana" />
<dataarea name="rom" size="16384">
<rom name="cumana-dfs-1.00.rom" size="16384" crc="3d351cee" sha1="d6f7af671bf78b3ea7b9a235d47ef8b22b9bee31" offset="0" />
</dataarea>
<dataarea name="ram" size="2048" />
<dataarea name="nvram" size="2048" />
</part>
</software>
<software name="cumana101" cloneof="cumana" supported="no">
<software name="cumana101" cloneof="cumana" supported="partial">
<description>Cumana Floppy Disc System v1.01</description>
<year>1984</year>
<year>1985</year>
<publisher>Cumana</publisher>
<part name="cart" interface="electron_cart">
<feature name="slot" value="cumana" />
<dataarea name="rom" size="16384">
<rom name="cumana-dfs-1.01.rom" size="16384" crc="bc02e94a" sha1="8cbdbcc91516b4bbe6904db482f9fdaa34ca029d" offset="0" />
</dataarea>
<dataarea name="ram" size="2048" />
<dataarea name="nvram" size="2048" />
</part>
</software>
<software name="cumana" supported="no">
<software name="cumana" supported="partial">
<description>Cumana Floppy Disc System v1.02</description>
<year>1984</year>
<year>1985</year>
<publisher>Cumana</publisher>
<part name="cart" interface="electron_cart">
<feature name="slot" value="cumana" />
<dataarea name="rom" size="16384">
<rom name="cumana-dfs-1.02.rom" size="16384" crc="44b21e47" sha1="1c5112d2e629f0e093a961c6348456e4ceac86e3" offset="0" />
</dataarea>
<dataarea name="ram" size="2048" />
<dataarea name="nvram" size="2048" />
</part>
</software>
@ -407,7 +422,7 @@
</part>
</software>
<software name="seds100" cloneof="seds" supported="no">
<software name="seds100" cloneof="seds">
<description>Slogger Electron Disk System v1.00</description>
<year>1986</year>
<publisher>Slogger</publisher>
@ -416,11 +431,11 @@
<dataarea name="rom" size="16384">
<rom name="sedfs-1.00.rom" size="16384" crc="4f28b0a6" sha1="e94aa15b2884c1fd2f7bfe81acc5942aa1faceb5" offset="0" />
</dataarea>
<dataarea name="ram" size="2048" />
<dataarea name="nvram" size="2048" />
</part>
</software>
<software name="seds102" cloneof="seds" supported="no">
<software name="seds102" cloneof="seds">
<description>Slogger Electron Disk System v1.02</description>
<year>1986</year>
<publisher>Slogger</publisher>
@ -429,11 +444,11 @@
<dataarea name="rom" size="16384">
<rom name="sedfs-1.02.rom" size="16384" crc="0a9570f4" sha1="84072e99aa755bec32165b04f5f19f4499e0ba4b" offset="0" />
</dataarea>
<dataarea name="ram" size="2048" />
<dataarea name="nvram" size="2048" />
</part>
</software>
<software name="seds" supported="no">
<software name="seds">
<description>Slogger Electron Disk System v1.03</description>
<year>1986</year>
<publisher>Slogger</publisher>
@ -442,29 +457,46 @@
<dataarea name="rom" size="16384">
<rom name="sedfs-1.03.rom" size="16384" crc="186e84dd" sha1="7cb350b3291447331aaaed2c590f719115a7bfed" offset="0" />
</dataarea>
<dataarea name="ram" size="2048" />
<dataarea name="nvram" size="2048" />
</part>
</software>
<software name="stlefs" supported="partial">
<description>Solidisk EFS 2.1E</description>
<year>1985</year>
<publisher>Solidisk</publisher>
<part name="cart" interface="electron_cart">
<feature name="slot" value="stlefs" />
<dataarea name="rom" size="32768">
<rom name="stl-adfs-2.1e.rom" size="32768" crc="8582c9d9" sha1="4ceda3b551ae0198638b07c2b40b3a5ebffb1314" offset="0" />
</dataarea>
<dataarea name="ram" size="16384" />
</part>
</software>
<software name="sndexp" supported="no">
<description>Sound Expansion v1</description>
<description>Sound Expansion</description>
<year>1988</year>
<publisher>Project Expansions</publisher>
<part name="cart" interface="electron_cart">
<feature name="slot" value="sndexp" />
<dataarea name="rom" size="8192">
<rom name="sound_expansion-v1.00.rom" size="8192" crc="01a43480" sha1="9f570abbff97e6615a29c9d2de5ec9f37d22c564" offset="0" />
</dataarea>
<dataarea name="ram" size="8192" />
</part>
</software>
<software name="sndexpc" supported="no">
<software name="sndexp3">
<description>Sound Expansion v3</description>
<year>1989</year>
<publisher>Complex Software Systems</publisher>
<part name="cart" interface="electron_cart">
<feature name="slot" value="sndexp3" />
<dataarea name="rom" size="16384">
<rom name="sound_expansion-v3.00.rom" size="16384" crc="65ebfb98" sha1="2e409b92c97cda34ff25c2951e5f799125fe7e32" offset="0" />
</dataarea>
<dataarea name="ram" size="8192" />
</part>
</software>

View File

@ -749,12 +749,26 @@ if (BUSES["ELECTRON_CART"]~=null) then
MAME_DIR .. "src/devices/bus/electron/cart/slot.h",
MAME_DIR .. "src/devices/bus/electron/cart/abr.cpp",
MAME_DIR .. "src/devices/bus/electron/cart/abr.h",
MAME_DIR .. "src/devices/bus/electron/cart/ap34.cpp",
MAME_DIR .. "src/devices/bus/electron/cart/ap34.h",
MAME_DIR .. "src/devices/bus/electron/cart/aqr.cpp",
MAME_DIR .. "src/devices/bus/electron/cart/aqr.h",
MAME_DIR .. "src/devices/bus/electron/cart/click.cpp",
MAME_DIR .. "src/devices/bus/electron/cart/click.h",
MAME_DIR .. "src/devices/bus/electron/cart/cumana.cpp",
MAME_DIR .. "src/devices/bus/electron/cart/cumana.h",
MAME_DIR .. "src/devices/bus/electron/cart/peg400.cpp",
MAME_DIR .. "src/devices/bus/electron/cart/peg400.h",
MAME_DIR .. "src/devices/bus/electron/cart/sndexp.cpp",
MAME_DIR .. "src/devices/bus/electron/cart/sndexp.h",
MAME_DIR .. "src/devices/bus/electron/cart/sndexp3.cpp",
MAME_DIR .. "src/devices/bus/electron/cart/sndexp3.h",
MAME_DIR .. "src/devices/bus/electron/cart/sp64.cpp",
MAME_DIR .. "src/devices/bus/electron/cart/sp64.h",
MAME_DIR .. "src/devices/bus/electron/cart/std.cpp",
MAME_DIR .. "src/devices/bus/electron/cart/std.h",
MAME_DIR .. "src/devices/bus/electron/cart/stlefs.cpp",
MAME_DIR .. "src/devices/bus/electron/cart/stlefs.h",
}
end

View File

@ -0,0 +1,173 @@
// license:BSD-3-Clause
// copyright-holders:Nigel Barnes
/**********************************************************************
P.R.E.S. Advanced Plus3/4
http://chrisacorns.computinghistory.org.uk/8bit_Upgrades/PRES_AP3A.html
TODO:
- AP4 (DFS) is unreliable, maybe WD1770 reset issue to be investigated
- add spare ROM slot in AP3 and AP4, not AP3/4
**********************************************************************/
#include "emu.h"
#include "ap34.h"
//**************************************************************************
// DEVICE DEFINITIONS
//**************************************************************************
DEFINE_DEVICE_TYPE(ELECTRON_AP34, electron_ap34_device, "electron_ap34", "P.R.E.S. Advanced Plus 3/4")
//-------------------------------------------------
// MACHINE_DRIVER( ap34 )
//-------------------------------------------------
FLOPPY_FORMATS_MEMBER(electron_ap34_device::floppy_formats)
FLOPPY_ACORN_SSD_FORMAT,
FLOPPY_ACORN_DSD_FORMAT,
FLOPPY_ACORN_ADFS_OLD_FORMAT
FLOPPY_FORMATS_END0
SLOT_INTERFACE_START(ap34_floppies)
SLOT_INTERFACE("35dd", FLOPPY_35_DD)
SLOT_INTERFACE("525qd", FLOPPY_525_QD)
SLOT_INTERFACE_END
//-------------------------------------------------
// device_add_mconfig - add device configuration
//-------------------------------------------------
MACHINE_CONFIG_START(electron_ap34_device::device_add_mconfig)
/* fdc */
MCFG_WD1770_ADD("fdc", 16_MHz_XTAL / 2)
MCFG_FLOPPY_DRIVE_ADD("fdc:0", ap34_floppies, "525qd", electron_ap34_device::floppy_formats)
MCFG_FLOPPY_DRIVE_SOUND(true)
MCFG_FLOPPY_DRIVE_ADD("fdc:1", ap34_floppies, nullptr, electron_ap34_device::floppy_formats)
MCFG_FLOPPY_DRIVE_SOUND(true)
MACHINE_CONFIG_END
//**************************************************************************
// LIVE DEVICE
//**************************************************************************
//-------------------------------------------------
// electron_ap34_device - constructor
//-------------------------------------------------
electron_ap34_device::electron_ap34_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, ELECTRON_AP34, tag, owner, clock)
, device_electron_cart_interface(mconfig, *this)
, m_fdc(*this, "fdc")
, m_floppy0(*this, "fdc:0")
, m_floppy1(*this, "fdc:1")
{
}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
void electron_ap34_device::device_start()
{
}
//-------------------------------------------------
// read - cartridge data read
//-------------------------------------------------
uint8_t electron_ap34_device::read(address_space &space, offs_t offset, int infc, int infd, int romqa)
{
uint8_t data = 0xfe;
if (infc)
{
switch (offset & 0xff)
{
case 0xc4:
case 0xc5:
case 0xc6:
case 0xc7:
data = m_fdc->read(space, offset & 0x03);
break;
}
}
if (!infc && !infd)
{
if (offset >= 0x0000 && offset < 0x4000)
{
data = m_rom[(offset & 0x3fff) + (romqa * 0x4000)];
}
if (m_ram.size() != 0 && romqa == 0 && offset >= 0x3000)
{
data = m_ram[offset & 0x0fff];
}
}
return data;
}
//-------------------------------------------------
// write - cartridge data write
//-------------------------------------------------
void electron_ap34_device::write(address_space &space, offs_t offset, uint8_t data, int infc, int infd, int romqa)
{
if (infc)
{
switch (offset & 0xff)
{
case 0xc0:
wd1770_control_w(space, 0, data);
break;
case 0xc4:
case 0xc5:
case 0xc6:
case 0xc7:
m_fdc->write(space, offset & 0x03, data);
break;
}
}
if (!infc && !infd)
{
if (m_ram.size() != 0 && romqa == 0 && offset >= 0x3000)
{
m_ram[offset & 0x0fff] = data;
}
}
}
//**************************************************************************
// IMPLEMENTATION
//**************************************************************************
WRITE8_MEMBER(electron_ap34_device::wd1770_control_w)
{
floppy_image_device *floppy = nullptr;
// bit 0, 1: drive select
if (BIT(data, 0)) floppy = m_floppy0->get_device();
if (BIT(data, 1)) floppy = m_floppy1->get_device();
m_fdc->set_floppy(floppy);
// bit 2: side select
if (floppy)
floppy->ss_w(BIT(data, 2));
// bit 3: density
m_fdc->dden_w(BIT(data, 3));
// bit 4: NMI - not connected
// bit 5: reset
if (!BIT(data, 5)) m_fdc->soft_reset();
}

View File

@ -0,0 +1,55 @@
// license:BSD-3-Clause
// copyright-holders:Nigel Barnes
/**********************************************************************
P.R.E.S. Advanced Plus3/4
http://chrisacorns.computinghistory.org.uk/8bit_Upgrades/PRES_AP3A.html
**********************************************************************/
#ifndef MAME_BUS_ELECTRON_CART_AP34_H
#define MAME_BUS_ELECTRON_CART_AP34_H
#include "slot.h"
#include "machine/wd_fdc.h"
#include "formats/acorn_dsk.h"
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
class electron_ap34_device :
public device_t,
public device_electron_cart_interface
{
public:
// construction/destruction
electron_ap34_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
// device-level overrides
virtual void device_start() override;
// optional information overrides
virtual void device_add_mconfig(machine_config &config) override;
// electron_cart_interface overrides
virtual uint8_t read(address_space &space, offs_t offset, int infc, int infd, int romqa) override;
virtual void write(address_space &space, offs_t offset, uint8_t data, int infc, int infd, int romqa) override;
private:
DECLARE_WRITE8_MEMBER(wd1770_control_w);
DECLARE_FLOPPY_FORMATS(floppy_formats);
required_device<wd1770_device> m_fdc;
required_device<floppy_connector> m_floppy0;
required_device<floppy_connector> m_floppy1;
};
// device type definition
DECLARE_DEVICE_TYPE(ELECTRON_AP34, electron_ap34_device)
#endif // MAME_BUS_ELECTRON_CART_AP34_H

View File

@ -0,0 +1,95 @@
// license:BSD-3-Clause
// copyright-holders:Nigel Barnes
/***************************************************************************
Advanced Quarter Meg Ram
***************************************************************************/
#include "emu.h"
#include "aqr.h"
//**************************************************************************
// DEVICE DEFINITIONS
//**************************************************************************
DEFINE_DEVICE_TYPE(ELECTRON_AQR, electron_aqr_device, "electron_aqr", "Electron Advanced Quarter Meg Ram cartridge")
//**************************************************************************
// LIVE DEVICE
//**************************************************************************
//-------------------------------------------------
// electron_aqr_device - constructor
//-------------------------------------------------
electron_aqr_device::electron_aqr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, ELECTRON_AQR, tag, owner, clock)
, device_electron_cart_interface(mconfig, *this)
, m_page_register(0)
, m_lock_register(false)
{
}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
void electron_aqr_device::device_start()
{
save_item(NAME(m_page_register));
save_item(NAME(m_lock_register));
}
//-------------------------------------------------
// read - cartridge data read
//-------------------------------------------------
uint8_t electron_aqr_device::read(address_space &space, offs_t offset, int infc, int infd, int romqa)
{
uint8_t data = 0xff;
if (!infc && !infd)
{
if (offset >= 0x0000 && offset < 0x4000)
{
data = m_ram[(offset & 0x3fff) + (m_page_register * 0x4000)];
}
}
return data;
}
//-------------------------------------------------
// write - cartridge data write
//-------------------------------------------------
void electron_aqr_device::write(address_space &space, offs_t offset, uint8_t data, int infc, int infd, int romqa)
{
if (infc)
{
switch (offset & 0xff)
{
case 0xfc:
m_page_register = data;
break;
case 0xfd:
m_lock_register = false;
break;
case 0xfe:
m_lock_register = true;
break;
}
}
if (!infc && !infd)
{
if (offset >= 0x0000 && offset < 0x4000 && !m_lock_register)
{
m_ram[(offset & 0x3fff) + (m_page_register * 0x4000)] = data;
}
}
}

View File

@ -0,0 +1,46 @@
// license:BSD-3-Clause
// copyright-holders:Nigel Barnes
/***************************************************************************
Advanced Quarter Meg Ram
***************************************************************************/
#ifndef MAME_BUS_ELECTRON_CART_AQR_H
#define MAME_BUS_ELECTRON_CART_AQR_H
#pragma once
#include "slot.h"
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
// ======================> electron_aqr_device
class electron_aqr_device : public device_t,
public device_electron_cart_interface
{
public:
// construction/destruction
electron_aqr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
// device-level overrides
virtual void device_start() override;
// electron_cart_interface overrides
virtual uint8_t read(address_space &space, offs_t offset, int infc, int infd, int romqa) override;
virtual void write(address_space &space, offs_t offset, uint8_t data, int infc, int infd, int romqa) override;
private:
uint8_t m_page_register;
bool m_lock_register;
};
// device type definition
DECLARE_DEVICE_TYPE(ELECTRON_AQR, electron_aqr_device)
#endif // MAME_BUS_ELECTRON_CART_AQR_H

View File

@ -0,0 +1,195 @@
// license:BSD-3-Clause
// copyright-holders:Nigel Barnes
/**********************************************************************
Cumana Floppy Disk System
http://chrisacorns.computinghistory.org.uk/8bit_Upgrades/Cumana_FDsystem.html
TODO:
- add floppy format CDFS, and find original utilities disc
- confirm whether DRQ and INTRQ are connected
- add spare ROM slot
**********************************************************************/
#include "emu.h"
#include "cumana.h"
//**************************************************************************
// DEVICE DEFINITIONS
//**************************************************************************
DEFINE_DEVICE_TYPE(ELECTRON_CUMANA, electron_cumana_device, "electron_cumana", "Cumana Floppy Disk System")
//-------------------------------------------------
// MACHINE_DRIVER( cumana )
//-------------------------------------------------
FLOPPY_FORMATS_MEMBER(electron_cumana_device::floppy_formats)
FLOPPY_ACORN_SSD_FORMAT,
FLOPPY_ACORN_DSD_FORMAT,
FLOPPY_ACORN_ADFS_OLD_FORMAT
FLOPPY_FORMATS_END0
SLOT_INTERFACE_START(cumana_floppies)
SLOT_INTERFACE("35dd", FLOPPY_35_DD)
SLOT_INTERFACE("525qd", FLOPPY_525_QD)
SLOT_INTERFACE_END
//-------------------------------------------------
// device_add_mconfig - add device configuration
//-------------------------------------------------
MACHINE_CONFIG_START(electron_cumana_device::device_add_mconfig)
/* fdc */
MCFG_FD1793_ADD("fdc", 16_MHz_XTAL / 16) // TODO: Not known whether DRQ and INTRQ are connected
MCFG_FLOPPY_DRIVE_ADD("fdc:0", cumana_floppies, "525qd", electron_cumana_device::floppy_formats)
MCFG_FLOPPY_DRIVE_SOUND(true)
MCFG_FLOPPY_DRIVE_ADD("fdc:1", cumana_floppies, nullptr, electron_cumana_device::floppy_formats)
MCFG_FLOPPY_DRIVE_SOUND(true)
/* rtc */
MCFG_MC146818_ADD("rtc", 32.768_kHz_XTAL)
MACHINE_CONFIG_END
//**************************************************************************
// LIVE DEVICE
//**************************************************************************
//-------------------------------------------------
// electron_cumana_device - constructor
//-------------------------------------------------
electron_cumana_device::electron_cumana_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, ELECTRON_CUMANA, tag, owner, clock)
, device_electron_cart_interface(mconfig, *this)
, m_fdc(*this, "fdc")
, m_floppy0(*this, "fdc:0")
, m_floppy1(*this, "fdc:1")
, m_rtc(*this, "rtc")
{
}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
void electron_cumana_device::device_start()
{
}
//-------------------------------------------------
// read - cartridge data read
//-------------------------------------------------
uint8_t electron_cumana_device::read(address_space &space, offs_t offset, int infc, int infd, int romqa)
{
uint8_t data = 0xff;
if (infc)
{
switch (offset & 0xff)
{
case 0x90:
case 0x91:
case 0x92:
case 0x93:
data = m_fdc->read(space, offset & 0x03);
break;
case 0x98:
case 0x9c:
data = m_rtc->read(space, BIT(offset, 2));
break;
}
}
if (!infc && !infd)
{
switch (romqa)
{
case 0:
if (offset < 0x3800)
{
data = m_rom[offset & 0x3fff];
}
else
{
data = m_nvram[offset & 0x07ff];
}
break;
case 1:
// TODO: rom slot not implemented
break;
}
}
return data;
}
//-------------------------------------------------
// write - cartridge data write
//-------------------------------------------------
void electron_cumana_device::write(address_space &space, offs_t offset, uint8_t data, int infc, int infd, int romqa)
{
if (infc)
{
switch (offset & 0xff)
{
case 0x90:
case 0x91:
case 0x92:
case 0x93:
m_fdc->write(space, offset & 0x03, data);
break;
case 0x94:
wd1793_control_w(space, 0, data);
break;
case 0x98:
case 0x9c:
m_rtc->write(space, BIT(offset, 2), data);
break;
break;
}
}
if (!infc && !infd)
{
if (romqa == 0 && offset >= 0x3800)
{
m_nvram[offset & 0x07ff] = data;
}
}
}
//**************************************************************************
// IMPLEMENTATION
//**************************************************************************
WRITE8_MEMBER(electron_cumana_device::wd1793_control_w)
{
floppy_image_device *floppy = nullptr;
// bit 1, 2: drive select
if (BIT(data, 1)) floppy = m_floppy0->get_device();
if (BIT(data, 2)) floppy = m_floppy1->get_device();
m_fdc->set_floppy(floppy);
// bit 0: side select
if (floppy)
floppy->ss_w(BIT(data, 0));
// bit 3: density
m_fdc->dden_w(BIT(data, 3));
// bit 4: motor on
if (floppy)
floppy->mon_w(!BIT(data, 4));
// bit 5: head load
}

View File

@ -0,0 +1,57 @@
// license:BSD-3-Clause
// copyright-holders:Nigel Barnes
/**********************************************************************
Cumana Floppy Disk System
http://chrisacorns.computinghistory.org.uk/8bit_Upgrades/Cumana_FDsystem.html
**********************************************************************/
#ifndef MAME_BUS_ELECTRON_CART_CUMANA_H
#define MAME_BUS_ELECTRON_CART_CUMANA_H
#include "slot.h"
#include "machine/wd_fdc.h"
#include "machine/mc146818.h"
#include "formats/acorn_dsk.h"
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
class electron_cumana_device :
public device_t,
public device_electron_cart_interface
{
public:
// construction/destruction
electron_cumana_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
// device-level overrides
virtual void device_start() override;
// optional information overrides
virtual void device_add_mconfig(machine_config &config) override;
// electron_cart_interface overrides
virtual uint8_t read(address_space &space, offs_t offset, int infc, int infd, int romqa) override;
virtual void write(address_space &space, offs_t offset, uint8_t data, int infc, int infd, int romqa) override;
private:
DECLARE_WRITE8_MEMBER(wd1793_control_w);
DECLARE_FLOPPY_FORMATS(floppy_formats);
required_device<fd1793_device> m_fdc;
required_device<floppy_connector> m_floppy0;
required_device<floppy_connector> m_floppy1;
required_device<mc146818_device> m_rtc;
};
// device type definition
DECLARE_DEVICE_TYPE(ELECTRON_CUMANA, electron_cumana_device)
#endif // MAME_BUS_ELECTRON_CART_CUMANA_H

View File

@ -4,6 +4,9 @@
Slogger Pegasus 400 disk interface
TODO:
- add spare ROM slot
**********************************************************************/
@ -84,9 +87,6 @@ uint8_t electron_peg400_device::read(address_space &space, offs_t offset, int in
{
switch (offset & 0xff)
{
case 0xc0:
data = m_drive_control;
break;
case 0xc4:
case 0xc5:
case 0xc6:
@ -98,14 +98,21 @@ uint8_t electron_peg400_device::read(address_space &space, offs_t offset, int in
if (!infc && !infd)
{
if (offset >= 0x0000 && offset < 0x4000)
switch (romqa)
{
case 0:
if (offset < 0x3800)
{
data = m_rom[(offset & 0x3fff) + (romqa * 0x4000)];
}
else
{
data = m_ram[offset & 0x07ff];
}
break;
case 1:
data = m_rom[(offset & 0x3fff) + (romqa * 0x4000)];
}
if (romqa == 0 && offset >= 0x3800 && offset < 0x4000)
{
data = m_ram[offset & 0x07ff];
break;
}
}
@ -136,7 +143,7 @@ void electron_peg400_device::write(address_space &space, offs_t offset, uint8_t
if (!infc && !infd)
{
if (offset >= 0x3800 && offset < 0x4000)
if (romqa == 0 && offset >= 0x3800)
{
m_ram[offset & 0x07ff] = data;
}
@ -152,8 +159,6 @@ WRITE8_MEMBER(electron_peg400_device::wd1770_control_w)
{
floppy_image_device *floppy = nullptr;
m_drive_control = data;
// bit 0, 1: drive select
if (BIT(data, 0)) floppy = m_floppy0->get_device();
if (BIT(data, 1)) floppy = m_floppy1->get_device();

View File

@ -43,9 +43,8 @@ private:
required_device<wd1770_device> m_fdc;
required_device<floppy_connector> m_floppy0;
optional_device<floppy_connector> m_floppy1;
required_device<floppy_connector> m_floppy1;
int m_drive_control;
int m_fdc_ie;
};

View File

@ -267,18 +267,28 @@ void electron_cartslot_device::write(address_space &space, offs_t offset, uint8_
//-------------------------------------------------
#include "abr.h"
//#include "ap34.h"
#include "ap34.h"
#include "aqr.h"
#include "click.h"
//#include "cumana.h"
#include "cumana.h"
#include "peg400.h"
#include "sndexp.h"
#include "sndexp3.h"
#include "sp64.h"
#include "stlefs.h"
#include "std.h"
SLOT_INTERFACE_START(electron_cart)
SLOT_INTERFACE_INTERNAL("std", ELECTRON_STDCART)
SLOT_INTERFACE_INTERNAL("abr", ELECTRON_ABR)
//SLOT_INTERFACE_INTERNAL("ap34", ELECTRON_AP34)
SLOT_INTERFACE_INTERNAL("ap34", ELECTRON_AP34)
SLOT_INTERFACE_INTERNAL("aqr", ELECTRON_AQR)
SLOT_INTERFACE_INTERNAL("click", ELECTRON_CLICK)
//SLOT_INTERFACE_INTERNAL("cumana", ELECTRON_CUMANA)
SLOT_INTERFACE_INTERNAL("cumana", ELECTRON_CUMANA)
SLOT_INTERFACE_INTERNAL("peg400", ELECTRON_PEG400)
SLOT_INTERFACE_END
SLOT_INTERFACE_INTERNAL("sndexp", ELECTRON_SNDEXP)
SLOT_INTERFACE_INTERNAL("sndexp3", ELECTRON_SNDEXP3)
SLOT_INTERFACE_INTERNAL("sp64", ELECTRON_SP64)
SLOT_INTERFACE_INTERNAL("stlefs", ELECTRON_STLEFS)
SLOT_INTERFACE_END

View File

@ -0,0 +1,167 @@
// license:BSD-3-Clause
// copyright-holders:Nigel Barnes
/**********************************************************************
Sound Expansion cartridge (Project Expansions)
TODO:
- compare with actual hardware, sounds awful compared to v3
- implement jumper to configure 8K as sideways RAM
**********************************************************************/
#include "emu.h"
#include "sndexp.h"
#include "speaker.h"
//**************************************************************************
// DEVICE DEFINITIONS
//**************************************************************************
DEFINE_DEVICE_TYPE(ELECTRON_SNDEXP, electron_sndexp_device, "electron_sndexp", "Electron Sound Expansion cartridge")
//-------------------------------------------------
// device_add_mconfig - add device configuration
//-------------------------------------------------
MACHINE_CONFIG_START(electron_sndexp_device::device_add_mconfig)
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("sn76489", SN76489, 16_MHz_XTAL / 4)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
//-------------------------------------------------
// INPUT_PORTS( sndexp )
//-------------------------------------------------
INPUT_PORTS_START(sndexp)
// TODO: Not known how jumper affects RAM access
PORT_START("JUMPER")
PORT_DIPNAME(0x01, 0x00, "SOUND / RAM")
PORT_DIPSETTING(0x00, "SOUND")
PORT_DIPSETTING(0x01, "RAM")
INPUT_PORTS_END
//-------------------------------------------------
// input_ports - device-specific input ports
//-------------------------------------------------
ioport_constructor electron_sndexp_device::device_input_ports() const
{
return INPUT_PORTS_NAME(sndexp);
}
//**************************************************************************
// LIVE DEVICE
//**************************************************************************
//-------------------------------------------------
// electron_sndexp_device - constructor
//-------------------------------------------------
electron_sndexp_device::electron_sndexp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, ELECTRON_SNDEXP, tag, owner, clock)
, device_electron_cart_interface(mconfig, *this)
, m_sn(*this, "sn76489")
, m_jumper(*this, "JUMPER")
, m_sound_latch(0)
, m_sound_enable(0)
{
}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
void electron_sndexp_device::device_start()
{
save_item(NAME(m_sound_latch));
save_item(NAME(m_sound_enable));
}
//-------------------------------------------------
// read - cartridge data read
//-------------------------------------------------
uint8_t electron_sndexp_device::read(address_space &space, offs_t offset, int infc, int infd, int romqa)
{
uint8_t data = 0xff;
if (!infc && !infd)
{
if (m_jumper->read())
{
if (romqa == 0)
{
data = m_rom[offset & 0x1fff];
}
else
{
data = m_ram[offset & 0x1fff];
}
}
else
{
if (offset < 0x2000)
{
data = m_rom[offset & 0x1fff];
}
else
{
data = m_ram[offset & 0x1fff];
}
}
}
return data;
}
//-------------------------------------------------
// write - cartridge data write
//-------------------------------------------------
void electron_sndexp_device::write(address_space &space, offs_t offset, uint8_t data, int infc, int infd, int romqa)
{
if (infc)
{
switch (offset & 0xff)
{
case 0x84:
m_sound_latch = data;
break;
case 0x85:
if ((data & 0x01) && !m_sound_enable)
{
m_sn->write(m_sound_latch);
}
m_sound_enable = data & 0x01;
break;
}
}
if (!infc && !infd)
{
if (m_jumper->read())
{
if (romqa == 1)
{
m_ram[offset & 0x1fff] = data;
}
}
else
{
if (offset < 0x2000)
{
m_ram[offset & 0x1fff] = data;
}
else
{
m_ram[offset & 0x1fff] = data;
}
}
}
}

View File

@ -0,0 +1,52 @@
// license:BSD-3-Clause
// copyright-holders:Nigel Barnes
/**********************************************************************
Sound Expansion cartridge (Project Expansions)
**********************************************************************/
#ifndef MAME_BUS_ELECTRON_CART_SNDEXP_H
#define MAME_BUS_ELECTRON_CART_SNDEXP_H
#include "slot.h"
#include "sound/sn76496.h"
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
class electron_sndexp_device :
public device_t,
public device_electron_cart_interface
{
public:
// construction/destruction
electron_sndexp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
// device-level overrides
virtual void device_start() override;
// optional information overrides
virtual void device_add_mconfig(machine_config &config) override;
virtual ioport_constructor device_input_ports() const override;
// electron_cart_interface overrides
virtual uint8_t read(address_space &space, offs_t offset, int infc, int infd, int romqa) override;
virtual void write(address_space &space, offs_t offset, uint8_t data, int infc, int infd, int romqa) override;
private:
required_device<sn76489_device> m_sn;
required_ioport m_jumper;
uint8_t m_sound_latch;
uint8_t m_sound_enable;
};
// device type definition
DECLARE_DEVICE_TYPE(ELECTRON_SNDEXP, electron_sndexp_device)
#endif // MAME_BUS_ELECTRON_CART_SNDEXP_H

View File

@ -0,0 +1,113 @@
// license:BSD-3-Clause
// copyright-holders:Nigel Barnes
/**********************************************************************
Sound Expansion v3 cartridge (Complex Software Systems)
**********************************************************************/
#include "emu.h"
#include "sndexp3.h"
#include "speaker.h"
//**************************************************************************
// DEVICE DEFINITIONS
//**************************************************************************
DEFINE_DEVICE_TYPE(ELECTRON_SNDEXP3, electron_sndexp3_device, "electron_sndexp3", "Electron Sound Expansion v3 cartridge")
//-------------------------------------------------
// device_add_mconfig - add device configuration
//-------------------------------------------------
MACHINE_CONFIG_START(electron_sndexp3_device::device_add_mconfig)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("sn76489", SN76489, 16_MHz_XTAL / 4)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
//**************************************************************************
// LIVE DEVICE
//**************************************************************************
//-------------------------------------------------
// electron_sndexp3_device - constructor
//-------------------------------------------------
electron_sndexp3_device::electron_sndexp3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, ELECTRON_SNDEXP3, tag, owner, clock)
, device_electron_cart_interface(mconfig, *this)
, m_sn(*this, "sn76489")
, m_sound_latch(0)
, m_sound_enable(0)
{
}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
void electron_sndexp3_device::device_start()
{
save_item(NAME(m_sound_latch));
save_item(NAME(m_sound_enable));
}
//-------------------------------------------------
// read - cartridge data read
//-------------------------------------------------
uint8_t electron_sndexp3_device::read(address_space &space, offs_t offset, int infc, int infd, int romqa)
{
uint8_t data = 0xff;
if (!infc && !infd && romqa)
{
if (offset < 0x2000)
{
data = m_rom[offset & 0x1fff];
}
else
{
data = m_ram[offset & 0x1fff];
}
}
return data;
}
//-------------------------------------------------
// write - cartridge data write
//-------------------------------------------------
void electron_sndexp3_device::write(address_space &space, offs_t offset, uint8_t data, int infc, int infd, int romqa)
{
if (infc)
{
switch (offset & 0xff)
{
case 0x98:
m_sound_latch = data;
break;
case 0x99:
if ((data & 0x01) && !m_sound_enable)
{
m_sn->write(m_sound_latch);
}
m_sound_enable = data & 0x01;
break;
}
}
if (!infc && !infd && romqa)
{
if (offset >= 0x2000)
{
m_ram[offset & 0x1fff] = data;
}
}
}

View File

@ -0,0 +1,50 @@
// license:BSD-3-Clause
// copyright-holders:Nigel Barnes
/**********************************************************************
Sound Expansion v3 cartridge (Complex Software Systems)
**********************************************************************/
#ifndef MAME_BUS_ELECTRON_CART_SNDEXP3_H
#define MAME_BUS_ELECTRON_CART_SNDEXP3_H
#include "slot.h"
#include "sound/sn76496.h"
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
class electron_sndexp3_device :
public device_t,
public device_electron_cart_interface
{
public:
// construction/destruction
electron_sndexp3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
// device-level overrides
virtual void device_start() override;
// optional information overrides
virtual void device_add_mconfig(machine_config &config) override;
// electron_cart_interface overrides
virtual uint8_t read(address_space &space, offs_t offset, int infc, int infd, int romqa) override;
virtual void write(address_space &space, offs_t offset, uint8_t data, int infc, int infd, int romqa) override;
private:
required_device<sn76489_device> m_sn;
uint8_t m_sound_latch;
uint8_t m_sound_enable;
};
// device type definition
DECLARE_DEVICE_TYPE(ELECTRON_SNDEXP3, electron_sndexp3_device)
#endif // MAME_BUS_ELECTRON_CART_SNDEXP3_H

View File

@ -0,0 +1,113 @@
// license:BSD-3-Clause
// copyright-holders:Nigel Barnes
/***************************************************************************
Slogger Stop Press 64 cartridge emulation
***************************************************************************/
#include "emu.h"
#include "sp64.h"
//**************************************************************************
// DEVICE DEFINITIONS
//**************************************************************************
DEFINE_DEVICE_TYPE(ELECTRON_SP64, electron_sp64_device, "electron_sp64", "Slogger Stop Press 64 cartridge")
//**************************************************************************
// LIVE DEVICE
//**************************************************************************
//-------------------------------------------------
// electron_sp64_device - constructor
//-------------------------------------------------
electron_sp64_device::electron_sp64_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, ELECTRON_SP64, tag, owner, clock)
, device_electron_cart_interface(mconfig, *this)
, m_page_register(0)
{
}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
void electron_sp64_device::device_start()
{
save_item(NAME(m_page_register));
}
//-------------------------------------------------
// device_reset - device-specific reset
//-------------------------------------------------
void electron_sp64_device::device_reset()
{
m_page_register = 0;
}
//-------------------------------------------------
// read - cartridge data read
//-------------------------------------------------
uint8_t electron_sp64_device::read(address_space &space, offs_t offset, int infc, int infd, int romqa)
{
uint8_t data = 0xff;
if (infc)
{
switch (offset & 0xff)
{
case 0xfa:
data = m_page_register;
break;
}
}
if (!infc && !infd)
{
offs_t rom_page_offset = m_page_register * 0x4000;
switch (romqa)
{
case 0:
data = m_rom[rom_page_offset + (offset & 0x3fff)];
break;
case 1:
data = m_ram[offset & 0x1fff];
break;
}
}
return data;
}
//-------------------------------------------------
// write - cartridge data write
//-------------------------------------------------
void electron_sp64_device::write(address_space &space, offs_t offset, uint8_t data, int infc, int infd, int romqa)
{
if (infc)
{
switch (offset & 0xff)
{
case 0xfa:
m_page_register = data;
break;
}
}
if (!infc && !infd)
{
if (romqa == 1)
{
m_ram[offset & 0x1fff] = data;
}
}
}

View File

@ -0,0 +1,46 @@
// license:BSD-3-Clause
// copyright-holders:Nigel Barnes
/***************************************************************************
Slogger Stop Press 64 cartridge emulation
***************************************************************************/
#ifndef MAME_BUS_ELECTRON_CART_SP64_H
#define MAME_BUS_ELECTRON_CART_SP64_H
#pragma once
#include "slot.h"
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
// ======================> electron_sp64_device
class electron_sp64_device : public device_t,
public device_electron_cart_interface
{
public:
// construction/destruction
electron_sp64_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
// electron_cart_interface overrides
virtual uint8_t read(address_space &space, offs_t offset, int infc, int infd, int romqa) override;
virtual void write(address_space &space, offs_t offset, uint8_t data, int infc, int infd, int romqa) override;
private:
uint8_t m_page_register;
};
// device type definition
DECLARE_DEVICE_TYPE(ELECTRON_SP64, electron_sp64_device)
#endif // MAME_BUS_ELECTRON_CART_SP64_H

View File

@ -0,0 +1,172 @@
// license:BSD-3-Clause
// copyright-holders:Nigel Barnes
/**********************************************************************
Solidisk EFS
http://chrisacorns.computinghistory.org.uk/8bit_Upgrades/Solidisk_EFS.html
TODO:
- add Winchester slot
- unknown how 16K RAM is paged as SWR (adverts claim it was unreliable)
**********************************************************************/
#include "emu.h"
#include "stlefs.h"
//**************************************************************************
// DEVICE DEFINITIONS
//**************************************************************************
DEFINE_DEVICE_TYPE(ELECTRON_STLEFS, electron_stlefs_device, "electron_stlefs", "Solidisk EFS")
//-------------------------------------------------
// MACHINE_DRIVER( stlefs )
//-------------------------------------------------
FLOPPY_FORMATS_MEMBER(electron_stlefs_device::floppy_formats)
FLOPPY_ACORN_SSD_FORMAT,
FLOPPY_ACORN_DSD_FORMAT,
FLOPPY_ACORN_ADFS_OLD_FORMAT
FLOPPY_FORMATS_END
SLOT_INTERFACE_START(stlefs_floppies)
SLOT_INTERFACE("35dd", FLOPPY_35_DD)
SLOT_INTERFACE("525qd", FLOPPY_525_QD)
SLOT_INTERFACE_END
//-------------------------------------------------
// device_add_mconfig - add device configuration
//-------------------------------------------------
MACHINE_CONFIG_START(electron_stlefs_device::device_add_mconfig)
/* fdc */
MCFG_WD1770_ADD("fdc", 16_MHz_XTAL / 2)
MCFG_WD_FDC_INTRQ_CALLBACK(WRITELINE(electron_stlefs_device, fdc_intrq_w))
MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(electron_stlefs_device, fdc_drq_w))
MCFG_FLOPPY_DRIVE_ADD("fdc:0", stlefs_floppies, "525qd", electron_stlefs_device::floppy_formats)
MCFG_FLOPPY_DRIVE_SOUND(true)
MCFG_FLOPPY_DRIVE_ADD("fdc:1", stlefs_floppies, nullptr, electron_stlefs_device::floppy_formats)
MCFG_FLOPPY_DRIVE_SOUND(true)
MACHINE_CONFIG_END
//**************************************************************************
// LIVE DEVICE
//**************************************************************************
//-------------------------------------------------
// electron_stlefs_device - constructor
//-------------------------------------------------
electron_stlefs_device::electron_stlefs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, ELECTRON_STLEFS, tag, owner, clock)
, device_electron_cart_interface(mconfig, *this)
, m_fdc(*this, "fdc")
, m_floppy0(*this, "fdc:0")
, m_floppy1(*this, "fdc:1")
{
}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
void electron_stlefs_device::device_start()
{
}
//-------------------------------------------------
// read - cartridge data read
//-------------------------------------------------
uint8_t electron_stlefs_device::read(address_space &space, offs_t offset, int infc, int infd, int romqa)
{
uint8_t data = 0xff;
if (infc)
{
switch (offset & 0xff)
{
case 0xc4:
case 0xc5:
case 0xc6:
case 0xc7:
data = m_fdc->read(space, offset & 0x03);
break;
}
}
if (!infc && !infd)
{
if (offset >= 0x0000 && offset < 0x4000)
{
data = m_rom[(offset & 0x3fff) + (romqa * 0x4000)];
}
}
return data;
}
//-------------------------------------------------
// write - cartridge data write
//-------------------------------------------------
void electron_stlefs_device::write(address_space &space, offs_t offset, uint8_t data, int infc, int infd, int romqa)
{
if (infc)
{
switch (offset & 0xff)
{
case 0xc0:
wd1770_control_w(space, 0, data);
break;
case 0xc4:
case 0xc5:
case 0xc6:
case 0xc7:
m_fdc->write(space, offset & 0x03, data);
break;
//case 0xcb:
//m_page_register = data;
}
}
}
//**************************************************************************
// IMPLEMENTATION
//**************************************************************************
WRITE8_MEMBER(electron_stlefs_device::wd1770_control_w)
{
floppy_image_device *floppy = nullptr;
// bit 0, 1: drive select
if (BIT(data, 0)) floppy = m_floppy0->get_device();
if (BIT(data, 1)) floppy = m_floppy1->get_device();
m_fdc->set_floppy(floppy);
// bit 2: side select
if (floppy)
floppy->ss_w(BIT(data, 2));
// bit 3: density
m_fdc->dden_w(BIT(data, 3));
// bit 5: reset
if (!BIT(data, 5)) m_fdc->soft_reset();
}
void electron_stlefs_device::fdc_intrq_w(int state)
{
m_slot->irq_w(state);
}
void electron_stlefs_device::fdc_drq_w(int state)
{
m_slot->nmi_w(state);
}

View File

@ -0,0 +1,57 @@
// license:BSD-3-Clause
// copyright-holders:Nigel Barnes
/**********************************************************************
Solidisk EFS
http://chrisacorns.computinghistory.org.uk/8bit_Upgrades/Solidisk_EFS.html
**********************************************************************/
#ifndef MAME_BUS_ELECTRON_CART_STLEFS_H
#define MAME_BUS_ELECTRON_CART_STLEFS_H
#include "slot.h"
#include "machine/wd_fdc.h"
#include "formats/acorn_dsk.h"
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
class electron_stlefs_device :
public device_t,
public device_electron_cart_interface
{
public:
// construction/destruction
electron_stlefs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
// device-level overrides
virtual void device_start() override;
// optional information overrides
virtual void device_add_mconfig(machine_config &config) override;
// electron_cart_interface overrides
virtual uint8_t read(address_space &space, offs_t offset, int infc, int infd, int romqa) override;
virtual void write(address_space &space, offs_t offset, uint8_t data, int infc, int infd, int romqa) override;
private:
DECLARE_WRITE8_MEMBER(wd1770_control_w);
DECLARE_WRITE_LINE_MEMBER(fdc_intrq_w);
DECLARE_WRITE_LINE_MEMBER(fdc_drq_w);
DECLARE_FLOPPY_FORMATS(floppy_formats);
required_device<wd1770_device> m_fdc;
required_device<floppy_connector> m_floppy0;
required_device<floppy_connector> m_floppy1;
};
// device type definition
DECLARE_DEVICE_TYPE(ELECTRON_STLEFS, electron_stlefs_device)
#endif // MAME_BUS_ELECTRON_CART_STLEFS_H

View File

@ -164,47 +164,50 @@ void electron_plus1_device::device_start()
uint8_t electron_plus1_device::expbus_r(address_space &space, offs_t offset, uint8_t data)
{
if (offset >= 0x8000 && offset < 0xc000)
switch (offset >> 12)
{
case 0x8:
case 0x9:
case 0xa:
case 0xb:
switch (m_romsel)
{
case 0:
case 1:
if (m_cart_sk2->exists())
{
data = m_cart_sk2->read(space, offset & 0x3fff, 0, 0, m_romsel & 0x01);
}
data = m_cart_sk2->read(space, offset & 0x3fff, 0, 0, m_romsel & 0x01);
break;
case 2:
case 3:
if (m_cart_sk1->exists())
{
data = m_cart_sk1->read(space, offset & 0x3fff, 0, 0, m_romsel & 0x01);
}
data = m_cart_sk1->read(space, offset & 0x3fff, 0, 0, m_romsel & 0x01);
break;
case 12:
data = m_exp_rom->base()[offset & 0x1fff];
break;
}
}
else if ((offset & 0xfc00) == 0xfc00)
{
data &= m_cart_sk1->read(space, offset & 0xff, 1, 0, m_romsel & 0x01);
data &= m_cart_sk2->read(space, offset & 0xff, 1, 0, m_romsel & 0x01);
break;
if (offset == 0xfc70)
case 0xf:
switch (offset >> 8)
{
data &= m_adc->read(space, offset);
case 0xfc:
data &= m_cart_sk1->read(space, offset & 0xff, 1, 0, m_romsel & 0x01);
data &= m_cart_sk2->read(space, offset & 0xff, 1, 0, m_romsel & 0x01);
if (offset == 0xfc70)
{
data &= m_adc->read(space, offset);
}
else if (offset == 0xfc72)
{
data &= status_r(space, offset);
}
break;
case 0xfd:
data &= m_cart_sk1->read(space, offset & 0xff, 0, 1, m_romsel & 0x01);
data &= m_cart_sk2->read(space, offset & 0xff, 0, 1, m_romsel & 0x01);
break;
}
else if (offset == 0xfc72)
{
data &= status_r(space, offset);
}
}
else if ((offset & 0xfd00) == 0xfd00)
{
data &= m_cart_sk1->read(space, offset & 0xff, 0, 1, m_romsel & 0x01);
data &= m_cart_sk2->read(space, offset & 0xff, 0, 1, m_romsel & 0x01);
}
return data;
@ -217,49 +220,55 @@ uint8_t electron_plus1_device::expbus_r(address_space &space, offs_t offset, uin
void electron_plus1_device::expbus_w(address_space &space, offs_t offset, uint8_t data)
{
if (offset >= 0x8000 && offset < 0xc000)
switch (offset >> 12)
{
case 0x8:
case 0x9:
case 0xa:
case 0xb:
switch (m_romsel)
{
case 0:
case 1:
if (m_cart_sk2->exists())
{
m_cart_sk2->write(space, offset & 0x3fff, data, 0, 0, m_romsel & 0x01);
}
m_cart_sk2->write(space, offset & 0x3fff, data, 0, 0, m_romsel & 0x01);
break;
case 2:
case 3:
if (m_cart_sk1->exists())
m_cart_sk1->write(space, offset & 0x3fff, data, 0, 0, m_romsel & 0x01);
break;
}
break;
case 0xf:
switch (offset >> 8)
{
case 0xfc:
m_cart_sk1->write(space, offset & 0xff, data, 1, 0, m_romsel & 0x01);
m_cart_sk2->write(space, offset & 0xff, data, 1, 0, m_romsel & 0x01);
if (offset == 0xfc70)
{
m_cart_sk1->write(space, offset & 0x3fff, data, 0, 0, m_romsel & 0x01);
m_adc->write(space, offset, data);
}
else if (offset == 0xfc71)
{
m_cent_data_out->write(data);
}
break;
case 0xfd:
m_cart_sk1->write(space, offset & 0xff, data, 0, 1, m_romsel & 0x01);
m_cart_sk2->write(space, offset & 0xff, data, 0, 1, m_romsel & 0x01);
break;
case 0xfe:
if (offset == 0xfe05)
{
m_romsel = data & 0x0f;
}
break;
}
}
else if ((offset & 0xfc00) == 0xfc00)
{
m_cart_sk1->write(space, offset & 0xff, data, 1, 0, m_romsel & 0x01);
m_cart_sk2->write(space, offset & 0xff, data, 1, 0, m_romsel & 0x01);
if (offset == 0xfc70)
{
m_adc->write(space, offset, data);
}
else if (offset == 0xfc71)
{
m_cent_data_out->write(data);
}
else if (offset == 0xfe05)
{
m_romsel = data & 0x0f;
}
}
else if ((offset & 0xfd00) == 0xfd00)
{
m_cart_sk1->write(space, offset & 0xff, data, 0, 1, m_romsel & 0x01);
m_cart_sk2->write(space, offset & 0xff, data, 0, 1, m_romsel & 0x01);
}
}

View File

@ -165,29 +165,27 @@ void electron_romboxp_device::device_reset()
uint8_t electron_romboxp_device::expbus_r(address_space &space, offs_t offset, uint8_t data)
{
if (offset >= 0x8000 && offset < 0xc000)
switch (offset >> 12)
{
case 0x8:
case 0x9:
case 0xa:
case 0xb:
switch (m_romsel)
{
case 0:
case 1:
if (m_cart[1]->exists())
{
data = m_cart[1]->read(space, offset & 0x3fff, 0, 0, m_romsel & 0x01);
}
data = m_cart[1]->read(space, offset & 0x3fff, 0, 0, m_romsel & 0x01);
break;
case 2:
case 3:
if (m_cart[0]->exists())
{
data = m_cart[0]->read(space, offset & 0x3fff, 0, 0, m_romsel & 0x01);
}
data = m_cart[0]->read(space, offset & 0x3fff, 0, 0, m_romsel & 0x01);
break;
case 4:
case 5:
case 6:
case 7:
if (m_rom_base == 4 && m_rom[m_romsel - 4]->exists())
if (m_rom_base == 4)
{
data = m_rom[m_romsel - 4]->read_rom(space, offset & 0x3fff);
}
@ -198,28 +196,33 @@ uint8_t electron_romboxp_device::expbus_r(address_space &space, offs_t offset, u
case 13:
case 14:
case 15:
if (m_rom_base == 12 && m_rom[m_romsel - 12]->exists())
if (m_rom_base == 12)
{
data = m_rom[m_romsel - 12]->read_rom(space, offset & 0x3fff);
}
break;
}
}
else if ((offset & 0xfc00) == 0xfc00)
{
data &= m_cart[0]->read(space, offset & 0xff, 1, 0, m_romsel & 0x01);
data &= m_cart[1]->read(space, offset & 0xff, 1, 0, m_romsel & 0x01);
break;
if (offset == 0xfc72)
case 0xf:
switch (offset >> 8)
{
data &= status_r(space, offset);
case 0xfc:
data &= m_cart[0]->read(space, offset & 0xff, 1, 0, m_romsel & 0x01);
data &= m_cart[1]->read(space, offset & 0xff, 1, 0, m_romsel & 0x01);
if (offset == 0xfc72)
{
data &= status_r(space, offset);
}
break;
case 0xfd:
data &= m_cart[0]->read(space, offset & 0xff, 0, 1, m_romsel & 0x01);
data &= m_cart[1]->read(space, offset & 0xff, 0, 1, m_romsel & 0x01);
break;
}
}
else if ((offset & 0xfd00) == 0xfd00)
{
data &= m_cart[0]->read(space, offset & 0xff, 0, 1, m_romsel & 0x01);
data &= m_cart[1]->read(space, offset & 0xff, 0, 1, m_romsel & 0x01);
}
return data;
}
@ -230,45 +233,51 @@ uint8_t electron_romboxp_device::expbus_r(address_space &space, offs_t offset, u
void electron_romboxp_device::expbus_w(address_space &space, offs_t offset, uint8_t data)
{
if (offset >= 0x8000 && offset < 0xc000)
switch (offset >> 12)
{
case 0x8:
case 0x9:
case 0xa:
case 0xb:
switch (m_romsel)
{
case 0:
case 1:
if (m_cart[1]->exists())
{
m_cart[1]->write(space, offset & 0x3fff, data, 0, 0, m_romsel & 0x01);
}
m_cart[1]->write(space, offset & 0x3fff, data, 0, 0, m_romsel & 0x01);
break;
case 2:
case 3:
if (m_cart[0]->exists())
m_cart[0]->write(space, offset & 0x3fff, data, 0, 0, m_romsel & 0x01);
break;
}
break;
case 0xf:
switch (offset >> 8)
{
case 0xfc:
m_cart[0]->write(space, offset & 0xff, data, 1, 0, m_romsel & 0x01);
m_cart[1]->write(space, offset & 0xff, data, 1, 0, m_romsel & 0x01);
if (offset == 0xfc71)
{
m_cart[0]->write(space, offset & 0x3fff, data, 0, 0, m_romsel & 0x01);
m_cent_data_out->write(data);
}
break;
case 0xfd:
m_cart[0]->write(space, offset & 0xff, data, 0, 1, m_romsel & 0x01);
m_cart[1]->write(space, offset & 0xff, data, 0, 1, m_romsel & 0x01);
break;
case 0xfe:
if (offset == 0xfe05)
{
m_romsel = data & 0x0f;
}
break;
}
}
else if ((offset & 0xfc00) == 0xfc00)
{
m_cart[0]->write(space, offset & 0xff, data, 1, 0, m_romsel & 0x01);
m_cart[1]->write(space, offset & 0xff, data, 1, 0, m_romsel & 0x01);
if (offset == 0xfc71)
{
m_cent_data_out->write(data);
}
else if (offset == 0xfe05)
{
m_romsel = data & 0x0f;
}
}
else if ((offset & 0xfd00) == 0xfd00)
{
m_cart[0]->write(space, offset & 0xff, data, 0, 1, m_romsel & 0x01);
m_cart[1]->write(space, offset & 0xff, data, 0, 1, m_romsel & 0x01);
}
}
//**************************************************************************