From c66f871b4508fd1e15188b43ff0715aec5f8f93f Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Tue, 21 Mar 2023 07:20:50 +0100 Subject: machine/segacrpt_device.cpp: updated documentation [Brian Troha] --- src/devices/machine/segacrpt_device.cpp | 54 +++++++++++++++++++-------------- src/devices/machine/segacrpt_device.h | 14 +++++++-- src/mame/igs/goldstar.cpp | 2 +- src/mame/nichibutsu/jangou.cpp | 2 +- src/mame/sega/segag80r.cpp | 18 ++++++++++- src/mame/sega/system1.cpp | 8 ++--- src/mame/sega/system1.h | 4 +-- 7 files changed, 67 insertions(+), 35 deletions(-) diff --git a/src/devices/machine/segacrpt_device.cpp b/src/devices/machine/segacrpt_device.cpp index 330193aa2b9..1513778d898 100644 --- a/src/devices/machine/segacrpt_device.cpp +++ b/src/devices/machine/segacrpt_device.cpp @@ -105,6 +105,7 @@ List of encrypted games currently known: CPU Part # Game Comments + 315-5006 Monster Bash same encryption scheme as 315-5096 - Spatter 315-5010 Pengo unencrypted version available 315-5013 Super Zaxxon used Zaxxon for known plaintext attack 315-5014 Buck Rogers / Zoom 909 unencrypted version available @@ -123,18 +124,21 @@ 315-5064 Water Match used Mister Viking for k.p.a. 315-5065 Bull Fight 315-5069 Star Force game by Tehkan; same key as Super Locomotive - ???-???? Spatter same encryption scheme is used by the Falcon 03155096 CPU (Z80) 315-5084 Jongkyo TABLE INCOMPLETE game by Kiwako; also has a simple bitswap on top 315-5093 Pitfall II + 315-5096 Spatter same encryption scheme is used by the Falcon 03155096 CPU (Z80) 315-5098 Ninja Princess unencrypted version available; same key as Up'n Down + 315-5099 Spatter 315-5102 Sega Ninja unencrypted version available 315-5110 I'm Sorry used My Hero for k.p.a. 315-5114 Champion Pro Wrestling same key as Regulus 315-5115 TeddyBoy Blues 315-5128 Pinball Action game by Tehkan; also has a simple bitswap on top 315-5132 My Hero + 315-5133 Ninja Princess exactly the same as Sega 315-5048? 315-5135 Heavy Metal & Wonder Boy (set 1a & 3; bootlegs?) + 315-5155 TeddyBoy Blues Some text found in the ROMs: @@ -254,32 +258,32 @@ static void decode(uint8_t *data, uint8_t *opcodes, int size, const uint8_t conv - -DEFINE_DEVICE_TYPE(SEGA_315_5132, sega_315_5132_device, "sega_315_5132", "Sega 315-5132") -DEFINE_DEVICE_TYPE(SEGA_315_5155, sega_315_5155_device, "sega_315_5155", "Sega 315-5155") -DEFINE_DEVICE_TYPE(SEGA_315_5110, sega_315_5110_device, "sega_315_5110", "Sega 315-5110") -DEFINE_DEVICE_TYPE(SEGA_315_5135, sega_315_5135_device, "sega_315_5135", "Sega 315-5135") -DEFINE_DEVICE_TYPE(SEGA_315_5051, sega_315_5051_device, "sega_315_5051", "Sega 315-5051") -DEFINE_DEVICE_TYPE(SEGA_315_5098, sega_315_5098_device, "sega_315_5098", "Sega 315-5098") // also 315-5030 ? -DEFINE_DEVICE_TYPE(SEGA_315_5102, sega_315_5102_device, "sega_315_5102", "Sega 315-5102") -DEFINE_DEVICE_TYPE(SEGA_315_5065, sega_315_5065_device, "sega_315_5065", "Sega 315-5065") -DEFINE_DEVICE_TYPE(SEGA_315_5064, sega_315_5064_device, "sega_315_5064", "Sega 315-5064") +DEFINE_DEVICE_TYPE(SEGA_315_5006, sega_315_5006_device, "sega_315_5006", "Sega 315-5006") +DEFINE_DEVICE_TYPE(SEGA_315_5010, sega_315_5010_device, "sega_315_5010", "Sega 315-5010") +DEFINE_DEVICE_TYPE(SEGA_315_5013, sega_315_5013_device, "sega_315_5013", "Sega 315-5013") +DEFINE_DEVICE_TYPE(SEGA_315_5014, sega_315_5014_device, "sega_315_5014", "Sega 315-5014") +DEFINE_DEVICE_TYPE(SEGA_315_5015, sega_315_5015_device, "sega_315_5015", "Sega 315-5015") +DEFINE_DEVICE_TYPE(SEGA_315_5018, sega_315_5018_device, "sega_315_5018", "Sega 315-5018") +DEFINE_DEVICE_TYPE(SEGA_315_5028, sega_315_5028_device, "sega_315_5028", "Sega 315-5028") DEFINE_DEVICE_TYPE(SEGA_315_5033, sega_315_5033_device, "sega_315_5033", "Sega 315-5033") DEFINE_DEVICE_TYPE(SEGA_315_5041, sega_315_5041_device, "sega_315_5041", "Sega 315-5041") DEFINE_DEVICE_TYPE(SEGA_315_5048, sega_315_5048_device, "sega_315_5048", "Sega 315-5048") -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") // exactly the same as Sega 315-5048? +DEFINE_DEVICE_TYPE(SEGA_315_5051, sega_315_5051_device, "sega_315_5051", "Sega 315-5051") 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_5064, sega_315_5064_device, "sega_315_5064", "Sega 315-5064") +DEFINE_DEVICE_TYPE(SEGA_315_5065, sega_315_5065_device, "sega_315_5065", "Sega 315-5065") DEFINE_DEVICE_TYPE(SEGA_315_5084, sega_315_5084_device, "sega_315_5084", "Sega 315-5084") -DEFINE_DEVICE_TYPE(SEGA_315_5013, sega_315_5013_device, "sega_315_5013", "Sega 315-5013") -DEFINE_DEVICE_TYPE(SEGA_315_5014, sega_315_5014_device, "sega_315_5014", "Sega 315-5014") -DEFINE_DEVICE_TYPE(SEGA_315_5018, sega_315_5018_device, "sega_315_5018", "Sega 315-5018") -DEFINE_DEVICE_TYPE(SEGA_315_5010, sega_315_5010_device, "sega_315_5010", "Sega 315-5010") -DEFINE_DEVICE_TYPE(SEGA_315_SPAT, sega_315_spat_device, "sega_315_spat", "Sega 315-5xxx (Spatter)") // unknown part number +DEFINE_DEVICE_TYPE(SEGA_315_5093, sega_315_5093_device, "sega_315_5093", "Sega 315-5093") +DEFINE_DEVICE_TYPE(SEGA_315_5096, sega_315_5096_device, "sega_315_5096", "Sega 315-5096") // exactly the same as Sega 315-5006? +DEFINE_DEVICE_TYPE(SEGA_315_5098, sega_315_5098_device, "sega_315_5098", "Sega 315-5098") // also 315-5030 ? +DEFINE_DEVICE_TYPE(SEGA_315_5099, sega_315_5099_device, "sega_315_5099", "Sega 315-5099") +DEFINE_DEVICE_TYPE(SEGA_315_5102, sega_315_5102_device, "sega_315_5102", "Sega 315-5102") +DEFINE_DEVICE_TYPE(SEGA_315_5110, sega_315_5110_device, "sega_315_5110", "Sega 315-5110") DEFINE_DEVICE_TYPE(SEGA_315_5128, sega_315_5128_device, "sega_315_5128", "Sega 315-5128") +DEFINE_DEVICE_TYPE(SEGA_315_5132, sega_315_5132_device, "sega_315_5132", "Sega 315-5132") +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_5135, sega_315_5135_device, "sega_315_5135", "Sega 315-5135") +DEFINE_DEVICE_TYPE(SEGA_315_5155, sega_315_5155_device, "sega_315_5155", "Sega 315-5155") @@ -758,8 +762,9 @@ void sega_315_5099_device::decrypt() -sega_315_spat_device::sega_315_spat_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_SPAT, tag, owner, clock) {} -void sega_315_spat_device::decrypt() +sega_315_5006_device::sega_315_5006_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5006, tag, owner, clock) {} +sega_315_5006_device::sega_315_5006_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_5006_device::decrypt() { static const uint8_t convtable[32][4] = { @@ -786,6 +791,9 @@ void sega_315_spat_device::decrypt() decode(m_region_ptr, m_decrypted_ptr, m_decode_size, convtable, m_numbanks, m_banksize); } +sega_315_5096_device::sega_315_5096_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : sega_315_5006_device(mconfig, SEGA_315_5096, tag, owner, clock) {} +// == sega_315_5006_device + sega_315_5015_device::sega_315_5015_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : segacrpt_z80_device(mconfig, SEGA_315_5015, tag, owner, clock) {} void sega_315_5015_device::decrypt() { diff --git a/src/devices/machine/segacrpt_device.h b/src/devices/machine/segacrpt_device.h index 63b50bde2d0..0c9538e68a0 100644 --- a/src/devices/machine/segacrpt_device.h +++ b/src/devices/machine/segacrpt_device.h @@ -157,14 +157,21 @@ protected: virtual void decrypt() override; }; -class sega_315_spat_device : public segacrpt_z80_device +class sega_315_5006_device : public segacrpt_z80_device { public: - sega_315_spat_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); + sega_315_5006_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); protected: + sega_315_5006_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); virtual void decrypt() override; }; +class sega_315_5096_device : public sega_315_5006_device +{ +public: + sega_315_5096_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); +}; + class sega_315_5015_device : public segacrpt_z80_device { public: @@ -263,7 +270,8 @@ DECLARE_DEVICE_TYPE(SEGA_315_5041, sega_315_5041_device) DECLARE_DEVICE_TYPE(SEGA_315_5048, sega_315_5048_device) DECLARE_DEVICE_TYPE(SEGA_315_5093, sega_315_5093_device) DECLARE_DEVICE_TYPE(SEGA_315_5099, sega_315_5099_device) -DECLARE_DEVICE_TYPE(SEGA_315_SPAT, sega_315_spat_device) +DECLARE_DEVICE_TYPE(SEGA_315_5006, sega_315_5006_device) +DECLARE_DEVICE_TYPE(SEGA_315_5096, sega_315_5096_device) DECLARE_DEVICE_TYPE(SEGA_315_5015, sega_315_5015_device) DECLARE_DEVICE_TYPE(SEGA_315_5133, sega_315_5133_device) DECLARE_DEVICE_TYPE(SEGA_315_5014, sega_315_5014_device) diff --git a/src/mame/igs/goldstar.cpp b/src/mame/igs/goldstar.cpp index 262cc870c73..ffb687d7d9f 100644 --- a/src/mame/igs/goldstar.cpp +++ b/src/mame/igs/goldstar.cpp @@ -9206,7 +9206,7 @@ void wingco_state::luckylad(machine_config &config) { lucky8(config); - sega_315_spat_device &maincpu(SEGA_315_SPAT(config.replace(), m_maincpu, CPU_CLOCK)); // actually Falcon 03155096 encrypted Z80 + sega_315_5096_device &maincpu(SEGA_315_5096(config.replace(), m_maincpu, CPU_CLOCK)); // actually Falcon 03155096 encrypted Z80 maincpu.set_addrmap(AS_PROGRAM, &wingco_state::lucky8_map); maincpu.set_addrmap(AS_OPCODES, &wingco_state::common_decrypted_opcodes_map); maincpu.set_decrypted_tag(":decrypted_opcodes"); diff --git a/src/mame/nichibutsu/jangou.cpp b/src/mame/nichibutsu/jangou.cpp index 843ffaa1ae6..20d00d6f025 100644 --- a/src/mame/nichibutsu/jangou.cpp +++ b/src/mame/nichibutsu/jangou.cpp @@ -1000,7 +1000,7 @@ void cntrygrl_state::luckygrl(machine_config &config) { cntrygrl(config); - sega_315_spat_device &maincpu(SEGA_315_SPAT(config.replace(), m_cpu_0, MASTER_CLOCK / 8)); // actually Falcon 03155096 encrypted Z80 + sega_315_5096_device &maincpu(SEGA_315_5096(config.replace(), m_cpu_0, MASTER_CLOCK / 8)); // actually Falcon 03155096 encrypted Z80 maincpu.set_addrmap(AS_PROGRAM, &cntrygrl_state::luckygrl_cpu0_map); maincpu.set_addrmap(AS_IO, &cntrygrl_state::cntrygrl_cpu0_io); maincpu.set_addrmap(AS_OPCODES, &cntrygrl_state::decrypted_opcodes_map); diff --git a/src/mame/sega/segag80r.cpp b/src/mame/sega/segag80r.cpp index 13a2197bbbc..cd458b816a3 100644 --- a/src/mame/sega/segag80r.cpp +++ b/src/mame/sega/segag80r.cpp @@ -922,7 +922,7 @@ void segag80r_state::monsterb(machine_config &config) void segag80r_state::monster2(machine_config &config) { monsterb(config); - sega_315_spat_device &maincpu(SEGA_315_SPAT(config.replace(), m_maincpu, VIDEO_CLOCK/4)); + sega_315_5006_device &maincpu(SEGA_315_5006(config.replace(), m_maincpu, VIDEO_CLOCK/4)); maincpu.set_addrmap(AS_PROGRAM, &segag80r_state::main_map); maincpu.set_addrmap(AS_IO, &segag80r_state::main_ppi8255_portmap); maincpu.set_vblank_int("screen", FUNC(segag80r_state::segag80r_vblank_start)); @@ -1375,6 +1375,22 @@ ROM_START( monsterb ) ROM_LOAD( "pr1512.u31", 0x0000, 0x0020, CRC(414ebe9b) SHA1(3df8694e3d26635d19fd4cdf02bd0998e8538b5b) ) /* U31 */ ROM_END +/* + +Monster Bash + Main PCB: 834-0318 + Sound PCB: 834-0316 + +Set labled as: + +2-BOARD NO. REV. +834-0317 +MONSTER BASH +83830 + +Uses a SEGA 315-5006 security CPU + +*/ ROM_START( monsterb2 ) ROM_REGION( 0xc000, "maincpu", 0 ) ROM_LOAD( "epr-1548.2", 0x0000, 0x2000, CRC(239f77c1) SHA1(2945e4b135c1c46bf3e0d947b3d9be052f12e8d8) ) diff --git a/src/mame/sega/system1.cpp b/src/mame/sega/system1.cpp index e884f8a7200..fa623bfdad6 100644 --- a/src/mame/sega/system1.cpp +++ b/src/mame/sega/system1.cpp @@ -2551,10 +2551,10 @@ void system1_state::sys1piosx_315_5099(machine_config &config) z80.set_decrypted_tag(":decrypted_opcodes"); } -void system1_state::sys1piosx_315_spat(machine_config &config) +void system1_state::sys1piosx_315_5096(machine_config &config) { sys1pios(config); - segacrpt_z80_device &z80(SEGA_315_SPAT(config.replace(), m_maincpu, MASTER_CLOCK)); + segacrpt_z80_device &z80(SEGA_315_5096(config.replace(), m_maincpu, MASTER_CLOCK)); encrypted_sys1pio_maps(config); z80.set_decrypted_tag(":decrypted_opcodes"); } @@ -5710,9 +5710,9 @@ GAME( 1984, flicky, 0, sys1piox_315_5051, flicky, system1_state, e GAME( 1984, flickya, flicky, sys1piox_315_5051, flicky, system1_state, empty_init, ROT0, "Sega", "Flicky (128k Version, 315-5051, larger roms)", MACHINE_SUPPORTS_SAVE ) GAME( 1984, flickys2, flicky, sys1pio, flickys2, system1_state, empty_init, ROT0, "Sega", "Flicky (128k Version, not encrypted)", MACHINE_SUPPORTS_SAVE ) GAME( 1984, thetogyu, bullfgt, sys1piox_315_5065, bullfgt, system1_state, empty_init, ROT0, "Coreland / Sega", "The Togyu (315-5065, Japan)", MACHINE_SUPPORTS_SAVE ) -GAME( 1984, spatter, 0, sys1piosx_315_spat,spatter, system1_state, empty_init, ROT0, "Sega", "Spatter (315-5xxx)", MACHINE_SUPPORTS_SAVE ) +GAME( 1984, spatter, 0, sys1piosx_315_5096,spatter, system1_state, empty_init, ROT0, "Sega", "Spatter (315-5096)", MACHINE_SUPPORTS_SAVE ) GAME( 1984, spattera, spatter, sys1piosx_315_5099,spatter, system1_state, empty_init, ROT0, "Sega", "Spatter (315-5099)", MACHINE_SUPPORTS_SAVE ) -GAME( 1984, ssanchan, spatter, sys1piosx_315_spat,spatter, system1_state, empty_init, ROT0, "Sega", "Sanrin San Chan (Japan, 315-5xxx)", MACHINE_SUPPORTS_SAVE ) +GAME( 1984, ssanchan, spatter, sys1piosx_315_5096,spatter, system1_state, empty_init, ROT0, "Sega", "Sanrin San Chan (Japan, 315-5096)", MACHINE_SUPPORTS_SAVE ) GAME( 1985, pitfall2, 0, sys1piox_315_5093, pitfall2, system1_state, empty_init, ROT0, "Sega", "Pitfall II (315-5093)", MACHINE_SUPPORTS_SAVE ) GAME( 1985, pitfall2a, pitfall2, sys1piox_315_5093, pitfall2, system1_state, empty_init, ROT0, "Sega", "Pitfall II (315-5093, Flicky Conversion)", MACHINE_SUPPORTS_SAVE ) GAME( 1985, pitfall2u, pitfall2, sys1pio, pitfall2u, system1_state, empty_init, ROT0, "Sega", "Pitfall II (not encrypted)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/sega/system1.h b/src/mame/sega/system1.h index e30396bc96d..62444b55d48 100644 --- a/src/mame/sega/system1.h +++ b/src/mame/sega/system1.h @@ -28,7 +28,7 @@ public: m_maincpu(*this, "maincpu"), m_soundcpu(*this, "soundcpu"), m_mcu(*this, "mcu"), - m_sn(*this, "sn%u", 1U), + m_sn(*this, "sn%u", 1U), m_gfxdecode(*this, "gfxdecode"), m_screen(*this, "screen"), m_palette(*this, "palette"), @@ -72,7 +72,7 @@ public: void sys1piox_315_5135(machine_config &config); void sys2rowxboot(machine_config &config); void sys1piox_315_5102(machine_config &config); - void sys1piosx_315_spat(machine_config &config); + void sys1piosx_315_5096(machine_config &config); void sys2x(machine_config &config); void sys1piox_315_5051(machine_config &config); void sys1piox_315_5098(machine_config &config); -- cgit v1.2.3