mirror of
https://github.com/libretro/mame.git
synced 2025-03-03 16:48:39 +00:00
(MESS) a800: added sketchy support for some more mappers.
only a few carts have actually improved, but it is a start. nw.
This commit is contained in:
parent
a2dc414ca5
commit
2ad103296f
@ -3528,7 +3528,7 @@ Compiled by K1W1
|
||||
</software>
|
||||
|
||||
<software name="microcal" supported="no">
|
||||
<description>Microcalc XE v2.2 (Mexico)</description>
|
||||
<description>Microcalc XE v2.2 (Mex)</description>
|
||||
<year>19??</year>
|
||||
<publisher>Grupo SITSA</publisher>
|
||||
<part name="cart" interface="a8bit_cart">
|
||||
@ -5197,7 +5197,7 @@ Compiled by K1W1
|
||||
<publisher>COVIDEA</publisher>
|
||||
<info name="usage" value="Modem required (and a working Chemical Bank service, obviously inactive for decades)" />
|
||||
<part name="cart" interface="a8bit_cart">
|
||||
<feature name="slot" value="N/A" />
|
||||
<feature name="slot" value="a800_16k" />
|
||||
<dataarea name="rom" size="16384">
|
||||
<rom name="target electronic banking.rom" size="16384" crc="60c2a5ae" sha1="3c4976c118a9aefba8f8895e9b8c818dbc641371" offset="0" />
|
||||
</dataarea>
|
||||
@ -5225,7 +5225,7 @@ Compiled by K1W1
|
||||
<info name="serial" value="CXL4016" />
|
||||
<sharedfeat name="compatibility" value="OSb"/>
|
||||
<part name="cart" interface="a8bit_cart">
|
||||
<feature name="slot" value="N/A" />
|
||||
<feature name="slot" value="a800_tlink2" />
|
||||
<dataarea name="rom" size="8192">
|
||||
<rom name="telelink 2.rom" size="8192" crc="f0163f90" sha1="15d1dc9591b7306453087c94746ba1622e46d0ad" offset="0" /> <!-- Verified -->
|
||||
</dataarea>
|
||||
|
@ -14,6 +14,7 @@ static SLOT_INTERFACE_START(a800_left)
|
||||
SLOT_INTERFACE_INTERNAL("a800_16k", A800_ROM)
|
||||
SLOT_INTERFACE_INTERNAL("a800_phoenix", A800_ROM) // not really emulated at this stage
|
||||
SLOT_INTERFACE_INTERNAL("a800_bbsb", A800_ROM_BBSB)
|
||||
SLOT_INTERFACE_INTERNAL("a800_oss8k", A800_ROM_OSS8K)
|
||||
SLOT_INTERFACE_INTERNAL("a800_oss034m", A800_ROM_OSS34)
|
||||
SLOT_INTERFACE_INTERNAL("a800_oss043m", A800_ROM_OSS43)
|
||||
SLOT_INTERFACE_INTERNAL("a800_ossm091", A800_ROM_OSS91)
|
||||
@ -21,6 +22,12 @@ static SLOT_INTERFACE_START(a800_left)
|
||||
SLOT_INTERFACE_INTERNAL("a800_diamond", A800_ROM_EXPRESS)
|
||||
SLOT_INTERFACE_INTERNAL("a800_express", A800_ROM_EXPRESS)
|
||||
SLOT_INTERFACE_INTERNAL("a800_sparta", A800_ROM_SPARTADOS) // this is a passthru cart with unemulated (atm) subslot
|
||||
SLOT_INTERFACE_INTERNAL("a800_blizzard", A800_ROM)
|
||||
SLOT_INTERFACE_INTERNAL("a800_turbo64", A800_ROM_TURBO)
|
||||
SLOT_INTERFACE_INTERNAL("a800_turbo128", A800_ROM_TURBO)
|
||||
SLOT_INTERFACE_INTERNAL("a800_tlink2", A800_ROM_TELELINK2)
|
||||
SLOT_INTERFACE_INTERNAL("a800_sitsa", A800_ROM_MICROCALC)
|
||||
SLOT_INTERFACE_INTERNAL("a800_corina", A800_ROM) // NOT SUPPORTED YET!
|
||||
SLOT_INTERFACE_INTERNAL("xegs", XEGS_ROM)
|
||||
SLOT_INTERFACE_END
|
||||
|
||||
|
@ -192,6 +192,7 @@ static const a800_slot slot_list[] =
|
||||
{ A800_OSS034M, "a800_oss034m" },
|
||||
{ A800_OSS043M, "a800_oss043m" },
|
||||
{ A800_OSSM091, "a800_ossm091" },
|
||||
{ A800_OSS8K, "a800_oss8k" },
|
||||
{ A800_PHOENIX, "a800_phoenix" },
|
||||
{ A800_XEGS, "xegs" },
|
||||
{ A800_BBSB, "a800_bbsb" },
|
||||
@ -199,6 +200,12 @@ static const a800_slot slot_list[] =
|
||||
{ A800_WILLIAMS, "a800_williams" },
|
||||
{ A800_EXPRESS, "a800_express" },
|
||||
{ A800_SPARTADOS, "a800_sparta" },
|
||||
{ A800_TURBO64, "a800_turbo64" },
|
||||
{ A800_TURBO128, "a800_turbo128" },
|
||||
{ A800_BLIZZARD, "a800_blizzard" },
|
||||
{ A800_TELELINK2, "a800_tlink2" },
|
||||
{ A800_MICROCALC, "a800_sitsa" },
|
||||
{ A800_CORINA, "a800_corina" },
|
||||
{ A800_8K_RIGHT, "a800_8k_right" },
|
||||
{ A5200_4K, "a5200" },
|
||||
{ A5200_8K, "a5200" },
|
||||
@ -282,6 +289,9 @@ bool a800_cart_slot_device::call_load()
|
||||
ROM = m_cart->get_rom_base();
|
||||
fread(ROM, len);
|
||||
}
|
||||
if (m_type == A800_TELELINK2)
|
||||
m_cart->nvram_alloc(0x100);
|
||||
|
||||
printf("%s loaded cartridge '%s' size %dK\n", machine().system().name, filename(), len/1024);
|
||||
}
|
||||
return IMAGE_INIT_PASS;
|
||||
@ -357,7 +367,22 @@ int a800_cart_slot_device::identify_cart_type(UINT8 *header)
|
||||
case 39:
|
||||
type = A800_PHOENIX;
|
||||
break;
|
||||
// Atari 5200 CART files
|
||||
case 40:
|
||||
type = A800_BLIZZARD;
|
||||
break;
|
||||
case 44:
|
||||
type = A800_OSS8K;
|
||||
break;
|
||||
case 50:
|
||||
type = A800_TURBO64;
|
||||
break;
|
||||
case 51:
|
||||
type = A800_TURBO128;
|
||||
break;
|
||||
case 52:
|
||||
type = A800_MICROCALC;
|
||||
break;
|
||||
// Atari 5200 CART files
|
||||
case 4:
|
||||
type = A5200_32K;
|
||||
break;
|
||||
|
@ -16,6 +16,7 @@ enum
|
||||
A800_OSS034M,
|
||||
A800_OSS043M,
|
||||
A800_OSSM091,
|
||||
A800_OSS8K,
|
||||
A800_PHOENIX,
|
||||
A800_XEGS,
|
||||
A800_BBSB,
|
||||
@ -23,6 +24,12 @@ enum
|
||||
A800_WILLIAMS,
|
||||
A800_EXPRESS,
|
||||
A800_SPARTADOS,
|
||||
A800_BLIZZARD,
|
||||
A800_TURBO64,
|
||||
A800_TURBO128,
|
||||
A800_TELELINK2,
|
||||
A800_MICROCALC,
|
||||
A800_CORINA,
|
||||
A5200_4K,
|
||||
A5200_8K,
|
||||
A5200_16K,
|
||||
|
@ -13,11 +13,18 @@
|
||||
// constructor
|
||||
//-------------------------------------------------
|
||||
|
||||
const device_type A800_ROM_OSS8K = &device_creator<a800_rom_oss8k_device>;
|
||||
const device_type A800_ROM_OSS34 = &device_creator<a800_rom_oss34_device>;
|
||||
const device_type A800_ROM_OSS43 = &device_creator<a800_rom_oss43_device>;
|
||||
const device_type A800_ROM_OSS91 = &device_creator<a800_rom_oss91_device>;
|
||||
|
||||
|
||||
a800_rom_oss8k_device::a800_rom_oss8k_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: a800_rom_device(mconfig, A800_ROM_OSS8K, "Atari 800 ROM Carts OSS 8K", tag, owner, clock, "a800_oss8k", __FILE__)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
a800_rom_oss34_device::a800_rom_oss34_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: a800_rom_device(mconfig, A800_ROM_OSS34, "Atari 800 ROM Carts OSS-034M", tag, owner, clock, "a800_034m", __FILE__)
|
||||
{
|
||||
@ -37,6 +44,17 @@ a800_rom_oss91_device::a800_rom_oss91_device(const machine_config &mconfig, cons
|
||||
|
||||
|
||||
|
||||
void a800_rom_oss8k_device::device_start()
|
||||
{
|
||||
save_item(NAME(m_bank));
|
||||
}
|
||||
|
||||
void a800_rom_oss8k_device::device_reset()
|
||||
{
|
||||
m_bank = 0;
|
||||
}
|
||||
|
||||
|
||||
void a800_rom_oss34_device::device_start()
|
||||
{
|
||||
save_item(NAME(m_bank));
|
||||
@ -74,6 +92,39 @@ void a800_rom_oss91_device::device_reset()
|
||||
mapper specific handlers
|
||||
-------------------------------------------------*/
|
||||
|
||||
/*-------------------------------------------------
|
||||
|
||||
OSS 8K
|
||||
|
||||
This is used by The Writer's Tool only.
|
||||
|
||||
-------------------------------------------------*/
|
||||
|
||||
READ8_MEMBER(a800_rom_oss8k_device::read_80xx)
|
||||
{
|
||||
if (offset >= 0x1000)
|
||||
return m_rom[offset & 0xfff];
|
||||
else
|
||||
return m_rom[(offset & 0xfff) + (m_bank * 0x1000)];
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(a800_rom_oss8k_device::write_d5xx)
|
||||
{
|
||||
switch (offset & 0x09)
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
m_bank = 1;
|
||||
break;
|
||||
case 9:
|
||||
m_bank = 0;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------
|
||||
|
||||
OSS 034M
|
||||
|
@ -4,6 +4,26 @@
|
||||
#include "rom.h"
|
||||
|
||||
|
||||
// ======================> a800_rom_oss8k_device
|
||||
|
||||
class a800_rom_oss8k_device : public a800_rom_device
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
a800_rom_oss8k_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
|
||||
virtual DECLARE_READ8_MEMBER(read_80xx);
|
||||
virtual DECLARE_WRITE8_MEMBER(write_d5xx);
|
||||
|
||||
protected:
|
||||
int m_bank;
|
||||
};
|
||||
|
||||
|
||||
// ======================> a800_rom_oss34_device
|
||||
|
||||
class a800_rom_oss34_device : public a800_rom_device
|
||||
@ -66,6 +86,7 @@ protected:
|
||||
|
||||
|
||||
// device type definition
|
||||
extern const device_type A800_ROM_OSS8K;
|
||||
extern const device_type A800_ROM_OSS34;
|
||||
extern const device_type A800_ROM_OSS43;
|
||||
extern const device_type A800_ROM_OSS91;
|
||||
|
@ -20,6 +20,9 @@ const device_type A800_ROM = &device_creator<a800_rom_device>;
|
||||
const device_type A800_ROM_BBSB = &device_creator<a800_rom_bbsb_device>;
|
||||
const device_type A800_ROM_WILLIAMS = &device_creator<a800_rom_williams_device>;
|
||||
const device_type A800_ROM_EXPRESS = &device_creator<a800_rom_express_device>;
|
||||
const device_type A800_ROM_TURBO = &device_creator<a800_rom_turbo_device>;
|
||||
const device_type A800_ROM_TELELINK2 = &device_creator<a800_rom_telelink2_device>;
|
||||
const device_type A800_ROM_MICROCALC = &device_creator<a800_rom_microcalc_device>;
|
||||
const device_type XEGS_ROM = &device_creator<xegs_rom_device>;
|
||||
const device_type A5200_ROM_2CHIPS = &device_creator<a5200_rom_2chips_device>;
|
||||
const device_type A5200_ROM_BBSB = &device_creator<a5200_rom_bbsb_device>;
|
||||
@ -63,6 +66,24 @@ a800_rom_express_device::a800_rom_express_device(const machine_config &mconfig,
|
||||
}
|
||||
|
||||
|
||||
a800_rom_turbo_device::a800_rom_turbo_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: a800_rom_device(mconfig, A800_ROM_TURBO, "Atari 800 64K ROM Carts Turbosoft", tag, owner, clock, "a800_turbo", __FILE__)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
a800_rom_telelink2_device::a800_rom_telelink2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: a800_rom_device(mconfig, A800_ROM_TELELINK2, "Atari 800 64K ROM Cart Telelink II", tag, owner, clock, "a800_tlink2", __FILE__)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
a800_rom_microcalc_device::a800_rom_microcalc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: a800_rom_device(mconfig, A800_ROM_MICROCALC, "Atari 800 64K ROM Cart SITSA MicroCalc", tag, owner, clock, "a800_sitsa", __FILE__)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
a5200_rom_2chips_device::a5200_rom_2chips_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||
: a800_rom_device(mconfig, A5200_ROM_2CHIPS, "Atari 5200 ROM Cart 16K in 2 Chips", tag, owner, clock, "a5200_16k2c", __FILE__)
|
||||
{
|
||||
@ -131,6 +152,28 @@ void a800_rom_express_device::device_reset()
|
||||
}
|
||||
|
||||
|
||||
void a800_rom_turbo_device::device_start()
|
||||
{
|
||||
save_item(NAME(m_bank));
|
||||
}
|
||||
|
||||
void a800_rom_turbo_device::device_reset()
|
||||
{
|
||||
m_bank = 0;
|
||||
}
|
||||
|
||||
|
||||
void a800_rom_microcalc_device::device_start()
|
||||
{
|
||||
save_item(NAME(m_bank));
|
||||
}
|
||||
|
||||
void a800_rom_microcalc_device::device_reset()
|
||||
{
|
||||
m_bank = 0;
|
||||
}
|
||||
|
||||
|
||||
void a5200_rom_bbsb_device::device_start()
|
||||
{
|
||||
save_item(NAME(m_banks));
|
||||
@ -265,6 +308,78 @@ WRITE8_MEMBER(a800_rom_express_device::write_d5xx)
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------
|
||||
|
||||
Turbosoft 64K / 128K
|
||||
|
||||
|
||||
-------------------------------------------------*/
|
||||
|
||||
READ8_MEMBER(a800_rom_turbo_device::read_80xx)
|
||||
{
|
||||
return m_rom[(offset & 0x1fff) + (m_bank * 0x2000)];
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(a800_rom_turbo_device::write_d5xx)
|
||||
{
|
||||
m_bank = offset & m_bank_mask;
|
||||
}
|
||||
|
||||
|
||||
/*-------------------------------------------------
|
||||
|
||||
Telelink II
|
||||
|
||||
|
||||
-------------------------------------------------*/
|
||||
|
||||
READ8_MEMBER(a800_rom_telelink2_device::read_80xx)
|
||||
{
|
||||
if (offset >= 0x2000)
|
||||
return m_rom[offset & 0x1fff];
|
||||
if (offset >= 0x1000 && offset < 0x1100)
|
||||
return m_nvram[offset & 0xff];
|
||||
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(a800_rom_telelink2_device::write_80xx)
|
||||
{
|
||||
m_nvram[offset & 0xff] = data | 0xf0; // low 4bits only
|
||||
}
|
||||
|
||||
READ8_MEMBER(a800_rom_telelink2_device::read_d5xx)
|
||||
{
|
||||
// this should affect NVRAM enable / save
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(a800_rom_telelink2_device::write_d5xx)
|
||||
{
|
||||
// this should affect NVRAM enable / save
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*-------------------------------------------------
|
||||
|
||||
SITSA Microcalc
|
||||
|
||||
|
||||
-------------------------------------------------*/
|
||||
|
||||
READ8_MEMBER(a800_rom_microcalc_device::read_80xx)
|
||||
{
|
||||
return m_rom[(offset & 0x1fff) + (m_bank * 0x2000)];
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(a800_rom_microcalc_device::write_d5xx)
|
||||
{
|
||||
m_bank = data;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Atari 5200
|
||||
|
||||
|
||||
|
@ -82,6 +82,77 @@ protected:
|
||||
};
|
||||
|
||||
|
||||
// ======================> a800_rom_blizzard_device
|
||||
|
||||
class a800_rom_blizzard_device : public a800_rom_device
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
a800_rom_blizzard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
|
||||
virtual DECLARE_READ8_MEMBER(read_80xx);
|
||||
};
|
||||
|
||||
|
||||
// ======================> a800_rom_turbo_device
|
||||
|
||||
class a800_rom_turbo_device : public a800_rom_device
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
a800_rom_turbo_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
|
||||
virtual DECLARE_READ8_MEMBER(read_80xx);
|
||||
virtual DECLARE_WRITE8_MEMBER(write_d5xx);
|
||||
|
||||
protected:
|
||||
int m_bank;
|
||||
};
|
||||
|
||||
|
||||
// ======================> a800_rom_telelink2_device
|
||||
|
||||
class a800_rom_telelink2_device : public a800_rom_device
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
a800_rom_telelink2_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
virtual DECLARE_READ8_MEMBER(read_80xx);
|
||||
virtual DECLARE_WRITE8_MEMBER(write_80xx);
|
||||
virtual DECLARE_READ8_MEMBER(read_d5xx);
|
||||
virtual DECLARE_WRITE8_MEMBER(write_d5xx);
|
||||
};
|
||||
|
||||
|
||||
// ======================> a800_rom_microcalc_device
|
||||
|
||||
class a800_rom_microcalc_device : public a800_rom_device
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
a800_rom_microcalc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
|
||||
virtual DECLARE_READ8_MEMBER(read_80xx);
|
||||
virtual DECLARE_WRITE8_MEMBER(write_d5xx);
|
||||
|
||||
protected:
|
||||
int m_bank;
|
||||
};
|
||||
|
||||
|
||||
// ======================> xegs_rom_device
|
||||
|
||||
class xegs_rom_device : public a800_rom_device
|
||||
@ -140,6 +211,9 @@ extern const device_type A800_ROM;
|
||||
extern const device_type A800_ROM_BBSB;
|
||||
extern const device_type A800_ROM_WILLIAMS;
|
||||
extern const device_type A800_ROM_EXPRESS;
|
||||
extern const device_type A800_ROM_TURBO;
|
||||
extern const device_type A800_ROM_TELELINK2;
|
||||
extern const device_type A800_ROM_MICROCALC;
|
||||
extern const device_type XEGS_ROM;
|
||||
extern const device_type A5200_ROM_2CHIPS;
|
||||
extern const device_type A5200_ROM_BBSB;
|
||||
|
@ -269,6 +269,7 @@ public:
|
||||
DECLARE_READ8_MEMBER(atari_pia_pa_r);
|
||||
DECLARE_READ8_MEMBER(atari_pia_pb_r);
|
||||
|
||||
DECLARE_READ8_MEMBER(read_d5xx); // at least one cart type can enable/disable roms when reading
|
||||
DECLARE_WRITE8_MEMBER(disable_cart);
|
||||
|
||||
DECLARE_READ8_MEMBER(a600xl_low_r);
|
||||
@ -1727,11 +1728,18 @@ void a400_state::setup_ram(int bank, UINT32 size)
|
||||
}
|
||||
}
|
||||
|
||||
READ8_MEMBER(a400_state::read_d5xx)
|
||||
{
|
||||
disable_cart(space, offset, 0);
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(a400_state::disable_cart)
|
||||
{
|
||||
switch (m_cartslot->get_cart_type())
|
||||
{
|
||||
case A800_PHOENIX:
|
||||
case A800_BLIZZARD:
|
||||
if (!m_cart_disabled)
|
||||
{
|
||||
m_cart_disabled = 1;
|
||||
@ -1767,11 +1775,36 @@ WRITE8_MEMBER(a400_state::disable_cart)
|
||||
}
|
||||
}
|
||||
break;
|
||||
case A800_TURBO64:
|
||||
case A800_TURBO128:
|
||||
if (offset & 0x10 && !m_cart_disabled)
|
||||
{
|
||||
m_cart_disabled = 1;
|
||||
setup_ram(2, m_ram->size());
|
||||
}
|
||||
else if (!(offset & 0x10))
|
||||
{
|
||||
if (m_cart_disabled)
|
||||
{
|
||||
m_cart_disabled = 0;
|
||||
m_maincpu->space(AS_PROGRAM).install_read_handler(0xa000, 0xbfff, read8_delegate(FUNC(a800_cart_slot_device::read_80xx),(a800_cart_slot_device*)m_cartslot));
|
||||
m_maincpu->space(AS_PROGRAM).unmap_write(0xa000, 0xbfff);
|
||||
}
|
||||
|
||||
if ((offset & 0x0f) != m_last_offs)
|
||||
{
|
||||
// we enter here only if we are writing to a different offset than last time
|
||||
m_last_offs = offset & 0x0f;
|
||||
m_cartslot->write_d5xx(space, offset & 0x0f, data);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case A800_SPARTADOS:
|
||||
// writes with offset & 8 are also used to enable/disable the subcart, so they go through!
|
||||
m_cartslot->write_d5xx(space, offset, data);
|
||||
break;
|
||||
case A800_OSSM091:
|
||||
case A800_OSS8K:
|
||||
if ((offset & 0x9) == 0x08)
|
||||
setup_ram(2, m_ram->size());
|
||||
else
|
||||
@ -1781,6 +1814,17 @@ WRITE8_MEMBER(a400_state::disable_cart)
|
||||
m_cartslot->write_d5xx(space, offset, data);
|
||||
}
|
||||
break;
|
||||
case A800_MICROCALC:
|
||||
m_cart_disabled = (m_cart_disabled + 1) % 5;
|
||||
if (m_cart_disabled == 4)
|
||||
setup_ram(2, m_ram->size());
|
||||
else
|
||||
{
|
||||
m_maincpu->space(AS_PROGRAM).install_read_handler(0xa000, 0xbfff, read8_delegate(FUNC(a800_cart_slot_device::read_80xx),(a800_cart_slot_device*)m_cartslot));
|
||||
m_maincpu->space(AS_PROGRAM).unmap_write(0xa000, 0xbfff);
|
||||
m_cartslot->write_d5xx(space, offset, m_cart_disabled);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -1818,10 +1862,19 @@ void a400_state::setup_cart(int type)
|
||||
case A800_OSS034M:
|
||||
case A800_OSS043M:
|
||||
case A800_OSSM091:
|
||||
case A800_OSS8K:
|
||||
case A800_TURBO64:
|
||||
case A800_TURBO128:
|
||||
m_maincpu->space(AS_PROGRAM).install_read_handler(0xa000, 0xbfff, read8_delegate(FUNC(a800_cart_slot_device::read_80xx),(a800_cart_slot_device*)m_cartslot));
|
||||
m_maincpu->space(AS_PROGRAM).unmap_write(0xa000, 0xbfff);
|
||||
m_maincpu->space(AS_PROGRAM).install_write_handler(0xd500, 0xd5ff, write8_delegate(FUNC(a400_state::disable_cart), this));
|
||||
break;
|
||||
case A800_MICROCALC:
|
||||
// this can also disable ROM when reading in 0xd500-0xd5ff
|
||||
m_maincpu->space(AS_PROGRAM).install_read_handler(0xa000, 0xbfff, read8_delegate(FUNC(a800_cart_slot_device::read_80xx),(a800_cart_slot_device*)m_cartslot));
|
||||
m_maincpu->space(AS_PROGRAM).unmap_write(0xa000, 0xbfff);
|
||||
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xd500, 0xd5ff, read8_delegate(FUNC(a400_state::read_d5xx), this), write8_delegate(FUNC(a400_state::disable_cart), this));
|
||||
break;
|
||||
case A800_EXPRESS:
|
||||
m_maincpu->space(AS_PROGRAM).install_read_handler(0xa000, 0xbfff, read8_delegate(FUNC(a800_cart_slot_device::read_80xx),(a800_cart_slot_device*)m_cartslot));
|
||||
m_maincpu->space(AS_PROGRAM).unmap_write(0xa000, 0xbfff);
|
||||
@ -1842,6 +1895,18 @@ void a400_state::setup_cart(int type)
|
||||
m_maincpu->space(AS_PROGRAM).unmap_write(0xa000, 0xbfff);
|
||||
m_maincpu->space(AS_PROGRAM).install_write_handler(0xd5e0, 0xd5ef, write8_delegate(FUNC(a400_state::disable_cart), this));
|
||||
break;
|
||||
case A800_TELELINK2:
|
||||
m_maincpu->space(AS_PROGRAM).install_read_handler(0x8000, 0xbfff, read8_delegate(FUNC(a800_cart_slot_device::read_80xx),(a800_cart_slot_device*)m_cartslot));
|
||||
m_maincpu->space(AS_PROGRAM).install_write_handler(0x9000, 0x90ff, write8_delegate(FUNC(a800_cart_slot_device::write_80xx),(a800_cart_slot_device*)m_cartslot));
|
||||
m_maincpu->space(AS_PROGRAM).unmap_write(0xa000, 0xbfff);
|
||||
m_maincpu->space(AS_PROGRAM).install_read_handler(0xd501, 0xd501, read8_delegate(FUNC(a800_cart_slot_device::read_d5xx),(a800_cart_slot_device*)m_cartslot));
|
||||
m_maincpu->space(AS_PROGRAM).install_write_handler(0xd502, 0xd502, write8_delegate(FUNC(a800_cart_slot_device::write_d5xx),(a800_cart_slot_device*)m_cartslot));
|
||||
break;
|
||||
case A800_BLIZZARD:
|
||||
m_maincpu->space(AS_PROGRAM).install_read_handler(0x8000, 0xbfff, read8_delegate(FUNC(a800_cart_slot_device::read_80xx),(a800_cart_slot_device*)m_cartslot));
|
||||
m_maincpu->space(AS_PROGRAM).unmap_write(0x8000, 0xbfff);
|
||||
m_maincpu->space(AS_PROGRAM).install_write_handler(0xd500, 0xd5ff, write8_delegate(FUNC(a400_state::disable_cart), this));
|
||||
break;
|
||||
case A800_XEGS:
|
||||
m_maincpu->space(AS_PROGRAM).install_read_handler(0x8000, 0xbfff, read8_delegate(FUNC(a800_cart_slot_device::read_80xx),(a800_cart_slot_device*)m_cartslot));
|
||||
m_maincpu->space(AS_PROGRAM).unmap_write(0x8000, 0xbfff);
|
||||
|
Loading…
x
Reference in New Issue
Block a user