summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/neogeo/boot_misc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/neogeo/boot_misc.cpp')
-rw-r--r--src/devices/bus/neogeo/boot_misc.cpp143
1 files changed, 77 insertions, 66 deletions
diff --git a/src/devices/bus/neogeo/boot_misc.cpp b/src/devices/bus/neogeo/boot_misc.cpp
index 4740d770729..af41ba0adb3 100644
--- a/src/devices/bus/neogeo/boot_misc.cpp
+++ b/src/devices/bus/neogeo/boot_misc.cpp
@@ -13,32 +13,33 @@
//-------------------------------------------------
-// neogeo_bootleg_cart - constructor
+// neogeo_bootleg_cart_device - constructor
//-------------------------------------------------
-const device_type NEOGEO_BOOTLEG_CART = device_creator<neogeo_bootleg_cart>;
+DEFINE_DEVICE_TYPE(NEOGEO_BOOTLEG_CART, neogeo_bootleg_cart_device, "neocart_boot", "Neo Geo Bootleg Protected Cart")
-neogeo_bootleg_cart::neogeo_bootleg_cart(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint16_t clock, const char *shortname, const char *source) :
- neogeo_rom_device(mconfig, type, name, tag, owner, clock, shortname, source),
+neogeo_bootleg_cart_device::neogeo_bootleg_cart_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint16_t clock) :
+ neogeo_rom_device(mconfig, type, tag, owner, clock),
m_prot(*this, "bootleg_prot")
-{}
+{
+}
-neogeo_bootleg_cart::neogeo_bootleg_cart(const machine_config &mconfig, const char *tag, device_t *owner, uint16_t clock) :
- neogeo_rom_device(mconfig, NEOGEO_BOOTLEG_CART, "Neo Geo Bootleg Protected Cart", tag, owner, clock, "neocart_boot", __FILE__),
- m_prot(*this, "bootleg_prot")
-{}
+neogeo_bootleg_cart_device::neogeo_bootleg_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint16_t clock) :
+ neogeo_bootleg_cart_device(mconfig, NEOGEO_BOOTLEG_CART, tag, owner, clock)
+{
+}
//-------------------------------------------------
// mapper specific start/reset
//-------------------------------------------------
-void neogeo_bootleg_cart::device_start()
+void neogeo_bootleg_cart_device::device_start()
{
}
-void neogeo_bootleg_cart::device_reset()
+void neogeo_bootleg_cart_device::device_reset()
{
}
@@ -51,7 +52,7 @@ static MACHINE_CONFIG_FRAGMENT( bootleg_cart )
MCFG_NEOBOOT_PROT_ADD("bootleg_prot")
MACHINE_CONFIG_END
-machine_config_constructor neogeo_bootleg_cart::device_mconfig_additions() const
+machine_config_constructor neogeo_bootleg_cart_device::device_mconfig_additions() const
{
return MACHINE_CONFIG_NAME( bootleg_cart );
}
@@ -62,14 +63,15 @@ machine_config_constructor neogeo_bootleg_cart::device_mconfig_additions() const
garoubl
**************************************************/
-const device_type NEOGEO_GAROUBL_CART = device_creator<neogeo_garoubl_cart>;
+DEFINE_DEVICE_TYPE(NEOGEO_GAROUBL_CART, neogeo_garoubl_cart_device, "neocart_garoubl", "Neo Geo Garou Bootleg Cart")
-neogeo_garoubl_cart::neogeo_garoubl_cart(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
- neogeo_bootleg_cart(mconfig, NEOGEO_GAROUBL_CART, "Neo Geo Garou Bootleg Cart", tag, owner, clock, "neocart_garoubl", __FILE__)
-{}
+neogeo_garoubl_cart_device::neogeo_garoubl_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ neogeo_bootleg_cart_device(mconfig, NEOGEO_GAROUBL_CART, tag, owner, clock)
+{
+}
-void neogeo_garoubl_cart::decrypt_all(DECRYPT_ALL_PARAMS)
+void neogeo_garoubl_cart_device::decrypt_all(DECRYPT_ALL_PARAMS)
{
m_prot->sx_decrypt(fix_region, fix_region_size, 2);
m_prot->cx_decrypt(spr_region, spr_region_size);
@@ -80,14 +82,15 @@ void neogeo_garoubl_cart::decrypt_all(DECRYPT_ALL_PARAMS)
kof97oro
**************************************************/
-const device_type NEOGEO_KOF97ORO_CART = device_creator<neogeo_kof97oro_cart>;
+DEFINE_DEVICE_TYPE(NEOGEO_KOF97ORO_CART, neogeo_kof97oro_cart_device, "neocart_kof97oro", "Neo Geo KoF 97 Orochi Bootleg Cart")
-neogeo_kof97oro_cart::neogeo_kof97oro_cart(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
- neogeo_bootleg_cart(mconfig, NEOGEO_KOF97ORO_CART, "Neo Geo KOF 97 Orochi Bootleg Cart", tag, owner, clock, "neocart_kof97oro", __FILE__)
-{}
+neogeo_kof97oro_cart_device::neogeo_kof97oro_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ neogeo_bootleg_cart_device(mconfig, NEOGEO_KOF97ORO_CART, tag, owner, clock)
+{
+}
-void neogeo_kof97oro_cart::decrypt_all(DECRYPT_ALL_PARAMS)
+void neogeo_kof97oro_cart_device::decrypt_all(DECRYPT_ALL_PARAMS)
{
m_prot->kof97oro_px_decode(cpuregion, cpuregion_size);
m_prot->sx_decrypt(fix_region, fix_region_size,1);
@@ -99,14 +102,15 @@ void neogeo_kof97oro_cart::decrypt_all(DECRYPT_ALL_PARAMS)
kf10thep
**************************************************/
-const device_type NEOGEO_KF10THEP_CART = device_creator<neogeo_kf10thep_cart>;
+DEFINE_DEVICE_TYPE(NEOGEO_KF10THEP_CART, neogeo_kf10thep_cart_device, "neocart_kf10thep", "Neo Geo KoF 10th Ann. EP Bootleg Cart")
-neogeo_kf10thep_cart::neogeo_kf10thep_cart(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
- neogeo_bootleg_cart(mconfig, NEOGEO_KF10THEP_CART, "Neo Geo KOF 10th Ann. EP Bootleg Cart", tag, owner, clock, "neocart_kf10thep", __FILE__)
-{}
+neogeo_kf10thep_cart_device::neogeo_kf10thep_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ neogeo_bootleg_cart_device(mconfig, NEOGEO_KF10THEP_CART, tag, owner, clock)
+{
+}
-void neogeo_kf10thep_cart::decrypt_all(DECRYPT_ALL_PARAMS)
+void neogeo_kf10thep_cart_device::decrypt_all(DECRYPT_ALL_PARAMS)
{
m_prot->kf10thep_px_decrypt(cpuregion, cpuregion_size);
m_prot->sx_decrypt(fix_region, fix_region_size, 1);
@@ -117,14 +121,15 @@ void neogeo_kf10thep_cart::decrypt_all(DECRYPT_ALL_PARAMS)
kf2k5uni
**************************************************/
-const device_type NEOGEO_KF2K5UNI_CART = device_creator<neogeo_kf2k5uni_cart>;
+DEFINE_DEVICE_TYPE(NEOGEO_KF2K5UNI_CART, neogeo_kf2k5uni_cart_device, "neocart_kf2k5uni", "Neo Geo KoF 2005 Unique Bootleg Cart")
-neogeo_kf2k5uni_cart::neogeo_kf2k5uni_cart(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
- neogeo_bootleg_cart(mconfig, NEOGEO_KF2K5UNI_CART, "Neo Geo KOF 2005 Unique Bootleg Cart", tag, owner, clock, "neocart_kf2k5uni", __FILE__)
-{}
+neogeo_kf2k5uni_cart_device::neogeo_kf2k5uni_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ neogeo_bootleg_cart_device(mconfig, NEOGEO_KF2K5UNI_CART, tag, owner, clock)
+{
+}
-void neogeo_kf2k5uni_cart::decrypt_all(DECRYPT_ALL_PARAMS)
+void neogeo_kf2k5uni_cart_device::decrypt_all(DECRYPT_ALL_PARAMS)
{
m_prot->kf2k5uni_px_decrypt(cpuregion, cpuregion_size);
m_prot->kf2k5uni_sx_decrypt(fix_region, fix_region_size);
@@ -136,14 +141,15 @@ void neogeo_kf2k5uni_cart::decrypt_all(DECRYPT_ALL_PARAMS)
kf2k4se
**************************************************/
-const device_type NEOGEO_KF2K4SE_CART = device_creator<neogeo_kf2k4se_cart>;
+DEFINE_DEVICE_TYPE(NEOGEO_KF2K4SE_CART, neogeo_kf2k4se_cart_device, "neocart_kf2k4se", "Neo Geo KoF 2004 SE Bootleg Cart")
-neogeo_kf2k4se_cart::neogeo_kf2k4se_cart(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
- neogeo_bootleg_cart(mconfig, NEOGEO_KF2K4SE_CART, "Neo Geo KOF 2004 SE Bootleg Cart", tag, owner, clock, "neocart_kf2k4se", __FILE__)
-{}
+neogeo_kf2k4se_cart_device::neogeo_kf2k4se_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ neogeo_bootleg_cart_device(mconfig, NEOGEO_KF2K4SE_CART, tag, owner, clock)
+{
+}
-void neogeo_kf2k4se_cart::decrypt_all(DECRYPT_ALL_PARAMS)
+void neogeo_kf2k4se_cart_device::decrypt_all(DECRYPT_ALL_PARAMS)
{
m_prot->decrypt_kof2k4se_68k(cpuregion, cpuregion_size);
}
@@ -153,13 +159,14 @@ void neogeo_kf2k4se_cart::decrypt_all(DECRYPT_ALL_PARAMS)
lans2004
**************************************************/
-const device_type NEOGEO_LANS2004_CART = device_creator<neogeo_lans2004_cart>;
+DEFINE_DEVICE_TYPE(NEOGEO_LANS2004_CART, neogeo_lans2004_cart_device, "neocart_lans2004", "Neo Geo Lansquenet 2004 Bootleg Cart")
-neogeo_lans2004_cart::neogeo_lans2004_cart(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
- neogeo_bootleg_cart(mconfig, NEOGEO_LANS2004_CART, "Neo Geo Lansquenet 2004 Bootleg Cart", tag, owner, clock, "neocart_lans2004", __FILE__)
-{}
+neogeo_lans2004_cart_device::neogeo_lans2004_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ neogeo_bootleg_cart_device(mconfig, NEOGEO_LANS2004_CART, tag, owner, clock)
+{
+}
-void neogeo_lans2004_cart::decrypt_all(DECRYPT_ALL_PARAMS)
+void neogeo_lans2004_cart_device::decrypt_all(DECRYPT_ALL_PARAMS)
{
m_prot->lans2004_decrypt_68k(cpuregion, cpuregion_size);
m_prot->lans2004_vx_decrypt(ym_region, ym_region_size);
@@ -172,13 +179,14 @@ void neogeo_lans2004_cart::decrypt_all(DECRYPT_ALL_PARAMS)
samsho5b
**************************************************/
-const device_type NEOGEO_SAMSHO5B_CART = device_creator<neogeo_samsho5b_cart>;
+DEFINE_DEVICE_TYPE(NEOGEO_SAMSHO5B_CART, neogeo_samsho5b_cart_device, "neocart_samsho5b", "Neo Geo Samurai Shodown 5 Bootleg Cart")
-neogeo_samsho5b_cart::neogeo_samsho5b_cart(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
- neogeo_bootleg_cart(mconfig, NEOGEO_SAMSHO5B_CART, "Neo Geo Samurai Shodown 5 Bootleg Cart", tag, owner, clock, "neocart_samsho5b", __FILE__)
-{}
+neogeo_samsho5b_cart_device::neogeo_samsho5b_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ neogeo_bootleg_cart_device(mconfig, NEOGEO_SAMSHO5B_CART, tag, owner, clock)
+{
+}
-void neogeo_samsho5b_cart::decrypt_all(DECRYPT_ALL_PARAMS)
+void neogeo_samsho5b_cart_device::decrypt_all(DECRYPT_ALL_PARAMS)
{
m_prot->samsho5b_px_decrypt(cpuregion, cpuregion_size);
m_prot->samsho5b_vx_decrypt(ym_region, ym_region_size);
@@ -191,14 +199,15 @@ void neogeo_samsho5b_cart::decrypt_all(DECRYPT_ALL_PARAMS)
mslug3b6
**************************************************/
-const device_type NEOGEO_MSLUG3B6_CART = device_creator<neogeo_mslug3b6_cart>;
+DEFINE_DEVICE_TYPE(NEOGEO_MSLUG3B6_CART, neogeo_mslug3b6_cart_device, "neocart_mslug3b6", "Neo Geo Metal Slug 6 Bootleg Cart")
-neogeo_mslug3b6_cart::neogeo_mslug3b6_cart(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
- neogeo_bootleg_cart(mconfig, NEOGEO_MSLUG3B6_CART, "Neo Geo Metal Slug 6 Bootleg Cart", tag, owner, clock, "neocart_mslug3b6", __FILE__),
+neogeo_mslug3b6_cart_device::neogeo_mslug3b6_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ neogeo_bootleg_cart_device(mconfig, NEOGEO_MSLUG3B6_CART, tag, owner, clock),
m_cmc_prot(*this, "cmc_prot")
-{}
+{
+}
-void neogeo_mslug3b6_cart::decrypt_all(DECRYPT_ALL_PARAMS)
+void neogeo_mslug3b6_cart_device::decrypt_all(DECRYPT_ALL_PARAMS)
{
m_prot->sx_decrypt(fix_region, fix_region_size, 2);
m_cmc_prot->cmc42_gfx_decrypt(spr_region, spr_region_size, MSLUG3_GFX_KEY);
@@ -209,7 +218,7 @@ static MACHINE_CONFIG_FRAGMENT( mslug3b6_cart )
MCFG_NEOBOOT_PROT_ADD("bootleg_prot")
MACHINE_CONFIG_END
-machine_config_constructor neogeo_mslug3b6_cart::device_mconfig_additions() const
+machine_config_constructor neogeo_mslug3b6_cart_device::device_mconfig_additions() const
{
return MACHINE_CONFIG_NAME( mslug3b6_cart );
}
@@ -219,15 +228,16 @@ machine_config_constructor neogeo_mslug3b6_cart::device_mconfig_additions() cons
ms5plus
**************************************************/
-const device_type NEOGEO_MS5PLUS_CART = device_creator<neogeo_ms5plus_cart>;
+DEFINE_DEVICE_TYPE(NEOGEO_MS5PLUS_CART, neogeo_ms5plus_cart_device, "neocart_ms5plus", "Neo Geo Metal Slug 5 Plus Bootleg Cart")
-neogeo_ms5plus_cart::neogeo_ms5plus_cart(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
- neogeo_bootleg_cart(mconfig, NEOGEO_MS5PLUS_CART, "Neo Geo Metal Slug 5 Plus Bootleg Cart", tag, owner, clock, "neocart_ms5plus", __FILE__),
+neogeo_ms5plus_cart_device::neogeo_ms5plus_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ neogeo_bootleg_cart_device(mconfig, NEOGEO_MS5PLUS_CART, tag, owner, clock),
m_cmc_prot(*this, "cmc_prot"),
m_pcm2_prot(*this, "pcm2_prot")
-{}
+{
+}
-void neogeo_ms5plus_cart::decrypt_all(DECRYPT_ALL_PARAMS)
+void neogeo_ms5plus_cart_device::decrypt_all(DECRYPT_ALL_PARAMS)
{
m_cmc_prot->cmc50_m1_decrypt(audiocrypt_region, audiocrypt_region_size, audiocpu_region,audio_region_size);
m_cmc_prot->cmc50_gfx_decrypt(spr_region, spr_region_size, MSLUG5_GFX_KEY);
@@ -241,7 +251,7 @@ static MACHINE_CONFIG_FRAGMENT( ms5plus_cart )
MCFG_PCM2_PROT_ADD("pcm2_prot")
MACHINE_CONFIG_END
-machine_config_constructor neogeo_ms5plus_cart::device_mconfig_additions() const
+machine_config_constructor neogeo_ms5plus_cart_device::device_mconfig_additions() const
{
return MACHINE_CONFIG_NAME( ms5plus_cart );
}
@@ -251,12 +261,13 @@ machine_config_constructor neogeo_ms5plus_cart::device_mconfig_additions() const
kog
**************************************************/
-const device_type NEOGEO_KOG_CART = device_creator<neogeo_kog_cart>;
+DEFINE_DEVICE_TYPE(NEOGEO_KOG_CART, neogeo_kog_cart_device, "neocart_kog", "Neo Geo King of Gladiators Bootleg Cart")
-neogeo_kog_cart::neogeo_kog_cart(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
- neogeo_bootleg_cart(mconfig, NEOGEO_KOG_CART, "Neo Geo King of Gladiators Bootleg Cart", tag, owner, clock, "neocart_kog", __FILE__),
+neogeo_kog_cart_device::neogeo_kog_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
+ neogeo_bootleg_cart_device(mconfig, NEOGEO_KOG_CART, tag, owner, clock),
m_jumper(*this, "JUMPER")
-{}
+{
+}
static INPUT_PORTS_START( kog )
@@ -269,18 +280,18 @@ static INPUT_PORTS_START( kog )
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
-ioport_constructor neogeo_kog_cart::device_input_ports() const
+ioport_constructor neogeo_kog_cart_device::device_input_ports() const
{
return INPUT_PORTS_NAME( kog );
}
-READ16_MEMBER(neogeo_kog_cart::protection_r)
+READ16_MEMBER(neogeo_kog_cart_device::protection_r)
{
return m_jumper->read();
}
-void neogeo_kog_cart::decrypt_all(DECRYPT_ALL_PARAMS)
+void neogeo_kog_cart_device::decrypt_all(DECRYPT_ALL_PARAMS)
{
m_prot->kog_px_decrypt(cpuregion, cpuregion_size);
m_prot->sx_decrypt(fix_region, fix_region_size, 1);