mirror of
https://github.com/holub/mame
synced 2025-10-04 16:34:53 +03:00
New working software list additions
----------------------------------- electron_cart: ROMPlus-144
This commit is contained in:
parent
09f698ddc8
commit
d1d395e282
@ -100,10 +100,10 @@
|
|||||||
<publisher>Acornsoft</publisher>
|
<publisher>Acornsoft</publisher>
|
||||||
<info name="release" value="SCL02" />
|
<info name="release" value="SCL02" />
|
||||||
<part name="cart" interface="electron_cart">
|
<part name="cart" interface="electron_cart">
|
||||||
<dataarea name="uprom" size="16384">
|
<dataarea name="lorom" size="16384">
|
||||||
<rom name="lisp_1.rom" size="16384" crc="fda4c546" sha1="24c7062fc3666cd6814d72e417146e32eb995b04" offset="0" />
|
<rom name="lisp_1.rom" size="16384" crc="fda4c546" sha1="24c7062fc3666cd6814d72e417146e32eb995b04" offset="0" />
|
||||||
</dataarea>
|
</dataarea>
|
||||||
<dataarea name="lorom" size="16384">
|
<dataarea name="uprom" size="16384">
|
||||||
<rom name="lisp_2.rom" size="16384" crc="2eb56fc0" sha1="bdf09e553578d27a0cc202d409484dd8c2c3c085" offset="0" />
|
<rom name="lisp_2.rom" size="16384" crc="2eb56fc0" sha1="bdf09e553578d27a0cc202d409484dd8c2c3c085" offset="0" />
|
||||||
</dataarea>
|
</dataarea>
|
||||||
</part>
|
</part>
|
||||||
@ -446,6 +446,19 @@
|
|||||||
</part>
|
</part>
|
||||||
</software>
|
</software>
|
||||||
|
|
||||||
|
<software name="romp144">
|
||||||
|
<description>ROMPlus-144</description>
|
||||||
|
<year>1988</year>
|
||||||
|
<publisher>JAFA Systems</publisher>
|
||||||
|
<part name="cart" interface="electron_cart">
|
||||||
|
<feature name="slot" value="romp144" />
|
||||||
|
<dataarea name="rom" size="8192">
|
||||||
|
<rom name="romplus144-v3.00.rom" size="8192" crc="2f738bff" sha1="682603274a5f8b36c4b1a43e44ede5235a92383c" offset="0" />
|
||||||
|
</dataarea>
|
||||||
|
<dataarea name="ram" size="32768" />
|
||||||
|
</part>
|
||||||
|
</software>
|
||||||
|
|
||||||
<software name="seds100" cloneof="seds">
|
<software name="seds100" cloneof="seds">
|
||||||
<description>Slogger Electron Disk System v1.00</description>
|
<description>Slogger Electron Disk System v1.00</description>
|
||||||
<year>1986</year>
|
<year>1986</year>
|
||||||
|
@ -879,6 +879,8 @@ if (BUSES["ELECTRON_CART"]~=null) then
|
|||||||
MAME_DIR .. "src/devices/bus/electron/cart/mgc.h",
|
MAME_DIR .. "src/devices/bus/electron/cart/mgc.h",
|
||||||
MAME_DIR .. "src/devices/bus/electron/cart/peg400.cpp",
|
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/peg400.h",
|
||||||
|
MAME_DIR .. "src/devices/bus/electron/cart/romp144.cpp",
|
||||||
|
MAME_DIR .. "src/devices/bus/electron/cart/romp144.h",
|
||||||
MAME_DIR .. "src/devices/bus/electron/cart/sndexp.cpp",
|
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/sndexp.h",
|
||||||
MAME_DIR .. "src/devices/bus/electron/cart/sndexp3.cpp",
|
MAME_DIR .. "src/devices/bus/electron/cart/sndexp3.cpp",
|
||||||
|
162
src/devices/bus/electron/cart/romp144.cpp
Normal file
162
src/devices/bus/electron/cart/romp144.cpp
Normal file
@ -0,0 +1,162 @@
|
|||||||
|
// license:BSD-3-Clause
|
||||||
|
// copyright-holders:Nigel Barnes
|
||||||
|
/**********************************************************************
|
||||||
|
|
||||||
|
JAFA Systems ROMPlus-144
|
||||||
|
|
||||||
|
**********************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
#include "emu.h"
|
||||||
|
#include "romp144.h"
|
||||||
|
|
||||||
|
|
||||||
|
//**************************************************************************
|
||||||
|
// DEVICE DEFINITIONS
|
||||||
|
//**************************************************************************
|
||||||
|
|
||||||
|
DEFINE_DEVICE_TYPE(ELECTRON_ROMP144, electron_romp144_device, "electron_romp144", "JAFA Systems ROMPlus-144")
|
||||||
|
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// device_add_mconfig - add device configuration
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
void electron_romp144_device::device_add_mconfig(machine_config &config)
|
||||||
|
{
|
||||||
|
/* rom sockets */
|
||||||
|
GENERIC_SOCKET(config, m_romslot[0], generic_plain_slot, "electron_rom", "bin,rom");
|
||||||
|
m_romslot[0]->set_device_load(device_image_load_delegate(&electron_romp144_device::device_image_load_rom0, this));
|
||||||
|
GENERIC_SOCKET(config, m_romslot[1], generic_plain_slot, "electron_rom", "bin,rom");
|
||||||
|
m_romslot[1]->set_device_load(device_image_load_delegate(&electron_romp144_device::device_image_load_rom1, this));
|
||||||
|
GENERIC_SOCKET(config, m_romslot[2], generic_plain_slot, "electron_rom", "bin,rom");
|
||||||
|
m_romslot[2]->set_device_load(device_image_load_delegate(&electron_romp144_device::device_image_load_rom2, this));
|
||||||
|
GENERIC_SOCKET(config, m_romslot[3], generic_plain_slot, "electron_rom", "bin,rom");
|
||||||
|
m_romslot[3]->set_device_load(device_image_load_delegate(&electron_romp144_device::device_image_load_rom3, this));
|
||||||
|
GENERIC_SOCKET(config, m_romslot[4], generic_plain_slot, "electron_rom", "bin,rom");
|
||||||
|
m_romslot[4]->set_device_load(device_image_load_delegate(&electron_romp144_device::device_image_load_rom4, this));
|
||||||
|
GENERIC_SOCKET(config, m_romslot[5], generic_plain_slot, "electron_rom", "bin,rom");
|
||||||
|
m_romslot[5]->set_device_load(device_image_load_delegate(&electron_romp144_device::device_image_load_rom5, this));
|
||||||
|
GENERIC_SOCKET(config, m_romslot[6], generic_plain_slot, "electron_rom", "bin,rom");
|
||||||
|
m_romslot[6]->set_device_load(device_image_load_delegate(&electron_romp144_device::device_image_load_rom6, this));
|
||||||
|
}
|
||||||
|
|
||||||
|
//**************************************************************************
|
||||||
|
// LIVE DEVICE
|
||||||
|
//**************************************************************************
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// electron_romp144_device - constructor
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
electron_romp144_device::electron_romp144_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
|
||||||
|
: device_t(mconfig, ELECTRON_ROMP144, tag, owner, clock)
|
||||||
|
, device_electron_cart_interface(mconfig, *this)
|
||||||
|
, m_romslot(*this, "rom%u", 7)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// device_start - device-specific startup
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
void electron_romp144_device::device_start()
|
||||||
|
{
|
||||||
|
m_rom_select = 0xff;
|
||||||
|
m_rom_latch = 0xff;
|
||||||
|
|
||||||
|
save_item(NAME(m_rom_select));
|
||||||
|
save_item(NAME(m_rom_latch));
|
||||||
|
}
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// read - cartridge data read
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
uint8_t electron_romp144_device::read(offs_t offset, int infc, int infd, int romqa, int oe, int oe2)
|
||||||
|
{
|
||||||
|
uint8_t data = 0xff;
|
||||||
|
|
||||||
|
if (oe)
|
||||||
|
{
|
||||||
|
if (romqa)
|
||||||
|
{
|
||||||
|
if ((m_rom_select & 0x07) == 0x00)
|
||||||
|
data = m_ram[offset & 0x3fff];
|
||||||
|
else
|
||||||
|
data = m_romslot[(m_rom_select & 0x07) - 1]->read_rom(offset & 0x3fff);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ((m_rom_select & 0x0f) == 0x08)
|
||||||
|
data = m_ram[(offset & 0x3fff) | 0x4000];
|
||||||
|
else
|
||||||
|
data = m_rom[offset & 0x1fff];
|
||||||
|
|
||||||
|
/* roms selected with a read to latch */
|
||||||
|
if ((offset & 0x3f00) == 0x3f00)
|
||||||
|
{
|
||||||
|
m_rom_latch = offset & 0x0f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// write - cartridge data write
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
void electron_romp144_device::write(offs_t offset, uint8_t data, int infc, int infd, int romqa, int oe, int oe2)
|
||||||
|
{
|
||||||
|
if (oe)
|
||||||
|
{
|
||||||
|
if (romqa)
|
||||||
|
{
|
||||||
|
if ((m_rom_select & 0x07) == 0x00)
|
||||||
|
m_ram[offset & 0x3fff] = data;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ((m_rom_select & 0x0f) == 0x08)
|
||||||
|
m_ram[(offset & 0x3fff) | 0x4000] = data;
|
||||||
|
|
||||||
|
/* roms selected with a write to select */
|
||||||
|
if ((offset & 0x3f00) == 0x3f00)
|
||||||
|
{
|
||||||
|
/* does the write match the read (upper RAM cannot be de-selected to protect *RSUBSTITUTE) */
|
||||||
|
if (m_rom_latch == (offset & 0x0f) && m_rom_select != 0x08)
|
||||||
|
{
|
||||||
|
m_rom_select = m_rom_latch;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//**************************************************************************
|
||||||
|
// IMPLEMENTATION
|
||||||
|
//**************************************************************************
|
||||||
|
|
||||||
|
image_init_result electron_romp144_device::load_rom(device_image_interface &image, generic_slot_device *slot)
|
||||||
|
{
|
||||||
|
uint32_t size = slot->common_get_size("rom");
|
||||||
|
|
||||||
|
// socket accepts 8K and 16K ROM only
|
||||||
|
if (size != 0x2000 && size != 0x4000)
|
||||||
|
{
|
||||||
|
image.seterror(IMAGE_ERROR_UNSPECIFIED, "Invalid size: Only 8K/16K is supported");
|
||||||
|
return image_init_result::FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
slot->rom_alloc(0x4000, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE);
|
||||||
|
slot->common_load_rom(slot->get_rom_base(), size, "rom");
|
||||||
|
|
||||||
|
// mirror 8K ROMs
|
||||||
|
uint8_t *crt = slot->get_rom_base();
|
||||||
|
if (size <= 0x2000) memcpy(crt + 0x2000, crt, 0x2000);
|
||||||
|
|
||||||
|
return image_init_result::PASS;
|
||||||
|
}
|
60
src/devices/bus/electron/cart/romp144.h
Normal file
60
src/devices/bus/electron/cart/romp144.h
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
// license:BSD-3-Clause
|
||||||
|
// copyright-holders:Nigel Barnes
|
||||||
|
/**********************************************************************
|
||||||
|
|
||||||
|
JAFA Systems ROMPlus-144
|
||||||
|
|
||||||
|
**********************************************************************/
|
||||||
|
|
||||||
|
#ifndef MAME_BUS_ELECTRON_CART_ROMP144_H
|
||||||
|
#define MAME_BUS_ELECTRON_CART_ROMP144_H
|
||||||
|
|
||||||
|
#include "slot.h"
|
||||||
|
#include "bus/generic/slot.h"
|
||||||
|
#include "bus/generic/carts.h"
|
||||||
|
|
||||||
|
//**************************************************************************
|
||||||
|
// TYPE DEFINITIONS
|
||||||
|
//**************************************************************************
|
||||||
|
|
||||||
|
class electron_romp144_device :
|
||||||
|
public device_t,
|
||||||
|
public device_electron_cart_interface
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
// construction/destruction
|
||||||
|
electron_romp144_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(offs_t offset, int infc, int infd, int romqa, int oe, int oe2) override;
|
||||||
|
virtual void write(offs_t offset, uint8_t data, int infc, int infd, int romqa, int oe, int oe2) override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
image_init_result load_rom(device_image_interface &image, generic_slot_device *slot);
|
||||||
|
DECLARE_DEVICE_IMAGE_LOAD_MEMBER(rom0) { return load_rom(image, m_romslot[0]); }
|
||||||
|
DECLARE_DEVICE_IMAGE_LOAD_MEMBER(rom1) { return load_rom(image, m_romslot[1]); }
|
||||||
|
DECLARE_DEVICE_IMAGE_LOAD_MEMBER(rom2) { return load_rom(image, m_romslot[2]); }
|
||||||
|
DECLARE_DEVICE_IMAGE_LOAD_MEMBER(rom3) { return load_rom(image, m_romslot[3]); }
|
||||||
|
DECLARE_DEVICE_IMAGE_LOAD_MEMBER(rom4) { return load_rom(image, m_romslot[4]); }
|
||||||
|
DECLARE_DEVICE_IMAGE_LOAD_MEMBER(rom5) { return load_rom(image, m_romslot[5]); }
|
||||||
|
DECLARE_DEVICE_IMAGE_LOAD_MEMBER(rom6) { return load_rom(image, m_romslot[6]); }
|
||||||
|
|
||||||
|
required_device_array<generic_slot_device, 7> m_romslot;
|
||||||
|
|
||||||
|
uint8_t m_rom_select;
|
||||||
|
uint8_t m_rom_latch;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// device type definition
|
||||||
|
DECLARE_DEVICE_TYPE(ELECTRON_ROMP144, electron_romp144_device)
|
||||||
|
|
||||||
|
|
||||||
|
#endif // MAME_BUS_ELECTRON_CART_ROMP144_H
|
@ -266,7 +266,9 @@ void electron_cartslot_device::write(offs_t offset, uint8_t data, int infc, int
|
|||||||
#include "cumana.h"
|
#include "cumana.h"
|
||||||
#include "mgc.h"
|
#include "mgc.h"
|
||||||
#include "peg400.h"
|
#include "peg400.h"
|
||||||
//#include "e2p.h"
|
//#include "pmse2p.h"
|
||||||
|
#include "romp144.h"
|
||||||
|
//#include "rs423.h"
|
||||||
#include "sndexp.h"
|
#include "sndexp.h"
|
||||||
#include "sndexp3.h"
|
#include "sndexp3.h"
|
||||||
#include "sp64.h"
|
#include "sp64.h"
|
||||||
@ -286,7 +288,9 @@ void electron_cart(device_slot_interface &device)
|
|||||||
device.option_add_internal("cumana", ELECTRON_CUMANA);
|
device.option_add_internal("cumana", ELECTRON_CUMANA);
|
||||||
device.option_add_internal("mgc", ELECTRON_MGC);
|
device.option_add_internal("mgc", ELECTRON_MGC);
|
||||||
device.option_add_internal("peg400", ELECTRON_PEG400);
|
device.option_add_internal("peg400", ELECTRON_PEG400);
|
||||||
//device.option_add_internal("e2p", ELECTRON_E2P);
|
//device.option_add_internal("pmse2p", ELECTRON_PMSE2P);
|
||||||
|
device.option_add_internal("romp144", ELECTRON_ROMP144);
|
||||||
|
//device.option_add_internal("rs423", ELECTRON_RS423);
|
||||||
device.option_add_internal("sndexp", ELECTRON_SNDEXP);
|
device.option_add_internal("sndexp", ELECTRON_SNDEXP);
|
||||||
device.option_add_internal("sndexp3", ELECTRON_SNDEXP3);
|
device.option_add_internal("sndexp3", ELECTRON_SNDEXP3);
|
||||||
device.option_add_internal("sp64", ELECTRON_SP64);
|
device.option_add_internal("sp64", ELECTRON_SP64);
|
||||||
|
Loading…
Reference in New Issue
Block a user