Skip to content

Commit

Permalink
(MESS) c64: Added support for the VizaStar cartridge. [Curt Coder]
Browse files Browse the repository at this point in the history
  • Loading branch information
curt-coder committed Feb 10, 2013
1 parent 11607bf commit ae95192
Show file tree
Hide file tree
Showing 7 changed files with 166 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Expand Up @@ -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
Expand Down
23 changes: 23 additions & 0 deletions hash/c64_cart.xml
Expand Up @@ -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">
Expand Down
90 changes: 90 additions & 0 deletions 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;
}
48 changes: 48 additions & 0 deletions 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
1 change: 1 addition & 0 deletions src/mess/machine/cbmipt.c
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions src/mess/machine/cbmipt.h
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions src/mess/mess.mak
Expand Up @@ -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 \
Expand Down

0 comments on commit ae95192

Please sign in to comment.