mirror of
https://github.com/holub/mame
synced 2025-10-09 01:39:48 +03:00
(MESS) c64: Cartridge WIP. (nw)
This commit is contained in:
parent
670a36cbcd
commit
c0b9575621
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -6820,6 +6820,8 @@ src/mess/machine/c64_epyx_fast_load.c svneol=native#text/plain
|
|||||||
src/mess/machine/c64_epyx_fast_load.h svneol=native#text/plain
|
src/mess/machine/c64_epyx_fast_load.h svneol=native#text/plain
|
||||||
src/mess/machine/c64_exos.c svneol=native#text/plain
|
src/mess/machine/c64_exos.c svneol=native#text/plain
|
||||||
src/mess/machine/c64_exos.h svneol=native#text/plain
|
src/mess/machine/c64_exos.h svneol=native#text/plain
|
||||||
|
src/mess/machine/c64_fcc.c svneol=native#text/plain
|
||||||
|
src/mess/machine/c64_fcc.h svneol=native#text/plain
|
||||||
src/mess/machine/c64_final.c svneol=native#text/plain
|
src/mess/machine/c64_final.c svneol=native#text/plain
|
||||||
src/mess/machine/c64_final.h svneol=native#text/plain
|
src/mess/machine/c64_final.h svneol=native#text/plain
|
||||||
src/mess/machine/c64_final3.c svneol=native#text/plain
|
src/mess/machine/c64_final3.c svneol=native#text/plain
|
||||||
|
@ -6419,12 +6419,11 @@
|
|||||||
|
|
||||||
<part name="cart" interface="c64_cart">
|
<part name="cart" interface="c64_cart">
|
||||||
<feature name="slot" value="fcc" />
|
<feature name="slot" value="fcc" />
|
||||||
<feature name="exrom" value="1" />
|
<feature name="exrom" value="0" />
|
||||||
<feature name="game" value="1" />
|
<feature name="game" value="1" />
|
||||||
|
|
||||||
<dataarea name="roml" size="0x10000">
|
<dataarea name="roml" size="0x8000">
|
||||||
<rom name="fcc_rom1" size="0x8000" crc="2949836a" sha1="9e6283095df9e3f4802ed0c654101f8e37168bf6" offset="0x0000" />
|
<rom name="fcc_rom2" size="0x8000" crc="8fc0f156" sha1="c843729870e7ce59bb64b60ebec028f7200f93d1" offset="0x0000" />
|
||||||
<rom name="fcc_rom2" size="0x8000" crc="8fc0f156" sha1="c843729870e7ce59bb64b60ebec028f7200f93d1" offset="0x8000" />
|
|
||||||
</dataarea>
|
</dataarea>
|
||||||
</part>
|
</part>
|
||||||
</software>
|
</software>
|
||||||
|
171
src/mess/machine/c64_fcc.c
Normal file
171
src/mess/machine/c64_fcc.c
Normal file
@ -0,0 +1,171 @@
|
|||||||
|
/**********************************************************************
|
||||||
|
|
||||||
|
Tasc Final ChessCard cartridge emulation
|
||||||
|
|
||||||
|
Copyright MESS Team.
|
||||||
|
Visit http://mamedev.org for licensing and usage restrictions.
|
||||||
|
|
||||||
|
**********************************************************************/
|
||||||
|
|
||||||
|
#include "c64_fcc.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//**************************************************************************
|
||||||
|
// MACROS/CONSTANTS
|
||||||
|
//**************************************************************************
|
||||||
|
|
||||||
|
#define G65SC02P4_TAG "g65sc02p4"
|
||||||
|
|
||||||
|
|
||||||
|
//**************************************************************************
|
||||||
|
// DEVICE DEFINITIONS
|
||||||
|
//**************************************************************************
|
||||||
|
|
||||||
|
const device_type C64_FCC = &device_creator<c64_final_chesscard_device>;
|
||||||
|
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// ROM( c64_fcc )
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
ROM_START( c64_fcc )
|
||||||
|
ROM_REGION( 0x8000, G65SC02P4_TAG, 0 )
|
||||||
|
ROM_LOAD( "fcc_rom1", 0x0000, 0x8000, CRC(2949836a) SHA1(9e6283095df9e3f4802ed0c654101f8e37168bf6) )
|
||||||
|
ROM_END
|
||||||
|
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// rom_region - device-specific ROM region
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
const rom_entry *c64_final_chesscard_device::device_rom_region() const
|
||||||
|
{
|
||||||
|
return ROM_NAME( c64_fcc );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// ADDRESS_MAP( c64_fcc_map )
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
static ADDRESS_MAP_START( c64_fcc_map, AS_PROGRAM, 8, c64_final_chesscard_device )
|
||||||
|
AM_RANGE(0x0000, 0x7fff) AM_RAM
|
||||||
|
AM_RANGE(0x8000, 0xffff) AM_ROM AM_REGION(G65SC02P4_TAG, 0)
|
||||||
|
ADDRESS_MAP_END
|
||||||
|
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// MACHINE_CONFIG_FRAGMENT( c64_fcc )
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
static MACHINE_CONFIG_FRAGMENT( c64_fcc )
|
||||||
|
MCFG_CPU_ADD(G65SC02P4_TAG, M65SC02, 5000000)
|
||||||
|
MCFG_CPU_PROGRAM_MAP(c64_fcc_map)
|
||||||
|
MACHINE_CONFIG_END
|
||||||
|
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// machine_config_additions - device-specific
|
||||||
|
// machine configurations
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
machine_config_constructor c64_final_chesscard_device::device_mconfig_additions() const
|
||||||
|
{
|
||||||
|
return MACHINE_CONFIG_NAME( c64_fcc );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// INPUT_PORTS( c64_fcc )
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
INPUT_CHANGED_MEMBER( c64_final_chesscard_device::reset )
|
||||||
|
{
|
||||||
|
if (!newval)
|
||||||
|
{
|
||||||
|
device_reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
m_slot->reset_w(newval ? CLEAR_LINE : ASSERT_LINE);
|
||||||
|
}
|
||||||
|
|
||||||
|
static INPUT_PORTS_START( c64_fcc )
|
||||||
|
PORT_START("RESET")
|
||||||
|
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Reset") PORT_CODE(KEYCODE_F11) PORT_CHANGED_MEMBER(DEVICE_SELF, c64_final_chesscard_device, reset, 0)
|
||||||
|
INPUT_PORTS_END
|
||||||
|
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// input_ports - device-specific input ports
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
ioport_constructor c64_final_chesscard_device::device_input_ports() const
|
||||||
|
{
|
||||||
|
return INPUT_PORTS_NAME( c64_fcc );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//**************************************************************************
|
||||||
|
// LIVE DEVICE
|
||||||
|
//**************************************************************************
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// c64_final_chesscard_device - constructor
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
c64_final_chesscard_device::c64_final_chesscard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||||
|
device_t(mconfig, C64_FCC, "Final ChessCard", tag, owner, clock),
|
||||||
|
device_c64_expansion_card_interface(mconfig, *this),
|
||||||
|
m_maincpu(*this, G65SC02P4_TAG)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// device_start - device-specific startup
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
void c64_final_chesscard_device::device_start()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// device_reset - device-specific reset
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
void c64_final_chesscard_device::device_reset()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// c64_cd_r - cartridge data read
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
UINT8 c64_final_chesscard_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 = m_roml[(m_bank << 13) | (offset & 0x1fff)];
|
||||||
|
}
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// c64_cd_w - cartridge data write
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
void c64_final_chesscard_device::c64_cd_w(address_space &space, offs_t offset, UINT8 data, int sphi2, int ba, int roml, int romh, int io1, int io2)
|
||||||
|
{
|
||||||
|
if (!io1)
|
||||||
|
{
|
||||||
|
printf("IO1 %04x %02x\n", offset, data);
|
||||||
|
m_bank = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!io2) printf("IO1 %04x %02x\n", offset, data);
|
||||||
|
}
|
63
src/mess/machine/c64_fcc.h
Normal file
63
src/mess/machine/c64_fcc.h
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
/**********************************************************************
|
||||||
|
|
||||||
|
Tasc Final ChessCard cartridge emulation
|
||||||
|
|
||||||
|
Copyright MESS Team.
|
||||||
|
Visit http://mamedev.org for licensing and usage restrictions.
|
||||||
|
|
||||||
|
**********************************************************************/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef __FCC__
|
||||||
|
#define __FCC__
|
||||||
|
|
||||||
|
#include "emu.h"
|
||||||
|
#include "machine/c64exp.h"
|
||||||
|
#include "cpu/m6502/m65sc02.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//**************************************************************************
|
||||||
|
// TYPE DEFINITIONS
|
||||||
|
//**************************************************************************
|
||||||
|
|
||||||
|
// ======================> c64_final_chesscard_device
|
||||||
|
|
||||||
|
class c64_final_chesscard_device : public device_t,
|
||||||
|
public device_c64_expansion_card_interface
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
// construction/destruction
|
||||||
|
c64_final_chesscard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||||
|
|
||||||
|
// optional information overrides
|
||||||
|
virtual const rom_entry *device_rom_region() const;
|
||||||
|
virtual machine_config_constructor device_mconfig_additions() const;
|
||||||
|
virtual ioport_constructor device_input_ports() const;
|
||||||
|
|
||||||
|
DECLARE_INPUT_CHANGED_MEMBER( reset );
|
||||||
|
|
||||||
|
protected:
|
||||||
|
// device-level overrides
|
||||||
|
virtual void device_config_complete() { m_shortname = "c64_fcc"; }
|
||||||
|
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);
|
||||||
|
|
||||||
|
private:
|
||||||
|
required_device<m65sc02_device> m_maincpu;
|
||||||
|
|
||||||
|
UINT8 m_bank;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// device type definition
|
||||||
|
extern const device_type C64_FCC;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
@ -1129,6 +1129,7 @@ SLOT_INTERFACE_START( c64_expansion_cards )
|
|||||||
SLOT_INTERFACE_INTERNAL("easycalcres", C64_EASY_CALC_RESULT)
|
SLOT_INTERFACE_INTERNAL("easycalcres", C64_EASY_CALC_RESULT)
|
||||||
SLOT_INTERFACE_INTERNAL("epyxfastload", C64_EPYX_FAST_LOAD)
|
SLOT_INTERFACE_INTERNAL("epyxfastload", C64_EPYX_FAST_LOAD)
|
||||||
SLOT_INTERFACE_INTERNAL("exos", C64_EXOS)
|
SLOT_INTERFACE_INTERNAL("exos", C64_EXOS)
|
||||||
|
SLOT_INTERFACE_INTERNAL("fcc", C64_FCC)
|
||||||
SLOT_INTERFACE_INTERNAL("final", C64_FINAL)
|
SLOT_INTERFACE_INTERNAL("final", C64_FINAL)
|
||||||
SLOT_INTERFACE_INTERNAL("final3", C64_FINAL3)
|
SLOT_INTERFACE_INTERNAL("final3", C64_FINAL3)
|
||||||
SLOT_INTERFACE_INTERNAL("fun_play", C64_FUN_PLAY)
|
SLOT_INTERFACE_INTERNAL("fun_play", C64_FUN_PLAY)
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include "machine/c64_easyflash.h"
|
#include "machine/c64_easyflash.h"
|
||||||
#include "machine/c64_epyx_fast_load.h"
|
#include "machine/c64_epyx_fast_load.h"
|
||||||
#include "machine/c64_exos.h"
|
#include "machine/c64_exos.h"
|
||||||
|
#include "machine/c64_fcc.h"
|
||||||
#include "machine/c64_final.h"
|
#include "machine/c64_final.h"
|
||||||
#include "machine/c64_final3.h"
|
#include "machine/c64_final3.h"
|
||||||
#include "machine/c64_fun_play.h"
|
#include "machine/c64_fun_play.h"
|
||||||
|
@ -847,6 +847,7 @@ $(MESSOBJ)/cbm.a: \
|
|||||||
$(MESS_MACHINE)/c64_easyflash.o \
|
$(MESS_MACHINE)/c64_easyflash.o \
|
||||||
$(MESS_MACHINE)/c64_epyx_fast_load.o \
|
$(MESS_MACHINE)/c64_epyx_fast_load.o \
|
||||||
$(MESS_MACHINE)/c64_exos.o \
|
$(MESS_MACHINE)/c64_exos.o \
|
||||||
|
$(MESS_MACHINE)/c64_fcc.o \
|
||||||
$(MESS_MACHINE)/c64_final.o \
|
$(MESS_MACHINE)/c64_final.o \
|
||||||
$(MESS_MACHINE)/c64_final3.o \
|
$(MESS_MACHINE)/c64_final3.o \
|
||||||
$(MESS_MACHINE)/c64_fun_play.o \
|
$(MESS_MACHINE)/c64_fun_play.o \
|
||||||
|
Loading…
Reference in New Issue
Block a user