diff options
Diffstat (limited to 'src/devices/bus/neogeo/boot_cthd.cpp')
-rw-r--r-- | src/devices/bus/neogeo/boot_cthd.cpp | 62 |
1 files changed, 33 insertions, 29 deletions
diff --git a/src/devices/bus/neogeo/boot_cthd.cpp b/src/devices/bus/neogeo/boot_cthd.cpp index 79189841fdf..360bc937433 100644 --- a/src/devices/bus/neogeo/boot_cthd.cpp +++ b/src/devices/bus/neogeo/boot_cthd.cpp @@ -13,32 +13,33 @@ //------------------------------------------------- -// neogeo_cthd2k3_cart - constructor +// neogeo_cthd2k3_cart_device - constructor //------------------------------------------------- -const device_type NEOGEO_CTHD2K3_CART = device_creator<neogeo_cthd2k3_cart>; +DEFINE_DEVICE_TYPE(NEOGEO_CTHD2K3_CART, neogeo_cthd2k3_cart_device, "neocart_ct2k3", "Neo Geo CTHD 2003 Cart") -neogeo_cthd2k3_cart::neogeo_cthd2k3_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_cthd2k3_cart_device::neogeo_cthd2k3_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, "cthd_prot") -{} +{ +} -neogeo_cthd2k3_cart::neogeo_cthd2k3_cart(const machine_config &mconfig, const char *tag, device_t *owner, uint16_t clock) : - neogeo_rom_device(mconfig, NEOGEO_CTHD2K3_CART, "Neo Geo CTHD 2003 Cart", tag, owner, clock, "neocart_ct2k3", __FILE__), - m_prot(*this, "cthd_prot") -{} +neogeo_cthd2k3_cart_device::neogeo_cthd2k3_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint16_t clock) : + neogeo_cthd2k3_cart_device(mconfig, NEOGEO_CTHD2K3_CART, tag, owner, clock) +{ +} //------------------------------------------------- // mapper specific start/reset //------------------------------------------------- -void neogeo_cthd2k3_cart::device_start() +void neogeo_cthd2k3_cart_device::device_start() { } -void neogeo_cthd2k3_cart::device_reset() +void neogeo_cthd2k3_cart_device::device_reset() { } @@ -51,7 +52,7 @@ static MACHINE_CONFIG_FRAGMENT( cthd_cart ) MCFG_CTHD_PROT_ADD("cthd_prot") MACHINE_CONFIG_END -machine_config_constructor neogeo_cthd2k3_cart::device_mconfig_additions() const +machine_config_constructor neogeo_cthd2k3_cart_device::device_mconfig_additions() const { return MACHINE_CONFIG_NAME( cthd_cart ); } @@ -62,7 +63,7 @@ machine_config_constructor neogeo_cthd2k3_cart::device_mconfig_additions() const **************************************************/ -void neogeo_cthd2k3_cart::decrypt_all(DECRYPT_ALL_PARAMS) +void neogeo_cthd2k3_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) { m_prot->decrypt_cthd2003(spr_region, spr_region_size, audiocpu_region, audio_region_size, fix_region, fix_region_size); m_prot->patch_cthd2003(cpuregion, cpuregion_size); @@ -74,13 +75,14 @@ void neogeo_cthd2k3_cart::decrypt_all(DECRYPT_ALL_PARAMS) **************************************************/ -const device_type NEOGEO_CT2K3SP_CART = device_creator<neogeo_ct2k3sp_cart>; +DEFINE_DEVICE_TYPE(NEOGEO_CT2K3SP_CART, neogeo_ct2k3sp_cart_device, "neocart_ct2k3sp", "Neo Geo CTHD 2003 Sp Cart") -neogeo_ct2k3sp_cart::neogeo_ct2k3sp_cart(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : - neogeo_cthd2k3_cart(mconfig, NEOGEO_CT2K3SP_CART, "Neo Geo CTHD 2003 Sp Cart", tag, owner, clock, "neocart_ct2k3sp", __FILE__) -{} +neogeo_ct2k3sp_cart_device::neogeo_ct2k3sp_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + neogeo_cthd2k3_cart_device(mconfig, NEOGEO_CT2K3SP_CART, tag, owner, clock) +{ +} -void neogeo_ct2k3sp_cart::decrypt_all(DECRYPT_ALL_PARAMS) +void neogeo_ct2k3sp_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) { m_prot->decrypt_ct2k3sp(spr_region, spr_region_size, audiocpu_region, audio_region_size, fix_region, fix_region_size); m_prot->patch_cthd2003(cpuregion, cpuregion_size); @@ -90,13 +92,14 @@ void neogeo_ct2k3sp_cart::decrypt_all(DECRYPT_ALL_PARAMS) ct2k3sa **************************************************/ -const device_type NEOGEO_CT2K3SA_CART = device_creator<neogeo_ct2k3sa_cart>; +DEFINE_DEVICE_TYPE(NEOGEO_CT2K3SA_CART, neogeo_ct2k3sa_cart_device, "neocart_ct2k3sa", "Neo Geo CTHD 2003 Sp Alt Cart") -neogeo_ct2k3sa_cart::neogeo_ct2k3sa_cart(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : - neogeo_cthd2k3_cart(mconfig, NEOGEO_CT2K3SA_CART, "Neo Geo CTHD 2003 Sp Alt Cart", tag, owner, clock, "neocart_ct2k3sa", __FILE__) -{} +neogeo_ct2k3sa_cart_device::neogeo_ct2k3sa_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + neogeo_cthd2k3_cart_device(mconfig, NEOGEO_CT2K3SA_CART, tag, owner, clock) +{ +} -void neogeo_ct2k3sa_cart::decrypt_all(DECRYPT_ALL_PARAMS) +void neogeo_ct2k3sa_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) { m_prot->decrypt_ct2k3sa(spr_region, spr_region_size, audiocpu_region, audio_region_size); m_prot->patch_ct2k3sa(cpuregion, cpuregion_size); @@ -107,15 +110,16 @@ void neogeo_ct2k3sa_cart::decrypt_all(DECRYPT_ALL_PARAMS) matrimbl **************************************************/ -const device_type NEOGEO_MATRIMBL_CART = device_creator<neogeo_matrimbl_cart>; +DEFINE_DEVICE_TYPE(NEOGEO_MATRIMBL_CART, neogeo_matrimbl_cart_device, "neocart_matrimbl", "Neo Geo Matrimelee Bootleg Cart") -neogeo_matrimbl_cart::neogeo_matrimbl_cart(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : - neogeo_cthd2k3_cart(mconfig, NEOGEO_MATRIMBL_CART, "Neo Geo Matrimelee Bootleg Cart", tag, owner, clock, "neocart_matrimbl", __FILE__), +neogeo_matrimbl_cart_device::neogeo_matrimbl_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + neogeo_cthd2k3_cart_device(mconfig, NEOGEO_MATRIMBL_CART, tag, owner, clock), m_cmc_prot(*this, "cmc_prot"), m_kof2k2_prot(*this, "kof2k2_prot") -{} +{ +} -void neogeo_matrimbl_cart::decrypt_all(DECRYPT_ALL_PARAMS) +void neogeo_matrimbl_cart_device::decrypt_all(DECRYPT_ALL_PARAMS) { m_kof2k2_prot->matrim_decrypt_68k(cpuregion, cpuregion_size); m_cmc_prot->sfix_decrypt(spr_region, spr_region_size, fix_region, fix_region_size); // required for text layer @@ -129,7 +133,7 @@ static MACHINE_CONFIG_FRAGMENT( matrimbl_cart ) MCFG_CTHD_PROT_ADD("cthd_prot") MACHINE_CONFIG_END -machine_config_constructor neogeo_matrimbl_cart::device_mconfig_additions() const +machine_config_constructor neogeo_matrimbl_cart_device::device_mconfig_additions() const { return MACHINE_CONFIG_NAME( matrimbl_cart ); } |