summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar Curt Coder <curtcoder@mail.com>2013-02-10 19:58:50 +0000
committerGravatarGravatar Curt Coder <curtcoder@mail.com>2013-02-10 19:58:50 +0000
commitae951920f0504d8d42e70ebf5344f836d591f3ce (patch) (github)
tree79a79e587d31d1dedd619ca2289b26fa7eadafd4
parent11607bf28e9b2b7699eb586ffd9321021bd6620d (diff)
downloadmame-ae951920f0504d8d42e70ebf5344f836d591f3ce.tar.bz2
mame-ae951920f0504d8d42e70ebf5344f836d591f3ce.zip
(MESS) c64: Added support for the VizaStar cartridge. [Curt Coder]
-rw-r--r--.gitattributes2
-rw-r--r--hash/c64_cart.xml23
-rw-r--r--src/mess/machine/c64_vizastar.c90
-rw-r--r--src/mess/machine/c64_vizastar.h48
-rw-r--r--src/mess/machine/cbmipt.c1
-rw-r--r--src/mess/machine/cbmipt.h1
-rw-r--r--src/mess/mess.mak1
7 files changed, 166 insertions, 0 deletions
diff --git a/.gitattributes b/.gitattributes
index 7207281fe30..a94052591b7 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -6984,6 +6984,8 @@ src/mess/machine/c64_tdos.c svneol=native#text/plain
src/mess/machine/c64_tdos.h svneol=native#text/plain
src/mess/machine/c64_turbo232.c svneol=native#text/plain
src/mess/machine/c64_turbo232.h svneol=native#text/plain
+src/mess/machine/c64_vizastar.c svneol=native#text/plain
+src/mess/machine/c64_vizastar.h svneol=native#text/plain
src/mess/machine/c64_vw64.c svneol=native#text/plain
src/mess/machine/c64_vw64.h svneol=native#text/plain
src/mess/machine/c64_warp_speed.c svneol=native#text/plain
diff --git a/hash/c64_cart.xml b/hash/c64_cart.xml
index 58dc89dd7e6..1b85b7e0399 100644
--- a/hash/c64_cart.xml
+++ b/hash/c64_cart.xml
@@ -6574,6 +6574,29 @@
</part>
</software>
+ <software name="vizastar">
+ <description>VizaStar XL4</description>
+ <year>1984</year>
+ <publisher>Viza</publisher>
+ <sharedfeat name="compatibility" value="NTSC,PAL"/>
+
+ <part name="cart" interface="c64_cart">
+ <feature name="slot" value="vizastar" />
+ <feature name="game" value="1" />
+ <feature name="exrom" value="0" />
+
+ <dataarea name="roml" size="0x1000">
+ <rom name="v" size="0x1000" crc="d17689a0" sha1="4df4d254d7fae916c473d421515b2b74d77e9fd9" offset="0" />
+ </dataarea>
+ </part>
+
+ <part name="flop1" interface="floppy_5_25">
+ <dataarea name="flop" size="350952">
+ <rom name="vizastar.g64" size="350952" crc="c4f327ac" sha1="c4d35b895f73d7133a72a5d7642e3a588df5370f" offset="0" />
+ </dataarea>
+ </part>
+ </software>
+
<!-- Dummy cartridge entries to allow requirement mappings from c64_flop -->
<software name="cpm">
diff --git a/src/mess/machine/c64_vizastar.c b/src/mess/machine/c64_vizastar.c
new file mode 100644
index 00000000000..b90eeb81db1
--- /dev/null
+++ b/src/mess/machine/c64_vizastar.c
@@ -0,0 +1,90 @@
+/**********************************************************************
+
+ VizaWrite 64 cartridge emulation
+
+ Copyright MESS Team.
+ Visit http://mamedev.org for licensing and usage restrictions.
+
+**********************************************************************/
+
+/*
+
+ PCB Layout
+ ----------
+ RB84 (C) MICROPORT
+ |===========================|
+ |=| |
+ |=| |
+ |=| |
+ |=| |
+ |=| ROM |
+ |=| |
+ |=| |
+ |=| |
+ |===========================|
+
+ ROM - Hitachi HN462732G EPROM "V"
+
+*/
+
+#include "c64_vizastar.h"
+
+
+
+//**************************************************************************
+// MACROS/CONSTANTS
+//**************************************************************************
+
+#define UNSCRAMBLE_ADDRESS(_offset) \
+ BITSWAP16(_offset,15,14,13,12,5,0,7,10,11,9,8,6,4,3,2,1)
+
+#define UNSCRAMBLE_DATA(_data) \
+ BITSWAP8(_data,7,6,0,5,1,4,2,3)
+
+
+
+//**************************************************************************
+// DEVICE DEFINITIONS
+//**************************************************************************
+
+const device_type C64_VIZASTAR = &device_creator<c64_vizastar_cartridge_device>;
+
+
+
+//**************************************************************************
+// LIVE DEVICE
+//**************************************************************************
+
+//-------------------------------------------------
+// c64_vizastar_cartridge_device - constructor
+//-------------------------------------------------
+
+c64_vizastar_cartridge_device::c64_vizastar_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+ device_t(mconfig, C64_VIZASTAR, "VizaStar 64", tag, owner, clock),
+ device_c64_expansion_card_interface(mconfig, *this)
+{
+}
+
+
+//-------------------------------------------------
+// device_start - device-specific startup
+//-------------------------------------------------
+
+void c64_vizastar_cartridge_device::device_start()
+{
+}
+
+
+//-------------------------------------------------
+// c64_cd_r - cartridge data read
+//-------------------------------------------------
+
+UINT8 c64_vizastar_cartridge_device::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int sphi2, int ba, int roml, int romh, int io1, int io2)
+{
+ if (!roml)
+ {
+ data = UNSCRAMBLE_DATA(m_roml[UNSCRAMBLE_ADDRESS(offset & 0xfff)]);
+ }
+
+ return data;
+}
diff --git a/src/mess/machine/c64_vizastar.h b/src/mess/machine/c64_vizastar.h
new file mode 100644
index 00000000000..f5fe771cd2b
--- /dev/null
+++ b/src/mess/machine/c64_vizastar.h
@@ -0,0 +1,48 @@
+/**********************************************************************
+
+ VizaStar 64 cartridge emulation
+
+ Copyright MESS Team.
+ Visit http://mamedev.org for licensing and usage restrictions.
+
+**********************************************************************/
+
+#pragma once
+
+#ifndef __VIZASTAR__
+#define __VIZASTAR__
+
+
+#include "emu.h"
+#include "machine/c64exp.h"
+
+
+
+//**************************************************************************
+// TYPE DEFINITIONS
+//**************************************************************************
+
+// ======================> c64_vizastar_cartridge_device
+
+class c64_vizastar_cartridge_device : public device_t,
+ public device_c64_expansion_card_interface
+{
+public:
+ // construction/destruction
+ c64_vizastar_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+
+protected:
+ // device-level overrides
+ virtual void device_config_complete() { m_shortname = "c64_vizastar"; }
+ virtual void device_start();
+
+ // device_c64_expansion_card_interface overrides
+ virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int sphi2, int ba, int roml, int romh, int io1, int io2);
+};
+
+
+// device type definition
+extern const device_type C64_VIZASTAR;
+
+
+#endif
diff --git a/src/mess/machine/cbmipt.c b/src/mess/machine/cbmipt.c
index e33838f726d..1bac1f9225d 100644
--- a/src/mess/machine/cbmipt.c
+++ b/src/mess/machine/cbmipt.c
@@ -1171,6 +1171,7 @@ SLOT_INTERFACE_START( c64_expansion_cards )
SLOT_INTERFACE_INTERNAL("sw8k", C64_SW8K)
SLOT_INTERFACE_INTERNAL("system3", C64_SYSTEM3)
SLOT_INTERFACE_INTERNAL("tdos", C64_TDOS)
+ SLOT_INTERFACE_INTERNAL("vizastar", C64_VIZASTAR)
SLOT_INTERFACE_INTERNAL("vizawrite", C64_VW64)
SLOT_INTERFACE_INTERNAL("warp_speed", C64_WARP_SPEED)
SLOT_INTERFACE_INTERNAL("westermann", C64_WESTERMANN)
diff --git a/src/mess/machine/cbmipt.h b/src/mess/machine/cbmipt.h
index af45e1ab8ec..63692214081 100644
--- a/src/mess/machine/cbmipt.h
+++ b/src/mess/machine/cbmipt.h
@@ -60,6 +60,7 @@
#include "machine/c64_system3.h"
#include "machine/c64_tdos.h"
#include "machine/c64_turbo232.h"
+#include "machine/c64_vizastar.h"
#include "machine/c64_vw64.h"
#include "machine/c64_warp_speed.h"
#include "machine/c64_westermann.h"
diff --git a/src/mess/mess.mak b/src/mess/mess.mak
index 82c76b9b21d..fd277b23a5d 100644
--- a/src/mess/mess.mak
+++ b/src/mess/mess.mak
@@ -896,6 +896,7 @@ $(MESSOBJ)/cbm.a: \
$(MESS_MACHINE)/c64_system3.o \
$(MESS_MACHINE)/c64_tdos.o \
$(MESS_MACHINE)/c64_turbo232.o \
+ $(MESS_MACHINE)/c64_vizastar.o \
$(MESS_MACHINE)/c64_vw64.o \
$(MESS_MACHINE)/c64_warp_speed.o \
$(MESS_MACHINE)/c64_westermann.o \