(MESS) msx.c: Added support for Arc (nw)

This commit is contained in:
Wilbert Pol 2014-06-04 21:30:17 +00:00
parent d15871c7b0
commit 51b976d70b
6 changed files with 108 additions and 7 deletions

2
.gitattributes vendored
View File

@ -991,6 +991,8 @@ src/emu/bus/midi/midiinport.c svneol=native#text/plain
src/emu/bus/midi/midiinport.h svneol=native#text/plain
src/emu/bus/midi/midioutport.c svneol=native#text/plain
src/emu/bus/midi/midioutport.h svneol=native#text/plain
src/emu/bus/msx_cart/arc.c svneol=native#text/plain
src/emu/bus/msx_cart/arc.h svneol=native#text/plain
src/emu/bus/msx_cart/ascii.c svneol=native#text/plain
src/emu/bus/msx_cart/ascii.h svneol=native#text/plain
src/emu/bus/msx_cart/cartridge.c svneol=native#text/plain

View File

@ -309,21 +309,22 @@ The following floppies came with the machines.
</software>
-->
<!-- Needs specific mapper -->
<software name="arc" supported="no">
<software name="arc">
<description>Arc</description>
<year>1990</year>
<publisher>Parallax</publisher>
<part name="flop1" interface="floppy_3_5">
<dataarea name="flop" size="737280">
<rom name="ARC_disk_A.dsk" size="737280" crc="dfd9c28d" sha1="ddff24b17fd4fcaecd8197fb8a20099483924565" offset="0" />
</dataarea>
</part>
<!-- Floppy #2 is the game disk -->
<part name="flop2" interface="floppy_3_5">
<dataarea name="flop" size="737280">
<rom name="ARC_disk_B.dsk" size="737280" crc="af2bd084" sha1="8d91f61e28c0d813f16adb06e019da911aa84b2c" offset="0" />
</dataarea>
</part>
<!-- Floppy #1 contains the manual -->
<part name="flop1" interface="floppy_3_5">
<dataarea name="flop" size="737280">
<rom name="ARC_disk_A.dsk" size="737280" crc="dfd9c28d" sha1="ddff24b17fd4fcaecd8197fb8a20099483924565" offset="0" />
</dataarea>
</part>
<part name="cart" interface="msx_cart">
<feature name="slot" value="arc" />
<dataarea name="rom" size="32768">

View File

@ -407,6 +407,7 @@ BUSOBJS += $(BUSOBJ)/msx_slot/ram_mm.o
BUSOBJS += $(BUSOBJ)/msx_slot/slot.o
BUSOBJS += $(BUSOBJ)/msx_slot/sony08.o
OBJDIRS += $(BUSOBJ)/msx_cart
BUSOBJS += $(BUSOBJ)/msx_cart/arc.o
BUSOBJS += $(BUSOBJ)/msx_cart/ascii.o
BUSOBJS += $(BUSOBJ)/msx_cart/cartridge.o
BUSOBJS += $(BUSOBJ)/msx_cart/crossblaim.o

View File

@ -0,0 +1,63 @@
#include "emu.h"
#include "arc.h"
const device_type MSX_CART_ARC = &device_creator<msx_cart_arc>;
msx_cart_arc::msx_cart_arc(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, MSX_CART_ARC, "MSX Cartridge - Arc", tag, owner, clock, "msx_cart_arc", __FILE__)
, msx_cart_interface(mconfig, *this)
, m_7f(0)
{
}
void msx_cart_arc::device_start()
{
// Install IO read/write handlers
address_space &space = machine().device<cpu_device>("maincpu")->space(AS_IO);
space.install_write_handler(0x7f, 0x7f, write8_delegate(FUNC(msx_cart_arc::io_7f_w), this));
space.install_read_handler(0x7f, 0x7f, read8_delegate(FUNC(msx_cart_arc::io_7f_r), this));
}
void msx_cart_arc::device_reset()
{
m_7f = 0;
}
void msx_cart_arc::initialize_cartridge()
{
if (get_rom_size() != 0x8000)
{
fatalerror("arc: Invalid ROM size\n");
}
}
READ8_MEMBER(msx_cart_arc::read_cart)
{
if (offset >= 0x4000 && offset < 0xc000)
{
return get_rom_base()[offset - 0x4000];
}
return 0xff;
}
WRITE8_MEMBER(msx_cart_arc::io_7f_w)
{
if (data == 0x35)
{
m_7f++;
}
}
READ8_MEMBER(msx_cart_arc::io_7f_r)
{
return ((m_7f & 0x03) == 0x03) ? 0xda : 0xff;
}

View File

@ -0,0 +1,32 @@
#ifndef __MSX_CART_ARC_H
#define __MSX_CART_ARC_H
#include "bus/msx_cart/cartridge.h"
extern const device_type MSX_CART_ARC;
class msx_cart_arc : public device_t
, public msx_cart_interface
{
public:
msx_cart_arc(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
// device-level overrides
virtual void device_start();
virtual void device_reset();
virtual void initialize_cartridge();
virtual DECLARE_READ8_MEMBER(read_cart);
DECLARE_WRITE8_MEMBER(io_7f_w);
DECLARE_READ8_MEMBER(io_7f_r);
private:
UINT8 m_7f;
};
#endif

View File

@ -1,6 +1,7 @@
#include "emu.h"
#include "cartridge.h"
#include "arc.h"
#include "ascii.h"
#include "crossblaim.h"
#include "dooly.h"
@ -51,6 +52,7 @@ SLOT_INTERFACE_START(msx_cart)
SLOT_INTERFACE_INTERNAL("holy_quran", MSX_CART_HOLY_QURAN)
SLOT_INTERFACE_INTERNAL("dooly", MSX_CART_DOOLY)
SLOT_INTERFACE_INTERNAL("halnote", MSX_CART_HALNOTE)
SLOT_INTERFACE_INTERNAL("arc", MSX_CART_ARC)
SLOT_INTERFACE_END