From 2ff9ca04379070ca3480da95c968285eaa9c5ebd Mon Sep 17 00:00:00 2001 From: David Haywood Date: Tue, 4 Jul 2017 17:26:10 +0100 Subject: [PATCH] actually after all that the CPU is a duplicate of another one, just with a different number (nw) --- src/mame/machine/segacrpt_device.cpp | 32 ++++------------------------ src/mame/machine/segacrpt_device.h | 6 +++--- 2 files changed, 7 insertions(+), 31 deletions(-) diff --git a/src/mame/machine/segacrpt_device.cpp b/src/mame/machine/segacrpt_device.cpp index c7dd9d6ebfa..5a75586c417 100644 --- a/src/mame/machine/segacrpt_device.cpp +++ b/src/mame/machine/segacrpt_device.cpp @@ -270,7 +270,7 @@ DEFINE_DEVICE_TYPE(SEGA_315_5048, sega_315_5048_device, "sega_315_5048", "Sega 3 DEFINE_DEVICE_TYPE(SEGA_315_5093, sega_315_5093_device, "sega_315_5093", "Sega 315-5093") DEFINE_DEVICE_TYPE(SEGA_315_5099, sega_315_5099_device, "sega_315_5099", "Sega 315-5099") DEFINE_DEVICE_TYPE(SEGA_315_5015, sega_315_5015_device, "sega_315_5015", "Sega 315-5015") -DEFINE_DEVICE_TYPE(SEGA_315_5133, sega_315_5133_device, "sega_315_5133", "Sega 315-5133") +DEFINE_DEVICE_TYPE(SEGA_315_5133, sega_315_5133_device, "sega_315_5133", "Sega 315-5133") // exactly the same as Sega 315-5048? DEFINE_DEVICE_TYPE(SEGA_315_5061, sega_315_5061_device, "sega_315_5061", "Sega 315-5061") DEFINE_DEVICE_TYPE(SEGA_315_5028, sega_315_5028_device, "sega_315_5028", "Sega 315-5028") DEFINE_DEVICE_TYPE(SEGA_315_5084, sega_315_5084_device, "sega_315_5084", "Sega 315-5084") @@ -700,6 +700,7 @@ void sega_315_5041_device::decrypt() sega_315_5048_device::sega_315_5048_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5048, tag, owner, clock) {} +sega_315_5048_device::sega_315_5048_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, type, tag, owner, clock) {} void sega_315_5048_device::decrypt() { static const uint8_t convtable[32][4] = @@ -847,33 +848,8 @@ void sega_315_5015_device::decrypt() } -sega_315_5133_device::sega_315_5133_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5133, tag, owner, clock) {} -void sega_315_5133_device::decrypt() -{ - static const uint8_t convtable[32][4] = - { - /* opcode data address */ - /* A B C D A B C D */ - { 0x88,0x08,0x80,0x00 }, { 0xa0,0xa8,0x80,0x88 }, /* ...0...0...0...0 */ - { 0x88,0x08,0x80,0x00 }, { 0x88,0xa8,0x80,0xa0 }, /* ...0...0...0...1 */ - { 0xa0,0x80,0x20,0x00 }, { 0x88,0x08,0x80,0x00 }, /* ...0...0...1...0 */ - { 0xa0,0xa8,0x80,0x88 }, { 0x88,0x08,0x80,0x00 }, /* ...0...0...1...1 */ - { 0x28,0x20,0xa8,0xa0 }, { 0xa0,0xa8,0x80,0x88 }, /* ...0...1...0...0 */ - { 0x88,0xa8,0x80,0xa0 }, { 0x28,0x20,0xa8,0xa0 }, /* ...0...1...0...1 */ - { 0xa0,0x80,0x20,0x00 }, { 0xa0,0xa8,0x80,0x88 }, /* ...0...1...1...0 */ - { 0x28,0x20,0xa8,0xa0 }, { 0xa0,0xa8,0x80,0x88 }, /* ...0...1...1...1 */ - { 0xa0,0x80,0x20,0x00 }, { 0xa0,0x80,0x20,0x00 }, /* ...1...0...0...0 */ - { 0xa0,0x20,0x80,0x00 }, { 0x88,0xa8,0x80,0xa0 }, /* ...1...0...0...1 */ - { 0xa0,0x20,0x80,0x00 }, { 0xa0,0x20,0x80,0x00 }, /* ...1...0...1...0 */ - { 0xa0,0x20,0x80,0x00 }, { 0xa0,0x20,0x80,0x00 }, /* ...1...0...1...1 */ - { 0xa0,0x80,0x20,0x00 }, { 0xa0,0x80,0x20,0x00 }, /* ...1...1...0...0 */ - { 0x88,0xa8,0x80,0xa0 }, { 0x28,0x20,0xa8,0xa0 }, /* ...1...1...0...1 */ - { 0xa0,0xa8,0x80,0x88 }, { 0xa0,0x80,0x20,0x00 }, /* ...1...1...1...0 */ - { 0x28,0x20,0xa8,0xa0 }, { 0xa0,0xa8,0x80,0x88 } /* ...1...1...1...1 */ - }; - decode(m_region_ptr, m_decrypted_ptr, m_decode_size, convtable, m_numbanks, m_banksize); -} - +sega_315_5133_device::sega_315_5133_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : sega_315_5048_device(mconfig, SEGA_315_5133, tag, owner, clock) {} +// == sega_315_5048_device sega_315_5014_device::sega_315_5014_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5014, tag, owner, clock) {} diff --git a/src/mame/machine/segacrpt_device.h b/src/mame/machine/segacrpt_device.h index 653e8efdacb..cadbc8957c4 100644 --- a/src/mame/machine/segacrpt_device.h +++ b/src/mame/machine/segacrpt_device.h @@ -152,6 +152,8 @@ class sega_315_5048_device : public segacrpt_z80_device { public: sega_315_5048_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5048_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + protected: virtual void decrypt() override; }; @@ -189,12 +191,10 @@ protected: }; -class sega_315_5133_device : public segacrpt_z80_device +class sega_315_5133_device : public sega_315_5048_device { public: sega_315_5133_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); -protected: - virtual void decrypt() override; }; class sega_315_5014_device : public segacrpt_z80_device