c128: Added a skeleton for the PARTNER 128 cartridge. [Curt Coder]

This commit is contained in:
Curt Coder 2015-07-27 00:25:19 +03:00
parent 83a750e6c0
commit a733240aa6
5 changed files with 217 additions and 0 deletions

View File

@ -156,4 +156,27 @@ Missing dumps:
</part>
</software>
<software name="partn128">
<description>PARTNER 128</description>
<year>1985</year>
<publisher>Timeworks</publisher>
<sharedfeat name="compatibility" value="NTSC,PAL"/>
<part name="cart" interface="c64_cart">
<feature name="slot" value="partner128" />
<feature name="game" value="1" />
<feature name="exrom" value="1" />
<dataarea name="romh" size="0x4000">
<rom name="partner 128" size="0x4000" status="nodump" offset="0" />
</dataarea>
</part>
<part name="flop1" interface="floppy_5_25">
<feature name="part_id" value="Partner Diagnostic Test &amp; Program Demonstration Disk"/>
<dataarea name="flop" size="333744">
<rom name="partner 128.g64" size="287512" crc="9b2ac8d5" sha1="8143cafa623bb53b92a37d7ee2cc7d77080d80ea" offset="0" />
</dataarea>
</part>
</software>
</softwarelist>

View File

@ -240,6 +240,8 @@ if (BUSES["C64"]~=null) then
MAME_DIR .. "src/emu/bus/c64/exp.h",
MAME_DIR .. "src/emu/bus/c64/c128_comal80.c",
MAME_DIR .. "src/emu/bus/c64/c128_comal80.h",
MAME_DIR .. "src/emu/bus/c64/c128_partner.c",
MAME_DIR .. "src/emu/bus/c64/c128_partner.h",
MAME_DIR .. "src/emu/bus/c64/comal80.c",
MAME_DIR .. "src/emu/bus/c64/comal80.h",
MAME_DIR .. "src/emu/bus/c64/cpm.c",

View File

@ -0,0 +1,130 @@
// license:BSD-3-Clause
// copyright-holders:Curt Coder
/**********************************************************************
Timeworks PARTNER 128 cartridge emulation
**********************************************************************/
/*
PCB Layout
----------
|---------------|
|LS74 SW CN|
|LS09 LS273|
|LS139 RAM |
|LS133 |
| LS240 |
|LS33 ROM |
|LS09 |
|||||||||||||||
ROM - EPROM
RAM - Sony CXK5864PN-15L 8Kx8 SRAM
SW - push button switch
CN - lead out to joystick port dongle
*/
#include "c128_partner.h"
//**************************************************************************
// DEVICE DEFINITIONS
//**************************************************************************
const device_type C128_PARTNER = &device_creator<partner128_t>;
//-------------------------------------------------
// INPUT_PORTS( c128_partner )
//-------------------------------------------------
WRITE_LINE_MEMBER( partner128_t::nmi_w )
{
}
static INPUT_PORTS_START( c128_partner )
PORT_START("NMI")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Menu") PORT_CODE(KEYCODE_F11) PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, partner128_t, nmi_w)
INPUT_PORTS_END
//-------------------------------------------------
// input_ports - device-specific input ports
//-------------------------------------------------
ioport_constructor partner128_t::device_input_ports() const
{
return INPUT_PORTS_NAME( c128_partner );
}
//**************************************************************************
// LIVE DEVICE
//**************************************************************************
//-------------------------------------------------
// partner128_t - constructor
//-------------------------------------------------
partner128_t::partner128_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, C128_PARTNER, "PARTNER 128", tag, owner, clock, "c128_partner", __FILE__),
device_c64_expansion_card_interface(mconfig, *this),
device_vcs_control_port_interface(mconfig, *this),
m_ram(*this, "ram")
{
}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
void partner128_t::device_start()
{
// allocate memory
m_ram.allocate(0x2000);
}
//-------------------------------------------------
// device_reset - device-specific reset
//-------------------------------------------------
void partner128_t::device_reset()
{
}
//-------------------------------------------------
// c64_cd_r - cartridge data read
//-------------------------------------------------
UINT8 partner128_t::c64_cd_r(address_space &space, offs_t offset, UINT8 data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
return data;
}
//-------------------------------------------------
// c64_cd_w - cartridge data write
//-------------------------------------------------
void partner128_t::c64_cd_w(address_space &space, offs_t offset, UINT8 data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
}
//-------------------------------------------------
// c64_game_r - GAME read
//-------------------------------------------------
int partner128_t::c64_game_r(offs_t offset, int sphi2, int ba, int rw)
{
return 1;
}

View File

@ -0,0 +1,60 @@
// license:BSD-3-Clause
// copyright-holders:Curt Coder
/**********************************************************************
Timeworks PARTNER 128 cartridge emulation
**********************************************************************/
#pragma once
#ifndef __C128_PARTNER__
#define __C128_PARTNER__
#include "emu.h"
#include "bus/c64/exp.h"
#include "bus/vcs_ctrl/ctrl.h"
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
// ======================> partner128_t
class partner128_t : public device_t,
public device_c64_expansion_card_interface,
public device_vcs_control_port_interface
{
public:
// construction/destruction
partner128_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
// optional information overrides
virtual ioport_constructor device_input_ports() const;
DECLARE_WRITE_LINE_MEMBER( nmi_w );
protected:
// device-level overrides
virtual void device_start();
virtual void device_reset();
// 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);
virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int sphi2, int ba, int roml, int romh, int io1, int io2);
virtual int c64_game_r(offs_t offset, int sphi2, int ba, int rw);
// device_vcs_control_port_interface overrides
private:
optional_shared_ptr<UINT8> m_ram;
};
// device type definition
extern const device_type C128_PARTNER;
#endif

View File

@ -308,6 +308,7 @@ int c64_expansion_slot_device::exrom_r(offs_t offset, int sphi2, int ba, int rw,
// slot devices
#include "16kb.h"
#include "c128_comal80.h"
#include "c128_partner.h"
#include "comal80.h"
#include "cpm.h"
#include "currah_speech.h"
@ -420,6 +421,7 @@ SLOT_INTERFACE_START( c64_expansion_cards )
SLOT_INTERFACE_INTERNAL("ocean", C64_OCEAN)
SLOT_INTERFACE_INTERNAL("pagefox", C64_PAGEFOX)
SLOT_INTERFACE_INTERNAL("partner", C64_PARTNER)
SLOT_INTERFACE_INTERNAL("partner128", C128_PARTNER)
SLOT_INTERFACE_INTERNAL("prophet64", C64_PROPHET64)
SLOT_INTERFACE_INTERNAL("ps64", C64_PS64)
SLOT_INTERFACE_INTERNAL("rex", C64_REX)