diff --git a/.gitattributes b/.gitattributes index cf1fe368834..1525bf90fe3 100644 --- a/.gitattributes +++ b/.gitattributes @@ -7296,6 +7296,8 @@ src/mess/machine/c64/ocean.c svneol=native#text/plain src/mess/machine/c64/ocean.h svneol=native#text/plain src/mess/machine/c64/pagefox.c svneol=native#text/plain src/mess/machine/c64/pagefox.h svneol=native#text/plain +src/mess/machine/c64/partner.c svneol=native#text/plain +src/mess/machine/c64/partner.h svneol=native#text/plain src/mess/machine/c64/prophet64.c svneol=native#text/plain src/mess/machine/c64/prophet64.h svneol=native#text/plain src/mess/machine/c64/ps64.c svneol=native#text/plain diff --git a/hash/c64_cart.xml b/hash/c64_cart.xml index ea8171018f4..d5319ac9e17 100644 --- a/hash/c64_cart.xml +++ b/hash/c64_cart.xml @@ -6914,6 +6914,25 @@ + + diff --git a/src/mess/machine/c64/exp.c b/src/mess/machine/c64/exp.c index 3a22094deb6..1082e5748ab 100644 --- a/src/mess/machine/c64/exp.c +++ b/src/mess/machine/c64/exp.c @@ -433,6 +433,7 @@ SLOT_INTERFACE_START( c64_expansion_cards ) SLOT_INTERFACE_INTERNAL("multiscreen", C64_MULTISCREEN) SLOT_INTERFACE_INTERNAL("ocean", C64_OCEAN) SLOT_INTERFACE_INTERNAL("pagefox", C64_PAGEFOX) + SLOT_INTERFACE_INTERNAL("partner", C64_PARTNER) SLOT_INTERFACE_INTERNAL("prophet64", C64_PROPHET64) SLOT_INTERFACE_INTERNAL("ps64", C64_PS64) SLOT_INTERFACE_INTERNAL("rex", C64_REX) diff --git a/src/mess/machine/c64/exp.h b/src/mess/machine/c64/exp.h index 6543605a003..77ef9a617a5 100644 --- a/src/mess/machine/c64/exp.h +++ b/src/mess/machine/c64/exp.h @@ -238,6 +238,7 @@ extern const device_type C64_EXPANSION_SLOT; #include "machine/c64/neoram.h" #include "machine/c64/ocean.h" #include "machine/c64/pagefox.h" +#include "machine/c64/partner.h" #include "machine/c64/prophet64.h" #include "machine/c64/ps64.h" #include "machine/c64/reu.h" diff --git a/src/mess/machine/c64/partner.c b/src/mess/machine/c64/partner.c new file mode 100644 index 00000000000..8982144c83e --- /dev/null +++ b/src/mess/machine/c64/partner.c @@ -0,0 +1,134 @@ +/********************************************************************** + + Timeworks PARTNER 64 cartridge emulation + + Copyright MESS Team. + Visit http://mamedev.org for licensing and usage restrictions. + +**********************************************************************/ + +/* + + PCB Layout + ---------- + + |===========================| + |=| | + |=|LS05 LS09 LS00 HC74 | + |=| | + |=| | + |=| ROM RAM | + |=| LS133 | + |=| LS156 | + |=| | + |===========================| + + ROM - General Instrument 27C128-25 16Kx8 EPROM "TIMEWORKS C-64 VER 2-16-87" + RAM - Sony CXK5864PN-15L 8Kx8 SRAM + +*/ + +#include "partner.h" + + + +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +const device_type C64_PARTNER = &device_creator; + + +//------------------------------------------------- +// INPUT_PORTS( c64_partner ) +//------------------------------------------------- + +static INPUT_PORTS_START( c64_partner ) + PORT_START("RESET") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Reset") PORT_CODE(KEYCODE_F11) PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF_OWNER, c64_expansion_slot_device, reset_w) +INPUT_PORTS_END + + +//------------------------------------------------- +// input_ports - device-specific input ports +//------------------------------------------------- + +ioport_constructor c64_partner_cartridge_device::device_input_ports() const +{ + return INPUT_PORTS_NAME( c64_partner ); +} + + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// c64_partner_cartridge_device - constructor +//------------------------------------------------- + +c64_partner_cartridge_device::c64_partner_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : + device_t(mconfig, C64_PARTNER, "C64 PARTNER 64 cartridge", tag, owner, clock, "c64_partner", __FILE__), + device_c64_expansion_card_interface(mconfig, *this) +{ +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void c64_partner_cartridge_device::device_start() +{ + // allocate memory + c64_ram_pointer(machine(), 0x2000); +} + + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void c64_partner_cartridge_device::device_reset() +{ +} + + +//------------------------------------------------- +// c64_cd_r - cartridge data read +//------------------------------------------------- + +UINT8 c64_partner_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) +{ + return data; +} + + +//------------------------------------------------- +// c64_cd_w - cartridge data write +//------------------------------------------------- + +void c64_partner_cartridge_device::c64_cd_w(address_space &space, offs_t offset, UINT8 data, int sphi2, int ba, int roml, int romh, int io1, int io2) +{ +} + + +//------------------------------------------------- +// c64_exrom_r - EXROM read +//------------------------------------------------- + +int c64_partner_cartridge_device::c64_exrom_r(offs_t offset, int sphi2, int ba, int rw) +{ + return m_exrom; +} + + +//------------------------------------------------- +// c64_game_r - GAME read +//------------------------------------------------- + +int c64_partner_cartridge_device::c64_game_r(offs_t offset, int sphi2, int ba, int rw) +{ + return m_game; +} diff --git a/src/mess/machine/c64/partner.h b/src/mess/machine/c64/partner.h new file mode 100644 index 00000000000..fb9b0c587b0 --- /dev/null +++ b/src/mess/machine/c64/partner.h @@ -0,0 +1,53 @@ +/********************************************************************** + + Timeworks PARTNER 64 cartridge emulation + + Copyright MESS Team. + Visit http://mamedev.org for licensing and usage restrictions. + +**********************************************************************/ + +#pragma once + +#ifndef __PARTNER__ +#define __PARTNER__ + +#include "emu.h" +#include "machine/c64/exp.h" + + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// ======================> c64_partner_cartridge_device + +class c64_partner_cartridge_device : public device_t, + public device_c64_expansion_card_interface +{ +public: + // construction/destruction + c64_partner_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // optional information overrides + virtual ioport_constructor device_input_ports() const; + +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_exrom_r(offs_t offset, int sphi2, int ba, int rw); + virtual int c64_game_r(offs_t offset, int sphi2, int ba, int rw); +}; + + +// device type definition +extern const device_type C64_PARTNER; + + +#endif diff --git a/src/mess/mess.mak b/src/mess/mess.mak index f919c06e955..7d9daa937d9 100644 --- a/src/mess/mess.mak +++ b/src/mess/mess.mak @@ -1128,6 +1128,7 @@ $(MESSOBJ)/cbm.a: \ $(MESS_MACHINE)/c64/neoram.o\ $(MESS_MACHINE)/c64/ocean.o \ $(MESS_MACHINE)/c64/pagefox.o \ + $(MESS_MACHINE)/c64/partner.o \ $(MESS_MACHINE)/c64/prophet64.o \ $(MESS_MACHINE)/c64/ps64.o \ $(MESS_MACHINE)/c64/reu.o \