1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
|
// license:BSD-3-Clause
// copyright-holders:S. Smith,David Haywood
/***********************************************************************************************************
NEOGEO ROM cart emulation
***********************************************************************************************************/
#include "emu.h"
#include "kof2002_cart.h"
//-------------------------------------------------
// neogeo_kof2002_cart - constructor
//-------------------------------------------------
const device_type NEOGEO_KOF2002_CART = &device_creator<neogeo_kof2002_cart>;
neogeo_kof2002_cart::neogeo_kof2002_cart(const machine_config &mconfig, device_type type, const char *name, std::string tag, device_t *owner, UINT16 clock, const char *shortname, const char *source)
: device_t(mconfig, type, name, tag, owner, clock, shortname, source),
device_neogeo_cart_interface(mconfig, *this),
m_banked_cart(*this, "banked_cart"),
m_cmc_prot(*this, "cmc_prot"),
m_pcm2_prot(*this, "pcm2_prot"),
m_kof2002_prot(*this, "kof2002_prot")
{
}
neogeo_kof2002_cart::neogeo_kof2002_cart(const machine_config &mconfig, std::string tag, device_t *owner, UINT16 clock)
: device_t(mconfig, NEOGEO_KOF2002_CART, "NEOGEO KOF2002 Cart", tag, owner, clock, "neogeo_rom", __FILE__),
device_neogeo_cart_interface(mconfig, *this),
m_banked_cart(*this, "banked_cart"),
m_cmc_prot(*this, "cmc_prot"),
m_pcm2_prot(*this, "pcm2_prot"),
m_kof2002_prot(*this, "kof2002_prot")
{
}
//-------------------------------------------------
// mapper specific start/reset
//-------------------------------------------------
void neogeo_kof2002_cart::device_start()
{
}
void neogeo_kof2002_cart::device_reset()
{
}
/*-------------------------------------------------
mapper specific handlers
-------------------------------------------------*/
READ16_MEMBER(neogeo_kof2002_cart::read_rom)
{
return m_rom[offset];
}
static MACHINE_CONFIG_FRAGMENT( kof2002_cart )
MCFG_NEOGEO_BANKED_CART_ADD("banked_cart")
MCFG_CMC_PROT_ADD("cmc_prot")
MCFG_PCM2_PROT_ADD("pcm2_prot")
MCFG_KOF2002_PROT_ADD("kof2002_prot")
MACHINE_CONFIG_END
machine_config_constructor neogeo_kof2002_cart::device_mconfig_additions() const
{
return MACHINE_CONFIG_NAME( kof2002_cart );
}
/* Individual cartridge types (mirror DRIVER_INIT functionality) */
/*************************************************
KOF2002
**************************************************/
const device_type NEOGEO_KOF2002_KOF2002_CART = &device_creator<neogeo_kof2002_kof2002_cart>;
neogeo_kof2002_kof2002_cart::neogeo_kof2002_kof2002_cart(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) : neogeo_kof2002_cart(mconfig, NEOGEO_KOF2002_KOF2002_CART, "NEOGEO Kof2002-type kof2002 Cart", tag, owner, clock, "k2k_k2k_cart", __FILE__) {}
void neogeo_kof2002_kof2002_cart::decrypt_all(DECRYPT_ALL_PARAMS)
{
m_kof2002_prot->kof2002_decrypt_68k(cpuregion, cpuregion_size);
m_cmc_prot->neogeo_cmc50_m1_decrypt(audiocrypt_region, audiocrypt_region_size, audiocpu_region, audio_region_size);
m_cmc_prot->kof2000_neogeo_gfx_decrypt(spr_region, spr_region_size, fix_region, fix_region_size, KOF2002_GFX_KEY);
m_pcm2_prot->neo_pcm2_swap(ym_region, ym_region_size, 0);
}
const device_type NEOGEO_KOF2002_KF2K2PLS_CART = &device_creator<neogeo_kof2002_kf2k2pls_cart>;
neogeo_kof2002_kf2k2pls_cart::neogeo_kof2002_kf2k2pls_cart(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) : neogeo_kof2002_cart(mconfig, NEOGEO_KOF2002_KF2K2PLS_CART, "NEOGEO Kof2002-type kof2002plus Cart", tag, owner, clock, "k2k_k2kpls_cart", __FILE__) {}
void neogeo_kof2002_kf2k2pls_cart::decrypt_all(DECRYPT_ALL_PARAMS)
{
m_kof2002_prot->kof2002_decrypt_68k(cpuregion, cpuregion_size);
m_cmc_prot->cmc50_neogeo_gfx_decrypt(spr_region, spr_region_size, fix_region, fix_region_size, KOF2002_GFX_KEY);
m_cmc_prot->neogeo_cmc50_m1_decrypt(audiocrypt_region, audiocrypt_region_size, audiocpu_region,audio_region_size);
m_pcm2_prot->neo_pcm2_swap(ym_region, ym_region_size, 0);
}
/*************************************************
MATRIM
**************************************************/
const device_type NEOGEO_KOF2002_MATRIM_CART = &device_creator<neogeo_kof2002_matrim_cart>;
neogeo_kof2002_matrim_cart::neogeo_kof2002_matrim_cart(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) : neogeo_kof2002_cart(mconfig, NEOGEO_KOF2002_MATRIM_CART, "NEOGEO Kof2002-type matrim Cart", tag, owner, clock, "k2k_matrim_cart", __FILE__) {}
void neogeo_kof2002_matrim_cart::decrypt_all(DECRYPT_ALL_PARAMS)
{
m_kof2002_prot->matrim_decrypt_68k(cpuregion, cpuregion_size);
m_cmc_prot->neogeo_cmc50_m1_decrypt(audiocrypt_region, audiocrypt_region_size, audiocpu_region, audio_region_size);
m_cmc_prot->kof2000_neogeo_gfx_decrypt(spr_region, spr_region_size, fix_region, fix_region_size, MATRIM_GFX_KEY);
m_pcm2_prot->neo_pcm2_swap(ym_region, ym_region_size, 1);
}
/*************************************************
SAMSHO5
**************************************************/
const device_type NEOGEO_KOF2002_SAMSHO5_CART = &device_creator<neogeo_kof2002_samsho5_cart>;
neogeo_kof2002_samsho5_cart::neogeo_kof2002_samsho5_cart(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) : neogeo_kof2002_cart(mconfig, NEOGEO_KOF2002_SAMSHO5_CART, "NEOGEO Kof2002-type Samsho5 Cart", tag, owner, clock, "k2k_ss5_cart", __FILE__) {}
void neogeo_kof2002_samsho5_cart::decrypt_all(DECRYPT_ALL_PARAMS)
{
m_kof2002_prot->samsho5_decrypt_68k(cpuregion, cpuregion_size);
m_cmc_prot->neogeo_cmc50_m1_decrypt(audiocrypt_region, audiocrypt_region_size, audiocpu_region, audio_region_size);
m_cmc_prot->kof2000_neogeo_gfx_decrypt(spr_region, spr_region_size, fix_region, fix_region_size, SAMSHO5_GFX_KEY);
m_pcm2_prot->neo_pcm2_swap(ym_region, ym_region_size, 4);
}
/*************************************************
SAMSHO5SP
**************************************************/
const device_type NEOGEO_KOF2002_SAMSHO5SP_CART = &device_creator<neogeo_kof2002_samsho5sp_cart>;
neogeo_kof2002_samsho5sp_cart::neogeo_kof2002_samsho5sp_cart(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock) : neogeo_kof2002_cart(mconfig, NEOGEO_KOF2002_SAMSHO5SP_CART, "NEOGEO Kof2002-type Samsho5sp Cart", tag, owner, clock, "k2k_ss5s_cart", __FILE__) {}
void neogeo_kof2002_samsho5sp_cart::decrypt_all(DECRYPT_ALL_PARAMS)
{
m_kof2002_prot->samsh5sp_decrypt_68k(cpuregion, cpuregion_size);
m_cmc_prot->neogeo_cmc50_m1_decrypt(audiocrypt_region, audiocrypt_region_size, audiocpu_region, audio_region_size);
m_cmc_prot->kof2000_neogeo_gfx_decrypt(spr_region, spr_region_size, fix_region, fix_region_size, SAMSHO5SP_GFX_KEY);
m_pcm2_prot->neo_pcm2_swap(ym_region, ym_region_size, 6);
}
|