diff --git a/3rdparty/bgfx/src/glcontext_html5.cpp b/3rdparty/bgfx/src/glcontext_html5.cpp index 0e55b792deb4a..cce0f299da8d8 100644 --- a/3rdparty/bgfx/src/glcontext_html5.cpp +++ b/3rdparty/bgfx/src/glcontext_html5.cpp @@ -86,7 +86,7 @@ namespace bgfx { namespace gl } else { - m_primary = createSwapChain((void*)canvas, (int)_width, (int)_height) ); + m_primary = createSwapChain((void*)canvas, (int)_width, (int)_height); } if (0 != _width diff --git a/README.md b/README.md index 81dd85b03968f..636bde36d3a28 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ MAME's purpose is to preserve decades of software history. As electronic technol ## Where can I find out more? * [Official MAME Development Team Site](https://www.mamedev.org/) (includes binary downloads, wiki, forums, and more) -* [MAME Testers](https://mametesters.org/) (official bug tracker for MAME and MESS) +* [MAME Testers](https://mametesters.org/) (official bug tracker for MAME) ### Community diff --git a/hash/amiga_cd.xml b/hash/amiga_cd.xml index 231745ce83cac..68a6f072f6243 100644 --- a/hash/amiga_cd.xml +++ b/hash/amiga_cd.xml @@ -7,10 +7,60 @@ http://redump.org/discs/system/acd --> + + + + + Red Hat Linux 5.1 + 1998 + Red Hat + + + + + + + + - - + + The Big Red Adventure (Europe) + 1997 + Power Computing + + + + + + + + + + + + Final Odyssey: Theseus Verses the Minotaur (Europe) + 1997 + Vulcan Software + + + + + + + + + + Kang Fu 1996 GREat Effects Development (GREED) @@ -42,6 +92,21 @@ Not extensively tested, some games known to use ECS or AGA features. (cfr. Bruta + + + Emulators Unlimited Plus (Germany) + + + 1995? + + <unknown> + + + + + + + Ten on Ten Compilation (Europe) 1995 diff --git a/hash/amigaocs_flop.xml b/hash/amigaocs_flop.xml index be9a60a30fa19..7c47c4b32a25b 100644 --- a/hash/amigaocs_flop.xml +++ b/hash/amigaocs_flop.xml @@ -1689,9 +1689,9 @@ ATK test: C:0 H:U Bad 1991 Team 17 8" after credits display +Throws "amiga_fdc_device::live_run - cur_live.bit_counter > 8" after credits display (worked around) Motor keeps spinning badly on disk swap screen(s) (verify) -No player sprite, red dots incorrectly drawn on several elements during gameplay (namely alien enemies) +Glitchy [Copper] on bottom part of screen, may use SKIP ATK test: OK ]]> @@ -2726,7 +2726,7 @@ ATK test: failed Virgin @@ -3547,9 +3547,10 @@ ATK test: C:0 H:U Bad + - + @@ -3763,6 +3764,10 @@ ATK test: failed 1989 Mindware @@ -3789,7 +3794,7 @@ ATK test: C:0 H:U 1 Sector Bad - + Australo Piticus Mechanicus (Europe) @@ -3797,8 +3802,13 @@ ATK test: C:0 H:U 1 Sector Bad 1988 Timewarp + + + @@ -4202,7 +4212,7 @@ ATK test: OK ]]> - + @@ -4214,10 +4224,11 @@ ATK test: OK 1987 King Size - + + - + @@ -5591,7 +5602,8 @@ ATK test: OK 1989 Magic Bytes - + + @@ -6383,6 +6395,7 @@ ATK test: C:1 Bad 1992 Psygnosis @@ -7817,7 +7830,7 @@ Fatal errors in ipf_decode::generate_timings type 4 new68k: white screen Title screen background glitches out [Copper] Map screen mosaic effect is off [Copper] -Gameplay has no [Denise] sprites [Copper] +Gameplay missing [Denise] lives counter, missing background [Copper] https://codetapper.com/amiga/sprite-tricks/brian-the-lion/ ATK test: OK ]]> @@ -10180,9 +10193,10 @@ ATK test: C:0 H:U Bad + - + @@ -10262,13 +10276,14 @@ ATK test: C:0 H:U Bad 1990 Ocean - + + @@ -16417,6 +16432,8 @@ ATK test: C:0 H:U 1 Sector Bad 1990 Rainbow Arts @@ -17405,8 +17422,9 @@ ATK test: OK 1988 Grandslam - + + @@ -29547,7 +29565,7 @@ ATK test: OK 1990 Rainbow Arts - + @@ -29560,6 +29578,7 @@ ATK test: OK + @@ -36190,7 +36209,8 @@ ATK test: failed 1988 Ariolasoft - + + @@ -39081,7 +39101,8 @@ ATK test: OK 1988 MicroProse - + + @@ -43151,6 +43172,7 @@ ATK test: OK 1991 U.S. Gold @@ -43733,9 +43755,10 @@ ATK test: OK Psygnosis @@ -44194,7 +44217,8 @@ ATK test: C:0 H:U Bad 1993 Accrosoft - + + @@ -47807,7 +47831,8 @@ ATK test: OK 1988 Logotron - + + @@ -49314,8 +49339,9 @@ ATK test: OK 1993 Team 17 @@ -57168,7 +57194,8 @@ ATK test: failed 1989 Ubi Soft - + + diff --git a/hash/m3.xml b/hash/m3.xml new file mode 100644 index 0000000000000..d7c98f11288f6 --- /dev/null +++ b/hash/m3.xml @@ -0,0 +1,20 @@ + + + + + + + + + + M3 Utilities (Release 3) + 198? + LSI + + + + + + + + diff --git a/hash/megacd.xml b/hash/megacd.xml index 3d191330960f3..a50e54c19378e 100644 --- a/hash/megacd.xml +++ b/hash/megacd.xml @@ -3,910 +3,1457 @@ - + - - - + + + + - The Amazing Spider-Man Vs. The Kingpin (Europe) - 1993 - Sega - + 3 Ninjas Kick Back (USA) + 1994 + Sony Imagesoft + + - + - + - - - Batman Returns (Europe) - 1993 - Sega - + The Third World War (USA) + 1994 + Extreme Entertainment Group + + + - + - + - - - Batman Returns (Europe, alt) + The IIIrd World War (Japan) 1993 - Sega - + Micronet + + + + - - + - - - Battlecorps (Europe) - 1994 - Core Design - + Seima Densetsu 3x3 Eyes (Japan) + 1993 + Sega + + + + + - + - - - BC Racers (Europe) - 1994 - Core Design - + After Burner III (Europe) + 1993 + Sega + + - - + - + - Blackhole Assault (Europe) - 1993 - Sega - + After Burner III (Japan) + 1992 + CRI + + + + - + - + - - - Cobra Command (Europe) + After Burner III (USA) 1993 Sega - + + + - + - + - - - Corpse Killer (Europe) - 1994 - Digital Pictures - + + + The Adventures of Batman and Robin (Europe) + 1995 + Sega + + - - + - - - Dracula Unleashed (Europe) - 1994 + The Adventures of Batman and Robin (USA) + 1995 Sega - - - - + + + + - + - - - + + + + + After Armageddon Gaiden - Majuu Toushouden Eclipse (Japan) + 1994 + Sega + + + + + - + - - - Dune (Europe) + AH3 - ThunderStrike (USA) 1993 - Virgin Interactive - + JVC + + + - + - + - - - Earthworm Jim - Special Edition (Europe) - 1994 - Interplay - + Aisle Lord (Japan) + 1992 + Wolf Team + + + + - + - - - Ecco - The Tides of Time (Europe) - 1994 - Sega - + Alshark (Japan) + 1993 + Polydor K.K. + + + + - - + - - - Ecco the Dolphin (Europe) + Anett Futatabi (Japan) 1993 - Sega - + Wolf Team + + + + + - - + - - - ESPN Baseball Tonight (Europe) + The San Diego Zoo Presents The Animals! - A Multimedia Experience (Europe) 1994 - Sony Imagesoft - + Mindscape + + - - + - - - Fahrenheit (Europe) - 1995 - Sega - + The San Diego Zoo Presents... The Animals! (USA) + 1994 + The Software Toolworks + + - + - - - Final Fight CD (Europe) + A-Rank Thunder Tanjouhen (Japan) 1993 - Sega - + Nihon Telenet + + + + - - + - - + Arcus I-II-III (Japan) + 1993 + Wolf Team + + + + + + + + + + - - - + + - Ground Zero Texas (Europe) + Arslan Senki - The Heroic Legend of Arslan (Japan) 1993 - Sony Imagesoft - - - - + Sega + + + + + - + - - - + + + + + A/X-101 (USA) + 1994 + Absolute Entertainment + + + + - + - - - Jaguar XJ220 (Europe) - 1993 + AX-101 (Japan) + 1994 Sega - + + + + - + - + - - - Jurassic Park (Europe) - 1993 - Sega - + Baku-den - The Unbalanced Zone (Japan) + 1994 + Sony Music Entertainment + + + + - - + - - - Lethal Enforcers II - Gun Fighters (Europe) + Bari-Arm (USA) 1994 - Konami - + Sega + + + + - + - + - - - Mickey Mania (Europe) - 1994 - Sony Imagesoft - + Bari-Arm (Japan) + 1993 + Human Entertainment + + + + - + - + - - - Mortal Kombat (Europe) + Battle Fantasy (Japan) 1994 - Arena - + Micronet + + + + - - + - - - NBA Jam (Europe) - 1994 - Acclaim Entertainment - + Batman Returns (Europe) + 1993 + Sega + + - + - + - - - Night Trap (Europe) + Batman Returns (Europe, alt) 1993 Sega - - - - + + + + - + - - - + + + + + Batman Returns (USA) + 1993 + Sega + + + + + - + - - - Prince of Persia (Europe) - 1993 - Sega - + BC Racers (Europe) + 1994 + Core Design + + - + - + - - - Road Avenger (Europe) - 1993 - Sega - - + BC Racers (Europe, demo) [Sega Pro CD - issue 41] + 1994 + Core + - - + - - - Sega Classics Arcade Collection - Limited Edition (Europe) [6105411P-00036A-R1M] - 1992 - Sega - + BC Racers (Europe, demo) [Mega Power - issue 18] + 1994 + Core + - - + - - - Sewer Shark (Europe) - 1992 - Sony Imagesoft - + BC Racers (USA) + 1994 + Core Design + + + - - + - - Sherlock Holmes - Consulting Detective Vol. I (Europe) - 1993 - Sega - + Shadow of the Beast II - Juushin no Jubaku (Japan) + 1994 + Victor Entertainment + + + + - + - + - - - Silpheed (Europe) - 1993 - Sega - + Shadow of the Beast II (USA) + 1994 + Psygnosis + + - - + - - - - Slam City with Scottie Pippen (Europe, alt) - 1994 - Digital Pictures - - - - - - - - - - - + Bill Walsh College Football (Europe) + 1993 + Electronic Arts + + + - + - - - The Smurfs (Europe) - 1994 - Infogrames - + Bill Walsh College Football (USA) + 1993 + Electronic Arts + + - + - + - - - Sol-Feace (Europe) - 1992 + Blackhole Assault (Europe) + 1993 Sega - + + - + - + - - + + - Sonic CD (Europe) + Black Hole Assault (USA, alt) 1993 - Sega - + Bignet + + + - + - + - - - SoulStar (Europe) - 1994 + Black Hole Assault (USA) + 1993 + Bignet + + + + + + + + + + + + + + + Blackhole Assault (USA, prototype 19920210) + 1992 Sega - + - - + - - - The Space Adventure - Cobra: The Legendary Bandit (Europe) - 1995 - Hudson Soft - + Black Hole Assault (Japan) + 1992 + Micronet + + + + - - + - - - Star Wars - Rebel Assault (Europe) + Bloodshot (Europe) 1994 - JVC - + Domark + + - - + - - + + - Thunderhawk (Europe) - 1993 - Core Design - + Battle Frenzy (USA, prototype) + 2003 + Good Deal Games + - - + - - - Time Gal (Europe) - 1993 + Bouncers (USA) + 1994 Sega - + + + - + - + - - - Tomcat Alley (Europe) + Brutal - Paws of Fury (Europe) 1994 - Sega - + GameTek + + - - + - - - Tomcat Alley (Germany) + Brutal - Paws of Fury (USA) 1994 - Sega - + GameTek + + + - + - + - - - Wolfchild (Europe) - 1993 - Sega - + Battlecorps (Europe) + 1994 + Core Design + + - - + + + + Battlecorps (Europe, demo) [Mega Power - Issue 11, Sega Pro CD - issue 50] + 1994 + Core + + + + + + + - - + - The Adventures of Batman and Robin (Europe) - 1995 + Battlecorps - 3D Mechanical Battle Simulator (Japan) + 1994 + Victor Entertainment + + + + + + + + + + + + + + Battlecorps and SoulStar (Europe, demo) [Mega Power - issue 14] + 1994 + Core + + + + + + + + + + + Battlecorps (USA) + 1994 + Core Design + + + + + + + + + + + + + + + The Exterminators (USA, prototype) + 2001 + Good Deal Games + + + + + + + + + + + + + The Exterminators - Special Edition (USA, prototype) + 2003 + Good Deal Games + + + + + + + + + + + + Burai - Yatsudama no Yuushi Densetsu (Japan) + 1992 Sega - + + + + + - + - + - After Burner III (Europe) + Power Factory featuring C+C Music Factory (Europe) 1993 - Sega - + Sony Imagesoft + - + - - - Bill Walsh College Football (Europe) + C+C Music Factory (USA) 1993 - Electronic Arts - + Sony Imagesoft + + + - + - - - Bloodshot (Europe) - 1994 - Domark - + Cosmic Fantasy Stories (Japan) + 1992 + Nihon Telenet + + + + + - + - - - Brutal - Paws of Fury (Europe) + Championship Soccer '94 (USA) 1994 - GameTek - + Sony Imagesoft + + - + @@ -1473,6 +2437,7 @@ Black screen, requires sub CPU to be overclocked by 1.5x 1993 Sony Imagesoft + @@ -1480,14 +2445,43 @@ Black screen, requires sub CPU to be overclocked by 1.5x - - + Chuck Rock (USA) + 1992 + Sony Imagesoft + + + + + + + + + + + + + + + + Chuck Rock II - Son of Chuck (USA) + 1993 + Virgin Interactive + + + + + + + + + + + + + + Citizen X (USA, prototype) + 2002 + Good Deal Games + + + + + + + + + + + Cliffhanger (USA) + 1993 + Sony Imagesoft + + + + + + + + + + + + + + The Space Adventure - Cobra: The Legendary Bandit (Europe) + 1995 + Hudson Soft + + + + + + + + + + + + + The Space Adventure - Cobra the Legendary Bandit (USA) + 1995 + Hudson Soft + + + + + + + + + + + + + Cobra Command (Europe) + 1993 + Sega + + + + + + + + + + + - Double Switch (Europe) - 1994 + Cobra Command (USA) + 1992 Sega - + + + + - + - - + + - Dragon's Lair (Europe) - 1994 - Sega - + Note! Color Mechanica (USA) + 2014 + Good Deal Games + + - + - - + + - Dungeon Explorer (Europe) - 1995 - Hudson Soft - + Note! Color Mechanica (USA, alt) + 2014 + Good Deal Games + + - + - - + + - Dungeon Master II - Skullkeep v1.0 (Europe) + Compton's Interactive Encyclopedia v2.10 (USA) 1994 - JVC - + Compton's NewMedia + + - + - - + + - Ecco the Dolphin (Europe) [I-2647 A] - 1993 - Sega - + Compton's Interactive Encyclopedia v2.00S (USA) + 1994 + Compton's NewMedia + - + - + - - - Ecco the Dolphin (Europe) [MK-4408P-00135 1] - 1993 + Compton's Interactive Encyclopedia v2.01R (USA) + 1994 Sega - + + - + - + - - + + - Eternal Champions - Challenge From the Dark Side (Europe) + Compton's Interactive Encyclopedia v2.01S (USA) + 1994 + Compton's NewMedia + + + + + + + + + + + + Corpse Killer (Europe) + 1994 + Digital Pictures + + + + + + + + + + + + + Corpse Killer (USA, 32X) 1995 - Sega - + Digital Pictures + + + + + + - + - - - Advanced Dungeons & Dragons - Eye of the Beholder (Europe) + Corpse Killer (USA) 1994 - Sega - - + Digital Pictures + + + - + - - - Fahrenheit (France) - 1995 - Sega - + Crime Patrol (USA) + 1994 + American Laser Games + + + - + - + - Fatal Fury Special (Europe) - 1995 - JVC - + Captain Tsubasa (Japan) + 1994 + Tecmo + + + + - + - - - FIFA International Soccer - Championship Edition (Europe) - 1994 - Electronic Arts - + Cyborg 009 (Japan) + 1993 + Nihon Telenet + + + + + - + - + - Flink (Europe) + Daihoushinden (Japan) + 1995 + Victor Entertainment + + + + + + + + + + + + + + Dark Wizard (USA) 1994 - Psygnosis ~ Sony Electronic Publishing - + Sega + + + - + - + - Formula One World Championship - Beyond the Limit (Europe) - 1994 + Dark Wizard - Yomigaeri Shiyami no Madoushi (Japan) + 1993 Sega - + + + + - + - + - Hook (Europe) - 1993 - Sony Imagesoft - + Double Switch (Europe) + 1994 + Sega + + - + - + - Jurassic Park (Germany) - 1994 + Double Switch (Japan) + 1995 Sega - + + + + - + - - - Keio Flying Squadron (Europe) - 1994 - JVC - + Double Switch (USA) + 1993 + Sega + + + - + - + - Lethal Enforcers (Europe) - 1993 - Konami - + Death Bringer - Himerata Monshou - The Knight of Darkness (Japan) + 1992 + Nihon Telenet + + + + - + - - - Lords of Thunder (Europe) - 1995 - Hudson Soft - + Demolition Man (USA) + 1994 + Acclaim Entertainment + + - + - - - Marko's Magic Football (Europe) - 1994 - Domark - + Dennin Aleste - Nobunaga and His Ninja Force (Japan) + 1992 + Compile + + + + + - + - - - Microcosm (Europe) [T-113015-50 14] - 1993 - Psygnosis - + Detonator Orgun (Japan) + 1992 + Hot-B + + + + - + - + - - - Microcosm (Europe) [T-113015-50 24] + Devastator (Japan) 1993 - Psygnosis - + Wolf Team + + + + - + - + - - - Midnight Raiders (Europe) - 1995 - Sega - + Cadillacs and Dinosaurs - The Second Cataclysm (USA) + 1994 + Rocket Science Games + + - + - - - Mighty Morphin Power Rangers (Europe) + Cadillacs and Dinosaurs - The Second Cataclysm (Bra) 1994 - Sega + Tec Toy + + - + - + - NHL Hockey '94 (Europe) + Dragon's Lair (Europe) 1994 - Electronic Arts - + Sega + + - + - - - Night Trap (France) - 1993 + Dragon's Lair (Japan) + 1994 Sega - - - - - - - + + + + + + - + - - - Night Trap (Europe, 32X) - 1995 - Digital Pictures - - - + Dragon's Lair (USA) + 1993 + Sega + + + + - + - + + + + + Dragon's Lair (USA, demo) + 1993 + ReadySoft + + - + - + - Novastorm (Europe) + Dungeon Master II - Skullkeep v1.0 (Europe) 1994 - Psygnosis ~ Sony Electronic Publishing - + JVC + + - + - + - Pitfall - The Mayan Adventure (Europe) + Dungeon Master II - Skullkeep (Japan, v1.0) 1994 - Activision - + Victor Entertainment + + + + - + - - + + - Power Monger (Europe) + Dungeon Master II - Skullkeep (USA) 1994 - Electronic Arts - + JVC + + - + - - - Prize Fighter (Europe) - 1993 - Sega - - + Bram Stoker's Dracula (USA, rev. A) + 1992 + Sony Imagesoft + + + + + - + + - + + + Bram Stoker's Dracula (USA) + 1992 + Sony Imagesoft + + + + + - + - - + Bram Stoker's Dracula (USA, alt) + 1992 + Sony Imagesoft + + + + + + + + + + + + + + Dracula Unleashed (Europe) + 1994 + Sega + + + + + + + + + + + + + + + + + + + + + Dracula Unleashed (USA) + 1993 + Sega + + + + + + + + + + + + + + + + + + + + + + Dune (Europe) + 1993 + Virgin Interactive + + + + + + + + + + + + + Dune (USA) + 1994 + Virgin Interactive + + + + + + + + + + + + + Dungeon Explorer (Europe) + 1995 + Hudson Soft + + + + + + + + + + + + Dungeon Explorer (USA) + 1995 + Sega + + + + + + + + + + + + + Dynamic Country Club (Japan) + 1993 + Sega + + + + + + + + + + + + + + + Earnest Evans (Japan) + 1991 + Wolf Team + + + + + + + + + + + + + + + Ecco the Dolphin (Europe) + 1993 + Sega + + + + + + + + + + + + + Ecco the Dolphin (Europe) [I-2647 A] + 1993 + Sega + + + + + + + + + + + + + Ecco the Dolphin (Europe) [MK-4408P-00135 1] + 1993 + Sega + + + + + + + + + + + + + Ecco the Dolphin CD (Japan, Disc 1 - Ecco the Dolphin) + 1995 + Sega + + + + + + + + + + + + + + Ecco the Dolphin (USA) + 1993 + Sega + + + + + + + + + + + + + Ecco - The Tides of Time (Europe) + 1994 + Sega + + + + + + + + + + + + + Ecco the Dolphin CD (Japan, Disc 2 - Ecco the Dolphin II) + 1995 + Sega + + + + + + + + + + + + + + Ecco - The Tides of Time (USA, alt) + 1994 + Sega + + + + + + + + + + + + + Ecco - The Tides of Time (USA) + 1993 + Sega + + + + + + + + + + + + + Earthworm Jim - Special Edition (Europe) + 1994 + Interplay + + + + + + + + + + + + Earthworm Jim - Special Edition (USA) + 1995 + Interplay + + + + + + + + + + + + ESPN Baseball Tonight (Europe) + 1994 + Sony Imagesoft + + + + + + + + + + + + + ESPN Baseball Tonight (USA) + 1994 + Sony Imagesoft + + + + + + + + + + + + ESPN National Hockey Night (USA) + 1994 + Sony Imagesoft + + + + + + + + + + + + + ESPN NBA Hangtime '95 (USA) + 1994 + Sony Imagesoft + + + + + + + + + + + + ESPN Sunday Night NFL (USA) + 1994 + Sony Imagesoft + + + + + + + + + + + + + + Eternal Champions - Challenge From the Dark Side (Europe) + 1995 + Sega + + + + + + + + + + + + Eternal Champions - Challenge from the Dark Side (USA) + 1995 + Sega + + + + + + + + + + + + + Eternal Champions - Challenge from the Dark Side (USA, alt) + 1995 + Sega + + + + + + + + + + + + + Advanced Dungeons & Dragons - Eye of the Beholder (Europe) + 1994 + Sega + + + + + + + + + + + + + Advanced Dungeons & Dragons - Eye of the Beholder (Japan) + 1994 + Pony Canyon + + + + + + + + + + + + + + Advanced Dungeons & Dragons - Eye of the Beholder (USA) + 1994 + Sega + + + + + + + + + + + + + + Formula One World Championship - Beyond the Limit (Europe) + 1994 + Sega + + + + + + + + + + + + Formula One World Championship - Beyond the Limit (USA) + 1994 + Sega + + + + + + + + + + + + + F1 Circus CD (Japan) + 1994 + Nichibutsu + + + + + + + + + + + + + + + Fahrenheit (Europe) + 1995 + Sega + + + + + + + + + + + + Fahrenheit (France) + 1995 + Sega + + + + + + + + + + + + Fahrenheit (Japan) + 1995 + Sega + + + + + + + + + + + + + + + + Fahrenheit (USA, Sega CD & 32X CD) + 1995 + Sega + + + + + + + + + + + + + + + + + + + + + + + Fatal Fury Special (Europe) + 1995 + JVC + + + + + + + + + + + + Fatal Fury Special (Europe, demo) [Sega Pro CD - issue 46] + 1995 + JVC + + + + + + + + + + + Fatal Fury Special (USA) + 1995 + JVC + + + + + + + + + + + + + Fatal Fury Special (USA, prototype) + 1995 + JVC + + + + + + + + + + + Final Fight CD (Europe) + 1993 + Sega + + + + + + + + + + + + + Final Fight CD (Japan) + 1993 + Sega + + + + + + + + + + + + + + + Final Fight CD (USA) + 1993 + Sega + + + + + + + + + + + + + + Seirei Shinseiki - Fhey Area (Japan) + 1992 + Wolf Team + + + + + + + + + + + + + + + + Seirei Shinseiki - Fhey Area (Japan, R1K) + 1992 + Wolf Team + + + + + + + + + + + + + + + Seirei Shinseiki - Fhey Area (Japan, R2K) + 1992 + Wolf Team + + + + + + + + + + + + + + + FIFA International Soccer - Championship Edition (Europe) + 1994 + Electronic Arts + + + + + + + + + + + + FIFA International Soccer - CE (Europe, demo) [Sega Pro CD - issue 43] + 1994 + Electronic Arts + + + + + + + + + + + FIFA International Soccer - CE (Europe, demo) [Mega Power - issue 13] + 1994 + Electronic Arts + + + + + + + + + + + FIFA International Soccer (USA) + 1994 + Electronic Arts + + + + + + + + + + + + + Flashback - The Quest for Identity (USA) + 1994 + Sega + + + + + + + + + + + + Flashback - The Quest for Identity (Europe, demo) [Sega Pro CD - issue 42] + 1994 + U.S. Gold + + + + + + + + + + + Flink (Europe) + 1994 + Psygnosis ~ Sony Electronic Publishing + + + + + + + + + + + + Flink (USA) + 1994 + Vic Tokai + + + + + + + + + + + + + Mary Shelley's Frankenstein (USA) + 1994 + Sony Imagesoft + + + + + + + + + + + + + + Force Striker (USA, prototype) + 2006 + Good Deal Games + + + + + + + + + + + + Frog Feast (USA) + 2007 + RasterSoft + + + + + + + + + + + Frog Feast (USA, demo) + 2007 + RasterSoft + + + + + + + + + + + Wakusei Woodstock - Funky Horror Band (Japan) + 1991 + Sega + + + + + + + + + + + + + + + Gambler Jikochuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) + 1992 + Game Arts + + + + + + + + + + + + + + + Game no Kandume Vol.1 (Japan) + 1994 + Sega + + + + + + + + + + + + + + + Game no Kandume Vol.2 (Japan) + 1994 + Sega + + + + + + + + + + + + + + + Garou Densetsu Special (Japan) + 1995 + Victor Entertainment + + + + + + + + + + + + + + + Aoki Ookami to Shiroki Mejika - Genchou Hishi (Japan) + 1993 + Koei + + + + + + + + + + + + + + + Battletech - Gray Death Legion (USA, prototype) + 200? + Good Deal Games + + + + + + + + + + + Ground Zero Texas (Europe) + 1993 + Sony Imagesoft + + + + + + + + + + + + + + + + + + + + + Ground Zero Texas (USA) + 1993 + Sony Imagesoft + + + + + + + + + + + + + + + + + + + + + + + Ground Zero Texas (USA, alt) + 1993 + Sony Imagesoft + + + + + + + + + + + + + + + + + + + + + Heavenly Symphony (Japan) + 1994 + Sega + + + + + + + + + + + + + + + Heavenly Symphony - Formula One World Championship 1993 Hibaihin (Japan) + 1994 + Sega + + + + + + + + + + + + + + Heavy Nova (Japan) + 1991 + Micronet + + + + + + + + + + + + + + + Heimdall (USA) + 1994 + JVC + + + + + + + + + + + + + + Heimdall (Japan) + 1994 + Victor Entertainment + + + + + + + + + + + + + + + Sherlock Holmes - Consulting Detective Vol. I (Europe) + 1993 + Sega + + + + + + + + + + + + + + Sherlock Holmes - Consulting Detective Vol. I (USA) + 1992 + Sega + + + + + + + + + + + + + + Sherlock Holmes - Consulting Detective Vol. II v1.0 (Europe) + 1993 + Sega + + + + + + + + + + + + + + + + + Sherlock Holmes - Consulting Detective Vol. II (USA) + 1993 + Sega + + + + + + + + + + + + + + + + + + + + + + + Hook (Europe) + 1993 + Sony Imagesoft + + + + + + + + + + + + Hook (USA) + 1992 + Sony Imagesoft + + + + + + + + + + + + + Hook (USA, alt) + 1992 + Sony Imagesoft + + + + + + + + + + + + + Heart of the Alien - Out of this World Parts I and II (USA) + 1994 + Virgin Interactive + + + + + + + + + + + + + + Illusion City - Genei Toshi (Japan) + 1993 + Micro Cabin + + + + + + + + + + + + + + + INXS (Europe) + 1993 + Sega + + + + + + + + + + + + INXS (USA) + 1992 + Sega + + + + + + + + + + + + Iron Helix (USA) + 1994 + Spectrum Holobyte + + + + + + + + + + + + + Ishii Hisaichi no Daisekai (Japan) + 1994 + Sega + + + + + + + + + + + + + + Jaguar XJ220 (Europe) + 1993 + Sega + + + + + + + + + + + + + Jaguar XJ220 (Japan) + 1993 + Victor Entertainment + + + + + + + + + + + + + + + Jaguar XJ220 (USA) + 1993 + JVC + + + + + + + + + + + + + Jangou World Cup (Japan) + 1993 + Victor Entertainment + + + + + + + + + + + + + + + Jeopardy! (USA) + 1993 + Sony Imagesoft + + + + + + + + + + + + + + Joe Montana's NFL Football (USA) + 1993 + Sega + + + + + + + + + + + + + + + Johnny Mnemonic (USA, prototype) + 1995? + Sega + + + + + + + + + + + + + + + + + + + Jurassic Park (Europe) + 1993 + Sega + + + + + + + + + + + + + Jurassic Park (Germany) + 1994 + Sega + + + + + + + + + + + + Jurassic Park (Japan) + 1994 + Sega + + + + + + + + + + + + + + Jurassic Park (USA) + 1994 + Sega + + + + + + + + + + + + + + Jurassic Park (USA, prototype) + 1993? + Sega + + + + + + + + + + + The Masked Rider - Kamen Rider ZO (USA) + 1994 + Sega + + + + + + + + + + + + Kamen Rider ZO (Japan) + 1994 + Toei Animation + + + + + + + + + + + + + + + Keio Flying Squadron (Europe) + 1994 + JVC + + + + + + + + + + + + Keio Flying Squadron (Europe, demo) [Sega Pro CD - issue 03] + 1994 + JVC + + + + + + + + + + + Keiou Yuugekitai (Japan) + 1993 + Victor Entertainment + + + + + + + + + + + + + + + Keiou Yuugekitai Taikenban Hibaihin (Japan) + 1993 + Victor Entertainment + + + + + + + + + + + + + + Keio Flying Squadron (USA) + 1995 + JVC + + + + + + + + + + + + + Kids on Site (Europe) + 1994 + Digital Pictures + + + + + + + + + + + + Kids on Site (USA) + 1994 + Digital Pictures + + + + + + + + + + + + + Kris Kross (Europe) + 1993 + Sony Imagesoft + + + + + + + + + + + + Kris Kross (USA) + 1992 + Sony Imagesoft + + + + + + + + + + + + + The Lawnmower Man (USA) + 1994 + Sales Curve Interactive + + + + + + + + + + + + The Lawnmower Man (Europe, demo) [Mega Power - issue 16] + 1994 + Time Warner Interactive + + + + + + + + + + + Lethal Enforcers II - Gun Fighters (Europe) + 1994 + Konami + + + + + + + + + + + + + Lethal Enforcers II - Gun Fighters (Europe, demo) [Mega Power - issue 19] + 1994 + Konami + + + + + + + + + + + Lethal Enforcers II - The Western (Japan) + 1994 + Konami + + + + + + + + + + + + + + Lethal Enforcers II - Gun Fighters (USA) + 1994 + Konami + + + + + + + + + + + + + + Lethal Enforcers (Europe) + 1993 + Konami + + + + + + + + + + + + Lethal Enforcers (Japan) + 1993 + Konami + + + + + + + + + + + + + + Lethal Enforcers (USA) + 1993 + Konami + + + + + + + + + + + + + + + Lethal Enforcers (USA, alt) + 1993 + Konami + + + + + + + + + + + + + + Links - The Challenge of Golf (USA) + 1994 + Virgin Interactive + + + + + + + + + + + + + Links - The Challenge of Golf (USA, alt) + 1994 + Virgin Interactive + + + + + + + + + + + + + Loadstar - The Legend of Tully Bodine (USA) + 1994 + Rocket Science Games + + + + + + + + + + + + + Lodoss Tou Senki - Eiyuu Sensou (Japan) + 1994 + Sega + + + + + + + + + + + + + + + Lodoss Tou Senki - Eiyuu Sensou - Record of Lodoss War (Japan, demo) + 1994 + Sega + + + + + + + + + + + Lords of Thunder (Europe) + 1995 + Hudson Soft + + + + + + + + + + + + Lords of Thunder (USA) + 1995 + Sega + + + + + + + + + + + + + Lunar - The Silver Star (USA) + 1993 + Game Arts + + + + + + + + + + + + + Lunar - The Silver Star (Japan) + 1992 + Game Arts + + + + + + + + + + + + + + + Lunar - The Silver Star (Japan, R2) + 1992 + Game Arts + + + + + + + + + + + + + + + + Lunar - The Silver Star (Japan, R1M) + 1992 + Game Arts + + + + + + + + + + + + + + + Lunar - Eternal Blue (USA) + 1995 + Game Arts + + + + + + + + + + + + + Lunar - Eternal Blue (Japan, set 1) + 1994 + Game Arts + + + + + + + + + + + + + + + + Lunar - Eternal Blue (Japan, set 3) + 1994 + Game Arts + + + + + + + + + + + + + + + Lunar - Eternal Blue (Japan, set 2) + 1994 + Game Arts + + + + + + + + + + + + + + + Lunar - Eternal Blue - Premium CD (Japan) [CD-Audio] + 1994 + Game Arts + + + + + + + + + + + + Lunar - Eternal Blue Hibaihin Auto Demo (Japan) + 1994 + Game Arts + + + + + + + + + + + + + + Mad Dog McCree (USA) + 1993 + American Laser Games + + + + + + + + + + + + + Mad Dog II - The Lost Gold (USA) + 1994 + American Laser Games + + + + + + + + + + + + Mansion of Hidden Souls (USA) + 1994 + Vic Tokai + + + + + + + + + + + + + + + Marko's Magic Football (Europe) + 1994 + Domark + + + + + + + + + + + + + Marko (USA, prototype) + 200? + Good Deal Games + + + + + + + + + + + Marky Mark and The Funky Bunch (USA) + 1992 + Sega + + + + + + + + + + + + MegaRace (USA) + 1993 + The Software Toolworks + + + + + + + + + + + + + Mega Schwarzschild (Japan) + 1993 + Sega + + + + + + + + + + + + + + Microcosm (Europe) [T-113015-50 14] + 1993 + Psygnosis + + + + + + + + + + + + + Microcosm (Europe) [T-113015-50 24] + 1993 + Psygnosis + + + + + + + + + + + + + Microcosm (Japan) + 1994 + Victor Entertainment + + + + + + + + + + + + + + + Microcosm Demo CD (Japan) + 1994 + Victor Entertainment + + + + + + + + + + + + + + Microcosm (USA) + 1993 + Psygnosis + + + + + + + + + + + + + Midnight Raiders (Europe) + 1995 + Sega + + + + + + + + + + + + Midnight Raiders (USA) + 1994 + Sega + + + + + + + + + + + + + Might and Magic III - Isles of Terra (Japan) + 1993 + CRI + + + + + + + + + + + + + + Mortal Kombat (Europe) + 1994 + Arena + + + + + + + + + + + + + Mortal Kombat (Japan) + 1994 + Acclaim Japan + + + + + + + + + + + + + + Mortal Kombat (USA) + 1994 + Arena + + + + + + + + + + + + + + Mickey Mania (Europe) + 1994 + Sony Imagesoft + + + + + + + + + + + + + Mickey Mania (Europe, demo) [Mega Power - issue 17, Sega Pro CD - issue 40] + 1994 + Sony Imagesoft + + + + + + + + + + + Mickey Mania (Europe, demo) [MegaSEGA] + 1994 + Sony Imagesoft + + + + + + + + + + + Mickey Mania - Timeless Adventures of Mickey Mouse (USA) + 1994 + Sony Imagesoft + + + + + + + + + + + + + + Mighty Mighty Missile! (USA) + 2005 + Good Deal Games + + + + + + + + + + + Mighty Morphin Power Rangers (Europe) + 1994 + Sega + + + + + + + + + + + Saban's Mighty Morphin Power Rangers (USA) + 1995 + Sega + + + + + + + + + + + + + + The Secret of Monkey Island (USA) + 1992 + JVC + + + + + + + + + + + + + + The Secret of Monkey Island - Monkey Island Yurei - Kaizoku Oosoudou! (Japan) + 1993 + Victor Entertainment + + + + + + + + + + + + + + My Paint (USA) + 1993 + Saddleback Graphics + + + + + + + + + + + + + Yumemi Mystery Mansion (Europe) + 1994 + Sega + + + + + + + + + + + + Yumemi Yakata no Monogatari (Japan) + 1993 + Sega + + + + + + + + + + + + + + + Yumemi Yakata no Monogatari Hibaihin (Japan) + 1993 + Sega + + + + + + + + + + + + + + NBA Jam (Europe) + 1994 + Acclaim Entertainment + + + + + + + + + + + + + NBA Jam (Japan) + 1993 + Acclaim Japan + + + + + + + + + + + + + + NBA Jam (USA) + 1994 + Arena + + + + + + + + + + + + + + NFL's Greatest - San Francisco VS Dallas 1978-1993 (USA) + 1993 + Sega + + + + + + + + + + + + + + NFL Football Trivia Challenge (USA) + 1994 + CapDisc + + + + + + + + + + + + NHL Hockey '94 (Europe) + 1994 + Electronic Arts + + + + + + + + + + + + NHL '94 (USA) + 1993 + Electronic Arts + + + + + + + + + + + + + + The Ninjawarriors (Japan) + 1993 + Taito + + + + + + + + + + + + + + Nobunaga no Yabou - Haouden (Japan) + 1994 + Koei + + + + + + + + + + + + + + Nostalgia 1907 (Japan) + 1991 + Takeru + + + + + + + + + + + + + + + Nostalgia 1907 in North Atlantic Sea - Original Sound Track Ver. 2 (Japan) [CD-Audio] + 1992 + Takeru + + + + + + + + + + + Novastorm (Europe) + 1994 + Psygnosis ~ Sony Electronic Publishing + + + + + + + + + + + + Novastorm (Europe, demo) [Sega Pro CD - issue 02] + 1994 + Psygnosis ~ Sony Electronic Publishing + + + + + + + + + + + Novastorm (USA) + 1994 + Psygnosis + + + + + + + + + + + + Night Striker (Japan, Korea) + 1993 + Taito + + + + + + + + + + + + + + + Night Trap (Europe) + 1993 + Sega + + + + + + + + + + + + + + + + + + + + + Night Trap (Europe, 32X) + 1995 + Digital Pictures + + + + + + + + + + + + + + + + + + Night Trap (USA, 32X) + 1994 + Digital Pictures + + + + + + + + + + + + + + + + + + + + + + + + Night Trap (France) + 1993 + Sega + + + + + + + + + + + + + + + + + Night Trap (Japan) + 1993 + Sega + + + + + + + + + + + + + + + + + + + + + + + + Night Trap Hibaihin (Japan) + 1993 + Sega + + + + + + + + + + + + + + Night Trap (USA, Re-Release) + 1995 + Sega + + + + + + + + + + + + + + + + + + + + + Night Trap (USA) + 1992 + Sega + + + + + + + + + + + + + + + + + + + + + + + + + Night Trap (USA, alt) + 1992 + Sega + + + + + + + + + + + + + + + + + + + + + + + Panic! (USA) + 1994 + Data East + + + + + + + + + + + + + + Penn & Teller's Smoke and Mirrors (USA, prototype) + 1995? + Absolute Entertainment + + + + + + + + + + + + + + + + + + + Pitfall - The Mayan Adventure (Europe) + 1994 + Activision + + + + + + + + + + + + Pitfall - The Mayan Adventure (Europe, demo) [Sega Pro CD - issue 41] + 1994 + Activision + + + + + + + + + + + Pitfall - The Mayan Adventure (USA) + 1995 + Activision + + + + + + + + + + + + + Power Monger (Europe) + 1994 + Electronic Arts + + + + + + + + + + + + Power Monger (USA) + 1994 + Electronic Arts + + + + + + + + + + + + + Popful Mail (USA) + 1995 + Sega + + + + + + + + + + + + + + Popful Mail (Japan) + 1994 + Sega + + + + + + + + + + + + + + + Popful Mail Taikenban Hibaihin (Japan) + 1994 + Sega + + + + + + + + + + + + + + Prince of Persia (Europe) + 1993 + Sega + + + + + + + + + + + + + Prince of Persia (Japan) + 1992 + Victor Entertainment + + + + + + + + + + + + + + + Prince of Persia (USA) + 1992 + Sega + + + + + + + + + + + + + + + Ultraverse Prime (USA) + 1994 + Sony Imagesoft + + + + + + + + + + + + Prize Fighter (Europe) + 1993 + Sega + + + + + + + + + + + + + + + + + Prize Fighter (Japan) + 1995 + Sega + + + + + + + + + + + + + + + + + + + + + Prize Fighter (USA) + 1994 + Sega + + + + + + + + + + + + + + + + + + + + + + Pro Yakyuu Super League CD (Japan) + 1992 + Sega + + + + + + + + + + + + + + + + Pier Solar and the Great Architects Enhanced Soundtrack Disc (World) + 2010 + WaterMelon + + + + + + + + + + + + + + + + + Psychic Detective Series vol.3 - AYA (Japan) + 1993 + Data West + + + + + + + + + + + + + + + Psychic Detective Series vol.3 - AYA Auto Demo (Japan) + 1993 + Data West + + + + + + + + + + + + + + Psychic Detective Series vol.4 - Orgel (Japan) + 1993 + Data West + + + + + + + + + + + + + + Microcosm, Puggsy and Wiz 'N' Liz (Europe, demo) [Mega Power - issue 06] + 1994 + Psygnosis + + + + + + + + + + Puggsy (Europe) 1993 - Psygnosis - + Psygnosis + + + + + + + + + + + + Puggsy (USA) + 1994 + Psygnosis + + + + + + + + + + + + + + Quiz Scramble Special (Japan, rev. B) + 1992 + Sega + + + + + + + + + + + + + + + + Quiz Scramble Special (Japan, R1M) + 1992 + Sega + + + + + + + + + + + + + + + Quiz Scramble Special (Japan, R2M) + 1992 + Sega + + + + + + + + + + + + + + + Quiz Tonosama no Yabou (Japan) + 1992 + SIMS + + + + + + + + + + + + + + + Racing Aces (USA) + 1993 + Sega + + + + + + + + + + + + + Radical Rex (USA) + 1994 + Activision + + + + + + + + + + + + WWF Rage in the Cage (Europe) + 1993 + Arena + + + + + + + + + + + + WWF Rage in the Cage (USA) + 1993 + Arena + + + + + + + + + + + + + + Ranma ½ - Byakuranaika (Japan) + 1993 + NCS + + + + + + + + + + + + + + + Road Blaster FX (Japan) + 1992 + Wolf Team + + + + + + + + + + + + + + + RDF - Global Conflict (USA) + 1994 + Absolute Entertainment + + + + + + + + + + + + + Revenge of the Ninja (USA) + 1993 + Renovation + + + + + + + + + + + + + Revengers of Vengeance (USA) + 1994 + Extreme Entertainment Group + + + + + + + + + + + + Rise of the Dragon (USA, rev. A) + 1994 + Dynamix + + + + + + + + + + + + + Rise of the Dragon (USA) + 1993 + Dynamix + + + + + + + + + + + + + + Rise of the Dragon - A Blade Hunter Mystery (Japan) + 1992 + Sega + + + + + + + + + + + + + + + Road Avenger (Europe) + 1993 + Sega + + + + + + + + + + + + + + Road Avenger (USA) + 1993 + Renovation + + + + + + + + + + + + + + + Road Rash (USA) + 1995 + Electronic Arts + + + + + + + + + + + + + + Road Rash (USA, prototype, beta 3 - 19950211) + 1995 + Sega + + + + + + + + + + + Robo Aleste (Europe) + 1993 + Sega + + + + + + + + + + + + Robo Aleste (USA) + 1993 + Tengen + + + + + + + + + + + + + Warau Salesman (Japan) + 1993 + Sega + + + + + + + + + + + + + + Samurai Shodown (Europe) + 1995 + JVC + + + + + + + + + + + + Samurai Shodown (Europe, demo) [Sega Pro CD - issue 47] + 1995 + JVC + + + + + + + + + + + Samurai Shodown (USA) + 1995 + JVC + + + + + + + + + + + + + Sangokushi III (Japan) + 1993 + Koei + + + + + + + + + + + + + + + Sega Classics Arcade Collection - Limited Edition (Europe) [6105411P-00036A-R1M] + 1992 + Sega + + + + + + + + + + + + + Sega Classics Arcade Collection - Limited Edition (Europe) [610-5411P-00036A 2] + 1993 + Sega + + + + + + + + + + + + + Sega Classic Arcade Collection - Limited Edition (Japan) + 1993 + Sega + + + + + + + + + + + + + + + + Sega Classic Arcade Collection - Limited Edition (Japan, R1M) + 1993 + Sega + + + + + + + + + + + + + + + Sega Classic Arcade Collection - Limited Edition (Japan, R2M) + 1993 + Sega + + + + + + + + + + + + + + + + Sega Classics Arcade Collection (USA, 4 in 1) + 1992 + Sega + + + + + + + + + + + + + + Sega Classics Arcade Collection (USA, 4 in 1, alt) + 1992 + Sega + + + + + + + + + + + + + + Sega Classics Arcade Collection (USA, 5 in 1) + 1993 + Sega + + + + + + + + + + + + Sengoku Denshou (Japan) + 1993 + Sammy + + + + + + + + + + + + + + Sensible Soccer (Europe) + 1993 + Sony Imagesoft + + + + + + + + + + + + Sensible Soccer v1.08 (Europe, demo) [Mega Power - Issue 12, Sega Pro CD - issue 44] + 19?? + <unknown> + + + + + + + + + + + Shadowrun (Japan) + 1996 + Compile + + + + + + + + + + + + + + Shining Force CD (Europe) + 1995 + Sega + + + + + + + + + + + + Shining Force CD (Japan) + 1994 + Sega + + + + + + + + + + + + + + + Shining Force CD (USA) + 1994 + Sega + + + + + + + + + + + + Shining Force CD (USA, alt) + 1994 + Sega + + + + + + + + + + + + + + Shining Force CD (USA, prototype) + 1994 + Sega + + + + + + + + + + + Shin Megami Tensei (Japan) + 1994 + SIMS + + + + + + + + + + + + + + + Mahou no Shoujo - Silky Lip (Japan, R2M) + 1992 + Nihon Telenet + + + + + + + + + + + + + + + Mahou no Shoujo - Silky Lip (Japan, R1M) + 1992 + Nihon Telenet + + + + + + + + + + + + + + + Silpheed (Europe) + 1993 + Sega + + + + + + + + + + + + + Silpheed (Japan) + 1993 + Game Arts + + + + + + + + + + + + + + + + Silpheed Hibaihin (Japan) + 1993 + Game Arts + + + + + + + + + + + + + + Silpheed Hibaihin (Japan) (fixed) + 1993 + Game Arts + + + + + + + + + + + + + + Silpheed (USA) + 1993 + Sega + + + + + + + + + + + + + + SimEarth (Japan) + 1993 + Sega + + + + + + + + + + + + + Sing! Teddyboy Blues [MP3-sourced] + 19?? + Sega + + + + + + + + + + + Slam City with Scottie Pippen (Europe) + 1994 + Digital Pictures + + + + + + + + + + + + + + + + + + + + + + + + + + + Slam City with Scottie Pippen (Europe, 32X) + 1994 + Digital Pictures + + + + + + + + + + + + + + + + + + + + + + + + + + + + Slam City with Scottie Pippen (USA, 32X) + 1994 + Digital Pictures + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Slam City with Scottie Pippen (Europe, alt) + 1994 + Digital Pictures + + + + + + + + + + + + + + + + + + + + + Slam City with Scottie Pippen (Europe, demo) + 1994 + Digital Pictures + + + + + + + + + + + Slam City with Scottie Pippen (USA, rev. A) + 1994 + Digital Pictures + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Slam City with Scottie Pippen (USA) + 1994 + Digital Pictures + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The Smurfs (Europe) + 1994 + Infogrames + + + + + + + + + + + + + Snatcher (Europe) + 1994 + Konami + + + + + + + + + + + + Snatcher (USA) + 1994 + Konami + + + + + + + + + + + + + + Sol-Feace (Europe) + 1992 + Sega + + + + + + + + + + + + + Sol-Feace (Europe) [MK-4130P-00033 2] + 1993 + Sega + + + + + + + + + + + + + Sol-Feace (Europe) [MK-4130P-00033-R1M] + 1993 + Sega + + + + + + + + + + + + + Sol-Feace (Japan) + 1991 + Wolf Team + + + + + + + + + + + + + + + + Sol-Feace (USA) + 1992 + Sega + + + + + + + + + + + + + Sonic CD (Europe) + 1993 + Sega + + + + + + + + + + + + + Sonic the Hedgehog CD (Japan) + 1993 + Sega + + + + + + + + + + + + + + + Sonic the Hedgehog CD Hibaihin (Japan) + 1993 + Sega + + + + + + + + + + + + + + + Sonic the Hedgehog CD (USA, R1C) + 1993 + Sega + + + + + + + + + + + + + + + + CD Sonic the Hedgehog (USA, prototype 19930510) + 1993 + Sega + + + + + + + + + + + Sonic the Hedgehog CD (USA, prototype 19930712) + 1993 + Sega + + + + + + + + + + + + Sonic the Hedgehog CD (USA, prototype 19930920) + 1993 + Sega + + + + + + + + + + + Sonic the Hedgehog CD (USA, R7D) + 1993 + Sega + + + + + + + + + + + + + + + + Sonic the Hedgehog CD (USA, R8C) + 1993 + Sega + + + + + + + + + + + + + + Sonic the Hedgehog CD (USA, R4C) + 1993 + Sega + + + + + + + + + + + + + + + SoulStar (Europe) + 1994 + Sega + + + + + + + + + + + + + SoulStar (Europe, demo) [Mega Power - Issue 10, Sega Pro CD - issue 49] + 1994 + Core + + + + + + + + + + + SoulStar (Japan) + 1994 + Victor Entertainment + + + + + + + + + + + + + + Soul Star (USA) + 1994 + Core Design + + + + + + + + + + + + + + Space Ace (USA) + 1994 + ReadySoft + + + + + + + + + + + + + Space Ace (USA, demo) + 1994 + ReadySoft + + + + + + + + + + + The Amazing Spider-Man Vs. The Kingpin (Europe) + 1993 + Sega + + + - + - + + + The Amazing Spider-Man vs. The Kingpin (USA) + 1993 + Sega + + + + + + + + + + + + + + Sewer Shark (Europe) + 1992 + Sony Imagesoft + + + + + + + + + + + + + + Sewer Shark (USA, rev. B) + 1992 + Sega + + + + + + + + + + + + + + Sewer Shark (USA) + 1992 + Sega + + + + + + + + + + + + + + Sewer Shark (USA, rev. A) + 1992 + Sony Imagesoft + + + + + + + + + + + + + + + Sewer Shark (USA, rev. B, alt) + 1992 + Sega + + + + + + + + + + + + + + Sewer Shark (USA, rev. B, alt 2) + 1992 + Sega + + + + + + + + + + + - Robo Aleste (Europe) + StarBlade (Europe) + 1994 + Sega + + + + + + + + + + + + Starblade (Japan) + 1994 + Namco + + + + + + + + + + + + + + + StarBlade (USA) + 1994 + Namco + + + + + + + + + + + + + + Star Strike (USA, prototype) + 2001 + Good Deal Games + + + + + + + + + + + Stellar-Fire (USA) + 1993 + Dynamix + + + + + + + + + + + + + + Egawa Suguru no Super League CD (Japan) 1993 Sega - + + + + + - + - + + Supreme Warrior - Ying Heung (Europe) + 1994 + Digital Pictures + + + + + + + + + + + + + + + + + Supreme Warrior - Ying Heung (Europe, 32X) + 1995 + Digital Pictures + + + + + + + + + + + + + + + + + + Supreme Warrior (USA, 32X) + 1994 + Digital Pictures + + + + + + + + + + + + + + + + + + + + + + - Samurai Shodown (Europe) - 1995 - JVC - - + Supreme Warrior (USA) + 1994 + Digital Pictures + + + + + + + - + + + + + + + + - + - Sega Classics Arcade Collection - Limited Edition (Europe) [610-5411P-00036A 2] - 1993 + Surgical Strike (Europe) + 1995 Sega - + + - - + - - - Sensible Soccer (Europe) - 1993 - Sony Imagesoft - + Surgical Strike (Brazil, 32X) + 1996 + Tec Toy + + + - + - - - Sherlock Holmes - Consulting Detective Vol. II v1.0 (Europe) - 1993 + Surgical Strike (USA) + 1995 Sega - - - - - - - + + + + - + - + - Shining Force CD (Europe) - 1995 - Sega - + The Software Toolworks' Star Wars Chess (Europe) + 1994 + Mindscape + + - + - - - Slam City with Scottie Pippen (Europe) + The Software Toolworks' Star Wars Chess (USA) 1994 - Digital Pictures - - + The Software Toolworks + + + + - + - + + + + + Switch (Japan) + 1993 + Sega + + + + + + - + - + + + + + Star Wars - Rebel Assault (Europe) + 1994 + JVC + + + + - + - + + + + + Star Wars - Rebel Assault (Europe, demo) [Mega Power - issue 15] + 1994 + JVC + + - + - - - Slam City with Scottie Pippen (Europe, 32X) + Star Wars - Rebel Assault (Europe, demo) [Sega Pro CD - issue 01] 1994 - Digital Pictures - - - + JVC + + - + - + + + + + Star Wars - Rebel Assault (Japan) + 19?? + Victor Entertainment + + + + + + - + - + + + + + Star Wars - Rebel Assault (USA) + 1994 + JVC + + + + + - + - + + + + + Syndicate (Europe) + 1995 + Domark + + + - + - - - Snatcher (Europe) - 1994 - Konami - + Syndicate (USA, prototype) + 19?? + <unknown> + - + - - - The Software Toolworks' Star Wars Chess (Europe) + Tomcat Alley (Europe) 1994 - Mindscape - + Sega + + + - + - + - Sol-Feace (Europe) [MK-4130P-00033 2] - 1993 + Tomcat Alley (France) + 1994 Sega - + + - - + - - - Sol-Feace (Europe) [MK-4130P-00033-R1M] - 1993 + Tomcat Alley (Germany) + 1994 Sega - + + - + - + - + - StarBlade (Europe) + Tomcat Alley (Japan) 1994 Sega - + + + + - + - + - Supreme Warrior - Ying Heung (Europe) + Tomcat Alley (Spain) 1994 - Digital Pictures - - + Sega + + + - + - + + + + + Tomcat Alley (USA) + 1994 + Sega + + + + + - + - - - Supreme Warrior - Ying Heung (Europe, 32X) - 1995 - Digital Pictures - - - + Tomcat Alley (USA, alt) + 1994 + Sega + + + + - + - + + + + + Tenbu Mega CD Special (Japan) + 1992 + Wolf Team + + + + + + - + - + - Surgical Strike (Europe) - 1995 - Sega - + Tenbu Mega CD Special (Japan) [CD-Audio] + 1992 + Wolf Team + + - + - - - Syndicate (Europe) - 1995 - Domark - + Tenkafubu - Eiyuutachi no Houkou (Japan) + 1991 + Game Arts + + + + + - + @@ -3261,6 +15228,7 @@ Requires [disc swap] 1994 Virgin Interactive + @@ -3268,70 +15236,59 @@ Requires [disc swap] - - - Theme Park (Europe) - 1995 - Domark - + The Terminator (USA) + 1993 + Virgin Games + + + + - + - - - Thunderhawk (Europe) [SEGAT115015RE R4C] + Thunderhawk (Europe) 1993 Core Design + - + - + @@ -3356,6 +15313,7 @@ Requires [disc swap] 1993 Core Design + @@ -3364,145 +15322,166 @@ Requires [disc swap] - + - Tomcat Alley (Spain) - 1994 - Sega - + Thunderhawk (Europe) [SEGAT115015RE R4C] + 1993 + Core Design + + + - + - - - Tomcat Alley (France) - 1994 - Sega - + Thunderhawk (Europe, demo) [Mega Power - issue 04] + 1993 + Core + - + - - - Wonder Dog (Europe) + Thunderhawk (Europe, demo) 1993 - Sega - + Core + - + - - - World Cup USA 94 (Europe) - 1994 - U.S. Gold - + Thunderhawk (Japan) + 1993 + Victor Entertainment + + + + + - + - - - WWF Rage in the Cage (Europe) - 1993 - Arena - + Thunderhawk Hibaihin (Japan) + 1993 + Victor Entertainment + + + + - + - + - Yumemi Mystery Mansion (Europe) - 1994 - Sega - + Theme Park (Europe) + 1995 + Domark + + - + - - + TimeCop (Europe, demo) [Sega Pro CD - issue 45] + 1995 + JVC + + + + + + + + Time Cop (Europe, early prototype) 19?? <unknown> + @@ -3529,764 +15527,1012 @@ Requires [disc swap] - - + + - INXS (Europe) + Timecop (USA, prototype) + 200? + Good Deal Games + + + + + + + + + + + + Timecop (USA, early prototype) + 19?? + <unknown> + + + + + + + + + + + Time Gal (Europe) 1993 Sega - + + + - + - - - Kids on Site (Europe) - 1994 - Digital Pictures - + Time Gal (Japan) + 1992 + Wolf Team + + + + + + - + - - - Kris Kross (Europe) + Time Gal (USA) 1993 - Sony Imagesoft - + Renovation + + + + - + - - - Mickey Mania (Europe, demo) [MegaSEGA] - 1994 - Sony Imagesoft + Trivial Pursuit (USA) + 1993 + Parker Brothers + + + - + - + + + Thunder Storm FX (Japan) + 1992 + Wolf Team + + + + + + + + + + + + + + - Power Factory featuring C+C Music Factory (Europe) - 1993 - Sony Imagesoft + Thunder Storm FX (Japan, R1) + 19?? + Sega + + + + + - + - + - The San Diego Zoo Presents The Animals! - A Multimedia Experience (Europe) - 1994 - Mindscape - + Thunder Storm FX (Japan, R2) + 1992 + Wolf Team + + + + + - + - - - Slam City with Scottie Pippen (Europe, demo) + Urusei Yatsura - Dear My Friends (Japan) 1994 - Digital Pictures + Game Arts + + + + + - + - - - Thunderhawk (Europe, demo) - 1993 - Core + Urusei Yatsura - Dear My Friends Hibaihin (Japan) + 1994 + Game Arts + + + + - + + + + Vay (USA) + 1994 + Working Designs + + + + + + + + + - - - - - Thunderhawk (Europe, demo) [Mega Power - issue 04] + Vay - Ryuusei no Yoroi (Japan) 1993 - Core + SIMS + + + + + - + - - - Microcosm, Puggsy and Wiz 'N' Liz (Europe, demo) [Mega Power - issue 06] - 1994 - Psygnosis + Virtual VCR - The Colors of Modern Rock (USA) + 1993 + Sega / Warner Custom Music + + - + - - - SoulStar (Europe, demo) [Mega Power - Issue 10, Sega Pro CD - issue 49] + World Cup USA 94 (Europe) 1994 - Core + U.S. Gold + + - + - - - Battlecorps (Europe, demo) [Mega Power - Issue 11, Sega Pro CD - issue 50] + World Cup USA 94 (USA) 1994 - Core + U.S. Gold + + + - + - - - Sensible Soccer v1.08 (Europe, demo) [Mega Power - Issue 12, Sega Pro CD - issue 44] - 19?? - <unknown> + Wheel of Fortune (USA) + 1994 + Sony Imagesoft + + + - + - - - FIFA International Soccer - CE (Europe, demo) [Mega Power - issue 13] + Who Shot Johnny Rock? (USA) 1994 - Electronic Arts + American Laser Games + + + - + - - - Battlecorps and SoulStar (Europe, demo) [Mega Power - issue 14] - 1994 - Core + Wild Woody (USA) + 1995 + Sega + + - + - - - Star Wars - Rebel Assault (Europe, demo) [Mega Power - issue 15] - 1994 - JVC + The Adventures of Willy Beamish (USA) + 1993 + Dynamix + + + - + - - - The Lawnmower Man (Europe, demo) [Mega Power - issue 16] - 1994 - Time Warner Interactive + Wing Commander (USA) + 1993 + Electronic Arts + + + + - + - - - Mickey Mania (Europe, demo) [Mega Power - issue 17, Sega Pro CD - issue 40] + Wing Commander (Japan) 1994 - Sony Imagesoft + Sega + + + + + - + - - - BC Racers (Europe, demo) [Mega Power - issue 18] - 1994 - Core + Winning Post (Japan) + 1993 + Koei + + + + + - + - - - Lethal Enforcers II - Gun Fighters (Europe, demo) [Mega Power - issue 19] - 1994 - Konami + + + WireHead (USA) + 1995 + Sega + + + - + - - + + - Star Wars - Rebel Assault (Europe, demo) [Sega Pro CD - issue 01] + What is X'Eye Multi Entertainment System (USA) 1994 JVC + + + - + - - - Novastorm (Europe, demo) [Sega Pro CD - issue 02] - 1994 - Psygnosis ~ Sony Electronic Publishing + WonderMega Collection - Game Garden (alt) + 1992 + Victor Entertainment + + + + - + - - - Keio Flying Squadron (Europe, demo) [Sega Pro CD - issue 03] - 1994 - JVC + Wolfchild (Europe) + 1993 + Sega + + + - + - - - BC Racers (Europe, demo) [Sega Pro CD - issue 41] - 1994 - Core + Wolfchild (Japan) + 1993 + Victor Entertainment + + + + + - + - - - Pitfall - The Mayan Adventure (Europe, demo) [Sega Pro CD - issue 41] - 1994 - Activision + Wolfchild (USA) + 1992 + JVC + + + - + - - - Flashback - The Quest for Identity (Europe, demo) [Sega Pro CD - issue 42] - 1994 - U.S. Gold + Wonder Dog (Europe) + 1993 + Sega + + - + - - - FIFA International Soccer - CE (Europe, demo) [Sega Pro CD - issue 43] - 1994 - Electronic Arts + Wonder Dog (Japan) + 1992 + Victor Entertainment + + + + + - + - - - TimeCop (Europe, demo) [Sega Pro CD - issue 45] - 1995 + Wonder Dog (USA) + 1992 JVC + + + - + - - - Fatal Fury Special (Europe, demo) [Sega Pro CD - issue 46] - 1995 - JVC + Yumimi Mix (Japan) + 1993 + Game Arts + + + + + - + - - + + + + + + + + Hot Hits - Adventurous New Music Sampler (USA) + 1992 + Sega + + + + + + + + + + + + + - Samurai Shodown (Europe, demo) [Sega Pro CD - issue 47] - 1995 + Karaoke - JVC CD+G Karaoke - Top Hit Sampler (USA) + 1993 JVC + + - + + + + + + + + + Rock Paintings (USA) + 1992 + Sega + + + + + + diff --git a/hash/megacdj.xml b/hash/megacdj.xml deleted file mode 100644 index 074350f9179fd..0000000000000 --- a/hash/megacdj.xml +++ /dev/null @@ -1,5673 +0,0 @@ - - - - - - - - - - After Burner III (Japan) - 1992 - CRI - - - - - - - - - - - - - - AX-101 (Japan) - 1994 - Sega - - - - - - - - - - - - - - Bari-Arm (Japan) - 1993 - Human Entertainment - - - - - - - - - - - - - - Burai - Yatsudama no Yuushi Densetsu (Japan) - 1992 - Sega - - - - - - - - - - - - - - Cosmic Fantasy Stories (Japan) - 1992 - Nihon Telenet - - - - - - - - - - - - - - Cyborg 009 (Japan) - 1993 - Nihon Telenet - - - - - - - - - - - - - - Dennin Aleste - Nobunaga and His Ninja Force (Japan) - 1992 - Compile - - - - - - - - - - - - - - Detonator Orgun (Japan) - 1992 - Hot-B - - - - - - - - - - - - - - Devastator (Japan) - 1993 - Wolf Team - - - - - - - - - - - - - - Dragon's Lair (Japan) - 1994 - Sega - - - - - - - - - - - - - - Dynamic Country Club (Japan) - 1993 - Sega - - - - - - - - - - - - - - Earnest Evans (Japan) - 1991 - Wolf Team - - - - - - - - - - - - - - Egawa Suguru no Super League CD (Japan) - 1993 - Sega - - - - - - - - - - - - - - F1 Circus CD (Japan) - 1994 - Nichibutsu - - - - - - - - - - - - - - Final Fight CD (Japan) - 1993 - Sega - - - - - - - - - - - - - - Gambler Jikochuushinha 2 - Gekitou! Tokyo Mahjongland Hen (Japan) - 1992 - Game Arts - - - - - - - - - - - - - - Game no Kandume Vol.1 (Japan) - 1994 - Sega - - - - - - - - - - - - - - Game no Kandume Vol.2 (Japan) - 1994 - Sega - - - - - - - - - - - - - - Garou Densetsu Special (Japan) - 1995 - Victor Entertainment - - - - - - - - - - - - - - Heavenly Symphony (Japan) - 1994 - Sega - - - - - - - - - - - - - - Heavy Nova (Japan) - 1991 - Micronet - - - - - - - - - - - - - - Heimdall (Japan) - 1994 - Victor Entertainment - - - - - - - - - - - - - - Jaguar XJ220 (Japan) - 1993 - Victor Entertainment - - - - - - - - - - - - - - Jangou World Cup (Japan) - 1993 - Victor Entertainment - - - - - - - - - - - - - - Kamen Rider ZO (Japan) - 1994 - Toei Animation - - - - - - - - - - - - - - Keiou Yuugekitai (Japan) - 1993 - Victor Entertainment - - - - - - - - - - - - - - Lodoss Tou Senki - Eiyuu Sensou (Japan) - 1994 - Sega - - - - - - - - - - - - - - Lunar - Eternal Blue (Japan, set 1) - 1994 - Game Arts - - - - - - - - - - - - - - Lunar - The Silver Star (Japan) - 1992 - Game Arts - - - - - - - - - - - - - - Microcosm (Japan) - 1994 - Victor Entertainment - - - - - - - - - - - - - - Night Striker (Japan, Korea) - 1993 - Taito - - - - - - - - - - - - - - Night Trap (Japan) - 1993 - Sega - - - - - - - - - - - - - - - - - - - - - - - - Nostalgia 1907 (Japan) - 1991 - Takeru - - - - - - - - - - - - - - Popful Mail (Japan) - 1994 - Sega - - - - - - - - - - - - - - Prince of Persia (Japan) - 1992 - Victor Entertainment - - - - - - - - - - - - - - Pro Yakyuu Super League CD (Japan) - 1992 - Sega - - - - - - - - - - - - - - Quiz Scramble Special (Japan, rev. B) - 1992 - Sega - - - - - - - - - - - - - - Quiz Tonosama no Yabou (Japan) - 1992 - SIMS - - - - - - - - - - - - - - Ranma ½ - Byakuranaika (Japan) - 1993 - NCS - - - - - - - - - - - - - - Rise of the Dragon - A Blade Hunter Mystery (Japan) - 1992 - Sega - - - - - - - - - - - - - - Sangokushi III (Japan) - 1993 - Koei - - - - - - - - - - - - - - Sega Classic Arcade Collection - Limited Edition (Japan) - 1993 - Sega - - - - - - - - - - - - - - Seima Densetsu 3x3 Eyes (Japan) - 1993 - Sega - - - - - - - - - - - - - - Seirei Shinseiki - Fhey Area (Japan) - 1992 - Wolf Team - - - - - - - - - - - - - - Shadow of the Beast II - Juushin no Jubaku (Japan) - 1994 - Victor Entertainment - - - - - - - - - - - - - - Shin Megami Tensei (Japan) - 1994 - SIMS - - - - - - - - - - - - - - Shining Force CD (Japan) - 1994 - Sega - - - - - - - - - - - - - - Silpheed (Japan) - 1993 - Game Arts - - - - - - - - - - - - - - Sol-Feace (Japan) - 1991 - Wolf Team - - - - - - - - - - - - - - Sonic the Hedgehog CD (Japan) - 1993 - Sega - - - - - - - - - - - - - - Star Wars - Rebel Assault (Japan) - 19?? - Victor Entertainment - - - - - - - - - - - - - - Starblade (Japan) - 1994 - Namco - - - - - - - - - - - - - - Switch (Japan) - 1993 - Sega - - - - - - - - - - - - - - Tenbu Mega CD Special (Japan) - 1992 - Wolf Team - - - - - - - - - - - - - - Tenkafubu - Eiyuutachi no Houkou (Japan) - 1991 - Game Arts - - - - - - - - - - - - - - Thunder Storm FX (Japan) - 1992 - Wolf Team - - - - - - - - - - - - - - Thunderhawk (Japan) - 1993 - Victor Entertainment - - - - - - - - - - - - - - Time Gal (Japan) - 1992 - Wolf Team - - - - - - - - - - - - - - - Urusei Yatsura - Dear My Friends (Japan) - 1994 - Game Arts - - - - - - - - - - - - - - Vay - Ryuusei no Yoroi (Japan) - 1993 - SIMS - - - - - - - - - - - - - - Wakusei Woodstock - Funky Horror Band (Japan) - 1991 - Sega - - - - - - - - - - - - - - Wing Commander (Japan) - 1994 - Sega - - - - - - - - - - - - - - Winning Post (Japan) - 1993 - Koei - - - - - - - - - - - - - - Wolfchild (Japan) - 1993 - Victor Entertainment - - - - - - - - - - - - - - Wonder Dog (Japan) - 1992 - Victor Entertainment - - - - - - - - - - - - - - Yumemi Yakata no Monogatari (Japan) - 1993 - Sega - - - - - - - - - - - - - - Yumimi Mix (Japan) - 1993 - Game Arts - - - - - - - - - - - - - - - - - A-Rank Thunder Tanjouhen (Japan) - 1993 - Nihon Telenet - - - - - - - - - - - - - After Armageddon Gaiden - Majuu Toushouden Eclipse (Japan) - 1994 - Sega - - - - - - - - - - - - - Aisle Lord (Japan) - 1992 - Wolf Team - - - - - - - - - - - - - Alshark (Japan) - 1993 - Polydor K.K. - - - - - - - - - - - - - Anett Futatabi (Japan) - 1993 - Wolf Team - - - - - - - - - - - - - - Aoki Ookami to Shiroki Mejika - Genchou Hishi (Japan) - 1993 - Koei - - - - - - - - - - - - - Arcus I-II-III (Japan) - 1993 - Wolf Team - - - - - - - - - - - - - Arslan Senki - The Heroic Legend of Arslan (Japan) - 1993 - Sega - - - - - - - - - - - - - Baku-den - The Unbalanced Zone (Japan) - 1994 - Sony Music Entertainment - - - - - - - - - - - - - Battle Fantasy (Japan) - 1994 - Micronet - - - - - - - - - - - - - Battlecorps - 3D Mechanical Battle Simulator (Japan) - 1994 - Victor Entertainment - - - - - - - - - - - - - Black Hole Assault (Japan) - 1992 - Micronet - - - - - - - - - - - - - Captain Tsubasa (Japan) - 1994 - Tecmo - - - - - - - - - - - - - Daihoushinden (Japan) - 1995 - Victor Entertainment - - - - - - - - - - - - - Dark Wizard - Yomigaeri Shiyami no Madoushi (Japan) - 1993 - Sega - - - - - - - - - - - - - Death Bringer - Himerata Monshou - The Knight of Darkness (Japan) - 1992 - Nihon Telenet - - - - - - - - - - - - - Illusion City - Genei Toshi (Japan) - 1993 - Micro Cabin - - - - - - - - - - - - - - Double Switch (Japan) - 1995 - Sega - - - - - - - - - - - - - Dungeon Master II - Skullkeep (Japan, v1.0) - 1994 - Victor Entertainment - - - - - - - - - - - - - - Ecco the Dolphin CD (Japan, Disc 1 - Ecco the Dolphin) - 1995 - Sega - - - - - - - - - - - - - Ecco the Dolphin CD (Japan, Disc 2 - Ecco the Dolphin II) - 1995 - Sega - - - - - - - - - - - - - Advanced Dungeons & Dragons - Eye of the Beholder (Japan) - 1994 - Pony Canyon - - - - - - - - - - - - - Fahrenheit (Japan) - 1995 - Sega - - - - - - - - - - - - - The IIIrd World War (Japan) - 1993 - Micronet - - - - - - - - - - - - - Ishii Hisaichi no Daisekai (Japan) - 1994 - Sega - - - - - - - - - - - - - Jurassic Park (Japan) - 1994 - Sega - - - - - - - - - - - - - Lethal Enforcers (Japan) - 1993 - Konami - - - - - - - - - - - - - Lethal Enforcers II - The Western (Japan) - 1994 - Konami - - - - - - - - - - - - - - Lunar - Eternal Blue (Japan, set 2) - 1994 - Game Arts - - - - - - - - - - - - - - Lunar - Eternal Blue (Japan, set 3) - 1994 - Game Arts - - - - - - - - - - - - - - - Lunar - The Silver Star (Japan, R1M) - 1992 - Game Arts - - - - - - - - - - - - - - Lunar - The Silver Star (Japan, R2) - 1992 - Game Arts - - - - - - - - - - - - - - Mahou no Shoujo - Silky Lip (Japan, R2M) - 1992 - Nihon Telenet - - - - - - - - - - - - - - Mahou no Shoujo - Silky Lip (Japan, R1M) - 1992 - Nihon Telenet - - - - - - - - - - - - - - Mega Schwarzschild (Japan) - 1993 - Sega - - - - - - - - - - - - - Might and Magic III - Isles of Terra (Japan) - 1993 - CRI - - - - - - - - - - - - - Mortal Kombat (Japan) - 1994 - Acclaim Japan - - - - - - - - - - - - - NBA Jam (Japan) - 1993 - Acclaim Japan - - - - - - - - - - - - - The Ninjawarriors (Japan) - 1993 - Taito - - - - - - - - - - - - - Nobunaga no Yabou - Haouden (Japan) - 1994 - Koei - - - - - - - - - - - - - Prize Fighter (Japan) - 1995 - Sega - - - - - - - - - - - - - - - - - - - - Psychic Detective Series vol.3 - AYA (Japan) - 1993 - Data West - - - - - - - - - - - - - Psychic Detective Series vol.4 - Orgel (Japan) - 1993 - Data West - - - - - - - - - - - - - - Quiz Scramble Special (Japan, R1M) - 1992 - Sega - - - - - - - - - - - - - - Quiz Scramble Special (Japan, R2M) - 1992 - Sega - - - - - - - - - - - - - - Road Blaster FX (Japan) - 1992 - Wolf Team - - - - - - - - - - - - - - The Secret of Monkey Island - Monkey Island Yurei - Kaizoku Oosoudou! (Japan) - 1993 - Victor Entertainment - - - - - - - - - - - - - - Sega Classic Arcade Collection - Limited Edition (Japan, R1M) - 1993 - Sega - - - - - - - - - - - - - - Sega Classic Arcade Collection - Limited Edition (Japan, R2M) - 1993 - Sega - - - - - - - - - - - - - - - Seirei Shinseiki - Fhey Area (Japan, R1K) - 1992 - Wolf Team - - - - - - - - - - - - - - Seirei Shinseiki - Fhey Area (Japan, R2K) - 1992 - Wolf Team - - - - - - - - - - - - - - Sengoku Denshou (Japan) - 1993 - Sammy - - - - - - - - - - - - - Shadowrun (Japan) - 1996 - Compile - - - - - - - - - - - - - SimEarth (Japan) - 1993 - Sega - - - - - - - - - - - - - SoulStar (Japan) - 1994 - Victor Entertainment - - - - - - - - - - - - - - Thunder Storm FX (Japan, R1) - 19?? - Sega - - - - - - - - - - - - - - Thunder Storm FX (Japan, R2) - 1992 - Wolf Team - - - - - - - - - - - - - - Tomcat Alley (Japan) - 1994 - Sega - - - - - - - - - - - - - Warau Salesman (Japan) - 1993 - Sega - - - - - - - - - - - - - - - - Heavenly Symphony - Formula One World Championship 1993 Hibaihin (Japan) - 1994 - Sega - - - - - - - - - - - - - Keiou Yuugekitai Taikenban Hibaihin (Japan) - 1993 - Victor Entertainment - - - - - - - - - - - - - Lodoss Tou Senki - Eiyuu Sensou - Record of Lodoss War (Japan, demo) - 1994 - Sega - - - - - - - - - - Lunar - Eternal Blue - Premium CD (Japan) [CD-Audio] - 1994 - Game Arts - - - - - - - - - - - Lunar - Eternal Blue Hibaihin Auto Demo (Japan) - 1994 - Game Arts - - - - - - - - - - - - - Microcosm Demo CD (Japan) - 1994 - Victor Entertainment - - - - - - - - - - - - - Night Trap Hibaihin (Japan) - 1993 - Sega - - - - - - - - - - - - - Nostalgia 1907 in North Atlantic Sea - Original Sound Track Ver. 2 (Japan) [CD-Audio] - 1992 - Takeru - - - - - - - - - - Popful Mail Taikenban Hibaihin (Japan) - 1994 - Sega - - - - - - - - - - - - - - Psychic Detective Series vol.3 - AYA Auto Demo (Japan) - 1993 - Data West - - - - - - - - - - - - - - Silpheed Hibaihin (Japan) - 1993 - Game Arts - - - - - - - - - - - - - Silpheed Hibaihin (Japan) (fixed) - 1993 - Game Arts - - - - - - - - - - - - - Sonic the Hedgehog CD Hibaihin (Japan) - 1993 - Sega - - - - - - - - - - - - - - Tenbu Mega CD Special (Japan) [CD-Audio] - 1992 - Wolf Team - - - - - - - - - - - Thunderhawk Hibaihin (Japan) - 1993 - Victor Entertainment - - - - - - - - - - - - - Urusei Yatsura - Dear My Friends Hibaihin (Japan) - 1994 - Game Arts - - - - - - - - - - - - - Yumemi Yakata no Monogatari Hibaihin (Japan) - 1993 - Sega - - - - - - - - - - - - - WonderMega Collection - Game Garden (alt) - 1992 - Victor Entertainment - - - - - - - - - - - - - - Sing! Teddyboy Blues [MP3-sourced] - 19?? - Sega - - - - - - - - - WonderMega Collection - Game Garden [MP3-sourced] - 19?? - Victor Entertainment - - - - - - - - diff --git a/hash/pasogo.xml b/hash/pasogo.xml index f966814188d74..647c0550e05b1 100644 --- a/hash/pasogo.xml +++ b/hash/pasogo.xml @@ -6,15 +6,17 @@ license:CC0-1.0 diff --git a/hash/psx.xml b/hash/psx.xml index d2fb19ee6dd68..96134562e0fae 100644 --- a/hash/psx.xml +++ b/hash/psx.xml @@ -29,21 +29,23 @@ For an overview of US PS1 discs that have not been dumped and added to redump's --> - + 007 Racing (USA) 2000 Electronic Arts + + - + @@ -1783,8 +1785,9 @@ For an overview of US PS1 discs that have not been dumped and added to redump's - - + A Ressha de Ikou 4 - Evolution Global (Japan) + 1995 + Artdink + + + + + + + + + + + + + + A Ressha de Ikou 4 - Evolution Global (Japan) (PlayStation the Best) + 1997 + Artdink + + + + + + + + + + + + + + Actua Golf (Japan) + 1996 + Naxat Soft + + + + + + + + + + + + Creature Shock (Japan) @@ -39800,7 +39879,7 @@ The entries in this section are intended to replace the existing "low-grade" Jap --> Block Kuzushi 2 (Japan) 2000 - Marvelous Entertaiment + Marvelous Entertainment @@ -59624,6 +59703,158 @@ The entries in this section are intended to replace the existing "low-grade" Jap + + + 007 Racing (Europe) + 2000 + Electronic Arts + + + + + + + + + + + + + + 007 Racing (France) + 2000 + Electronic Arts + + + + + + + + + + + + + + 007 Racing (Germany) + 2000 + Electronic Arts + + + + + + + + + + + + + + Actua Golf (Europe) + 1996 + Gremlin Interactive + + + + + + + + + + + + + + Actua Golf 2 (Europe) + 1997 + Gremlin Graphics + + + + + + + + + + + + + + Actua Golf 3 (Europe) + 1998 + Gremlin Graphics + Scrambled graphics when shooting the ball + + + + + + + + + + + + + + A.IV - Evolution Global (Europe) + 1996 + Sony Computer Entertainment Europe + + + + + + + + + + + diff --git a/hash/segacd.xml b/hash/segacd.xml deleted file mode 100644 index 649fd183f4537..0000000000000 --- a/hash/segacd.xml +++ /dev/null @@ -1,6117 +0,0 @@ - - - - - - - - - - - - - 3 Ninjas Kick Back (USA) - 1994 - Sony Imagesoft - - - - - - - - - - - - A/X-101 (USA) - 1994 - Absolute Entertainment - - - - - - - - - - - - After Burner III (USA) - 1993 - Sega - - - - - - - - - - - - - AH3 - ThunderStrike (USA) - 1993 - JVC - - - - - - - - - - - - - Batman Returns (USA) - 1993 - Sega - - - - - - - - - - - - - Battlecorps (USA) - 1994 - Core Design - - - - - - - - - - - - - Bill Walsh College Football (USA) - 1993 - Electronic Arts - - - - - - - - - - - - Black Hole Assault (USA) - 1993 - Bignet - - - - - - - - - - - - - Bouncers (USA) - 1994 - Sega - - - - - - - - - - - - - Bram Stoker's Dracula (USA) - 1992 - Sony Imagesoft - - - - - - - - - - - - - Bram Stoker's Dracula (USA, alt) - 1992 - Sony Imagesoft - - - - - - - - - - - - - Bram Stoker's Dracula (USA, rev. A) - 1992 - Sony Imagesoft - - - - - - - - - - - - - Brutal - Paws of Fury (USA) - 1994 - GameTek - - - - - - - - - - - - - Chuck Rock (USA) - 1992 - Sony Imagesoft - - - - - - - - - - - - - Chuck Rock II - Son of Chuck (USA) - 1993 - Virgin Interactive - - - - - - - - - - - - Cliffhanger (USA) - 1993 - Sony Imagesoft - - - - - - - - - - - - - Cobra Command (USA) - 1992 - Sega - - - - - - - - - - - - - - Note! Color Mechanica (USA) - 2014 - Good Deal Games - - - - - - - - - - - - Note! Color Mechanica (USA, alt) - 2014 - Good Deal Games - - - - - - - - - - - - Compton's Interactive Encyclopedia v2.00S (USA) - 1994 - Compton's NewMedia - - - - - - - - - - - Compton's Interactive Encyclopedia v2.01R (USA) - 1994 - Sega - - - - - - - - - - - - Corpse Killer (USA, 32X) - 1995 - Digital Pictures - - - - - - - - - - - - - - - Dark Wizard (USA) - 1994 - Sega - - - - - - - - - - - - Double Switch (USA) - 1993 - Sega - - - - - - - - - - - - Dracula Unleashed (USA) - 1993 - Sega - - - - - - - - - - - - - - - - - - - - - Dragon's Lair (USA) - 1993 - Sega - - - - - - - - - - - - Dungeon Explorer (USA) - 1995 - Sega - - - - - - - - - - - - Ecco the Dolphin (USA) - 1993 - Sega - - - - - - - - - - - - Ecco - The Tides of Time (USA) - 1993 - Sega - - - - - - - - - - - - Ecco - The Tides of Time (USA, alt) - 1994 - Sega - - - - - - - - - - - - ESPN Baseball Tonight (USA) - 1994 - Sony Imagesoft - - - - - - - - - - - ESPN Sunday Night NFL (USA) - 1994 - Sony Imagesoft - - - - - - - - - - - - - Eternal Champions - Challenge from the Dark Side (USA) - 1995 - Sega - - - - - - - - - - - - Eternal Champions - Challenge from the Dark Side (USA, alt) - 1995 - Sega - - - - - - - - - - - - Advanced Dungeons & Dragons - Eye of the Beholder (USA) - 1994 - Sega - - - - - - - - - - - - - - - Fahrenheit (USA, Sega CD & 32X CD) - 1995 - Sega - - - - - - - - - - - - - - - - - - - - - - FIFA International Soccer (USA) - 1994 - Electronic Arts - - - - - - - - - - - - Final Fight CD (USA) - 1993 - Sega - - - - - - - - - - - - - Formula One World Championship - Beyond the Limit (USA) - 1994 - Sega - - - - - - - - - - - - Ground Zero Texas (USA) - 1993 - Sony Imagesoft - - - - - - - - - - - - - - - - - - - - - - Heart of the Alien - Out of this World Parts I and II (USA) - 1994 - Virgin Interactive - - - - - - - - - - - - - Heimdall (USA) - 1994 - JVC - - - - - - - - - - - - - Hook (USA) - 1992 - Sony Imagesoft - - - - - - - - - - - - Iron Helix (USA) - 1994 - Spectrum Holobyte - - - - - - - - - - - - Jeopardy! (USA) - 1993 - Sony Imagesoft - - - - - - - - - - - - - Joe Montana's NFL Football (USA) - 1993 - Sega - - - - - - - - - - - - - Jurassic Park (USA) - 1994 - Sega - - - - - - - - - - - - Kids on Site (USA) - 1994 - Digital Pictures - - - - - - - - - - - - Lethal Enforcers (USA) - 1993 - Konami - - - - - - - - - - - - - - Lethal Enforcers (USA, alt) - 1993 - Konami - - - - - - - - - - - - - Lethal Enforcers II - Gun Fighters (USA) - 1994 - Konami - - - - - - - - - - - - - Loadstar - The Legend of Tully Bodine (USA) - 1994 - Rocket Science Games - - - - - - - - - - - - Lords of Thunder (USA) - 1995 - Sega - - - - - - - - - - - - Lunar - The Silver Star (USA) - 1993 - Game Arts - - - - - - - - - - - - Lunar - Eternal Blue (USA) - 1995 - Game Arts - - - - - - - - - - - - Mad Dog McCree (USA) - 1993 - American Laser Games - - - - - - - - - - - - Mansion of Hidden Souls (USA) - 1994 - Vic Tokai - - - - - - - - - - - - - - - Mary Shelley's Frankenstein (USA) - 1994 - Sony Imagesoft - - - - - - - - - - - - Mickey Mania - Timeless Adventures of Mickey Mouse (USA) - 1994 - Sony Imagesoft - - - - - - - - - - - - - Microcosm (USA) - 1993 - Psygnosis - - - - - - - - - - - - Midnight Raiders (USA) - 1994 - Sega - - - - - - - - - - - - Mortal Kombat (USA) - 1994 - Arena - - - - - - - - - - - - - NBA Jam (USA) - 1994 - Arena - - - - - - - - - - - - - NFL's Greatest - San Francisco VS Dallas 1978-1993 (USA) - 1993 - Sega - - - - - - - - - - - - - NHL '94 (USA) - 1993 - Electronic Arts - - - - - - - - - - - - - Night Trap (USA, 32X) - 1994 - Digital Pictures - - - - - - - - - - - - - - - - - - - - - - - - - Night Trap (USA) - 1992 - Sega - - - - - - - - - - - - - - - - - - - - - - - - Night Trap (USA, alt) - 1992 - Sega - - - - - - - - - - - - - - - - - - - - - - - Pier Solar and the Great Architects Enhanced Soundtrack Disc (World) - 2010 - WaterMelon - - - - - - - - - - - - - - - - Pitfall - The Mayan Adventure (USA) - 1995 - Activision - - - - - - - - - - - - Popful Mail (USA) - 1995 - Sega - - - - - - - - - - - - - Prince of Persia (USA) - 1992 - Sega - - - - - - - - - - - - - Puggsy (USA) - 1994 - Psygnosis - - - - - - - - - - - - - Racing Aces (USA) - 1993 - Sega - - - - - - - - - - - - RDF - Global Conflict (USA) - 1994 - Absolute Entertainment - - - - - - - - - - - - Revenge of the Ninja (USA) - 1993 - Renovation - - - - - - - - - - - - Rise of the Dragon (USA, rev. A) - 1994 - Dynamix - - - - - - - - - - - - Rise of the Dragon (USA) - 1993 - Dynamix - - - - - - - - - - - - - Road Avenger (USA) - 1993 - Renovation - - - - - - - - - - - - - - Saban's Mighty Morphin Power Rangers (USA) - 1995 - Sega - - - - - - - - - - - - - - Sega Classics Arcade Collection (USA, 4 in 1, alt) - 1992 - Sega - - - - - - - - - - - - - Sega Classics Arcade Collection (USA, 5 in 1) - 1993 - Sega - - - - - - - - - - - Sewer Shark (USA) - 1992 - Sega - - - - - - - - - - - - - Sewer Shark (USA, rev. A) - 1992 - Sony Imagesoft - - - - - - - - - - - - - - Sewer Shark (USA, rev. B) - 1992 - Sega - - - - - - - - - - - - - - Sewer Shark (USA, rev. B, alt) - 1992 - Sega - - - - - - - - - - - - - Sewer Shark (USA, rev. B, alt 2) - 1992 - Sega - - - - - - - - - - - - - Sherlock Holmes - Consulting Detective Vol. I (USA) - 1992 - Sega - - - - - - - - - - - - - Sherlock Holmes - Consulting Detective Vol. II (USA) - 1993 - Sega - - - - - - - - - - - - - - - - - - - - - - Shining Force CD (USA) - 1994 - Sega - - - - - - - - - - - Shining Force CD (USA, alt) - 1994 - Sega - - - - - - - - - - - - Silpheed (USA) - 1993 - Sega - - - - - - - - - - - - - Slam City with Scottie Pippen (USA, rev. A) - 1994 - Digital Pictures - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Snatcher (USA) - 1994 - Konami - - - - - - - - - - - - - - Sol-Feace (USA) - 1992 - Sega - - - - - - - - - - - - Sonic the Hedgehog CD (USA, R1C) - 1993 - Sega - - - - - - - - - - - - - - Sonic the Hedgehog CD (USA, R7D) - 1993 - Sega - - - - - - - - - - - - - - - Sonic the Hedgehog CD (USA, R8C) - 1993 - Sega - - - - - - - - - - - - - Sonic the Hedgehog CD (USA, R4C) - 1993 - Sega - - - - - - - - - - - - - - Soul Star (USA) - 1994 - Core Design - - - - - - - - - - - - - Space Ace (USA) - 1994 - ReadySoft - - - - - - - - - - - - Star Wars - Rebel Assault (USA) - 1994 - JVC - - - - - - - - - - - - - StarBlade (USA) - 1994 - Namco - - - - - - - - - - - - Stellar-Fire (USA) - 1993 - Dynamix - - - - - - - - - - - - - Surgical Strike (USA) - 1995 - Sega - - - - - - - - - - - - Surgical Strike (Brazil, 32X) - 1996 - Tec Toy - - - - - - - - - - - - The Adventures of Batman and Robin (USA) - 1995 - Sega - - - - - - - - - - - - The Adventures of Willy Beamish (USA) - 1993 - Dynamix - - - - - - - - - - - - The Amazing Spider-Man vs. The Kingpin (USA) - 1993 - Sega - - - - - - - - - - - - - The Secret of Monkey Island (USA) - 1992 - JVC - - - - - - - - - - - - - The Software Toolworks' Star Wars Chess (USA) - 1994 - The Software Toolworks - - - - - - - - - - - - The Terminator (USA) - 1993 - Virgin Games - - - - - - - - - - - - - Time Gal (USA) - 1993 - Renovation - - - - - - - - - - - - - Tomcat Alley (USA) - 1994 - Sega - - - - - - - - - - - - - Tomcat Alley (USA, alt) - 1994 - Sega - - - - - - - - - - - - Vay (USA) - 1994 - Working Designs - - - - - - - - - - - - - What is X'Eye Multi Entertainment System (USA) - 1994 - JVC - - - - - - - - - - - - Wheel of Fortune (USA) - 1994 - Sony Imagesoft - - - - - - - - - - - - Who Shot Johnny Rock? (USA) - 1994 - American Laser Games - - - - - - - - - - - - Wing Commander (USA) - 1993 - Electronic Arts - - - - - - - - - - - - - WireHead (USA) - 1995 - Sega - - - - - - - - - - - - World Cup USA 94 (USA) - 1994 - U.S. Gold - - - - - - - - - - - - WWF Rage in the Cage (USA) - 1993 - Arena - - - - - - - - - - - - - - - Bari-Arm (USA) - 1994 - Sega - - - - - - - - - - - - - - - Battle Frenzy (USA, prototype) - 2003 - Good Deal Games - - - - - - - - - - - Battletech - Gray Death Legion (USA, prototype) - 200? - Good Deal Games - - - - - - - - - - - Black Hole Assault (USA, alt) - 1993 - Bignet - - - - - - - - - - - - - - The Exterminators (USA, prototype) - 2001 - Good Deal Games - - - - - - - - - - - - The Exterminators - Special Edition (USA, prototype) - 2003 - Good Deal Games - - - - - - - - - - - C+C Music Factory (USA) - 1993 - Sony Imagesoft - - - - - - - - - - - - Cadillacs and Dinosaurs - The Second Cataclysm (USA) - 1994 - Rocket Science Games - - - - - - - - - - - Cadillacs and Dinosaurs - The Second Cataclysm (Bra) - 1994 - Tec Toy - - - - - - - - - - - - Citizen X (USA, prototype) - 2002 - Good Deal Games - - - - - - - - - - - Compton's Interactive Encyclopedia v2.10 (USA) - 1994 - Compton's NewMedia - - - - - - - - - - - Corpse Killer (USA) - 1994 - Digital Pictures - - - - - - - - - - - - Dragon's Lair (USA, demo) - 1993 - ReadySoft - - - - - - - - - - Dune (USA) - 1994 - Virgin Interactive - - - - - - - - - - - - - Dungeon Master II - Skullkeep (USA) - 1994 - JVC - - - - - - - - - - - ESPN National Hockey Night (USA) - 1994 - Sony Imagesoft - - - - - - - - - - - - Flashback - The Quest for Identity (USA) - 1994 - Sega - - - - - - - - - - - - Force Striker (USA, prototype) - 2006 - Good Deal Games - - - - - - - - - - - Frog Feast (USA) - 2007 - RasterSoft - - - - - - - - - - Ground Zero Texas (USA, alt) - 1993 - Sony Imagesoft - - - - - - - - - - - - - - - - - - - - Hook (USA, alt) - 1992 - Sony Imagesoft - - - - - - - - - - - - - Hot Hits - Adventurous New Music Sampler (USA) - 1992 - Sega - - - - - - - - - - - - INXS (USA) - 1992 - Sega - - - - - - - - - - - Jaguar XJ220 (USA) - 1993 - JVC - - - - - - - - - - - - Kris Kross (USA) - 1992 - Sony Imagesoft - - - - - - - - - - - Links - The Challenge of Golf (USA, alt) - 1994 - Virgin Interactive - - - - - - - - - - - - Links - The Challenge of Golf (USA) - 1994 - Virgin Interactive - - - - - - - - - - - - - Marko (USA, prototype) - 200? - Good Deal Games - - - - - - - - - - Marky Mark and The Funky Bunch (USA) - 1992 - Sega - - - - - - - - - - - MegaRace (USA) - 1993 - The Software Toolworks - - - - - - - - - - - - Mighty Mighty Missile! (USA) - 2005 - Good Deal Games - - - - - - - - - - Novastorm (USA) - 1994 - Psygnosis - - - - - - - - - - - Power Monger (USA) - 1994 - Electronic Arts - - - - - - - - - - - - - Prize Fighter (USA) - 1994 - Sega - - - - - - - - - - - - - - - - - - - - - Radical Rex (USA) - 1994 - Activision - - - - - - - - - - - Road Rash (USA) - 1995 - Electronic Arts - - - - - - - - - - - Samurai Shodown (USA) - 1995 - JVC - - - - - - - - - - - - - Sega Classics Arcade Collection (USA, 4 in 1) - 1992 - Sega - - - - - - - - - - - - Slam City with Scottie Pippen (USA) - 1994 - Digital Pictures - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Slam City with Scottie Pippen (USA, 32X) - 1994 - Digital Pictures - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Space Ace (USA, demo) - 1994 - ReadySoft - - - - - - - - - - - Star Strike (USA, prototype) - 2001 - Good Deal Games - - - - - - - - - - Supreme Warrior (USA) - 1994 - Digital Pictures - - - - - - - - - - - - - - - - - - - - - - Supreme Warrior (USA, 32X) - 1994 - Digital Pictures - - - - - - - - - - - - - - - - - - - - - - - The Lawnmower Man (USA) - 1994 - Sales Curve Interactive - - - - - - - - - - - The Masked Rider - Kamen Rider ZO (USA) - 1994 - Sega - - - - - - - - - - - The San Diego Zoo Presents... The Animals! (USA) - 1994 - The Software Toolworks - - - - - - - - - - - The Third World War (USA) - 1994 - Extreme Entertainment Group - - - - - - - - - - - - - - Timecop (USA, prototype) - 200? - Good Deal Games - - - - - - - - - - Trivial Pursuit (USA) - 1993 - Parker Brothers - - - - - - - - - - - - - Ultraverse Prime (USA) - 1994 - Sony Imagesoft - - - - - - - - - - - Virtual VCR - The Colors of Modern Rock (USA) - 1993 - Sega / Warner Custom Music - - - - - - - - - - - Wild Woody (USA) - 1995 - Sega - - - - - - - - - - - Wonder Dog (USA) - 1992 - JVC - - - - - - - - - - - - - - BC Racers (USA) - 1994 - Core Design - - - - - - - - - - - - - Blackhole Assault (USA, prototype 19920210) - 1992 - Sega - - - - - - - - - - - CD Sonic the Hedgehog (USA, prototype 19930510) - 1993 - Sega - - - - - - - - - - Championship Soccer '94 (USA) - 1994 - Sony Imagesoft - - - - - - - - - - - - Compton's Interactive Encyclopedia v2.01S (USA) - 1994 - Compton's NewMedia - - - - - - - - - - - Crime Patrol (USA) - 1994 - American Laser Games - - - - - - - - - - - - Demolition Man (USA) - 1994 - Acclaim Entertainment - - - - - - - - - - - Earthworm Jim - Special Edition (USA) - 1995 - Interplay - - - - - - - - - - - ESPN NBA Hangtime '95 (USA) - 1994 - Sony Imagesoft - - - - - - - - - - - Fatal Fury Special (USA) - 1995 - JVC - - - - - - - - - - - - Fatal Fury Special (USA, prototype) - 1995 - JVC - - - - - - - - - - Flink (USA) - 1994 - Vic Tokai - - - - - - - - - - - Frog Feast (USA, demo) - 2007 - RasterSoft - - - - - - - - - - - Johnny Mnemonic (USA, prototype) - 1995? - Sega - - - - - - - - - - - - - - - - - - - - Jurassic Park (USA, prototype) - 1993? - Sega - - - - - - - - - - - Karaoke - JVC CD+G Karaoke - Top Hit Sampler (USA) - 1993 - JVC - - - - - - - - - - - Keio Flying Squadron (USA) - 1995 - JVC - - - - - - - - - - - - Mad Dog II - The Lost Gold (USA) - 1994 - American Laser Games - - - - - - - - - - - - - My Paint (USA) - 1993 - Saddleback Graphics - - - - - - - - - - - - NFL Football Trivia Challenge (USA) - 1994 - CapDisc - - - - - - - - - - - Night Trap (USA, Re-Release) - 1995 - Sega - - - - - - - - - - - - - - - - - - - Panic! (USA) - 1994 - Data East - - - - - - - - - - - - - Penn & Teller's Smoke and Mirrors (USA, prototype) - 1995? - Absolute Entertainment - - - - - - - - - - - - - - - - - - Revengers of Vengeance (USA) - 1994 - Extreme Entertainment Group - - - - - - - - - - - - - Road Rash (USA, prototype, beta 3 - 19950211) - 1995 - Sega - - - - - - - - - - Robo Aleste (USA) - 1993 - Tengen - - - - - - - - - - - - - Rock Paintings (USA) - 1992 - Sega - - - - - - - - - - - - Shadow of the Beast II (USA) - 1994 - Psygnosis - - - - - - - - - - - - Shining Force CD (USA, prototype) - 1994 - Sega - - - - - - - - - - Sonic the Hedgehog CD (USA, prototype 19930712) - 1993 - Sega - - - - - - - - - - - Sonic the Hedgehog CD (USA, prototype 19930920) - 1993 - Sega - - - - - - - - - - Syndicate (USA, prototype) - 19?? - <unknown> - - - - - - - - - - - - - The Space Adventure - Cobra the Legendary Bandit (USA) - 1995 - Hudson Soft - - - - - - - - - - - - - Timecop (USA, early prototype) - 19?? - <unknown> - - - - - - - - - - Wolfchild (USA) - 1992 - JVC - - - - - - - - - - diff --git a/hash/zx81_cass.xml b/hash/zx81_cass.xml index b2f74fecd0f01..b0b955b09f756 100644 --- a/hash/zx81_cass.xml +++ b/hash/zx81_cass.xml @@ -193,10 +193,12 @@ RAND USR 16530 - + 3D Monster Maze 1981 J.K. Greye Software + + @@ -204,10 +206,12 @@ RAND USR 16530 - + 3D Monster Maze (New Generation) 1982 New Generation Software + + @@ -215,12 +219,58 @@ RAND USR 16530 - + + 3D Monster Maze (Aackosoft) + 1982 + Aackosoft + + + + + + + + + + + + + + + + + + 3D Monster Maze (ZX Data) + 1982 + ZX Data + + + + + + + + + + + Monstro das Trevas + 1982 + Microdigital + + + + + + + + + + 3D 3D! 1981 dK'Tronics - + @@ -228,6 +278,19 @@ RAND USR 16530 + + 3D 3D! (Kayde) + 198? + Kayde Software + + + + + + + + + 5-2K Family Pak 198? @@ -364,7 +427,7 @@ RAND USR 16530 Adventure (Bug Byte) 1982 - Bug Byte + Bug-Byte @@ -641,7 +704,7 @@ RAND USR 16530 - Asteroids + Asteroids (Silversoft) 1982 Silversoft @@ -651,6 +714,19 @@ RAND USR 16530 + + Asteroids (dK'tronics) + 1982 + dK'tronics + + + + + + + + + Asteroids (Software Farm) 198? @@ -662,6 +738,19 @@ RAND USR 16530 + + Astral Convoy + 1983 + Vortex Software + + + + + + + + + Autochef 1982 @@ -1060,7 +1149,7 @@ RAND USR 16530 - Breakout (JKG) + Breakout (J.K.G.) 1981 J.K. Greye Software @@ -1071,7 +1160,7 @@ RAND USR 16530 - Breakout (NGS) + Breakout (N.G.S.) 1982 New Generation Software @@ -1216,8 +1305,10 @@ RAND USR 16530 Can of Worms - 198? - Automata Cartography + 1981 + Automata + + @@ -1225,6 +1316,19 @@ RAND USR 16530 + + Can of Worms (alt) + 1981 + Automata + + + + + + + + + The Carpooler 198? @@ -1448,7 +1552,7 @@ RAND USR 16530 - + Centipede (dK'tronics) 1982 dK'tronics @@ -1459,7 +1563,7 @@ RAND USR 16530 - + Centipede (dK'tronics, green cover) 198? dK'tronics @@ -1470,6 +1574,17 @@ RAND USR 16530 + + Centipede (Kayde) + 1982 + Kayde Software + + + + + + + Challenge 198? @@ -1895,8 +2010,10 @@ RAND USR 16530 Constellation - 198? - Bug Byte + 1982 + Bug-Byte + + @@ -1904,10 +2021,25 @@ RAND USR 16530 - + + Constellation (red logo inlay) + 1982 + Bug-Byte + + + + + + + + + + Constellation (Gladstone) 198? Gladstone Electronics + + @@ -2053,7 +2185,9 @@ RAND USR 16530 The Damsel and the Beast 1981 - Bug Byte + Bug-Byte + + @@ -2061,6 +2195,19 @@ RAND USR 16530 + + The Damsel and the Beast (red logo inlay) + 1982 + Bug-Byte + + + + + + + + + D Coder 198? @@ -2086,7 +2233,9 @@ RAND USR 16530 Dictator 1982 - Bug Byte + Bug-Byte + + @@ -2094,6 +2243,26 @@ RAND USR 16530 + + Dictator (red logo inlay) + 1982 + Bug-Byte + + + + + + + + + + + + + + + + Colunas - Dimensionamento de Colunas Montantes de Edifícios 1982 @@ -2738,7 +2907,7 @@ RAND USR 16530 Frogger - 198? + 1982 DJL Software @@ -2780,6 +2949,26 @@ RAND USR 16530 + + Frogs (Aackosoft) + 198? + Aackosoft + + + + + + + + + + + + + + + + FUNdamentals of Math 1983 @@ -3612,9 +3801,11 @@ RAND USR 16530 - Gulp 2 + Gulp II 1982 Campbell Systems + + @@ -3622,6 +3813,32 @@ RAND USR 16530 + + Gulp II (Aackosoft) + 1982 + Aackosoft + + + + + + + + + + + Gulp II (ZX Data) + 1982 + ZX Data + + + + + + + + + Gulpman 1982 @@ -3871,6 +4088,19 @@ RAND USR 16530 + + House of Gnomes + 198? + Bug-Byte + + + + + + + + + HRG 7.0 1983 @@ -3991,7 +4221,7 @@ RAND USR 16530 Invaders 1982 - Bug Byte + Bug-Byte @@ -4013,7 +4243,7 @@ RAND USR 16530 Invaders (re-release) 1982 - Bug Byte + Bug-Byte @@ -4035,7 +4265,7 @@ RAND USR 16530 Invaders (monochrome) 198? - Bug Byte + Bug-Byte @@ -4046,7 +4276,7 @@ RAND USR 16530 Invaders (typed inlay) 1981 - Bug Byte + Bug-Byte @@ -4065,10 +4295,10 @@ RAND USR 16530 - - Invasion Force (IPS) - 1983 - International Publishing & Software Inc. + + Invasion Force (I.P.S.) + 1982 + International Publishing & Software @@ -4076,6 +4306,26 @@ RAND USR 16530 + + Invasion Force (Aackosoft) + 1982 + Aackosoft + + + + + + + + + + + + + + + + Inventions 1 1982 @@ -4776,6 +5026,19 @@ Defender: not working + + Love and Death + 1982 + Automata + + + + + + + + + Love, Business & The Zodiac 1982 @@ -4962,10 +5225,23 @@ Defender: not working + + Mazeman + 1982 + Ambersoft + + + + + + + + + Mazogs 1981 - Bug Byte + Bug-Byte @@ -5300,6 +5576,19 @@ Defender: not working + + Morse Decoder + 198? + Catra Software + + + + + + + + + Morse Reader 198? @@ -5337,6 +5626,8 @@ Defender: not working Multifile (Gladstone) 1981 Gladstone Electronics + + @@ -5344,6 +5635,19 @@ Defender: not working + + Multifile (Bug-Byte) + 1981 + Bug-Byte + + + + + + + + + Multifile Plus (Gladstone) 198? @@ -5491,9 +5795,11 @@ Defender: not working - Nightmare Park + ZX Nightmare Park 1981 Macronics + + @@ -5501,6 +5807,26 @@ Defender: not working + + ZX Nightmare Park (Aackosoft) + 1981 + Aackosoft + + + + + + + + + + + + + + + + Nightmare Park and Music Plus 1981 @@ -5532,6 +5858,26 @@ Defender: not working + + Ny Teknik - 7 Program till din Sinclair ZX 81 + 1982 + Ny Teknik + + + + + + + + + + + + + + + + Ocean Trader 1983 @@ -5573,9 +5919,11 @@ Defender: not working - The Oracles Cave + The Oracle's Cave 1981 Doric Computer Systems + + @@ -6083,7 +6431,7 @@ Defender: not working Program Pack 4 1981 - Bug Byte + Bug-Byte @@ -6415,7 +6763,7 @@ Defender: not working RENUM Renumbering Program 1982 - Bug Byte + Bug-Byte @@ -6747,7 +7095,7 @@ Defender: not working - Space Invaders + Space Invaders (Mikro-Gen) 198? Mikro-Gen @@ -6758,7 +7106,7 @@ Defender: not working - Space Invaders (dk) + Space Invaders (dK'tronics) 1981 dK'tronics @@ -6768,6 +7116,18 @@ Defender: not working + + Space Invaders (Kayde) + 1982 + Kayde Software + After the title screen, the game comes back to the prompt + + + + + + + Space Invaders 3K 1981 @@ -7025,7 +7385,7 @@ Defender: not working Star Trek 1982 - Bug Byte + Bug-Byte @@ -7058,7 +7418,7 @@ Defender: not working Star Trek (typed inlay) 1981 - Bug Byte + Bug-Byte @@ -7158,6 +7518,8 @@ Defender: not working Stock Car 1984 Informatique Service + + @@ -7165,6 +7527,19 @@ Defender: not working + + Stock Car (alt) + 1984 + Informatique Service + + + + + + + + + Stock-Market 1981 @@ -8180,10 +8555,12 @@ Defender: not working - + Tyrannosaure Rex 1982 Informatique Service + + @@ -8312,10 +8689,21 @@ Defender: not working + + Videograph + 1981 + Bug-Byte + + + + + + + Viewtext (US) 1981 - Bug Byte + Bug-Byte @@ -8942,7 +9330,7 @@ Defender: not working ZXAS Assembler 1982 - Bug Byte + Bug-Byte @@ -9005,6 +9393,32 @@ Defender: not working + + ZX Breakout + 198? + Mikro-Gen + + + + + + + + + + + ZX Breakout (pink inlay) + 198? + Mikro-Gen + + + + + + + + + ZX Bug 1981 @@ -9049,7 +9463,7 @@ Defender: not working - + ZX Chess II (improved) 1981 Artic @@ -9060,8 +9474,8 @@ Defender: not working - - ZX Chess II (IPS) + + ZX Chess II (I.P.S.) 1982 International Publishing & Software Inc. @@ -9071,6 +9485,20 @@ Defender: not working + + Skak + 198? + ZX Data + + + + + + + + + + ZX Compendium 1983 @@ -9139,7 +9567,7 @@ Defender: not working ZXDB Disassembler/Debugger 1982 - Bug Byte + Bug-Byte @@ -9147,6 +9575,17 @@ Defender: not working + + ZXED + 1982 + dK'Tronics + + + + + + + ZX Forth 198? @@ -9159,7 +9598,7 @@ Defender: not working - ZX Forth (IPS) + ZX Forth (I.P.S.) 1982 International Publishing & Software Inc. @@ -9216,7 +9655,7 @@ Defender: not working ZXTK 1982 - Bug Byte + Bug-Byte diff --git a/scripts/src/bus.lua b/scripts/src/bus.lua index e53311cb949a5..3b1a1560b25f5 100644 --- a/scripts/src/bus.lua +++ b/scripts/src/bus.lua @@ -1513,6 +1513,8 @@ if (BUSES["HPDIO"]~=null) then MAME_DIR .. "src/devices/bus/hp_dio/hp98620.h", MAME_DIR .. "src/devices/bus/hp_dio/hp98624.cpp", MAME_DIR .. "src/devices/bus/hp_dio/hp98624.h", + MAME_DIR .. "src/devices/bus/hp_dio/hp98628_9.cpp", + MAME_DIR .. "src/devices/bus/hp_dio/hp98628_9.h", MAME_DIR .. "src/devices/bus/hp_dio/hp98643.cpp", MAME_DIR .. "src/devices/bus/hp_dio/hp98643.h", MAME_DIR .. "src/devices/bus/hp_dio/hp98644.cpp", @@ -1848,6 +1850,8 @@ if (BUSES["ISA"]~=null) then MAME_DIR .. "src/devices/bus/isa/pds.h", MAME_DIR .. "src/devices/bus/isa/pgc.cpp", MAME_DIR .. "src/devices/bus/isa/pgc.h", + MAME_DIR .. "src/devices/bus/isa/prose4k1.cpp", + MAME_DIR .. "src/devices/bus/isa/prose4k1.h", MAME_DIR .. "src/devices/bus/isa/sb16.cpp", MAME_DIR .. "src/devices/bus/isa/sb16.h", MAME_DIR .. "src/devices/bus/isa/sblaster.cpp", @@ -4696,6 +4700,8 @@ if (BUSES["ZORRO"]~=null) then MAME_DIR .. "src/devices/bus/amiga/zorro/action_replay.h", MAME_DIR .. "src/devices/bus/amiga/zorro/buddha.cpp", MAME_DIR .. "src/devices/bus/amiga/zorro/buddha.h", + MAME_DIR .. "src/devices/bus/amiga/zorro/merlin.cpp", + MAME_DIR .. "src/devices/bus/amiga/zorro/merlin.h", MAME_DIR .. "src/devices/bus/amiga/zorro/picasso2.cpp", MAME_DIR .. "src/devices/bus/amiga/zorro/picasso2.h", MAME_DIR .. "src/devices/bus/amiga/zorro/rainbow2.cpp", @@ -5767,8 +5773,6 @@ end if (BUSES["H89BUS"]~=null) then files { - MAME_DIR .. "src/devices/bus/heathzenith/h89/cards.cpp", - MAME_DIR .. "src/devices/bus/heathzenith/h89/cards.h", MAME_DIR .. "src/devices/bus/heathzenith/h89/cdr_fdc_880h.cpp", MAME_DIR .. "src/devices/bus/heathzenith/h89/cdr_fdc_880h.h", MAME_DIR .. "src/devices/bus/heathzenith/h89/h89bus.cpp", @@ -5794,6 +5798,18 @@ if (BUSES["H89BUS"]~=null) then } end +--------------------------------------------------- +-- +--@src/devices/bus/heathzenith/h89/intr_cntrl.h,BUSES["HEATH_INTR_SOCKET"] = true +--------------------------------------------------- + +if (BUSES["HEATH_INTR_SOCKET"]~=null) then + files { + MAME_DIR .. "src/devices/bus/heathzenith/h89/intr_cntrl.cpp", + MAME_DIR .. "src/devices/bus/heathzenith/h89/intr_cntrl.h", + } +end + --------------------------------------------------- -- --@src/devices/bus/heathzenith/h19/tlb.h,BUSES["HEATH_TLB_CONNECTOR"] = true diff --git a/scripts/src/formats.lua b/scripts/src/formats.lua index fa0d3d5f8dcf3..bf1086cb13aa9 100644 --- a/scripts/src/formats.lua +++ b/scripts/src/formats.lua @@ -1050,6 +1050,18 @@ if opt_tool(FORMATS, "GUAB_DSK") then } end +-------------------------------------------------- +-- +--@src/lib/formats/h17disk.h,FORMATS["H17D_DSK"] = true +-------------------------------------------------- + +if opt_tool(FORMATS, "H17D_DSK") then + files { + MAME_DIR.. "src/lib/formats/h17disk.cpp", + MAME_DIR.. "src/lib/formats/h17disk.h", + } +end + -------------------------------------------------- -- --@src/lib/formats/h8_cas.h,FORMATS["H8_CAS"] = true diff --git a/scripts/src/machine.lua b/scripts/src/machine.lua index 5172bcc438177..a79fe0654bf33 100644 --- a/scripts/src/machine.lua +++ b/scripts/src/machine.lua @@ -216,19 +216,6 @@ if (MACHINES["DMAC"]~=null) then end ---------------------------------------------------- --- ---@src/devices/machine/gayle.h,MACHINES["GAYLE"] = true ---------------------------------------------------- - -if (MACHINES["GAYLE"]~=null) then - files { - MAME_DIR .. "src/devices/machine/gayle.cpp", - MAME_DIR .. "src/devices/machine/gayle.h", - } -end - - --------------------------------------------------- -- --@src/devices/machine/40105.h,MACHINES["CMOS40105"] = true diff --git a/scripts/src/video.lua b/scripts/src/video.lua index 56ae20d93ef22..6a9037fa240dd 100644 --- a/scripts/src/video.lua +++ b/scripts/src/video.lua @@ -1509,6 +1509,18 @@ if (VIDEOS["PPU2C0X"]~=null) then } end +-------------------------------------------------- +-- +--@src/devices/video/bt431.h,VIDEOS["BT431"] = true +-------------------------------------------------- + +if (VIDEOS["BT431"]~=null) then + files { + MAME_DIR .. "src/devices/video/bt431.cpp", + MAME_DIR .. "src/devices/video/bt431.h", + } +end + -------------------------------------------------- -- --@src/devices/video/bt459.h,VIDEOS["BT459"] = true @@ -1523,37 +1535,61 @@ end -------------------------------------------------- -- ---@src/devices/video/imagetek_i4100.h,VIDEOS["I4100"] = true +--@src/devices/video/bt45x.h,VIDEOS["BT45X"] = true -------------------------------------------------- -if (VIDEOS["I4100"]~=null) then +if (VIDEOS["BT45X"]~=null) then files { - MAME_DIR .. "src/devices/video/imagetek_i4100.cpp", - MAME_DIR .. "src/devices/video/imagetek_i4100.h", + MAME_DIR .. "src/devices/video/bt45x.cpp", + MAME_DIR .. "src/devices/video/bt45x.h", } end -------------------------------------------------- -- ---@src/devices/video/dp8510.h,VIDEOS["DP8510"] = true +--@src/devices/video/bt47x.h,VIDEOS["BT47X"] = true -------------------------------------------------- -if (VIDEOS["DP8510"]~=null) then +if (VIDEOS["BT47X"]~=null) then files { - MAME_DIR .. "src/devices/video/dp8510.cpp", - MAME_DIR .. "src/devices/video/dp8510.h", + MAME_DIR .. "src/devices/video/bt47x.cpp", + MAME_DIR .. "src/devices/video/bt47x.h", } end -------------------------------------------------- -- ---@src/devices/video/bt45x.h,VIDEOS["BT45X"] = true +--@src/devices/video/bt48x.h,VIDEOS["BT48X"] = true -------------------------------------------------- -if (VIDEOS["BT45X"]~=null) then +if (VIDEOS["BT48X"]~=null) then files { - MAME_DIR .. "src/devices/video/bt45x.cpp", - MAME_DIR .. "src/devices/video/bt45x.h", + MAME_DIR .. "src/devices/video/bt48x.cpp", + MAME_DIR .. "src/devices/video/bt48x.h", + } +end + +-------------------------------------------------- +-- +--@src/devices/video/imagetek_i4100.h,VIDEOS["I4100"] = true +-------------------------------------------------- + +if (VIDEOS["I4100"]~=null) then + files { + MAME_DIR .. "src/devices/video/imagetek_i4100.cpp", + MAME_DIR .. "src/devices/video/imagetek_i4100.h", + } +end + +-------------------------------------------------- +-- +--@src/devices/video/dp8510.h,VIDEOS["DP8510"] = true +-------------------------------------------------- + +if (VIDEOS["DP8510"]~=null) then + files { + MAME_DIR .. "src/devices/video/dp8510.cpp", + MAME_DIR .. "src/devices/video/dp8510.h", } end @@ -1613,30 +1649,6 @@ if (VIDEOS["PS2GS"]~=null) then } end --------------------------------------------------- --- ---@src/devices/video/bt47x.h,VIDEOS["BT47X"] = true --------------------------------------------------- - -if (VIDEOS["BT47X"]~=null) then - files { - MAME_DIR .. "src/devices/video/bt47x.cpp", - MAME_DIR .. "src/devices/video/bt47x.h", - } -end - --------------------------------------------------- --- ---@src/devices/video/bt431.h,VIDEOS["BT431"] = true --------------------------------------------------- - -if (VIDEOS["BT431"]~=null) then - files { - MAME_DIR .. "src/devices/video/bt431.cpp", - MAME_DIR .. "src/devices/video/bt431.h", - } -end - -------------------------------------------------- -- --@src/devices/video/vrender0.h,VIDEOS["VRENDER0"] = true diff --git a/src/devices/bus/amiga/zorro/a2232.h b/src/devices/bus/amiga/zorro/a2232.h index eecccf88bc824..84da4e8e18952 100644 --- a/src/devices/bus/amiga/zorro/a2232.h +++ b/src/devices/bus/amiga/zorro/a2232.h @@ -30,8 +30,6 @@ namespace bus::amiga::zorro { // TYPE DEFINITIONS //************************************************************************** -// ======================> a2232_device - class a2232_device : public device_t, public device_zorro2_card_interface, public amiga_autoconfig { public: @@ -108,7 +106,7 @@ class a2232_device : public device_t, public device_zorro2_card_interface, publi } // namespace bus::amiga::zorro -// device type definition +// device type declaration DECLARE_DEVICE_TYPE_NS(ZORRO_A2232, bus::amiga::zorro, a2232_device) #endif // MAME_BUS_AMIGA_ZORRO_A2232_H diff --git a/src/devices/bus/amiga/zorro/a590.cpp b/src/devices/bus/amiga/zorro/a590.cpp index d2d43bf24de08..65ec7b19ec82e 100644 --- a/src/devices/bus/amiga/zorro/a590.cpp +++ b/src/devices/bus/amiga/zorro/a590.cpp @@ -269,14 +269,6 @@ void a2091_device::device_start() m_dmac->set_rom(memregion("bootrom")->base()); } -//------------------------------------------------- -// device_reset - device-specific reset -//------------------------------------------------- - -void dmac_hdc_device_base::device_reset() -{ -} - void dmac_hdc_device_base::resize_ram(int config) { // allocate space for RAM @@ -303,16 +295,6 @@ void dmac_hdc_device_base::resize_ram(int config) m_dmac->set_ram(&m_ram[0]); } -void a590_device::device_reset() -{ - dmac_hdc_device_base::device_reset(); -} - -void a2091_device::device_reset() -{ - dmac_hdc_device_base::device_reset(); -} - //************************************************************************** // IMPLEMENTATION diff --git a/src/devices/bus/amiga/zorro/a590.h b/src/devices/bus/amiga/zorro/a590.h index f6e46781e4841..f40e3d42c1590 100644 --- a/src/devices/bus/amiga/zorro/a590.h +++ b/src/devices/bus/amiga/zorro/a590.h @@ -24,17 +24,12 @@ namespace bus::amiga::zorro { // TYPE DEFINITIONS //************************************************************************** -// ======================> dmac_hdc_device_base - class dmac_hdc_device_base : public device_t { protected: - // construction/destruction dmac_hdc_device_base(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); - // device-level overrides virtual void device_start() override ATTR_COLD; - virtual void device_reset() override ATTR_COLD; // optional information overrides virtual void device_add_mconfig(machine_config &config) override ATTR_COLD; @@ -69,18 +64,13 @@ class dmac_hdc_device_base : public device_t void wd33c93(device_t *device); }; -// ======================> a590_device - class a590_device : public dmac_hdc_device_base, public device_exp_card_interface { public: - // construction/destruction a590_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); protected: - // device-level overrides virtual void device_start() override ATTR_COLD; - virtual void device_reset() override ATTR_COLD; // optional information overrides virtual ioport_constructor device_input_ports() const override ATTR_COLD; @@ -100,18 +90,13 @@ class a590_device : public dmac_hdc_device_base, public device_exp_card_interfac required_ioport m_jp4; }; -// ======================> a2091_device - class a2091_device : public dmac_hdc_device_base, public device_zorro2_card_interface { public: - // construction/destruction a2091_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); protected: - // device-level overrides virtual void device_start() override ATTR_COLD; - virtual void device_reset() override ATTR_COLD; // optional information overrides virtual ioport_constructor device_input_ports() const override ATTR_COLD; @@ -134,7 +119,7 @@ class a2091_device : public dmac_hdc_device_base, public device_zorro2_card_inte } // namespace bus::amiga::zorro -// device type definition +// device type declaration DECLARE_DEVICE_TYPE_NS(ZORRO_A590, bus::amiga::zorro, a590_device) DECLARE_DEVICE_TYPE_NS(ZORRO_A2091, bus::amiga::zorro, a2091_device) diff --git a/src/devices/bus/amiga/zorro/buddha.cpp b/src/devices/bus/amiga/zorro/buddha.cpp index 685bdd2780d21..5ffb4c9992ef0 100644 --- a/src/devices/bus/amiga/zorro/buddha.cpp +++ b/src/devices/bus/amiga/zorro/buddha.cpp @@ -112,11 +112,14 @@ void buddha_device::device_start() save_item(NAME(m_ide_1_interrupt)); } -void buddha_device::device_reset() +void buddha_device::busrst_w(int state) { - m_ide_interrupts_enabled = false; - m_ide_0_interrupt = 0; - m_ide_1_interrupt = 0; + if (state == 0) + { + m_ide_interrupts_enabled = false; + m_ide_0_interrupt = 0; + m_ide_1_interrupt = 0; + } } uint8_t buddha_device::rom_r(offs_t offset) diff --git a/src/devices/bus/amiga/zorro/buddha.h b/src/devices/bus/amiga/zorro/buddha.h index 6a3e6d7b8886d..2f3600348c6b7 100644 --- a/src/devices/bus/amiga/zorro/buddha.h +++ b/src/devices/bus/amiga/zorro/buddha.h @@ -35,10 +35,10 @@ class buddha_device : public device_t, public device_zorro2_card_interface, publ virtual const tiny_rom_entry *device_rom_region() const override ATTR_COLD; virtual void device_start() override ATTR_COLD; - virtual void device_reset() override ATTR_COLD; // device_zorro2_card_interface overrides virtual void cfgin_w(int state) override; + virtual void busrst_w(int state) override; // amiga_autoconfig overrides virtual void autoconfig_base_address(offs_t address) override; diff --git a/src/devices/bus/amiga/zorro/cards.cpp b/src/devices/bus/amiga/zorro/cards.cpp index 2d32dac9631c0..31f07fe12181c 100644 --- a/src/devices/bus/amiga/zorro/cards.cpp +++ b/src/devices/bus/amiga/zorro/cards.cpp @@ -16,6 +16,7 @@ #include "a590.h" #include "action_replay.h" #include "buddha.h" +#include "merlin.h" #include "picasso2.h" #include "rainbow2.h" #include "ripple.h" @@ -49,6 +50,7 @@ void zorro2_cards(device_slot_interface &device) device.option_add("a2091", ZORRO_A2091); device.option_add("a2232", ZORRO_A2232); device.option_add("buddha", ZORRO_BUDDHA); + device.option_add("merlin", ZORRO_MERLIN); device.option_add("picasso2p", ZORRO_PICASSO2P); device.option_add("rainbow2", ZORRO_RAINBOW2); device.option_add("framemaster", ZORRO_FRAMEMASTER); @@ -64,6 +66,7 @@ void zorro3_cards(device_slot_interface &device) device.option_add("a2091", ZORRO_A2091); device.option_add("a2232", ZORRO_A2232); device.option_add("buddha", ZORRO_BUDDHA); + device.option_add("merlin", ZORRO_MERLIN); device.option_add("picasso2p", ZORRO_PICASSO2P); device.option_add("rainbow2", ZORRO_RAINBOW2); device.option_add("framemaster", ZORRO_FRAMEMASTER); diff --git a/src/devices/bus/amiga/zorro/merlin.cpp b/src/devices/bus/amiga/zorro/merlin.cpp new file mode 100644 index 0000000000000..49917d8e9a354 --- /dev/null +++ b/src/devices/bus/amiga/zorro/merlin.cpp @@ -0,0 +1,191 @@ +// license: GPL-2.0+ +// copyright-holders: Dirk Best +/*************************************************************************** + + XPert/ProDev Merlin + + RTG graphics card for Amiga 2000/3000/4000 + + Hardware: + - Tseng Labs ET4000W32 + - 1, 2 (maximum in Zorro-II mode) or 4 MB RAM + - 33 MHz and 14.31818 MHz XTAL + - BT482KPJ85 RAMDAC + - Serial EEPROM with stored serial number (unknown type) + - DG894 (video switcher) + - Optional video module: X-Calibur (S-VHS/Composite input/output) + + TODO: + - Skeleton + +***************************************************************************/ + +#include "emu.h" +#include "merlin.h" +#include "screen.h" + +#define VERBOSE (LOG_GENERAL) + +#include "logmacro.h" + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +DEFINE_DEVICE_TYPE(ZORRO_MERLIN, bus::amiga::zorro::merlin_device, "zorro_merlin", "Merlin RTG") + +namespace bus::amiga::zorro { + +merlin_device::merlin_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + device_t(mconfig, ZORRO_MERLIN, tag, owner, clock), + device_zorro2_card_interface(mconfig, *this), + m_vga(*this, "vga"), + m_ramdac(*this, "ramdac"), + m_autoconfig_memory_done(false) +{ +} + + +//************************************************************************** +// ADDRESS MAPS +//************************************************************************** + +void merlin_device::mmio_map(address_map &map) +{ + map(0x0000, 0xffff).unmaprw(); + map(0x0000, 0x001f).m(m_ramdac, FUNC(bt482_device::map)).umask32(0x00ff0000); // TODO: 16-bit + map(0x03b0, 0x03df).m(m_vga, FUNC(et4kw32i_vga_device::io_map)); + //map(0x0401, 0x0401) monitor switch + map(0x210a, 0x210a).mirror(0x70).rw(m_vga, FUNC(et4kw32i_vga_device::acl_index_r), FUNC(et4kw32i_vga_device::acl_index_w)); + map(0x210b, 0x210b).mirror(0x70).rw(m_vga, FUNC(et4kw32i_vga_device::acl_data_r), FUNC(et4kw32i_vga_device::acl_data_w)); +} + + +//************************************************************************** +// MACHINE DEFINITIONS +//************************************************************************** + +void merlin_device::device_add_mconfig(machine_config &config) +{ + screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); + screen.set_raw(33_MHz_XTAL, 900, 0, 640, 526, 0, 480); // TODO + screen.set_screen_update(FUNC(merlin_device::screen_update)); + + ET4KW32I_VGA(config, m_vga, 0); // should be ET4000W32 + m_vga->set_screen("screen"); + m_vga->set_vram_size(0x200000); + m_vga->vsync_cb().set([this](int state) { m_slot->int6_w(state); }); + + BT482(config, m_ramdac, 0); +} + + +//************************************************************************** +// MACHINE EMULATION +//************************************************************************** + +void merlin_device::device_start() +{ +} + +void merlin_device::busrst_w(int state) +{ + if (state == 0) + m_autoconfig_memory_done = false; +} + +uint32_t merlin_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) +{ + m_vga->screen_update(screen, bitmap, cliprect); + m_ramdac->screen_update(screen, bitmap, cliprect); + + return 0; +} + + +//************************************************************************** +// AUTOCONFIG +//************************************************************************** + +void merlin_device::autoconfig_base_address(offs_t address) +{ + LOG("autoconfig_base_address received: 0x%06x\n", address); + + if (!m_autoconfig_memory_done) + { + LOG("-> installing merlin memory\n"); + + m_slot->space().install_readwrite_handler(address, address + 0x1fffff, + emu::rw_delegate(m_vga, FUNC(et4kw32i_vga_device::mem_r)), + emu::rw_delegate(m_vga, FUNC(et4kw32i_vga_device::mem_w)), 0xffffffff); + + m_autoconfig_memory_done = true; + + // configure next + cfgin_w(0); + } + else + { + LOG("-> installing merlin registers\n"); + + // install merlin registers + m_slot->space().install_device(address, address + 0x0ffff, *this, &merlin_device::mmio_map); + + // stop responding to default autoconfig + m_slot->space().unmap_readwrite(0xe80000, 0xe8007f); + + // we're done + m_slot->cfgout_w(0); + } +} + +void merlin_device::cfgin_w(int state) +{ + LOG("configin_w (%d)\n", state); + + if (state != 0) + return; + + if (!m_autoconfig_memory_done) + { + LOG("autoconfig for memory\n"); + + // setup autoconfig for memory + autoconfig_board_type(BOARD_TYPE_ZORRO2); + autoconfig_board_size(BOARD_SIZE_2M); + autoconfig_link_into_memory(false); + autoconfig_rom_vector_valid(false); + autoconfig_multi_device(false); // ? + autoconfig_8meg_preferred(false); + autoconfig_can_shutup(true); // ? + autoconfig_product(3); + autoconfig_manufacturer(2117); + autoconfig_serial(0x00000000); + autoconfig_rom_vector(0x0000); + + // install autoconfig handler + m_slot->space().install_readwrite_handler(0xe80000, 0xe8007f, + read16_delegate(*this, FUNC(amiga_autoconfig::autoconfig_read)), + write16_delegate(*this, FUNC(amiga_autoconfig::autoconfig_write)), 0xffffffff); + } + else + { + LOG("autoconfig for registers\n"); + + // setup autoconfig for registers + autoconfig_board_type(BOARD_TYPE_ZORRO2); + autoconfig_board_size(BOARD_SIZE_64K); + autoconfig_link_into_memory(false); + autoconfig_rom_vector_valid(false); + autoconfig_multi_device(false); // ? + autoconfig_8meg_preferred(false); + autoconfig_can_shutup(true); // ? + autoconfig_product(4); + autoconfig_manufacturer(2117); + autoconfig_serial(0x00000000); + autoconfig_rom_vector(0x0000); + } +} + +} // namespace bus::amiga::zorro diff --git a/src/devices/bus/amiga/zorro/merlin.h b/src/devices/bus/amiga/zorro/merlin.h new file mode 100644 index 0000000000000..f369628aaeec9 --- /dev/null +++ b/src/devices/bus/amiga/zorro/merlin.h @@ -0,0 +1,56 @@ +// license: GPL-2.0+ +// copyright-holders: Dirk Best +/*************************************************************************** + + XPert/ProDev Merlin + + RTG graphics card for Amiga 2000/3000/4000 + +***************************************************************************/ + +#ifndef MAME_BUS_AMIGA_ZORRO_MERLIN_H +#define MAME_BUS_AMIGA_ZORRO_MERLIN_H + +#pragma once + +#include "zorro.h" +#include "machine/autoconfig.h" +#include "video/bt48x.h" +#include "video/pc_vga_tseng.h" + + +namespace bus::amiga::zorro { + +class merlin_device : public device_t, public device_zorro2_card_interface, public amiga_autoconfig +{ +public: + merlin_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + +protected: + virtual void device_add_mconfig(machine_config &config) override ATTR_COLD; + + virtual void device_start() override ATTR_COLD; + + // device_zorro2_card_interface overrides + virtual void cfgin_w(int state) override; + virtual void busrst_w(int state) override; + + // amiga_autoconfig overrides + virtual void autoconfig_base_address(offs_t address) override; + +private: + void mmio_map(address_map &map) ATTR_COLD; + uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + + required_device m_vga; + required_device m_ramdac; + + bool m_autoconfig_memory_done; +}; + +} // namespace bus::amiga::zorro + +// device type declaration +DECLARE_DEVICE_TYPE_NS(ZORRO_MERLIN, bus::amiga::zorro, merlin_device) + +#endif // MAME_BUS_AMIGA_ZORRO_MERLIN_H diff --git a/src/devices/bus/amiga/zorro/picasso2.cpp b/src/devices/bus/amiga/zorro/picasso2.cpp index 9863b954523a3..35799c1ded1ab 100644 --- a/src/devices/bus/amiga/zorro/picasso2.cpp +++ b/src/devices/bus/amiga/zorro/picasso2.cpp @@ -88,9 +88,10 @@ void picasso2p_device::device_start() { } -void picasso2p_device::device_reset() +void picasso2p_device::busrst_w(int state) { - m_autoconfig_memory_done = false; + if (state == 0) + m_autoconfig_memory_done = false; } device_memory_interface::space_config_vector picasso2p_device::memory_space_config() const diff --git a/src/devices/bus/amiga/zorro/picasso2.h b/src/devices/bus/amiga/zorro/picasso2.h index d75d49b6f7b81..82a779f2874fd 100644 --- a/src/devices/bus/amiga/zorro/picasso2.h +++ b/src/devices/bus/amiga/zorro/picasso2.h @@ -29,13 +29,13 @@ class picasso2p_device : public device_t, public device_memory_interface, public virtual void device_add_mconfig(machine_config &config) override ATTR_COLD; virtual void device_start() override ATTR_COLD; - virtual void device_reset() override ATTR_COLD; // device_memory_interface virtual space_config_vector memory_space_config() const override; // device_zorro2_card_interface overrides virtual void cfgin_w(int state) override; + virtual void busrst_w(int state) override; // amiga_autoconfig overrides virtual void autoconfig_base_address(offs_t address) override; diff --git a/src/devices/bus/amiga/zorro/rainbow2.cpp b/src/devices/bus/amiga/zorro/rainbow2.cpp index 41c67e17773f3..bd2c063297851 100644 --- a/src/devices/bus/amiga/zorro/rainbow2.cpp +++ b/src/devices/bus/amiga/zorro/rainbow2.cpp @@ -106,9 +106,10 @@ void rainbow2_device::device_start() } -void rainbow2_device::device_reset() +void rainbow2_device::busrst_w(int state) { - m_control = 0; + if (state == 0) + m_control = 0; } void rainbow2_device::control_w(offs_t offset, uint8_t data) diff --git a/src/devices/bus/amiga/zorro/rainbow2.h b/src/devices/bus/amiga/zorro/rainbow2.h index f676e7766ad99..dc870ddd77984 100644 --- a/src/devices/bus/amiga/zorro/rainbow2.h +++ b/src/devices/bus/amiga/zorro/rainbow2.h @@ -34,10 +34,10 @@ class rainbow2_device : public device_t, public device_zorro2_card_interface, pu virtual void device_add_mconfig(machine_config &config) override ATTR_COLD; virtual void device_start() override ATTR_COLD; - virtual void device_reset() override ATTR_COLD; // device_zorro2_card_interface overrides virtual void cfgin_w(int state) override; + virtual void busrst_w(int state) override; // amiga_autoconfig overrides virtual void autoconfig_base_address(offs_t address) override; diff --git a/src/devices/bus/amiga/zorro/ripple.cpp b/src/devices/bus/amiga/zorro/ripple.cpp index fc6a2c9bf155e..6cc9679cf2f71 100644 --- a/src/devices/bus/amiga/zorro/ripple.cpp +++ b/src/devices/bus/amiga/zorro/ripple.cpp @@ -99,9 +99,10 @@ void ripple_ide_device::device_start() save_item(NAME(m_flash_bank)); } -void ripple_ide_device::device_reset() +void ripple_ide_device::busrst_w(int state) { - m_flash_bank = 0; + if (state == 0) + m_flash_bank = 0; } void ripple_ide_device::bank_select_w(offs_t offset, uint16_t data, uint16_t mem_mask) diff --git a/src/devices/bus/amiga/zorro/ripple.h b/src/devices/bus/amiga/zorro/ripple.h index 9849cb4bf3843..4d203bd6e5e7b 100644 --- a/src/devices/bus/amiga/zorro/ripple.h +++ b/src/devices/bus/amiga/zorro/ripple.h @@ -31,10 +31,10 @@ class ripple_ide_device : public device_t, public device_zorro2_card_interface, virtual const tiny_rom_entry *device_rom_region() const override ATTR_COLD; virtual void device_start() override ATTR_COLD; - virtual void device_reset() override ATTR_COLD; // device_zorro2_card_interface overrides virtual void cfgin_w(int state) override; + virtual void busrst_w(int state) override; // amiga_autoconfig overrides virtual void autoconfig_base_address(offs_t address) override; diff --git a/src/devices/bus/amiga/zorro/toccata.cpp b/src/devices/bus/amiga/zorro/toccata.cpp index 39a34861acad1..6c5c2cf81cabe 100644 --- a/src/devices/bus/amiga/zorro/toccata.cpp +++ b/src/devices/bus/amiga/zorro/toccata.cpp @@ -94,10 +94,6 @@ void toccata_device::device_start() save_item(NAME(m_control)); } -void toccata_device::device_reset() -{ -} - void toccata_device::update_interrupts() { if ((BIT(m_control, 7) && BIT(m_status, 3)) || (BIT(m_control, 6) && BIT(m_status, 2))) diff --git a/src/devices/bus/amiga/zorro/toccata.h b/src/devices/bus/amiga/zorro/toccata.h index c0ec756b4cab0..d1e444334069b 100644 --- a/src/devices/bus/amiga/zorro/toccata.h +++ b/src/devices/bus/amiga/zorro/toccata.h @@ -30,7 +30,6 @@ class toccata_device : public device_t, public device_zorro2_card_interface, pub virtual void device_add_mconfig(machine_config &config) override ATTR_COLD; virtual void device_start() override ATTR_COLD; - virtual void device_reset() override ATTR_COLD; // device_zorro2_card_interface overrides virtual void cfgin_w(int state) override; diff --git a/src/devices/bus/amiga/zorro/zorro.cpp b/src/devices/bus/amiga/zorro/zorro.cpp index ed3c60ee7eba3..78f208886f921 100644 --- a/src/devices/bus/amiga/zorro/zorro.cpp +++ b/src/devices/bus/amiga/zorro/zorro.cpp @@ -198,17 +198,6 @@ void zorro2_bus_device::device_reset() { // call base device zorro_bus_device_base::device_reset(); - - // reset zorro cards - for (device_zorro2_card_interface &card : m_dev) - card.device().reset(); - - // initiate autoconfig - m_autoconfig_device = 0; - - // if we have a device, start the autoconfig chain - if (m_dev.size() > m_autoconfig_device) - m_dev[m_autoconfig_device].get().cfgin_w(0); } //------------------------------------------------- @@ -248,6 +237,22 @@ void zorro2_bus_device::fc_w(int code) entry.fc_w(code); } +void zorro2_bus_device::busrst_w(int state) +{ + for (device_zorro2_card_interface &card : m_dev) + card.busrst_w(state); + + if (state == 0) + { + // initiate autoconfig + m_autoconfig_device = 0; + + // if we have a device, start the autoconfig chain + if (m_dev.size() > m_autoconfig_device) + m_dev[m_autoconfig_device].get().cfgin_w(0); + } +} + //************************************************************************** // ZORRO INTERFACE @@ -285,6 +290,10 @@ void device_zorro_card_interface::cfgin_w(int state) { } +void device_zorro_card_interface::busrst_w(int state) +{ +} + //************************************************************************** // EXPANSION CARD INTERFACE diff --git a/src/devices/bus/amiga/zorro/zorro.h b/src/devices/bus/amiga/zorro/zorro.h index 84840de457d6c..236cb192710a6 100644 --- a/src/devices/bus/amiga/zorro/zorro.h +++ b/src/devices/bus/amiga/zorro/zorro.h @@ -74,7 +74,7 @@ 88 Ground 87 Ground 90 Ground 89 Ground 92 7 MHz 91 Ground - 94 /BURST 93 DOE + 94 /BUSRST 93 DOE 96 /EINT1 95 /BG *5 98 N/C 97 N/C 100 Ground 99 Ground @@ -295,6 +295,7 @@ class zorro2_bus_device : public zorro_bus_device_base // interface (from host) virtual void fc_w(int code) override; + void busrst_w(int state); protected: zorro2_bus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); @@ -337,6 +338,7 @@ class device_zorro_card_interface : public device_interface // interface (from host) virtual void fc_w(int code); virtual void cfgin_w(int state); + virtual void busrst_w(int state); protected: device_zorro_card_interface(const machine_config &mconfig, device_t &device); diff --git a/src/devices/bus/heathzenith/h19/tlb.cpp b/src/devices/bus/heathzenith/h19/tlb.cpp index 92a5cda924770..aefaeda33c491 100644 --- a/src/devices/bus/heathzenith/h19/tlb.cpp +++ b/src/devices/bus/heathzenith/h19/tlb.cpp @@ -908,6 +908,49 @@ static INPUT_PORTS_START( gp19 ) PORT_DIPSETTING( 0x80, "Never") INPUT_PORTS_END +static INPUT_PORTS_START( igc_common ) + PORT_START("joystick_p1") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) + + PORT_START("joystick_p2") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(2) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) + +INPUT_PORTS_END + +static INPUT_PORTS_START( igc ) + PORT_INCLUDE( tlb ) + + PORT_INCLUDE( igc_common ) +INPUT_PORTS_END + +static INPUT_PORTS_START( igc_super19 ) + PORT_INCLUDE( super19 ) + + PORT_INCLUDE( igc_common ) +INPUT_PORTS_END + +static INPUT_PORTS_START( igc_ultra ) + PORT_INCLUDE( ultra19 ) + + PORT_INCLUDE( igc_common ) +INPUT_PORTS_END + +static INPUT_PORTS_START( igc_watz ) + PORT_INCLUDE( watz19 ) + + PORT_INCLUDE( igc_common ) +INPUT_PORTS_END + + + ROM_START( h19 ) // Original terminal code @@ -1771,15 +1814,22 @@ void heath_imaginator_tlb_device::set_irq_line() * */ heath_igc_tlb_device::heath_igc_tlb_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : - heath_tlb_device(mconfig, HEATH_IGC, tag, owner, clock) + heath_igc_tlb_device(mconfig, HEATH_IGC, tag, owner, clock) { } heath_igc_tlb_device::heath_igc_tlb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) : - heath_tlb_device(mconfig, type, tag, owner, clock) + heath_tlb_device(mconfig, type, tag, owner, clock), + m_joystick1(*this, "joystick_p1"), + m_joystick2(*this, "joystick_p2") { } +ioport_constructor heath_igc_tlb_device::device_input_ports() const +{ + return INPUT_PORTS_NAME(igc); +} + void heath_igc_tlb_device::device_add_mconfig(machine_config &config) { heath_tlb_device::device_add_mconfig(config); @@ -1857,10 +1907,12 @@ u8 heath_igc_tlb_device::sigma_r(u8 offset) // TODO - High pen address break; case 3: - // TODO - Left input device + // Left input device + val = m_joystick1->read(); break; case 4: - // TODO - Right input device + // Right input device + val = m_joystick2->read(); break; case 5: val = sigma_ctrl_r(); @@ -2018,7 +2070,7 @@ const tiny_rom_entry *heath_igc_super19_tlb_device::device_rom_region() const ioport_constructor heath_igc_super19_tlb_device::device_input_ports() const { - return INPUT_PORTS_NAME(super19); + return INPUT_PORTS_NAME(igc_super19); } @@ -2069,7 +2121,7 @@ const tiny_rom_entry *heath_igc_ultra_tlb_device::device_rom_region() const ioport_constructor heath_igc_ultra_tlb_device::device_input_ports() const { - return INPUT_PORTS_NAME(ultra19); + return INPUT_PORTS_NAME(igc_ultra); } @@ -2089,7 +2141,7 @@ const tiny_rom_entry *heath_igc_watz_tlb_device::device_rom_region() const ioport_constructor heath_igc_watz_tlb_device::device_input_ports() const { - return INPUT_PORTS_NAME(watz19); + return INPUT_PORTS_NAME(igc_watz); } diff --git a/src/devices/bus/heathzenith/h19/tlb.h b/src/devices/bus/heathzenith/h19/tlb.h index de1790d137c17..216dc80f3b0e1 100644 --- a/src/devices/bus/heathzenith/h19/tlb.h +++ b/src/devices/bus/heathzenith/h19/tlb.h @@ -317,6 +317,7 @@ class heath_igc_tlb_device : public heath_tlb_device protected: heath_igc_tlb_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock = 0); + virtual ioport_constructor device_input_ports() const override ATTR_COLD; virtual void device_start() override ATTR_COLD; virtual void device_reset() override ATTR_COLD; virtual void device_add_mconfig(machine_config &config) override ATTR_COLD; @@ -351,6 +352,9 @@ class heath_igc_tlb_device : public heath_tlb_device u16 m_io_address; u16 m_window_address; +private: + required_ioport m_joystick1, m_joystick2; + }; /** diff --git a/src/devices/bus/heathzenith/h89/cards.cpp b/src/devices/bus/heathzenith/h89/cards.cpp deleted file mode 100644 index 0a33bd8593f1c..0000000000000 --- a/src/devices/bus/heathzenith/h89/cards.cpp +++ /dev/null @@ -1,46 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:R. Belmont -/*************************************************************************** - - H-89 and Z-90 slot cards - -***************************************************************************/ - -#include "emu.h" -#include "cards.h" - -#include "cdr_fdc_880h.h" -#include "h_88_3.h" -#include "h_88_5.h" -#include "mms77316_fdc.h" -#include "sigmasoft_sound.h" -#include "we_pullup.h" -#include "z_89_11.h" -#include "z37_fdc.h" - - -void h89_right_cards(device_slot_interface &device) -{ - device.option_add("cdr_fdc", H89BUS_CDR_FDC_880H); - device.option_add("h_88_3", H89BUS_H_88_3); - device.option_add("ha_88_3", H89BUS_HA_88_3); - device.option_add("h_88_5", H89BUS_H_88_5); - device.option_add("ss_snd", H89BUS_SIGMASOFT_SND); - device.option_add("z_89_11", H89BUS_Z_89_11); - - device.option_add("z37fdc", H89BUS_Z37); -} - -void h89_right_cards_mms(device_slot_interface &device) -{ - h89_right_cards(device); - device.option_add("mms77316", H89BUS_MMS77316); -} - -void h89_right_p506_cards(device_slot_interface &device) -{ - device.option_add("h_88_3", H89BUS_H_88_3); - device.option_add("ha_88_3", H89BUS_HA_88_3); - device.option_add("ss_snd", H89BUS_SIGMASOFT_SND); - device.option_add("we_pullup", H89BUS_WE_PULLUP); -} diff --git a/src/devices/bus/heathzenith/h89/cards.h b/src/devices/bus/heathzenith/h89/cards.h deleted file mode 100644 index f9ca720a02140..0000000000000 --- a/src/devices/bus/heathzenith/h89/cards.h +++ /dev/null @@ -1,18 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:R. Belmont -/*************************************************************************** - - Heath/Zenith H-89 and Z-90 cards - -***************************************************************************/ - -#ifndef MAME_BUS_HEATHZENITH_H89_CARDS_H -#define MAME_BUS_HEATHZENITH_H89_CARDS_H - -#pragma once - -void h89_right_cards(device_slot_interface &device) ATTR_COLD; -void h89_right_cards_mms(device_slot_interface &device) ATTR_COLD; -void h89_right_p506_cards(device_slot_interface &device) ATTR_COLD; - -#endif // MAME_BUS_HEATHZENITH_H89_CARDS_H diff --git a/src/devices/bus/heathzenith/h89/h17_fdc.cpp b/src/devices/bus/heathzenith/h89/h17_fdc.cpp index 26edaaa892909..8f57a8ed72d98 100644 --- a/src/devices/bus/heathzenith/h89/h17_fdc.cpp +++ b/src/devices/bus/heathzenith/h89/h17_fdc.cpp @@ -15,6 +15,7 @@ #include "emu.h" #include "h17_fdc.h" +#include "formats/h17disk.h" #include "imagedev/floppy.h" #include "machine/s2350.h" @@ -63,6 +64,7 @@ class heath_h17_fdc_device : public device_t, public device_h89bus_right_card_in void ctrl_w(u8 val); u8 floppy_status_r(); + static void floppy_formats(format_registration &fr); void set_floppy(floppy_image_device *floppy); void step_w(int state); void dir_w(int state); @@ -340,6 +342,11 @@ TIMER_DEVICE_CALLBACK_MEMBER(heath_h17_fdc_device::tx_timer_cb) m_s2350->tcp_w(); } +void heath_h17_fdc_device::floppy_formats(format_registration &fr) +{ + fr.add(FLOPPY_H17D_FORMAT); +} + void heath_h17_fdc_device::device_add_mconfig(machine_config &config) { S2350(config, m_s2350, 0); @@ -348,7 +355,7 @@ void heath_h17_fdc_device::device_add_mconfig(machine_config &config) for (int i = 0; i < MAX_FLOPPY_DRIVES; i++) { // TODO -> add (and define) heath hard-sectored floppy formats. - FLOPPY_CONNECTOR(config, m_floppies[i], h17_floppies, "ssdd", floppy_image_device::default_fm_floppy_formats); + FLOPPY_CONNECTOR(config, m_floppies[i], h17_floppies, "ssdd", heath_h17_fdc_device::floppy_formats); m_floppies[i]->enable_sound(true); } diff --git a/src/devices/bus/heathzenith/h89/h89bus.cpp b/src/devices/bus/heathzenith/h89/h89bus.cpp index 1b05c49e4800a..8bff638a3c857 100644 --- a/src/devices/bus/heathzenith/h89/h89bus.cpp +++ b/src/devices/bus/heathzenith/h89/h89bus.cpp @@ -150,9 +150,6 @@ h89bus_device::h89bus_device(const machine_config &mconfig, device_type type, co m_out_int3_cb(*this), m_out_int4_cb(*this), m_out_int5_cb(*this), - m_out_fdcirq_cb(*this), - m_out_fdcdrq_cb(*this), - m_out_blockirq_cb(*this), m_out_fmwe_cb(*this), m_out_wait_cb(*this), m_in_tlb_cb(*this, 0), @@ -324,21 +321,6 @@ void h89bus_device::set_int5_line(int state) m_out_int5_cb(state); } -void h89bus_device::set_fdcirq_line(int state) -{ - m_out_fdcirq_cb(state); -} - -void h89bus_device::set_fdcdrq_line(int state) -{ - m_out_fdcdrq_cb(state); -} - -void h89bus_device::set_blockirq_line(int state) -{ - m_out_blockirq_cb(state); -} - void h89bus_device::set_fmwe_line(int state) { m_out_fmwe_cb(state); diff --git a/src/devices/bus/heathzenith/h89/h89bus.h b/src/devices/bus/heathzenith/h89/h89bus.h index 8befec480bbd6..0cfe29da10a3f 100644 --- a/src/devices/bus/heathzenith/h89/h89bus.h +++ b/src/devices/bus/heathzenith/h89/h89bus.h @@ -149,9 +149,6 @@ class device_h89bus_right_card_interface : public device_h89bus_card_interface void set_slot_int3(int state); void set_slot_int4(int state); void set_slot_int5(int state); - void set_slot_fdcirq(int state); - void set_slot_fdcdrq(int state); - void set_slot_blockirq(int state); void set_slot_fmwe(int state); void set_slot_wait(int state); int get_io0(); @@ -304,9 +301,6 @@ class h89bus_device : public device_t auto out_int3_callback() { return m_out_int3_cb.bind(); } auto out_int4_callback() { return m_out_int4_cb.bind(); } auto out_int5_callback() { return m_out_int5_cb.bind(); } - auto out_fdcirq_callback() { return m_out_fdcirq_cb.bind(); } - auto out_fdcdrq_callback() { return m_out_fdcdrq_cb.bind(); } - auto out_blockirq_callback() { return m_out_blockirq_cb.bind(); } auto out_fmwe_callback() { return m_out_fmwe_cb.bind(); } auto out_wait_callback() { return m_out_wait_cb.bind(); } auto in_tlb_callback() { return m_in_tlb_cb.bind(); } @@ -329,9 +323,6 @@ class h89bus_device : public device_t void set_int3_line(int state); void set_int4_line(int state); void set_int5_line(int state); - void set_fdcirq_line(int state); - void set_fdcdrq_line(int state); - void set_blockirq_line(int state); void set_fmwe_line(int state); void set_wait_line(int state); u8 read_gpp(); @@ -343,7 +334,7 @@ class h89bus_device : public device_t int m_io0, m_io1, m_mem0, m_mem1; private: - devcb_write_line m_out_int3_cb, m_out_int4_cb, m_out_int5_cb, m_out_fdcirq_cb, m_out_fdcdrq_cb, m_out_blockirq_cb; + devcb_write_line m_out_int3_cb, m_out_int4_cb, m_out_int5_cb; devcb_write_line m_out_fmwe_cb, m_out_wait_cb; devcb_read8 m_in_tlb_cb, m_in_nmi_cb, m_in_gpp_cb; devcb_write8 m_out_tlb_cb, m_out_nmi_cb, m_out_gpp_cb; @@ -390,21 +381,6 @@ inline void device_h89bus_right_card_interface::set_slot_int5(int state) h89bus().set_int5_line(state); } -inline void device_h89bus_right_card_interface::set_slot_fdcirq(int state) -{ - h89bus().set_fdcirq_line(state); -} - -inline void device_h89bus_right_card_interface::set_slot_fdcdrq(int state) -{ - h89bus().set_fdcdrq_line(state); -} - -inline void device_h89bus_right_card_interface::set_slot_blockirq(int state) -{ - h89bus().set_blockirq_line(state); -} - inline void device_h89bus_right_card_interface::set_slot_fmwe(int state) { if (m_p506_signals) diff --git a/src/devices/bus/heathzenith/h89/h_88_3.cpp b/src/devices/bus/heathzenith/h89/h_88_3.cpp index f828ad518e292..224bbd93a9d57 100644 --- a/src/devices/bus/heathzenith/h89/h_88_3.cpp +++ b/src/devices/bus/heathzenith/h89/h_88_3.cpp @@ -176,12 +176,6 @@ void h_88_3_device::modem_w(offs_t reg, u8 val) void h_88_3_device::device_start() { - save_item(NAME(m_lp_enabled)); - save_item(NAME(m_lp_int_idx)); - save_item(NAME(m_aux_enabled)); - save_item(NAME(m_aux_int_idx)); - save_item(NAME(m_modem_enabled)); - save_item(NAME(m_modem_int_idx)); save_item(NAME(m_lp_intr)); save_item(NAME(m_aux_intr)); save_item(NAME(m_modem_intr)); diff --git a/src/mame/heathzenith/intr_cntrl.cpp b/src/devices/bus/heathzenith/h89/intr_cntrl.cpp similarity index 100% rename from src/mame/heathzenith/intr_cntrl.cpp rename to src/devices/bus/heathzenith/h89/intr_cntrl.cpp diff --git a/src/mame/heathzenith/intr_cntrl.h b/src/devices/bus/heathzenith/h89/intr_cntrl.h similarity index 96% rename from src/mame/heathzenith/intr_cntrl.h rename to src/devices/bus/heathzenith/h89/intr_cntrl.h index e0e9c3966f7c0..b4f9b76f84014 100644 --- a/src/mame/heathzenith/intr_cntrl.h +++ b/src/devices/bus/heathzenith/h89/intr_cntrl.h @@ -8,8 +8,8 @@ ****************************************************************************/ -#ifndef MAME_HEATHZENITH_INTR_CNTRL_H -#define MAME_HEATHZENITH_INTR_CNTRL_H +#ifndef MAME_BUS_HEATHZENITH_H89_INTR_CNTRL_H +#define MAME_BUS_HEATHZENITH_H89_INTR_CNTRL_H #pragma once @@ -165,4 +165,4 @@ class heath_intr_socket : public device_t, DECLARE_DEVICE_TYPE(HEATH_INTR_SOCKET, heath_intr_socket) -#endif // MAME_HEATHZENITH_H89_INTR_CNTRL_H +#endif // MAME_BUS_HEATHZENITH_H89_INTR_CNTRL_H diff --git a/src/devices/bus/heathzenith/h89/mms77316_fdc.cpp b/src/devices/bus/heathzenith/h89/mms77316_fdc.cpp index b0af15bdcea59..87a1599d8a2ba 100644 --- a/src/devices/bus/heathzenith/h89/mms77316_fdc.cpp +++ b/src/devices/bus/heathzenith/h89/mms77316_fdc.cpp @@ -14,9 +14,6 @@ #include "mms77316_fdc.h" -#include "imagedev/floppy.h" -#include "machine/wd_fdc.h" - #define LOG_REG (1U << 1) // Shows register setup #define LOG_LINES (1U << 2) // Show control lines #define LOG_DRIVE (1U << 3) // Show drive select @@ -43,60 +40,13 @@ #define FUNCNAME __PRETTY_FUNCTION__ #endif -namespace { - -class mms77316_fdc_device : public device_t, public device_h89bus_right_card_interface -{ -public: - mms77316_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); - - virtual void write(u8 select_lines, u8 offset, u8 data) override; - virtual u8 read(u8 select_lines, u8 offset) override; - -protected: - virtual void device_start() override ATTR_COLD; - virtual void device_reset() override ATTR_COLD; - virtual void device_add_mconfig(machine_config &config) override ATTR_COLD; - - void ctrl_w(u8 val); - void data_w(u8 val); - u8 data_r(); - - void set_irq(int state); - void set_drq(int state); - - // Burst mode was required for a 2 MHz Z80 to handle 8" DD data rates. - // The typical irq/drq was too slow, this utilizes wait states to read the - // WD1797 data port once the drq line is high. - inline bool burst_mode_r() { return !m_drq_allowed; } - -private: - required_device m_fdc; - required_device_array m_floppies; - - bool m_irq_allowed; - bool m_drq_allowed; - - bool m_irq; - bool m_drq; - u32 m_drq_count; - - /// Bits set in cmd_ControlPort_c - static constexpr u8 ctrl_525DriveSel_c = 2; - static constexpr u8 ctrl_EnableIntReq_c = 3; - static constexpr u8 ctrl_EnableDrqInt_c = 5; - static constexpr u8 ctrl_SetMFMRecording_c = 6; - - static constexpr XTAL MASTER_CLOCK = XTAL(8'000'000); - static constexpr XTAL FIVE_IN_CLOCK = MASTER_CLOCK / 8; - static constexpr XTAL EIGHT_IN_CLOCK = MASTER_CLOCK / 4; -}; mms77316_fdc_device::mms77316_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock): device_t(mconfig, H89BUS_MMS77316, tag, owner, 0), device_h89bus_right_card_interface(mconfig, *this), m_fdc(*this, "mms_fdc"), - m_floppies(*this, "mms_fdc:%u", 0U) + m_floppies(*this, "mms_fdc:%u", 0U), + m_intr_cntrl(*this, finder_base::DUMMY_TAG) { } @@ -117,13 +67,13 @@ void mms77316_fdc_device::ctrl_w(u8 val) if (m_irq_allowed) { - set_slot_fdcirq(m_irq); - set_slot_fdcdrq(m_drq); + m_intr_cntrl->set_irq(m_irq); + m_intr_cntrl->set_drq(m_drq); } else { - set_slot_fdcirq(CLEAR_LINE); - set_slot_fdcdrq(CLEAR_LINE); + m_intr_cntrl->set_irq(CLEAR_LINE); + m_intr_cntrl->set_drq(CLEAR_LINE); } LOGDRIVE("%s: floppydrive: %d, 5.25 in: %d\n", FUNCNAME, floppy_drive, five_in_drv); @@ -273,8 +223,8 @@ void mms77316_fdc_device::device_reset() m_irq = false; m_drq_count = 0; - set_slot_fdcirq(CLEAR_LINE); - set_slot_fdcdrq(CLEAR_LINE); + m_intr_cntrl->set_irq(CLEAR_LINE); + m_intr_cntrl->set_drq(CLEAR_LINE); set_slot_wait(CLEAR_LINE); for (int i = 0; i < 4; i++) @@ -355,7 +305,7 @@ void mms77316_fdc_device::set_irq(int state) m_drq_count = 0; } - set_slot_fdcirq(m_irq_allowed ? m_irq : CLEAR_LINE); + m_intr_cntrl->set_irq(m_irq_allowed ? m_irq : CLEAR_LINE); } void mms77316_fdc_device::set_drq(int state) @@ -373,14 +323,12 @@ void mms77316_fdc_device::set_drq(int state) set_slot_wait(CLEAR_LINE); } - set_slot_fdcdrq(m_drq_count == 0 ? m_drq : CLEAR_LINE); + m_intr_cntrl->set_drq(m_drq_count == 0 ? m_drq : CLEAR_LINE); } else { - set_slot_fdcdrq(m_drq_allowed ? m_drq : CLEAR_LINE); + m_intr_cntrl->set_drq(m_drq_allowed ? m_drq : CLEAR_LINE); } } -} // anonymous namespace - DEFINE_DEVICE_TYPE_PRIVATE(H89BUS_MMS77316, device_h89bus_right_card_interface, mms77316_fdc_device, "mms77316_fdc", "Magnolia MicroSystems 77316 Soft-sectored Controller"); diff --git a/src/devices/bus/heathzenith/h89/mms77316_fdc.h b/src/devices/bus/heathzenith/h89/mms77316_fdc.h index 699db267adff4..04838c0fff617 100644 --- a/src/devices/bus/heathzenith/h89/mms77316_fdc.h +++ b/src/devices/bus/heathzenith/h89/mms77316_fdc.h @@ -13,6 +13,61 @@ #include "h89bus.h" +#include "imagedev/floppy.h" +#include "machine/wd_fdc.h" + +#include "bus/heathzenith/h89/intr_cntrl.h" + +class mms77316_fdc_device : public device_t, public device_h89bus_right_card_interface +{ +public: + mms77316_fdc_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + + virtual void write(u8 select_lines, u8 offset, u8 data) override; + virtual u8 read(u8 select_lines, u8 offset) override; + + template void set_intr_cntrl(T &&tag) { m_intr_cntrl.set_tag(std::forward(tag)); } + +protected: + virtual void device_start() override ATTR_COLD; + virtual void device_reset() override ATTR_COLD; + virtual void device_add_mconfig(machine_config &config) override ATTR_COLD; + + void ctrl_w(u8 val); + void data_w(u8 val); + u8 data_r(); + + void set_irq(int state); + void set_drq(int state); + + // Burst mode was required for a 2 MHz Z80 to handle 8" DD data rates. + // The typical irq/drq was too slow, this utilizes wait states to read the + // WD1797 data port once the drq line is high. + inline bool burst_mode_r() { return !m_drq_allowed; } + +private: + required_device m_fdc; + required_device_array m_floppies; + required_device m_intr_cntrl; + + bool m_irq_allowed; + bool m_drq_allowed; + + bool m_irq; + bool m_drq; + u32 m_drq_count; + + /// Bits set in cmd_ControlPort_c + static constexpr u8 ctrl_525DriveSel_c = 2; + static constexpr u8 ctrl_EnableIntReq_c = 3; + static constexpr u8 ctrl_EnableDrqInt_c = 5; + static constexpr u8 ctrl_SetMFMRecording_c = 6; + + static constexpr XTAL MASTER_CLOCK = XTAL(8'000'000); + static constexpr XTAL FIVE_IN_CLOCK = MASTER_CLOCK / 8; + static constexpr XTAL EIGHT_IN_CLOCK = MASTER_CLOCK / 4; +}; + DECLARE_DEVICE_TYPE(H89BUS_MMS77316, device_h89bus_right_card_interface) #endif // MAME_BUS_HEATHZENITH_H89_MMS77316_FDC_H diff --git a/src/devices/bus/heathzenith/h89/z37_fdc.cpp b/src/devices/bus/heathzenith/h89/z37_fdc.cpp index 41dc53b4b8a0e..af0c4d9ae7950 100644 --- a/src/devices/bus/heathzenith/h89/z37_fdc.cpp +++ b/src/devices/bus/heathzenith/h89/z37_fdc.cpp @@ -35,65 +35,16 @@ #define FUNCNAME __PRETTY_FUNCTION__ #endif -namespace { - -class h89bus_z37_device : public device_t, public device_h89bus_right_card_interface -{ -public: - h89bus_z37_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); - - virtual void write(u8 select_lines, u8 offset, u8 data) override; - virtual u8 read(u8 select_lines, u8 offset) override; - -protected: - virtual void device_start() override ATTR_COLD; - virtual void device_reset() override ATTR_COLD; - virtual void device_add_mconfig(machine_config &config) override ATTR_COLD; - - void ctrl_w(u8 val); - - void intf_w(u8 val); - - void cmd_w(u8 val); - u8 stat_r(); - - void data_w(u8 val); - u8 data_r(); - - void set_irq(int state); - void set_drq(int state); - -private: - required_device m_fdc; - required_device_array m_floppies; - - bool m_irq_allowed; - bool m_drq_allowed; - bool m_access_track_sector; - - /// Bits set in cmd_ControlPort_c - DK.CON - static constexpr u8 ctrl_EnableIntReq_c = 0; - static constexpr u8 ctrl_EnableDrqInt_c = 1; - static constexpr u8 ctrl_SetMFMRecording_c = 2; - static constexpr u8 ctrl_MotorsOn_c = 3; - static constexpr u8 ctrl_Drive_0_c = 4; - static constexpr u8 ctrl_Drive_1_c = 5; - static constexpr u8 ctrl_Drive_2_c = 6; - static constexpr u8 ctrl_Drive_3_c = 7; - - /// Bits to set alternate registers on InterfaceControl_c - DK.INT - static constexpr u8 if_SelectSectorTrack_c = 0; -}; h89bus_z37_device::h89bus_z37_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock): device_t(mconfig, H89BUS_Z37, tag, owner, 0), device_h89bus_right_card_interface(mconfig, *this), m_fdc(*this, "z37_fdc"), - m_floppies(*this, "z37_fdc:%u", 0U) + m_floppies(*this, "z37_fdc:%u", 0U), + m_intr_cntrl(*this, finder_base::DUMMY_TAG) { } - void h89bus_z37_device::ctrl_w(u8 val) { bool motor_on = bool(BIT(val, ctrl_MotorsOn_c)); @@ -107,12 +58,12 @@ void h89bus_z37_device::ctrl_w(u8 val) if (m_drq_allowed) { - set_slot_blockirq(1); + m_intr_cntrl->block_interrupts(1); } else { - set_slot_blockirq(0); - set_slot_fdcdrq(0); + m_intr_cntrl->block_interrupts(0); + m_intr_cntrl->set_drq(0); } if (BIT(val, ctrl_Drive_0_c)) @@ -246,9 +197,9 @@ void h89bus_z37_device::device_reset() m_drq_allowed = false; m_access_track_sector = false; - set_slot_fdcirq(0); - set_slot_fdcdrq(0); - set_slot_blockirq(0); + m_intr_cntrl->set_irq(0); + m_intr_cntrl->set_drq(0); + m_intr_cntrl->block_interrupts(0); } static void z37_floppies(device_slot_interface &device) @@ -285,16 +236,14 @@ void h89bus_z37_device::set_irq(int state) { LOGLINES("set irq, allowed: %d state: %d\n", m_irq_allowed, state); - set_slot_fdcirq(m_irq_allowed ? state : CLEAR_LINE); + m_intr_cntrl->set_irq(m_irq_allowed ? state : CLEAR_LINE); } void h89bus_z37_device::set_drq(int state) { LOGLINES("set drq, allowed: %d state: %d\n", m_drq_allowed, state); - set_slot_fdcdrq(m_drq_allowed ? state : CLEAR_LINE); + m_intr_cntrl->set_drq(m_drq_allowed ? state : CLEAR_LINE); } -} // anonymous namespace - DEFINE_DEVICE_TYPE_PRIVATE(H89BUS_Z37, device_h89bus_right_card_interface, h89bus_z37_device, "h89_z37", "Heathkit Z-37 Floppy Disk Controller"); diff --git a/src/devices/bus/heathzenith/h89/z37_fdc.h b/src/devices/bus/heathzenith/h89/z37_fdc.h index 045ccabc74ac7..ad2e52027be32 100644 --- a/src/devices/bus/heathzenith/h89/z37_fdc.h +++ b/src/devices/bus/heathzenith/h89/z37_fdc.h @@ -13,6 +13,59 @@ #include "h89bus.h" +#include "bus/heathzenith/h89/intr_cntrl.h" + +class h89bus_z37_device : public device_t, public device_h89bus_right_card_interface +{ +public: + h89bus_z37_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + + virtual void write(u8 select_lines, u8 offset, u8 data) override; + virtual u8 read(u8 select_lines, u8 offset) override; + + template void set_intr_cntrl(T &&tag) { m_intr_cntrl.set_tag(std::forward(tag)); } + +protected: + virtual void device_start() override ATTR_COLD; + virtual void device_reset() override ATTR_COLD; + virtual void device_add_mconfig(machine_config &config) override ATTR_COLD; + + void ctrl_w(u8 val); + + void intf_w(u8 val); + + void cmd_w(u8 val); + u8 stat_r(); + + void data_w(u8 val); + u8 data_r(); + + void set_irq(int state); + void set_drq(int state); + +private: + required_device m_fdc; + required_device_array m_floppies; + required_device m_intr_cntrl; + + bool m_irq_allowed; + bool m_drq_allowed; + bool m_access_track_sector; + + /// Bits set in cmd_ControlPort_c - DK.CON + static constexpr u8 ctrl_EnableIntReq_c = 0; + static constexpr u8 ctrl_EnableDrqInt_c = 1; + static constexpr u8 ctrl_SetMFMRecording_c = 2; + static constexpr u8 ctrl_MotorsOn_c = 3; + static constexpr u8 ctrl_Drive_0_c = 4; + static constexpr u8 ctrl_Drive_1_c = 5; + static constexpr u8 ctrl_Drive_2_c = 6; + static constexpr u8 ctrl_Drive_3_c = 7; + + /// Bits to set alternate registers on InterfaceControl_c - DK.INT + static constexpr u8 if_SelectSectorTrack_c = 0; +}; + DECLARE_DEVICE_TYPE(H89BUS_Z37, device_h89bus_right_card_interface) #endif // MAME_BUS_HEATHZENITH_H89_Z37_FDC_H diff --git a/src/devices/bus/heathzenith/h89/z_89_11.cpp b/src/devices/bus/heathzenith/h89/z_89_11.cpp index cc2dd7a1972fe..c39321f1ee6ee 100644 --- a/src/devices/bus/heathzenith/h89/z_89_11.cpp +++ b/src/devices/bus/heathzenith/h89/z_89_11.cpp @@ -207,12 +207,6 @@ void z_89_11_device::aux_int(int data) void z_89_11_device::device_start() { - save_item(NAME(m_lp_enabled)); - save_item(NAME(m_lp_int_idx)); - save_item(NAME(m_aux_enabled)); - save_item(NAME(m_aux_int_idx)); - save_item(NAME(m_modem_enabled)); - save_item(NAME(m_modem_int_idx)); save_item(NAME(m_lp_intr)); save_item(NAME(m_aux_intr)); save_item(NAME(m_modem_intr)); diff --git a/src/devices/bus/hp_dio/hp98628_9.cpp b/src/devices/bus/hp_dio/hp98628_9.cpp new file mode 100644 index 0000000000000..030b85f84a6ff --- /dev/null +++ b/src/devices/bus/hp_dio/hp98628_9.cpp @@ -0,0 +1,1150 @@ +// license:BSD-3-Clause +// copyright-holders:F. Ulivi + +/********************************************************************* + + HP98628 Data communication interface + HP98629 SRM interface + + HP98628 is an asynchronous & synchronous serial interface card. + HP98629 is a special card to interface to what HP called a + SRM network (Shared Resource Manager). A SRM network connects + multiple workstations to a computer acting as a NAS (in modern + parlance). This MAME driver also emulates a HP98028 multiplexer, + which is a kind of 5-port network bridge. One port is connected + to emulated card, another port to a bitbanger interface and the + remaining 3 ports are not emulated. + For an overview of SRM see: + https://www.hp9845.net/9845/tutorials/networks/index.html + + From the hardware point of view these cards are very similar, + they are both based on a Z80CPU-Z80SIO-Z80CTC trio and a dual + port RAM to interface to 68k. They differ in the firmware ROM + and in the amount of dual-port RAM. + A 50-pin custom connector exposes RS232 and RS422 signals on + these cards. + + Reference docs for these cards: + - HP, 98028-90000, HP98629A Resource Management Interface + Schematic Diagram + - HP98628 schematic diagram by Tony Duell + - HP, 5955-6582, Jul 82, 98628/98629 Hardware External Reference + Specification + - HP, 98028-90000, HP98028A Resource Management Multiplexer + Schematic Diagram + +*********************************************************************/ + +#include "emu.h" +#include "hp98628_9.h" + +#include "bus/rs232/rs232.h" +#include "cpu/z80/z80.h" +#include "imagedev/bitbngr.h" +#include "machine/timer.h" +#include "machine/z80ctc.h" +#include "machine/z80sio.h" + +// Debugging +#undef VERBOSE +#define VERBOSE 0 +#include "logmacro.h" + +namespace { + +// Clock +constexpr auto CLOCK = 7.3728_MHz_XTAL; + +// Bit manipulation +template constexpr T BIT_MASK(unsigned n) +{ + return (T)1U << n; +} + +template void BIT_CLR(T& w , unsigned n) +{ + w &= ~BIT_MASK(n); +} + +template void BIT_SET(T& w , unsigned n) +{ + w |= BIT_MASK(n); +} + +// +---------------------+ +// | base_98628_9_device | +// +---------------------+ +class base_98628_9_device : + public device_t, + public bus::hp_dio::device_dio16_card_interface +{ +public: + // Input signals + void rx_in(int state); + void cts_in(int state); + void dcd_in(int state); + void ri_in(int state); + void dsr_in(int state); + void st_in(int state); + void rt_in(int state); + +protected: + static inline constexpr unsigned LOW_RAM_SIZE = 2048; + + base_98628_9_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + + virtual void device_start() override ATTR_COLD; + virtual void device_reset() override ATTR_COLD; + + virtual void reset_in(int state) override; + + void reset(int state, bool nmi); + void update_irq(); + void update_modem_ctrl(); + void update_clocks(); + + void base_config(machine_config &config) ATTR_COLD; + virtual void cpu_program_mem_map(address_map &map) ATTR_COLD; + void cpu_io_mem_map(address_map &map) ATTR_COLD; + virtual void install_68k_map(offs_t base_addr) ATTR_COLD; + uint8_t reg_r(offs_t addr); + void reg_w(offs_t addr, uint8_t data); + uint8_t low_ram_r_z80(offs_t addr); + uint16_t low_ram_r_68k(offs_t addr); + void low_ram_w_z80(offs_t addr, uint8_t data); + void low_ram_w_68k(offs_t addr, uint16_t data); + uint8_t sio_r(offs_t addr); + void sio_w(offs_t addr, uint8_t data); + void to0_w(int state); + void tx_clock_w(int state); + void to1_w(int state); + void rx_clock_w(int state); + void update_cpu_wait(); + void sio_wrdya_w(int state); + void sio_int_w(int state); + void ctc_int_w(int state); + uint8_t sw1_r(offs_t addr); + // Output signals + virtual void tx_out(int state) {} + virtual void tt_out(int state) {} + virtual void rts_out(int state) {} + virtual void dtr_out(int state) {} + virtual void ocd1_out(int state) {} + + required_device m_cpu; + required_device m_ctc; + required_device m_sio; + required_ioport m_sw1; + required_ioport m_sw2; + + bool m_installed_io; + bool m_reset; + bool m_irq; + bool m_irq_enabled; + bool m_semaphore; + bool m_ctsb; + bool m_wait_a; + bool m_ctc_irq; + bool m_sio_irq; + bool m_cpu_wait; + bool m_cpu_waiting; + bool m_to0_div; + bool m_to1_div; + bool m_st_in; + bool m_rt_in; + uint8_t m_modem_ctrl; + uint8_t m_modem_status; + uint8_t m_low_ram[ LOW_RAM_SIZE ]; +}; + +base_98628_9_device::base_98628_9_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) + : device_t(mconfig, type, tag, owner, clock) + , bus::hp_dio::device_dio16_card_interface(mconfig, *this) + , m_cpu(*this, "cpu") + , m_ctc(*this, "ctc") + , m_sio(*this, "sio") + , m_sw1(*this, "sw1") + , m_sw2(*this, "sw2") + , m_installed_io{false} + , m_cpu_wait{false} + , m_cpu_waiting{false} + , m_modem_status{0} +{ +} + +void base_98628_9_device::device_start() +{ + save_item(NAME(m_installed_io)); + save_item(NAME(m_reset)); + save_item(NAME(m_irq)); + save_item(NAME(m_irq_enabled)); + save_item(NAME(m_semaphore)); + save_item(NAME(m_ctsb)); + save_item(NAME(m_wait_a)); + save_item(NAME(m_ctc_irq)); + save_item(NAME(m_sio_irq)); + save_item(NAME(m_cpu_wait)); + save_item(NAME(m_cpu_waiting)); + save_item(NAME(m_to0_div)); + save_item(NAME(m_to1_div)); + save_item(NAME(m_st_in)); + save_item(NAME(m_rt_in)); + save_item(NAME(m_modem_ctrl)); + save_item(NAME(m_modem_status)); + save_item(NAME(m_low_ram)); +} + +constexpr unsigned SW2_SWITCH8_BIT = 7; +constexpr ioport_value SW2_SWITCH8_MASK = BIT_MASK(SW2_SWITCH8_BIT); +constexpr unsigned SW2_IRQ_LEVEL_SHIFT = 5; +constexpr ioport_value SW2_IRQ_LEVEL_MASK = 3; +constexpr ioport_value SW2_IRQ_LEVEL_IRQ3 = 0; +constexpr ioport_value SW2_IRQ_LEVEL_IRQ4 = 1; +constexpr ioport_value SW2_IRQ_LEVEL_IRQ5 = 2; +constexpr ioport_value SW2_IRQ_LEVEL_IRQ6 = 3; +constexpr ioport_value SW2_IRQ_LEVEL_DEF = SW2_IRQ_LEVEL_IRQ4; +constexpr unsigned SW2_SC_SHIFT = 0; +constexpr ioport_value SW2_SC_MASK = 0x1f; +constexpr ioport_value SW2_SC_DEF = 21 << SW2_SC_SHIFT; + +void base_98628_9_device::device_reset() +{ + if (!m_installed_io) { + unsigned sc = (m_sw2->read() >> SW2_SC_SHIFT) & SW2_SC_MASK; + offs_t base_addr = 0x600000 + sc * 0x10000; + install_68k_map(base_addr); + m_installed_io = true; + } + + m_reset = false; + reset(1, false); +} + +void base_98628_9_device::reset_in(int state) +{ + if (state) { + reset(1, false); + m_cpu->reset(); + } +} + +void base_98628_9_device::reset(int state, bool nmi) +{ + bool new_reset = bool(state); + if (!m_reset && new_reset) { + m_irq = false; + m_irq_enabled = false; + m_semaphore = false; + m_to0_div = true; + m_to1_div = true; + m_ctc->reset(); + m_sio->reset(); + update_irq(); + update_clocks(); + } + if (new_reset != m_reset) { + m_reset = new_reset; + update_modem_ctrl(); + } + LOG("NMI %d\n", nmi && state); + m_cpu->set_input_line(INPUT_LINE_NMI, nmi && state); +} + +static INPUT_PORTS_START(base_98628_9_port) + PORT_START("sw2") + PORT_DIPNAME(SW2_SWITCH8_MASK, SW2_SWITCH8_MASK, "Switch 8") + PORT_DIPSETTING(0, DEF_STR(On)) + PORT_DIPSETTING(SW2_SWITCH8_MASK, DEF_STR(Off)) + + PORT_DIPNAME(SW2_IRQ_LEVEL_MASK << SW2_IRQ_LEVEL_SHIFT, SW2_IRQ_LEVEL_DEF << SW2_IRQ_LEVEL_SHIFT, "IRQ level") + PORT_DIPSETTING(SW2_IRQ_LEVEL_IRQ3 << SW2_IRQ_LEVEL_SHIFT, "3") + PORT_DIPSETTING(SW2_IRQ_LEVEL_IRQ4 << SW2_IRQ_LEVEL_SHIFT, "4") + PORT_DIPSETTING(SW2_IRQ_LEVEL_IRQ5 << SW2_IRQ_LEVEL_SHIFT, "5") + PORT_DIPSETTING(SW2_IRQ_LEVEL_IRQ6 << SW2_IRQ_LEVEL_SHIFT, "6") + + PORT_DIPNAME(SW2_SC_MASK << SW2_SC_SHIFT, SW2_SC_DEF, "Select code") + PORT_DIPSETTING(0 << SW2_SC_SHIFT, "0") + PORT_DIPSETTING(1 << SW2_SC_SHIFT, "1") + PORT_DIPSETTING(2 << SW2_SC_SHIFT, "2") + PORT_DIPSETTING(3 << SW2_SC_SHIFT, "3") + PORT_DIPSETTING(4 << SW2_SC_SHIFT, "4") + PORT_DIPSETTING(5 << SW2_SC_SHIFT, "5") + PORT_DIPSETTING(6 << SW2_SC_SHIFT, "6") + PORT_DIPSETTING(7 << SW2_SC_SHIFT, "7") + PORT_DIPSETTING(8 << SW2_SC_SHIFT, "8") + PORT_DIPSETTING(9 << SW2_SC_SHIFT, "9") + PORT_DIPSETTING(10 << SW2_SC_SHIFT, "10") + PORT_DIPSETTING(11 << SW2_SC_SHIFT, "11") + PORT_DIPSETTING(12 << SW2_SC_SHIFT, "12") + PORT_DIPSETTING(13 << SW2_SC_SHIFT, "13") + PORT_DIPSETTING(14 << SW2_SC_SHIFT, "14") + PORT_DIPSETTING(15 << SW2_SC_SHIFT, "15") + PORT_DIPSETTING(16 << SW2_SC_SHIFT, "16") + PORT_DIPSETTING(17 << SW2_SC_SHIFT, "17") + PORT_DIPSETTING(18 << SW2_SC_SHIFT, "18") + PORT_DIPSETTING(19 << SW2_SC_SHIFT, "19") + PORT_DIPSETTING(20 << SW2_SC_SHIFT, "20") + PORT_DIPSETTING(21 << SW2_SC_SHIFT, "21") + PORT_DIPSETTING(22 << SW2_SC_SHIFT, "22") + PORT_DIPSETTING(23 << SW2_SC_SHIFT, "23") + PORT_DIPSETTING(24 << SW2_SC_SHIFT, "24") + PORT_DIPSETTING(25 << SW2_SC_SHIFT, "25") + PORT_DIPSETTING(26 << SW2_SC_SHIFT, "26") + PORT_DIPSETTING(27 << SW2_SC_SHIFT, "27") + PORT_DIPSETTING(28 << SW2_SC_SHIFT, "28") + PORT_DIPSETTING(29 << SW2_SC_SHIFT, "29") + PORT_DIPSETTING(30 << SW2_SC_SHIFT, "30") + PORT_DIPSETTING(31 << SW2_SC_SHIFT, "31") + +INPUT_PORTS_END + +void base_98628_9_device::update_irq() +{ + auto level = (m_sw2->read() >> SW2_IRQ_LEVEL_SHIFT) & SW2_IRQ_LEVEL_MASK; + bool irq = m_irq && m_irq_enabled; + irq3_out(irq && level == SW2_IRQ_LEVEL_IRQ3); + irq4_out(irq && level == SW2_IRQ_LEVEL_IRQ4); + irq5_out(irq && level == SW2_IRQ_LEVEL_IRQ5); + irq6_out(irq && level == SW2_IRQ_LEVEL_IRQ6); +} + +void base_98628_9_device::update_modem_ctrl() +{ + if (m_reset) { + rts_out(1); + dtr_out(1); + } else { + rts_out(!BIT(m_modem_ctrl, 0)); + dtr_out(!BIT(m_modem_ctrl, 1)); + } + ocd1_out(!BIT(m_modem_ctrl, 2)); + // Bit 3 is OCD2 + // Bit 4 is OCD3 + // Bit 5 is OCD4 +} + +void base_98628_9_device::update_clocks() +{ + if (BIT(m_modem_ctrl, 6)) { + tx_clock_w(m_to0_div); + } else { + tx_clock_w(m_st_in); + } + if (BIT(m_modem_ctrl, 7)) { + rx_clock_w(m_to1_div); + } else { + rx_clock_w(m_rt_in); + } +} + +static const z80_daisy_config daisy_chain_config[] = { + { "sio" }, + { "ctc" }, + { nullptr } +}; + +void base_98628_9_device::base_config(machine_config &config) +{ + Z80(config, m_cpu, CLOCK / 2); + m_cpu->set_addrmap(AS_PROGRAM, &base_98628_9_device::cpu_program_mem_map); + m_cpu->set_addrmap(AS_IO, &base_98628_9_device::cpu_io_mem_map); + m_cpu->set_daisy_config(daisy_chain_config); + + Z80SIO(config, m_sio, CLOCK / 2); + m_sio->out_int_callback().set(FUNC(base_98628_9_device::sio_int_w)); + m_sio->out_txda_callback().set(m_sio, FUNC(z80sio_device::rxb_w)); + m_sio->out_txda_callback().append(FUNC(base_98628_9_device::tx_out)); + m_sio->out_rtsb_callback().set(m_sio, FUNC(z80sio_device::dcdb_w)); + m_sio->out_wrdya_callback().set(FUNC(base_98628_9_device::sio_wrdya_w)); + + Z80CTC(config, m_ctc, CLOCK / 2); + m_ctc->intr_callback().set(FUNC(base_98628_9_device::ctc_int_w)); + m_ctc->zc_callback<0>().set(FUNC(base_98628_9_device::to0_w)); + m_ctc->zc_callback<1>().set(FUNC(base_98628_9_device::to1_w)); + m_ctc->zc_callback<2>().set(m_sio, FUNC(z80sio_device::txcb_w)); + m_ctc->set_clk<0>(CLOCK / 4); + m_ctc->set_clk<1>(CLOCK / 4); +} + +void base_98628_9_device::cpu_program_mem_map(address_map &map) +{ + map.unmap_value_low(); + map(0x0000, 0x1fff).mirror(0x6000).rom(); + map(0x8000, 0x8003).rw(FUNC(base_98628_9_device::reg_r), FUNC(base_98628_9_device::reg_w)); + map(0xa000, 0xbfff).rw(FUNC(base_98628_9_device::low_ram_r_z80), FUNC(base_98628_9_device::low_ram_w_z80)); +} + +void base_98628_9_device::cpu_io_mem_map(address_map &map) +{ + map.unmap_value_high(); + map.global_mask(0xff); + map(0x70, 0x73).rw(FUNC(base_98628_9_device::sio_r), FUNC(base_98628_9_device::sio_w)); + map(0xb0, 0xb3).rw(m_ctc, FUNC(z80ctc_device::read), FUNC(z80ctc_device::write)); + map(0xd0, 0xd1).r(FUNC(base_98628_9_device::sw1_r)); +} + +void base_98628_9_device::install_68k_map(offs_t base_addr) +{ + dio().install_memory(0x0000 + base_addr, + 0x0007 + base_addr, + read16sm_delegate(*this, [this](offs_t addr) { return reg_r(addr); }, ""), + write16sm_delegate(*this, [this](offs_t addr, uint16_t data) { reg_w(addr, uint8_t(data)); }, "")); + dio().install_memory(0x4000 + base_addr, + 0x7fff + base_addr, + read16sm_delegate(*this, FUNC(base_98628_9_device::low_ram_r_68k)), + write16sm_delegate(*this, FUNC(base_98628_9_device::low_ram_w_68k))); +} + +uint8_t base_98628_9_device::reg_r(offs_t addr) +{ + uint8_t res = 0; + + switch (addr & 3) { + case 0: + // ID register + res = 0x34; + if (!BIT(m_sw2->read(), SW2_SWITCH8_BIT)) { + BIT_SET(res, 7); + } + break; + case 1: + // IRQ register + // + // | Bit | Content | + // |------+-------------| + // | 7 | IRQ enabled | + // | 6 | IRQ pending | + // | 5..4 | IRQ level | + // | 3..0 | 0 | + if (m_irq_enabled) { + BIT_SET(res, 7); + } + if (m_irq) { + BIT_SET(res, 6); + } + res |= ((m_sw2->read() >> SW2_IRQ_LEVEL_SHIFT) & SW2_IRQ_LEVEL_MASK) << 4; + break; + case 2: + // Semaphore + // Read & clear + if (!m_semaphore) { + BIT_SET(res, 7); + } + if (!machine().side_effects_disabled()) { + m_semaphore = false; + } + break; + case 3: + // Modem status + // + // | Bit | Content | + // |------+-------------| + // | 7..6 | - | + // | 5 | !Wait/Rdy A | + // | 4 | OCR2 | + // | 3 | RI/OCR1 | + // | 2 | CTS/CS | + // | 1 | DCD/RR | + // | 0 | DSR/DM | + res = m_modem_status; + if (!m_wait_a) { + BIT_SET(res, 5); + } + break; + } + + LOG("REG R %u=%02x\n", addr, res); + return res; +} + +void base_98628_9_device::reg_w(offs_t addr, uint8_t data) +{ + LOG("REG W %u=%02x\n", addr, data); + switch (addr & 3) { + case 0: + // Reset control + reset(BIT(data, 7), true); + break; + case 1: + // IRQ enable + if (!m_reset) { + m_irq_enabled = BIT(data, 7); + update_irq(); + } + break; + case 2: + // Semaphore + // Set + if (!m_reset && !machine().side_effects_disabled()) { + m_semaphore = true; + } + break; + case 3: + // Modem control + { + uint8_t diff = m_modem_ctrl ^ data; + m_modem_ctrl = data; + if (diff & 0xc0) { + update_clocks(); + } + if (diff & 0x3f) { + update_modem_ctrl(); + } + } + break; + } +} + +uint8_t base_98628_9_device::low_ram_r_z80(offs_t addr) +{ + if (addr == 1 && !machine().side_effects_disabled()) { + // Clear CTSB/ + m_ctsb = false; + m_sio->ctsb_w(m_ctsb); + LOG("CTSB 0\n"); + } + return m_low_ram[ addr & (LOW_RAM_SIZE - 1) ]; +} + +uint16_t base_98628_9_device::low_ram_r_68k(offs_t addr) +{ + if (addr == 0 && !machine().side_effects_disabled()) { + // Clear IRQ + m_irq = false; + update_irq(); + LOG("IRQ 0\n"); + } + return m_low_ram[ addr & (LOW_RAM_SIZE - 1) ]; +} + +void base_98628_9_device::low_ram_w_z80(offs_t addr, uint8_t data) +{ + if (addr == 0 && !m_reset && !machine().side_effects_disabled()) { + // Set IRQ + m_irq = true; + LOG("IRQ 1\n"); + update_irq(); + } + m_low_ram[ addr & (LOW_RAM_SIZE - 1) ] = data; +} + +void base_98628_9_device::low_ram_w_68k(offs_t addr, uint16_t data) +{ + if (addr == 1 && !machine().side_effects_disabled()) { + // Set CTSB/ + m_ctsb = true; + LOG("CTSB 1\n"); + m_sio->ctsb_w(m_ctsb); + } + m_low_ram[ addr & (LOW_RAM_SIZE - 1) ] = uint8_t(data); +} + +uint8_t base_98628_9_device::sio_r(offs_t addr) +{ + uint8_t res; + + if (addr == 0 && m_cpu_wait && !machine().side_effects_disabled()) { + // ch-A data register can't be read right now + m_cpu->set_input_line(Z80_INPUT_LINE_WAIT, ASSERT_LINE); + m_cpu->defer_access(); + m_cpu_waiting = true; + res = 0; + LOG("Z80 stalled\n"); + } else { + res = m_sio->ba_cd_r(addr); + } + LOG("SIO R %u=%02x\n", addr, res); + return res; +} + +void base_98628_9_device::sio_w(offs_t addr, uint8_t data) +{ + LOG("SIO W %u=%02x\n", addr, data); + if (addr == 0 && m_cpu_wait && !machine().side_effects_disabled()) { + // ch-A data register can't be written right now + m_cpu->set_input_line(Z80_INPUT_LINE_WAIT, ASSERT_LINE); + m_cpu->defer_access(); + m_cpu_waiting = true; + LOG("Z80 stalled\n"); + } else { + m_sio->ba_cd_w(addr, data); + } +} + +void base_98628_9_device::to0_w(int state) +{ + if (!m_reset && state) { + m_to0_div = !m_to0_div; + if (BIT(m_modem_ctrl, 6)) { + tx_clock_w(m_to0_div); + } + } +} + +void base_98628_9_device::tx_clock_w(int state) +{ + m_sio->txca_w(state); + m_sio->rxcb_w(state); + m_ctc->trg2(state); + tt_out(state); +} + +void base_98628_9_device::to1_w(int state) +{ + if (!m_reset && state) { + m_to1_div = !m_to1_div; + if (BIT(m_modem_ctrl, 7)) { + rx_clock_w(m_to1_div); + } + } +} + +void base_98628_9_device::rx_clock_w(int state) +{ + m_sio->rxca_w(state); + m_ctc->trg3(state); +} + +void base_98628_9_device::update_cpu_wait() +{ + m_cpu_wait = !m_wait_a && !m_sio_irq && !m_ctc_irq; + if (m_cpu_waiting && !m_cpu_wait) { + LOG("WAIT released wa %d si %d ci %d\n", m_wait_a, m_sio_irq, m_ctc_irq); + m_cpu->set_input_line(Z80_INPUT_LINE_WAIT, CLEAR_LINE); + m_cpu_waiting = false; + } +} + +void base_98628_9_device::sio_wrdya_w(int state) +{ + LOG("WRDYA %d\n", state); + m_wait_a = bool(state); + update_cpu_wait(); +} + +void base_98628_9_device::sio_int_w(int state) +{ + LOG("SIO IRQ %d\n", state); + m_sio_irq = bool(state); + m_cpu->set_input_line(INPUT_LINE_IRQ0, m_sio_irq || m_ctc_irq); + update_cpu_wait(); +} + +void base_98628_9_device::ctc_int_w(int state) +{ + LOG("CTC IRQ %d\n", state); + m_ctc_irq = bool(state); + m_cpu->set_input_line(INPUT_LINE_IRQ0, m_sio_irq || m_ctc_irq); + update_cpu_wait(); +} + +uint8_t base_98628_9_device::sw1_r(offs_t addr) +{ + return uint8_t((m_sw1->read() >> (BIT(addr, 0) ? 4 : 0)) & 0x0f); +} + +void base_98628_9_device::rx_in(int state) +{ + m_sio->rxa_w(state); +} + +void base_98628_9_device::cts_in(int state) +{ + LOG("CTSA %d\n", state); + m_sio->ctsa_w(state); + if (state) { + BIT_CLR(m_modem_status, 2); + } else { + BIT_SET(m_modem_status, 2); + } +} + +void base_98628_9_device::dcd_in(int state) +{ + m_sio->dcda_w(state); + if (state) { + BIT_CLR(m_modem_status, 1); + } else { + BIT_SET(m_modem_status, 1); + } +} + +void base_98628_9_device::ri_in(int state) +{ + if (state) { + BIT_CLR(m_modem_status, 3); + } else { + BIT_SET(m_modem_status, 3); + } +} + +void base_98628_9_device::dsr_in(int state) +{ + if (state) { + BIT_CLR(m_modem_status, 0); + } else { + BIT_SET(m_modem_status, 0); + } +} + +void base_98628_9_device::st_in(int state) +{ + m_st_in = bool(state); + if (!BIT(m_modem_ctrl, 6)) { + tx_clock_w(state); + } +} + +void base_98628_9_device::rt_in(int state) +{ + m_rt_in = bool(state); + if (!BIT(m_modem_ctrl, 7)) { + rx_clock_w(state); + } +} + +// +--------------------+ +// | dio16_98628_device | +// +--------------------+ +class dio16_98628_device : + public base_98628_9_device +{ +public: + dio16_98628_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + : dio16_98628_device(mconfig, HPDIO_98628, tag, owner, clock) + { + } + +protected: + dio16_98628_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) + : base_98628_9_device(mconfig, type, tag, owner, clock) + , m_rs232(*this, "rs232") + { + } + + virtual void device_add_mconfig(machine_config &config) override ATTR_COLD; + virtual ioport_constructor device_input_ports() const override ATTR_COLD; + virtual const tiny_rom_entry *device_rom_region() const override ATTR_COLD; + + virtual void tx_out(int state) override; + virtual void tt_out(int state) override; + virtual void rts_out(int state) override; + virtual void dtr_out(int state) override; + virtual void ocd1_out(int state) override; + + required_device m_rs232; +}; + +void dio16_98628_device::device_add_mconfig(machine_config &config) +{ + base_config(config); + + RS232_PORT(config, m_rs232, default_rs232_devices, nullptr); + m_rs232->rxd_handler().set(FUNC(base_98628_9_device::rx_in)); + m_rs232->dcd_handler().set(FUNC(base_98628_9_device::dcd_in)); + m_rs232->dsr_handler().set(FUNC(base_98628_9_device::dsr_in)); + m_rs232->ri_handler().set(FUNC(base_98628_9_device::ri_in)); + m_rs232->cts_handler().set(FUNC(base_98628_9_device::cts_in)); + m_rs232->rxc_handler().set(FUNC(base_98628_9_device::rt_in)); + m_rs232->txc_handler().set(FUNC(base_98628_9_device::st_in)); +} + +static INPUT_PORTS_START(dio98628_port) + PORT_INCLUDE(base_98628_9_port) + + PORT_START("sw1") + PORT_DIPNAME(0xc0, 0x80, "Parity,bits per char") + PORT_DIPSETTING(0x00, "N,8") + PORT_DIPSETTING(0x40, "N,7") + PORT_DIPSETTING(0x80, "O,7") + PORT_DIPSETTING(0xc0, "E,7") + PORT_DIPNAME(0x30, 0x10, "HW handshake") + PORT_DIPSETTING(0x00, "HS OFF,no modem") + PORT_DIPSETTING(0x10, "Full dplx modem") + PORT_DIPSETTING(0x20, "Half dplx modem") + PORT_DIPSETTING(0x30, "HS ON,no modem") + PORT_DIPNAME(0x0e, 0x04, "Speed,stop bits") + PORT_DIPSETTING(0x00, "110,2") + PORT_DIPSETTING(0x02, "150,2") + PORT_DIPSETTING(0x04, "300,1") + PORT_DIPSETTING(0x06, "600,1") + PORT_DIPSETTING(0x08, "1200,1") + PORT_DIPSETTING(0x0a, "2400,1") + PORT_DIPSETTING(0x0c, "4800,1") + PORT_DIPSETTING(0x0e, "9600,1") + PORT_DIPNAME(0x01, 0x00, "Mode") + PORT_DIPSETTING(0x00, "Asynchronuous") + PORT_DIPSETTING(0x01, "Data link") +INPUT_PORTS_END + +ioport_constructor dio16_98628_device::device_input_ports() const +{ + return INPUT_PORTS_NAME(dio98628_port); +} + +ROM_START(dio98628) + ROM_REGION(0x2000, "cpu", 0) + ROM_LOAD("98628-81003.bin", 0, 0x2000, CRC(ac51d596) SHA1(738fa16ac9a0f865938e7b197d26bd37c27b8660)) +ROM_END + +const tiny_rom_entry *dio16_98628_device::device_rom_region() const +{ + return ROM_NAME(dio98628); +} + +void dio16_98628_device::tx_out(int state) +{ + m_rs232->write_txd(state); +} + +void dio16_98628_device::tt_out(int state) +{ + m_rs232->write_etc(state); +} + +void dio16_98628_device::rts_out(int state) +{ + m_rs232->write_rts(state); +} + +void dio16_98628_device::dtr_out(int state) +{ + m_rs232->write_dtr(state); +} + +void dio16_98628_device::ocd1_out(int state) +{ + m_rs232->write_spds(state); +} + +// +--------------------+ +// | dio16_98629_device | +// +--------------------+ +class dio16_98629_device : + public base_98628_9_device +{ +public: + dio16_98629_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + : dio16_98629_device(mconfig, HPDIO_98629, tag, owner, clock) + { + } + +protected: + static inline constexpr unsigned HIGH_RAM_SIZE = 2048; + static inline constexpr unsigned MUX_FREQ = 700000; + + enum class fsm_st { + ST_PROBING_MY_PORT, + ST_PROBING_EXT_PORT, + ST_MY_PORT_TX, + ST_MY_PORT_RX, + ST_WAITING_RX, + ST_PAUSE + }; + + dio16_98629_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) + : base_98628_9_device(mconfig, type, tag, owner, clock) + , m_stream(*this, "stream") + , m_timer(*this, "tmr") + { + } + + virtual void device_start() override ATTR_COLD; + virtual void device_reset() override ATTR_COLD; + virtual void device_add_mconfig(machine_config &config) override ATTR_COLD; + virtual ioport_constructor device_input_ports() const override ATTR_COLD; + virtual const tiny_rom_entry *device_rom_region() const override ATTR_COLD; + + virtual void cpu_program_mem_map(address_map &map) override ATTR_COLD; + virtual void install_68k_map(offs_t base_addr) override ATTR_COLD; + uint8_t high_ram_r_z80(offs_t addr); + void high_ram_w_z80(offs_t addr, uint8_t data); + virtual void tx_out(int state) override; + virtual void tt_out(int state) override; + + TIMER_DEVICE_CALLBACK_MEMBER(timer_to); + + required_device m_stream; + required_device m_timer; + + fsm_st m_state; + unsigned m_byte_cnt; + bool m_half_cycle; + bool m_tx; + bool m_last_tt; + uint8_t m_sr; + uint8_t m_high_ram[ HIGH_RAM_SIZE ]; +}; + +void dio16_98629_device::device_start() +{ + base_98628_9_device::device_start(); + save_item(NAME(m_byte_cnt)); + save_item(NAME(m_half_cycle)); + save_item(NAME(m_tx)); + save_item(NAME(m_last_tt)); + save_item(NAME(m_sr)); + save_item(NAME(m_high_ram)); +} + +void dio16_98629_device::device_reset() +{ + base_98628_9_device::device_reset(); + + m_state = fsm_st::ST_PROBING_MY_PORT; + m_byte_cnt = 0; + m_half_cycle = false; + m_sr = 0xff; + rx_in(1); + cts_in(1); + st_in(1); + rt_in(1); + m_timer->adjust(attotime::from_hz(MUX_FREQ / 8), 0, attotime::from_hz(MUX_FREQ / 8)); +} + +void dio16_98629_device::device_add_mconfig(machine_config &config) +{ + base_config(config); + + BITBANGER(config, m_stream, 0); + TIMER(config, m_timer).configure_generic(FUNC(dio16_98629_device::timer_to)); +} + +static INPUT_PORTS_START(dio98629_port) + PORT_INCLUDE(base_98628_9_port) + + PORT_START("sw1") + PORT_DIPNAME(0x3f, 0x0a, "Bus address") + PORT_DIPSETTING(0, "0") + PORT_DIPSETTING(1, "1") + PORT_DIPSETTING(2, "2") + PORT_DIPSETTING(3, "3") + PORT_DIPSETTING(4, "4") + PORT_DIPSETTING(5, "5") + PORT_DIPSETTING(6, "6") + PORT_DIPSETTING(7, "7") + PORT_DIPSETTING(8, "8") + PORT_DIPSETTING(9, "9") + PORT_DIPSETTING(10, "10") + PORT_DIPSETTING(11, "11") + PORT_DIPSETTING(12, "12") + PORT_DIPSETTING(13, "13") + PORT_DIPSETTING(14, "14") + PORT_DIPSETTING(15, "15") + PORT_DIPSETTING(16, "16") + PORT_DIPSETTING(17, "17") + PORT_DIPSETTING(18, "18") + PORT_DIPSETTING(19, "19") + PORT_DIPSETTING(20, "20") + PORT_DIPSETTING(21, "21") + PORT_DIPSETTING(22, "22") + PORT_DIPSETTING(23, "23") + PORT_DIPSETTING(24, "24") + PORT_DIPSETTING(25, "25") + PORT_DIPSETTING(26, "26") + PORT_DIPSETTING(27, "27") + PORT_DIPSETTING(28, "28") + PORT_DIPSETTING(29, "29") + PORT_DIPSETTING(30, "30") + PORT_DIPSETTING(31, "31") + PORT_DIPSETTING(32, "32") + PORT_DIPSETTING(33, "33") + PORT_DIPSETTING(34, "34") + PORT_DIPSETTING(35, "35") + PORT_DIPSETTING(36, "36") + PORT_DIPSETTING(37, "37") + PORT_DIPSETTING(38, "38") + PORT_DIPSETTING(39, "39") + PORT_DIPSETTING(40, "40") + PORT_DIPSETTING(41, "41") + PORT_DIPSETTING(42, "42") + PORT_DIPSETTING(43, "43") + PORT_DIPSETTING(44, "44") + PORT_DIPSETTING(45, "45") + PORT_DIPSETTING(46, "46") + PORT_DIPSETTING(47, "47") + PORT_DIPSETTING(48, "48") + PORT_DIPSETTING(49, "49") + PORT_DIPSETTING(50, "50") + PORT_DIPSETTING(51, "51") + PORT_DIPSETTING(52, "52") + PORT_DIPSETTING(53, "53") + PORT_DIPSETTING(54, "54") + PORT_DIPSETTING(55, "55") + PORT_DIPSETTING(56, "56") + PORT_DIPSETTING(57, "57") + PORT_DIPSETTING(58, "58") + PORT_DIPSETTING(59, "59") + PORT_DIPSETTING(60, "60") + PORT_DIPSETTING(61, "61") + PORT_DIPSETTING(62, "62") + PORT_DIPSETTING(63, "63") +INPUT_PORTS_END + +ioport_constructor dio16_98629_device::device_input_ports() const +{ + return INPUT_PORTS_NAME(dio98629_port); +} + +void dio16_98629_device::cpu_program_mem_map(address_map &map) +{ + base_98628_9_device::cpu_program_mem_map(map); + map(0xc000, 0xdfff).rw(FUNC(dio16_98629_device::high_ram_r_z80), FUNC(dio16_98629_device::high_ram_w_z80)); +} + +void dio16_98629_device::install_68k_map(offs_t base_addr) +{ + base_98628_9_device::install_68k_map(base_addr); + dio().install_memory(0x8000 + base_addr, + 0xbfff + base_addr, + read16sm_delegate(*this, [this](offs_t addr) { return high_ram_r_z80(addr); }, ""), + write16sm_delegate(*this, [this](offs_t addr, uint16_t data) { high_ram_w_z80(addr, uint8_t(data)); }, "")); +} + +uint8_t dio16_98629_device::high_ram_r_z80(offs_t addr) +{ + return m_high_ram[ addr & (HIGH_RAM_SIZE - 1) ]; +} + +void dio16_98629_device::high_ram_w_z80(offs_t addr, uint8_t data) +{ + m_high_ram[ addr & (HIGH_RAM_SIZE - 1) ] = data; +} + +void dio16_98629_device::tx_out(int state) +{ + m_tx = bool(state); + if (m_state == fsm_st::ST_PROBING_MY_PORT || m_state == fsm_st::ST_MY_PORT_TX) { + rx_in(state); + } +} + +void dio16_98629_device::tt_out(int state) +{ + if (m_state != fsm_st::ST_PROBING_MY_PORT && m_state != fsm_st::ST_MY_PORT_TX) { + return; + } + + if (!m_last_tt && state) { + // Sample bit on rising edge + m_sr >>= 1; + if (m_tx) { + BIT_SET(m_sr, 7); + } + cts_in(m_sr == 0xff); + } + m_last_tt = bool(state); +} + +TIMER_DEVICE_CALLBACK_MEMBER(dio16_98629_device::timer_to) +{ + bool stay; + do { + stay = false; + + switch (m_state) { + case fsm_st::ST_PROBING_MY_PORT: + for (unsigned i = 0; i < 8; i++) { + st_in(0); + rt_in(0); + st_in(1); + rt_in(1); + } + if (m_sr == 0xff) { + m_half_cycle = !m_half_cycle; + if (!m_half_cycle) { + m_state = fsm_st::ST_PROBING_EXT_PORT; + } + } else { + LOG("TX %02x (start)\n", m_sr); + m_stream->output(m_sr); + m_state = fsm_st::ST_MY_PORT_TX; + } + break; + + case fsm_st::ST_PROBING_EXT_PORT: + if (m_stream->input(&m_sr, 1) == 1 && m_sr != 0xff) { + m_state = fsm_st::ST_MY_PORT_RX; + stay = true; + } else { + m_half_cycle = !m_half_cycle; + if (!m_half_cycle) { + m_byte_cnt = 0; + m_state = fsm_st::ST_PAUSE; + } + } + break; + + case fsm_st::ST_MY_PORT_TX: + for (unsigned i = 0; i < 8; i++) { + st_in(0); + rt_in(0); + st_in(1); + rt_in(1); + } + LOG("TX %02x\n", m_sr); + m_stream->output(m_sr); + if (m_sr == 0xff) { + m_half_cycle = !m_half_cycle; + if (!m_half_cycle) { + LOG("TX ended\n"); + m_state = fsm_st::ST_PROBING_EXT_PORT; + } + } + break; + + case fsm_st::ST_WAITING_RX: + if (m_stream->input(&m_sr, 1) == 1) { + m_state = fsm_st::ST_MY_PORT_RX; + stay = true; + } + break; + + case fsm_st::ST_MY_PORT_RX: + { + LOG("RX %02x\n", m_sr); + uint8_t tmp = m_sr; + for (unsigned i = 0; i < 8; i++) { + st_in(0); + rt_in(0); + rx_in(BIT(tmp, 0)); + tmp >>= 1; + st_in(1); + rt_in(1); + } + m_state = fsm_st::ST_WAITING_RX; + if (m_sr == 0xff) { + m_half_cycle = !m_half_cycle; + if (!m_half_cycle) { + LOG("RX ended\n"); + m_byte_cnt = 0; + m_state = fsm_st::ST_PAUSE; + } + } + } + break; + + case fsm_st::ST_PAUSE: + m_byte_cnt++; + if (m_byte_cnt == 6) { + m_state = fsm_st::ST_PROBING_MY_PORT; + } + break; + } + } while (stay); +} + +ROM_START(dio98629) + ROM_REGION(0x2000, "cpu", 0) + ROM_LOAD("1818-1739b.bin", 0, 0x2000, CRC(5955894e) SHA1(b02b3688a8e415701905c7a1d8ae8848fd9b8b42)) +ROM_END + +const tiny_rom_entry *dio16_98629_device::device_rom_region() const +{ + return ROM_NAME(dio98629); +} + +} // anonymous namespace + +DEFINE_DEVICE_TYPE_PRIVATE(HPDIO_98628, bus::hp_dio::device_dio16_card_interface, dio16_98628_device, "dio98628", "HP98628 data communication interface") +DEFINE_DEVICE_TYPE_PRIVATE(HPDIO_98629, bus::hp_dio::device_dio16_card_interface, dio16_98629_device, "dio98629", "HP98629 SRM interface") diff --git a/src/devices/bus/hp_dio/hp98628_9.h b/src/devices/bus/hp_dio/hp98628_9.h new file mode 100755 index 0000000000000..873b9ead97ba5 --- /dev/null +++ b/src/devices/bus/hp_dio/hp98628_9.h @@ -0,0 +1,21 @@ +// license:BSD-3-Clause +// copyright-holders:F. Ulivi + +/********************************************************************* + + HP98628 Data communication interface + HP98629 SRM interface + +*********************************************************************/ + +#ifndef MAME_BUS_HP_DIO_HP98628_9_H +#define MAME_BUS_HP_DIO_HP98628_9_H + +#pragma once + +#include "hp_dio.h" + +DECLARE_DEVICE_TYPE_NS(HPDIO_98628, bus::hp_dio, device_dio16_card_interface) +DECLARE_DEVICE_TYPE_NS(HPDIO_98629, bus::hp_dio, device_dio16_card_interface) + +#endif /* MAME_BUS_HP_DIO_HP98628_9_H */ diff --git a/src/devices/bus/hp_dio/hp_dio.cpp b/src/devices/bus/hp_dio/hp_dio.cpp index 305f346ee8f99..1b6ca8aab7552 100644 --- a/src/devices/bus/hp_dio/hp_dio.cpp +++ b/src/devices/bus/hp_dio/hp_dio.cpp @@ -16,6 +16,7 @@ #include "hp98603b.h" #include "hp98620.h" #include "hp98624.h" +#include "hp98628_9.h" #include "hp98643.h" #include "hp98644.h" #include "human_interface.h" @@ -357,6 +358,12 @@ void dio16_cards(device_slot_interface & device) device.option_add("human_interface", HPDIO_HUMAN_INTERFACE); } +void dio16_hp98x6_cards(device_slot_interface &device) +{ + device.option_add("98628", HPDIO_98628); + device.option_add("98629", HPDIO_98629); +} + void dio32_cards(device_slot_interface & device) { dio16_cards(device); diff --git a/src/devices/bus/hp_dio/hp_dio.h b/src/devices/bus/hp_dio/hp_dio.h index 2f86ae05e6a3d..700f911add0a7 100644 --- a/src/devices/bus/hp_dio/hp_dio.h +++ b/src/devices/bus/hp_dio/hp_dio.h @@ -289,6 +289,7 @@ DECLARE_DEVICE_TYPE_NS(DIO32_SLOT, bus::hp_dio, dio32_slot_device) DECLARE_DEVICE_TYPE_NS(DIO16, bus::hp_dio, dio16_device) void dio16_cards(device_slot_interface &device); +void dio16_hp98x6_cards(device_slot_interface &device); void dio32_cards(device_slot_interface &device); #endif // MAME_BUS_HP_DIO_HP_DIO_H diff --git a/src/devices/bus/isa/isa_cards.cpp b/src/devices/bus/isa/isa_cards.cpp index 720b6b49d3adf..786c9bf10107d 100644 --- a/src/devices/bus/isa/isa_cards.cpp +++ b/src/devices/bus/isa/isa_cards.cpp @@ -10,84 +10,85 @@ #include "isa_cards.h" // video -#include "mda.h" -#include "cga.h" #include "aga.h" +#include "cga.h" #include "ega.h" +#include "eis_hgb107x.h" +#include "ex1280.h" +#include "mda.h" +#include "num9rev.h" #include "pgc.h" -#include "vga.h" -#include "vga_ati.h" #include "svga_cirrus.h" #include "svga_paradise.h" #include "svga_s3.h" -#include "svga_tseng.h" #include "svga_trident.h" -#include "num9rev.h" -#include "eis_hgb107x.h" -#include "ex1280.h" +#include "svga_tseng.h" +#include "vga.h" +#include "vga_ati.h" // storage -#include "fdc.h" -#include "mufdc.h" -#include "hdc.h" -#include "wdxt_gen.h" -#include "ide.h" -#include "xtide.h" -#include "side116.h" #include "acb2072.h" #include "aha1542b.h" #include "aha1542c.h" #include "aha174x.h" -#include "wd1002a_wx1.h" -#include "wd1007a.h" -#include "mcd.h" -#include "lbaenhancer.h" -#include "cl_sh260.h" +#include "asc88.h" #include "bt54x.h" +#include "cl_sh260.h" #include "dcb.h" +#include "fdc.h" +#include "hdc.h" +#include "ide.h" +#include "lbaenhancer.h" +#include "lrk330.h" +#include "mcd.h" +#include "mufdc.h" +#include "omti8621.h" +#include "side116.h" +#include "tekram_dc820.h" #include "ultra12f.h" #include "ultra14f.h" #include "ultra24f.h" -#include "tekram_dc820.h" -#include "asc88.h" -#include "omti8621.h" -#include "lrk330.h" +#include "wd1002a_wx1.h" +#include "wd1007a.h" +#include "wdxt_gen.h" +#include "xtide.h" // sound #include "adlib.h" +#include "dectalk.h" #include "gblaster.h" #include "gus.h" #include "ibm_mfc.h" #include "ibm_speech.h" #include "mpu401.h" #include "pcmidi.h" +#include "prose4k1.h" +#include "sb16.h" #include "sblaster.h" #include "ssi2001.h" #include "stereo_fx.h" -#include "dectalk.h" -#include "sb16.h" // network #include "3c503.h" -#include "ne1000.h" -#include "ne2000.h" #include "3c505.h" +#include "3xtwin.h" #include "eis_sad8852.h" #include "eis_twib.h" +#include "ne1000.h" +#include "ne2000.h" #include "np600.h" -#include "3xtwin.h" // communication ports -#include "lpt.h" #include "com.h" +#include "lpt.h" #include "pds.h" // other -#include "hpblp.h" +#include "bblue2.h" #include "chessmdr.h" #include "chessmsr.h" #include "finalchs.h" -#include "bblue2.h" +#include "hpblp.h" #include "opus100pm.h" @@ -134,6 +135,7 @@ void pc_isa8_cards(device_slot_interface &device) device.option_add("ibm_mfc", ISA8_IBM_MFC); device.option_add("wd1002a_wx1", ISA8_WD1002A_WX1); device.option_add("dectalk", ISA8_DECTALK); + device.option_add("prose4k1", ISA8_PROSE4001); device.option_add("pds", ISA8_PDS); device.option_add("lba_enhancer", ISA8_LBA_ENHANCER); device.option_add("asc88", ASC88); @@ -182,6 +184,7 @@ void pc_isa16_cards(device_slot_interface &device) device.option_add("ibm_mfc", ISA8_IBM_MFC); device.option_add("fdcsmc", ISA8_FDC_SMC); device.option_add("dectalk", ISA8_DECTALK); + device.option_add("prose4k1", ISA8_PROSE4001); device.option_add("pds", ISA8_PDS); device.option_add("lba_enhancer", ISA8_LBA_ENHANCER); device.option_add("chessmdr", ISA8_CHESSMDR); diff --git a/src/devices/bus/isa/prose4k1.cpp b/src/devices/bus/isa/prose4k1.cpp new file mode 100644 index 0000000000000..abaadbc6a96c8 --- /dev/null +++ b/src/devices/bus/isa/prose4k1.cpp @@ -0,0 +1,92 @@ +// license:BSD-3-Clause +// copyright-holders:Vas Crabb +/* + Speech Plus Prose 4001 speech synthesiser + + Full-length ISA card. Supports operation in IBM PC mode (as an ISA bus + card) and standalone mode (controlled over a seria connection). The + example the ROMs were dumped from had many components unpopulated. + + Major components include: + * Siemens 80188-N CPU + * NEC D77P20 DSP with EPROM memory + * Three TI 27C512 EPROMS + * 256 kbit SRAM + * Intel P8251A UART + * Three banks of eight DIP switches + */ +#include "emu.h" +#include "prose4k1.h" + +#include "cpu/i86/i186.h" +#include "machine/i8251.h" + + +namespace { + +class prose4k1_device : public device_t, public device_isa8_card_interface +{ +public: + static constexpr feature_type unemulated_features() { return feature::SOUND; } + + prose4k1_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) : + device_t(mconfig, ISA8_PROSE4001, tag, owner, clock), + device_isa8_card_interface(mconfig, *this) + { + } + +protected: + // device_t implementation + virtual tiny_rom_entry const *device_rom_region() const override ATTR_COLD; + virtual void device_add_mconfig(machine_config &config) override ATTR_COLD; + virtual void device_start() override ATTR_COLD; + +private: + void main_map(address_map &map) ATTR_COLD; +}; + + +ROM_START(prose4k1) + ROM_REGION(0x3'0000, "u8", 0) + ROM_LOAD("v3.4.1_pr4001.u3", 0x0'0000, 0x1'0000, CRC(12dac3ed) SHA1(cf8c0b9de1f00facbc5cb5dc8e2dcbb09d6ff479)) // TMS27C512, printed label + ROM_LOAD("v3.4.1_pr4001.u2", 0x1'0000, 0x1'0000, CRC(2ee241b7) SHA1(35b81f3b4deb552511f8d8f2d0aac9100fdee49d)) // TMS27C512, printed label + ROM_LOAD("v3.4.1_pr4001.u1", 0x2'0000, 0x1'0000, CRC(559f4950) SHA1(5c8709c82dadaea7012859c20141ef8f59d5e473)) // TMS27C512, handwritten label + + ROM_REGION32_BE(0x0800, "dsp:prg", 0) // 512*23-bit words + ROM_LOAD("v3.12_5_04_90.prg", 0x0000, 0x0800, NO_DUMP) + + ROM_REGION16_BE(0x0400, "dsp:dat", 0) // 512*13-bit words + ROM_LOAD("v3.12_5_04_90.dat", 0x0000, 0x0400, NO_DUMP) +ROM_END + + +tiny_rom_entry const *prose4k1_device::device_rom_region() const +{ + return ROM_NAME(prose4k1); +} + + +void prose4k1_device::device_add_mconfig(machine_config &config) +{ + I80188(config, "u8", 8'000'000).set_addrmap(AS_PROGRAM, &prose4k1_device::main_map); // TODO: measure clock + + I8251(config, "u27", 0); +} + + +void prose4k1_device::device_start() +{ +} + + +void prose4k1_device::main_map(address_map &map) +{ + map(0x0'0000, 0x0'8000).ram(); + + map(0xd'0000, 0xf'ffff).rom().region("u8", 0x0'0000); +} + +} // anonymous namespace + + +DEFINE_DEVICE_TYPE_PRIVATE(ISA8_PROSE4001, device_isa8_card_interface, prose4k1_device, "isa_prose4001", "Speech Plus Prose 4001 (IBM PC mode)") diff --git a/src/devices/bus/isa/prose4k1.h b/src/devices/bus/isa/prose4k1.h new file mode 100644 index 0000000000000..38ecab6e67bee --- /dev/null +++ b/src/devices/bus/isa/prose4k1.h @@ -0,0 +1,13 @@ +// license:BSD-3-Clause +// copyright-holders:Vas Crabb +#ifndef MAME_BUS_ISA_PROSE4K1_H +#define MAME_BUS_ISA_PROSE4K1_H + +#pragma once + +#include "isa.h" + + +DECLARE_DEVICE_TYPE(ISA8_PROSE4001, device_isa8_card_interface) + +#endif // MAME_BUS_ISA_PROSE4K1_H diff --git a/src/devices/bus/vme/enp10.cpp b/src/devices/bus/vme/enp10.cpp index e0406f1f91f73..42a32a60654b0 100644 --- a/src/devices/bus/vme/enp10.cpp +++ b/src/devices/bus/vme/enp10.cpp @@ -4,33 +4,54 @@ /* * Communication Machinery Corporation Ethernet Node Processor (ENP-10) * + * Rebadged/resold by Motorola as the MVME330 Ethernet Controller, and also + * by Silicon Graphics as part 013-0204-00[123]. + * + * Firmware expects to find a UART at address 0xef'8010-0xef'802f, which was + * apparently provided by a Mizar VME8300 card. + * * Sources: * - Ethernet Node Processor ENP-30 Reference Guide (6213000-05B), Communication Machinery Corporation, November 15, 1988 + * - MVME330 Ethernet Controller User's Manual (MVME330/D2), Motorola, Second Edition, 1988 * * TODO: - * - verify registers - * - uart? - */ - -/* - * WIP - * --- - * - 0xef'8010-0xef'802f appears to be a uart, but doesn't match scn2681 per ENP-30 documentation? - * - following text is output to 0xef'8025 at startup: - * CMC ENP/10 CMOS - 112708 Bytes Free - * Ethernet Address: 02CF1F123456 - * Allocating 30 receive buffers - * Allocating 30 transmit buffers + * - remaining control register flags + * - configurable interrupts + * - MVME330 -1 and -2 variants */ #include "emu.h" #include "enp10.h" -#define VERBOSE 0 +//#define VERBOSE (LOG_GENERAL) #include "logmacro.h" DEFINE_DEVICE_TYPE(VME_ENP10, vme_enp10_card_device, "enp10", "CMC ENP-10") +enum csr_mask : u8 +{ + CSR_SUSPEND = 0x08, // set by lance dma + CSR_TIMER = 0x10, // set by 2ms timer + CSR_RESET = 0x20, // assert vme reset + CSR_FAIL = 0x40, + CSR_VIRQ = 0x80, +}; +enum obr_mask : u8 +{ + OBR_IE = 0x01, // interrupt enable + OBR_TI = 0x02, // transmit interrupt + OBR_RI = 0x04, // receive interrupt + OBR_UI = 0x08, // utility interrupt + OBR_RE = 0x80, // RAM enable +}; +enum exr_mask : u8 +{ + EXR_RTO = 0x01, // resource time-out + EXR_PER = 0x02, // parity error + EXR_ABO = 0x04, // abort + EXR_ACLO = 0x08, // AC line voltage low +}; + vme_enp10_card_device::vme_enp10_card_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) : device_t(mconfig, VME_ENP10, tag, owner, clock) , device_vme_card_interface(mconfig, *this) @@ -43,15 +64,29 @@ vme_enp10_card_device::vme_enp10_card_device(machine_config const &mconfig, char } ROM_START(enp10) - ROM_REGION16_BE(0x4000, "eprom", 0) + ROM_REGION16_BE(0x10000, "eprom", 0) ROM_SYSTEM_BIOS(0, "enp10_0", "CMC ENP/10 CMOS") ROMX_LOAD("link_10_2.0_nh_rev.4.1h.u4", 0x0000, 0x2000, CRC(7532f2b1) SHA1(bdef6c525f451fbc67f3d4625c9db18975e7e1e4), ROM_SKIP(1) | ROM_BIOS(0)) ROMX_LOAD("link_10_2.0_nh_rev.k4.1l.u3", 0x0001, 0x2000, CRC(f2decb78) SHA1(795623274bfff6273790c30445e4dca4064859ed), ROM_SKIP(1) | ROM_BIOS(0)) + ROM_FILL(0x4000, 0xc000, 0xff) ROM_SYSTEM_BIOS(1, "enp10_1", "CMC ENP/10 CMOS (SGI?)") ROMX_LOAD("8845__070_0132_002s.u4", 0x0000, 0x2000, CRC(3ea05f63) SHA1(ee523928d27b854cd1be7e6aa2b8bb093d240022), ROM_SKIP(1) | ROM_BIOS(1)) ROMX_LOAD("8845__070_0131_002s.u3", 0x0001, 0x2000, CRC(d4439fb9) SHA1(51466000b613ab5c03b2bf933e1a485fe2e53d04), ROM_SKIP(1) | ROM_BIOS(1)) + ROM_FILL(0x4000, 0xc000, 0xff) + + ROM_SYSTEM_BIOS(2, "mvme330", "MVME330") + ROMX_LOAD("knlrom10__v4.1-h.u4", 0x0000, 0x2000, CRC(b5f0a49b) SHA1(70e0d54c25a152503796fae8d7c5ffab6d625583), ROM_SKIP(1) | ROM_BIOS(2)) + ROMX_LOAD("knlrom10__v4.1-l.u3", 0x0001, 0x2000, CRC(78d8ae1b) SHA1(c69a8fa2edec7d6faadb48591ce252ac45b55cad), ROM_SKIP(1) | ROM_BIOS(2)) + ROM_FILL(0x4000, 0xc000, 0xff) + + // this firmware requires 512KiB RAM + ROM_SYSTEM_BIOS(3, "mvme330_1", "MVME330-1") + ROMX_LOAD("u_rev-99592-616335-2.u4", 0x0000, 0x8000, CRC(88527c5e) SHA1(b953d99d5eb3462c41202f64f560fae592e269fa), ROM_SKIP(1) | ROM_BIOS(3)) + ROM_CONTINUE(0x0000, 0x8000) // first 32K is 0xff + ROMX_LOAD("u_rev-99592-616335-1.u3", 0x0001, 0x8000, CRC(0d8e5aa4) SHA1(f4b165581c5840e0607bd979c297d3e5ee77cb0f), ROM_SKIP(1) | ROM_BIOS(3)) + ROM_CONTINUE(0x0001, 0x8000) // first 32K is 0xff // hand-crafted prom containing address 02:cf:1f:12:34:56 ROM_REGION16_BE(0x20, "mac", 0) @@ -83,13 +118,16 @@ void vme_enp10_card_device::device_start() save_item(NAME(m_ivr)); save_item(NAME(m_csr)); - save_item(NAME(m_ier)); - save_item(NAME(m_tir)); - save_item(NAME(m_rir)); - save_item(NAME(m_uir)); - save_item(NAME(m_rer)); + save_item(NAME(m_obr)); save_item(NAME(m_exr)); - save_item(NAME(m_hir)); + + save_item(NAME(m_bint)); + save_item(NAME(m_lint)); + save_item(NAME(m_int_state)); + + m_bint = false; + m_lint = false; + m_int_state = 0; } void vme_enp10_card_device::device_reset() @@ -97,14 +135,9 @@ void vme_enp10_card_device::device_reset() m_boot.select(0); m_ivr = 0; - m_csr = 0; - m_ier = 0; - m_tir = 0; - m_rir = 0; - m_uir = 0; - m_rer = 0; + m_csr = CSR_FAIL | CSR_RESET; + m_obr = 0; m_exr = 0; - m_hir = 0; u32 const base = m_base->read() << 16; @@ -112,110 +145,272 @@ void vme_enp10_card_device::device_reset() vme_space(vme::AM_3d).install_device(base, base | 0x1'ffff, *this, &vme_enp10_card_device::vme_map); vme_irq_w<4>(1); + + interrupt(); } void vme_enp10_card_device::device_add_mconfig(machine_config &config) { M68000(config, m_cpu, 20_MHz_XTAL / 2); m_cpu->set_addrmap(AS_PROGRAM, &vme_enp10_card_device::cpu_map); + m_cpu->set_addrmap(m68000_base_device::AS_CPU_SPACE, &vme_enp10_card_device::cpu_ack); AM7990(config, m_net, 20_MHz_XTAL / 2); - m_net->intr_out().set_inputline(m_cpu, INPUT_LINE_IRQ6).invert(); + m_net->intr_out().set( + [this](int state) + { + m_lint = !state; + + interrupt(); + }); m_net->dma_in().set([this](offs_t offset) { return m_cpu->space(0).read_word(offset); }); m_net->dma_out().set([this](offs_t offset, u16 data, u16 mem_mask) { m_cpu->space(0).write_word(offset, data, mem_mask); }); + TIMER(config, "timer").configure_periodic(FUNC(vme_enp10_card_device::timer), attotime::from_msec(2)); + vme_iack().set(FUNC(vme_enp10_card_device::iack_r)); + vme_berr().set( + [this](int state) + { + m_exr |= EXR_RTO; + + m_cpu->trigger_bus_error(); + }); } void vme_enp10_card_device::cpu_map(address_map &map) { + map(0x00'1000, 0xee'ffff).rw(FUNC(vme_enp10_card_device::vme_a24_r), FUNC(vme_enp10_card_device::vme_a24_w)); + map(0xef'0000, 0xef'ffff).rw(FUNC(vme_enp10_card_device::vme_a16_r), FUNC(vme_enp10_card_device::vme_a16_w)); + map(0xf0'0000, 0xf1'ffff).ram().share("ram"); - map(0xf8'0000, 0xf8'3fff).rom().region("eprom", 0).mirror(0x02'0000); + map(0xf8'0000, 0xf8'ffff).rom().region("eprom", 0).mirror(0x02'0000); map(0x00'0000, 0xf1'ffff).view(m_boot); - // map first 1k of eprom at 0x00'0000 + // map first 4k of eprom at 0x00'0000 m_boot[0](0x00'0000, 0x00'0fff).rom().region("eprom", 0); - // map first 1k of ram at 0x00'0000, unmap at 0xf0'0000 + // map first 4k of ram at 0x00'0000, unmap at 0xf0'0000 m_boot[1](0x00'0000, 0x01'ffff).ram().share("ram"); m_boot[1](0x00'1000, 0x01'ffff).unmaprw(); m_boot[1](0xf0'0000, 0xf0'0fff).unmaprw(); - // uart: 16 byte registers 10-2f? - map(0xef'8010, 0xef'802f).noprw(); - - map(0xfe'0080, 0xfe'0081).umask16(0x00ff).rw(FUNC(vme_enp10_card_device::addr_r), FUNC(vme_enp10_card_device::irq_w)); + map(0xfe'0080, 0xfe'0081).mirror(0x1e).umask16(0x00ff).rw(FUNC(vme_enp10_card_device::vect_r), FUNC(vme_enp10_card_device::vect_w)); - map(0xfe'00a0, 0xfe'00a1).umask16(0x00ff).lrw8( + map(0xfe'00a0, 0xfe'00a1).mirror(0x1e).umask16(0x00ff).lrw8( [this]() { return m_csr; }, "csr_r", [this](u8 data) { LOG("csr_w 0x%02x\n", data); - m_led[0] = BIT(data, 6); // fail? - m_led[1] = BIT(data, 5); // run? + m_led[0] = BIT(data, 6); // fail + m_led[1] = !BIT(data, 6); // run - m_csr = data; + // TODO: CSR_RESET + // TODO: CSR_SUSPEND + m_csr = (m_csr & (CSR_VIRQ | CSR_TIMER)) | (data & (CSR_FAIL | CSR_RESET)); }, "csr_w"); - map(0xfe'00c0, 0xfe'00c1).umask16(0x00ff).lrw8(NAME([this]() { return m_ier; }), NAME([this](u8 data) { m_ier = data; interrupt(); })); - map(0xfe'00c2, 0xfe'00c3).umask16(0x00ff).lrw8(NAME([this]() { return m_tir; }), NAME([this](u8 data) { m_tir = data; interrupt(); })); - map(0xfe'00c4, 0xfe'00c5).umask16(0x00ff).lrw8(NAME([this]() { return m_rir; }), NAME([this](u8 data) { m_rir = data; interrupt(); })); - map(0xfe'00c6, 0xfe'00c7).umask16(0x00ff).lrw8(NAME([this]() { return m_uir; }), NAME([this](u8 data) { m_uir = data; interrupt(); })); - map(0xfe'00ce, 0xfe'00cf).umask16(0x00ff).lrw8(NAME([this]() { return m_rer; }), NAME([this](u8 data) { m_rer = data; m_boot.select(BIT(data, 7)); })); + map(0xfe'00c0, 0xfe'00cf).mirror(0x10).umask16(0x00ff).rw(FUNC(vme_enp10_card_device::obr_r), FUNC(vme_enp10_card_device::obr_w)); - map(0xfe'00e0, 0xfe'00e1).umask16(0x00ff).lrw8(NAME([this]() { return m_exr; }), NAME([this](u8 data) { m_exr = data; })); // TODO: bit 1 parity error? - map(0xfe'00ee, 0xfe'00ef).umask16(0x00ff).lr8(NAME([]() { return 0; })); // TODO: bit 1 enables additional ram test? + map(0xfe'00e0, 0xfe'00ef).mirror(0x10).umask16(0x00ff).lrw8( + NAME([this]() { return m_exr; }), + NAME([this](u8 data) + { + if (m_exr) + LOG("exr_w 0x%02x (%s)\n", data, machine().describe_context()); + + m_exr = 0; + m_csr &= ~CSR_TIMER; - map(0xfe'0200, 0xfe'0203).rw(m_net, FUNC(am7990_device::regs_r), FUNC(am7990_device::regs_w)); - map(0xfe'0400, 0xfe'041f).rom().region("mac", 0); + interrupt(); + })); - // TODO: verify the next two registers - map(0xfe'0e00, 0xfe'0e01).umask16(0x00ff).lrw8(NAME([this]() { return m_hir; }), NAME([this](u8 data) { m_hir = data; interrupt(); })); - map(0xfe'0f00, 0xfe'0fff).umask16(0x00ff).lrw8(NAME([this]() { reset(); return 0; }), NAME([this](u8 data) { reset(); })); + map(0xfe'0200, 0xfe'0203).mirror(0x1fc).rw(m_net, FUNC(am7990_device::regs_r), FUNC(am7990_device::regs_w)); + map(0xfe'0400, 0xfe'041f).mirror(0x3e0).rom().region("mac", 0); } void vme_enp10_card_device::vme_map(address_map &map) { - map(0x0'0000, 0x1'efff).lrw16( + map(0x0'0000, 0x1'fdff).lrw16( [this](offs_t offset, u16 mem_mask) { return m_cpu->space(0).read_word(0xf0'0000 | (offset << 1), mem_mask); }, "mem_r", [this](offs_t offset, u16 data, u16 mem_mask) { m_cpu->space(0).write_word(0xf0'0000 | (offset << 1), data, mem_mask); }, "mem_w"); - map(0x1'f000, 0x1'ffff).lrw16( - [this](offs_t offset, u16 mem_mask) { return m_cpu->space(0).read_word(0xfe'0000 | (offset << 1), mem_mask); }, "reg_r", - [this](offs_t offset, u16 data, u16 mem_mask) { m_cpu->space(0).write_word(0xfe'0000 | (offset << 1), mem_mask); }, "reg_w"); + map(0x1'fe00, 0x1'feff).lw16( + [this](u16 data) + { + LOG("host interrupt (%s)\n", machine().describe_context()); + + m_bint = true; + interrupt(); + }, "bint_w"); + + map(0x1'ff00, 0x1'ffff).lw16( + [this](u16 data) + { + LOG("host reset (%s)\n", machine().describe_context()); + reset(); + }, "reset_w"); } -u8 vme_enp10_card_device::addr_r() +u8 vme_enp10_card_device::vect_r() { - LOG("addr_r (%s)\n", machine().describe_context()); + LOG("vect_r (%s)\n", machine().describe_context()); - // TODO: what is returned here? return m_base->read(); } -void vme_enp10_card_device::irq_w(u8 data) +void vme_enp10_card_device::vect_w(u8 data) { - LOG("irq 0x%02x (%s)\n", data, machine().describe_context()); + LOG("vect_w 0x%02x (%s)\n", data, machine().describe_context()); - m_ivr = data; + if (!(m_csr & CSR_VIRQ)) + { + m_ivr = data; + m_csr |= CSR_VIRQ; - vme_irq_w<4>(0); + vme_irq_w<4>(0); + } } u8 vme_enp10_card_device::iack_r() { - vme_irq_w<4>(1); + if (m_csr & CSR_VIRQ) + { + vme_irq_w<4>(1); + m_csr &= ~CSR_VIRQ; + } return m_ivr; } +u8 vme_enp10_card_device::obr_r(offs_t offset) +{ + return (m_obr & (1U << offset)) ? 0x80 : 0; +} + +void vme_enp10_card_device::obr_w(offs_t offset, u8 data) +{ + unsigned const state = BIT(data, 7); + + if (BIT(m_obr, offset) != state) + { + //static char const *const reg[] = { "ier", "tir", "rir", "uir", "bit4", "bit5", "bit6", "mapr" }; + //LOG("obr_w %s %u (%s)\n", reg[offset], state, machine().describe_context()); + + if (state) + m_obr |= 1U << offset; + else + m_obr &= ~(1U << offset); + + if (offset < 4) + interrupt(); + else if (offset == 7) + m_boot.select(state); + } +} + +void vme_enp10_card_device::timer(timer_device &timer, s32 param) +{ + m_csr |= CSR_TIMER; + + interrupt(); +} + void vme_enp10_card_device::interrupt() { - bool const enable = BIT(m_ier, 7); + u8 int_state = 0; + + if (m_obr & OBR_IE) + { + // find highest priority asserted interrupt source + if ((m_csr & CSR_TIMER) || (m_exr & (EXR_ACLO | EXR_ABO | EXR_PER))) + int_state = 7; + else if (m_lint) + int_state = 6; + else if (m_obr & OBR_RI) + int_state = 5; + else if (m_obr & OBR_TI) + int_state = 4; + else if (m_bint) + int_state = 3; + else if (m_obr & OBR_UI) + int_state = 2; + } + + if (int_state != m_int_state) + { + // deassert old interrupt + if (m_int_state) + m_cpu->set_input_line(m_int_state, CLEAR_LINE); + + // assert new interrupt + if (int_state) + m_cpu->set_input_line(int_state, int_state == 3 ? HOLD_LINE : ASSERT_LINE); + + m_int_state = int_state; + } +} + +void vme_enp10_card_device::cpu_ack(address_map &map) +{ + map(0xff'fff3, 0xff'fff3).lr8(NAME([]() { return m68000_base_device::autovector(1); })); + map(0xff'fff5, 0xff'fff5).lr8(NAME([]() { return m68000_base_device::autovector(2); })); + map(0xff'fff7, 0xff'fff7).lr8(NAME([this]() { m_bint = false; return m68000_base_device::autovector(3); })); + map(0xff'fff9, 0xff'fff9).lr8(NAME([]() { return m68000_base_device::autovector(4); })); + map(0xff'fffb, 0xff'fffb).lr8(NAME([]() { return m68000_base_device::autovector(5); })); + map(0xff'fffd, 0xff'fffd).lr8(NAME([]() { return m68000_base_device::autovector(6); })); + map(0xff'ffff, 0xff'ffff).lr8(NAME([]() { return m68000_base_device::autovector(7); })); +} - m_cpu->set_input_line(INPUT_LINE_IRQ2, enable && BIT(m_uir, 7)); - m_cpu->set_input_line(INPUT_LINE_IRQ3, enable && BIT(m_hir, 7)); - m_cpu->set_input_line(INPUT_LINE_IRQ4, enable && BIT(m_tir, 7)); - m_cpu->set_input_line(INPUT_LINE_IRQ5, enable && BIT(m_rir, 7)); +u16 vme_enp10_card_device::vme_a16_r(offs_t offset, u16 mem_mask) +{ + if (!machine().side_effects_disabled()) + { + if (m_cpu->supervisor_mode()) + return device_vme_card_interface::vme_read16(offset, mem_mask); + else + return device_vme_card_interface::vme_read16(offset, mem_mask); + } + else + return 0; +} + +void vme_enp10_card_device::vme_a16_w(offs_t offset, u16 data, u16 mem_mask) +{ + if (m_cpu->supervisor_mode()) + device_vme_card_interface::vme_write16(offset, data, mem_mask); + else + device_vme_card_interface::vme_write16(offset, data, mem_mask); +} + +u16 vme_enp10_card_device::vme_a24_r(offs_t offset, u16 mem_mask) +{ + if (!machine().side_effects_disabled()) + { + switch (m_cpu->get_fc()) + { + case 1: return device_vme_card_interface::vme_read16(offset, mem_mask); + case 2: return device_vme_card_interface::vme_read16(offset, mem_mask); + case 5: return device_vme_card_interface::vme_read16(offset, mem_mask); + case 6: return device_vme_card_interface::vme_read16(offset, mem_mask); + default: + fatalerror("enp10: unknown vme a24 space read (%s)\n", machine().describe_context()); + } + } + else + return 0; +} + +void vme_enp10_card_device::vme_a24_w(offs_t offset, u16 data, u16 mem_mask) +{ + switch (m_cpu->get_fc()) + { + case 1: device_vme_card_interface::vme_write16(offset, data, mem_mask); break; + case 2: device_vme_card_interface::vme_write16(offset, data, mem_mask); break; + case 5: device_vme_card_interface::vme_write16(offset, data, mem_mask); break; + case 6: device_vme_card_interface::vme_write16(offset, data, mem_mask); break; + default: + fatalerror("enp10: unknown vme a24 space write (%s)\n", machine().describe_context()); + } } diff --git a/src/devices/bus/vme/enp10.h b/src/devices/bus/vme/enp10.h index 3bb1e3ad9094b..0414a1325d5d1 100644 --- a/src/devices/bus/vme/enp10.h +++ b/src/devices/bus/vme/enp10.h @@ -8,6 +8,7 @@ #include "cpu/m68000/m68000.h" #include "machine/am79c90.h" +#include "machine/timer.h" #include "bus/vme/vme.h" class vme_enp10_card_device @@ -26,14 +27,27 @@ class vme_enp10_card_device private: void cpu_map(address_map &map) ATTR_COLD; + void cpu_ack(address_map &map) ATTR_COLD; void vme_map(address_map &map) ATTR_COLD; - u8 addr_r(); - void irq_w(u8 data); + // vme bus outgoing interrupt + u8 vect_r(); + void vect_w(u8 data); u8 iack_r(); + // one-bit register handlers + u8 obr_r(offs_t offset); + void obr_w(offs_t offset, u8 data); + + void timer(timer_device &timer, s32 param); void interrupt(); + // vme bus access handlers + u16 vme_a16_r(offs_t offset, u16 mem_mask); + void vme_a16_w(offs_t offset, u16 data, u16 mem_mask); + u16 vme_a24_r(offs_t offset, u16 mem_mask); + void vme_a24_w(offs_t offset, u16 data, u16 mem_mask); + required_device m_cpu; required_device m_net; @@ -42,13 +56,12 @@ class vme_enp10_card_device u8 m_ivr; // interrupt vector register u8 m_csr; // control/status register - u8 m_ier; // interrupt enable register - u8 m_tir; // transmit interrupt register - u8 m_rir; // receive interrupt register - u8 m_uir; // utility interrupt register - u8 m_rer; // ram/rom enable register + u8 m_obr; // one-bit registers u8 m_exr; // exception register - u8 m_hir; // host interrupt register + + bool m_bint; // host to card interrupt + bool m_lint; // lance interrupt + u8 m_int_state; // current interrupt state memory_view m_boot; }; diff --git a/src/devices/cpu/cosmac/cosmac.cpp b/src/devices/cpu/cosmac/cosmac.cpp index 37d5ac7390dde..11d21f6496160 100644 --- a/src/devices/cpu/cosmac/cosmac.cpp +++ b/src/devices/cpu/cosmac/cosmac.cpp @@ -796,7 +796,7 @@ void cosmac_device::execute_run() // execute initialization cycle m_state = cosmac_state::STATE_1_INIT; - run(); + run_state(); // next state is IDLE m_state = cosmac_state::STATE_1_EXECUTE; diff --git a/src/devices/cpu/drcbex64.cpp b/src/devices/cpu/drcbex64.cpp index e42f0f015cc56..c7ddf18b53575 100644 --- a/src/devices/cpu/drcbex64.cpp +++ b/src/devices/cpu/drcbex64.cpp @@ -945,8 +945,21 @@ void drcbe_x64::generate(drcuml_block &block, const instruction *instlist, uint3 m_hash.block_begin(block, instlist, numinst); m_map.block_begin(block); - // compute the base by aligning the cache top to a cache line (assumed to be 64 bytes) - x86code *dst = (x86code *)(uint64_t(m_cache.top() + 63) & ~63); + // compute the base by aligning the cache top to a cache line + auto [err, linesize] = osd_get_cache_line_size(); + uintptr_t linemask = 63; + if (err) + { + osd_printf_verbose("Error getting cache line size (%s:%d %s), assuming 64 bytes\n", err.category().name(), err.value(), err.message()); + } + else + { + assert(linesize); + linemask = linesize - 1; + for (unsigned shift = 1; linemask & (linemask + 1); ++shift) + linemask |= linemask >> shift; + } + x86code *dst = (x86code *)(uintptr_t(m_cache.top() + linemask) & ~linemask); CodeHolder ch; ch.init(Environment::host(), uint64_t(dst)); diff --git a/src/devices/cpu/drcbex86.cpp b/src/devices/cpu/drcbex86.cpp index 6e187e6846a36..aadd119a3616d 100644 --- a/src/devices/cpu/drcbex86.cpp +++ b/src/devices/cpu/drcbex86.cpp @@ -840,8 +840,21 @@ void drcbe_x86::generate(drcuml_block &block, const instruction *instlist, uint3 m_hash.block_begin(block, instlist, numinst); m_map.block_begin(block); - // compute the base by aligning the cache top to a cache line (assumed to be 64 bytes) - x86code *dst = (x86code *)(uint64_t(m_cache.top() + 63) & ~63); + // compute the base by aligning the cache top to a cache line + auto [err, linesize] = osd_get_cache_line_size(); + uintptr_t linemask = 63; + if (err) + { + osd_printf_verbose("Error getting cache line size (%s:%d %s), assuming 64 bytes\n", err.category().name(), err.value(), err.message()); + } + else + { + assert(linesize); + linemask = linesize - 1; + for (unsigned shift = 1; linemask & (linemask + 1); ++shift) + linemask |= linemask >> shift; + } + x86code *dst = (x86code *)(uintptr_t(m_cache.top() + linemask) & ~linemask); CodeHolder ch; ch.init(Environment::host(), uint64_t(dst)); diff --git a/src/devices/cpu/h8/h83048.h b/src/devices/cpu/h8/h83048.h index 52c726cb09e2a..abf3cf97d4788 100644 --- a/src/devices/cpu/h8/h83048.h +++ b/src/devices/cpu/h8/h83048.h @@ -12,7 +12,7 @@ H8/3044 32K 2K H8/3045 64K 2K H8/3047 96K 4K - H8/3048 192K 4K + H8/3048 128K 4K The 3394, 3396, and 3997 variants are the mask-rom versions. diff --git a/src/devices/cpu/i8085/i8085.cpp b/src/devices/cpu/i8085/i8085.cpp index e3af6ad8a4d3c..627a93cfcd0eb 100644 --- a/src/devices/cpu/i8085/i8085.cpp +++ b/src/devices/cpu/i8085/i8085.cpp @@ -274,21 +274,13 @@ void i8085a_cpu_device::init_tables() /* flags */ u8 zs = 0; - if (i==0) zs |= ZF; - if (i&128) zs |= SF; - - u8 p = 0; - if (i&1) ++p; - if (i&2) ++p; - if (i&4) ++p; - if (i&8) ++p; - if (i&16) ++p; - if (i&32) ++p; - if (i&64) ++p; - if (i&128) ++p; + if (i == 0) zs |= ZF; + if (i & 0x80) zs |= SF; + + u8 p = (population_count_32(i) & 1) ? 0 : PF; lut_zs[i] = zs; - lut_zsp[i] = zs | ((p&1) ? 0 : PF); + lut_zsp[i] = zs | p; } } @@ -307,11 +299,11 @@ void i8085a_cpu_device::device_start() m_after_ei = 0; m_nmi_state = 0; m_irq_state[3] = m_irq_state[2] = m_irq_state[1] = m_irq_state[0] = 0; - m_trap_pending = 0; + m_trap_pending = false; m_trap_im_copy = 0; - m_sod_state = true; // SOD will go low at reset + m_sod_state = 1; // SOD will go low at reset m_in_acknowledge = false; - m_ietemp = false; + m_ietemp = 0; init_tables(); @@ -382,7 +374,7 @@ void i8085a_cpu_device::device_reset() m_halt = 0; m_im &= ~IM_I75; m_im |= IM_M55 | IM_M65 | IM_M75; - m_after_ei = false; + m_after_ei = 0; m_trap_pending = false; m_trap_im_copy = 0; set_inte(0); @@ -430,11 +422,11 @@ void i8085a_cpu_device::state_export(const device_state_entry &entry) switch (entry.index()) { case I8085_SID: - m_ietemp = ((m_im & IM_SID) != 0) && m_in_sid_func() != 0; + m_ietemp = ((m_im & IM_SID) && m_in_sid_func()) ? 1 : 0; break; case I8085_INTE: - m_ietemp = ((m_im & IM_IE) != 0); + m_ietemp = (m_im & IM_IE) ? 1 : 0; break; default: diff --git a/src/devices/cpu/i8085/i8085.h b/src/devices/cpu/i8085/i8085.h index 23772be54a1b1..3fc08fafe35c4 100644 --- a/src/devices/cpu/i8085/i8085.h +++ b/src/devices/cpu/i8085/i8085.h @@ -103,29 +103,30 @@ class i8085a_cpu_device : public cpu_device PAIR m_PC,m_SP,m_AF,m_BC,m_DE,m_HL,m_WZ; u8 m_halt; - u8 m_im; /* interrupt mask (8085A only) */ - u8 m_status; /* status word */ - - u8 m_after_ei; /* post-EI processing; starts at 2, check for ints at 0 */ - u8 m_nmi_state; /* raw NMI line state */ - u8 m_irq_state[4]; /* raw IRQ line states */ - u8 m_trap_pending; /* TRAP interrupt latched? */ - u8 m_trap_im_copy; /* copy of IM register when TRAP was taken */ - u8 m_sod_state; /* state of the SOD line */ + u8 m_im; // interrupt mask (8085A only) + u8 m_status; // status word + + u8 m_after_ei; // post-EI processing; starts at 2, check for ints at 0 + u8 m_nmi_state; // raw NMI line state + u8 m_irq_state[4]; // raw IRQ line states + bool m_trap_pending; // TRAP interrupt latched? + u8 m_trap_im_copy; // copy of IM register when TRAP was taken + u8 m_sod_state; // state of the SOD line bool m_in_acknowledge; - bool m_ietemp; /* import/export temp space */ + u8 m_ietemp; // import/export temp space memory_access<16, 0, 0, ENDIANNESS_LITTLE>::cache m_cprogram, m_copcodes; memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_program; memory_access< 8, 0, 0, ENDIANNESS_LITTLE>::specific m_io; int m_icount; - /* cycles lookup */ + // cycles lookup static const u8 lut_cycles_8080[256]; static const u8 lut_cycles_8085[256]; u8 lut_cycles[256]; - /* flags lookup */ + + // flags lookup u8 lut_zs[256]; u8 lut_zsp[256]; diff --git a/src/devices/cpu/m6502/m6500_1.cpp b/src/devices/cpu/m6502/m6500_1.cpp index 6ba2f9c391986..8aa30f08c8974 100644 --- a/src/devices/cpu/m6502/m6500_1.cpp +++ b/src/devices/cpu/m6502/m6500_1.cpp @@ -12,10 +12,10 @@ * Sixteen-bit programmable counter/latch The onboad clock generator has mask options for an external crystal - (2MHz to 6MHz) an external TTL-compatible clock with a 300Ω pull-up + (2MHz to 6MHz), an external TTL-compatible clock with a 300Ω pull-up resistor (2MHz to 6MHz), or an RC oscillator with an external 47kΩ resistor and internal capacitor (nominally 2MHz). The clock is - divided by two to generate the two-phase CPU code clock. + divided by two to generate the two-phase CPU core clock. There is no on-board power-on reset generator. The /RES pin must be held low (asserted) for at least eight phase 2 clock cycles after @@ -45,7 +45,7 @@ on the CNTR pin in event counter mode is half the phase 2 clock rate. This suggests that an internal flag is set when a rasing edge is detected on CNTR and reset when the counter is synchronously - decremented. This is not emulated - for simplicity the counter is + decremented. This is not emulated - for simplicity, the counter is asynchronously decremented on detecting a rising edge on CNTR. The CNTR pin has an active low driver and internal passive pull-up. @@ -59,14 +59,14 @@ is unknown what other differences these devices have. TODO: - - For some reason most if not all Amiga MCU programs accesses arbitrary - zero page 0x90-0xff with a back-to-back cmp($00, x) opcode at - PC=c06-c08 with the actual result discarded. X can be any value in - the 0x90-0xff range, depending on the last user keypress row source - e.g. 0xdf-0xe0 for 'A', 0xef-0xf0 for 'Q', 0xfb-0xfc for function - keys. - This can be extremely verbose in the logging facility so we currently - nop it out for the time being. + - For some reason most if not all Amiga MCU programs access + arbitrary zero page 0x90-0xff with a back-to-back cmp($00, x) + opcode at PC=c06-c08 with the actual result discarded. X can be + any value in the 0x90-0xff range, depending on the last user + keypress row source e.g. 0xdf-0xe0 for 'A', 0xef-0xf0 for 'Q', + 0xfb-0xfc for function keys. + This can be extremely verbose in the logging facility so we nop it + out for the time being. ***************************************************************************/ diff --git a/src/devices/cpu/m6800/6800ops.hxx b/src/devices/cpu/m6800/6800ops.hxx index eab1825c0e33f..98e45de37d113 100644 --- a/src/devices/cpu/m6800/6800ops.hxx +++ b/src/devices/cpu/m6800/6800ops.hxx @@ -829,7 +829,7 @@ OP_HANDLER( jmp_ix ) /* $6f CLR indexed -0100 */ OP_HANDLER( clr_ix ) { - INDEXED; WM(EAD,0); + INDEXED; RM(EAD); WM(EAD,0); CLR_NZVC; SEZ; } @@ -981,7 +981,7 @@ OP_HANDLER( jmp_ex ) /* $7f CLR extended -0100 */ OP_HANDLER( clr_ex ) { - EXTENDED; WM(EAD,0); + EXTENDED; RM(EAD); WM(EAD,0); CLR_NZVC; SEZ; } diff --git a/src/devices/cpu/mcs51/mcs51.cpp b/src/devices/cpu/mcs51/mcs51.cpp index ab9b8ae41d8a7..d07c67da854b3 100644 --- a/src/devices/cpu/mcs51/mcs51.cpp +++ b/src/devices/cpu/mcs51/mcs51.cpp @@ -1042,14 +1042,18 @@ void mcs51_cpu_device::do_sub_flags(uint8_t a, uint8_t data, uint8_t c) void mcs51_cpu_device::transmit(int state) { - if (BIT(SFR_A(ADDR_P3), 1) != state) + if (m_uart.txd != state) { - if (state) - SFR_A(ADDR_P3) |= 1U << 1; - else - SFR_A(ADDR_P3) &= ~(1U << 1); + m_uart.txd = state; - m_port_out_cb[3](SFR_A(ADDR_P3)); + // P3.1 = SFR(P3) & TxD + if (BIT(SFR_A(ADDR_P3), 1)) + { + if (state) + m_port_out_cb[3](SFR_A(ADDR_P3)); + else + m_port_out_cb[3](SFR_A(ADDR_P3) & ~0x02); + } } } @@ -2230,7 +2234,13 @@ void mcs51_cpu_device::sfr_write(size_t offset, uint8_t data) case ADDR_P0: m_port_out_cb[0](data); break; case ADDR_P1: m_port_out_cb[1](data); break; case ADDR_P2: m_port_out_cb[2](data); break; - case ADDR_P3: m_port_out_cb[3](data); break; + case ADDR_P3: + // P3.1 = SFR(P3) & TxD + if (!m_uart.txd) + m_port_out_cb[3](data & ~0x02); + else + m_port_out_cb[3](data); + break; case ADDR_SBUF: LOGMASKED(LOG_TX, "tx byte 0x%02x\n", data); m_uart.data_out = data; @@ -2320,28 +2330,34 @@ void mcs51_cpu_device::device_start() /* Save states */ save_item(NAME(m_ppc)); save_item(NAME(m_pc)); + save_item(NAME(m_rwm)); + save_item(NAME(m_recalc_parity)); + save_item(NAME(m_last_line_state)); + save_item(NAME(m_t0_cnt)); + save_item(NAME(m_t1_cnt)); + save_item(NAME(m_t2_cnt)); + save_item(NAME(m_t2ex_cnt)); + save_item(NAME(m_cur_irq_prio)); + save_item(NAME(m_irq_active)); + save_item(NAME(m_irq_prio)); save_item(NAME(m_last_op)); save_item(NAME(m_last_bit)); - save_item(NAME(m_rwm) ); - save_item(NAME(m_cur_irq_prio) ); - save_item(NAME(m_last_line_state) ); - save_item(NAME(m_t0_cnt) ); - save_item(NAME(m_t1_cnt) ); - save_item(NAME(m_t2_cnt) ); - save_item(NAME(m_t2ex_cnt) ); - save_item(NAME(m_recalc_parity) ); - save_item(NAME(m_irq_prio) ); - save_item(NAME(m_irq_active) ); - save_item(NAME(m_ds5002fp.previous_ta) ); - save_item(NAME(m_ds5002fp.ta_window) ); - save_item(NAME(m_ds5002fp.rnr_delay) ); - save_item(NAME(m_ds5002fp.range) ); + save_item(NAME(m_uart.data_out)); save_item(NAME(m_uart.data_in)); + save_item(NAME(m_uart.txbit)); + save_item(NAME(m_uart.txd)); + save_item(NAME(m_uart.rxbit)); + save_item(NAME(m_uart.rxb8)); save_item(NAME(m_uart.smod_div)); save_item(NAME(m_uart.rx_clk)); save_item(NAME(m_uart.tx_clk)); + save_item(NAME(m_ds5002fp.previous_ta)); + save_item(NAME(m_ds5002fp.ta_window)); + save_item(NAME(m_ds5002fp.range)); + save_item(NAME(m_ds5002fp.rnr_delay)); + state_add( MCS51_PC, "PC", m_pc).formatstr("%04X"); state_add( MCS51_SP, "SP", SP).formatstr("%02X"); state_add( MCS51_PSW, "PSW", PSW).formatstr("%02X"); @@ -2373,8 +2389,8 @@ void mcs51_cpu_device::device_start() state_add( MCS51_TL1, "TL1", TL1).formatstr("%02X"); state_add( MCS51_TH1, "TH1", TH1).formatstr("%02X"); - state_add( STATE_GENPC, "GENPC", m_pc ).noshow(); - state_add( STATE_GENPCBASE, "CURPC", m_pc ).noshow(); + state_add( STATE_GENPC, "GENPC", m_pc).noshow(); + state_add( STATE_GENPCBASE, "CURPC", m_pc).noshow(); state_add( STATE_GENFLAGS, "GENFLAGS", m_rtemp).formatstr("%8s").noshow(); set_icountptr(m_icount); @@ -2486,6 +2502,7 @@ void mcs51_cpu_device::device_reset() m_uart.rx_clk = 0; m_uart.tx_clk = 0; m_uart.txbit = SIO_IDLE; + m_uart.txd = 0; m_uart.rxbit = SIO_IDLE; m_uart.rxb8 = 0; m_uart.smod_div = 0; diff --git a/src/devices/cpu/mcs51/mcs51.h b/src/devices/cpu/mcs51/mcs51.h index a81428685c35c..62db45e4a3807 100644 --- a/src/devices/cpu/mcs51/mcs51.h +++ b/src/devices/cpu/mcs51/mcs51.h @@ -24,6 +24,7 @@ * - internal memory maps * - addition of new processor types * - full emulation of 8xCx2 processors + * *****************************************************************************/ #ifndef MAME_CPU_MCS51_MCS51_H @@ -42,14 +43,14 @@ enum enum { - MCS51_INT0_LINE = 0, /* P3.2: External Interrupt 0 */ - MCS51_INT1_LINE, /* P3.3: External Interrupt 1 */ - MCS51_T0_LINE, /* P3.4: Timer 0 External Input */ - MCS51_T1_LINE, /* P3.5: Timer 1 External Input */ - MCS51_T2_LINE, /* P1.0: Timer 2 External Input */ - MCS51_T2EX_LINE, /* P1.1: Timer 2 Capture Reload Trigger */ - - DS5002FP_PFI_LINE /* DS5002FP Power fail interrupt */ + MCS51_INT0_LINE = 0, // P3.2: External Interrupt 0 + MCS51_INT1_LINE, // P3.3: External Interrupt 1 + MCS51_T0_LINE, // P3.4: Timer 0 External Input + MCS51_T1_LINE, // P3.5: Timer 1 External Input + MCS51_T2_LINE, // P1.0: Timer 2 External Input + MCS51_T2EX_LINE, // P1.1: Timer 2 Capture Reload Trigger + + DS5002FP_PFI_LINE // DS5002FP Power fail interrupt }; @@ -97,58 +98,59 @@ class mcs51_cpu_device : public cpu_device address_space_config m_data_config; address_space_config m_io_config; - //Internal stuff - uint16_t m_ppc; //previous pc - uint16_t m_pc; //current pc - uint16_t m_features; //features of this cpu - uint8_t m_rwm; //Signals that the current instruction is a read/write/modify instruction - - int m_inst_cycles; /* cycles for the current instruction */ - const uint32_t m_rom_size; /* size (in bytes) of internal program ROM/EPROM */ - int m_ram_mask; /* second ram bank for indirect access available ? */ - int m_num_interrupts; /* number of interrupts supported */ - int m_recalc_parity; /* recalculate parity before next instruction */ - uint32_t m_last_line_state; /* last state of input lines line */ - int m_t0_cnt; /* number of 0->1 transitions on T0 line */ - int m_t1_cnt; /* number of 0->1 transitions on T1 line */ - int m_t2_cnt; /* number of 0->1 transitions on T2 line */ - int m_t2ex_cnt; /* number of 0->1 transitions on T2EX line */ - int m_cur_irq_prio; /* Holds value of the current IRQ Priority Level; -1 if no irq */ - uint8_t m_irq_active; /* mask which irq levels are serviced */ - uint8_t m_irq_prio[8]; /* interrupt priority */ - - uint8_t m_forced_inputs[4]; /* allow read even if configured as output */ + // Internal stuff + uint16_t m_ppc; // previous pc + uint16_t m_pc; // current pc + uint16_t m_features; // features of this cpu + uint8_t m_rwm; // Signals that the current instruction is a read/write/modify instruction + + int m_inst_cycles; // cycles for the current instruction + const uint32_t m_rom_size; // size (in bytes) of internal program ROM/EPROM + int m_ram_mask; // second ram bank for indirect access available ? + int m_num_interrupts; // number of interrupts supported + int m_recalc_parity; // recalculate parity before next instruction + uint32_t m_last_line_state; // last state of input lines line + int m_t0_cnt; // number of 0->1 transitions on T0 line + int m_t1_cnt; // number of 0->1 transitions on T1 line + int m_t2_cnt; // number of 0->1 transitions on T2 line + int m_t2ex_cnt; // number of 0->1 transitions on T2EX line + int m_cur_irq_prio; // Holds value of the current IRQ Priority Level; -1 if no irq + uint8_t m_irq_active; // mask which irq levels are serviced + uint8_t m_irq_prio[8]; // interrupt priority + + uint8_t m_forced_inputs[4]; // allow read even if configured as output // JB-related hacks - uint8_t m_last_op; - uint8_t m_last_bit; + uint8_t m_last_op; + uint8_t m_last_bit; - int m_icount; + int m_icount; struct mcs51_uart { - uint8_t data_out; //Data to send out - uint8_t data_in; - uint8_t txbit; - uint8_t rxbit; - uint8_t rxb8; - - int smod_div; /* signal divided by 2^SMOD */ - int rx_clk; /* rx clock */ - int tx_clk; /* tx clock */ - } m_uart; /* internal uart */ - - /* Internal Ram */ - required_shared_ptr m_sfr_ram; /* 128 SFR - these are in 0x80 - 0xFF */ - required_shared_ptr m_scratchpad; /* 128 RAM (8031/51) + 128 RAM in second bank (8032/52) */ - - /* SFR Callbacks */ + uint8_t data_out; // data to send out + uint8_t data_in; + uint8_t txbit; + uint8_t txd; + uint8_t rxbit; + uint8_t rxb8; + + int smod_div; // signal divided by 2^SMOD + int rx_clk; // rx clock + int tx_clk; // tx clock + } m_uart; // internal uart + + // Internal Ram + required_shared_ptr m_sfr_ram; // 128 SFR - these are in 0x80 - 0xFF + required_shared_ptr m_scratchpad; // 128 RAM (8031/51) + 128 RAM in second bank (8032/52) + + // SFR Callbacks virtual void sfr_write(size_t offset, uint8_t data); virtual uint8_t sfr_read(size_t offset); void transmit(int state); - /* Memory spaces */ + // Memory spaces memory_access<16, 0, 0, ENDIANNESS_LITTLE>::cache m_program; memory_access< 9, 0, 0, ENDIANNESS_LITTLE>::specific m_data; memory_access<17, 0, 0, ENDIANNESS_LITTLE>::specific m_io; @@ -156,16 +158,17 @@ class mcs51_cpu_device : public cpu_device devcb_read8::array<4> m_port_in_cb; devcb_write8::array<4> m_port_out_cb; - /* DS5002FP */ + // DS5002FP struct { - uint8_t previous_ta; /* Previous Timed Access value */ - uint8_t ta_window; /* Limed Access window */ - uint8_t range; /* Memory Range */ - /* Bootstrap Configuration */ - uint8_t mcon; /* bootstrap loader MCON register */ - uint8_t rpctl; /* bootstrap loader RPCTL register */ - uint8_t crc; /* bootstrap loader CRC register */ - int32_t rnr_delay; /* delay before new random number available */ + uint8_t previous_ta; // Previous Timed Access value + uint8_t ta_window; // Limed Access window + uint8_t range; // Memory Range + + // Bootstrap Configuration + uint8_t mcon; // bootstrap loader MCON register + uint8_t rpctl; // bootstrap loader RPCTL register + uint8_t crc; // bootstrap loader CRC register + int32_t rnr_delay; // delay before new random number available } m_ds5002fp; // for the debugger @@ -314,19 +317,24 @@ class mcs51_cpu_device : public cpu_device }; -/* variants with no internal rom and 128 byte internal memory */ +// variants with no internal rom and 128 byte internal memory DECLARE_DEVICE_TYPE(I8031, i8031_device) -/* variants with no internal rom and 256 byte internal memory */ + +// variants with no internal rom and 256 byte internal memory DECLARE_DEVICE_TYPE(I8032, i8032_device) -/* variants 4k internal rom and 128 byte internal memory */ + +// variants 4k internal rom and 128 byte internal memory DECLARE_DEVICE_TYPE(I8051, i8051_device) DECLARE_DEVICE_TYPE(I8751, i8751_device) -/* variants 8k internal rom and 128 byte internal memory (no 8052 features) */ + +// variants 8k internal rom and 128 byte internal memory (no 8052 features) DECLARE_DEVICE_TYPE(AM8753, am8753_device) -/* variants 8k internal rom and 256 byte internal memory and more registers */ + +// variants 8k internal rom and 256 byte internal memory and more registers DECLARE_DEVICE_TYPE(I8052, i8052_device) DECLARE_DEVICE_TYPE(I8752, i8752_device) -/* cmos variants */ + +// cmos variants DECLARE_DEVICE_TYPE(I80C31, i80c31_device) DECLARE_DEVICE_TYPE(I80C51, i80c51_device) DECLARE_DEVICE_TYPE(I87C51, i87c51_device) @@ -342,7 +350,8 @@ DECLARE_DEVICE_TYPE(SAB80C535, sab80c535_device) DECLARE_DEVICE_TYPE(P80C552, p80c552_device) DECLARE_DEVICE_TYPE(P87C552, p87c552_device) DECLARE_DEVICE_TYPE(P80C562, p80c562_device) -/* 4k internal perom and 128 internal ram and 2 analog comparators */ + +// 4k internal perom and 128 internal ram and 2 analog comparators DECLARE_DEVICE_TYPE(AT89C4051, at89c4051_device) DECLARE_DEVICE_TYPE(I8344, i8344_device) @@ -391,7 +400,7 @@ class i8052_device : public mcs51_cpu_device virtual std::unique_ptr create_disassembler() override; - /* SFR Callbacks */ + // SFR Callbacks virtual void sfr_write(size_t offset, uint8_t data) override; virtual uint8_t sfr_read(size_t offset) override; }; @@ -452,7 +461,7 @@ class i80c52_device : public i8052_device virtual std::unique_ptr create_disassembler() override; - /* SFR Callbacks */ + // SFR Callbacks virtual void sfr_write(size_t offset, uint8_t data) override; virtual uint8_t sfr_read(size_t offset) override; }; @@ -602,7 +611,7 @@ class p87c552_device : public p80c562_device * Internal ram 128k and security features */ -/* these allow the default state of RAM to be set from a region */ +// these allow the default state of RAM to be set from a region #define DS5002FP_SET_MON( _mcon) \ ROM_FILL( 0xc6, 1, _mcon) @@ -631,7 +640,7 @@ class ds5002fp_device : public mcs51_cpu_device, public device_nvram_interface protected: virtual std::unique_ptr create_disassembler() override; - /* SFR Callbacks */ + // SFR Callbacks virtual void sfr_write(size_t offset, uint8_t data) override; virtual uint8_t sfr_read(size_t offset) override; diff --git a/src/devices/cpu/powerpc/ppc.h b/src/devices/cpu/powerpc/ppc.h index 905132c0034de..ce715b59dc122 100644 --- a/src/devices/cpu/powerpc/ppc.h +++ b/src/devices/cpu/powerpc/ppc.h @@ -79,9 +79,18 @@ enum PPC_R30, PPC_R31, PPC_CR, + PPC_MQ, PPC_LR, PPC_CTR, PPC_XER, + PPC_BAT0U, + PPC_BAT0L, + PPC_BAT1U, + PPC_BAT1L, + PPC_BAT2U, + PPC_BAT2L, + PPC_BAT3U, + PPC_BAT3L, PPC_F0, PPC_F1, @@ -151,7 +160,6 @@ enum PPC_SR15 }; - /* compiler-specific options */ #define PPCDRC_STRICT_VERIFY 0x0001 /* verify all instructions */ #define PPCDRC_FLUSH_PC 0x0002 /* flush the PC value before each memory access */ @@ -515,6 +523,7 @@ class ppc_device : public cpu_device, public device_vtlb_interface uint32_t m_serial_clock; uint64_t m_tb_zero_cycles; uint64_t m_dec_zero_cycles; + uint64_t m_rtc_zero_cycles; emu_timer * m_decrementer_int_timer; diff --git a/src/devices/cpu/powerpc/ppccom.cpp b/src/devices/cpu/powerpc/ppccom.cpp index 68ba52cf5090b..4e76a3efbb277 100644 --- a/src/devices/cpu/powerpc/ppccom.cpp +++ b/src/devices/cpu/powerpc/ppccom.cpp @@ -281,7 +281,7 @@ mpc8240_device::mpc8240_device(const machine_config &mconfig, const char *tag, d } ppc601_device::ppc601_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : ppc_device(mconfig, PPC601, tag, owner, clock, 32, 64, PPC_MODEL_601, PPCCAP_OEA | PPCCAP_VEA | PPCCAP_FPU | PPCCAP_MISALIGNED | PPCCAP_MFIOC | PPCCAP_601BAT, 0/* no TB */, address_map_constructor()) + : ppc_device(mconfig, PPC601, tag, owner, clock, 32, 64, PPC_MODEL_601, PPCCAP_OEA | PPCCAP_VEA | PPCCAP_FPU | PPCCAP_MISALIGNED | PPCCAP_MFIOC | PPCCAP_601BAT | PPCCAP_LEGACY_POWER, 0 /* no TB */, address_map_constructor()) { } @@ -727,6 +727,7 @@ void ppc_device::device_start() m_cpu_clock = 0; m_tb_zero_cycles = 0; m_dec_zero_cycles = 0; + m_rtc_zero_cycles = 0; m_arg1 = 0; m_fastram_select = 0; @@ -837,6 +838,11 @@ void ppc_device::device_start() state_add(PPC_PC, "PC", m_core->pc).formatstr("%08X"); state_add(PPC_MSR, "MSR", m_core->msr).formatstr("%08X"); state_add(PPC_CR, "CR", m_debugger_temp).callimport().callexport().formatstr("%08X"); + // If the legacy POWER instructions exist, that implies MQ is used and should be shown + if (m_cap & PPCCAP_LEGACY_POWER) + { + state_add(PPC_MQ, "MQ", m_core->spr[SPR601_MQ]).formatstr("%08X"); + } state_add(PPC_LR, "LR", m_core->spr[SPR_LR]).formatstr("%08X"); state_add(PPC_CTR, "CTR", m_core->spr[SPR_CTR]).formatstr("%08X"); state_add(PPC_XER, "XER", m_debugger_temp).callimport().callexport().formatstr("%08X"); @@ -1301,8 +1307,6 @@ uint32_t ppc_device::ppccom_translate_address_internal(int intention, bool debug uint32_t lower = m_core->spr[SPROEA_IBAT0U + 2*batnum + 1]; int privbit = ((intention & TR_USER) == 0) ? 3 : 2; -// printf("bat %d upper = %08x privbit %d\n", batnum, upper, privbit); - // is this pair valid? if (lower & 0x40) { @@ -1639,6 +1643,29 @@ void ppc_device::ppccom_execute_mfspr() } } + /* handle 601 specific SPRs (POWER holdovers) */ + if (m_flavor == PPC_MODEL_601) + { + switch (m_core->param0) + { + case SPR601_PWRDEC: + m_core->param1 = get_decrementer(); + return; + + case SPR601_RTCUR_PWR: + m_core->param1 = (total_cycles() - m_rtc_zero_cycles) / clock(); + return; + + case SPR601_RTCLR_PWR: + { + const uint64_t remainder = (total_cycles() - m_rtc_zero_cycles) % clock(); + const double seconds = remainder / clock(); // get fractional seconds + m_core->param1 = (uint64_t)(seconds * 1'000'000'000); // and convert to nanoseconds + } + return; + } + } + /* handle 602 SPRs */ if (m_flavor == PPC_MODEL_602) { // TODO: Which are read/write only? @@ -1782,6 +1809,21 @@ void ppc_device::ppccom_execute_mtspr() } } + /* handle 601 specific POWER-holdover SPRs */ + if (m_flavor == PPC_MODEL_601) + { + switch (m_core->param0) + { + case SPR601_MQ: + m_core->spr[m_core->param0] = m_core->param1; + return; + + case SPR601_RTCUW_PWR: + m_rtc_zero_cycles = total_cycles(); + break; + } + } + /* handle 602 SPRs */ if (m_flavor == PPC_MODEL_602) { diff --git a/src/devices/cpu/powerpc/ppccom.h b/src/devices/cpu/powerpc/ppccom.h index 00852c48b571c..da12935a5ccb2 100644 --- a/src/devices/cpu/powerpc/ppccom.h +++ b/src/devices/cpu/powerpc/ppccom.h @@ -65,6 +65,7 @@ #define PPCCAP_601BAT 0x80 /* TRUE if we're doing 601-style BATs (unified I/D, different bit layout) */ #define PPCCAP_604_MMU 0x100 /* TRUE if we have 604-class MMU features */ #define PPCCAP_750_TLB 0x200 /* TRUE if we have the extended 740/750 series TLB */ +#define PPCCAP_LEGACY_POWER 0x400 /* TRUE if we support the legacy POWER instructions */ /* exception types */ enum @@ -171,6 +172,14 @@ enum SPR4XX_PBL2 = 0x3fe, /* R/W 403GA 406GA Protection Bound Lower 2 */ SPR4XX_PBU2 = 0x3ff, /* R/W 403GA 406GA Protection Bound Upper 2 */ + /* PowerPC 601 POWER back compatibility SPR indexes */ + SPR601_MQ = 0x000, /* R/W Muliplicand/Quotient for 601 POWER instructions */ + SPR601_RTCUR_PWR = 0x004, /* R Counts up number set in SPR 20 once per second, POWER only */ + SPR601_RTCLR_PWR = 0x005, /* R Number of nanoseconds between the seconds counted in SPR 4 */ + SPR601_PWRDEC = 0x006, /* R Decrementer register mirror for POWER compatibilty */ + SPR601_RTCUW_PWR = 0x014, /* W Seconds counter, set here and read SPR 4 */ + SPR601_RTCLW_PWR = 0x015, /* W Nanoseconds counter, not clear what writing here does */ + /* PowerPC 602 SPR register indexes */ SPR602_TCR = 0x3d8, /* 602 */ SPR602_IBR = 0x3da, /* 602 */ @@ -198,7 +207,6 @@ enum SPR603_HID2 = 0x3f3 /* R/W 603 */ }; - /* PowerPC 4XX DCR register indexes */ enum { diff --git a/src/devices/cpu/powerpc/ppcdrc.cpp b/src/devices/cpu/powerpc/ppcdrc.cpp index 64d19498d12c5..06da83445921c 100644 --- a/src/devices/cpu/powerpc/ppcdrc.cpp +++ b/src/devices/cpu/powerpc/ppcdrc.cpp @@ -2,7 +2,7 @@ // copyright-holders:Aaron Giles /*************************************************************************** - ppcdrc.c + ppcdrc.cpp Universal machine language-based PowerPC emulator. @@ -1746,12 +1746,12 @@ void ppc_device::generate_sequence_instruction(drcuml_block &block, compiler_sta UML_EXH(block, *m_tlb_mismatch, 0); // exh tlb_mismatch,0 } - /* validate our TLB entry at this PC; if we fail, we need to handle it */ - if ((desc->flags & OPFLAG_VALIDATE_TLB) && (m_core->mode & MODE_DATA_TRANSLATION)) + // validate our TLB entry at this PC; if we fail, we need to handle it + // TODO: this code is highly sus based on the PPC architecture manual, but I'll only disable for 601 for now + if ((desc->flags & OPFLAG_VALIDATE_TLB) && (m_core->mode & MODE_DATA_TRANSLATION) && !(m_cap & PPCCAP_601BAT)) { const vtlb_entry *tlbtable = vtlb_table(); - /* if we currently have a valid TLB read entry, we just verify */ if (tlbtable[desc->pc >> 12] != 0) { if (PRINTF_MMU) @@ -2024,6 +2024,23 @@ bool ppc_device::generate_opcode(drcuml_block &block, compiler_state *compiler, // muls rd,rd,ra,simm return true; + case 0x9: /* DOZI (POWER) */ + assert(m_cap & PPCCAP_LEGACY_POWER); + + UML_AND(block, I0, op, 0xffff); + UML_CMP(block, R32(G_RA(op)), I0); // cmp ra, I0 + UML_JMPc(block, COND_B, compiler->labelnum); // bae 0: + + UML_XOR(block, R32(G_RD(op)), R32(G_RD(op)), R32(G_RD(op))); // xor rd, rd, rd (rd = 0) + UML_JMP(block, compiler->labelnum + 1); // jmp 1: + + UML_LABEL(block, compiler->labelnum++); // 0: + UML_ADD(block, R32(G_RD(op)), R32(G_RA(op)), I0); + UML_ADD(block, R32(G_RD(op)), R32(G_RD(op)), 0x1); + + UML_LABEL(block, compiler->labelnum++); // 1: + return true; + case 0x0e: /* ADDI */ UML_ADD(block, R32(G_RD(op)), R32Z(G_RA(op)), (int16_t)G_SIMM(op)); // add rd,ra,simm return true; @@ -2687,6 +2704,13 @@ bool ppc_device::generate_instruction_1f(drcuml_block &block, compiler_state *co generate_compute_flags(block, desc, op & M_RC, ((op & M_OE) ? XER_OV : 0), false);// return true; + case 0x6b: /* MUL (POWER) */ + assert(m_cap & PPCCAP_LEGACY_POWER); + + UML_MULU(block, SPR32(SPR601_MQ), R32(G_RD(op)), R32(G_RA(op)), R32(G_RB(op))); // mulu mq, rd, ra, rb + generate_compute_flags(block, desc, op & M_RC, ((op & M_OE) ? XER_OV | XER_SO : 0), false); // + return true; + case 0x1cb: /* DIVWUx */ case 0x3cb: /* DIVWUOx */ UML_CMP(block, R32(G_RB(op)), 0x0); // cmp rb, #0 @@ -2714,6 +2738,63 @@ bool ppc_device::generate_instruction_1f(drcuml_block &block, compiler_state *co UML_LABEL(block, compiler->labelnum++); // 1: return true; + case 0x14b: /* DIV (POWER) */ + assert(m_cap & PPCCAP_LEGACY_POWER); + + UML_SHL(block, I0, R32(G_RB(op)), 32); // I0 = RA << 32 + UML_OR(block, I0, I0, SPR32(SPR601_MQ)); // I0 |= MQ + UML_CMP(block, I0, 0x0); // cmp I0, #0 + UML_JMPc(block, COND_NZ, compiler->labelnum); // bne 0: + + UML_MOV(block, R32(G_RD(op)), 0x0); // mov rd, #0 + if (op & M_OE) + { + UML_OR(block, XERSO32, XERSO32, 0x1); // SO |= 1 + UML_OR(block, SPR32(SPR_XER), SPR32(SPR_XER), XER_OV); // OV |= 1 + } + if (op & M_RC) + { + UML_MOV(block, CR32(0), 0x2); // CR = EQ + UML_AND(block, CR32(0), CR32(0), ~0x1); + UML_OR(block, CR32(0), CR32(0), XERSO32); + } + + UML_JMP(block, compiler->labelnum + 1); // jmp 1: + + UML_LABEL(block, compiler->labelnum++); // 0: + UML_DIVS(block, R32(G_RD(op)), SPR32(SPR601_MQ), I0, R32(G_RB(op))); // divs rd,mq,I0,rb + generate_compute_flags(block, desc, op & M_RC, ((op & M_OE) ? XER_OV | XER_SO : 0), false); // + UML_LABEL(block, compiler->labelnum++); // 1: + return true; + + case 0x16b: /* DIVS (POWER) */ + assert(m_cap & PPCCAP_LEGACY_POWER); + + UML_CMP(block, R32(G_RB(op)), 0x0); // cmp rb, #0 + UML_JMPc(block, COND_NZ, compiler->labelnum); // bne 0: + + UML_MOV(block, R32(G_RD(op)), 0x0); // mov rd, #0 + if (op & M_OE) + { + UML_OR(block, XERSO32, XERSO32, 0x1); // SO |= 1 + UML_OR(block, SPR32(SPR_XER), SPR32(SPR_XER), XER_OV); // OV |= 1 + } + if (op & M_RC) + { + UML_MOV(block, CR32(0), 0x2); // CR = EQ + UML_AND(block, CR32(0), CR32(0), ~0x1); + UML_OR(block, CR32(0), CR32(0), XERSO32); + } + + UML_JMP(block, compiler->labelnum + 1); // jmp 1: + + UML_LABEL(block, compiler->labelnum++); // 0: + UML_DIVS(block, R32(G_RD(op)), SPR32(SPR601_MQ), R32(G_RA(op)), R32(G_RB(op))); // divs rd,mq,ra,rb + generate_compute_flags(block, desc, op & M_RC, ((op & M_OE) ? XER_OV : 0), false); // + + UML_LABEL(block, compiler->labelnum++); // 1: + return true; + case 0x1eb: /* DIVWx */ case 0x3eb: /* DIVWOx */ UML_CMP(block, R32(G_RB(op)), 0x0); // cmp rb, #0 @@ -2767,6 +2848,78 @@ bool ppc_device::generate_instruction_1f(drcuml_block &block, compiler_state *co UML_LABEL(block, compiler->labelnum++); // 3: return true; + case 0x108: /* DOZ (POWER) */ + assert(m_cap & PPCCAP_LEGACY_POWER); + + UML_CMP(block, R32(G_RA(op)), R32(G_RB(op))); // cmp ra, rb + UML_JMPc(block, COND_B, compiler->labelnum); // bae 0: + + UML_XOR(block, R32(G_RD(op)), R32(G_RD(op)), R32(G_RD(op))); // xor rd, rd, rd (rd = 0) + UML_JMP(block, compiler->labelnum+1); // jmp 1: + + UML_LABEL(block, compiler->labelnum++); // 0: + UML_ADD(block, R32(G_RD(op)), R32(G_RA(op)), R32(G_RB(op))); + UML_ADD(block, R32(G_RD(op)), R32(G_RD(op)), 0x1); + + UML_LABEL(block, compiler->labelnum++); // 1: + if (op & M_OE) + { + UML_OR(block, XERSO32, XERSO32, 0x1); // SO |= 1 + UML_OR(block, SPR32(SPR_XER), SPR32(SPR_XER), XER_OV); // OV |= 1 + } + if (op & M_RC) + { + UML_TEST(block, R32(G_RD(op)), ~0); // test rd,~0 + generate_compute_flags(block, desc, op & M_RC, 0, false); // + } + return true; + + case 0x168: /* ABS (POWER) */ + case 0x1e8: /* NABS (POWER) */ + assert(m_cap & PPCCAP_LEGACY_POWER); + + // is rA already the correct sign (positive for ABS, negative for NABS)? + UML_CMP(block, R32(G_RA(op)), 0); + if (op & 0x080) + { + UML_JMPc(block, COND_L, compiler->labelnum); // bl 0: + } + else + { + UML_JMPc(block, COND_GE, compiler->labelnum); // bge 0: + } + + UML_SUB(block, I0, 0, R32(G_RA(op))); // sub 0, ra (make positive) + UML_JMP(block, compiler->labelnum + 1); // jmp 1: + + UML_LABEL(block, compiler->labelnum++); // 0: + UML_MOV(block, I0, R32(G_RA(op))); + + UML_LABEL(block, compiler->labelnum++); // 1: + UML_MOV(block, R32(G_RD(op)), I0); // mov rd, I0 + if (op & M_RC) + { + UML_GETFLGS(block, I0, FLAG_Z | FLAG_V | FLAG_C | FLAG_S); // getflgs i0,zvcs + UML_LOAD(block, I0, m_cmp_cr_table, I0, SIZE_DWORD, SCALE_x4); // load i0,cmp_cr_table,i0,dword + } + if (op & M_OE) + { + UML_OR(block, CR32(G_CRFD(op)), I0, XERSO32); // or [crn],i0,[xerso] + } + return true; + + case 0x21d: /* MASKIR (POWER) */ + UML_AND(block, I0, R32(G_RS(op)), R32(G_RB(op))); // and i0, rs, rb + UML_XOR(block, I1, R32(G_RB(op)), 0xffffffff); // xor i1, rb, 0xffffffff + UML_AND(block, I1, I1, R32(G_RA(op))); // and i1, i1, ra + UML_OR(block, R32(G_RA(op)), I0, I1); // or ra, i0, i1 + if (op & M_RC) + { + UML_GETFLGS(block, R32(G_RA(op)), FLAG_Z | FLAG_V | FLAG_C | FLAG_S); // getflgs i0,zvcs + UML_LOAD(block, I0, m_cmp_cr_table, I0, SIZE_DWORD, SCALE_x4); // load i0,cmp_cr_table,i0,dword + } + return true; + case 0x01c: /* ANDx */ UML_AND(block, R32(G_RA(op)), R32(G_RS(op)), R32(G_RB(op))); // and ra,rs,rb generate_compute_flags(block, desc, op & M_RC, 0, false); // diff --git a/src/devices/cpu/powerpc/ppcfe.cpp b/src/devices/cpu/powerpc/ppcfe.cpp index 57ec36cd317fe..1e8fb105ee1c3 100644 --- a/src/devices/cpu/powerpc/ppcfe.cpp +++ b/src/devices/cpu/powerpc/ppcfe.cpp @@ -119,6 +119,16 @@ bool ppc_device::frontend::describe(opcode_desc &desc, const opcode_desc *prev) desc.cycles = 2; // ??? return true; + case 0x09: // DOZI (POWER) + if (!(m_ppc.m_cap & PPCCAP_LEGACY_POWER)) + { + return false; + } + + GPR_USED_OR_ZERO(desc, G_RA(op)); + GPR_MODIFIED(desc, G_RD(op)); + return true; + case 0x0e: // ADDI case 0x0f: // ADDIS GPR_USED_OR_ZERO(desc, G_RA(op)); @@ -1156,6 +1166,81 @@ bool ppc_device::frontend::describe_1f(uint32_t op, opcode_desc &desc, const opc return false; desc.flags |= OPFLAG_CAN_CHANGE_MODES | OPFLAG_CAN_CAUSE_EXCEPTION | OPFLAG_END_SEQUENCE; return true; + + case 0x14b: // DIV (POWER) + case 0x16b: // DIVS (POWER) + if (!(m_ppc.m_cap & PPCCAP_LEGACY_POWER)) + { + return false; + } + + GPR_USED(desc, G_RA(op)); + GPR_USED(desc, G_RB(op)); + GPR_MODIFIED(desc, G_RD(op)); + XER_OV_MODIFIED(desc); + XER_SO_MODIFIED(desc); + if (op & M_RC) + CR_MODIFIED(desc, 0); + return true; + + case 0x6b: // MUL (POWER) + if (!(m_ppc.m_cap & PPCCAP_LEGACY_POWER)) + { + return false; + } + + GPR_USED(desc, G_RA(op)); + GPR_USED(desc, G_RB(op)); + GPR_MODIFIED(desc, G_RD(op)); + XER_OV_MODIFIED(desc); + XER_SO_MODIFIED(desc); + if (op & M_RC) + CR_MODIFIED(desc, 0); + return true; + + case 0x108: // DOZ (POWER) + if (!(m_ppc.m_cap & PPCCAP_LEGACY_POWER)) + { + return false; + } + + GPR_USED(desc, G_RA(op)); + GPR_USED(desc, G_RB(op)); + GPR_MODIFIED(desc, G_RD(op)); + XER_OV_MODIFIED(desc); + XER_SO_MODIFIED(desc); + if (op & M_RC) + CR_MODIFIED(desc, 0); + return true; + + case 0x168: // ABS (POWER) + case 0x1e8: // NABS (POWER) + if (!(m_ppc.m_cap & PPCCAP_LEGACY_POWER)) + { + return false; + } + + GPR_USED(desc, G_RA(op)); + GPR_USED(desc, G_RB(op)); + GPR_MODIFIED(desc, G_RD(op)); + XER_OV_MODIFIED(desc); + XER_SO_MODIFIED(desc); + if (op & M_RC) + CR_MODIFIED(desc, 0); + return true; + + case 0x21d: // MASKIR (POWER) + if (!(m_ppc.m_cap & PPCCAP_LEGACY_POWER)) + { + return false; + } + + GPR_USED(desc, G_RS(op)); + GPR_USED(desc, G_RB(op)); + GPR_MODIFIED(desc, G_RA(op)); + if (op & M_RC) + CR_MODIFIED(desc, 0); + return true; } return false; diff --git a/src/devices/cpu/tms57002/tms57002.cpp b/src/devices/cpu/tms57002/tms57002.cpp index 4adeed1cf8545..593a74e3263eb 100644 --- a/src/devices/cpu/tms57002/tms57002.cpp +++ b/src/devices/cpu/tms57002/tms57002.cpp @@ -925,7 +925,7 @@ void tms57002_device::sound_stream_update(sound_stream &stream, std::vector> 8) & 1; + return ((screen().vpos() - m_vc) >> 8) & 1; case 0x0f: - return (screen().vpos()-m_vc) & 0xff; + return (screen().vpos() - m_vc) & 0xff; default: //popmessage("Warning: k053252 read %02x, contact MAMEdev",offset); break; diff --git a/src/devices/machine/k053252.h b/src/devices/machine/k053252.h index 83e27f1c1bec6..b4dd740215cbc 100644 --- a/src/devices/machine/k053252.h +++ b/src/devices/machine/k053252.h @@ -35,7 +35,7 @@ class k053252_device : public device_t, public device_video_interface virtual void device_clock_changed() override { reset_internal_state(); } void reset_internal_state(); - private: +private: // internal state uint8_t m_regs[16]; uint16_t m_hc,m_hfp,m_hbp; diff --git a/src/devices/machine/mm74c922.cpp b/src/devices/machine/mm74c922.cpp index edcf4093e2058..ee44fb38f873c 100644 --- a/src/devices/machine/mm74c922.cpp +++ b/src/devices/machine/mm74c922.cpp @@ -23,7 +23,6 @@ DEFINE_DEVICE_TYPE(MM74C923, mm74c923_device, "mm74c923", "MM74C923 20-Key Encod - //************************************************************************** // LIVE DEVICE //************************************************************************** @@ -111,6 +110,13 @@ uint8_t mm74c922_device::read() void mm74c922_device::change_output_lines() { + // clock data latches + if (m_next_data != m_data) + { + m_data = m_next_data; + } + + // clock data available if (m_next_da != m_da) { m_da = m_next_da; @@ -120,12 +126,6 @@ void mm74c922_device::change_output_lines() // active high output m_write_da(m_da ? 1 : 0); } - - // clock data latches - if (m_next_data != m_data) - { - m_data = m_next_data; - } } diff --git a/src/devices/machine/ncr53c90.cpp b/src/devices/machine/ncr53c90.cpp index 73ebf10ab27af..ff28397fe7c62 100644 --- a/src/devices/machine/ncr53c90.cpp +++ b/src/devices/machine/ncr53c90.cpp @@ -196,7 +196,7 @@ ncr53c96_device::ncr53c96_device(const machine_config &mconfig, const char *tag, ncr53cf94_device::ncr53cf94_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : ncr53c94_device(mconfig, type, tag, owner, clock) , config4(0) - , family_id(0x02) + , family_id(0x04) , revision_level(0x02) { } @@ -329,6 +329,7 @@ void ncr53c90_device::step(bool timeout) reset_disconnect(); if (!(config & 0x40)) { + LOG("SCSI reset interrupt\n"); istatus |= I_SCSI_RESET; check_irq(); } @@ -802,9 +803,7 @@ void ncr53c90_device::bus_complete() void ncr53c90_device::delay(int cycles) { - if(!clock_conv) - return; - cycles *= clock_conv; + cycles *= clock_conv ? clock_conv : 8; tm->adjust(clocks_to_attotime(cycles)); } @@ -918,6 +917,15 @@ void ncr53c90_device::command_pop_and_chain() } } +void ncr53c90_device::load_tcounter() +{ + LOGMASKED(LOG_COMMAND, "DMA command: tcounter reloaded to %d\n", tcount & tcounter_mask); + tcounter = tcount & tcounter_mask; + + // clear transfer count zero flag when counter is reloaded + status &= ~S_TC0; +} + void ncr53c90_device::start_command() { uint8_t c = command[0] & 0x7f; @@ -932,11 +940,7 @@ void ncr53c90_device::start_command() dma_command = command[0] & 0x80; if (dma_command) { - LOGMASKED(LOG_COMMAND, "DMA command: tcounter reloaded to %d\n", tcount); - tcounter = tcount; - - // clear transfer count zero flag when counter is reloaded - status &= ~S_TC0; + load_tcounter(); } else { @@ -1417,6 +1421,15 @@ void ncr53cf94_device::device_reset() ncr53c94_device::device_reset(); } +void ncr53cf94_device::load_tcounter() +{ + ncr53c94_device::load_tcounter(); + + // ID may be read by executing DMA NOP command twice, first with the features bit clear and then with it set + if ((config2 & S2FE) == 0) + tcount = (1 << 23) | (family_id << 19) | (revision_level << 16) | (tcount & 0xffff); +} + void ncr53cf94_device::conf2_w(uint8_t data) { tcounter_mask = (data & S2FE) ? 0xffffff : 0xffff; @@ -1425,10 +1438,6 @@ void ncr53cf94_device::conf2_w(uint8_t data) uint8_t ncr53cf94_device::tcounter_hi2_r() { - // tcounter is 24-bit when the features bit is set, otherwise it returns the ID - if ((config2 & S2FE) == 0) - return (1 << 7) | (family_id << 3) | revision_level; - LOG("tcounter_hi2_r %02x (%s)\n", (tcounter >> 16) & 0xff, machine().describe_context()); return tcounter >> 16; } diff --git a/src/devices/machine/ncr53c90.h b/src/devices/machine/ncr53c90.h index 1f17b14e7adc8..7c7ad3d089609 100644 --- a/src/devices/machine/ncr53c90.h +++ b/src/devices/machine/ncr53c90.h @@ -232,6 +232,7 @@ class ncr53c90_device : public nscsi_device, public nscsi_slot_card_interface void delay_cycles(int cycles); void decrement_tcounter(int count = 1); + virtual void load_tcounter(); devcb_write_line m_irq_handler; devcb_write_line m_drq_handler; @@ -361,6 +362,8 @@ class ncr53cf94_device : public ncr53c94_device virtual void device_start() override ATTR_COLD; virtual void device_reset() override ATTR_COLD; + virtual void load_tcounter() override; + private: u8 config4; u8 family_id; diff --git a/src/devices/machine/z80sio.cpp b/src/devices/machine/z80sio.cpp index 11d2f4e61d03c..f21da3bce2e95 100644 --- a/src/devices/machine/z80sio.cpp +++ b/src/devices/machine/z80sio.cpp @@ -128,6 +128,12 @@ enum : uint8_t enum : uint8_t { RR1_ALL_SENT = 0x01, + // This bit is not actually present in RR1 register + // It's enqueued in the rx error FIFO to mark the spot + // where "interrupt on 1st rx character" should occur. + // It's stripped off before head of error FIFO is dequeued + // into RR1 + RR1_HIDDEN_1ST_MARKER = 0x01, RR1_RESIDUE_CODE_MASK = 0x0e, RR1_PARITY_ERROR = 0x10, RR1_RX_OVERRUN_ERROR = 0x20, @@ -173,7 +179,7 @@ enum : uint8_t WR1_RX_INT_ALL_PARITY = 0x10, WR1_RX_INT_ALL = 0x18, WR1_WRDY_ON_RX_TX = 0x20, - WR1_WRDY_FUNCTION = 0x40, // WAIT not supported + WR1_WRDY_FUNCTION = 0x40, WR1_WRDY_ENABLE = 0x80 }; @@ -310,11 +316,31 @@ inline void z80sio_channel::out_dtr_cb(int state) m_uart->m_out_dtr_cb[m_index](state); } -inline void z80sio_channel::set_ready(bool ready) +inline void z80sio_channel::update_wait_ready() { - // WAIT mode not supported yet - if (m_wr1 & WR1_WRDY_FUNCTION) - m_uart->m_out_wrdy_cb[m_index](ready ? 0 : 1); + bool ready = false; + + if (m_wr1 & WR1_WRDY_ENABLE) + { + if (m_wr1 & WR1_WRDY_ON_RX_TX) + { + // Monitor rx + ready = bool(m_rr0 & RR0_RX_CHAR_AVAILABLE); + } + else + { + // Monitor tx + ready = get_tx_empty(); + } + if (!(m_wr1 & WR1_WRDY_FUNCTION)) + { + // Ready function has opposite polarity of wait function + ready = !ready; + } + } + + // ready/wait is active low + m_uart->m_out_wrdy_cb[m_index](ready ? 0 : 1); } inline bool z80sio_channel::receive_allowed() const @@ -658,6 +684,8 @@ void z80sio_device::trigger_interrupt(int index, int type) {{"INT_TRANSMIT", "INT_EXTERNAL", "INT_RECEIVE"}}[type]); // trigger interrupt + if (m_int_state[(index * 3) + type] & Z80_DAISY_INT) + return; m_int_state[(index * 3) + type] |= Z80_DAISY_INT; m_chanA->m_rr0 |= RR0_INTERRUPT_PENDING; @@ -675,6 +703,8 @@ void z80sio_device::clear_interrupt(int index, int type) {{"INT_TRANSMIT", "INT_EXTERNAL", "INT_RECEIVE"}}[type]); // clear interrupt + if (!(m_int_state[(index * 3) + type] & Z80_DAISY_INT)) + return; m_int_state[(index * 3) + type] &= ~Z80_DAISY_INT; if (std::find_if(std::begin(m_int_state), std::end(m_int_state), [] (int state) { return bool(state & Z80_DAISY_INT); }) == std::end(m_int_state)) m_chanA->m_rr0 &= ~RR0_INTERRUPT_PENDING; @@ -733,9 +763,7 @@ uint8_t z80sio_device::read_vector() case 0 + z80sio_channel::INT_EXTERNAL: return vec | 0x0aU; case 0 + z80sio_channel::INT_RECEIVE: - if (((m_chanA->m_wr1 & WR1_RX_INT_MODE_MASK) == WR1_RX_INT_ALL_PARITY) && (m_chanA->m_rr1 & (m_chanA->get_special_rx_mask() | RR1_PARITY_ERROR))) - return vec | 0x0eU; - else if (((m_chanA->m_wr1 & WR1_RX_INT_MODE_MASK) == WR1_RX_INT_ALL) && (m_chanA->m_rr1 & m_chanA->get_special_rx_mask())) + if (m_chanA->m_rr1 & m_chanA->get_special_rx_mask()) return vec | 0x0eU; else return vec | 0x0cU; @@ -744,9 +772,7 @@ uint8_t z80sio_device::read_vector() case 3 + z80sio_channel::INT_EXTERNAL: return vec | 0x02U; case 3 + z80sio_channel::INT_RECEIVE: - if (((m_chanB->m_wr1 & WR1_RX_INT_MODE_MASK) == WR1_RX_INT_ALL_PARITY) && (m_chanB->m_rr1 & (m_chanB->get_special_rx_mask() | RR1_PARITY_ERROR))) - return vec | 0x06U; - else if (((m_chanB->m_wr1 & WR1_RX_INT_MODE_MASK) == WR1_RX_INT_ALL) && (m_chanB->m_rr1 & m_chanB->get_special_rx_mask())) + if (m_chanB->m_rr1 & m_chanB->get_special_rx_mask()) return vec | 0x06U; else return vec | 0x04U; @@ -960,7 +986,7 @@ z80sio_channel::z80sio_channel( } z80sio_channel::z80sio_channel(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : z80sio_channel(mconfig, Z80SIO_CHANNEL, tag, owner, clock, RR1_END_OF_FRAME | RR1_CRC_FRAMING_ERROR | RR1_RESIDUE_CODE_MASK) + : z80sio_channel(mconfig, Z80SIO_CHANNEL, tag, owner, clock, RR1_CRC_FRAMING_ERROR | RR1_RESIDUE_CODE_MASK) { } @@ -1093,7 +1119,7 @@ void z80sio_channel::device_reset() m_tx_count = 0; m_rr0 &= ~RR0_RX_CHAR_AVAILABLE; m_rr0 |= RR0_SYNC_HUNT; - m_rr1 &= ~(RR1_PARITY_ERROR | RR1_RX_OVERRUN_ERROR | RR1_CRC_FRAMING_ERROR); + m_rr1 &= ~(RR1_PARITY_ERROR | RR1_RX_OVERRUN_ERROR | RR1_CRC_FRAMING_ERROR | RR1_END_OF_FRAME); // disable receiver m_wr3 &= ~WR3_RX_ENABLE; @@ -1111,7 +1137,9 @@ void z80sio_channel::device_reset() out_txd_cb(1); m_tx_sr = ~0; - // TODO: what happens to WAIT/READY? + // Disable wait & ready + m_wr1 &= ~WR1_WRDY_ENABLE; + update_wait_ready(); // reset external lines out_rts_cb(m_rts = 1); @@ -1159,8 +1187,7 @@ void z80sio_channel::transmit_enable() LOGTX("Channel %c synchronous transmit enabled - load sync pattern\n", 'A' + m_index); tx_setup_idle(); m_tx_forced_sync = false; - if ((m_wr1 & WR1_WRDY_ENABLE) && !(m_wr1 & WR1_WRDY_ON_RX_TX)) - set_ready(true); + update_wait_ready(); } else if (!(m_rr0 & RR0_TX_BUFFER_EMPTY)) async_tx_setup(); @@ -1294,19 +1321,13 @@ void z80sio_channel::set_tx_empty(bool prev_state, bool new_state) else m_rr0 &= ~RR0_TX_BUFFER_EMPTY; + update_wait_ready(); + bool curr_tx_empty = get_tx_empty(); - if (!prev_state && curr_tx_empty) + if (!prev_state && curr_tx_empty && (m_wr1 & WR1_TX_INT_ENABLE)) { - if ((m_wr1 & WR1_WRDY_ENABLE) && !(m_wr1 & WR1_WRDY_ON_RX_TX)) - set_ready(true); - if (m_wr1 & WR1_TX_INT_ENABLE) - m_uart->trigger_interrupt(m_index, INT_TRANSMIT); - } - else if (prev_state && !curr_tx_empty) - { - if ((m_wr1 & WR1_WRDY_ENABLE) && !(m_wr1 & WR1_WRDY_ON_RX_TX)) - set_ready(false); + m_uart->trigger_interrupt(m_index, INT_TRANSMIT); } } @@ -1657,7 +1678,7 @@ void z80sio_channel::do_sioreg_wr0(uint8_t data) case WR0_ERROR_RESET: // error reset LOGCMD("%s Ch:%c : Error Reset\n", FUNCNAME, 'A' + m_index); - if ((WR1_RX_INT_FIRST == (m_wr1 & WR1_RX_INT_MODE_MASK)) && (m_rr1 & (RR1_CRC_FRAMING_ERROR | RR1_RX_OVERRUN_ERROR))) + if ((WR1_RX_INT_FIRST == (m_wr1 & WR1_RX_INT_MODE_MASK)) && (m_rr1 & (RR1_CRC_FRAMING_ERROR | RR1_RX_OVERRUN_ERROR | RR1_END_OF_FRAME))) { // clearing framing and overrun errors advances the FIFO // TODO: Intel 8274 manual doesn't mention this behaviour - is it specific to Z80 SIO? @@ -1667,6 +1688,7 @@ void z80sio_channel::do_sioreg_wr0(uint8_t data) else { m_rr1 &= ~(RR1_END_OF_FRAME | RR1_CRC_FRAMING_ERROR | RR1_RX_OVERRUN_ERROR | RR1_PARITY_ERROR); + update_rx_int(); } break; case WR0_RETURN_FROM_INT: @@ -1695,12 +1717,7 @@ void z80sio_channel::do_sioreg_wr1(uint8_t data) LOGSETUP(" - Receiver Interrupt %s\n", std::array {{"Disabled", "on First Character", "on All Characters, Parity Affects Vector", "on All Characters"}}[(m_wr2 >> 3) & 0x03]); - if (!(data & WR1_WRDY_ENABLE)) - set_ready(false); - else if (data & WR1_WRDY_ON_RX_TX) - set_ready(bool(m_rr0 & RR0_RX_CHAR_AVAILABLE)); - else - set_ready(m_rr0 & RR0_TX_BUFFER_EMPTY); + update_wait_ready(); } void z80sio_channel::do_sioreg_wr2(uint8_t data) @@ -1891,37 +1908,59 @@ void z80sio_channel::advance_rx_fifo() m_rx_error_fifo >>= 8; // load error status from the FIFO - m_rr1 = (m_rr1 & ~m_rr1_auto_reset) | uint8_t(m_rx_error_fifo & 0x000000ffU); - - // if we're in interrupt-on-first mode, clear interrupt if there's no pending error condition - if ((m_wr1 & WR1_RX_INT_MODE_MASK) == WR1_RX_INT_FIRST) - { - for (int i = 0; m_rx_fifo_depth > i; ++i) - { - if (uint8_t(m_rx_error_fifo >> (i * 8)) & (RR1_CRC_FRAMING_ERROR | RR1_RX_OVERRUN_ERROR)) - return; - } - m_uart->clear_interrupt(m_index, INT_RECEIVE); - } + m_rr1 = (m_rr1 & ~m_rr1_auto_reset) | uint8_t(m_rx_error_fifo & 0x000000ffU & ~RR1_HIDDEN_1ST_MARKER); } else { // no more characters available in the FIFO m_rr0 &= ~RR0_RX_CHAR_AVAILABLE; - if ((m_wr1 & WR1_WRDY_ENABLE) && (m_wr1 & WR1_WRDY_ON_RX_TX)) - set_ready(false); - m_uart->clear_interrupt(m_index, INT_RECEIVE); + update_wait_ready(); } } + update_rx_int(); } uint8_t z80sio_channel::get_special_rx_mask() const { - return ((m_wr4 & WR4_STOP_BITS_MASK) == WR4_STOP_BITS_SYNC) ? - (RR1_RX_OVERRUN_ERROR | RR1_END_OF_FRAME) : - (RR1_RX_OVERRUN_ERROR | RR1_CRC_FRAMING_ERROR); + if ((m_wr1 & WR1_RX_INT_MODE_MASK) == WR1_RX_INT_DISABLE) + { + return 0; + } + else + { + uint8_t mask = ((m_wr4 & WR4_STOP_BITS_MASK) == WR4_STOP_BITS_SYNC) ? + (RR1_RX_OVERRUN_ERROR | RR1_END_OF_FRAME) : + (RR1_RX_OVERRUN_ERROR | RR1_CRC_FRAMING_ERROR); + if ((m_wr1 & WR1_RX_INT_MODE_MASK) == WR1_RX_INT_ALL_PARITY) + mask |= RR1_PARITY_ERROR; + return mask; + } } +void z80sio_channel::update_rx_int() +{ + bool state = false; + + auto rx_int_mode = m_wr1 & WR1_RX_INT_MODE_MASK; + if (rx_int_mode != WR1_RX_INT_DISABLE) + { + if (m_rr1 & get_special_rx_mask()) + state = true; + else if (m_rx_fifo_depth) + { + // FIFO not empty + if (rx_int_mode != WR1_RX_INT_FIRST) + state = true; + else if (m_rx_error_fifo & RR1_HIDDEN_1ST_MARKER) + state = true; + } + } + LOGINT("rx %d wr1 %02x rr1 %02x fd %u ref %06x\n", state, m_wr1, m_rr1, m_rx_fifo_depth, m_rx_error_fifo); + if (state) + m_uart->trigger_interrupt(m_index, INT_RECEIVE); + else + m_uart->clear_interrupt(m_index, INT_RECEIVE); +} //------------------------------------------------- // receive_enabled - conditions have changed @@ -2209,7 +2248,13 @@ void z80sio_channel::sdlc_receive() data |= ~((1U << m_rx_bit_limit) - 1); LOGRCV("SDLC rx data=%02x (%d bits)\n" , data , m_rx_bit_limit); queue_received(data , 0); - m_rx_sync_fsm = SYNC_FSM_IN_FRAME; + if (m_rx_sync_fsm == SYNC_FSM_1ST_CHAR) + { + // reception of 1st char clears END-OF-FRAME + m_rr1 &= ~RR1_END_OF_FRAME; + update_rx_int(); + m_rx_sync_fsm = SYNC_FSM_IN_FRAME; + } } } } @@ -2240,6 +2285,13 @@ void z80sio_channel::receive_data() void z80sio_channel::queue_received(uint16_t data, uint32_t error) { + if ((m_wr1 & WR1_RX_INT_MODE_MASK) == WR1_RX_INT_FIRST && m_rx_first) + { + // insert a hidden marker for 1st received character + error |= RR1_HIDDEN_1ST_MARKER; + m_rx_first = false; + } + if (3 == m_rx_fifo_depth) { LOG(" Receive FIFO overrun detected\n"); @@ -2257,31 +2309,15 @@ void z80sio_channel::queue_received(uint16_t data, uint32_t error) m_rx_data_fifo |= uint32_t(data & 0x00ffU) << (8 * m_rx_fifo_depth); m_rx_error_fifo |= error << (8 * m_rx_fifo_depth); if (!m_rx_fifo_depth) - m_rr1 = (m_rr1 & ~m_rr1_auto_reset) | uint8_t(error); + m_rr1 = (m_rr1 & ~m_rr1_auto_reset) | uint8_t(error & ~RR1_HIDDEN_1ST_MARKER); ++m_rx_fifo_depth; } m_rr0 |= RR0_RX_CHAR_AVAILABLE; - if ((m_wr1 & WR1_WRDY_ENABLE) && (m_wr1 & WR1_WRDY_ON_RX_TX)) - set_ready(true); + update_wait_ready(); // receive interrupt - switch (m_wr1 & WR1_RX_INT_MODE_MASK) - { - case WR1_RX_INT_FIRST: - if (m_rx_first || (error & get_special_rx_mask())) - m_uart->trigger_interrupt(m_index, INT_RECEIVE); - m_rx_first = false; - break; - - case WR1_RX_INT_ALL_PARITY: - case WR1_RX_INT_ALL: - m_uart->trigger_interrupt(m_index, INT_RECEIVE); - break; - - default: - LOG("No receive interrupt triggered\n"); - } + update_rx_int(); } @@ -2515,8 +2551,8 @@ void z80sio_channel::txc_w(int state) // Generate a new bit bool new_bit = false; if ((m_wr4 & (WR4_SYNC_MODE_MASK | WR4_STOP_BITS_MASK)) == (WR4_SYNC_MODE_SDLC | WR4_STOP_BITS_SYNC) && - !(m_tx_flags & TX_FLAG_FRAMING) && (m_tx_hist & 0x1f) == 0x1f) - // SDLC, not sending framing & 5 ones in a row: do zero insertion + (m_tx_flags & (TX_FLAG_DATA_TX | TX_FLAG_CRC_TX)) && (m_tx_hist & 0x1f) == 0x1f) + // SDLC, sending data/CRC & 5 ones in a row: do zero insertion new_bit = false; else { @@ -2605,10 +2641,10 @@ void z80sio_channel::txc_w(int state) else m_all_sent_delay = 0; } - if (m_tx_flags & TX_FLAG_FRAMING) - m_tx_hist = 0; - else + if (m_tx_flags & (TX_FLAG_DATA_TX | TX_FLAG_CRC_TX)) m_tx_hist = (m_tx_hist << 1) | new_bit; + else + m_tx_hist = 0; // Insert new bit in delay register m_tx_delay = (m_tx_delay & ~1U) | new_bit; } diff --git a/src/devices/machine/z80sio.h b/src/devices/machine/z80sio.h index 2e15ccf2ba9e7..193a21653788d 100644 --- a/src/devices/machine/z80sio.h +++ b/src/devices/machine/z80sio.h @@ -359,7 +359,7 @@ class z80sio_channel : public device_t void out_txd_cb(int state); void out_rts_cb(int state); void out_dtr_cb(int state); - void set_ready(bool ready); + void update_wait_ready(); bool receive_allowed() const; virtual bool transmit_allowed() const; @@ -371,6 +371,7 @@ class z80sio_channel : public device_t void queue_received(uint16_t data, uint32_t error); void advance_rx_fifo(); uint8_t get_special_rx_mask() const; + void update_rx_int(); bool is_tx_idle() const; void transmit_enable(); diff --git a/src/devices/sound/dac76.h b/src/devices/sound/dac76.h index 9444b726446c9..a59901a10dc11 100644 --- a/src/devices/sound/dac76.h +++ b/src/devices/sound/dac76.h @@ -6,16 +6,19 @@ Companding D/A Converter + Equivalent to the AM6070, which is an "improved pin-for-pin replacement for + DAC-76" (according to the AM6070 datasheet). + ___ ___ - E/D 1 |* u | 10 VLC - SB 2 | | 11 VR+ - B1 3 | | 12 VR- - B2 4 | | 13 V- + E/D 1 |* u | 18 V+ + SB 2 | | 17 IOD- + B1 3 | | 16 IOD+ + B2 4 | | 15 IOE- B3 5 | | 14 IOE+ - B4 6 | | 15 IOE- - B5 7 | | 16 IOD+ - B6 8 | | 17 IOD- - B7 9 |_______| 18 V+ + B4 6 | | 13 V- + B5 7 | | 12 VR- + B6 8 | | 11 VR+ + B7 9 |_______| 10 VLC ***************************************************************************/ diff --git a/src/devices/sound/hc55516.cpp b/src/devices/sound/hc55516.cpp index 90d9a38d2a652..ef4cbcd922c35 100644 --- a/src/devices/sound/hc55516.cpp +++ b/src/devices/sound/hc55516.cpp @@ -15,14 +15,15 @@ and removal of the encoder offset compensation DAC?) - /src/mame/exidy/exidy440_a.cpp has its own internal implementation of the MC3417 and MC3418, it should be using this file instead + - MC3417 interpolation slope being determined by the number of samples in + the current stream slice doesn't make sense *****************************************************************************/ #include "emu.h" #include "hc55516.h" - -/* fixed samplerate of 192khz */ +// fixed samplerate of 192khz #define SAMPLE_RATE (48000 * 4) #define INTEGRATOR_LEAK_TC 0.001 @@ -47,8 +48,6 @@ cvsd_device_base::cvsd_device_base(const machine_config &mconfig, device_type ty , m_last_clock_state(false) , m_buffered_bit(false) , m_shiftreg(0) - , m_curr_sample(0) - , m_next_sample(0) , m_samples_generated(0) { } @@ -59,14 +58,12 @@ cvsd_device_base::cvsd_device_base(const machine_config &mconfig, device_type ty void cvsd_device_base::device_start() { - /* create the stream */ + // create the stream m_stream = stream_alloc(0, 1, SAMPLE_RATE); save_item(NAME(m_last_clock_state)); save_item(NAME(m_buffered_bit)); save_item(NAME(m_shiftreg)); - save_item(NAME(m_curr_sample)); - save_item(NAME(m_next_sample)); save_item(NAME(m_samples_generated)); } @@ -92,7 +89,7 @@ int cvsd_device_base::clock_r() { // prevent debugger from changing the internal state if (!machine().side_effects_disabled()) - m_stream->update(); /* bring up to date first */ + m_stream->update(); // bring up to date first return clock_state_r(); } @@ -131,14 +128,12 @@ inline bool cvsd_device_base::is_external_oscillator() inline bool cvsd_device_base::is_clock_changed(bool clock_state) { - return ((!m_last_clock_state && clock_state) || - (m_last_clock_state && !clock_state)); + return ((!m_last_clock_state && clock_state) || (m_last_clock_state && !clock_state)); } inline bool cvsd_device_base::is_active_clock_transition(bool clock_state) { - return ((clock_state != m_last_clock_state) && - (clock_state == m_active_clock_edge)); + return ((clock_state != m_last_clock_state) && (clock_state == m_active_clock_edge)); } inline bool cvsd_device_base::current_clock_state() @@ -146,42 +141,42 @@ inline bool cvsd_device_base::current_clock_state() // keep track of the clock state given its previous state and the number of samples produced // i.e. if we generated m_samples_generated samples, at a sample rate of SAMPLE_RATE, then are we on a // positive or negative level of a squarewave at clock() hz? SAMPLE_RATE may not be an integer multiple of clock() - //uint64_t fractions_of_second = (((uint64_t)m_samples_generated)<<32) / SAMPLE_RATE; // 32.32 bits of seconds passed so far - //uint32_t clock_edges_passed = (fractions_of_second * clock() * 2)>>32 - //return (((((uint64_t)m_samples_generated<<32) * clock() * 2 / SAMPLE_RATE)>>32) & 0x1)?true:false; - return (((uint64_t)m_samples_generated * clock() * 2 / SAMPLE_RATE) & 0x01)?true:false; + //uint64_t fractions_of_second = (((uint64_t)m_samples_generated) << 32) / SAMPLE_RATE; // 32.32 bits of seconds passed so far + //uint32_t clock_edges_passed = (fractions_of_second * clock() * 2) >> 32 + //return bool(((((uint64_t)m_samples_generated << 32) * clock() * 2 / SAMPLE_RATE) >> 32) & 0x1); + return bool(((uint64_t)m_samples_generated * clock() * 2 / SAMPLE_RATE) & 0x01); } void cvsd_device_base::digit_w(int digit) { m_stream->update(); - m_buffered_bit = digit ? true : false; + m_buffered_bit = bool(digit); } void cvsd_device_base::clock_w(int state) { - /* update the output buffer first */ + // update the output buffer first m_stream->update(); - bool clock_state = state ? true : false; + bool clock_state = bool(state); - /* only makes sense for setups with a software driven clock */ + // only makes sense for setups with a software driven clock assert(!is_external_oscillator()); - /* speech clock changing? */ + // speech clock changing? if (is_clock_changed(clock_state)) { - /* clear the update count */ + // clear the update count m_samples_generated = 0; process_bit(m_buffered_bit, clock_state); } - /* update the clock */ + // update the clock m_last_clock_state = clock_state; } int cvsd_device_base::clock_state_r() { - /* only makes sense for setups with an external oscillator */ + // only makes sense for setups with an external oscillator assert(is_external_oscillator()); m_stream->update(); @@ -231,6 +226,7 @@ hc55516_device::hc55516_device(const machine_config &mconfig, device_type type, , m_intshift(intshift) , m_sylfilter(0) , m_intfilter(0) + , m_next_sample(0) , m_agc(true) , m_buffered_fzq(true) { @@ -246,6 +242,7 @@ void hc55516_device::device_start() save_item(NAME(m_sylfilter)); save_item(NAME(m_intfilter)); + save_item(NAME(m_next_sample)); save_item(NAME(m_agc)); save_item(NAME(m_buffered_fzq)); } @@ -257,6 +254,7 @@ void hc55516_device::device_start() void hc55516_device::device_reset() { cvsd_device_base::device_reset(); + // simulate /FZ having been held for a while m_sylfilter = 0x3f; m_intfilter = 0; @@ -275,16 +273,15 @@ int hc55516_device::agc_r() { // prevent debugger from changing the internal state if (!machine().side_effects_disabled()) - m_stream->update(); /* bring up to date first */ + m_stream->update(); // bring up to date first return m_agc; } void hc55516_device::process_bit(bool bit, bool clock_state) { - bool frozen = ( ( (m_intfilter >= 0x180) && (!bit) ) || - ( (m_intfilter <= -0x180) && (bit) ) ); - + const bool frozen = (((m_intfilter >= 0x180) && !bit) || ((m_intfilter <= -0x180) && bit)); int32_t sum; + if (is_active_clock_transition(clock_state)) { // grab the /FZ state; if the callback is present, use that, otherwise use the buffered state @@ -294,15 +291,15 @@ void hc55516_device::process_bit(bool bit, bool clock_state) else fzq_state = m_buffered_fzq; - if (!fzq_state) // /FZ is active low, if it is active, the input bit is ignored and the inverse of the previous bit in the shifter is used instead - bit = !(m_shiftreg&1); + // if /FZ is active, the input bit is ignored and the inverse of the previous bit in the shifter is used instead + if (!fzq_state) + bit = !(m_shiftreg & 1); - /* shift the new bit into the shift register */ - m_shiftreg = (m_shiftreg << 1) | (bit?1:0); + // shift the new bit into the shift register + m_shiftreg = (m_shiftreg << 1) | (bit ? 1 : 0); - /* if we got all 0's or all 1's in the last n bits... */ - if (((m_shiftreg & m_shiftreg_mask) == 0) || - ((m_shiftreg & m_shiftreg_mask) == m_shiftreg_mask)) + // if we got all 0's or all 1's in the last n bits... + if (((m_shiftreg & m_shiftreg_mask) == 0) || ((m_shiftreg & m_shiftreg_mask) == m_shiftreg_mask)) { // coincidence is true if (!frozen) m_sylfilter += (((~m_sylfilter) & m_sylmask) >> m_sylshift); @@ -314,28 +311,24 @@ void hc55516_device::process_bit(bool bit, bool clock_state) } m_sylfilter &= 0xfff; - sum = ( ((~m_intfilter) >> m_intshift) + 1 ) & 0x3ff; + sum = util::sext(((~m_intfilter) >> m_intshift) + 1, 10); } - else // inactive clock transition + else { - if (m_shiftreg&1) + // inactive clock transition + if (m_shiftreg & 1) { - sum = ( ( ~std::max(2, m_sylfilter >> 6) ) + 1 ) & 0x3ff; + sum = util::sext((~std::max(2, m_sylfilter >> 6)) + 1, 10); } else { - sum = std::max(2, m_sylfilter >> 6) & 0x3ff; + sum = util::sext(std::max(2, m_sylfilter >> 6), 10); } } - if (sum & 0x200) - sum |= ~0x3ff; // sign extend - if (!frozen) { - m_intfilter += sum; - m_intfilter &= 0x3ff; - if (m_intfilter & 0x200) m_intfilter |= ~0x3ff; // sign extend + m_intfilter = util::sext(m_intfilter + sum, 10); } /* scale the result (-512 to 511) to -32768 thru 32767 */ @@ -343,10 +336,10 @@ void hc55516_device::process_bit(bool bit, bool clock_state) F E D C B A 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0/9 8 7 6 5 4 */ - m_next_sample = ( (m_intfilter << 6) | ( ((m_intfilter & 0x3ff) ^ 0x200 ) >> 4 ) ); + m_next_sample = ((m_intfilter << 6) | (((m_intfilter & 0x3ff) ^ 0x200) >> 4)); // update agc state - if ( (m_intfilter >= 0x100) || (m_intfilter <= -0x100) ) + if ((m_intfilter >= 0x100) || (m_intfilter <= -0x100)) m_agc = false; else m_agc = true; @@ -363,22 +356,9 @@ void hc55516_device::sound_stream_update(sound_stream &stream, std::vector SAMPLE_RATE / 32) - { - m_samples_generated = SAMPLE_RATE; - m_next_sample = 0; - } - } -*/ - if (is_external_oscillator()) { - /* external oscillator */ + // external oscillator for (int i = 0; i < buffer.samples(); i++) { buffer.put_int(i, m_next_sample, 32768); @@ -387,7 +367,7 @@ void hc55516_device::sound_stream_update(sound_stream &stream, std::vector FILTER_MAX) - m_sylfilter_d = FILTER_MAX; + if (m_sylfilter > FILTER_MAX) + m_sylfilter = FILTER_MAX; } else { - m_sylfilter_d *= m_decay; + m_sylfilter *= m_decay; - if (m_sylfilter_d < FILTER_MIN) - m_sylfilter_d = FILTER_MIN; + if (m_sylfilter < FILTER_MIN) + m_sylfilter = FILTER_MIN; } - /* compute the sample as a 32-bit word */ - m_next_sample = m_intfilter_d * SAMPLE_GAIN; + // compute the sample as a 32-bit word + m_next_sample = m_intfilter * SAMPLE_GAIN; } } @@ -509,7 +495,7 @@ void mc3417_device::sound_stream_update(sound_stream &stream, std::vector SAMPLE_RATE / 32) { @@ -518,14 +504,14 @@ void mc3417_device::sound_stream_update(sound_stream &stream, std::vectorRAM interface and computes the volume envelopes. + The CPU can control the envelopes by specifying 8 bits of destination and 8 bits of speed (bit 7 is polarity). + Every time the envelope reaches a destination, an IRQ is raised and the CPU can read which voice/part triggered it. + + IC9 is a phase accumulator, which can take 16 bit of playback speed value and generate an address for the wave rom. + The upper part of the wave rom address is fixed, making the samples at most 2048 long. + + IC8 sums the 160 parts together into a buffer with 8 samples, performing interpolation and volume control. + Volume control is done in exponential space to avoid multiplication. The samples are in exponential format. +*/ + +#include "emu.h" +#include "roland_sa.h" + +DEFINE_DEVICE_TYPE(ROLAND_SA, roland_sa_device, "roland_sa", "Roland SA CPU-B Sound Generator") + +// LUT for the address speed +const uint32_t roland_sa_device::env_table[] = { + 0x000000, 0x000023, 0x000026, 0x000029, 0x00002d, 0x000031, 0x000036, + 0x00003b, 0x000040, 0x000046, 0x00004c, 0x000052, 0x00005a, 0x000062, + 0x00006c, 0x000076, 0x000080, 0x00008c, 0x000098, 0x0000a4, 0x0000b4, + 0x0000c4, 0x0000d8, 0x0000ec, 0x000104, 0x00011c, 0x000134, 0x00014c, + 0x00016c, 0x00018c, 0x0001b4, 0x0001dc, 0x000200, 0x000230, 0x000260, + 0x000290, 0x0002d0, 0x000310, 0x000360, 0x0003b0, 0x000400, 0x000460, + 0x0004c0, 0x000520, 0x0005a0, 0x000620, 0x0006c0, 0x000760, 0x000800, + 0x0008c0, 0x000980, 0x000a40, 0x000b40, 0x000c40, 0x000d80, 0x000ec0, + 0x001000, 0x001180, 0x001300, 0x001480, 0x001680, 0x001880, 0x001b00, + 0x001d80, 0x002000, 0x002300, 0x002600, 0x002900, 0x002d00, 0x003100, + 0x003600, 0x003b00, 0x004000, 0x004600, 0x004c00, 0x005200, 0x005a00, + 0x006200, 0x006c00, 0x007600, 0x008000, 0x008c00, 0x009800, 0x00a400, + 0x00b400, 0x00c400, 0x00d800, 0x00ec00, 0x010000, 0x011800, 0x013000, + 0x014800, 0x016800, 0x018800, 0x01b000, 0x01d800, 0x020000, 0x023000, + 0x026000, 0x029000, 0x02d000, 0x031000, 0x036000, 0x03b000, 0x040000, + 0x046000, 0x04c000, 0x052000, 0x05a000, 0x062000, 0x06c000, 0x076000, + 0x080000, 0x08c000, 0x098000, 0x0a4000, 0x0b4000, 0x0c4000, 0x0d8000, + 0x0ec000, 0x100000, 0x118000, 0x130000, 0x148000, 0x168000, 0x188000, + 0x1b0000, 0x1d8000, 0x000000, 0x1fffdc, 0x1fffd9, 0x1fffd6, 0x1fffd2, + 0x1fffce, 0x1fffc9, 0x1fffc4, 0x1fffbf, 0x1fffb9, 0x1fffb3, 0x1fffad, + 0x1fffa5, 0x1fff9d, 0x1fff93, 0x1fff89, 0x1fff7f, 0x1fff73, 0x1fff67, + 0x1fff5b, 0x1fff4b, 0x1fff3b, 0x1fff27, 0x1fff13, 0x1ffefb, 0x1ffee3, + 0x1ffecb, 0x1ffeb3, 0x1ffe93, 0x1ffe73, 0x1ffe4b, 0x1ffe23, 0x1ffdff, + 0x1ffdcf, 0x1ffd9f, 0x1ffd6f, 0x1ffd2f, 0x1ffcef, 0x1ffc9f, 0x1ffc4f, + 0x1ffbff, 0x1ffb9f, 0x1ffb3f, 0x1ffadf, 0x1ffa5f, 0x1ff9df, 0x1ff93f, + 0x1ff89f, 0x1ff7ff, 0x1ff73f, 0x1ff67f, 0x1ff5bf, 0x1ff4bf, 0x1ff3bf, + 0x1ff27f, 0x1ff13f, 0x1fefff, 0x1fee7f, 0x1fecff, 0x1feb7f, 0x1fe97f, + 0x1fe77f, 0x1fe4ff, 0x1fe27f, 0x1fdfff, 0x1fdcff, 0x1fd9ff, 0x1fd6ff, + 0x1fd2ff, 0x1fceff, 0x1fc9ff, 0x1fc4ff, 0x1fbfff, 0x1fb9ff, 0x1fb3ff, + 0x1fadff, 0x1fa5ff, 0x1f9dff, 0x1f93ff, 0x1f89ff, 0x1f7fff, 0x1f73ff, + 0x1f67ff, 0x1f5bff, 0x1f4bff, 0x1f3bff, 0x1f27ff, 0x1f13ff, 0x1effff, + 0x1ee7ff, 0x1ecfff, 0x1eb7ff, 0x1e97ff, 0x1e77ff, 0x1e4fff, 0x1e27ff, + 0x1dffff, 0x1dcfff, 0x1d9fff, 0x1d6fff, 0x1d2fff, 0x1cefff, 0x1c9fff, + 0x1c4fff, 0x1bffff, 0x1b9fff, 0x1b3fff, 0x1adfff, 0x1a5fff, 0x19dfff, + 0x193fff, 0x189fff, 0x17ffff, 0x173fff, 0x167fff, 0x15bfff, 0x14bfff, + 0x13bfff, 0x127fff, 0x113fff, 0x0fffff, 0x0e7fff, 0x0cffff, 0x0b7fff, + 0x097fff, 0x077fff, 0x04ffff, 0x027fff}; + +// LUT for bits 5/6/7/8 of the subphase +const uint16_t roland_sa_device::addr_table[] = {0x1e0, 0x080, 0x060, 0x04d, 0x040, 0x036, 0x02d, 0x026, + 0x020, 0x01b, 0x016, 0x011, 0x00d, 0x00a, 0x006, 0x003}; + +roland_sa_device::roland_sa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) + : device_t(mconfig, ROLAND_SA, tag, owner, clock) + , device_sound_interface(mconfig, *this) + , m_int_callback(*this) + , m_stream(nullptr) +{ +} + +void roland_sa_device::device_start() +{ + m_stream = stream_alloc(0, 2, 20000, STREAM_SYNCHRONOUS); +} + +void roland_sa_device::device_reset() +{ + m_int_callback(CLEAR_LINE); + + m_irq_id = 0; + m_irq_triggered = false; + memset(m_parts, 0, sizeof(m_parts)); +} + +void roland_sa_device::set_sr_mode(bool mode) +{ + if (m_sr_mode != mode) + m_stream->set_sample_rate(mode ? 20000 : 32000); + m_sr_mode = mode; +} + +void roland_sa_device::load_roms(uint8_t *ic5, uint8_t *ic6, uint8_t *ic7) +{ + // Exp table to for the subphase + // TODO: This is bit accurate, but I want to believe there is a better way to compute this function + for (size_t i = 0; i < 0x10000; i++) + { + // ROM IC11 + uint16_t r11_pos = i % 4096; + uint16_t r11 = (uint16_t)round(exp2f(13.0 + r11_pos / 4096.0) - 4096 * 2); + bool r11_12 = !((r11 >> 12) & 1); + bool r11_11 = !((r11 >> 11) & 1); + bool r11_10 = !((r11 >> 10) & 1); + bool r11_9 = !((r11 >> 9) & 1); + bool r11_8 = !((r11 >> 8) & 1); + bool r11_7 = !((r11 >> 7) & 1); + bool r11_6 = !((r11 >> 6) & 1); + bool r11_5 = !((r11 >> 5) & 1); + bool r11_4 = (r11 >> 4) & 1; + bool r11_3 = (r11 >> 3) & 1; + bool r11_2 = (r11 >> 2) & 1; + bool r11_1 = (r11 >> 1) & 1; + bool r11_0 = (r11 >> 0) & 1; + + uint8_t param_bus_0 = ((i / 0x1000) >> 0) & 1; + uint8_t param_bus_1 = ((i / 0x1000) >> 1) & 1; + uint8_t param_bus_2 = ((i / 0x1000) >> 2) & 1; + uint8_t param_bus_3 = ((i / 0x1000) >> 3) & 1; + + // Copy pasted from silicon + bool result_b0 = (!r11_6 && !param_bus_0 && !param_bus_1 && !param_bus_2 && !param_bus_3) || (!r11_5 && param_bus_0 && !param_bus_1 && !param_bus_2 && !param_bus_3) || (r11_4 && !param_bus_0 && param_bus_1 && !param_bus_2 && !param_bus_3) || (r11_3 && param_bus_0 && param_bus_1 && !param_bus_2 && !param_bus_3) || (r11_2 && !param_bus_0 && !param_bus_1 && param_bus_2 && !param_bus_3) || (r11_1 && param_bus_0 && !param_bus_1 && param_bus_2 && !param_bus_3) || (r11_0 && !param_bus_0 && param_bus_1 && param_bus_2 && !param_bus_3) || (param_bus_0 && !param_bus_1 && !param_bus_2 && param_bus_3 && param_bus_0 && param_bus_1 && param_bus_2 && !param_bus_3); + bool result_b1 = (!r11_7 && !param_bus_0 && !param_bus_1 && !param_bus_2 && !param_bus_3) || (!r11_6 && param_bus_0 && !param_bus_1 && !param_bus_2 && !param_bus_3) || (!r11_5 && !param_bus_0 && param_bus_1 && !param_bus_2 && !param_bus_3) || (r11_4 && param_bus_0 && param_bus_1 && !param_bus_2 && !param_bus_3) || (r11_3 && !param_bus_0 && !param_bus_1 && param_bus_2 && !param_bus_3) || (r11_2 && param_bus_0 && !param_bus_1 && param_bus_2 && !param_bus_3) || (r11_1 && !param_bus_0 && param_bus_1 && param_bus_2 && !param_bus_3) || (r11_0 && param_bus_0 && param_bus_1 && param_bus_2 && !param_bus_3); + bool result_b2 = !(!((!r11_8 && !param_bus_0 && !param_bus_1 && !param_bus_2 && !param_bus_3) || (!r11_7 && param_bus_0 && !param_bus_1 && !param_bus_2 && !param_bus_3) || (!r11_6 && !param_bus_0 && param_bus_1 && !param_bus_2 && !param_bus_3) || (!r11_5 && param_bus_0 && param_bus_1 && !param_bus_2 && !param_bus_3) || (r11_4 && !param_bus_0 && !param_bus_1 && param_bus_2 && !param_bus_3) || (r11_3 && param_bus_0 && !param_bus_1 && param_bus_2 && !param_bus_3) || (r11_2 && !param_bus_0 && param_bus_1 && param_bus_2 && !param_bus_3) || (r11_1 && param_bus_0 && param_bus_1 && param_bus_2 && !param_bus_3)) && !(r11_0 && !param_bus_0 && !param_bus_1 && !param_bus_2 && param_bus_3)); + bool result_b3 = !(!((!r11_9 && !param_bus_0 && !param_bus_1 && !param_bus_2 && !param_bus_3) || (!r11_8 && param_bus_0 && !param_bus_1 && !param_bus_2 && !param_bus_3) || (!r11_7 && !param_bus_0 && param_bus_1 && !param_bus_2 && !param_bus_3) || (!r11_6 && param_bus_0 && param_bus_1 && !param_bus_2 && !param_bus_3) || (!r11_5 && !param_bus_0 && !param_bus_1 && param_bus_2 && !param_bus_3) || (r11_4 && param_bus_0 && !param_bus_1 && param_bus_2 && !param_bus_3) || (r11_3 && !param_bus_0 && param_bus_1 && param_bus_2 && !param_bus_3) || (r11_2 && param_bus_0 && param_bus_1 && param_bus_2 && !param_bus_3)) && !((r11_1 && !param_bus_0 && !param_bus_1 && !param_bus_2 && param_bus_3) || (r11_0 && param_bus_0 && !param_bus_1 && !param_bus_2 && param_bus_3))); + bool result_b4 = !(!((!r11_10 && !param_bus_0 && !param_bus_1 && !param_bus_2 && !param_bus_3) || (!r11_9 && param_bus_0 && !param_bus_1 && !param_bus_2 && !param_bus_3) || (!r11_8 && !param_bus_0 && param_bus_1 && !param_bus_2 && !param_bus_3) || (!r11_7 && param_bus_0 && param_bus_1 && !param_bus_2 && !param_bus_3) || (!r11_6 && !param_bus_0 && !param_bus_1 && param_bus_2 && !param_bus_3) || (!r11_5 && param_bus_0 && !param_bus_1 && param_bus_2 && !param_bus_3) || (r11_4 && !param_bus_0 && param_bus_1 && param_bus_2 && !param_bus_3) || (r11_3 && param_bus_0 && param_bus_1 && param_bus_2 && !param_bus_3)) && !((r11_2 && !param_bus_0 && !param_bus_1 && !param_bus_2 && param_bus_3) || (r11_1 && param_bus_0 && !param_bus_1 && !param_bus_2 && param_bus_3) || (r11_0 && !param_bus_0 && param_bus_1 && !param_bus_2 && param_bus_3) || (0 && param_bus_0 && param_bus_1 && !param_bus_2 && param_bus_3))); + bool result_b5 = !(!((!r11_11 && !param_bus_0 && !param_bus_1 && !param_bus_2 && !param_bus_3) || (!r11_10 && param_bus_0 && !param_bus_1 && !param_bus_2 && !param_bus_3) || (!r11_9 && !param_bus_0 && param_bus_1 && !param_bus_2 && !param_bus_3) || (!r11_8 && param_bus_0 && param_bus_1 && !param_bus_2 && !param_bus_3) || (!r11_7 && !param_bus_0 && !param_bus_1 && param_bus_2 && !param_bus_3) || (!r11_6 && param_bus_0 && !param_bus_1 && param_bus_2 && !param_bus_3) || (!r11_5 && !param_bus_0 && param_bus_1 && param_bus_2 && !param_bus_3) || (r11_4 && param_bus_0 && param_bus_1 && param_bus_2 && !param_bus_3)) && !((r11_3 && !param_bus_0 && !param_bus_1 && !param_bus_2 && param_bus_3) || (r11_2 && param_bus_0 && !param_bus_1 && !param_bus_2 && param_bus_3) || (r11_1 && !param_bus_0 && param_bus_1 && !param_bus_2 && param_bus_3) || (r11_0 && param_bus_0 && param_bus_1 && !param_bus_2 && param_bus_3))); + bool result_b6 = !(!((!r11_12 && !param_bus_0 && !param_bus_1 && !param_bus_2 && !param_bus_3) || (!r11_11 && param_bus_0 && !param_bus_1 && !param_bus_2 && !param_bus_3) || (!r11_10 && !param_bus_0 && param_bus_1 && !param_bus_2 && !param_bus_3) || (!r11_9 && param_bus_0 && param_bus_1 && !param_bus_2 && !param_bus_3) || (!r11_8 && !param_bus_0 && !param_bus_1 && param_bus_2 && !param_bus_3) || (!r11_7 && param_bus_0 && !param_bus_1 && param_bus_2 && !param_bus_3) || (!r11_6 && !param_bus_0 && param_bus_1 && param_bus_2 && !param_bus_3) || (!r11_5 && param_bus_0 && param_bus_1 && param_bus_2 && !param_bus_3)) && !((r11_4 && !param_bus_0 && !param_bus_1 && !param_bus_2 && param_bus_3) || (r11_3 && param_bus_0 && !param_bus_1 && !param_bus_2 && param_bus_3) || (r11_2 && !param_bus_0 && param_bus_1 && !param_bus_2 && param_bus_3) || (r11_1 && param_bus_0 && param_bus_1 && !param_bus_2 && param_bus_3))); + bool result_b7 = !(!((1 && !param_bus_0 && !param_bus_1 && !param_bus_2 && !param_bus_3) || (!r11_12 && param_bus_0 && !param_bus_1 && !param_bus_2 && !param_bus_3) || (!r11_11 && !param_bus_0 && param_bus_1 && !param_bus_2 && !param_bus_3) || (!r11_10 && param_bus_0 && param_bus_1 && !param_bus_2 && !param_bus_3) || (!r11_9 && !param_bus_0 && !param_bus_1 && param_bus_2 && !param_bus_3) || (!r11_8 && param_bus_0 && !param_bus_1 && param_bus_2 && !param_bus_3) || (!r11_7 && !param_bus_0 && param_bus_1 && param_bus_2 && !param_bus_3) || (!r11_6 && param_bus_0 && param_bus_1 && param_bus_2 && !param_bus_3)) && !((!r11_5 && !param_bus_0 && !param_bus_1 && !param_bus_2 && param_bus_3) || (r11_4 && param_bus_0 && !param_bus_1 && !param_bus_2 && param_bus_3) || (r11_3 && !param_bus_0 && param_bus_1 && !param_bus_2 && param_bus_3) || (r11_2 && param_bus_0 && param_bus_1 && !param_bus_2 && param_bus_3))); + bool result_b8 = !(!((0 && !param_bus_0 && !param_bus_1 && !param_bus_2 && !param_bus_3) || (1 && param_bus_0 && !param_bus_1 && !param_bus_2 && !param_bus_3) || (!r11_12 && !param_bus_0 && param_bus_1 && !param_bus_2 && !param_bus_3) || (!r11_11 && param_bus_0 && param_bus_1 && !param_bus_2 && !param_bus_3) || (!r11_10 && !param_bus_0 && !param_bus_1 && param_bus_2 && !param_bus_3) || (!r11_9 && param_bus_0 && !param_bus_1 && param_bus_2 && !param_bus_3) || (!r11_8 && !param_bus_0 && param_bus_1 && param_bus_2 && !param_bus_3) || (!r11_7 && param_bus_0 && param_bus_1 && param_bus_2 && !param_bus_3)) && !((!r11_6 && !param_bus_0 && !param_bus_1 && !param_bus_2 && param_bus_3) || (!r11_5 && param_bus_0 && !param_bus_1 && !param_bus_2 && param_bus_3) || (r11_4 && !param_bus_0 && param_bus_1 && !param_bus_2 && param_bus_3) || (r11_3 && param_bus_0 && param_bus_1 && !param_bus_2 && param_bus_3))); + bool result_b9 = !(!((1 && !param_bus_0 && param_bus_1 && !param_bus_2 && !param_bus_3) || (!r11_12 && param_bus_0 && param_bus_1 && !param_bus_2 && !param_bus_3) || (!r11_11 && !param_bus_0 && !param_bus_1 && param_bus_2 && !param_bus_3) || (!r11_10 && param_bus_0 && !param_bus_1 && param_bus_2 && !param_bus_3) || (!r11_9 && !param_bus_0 && param_bus_1 && param_bus_2 && !param_bus_3) || (!r11_8 && param_bus_0 && param_bus_1 && param_bus_2 && !param_bus_3) || (!r11_7 && !param_bus_0 && !param_bus_1 && !param_bus_2 && param_bus_3) || (!r11_6 && param_bus_0 && !param_bus_1 && !param_bus_2 && param_bus_3)) && !((!r11_5 && !param_bus_0 && param_bus_1 && !param_bus_2 && param_bus_3) || (r11_4 && param_bus_0 && param_bus_1 && !param_bus_2 && param_bus_3))); + bool result_b10 = !(!((1 && param_bus_0 && param_bus_1 && !param_bus_2 && !param_bus_3) || (!r11_12 && !param_bus_0 && !param_bus_1 && param_bus_2 && !param_bus_3) || (!r11_11 && param_bus_0 && !param_bus_1 && param_bus_2 && !param_bus_3) || (!r11_10 && !param_bus_0 && param_bus_1 && param_bus_2 && !param_bus_3) || (!r11_9 && param_bus_0 && param_bus_1 && param_bus_2 && !param_bus_3) || (!r11_8 && !param_bus_0 && !param_bus_1 && !param_bus_2 && param_bus_3) || (!r11_7 && param_bus_0 && !param_bus_1 && !param_bus_2 && param_bus_3) || (!r11_6 && !param_bus_0 && param_bus_1 && !param_bus_2 && param_bus_3)) && !(!r11_5 && param_bus_0 && param_bus_1 && !param_bus_2 && param_bus_3)); + bool result_b11 = (1 && !param_bus_0 && !param_bus_1 && param_bus_2 && !param_bus_3) || (!r11_12 && param_bus_0 && !param_bus_1 && param_bus_2 && !param_bus_3) || (!r11_11 && !param_bus_0 && param_bus_1 && param_bus_2 && !param_bus_3) || (!r11_10 && param_bus_0 && param_bus_1 && param_bus_2 && !param_bus_3) || (!r11_9 && !param_bus_0 && !param_bus_1 && !param_bus_2 && param_bus_3) || (!r11_8 && param_bus_0 && !param_bus_1 && !param_bus_2 && param_bus_3) || (!r11_7 && !param_bus_0 && param_bus_1 && !param_bus_2 && param_bus_3) || (!r11_6 && param_bus_0 && param_bus_1 && !param_bus_2 && param_bus_3); + bool result_b12 = (0 && !param_bus_0 && !param_bus_1 && param_bus_2 && !param_bus_3) || (1 && param_bus_0 && !param_bus_1 && param_bus_2 && !param_bus_3) || (!r11_12 && !param_bus_0 && param_bus_1 && param_bus_2 && !param_bus_3) || (!r11_11 && param_bus_0 && param_bus_1 && param_bus_2 && !param_bus_3) || (!r11_10 && !param_bus_0 && !param_bus_1 && !param_bus_2 && param_bus_3) || (!r11_9 && param_bus_0 && !param_bus_1 && !param_bus_2 && param_bus_3) || (!r11_8 && !param_bus_0 && param_bus_1 && !param_bus_2 && param_bus_3) || (!r11_7 && param_bus_0 && param_bus_1 && !param_bus_2 && param_bus_3); + bool result_b13 = (1 && !param_bus_0 && param_bus_1 && param_bus_2 && !param_bus_3) || (!r11_12 && param_bus_0 && param_bus_1 && param_bus_2 && !param_bus_3) || (!r11_11 && !param_bus_0 && !param_bus_1 && !param_bus_2 && param_bus_3) || (!r11_10 && param_bus_0 && !param_bus_1 && !param_bus_2 && param_bus_3) || (!r11_9 && !param_bus_0 && param_bus_1 && !param_bus_2 && param_bus_3) || (!r11_8 && param_bus_0 && param_bus_1 && !param_bus_2 && param_bus_3); + bool result_b14 = !(1 && !(1 && param_bus_0 && param_bus_1 && param_bus_2 && !param_bus_3) && !(!r11_12 && !param_bus_0 && !param_bus_1 && !param_bus_2 && param_bus_3) && !(!r11_11 && param_bus_0 && !param_bus_1 && !param_bus_2 && param_bus_3) && !(!r11_10 && !param_bus_0 && param_bus_1 && !param_bus_2 && param_bus_3) && !(!r11_9 && param_bus_0 && param_bus_1 && !param_bus_2 && param_bus_3)); + bool result_b15 = !(!(!param_bus_0 && !param_bus_1 && !param_bus_2 && param_bus_3) && !(!r11_12 && param_bus_0 && !param_bus_1 && !param_bus_2 && param_bus_3) && !(!r11_11 && !param_bus_0 && param_bus_1 && !param_bus_2 && param_bus_3) && !(!r11_10 && param_bus_0 && param_bus_1 && !param_bus_2 && param_bus_3)); + bool result_b16 = !(!(param_bus_0 && !param_bus_1 && !param_bus_2 && param_bus_3) && !(!r11_12 && !param_bus_0 && param_bus_1 && !param_bus_2 && param_bus_3) && !(!r11_11 && param_bus_0 && param_bus_1 && !param_bus_2 && param_bus_3)); + bool result_b17 = !(!(!param_bus_0 && param_bus_1 && !param_bus_2 && param_bus_3) && !(!r11_12 && param_bus_0 && param_bus_1 && !param_bus_2 && param_bus_3)); + bool result_b18 = param_bus_0 && param_bus_1 && !param_bus_2 && param_bus_3; + + uint32_t result = + result_b18 << 18 | result_b17 << 17 | result_b16 << 16 | result_b15 << 15 | result_b14 << 14 | result_b13 << 13 | + result_b12 << 12 | result_b11 << 11 | result_b10 << 10 | result_b9 << 9 | result_b8 << 8 | result_b7 << 7 | + result_b6 << 6 | result_b5 << 5 | result_b4 << 4 | result_b3 << 3 | result_b2 << 2 | result_b1 << 1 | result_b0 << 0; + phase_exp_table[i] = result; + } + + // Exp table to decode samples + // TODO: This is bit accurate, but I want to believe there is a better way to compute this function + for (size_t i = 0; i < 0x8000; i++) + { + // ROM IC10 + uint16_t r10_pos = i % 1024; + uint16_t r10 = (uint16_t)round(exp2f(11.0 + ~r10_pos / 1024.0) - 1024); + bool r10_9 = (r10 >> 0) & 1; + bool r10_8 = (r10 >> 1) & 1; + bool r10_0 = (r10 >> 2) & 1; + bool r10_1 = (r10 >> 3) & 1; + bool r10_2 = (r10 >> 4) & 1; + bool r10_3 = !((r10 >> 5) & 1); + bool r10_4 = !((r10 >> 6) & 1); + bool r10_5 = !((r10 >> 7) & 1); + bool r10_6 = !((r10 >> 8) & 1); + bool r10_7 = !((r10 >> 9) & 1); + + bool wavein_sign = i >= 0x4000; + uint8_t add_r_0 = ((i / 0x400) >> 0) & 1; + uint8_t add_r_1 = ((i / 0x400) >> 1) & 1; + uint8_t add_r_2 = ((i / 0x400) >> 2) & 1; + uint8_t add_r_3 = ((i / 0x400) >> 3) & 1; + + // Copy pasted from silicon + bool result_b14 = !((!(!add_r_3 && !add_r_2 && !add_r_1 && !add_r_0) && !wavein_sign) || (!add_r_3 && !add_r_2 && !add_r_1 && !add_r_0 && wavein_sign)); + bool result_b13 = !((((!r10_7 && !add_r_3 && !add_r_2 && !add_r_1 && !add_r_0) || (!add_r_3 && !add_r_2 && !add_r_1 && add_r_0)) && wavein_sign) || (!((!r10_7 && !add_r_3 && !add_r_2 && !add_r_1 && !add_r_0) || (!add_r_3 && !add_r_2 && !add_r_1 && add_r_0)) && !wavein_sign)); + bool result_b12 = !((((!r10_6 && !add_r_3 && !add_r_2 && !add_r_1 && !add_r_0) || (!r10_7 && !add_r_3 && !add_r_2 && !add_r_1 && add_r_0) || (!add_r_3 && !add_r_2 && add_r_1 && !add_r_0)) && wavein_sign) || (!((!r10_6 && !add_r_3 && !add_r_2 && !add_r_1 && !add_r_0) || (!r10_7 && !add_r_3 && !add_r_2 && !add_r_1 && add_r_0) || (!add_r_3 && !add_r_2 && add_r_1 && !add_r_0)) && !wavein_sign)); + bool result_b11 = !((((!r10_5 && !add_r_3 && !add_r_2 && !add_r_1 && !add_r_0) || (!r10_6 && !add_r_3 && !add_r_2 && !add_r_1 && add_r_0) || (!r10_7 && !add_r_3 && !add_r_2 && add_r_1 && !add_r_0) || (1 && !add_r_3 && !add_r_2 && add_r_1 && add_r_0)) && wavein_sign) || (!((!r10_5 && !add_r_3 && !add_r_2 && !add_r_1 && !add_r_0) || (!r10_6 && !add_r_3 && !add_r_2 && !add_r_1 && add_r_0) || (!r10_7 && !add_r_3 && !add_r_2 && add_r_1 && !add_r_0) || (1 && !add_r_3 && !add_r_2 && add_r_1 && add_r_0)) && !wavein_sign)); + bool result_b10 = !((!((!r10_7 && !add_r_3 && !add_r_2 && add_r_1 && add_r_0) || (!r10_6 && !add_r_3 && !add_r_2 && add_r_1 && !add_r_0) || (!r10_5 && !add_r_3 && !add_r_2 && !add_r_1 && add_r_0) || (!r10_4 && !add_r_3 && !add_r_2 && !add_r_1 && !add_r_0)) && !(!add_r_3 && add_r_2 && !add_r_1 && !add_r_0) && !wavein_sign) || (!(!((!r10_7 && !add_r_3 && !add_r_2 && add_r_1 && add_r_0) || (!r10_6 && !add_r_3 && !add_r_2 && add_r_1 && !add_r_0) || (!r10_5 && !add_r_3 && !add_r_2 && !add_r_1 && add_r_0) || (!r10_4 && !add_r_3 && !add_r_2 && !add_r_1 && !add_r_0)) && !(!add_r_3 && add_r_2 && !add_r_1 && !add_r_0)) && wavein_sign)); + bool result_b9 = !((((1 && !add_r_3 && add_r_2 && !add_r_1 && add_r_0) || (!r10_7 && !add_r_3 && add_r_2 && !add_r_1 && !add_r_0) || (!r10_6 && !add_r_3 && !add_r_2 && add_r_1 && add_r_0) || (!r10_5 && !add_r_3 && !add_r_2 && add_r_1 && !add_r_0) || (!r10_4 && !add_r_3 && !add_r_2 && !add_r_1 && add_r_0) || (!r10_3 && !add_r_3 && !add_r_2 && !add_r_1 && !add_r_0)) && wavein_sign) || (!((1 && !add_r_3 && add_r_2 && !add_r_1 && add_r_0) || (!r10_7 && !add_r_3 && add_r_2 && !add_r_1 && !add_r_0) || (!r10_6 && !add_r_3 && !add_r_2 && add_r_1 && add_r_0) || (!r10_5 && !add_r_3 && !add_r_2 && add_r_1 && !add_r_0) || (!r10_4 && !add_r_3 && !add_r_2 && !add_r_1 && add_r_0) || (!r10_3 && !add_r_3 && !add_r_2 && !add_r_1 && !add_r_0)) && !wavein_sign)); + bool result_b8 = !((((1 && !add_r_3 && add_r_2 && add_r_1 && !add_r_0) || (!r10_7 && !add_r_3 && add_r_2 && !add_r_1 && add_r_0) || (!r10_6 && !add_r_3 && add_r_2 && !add_r_1 && !add_r_0) || (!r10_5 && !add_r_3 && !add_r_2 && add_r_1 && add_r_0) || (!r10_4 && !add_r_3 && !add_r_2 && add_r_1 && !add_r_0) || (!r10_3 && !add_r_3 && !add_r_2 && !add_r_1 && add_r_0) || (r10_2 && !add_r_3 && !add_r_2 && !add_r_1 && !add_r_0) || (1 && 0)) && wavein_sign) || (!((1 && !add_r_3 && add_r_2 && add_r_1 && !add_r_0) || (!r10_7 && !add_r_3 && add_r_2 && !add_r_1 && add_r_0) || (!r10_6 && !add_r_3 && add_r_2 && !add_r_1 && !add_r_0) || (!r10_5 && !add_r_3 && !add_r_2 && add_r_1 && add_r_0) || (!r10_4 && !add_r_3 && !add_r_2 && add_r_1 && !add_r_0) || (!r10_3 && !add_r_3 && !add_r_2 && !add_r_1 && add_r_0) || (r10_2 && !add_r_3 && !add_r_2 && !add_r_1 && !add_r_0) || (1 && 0)) && !wavein_sign)); + bool result_b7 = !((((1 && !add_r_3 && add_r_2 && add_r_1 && add_r_0) || (!r10_7 && !add_r_3 && add_r_2 && add_r_1 && !add_r_0) || (!r10_6 && !add_r_3 && add_r_2 && !add_r_1 && add_r_0) || (!r10_5 && !add_r_3 && add_r_2 && !add_r_1 && !add_r_0) || (!r10_4 && !add_r_3 && !add_r_2 && add_r_1 && add_r_0) || (!r10_3 && !add_r_3 && !add_r_2 && add_r_1 && !add_r_0) || (r10_2 && !add_r_3 && !add_r_2 && !add_r_1 && add_r_0) || (r10_1 && !add_r_3 && !add_r_2 && !add_r_1 && !add_r_0)) && wavein_sign) || (!((1 && !add_r_3 && add_r_2 && add_r_1 && add_r_0) || (!r10_7 && !add_r_3 && add_r_2 && add_r_1 && !add_r_0) || (!r10_6 && !add_r_3 && add_r_2 && !add_r_1 && add_r_0) || (!r10_5 && !add_r_3 && add_r_2 && !add_r_1 && !add_r_0) || (!r10_4 && !add_r_3 && !add_r_2 && add_r_1 && add_r_0) || (!r10_3 && !add_r_3 && !add_r_2 && add_r_1 && !add_r_0) || (r10_2 && !add_r_3 && !add_r_2 && !add_r_1 && add_r_0) || (r10_1 && !add_r_3 && !add_r_2 && !add_r_1 && !add_r_0)) && !wavein_sign)); + bool result_b6 = !((!((1 && add_r_3 && !add_r_2 && !add_r_1 && !add_r_0) || (!r10_7 && !add_r_3 && add_r_2 && add_r_1 && add_r_0) || (!r10_6 && !add_r_3 && add_r_2 && add_r_1 && !add_r_0) || (!r10_5 && !add_r_3 && add_r_2 && !add_r_1 && add_r_0) || (!r10_4 && !add_r_3 && add_r_2 && !add_r_1 && !add_r_0) || (!r10_3 && !add_r_3 && !add_r_2 && add_r_1 && add_r_0) || (r10_2 && !add_r_3 && !add_r_2 && add_r_1 && !add_r_0) || (r10_1 && !add_r_3 && !add_r_2 && !add_r_1 && add_r_0)) && !(r10_0 && !add_r_3 && !add_r_2 && !add_r_1 && !add_r_0) && !wavein_sign) || (!(!((1 && add_r_3 && !add_r_2 && !add_r_1 && !add_r_0) || (!r10_7 && !add_r_3 && add_r_2 && add_r_1 && add_r_0) || (!r10_6 && !add_r_3 && add_r_2 && add_r_1 && !add_r_0) || (!r10_5 && !add_r_3 && add_r_2 && !add_r_1 && add_r_0) || (!r10_4 && !add_r_3 && add_r_2 && !add_r_1 && !add_r_0) || (!r10_3 && !add_r_3 && !add_r_2 && add_r_1 && add_r_0) || (r10_2 && !add_r_3 && !add_r_2 && add_r_1 && !add_r_0) || (r10_1 && !add_r_3 && !add_r_2 && !add_r_1 && add_r_0)) && !(r10_0 && !add_r_3 && !add_r_2 && !add_r_1 && !add_r_0)) && wavein_sign)); + bool result_b5 = !((!((!r10_7 && add_r_3 && !add_r_2 && !add_r_1 && !add_r_0) || (!r10_6 && !add_r_3 && add_r_2 && add_r_1 && add_r_0) || (!r10_5 && !add_r_3 && add_r_2 && add_r_1 && !add_r_0) || (!r10_4 && !add_r_3 && add_r_2 && !add_r_1 && add_r_0) || (!r10_3 && !add_r_3 && add_r_2 && !add_r_1 && !add_r_0) || (r10_2 && !add_r_3 && !add_r_2 && add_r_1 && add_r_0) || (r10_1 && !add_r_3 && !add_r_2 && add_r_1 && !add_r_0) || (r10_0 && !add_r_3 && !add_r_2 && !add_r_1 && add_r_0)) && !((r10_9 && !add_r_3 && !add_r_2 && !add_r_1 && !add_r_0) || (add_r_3 && !add_r_2 && !add_r_1 && add_r_0)) && !wavein_sign) || (!(!((!r10_7 && add_r_3 && !add_r_2 && !add_r_1 && !add_r_0) || (!r10_6 && !add_r_3 && add_r_2 && add_r_1 && add_r_0) || (!r10_5 && !add_r_3 && add_r_2 && add_r_1 && !add_r_0) || (!r10_4 && !add_r_3 && add_r_2 && !add_r_1 && add_r_0) || (!r10_3 && !add_r_3 && add_r_2 && !add_r_1 && !add_r_0) || (r10_2 && !add_r_3 && !add_r_2 && add_r_1 && add_r_0) || (r10_1 && !add_r_3 && !add_r_2 && add_r_1 && !add_r_0) || (r10_0 && !add_r_3 && !add_r_2 && !add_r_1 && add_r_0)) && !((r10_9 && !add_r_3 && !add_r_2 && !add_r_1 && !add_r_0) || (add_r_3 && !add_r_2 && !add_r_1 && add_r_0))) && wavein_sign)); + bool result_b4 = !((!((r10_8 && !add_r_3 && !add_r_2 && !add_r_1 && !add_r_0) || (r10_9 && !add_r_3 && !add_r_2 && !add_r_1 && add_r_0) || (r10_0 && !add_r_3 && !add_r_2 && add_r_1 && !add_r_0) || (r10_1 && !add_r_3 && !add_r_2 && add_r_1 && add_r_0) || (r10_2 && !add_r_3 && add_r_2 && !add_r_1 && !add_r_0) || (!r10_3 && !add_r_3 && add_r_2 && !add_r_1 && add_r_0) || (!r10_4 && !add_r_3 && add_r_2 && add_r_1 && !add_r_0) || (!r10_5 && !add_r_3 && add_r_2 && add_r_1 && add_r_0)) && !((!r10_6 && add_r_3 && !add_r_2 && !add_r_1 && !add_r_0) || (!r10_7 && add_r_3 && !add_r_2 && !add_r_1 && add_r_0) || (add_r_3 && !add_r_2 && add_r_1 && !add_r_0)) && !wavein_sign) || (!(!((r10_8 && !add_r_3 && !add_r_2 && !add_r_1 && !add_r_0) || (r10_9 && !add_r_3 && !add_r_2 && !add_r_1 && add_r_0) || (r10_0 && !add_r_3 && !add_r_2 && add_r_1 && !add_r_0) || (r10_1 && !add_r_3 && !add_r_2 && add_r_1 && add_r_0) || (r10_2 && !add_r_3 && add_r_2 && !add_r_1 && !add_r_0) || (!r10_3 && !add_r_3 && add_r_2 && !add_r_1 && add_r_0) || (!r10_4 && !add_r_3 && add_r_2 && add_r_1 && !add_r_0) || (!r10_5 && !add_r_3 && add_r_2 && add_r_1 && add_r_0)) && !((!r10_6 && add_r_3 && !add_r_2 && !add_r_1 && !add_r_0) || (!r10_7 && add_r_3 && !add_r_2 && !add_r_1 && add_r_0) || (add_r_3 && !add_r_2 && add_r_1 && !add_r_0))) && wavein_sign)); + bool result_b3 = !((!((r10_8 && !add_r_3 && !add_r_2 && !add_r_1 && add_r_0) || (r10_9 && !add_r_3 && !add_r_2 && add_r_1 && !add_r_0) || (r10_0 && !add_r_3 && !add_r_2 && add_r_1 && add_r_0) || (r10_1 && !add_r_3 && add_r_2 && !add_r_1 && !add_r_0) || (r10_2 && !add_r_3 && add_r_2 && !add_r_1 && add_r_0) || (!r10_3 && !add_r_3 && add_r_2 && add_r_1 && !add_r_0) || (!r10_4 && !add_r_3 && add_r_2 && add_r_1 && add_r_0) || (!r10_5 && add_r_3 && !add_r_2 && !add_r_1 && !add_r_0)) && !((!r10_6 && add_r_3 && !add_r_2 && !add_r_1 && add_r_0) || (!r10_7 && add_r_3 && !add_r_2 && add_r_1 && !add_r_0) || (add_r_3 && !add_r_2 && add_r_1 && add_r_0)) && !wavein_sign) || (!(!((r10_8 && !add_r_3 && !add_r_2 && !add_r_1 && add_r_0) || (r10_9 && !add_r_3 && !add_r_2 && add_r_1 && !add_r_0) || (r10_0 && !add_r_3 && !add_r_2 && add_r_1 && add_r_0) || (r10_1 && !add_r_3 && add_r_2 && !add_r_1 && !add_r_0) || (r10_2 && !add_r_3 && add_r_2 && !add_r_1 && add_r_0) || (!r10_3 && !add_r_3 && add_r_2 && add_r_1 && !add_r_0) || (!r10_4 && !add_r_3 && add_r_2 && add_r_1 && add_r_0) || (!r10_5 && add_r_3 && !add_r_2 && !add_r_1 && !add_r_0)) && !((!r10_6 && add_r_3 && !add_r_2 && !add_r_1 && add_r_0) || (!r10_7 && add_r_3 && !add_r_2 && add_r_1 && !add_r_0) || (add_r_3 && !add_r_2 && add_r_1 && add_r_0))) && wavein_sign)); + bool result_b2 = !((!((r10_8 && !add_r_3 && !add_r_2 && add_r_1 && !add_r_0) || (r10_9 && !add_r_3 && !add_r_2 && add_r_1 && add_r_0) || (r10_0 && !add_r_3 && add_r_2 && !add_r_1 && !add_r_0) || (r10_1 && !add_r_3 && add_r_2 && !add_r_1 && add_r_0) || (r10_2 && !add_r_3 && add_r_2 && add_r_1 && !add_r_0) || (!r10_3 && !add_r_3 && add_r_2 && add_r_1 && add_r_0) || (!r10_4 && add_r_3 && !add_r_2 && !add_r_1 && !add_r_0) || (!r10_5 && add_r_3 && !add_r_2 && !add_r_1 && add_r_0)) && !((!r10_6 && add_r_3 && !add_r_2 && add_r_1 && !add_r_0) || (!r10_7 && add_r_3 && !add_r_2 && add_r_1 && add_r_0) || (add_r_3 && add_r_2 && !add_r_1 && !add_r_0)) && !wavein_sign) || (!(!((r10_8 && !add_r_3 && !add_r_2 && add_r_1 && !add_r_0) || (r10_9 && !add_r_3 && !add_r_2 && add_r_1 && add_r_0) || (r10_0 && !add_r_3 && add_r_2 && !add_r_1 && !add_r_0) || (r10_1 && !add_r_3 && add_r_2 && !add_r_1 && add_r_0) || (r10_2 && !add_r_3 && add_r_2 && add_r_1 && !add_r_0) || (!r10_3 && !add_r_3 && add_r_2 && add_r_1 && add_r_0) || (!r10_4 && add_r_3 && !add_r_2 && !add_r_1 && !add_r_0) || (!r10_5 && add_r_3 && !add_r_2 && !add_r_1 && add_r_0)) && !((!r10_6 && add_r_3 && !add_r_2 && add_r_1 && !add_r_0) || (!r10_7 && add_r_3 && !add_r_2 && add_r_1 && add_r_0) || (add_r_3 && add_r_2 && !add_r_1 && !add_r_0))) && wavein_sign)); + bool result_b1 = !((!((r10_8 && !add_r_3 && !add_r_2 && add_r_1 && add_r_0) || (r10_9 && !add_r_3 && add_r_2 && !add_r_1 && !add_r_0) || (r10_0 && !add_r_3 && add_r_2 && !add_r_1 && add_r_0) || (r10_1 && !add_r_3 && add_r_2 && add_r_1 && !add_r_0) || (r10_2 && !add_r_3 && add_r_2 && add_r_1 && add_r_0) || (!r10_3 && add_r_3 && !add_r_2 && !add_r_1 && !add_r_0) || (!r10_4 && add_r_3 && !add_r_2 && !add_r_1 && add_r_0) || (!r10_5 && add_r_3 && !add_r_2 && add_r_1 && !add_r_0)) && !((!r10_6 && add_r_3 && !add_r_2 && add_r_1 && add_r_0) || (!r10_7 && add_r_3 && add_r_2 && !add_r_1 && !add_r_0) || (add_r_3 && add_r_2 && !add_r_1 && add_r_0)) && !wavein_sign) || (!(!((r10_8 && !add_r_3 && !add_r_2 && add_r_1 && add_r_0) || (r10_9 && !add_r_3 && add_r_2 && !add_r_1 && !add_r_0) || (r10_0 && !add_r_3 && add_r_2 && !add_r_1 && add_r_0) || (r10_1 && !add_r_3 && add_r_2 && add_r_1 && !add_r_0) || (r10_2 && !add_r_3 && add_r_2 && add_r_1 && add_r_0) || (!r10_3 && add_r_3 && !add_r_2 && !add_r_1 && !add_r_0) || (!r10_4 && add_r_3 && !add_r_2 && !add_r_1 && add_r_0) || (!r10_5 && add_r_3 && !add_r_2 && add_r_1 && !add_r_0)) && !((!r10_6 && add_r_3 && !add_r_2 && add_r_1 && add_r_0) || (!r10_7 && add_r_3 && add_r_2 && !add_r_1 && !add_r_0) || (add_r_3 && add_r_2 && !add_r_1 && add_r_0))) && wavein_sign)); + bool result_b0 = !((!((r10_8 && !add_r_3 && add_r_2 && !add_r_1 && !add_r_0) || (r10_9 && !add_r_3 && add_r_2 && !add_r_1 && add_r_0) || (r10_0 && !add_r_3 && add_r_2 && add_r_1 && !add_r_0) || (r10_1 && !add_r_3 && add_r_2 && add_r_1 && add_r_0) || (r10_2 && add_r_3 && !add_r_2 && !add_r_1 && !add_r_0) || (!r10_3 && add_r_3 && !add_r_2 && !add_r_1 && add_r_0) || (!r10_4 && add_r_3 && !add_r_2 && add_r_1 && !add_r_0) || (!r10_5 && add_r_3 && !add_r_2 && add_r_1 && add_r_0)) && !((!r10_6 && add_r_3 && add_r_2 && !add_r_1 && !add_r_0) || (!r10_7 && add_r_3 && add_r_2 && !add_r_1 && add_r_0) || (add_r_3 && add_r_2 && add_r_1 && !add_r_0)) && !wavein_sign) || (!(!((r10_8 && !add_r_3 && add_r_2 && !add_r_1 && !add_r_0) || (r10_9 && !add_r_3 && add_r_2 && !add_r_1 && add_r_0) || (r10_0 && !add_r_3 && add_r_2 && add_r_1 && !add_r_0) || (r10_1 && !add_r_3 && add_r_2 && add_r_1 && add_r_0) || (r10_2 && add_r_3 && !add_r_2 && !add_r_1 && !add_r_0) || (!r10_3 && add_r_3 && !add_r_2 && !add_r_1 && add_r_0) || (!r10_4 && add_r_3 && !add_r_2 && add_r_1 && !add_r_0) || (!r10_5 && add_r_3 && !add_r_2 && add_r_1 && add_r_0)) && !((!r10_6 && add_r_3 && add_r_2 && !add_r_1 && !add_r_0) || (!r10_7 && add_r_3 && add_r_2 && !add_r_1 && add_r_0) || (add_r_3 && add_r_2 && add_r_1 && !add_r_0))) && wavein_sign)); + + uint16_t result = + result_b14 << 14 | result_b13 << 13 | result_b12 << 12 | result_b11 << 11 | result_b10 << 10 | + result_b9 << 9 | result_b8 << 8 | result_b7 << 7 | result_b6 << 6 | result_b5 << 5 | + result_b4 << 4 | result_b3 << 3 | result_b2 << 2 | result_b1 << 1 | result_b0 << 0; + samples_exp_table[i] = result; + } + + // Wave rom values + for (size_t i = 0; i < 0x20000; i++) + { + size_t descrambled_i = ( + ((i >> 0) & 1) << 0 | + ((~i >> 1) & 1) << 1 | + ((i >> 2) & 1) << 2 | + ((~i >> 3) & 1) << 3 | + ((i >> 4) & 1) << 4 | + ((~i >> 5) & 1) << 5 | + ((i >> 6) & 1) << 6 | + ((i >> 7) & 1) << 7 | + ((~i >> 8) & 1) << 8 | + ((~i >> 9) & 1) << 9 | + ((i >> 10) & 1) << 10 | + ((i >> 11) & 1) << 11 | + ((i >> 12) & 1) << 12 | + ((i >> 13) & 1) << 13 | + ((i >> 14) & 1) << 14 | + ((i >> 15) & 1) << 15 | + ((i >> 16) & 1) << 16 + ); + + uint16_t exp_sample = ( + ((ic5[descrambled_i] >> 0) & 1) << 13 | + ((ic6[descrambled_i] >> 4) & 1) << 12 | + ((ic7[descrambled_i] >> 4) & 1) << 11 | + ((~ic6[descrambled_i] >> 0) & 1) << 10 | + ((ic7[descrambled_i] >> 7) & 1) << 9 | + ((ic5[descrambled_i] >> 7) & 1) << 8 | + ((~ic5[descrambled_i] >> 5) & 1) << 7 | + ((ic6[descrambled_i] >> 2) & 1) << 6 | + ((ic7[descrambled_i] >> 2) & 1) << 5 | + ((ic7[descrambled_i] >> 1) & 1) << 4 | + ((~ic5[descrambled_i] >> 1) & 1) << 3 | + ((ic5[descrambled_i] >> 3) & 1) << 2 | + ((ic6[descrambled_i] >> 5) & 1) << 1 | + ((~ic6[descrambled_i] >> 7) & 1) << 0 + ); + bool exp_sign = (~ic7[descrambled_i] >> 3) & 1; + samples_exp[i] = exp_sample; + samples_exp_sign[i] = exp_sign; + + uint16_t delta_sample = ( + ((~ic7[descrambled_i] >> 6) & 1) << 8 | + ((ic5[descrambled_i] >> 4) & 1) << 7 | + ((ic7[descrambled_i] >> 0) & 1) << 6 | + ((~ic6[descrambled_i] >> 3) & 1) << 5 | + ((ic5[descrambled_i] >> 2) & 1) << 4 | + ((~ic5[descrambled_i] >> 6) & 1) << 3 | + ((ic6[descrambled_i] >> 6) & 1) << 2 | + ((ic7[descrambled_i] >> 5) & 1) << 1 | + ((~ic6[descrambled_i] >> 7) & 1) << 0 + ); + bool delta_sign = (ic6[descrambled_i] >> 1) & 1; + samples_delta[i] = delta_sample; + samples_delta_sign[i] = delta_sign; + } +} + +u8 roland_sa_device::read(offs_t offset) +{ + if (!machine().side_effects_disabled()) + return m_irq_id; + + return m_ctrl_mem[offset]; +} + +void roland_sa_device::write(offs_t offset, u8 data) +{ + m_int_callback(CLEAR_LINE); + m_irq_triggered = false; + + m_ctrl_mem[offset] = data; +} + +void roland_sa_device::sound_stream_update(sound_stream &stream, std::vector const &inputs, std::vector &outputs) +{ + outputs[0].fill(0); + + int32_t *int_buffer = new int32_t[outputs[0].samples()]; + for (size_t i = 0; i < outputs[0].samples(); i++) + int_buffer[i] = 0; + + for (size_t voiceI = 0; voiceI < NUM_VOICES; voiceI++) + { + for (size_t partI = 0; partI < PARTS_PER_VOICE; partI++) + { + SA_Part &part = m_parts[voiceI][partI]; + size_t mem_offset = voiceI * 0x100 + partI * 0x10; + uint32_t pitch_lut_i = m_ctrl_mem[mem_offset + 1] | (m_ctrl_mem[mem_offset + 0] << 8); + uint32_t wave_addr_loop = m_ctrl_mem[mem_offset + 2]; + uint32_t wave_addr_high = m_ctrl_mem[mem_offset + 3]; + uint32_t env_dest = m_ctrl_mem[mem_offset + 4]; + uint32_t env_speed = m_ctrl_mem[mem_offset + 5]; + uint32_t flags = m_ctrl_mem[mem_offset + 6]; + uint32_t env_offset = m_ctrl_mem[mem_offset + 7]; + + bool irq = false; + + for (size_t i = 0; i < outputs[0].samples(); i++) + { + uint32_t volume; + uint32_t waverom_addr; + bool ag3_sel_sample_type; + bool ag1_phase_hi; + + // IC19 + { + bool env_speed_some_high = + BIT(env_speed, 6) || BIT(env_speed, 5) || BIT(env_speed, 4) || BIT(env_speed, 3) || + BIT(env_speed, 2) || BIT(env_speed, 1) || BIT(env_speed, 0); + + uint32_t adder1_a = part.env_value; + if (BIT(flags, 0)) + adder1_a = 1 << 25; + uint32_t adder1_b = env_table[env_speed]; + bool adder1_ci = env_speed_some_high && BIT(env_speed, 7); + if (adder1_ci) + adder1_b |= 0x7f << 21; + + uint32_t adder3_o = 1 + (adder1_a >> 20) + env_offset; + uint32_t adder3_of = adder3_o > 0xff; + adder3_o &= 0xff; + + volume = ~( + ((adder1_a >> 14) & 0b111111) | + ((adder3_o & 0b1111) << 6) | + (adder3_of ? ((adder3_o & 0b11110000) << 6) : 0) + ) & 0x3fff; + + uint32_t adder1_o = adder1_a + adder1_b + (adder1_ci ? 1 : 0); + uint32_t adder1_of = adder1_o > 0xfffffff; + adder1_o &= 0xfffffff; + + uint32_t adder2_o = (adder1_o >> 20) + (~env_dest & 0xff) + 1; + uint32_t adder2_of = adder2_o > 0xff; + + bool end_reached = env_speed_some_high && ((adder1_of != (BIT(env_speed, 7))) || ((BIT(env_speed, 7)) != adder2_of)); + irq |= end_reached; + + part.env_value = end_reached ? (env_dest << 20) : adder1_o; + } + + // IC9 + { + uint32_t adder1 = (phase_exp_table[pitch_lut_i] + part.sub_phase) & 0xffffff; + uint32_t adder2 = 1 + (adder1 >> 16) + ((~wave_addr_loop) & 0xff); + bool adder2_co = adder2 > 0xff; + adder2 &= 0xff; + uint32_t adder1_and = BIT(flags, 1) ? 0 : (adder1 & 0xffff); + adder1_and |= (BIT(flags, 1) ? 0 : (adder2_co ? adder2 : (adder1 >> 16))) << 16; + + part.sub_phase = adder1_and; + waverom_addr = (wave_addr_high << 11) | ((part.sub_phase >> 9) & 0x7ff); + + ag3_sel_sample_type = BIT(waverom_addr, 16) || BIT(waverom_addr, 15) || BIT(waverom_addr, 14) || + !((BIT(waverom_addr, 13) && !BIT(waverom_addr, 11) && !BIT(waverom_addr, 12)) || !BIT(waverom_addr, 13)); + ag1_phase_hi = ( + (BIT(pitch_lut_i, 15) && BIT(pitch_lut_i, 14)) || + (BIT(part.sub_phase, 23) || BIT(part.sub_phase, 22) || BIT(part.sub_phase, 21) || BIT(part.sub_phase, 20)) || + BIT(flags, 1) + ); + } + + // IC8 + { + uint32_t waverom_pa = samples_exp[waverom_addr]; + uint32_t waverom_pb = samples_delta[waverom_addr]; + bool sign_pa = samples_exp_sign[waverom_addr]; + bool sign_pb = samples_delta_sign[waverom_addr]; + waverom_pa |= ag3_sel_sample_type ? 1 : 0; + waverom_pb |= ag3_sel_sample_type ? 0 : 1; + + if (ag1_phase_hi) + volume |= 0b1111 << 10; + + uint32_t tmp_1, tmp_2; + + uint32_t adder1_o = volume + waverom_pa; + bool adder1_co = adder1_o > 0x3fff; + adder1_o &= 0x3fff; + if (adder1_co) + adder1_o |= 0x3c00; + tmp_1 = adder1_o; + + uint32_t adder3_o = addr_table[(part.sub_phase >> 5) & 0xf] + (waverom_pb & 0x1ff); + bool adder3_of = adder3_o > 0x1ff; + adder3_o &= 0x1ff; + if (adder3_of) + adder3_o |= 0x1e0; + + adder1_o = volume + (adder3_o << 5); + adder1_co = adder1_o > 0x3fff; + adder1_o &= 0x3fff; + if (adder1_co) + adder1_o |= 0x3c00; + tmp_2 = adder1_o; + + int32_t exp_val1 = samples_exp_table[(16384 * sign_pa) + (1024 * (tmp_1 >> 10)) + (tmp_1 & 1023)]; + int32_t exp_val2 = samples_exp_table[(16384 * sign_pb) + (1024 * (tmp_2 >> 10)) + (tmp_2 & 1023)]; + if (sign_pa) + exp_val1 = exp_val1 - 0x8000; + if (sign_pb) + exp_val2 = exp_val2 - 0x8000; + int32_t exp_val = exp_val1 + exp_val2; + + int_buffer[i] += exp_val; + } + } + + if (irq && !m_irq_triggered) + { + m_irq_id = partI | (voiceI << 4); + m_int_callback(ASSERT_LINE); + m_irq_triggered = true; + } + } + } + + for (size_t i = 0; i < outputs[0].samples(); i++) + outputs[0].put_int(i, int_buffer[i], 0xffff); + + delete[] int_buffer; +} diff --git a/src/devices/sound/roland_sa.h b/src/devices/sound/roland_sa.h new file mode 100644 index 0000000000000..8885d06464c40 --- /dev/null +++ b/src/devices/sound/roland_sa.h @@ -0,0 +1,62 @@ +// license:BSD-3-Clause +// copyright-holders:giulioz +#ifndef MAME_SOUND_ROLAND_SA_H +#define MAME_SOUND_ROLAND_SA_H + +#pragma once + +class roland_sa_device : public device_t, public device_sound_interface +{ +public: + roland_sa_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + + auto int_callback() { return m_int_callback.bind(); } + + u8 read(offs_t offset); + void write(offs_t offset, u8 data); + + void load_roms(uint8_t *ic5, uint8_t *ic6, uint8_t *ic7); + void set_sr_mode(bool mode); + +protected: + // device_t implementation + virtual void device_start() override; + virtual void device_reset() override; + + // device_sound_interface implementation + virtual void sound_stream_update(sound_stream &stream, std::vector const &inputs, std::vector &outputs) override; + +private: + static constexpr unsigned NUM_VOICES = 16; + static constexpr unsigned PARTS_PER_VOICE = 10; + + static const uint32_t env_table[]; + static const uint16_t addr_table[]; + + uint16_t samples_exp[0x20000]; + bool samples_exp_sign[0x20000]; + uint16_t samples_delta[0x20000]; + bool samples_delta_sign[0x20000]; + + uint32_t phase_exp_table[0x10000]; + uint16_t samples_exp_table[0x8000]; + + struct SA_Part + { + uint32_t sub_phase; + uint32_t env_value; + }; + + devcb_write_line m_int_callback; + + sound_stream *m_stream; // stream handle + SA_Part m_parts[NUM_VOICES][PARTS_PER_VOICE]; // channel memory + uint8_t m_ctrl_mem[0x2000]; // RAM IC12 (as the CPU writes it) + uint8_t m_irq_id; // voice/part that triggered the IRQ + bool m_irq_triggered; // if there is an IRQ currently waiting + bool m_sr_mode; // sample rate mode (true = 20 KHz, false = 32 KHz) +}; + +DECLARE_DEVICE_TYPE(ROLAND_SA, roland_sa_device) + +#endif // MAME_SOUND_ROLAND_SA_H diff --git a/src/devices/sound/zsg2.cpp b/src/devices/sound/zsg2.cpp index 6607277550034..e578a09fbc498 100644 --- a/src/devices/sound/zsg2.cpp +++ b/src/devices/sound/zsg2.cpp @@ -1,91 +1,93 @@ // license:BSD-3-Clause // copyright-holders:Olivier Galibert, R. Belmont, hap, superctr /* - ZOOM ZSG-2 custom wavetable synthesizer - - Written by Olivier Galibert - MAME conversion by R. Belmont - Working emulation by The Talentuous Hands Of The Popularious hap - Properly working emulation by superctr - --------------------------------------------------------- - - Register map: - 000-5fe : Channel specific registers (48 channels) - (high) (low) - +000 : xxxxxxxx -------- : Start address (low) - +000 : -------- xxxxxxxx : Unknown register (usually cleared) - +002 : xxxxxxxx -------- : Address page - : -------- xxxxxxxx : Start address (high) - +004 : -------- -------- : Unknown register (usually cleared) - +006 : -----x-- -------- : Unknown bit, always set - +008 : xxxxxxxx xxxxxxxx : Frequency - +00a : xxxxxxxx -------- : DSP ch 3 (right) output gain - : -------- xxxxxxxx : Loop address (low) - +00c : xxxxxxxx xxxxxxxx : End address - +00e : xxxxxxxx -------- : DSP ch 2 (Left) output gain - : -------- xxxxxxxx : Loop address (high) - +010 : xxxxxxxx xxxxxxxx : Initial filter time constant - +012 : xxxxxxxx xxxxxxxx : Current filter time constant - +014 : xxxxxxxx xxxxxxxx : Initial volume - +016 : xxxxxxxx xxxxxxxx : Current volume? - +018 : xxxxxxxx xxxxxxxx : Target filter time constant - +01a : xxxxxxxx -------- : DSP ch 1 (chorus) output gain - : -------- xxxxxxxx : Filter ramping speed - +01c : xxxxxxxx xxxxxxxx : Target volume - +01e : xxxxxxxx -------- : DSP ch 0 (reverb) output gain - : -------- xxxxxxxx : Filter ramping speed - 600-604 : Key on flags (each bit corresponds to a channel) - 608-60c : Key off flags (each bit corresponds to a channel) - 618 : Unknown register (usually 0x5cbc is written) - 61a : Unknown register (usually 0x5cbc is written) - 620 : Unknown register (usually 0x0128 is written) - 628 : Unknown register (usually 0x0066 is written) - 630 : Unknown register (usually 0x0001 is written) - 638 : ROM readback address low - 63a : ROM readback address high - 63c : ROM readback word low - 63e : ROM readback word high - - --------------------------------------------------------- - - Additional notes on the sample format, reverse-engineered - by Olivier Galibert and David Haywood: - - The zoom sample rom is decomposed in 0x40000 bytes pages. Each page - starts by a header and is followed by compressed samples. - - The header is a vector of 16 bytes structures composed of 4 32bits - little-endian values representing: - - sample start position in bytes, always a multiple of 4 - - sample end position in bytes, minus 4, always... - - loop position in bytes, always.... - - flags, probably - - It is interesting to note that this header is *not* parsed by the - ZSG. The main program reads the rom through appropriate ZSG - commands, and use the results in subsequent register setups. It's - not even obvious that the ZSG cares about the pages, it may just - see the address space as linear. In the same line, the - interpretation of the flags is obviously dependent on the main - program, not the ZSG, but some of the bits are directly copied to - some of the registers. - - The samples are compressed with a 2:1 ratio. Each block of 4-bytes - becomes 4 16-bits samples. Reading the 4 bytes as a *little-endian* - 32bits values, the structure is: - - 42222222 51111111 60000000 ssss3333 - - 's' is a 4-bit scale value. '0000000', '1111111', '2222222' and - '6543333' are signed 7-bits values corresponding to the 4 samples. - To compute the final 16bits value, left-align and shift right by s. - Yes, that simple. - - --------------------------------------------------------- + +ZOOM ZSG-2 custom wavetable synthesizer + +Written by Olivier Galibert +MAME conversion by R. Belmont +Working emulation by The Talentuous Hands Of The Popularious hap +Properly working emulation by superctr +--------------------------------------------------------- + +Register map: +000-5fe : Channel specific registers (48 channels) + (high) (low) + +000 : xxxxxxxx -------- : Start address (low) + +000 : -------- xxxxxxxx : Unknown register (usually cleared) + +002 : xxxxxxxx -------- : Address page + : -------- xxxxxxxx : Start address (high) + +004 : -------- -------- : Unknown register (usually cleared) + +006 : -----x-- -------- : Unknown bit, always set + +008 : xxxxxxxx xxxxxxxx : Frequency + +00a : xxxxxxxx -------- : DSP ch 3 (right) output gain + : -------- xxxxxxxx : Loop address (low) + +00c : xxxxxxxx xxxxxxxx : End address + +00e : xxxxxxxx -------- : DSP ch 2 (Left) output gain + : -------- xxxxxxxx : Loop address (high) + +010 : xxxxxxxx xxxxxxxx : Initial filter time constant + +012 : xxxxxxxx xxxxxxxx : Current filter time constant + +014 : xxxxxxxx xxxxxxxx : Initial volume + +016 : xxxxxxxx xxxxxxxx : Current volume? + +018 : xxxxxxxx xxxxxxxx : Target filter time constant + +01a : xxxxxxxx -------- : DSP ch 1 (chorus) output gain + : -------- xxxxxxxx : Filter ramping speed + +01c : xxxxxxxx xxxxxxxx : Target volume + +01e : xxxxxxxx -------- : DSP ch 0 (reverb) output gain + : -------- xxxxxxxx : Filter ramping speed +600-604 : Key on flags (each bit corresponds to a channel) +608-60c : Key off flags (each bit corresponds to a channel) +618 : Unknown register (usually 0x5cbc is written) +61a : Unknown register (usually 0x5cbc is written) +620 : Unknown register (usually 0x0128 is written) +628 : Unknown register (usually 0x0066 is written) +630 : Unknown register (usually 0x0001 is written) +638 : ROM readback address low +63a : ROM readback address high +63c : ROM readback word low +63e : ROM readback word high + +--------------------------------------------------------- + +Additional notes on the sample format, reverse-engineered +by Olivier Galibert and David Haywood: + +The zoom sample rom is decomposed in 0x40000 bytes pages. Each page +starts by a header and is followed by compressed samples. + +The header is a vector of 16 bytes structures composed of 4 32bits +little-endian values representing: +- sample start position in bytes, always a multiple of 4 +- sample end position in bytes, minus 4, always... +- loop position in bytes, always.... +- flags, probably + +It is interesting to note that this header is *not* parsed by the +ZSG. The main program reads the rom through appropriate ZSG +commands, and use the results in subsequent register setups. It's +not even obvious that the ZSG cares about the pages, it may just +see the address space as linear. In the same line, the +interpretation of the flags is obviously dependent on the main +program, not the ZSG, but some of the bits are directly copied to +some of the registers. + +The samples are compressed with a 2:1 ratio. Each block of 4-bytes +becomes 4 16-bits samples. Reading the 4 bytes as a *little-endian* +32bits values, the structure is: + +42222222 51111111 60000000 ssss3333 + +'s' is a 4-bit scale value. '0000000', '1111111', '2222222' and +'6543333' are signed 7-bits values corresponding to the 4 samples. +To compute the final 16bits value, left-align and shift right by s. +Yes, that simple. + +--------------------------------------------------------- TODO: - Filter and ramping behavior might not be perfect. -- clicking / popping noises in gdarius, raystorm: maybe the sample ROMs are bad dumps? +- clicking / popping noises in gdarius, raystorm: maybe the sample ROMs + are bad dumps? - memory reads out of range sometimes */ @@ -290,7 +292,7 @@ void zsg2_device::sound_stream_update(sound_stream &stream, std::vector>16; + sample += ((uint16_t)(elem.step_ptr << 2 & 0xffff) * (int16_t)(elem.samples[sample_pos+1] - sample)) >> 16; // another filter... - elem.output_filter_state += (sample - (elem.output_filter_state>>16)) * elem.output_cutoff; + elem.output_filter_state += (sample - (elem.output_filter_state >> 16)) * elem.output_cutoff; sample = elem.output_filter_state >> 16; // To prevent DC bias, we need to slowly discharge the filter when the output filter cutoff is 0 - if(!elem.output_cutoff) + if (!elem.output_cutoff) elem.output_filter_state >>= 1; - sample = (sample * elem.vol)>>16; + sample = (sample * elem.vol) >> 16; - for(int output=0; output<4; output++) + for (int output = 0; output < 4; output++) { int output_gain = elem.output_gain[output] & 0x1f; // left / right int32_t output_sample = sample; @@ -340,19 +342,19 @@ void zsg2_device::sound_stream_update(sound_stream &stream, std::vector> 16; + mix[output] += (output_sample * m_gain_tab[output_gain & 0x1f]) >> 16; } // Apply ramping every other update // It's possible key on is handled on the other sample - if(m_sample_count & 1) + if (m_sample_count & 1) { elem.vol = ramp(elem.vol, elem.vol_target, elem.vol_delta); elem.output_cutoff = ramp(elem.output_cutoff, elem.output_cutoff_target, elem.output_cutoff_delta); } } - for(int output=0; output<4; output++) + for (int output = 0; output < 4; output++) outputs[output].put_int_clamp(i, mix[output], 32768); } m_sample_count++; @@ -491,17 +493,17 @@ uint16_t zsg2_device::chan_r(int ch, int reg) // calculate this value, for now I'm generating an opproximate inverse. int16_t zsg2_device::get_ramp(uint8_t val) { - int16_t frac = val<<12; // sign extend - frac = ((frac>>12) ^ 8) << (val >> 4); + int16_t frac = val << 12; // sign extend + frac = ((frac >> 12) ^ 8) << (val >> 4); return (frac >> 4); } inline uint16_t zsg2_device::ramp(uint16_t current, uint16_t target, int16_t delta) { int32_t rampval = current + delta; - if(delta < 0 && rampval < target) + if (delta < 0 && rampval < target) rampval = target; - else if(delta >= 0 && rampval > target) + else if (delta >= 0 && rampval > target) rampval = target; return rampval; @@ -572,7 +574,7 @@ void zsg2_device::control_w(int reg, uint16_t data) break; default: - if(reg < 0x20) + if (reg < 0x20) m_reg[reg] = data; logerror("ZSG2 control %02X = %04X\n", reg, data & 0xffff); break; @@ -596,7 +598,7 @@ uint16_t zsg2_device::control_r(int reg) return read_memory(m_read_address) >> 16; default: - if(reg < 0x20) + if (reg < 0x20) return m_reg[reg]; break; } @@ -639,6 +641,8 @@ uint16_t zsg2_device::read(offs_t offset, uint16_t mem_mask) return 0; } + m_stream->update(); + if (offset < 0x300) { int chan = offset >> 4; diff --git a/src/devices/sound/zsg2.h b/src/devices/sound/zsg2.h index 6d4d1b7c08172..91a06e27a2ec9 100644 --- a/src/devices/sound/zsg2.h +++ b/src/devices/sound/zsg2.h @@ -58,12 +58,9 @@ class zsg2_device : public device_t, int16_t output_cutoff_delta; int32_t emphasis_filter_state; - int32_t output_filter_state; - // Attenuation for output channels - uint8_t output_gain[4]; - + uint8_t output_gain[4]; // Attenuation for output channels int16_t samples[5]; // +1 history }; diff --git a/src/devices/video/bt48x.cpp b/src/devices/video/bt48x.cpp new file mode 100644 index 0000000000000..eb4f9db7b5aa5 --- /dev/null +++ b/src/devices/video/bt48x.cpp @@ -0,0 +1,513 @@ +// license: BSD-3-Clause +// copyright-holders: Dirk Best +/*************************************************************************** + + Brooktree Bt481/Bt482 + + 256 Color, 15-bit, 16-bit, 24-bit RAMDAC + + Notes: + - Bt482 additionally supports a custom shaped 32x32x2 cursor + + TODO: + - 6-bit mode + - Cursor mode 2 and 3 + - Access command registers without using RS2 + +***************************************************************************/ + +#include "emu.h" +#include "bt48x.h" + +#define LOG_ACCESS (1U << 1) // logs all access to handlers +#define LOG_INDIRECT (1U << 2) // logs reads/writes to indirect registers (except cursor movement) +#define LOG_CURSOR (1U << 3) // logs cursor movement + +#define VERBOSE (LOG_GENERAL | LOG_INDIRECT) + +#include "logmacro.h" + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +DEFINE_DEVICE_TYPE(BT481, bt481_device, "bt481", "Brooktree Bt481 RAMDAC") +DEFINE_DEVICE_TYPE(BT482, bt482_device, "bt482", "Brooktree Bt482 RAMDAC") + +bt481_device::bt481_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) : + device_t(mconfig, type, tag, owner, clock), + device_palette_interface(mconfig, *this) +{ +} + +bt481_device::bt481_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + bt481_device(mconfig, BT481, tag, owner, clock) +{ +} + +bt482_device::bt482_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + bt481_device(mconfig, BT482, tag, owner, clock) +{ +} + + +//************************************************************************** +// MACHINE EMULATION +//************************************************************************** + +void bt481_device::device_start() +{ + // initialize power-up values + m_cra = 0x00; + m_crb = 0x1e; + m_cursor = 0x00; + + // register for save states + save_item(NAME(m_cra)); + save_item(NAME(m_crb)); + save_item(NAME(m_color)); + save_item(NAME(m_addr)); + save_item(NAME(m_addr_rgb)); + save_item(NAME(m_indirect_index)); + save_item(NAME(m_read_mask)); + save_item(NAME(m_overlay_mask)); + save_item(NAME(m_cursor)); +} + +void bt482_device::device_start() +{ + bt481_device::device_start(); + + // register for save states + save_item(NAME(m_cram)); + save_item(NAME(m_cxlr)); + save_item(NAME(m_cxhr)); + save_item(NAME(m_cylr)); + save_item(NAME(m_cyhr)); + save_item(NAME(m_cx)); + save_item(NAME(m_cy)); +} + +void bt481_device::map(address_map &map) +{ + map(0x00, 0x00).rw(FUNC(bt481_device::address_r), FUNC(bt481_device::address_w)); + map(0x01, 0x01).rw(FUNC(bt481_device::palette_r), FUNC(bt481_device::palette_w)); + map(0x02, 0x02).rw(FUNC(bt481_device::mask_r), FUNC(bt481_device::mask_w)); + map(0x03, 0x03).w(FUNC(bt481_device::address_read_w)); + map(0x04, 0x04).rw(FUNC(bt481_device::overlay_address_r), FUNC(bt481_device::overlay_address_w)); + map(0x05, 0x05).rw(FUNC(bt481_device::overlay_r), FUNC(bt481_device::overlay_w)); + map(0x06, 0x06).w(FUNC(bt481_device::command_w)); + map(0x07, 0x07).w(FUNC(bt481_device::overlay_address_read_w)); +} + +uint8_t bt481_device::address_r() +{ + LOGMASKED(LOG_ACCESS, "address_r: %02x\n", m_addr); + + return m_addr; +} + +void bt481_device::address_w(uint8_t data) +{ + LOGMASKED(LOG_ACCESS, "address_w: %02x\n", data); + + if (BIT(m_cra, 0)) + m_indirect_index = data & 0x07; + + m_addr = data; + m_addr_rgb = 0; +} + +uint8_t bt481_device::palette_r() +{ + LOGMASKED(LOG_ACCESS, "palette_r (index %02x)\n", m_addr); + + uint32_t color = pen_color(m_addr); + return color >> (2 - m_addr_rgb); +} + +void bt481_device::palette_w(uint8_t data) +{ + LOGMASKED(LOG_ACCESS, "palette_w: %02x (index %02x)\n", data, m_addr); + + m_color[m_addr_rgb] = data; + + // we have all components, update palette and increment index + if (m_addr_rgb == 2) + set_pen_color(m_addr++, rgb_t(m_color[0], m_color[1], m_color[2])); + + m_addr_rgb = (m_addr_rgb + 1) % 3; +} + +uint8_t bt481_device::mask_r() +{ + uint8_t data = 0xff; + + if (BIT(m_cra, 0)) + { + switch (m_indirect_index) + { + case READ_MASK_REGISTER: + LOGMASKED(LOG_INDIRECT, "R Read Mask Register = %02x\n", m_read_mask); + data = m_read_mask; + break; + + case OVERLAY_MASK_REGISTER: + LOGMASKED(LOG_INDIRECT, "R Overlay Mask Register = %02x\n", m_overlay_mask); + data = m_overlay_mask; + break; + + case COMMAND_REGISTER_B: + LOGMASKED(LOG_INDIRECT, "R Command Register B = %02x\n", m_crb); + data = m_crb; + break; + + case CURSOR_REGISTER: + LOGMASKED(LOG_INDIRECT, "R Cursor Register = %02x\n", m_cursor); + data = m_cursor; + break; + + default: + LOGMASKED(LOG_INDIRECT, "Read from unsupported indirect register %02x\n", m_indirect_index); + data = 0xff; + break; + } + } + else + { + data = m_read_mask; + } + + LOGMASKED(LOG_ACCESS, "mask_r: %02x\n", data); + + return data; +} + +uint8_t bt482_device::mask_r() +{ + uint8_t data = 0xff; + + if (BIT(m_cra, 0)) + { + switch (m_indirect_index) + { + case READ_MASK_REGISTER: + LOGMASKED(LOG_INDIRECT, "R Read Mask Register = %02x\n", m_read_mask); + data = m_read_mask; + break; + + case OVERLAY_MASK_REGISTER: + LOGMASKED(LOG_INDIRECT, "R Overlay Mask Register = %02x\n", m_overlay_mask); + data = m_overlay_mask; + break; + + case COMMAND_REGISTER_B: + LOGMASKED(LOG_INDIRECT, "R Command Register B = %02x\n", m_crb); + data = m_crb; + break; + + case CURSOR_REGISTER: + LOGMASKED(LOG_INDIRECT, "R Cursor Register = %02x\n", m_cursor); + data = m_cursor; + break; + + case CURSOR_X_LOW_REGISTER: + LOGMASKED(LOG_CURSOR, "R Cursor X Low = %02x\n", m_cxlr); + data = m_cxlr; + break; + + case CURSOR_X_HIGH_REGISTER: + LOGMASKED(LOG_CURSOR, "R Cursor X High = %02x\n", m_cxhr); + data = m_cxhr; + break; + + case CURSOR_Y_LOW_REGISTER: + LOGMASKED(LOG_CURSOR, "R Cursor Y Low = %02x\n", m_cylr); + data = m_cylr; + break; + + case CURSOR_Y_HIGH_REGISTER: + LOGMASKED(LOG_CURSOR, "R Cursor Y High = %02x\n", m_cyhr); + data = m_cyhr; + break; + } + } + else + { + data = m_read_mask; + } + + LOGMASKED(LOG_ACCESS, "mask_r: %02x\n", data); + + return data; +} + +void bt481_device::mask_w(uint8_t data) +{ + LOGMASKED(LOG_ACCESS, "mask_w: %02x\n", data); + + if (BIT(m_cra, 0)) + { + switch (m_indirect_index) + { + case READ_MASK_REGISTER: + LOGMASKED(LOG_INDIRECT, "W Read Mask Register = %02x\n", data); + m_read_mask = data; + break; + + case OVERLAY_MASK_REGISTER: + LOGMASKED(LOG_INDIRECT, "W Overlay Mask Register = %02x\n", data); + m_overlay_mask = data & 0x0f; + break; + + case COMMAND_REGISTER_B: + LOGMASKED(LOG_INDIRECT, "W Command Register B = %02x\n", data); + m_crb = data; + break; + + case CURSOR_REGISTER: + LOGMASKED(LOG_INDIRECT, "W Cursor Register = %02x\n", data); + m_cursor = data; + break; + + default: + LOGMASKED(LOG_INDIRECT, "Write to unsupported indirect register %02x\n", m_indirect_index); + break; + } + } + else + { + m_read_mask = data; + } +} + +void bt482_device::mask_w(uint8_t data) +{ + LOGMASKED(LOG_ACCESS, "mask_w: %02x\n", data); + + if (BIT(m_cra, 0)) + { + switch (m_indirect_index) + { + case READ_MASK_REGISTER: + LOGMASKED(LOG_INDIRECT, "W Read Mask Register = %02x\n", data); + m_read_mask = data; + break; + + case OVERLAY_MASK_REGISTER: + LOGMASKED(LOG_INDIRECT, "W Overlay Mask Register = %02x\n", data); + m_overlay_mask = data & 0x0f; + break; + + case COMMAND_REGISTER_B: + LOGMASKED(LOG_INDIRECT, "W Command Register B = %02x\n", data); + m_crb = data; + break; + + case CURSOR_REGISTER: + LOGMASKED(LOG_INDIRECT, "W Cursor Register = %02x\n", data); + m_cursor = data; + break; + + case CURSOR_X_LOW_REGISTER: + LOGMASKED(LOG_CURSOR, "W Cursor X Low = %02x\n", data); + m_cxlr = data; + break; + + case CURSOR_X_HIGH_REGISTER: + LOGMASKED(LOG_CURSOR, "W Cursor X High = %02x\n", data); + m_cxhr = data & 0x0f; + m_cx = (m_cxhr << 8) | m_cxlr; + break; + + case CURSOR_Y_LOW_REGISTER: + LOGMASKED(LOG_CURSOR, "W Cursor Y Low = %02x\n", data); + m_cylr = data; + break; + + case CURSOR_Y_HIGH_REGISTER: + LOGMASKED(LOG_CURSOR, "W Cursor Y High = %02x\n", data); + m_cyhr = data & 0x0f; + m_cy = (m_cyhr << 8) | m_cylr; + break; + } + } + else + { + m_read_mask = data; + } +} + +void bt481_device::address_read_w(uint8_t data) +{ + LOGMASKED(LOG_ACCESS, "address_read_w: %02x\n", data); + + m_addr = data; + m_addr_rgb = 0; +} + +uint8_t bt481_device::overlay_address_r() +{ + LOGMASKED(LOG_ACCESS, "overlay_address_r: %02x\n", m_addr); + + return m_addr; +} + +void bt481_device::overlay_address_w(uint8_t data) +{ + LOGMASKED(LOG_ACCESS, "overlay_address_w: %02x\n", data); + + m_addr = data; + m_addr_rgb = 0; +} + +uint8_t bt481_device::overlay_r() +{ + LOGMASKED(LOG_ACCESS, "overlay_r (index %02x)\n", m_addr); + + if (m_addr >= 20) + { + LOG("Overlay index out of range: %02x\n", m_addr); + return 0; + } + + uint32_t color = pen_color(256 + m_addr); + return color >> (2 - m_addr_rgb); +} + +uint8_t bt482_device::overlay_r() +{ + if (BIT(m_cursor, 3)) + { + LOGMASKED(LOG_ACCESS, "overlay_r (index %02x)\n", m_addr); + return m_cram[m_addr]; + } + else + { + return bt481_device::overlay_r(); + } +} + +void bt481_device::overlay_w(uint8_t data) +{ + LOGMASKED(LOG_ACCESS, "overlay_w: %02x (index %02x)\n", data, m_addr); + + if (m_addr >= 20) + { + LOG("Overlay index out of range: %02x\n", m_addr); + return; + } + + m_color[m_addr_rgb] = data; + + if (m_addr_rgb == 2) + { + // we have all components, update palette and increment index + set_pen_color(256 + m_addr, rgb_t(m_color[0], m_color[1], m_color[2])); + + if (m_addr < 16) + // while accessing the overlay color registers the 4 high bits are ignored + m_addr = (m_addr + 1) & 0x0f; + else + // accessing cursor color + m_addr++; + } + + m_addr_rgb = (m_addr_rgb + 1) % 3; +} + +void bt482_device::overlay_w(uint8_t data) +{ + if (BIT(m_cursor, 3)) + { + LOGMASKED(LOG_ACCESS, "overlay_w: %02x (index %02x)\n", data, m_addr); + m_cram[m_addr++] = data; + } + else + { + bt481_device::overlay_w(data); + } +} + +void bt481_device::command_w(uint8_t data) +{ + LOGMASKED(LOG_ACCESS, "command_w: %02x\n", data); + + m_cra = data; + + if (BIT(m_cra, 7)) + { + switch ((m_cra >> 4) & 0x07) + { + case 0: LOG("Color mode: 5:5:5 dual-edge (33K colors)\n"); break; + case 1: LOG("Color mode: 8:8:8:OL dual-edge (16.8M colors)\n"); break; + case 2: LOG("Color mode: 5:5:5 single-edge (33K colors)\n"); break; + case 4: LOG("Color mode: 5:6:5 dual-edge (65K colors)\n"); break; + case 6: LOG("Color mode: 5:6:5 single-edge (65K colors)\n"); break; + case 7: LOG("Color mode: 8:8:8 single-edge (16.8M colors)\n"); break; + + default: LOG("Invalid color mode selected!\n"); + } + } + else + { + LOG("Color mode: Pseudo color (256 colors)\n"); + } + + LOG("Extended register set %sabled\n", BIT(m_cra, 0) ? "en": "dis"); +} + +void bt481_device::overlay_address_read_w(uint8_t data) +{ + LOGMASKED(LOG_ACCESS, "overlay_address_read_w: %02x\n", data); + + m_addr = data; + m_addr_rgb = 0; +} + + +//************************************************************************** +// CURSOR RENDERING +//************************************************************************** + +uint32_t bt482_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) +{ + // only the 3 color cursor is supported + if ((m_cursor & 0x03) == CURSOR_3_COLOR) + { + // cursor area in screen coordinates + rectangle cursor(m_cx - 32, m_cx - 1, m_cy - 32, m_cy - 1); + + // intersect with cliprect + cursor &= bitmap.cliprect(); + + if (!cursor.empty()) + { + for (int y = 0; y < 32; y++) + { + const int ypos = m_cy - 32 + y; + + for (int x = 0; x < 32; x++) + { + const int xpos = m_cx - 32 + x; + + if (cursor.contains(xpos, ypos)) + { + // fetch color data from plane 0 and 1 + uint8_t p0 = BIT(m_cram[0x00 + (y * 4) + (x / 8)], 7 - (x % 8)); + uint8_t p1 = BIT(m_cram[0x80 + (y * 4) + (x / 8)], 7 - (x % 8)); + + uint8_t color = (p1 << 1) | p0; + + // if we have a color draw it + if (color) + bitmap.pix(ypos, xpos) = pen_color(256 + 16 + color); + } + } + } + } + } + + return 0; +} diff --git a/src/devices/video/bt48x.h b/src/devices/video/bt48x.h new file mode 100644 index 0000000000000..578dbcb004411 --- /dev/null +++ b/src/devices/video/bt48x.h @@ -0,0 +1,115 @@ +// license: BSD-3-Clause +// copyright-holders: Dirk Best +/*************************************************************************** + + Brooktree Bt481/Bt482 + + 256 Color, 15-bit, 16-bit, 24-bit RAMDAC + +***************************************************************************/ + +#ifndef MAME_VIDEO_BT48X_H +#define MAME_VIDEO_BT48X_H + +#pragma once + + +class bt481_device : public device_t, public device_palette_interface +{ +public: + bt481_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + + // color lookup + rgb_t pixel_select(uint8_t index) const { return pen_color(index & m_read_mask); } // P0-P7 + rgb_t overlay_select(uint8_t index) const { return pen_color((256 + index) & m_overlay_mask); } // OL0-OL3 + + void map(address_map &map); + + // accessable with RS0 and RS1 + uint8_t address_r(); + void address_w(uint8_t data); + uint8_t palette_r(); + void palette_w(uint8_t data); + virtual uint8_t mask_r(); + virtual void mask_w(uint8_t data); + void address_read_w(uint8_t data); + + // accessable when RS2 is additionally connected + uint8_t overlay_address_r(); + void overlay_address_w(uint8_t data); + void command_w(uint8_t data); + virtual uint8_t overlay_r(); + virtual void overlay_w(uint8_t data); + void overlay_address_read_w(uint8_t data); + +protected: + bt481_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + + virtual void device_start() override ATTR_COLD; + + // 256 color palette, 1 reserved entry, 15 overlay colors, 1 reserved entry, 3 cursor colors + virtual uint32_t palette_entries() const noexcept override { return 256 + 1 + 15 + 1 + 3; } + + // indirect registers + static constexpr int READ_MASK_REGISTER = 0; + static constexpr int OVERLAY_MASK_REGISTER = 1; + static constexpr int COMMAND_REGISTER_B = 2; + static constexpr int CURSOR_REGISTER = 3; + + // cursor modes + static constexpr int CURSOR_DISABLED = 0; + static constexpr int CURSOR_3_COLOR = 1; + static constexpr int CURSOR_COMPLEMENT = 2; + static constexpr int CURSOR_XWINDOWS = 3; + + uint8_t m_cra; + uint8_t m_crb; + + uint8_t m_color[3]; + uint8_t m_addr; + uint8_t m_addr_rgb; + + uint8_t m_indirect_index; + + uint8_t m_read_mask; + uint8_t m_overlay_mask; + uint8_t m_cursor; +}; + +class bt482_device : public bt481_device +{ +public: + bt482_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + + virtual uint8_t mask_r() override; + virtual void mask_w(uint8_t data) override; + virtual uint8_t overlay_r() override; + virtual void overlay_w(uint8_t data) override; + + // renders the hardware cursor + uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + +protected: + virtual void device_start() override ATTR_COLD; + + // additional indirect registers + static constexpr int CURSOR_X_LOW_REGISTER = 4; + static constexpr int CURSOR_X_HIGH_REGISTER = 5; + static constexpr int CURSOR_Y_LOW_REGISTER = 6; + static constexpr int CURSOR_Y_HIGH_REGISTER = 7; + +private: + uint8_t m_cram[256]; + uint8_t m_cxlr; + uint8_t m_cxhr; + uint8_t m_cylr; + uint8_t m_cyhr; + uint16_t m_cx; + uint16_t m_cy; +}; + +// device type declaration +DECLARE_DEVICE_TYPE(BT481, bt481_device) +DECLARE_DEVICE_TYPE(BT482, bt482_device) + +#endif // MAME_VIDEO_BT48X_H diff --git a/src/devices/video/dm9368.cpp b/src/devices/video/dm9368.cpp index 57d59366e2ebf..eb94796670db2 100644 --- a/src/devices/video/dm9368.cpp +++ b/src/devices/video/dm9368.cpp @@ -40,32 +40,55 @@ dm9368_device::dm9368_device(const machine_config &mconfig, const char *tag, dev device_t(mconfig, DM9368, tag, owner, clock), m_update_cb(*this), m_rbo_cb(*this), + m_a(0), m_rbi(1), m_rbo(1) { } +void dm9368_device::device_start() +{ + // state saving + save_item(NAME(m_a)); + save_item(NAME(m_rbi)); + save_item(NAME(m_rbo)); +} + + +// interface void dm9368_device::a_w(u8 data) { - int const a(data & 0x0f); - int const rbo((m_rbi || a) ? 1 : 0); - u8 const value(rbo ? s_segment_data[a] : 0); + data &= 0xf; + if (data != m_a) + { + m_a = data; + update(); + } +} + +void dm9368_device::rbi_w(int state) +{ + state = state ? 1 : 0; + if (state != m_rbi) + { + m_rbi = state; + update(); + } +} + +void dm9368_device::update() +{ + // RBI blanks the display only if A0-A3 is 0 + int const rbo((m_rbi || m_a) ? 1 : 0); + u8 const value(rbo ? s_segment_data[m_a] : 0); if (!rbo) LOG("DM9368 Blanked Rippling Zero\n"); else - LOG("DM9368 Output Data: %u = %02x\n", a, value); + LOG("DM9368 Output Data: %u = %02x\n", m_a, value); m_update_cb(0, value, 0x7f); if (rbo != m_rbo) m_rbo_cb(m_rbo = rbo); } - - -void dm9368_device::device_start() -{ - // state saving - save_item(NAME(m_rbi)); - save_item(NAME(m_rbo)); -} diff --git a/src/devices/video/dm9368.h b/src/devices/video/dm9368.h index 7eb2bae9ea06c..ec04855c271ad 100644 --- a/src/devices/video/dm9368.h +++ b/src/devices/video/dm9368.h @@ -36,27 +36,29 @@ class dm9368_device : public device_t auto rbo_cb() { return m_rbo_cb.bind(); } // construction/destruction - dm9368_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + dm9368_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); void a_w(u8 data); - void rbi_w(int state) { m_rbi = state; } + void rbi_w(int state); int rbo_r() { return m_rbo; } protected: // device_t implementation virtual void device_start() override ATTR_COLD; - - void update(); + virtual void device_reset() override ATTR_COLD { update(); } private: devcb_write8 m_update_cb; devcb_write_line m_rbo_cb; + u8 m_a; int m_rbi; int m_rbo; static const u8 s_segment_data[16]; + + void update(); }; diff --git a/src/devices/video/pc_vga.cpp b/src/devices/video/pc_vga.cpp index 071dcb2989fae..465798da8d516 100644 --- a/src/devices/video/pc_vga.cpp +++ b/src/devices/video/pc_vga.cpp @@ -60,7 +60,7 @@ #define LOG_DSW (1U << 3) // Input sense at $3c2 #define LOG_CRTC (1U << 4) // CRTC setups with monitor geometry -#define VERBOSE (LOG_GENERAL | LOG_WARN | LOG_DSW) +#define VERBOSE (LOG_GENERAL | LOG_WARN) //#define LOG_OUTPUT_FUNC osd_printf_info #include "logmacro.h" @@ -117,6 +117,7 @@ vga_device::vga_device(const machine_config &mconfig, device_type type, const ch , device_memory_interface(mconfig, *this) , vga(*this) , m_input_sense(*this, "VGA_SENSE") + , m_vsync_cb(*this) { m_main_if_space_config = address_space_config("io_regs", ENDIANNESS_LITTLE, 8, 4, 0, address_map_constructor(FUNC(vga_device::io_3bx_3dx_map), this)); m_crtc_space_config = address_space_config("crtc_regs", ENDIANNESS_LITTLE, 8, 8, 0, address_map_constructor(FUNC(vga_device::crtc_map), this)); @@ -223,6 +224,7 @@ void vga_device::device_start() save_item(NAME(vga.crtc.map13)); save_item(NAME(vga.crtc.irq_clear)); save_item(NAME(vga.crtc.irq_disable)); + save_item(NAME(vga.crtc.irq_latch)); save_item(NAME(vga.crtc.no_wrap)); save_item(NAME(vga.gc.index)); @@ -498,6 +500,7 @@ u8 vga_device::input_status_0_r(offs_t offset) LOGDSW("Reading sense bit %d\n", sense_bit); if(BIT(m_input_sense->read(), sense_bit)) res |= 0x10; + res |= vga.crtc.irq_latch << 7; return res; } @@ -905,12 +908,20 @@ void vga_device::crtc_map(address_map &map) return res; }), NAME([this](offs_t offset, u8 data) { - vga.crtc.protect_enable = (data & 0x80) >> 7; - vga.crtc.bandwidth = (data & 0x40) >> 6; + vga.crtc.protect_enable = BIT(data, 7); + vga.crtc.bandwidth = BIT(data, 6); + // IRQ: Original VGA only supports this for PS/2, but clone cards may supports this on ISA too + // see https://scalibq.wordpress.com/2022/12/06/the-myth-of-the-vertical-retrace-interrupt/ + vga.crtc.irq_disable = BIT(data, 5); + vga.crtc.irq_clear = BIT(data, 4); vga.crtc.vert_retrace_end = (vga.crtc.vert_retrace_end & ~0xf) | (data & 0x0f); - // TODO: these two doesn't seem part of the spec - vga.crtc.irq_clear = (data & 0x10) >> 4; - vga.crtc.irq_disable = (data & 0x20) >> 5; + + if (vga.crtc.irq_clear == 0) + { + vga.crtc.irq_latch = 0; + m_vsync_cb(0); + } + LOGCRTC("CR11 V retrace end %02x -> %02d protect enable %d bandwidth %d irq %02x\n" , data , vga.crtc.vert_retrace_end @@ -1839,6 +1850,13 @@ TIMER_CALLBACK_MEMBER(vga_device::vblank_timer_cb) { vga.crtc.start_addr = latch_start_addr(); vga.attribute.pel_shift = vga.attribute.pel_shift_latch; + + if (vga.crtc.irq_latch == 0 && vga.crtc.irq_disable == 0) + { + vga.crtc.irq_latch = 1; + m_vsync_cb(1); + } + m_vblank_timer->adjust( screen().time_until_pos(vga.crtc.vert_blank_start + vga.crtc.vert_blank_end) ); } diff --git a/src/devices/video/pc_vga.h b/src/devices/video/pc_vga.h index d982163bbb092..4bcef44fd9fbd 100644 --- a/src/devices/video/pc_vga.h +++ b/src/devices/video/pc_vga.h @@ -48,6 +48,7 @@ class vga_device : public device_t void set_offset(uint16_t val) { vga.crtc.offset = val; } void set_vram_size(size_t vram_size) { vga.svga_intf.vram_size = vram_size; } + auto vsync_cb() { return m_vsync_cb.bind(); } // FIXME: should be protected, but virge_pci.cpp violates this inline uint16_t get_crtc_port() { return BIT(vga.miscellaneous_output, 0) ? 0x3d0 : 0x3b0; } @@ -235,6 +236,7 @@ class vga_device : public device_t /**/ uint8_t map13; /**/ uint8_t irq_clear; /**/ uint8_t irq_disable; + uint8_t irq_latch; uint8_t no_wrap; } crtc; @@ -305,6 +307,8 @@ class vga_device : public device_t address_space_config m_atc_space_config; bool m_ioas = false; + + devcb_write_line m_vsync_cb; private: uint32_t start_addr(); }; diff --git a/src/emu/digfx.cpp b/src/emu/digfx.cpp index c0b25c69b22f0..31f8721677500 100644 --- a/src/emu/digfx.cpp +++ b/src/emu/digfx.cpp @@ -98,6 +98,24 @@ void device_gfx_interface::interface_post_start() } +//------------------------------------------------- +// interface_post_load - mark RAM-based entries +// dirty after loading save state +//------------------------------------------------- + +void device_gfx_interface::interface_post_load() +{ + if (!m_gfxdecodeinfo) + return; + + for (int curgfx = 0; curgfx < MAX_GFX_ELEMENTS && m_gfxdecodeinfo[curgfx].gfxlayout != nullptr; curgfx++) + { + if (GFXENTRY_ISRAM(m_gfxdecodeinfo[curgfx].flags)) + m_gfx[curgfx]->mark_all_dirty(); + } +} + + //------------------------------------------------- // decode_gfx - parse gfx decode info and // create gfx elements @@ -106,7 +124,7 @@ void device_gfx_interface::interface_post_start() void device_gfx_interface::decode_gfx(const gfx_decode_entry *gfxdecodeinfo) { // skip if nothing to do - if (gfxdecodeinfo == nullptr) + if (!gfxdecodeinfo) return; // local variables to hold mutable copies of gfx layout data @@ -298,9 +316,9 @@ void device_gfx_interface::interface_validity_check(validity_checker &valid) con return; // validate graphics decoding entries - for (int gfxnum = 0; gfxnum < MAX_GFX_ELEMENTS && m_gfxdecodeinfo[gfxnum].gfxlayout != nullptr; gfxnum++) + for (int curgfx = 0; curgfx < MAX_GFX_ELEMENTS && m_gfxdecodeinfo[curgfx].gfxlayout != nullptr; curgfx++) { - const gfx_decode_entry &gfx = m_gfxdecodeinfo[gfxnum]; + const gfx_decode_entry &gfx = m_gfxdecodeinfo[curgfx]; const gfx_layout &layout = *gfx.gfxlayout; // currently we are unable to validate RAM-based entries @@ -316,7 +334,7 @@ void device_gfx_interface::interface_validity_check(validity_checker &valid) con u32 region_length = valid.region_length(gfxregion.c_str()); if (region_length == 0) - osd_printf_error("gfx[%d] references nonexistent region '%s'\n", gfxnum, gfxregion); + osd_printf_error("gfx[%d] references nonexistent region '%s'\n", curgfx, gfxregion); // if we have a valid region, and we're not using auto-sizing, check the decode against the region length else if (!IS_FRAC(layout.total)) @@ -336,7 +354,7 @@ void device_gfx_interface::interface_validity_check(validity_checker &valid) con // if not, this is an error if ((start + len) / 8 > avail) - osd_printf_error("gfx[%d] extends past allocated memory of region '%s'\n", gfxnum, region); + osd_printf_error("gfx[%d] extends past allocated memory of region '%s'\n", curgfx, region); } } @@ -347,9 +365,9 @@ void device_gfx_interface::interface_validity_check(validity_checker &valid) con if (layout.planeoffset[0] == GFX_RAW) { if (layout.total != RGN_FRAC(1,1)) - osd_printf_error("gfx[%d] RAW layouts can only be RGN_FRAC(1,1)\n", gfxnum); + osd_printf_error("gfx[%d] RAW layouts can only be RGN_FRAC(1,1)\n", curgfx); if (xscale != 1 || yscale != 1) - osd_printf_error("gfx[%d] RAW layouts do not support xscale/yscale\n", gfxnum); + osd_printf_error("gfx[%d] RAW layouts do not support xscale/yscale\n", curgfx); } // verify traditional decode doesn't have too many planes, @@ -357,11 +375,11 @@ void device_gfx_interface::interface_validity_check(validity_checker &valid) con else { if (layout.planes > MAX_GFX_PLANES) - osd_printf_error("gfx[%d] planes > %d\n", gfxnum, MAX_GFX_PLANES); + osd_printf_error("gfx[%d] planes > %d\n", curgfx, MAX_GFX_PLANES); if (layout.width > MAX_GFX_SIZE && layout.extxoffs == nullptr) - osd_printf_error("gfx[%d] width > %d but missing extended xoffset info\n", gfxnum, MAX_GFX_SIZE); + osd_printf_error("gfx[%d] width > %d but missing extended xoffset info\n", curgfx, MAX_GFX_SIZE); if (layout.height > MAX_GFX_SIZE && layout.extyoffs == nullptr) - osd_printf_error("gfx[%d] height > %d but missing extended yoffset info\n", gfxnum, MAX_GFX_SIZE); + osd_printf_error("gfx[%d] height > %d but missing extended yoffset info\n", curgfx, MAX_GFX_SIZE); } } } diff --git a/src/emu/digfx.h b/src/emu/digfx.h index c6d65566a0641..8c18c1f37dae5 100644 --- a/src/emu/digfx.h +++ b/src/emu/digfx.h @@ -72,7 +72,7 @@ const gfx_layout name = { width, height, RGN_FRAC(1,1), 8, { GFX_RAW }, { 0 }, { #define STEP2048(START,STEP) STEP1024(START,STEP),STEP1024((START)+1024*(STEP),STEP) #define STEP2_INV(START,STEP) (START)+(STEP),(START) -#define STEP4_INV(START,STEP) STEP2_INV(START+2*STEP,STEP),STEP2_INV(START,STEP) +#define STEP4_INV(START,STEP) STEP2_INV(START+2*STEP,STEP),STEP2_INV(START,STEP) //************************************************************************** // GRAPHICS INFO MACROS @@ -186,17 +186,18 @@ class device_gfx_interface : public device_interface virtual void interface_validity_check(validity_checker &valid) const override; virtual void interface_pre_start() override; virtual void interface_post_start() override; + virtual void interface_post_load() override; private: - optional_device m_palette; // configured tag for palette device - std::unique_ptr m_gfx[MAX_GFX_ELEMENTS]; // array of pointers to graphic sets + optional_device m_palette; // configured tag for palette device + std::unique_ptr m_gfx[MAX_GFX_ELEMENTS]; // array of pointers to graphic sets // configuration - const gfx_decode_entry * m_gfxdecodeinfo; // pointer to array of gfx decode information - bool m_palette_is_disabled; // no palette associated with this gfx decode + const gfx_decode_entry * m_gfxdecodeinfo; // pointer to array of gfx decode information + bool m_palette_is_disabled; // no palette associated with this gfx decode // internal state - bool m_decoded; // have we processed our decode info yet? + bool m_decoded; // have we processed our decode info yet? }; // iterator diff --git a/src/emu/drawgfx.cpp b/src/emu/drawgfx.cpp index 8a63d71467cb2..d7648483f2104 100644 --- a/src/emu/drawgfx.cpp +++ b/src/emu/drawgfx.cpp @@ -66,63 +66,61 @@ gfxdecode_device::gfxdecode_device(const machine_config &mconfig, const char *ta - /*************************************************************************** GRAPHICS ELEMENTS ***************************************************************************/ - //------------------------------------------------- // gfx_element - constructor //------------------------------------------------- -gfx_element::gfx_element(device_palette_interface *palette, u8 *base, u16 width, u16 height, u32 rowbytes, u32 total_colors, u32 color_base, u32 color_granularity) - : m_palette(palette), - m_width(width), - m_height(height), - m_startx(0), - m_starty(0), - m_origwidth(width), - m_origheight(height), - m_total_elements(1), - m_color_base(color_base), - m_color_depth(color_granularity), - m_color_granularity(color_granularity), - m_total_colors((total_colors - color_base) / color_granularity), - m_line_modulo(rowbytes), - m_char_modulo(0), - m_srcdata(base), - m_dirtyseq(1), - m_gfxdata(base), - m_layout_is_raw(true), - m_layout_planes(0), - m_layout_xormask(0), - m_layout_charincrement(0) -{ -} - -gfx_element::gfx_element(device_palette_interface *palette, const gfx_layout &gl, const u8 *srcdata, u32 xormask, u32 total_colors, u32 color_base) - : m_palette(palette), - m_width(0), - m_height(0), - m_startx(0), - m_starty(0), - m_origwidth(0), - m_origheight(0), - m_total_elements(0), - m_color_base(color_base), - m_color_depth(0), - m_color_granularity(0), - m_total_colors(total_colors), - m_line_modulo(0), - m_char_modulo(0), - m_srcdata(nullptr), - m_dirtyseq(1), - m_gfxdata(nullptr), - m_layout_is_raw(false), - m_layout_planes(0), - m_layout_xormask(xormask), - m_layout_charincrement(0) +gfx_element::gfx_element(device_palette_interface *palette, u8 *base, u16 width, u16 height, u32 rowbytes, u32 total_colors, u32 color_base, u32 color_granularity) : + m_palette(palette), + m_width(width), + m_height(height), + m_startx(0), + m_starty(0), + m_origwidth(width), + m_origheight(height), + m_total_elements(1), + m_color_base(color_base), + m_color_depth(color_granularity), + m_color_granularity(color_granularity), + m_total_colors((total_colors - color_base) / color_granularity), + m_line_modulo(rowbytes), + m_char_modulo(0), + m_srcdata(base), + m_dirtyseq(1), + m_gfxdata(base), + m_layout_is_raw(true), + m_layout_planes(0), + m_layout_xormask(0), + m_layout_charincrement(0) +{ +} + +gfx_element::gfx_element(device_palette_interface *palette, const gfx_layout &gl, const u8 *srcdata, u32 xormask, u32 total_colors, u32 color_base) : + m_palette(palette), + m_width(0), + m_height(0), + m_startx(0), + m_starty(0), + m_origwidth(0), + m_origheight(0), + m_total_elements(0), + m_color_base(color_base), + m_color_depth(0), + m_color_granularity(0), + m_total_colors(total_colors), + m_line_modulo(0), + m_char_modulo(0), + m_srcdata(nullptr), + m_dirtyseq(1), + m_gfxdata(nullptr), + m_layout_is_raw(false), + m_layout_planes(0), + m_layout_xormask(xormask), + m_layout_charincrement(0) { // set the layout set_layout(gl, srcdata); diff --git a/src/emu/drawgfx.h b/src/emu/drawgfx.h index 4b5be8a4fa38c..d28024bb442a6 100644 --- a/src/emu/drawgfx.h +++ b/src/emu/drawgfx.h @@ -538,8 +538,8 @@ class gfxdecode_device : public device_t, public device_gfx_interface public: // construction/destruction template - gfxdecode_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&palette_tag, const gfx_decode_entry *gfxinfo) - : gfxdecode_device(mconfig, tag, owner, 0) + gfxdecode_device(const machine_config &mconfig, const char *tag, device_t *owner, T &&palette_tag, const gfx_decode_entry *gfxinfo) : + gfxdecode_device(mconfig, tag, owner, 0) { set_palette(std::forward(palette_tag)); set_info(gfxinfo); @@ -547,7 +547,7 @@ class gfxdecode_device : public device_t, public device_gfx_interface gfxdecode_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); protected: - virtual void device_start() override {} + virtual void device_start() override { } }; #endif // MAME_EMU_DRAWGFX_H diff --git a/src/emu/tilemap.cpp b/src/emu/tilemap.cpp index 1aa18eef168aa..8c4e20e158fdc 100644 --- a/src/emu/tilemap.cpp +++ b/src/emu/tilemap.cpp @@ -1556,6 +1556,10 @@ void tilemap_t::draw_debug(screen_device &screen, bitmap_rgb32 &dest, u32 scroll void tilemap_t::get_info_debug(u32 col, u32 row, u8 &gfxnum, u32 &code, u32 &color) { // first map to the memory index + if (m_attributes & TILEMAP_FLIPX) + col = (m_cols - 1) - col; + if (m_attributes & TILEMAP_FLIPY) + row = (m_rows - 1) - row; tilemap_memory_index memindex = memory_index(col, row); // next invoke the get info callback diff --git a/src/emu/xtal.cpp b/src/emu/xtal.cpp index 9d5f4f55a5a8b..e5536621d0849 100644 --- a/src/emu/xtal.cpp +++ b/src/emu/xtal.cpp @@ -198,6 +198,7 @@ const double XTAL::known_xtals[] = { 10'920'000, // 10.92_MHz_XTAL ADDS Viewpoint 60, Viewpoint A2 11'000'000, // 11_MHz_XTAL Mario I8039 sound 11'004'000, // 11.004_MHz_XTAL TI 911 VDT + 11'055'000, // 11.055_MHz_XTAL Atari Tank 8 11'059'200, // 11.0592_MHz_XTAL Used with MCS-51 to generate common baud rates 11'200'000, // 11.2_MHz_XTAL New York, New York 11'289'000, // 11.289_MHz_XTAL Vanguard diff --git a/src/frontend/mame/ui/analogipt.cpp b/src/frontend/mame/ui/analogipt.cpp index 14b09f9c23d79..b126d22cfec39 100644 --- a/src/frontend/mame/ui/analogipt.cpp +++ b/src/frontend/mame/ui/analogipt.cpp @@ -487,6 +487,7 @@ bool menu_analog::handle(event const *ev) { item_data &data(*reinterpret_cast(ev->itemref)); int newval(data.cur); + bool const ctrl_pressed = machine().input().code_pressed(KEYCODE_LCONTROL) || machine().input().code_pressed(KEYCODE_RCONTROL); switch (ev->iptkey) { @@ -503,12 +504,12 @@ bool menu_analog::handle(event const *ev) // left decrements case IPT_UI_LEFT: - newval -= machine().input().code_pressed(KEYCODE_LSHIFT) ? 10 : 1; + newval -= ctrl_pressed ? 10 : 1; break; // right increments case IPT_UI_RIGHT: - newval += machine().input().code_pressed(KEYCODE_LSHIFT) ? 10 : 1; + newval += ctrl_pressed ? 10 : 1; break; // move to first item for previous device diff --git a/src/lib/formats/all.cpp b/src/lib/formats/all.cpp index 80d5930e37bd0..bab86919cb727 100644 --- a/src/lib/formats/all.cpp +++ b/src/lib/formats/all.cpp @@ -320,6 +320,10 @@ #include "guab_dsk.h" #endif +#ifdef HAS_FORMATS_H17D_DSK +#include "h17disk.h" +#endif + #ifdef HAS_FORMATS_H8_CAS #include "h8_cas.h" #endif @@ -1530,4 +1534,9 @@ void mame_formats_full_list(mame_formats_enumerator &en) #ifdef HAS_FORMATS_X07_CAS en.add(x07_cassette_formats); // x07_cas.h #endif + + en.category("Heath"); +#ifdef HAS_FORMATS_H17D_DSK + en.add(FLOPPY_H17D_FORMAT); // h17disk.h +#endif } diff --git a/src/lib/formats/h17disk.cpp b/src/lib/formats/h17disk.cpp new file mode 100644 index 0000000000000..47d164fda1d77 --- /dev/null +++ b/src/lib/formats/h17disk.cpp @@ -0,0 +1,246 @@ +// license:BSD-3-Clause +// copyright-holders:Mark Garlanger +/********************************************************************* + +Heath H17D disk image format (version 2.0.0) + + Format for Heath hard-sectored 5.25" disk images. + + See https://heathkit.garlanger.com/diskformats/ for more information + + TODO - implement writing to H17D image + +*********************************************************************/ + +#include "h17disk.h" +#include "ioprocs.h" +#include "imageutl.h" + +#include + +static constexpr int TRACK_SIZE = 50'000; +static constexpr int BITCELL_SIZE = 4000; + +static constexpr int SECTOR_METADATA_SIZE = 16; + +static constexpr int SECTOR_DATA_SIZE = 256; +static constexpr int SECTORS_PER_TRACK = 10; + + +heath_h17d_format::heath_h17d_format() : floppy_image_format_t() +{ +} + +struct format { + int head_count; + int track_count; + uint32_t variant; +}; + +static const format formats[] = { + { 1, 40, floppy_image::SSSD10 }, // H-17-1 + { 2, 40, floppy_image::DSSD10 }, + { 1, 80, floppy_image::SSQD10 }, + { 2, 80, floppy_image::DSQD10 }, // H-17-4 + {} +}; + +struct block_header { + uint32_t block_name; + uint32_t length; +}; + +enum { + DskF = 0x466b7344, //!< "DskF", Disk Format + Parm = 0x6b726150, //!< "Parm", Parameters + Date = 0x65746144, //!< "Date", Date + Imgr = 0x72676d49, //!< "Imgr", Imager + + Prog = 0x676f7250, //!< "Prog", Program (creation) + Padd = 0x64646150, //!< "Padd", Padding + H8DB = 0x42443848, //!< "H8DB", H8D data block + SecM = 0x4d636553, //!< "SecM", Sector Metadata + Labl = 0x6c62614c, //!< "Labl", Label + Comm = 0x6d6d6f43, //!< "Comm", Comment +}; + +static std::pair find_block(util::random_read &io, uint32_t block_id) +{ + LOG_FORMATS("find_block: 0x%x\n", block_id); + + // start of file + int pos = 0; + block_header header = { 0, 0 }; + + do + { + pos += header.length + 8; + auto const [err, actual] = read_at(io, pos, (void *) &header, 8); + if (err || actual !=8) + { + return std::make_pair(0, 0); + } + header.length = swapendian_int32(header.length); + } + while (header.block_name != block_id); + + // update position to point to data portion of the block + return std::make_pair(pos + 8, header.length); +} + +static format find_format(util::random_read &io) +{ + auto const [pos, length] = find_block(io, DskF); + if ((pos == 0) || (length < 2) || (length > 3)) + { + LOG_FORMATS("Can't find valid DskF block %d/%d\n", pos, length); + + return {}; + } + + uint8_t buf[3]; + + auto const [err, actual] = read_at(io, pos, buf, length); + if (err || (actual != length)) + { + LOG_FORMATS("read error\n"); + + return {}; + } + + int head_count = buf[0]; + int track_count = buf[1]; + + for (int i = 0; formats[i].head_count; i++) + { + if ((formats[i].head_count == head_count) && (formats[i].track_count == track_count)) + { + LOG_FORMATS("find_format format found: %d - variant: 0x%x\n", i, formats[i].variant); + + return formats[i]; + } + } + + LOG_FORMATS("Invalid disk format - heads: %d, tracks: %d\n", head_count, track_count); + return {}; +} + +int heath_h17d_format::identify(util::random_read &io, uint32_t form_factor, const std::vector &variants) const +{ + uint8_t h[4]; + auto const [err, actual] = read_at(io, 0, h, 4); + + if (err || (actual != 4)) + { + return 0; + } + + // Verify "H17D" Signature. + if ((h[0] == 0x48) && (h[1] == 0x31) && (h[2] == 0x37) && (h[3] == 0x44)) + { + return FIFID_SIGN; + } + + return 0; +} + +bool heath_h17d_format::load(util::random_read &io, uint32_t form_factor, const std::vector &variants, floppy_image &image) const +{ + const format fmt = find_format(io); + + if (!fmt.head_count) + { + LOG_FORMATS("invalid format\n"); + + return false; + } + + image.set_variant(fmt.variant); + + std::vector buf; + + auto const [secm_pos, secm_length] = find_block(io, SecM); + + uint8_t sector_meta_data[SECTOR_METADATA_SIZE]; + uint8_t sector_data[SECTOR_DATA_SIZE]; + + for (int head = 0; head < fmt.head_count; head++) + { + for (int track = 0; track < fmt.track_count; track++) + { + for (int sector = 0; sector < SECTORS_PER_TRACK; sector++) + { + int sect_meta_pos = (sector + (track * fmt.head_count + head) * SECTORS_PER_TRACK) * SECTOR_METADATA_SIZE + secm_pos; + + auto const [err, actual] = read_at(io, sect_meta_pos, sector_meta_data, SECTOR_METADATA_SIZE); + + if (err || (actual != SECTOR_METADATA_SIZE)) + { + LOG_FORMATS("unable to read sect meta data %d/%d/%d\n", head, track, sector); + + return false; + } + int data_offset = sector_meta_data[0] << 24 | sector_meta_data[1] << 16 | sector_meta_data[2] << 8 | sector_meta_data[3]; + + auto const [err2, actual2] = read_at(io, data_offset, sector_data, SECTOR_DATA_SIZE); + + if (err2 || (actual2 != SECTOR_DATA_SIZE)) + { + LOG_FORMATS("unable to read sect data %d/%d/%d\n", head, track, sector); + + return false; + } + + // Inital 15 zero bytes + for (int i = 0; i < 15; i++) + { + fm_reverse_byte_w(buf, 0); + } + + // header (sync byte, volume, track, sector, checksum) + for (int i = 0; i < 5; i++) + { + fm_reverse_byte_w(buf, sector_meta_data[5 + i]); + } + + // 12 zero bytes + for (int i = 0; i < 12; i++) + { + fm_reverse_byte_w(buf, 0); + } + + // data sync byte + fm_reverse_byte_w(buf, sector_meta_data[10]); + + // sector data + for (int i = 0; i < 256; i++) + { + fm_reverse_byte_w(buf, sector_data[i]); + } + + // sector data checksum + fm_reverse_byte_w(buf, sector_meta_data[11]); + + // trailing zero's until the next sector hole usually ~ 30 characters. + while (buf.size() < TRACK_SIZE / SECTORS_PER_TRACK * (sector + 1)) + { + fm_reverse_byte_w(buf, 0); + } + } + + generate_track_from_levels(track, head, buf, 0, image); + buf.clear(); + } + } + + return true; +} + +void heath_h17d_format::fm_reverse_byte_w(std::vector &buffer, uint8_t val) const +{ + static unsigned char lookup[16] = { 0x0, 0x8, 0x4, 0xc, 0x2, 0xa, 0x6, 0xe, 0x1, 0x9, 0x5, 0xd, 0x3, 0xb, 0x7, 0xf }; + + fm_w(buffer, 8, lookup[val & 0x0f] << 4 | lookup[val >> 4], BITCELL_SIZE); +} + +const heath_h17d_format FLOPPY_H17D_FORMAT; diff --git a/src/lib/formats/h17disk.h b/src/lib/formats/h17disk.h new file mode 100644 index 0000000000000..19ac0bac0526b --- /dev/null +++ b/src/lib/formats/h17disk.h @@ -0,0 +1,38 @@ +// license:BSD-3-Clause +// copyright-holders:Mark Garlanger +/********************************************************************* + +Heath h17disk disk image format + +The Heath hard-sectored disk format for the H8 and H89 systems with the +H17 controller on the H8 and the H-88-1 controller on the H89. + +*********************************************************************/ +#ifndef MAME_FORMATS_H17DISK_H +#define MAME_FORMATS_H17DISK_H + +#pragma once + +#include "flopimg.h" + +class heath_h17d_format : public floppy_image_format_t +{ +public: + heath_h17d_format(); + + int identify(util::random_read &io, uint32_t form_factor, const std::vector &variants) const override; + bool load(util::random_read &io, uint32_t form_factor, const std::vector &variants, floppy_image &image) const override; + + const char *name() const noexcept override { return "h17disk"; } + const char *description() const noexcept override { return "Heath H17D disk image"; } + const char *extensions() const noexcept override { return "h17,h17d,h17disk"; } + bool supports_save() const noexcept override { return false; } + +protected: + + void fm_reverse_byte_w(std::vector &buffer, uint8_t val) const; +}; + +extern const heath_h17d_format FLOPPY_H17D_FORMAT; + +#endif // MAME_FORMATS_H17DISK_H diff --git a/src/lib/util/coretmpl.h b/src/lib/util/coretmpl.h index 55313a4a0f565..87f8cfbf09e3f 100644 --- a/src/lib/util/coretmpl.h +++ b/src/lib/util/coretmpl.h @@ -654,7 +654,7 @@ template constexpr T bitswap(T val, U b, /// bit of the input. Specify bits in the order they should appear in /// the output field, from most significant to least significant. /// \return The extracted bits packed into a right-aligned field. -template T bitswap(T val, U... b) noexcept +template constexpr T bitswap(T val, U... b) noexcept { static_assert(sizeof...(b) == B, "wrong number of bits"); static_assert((sizeof(std::remove_reference_t) * 8) >= B, "return type too small for result"); diff --git a/src/mame/alliedleisure/ace.cpp b/src/mame/alliedleisure/ace.cpp index f38ec2ca14266..4c2594f045408 100644 --- a/src/mame/alliedleisure/ace.cpp +++ b/src/mame/alliedleisure/ace.cpp @@ -68,16 +68,17 @@ class aceal_state : public driver_device void ace(machine_config &config); +protected: + virtual void machine_start() override ATTR_COLD; + virtual void machine_reset() override ATTR_COLD; + virtual void video_start() override ATTR_COLD; + private: void ace_objpos_w(offs_t offset, uint8_t data); void ace_characterram_w(offs_t offset, uint8_t data); void ace_scoreram_w(offs_t offset, uint8_t data); uint8_t unk_r(); - virtual void machine_start() override ATTR_COLD; - virtual void machine_reset() override ATTR_COLD; - virtual void video_start() override ATTR_COLD; uint32_t screen_update_ace(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void ace_postload(); void main_map(address_map &map) ATTR_COLD; required_device m_maincpu; @@ -301,24 +302,15 @@ static const gfx_layout scorelayout = static GFXDECODE_START( gfx_ace ) GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 2 ) - GFXDECODE_ENTRY( nullptr, 0x8000, charlayout0, 0, 2 ) /* the game dynamically modifies this */ - GFXDECODE_ENTRY( nullptr, 0x8000, charlayout1, 0, 2 ) /* the game dynamically modifies this */ - GFXDECODE_ENTRY( nullptr, 0x8000, charlayout2, 0, 2 ) /* the game dynamically modifies this */ - GFXDECODE_ENTRY( nullptr, 0x8000, scorelayout, 0, 2 ) /* the game dynamically modifies this */ + GFXDECODE_RAM( nullptr, 0x8000, charlayout0, 0, 2 ) + GFXDECODE_RAM( nullptr, 0x8000, charlayout1, 0, 2 ) + GFXDECODE_RAM( nullptr, 0x8000, charlayout2, 0, 2 ) + GFXDECODE_RAM( nullptr, 0x8000, scorelayout, 0, 2 ) GFXDECODE_END -void aceal_state::ace_postload() -{ - m_gfxdecode->gfx(1)->mark_dirty(0); - m_gfxdecode->gfx(2)->mark_dirty(0); - m_gfxdecode->gfx(3)->mark_dirty(0); - m_gfxdecode->gfx(4)->mark_dirty(0); -} - void aceal_state::machine_start() { save_item(NAME(m_objpos)); - machine().save().register_postload(save_prepost_delegate(FUNC(aceal_state::ace_postload), this)); } void aceal_state::machine_reset() diff --git a/src/mame/amiga/agnus_copper.cpp b/src/mame/amiga/agnus_copper.cpp index d321ae70cf72e..688ebf6c5c57a 100644 --- a/src/mame/amiga/agnus_copper.cpp +++ b/src/mame/amiga/agnus_copper.cpp @@ -92,6 +92,7 @@ void agnus_copper_device::device_start() save_item(NAME(m_pc)); save_item(NAME(m_state_waiting)); save_item(NAME(m_state_waitblit)); + save_item(NAME(m_state_skipping)); save_item(NAME(m_waitval)); save_item(NAME(m_waitmask)); save_item(NAME(m_pending_data)); @@ -202,6 +203,7 @@ inline void agnus_copper_device::set_pc(u8 ch, bool is_sync) { m_pc = m_lc[ch]; m_state_waiting = false; + m_state_skipping = false; LOGPC("%s: COPJMP%d new PC = %08x%s\n" , machine().describe_context() , ch + 1 @@ -309,22 +311,25 @@ int agnus_copper_device::execute_next(int xpos, int ypos, bool is_blitter_busy, word0 = (word0 >> 1) & 0xff; if (word0 >= m_cdang_setting) { - if (delay[word0] == 0) + // SKIP applies to valid MOVEs only + // - apocalyps (gameplay) + if (m_state_skipping) { - //LOGCHIPSET("%02X.%02X: Write to %s = %04x\n", ypos, xpos / 2, s_custom_reg_names[word0 & 0xff], word1); - LOGCHIPSET("%02X.%02X: MOVE $dff%03x = %04x\n", - ypos, - xpos / 2, - word0 << 1, - word1 - ); - m_host_space->write_word(0xdff000 | (word0 << 1), word1); - } - else // additional 2 cycles needed for non-Agnus registers - { - m_pending_offset = word0; - m_pending_data = word1; + LOGINST(" (Ignored)\n"); + m_state_skipping = false; + // TODO: verify timings + // may depend on num of planes enabled (move_offset) or opcode fetch above is enough. + xpos += COPPER_CYCLES_TO_PIXELS(2); + return xpos; } + // delay write to the next available DMA slot if not in blanking area + // - bchvolly (title), suprfrog & abreed (bottom playfield rows) + const bool horizontal_blank = xpos < 0x47; + const int move_offset = horizontal_blank ? 0 : std::max(num_planes - 4, 0); + + m_pending_offset = word0; + m_pending_data = word1; + xpos += COPPER_CYCLES_TO_PIXELS(move_offset); } /* illegal writes suspend until next frame */ @@ -336,6 +341,7 @@ int agnus_copper_device::execute_next(int xpos, int ypos, bool is_blitter_busy, m_waitmask = 0xffff; m_state_waitblit = false; m_state_waiting = true; + m_state_skipping = false; return 511; } @@ -351,7 +357,8 @@ int agnus_copper_device::execute_next(int xpos, int ypos, bool is_blitter_busy, /* handle a wait */ if ((word1 & 1) == 0) { - const int wait_offset = std::max(num_planes - 4, 0) + 1; + const bool horizontal_blank = xpos < 0x47; + const int wait_offset = horizontal_blank ? 0 : std::max(num_planes - 4, 0) + 1; LOGINST(" WAIT %04x & %04x (currently %04x, num planes %d +%d)\n", m_waitval, @@ -361,6 +368,7 @@ int agnus_copper_device::execute_next(int xpos, int ypos, bool is_blitter_busy, wait_offset ); + m_state_skipping = false; m_state_waiting = true; xpos += COPPER_CYCLES_TO_PIXELS(wait_offset); } @@ -369,23 +377,15 @@ int agnus_copper_device::execute_next(int xpos, int ypos, bool is_blitter_busy, else { int curpos = (ypos << 8) | (xpos >> 1); + m_state_skipping = ((curpos & m_waitmask) >= (m_waitval & m_waitmask) + && (!m_state_waitblit || !(is_blitter_busy))); - LOGINST(" SKIP %04x & %04x (currently %04x)\n", + LOGINST(" SKIP %04x & %04x (currently %04x) - %s\n", m_waitval, m_waitmask, - (ypos << 8) | (xpos >> 1) + (ypos << 8) | (xpos >> 1), + m_state_skipping ? "Skipping" : "Not skipped" ); - - /* if we're past the wait time, stop it and hold up 2 cycles */ - if ((curpos & m_waitmask) >= (m_waitval & m_waitmask) && - (!m_state_waitblit || !(is_blitter_busy))) - { - LOGINST(" Skipped\n"); - - /* count the cycles it out have taken to fetch the next instruction */ - m_pc += 4; - xpos += COPPER_CYCLES_TO_PIXELS(2); - } } } diff --git a/src/mame/amiga/agnus_copper.h b/src/mame/amiga/agnus_copper.h index c60ab18c9802f..06b0c866047aa 100644 --- a/src/mame/amiga/agnus_copper.h +++ b/src/mame/amiga/agnus_copper.h @@ -63,35 +63,12 @@ class agnus_copper_device : public device_t // internal state bool m_state_waiting; + bool m_state_skipping; bool m_state_waitblit; u16 m_waitval; u16 m_waitmask; u16 m_pending_offset; u16 m_pending_data; - - // waitstate delays for copper - // basically anything that doesn't belong to Angus has a penalty for Copper - static constexpr u16 delay[256] = - { - 1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,1,1,1,0,0,0,0,0,0,0,0, /* 0x000 - 0x03e */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0x040 - 0x05e */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0x060 - 0x07e */ - 0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0, /* 0x080 - 0x09e */ - 1,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0, /* 0x0a0 - 0x0de */ - /* BPLxPTH/BPLxPTL */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0x0e0 - 0x0fe */ - /* BPLCON0-3,BPLMOD1-2 */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0x100 - 0x11e */ - /* SPRxPTH/SPRxPTL */ - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 0x120 - 0x13e */ - /* SPRxPOS/SPRxCTL/SPRxDATA/SPRxDATB */ - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 0x140 - 0x17e */ - /* COLORxx */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0x180 - 0x1be */ - /* RESERVED */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* 0x1c0 - 0x1fe */ - }; - }; diff --git a/src/mame/amiga/amiga.cpp b/src/mame/amiga/amiga.cpp index 39829d971c0f2..806015f13fedd 100644 --- a/src/mame/amiga/amiga.cpp +++ b/src/mame/amiga/amiga.cpp @@ -13,7 +13,9 @@ ***************************************************************************/ #include "emu.h" + #include "amiga.h" +#include "gayle.h" #include "bus/amiga/keyboard/keyboard.h" #include "bus/amiga/zorro/zorro.h" @@ -23,12 +25,12 @@ #include "cpu/m6502/m6502.h" #include "machine/6525tpi.h" #include "machine/mos6526.h" -#include "machine/gayle.h" #include "machine/dmac.h" #include "machine/nvram.h" #include "machine/i2cmem.h" #include "machine/cr511b.h" #include "machine/rp5c01.h" + #include "softlist.h" #include "speaker.h" @@ -837,7 +839,8 @@ void a2000_state::machine_reset() amiga_state::machine_reset(); // reset zorro devices - m_zorro->reset(); + m_zorro->busrst_w(0); + m_zorro->busrst_w(1); } void a2000_state::zorro2_int2_w(int state) diff --git a/src/mame/amiga/amiga.h b/src/mame/amiga/amiga.h index 0f6c6d1e3073d..5a0f2323bcaea 100644 --- a/src/mame/amiga/amiga.h +++ b/src/mame/amiga/amiga.h @@ -641,7 +641,7 @@ class amiga_state : public driver_device void sprite_dma_reset(int which); void sprite_enable_comparitor(int which, int enable); void fetch_sprite_data(int scanline, int sprite); - void update_sprite_dma(int scanline); + void update_sprite_dma(int scanline, int num); uint32_t interleave_sprite_data(uint16_t lobits, uint16_t hibits); int get_sprite_pixel(int x); uint8_t assemble_odd_bitplanes(int planes, int ebitoffs); @@ -655,7 +655,7 @@ class amiga_state : public driver_device void aga_palette_write(int color_reg, uint16_t data); void aga_fetch_sprite_data(int scanline, int sprite); void aga_render_scanline(bitmap_rgb32 &bitmap, int scanline); - void aga_update_sprite_dma(int scanline); + void aga_update_sprite_dma(int scanline, int num); int aga_get_sprite_pixel(int x); uint8_t aga_assemble_odd_bitplanes(int planes, int obitoffs); uint8_t aga_assemble_even_bitplanes(int planes, int ebitoffs); diff --git a/src/mame/amiga/amiga_m.cpp b/src/mame/amiga/amiga_m.cpp index dadb0ad607703..d529e683e7eec 100644 --- a/src/mame/amiga/amiga_m.cpp +++ b/src/mame/amiga/amiga_m.cpp @@ -136,16 +136,6 @@ const char *const amiga_state::s_custom_reg_names[0x100] = "UNK1F8", "UNK1FA", "FMODE", "UNK1FE" }; -constexpr XTAL amiga_state::CLK_28M_PAL; -constexpr XTAL amiga_state::CLK_7M_PAL; -constexpr XTAL amiga_state::CLK_C1_PAL; -constexpr XTAL amiga_state::CLK_E_PAL; - -constexpr XTAL amiga_state::CLK_28M_NTSC; -constexpr XTAL amiga_state::CLK_7M_NTSC; -constexpr XTAL amiga_state::CLK_C1_NTSC; -constexpr XTAL amiga_state::CLK_E_NTSC; - /************************************* * * Machine reset @@ -175,8 +165,11 @@ void amiga_state::machine_start() void amiga_state::m68k_reset(int state) { - logerror("%s: Executed RESET\n", machine().describe_context()); - machine_reset(); + if (state) + { + logerror("%s: Executed RESET\n", machine().describe_context()); + machine_reset(); + } } void amiga_state::machine_reset() @@ -1418,6 +1411,12 @@ void amiga_state::custom_chip_w(offs_t offset, uint16_t data) popmessage("DSKDAT W %04x",data); break; + case REG_BPL1DAT: + // TODO: bpl1dat serial conversion (Team17 + some demos) + if (data) + popmessage("BPL1DAT W %04x", data); + break; + case REG_DSKSYNC: m_fdc->dsksync_w(data); break; @@ -1536,9 +1535,21 @@ void amiga_state::custom_chip_w(offs_t offset, uint16_t data) case REG_SPR0DATA: case REG_SPR1DATA: case REG_SPR2DATA: case REG_SPR3DATA: case REG_SPR4DATA: case REG_SPR5DATA: case REG_SPR6DATA: case REG_SPR7DATA: + { /* enable comparitor on writes here */ sprite_enable_comparitor((offset - REG_SPR0DATA) / 4, true); break; + } + + case REG_SPR0POS: case REG_SPR1POS: case REG_SPR2POS: case REG_SPR3POS: + case REG_SPR4POS: case REG_SPR5POS: case REG_SPR6POS: case REG_SPR7POS: + { + // a bunch of games override position thru copper + // suprfrog, abreed, brian, jimpower (lives counter) + int which = (offset - REG_SPR0POS) / 4; + m_sprite_dma_reload_mask &= ~(1 << which); + break; + } case REG_DDFSTRT: /* impose hardware limits ( HRM, page 75 ) */ @@ -1679,6 +1690,9 @@ void amiga_state::custom_chip_w(offs_t offset, uint16_t data) { CUSTOM_REG(REG_BEAMCON0) = data; update_screenmode(); + // TODO: variable beam counter, disables hard display stops, enables HTOTAL/VTOTAL programming + if (BIT(data, 7)) + popmessage("BEAMCON0: VARBEAMEN enabled"); } break; diff --git a/src/mame/amiga/amiga_v.cpp b/src/mame/amiga/amiga_v.cpp index a61586312ee7d..557ebd9c419b3 100644 --- a/src/mame/amiga/amiga_v.cpp +++ b/src/mame/amiga/amiga_v.cpp @@ -190,63 +190,62 @@ void amiga_state::fetch_sprite_data(int scanline, int sprite) LOGMASKED(LOG_SPRITE_DMA, "%3d:sprite %d fetch: data=%04X-%04X\n", scanline, sprite, CUSTOM_REG(REG_SPR0DATA + 4 * sprite), CUSTOM_REG(REG_SPR0DATB + 4 * sprite)); } -void amiga_state::update_sprite_dma(int scanline) +void amiga_state::update_sprite_dma(int scanline, int num) { int dmaenable = (CUSTOM_REG(REG_DMACON) & (DMACON_SPREN | DMACON_DMAEN)) == (DMACON_SPREN | DMACON_DMAEN); - int num, maxdma; + int maxdma; /* channels are limited by DDFSTART */ maxdma = (CUSTOM_REG(REG_DDFSTRT) - 0x14) / 4; if (maxdma > 8) maxdma = 8; - /* loop over sprite channels */ - for (num = 0; num < maxdma; num++) - { - int bitmask = 1 << num; - int vstart, vstop; + if (num >= maxdma) + return; - /* if we are == VSTOP, fetch new control words */ - if (dmaenable && (m_sprite_dma_live_mask & bitmask) && (m_sprite_dma_reload_mask & bitmask)) - { - /* disable the sprite */ - m_sprite_comparitor_enable_mask &= ~bitmask; - m_sprite_dma_reload_mask &= ~bitmask; - - /* fetch data into the control words */ - CUSTOM_REG(REG_SPR0POS + 4 * num) = read_chip_ram(CUSTOM_REG_LONG(REG_SPR0PTH + 2 * num) + 0); - CUSTOM_REG(REG_SPR0CTL + 4 * num) = read_chip_ram(CUSTOM_REG_LONG(REG_SPR0PTH + 2 * num) + 2); - CUSTOM_REG_LONG(REG_SPR0PTH + 2 * num) += 4; - LOGMASKED(LOG_SPRITE_DMA, "%3d:sprite %d fetch: pos=%04X ctl=%04X\n", scanline, num, CUSTOM_REG(REG_SPR0POS + 4 * num), CUSTOM_REG(REG_SPR0CTL + 4 * num)); - } + int bitmask = 1 << num; + int vstart, vstop; - /* compute vstart/vstop */ - vstart = (CUSTOM_REG(REG_SPR0POS + 4 * num) >> 8) | ((CUSTOM_REG(REG_SPR0CTL + 4 * num) << 6) & 0x100); - vstop = (CUSTOM_REG(REG_SPR0CTL + 4 * num) >> 8) | ((CUSTOM_REG(REG_SPR0CTL + 4 * num) << 7) & 0x100); + /* if we are == VSTOP, fetch new control words */ + if (dmaenable && (m_sprite_dma_live_mask & bitmask) && (m_sprite_dma_reload_mask & bitmask)) + { + /* disable the sprite */ + m_sprite_comparitor_enable_mask &= ~bitmask; + m_sprite_dma_reload_mask &= ~bitmask; + + /* fetch data into the control words */ + CUSTOM_REG(REG_SPR0POS + 4 * num) = read_chip_ram(CUSTOM_REG_LONG(REG_SPR0PTH + 2 * num) + 0); + CUSTOM_REG(REG_SPR0CTL + 4 * num) = read_chip_ram(CUSTOM_REG_LONG(REG_SPR0PTH + 2 * num) + 2); + CUSTOM_REG_LONG(REG_SPR0PTH + 2 * num) += 4; + LOGMASKED(LOG_SPRITE_DMA, "%3d:sprite %d fetch: pos=%04X ctl=%04X\n", scanline, num, CUSTOM_REG(REG_SPR0POS + 4 * num), CUSTOM_REG(REG_SPR0CTL + 4 * num)); + } - /* if we hit vstart, enable the comparitor */ - if (scanline == vstart) - { - m_sprite_comparitor_enable_mask |= 1 << num; - LOGMASKED(LOG_SPRITE_DMA, "%3d:sprite %d comparitor enable\n", scanline, num); - } + /* compute vstart/vstop */ + vstart = (CUSTOM_REG(REG_SPR0POS + 4 * num) >> 8) | ((CUSTOM_REG(REG_SPR0CTL + 4 * num) << 6) & 0x100); + vstop = (CUSTOM_REG(REG_SPR0CTL + 4 * num) >> 8) | ((CUSTOM_REG(REG_SPR0CTL + 4 * num) << 7) & 0x100); - /* if we hit vstop, disable the comparitor and trigger a reload for the next scanline */ - if (scanline == vstop) - { - m_sprite_ctl_written &= ~bitmask; - m_sprite_comparitor_enable_mask &= ~bitmask; - m_sprite_dma_reload_mask |= 1 << num; - CUSTOM_REG(REG_SPR0DATA + 4 * num) = 0; /* just a guess */ - CUSTOM_REG(REG_SPR0DATB + 4 * num) = 0; - LOGMASKED(LOG_SPRITE_DMA, "%3d:sprite %d comparitor disable, prepare for reload\n", scanline, num); - } + /* if we hit vstart, enable the comparitor */ + if (scanline == vstart) + { + m_sprite_comparitor_enable_mask |= 1 << num; + LOGMASKED(LOG_SPRITE_DMA, "%3d:sprite %d comparitor enable\n", scanline, num); + } - /* fetch data if this sprite is enabled */ - if (dmaenable && (m_sprite_dma_live_mask & bitmask) && (m_sprite_comparitor_enable_mask & bitmask)) - { - fetch_sprite_data(scanline, num); - } + /* if we hit vstop, disable the comparitor and trigger a reload for the next scanline */ + if (scanline == vstop) + { + m_sprite_ctl_written &= ~bitmask; + m_sprite_comparitor_enable_mask &= ~bitmask; + m_sprite_dma_reload_mask |= 1 << num; + CUSTOM_REG(REG_SPR0DATA + 4 * num) = 0; /* just a guess */ + CUSTOM_REG(REG_SPR0DATB + 4 * num) = 0; + LOGMASKED(LOG_SPRITE_DMA, "%3d:sprite %d comparitor disable, prepare for reload\n", scanline, num); + } + + /* fetch data if this sprite is enabled */ + if (dmaenable && (m_sprite_dma_live_mask & bitmask) && (m_sprite_comparitor_enable_mask & bitmask)) + { + fetch_sprite_data(scanline, num); } } @@ -471,6 +470,7 @@ void amiga_state::render_scanline(bitmap_rgb32 &bitmap, int scanline) int hires = 0, dualpf = 0, ham = 0; int pf1pri = 0, pf2pri = 0; int planes = 0; + int raw_scanline = 0; uint32_t *dst = nullptr; int ebitoffs = 0, obitoffs = 0; @@ -522,11 +522,7 @@ void amiga_state::render_scanline(bitmap_rgb32 &bitmap, int scanline) } } - /* update sprite data fetching */ - // ensure this happens once every two scanlines for the RAM manipulation, kickoff cares - // this is also unaffected by LACE - if ((scanline & 1) == 0) - update_sprite_dma(scanline >> 1); + raw_scanline = scanline; scanline /= 2; @@ -549,8 +545,8 @@ void amiga_state::render_scanline(bitmap_rgb32 &bitmap, int scanline) // - no separation of video and logic models; // - the offsets we are applying to DDFSTRT and DDFSTOP, they mustn't be right (copper timings?); // - ditto for DIW related values, they are offset in far too many places; - // - Twintris intro expects +11 on fast scrolling section (glitches at sides) - for (int x = 0; x < (amiga_state::SCREEN_WIDTH / 2) + 10; x++) + // - Twintris intro/suprfrog expects +11 on fast scrolling section (glitches at sides) + for (int x = 0; x < (amiga_state::SCREEN_WIDTH / 2) + 11; x++) { int sprpix; const bool out_of_beam = x >= amiga_state::SCREEN_WIDTH / 2; @@ -606,6 +602,27 @@ void amiga_state::render_scanline(bitmap_rgb32 &bitmap, int scanline) ecolmask = (CUSTOM_REG(REG_CLXCON) >> 6) & 0x2a; } + /* update sprite data fetching */ + // ensure this happens once every two scanlines for the RAM manipulation, kickoff cares + // this is also unaffected by LACE + // Update: comparison is unnecessary, as per tomato and amiga_cd:bigred cursor pointers (both enabling hires) + //if ((raw_scanline & 1) == 0) + { + const int min_x = 0x18 << 1; + const int max_x = 0x34 << 1; + // TODO: refine + // Sprite DMA loads first two words at $14 + num * 4, other 2 words at $18 + num * 4 + // NOTE: position $28 for sprite 4 has a typo on HRM diagram + // non-zero DMA fetches are required by: + // - beast gameplay, abreed (top left counter) + if (x >= min_x && x <= max_x && (x & 7) == 0) + { + int num = (x - min_x) >> 3; + //printf("%d %02x\n", num, x); + update_sprite_dma(raw_scanline >> 1, num); + } + } + /* clear the target pixels to the background color as a starting point */ if (dst != nullptr && !out_of_beam) { @@ -644,6 +661,7 @@ void amiga_state::render_scanline(bitmap_rgb32 &bitmap, int scanline) sprpix = get_sprite_pixel(x); bitplane_dma_enabled = (CUSTOM_REG(REG_DMACON) & (DMACON_BPLEN | DMACON_DMAEN)) == (DMACON_BPLEN | DMACON_DMAEN); + /* to render, we must have bitplane DMA enabled, at least 1 plane, and be within the */ /* vertical display window */ // TODO: bitplane DMA enabled applies to fetch_bitplane_data only diff --git a/src/mame/amiga/amigaaga.cpp b/src/mame/amiga/amigaaga.cpp index d769782712159..d94333433be79 100644 --- a/src/mame/amiga/amigaaga.cpp +++ b/src/mame/amiga/amigaaga.cpp @@ -153,10 +153,10 @@ void amiga_state::aga_fetch_sprite_data(int scanline, int sprite) m_aga_sprite_dma_used_words[sprite] = 0; } -void amiga_state::aga_update_sprite_dma(int scanline) +void amiga_state::aga_update_sprite_dma(int scanline, int num) { int dmaenable = (CUSTOM_REG(REG_DMACON) & (DMACON_SPREN | DMACON_DMAEN)) == (DMACON_SPREN | DMACON_DMAEN); - int num, maxdma; + int maxdma; const u16 sprctl_offs[4] = {2, 4, 4, 8}; const u16 spr_fmode_inc = sprctl_offs[(CUSTOM_REG(REG_FMODE) >> 2) & 0x03]; @@ -165,63 +165,62 @@ void amiga_state::aga_update_sprite_dma(int scanline) if (maxdma > 8) maxdma = 8; - /* loop over sprite channels */ - for (num = 0; num < maxdma; num++) - { - int bitmask = 1 << num; - int vstart, vstop; + if (num >= maxdma) + return; - /* if we are == VSTOP, fetch new control words */ - if (dmaenable && (m_sprite_dma_live_mask & bitmask) && (m_sprite_dma_reload_mask & bitmask) && !(m_sprite_ctl_written & bitmask)) - { - /* disable the sprite */ - m_sprite_comparitor_enable_mask &= ~bitmask; - m_sprite_dma_reload_mask &= ~bitmask; - - /* fetch data into the control words */ - CUSTOM_REG(REG_SPR0POS + 4 * num) = read_chip_ram(CUSTOM_REG_LONG(REG_SPR0PTH + 2 * num) + 0); - // diggers AGA suggests that the fmode increments with ctl are interleaved, - // otherwise no sprites are drawn. - // (it enables sprite 0 only, and +8 for the vstop values) - CUSTOM_REG(REG_SPR0CTL + 4 * num) = read_chip_ram(CUSTOM_REG_LONG(REG_SPR0PTH + 2 * num) + spr_fmode_inc); - CUSTOM_REG_LONG(REG_SPR0PTH + 2 * num) += 2 * spr_fmode_inc; - LOGMASKED(LOG_SPRITE_DMA, "%3d:sprite %d fetch: pos=%04X ctl=%04X\n", scanline, num, CUSTOM_REG(REG_SPR0POS + 4 * num), CUSTOM_REG(REG_SPR0CTL + 4 * num)); - } + int bitmask = 1 << num; + int vstart, vstop; - u16 spr0ctl = CUSTOM_REG(REG_SPR0CTL + 4 * num); - /* compute vstart/vstop */ - // bits 6 and 5 are respectively vstart bit 9 and vstop bit 9 - // TODO: do they disable with non-AGA modes? - vstart = (CUSTOM_REG(REG_SPR0POS + 4 * num) >> 8); - vstart |= (spr0ctl & 0x04) ? 0x100 : 0; - vstart |= (spr0ctl & 0x40) ? 0x200 : 0; - vstop = (spr0ctl >> 8); - vstop |= (spr0ctl & 0x02) ? 0x100 : 0; - vstop |= (spr0ctl & 0x20) ? 0x200 : 0; - - /* if we hit vstart, enable the comparitor */ - if (scanline == vstart) - { - m_sprite_comparitor_enable_mask |= 1 << num; - LOGMASKED(LOG_SPRITE_DMA, "%3d:sprite %d comparitor enable\n", scanline, num); - } + /* if we are == VSTOP, fetch new control words */ + if (dmaenable && (m_sprite_dma_live_mask & bitmask) && (m_sprite_dma_reload_mask & bitmask) && !(m_sprite_ctl_written & bitmask)) + { + /* disable the sprite */ + m_sprite_comparitor_enable_mask &= ~bitmask; + m_sprite_dma_reload_mask &= ~bitmask; + + /* fetch data into the control words */ + CUSTOM_REG(REG_SPR0POS + 4 * num) = read_chip_ram(CUSTOM_REG_LONG(REG_SPR0PTH + 2 * num) + 0); + // diggers AGA suggests that the fmode increments with ctl are interleaved, + // otherwise no sprites are drawn. + // (it enables sprite 0 only, and +8 for the vstop values) + CUSTOM_REG(REG_SPR0CTL + 4 * num) = read_chip_ram(CUSTOM_REG_LONG(REG_SPR0PTH + 2 * num) + spr_fmode_inc); + CUSTOM_REG_LONG(REG_SPR0PTH + 2 * num) += 2 * spr_fmode_inc; + LOGMASKED(LOG_SPRITE_DMA, "%3d:sprite %d fetch: pos=%04X ctl=%04X\n", scanline, num, CUSTOM_REG(REG_SPR0POS + 4 * num), CUSTOM_REG(REG_SPR0CTL + 4 * num)); + } - /* if we hit vstop, disable the comparitor and trigger a reload for the next scanline */ - if (scanline == vstop) - { - m_sprite_ctl_written &= ~bitmask; - m_sprite_comparitor_enable_mask &= ~bitmask; - m_sprite_dma_reload_mask |= 1 << num; - CUSTOM_REG(REG_SPR0DATA + 4 * num) = 0; /* just a guess */ - CUSTOM_REG(REG_SPR0DATB + 4 * num) = 0; - LOGMASKED(LOG_SPRITE_DMA, "%3d:sprite %d comparitor disable, prepare for reload\n", scanline, num); - } + u16 spr0ctl = CUSTOM_REG(REG_SPR0CTL + 4 * num); + /* compute vstart/vstop */ + // bits 6 and 5 are respectively vstart bit 9 and vstop bit 9 + // TODO: do they disable with non-AGA modes? + vstart = (CUSTOM_REG(REG_SPR0POS + 4 * num) >> 8); + vstart |= (spr0ctl & 0x04) ? 0x100 : 0; + vstart |= (spr0ctl & 0x40) ? 0x200 : 0; + vstop = (spr0ctl >> 8); + vstop |= (spr0ctl & 0x02) ? 0x100 : 0; + vstop |= (spr0ctl & 0x20) ? 0x200 : 0; + + /* if we hit vstart, enable the comparitor */ + if (scanline == vstart) + { + m_sprite_comparitor_enable_mask |= 1 << num; + LOGMASKED(LOG_SPRITE_DMA, "%3d:sprite %d comparitor enable\n", scanline, num); + } - /* fetch data if this sprite is enabled */ - if (dmaenable && (m_sprite_dma_live_mask & bitmask) && (m_sprite_comparitor_enable_mask & bitmask)) - { - aga_fetch_sprite_data(scanline, num); - } + /* if we hit vstop, disable the comparitor and trigger a reload for the next scanline */ + if (scanline == vstop) + { + m_sprite_ctl_written &= ~bitmask; + m_sprite_comparitor_enable_mask &= ~bitmask; + m_sprite_dma_reload_mask |= 1 << num; + CUSTOM_REG(REG_SPR0DATA + 4 * num) = 0; /* just a guess */ + CUSTOM_REG(REG_SPR0DATB + 4 * num) = 0; + LOGMASKED(LOG_SPRITE_DMA, "%3d:sprite %d comparitor disable, prepare for reload\n", scanline, num); + } + + /* fetch data if this sprite is enabled */ + if (dmaenable && (m_sprite_dma_live_mask & bitmask) && (m_sprite_comparitor_enable_mask & bitmask)) + { + aga_fetch_sprite_data(scanline, num); } } @@ -462,6 +461,7 @@ void amiga_state::aga_render_scanline(bitmap_rgb32 &bitmap, int scanline) int hires = 0, dualpf = 0, ham = 0, ehb = 0; int pf1pri = 0, pf2pri = 0; int planes = 0; + int raw_scanline = 0; uint32_t *dst = nullptr; int ebitoffs = 0, obitoffs = 0; @@ -513,14 +513,12 @@ void amiga_state::aga_render_scanline(bitmap_rgb32 &bitmap, int scanline) } } + raw_scanline = scanline; + scanline /= 2; m_last_scanline = scanline; - /* update sprite data fetching */ - // FIXME: verify and apply same logic as per OCS - aga_update_sprite_dma(scanline); - /* all sprites off at the start of the line */ memset(m_sprite_remain, 0, sizeof(m_sprite_remain)); @@ -623,6 +621,20 @@ void amiga_state::aga_render_scanline(bitmap_rgb32 &bitmap, int scanline) ecolmask = (CUSTOM_REG(REG_CLXCON) >> 6) & 0x2a; } + //if ((raw_scanline & 1) == 0) + { + const int min_x = 0x18 << 1; + const int max_x = 0x34 << 1; + + // TODO: refine, merge with OCS version + if (x >= min_x && x <= max_x && (x & 7) == 0) + { + int num = (x - min_x) >> 3; + //printf("%d %02x\n", num, x); + aga_update_sprite_dma(raw_scanline >> 1, num); + } + } + /* clear the target pixels to the background color as a starting point */ if (dst != nullptr && !out_of_beam) dst[x*2+0] = diff --git a/src/mame/amiga/amigaaga.h b/src/mame/amiga/amigaaga.h index 3baeca8cf9b44..0e864480ad3f5 100644 --- a/src/mame/amiga/amigaaga.h +++ b/src/mame/amiga/amigaaga.h @@ -5,6 +5,4 @@ #pragma once -void amiga_aga_palette_write(running_machine &machine, int color_reg, uint16_t data); - #endif // MAME_AMIGA_AMIGAAGA_H diff --git a/src/devices/machine/gayle.cpp b/src/mame/amiga/gayle.cpp similarity index 100% rename from src/devices/machine/gayle.cpp rename to src/mame/amiga/gayle.cpp diff --git a/src/devices/machine/gayle.h b/src/mame/amiga/gayle.h similarity index 97% rename from src/devices/machine/gayle.h rename to src/mame/amiga/gayle.h index 0e846055a098b..07928d091c396 100644 --- a/src/devices/machine/gayle.h +++ b/src/mame/amiga/gayle.h @@ -53,8 +53,8 @@ ***************************************************************************/ -#ifndef MAME_MACHINE_GAYLE_H -#define MAME_MACHINE_GAYLE_H +#ifndef MAME_AMIGA_GAYLE_H +#define MAME_AMIGA_GAYLE_H #pragma once @@ -155,4 +155,4 @@ class gayle_device : public device_t // device type definition DECLARE_DEVICE_TYPE(GAYLE, gayle_device) -#endif // MAME_MACHINE_GAYLE_H +#endif // MAME_AMIGA_GAYLE_H diff --git a/src/mame/amiga/paula.cpp b/src/mame/amiga/paula.cpp index 6b8a38ca0ed54..644599ff89845 100644 --- a/src/mame/amiga/paula.cpp +++ b/src/mame/amiga/paula.cpp @@ -9,11 +9,14 @@ DMA driven audio, the floppy controller, a serial receiver/transmitter, analog inputs and contains the interrupt controller. + References: + - https://www.amigarealm.com/computing/knowledge/hardref/ch5.htm + TODO: - Inherit FDC, serial and irq controller to here; - Move Agnus "location" logic out of here; - - low-pass filter; - - convert volume values to non-linear dB scale (cfr. ) + - low-pass filter control thru Amiga Power LED where available, technically + outside of Paula; - Verify ADKCON modulation; - Verify manual mode: \- AGA roadkill during gameplay, which also has very long period setups, @@ -298,13 +301,12 @@ void paula_device::sound_stream_update(sound_stream &stream, std::vectorvol : nextvol; - int period = (nextper == -1) ? chan->per : nextper; - s32 sample; + s16 volume = (nextvol == -1) ? chan->vol : nextvol; + s16 period = (nextper == -1) ? chan->per : nextper; + s16 sample; int i; // normalize the volume value - // FIXME: definitely not linear volume = (volume & 0x40) ? 64 : (volume & 0x3f); volume *= 4; @@ -333,7 +335,7 @@ void paula_device::sound_stream_update(sound_stream &stream, std::vectorcurticks -= ticks; @@ -341,6 +343,7 @@ void paula_device::sound_stream_update(sound_stream &stream, std::vectorcurticks = period; + // TODO: 123 for PAL machines, derive formula from clock() if (chan->curticks < 124) chan->curticks = 124; @@ -360,11 +363,12 @@ void paula_device::sound_stream_update(sound_stream &stream, std::vectorcurlength == 0) { dma_reload(chan, false); - // reload the data pointer, otherwise aliasing / buzzing outside the given buffer will be heard - // For example: Xenon 2 sets up location=0x63298 length=0x20 + // silence the data pointer, avoid DC offset + // - xenon2 sets up location=0x63298 length=0x20 // for silencing channels on-the-fly without relying on irqs. // Without this the location will read at 0x632d8 (data=0x7a7d), causing annoying buzzing. - chan->dat = m_chipmem_r(chan->curlocation); + // - Ocean games (bchvolly, batmancc) also rely on this + chan->dat = 0; //m_chipmem_r(chan->curlocation); } } diff --git a/src/mame/apple/macadb.cpp b/src/mame/apple/macadb.cpp index d3c3fcdbaf704..c2c0b926712c8 100644 --- a/src/mame/apple/macadb.cpp +++ b/src/mame/apple/macadb.cpp @@ -82,8 +82,9 @@ enum DEFINE_DEVICE_TYPE(MACADB, macadb_device, "macadb", "Mac ADB HLE") static INPUT_PORTS_START( macadb ) - PORT_START("MOUSE0") /* Mouse - button */ - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Mouse Button") PORT_CODE(MOUSECODE_BUTTON1) + PORT_START("MOUSE0") /* Mouse - buttons */ + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1) PORT_NAME("Mouse Button 0") PORT_CODE(MOUSECODE_BUTTON1) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2) PORT_NAME("Mouse Button 1") PORT_CODE(MOUSECODE_BUTTON2) PORT_START("MOUSE1") /* Mouse - X AXIS */ PORT_BIT( 0xff, 0x00, IPT_MOUSE_X) PORT_SENSITIVITY(100) PORT_KEYDELTA(0) PORT_PLAYER(1) @@ -477,7 +478,7 @@ bool macadb_device::adb_pollmouse() { s32 NewX, NewY, NewButton; - NewButton = m_mouse0->read() & 0x01; + NewButton = m_mouse0->read() & 0x03; NewX = m_mouse1->read(); NewY = m_mouse2->read(); @@ -529,7 +530,7 @@ void macadb_device::adb_accummouse(u8 *MouseX, u8 *MouseY ) m_lastmousey = NewY; } - m_lastbutton = m_mouse0->read() & 0x01; + m_lastbutton = m_mouse0->read() & 0x03; *MouseX = (u8)MouseCountX; *MouseY = (u8)MouseCountY; @@ -613,7 +614,8 @@ void macadb_device::adb_talk() //printf("X %x Y %x\n", mouseX, mouseY); m_buffer[0] = (m_lastbutton & 0x01) ? 0x00 : 0x80; m_buffer[0] |= mouseY & 0x7f; - m_buffer[1] = (mouseX & 0x7f) | 0x80; + m_buffer[1] = (m_lastbutton & 0x02) ? 0x00 : 0x80; + m_buffer[1] |= mouseX & 0x7f; if ((m_buffer[0] != m_last_mouse[0]) || (m_buffer[1] != m_last_mouse[1])) { diff --git a/src/mame/apple/macpdm.cpp b/src/mame/apple/macpdm.cpp index fdae8a86ed64e..8ca7b6703a5b3 100644 --- a/src/mame/apple/macpdm.cpp +++ b/src/mame/apple/macpdm.cpp @@ -26,9 +26,12 @@ namespace { -constexpr auto IO_CLOCK = 31.3344_MHz_XTAL; -constexpr auto ENET_CLOCK = 20_MHz_XTAL; -constexpr auto SOUND_CLOCK = 45.1584_MHz_XTAL; +static constexpr auto IO_CLOCK = 31.3344_MHz_XTAL; +static constexpr auto ENET_CLOCK = 20_MHz_XTAL; +static constexpr auto SOUND_CLOCK = 45.1584_MHz_XTAL; + +static constexpr u8 DMA2_IRQ_SND_IN = 0x01; +static constexpr u8 DMA2_IRQ_SND_OUT = 0x02; class macpdm_state : public driver_device { @@ -62,6 +65,8 @@ class macpdm_state : public driver_device uint8_t m_irq_control = 0; + uint8_t m_dma_irq_1, m_dma_irq_2; + uint8_t m_via2_ier = 0, m_via2_ifr = 0, m_via2_sier = 0, m_via2_sifr = 0; uint64_t m_dma_scsi_buffer = 0; @@ -121,7 +126,7 @@ class macpdm_state : public driver_device void fdc_irq(int state); void fdc_drq(int state); - [[maybe_unused]] void sound_irq(int state); + void recalc_dma_irqs(); void scsi_irq(int state); void scsi_drq(int state); @@ -166,8 +171,8 @@ class macpdm_state : public driver_device uint8_t diag_r(offs_t offset); - uint8_t irq_control_r(); - void irq_control_w(uint8_t data); + uint8_t irq_control_r(offs_t offset); + void irq_control_w(offs_t offset, uint8_t data); void irq_main_set(uint8_t mask, int state); void via2_irq_main_set(uint8_t mask, int state); void via2_irq_slot_set(uint8_t mask, int state); @@ -228,19 +233,20 @@ macpdm_state::macpdm_state(const machine_config &mconfig, device_type type, cons m_macadb(*this, "macadb"), m_ram(*this, RAM_TAG), m_scc(*this, "scc"), - m_scsibus(*this, "scsibus"), - m_ncr53c94(*this, "scsibus:7:ncr53c94"), + m_scsibus(*this, "scsi"), + m_ncr53c94(*this, "scsi:7:ncr53c94"), m_fdc(*this, "fdc"), m_floppy(*this, "fdc:%d", 0U), - m_video(*this, "video") + m_video(*this, "video"), + m_dma_irq_1(0), + m_dma_irq_2(0) { m_cur_floppy = nullptr; } void macpdm_state::driver_init() { - m_maincpu->space().install_ram(0, m_ram->mask(), 0x3000000,m_ram->pointer()); - m_maincpu->space().nop_readwrite(m_ram->size(), 0xffffff, 0x3000000); + m_maincpu->space().install_ram(0, m_ram->mask(), 0, m_ram->pointer()); m_model_id = 0xa55a3011; // 7100 = a55a3012 // 8100 = a55a3013 @@ -281,23 +287,6 @@ void macpdm_state::driver_init() save_item(NAME(m_dma_floppy_offset)); save_item(NAME(m_dma_floppy_byte_count)); save_item(NAME(m_floppy_drq)); - - m_maincpu->space().install_read_tap(0x4000c2e0, 0x4000c2e7, 0, "cuda", [this](offs_t offset, u64 &data, u64 mem_mask) { - if(mem_mask == 0xffff000000000000) { - address_space *space; - offs_t badr = m_maincpu->state_int(PPC_R16); - m_maincpu->translate(AS_PROGRAM, device_memory_interface::TR_READ, badr, space); - logerror("cuda packet %08x : type %02x cmd %02x - %02x %02x %02x %02x bytecnt %04x\n", - badr, - space->read_byte(badr), - space->read_byte(badr+1), - space->read_byte(badr+2), - space->read_byte(badr+3), - space->read_byte(badr+4), - space->read_byte(badr+5), - space->read_word(badr+6)); - } - }); } void macpdm_state::driver_reset() @@ -340,22 +329,39 @@ void macpdm_state::driver_reset() m_video->set_vram_base((const u64 *)m_ram->pointer()); m_video->set_vram_offset(0); + + m_maincpu->set_input_line(INPUT_LINE_HALT, ASSERT_LINE); } -uint8_t macpdm_state::irq_control_r() +uint8_t macpdm_state::irq_control_r(offs_t offset) { - return m_irq_control; + switch (offset) + { + case 0x0: + return m_irq_control; + + case 0x8: + return m_dma_irq_1; + + case 0xa: + return m_dma_irq_2; + } + + return 0; } -void macpdm_state::irq_control_w(uint8_t data) +void macpdm_state::irq_control_w(offs_t offset, uint8_t data) { - if((m_irq_control ^ data) & 0x40) { - m_irq_control = (m_irq_control & ~0xc0) | (data & 0x40); - m_maincpu->set_input_line(PPC_IRQ, CLEAR_LINE); - } - if((data & 0xc0) == 0xc0 && (m_irq_control & 0x80)) { - m_irq_control &= 0x7f; - m_maincpu->set_input_line(PPC_IRQ, CLEAR_LINE); + if (offset == 0) + { + if((m_irq_control ^ data) & 0x40) { + m_irq_control = (m_irq_control & ~0xc0) | (data & 0x40); + m_maincpu->set_input_line(PPC_IRQ, CLEAR_LINE); + } + if((data & 0xc0) == 0xc0 && (m_irq_control & 0x80)) { + m_irq_control &= 0x7f; + m_maincpu->set_input_line(PPC_IRQ, CLEAR_LINE); + } } } @@ -652,9 +658,21 @@ void macpdm_state::via1_irq(int state) irq_main_set(0x01, state); } -void macpdm_state::sound_irq(int state) +void macpdm_state::nmi_irq(int state) { - via2_irq_main_set(0x20, state); + irq_main_set(0x20, state); +} + +void macpdm_state::recalc_dma_irqs() +{ + if ((m_dma_irq_1 | m_dma_irq_2) != 0) + { + irq_main_set(0x10, ASSERT_LINE); + } + else + { + irq_main_set(0x10, CLEAR_LINE); + } } void macpdm_state::vblank_irq(int state) @@ -674,12 +692,16 @@ void macpdm_state::slot1_irq(int state) void macpdm_state::sndo_dma_irq(int state) { - // TODO + m_dma_irq_2 &= ~DMA2_IRQ_SND_OUT; + m_dma_irq_2 |= state ? DMA2_IRQ_SND_OUT : 0; + recalc_dma_irqs(); } void macpdm_state::sndi_dma_irq(int state) { - // TODO + m_dma_irq_2 &= ~DMA2_IRQ_SND_IN; + m_dma_irq_2 |= state ? DMA2_IRQ_SND_IN : 0; + recalc_dma_irqs(); } uint32_t macpdm_state::dma_badr_r() @@ -1044,7 +1066,7 @@ void macpdm_state::pdm_map(address_map &map) map(0x50f28000, 0x50f28007).rw(m_video, FUNC(mac_video_sonora_device::vctrl_r), FUNC(mac_video_sonora_device::vctrl_w)); - map(0x50f2a000, 0x50f2a000).rw(FUNC(macpdm_state::irq_control_r), FUNC(macpdm_state::irq_control_w)); + map(0x50f2a000, 0x50f2a00f).rw(FUNC(macpdm_state::irq_control_r), FUNC(macpdm_state::irq_control_w)); map(0x50f2c000, 0x50f2dfff).r(FUNC(macpdm_state::diag_r)); @@ -1082,8 +1104,10 @@ void macpdm_state::macpdm(machine_config &config) { PPC601(config, m_maincpu, 60000000); m_maincpu->set_addrmap(AS_PROGRAM, &macpdm_state::pdm_map); + m_maincpu->ppcdrc_set_options(PPCDRC_COMPATIBLE_OPTIONS); MAC_VIDEO_SONORA(config, m_video); + m_video->set_PDM(); m_video->screen_vblank().set(FUNC(macpdm_state::vblank_irq)); SPEAKER(config, "lspeaker").front_left(); @@ -1099,19 +1123,19 @@ void macpdm_state::macpdm(machine_config &config) m_awacs->add_route(1, "rspeaker", 1.0); NSCSI_BUS(config, m_scsibus); - NSCSI_CONNECTOR(config, "scsibus:0", default_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsibus:1", default_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsibus:2", default_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsibus:3").option_set("cdrom", NSCSI_CDROM_APPLE).machine_config( + NSCSI_CONNECTOR(config, "scsi:0", default_scsi_devices, "harddisk"); + NSCSI_CONNECTOR(config, "scsi:1", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:2", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:3").option_set("cdrom", NSCSI_CDROM_APPLE).machine_config( [](device_t *device) { device->subdevice("cdda")->add_route(0, "^^lspeaker", 1.0); device->subdevice("cdda")->add_route(1, "^^rspeaker", 1.0); }); - NSCSI_CONNECTOR(config, "scsibus:4", default_scsi_devices, nullptr); - NSCSI_CONNECTOR(config, "scsibus:5", default_scsi_devices, "harddisk"); - NSCSI_CONNECTOR(config, "scsibus:6", default_scsi_devices, "harddisk"); - NSCSI_CONNECTOR(config, "scsibus:7").option_set("ncr53c94", NCR53C94).machine_config( + NSCSI_CONNECTOR(config, "scsi:4", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:5", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:6", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsi:7").option_set("ncr53c94", NCR53C94).machine_config( [this] (device_t *device) { auto &ctrl = downcast(*device); @@ -1175,7 +1199,9 @@ void macpdm_state::macpdm(machine_config &config) m_cuda->linechange_callback().set(m_macadb, FUNC(macadb_device::adb_linechange_w)); m_cuda->via_clock_callback().set(m_via1, FUNC(via6522_device::write_cb1)); m_cuda->via_data_callback().set(m_via1, FUNC(via6522_device::write_cb2)); + m_cuda->nmi_callback().set(FUNC(macpdm_state::nmi_irq)); m_macadb->adb_data_callback().set(m_cuda, FUNC(cuda_device::set_adb_line)); + m_macadb->adb_power_callback().set(m_cuda, FUNC(cuda_device::set_adb_power)); config.set_perfect_quantum(m_maincpu); TIMER(config, "beat_60_15").configure_periodic(FUNC(macpdm_state::via1_60_15_timer), attotime::from_double(1/60.15)); diff --git a/src/mame/atari/cball.cpp b/src/mame/atari/cball.cpp index 51b50281bb6eb..2c7241aa7fa7a 100644 --- a/src/mame/atari/cball.cpp +++ b/src/mame/atari/cball.cpp @@ -2,7 +2,11 @@ // copyright-holders:Stefan Jokisch /*************************************************************************** - Atari Cannonball (prototype) driver +Atari Cannonball (prototype) driver + +TODO: +- half of the graphics are missing due to undumped ROM +- often hits illegal opcode 0x02, harmless leftover from devkit? ***************************************************************************/ @@ -252,7 +256,6 @@ void cball_state::cball(machine_config &config) M6800(config, m_maincpu, XTAL(12'096'000) / 16); /* ? */ m_maincpu->set_addrmap(AS_PROGRAM, &cball_state::cpu_map); - /* video hardware */ SCREEN(config, m_screen, SCREEN_TYPE_RASTER); m_screen->set_refresh_hz(60); diff --git a/src/mame/atari/destroyr.cpp b/src/mame/atari/destroyr.cpp index c87708adb065e..81e17ed3b35ea 100644 --- a/src/mame/atari/destroyr.cpp +++ b/src/mame/atari/destroyr.cpp @@ -290,8 +290,8 @@ void destroyr_state::main_map(address_map &map) map(0x1000, 0x1007).mirror(0xff0).w("outlatch", FUNC(f9334_device::write_d0)); map(0x1008, 0x1008).mirror(0xff7).w(FUNC(destroyr_state::misc_w)); map(0x2000, 0x2000).mirror(0xfff).portr("IN2"); - map(0x3000, 0x30ff).mirror(0xf00).writeonly().share("alpha_nuram"); - map(0x4000, 0x401f).mirror(0xfe0).writeonly().share("major_obj_ram"); + map(0x3000, 0x30ff).mirror(0xf00).nopr().writeonly().share("alpha_nuram"); + map(0x4000, 0x401f).mirror(0xfe0).nopr().writeonly().share("major_obj_ram"); map(0x5000, 0x5000).mirror(0xff8).w(FUNC(destroyr_state::cursor_load_w)); map(0x5001, 0x5001).mirror(0xff8).w(FUNC(destroyr_state::interrupt_ack_w)); map(0x5002, 0x5007).mirror(0xff8).writeonly().share("minor_obj_ram"); diff --git a/src/mame/atari/dragrace.cpp b/src/mame/atari/dragrace.cpp index 33db8bb9577b4..8103a8b08bf80 100644 --- a/src/mame/atari/dragrace.cpp +++ b/src/mame/atari/dragrace.cpp @@ -271,8 +271,8 @@ void dragrace_state::main_map(address_map &map) map(0x0928, 0x092f).w("latch_a5", FUNC(addressable_latch_device::clear)); map(0x0930, 0x0937).w("latch_h5", FUNC(addressable_latch_device::clear)); map(0x0938, 0x093f).w("latch_e5", FUNC(addressable_latch_device::clear)); - map(0x0a00, 0x0aff).writeonly().share(m_playfield_ram); - map(0x0b00, 0x0bff).writeonly().share(m_position_ram); + map(0x0a00, 0x0aff).nopr().writeonly().share(m_playfield_ram); + map(0x0b00, 0x0bff).nopr().writeonly().share(m_position_ram); map(0x0c00, 0x0c00).r(FUNC(dragrace_state::steering_r)); map(0x0d00, 0x0d00).r(FUNC(dragrace_state::scanline_r)); map(0x0e00, 0x0eff).w(m_watchdog, FUNC(watchdog_timer_device::reset_w)); diff --git a/src/mame/atari/poolshrk.cpp b/src/mame/atari/poolshrk.cpp index fc0089280b258..46241fe008c64 100644 --- a/src/mame/atari/poolshrk.cpp +++ b/src/mame/atari/poolshrk.cpp @@ -237,9 +237,9 @@ void poolshrk_state::cpu_map(address_map &map) { map.global_mask(0x7fff); map(0x0000, 0x00ff).mirror(0x2300).ram(); - map(0x0400, 0x07ff).mirror(0x2000).writeonly().share(m_playfield_ram); - map(0x0800, 0x080f).mirror(0x23f0).writeonly().share(m_hpos_ram); - map(0x0c00, 0x0c0f).mirror(0x23f0).writeonly().share(m_vpos_ram); + map(0x0400, 0x07ff).mirror(0x2000).nopr().writeonly().share(m_playfield_ram); + map(0x0800, 0x080f).mirror(0x23f0).nopr().writeonly().share(m_hpos_ram); + map(0x0c00, 0x0c0f).mirror(0x23f0).nopr().writeonly().share(m_vpos_ram); map(0x1000, 0x13ff).mirror(0x2000).rw(FUNC(poolshrk_state::input_r), FUNC(poolshrk_state::watchdog_w)); map(0x1400, 0x17ff).mirror(0x2000).w(FUNC(poolshrk_state::scratch_sound_w)); map(0x1800, 0x1bff).mirror(0x2000).w(FUNC(poolshrk_state::score_sound_w)); @@ -351,9 +351,8 @@ void poolshrk_state::palette(palette_device &palette) const void poolshrk_state::poolshrk(machine_config &config) { // basic machine hardware - M6800(config, m_maincpu, 11'055'000 / 8); // ? + M6800(config, m_maincpu, 11.055_MHz_XTAL / 8); // divider not verified m_maincpu->set_addrmap(AS_PROGRAM, &poolshrk_state::cpu_map); - m_maincpu->set_vblank_int("screen", FUNC(poolshrk_state::irq0_line_assert)); WATCHDOG_TIMER(config, m_watchdog); @@ -364,6 +363,7 @@ void poolshrk_state::poolshrk(machine_config &config) screen.set_visarea(1, 255, 24, 255); screen.set_screen_update(FUNC(poolshrk_state::screen_update)); screen.set_palette(m_palette); + screen.screen_vblank().set_inputline(m_maincpu, M6800_IRQ_LINE, ASSERT_LINE); GFXDECODE(config, m_gfxdecode, m_palette, gfx_poolshrk); PALETTE(config, m_palette, FUNC(poolshrk_state::palette), 4); diff --git a/src/mame/atari/sbrkout.cpp b/src/mame/atari/sbrkout.cpp index a0b8523bc2213..6a88bd59df9e5 100644 --- a/src/mame/atari/sbrkout.cpp +++ b/src/mame/atari/sbrkout.cpp @@ -35,14 +35,17 @@ ***************************************************************************/ #include "emu.h" + #include "cpu/m6502/m6502.h" #include "machine/74259.h" #include "machine/watchdog.h" #include "sound/dac.h" + #include "emupal.h" #include "screen.h" #include "speaker.h" #include "tilemap.h" + #include "sbrkout.lh" @@ -118,16 +121,6 @@ class sbrkoutct_state : public sbrkout_state }; -/************************************* - * - * Constants - * - *************************************/ - -static constexpr XTAL MAIN_CLOCK = 12.096_MHz_XTAL; -#define TIME_4V attotime::from_hz(MAIN_CLOCK/2/256/2/4) - - /************************************* * * Machine setup @@ -495,7 +488,7 @@ static INPUT_PORTS_START( sbrkoutct ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_MODIFY("SELECT") - PORT_CONFNAME(0x80, 0x00, "Game Select" ) + PORT_CONFNAME( 0x80, 0x00, "Game Select" ) PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) PORT_CONFSETTING( 0x80, DEF_STR( On ) ) INPUT_PORTS_END @@ -546,7 +539,7 @@ GFXDECODE_END void sbrkout_state::sbrkout(machine_config &config) { /* basic machine hardware */ - M6502(config, m_maincpu, MAIN_CLOCK/16); // 756KHz verified + M6502(config, m_maincpu, 12.096_MHz_XTAL/16); // 756KHz verified m_maincpu->set_addrmap(AS_PROGRAM, &sbrkout_state::main_map); F9334(config, m_outlatch); // H8 @@ -566,7 +559,7 @@ void sbrkout_state::sbrkout(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_sbrkout); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); - m_screen->set_raw(MAIN_CLOCK/2, 384, 0, 256, 262, 0, 224); + m_screen->set_raw(12.096_MHz_XTAL/2, 384, 0, 256, 262, 0, 224); m_screen->set_screen_update(FUNC(sbrkout_state::screen_update_sbrkout)); PALETTE(config, m_palette, palette_device::MONOCHROME); @@ -615,16 +608,16 @@ ROM_END ROM_START( sbrkout3 ) // rev 03; main cpu roms are on 1024x4bit (82s137 or equiv) proms, otherwise seems identical to rev 04 ROM_REGION( 0x4000, "maincpu", 0 ) - ROM_LOAD_NIB_HIGH( "33442-01.kl0", 0x2C00, 0x0400, CRC(fb5cb68a) SHA1(301e8e47f6a82d6c2290a890bcd5c53d61d58ff7) ) - ROM_LOAD_NIB_LOW( "33448-01.kl1", 0x2C00, 0x0400, CRC(b1d2b269) SHA1(46de71f1f9695f03465fd9b2289b5c5ffe19b3a2) ) - ROM_LOAD_NIB_HIGH( "33443-01.l0", 0x3000, 0x0400, CRC(1e7d059f) SHA1(e1831febfd26cf2560351d45f37763a7498c029e) ) - ROM_LOAD_NIB_LOW( "33449-01.l1", 0x3000, 0x0400, CRC(f936918d) SHA1(9d62fe75d39f95085a4380059c4980f3affe1bbf) ) - ROM_LOAD_NIB_HIGH( "33444-01.m0", 0x3400, 0x0400, CRC(5b7e0e3b) SHA1(4dbd62b23249fbb05e1fffe50b89a5e280a2dde9) ) - ROM_LOAD_NIB_LOW( "33450-01.m1", 0x3400, 0x0400, CRC(430cf9e8) SHA1(8e6075f12dbe0b973500d4e38e0090e40ee47260) ) - ROM_LOAD_NIB_HIGH( "33445-01.n0", 0x3800, 0x0400, CRC(cdf19919) SHA1(13623bde69e7f352beaef33524f69d74c540e1cc) ) - ROM_LOAD_NIB_LOW( "33451-01.n1", 0x3800, 0x0400, CRC(19f7c50d) SHA1(91ba9ef7ab4b200a55ae7b7979f4a01e617dd9ad) ) - ROM_LOAD_NIB_HIGH( "33446-01.p0", 0x3C00, 0x0400, CRC(9553663c) SHA1(6c28b3a11b7ff0aa224bf262c664a62166dc9cdf) ) - ROM_LOAD_NIB_LOW( "33452-01.p1", 0x3C00, 0x0400, CRC(6dc0439a) SHA1(9cc0b735935a610519eb1b53ed303223e69af0b7) ) + ROM_LOAD_NIB_HIGH( "33442-01.kl0", 0x2c00, 0x0400, CRC(fb5cb68a) SHA1(301e8e47f6a82d6c2290a890bcd5c53d61d58ff7) ) + ROM_LOAD_NIB_LOW( "33448-01.kl1", 0x2c00, 0x0400, CRC(b1d2b269) SHA1(46de71f1f9695f03465fd9b2289b5c5ffe19b3a2) ) + ROM_LOAD_NIB_HIGH( "33443-01.l0", 0x3000, 0x0400, CRC(1e7d059f) SHA1(e1831febfd26cf2560351d45f37763a7498c029e) ) + ROM_LOAD_NIB_LOW( "33449-01.l1", 0x3000, 0x0400, CRC(f936918d) SHA1(9d62fe75d39f95085a4380059c4980f3affe1bbf) ) + ROM_LOAD_NIB_HIGH( "33444-01.m0", 0x3400, 0x0400, CRC(5b7e0e3b) SHA1(4dbd62b23249fbb05e1fffe50b89a5e280a2dde9) ) + ROM_LOAD_NIB_LOW( "33450-01.m1", 0x3400, 0x0400, CRC(430cf9e8) SHA1(8e6075f12dbe0b973500d4e38e0090e40ee47260) ) + ROM_LOAD_NIB_HIGH( "33445-01.n0", 0x3800, 0x0400, CRC(cdf19919) SHA1(13623bde69e7f352beaef33524f69d74c540e1cc) ) + ROM_LOAD_NIB_LOW( "33451-01.n1", 0x3800, 0x0400, CRC(19f7c50d) SHA1(91ba9ef7ab4b200a55ae7b7979f4a01e617dd9ad) ) + ROM_LOAD_NIB_HIGH( "33446-01.p0", 0x3c00, 0x0400, CRC(9553663c) SHA1(6c28b3a11b7ff0aa224bf262c664a62166dc9cdf) ) + ROM_LOAD_NIB_LOW( "33452-01.p1", 0x3c00, 0x0400, CRC(6dc0439a) SHA1(9cc0b735935a610519eb1b53ed303223e69af0b7) ) ROM_REGION( 0x0400, "gfx1", 0 ) ROM_LOAD( "033280.p4", 0x0000, 0x0200, CRC(5a69ce85) SHA1(ad9078d12495c350738bdb0b1e1b6120d9e01f60) ) @@ -661,8 +654,8 @@ ROM_START( sbrkoutct ) // built from original Atari source code ROM_LOAD( "034557-01.ef1", 0x3800, 0x0800, CRC(b6b3b07b) SHA1(c4d2cdcca89c2944afd4a4ed0bb5003b3eca4c7e) ) ROM_REGION( 0x0400, "gfx1", 0 ) - ROM_LOAD( "034559-01.r4", 0x0000, 0x0200, CRC(84368539) SHA1(50b2c3f443346e3a355492ed1f7ec0a8cc6364d4) ) - ROM_LOAD( "034558-01.p4", 0x0200, 0x0200, CRC(cc0f81f2) SHA1(a2180280991c9cf43f4e941d9ba4fe5654d1af65) ) + ROM_LOAD( "034559-01.r4", 0x0000, 0x0200, CRC(84368539) SHA1(50b2c3f443346e3a355492ed1f7ec0a8cc6364d4) ) + ROM_LOAD( "034558-01.p4", 0x0200, 0x0200, CRC(cc0f81f2) SHA1(a2180280991c9cf43f4e941d9ba4fe5654d1af65) ) ROM_REGION( 0x0020, "gfx2", 0 ) ROM_LOAD( "033282.k6", 0x0000, 0x0020, CRC(6228736b) SHA1(bc176261dba11521df19d545ce604f8cc294287a) ) diff --git a/src/mame/atari/sprint8.cpp b/src/mame/atari/sprint8.cpp index ab9a02da5ae58..c88667bb6954c 100644 --- a/src/mame/atari/sprint8.cpp +++ b/src/mame/atari/sprint8.cpp @@ -358,9 +358,9 @@ void sprint8_state::program_map(address_map &map) map(0x1c10, 0x1c1f).writeonly().share(m_pos_v_ram); map(0x1c20, 0x1c2f).writeonly().share(m_pos_d_ram); map(0x1c30, 0x1c37).w(FUNC(sprint8_state::lockout_w)); - map(0x1d00, 0x1d07).w("latch", FUNC(f9334_device::write_d0)); - map(0x1e00, 0x1e07).w("motor", FUNC(f9334_device::write_d0)); - map(0x1f00, 0x1f00).nopw(); // probably a watchdog, disabled in service mode + map(0x1d00, 0x1d07).nopr().w("latch", FUNC(f9334_device::write_d0)); + map(0x1e00, 0x1e07).nopr().w("motor", FUNC(f9334_device::write_d0)); + map(0x1f00, 0x1f00).noprw(); // probably a watchdog, disabled in service mode map(0x2000, 0x3fff).rom(); map(0xf800, 0xffff).rom(); } diff --git a/src/mame/atari/stkbd.cpp b/src/mame/atari/stkbd.cpp index 8ab20671007d2..55721e95317b3 100644 --- a/src/mame/atari/stkbd.cpp +++ b/src/mame/atari/stkbd.cpp @@ -141,14 +141,14 @@ uint8_t st_kbd_device::port2_r() // 2 JOY 1-6 / mouse button 2 // 3 serial from cpu - uint8_t data; + uint8_t data = 0xf1; if ((m_config->read() & 0x01) == 0) - data = m_mouseb->read(); + data |= m_mouseb->read(); else - data = m_joy[0]->read(); + data |= m_joy[1]->read(); - return (data & 0x06) | (m_tx << 3); + return (data & 0xf7) | (m_tx << 3); } void st_kbd_device::port2_w(uint8_t data) @@ -346,7 +346,6 @@ static INPUT_PORTS_START(stkbd) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_8WAY PORT_START("JOY1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) @@ -357,8 +356,8 @@ static INPUT_PORTS_START(stkbd) PORT_BIT( 0xff, 0x00, IPT_MOUSE_Y ) PORT_SENSITIVITY(10) PORT_KEYDELTA(5) PORT_MINMAX(0, 255) PORT_PLAYER(1) PORT_START("MOUSEB") - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_NAME("Mouse Button 1") PORT_CODE(MOUSECODE_BUTTON1) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_NAME("Mouse Button 2") PORT_CODE(MOUSECODE_BUTTON2) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Mouse Button 1") PORT_CODE(MOUSECODE_BUTTON1) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Mouse Button 2") PORT_CODE(MOUSECODE_BUTTON2) INPUT_PORTS_END ioport_constructor st_kbd_device::device_input_ports() const diff --git a/src/mame/atari/tank8.cpp b/src/mame/atari/tank8.cpp index 27ba3e04cd203..05363ce53b876 100644 --- a/src/mame/atari/tank8.cpp +++ b/src/mame/atari/tank8.cpp @@ -12,6 +12,7 @@ Atari Tank 8 driver #include "tank8_a.h" #include "cpu/m6800/m6800.h" +#include "machine/74259.h" #include "sound/discrete.h" #include "emupal.h" @@ -66,7 +67,7 @@ class tank8_state : public driver_device emu_timer *m_collision_timer = nullptr; uint8_t collision_r(); - void lockout_w(offs_t offset, uint8_t data); + template void lockout_w(int state); void int_reset_w(uint8_t data); void video_ram_w(offs_t offset, uint8_t data); void crash_w(uint8_t data); @@ -74,7 +75,6 @@ class tank8_state : public driver_device void bugle_w(uint8_t data); void bug_w(uint8_t data); void attract_w(uint8_t data); - void motor_w(offs_t offset, uint8_t data); TILE_GET_INFO_MEMBER(get_tile_info); @@ -365,9 +365,10 @@ uint8_t tank8_state::collision_r() return m_collision_index; } -void tank8_state::lockout_w(offs_t offset, uint8_t data) +template +void tank8_state::lockout_w(int state) { - machine().bookkeeping().coin_lockout_w(offset, ~data & 1); + machine().bookkeeping().coin_lockout_w(N, !state); } @@ -422,11 +423,6 @@ void tank8_state::attract_w(uint8_t data) m_discrete->write(TANK8_ATTRACT_EN, data); } -void tank8_state::motor_w(offs_t offset, uint8_t data) -{ - m_discrete->write(NODE_RELATIVE(TANK8_MOTOR1_EN, offset), data); -} - void tank8_state::cpu_map(address_map &map) { map(0x0000, 0x00ff).ram(); @@ -453,16 +449,15 @@ void tank8_state::cpu_map(address_map &map) map(0x1c10, 0x1c1f).writeonly().share(m_pos_v_ram); map(0x1c20, 0x1c2f).writeonly().share(m_pos_d_ram); - map(0x1c30, 0x1c37).w(FUNC(tank8_state::lockout_w)); - map(0x1d00, 0x1d00).w(FUNC(tank8_state::int_reset_w)); - map(0x1d01, 0x1d01).w(FUNC(tank8_state::crash_w)); - map(0x1d02, 0x1d02).w(FUNC(tank8_state::explosion_w)); - map(0x1d03, 0x1d03).w(FUNC(tank8_state::bugle_w)); - map(0x1d04, 0x1d04).w(FUNC(tank8_state::bug_w)); - map(0x1d05, 0x1d05).writeonly().share(m_team); - map(0x1d06, 0x1d06).w(FUNC(tank8_state::attract_w)); - map(0x1e00, 0x1e07).w(FUNC(tank8_state::motor_w)); - + map(0x1c30, 0x1c37).nopr().w("locklatch", FUNC(f9334_device::write_d0)); + map(0x1d00, 0x1d00).nopr().w(FUNC(tank8_state::int_reset_w)); + map(0x1d01, 0x1d01).nopr().w(FUNC(tank8_state::crash_w)); + map(0x1d02, 0x1d02).nopr().w(FUNC(tank8_state::explosion_w)); + map(0x1d03, 0x1d03).nopr().w(FUNC(tank8_state::bugle_w)); + map(0x1d04, 0x1d04).nopr().w(FUNC(tank8_state::bug_w)); + map(0x1d05, 0x1d05).nopr().writeonly().share(m_team); + map(0x1d06, 0x1d06).nopr().w(FUNC(tank8_state::attract_w)); + map(0x1e00, 0x1e07).nopr().w("motorlatch", FUNC(f9334_device::write_d0)); } @@ -662,16 +657,33 @@ GFXDECODE_END void tank8_state::tank8(machine_config &config) { // basic machine hardware - M6800(config, m_maincpu, 11'055'000 / 10); // ? + M6800(config, m_maincpu, 11.055_MHz_XTAL / 10); // divider not verified m_maincpu->set_addrmap(AS_PROGRAM, &tank8_state::cpu_map); + f9334_device &locklatch(F9334(config, "locklatch")); // C5 on audio board + locklatch.q_out_cb<0>().set(FUNC(tank8_state::lockout_w<0>)); + locklatch.q_out_cb<1>().set(FUNC(tank8_state::lockout_w<1>)); + locklatch.q_out_cb<2>().set(FUNC(tank8_state::lockout_w<2>)); + locklatch.q_out_cb<3>().set(FUNC(tank8_state::lockout_w<3>)); + locklatch.q_out_cb<4>().set(FUNC(tank8_state::lockout_w<4>)); + locklatch.q_out_cb<5>().set(FUNC(tank8_state::lockout_w<5>)); + locklatch.q_out_cb<6>().set(FUNC(tank8_state::lockout_w<6>)); + locklatch.q_out_cb<7>().set(FUNC(tank8_state::lockout_w<7>)); + + f9334_device &motorlatch(F9334(config, "motorlatch")); // D5 on audio board + motorlatch.q_out_cb<0>().set(m_discrete, FUNC(discrete_device::write_line)); + motorlatch.q_out_cb<1>().set(m_discrete, FUNC(discrete_device::write_line)); + motorlatch.q_out_cb<2>().set(m_discrete, FUNC(discrete_device::write_line)); + motorlatch.q_out_cb<3>().set(m_discrete, FUNC(discrete_device::write_line)); + motorlatch.q_out_cb<4>().set(m_discrete, FUNC(discrete_device::write_line)); + motorlatch.q_out_cb<5>().set(m_discrete, FUNC(discrete_device::write_line)); + motorlatch.q_out_cb<6>().set(m_discrete, FUNC(discrete_device::write_line)); + motorlatch.q_out_cb<7>().set(m_discrete, FUNC(discrete_device::write_line)); + // video hardware SCREEN(config, m_screen, SCREEN_TYPE_RASTER); m_screen->set_video_attributes(VIDEO_UPDATE_AFTER_VBLANK); - m_screen->set_refresh_hz(60); - m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(30 * 1000000 / 15681)); - m_screen->set_size(512, 524); - m_screen->set_visarea(16, 495, 0, 463); + m_screen->set_raw(11.055_MHz_XTAL * 2, 703, 16, 496, 524, 0, 464); // FIXME: should be 30 Hz interlaced, with two VBLANK interrupts per frame m_screen->set_screen_update(FUNC(tank8_state::screen_update)); m_screen->screen_vblank().set(FUNC(tank8_state::screen_vblank)); m_screen->set_palette(m_palette); diff --git a/src/mame/atari/triplhnt.cpp b/src/mame/atari/triplhnt.cpp index 4d49cbe81dc07..e4cafa548e7d8 100644 --- a/src/mame/atari/triplhnt.cpp +++ b/src/mame/atari/triplhnt.cpp @@ -5,8 +5,6 @@ Atari Triple Hunt Driver - Calibrate controls in service mode the first time you run this game. - ***************************************************************************/ #include "emu.h" @@ -46,6 +44,7 @@ class triplhnt_state : public driver_device m_hpos_ram(*this, "hpos_ram"), m_orga_ram(*this, "orga_ram"), m_code_ram(*this, "code_ram"), + m_cmos(*this, "nvram", 0x10, ENDIANNESS_BIG), m_0c09(*this, "0C09"), m_0c0b(*this, "0C0B"), m_vblank(*this, "VBLANK"), @@ -54,10 +53,7 @@ class triplhnt_state : public driver_device void triplhnt(machine_config &config); - void init_triplhnt(); - protected: - virtual void machine_start() override ATTR_COLD; virtual void video_start() override ATTR_COLD; private: @@ -75,12 +71,12 @@ class triplhnt_state : public driver_device required_shared_ptr m_hpos_ram; required_shared_ptr m_orga_ram; required_shared_ptr m_code_ram; + memory_share_creator m_cmos; required_ioport m_0c09; required_ioport m_0c0b; required_ioport m_vblank; required_ioport_array<2> m_stick; - uint8_t m_cmos[16]{}; uint8_t m_da_latch = 0; uint8_t m_cmos_latch = 0; uint8_t m_hit_code = 0; @@ -112,7 +108,6 @@ class triplhnt_state : public driver_device TILE_GET_INFO_MEMBER(triplhnt_state::get_tile_info) { int const code = m_playfield_ram[tile_index] & 0x3f; - tileinfo.set(2, code, code == 0x3f ? 1 : 0, 0); } @@ -125,7 +120,6 @@ void triplhnt_state::video_start() m_hit_timer = timer_alloc(FUNC(triplhnt_state::set_collision), this); - save_item(NAME(m_cmos)); save_item(NAME(m_da_latch)); save_item(NAME(m_cmos_latch)); save_item(NAME(m_hit_code)); @@ -146,7 +140,6 @@ void triplhnt_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprec int const j = (m_orga_ram[i] & 15) ^ 15; // software sorts sprites by x and stores order in orga RAM - int hpos = m_hpos_ram[j] ^ 255; int vpos = m_vpos_ram[j] ^ 255; int code = m_code_ram[j] ^ 255; @@ -155,7 +148,6 @@ void triplhnt_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprec continue; // sprite placement might be wrong - if (m_sprite_zoom) { rect.set(hpos - 16, hpos - 16 + 63, 196 - vpos, 196 - vpos + 63); @@ -166,10 +158,9 @@ void triplhnt_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprec } // render sprite to auxiliary bitmap - m_gfxdecode->gfx(m_sprite_zoom)->opaque(m_helper, cliprect, - 2 * code + m_sprite_bank, 0, code & 8, 0, - rect.left(), rect.top()); + 2 * code + m_sprite_bank, 0, code & 8, 0, + rect.left(), rect.top()); rect &= cliprect; @@ -201,7 +192,6 @@ void triplhnt_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprec uint32_t triplhnt_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { m_bg_tilemap->mark_all_dirty(); - m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0); draw_sprites(bitmap, cliprect); @@ -212,12 +202,6 @@ uint32_t triplhnt_state::screen_update(screen_device &screen, bitmap_ind16 &bitm } -void triplhnt_state::init_triplhnt() -{ - subdevice("nvram")->set_base(m_cmos, sizeof(m_cmos)); -} - - TIMER_CALLBACK_MEMBER(triplhnt_state::set_collision) { m_hit_code = param; @@ -252,7 +236,8 @@ void triplhnt_state::tape_control_w(int state) uint8_t triplhnt_state::cmos_r(offs_t offset) { - m_cmos_latch = offset; + if (!machine().side_effects_disabled()) + m_cmos_latch = offset; return m_cmos[m_cmos_latch] ^ 15; } @@ -260,34 +245,29 @@ uint8_t triplhnt_state::cmos_r(offs_t offset) uint8_t triplhnt_state::input_port_4_r() { - m_watchdog->watchdog_reset(); + if (!machine().side_effects_disabled()) + m_watchdog->watchdog_reset(); + return m_0c0b->read(); } uint8_t triplhnt_state::misc_r(offs_t offset) { - m_latch->write_a0(offset); + if (!machine().side_effects_disabled()) + m_latch->write_a0(offset); + return m_vblank->read() | m_hit_code; } uint8_t triplhnt_state::da_latch_r(offs_t offset) { - int const cross_x = m_stick[0]->read(); - int const cross_y = m_stick[1]->read(); - - m_da_latch = offset; + if (!machine().side_effects_disabled()) + m_da_latch = offset; // the following is a slight simplification - - return (offset & 1) ? cross_x : cross_y; -} - - -void triplhnt_state::machine_start() -{ - m_hit_code = 0; + return m_stick[offset & 1]->read(); } @@ -348,21 +328,17 @@ static INPUT_PORTS_START( triplhnt ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_START("0C48") -// default to service enabled to make users calibrate gun -// PORT_SERVICE( 0x40, IP_ACTIVE_LOW ) - PORT_DIPNAME( 0x40, 0x00, DEF_STR( Service_Mode )) PORT_TOGGLE PORT_CODE(KEYCODE_F2) - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_SERVICE( 0x40, IP_ACTIVE_LOW ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_START("VBLANK") PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("screen", FUNC(screen_device::vblank)) PORT_START("STICKX") - PORT_BIT( 0xfc, 0x80, IPT_AD_STICK_X ) PORT_MINMAX(0x00,0xfc) PORT_CROSSHAIR(X, 62.0/64, 1.0/64, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) + PORT_BIT( 0xfc, 0x80, IPT_AD_STICK_X ) PORT_MINMAX(0x00,0xfc) PORT_CROSSHAIR(X, 62.0/64, 1.0/64, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(4) PORT_START("STICKY") - PORT_BIT( 0xfc, 0x78, IPT_AD_STICK_Y ) PORT_MINMAX(0x00,0xec) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) + PORT_BIT( 0xfc, 0x78, IPT_AD_STICK_Y ) PORT_MINMAX(0x00,0xec) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(4) PORT_START("BEAR") // 10 PORT_ADJUSTER( 35, "Bear Roar Frequency" ) @@ -374,8 +350,7 @@ static const gfx_layout triplhnt_small_sprite_layout = 32, 32, // width, height 16, // total 2, // planes - // plane offsets - { 0x0000, 0x4000 }, + { 0x0000, 0x4000 }, // plane offsets { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, @@ -474,7 +449,7 @@ void triplhnt_state::triplhnt(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &triplhnt_state::program_map); m_maincpu->set_vblank_int("screen", FUNC(triplhnt_state::irq0_line_hold)); - NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // battery-backed 74C89 at J5 + NVRAM(config, "nvram"); // battery-backed 74C89 at J5 F9334(config, m_latch); // J7 m_latch->q_out_cb<0>().set_nop(); // unused @@ -492,6 +467,7 @@ void triplhnt_state::triplhnt(machine_config &config) // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); + screen.set_video_attributes(VIDEO_ALWAYS_UPDATE); screen.set_refresh_hz(60); screen.set_size(256, 262); screen.set_visarea(0, 255, 0, 239); @@ -525,16 +501,19 @@ ROM_START( triplhnt ) ROM_LOAD_NIB_HIGH( "8401.c1", 0x7C00, 0x400, CRC(7461b05e) SHA1(16573ae655c306a38ff0f29a3c3285d636907f38) ) ROM_LOAD_NIB_LOW ( "8405.c2", 0x7C00, 0x400, CRC(ba370b97) SHA1(5d799ce6ae56c315ff0abedea7ad9204bacc266b) ) + ROM_REGION( 0x10, "nvram", 0 ) // calibrated gun + ROM_LOAD( "74c89.j5", 0x00, 0x10, CRC(1a1a3802) SHA1(e82a1aec083c9cba2f5870ba0c266dc5e8dda3d3) ) + ROM_REGION( 0x1000, "sprites", 0 ) ROM_LOAD( "8423.n1", 0x0000, 0x800, CRC(9937d0da) SHA1(abb906c2d9869b09be5172cc7639bb9cda38831b) ) ROM_LOAD( "8422.r1", 0x0800, 0x800, CRC(803621dd) SHA1(ffbd7f87a86477e5eb94f12fc20a837128a02442) ) ROM_REGION( 0x200, "tiles", 0 ) - ROM_LOAD_NIB_HIGH( "8409.l3", 0x0000, 0x200, CRC(ec304172) SHA1(ccbf7e117fef7fa4288e3bf68f1a150b3a492ce6) ) - ROM_LOAD_NIB_LOW ( "8410.m3", 0x0000, 0x200, CRC(f75a1b08) SHA1(81b4733194462cd4cef7f4221ecb7abd1556b871) ) + ROM_LOAD_NIB_HIGH( "8409.l3", 0x000, 0x200, CRC(ec304172) SHA1(ccbf7e117fef7fa4288e3bf68f1a150b3a492ce6) ) + ROM_LOAD_NIB_LOW ( "8410.m3", 0x000, 0x200, CRC(f75a1b08) SHA1(81b4733194462cd4cef7f4221ecb7abd1556b871) ) ROM_END } // anonymous namespace -GAME( 1977, triplhnt, 0, triplhnt, triplhnt, triplhnt_state, init_triplhnt, 0, "Atari", "Triple Hunt", MACHINE_REQUIRES_ARTWORK | MACHINE_SUPPORTS_SAVE ) +GAME( 1977, triplhnt, 0, triplhnt, triplhnt, triplhnt_state, empty_init, 0, "Atari", "Triple Hunt", MACHINE_REQUIRES_ARTWORK | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/bmc/popobear.cpp b/src/mame/bmc/popobear.cpp index 9db53bbe5e6df..a9e2401a01702 100644 --- a/src/mame/bmc/popobear.cpp +++ b/src/mame/bmc/popobear.cpp @@ -137,7 +137,6 @@ class popobear_state : public driver_device TIMER_DEVICE_CALLBACK_MEMBER(scanline_cb); - void postload(); void main_map(address_map &map) ATTR_COLD; }; @@ -188,11 +187,6 @@ template TILE_GET_INFO_MEMBER(popobear_state::get_tile_info) tileinfo.set(0, tileno & 0x3fff, 0, TILE_FLIPYX(flipyx)); } -void popobear_state::postload() -{ - m_gfxdecode->gfx(0)->mark_all_dirty(); -} - void popobear_state::video_start() { m_vram_rearranged.resize(0x100000 / 2); @@ -210,7 +204,6 @@ void popobear_state::video_start() m_bg_tilemap[3]->set_transparent_pen(0); save_item(NAME(m_vram_rearranged)); - machine().save().register_postload(save_prepost_delegate(FUNC(popobear_state::postload), this)); } diff --git a/src/mame/capcom/cps3.cpp b/src/mame/capcom/cps3.cpp index 374b8b37f4704..3d13e1b8db159 100644 --- a/src/mame/capcom/cps3.cpp +++ b/src/mame/capcom/cps3.cpp @@ -1190,7 +1190,7 @@ u32 cps3_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const if (ysize2 == 0) { - // logerror("invalid sprite ysize of 0 tiles\n"); + //logerror("invalid sprite ysize of 0 tiles\n"); continue; } @@ -2341,7 +2341,7 @@ void cps3_state::copy_from_nvram() data = ((m_simm[0][0]->read_raw(i/4)<<24) | (m_simm[0][1]->read_raw(i/4)<<16) | (m_simm[0][2]->read_raw(i/4)<<8) | (m_simm[0][3]->read_raw(i/4)<<0)); - // logerror("%08x %08x %08x %08x\n",romdata[i/4],data, romdata2[i/4], data ^ cps3_mask(i+0x6000000, m_key1, m_key2)); + //logerror("%08x %08x %08x %08x\n",romdata[i/4],data, romdata2[i/4], data ^ cps3_mask(i+0x6000000, m_key1, m_key2)); romdata[i/4] = data; romdata2[i/4] = data ^ cps3_mask(i+0x6000000, m_key1, m_key2); @@ -2357,7 +2357,7 @@ void cps3_state::copy_from_nvram() data = ((m_simm[1][0]->read_raw(i/4)<<24) | (m_simm[1][1]->read_raw(i/4)<<16) | (m_simm[1][2]->read_raw(i/4)<<8) | (m_simm[1][3]->read_raw(i/4)<<0)); - // logerror("%08x %08x %08x %08x\n",romdata[i/4],data, romdata2[i/4], data ^ cps3_mask(i+0x6800000, m_key1, m_key2) ); + //logerror("%08x %08x %08x %08x\n",romdata[i/4],data, romdata2[i/4], data ^ cps3_mask(i+0x6800000, m_key1, m_key2) ); romdata[i/4] = data; romdata2[i/4] = data ^ cps3_mask(i+0x6800000, m_key1, m_key2); } @@ -2371,7 +2371,7 @@ void cps3_state::copy_from_nvram() romdata = (u32*)m_user5; for (u32 thebase = 0; thebase < len/2; thebase += 0x200000) { - // logerror("flashnums %d. %d\n",flashnum, flashnum+1); + //logerror("flashnums %d. %d\n",flashnum, flashnum+1); fujitsu_29f016a_device *flash0 = m_simm[2 + flashnum/8][flashnum % 8 + 0]; fujitsu_29f016a_device *flash1 = m_simm[2 + flashnum/8][flashnum % 8 + 1]; diff --git a/src/mame/capcom/gng.cpp b/src/mame/capcom/gng.cpp index 7271ab3308c71..2b063bb2e8baf 100644 --- a/src/mame/capcom/gng.cpp +++ b/src/mame/capcom/gng.cpp @@ -558,7 +558,7 @@ void gng_state::machine_reset() /* TODO: PCB reference clearly shows that the POST has random/filled data on the paletteram. For now let's fill everything with white colors until we have better info about it */ - for(int i = 0 ; i < 0x100; i += 4) + for (int i = 0 ; i < 0x100; i += 4) { m_palette->basemem().write8(i, 0x00); m_palette->extmem().write8(i, 0x00); m_palette->basemem().write8(i + 1, 0x55); m_palette->extmem().write8(i + 1, 0x55); @@ -947,11 +947,11 @@ ROM_START( makaimurb ) // 85606-A-3/85606-B-3 ROM_END /* - Makaimura + Makaimura bootleg Program is the same as set makaimurb, but different sized/arranged ROMs. - Some GFX ROMs are different. + Sprite ROMs are the same as gng, so it has the shield instead of cross. */ -ROM_START( makaimurba ) +ROM_START( makaimurbbl ) ROM_REGION( 0x18000, "maincpu", 0 ) ROM_LOAD( "gg5.bin", 0x04000, 0x4000, CRC(f8bda78f) SHA1(ed5d67996475504cdf7b9fa356f6e160cbbcfa77) ) // 4000-5fff is page 4 ROM_LOAD( "gg4.bin", 0x08000, 0x4000, CRC(ac0b25fb) SHA1(81b349b969e1ea4f90e8e523ec05a93b62252433) ) @@ -1085,16 +1085,16 @@ ROM_END } // anonymous namespace -GAME( 1985, gng, 0, gng, gng, gng_state, empty_init, ROT0, "Capcom", "Ghosts'n Goblins (World? set 1)", MACHINE_SUPPORTS_SAVE ) -GAME( 1985, gnga, gng, gng, gng, gng_state, empty_init, ROT0, "Capcom", "Ghosts'n Goblins (World? set 2)", MACHINE_SUPPORTS_SAVE ) -GAME( 1985, gngbl, gng, gng, gng, gng_state, empty_init, ROT0, "bootleg", "Ghosts'n Goblins (bootleg with Cross)", MACHINE_SUPPORTS_SAVE ) -GAME( 1985, gngprot, gng, gng, gng, gng_state, empty_init, ROT0, "Capcom", "Ghosts'n Goblins (prototype)", MACHINE_SUPPORTS_SAVE ) -GAME( 1985, gngblita, gng, gng, gng, gng_state, empty_init, ROT0, "bootleg", "Ghosts'n Goblins (Italian bootleg, harder)", MACHINE_SUPPORTS_SAVE ) -GAME( 1985, gngc, gng, gng, gng, gng_state, empty_init, ROT0, "Capcom", "Ghosts'n Goblins (World? set 3)", MACHINE_SUPPORTS_SAVE ) // rev c? -GAME( 1985, gngt, gng, gng, gng, gng_state, empty_init, ROT0, "Capcom (Taito America license)", "Ghosts'n Goblins (US)", MACHINE_SUPPORTS_SAVE ) -GAME( 1985, makaimur, gng, gng, makaimur, gng_state, empty_init, ROT0, "Capcom", "Makaimura (Japan)", MACHINE_SUPPORTS_SAVE ) -GAME( 1985, makaimurb, gng, gng, makaimur, gng_state, empty_init, ROT0, "Capcom", "Makaimura (Japan Revision B)", MACHINE_SUPPORTS_SAVE ) -GAME( 1985, makaimurba, gng, gng, makaimur, gng_state, empty_init, ROT0, "Capcom", "Makaimura (Japan Revision B, alt GFX)", MACHINE_SUPPORTS_SAVE ) -GAME( 1985, makaimurc, gng, gng, makaimur, gng_state, empty_init, ROT0, "Capcom", "Makaimura (Japan Revision C)", MACHINE_SUPPORTS_SAVE ) -GAME( 1985, makaimurg, gng, gng, makaimur, gng_state, empty_init, ROT0, "Capcom", "Makaimura (Japan Revision G)", MACHINE_SUPPORTS_SAVE ) -GAME( 1989, diamrun, 0, diamrun, diamrun, gng_state, empty_init, ROT0, "KH Video", "Diamond Run", MACHINE_SUPPORTS_SAVE ) // Kyle Hodgetts +GAME( 1985, gng, 0, gng, gng, gng_state, empty_init, ROT0, "Capcom", "Ghosts'n Goblins (World? set 1)", MACHINE_SUPPORTS_SAVE ) +GAME( 1985, gnga, gng, gng, gng, gng_state, empty_init, ROT0, "Capcom", "Ghosts'n Goblins (World? set 2)", MACHINE_SUPPORTS_SAVE ) +GAME( 1985, gngbl, gng, gng, gng, gng_state, empty_init, ROT0, "bootleg", "Ghosts'n Goblins (bootleg with Cross)", MACHINE_SUPPORTS_SAVE ) +GAME( 1985, gngprot, gng, gng, gng, gng_state, empty_init, ROT0, "Capcom", "Ghosts'n Goblins (prototype)", MACHINE_SUPPORTS_SAVE ) +GAME( 1985, gngblita, gng, gng, gng, gng_state, empty_init, ROT0, "bootleg", "Ghosts'n Goblins (Italian bootleg, harder)", MACHINE_SUPPORTS_SAVE ) +GAME( 1985, gngc, gng, gng, gng, gng_state, empty_init, ROT0, "Capcom", "Ghosts'n Goblins (World? set 3)", MACHINE_SUPPORTS_SAVE ) // rev c? +GAME( 1985, gngt, gng, gng, gng, gng_state, empty_init, ROT0, "Capcom (Taito America license)", "Ghosts'n Goblins (US)", MACHINE_SUPPORTS_SAVE ) +GAME( 1985, makaimur, gng, gng, makaimur, gng_state, empty_init, ROT0, "Capcom", "Makaimura (Japan)", MACHINE_SUPPORTS_SAVE ) +GAME( 1985, makaimurb, gng, gng, makaimur, gng_state, empty_init, ROT0, "Capcom", "Makaimura (Japan revision B)", MACHINE_SUPPORTS_SAVE ) +GAME( 1985, makaimurbbl, gng, gng, makaimur, gng_state, empty_init, ROT0, "bootleg", "Makaimura (Japan revision B bootleg)", MACHINE_SUPPORTS_SAVE ) +GAME( 1985, makaimurc, gng, gng, makaimur, gng_state, empty_init, ROT0, "Capcom", "Makaimura (Japan revision C)", MACHINE_SUPPORTS_SAVE ) +GAME( 1985, makaimurg, gng, gng, makaimur, gng_state, empty_init, ROT0, "Capcom", "Makaimura (Japan revision G)", MACHINE_SUPPORTS_SAVE ) +GAME( 1989, diamrun, 0, diamrun, diamrun, gng_state, empty_init, ROT0, "KH Video", "Diamond Run", MACHINE_SUPPORTS_SAVE ) // Kyle Hodgetts diff --git a/src/mame/casio/fp6000.cpp b/src/mame/casio/fp6000.cpp index 49249e6592565..e2c53e3b33e6b 100644 --- a/src/mame/casio/fp6000.cpp +++ b/src/mame/casio/fp6000.cpp @@ -16,6 +16,7 @@ ****************************************************************************/ #include "emu.h" + #include "cpu/i86/i86.h" #include "machine/pic8259.h" #include "machine/pit8253.h" @@ -24,6 +25,7 @@ #include "bus/centronics/ctronics.h" #include "fp6000_kbd.h" #include "imagedev/cassette.h" + #include "emupal.h" #include "screen.h" #include "speaker.h" @@ -38,8 +40,8 @@ namespace { class fp6000_state : public driver_device { public: - fp6000_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), + fp6000_state(const machine_config &mconfig, device_type type, const char *tag) : + driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), m_pic(*this, "pic"), m_pit(*this, "pit"), diff --git a/src/mame/cave/fstgfish.cpp b/src/mame/cave/fstgfish.cpp index 5efda3e5eca16..2e4cf9424cfcb 100644 --- a/src/mame/cave/fstgfish.cpp +++ b/src/mame/cave/fstgfish.cpp @@ -59,7 +59,7 @@ to the missing CV1000XP card. Connecting directly into the CV1000XP CN2 with a standard USB cable results in the message: USB device not recognized. Attempts to -increase the current on the 5V have not been succesful. +increase the current on the 5V have not been successful. Make a dd of the image, and write to an SSD disk, the game will boot happily. Rename cvgame.exe to @@ -121,7 +121,7 @@ INPUT_PORTS_END void fstgfish_state::fstgfish(machine_config &config) { - PENTIUM3(config, m_maincpu, 200'000'000); /* Intel Core 2 Duo, 333/266/200 FSB clocks */ + PENTIUM3(config, m_maincpu, 200'000'000); // Intel Core 2 Duo, 333/266/200 FSB clocks m_maincpu->set_addrmap(AS_PROGRAM, &fstgfish_state::main_map); m_maincpu->set_addrmap(AS_IO, &fstgfish_state::main_io); @@ -130,16 +130,42 @@ void fstgfish_state::fstgfish(machine_config &config) } ROM_START(fstgfish) - ROM_REGION32_LE(0x80000, "bios", 0) - ROM_LOAD( "g31ms2l.f7", 0x000000, 0x80000, CRC(4f92f678) SHA1(c29ce14f093b5d6ef308f674fe4d514eb10e4742) ) + ROM_REGION32_LE( 0x80000, "bios", 0 ) + ROM_LOAD( "g31ms2l.f7", 0x000000, 0x80000, CRC(4f92f678) SHA1(c29ce14f093b5d6ef308f674fe4d514eb10e4742) ) DISK_REGION( "cfcard" ) // CF with Windows XP embedded DISK_IMAGE( "x11_15305", 0, SHA1(67bce99fb55760d0c06d698e68656eebbda8a28f) ) // H8S/2218 on CV2000XP board, assume with internal ROM - ROM_REGION(0x20000, "cv2000xp", ROMREGION_ERASEFF) - ROM_LOAD( "h8s2218.bin", 0x000000, 0x20000, NO_DUMP ) + ROM_REGION( 0x20000, "cv2000xp", ROMREGION_ERASEFF ) + ROM_LOAD( "h8s2218.bin", 0x000000, 0x20000, NO_DUMP ) +ROM_END + +// for the following 2 games, only CF card dumps are available. + +ROM_START( oyks ) + ROM_REGION32_LE( 0x80000, "bios", 0 ) + ROM_LOAD( "g31ms2l.f7", 0x00000, 0x080000, BAD_DUMP CRC(4f92f678) SHA1(c29ce14f093b5d6ef308f674fe4d514eb10e4742) ) + + DISK_REGION( "cfcard" ) + DISK_IMAGE( "oyks", 0, SHA1(5aea6e0e64e1a2bb01b6225c215634961376e308) ) // お祭りやさん きんぎょR label, 2009/4/20 label, Window XP embedded label + + // H8S/2218 on CV2000XP board, assume with internal ROM + ROM_REGION( 0x20000, "cv2000xp", ROMREGION_ERASEFF ) + ROM_LOAD( "h8s2218.bin", 0x000000, 0x20000, NO_DUMP ) +ROM_END + +ROM_START( oygt ) + ROM_REGION32_LE( 0x80000, "bios", 0 ) + ROM_LOAD( "g31ms2l.f7", 0x00000, 0x080000, BAD_DUMP CRC(4f92f678) SHA1(c29ce14f093b5d6ef308f674fe4d514eb10e4742) ) + + DISK_REGION( "cfcard" ) + DISK_IMAGE( "oygt", 0, SHA1(86581acca549544ec5d1945e46ca95bb76f05b40) ) // 新たこやきD label, Window XP embedded label + + // H8S/2218 on CV2000XP board, assume with internal ROM + ROM_REGION( 0x20000, "cv2000xp", ROMREGION_ERASEFF ) + ROM_LOAD( "h8s2218.bin", 0x000000, 0x20000, NO_DUMP ) ROM_END } // anonymous namespace @@ -147,4 +173,6 @@ ROM_END /*****************************************************************************/ -GAME(2008, fstgfish, 0, fstgfish, fstgfish, fstgfish_state, empty_init, ROT0, "Cave", "Festival: Goldfish Scoop", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 2009, fstgfish, 0, fstgfish, fstgfish, fstgfish_state, empty_init, ROT0, "Cave", "Festival: Goldfish Scoop", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) // probably Japanese, too +GAME( 2009, oyks, fstgfish, fstgfish, fstgfish, fstgfish_state, empty_init, ROT0, "Cave", "Omatsuri Yasan: Kingyo Sukui", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 2009, oygt, 0, fstgfish, fstgfish, fstgfish_state, empty_init, ROT0, "Cave", "Omatsuri Yasan: Ganso Takoyaki", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) diff --git a/src/mame/dataeast/btime.cpp b/src/mame/dataeast/btime.cpp index 12d98ff15638b..ea3cc298f1f07 100644 --- a/src/mame/dataeast/btime.cpp +++ b/src/mame/dataeast/btime.cpp @@ -1205,8 +1205,8 @@ static GFXDECODE_START( gfx_zoar ) GFXDECODE_END static GFXDECODE_START( gfx_disco ) - GFXDECODE_ENTRY( nullptr, 0, disco_tile8layout, 0, 4 ) /* char set #1 */ - GFXDECODE_ENTRY( nullptr, 0, disco_tile16layout, 0, 4 ) /* sprites */ + GFXDECODE_RAM( nullptr, 0, disco_tile8layout, 0, 4 ) /* char set #1 */ + GFXDECODE_RAM( nullptr, 0, disco_tile16layout, 0, 4 ) /* sprites */ GFXDECODE_END /*************************************************************************** diff --git a/src/mame/dataeast/bwing.cpp b/src/mame/dataeast/bwing.cpp index e8262e3594770..2863ca573a6cb 100644 --- a/src/mame/dataeast/bwing.cpp +++ b/src/mame/dataeast/bwing.cpp @@ -69,7 +69,6 @@ class bwing_state : public driver_device virtual void machine_start() override ATTR_COLD; virtual void machine_reset() override ATTR_COLD; virtual void video_start() override ATTR_COLD; - virtual void device_post_load() override; private: required_device m_maincpu; @@ -641,12 +640,6 @@ void bwing_state::machine_reset() m_p3_u8f_d = 0; } -void bwing_state::device_post_load() -{ - m_gfxdecode->gfx(2)->mark_all_dirty(); - m_gfxdecode->gfx(3)->mark_all_dirty(); -} - void bwing_state::bwing(machine_config &config) { diff --git a/src/mame/dataeast/decocass.cpp b/src/mame/dataeast/decocass.cpp index c85439b6fd6ad..85f7c3fe90c34 100644 --- a/src/mame/dataeast/decocass.cpp +++ b/src/mame/dataeast/decocass.cpp @@ -995,10 +995,10 @@ static const gfx_layout objlayout = }; static GFXDECODE_START( gfx_decocass ) - GFXDECODE_ENTRY( nullptr, 0x6000, charlayout, 0, 4 ) /* char set #1 */ - GFXDECODE_ENTRY( nullptr, 0x6000, spritelayout, 0, 4 ) /* sprites */ - GFXDECODE_ENTRY( nullptr, 0xd000, tilelayout, 0, 8 ) /* background tiles */ - GFXDECODE_ENTRY( nullptr, 0xd800, objlayout, 0, 64 ) /* object */ + GFXDECODE_RAM( nullptr, 0x6000, charlayout, 0, 4 ) /* char set #1 */ + GFXDECODE_RAM( nullptr, 0x6000, spritelayout, 0, 4 ) /* sprites */ + GFXDECODE_RAM( nullptr, 0xd000, tilelayout, 0, 8 ) /* background tiles */ + GFXDECODE_RAM( nullptr, 0xd800, objlayout, 0, 64 ) /* object */ GFXDECODE_END void decocass_state::decocass_palette(palette_device &palette) const diff --git a/src/mame/dataeast/exprraid.cpp b/src/mame/dataeast/exprraid.cpp index d274cdbf175c6..c287c93f5be2c 100644 --- a/src/mame/dataeast/exprraid.cpp +++ b/src/mame/dataeast/exprraid.cpp @@ -560,7 +560,7 @@ static INPUT_PORTS_START( exprraid ) PORT_DIPNAME( 0x20, 0x20, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW1:6") PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:5") + PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:7") PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ) ) PORT_DIPUNUSED_DIPLOC( 0x80, IP_ACTIVE_LOW, "SW1:8" ) @@ -594,7 +594,7 @@ static INPUT_PORTS_START( exprraid ) PORT_DIPNAME( 0x04, 0x04, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW2:3") // see notes PORT_DIPSETTING( 0x00, "50k 80k" ) PORT_DIPSETTING( 0x04, "50k only" ) - PORT_DIPNAME( 0x18, 0x18, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW1:4,5") // see notes + PORT_DIPNAME( 0x18, 0x18, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:4,5") // see notes PORT_DIPSETTING( 0x18, DEF_STR( Easy ) ) PORT_DIPSETTING( 0x10, DEF_STR( Normal ) ) PORT_DIPSETTING( 0x08, DEF_STR( Hard ) ) @@ -603,7 +603,7 @@ static INPUT_PORTS_START( exprraid ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x20, DEF_STR( On ) ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(exprraid_state::coin_inserted_deco16), 0) - PORT_DIPUNUSED_DIPLOC( 0x80, IP_ACTIVE_LOW, "SW1:8" ) + PORT_DIPUNUSED_DIPLOC( 0x80, IP_ACTIVE_LOW, "SW2:8" ) INPUT_PORTS_END static INPUT_PORTS_START( exprboot ) diff --git a/src/mame/dataeast/lemmings.cpp b/src/mame/dataeast/lemmings.cpp index 50f5469c65a71..6a81a6be8efb0 100644 --- a/src/mame/dataeast/lemmings.cpp +++ b/src/mame/dataeast/lemmings.cpp @@ -433,7 +433,7 @@ static const gfx_layout sprite_layout = }; static GFXDECODE_START( gfx_lemmings ) - GFXDECODE_ENTRY( nullptr, 0, charlayout, 0, 16 ) // Dynamically modified + GFXDECODE_RAM( nullptr, 0, charlayout, 0, 16 ) // Dynamically modified GFXDECODE_END static GFXDECODE_START( gfx_lemmings_spr1 ) diff --git a/src/mame/dataeast/madalien.cpp b/src/mame/dataeast/madalien.cpp index 1e2ecc5c6bdc6..6beefab5d1f64 100644 --- a/src/mame/dataeast/madalien.cpp +++ b/src/mame/dataeast/madalien.cpp @@ -422,8 +422,6 @@ ROM_START( madalienb ) ROM_REGION( 0x0400, "gfx2", 0 ) /* headlight */ ROM_LOAD( "ma-.2bc", 0x0000, 0x0400, CRC(aab16446) SHA1(d2342627cc2766004343f27515d8a7989d5fe932) ) - - ROM_REGION( 0x0400, "user1", 0 ) // background tile map ROM_LOAD( "mf-1.4h", 0x0000, 0x0400, CRC(9b04c446) SHA1(918013f3c0244ab6a670b9d1b6b642298e2c5ab8) ) @@ -449,7 +447,7 @@ ROM_START( madalienb ) ROM_LOAD( "prom.7e", 0x0000, 0x0020, CRC(e622396a) SHA1(8972704bd25fed462e25c453771cc5ca4fc74034) ) ROM_END -/* set parent machine inp init */ -GAME( 1980, madalien, 0, madalien, madalien, madalien_state, empty_init, ROT270, "Data East Corporation", "Mad Alien (set 1)", MACHINE_SUPPORTS_SAVE ) -GAME( 1980, madaliena,madalien, madalien, madalien, madalien_state, empty_init, ROT270, "Data East Corporation", "Mad Alien (set 2)", MACHINE_SUPPORTS_SAVE ) -GAME( 1980, madalienb,madalien, madalien, madalien, madalien_state, empty_init, ROT270, "Data East Corporation", "Mad Alien (set 2, alt gfx)", MACHINE_SUPPORTS_SAVE ) +/* set parent machine inp init */ +GAME( 1980, madalien, 0, madalien, madalien, madalien_state, empty_init, ROT270, "Data East Corporation", "Mad Alien (set 1)", MACHINE_SUPPORTS_SAVE ) +GAME( 1980, madaliena, madalien, madalien, madalien, madalien_state, empty_init, ROT270, "Data East Corporation", "Mad Alien (set 2)", MACHINE_SUPPORTS_SAVE ) +GAME( 1980, madalienb, madalien, madalien, madalien, madalien_state, empty_init, ROT270, "Data East Corporation", "Mad Alien (set 2, alt gfx)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/dataeast/madalien_v.cpp b/src/mame/dataeast/madalien_v.cpp index fed490e9ac19c..2618c78cf155c 100644 --- a/src/mame/dataeast/madalien_v.cpp +++ b/src/mame/dataeast/madalien_v.cpp @@ -353,7 +353,7 @@ static const gfx_layout tilelayout = static GFXDECODE_START( gfx_madalien ) - GFXDECODE_ENTRY( nullptr, 0, charlayout, 0x20, 2 ) /* foreground characters, stored in RAM */ + GFXDECODE_RAM( nullptr, 0, charlayout, 0x20, 2 ) /* foreground characters, stored in RAM */ GFXDECODE_ENTRY( "gfx1", 0, tilelayout, 0, 4 ) GFXDECODE_ENTRY( "gfx2", 0, headlightlayout, 0, 1 ) GFXDECODE_END diff --git a/src/mame/ddr/polyplay.cpp b/src/mame/ddr/polyplay.cpp index 9654b9c9b159b..ccfb1f5862f73 100644 --- a/src/mame/ddr/polyplay.cpp +++ b/src/mame/ddr/polyplay.cpp @@ -271,7 +271,7 @@ static const gfx_layout charlayout_3_bit = static GFXDECODE_START( gfx_polyplay ) GFXDECODE_ENTRY( "gfx1", 0x0000, charlayout_1_bit, 0, 1 ) - GFXDECODE_ENTRY( nullptr, 0xec00, charlayout_3_bit, 2, 1 ) + GFXDECODE_RAM( nullptr, 0xec00, charlayout_3_bit, 2, 1 ) GFXDECODE_END diff --git a/src/mame/dynax/ddenlovr.cpp b/src/mame/dynax/ddenlovr.cpp index 186ebfd1df480..a0a2def8ab5aa 100644 --- a/src/mame/dynax/ddenlovr.cpp +++ b/src/mame/dynax/ddenlovr.cpp @@ -188,36 +188,38 @@ class ddenlovr_state : public dynax_state , m_oki(*this, "oki") , m_protection1(*this, "protection1") , m_protection2(*this, "protection2") + , m_io_fake(*this, "FAKE") { } - void mjmywrld(machine_config &config); - void mjmyster(machine_config &config); - void nettoqc(machine_config &config); - void mjmyornt(machine_config &config); - void ddenlovrk(machine_config &config); - void quizchq(machine_config &config); - void mjmyuniv(machine_config &config); - void dtoyoken(machine_config &config); - void hgokou(machine_config &config); - void seljan2(machine_config &config); - void janshinp(machine_config &config); - void ultrchmp(machine_config &config); - void rongrong(machine_config &config); - void mjflove(machine_config &config); - void akamaru(machine_config &config); - void hparadis(machine_config &config); - void ddenlovr(machine_config &config); - void hginga(machine_config &config); - void sryudens(machine_config &config); - void hgokbang(machine_config &config); - void quiz365(machine_config &config); - void mjschuka(machine_config &config); - void mjmyorntr(machine_config &config); - void ddenlovj(machine_config &config); - - void init_rongrong(); + void mjmywrld(machine_config &config) ATTR_COLD; + void mjmyster(machine_config &config) ATTR_COLD; + void nettoqc(machine_config &config) ATTR_COLD; + void mjmyornt(machine_config &config) ATTR_COLD; + void ddenlovrk(machine_config &config) ATTR_COLD; + void quizchq(machine_config &config) ATTR_COLD; + void mjmyuniv(machine_config &config) ATTR_COLD; + void dtoyoken(machine_config &config) ATTR_COLD; + void hgokou(machine_config &config) ATTR_COLD; + void seljan2(machine_config &config) ATTR_COLD; + void janshinp(machine_config &config) ATTR_COLD; + void ultrchmp(machine_config &config) ATTR_COLD; + void rongrong(machine_config &config) ATTR_COLD; + void mjflove(machine_config &config) ATTR_COLD; + void akamaru(machine_config &config) ATTR_COLD; + void hparadis(machine_config &config) ATTR_COLD; + void ddenlovr(machine_config &config) ATTR_COLD; + void hginga(machine_config &config) ATTR_COLD; + void sryudens(machine_config &config) ATTR_COLD; + void hgokbang(machine_config &config) ATTR_COLD; + void quiz365(machine_config &config) ATTR_COLD; + void mjschuka(machine_config &config) ATTR_COLD; + void mjmyorntr(machine_config &config) ATTR_COLD; + void ddenlovj(machine_config &config) ATTR_COLD; + + void init_rongrong() ATTR_COLD; int blitter_irq_r(); + template ioport_value io_fake_r() { return BIT(m_io_fake->read(), N, W); } ioport_value ddenlovj_blitter_r(); ioport_value nettoqc_special_r(); ioport_value mjflove_blitter_r(); @@ -362,15 +364,15 @@ class ddenlovr_state : public dynax_state uint8_t hgokou_player_r( int player ); protected: - void ddenlovr_flipscreen_w( uint8_t data ); - void ddenlovr_blit_flip_w( uint8_t data ); - int blit_draw( int src, int sx ); + void ddenlovr_flipscreen_w(uint8_t data); + void ddenlovr_blit_flip_w(uint8_t data); + int blit_draw(int src, int sx); void blit_rect_xywh(); void blit_rect_yh(); - void blit_fill_xy(int x, int y ); + void blit_fill_xy(int x, int y); void blit_horiz_line(); void blit_vert_line(); - inline void log_blit(int data ); + inline void log_blit(int data); void blitter_w(int blitter, offs_t offset, uint8_t data); void blitter_w_funkyfig(int blitter, offs_t offset, uint8_t data); private: @@ -416,6 +418,7 @@ class ddenlovr_state : public dynax_state private: optional_shared_ptr m_protection1; optional_shared_ptr m_protection2; + optional_ioport m_io_fake; protected: std::unique_ptr m_ddenlovr_pixmap[8]; @@ -520,8 +523,8 @@ class mmpanic_state : public ddenlovr_state , m_leds(*this, "led%u", 0U) { } - void mmpanic(machine_config &config); - void funkyfig(machine_config &config); + void mmpanic(machine_config &config) ATTR_COLD; + void funkyfig(machine_config &config) ATTR_COLD; private: DECLARE_MACHINE_START(mmpanic); @@ -564,7 +567,7 @@ class mmpanic_state : public ddenlovr_state required_device m_soundlatch; output_finder<2> m_leds; - uint16_t m_mmpanic_leds = 0; // A led for each of the 9 buttons + uint16_t m_mmpanic_leds = 0; // A LED for each of the 9 buttons uint8_t m_funkyfig_lockout = 0; }; @@ -579,20 +582,20 @@ class hanakanz_state : public ddenlovr_state , m_led(*this, "led") { } - void kotbinsp(machine_config &config); - void mjgnight(machine_config &config); - void hkagerou(machine_config &config); - void hanakanz(machine_config &config); - void jongtei(machine_config &config); - void jongteia(machine_config &config); - void mjchuuka(machine_config &config); - void mjreach1(machine_config &config); - void daimyojn(machine_config &config); - void kotbinyo(machine_config &config); - void daireach(machine_config &config); - void hnrose(machine_config &config); - - void init_momotaro(); + void kotbinsp(machine_config &config) ATTR_COLD; + void mjgnight(machine_config &config) ATTR_COLD; + void hkagerou(machine_config &config) ATTR_COLD; + void hanakanz(machine_config &config) ATTR_COLD; + void jongtei(machine_config &config) ATTR_COLD; + void jongteia(machine_config &config) ATTR_COLD; + void mjchuuka(machine_config &config) ATTR_COLD; + void mjreach1(machine_config &config) ATTR_COLD; + void daimyojn(machine_config &config) ATTR_COLD; + void kotbinyo(machine_config &config) ATTR_COLD; + void daireach(machine_config &config) ATTR_COLD; + void hnrose(machine_config &config) ATTR_COLD; + + void init_momotaro() ATTR_COLD; private: DECLARE_MACHINE_START(hanakanz); @@ -3372,7 +3375,7 @@ uint8_t ddenlovr_state::hginga_coins_r() { case 0x20: return ioport("SYSTEM")->read(); case 0x21: return ioport("BET")->read(); - case 0x22: return 0x7f; // bit 7 = blitter busy, bit 6 = hopper + case 0x22: return 0x3f | (m_hopper->line_r() ? 0x00 : 0x40); // bit 7 = blitter busy, bit 6 = hopper case 0x23: return m_coins; } logerror("%04x: coins_r with select = %02x\n", m_maincpu->pc(), m_input_sel); @@ -3388,23 +3391,24 @@ void ddenlovr_state::hginga_coins_w(uint8_t data) { switch (m_input_sel) { - case 0x2d: - break; - case 0x2c: - // bit 0 = coin counter - // bit 1 = out counter - // bit 2 = hopper (if bet on) - // bit 3 = 1 if bet on - // bit 7? - machine().bookkeeping().coin_counter_w(0, data & 1); - machine().bookkeeping().coin_counter_w(1, data & 2); + case 0x2d: + break; + case 0x2c: + // bit 0 = coin counter + // bit 1 = out counter + // bit 2 = hopper (if bet on) + // bit 3 = 1 if bet on + // bit 7? + machine().bookkeeping().coin_counter_w(0, BIT(data, 0)); + machine().bookkeeping().coin_counter_w(1, BIT(data, 1)); + m_hopper->motor_w(BIT(data, 2)); #ifdef MAME_DEBUG -// popmessage("COINS %02x", data); +// popmessage("COINS %02x", data); #endif - m_coins = data; - break; - default: - logerror("%04x: coins_w with select = %02x, data = %02x\n", m_maincpu->pc(), m_input_sel, data); + m_coins = data; + break; + default: + logerror("%04x: coins_w with select = %02x, data = %02x\n", m_maincpu->pc(), m_input_sel, data); } } @@ -4353,7 +4357,7 @@ void htengoku_state::htengoku_coin_w(uint8_t data) machine().bookkeeping().coin_counter_w(1, BIT(data, 1)); m_hopper->motor_w(BIT(data, 2)); #ifdef MAME_DEBUG -// popmessage("COINS %02x",data); +// popmessage("COINS %02x",data); #endif m_coins = data; break; @@ -5031,139 +5035,140 @@ static INPUT_PORTS_START( ultrchmp ) INPUT_PORTS_END static INPUT_PORTS_START( htengoku ) + // The manual provides two sets of standard settings: + // 標準設定 シングル向け 標準設定 コーナー向け + // SW 1 OFF ON OFF ON OFF ON OFF OFF OFF OFF OFF OFF OFF OFF OFF ON OFF OFF OFF OFF + // SW 2 OFF ON OFF ON OFF ON OFF OFF OFF OFF ON OFF OFF ON OFF OFF OFF OFF OFF OFF + // SW 3 OFF OFF OFF ON OFF OFF OFF ON OFF OFF OFF OFF OFF ON OFF OFF OFF ON OFF OFF + // SW 4 OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF + PORT_START("COINS") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) PORT_CONDITION("DSW4", 0x10, EQUALS, 0x00) // pay PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_CONDITION("DSW4", 0x10, EQUALS, 0x10) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_TOGGLE + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR(Test)) PORT_TOGGLE PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // analyzer PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // data clear - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) // note + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) // key-in PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_INCLUDE( dynax_hanafuda_keys_bet ) + PORT_INCLUDE(dynax_hanafuda_keys_bet) PORT_START("DSW0") // IN11 - DSW1 - PORT_DIPNAME( 0x01, 0x01, "Show Girls" ) - PORT_DIPSETTING( 0x00, DEF_STR( No ) ) - PORT_DIPSETTING( 0x01, DEF_STR( Yes ) ) - PORT_DIPNAME( 0x02, 0x02, "Select Stage" ) - PORT_DIPSETTING( 0x00, DEF_STR( No ) ) - PORT_DIPSETTING( 0x02, DEF_STR( Yes ) ) - PORT_DIPNAME( 0x04, 0x04, "Secret Trick" ) - PORT_DIPSETTING( 0x00, DEF_STR( No ) ) - PORT_DIPSETTING( 0x04, DEF_STR( Yes ) ) - PORT_DIPNAME( 0x08, 0x08, "Secret Character" ) - PORT_DIPSETTING( 0x00, DEF_STR( No ) ) - PORT_DIPSETTING( 0x08, DEF_STR( Yes ) ) - PORT_DIPNAME( 0x10, 0x10, "In Game Sounds" ) - PORT_DIPSETTING( 0x00, DEF_STR( No ) ) - PORT_DIPSETTING( 0x10, DEF_STR( Yes ) ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Demo_Sounds ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x20, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, "Guide" ) - PORT_DIPSETTING( 0x00, DEF_STR( No ) ) - PORT_DIPSETTING( 0x40, DEF_STR( Yes ) ) - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Flip_Screen ) ) - PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x01, 0x01, "Show Gals" ) PORT_DIPLOCATION("SW 1:1") // ギャル表示 + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x01, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x02, 0x00, "Stage Select" ) PORT_DIPLOCATION("SW 1:2") // ステージセレクト + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x02, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x04, 0x04, "Higi" ) PORT_DIPLOCATION("SW 1:3") // 秘技 + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x04, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x08, 0x00, "Higi Character" ) PORT_DIPLOCATION("SW 1:4") // 秘技キャラクター + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x08, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x10, 0x10, "In-Game Music" ) PORT_DIPLOCATION("SW 1:5") // ゲーム音楽 + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x10, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x20, 0x20, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("SW 1:6") // デモ音楽 + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x20, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x40, 0x40, "Hand Lesson" ) PORT_DIPLOCATION("SW 1:7") // 手札教え + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x40, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x80, 0x80, DEF_STR(Flip_Screen) ) PORT_DIPLOCATION("SW 1:8") // 画面反転 + PORT_DIPSETTING( 0x80, DEF_STR(Off) ) // 正 + PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 逆 PORT_START("DSW1") // IN12 - DSW2 - PORT_DIPNAME( 0x07, 0x07, "Payout Rate" ) - PORT_DIPSETTING( 0x00, "Lowest" ) - PORT_DIPSETTING( 0x01, "Lower" ) - PORT_DIPSETTING( 0x02, DEF_STR( Low ) ) - PORT_DIPSETTING( 0x03, "Bit Low" ) - PORT_DIPSETTING( 0x04, DEF_STR( Medium ) ) - PORT_DIPSETTING( 0x05, DEF_STR( High ) ) - PORT_DIPSETTING( 0x06, DEF_STR( Higher ) ) - PORT_DIPSETTING( 0x07, DEF_STR( Highest ) ) - PORT_DIPNAME( 0x08, 0x08, "Payout Wave" ) - PORT_DIPSETTING( 0x00, "Small" ) - PORT_DIPSETTING( 0x08, "Big" ) - PORT_DIPNAME( 0x10, 0x10, "Goko Yaku" ) - PORT_DIPSETTING( 0x00, DEF_STR( No ) ) - PORT_DIPSETTING( 0x10, DEF_STR( Yes ) ) - PORT_DIPNAME( 0x60, 0x60, "Double-Up Win Rate" ) + PORT_DIPNAME( 0x07, 0x05, "Hanafuda Game Payout Rate" ) PORT_DIPLOCATION("SW 2:1,2,3") // 花札 ゲーム 配当率 + PORT_DIPSETTING( 0x00, "8 (Low)" ) // 低い8 + PORT_DIPSETTING( 0x01, "7" ) //   7 + PORT_DIPSETTING( 0x02, "6" ) //   6 + PORT_DIPSETTING( 0x03, "5" ) //   5 + PORT_DIPSETTING( 0x04, "4" ) //   4 + PORT_DIPSETTING( 0x05, "3" ) //   3 + PORT_DIPSETTING( 0x06, "2" ) //   2 + PORT_DIPSETTING( 0x07, "1 (High)" ) // 高い1 + PORT_DIPNAME( 0x08, 0x00, "Payout Variation" ) PORT_DIPLOCATION("SW 2:4") // 配当の波 + PORT_DIPSETTING( 0x00, "Small" ) // 小さい + PORT_DIPSETTING( 0x08, "Big" ) // 大きい + PORT_DIPNAME( 0x10, 0x10, "Gokou Yaku" ) PORT_DIPLOCATION("SW 2:5") // 五光役 + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 出ない + PORT_DIPSETTING( 0x10, DEF_STR(On) ) // 出る + PORT_DIPNAME( 0x60, 0x40, "Double-Up Game Win Rate" ) PORT_DIPLOCATION("SW 2:6,7") // WUPゲーム勝率 PORT_DIPSETTING( 0x00, "65%" ) PORT_DIPSETTING( 0x20, "70%" ) PORT_DIPSETTING( 0x40, "75%" ) PORT_DIPSETTING( 0x60, "80%" ) - PORT_DIPNAME( 0x80, 0x80, "Unknown 2-7" ) - PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "SW 2:8" ) // OFF固定 PORT_START("DSW2") // IN13 - DSW3 - PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coinage ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" ) - PORT_DIPNAME( 0x04, 0x04, "Credits Per Note" ) - PORT_DIPSETTING( 0x00, "5" ) - PORT_DIPSETTING( 0x04, "10" ) - PORT_DIPNAME( 0x08, 0x08, "Maximum Bet" ) + PORT_DIPNAME( 0x03, 0x03, DEF_STR(Coinage) ) PORT_DIPLOCATION("SW 3:1,2") // コインレート + PORT_DIPSETTING( 0x03, DEF_STR(1C_1C) ) // 1コイン 1プレイ + PORT_DIPSETTING( 0x02, DEF_STR(1C_2C) ) // 1コイン 2プレイ + PORT_DIPSETTING( 0x01, DEF_STR(1C_5C) ) // 1コイン 5プレイ + PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" ) // 1コイン10プレイ + PORT_DIPNAME( 0x04, 0x04, "Key-In Rate" ) PORT_DIPLOCATION("SW 3:3") // キーインレート + PORT_DIPSETTING( 0x00, "5" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x03) // × 5 + PORT_DIPSETTING( 0x00, "10" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x02) + PORT_DIPSETTING( 0x00, "25" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x01) + PORT_DIPSETTING( 0x00, "50" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x00) + PORT_DIPSETTING( 0x04, "10" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x03) // ×10 + PORT_DIPSETTING( 0x04, "20" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x02) + PORT_DIPSETTING( 0x04, "50" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x01) + PORT_DIPSETTING( 0x04, "100" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x00) + PORT_DIPNAME( 0x08, 0x00, "Maximum Bet" ) PORT_DIPLOCATION("SW 3:4") // ベットmax PORT_DIPSETTING( 0x08, "5" ) PORT_DIPSETTING( 0x00, "10" ) - PORT_DIPNAME( 0x30, 0x30, "Minimum Bet" ) + PORT_DIPNAME( 0x30, 0x30, "Minimum Bet" ) PORT_DIPLOCATION("SW 3:5,6") // ゲーム・スタートの最低レート枚数 PORT_DIPSETTING( 0x30, "1" ) PORT_DIPSETTING( 0x20, "2" ) PORT_DIPSETTING( 0x10, "3" ) PORT_DIPSETTING( 0x00, "5" ) - PORT_DIPNAME( 0xc0, 0xc0, "Credits Limit" ) - PORT_DIPSETTING( 0xc0, "1000" ) - PORT_DIPSETTING( 0x80, "2000" ) - PORT_DIPSETTING( 0x40, "3000" ) - PORT_DIPSETTING( 0x00, "5000" ) + PORT_DIPNAME( 0xc0, 0x40, "Credit Limit" ) PORT_DIPLOCATION("SW 3:7,8") // クレジット・リミット + PORT_DIPSETTING( 0xc0, "1000" ) // 1000クレジット + PORT_DIPSETTING( 0x80, "2000" ) // 2000クレジット + PORT_DIPSETTING( 0x40, "3000" ) // 3000クレジット + PORT_DIPSETTING( 0x00, "5000" ) // 5000クレジット PORT_START("DSW3") // IN14 - DSW4 - PORT_DIPNAME( 0x03, 0x03, "Odds For Goko" ) + PORT_DIPNAME( 0x03, 0x03, "Gokou Odds" ) PORT_DIPLOCATION("SW 4:1,2") // 五光ODDS PORT_DIPSETTING( 0x03, "100" ) PORT_DIPSETTING( 0x02, "200" ) PORT_DIPSETTING( 0x01, "250" ) PORT_DIPSETTING( 0x00, "300" ) - PORT_DIPNAME( 0x0c, 0x0c, "Odds For Shiko" ) + PORT_DIPNAME( 0x0c, 0x0c, "Shikou Odds" ) PORT_DIPLOCATION("SW 4:3,4") // 四光ODDS PORT_DIPSETTING( 0x0c, "50" ) PORT_DIPSETTING( 0x08, "60" ) PORT_DIPSETTING( 0x04, "70" ) PORT_DIPSETTING( 0x00, "80" ) - PORT_DIPNAME( 0x30, 0x30, "Odds For Ameshiko" ) + PORT_DIPNAME( 0x30, 0x30, "Ameshikou Odds" ) PORT_DIPLOCATION("SW 4:5,6") // 雨四光ODDS PORT_DIPSETTING( 0x30, "20" ) PORT_DIPSETTING( 0x20, "30" ) PORT_DIPSETTING( 0x10, "40" ) PORT_DIPSETTING( 0x00, "50" ) - PORT_DIPNAME( 0x40, 0x40, "Unknown 4-6" ) - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, "Unknown 4-7" ) - PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "SW 4:7" ) // OFF固定 + PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "SW 4:8" ) // OFF固定 PORT_START("DSW4") // IN15 - DSWs top bits - PORT_SERVICE( 0x01, IP_ACTIVE_LOW ) - PORT_DIPNAME( 0x02, 0x02, "Set Clock" ) - PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x04, 0x04, "Unknown 2-8" ) - PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x08, "Unknown 2-9" ) - PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x10, "Payout Mode" ) - PORT_DIPSETTING( 0x10, "Key-out" ) - PORT_DIPSETTING( 0x00, "Hopper" ) - PORT_DIPNAME( 0x20, 0x20, "Hopper Switch" ) - PORT_DIPSETTING( 0x20, "Active Low" ) - PORT_DIPSETTING( 0x00, "Active High" ) - PORT_DIPNAME( 0x40, 0x40, "Unknown 4-8" ) - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, "Unknown 4-9" ) - PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x01, 0x01, DEF_STR(Service_Mode) ) PORT_DIPLOCATION("SW 1:9") + PORT_DIPSETTING( 0x01, DEF_STR(Off) ) // ゲームモード + PORT_DIPSETTING( 0x00, DEF_STR(On) ) // テストモード + PORT_DIPNAME( 0x02, 0x02, "Time Settings Mode" ) PORT_DIPLOCATION("SW 1:10") + PORT_DIPSETTING( 0x02, DEF_STR(Off) ) // ゲームモード + PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 時間設定モード + PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x04, "SW 2:9" ) // OFF固定 + PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "SW 2:10" ) // OFF固定 + PORT_DIPNAME( 0x10, 0x10, "Payout Mode" ) PORT_DIPLOCATION("SW 3:9") + PORT_DIPSETTING( 0x10, "Key-out" ) // クレジットタイプ + PORT_DIPSETTING( 0x00, "Hopper" ) // ホッパータイプ + PORT_DIPNAME( 0x20, 0x20, "Hopper Polarity" ) PORT_DIPLOCATION("SW 3:10") // ホッパーマイクロsw + PORT_DIPSETTING( 0x20, "Active Low" ) // Low Active + PORT_DIPSETTING( 0x00, "Active High" ) // High Active + PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "SW 4:9" ) // OFF固定 + PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "SW 4:10" ) // OFF固定 INPUT_PORTS_END @@ -5637,106 +5642,26 @@ static INPUT_PORTS_START( hanakanz ) PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CONDITION("BET",0x40,EQUALS,0x00) PORT_CODE(KEYCODE_4) // pay PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("BET",0x40,EQUALS,0x40) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) // Test + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR(Test)) // Test PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // analyzer PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // data clear - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) // note + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) // key-in PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN) - PORT_START("KEY0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_A ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_E ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) // I - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_HANAFUDA_YES ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE ) PORT_CONDITION("BET",0x40,EQUALS,0x00) // "t" - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("BET",0x40,EQUALS,0x40) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) + PORT_INCLUDE(dynax_hanafuda_keys_bet) - PORT_START("KEY1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_B ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_F ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) // J - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_HANAFUDA_NO ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) PORT_CONDITION("BET",0x40,EQUALS,0x00) // "s" - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("BET",0x40,EQUALS,0x40) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) // BET + PORT_MODIFY("KEY2") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_G ) - PORT_START("KEY2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_C ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_G ) PORT_CONDITION("BET",0x40,EQUALS,0x40) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("BET",0x40,EQUALS,0x00) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) // K - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_BIG ) PORT_CONDITION("BET",0x40,EQUALS,0x00) // "b" - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("BET",0x40,EQUALS,0x40) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) // Ron - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_MODIFY("KEY3") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_H ) - PORT_START("KEY3") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_D ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_H ) PORT_CONDITION("BET",0x40,EQUALS,0x40) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("BET",0x40,EQUALS,0x00) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) // L - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP ) PORT_CONDITION("BET",0x40,EQUALS,0x00) // "w" - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("BET",0x40,EQUALS,0x40) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_MODIFY("KEY7") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_G ) PORT_PLAYER(2) - PORT_START("KEY4") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_FLIP_FLOP ) PORT_CONDITION("BET",0x40,EQUALS,0x40) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("BET",0x40,EQUALS,0x00) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - PORT_START("KEY5") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_A ) PORT_PLAYER(2) // A - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_E ) PORT_PLAYER(2) // E - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) // I - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_HANAFUDA_YES ) PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE ) PORT_CONDITION("BET",0x40,EQUALS,0x00) PORT_PLAYER(2) // "t" - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("BET",0x40,EQUALS,0x40) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) - - PORT_START("KEY6") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_B ) PORT_PLAYER(2) // B - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_F ) PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) // J - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_HANAFUDA_NO ) PORT_PLAYER(2) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) PORT_CONDITION("BET",0x40,EQUALS,0x00) PORT_PLAYER(2) // "s" - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("BET",0x40,EQUALS,0x40) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) // BET - - PORT_START("KEY7") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_C ) PORT_PLAYER(2) // C - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_G ) PORT_CONDITION("BET",0x40,EQUALS,0x40) PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("BET",0x40,EQUALS,0x00) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) // K - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_BIG ) PORT_CONDITION("BET",0x40,EQUALS,0x00) PORT_PLAYER(2) // "b" - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("BET",0x40,EQUALS,0x40) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) // Ron - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - PORT_START("KEY8") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_HANAFUDA_D ) PORT_PLAYER(2) // D - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_H ) PORT_CONDITION("BET",0x40,EQUALS,0x40) PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("BET",0x40,EQUALS,0x00) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) // L - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP ) PORT_CONDITION("BET",0x40,EQUALS,0x00) PORT_PLAYER(2) // "w" - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("BET",0x40,EQUALS,0x40) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - PORT_START("KEY9") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_FLIP_FLOP ) PORT_CONDITION("BET",0x40,EQUALS,0x40) PORT_PLAYER(2) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("BET",0x40,EQUALS,0x00) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_MODIFY("KEY8") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_HANAFUDA_H ) PORT_PLAYER(2) PORT_START("DSW1") PORT_DIPNAME( 0x07, 0x07, "Unknown 1-0&1&2" ) @@ -5759,27 +5684,33 @@ static INPUT_PORTS_START( hanakanz ) PORT_DIPSETTING( 0x40, "1" ) PORT_DIPSETTING( 0x20, "2" ) PORT_DIPSETTING( 0x00, "3" ) - PORT_DIPNAME( 0x80, 0x80, "Unknown 1-7" ) - PORT_DIPSETTING( 0x00, "5" ) - PORT_DIPSETTING( 0x80, "10" ) + PORT_DIPNAME( 0x80, 0x80, "Key-In Rate" ) PORT_DIPLOCATION("SW1:8") + PORT_DIPSETTING( 0x00, "5" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x03) + PORT_DIPSETTING( 0x00, "10" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x02) + PORT_DIPSETTING( 0x00, "25" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x01) + PORT_DIPSETTING( 0x00, "50" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x00) + PORT_DIPSETTING( 0x80, "10" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x03) + PORT_DIPSETTING( 0x80, "20" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x02) + PORT_DIPSETTING( 0x80, "50" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x01) + PORT_DIPSETTING( 0x80, "100" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x00) PORT_START("DSW2") - PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) ) - PORT_DIPNAME( 0x0c, 0x0c, "Unknown 2-2&3" ) - PORT_DIPSETTING( 0x0c, "10" ) - PORT_DIPSETTING( 0x08, "20" ) - PORT_DIPSETTING( 0x04, "30" ) - PORT_DIPSETTING( 0x00, "50" ) - PORT_DIPNAME( 0x30, 0x30, "Unknown 2-4&5" ) + PORT_DIPNAME( 0x03, 0x03, DEF_STR(Coinage) ) PORT_DIPLOCATION("SW2:1,2") + PORT_DIPSETTING( 0x03, DEF_STR(1C_1C) ) + PORT_DIPSETTING( 0x02, DEF_STR(1C_2C) ) + PORT_DIPSETTING( 0x01, DEF_STR(1C_5C) ) + PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" ) + PORT_DIPNAME( 0x0c, 0x0c, "Minimum Bet" ) PORT_DIPLOCATION("SW2:3,4") + PORT_DIPSETTING( 0x0c, "1" ) + PORT_DIPSETTING( 0x08, "2" ) + PORT_DIPSETTING( 0x04, "3" ) + PORT_DIPSETTING( 0x00, "5" ) + PORT_DIPNAME( 0x30, 0x30, "Gokou Odds" ) PORT_DIPLOCATION("SW2:5,6") PORT_DIPSETTING( 0x30, "100" ) PORT_DIPSETTING( 0x20, "200" ) PORT_DIPSETTING( 0x10, "250" ) PORT_DIPSETTING( 0x00, "300" ) - PORT_DIPNAME( 0xc0, 0xc0, "Unknown 2-6&7" ) + PORT_DIPNAME( 0xc0, 0xc0, "Shikou Odds" ) PORT_DIPLOCATION("SW2:7,8") PORT_DIPSETTING( 0xc0, "50" ) PORT_DIPSETTING( 0x80, "60" ) PORT_DIPSETTING( 0x40, "70" ) @@ -5809,9 +5740,9 @@ static INPUT_PORTS_START( hanakanz ) PORT_DIPSETTING( 0x80, DEF_STR( On ) ) PORT_START("DSW4") - PORT_DIPNAME( 0x01, 0x01, DEF_STR( Demo_Sounds ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x01, DEF_STR( On ) ) + PORT_DIPNAME( 0x01, 0x01, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("SW4:1") + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) + PORT_DIPSETTING( 0x01, DEF_STR(On) ) PORT_DIPNAME( 0x02, 0x02, "Unknown 4-1" ) PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -5821,27 +5752,26 @@ static INPUT_PORTS_START( hanakanz ) PORT_DIPNAME( 0x08, 0x08, "Unknown 4-3" ) PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x10, "Unknown 4-4" ) - PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x10, 0x10, "Hand Lesson" ) PORT_DIPLOCATION("SW4:5") + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) + PORT_DIPSETTING( 0x10, DEF_STR(On) ) PORT_DIPNAME( 0x20, 0x20, "Unknown 4-5" ) PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, "Keyboard" ) - PORT_DIPSETTING( 0x40, "Hanafuda" ) - PORT_DIPSETTING( 0x00, "Mahjong" ) - PORT_DIPNAME( 0x80, 0x80, "Unknown 4-7" ) - PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0xc0, 0xc0, DEF_STR(Controls) ) PORT_DIPLOCATION("SW4:7,8") + PORT_DIPSETTING( 0xc0, "Hanafuda Panel" ) // (numbers/yes/no, uses take/w-up/big/small) + PORT_DIPSETTING( 0x80, "Mahjong Panel" ) // (letters, uses take/w-up/big/small) + PORT_DIPSETTING( 0x40, "Hanafuda Amusement" ) // (numbers/yes/no, doesn't use take/w-up/big/small) + PORT_DIPSETTING( 0x00, "Mahjong Amusement" ) // (letters, doesn't use take/w-up/big/small) PORT_START("DSW5") - PORT_DIPNAME( 0x01, 0x01, "Unknown 1-8" ) - PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x01, 0x01, "Maximum Bet" ) PORT_DIPLOCATION("SW1:9") + PORT_DIPSETTING( 0x00, "5" ) + PORT_DIPSETTING( 0x01, "10" ) PORT_DIPNAME( 0x02, 0x02, "Unknown 1-9" ) PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x0c, 0x0c, "Unknown 2-8&9" ) + PORT_DIPNAME( 0x0c, 0x0c, "Ameshikou Odds" ) PORT_DIPLOCATION("SW2:9,10") PORT_DIPSETTING( 0x0c, "20" ) PORT_DIPSETTING( 0x08, "30" ) PORT_DIPSETTING( 0x04, "40" ) @@ -5849,18 +5779,20 @@ static INPUT_PORTS_START( hanakanz ) PORT_DIPNAME( 0x10, 0x10, "Unknown 3-8" ) PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, "Unknown 3-9" ) - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x20, 0x20, "Gal Voice" ) PORT_DIPLOCATION("SW3:10") + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) + PORT_DIPSETTING( 0x20, DEF_STR(On) ) PORT_DIPNAME( 0x40, 0x40, "Unknown 4-8" ) PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR(Service_Mode) ) PORT_DIPLOCATION("SW4:10") + PORT_DIPSETTING( 0x80, DEF_STR(Off) ) + PORT_DIPSETTING( 0x00, DEF_STR(On) ) PORT_START("BET") - PORT_DIPNAME( 0x40, 0x40, "Allow Bets" ) - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x40, 0x40, "Auto Bet" ) + PORT_DIPSETTING( 0x40, DEF_STR(Off) ) + PORT_DIPSETTING( 0x00, DEF_STR(On) ) // overrides game mode setting, any credits added are bet immediately PORT_START("HOPPER") PORT_DIPNAME( 0x40, 0x40, "? Hopper M." ) @@ -5870,226 +5802,153 @@ INPUT_PORTS_END static INPUT_PORTS_START( hkagerou ) + // The manual provides two sets of standard settings: + // 標準設定 コインプール タイプ 標準設定 メダルコーナータイプ + // SW 1 ON ON OFF ON OFF ON OFF OFF OFF OFF OFF ON OFF ON OFF ON OFF OFF OFF OFF + // SW 2 OFF OFF OFF OFF OFF OFF OFF OFF ON OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF + // SW 3 OFF OFF OFF OFF ON OFF OFF OFF OFF OFF OFF OFF OFF OFF ON OFF OFF OFF OFF OFF + // SW 4 ON ON OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF + PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) // pay PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) // Test PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // analyzer PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // data clear - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) // note + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) // key-in PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN) - PORT_START("KEY0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A ) PORT_NAME("P1 1 (Hanafuda) / P1 A (Mahjong)") - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E ) PORT_NAME("P1 5 (Hanafuda) / P1 E (Mahjong)") - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) // P1 I (not used) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P1 Yes") PORT_CODE(KEYCODE_M) // P1 M - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) // P1 Kan (not used) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 ) - - PORT_START("KEY1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_B ) PORT_NAME("P1 2 (Hanafuda) / P1 B (Mahjong)") - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_F ) PORT_NAME("P1 6 (Hanafuda) / P1 F (Mahjong)") - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) // P1 J (not used) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P1 No") PORT_CODE(KEYCODE_N) // P1 N - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) // P1 Reach (not used) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) // P1 BET - - PORT_START("KEY2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_C ) PORT_NAME("P1 3 (Hanafuda) / P1 C (Mahjong)") - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // P1 G (not used) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) // P1 K (not used) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) // P1 Chi (not used) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) // P1 Ron (not used) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - PORT_START("KEY3") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_D ) PORT_NAME("P1 4 (Hanafuda) / P1 D (Mahjong)") - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // P1 H (not used) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) // P1 L (not used) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) // P1 PON (not used) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - PORT_START("KEY4") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN) // P1 ?? (not used) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE ) // P1 t (Take) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP ) // P1 w (W.Up) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_FLIP_FLOP ) // P1 f (Flip Flop) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_BIG ) // P1 b (Big) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) // P1 s (Small) - - PORT_START("KEY5") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_A ) PORT_NAME("P2 1 (Hanafuda) / P2 A (Mahjong)") PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_E ) PORT_NAME("P2 5 (Hanafuda) / P2 E (Mahjong)") PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) // P2 I (not used) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P2 Yes") // P2 M - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) // P2 Kan (not used) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) - - PORT_START("KEY6") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_B ) PORT_NAME("P2 2 (Hanafuda) / P2 B (Mahjong)") PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_F ) PORT_NAME("P2 6 (Hanafuda) / P2 F (Mahjong)") PORT_PLAYER(2) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) // P2 J (not used) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("P2 No") // P2 N - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) // P2 Reach (not used) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_BET ) PORT_PLAYER(2) // P2 BET - - PORT_START("KEY7") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_C ) PORT_NAME("P2 3 (Hanafuda) / P2 C (Mahjong)") PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // P2 G (not used) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) // P2 K (not used) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) // P2 Chi (not used) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) // P2 Ron (not used) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - PORT_START("KEY8") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_MAHJONG_D ) PORT_NAME("P2 4 (Hanafuda) / P2 D (Mahjong)") PORT_PLAYER(2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // P2 H (not used) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) // P2 L (not used) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) // P2 PON (not used) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - PORT_START("KEY9") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN) // P2 ?? (not used) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_MAHJONG_SCORE ) PORT_PLAYER(2) // P2 t (Take) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MAHJONG_DOUBLE_UP ) PORT_PLAYER(2) // P2 w (W.Up) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_MAHJONG_FLIP_FLOP ) PORT_PLAYER(2) // P2 f (Flip Flop) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_BIG ) PORT_PLAYER(2) // P2 b (Big) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) PORT_PLAYER(2) // P2 s (Small) + PORT_INCLUDE(dynax_hanafuda_keys_bet) PORT_START("DSW1") - PORT_DIPNAME( 0x07, 0x07, "Unknown 1-0&1&2" ) - PORT_DIPSETTING( 0x07, "0" ) - PORT_DIPSETTING( 0x06, "1" ) - PORT_DIPSETTING( 0x05, "2" ) - PORT_DIPSETTING( 0x04, "3" ) - PORT_DIPSETTING( 0x03, "4" ) - PORT_DIPSETTING( 0x02, "5" ) - PORT_DIPSETTING( 0x01, "6" ) - PORT_DIPSETTING( 0x00, "7" ) - PORT_DIPNAME( 0x08, 0x08, "Unknown 1-3" ) - PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x10, "Unknown 1-4" ) - PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x60, 0x60, "Unknown 1-5&6" ) - PORT_DIPSETTING( 0x60, "0" ) - PORT_DIPSETTING( 0x40, "1" ) - PORT_DIPSETTING( 0x20, "2" ) - PORT_DIPSETTING( 0x00, "3" ) - PORT_DIPNAME( 0x80, 0x80, "Credits Per Note" ) - PORT_DIPSETTING( 0x00, "25" ) - PORT_DIPSETTING( 0x80, "50" ) + PORT_DIPNAME( 0x07, 0x04, "Hanafuda Game Payout Rate" ) PORT_DIPLOCATION("SW1:1,2,3") // 花札 ゲーム 配当率 + PORT_DIPSETTING( 0x00, "8 (Low)" ) // 低い8 + PORT_DIPSETTING( 0x01, "7" ) //   7 + PORT_DIPSETTING( 0x02, "6" ) //   6 + PORT_DIPSETTING( 0x03, "5" ) //   5 + PORT_DIPSETTING( 0x04, "4" ) //   4 + PORT_DIPSETTING( 0x05, "3" ) //   3 + PORT_DIPSETTING( 0x06, "2" ) //   2 + PORT_DIPSETTING( 0x07, "1 (High)" ) // 高い1 + PORT_DIPNAME( 0x08, 0x00, "Payout Variation" ) PORT_DIPLOCATION("SW1:4") // 配当の波 + PORT_DIPSETTING( 0x00, "Small" ) // 小さい + PORT_DIPSETTING( 0x08, "Big" ) // 大きい + PORT_DIPNAME( 0x10, 0x10, "Gokou Yaku" ) PORT_DIPLOCATION("SW1:5") // 五光役 + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 出ない + PORT_DIPSETTING( 0x10, DEF_STR(On) ) // 出る + PORT_DIPNAME( 0x60, 0x40, "Double-Up Game Win Rate" ) PORT_DIPLOCATION("SW1:6,7") // W-UPゲーム勝率 + PORT_DIPSETTING( 0x00, "65%" ) + PORT_DIPSETTING( 0x20, "70%" ) + PORT_DIPSETTING( 0x40, "75%" ) + PORT_DIPSETTING( 0x60, "80%" ) + PORT_DIPNAME( 0x80, 0x80, "Key-In Rate" ) PORT_DIPLOCATION("SW1:8") // キーインレーと + PORT_DIPSETTING( 0x00, "5" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x03) // × 5 + PORT_DIPSETTING( 0x00, "10" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x02) + PORT_DIPSETTING( 0x00, "25" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x01) + PORT_DIPSETTING( 0x00, "50" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x00) + PORT_DIPSETTING( 0x80, "10" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x03) // ×10 + PORT_DIPSETTING( 0x80, "20" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x02) + PORT_DIPSETTING( 0x80, "50" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x01) + PORT_DIPSETTING( 0x80, "100" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x00) PORT_START("DSW2") - PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) ) - PORT_DIPSETTING( 0x03, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x01, DEF_STR( 1C_5C ) ) - PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" ) - PORT_DIPNAME( 0x0c, 0x0c, "Unknown 2-2&3" ) - PORT_DIPSETTING( 0x0c, "10" ) - PORT_DIPSETTING( 0x08, "20" ) - PORT_DIPSETTING( 0x04, "30" ) - PORT_DIPSETTING( 0x00, "50" ) - PORT_DIPNAME( 0x30, 0x30, "Unknown 2-4&5" ) + PORT_DIPNAME( 0x03, 0x03, DEF_STR(Coinage) ) PORT_DIPLOCATION("SW2:1,2") // COIN RATE + PORT_DIPSETTING( 0x03, DEF_STR(1C_1C) ) // 1コイン 1プレイ + PORT_DIPSETTING( 0x02, DEF_STR(1C_2C) ) // 1コイン 2プレイ + PORT_DIPSETTING( 0x01, DEF_STR(1C_5C) ) // 1コイン 5プレイ + PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" ) // 1コイン10プレイ + PORT_DIPNAME( 0x0c, 0x0c, "Minimum Bet" ) PORT_DIPLOCATION("SW2:3,4") // ゲーム・スタートの最低レート枚数 + PORT_DIPSETTING( 0x0c, "1" ) // レート1 + PORT_DIPSETTING( 0x08, "2" ) // レート2 + PORT_DIPSETTING( 0x04, "3" ) // レート3 + PORT_DIPSETTING( 0x00, "5" ) // レート5 + PORT_DIPNAME( 0x30, 0x30, "Gokou Odds" ) PORT_DIPLOCATION("SW2:5,6") // 五光ODDS PORT_DIPSETTING( 0x30, "100" ) PORT_DIPSETTING( 0x20, "200" ) PORT_DIPSETTING( 0x10, "250" ) PORT_DIPSETTING( 0x00, "300" ) - PORT_DIPNAME( 0xc0, 0xc0, "Unknown 2-6&7" ) + PORT_DIPNAME( 0xc0, 0xc0, "Shikou Odds" ) PORT_DIPLOCATION("SW2:7,8") // 四光ODDS PORT_DIPSETTING( 0xc0, "50" ) PORT_DIPSETTING( 0x80, "60" ) PORT_DIPSETTING( 0x40, "70" ) PORT_DIPSETTING( 0x00, "80" ) PORT_START("DSW3") - PORT_DIPNAME( 0x01, 0x01, "Game Type?" ) - PORT_DIPSETTING( 0x01, "0" ) - PORT_DIPSETTING( 0x00, "1" ) - PORT_DIPNAME( 0x02, 0x02, "Unknown 3-2" ) - PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x04, 0x04, "(C) Nihon (Censored)" ) - PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x18, 0x18, "Unknown 3-3&4" ) - PORT_DIPSETTING( 0x18, "10" ) - PORT_DIPSETTING( 0x10, "20" ) - PORT_DIPSETTING( 0x08, "30" ) - PORT_DIPSETTING( 0x00, "50" ) - PORT_DIPNAME( 0x60, 0x60, "Unknown 3-5&6" ) - PORT_DIPSETTING( 0x60, "0" ) - PORT_DIPSETTING( 0x40, "1" ) - PORT_DIPSETTING( 0x20, "2" ) - PORT_DIPSETTING( 0x00, "3" ) - PORT_DIPNAME( 0x80, 0x80, "Girl?" ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x80, DEF_STR( On ) ) + PORT_DIPNAME( 0x01, 0x01, "Game Mode" ) PORT_DIPLOCATION("SW3:1") + PORT_DIPSETTING( 0x01, "Medal Type" ) // メダルタイプ   (注1) + PORT_DIPSETTING( 0x00, "Medal Timer" ) // メダルタイマー  (注2)(注3) (shows TIME box at bet screen but no time counter - emulation issue?) + PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x02, "SW3:2" ) // OFF固定 + PORT_DIPNAME( 0x04, 0x04, "Distributor" ) PORT_DIPLOCATION("SW3:3") // OFF固定 + PORT_DIPSETTING( 0x04, "Dynax Soft (more explicit)" ) + PORT_DIPSETTING( 0x00, "Nihon System (less explicit)" ) + PORT_DIPNAME( 0x18, 0x08, "Credit Limit" ) PORT_DIPLOCATION("SW3:4,5") // クレジット・リミット + PORT_DIPSETTING( 0x18, "1000" ) // 1000クレジット + PORT_DIPSETTING( 0x10, "2000" ) // 2000クレジット + PORT_DIPSETTING( 0x08, "3000" ) // 3000クレジット + PORT_DIPSETTING( 0x00, "5000" ) // 5000クレジット + PORT_DIPNAME( 0x60, 0x60, "Gokou/Shikou Generation Limit" ) PORT_DIPLOCATION("SW3:6,7") // 五光四光発生リミット + PORT_DIPSETTING( 0x60, "Setting 1 (Normal)" ) // 設定1(標準) + PORT_DIPSETTING( 0x40, "Setting 2" ) // 設定2 + PORT_DIPSETTING( 0x20, "Setting 3" ) // 設定3 + PORT_DIPSETTING( 0x00, "Setting 4" ) // 設定4 + PORT_DIPNAME( 0x80, 0x80, "Koi-Koi Gal Action" ) PORT_DIPLOCATION("SW3:8") // こいこいギャルアクション + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x80, DEF_STR(On) ) // 有 PORT_START("DSW4") - PORT_DIPNAME( 0x01, 0x01, DEF_STR( Demo_Sounds ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x01, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x02, "Unknown 4-1" ) - PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x04, 0x04, "Unknown 4-2" ) - PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x08, "Unknown 4-3" ) - PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x10, "Unknown 4-4" ) - PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, "Unknown 4-5" ) - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, "Keyboard" ) - PORT_DIPSETTING( 0x40, "Hanafuda" ) - PORT_DIPSETTING( 0x00, "Mahjong" ) - PORT_DIPNAME( 0x80, 0x80, "Unknown 4-7" ) - PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x01, 0x01, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("SW4:1") // デモサウンド + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x01, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x02, 0x02, "In-Game Music" ) PORT_DIPLOCATION("SW4:2") // ゲームサウンド + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x02, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x04, 0x04, "Show Gals" ) PORT_DIPLOCATION("SW4:3") // ??ギャル表示 (TODO: manual scan illegible) + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x04, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x08, 0x08, "Higi" ) PORT_DIPLOCATION("SW4:4") // 秘技 + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x08, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x10, 0x10, "Hand Lesson" ) PORT_DIPLOCATION("SW4:5") // 手札教え + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x10, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x20, 0x20, "Renchan Bonus" ) PORT_DIPLOCATION("SW4:6") // 連?ボーナス (TODO: manual scan illegible) + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x20, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0xc0, 0xc0, DEF_STR(Controls) ) PORT_DIPLOCATION("SW4:7,8") // パネルタイプ + PORT_DIPSETTING( 0xc0, "Hanafuda Panel" ) // 花札パネル 表示 (numbers/yes/no, uses take/w-up/big/small) + PORT_DIPSETTING( 0x80, "Mahjong Panel" ) // 麻雀パネル 表示 (letters, uses take/w-up/big/small) + PORT_DIPSETTING( 0x40, "Hanafuda Amusement" ) // 花札アミューズメント表示 (numbers/yes/no, doesn't use take/w-up/big/small) + PORT_DIPSETTING( 0x00, "Mahjong Amusement" ) // 麻雀アミューズメント表示 (letters, doesn't use take/w-up/big/small) PORT_START("DSW5") - PORT_DIPNAME( 0x01, 0x01, "Unknown 1-8" ) + PORT_DIPNAME( 0x01, 0x01, "Maximum Bet" ) PORT_DIPLOCATION("SW1:9") // ベットMAX PORT_DIPSETTING( 0x00, "5" ) PORT_DIPSETTING( 0x01, "10" ) - PORT_DIPNAME( 0x02, 0x02, "Unknown 1-9" ) - PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x0c, 0x0c, "Unknown 2-8&9" ) + PORT_DIPNAME( 0x02, 0x02, DEF_STR(Flip_Screen) ) PORT_DIPLOCATION("SW1:10") // 画面反転 + PORT_DIPSETTING( 0x02, DEF_STR(Off) ) // 正 + PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 逆 + PORT_DIPNAME( 0x0c, 0x08, "Ameshikou Odds" ) PORT_DIPLOCATION("SW2:9,10") // 雨四光ODDS PORT_DIPSETTING( 0x0c, "20" ) PORT_DIPSETTING( 0x08, "30" ) PORT_DIPSETTING( 0x04, "40" ) PORT_DIPSETTING( 0x00, "50" ) - PORT_DIPNAME( 0x10, 0x10, "Unknown 3-8" ) - PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, "Unknown 3-9" ) - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, "Unknown 4-8" ) - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_SERVICE( 0x80, IP_ACTIVE_LOW ) + PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "SW3:9" ) // OFF固定 + PORT_DIPNAME( 0x20, 0x20, "Gal Voice" ) PORT_DIPLOCATION("SW3:10") // ギャル音声 + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x20, DEF_STR(On) ) // 有 + PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "SW4:9" ) // OFF固定 + PORT_DIPNAME( 0x80, 0x80, DEF_STR(Service_Mode) ) PORT_DIPLOCATION("SW4:10") + PORT_DIPSETTING( 0x80, DEF_STR(Off) ) // ゲームモード + PORT_DIPSETTING( 0x00, DEF_STR(On) ) // テストモード PORT_START("BET") - PORT_DIPNAME( 0x40, 0x40, "Disable Bets" ) - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x40, 0x40, "Auto Bet" ) + PORT_DIPSETTING( 0x40, DEF_STR(Off) ) + PORT_DIPSETTING( 0x00, DEF_STR(On) ) // any credits added are bet immediately PORT_START("HOPPER") - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_TILT ) PORT_NAME("Hopper Switch") // game doesn't use hopper INPUT_PORTS_END @@ -7089,117 +6948,172 @@ INPUT_PORTS_END static INPUT_PORTS_START( mjmyster ) + // The manual provides three sets of standard settings: + // 標準設定 シングル向け 標準設定 メダルコーナー向け 標準設定 アミューズコーナー向け + // SW 1 Off Off Off On On On Off On On Off Off Off Off On On On Off On On Off On Off Off On Off Off On Off On Off + // SW 2 Off Off Off Off On On Off On On Off Off Off Off Off Off Off On On On Off Off Off Off Off Off Off Off Off Off Off + // SW 3 Off Off Off On On On On On On On Off Off Off On On On On On On Off Off On Off On On On On On On Off + // SW 4 Off On On On On Off Off Off Off Off On On On On On Off Off Off Off Off On On On On On Off Off Off Off Off + PORT_START("SYSTEM") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) // pay + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) PORT_CONDITION("DSW3", 0x03, EQUALS, 0x02) // pay + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_CONDITION("DSW3", 0x03, EQUALS, 0x03) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW3", 0x02, EQUALS, 0x00) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN) PORT_SERVICE_NO_TOGGLE(0x04, IP_ACTIVE_LOW) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // analyzer - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // data clear - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) // note + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // analyzer + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // data clear + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BILL1 ) PORT_CODE(KEYCODE_6) // note PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN) PORT_INCLUDE( mahjong_matrix_2p_bet_wup ) PORT_START("DSW1") - MAHJONG_PAYOUT_RATE(0, "SW 1:1,2,3,4") - PORT_DIPNAME( 0x30, 0x00, "Odds Rate" ) PORT_DIPLOCATION("SW 1:5,6") + MAHJONG_PAYOUT_RATE(0, "SW1:1,2,3,4") // PAY-OUT 管理 + PORT_DIPNAME( 0x30, 0x00, "Odds Rate" ) PORT_DIPLOCATION("SW1:5,6") // ODDS 設定 PORT_DIPSETTING( 0x30, "1 2 4 8 12 16 24 32" ) PORT_DIPSETTING( 0x00, "1 2 3 5 8 15 30 50" ) PORT_DIPSETTING( 0x20, "2 3 6 8 12 15 30 50" ) PORT_DIPSETTING( 0x10, "1 2 3 5 10 25 50 100" ) - PORT_DIPNAME( 0xc0, 0x40, "Maximum Bet" ) PORT_DIPLOCATION("SW 1:7,8") + PORT_DIPNAME( 0xc0, 0x40, "Maximum Bet" ) PORT_DIPLOCATION("SW1:7,8") // BET-MAX PORT_DIPSETTING( 0xc0, "1" ) PORT_DIPSETTING( 0x80, "5" ) PORT_DIPSETTING( 0x40, "10" ) PORT_DIPSETTING( 0x00, "20" ) PORT_START("DSW2") - MAHJONG_COINAGE(0, "SW 2:1,2") - PORT_DIPNAME( 0x0c, 0x0c, "Minimum Bet" ) PORT_DIPLOCATION("SW 2:3,4") - PORT_DIPSETTING( 0x0c, "1" ) - PORT_DIPSETTING( 0x08, "2" ) - PORT_DIPSETTING( 0x04, "3" ) - PORT_DIPSETTING( 0x00, "5" ) - PORT_DIPNAME( 0x70, 0x40, "Bonus Chance Cycle" ) PORT_DIPLOCATION("SW 2:5,6,7") - PORT_DIPSETTING( 0x70, "None" ) - PORT_DIPSETTING( 0x60, "First time only" ) - PORT_DIPSETTING( 0x50, "Every 300 coins" ) - PORT_DIPSETTING( 0x40, "Every 500 coins" ) - PORT_DIPSETTING( 0x30, "Every 700 coins" ) - PORT_DIPSETTING( 0x20, "Every 1000 coins" ) + PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(NAME((&ddenlovr_state::io_fake_r<1, 2>))) + PORT_DIPNAME( 0x0c, 0x0c, "Minimum Bet" ) PORT_DIPLOCATION("SW2:3,4") // 最低 BET RATE + PORT_DIPSETTING( 0x0c, "1" ) // レート 1 + PORT_DIPSETTING( 0x08, "2" ) // レート 2 + PORT_DIPSETTING( 0x04, "3" ) // レート 3 + PORT_DIPSETTING( 0x00, "5" ) // レート 5 + PORT_DIPNAME( 0x70, 0x40, "Bonus Chance Cycle" ) PORT_DIPLOCATION("SW2:5,6,7") // ボーナスチャンスの周期設定 + PORT_DIPSETTING( 0x70, "None" ) // 無し + PORT_DIPSETTING( 0x60, "First time only" ) // 初回のみ + PORT_DIPSETTING( 0x50, "Every 300 coins" ) // 300コイン毎 + PORT_DIPSETTING( 0x40, "Every 500 coins" ) // 500コイン毎 + PORT_DIPSETTING( 0x30, "Every 700 coins" ) // 700コイン毎 + PORT_DIPSETTING( 0x20, "Every 1000 coins" ) // 1000コイン毎 //PORT_DIPSETTING( 0x10, "Every 1000 coins" ) //PORT_DIPSETTING( 0x00, "Every 1000 coins" ) - PORT_DIPNAME( 0x80, 0x00, "Chances Per Cycle" ) PORT_DIPLOCATION("SW 2:8") - PORT_DIPSETTING( 0x00, "1" ) - PORT_DIPSETTING( 0x80, "2" ) + PORT_DIPNAME( 0x80, 0x00, "Chances Per Cycle" ) PORT_DIPLOCATION("SW2:8") // 周期設定時のチャンス回数 + PORT_DIPSETTING( 0x00, "1" ) // 1回 + PORT_DIPSETTING( 0x80, "2" ) // 2回 PORT_START("DSW3") - PORT_DIPNAME( 0x03, 0x03, "Game Mode" ) PORT_DIPLOCATION("SW 3:1,2") - PORT_DIPSETTING( 0x03, "Key-out" ) - PORT_DIPSETTING( 0x02, "Hopper payout" ) - PORT_DIPSETTING( 0x01, "Points with credit timer" ) - PORT_DIPNAME( 0x04, 0x04, "Hopper Polarity" ) PORT_DIPLOCATION("SW 3:3") - PORT_DIPSETTING( 0x04, DEF_STR(Normal) ) - PORT_DIPSETTING( 0x00, "Inverted" ) - PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "SW 3:4" ) - PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "SW 3:5" ) - PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "SW 3:6" ) - PORT_DIPNAME( 0x40, 0x00, "Double Bet" ) PORT_DIPLOCATION("SW 3:7") - PORT_DIPSETTING( 0x40, DEF_STR(Off) ) - PORT_DIPSETTING( 0x00, DEF_STR(On) ) - PORT_DIPNAME( 0x80, 0x00, "Last Chance" ) PORT_DIPLOCATION("SW 3:8") - PORT_DIPSETTING( 0x80, DEF_STR(Off) ) - PORT_DIPSETTING( 0x00, DEF_STR(On) ) + PORT_DIPNAME( 0x03, 0x03, "Game Mode" ) PORT_DIPLOCATION("SW3:1,2") + PORT_DIPSETTING( 0x03, "Key-out" ) // クレジットタイプ + PORT_DIPSETTING( 0x02, "Hopper payout" ) // ホッパータイプ + PORT_DIPSETTING( 0x01, "Points with credit timer" ) // クレジットタイマータイプ + PORT_DIPNAME( 0x04, 0x04, "Hopper Polarity" ) PORT_DIPLOCATION("SW3:3") // ホッパーアクティブ + PORT_DIPSETTING( 0x04, DEF_STR(Normal) ) // 通常 + PORT_DIPSETTING( 0x00, "Inverted" ) // 反転 + PORT_DIPNAME( 0x18, 0x00, "Credit Limit" ) PORT_DIPLOCATION("SW3:4,5") // クレジットコインリミット + PORT_DIPSETTING( 0x18, "300" ) + PORT_DIPSETTING( 0x10, "500" ) + PORT_DIPSETTING( 0x08, "700" ) + PORT_DIPSETTING( 0x00, "1000" ) + PORT_DIPNAME( 0x20, 0x00, "Computer Strength" ) PORT_DIPLOCATION("SW3:6") // コンピューターの強さ + PORT_DIPSETTING( 0x00, DEF_STR(Normal) ) // 普通 + PORT_DIPSETTING( 0x20, "Strong" ) // 強 + PORT_DIPNAME( 0x40, 0x00, "Double Bet" ) PORT_DIPLOCATION("SW3:7") // W-BET 機能 + PORT_DIPSETTING( 0x40, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x80, 0x00, "Last Chance" ) PORT_DIPLOCATION("SW3:8") // ラストチャンス + PORT_DIPSETTING( 0x80, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 有 PORT_START("DSW4") - PORT_DIPNAME( 0x01, 0x00, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("SW 4:1") - PORT_DIPSETTING( 0x01, DEF_STR(Off) ) - PORT_DIPSETTING( 0x00, DEF_STR(On) ) - PORT_DIPNAME( 0x02, 0x00, "In-Game Music" ) PORT_DIPLOCATION("SW 4:2") - PORT_DIPSETTING( 0x02, DEF_STR(Off) ) - PORT_DIPSETTING( 0x00, DEF_STR(On) ) - PORT_DIPNAME( 0x04, 0x00, "Show Gals" ) PORT_DIPLOCATION("SW 4:3") - PORT_DIPSETTING( 0x04, DEF_STR(Off) ) + PORT_DIPNAME( 0x01, 0x00, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("SW4:1") // デモサウンド + PORT_DIPSETTING( 0x01, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x02, 0x00, "In-Game Music" ) PORT_DIPLOCATION("SW4:2") // ゲームサウンド + PORT_DIPSETTING( 0x02, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x04, 0x00, "Show Gals" ) PORT_DIPLOCATION("SW4:3") // ギャル表示 + PORT_DIPSETTING( 0x04, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x08, 0x00, "Show Game Action" ) PORT_DIPLOCATION("SW4:4") // ゲームアクション表示 + PORT_DIPSETTING( 0x08, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x10, 0x00, "Fever Payout Rate" ) PORT_DIPLOCATION("SW4:5" ) // フィーバーの出率 + PORT_DIPSETTING( 0x10, DEF_STR(Low) ) // 普通 + PORT_DIPSETTING( 0x00, DEF_STR(Normal) ) // 少ない + PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "SW4:6" ) // OFF固定 + PORT_DIPNAME( 0x40, 0x40, DEF_STR(Controls) ) PORT_DIPLOCATION("SW4:7") // OFF固定 (seems to disable controls if switched on) + PORT_DIPSETTING( 0x40, DEF_STR(Off) ) PORT_DIPSETTING( 0x00, DEF_STR(On) ) - PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "SW 4:4" ) - PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "SW 4:5" ) - PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "SW 4:6" ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Controls ) ) PORT_DIPLOCATION("SW 4:7") - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, DEF_STR(Region) ) PORT_DIPLOCATION("SW 4:8") + PORT_DIPNAME( 0x80, 0x80, DEF_STR(Region) ) PORT_DIPLOCATION("SW4:8") // OFF固定 PORT_DIPSETTING( 0x80, DEF_STR(Japan) ) PORT_DIPSETTING( 0x00, DEF_STR(Hong_Kong) ) PORT_START("DSW5") - PORT_DIPNAME( 0x03, 0x03, "Computer Strength?" ) PORT_DIPLOCATION("SW 4:9,10") - PORT_DIPSETTING( 0x03, "Weak" ) - PORT_DIPSETTING( 0x02, DEF_STR( Normal ) ) - PORT_DIPSETTING( 0x01, "Strong" ) - PORT_DIPSETTING( 0x00, "Very Strong" ) - PORT_DIPNAME( 0x04, 0x00, "Auto Reach" ) PORT_DIPLOCATION("SW 3:9") - PORT_DIPSETTING( 0x04, DEF_STR(Off) ) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(FUNC(ddenlovr_state::io_fake_r<0>)) + PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x02, "SW4:10" ) // OFF固定 + PORT_DIPNAME( 0x04, 0x00, "Auto Reach" ) PORT_DIPLOCATION("SW3:9") // オートリーチ機能 + PORT_DIPSETTING( 0x04, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x08, 0x00, "Don Den Button" ) PORT_DIPLOCATION("SW3:10") // Don・Den機能ボタン変更 + PORT_DIPSETTING( 0x08, "Start" ) // スタート・ボタ + PORT_DIPSETTING( 0x00, "Flip Flop" ) // F/F・ボタン + PORT_DIPNAME( 0x30, 0x20, "Yakuman/Fever Chance Ratio" ) PORT_DIPLOCATION("SW2:9,10") // ボーナスチャンス周期設定時の役満チャンス&フィバーチャンスの比率 + PORT_DIPSETTING( 0x30, "Yakuman Chance Only" ) // 役満チャンスのみ + PORT_DIPSETTING( 0x20, "Equal Yakuman/Fever Chance" ) // 役満チャンスとフィバーチャンスが同等 + PORT_DIPSETTING( 0x10, "Frequent Fever Chance" ) // フィバーチャンスが多い + PORT_DIPSETTING( 0x00, "Fever Chance Only" ) // フィバーチャンスのみ + PORT_DIPNAME( 0x40, 0x00, "Credits Per Note" ) PORT_DIPLOCATION("SW1:9") // NOTE RATE + PORT_DIPSETTING( 0x40, "5" ) PORT_CONDITION("FAKE", 0x06, EQUALS, 0x06) // コイン・イン5倍 + PORT_DIPSETTING( 0x40, "10" ) PORT_CONDITION("FAKE", 0x07, EQUALS, 0x05) + PORT_DIPSETTING( 0x40, "25" ) PORT_CONDITION("FAKE", 0x07, EQUALS, 0x03) + PORT_DIPSETTING( 0x40, "50" ) PORT_CONDITION("FAKE", 0x07, EQUALS, 0x01) + PORT_DIPSETTING( 0x40, "5" ) PORT_CONDITION("FAKE", 0x07, EQUALS, 0x04) + PORT_DIPSETTING( 0x40, "10" ) PORT_CONDITION("FAKE", 0x07, EQUALS, 0x02) + PORT_DIPSETTING( 0x40, "15" ) PORT_CONDITION("FAKE", 0x07, EQUALS, 0x00) + PORT_DIPSETTING( 0x00, "10" ) PORT_CONDITION("FAKE", 0x06, EQUALS, 0x06) // コイン・イン10倍 + PORT_DIPSETTING( 0x00, "20" ) PORT_CONDITION("FAKE", 0x07, EQUALS, 0x05) + PORT_DIPSETTING( 0x00, "50" ) PORT_CONDITION("FAKE", 0x07, EQUALS, 0x03) + PORT_DIPSETTING( 0x00, "100" ) PORT_CONDITION("FAKE", 0x07, EQUALS, 0x01) + PORT_DIPSETTING( 0x00, "10" ) PORT_CONDITION("FAKE", 0x07, EQUALS, 0x04) + PORT_DIPSETTING( 0x00, "20" ) PORT_CONDITION("FAKE", 0x07, EQUALS, 0x02) + PORT_DIPSETTING( 0x00, "30" ) PORT_CONDITION("FAKE", 0x07, EQUALS, 0x00) + PORT_DIPNAME( 0x80, 0x80, DEF_STR(Flip_Screen) ) PORT_DIPLOCATION("SW1:10") // 画面反転 + PORT_DIPSETTING( 0x80, DEF_STR(Off) ) // 通常 + PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 反転 + + PORT_START("FAKE") + PORT_DIPNAME( 0x01, 0x01, "Alternate Coinage" ) PORT_DIPLOCATION("SW4:9") // OFF固定 + PORT_DIPSETTING( 0x01, DEF_STR(Off) ) PORT_DIPSETTING( 0x00, DEF_STR(On) ) - PORT_DIPNAME( 0x08, 0x00, "Don Den Button" ) PORT_DIPLOCATION("SW 3:10") - PORT_DIPSETTING( 0x08, "Start" ) - PORT_DIPSETTING( 0x00, "Flip Flop" ) - PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "SW 2:9" ) - PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "SW 2:10" ) - MAHJONG_NOTE_CREDITS(6, "SW 1:9", "DSW2", 0) - PORT_DIPNAME( 0x80, 0x00, DEF_STR(Flip_Screen) ) PORT_DIPLOCATION("SW 1:10") - PORT_DIPSETTING( 0x00, DEF_STR(Off) ) - PORT_DIPSETTING( 0x80, DEF_STR(On) ) + PORT_DIPNAME( 0x06, 0x06, DEF_STR(Coinage) ) PORT_DIPLOCATION("SW2:1,2") // Coin Rate + PORT_DIPSETTING( 0x06, DEF_STR(1C_1C) ) PORT_CONDITION("FAKE", 0x01, EQUALS, 0x01) // 1コイン 1プレイ + PORT_DIPSETTING( 0x04, DEF_STR(1C_2C) ) PORT_CONDITION("FAKE", 0x01, EQUALS, 0x01) // 1コイン 2プレイ + PORT_DIPSETTING( 0x02, DEF_STR(1C_5C) ) PORT_CONDITION("FAKE", 0x01, EQUALS, 0x01) // 1コイン 5プレイ + PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" ) PORT_CONDITION("FAKE", 0x01, EQUALS, 0x01) // 1コイン 10プレイ + PORT_DIPSETTING( 0x04, DEF_STR(2C_1C) ) PORT_CONDITION("FAKE", 0x01, EQUALS, 0x00) + PORT_DIPSETTING( 0x02, DEF_STR(2C_2C) ) PORT_CONDITION("FAKE", 0x01, EQUALS, 0x00) + PORT_DIPSETTING( 0x06, DEF_STR(1C_1C) ) PORT_CONDITION("FAKE", 0x01, EQUALS, 0x00) + PORT_DIPSETTING( 0x00, DEF_STR(2C_3C) ) PORT_CONDITION("FAKE", 0x01, EQUALS, 0x00) INPUT_PORTS_END static INPUT_PORTS_START( hginga ) + // The manual provides three sets of standard settings: + // 標準設定 コインプールタイプ 標準設定 メダルコーナータイプ 標準設定 アミューズコーナータイプ + // SW 1 ON ON OFF ON OFF ON OFF OFF OFF OFF OFF ON OFF ON OFF ON OFF OFF OFF OFF OFF OFF OFF ON OFF ON OFF OFF ON OFF + // SW 2 OFF OFF OFF OFF OFF OFF OFF OFF ON OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF * * OFF OFF OFF OFF OFF OFF OFF OFF + // SW 3 OFF OFF OFF OFF ON OFF OFF OFF OFF OFF OFF OFF OFF OFF ON OFF OFF OFF OFF OFF OFF ON OFF OFF ON OFF OFF OFF OFF OFF + // SW 4 ON OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF + PORT_START("SYSTEM") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) // pay + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_CODE(KEYCODE_4) PORT_CONDITION("DSW3", 0x03, EQUALS, 0x02) // pay + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_CONDITION("DSW3", 0x03, EQUALS, 0x03) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW3", 0x02, EQUALS, 0x00) // PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) // Test - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // analyzer + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) // analyzer PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // data clear - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) // note + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) // key-in PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN1) // PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -7283,132 +7197,136 @@ static INPUT_PORTS_START( hginga ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_MAHJONG_BIG ) // "b" PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_MAHJONG_SMALL ) // "s" - PORT_START("DSW4") - PORT_DIPNAME( 0x01, 0x01, DEF_STR( Demo_Sounds ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x01, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x02, "Unknown 4-1" ) - PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x04, 0x04, "Girls" ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x04, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x08, "Unknown 4-3" ) - PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x10, "Hint" ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x10, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, "Unknown 4-5" ) - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, "Unknown 4-6" ) - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x00, "Cards Labels" ) - PORT_DIPSETTING( 0x80, "Numbers" ) - PORT_DIPSETTING( 0x00, "Letters" ) - - PORT_START("DSW3") - PORT_DIPNAME( 0x03, 0x03, "Unknown 3-0&1" ) - PORT_DIPSETTING( 0x03, "1" ) - PORT_DIPSETTING( 0x02, "2" ) - PORT_DIPSETTING( 0x01, "3" ) - PORT_DIPSETTING( 0x00, "4" ) - PORT_DIPNAME( 0x04, 0x04, "Unknown 3-2" ) - PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x18, 0x18, "Unknown 3-3&4" ) - PORT_DIPSETTING( 0x18, "10" ) - PORT_DIPSETTING( 0x10, "20" ) - PORT_DIPSETTING( 0x08, "30" ) - PORT_DIPSETTING( 0x00, "50" ) - PORT_DIPNAME( 0x20, 0x20, "Unknown 3-5" ) - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0xc0, 0xc0, "Unknown 3-6&7" ) - PORT_DIPSETTING( 0xc0, "0" ) - PORT_DIPSETTING( 0x80, "1" ) - PORT_DIPSETTING( 0x40, "2" ) - PORT_DIPSETTING( 0x00, "3" ) + PORT_START("DSW1") + PORT_DIPNAME( 0x07, 0x04, "Hanafuda Game Payout Rate" ) PORT_DIPLOCATION("SW1:1,2,3") // 花札 ゲーム 配当率 + PORT_DIPSETTING( 0x00, "8 (Low)" ) // 低い8 + PORT_DIPSETTING( 0x01, "7" ) //   7 + PORT_DIPSETTING( 0x02, "6" ) //   6 + PORT_DIPSETTING( 0x03, "5" ) //   5 + PORT_DIPSETTING( 0x04, "4" ) //   4 + PORT_DIPSETTING( 0x05, "3" ) //   3 + PORT_DIPSETTING( 0x06, "2" ) //   2 + PORT_DIPSETTING( 0x07, "1 (High)" ) // 高い1 + PORT_DIPNAME( 0x08, 0x00, "Payout Variation" ) PORT_DIPLOCATION("SW1:4") // 配当の波 + PORT_DIPSETTING( 0x00, "Small" ) // 小さい + PORT_DIPSETTING( 0x08, "Big" ) // 大きい + PORT_DIPNAME( 0x10, 0x10, "Gokou Yaku" ) PORT_DIPLOCATION("SW1:5") // 五光役 + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 出ない + PORT_DIPSETTING( 0x10, DEF_STR(On) ) // 出る + PORT_DIPNAME( 0x60, 0x40, "Double-Up Game Win Rate" ) PORT_DIPLOCATION("SW1:6,7") // W-UPゲーム勝率 + PORT_DIPSETTING( 0x00, "65%" ) + PORT_DIPSETTING( 0x20, "70%" ) + PORT_DIPSETTING( 0x40, "75%" ) + PORT_DIPSETTING( 0x60, "80%" ) + PORT_DIPNAME( 0x80, 0x80, "Key-In Rate" ) PORT_DIPLOCATION("SW1:8") // キーインレーと + PORT_DIPSETTING( 0x00, "5" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x03) // × 5 + PORT_DIPSETTING( 0x00, "10" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x02) + PORT_DIPSETTING( 0x00, "25" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x01) + PORT_DIPSETTING( 0x00, "50" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x00) + PORT_DIPSETTING( 0x80, "10" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x03) // ×10 + PORT_DIPSETTING( 0x80, "20" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x02) + PORT_DIPSETTING( 0x80, "50" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x01) + PORT_DIPSETTING( 0x80, "100" ) PORT_CONDITION("DSW2", 0x03, EQUALS, 0x00) PORT_START("DSW2") - PORT_DIPNAME( 0x03, 0x03, "Unknown 2-0&1" ) - PORT_DIPSETTING( 0x03, "1" ) - PORT_DIPSETTING( 0x02, "2" ) - PORT_DIPSETTING( 0x01, "5" ) - PORT_DIPSETTING( 0x00, "10" ) - PORT_DIPNAME( 0x04, 0x04, "Unknown 2-2" ) - PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x08, "Unknown 2-3" ) - PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x30, 0x30, "Odds Rate" ) - PORT_DIPSETTING( 0x30, "2 5 6 20 50 100" ) - PORT_DIPSETTING( 0x20, "2 5 6 20 50 200" ) - PORT_DIPSETTING( 0x10, "2 5 6 20 50 250" ) - PORT_DIPSETTING( 0x00, "2 5 6 20 50 300" ) - PORT_DIPNAME( 0xc0, 0xc0, "Unknown 2-6&7" ) + PORT_DIPNAME( 0x03, 0x03, DEF_STR(Coinage) ) PORT_DIPLOCATION("SW2:1,2") // COIN RATE + PORT_DIPSETTING( 0x03, DEF_STR(1C_1C) ) // 1コイン 1プレイ + PORT_DIPSETTING( 0x02, DEF_STR(1C_2C) ) // 1コイン 2プレイ + PORT_DIPSETTING( 0x01, DEF_STR(1C_5C) ) // 1コイン 5プレイ + PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" ) // 1コイン10プレイ + PORT_DIPNAME( 0x0c, 0x0c, "Minimum Bet" ) PORT_DIPLOCATION("SW2:3,4") // 最低 ベットレート + PORT_DIPSETTING( 0x0c, "1" ) // レート1 + PORT_DIPSETTING( 0x08, "2" ) // レート2 + PORT_DIPSETTING( 0x04, "3" ) // レート3 + PORT_DIPSETTING( 0x00, "5" ) // レート5 + PORT_DIPNAME( 0x30, 0x30, "Gokou Odds" ) PORT_DIPLOCATION("SW2:5,6") // 五光ODDS + PORT_DIPSETTING( 0x30, "100" ) + PORT_DIPSETTING( 0x20, "200" ) + PORT_DIPSETTING( 0x10, "250" ) + PORT_DIPSETTING( 0x00, "300" ) + PORT_DIPNAME( 0xc0, 0xc0, "Shikou Odds" ) PORT_DIPLOCATION("SW2:7,8") // 四光ODDS PORT_DIPSETTING( 0xc0, "50" ) PORT_DIPSETTING( 0x80, "60" ) PORT_DIPSETTING( 0x40, "70" ) PORT_DIPSETTING( 0x00, "80" ) - PORT_START("DSW1") - PORT_DIPNAME( 0x07, 0x07, "Unknown 1-0&1&2" ) - PORT_DIPSETTING( 0x07, "0" ) - PORT_DIPSETTING( 0x06, "1" ) - PORT_DIPSETTING( 0x05, "2" ) - PORT_DIPSETTING( 0x04, "3" ) - PORT_DIPSETTING( 0x03, "4" ) - PORT_DIPSETTING( 0x02, "5" ) - PORT_DIPSETTING( 0x01, "6" ) - PORT_DIPSETTING( 0x00, "7" ) - PORT_DIPNAME( 0x08, 0x08, "Unknown 1-3" ) - PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x10, "Unknown 1-4" ) - PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x60, 0x60, "Unknown 1-5&6" ) - PORT_DIPSETTING( 0x60, "0" ) - PORT_DIPSETTING( 0x40, "1" ) - PORT_DIPSETTING( 0x20, "2" ) - PORT_DIPSETTING( 0x00, "3" ) - PORT_DIPNAME( 0x80, 0x80, "Unknown 1-7" ) - PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_START("DSW3") + PORT_DIPNAME( 0x03, 0x03, "Game Mode" ) PORT_DIPLOCATION("SW3:1,2") + PORT_DIPSETTING( 0x03, "Key-out" ) // クレジットタイプ      (注1) + PORT_DIPSETTING( 0x02, "Hopper payout" ) // ホッパータイプ       (注2) + PORT_DIPSETTING( 0x01, "Points with credit timer" ) // クレジットタイマータイプ  (注3) + //PORT_DIPSETTING( 0x00, "Points with credit timer" ) + PORT_DIPNAME( 0x04, 0x04, "Hopper Polarity" ) PORT_DIPLOCATION("SW3:3") // ホッパーマイクロSW + PORT_DIPSETTING( 0x04, "Active Low" ) // Low Active + PORT_DIPSETTING( 0x00, "Active High" ) // High Active + PORT_DIPNAME( 0x18, 0x08, "Credit Limit" ) PORT_DIPLOCATION("SW3:4,5") // クレジット・リミット (doesn't seem to apply to coins or key-in - does it apply to winnings?) + PORT_DIPSETTING( 0x18, "1000" ) // 1000クレジット + PORT_DIPSETTING( 0x10, "2000" ) // 2000クレジット + PORT_DIPSETTING( 0x08, "3000" ) // 3000クレジット + PORT_DIPSETTING( 0x00, "5000" ) // 5000クレジット + PORT_DIPNAME( 0x20, 0x20, "Hanaroku Hopper" ) PORT_DIPLOCATION("SW3:6") // 花六ホッパー + PORT_DIPSETTING( 0x20, "Manual" ) // 手動 + PORT_DIPSETTING( 0x00, "Automatic" ) // 自動 + PORT_DIPNAME( 0xc0, 0xc0, "Gokou/Shikou Generation Interval" ) PORT_DIPLOCATION("SW3:7,8") // 五光、四光発生間隙 + PORT_DIPSETTING( 0xc0, "Short" ) // せまい + PORT_DIPSETTING( 0x80, "A Little Short" ) // ややせまい + PORT_DIPSETTING( 0x40, "A Little Long" ) // ややひろい + PORT_DIPSETTING( 0x00, "Long" ) // ひろい + + PORT_START("DSW4") + PORT_DIPNAME( 0x01, 0x01, DEF_STR(Demo_Sounds) ) PORT_DIPLOCATION("SW4:1") // デモ・サウンド + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x01, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x02, 0x02, "In-Game Music" ) PORT_DIPLOCATION("SW4:2") // ゲーム・サウンド + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x02, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x04, 0x04, "Show Gals" ) PORT_DIPLOCATION("SW4:3") // ギャル表示 + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x04, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x08, 0x08, "Higi" ) PORT_DIPLOCATION("SW4:4") // 秘技 + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x08, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x10, 0x10, "Hand Lesson" ) PORT_DIPLOCATION("SW4:5") // 手札教え + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x10, DEF_STR(On) ) // 有 + PORT_DIPNAME( 0x20, 0x20, "Renchan Bonus" ) PORT_DIPLOCATION("SW4:6") // 漣ちゃんボーナス + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) // 無 + PORT_DIPSETTING( 0x20, DEF_STR(On) ) // 有 + PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "SW4:7" ) // OFF固定 + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(FUNC(ddenlovr_state::io_fake_r<0>)) PORT_START("DSW5") - PORT_DIPNAME( 0x01, 0x01, "Keyboard" ) - PORT_DIPSETTING( 0x00, "Hanafuda" ) // Requires different inputs - PORT_DIPSETTING( 0x01, "Mahjong" ) - PORT_SERVICE( 0x02, IP_ACTIVE_LOW ) - PORT_DIPNAME( 0x04, 0x04, "Unknown 2-8" ) - PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x08, "Unknown 2-9" ) - PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x10, "Unknown 3-8" ) - PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, "Unknown 3-9" ) - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, "Unknown 4-8" ) - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Flip_Screen ) ) - PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(FUNC(ddenlovr_state::io_fake_r<1>)) + PORT_DIPNAME( 0x02, 0x02, DEF_STR(Service_Mode) ) PORT_DIPLOCATION("SW4:10") + PORT_DIPSETTING( 0x02, DEF_STR(Off) ) // ゲームモード + PORT_DIPSETTING( 0x00, DEF_STR(On) ) // テストモード + PORT_DIPNAME( 0x04, 0x04, "Show Girl in Milky Way Animation" ) PORT_DIPLOCATION("SW3:9" ) // OFF固定 + PORT_DIPSETTING( 0x00, DEF_STR(Off) ) + PORT_DIPSETTING( 0x04, DEF_STR(On) ) + PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "SW3:10" ) // OFF固定 + PORT_DIPNAME( 0x30, 0x20, "Ameshikou Odds" ) PORT_DIPLOCATION("SW2:9,10") // 雨四光ODDS + PORT_DIPSETTING( 0x30, "20" ) + PORT_DIPSETTING( 0x20, "30" ) + PORT_DIPSETTING( 0x10, "40" ) + PORT_DIPSETTING( 0x00, "50" ) + PORT_DIPNAME( 0x40, 0x40, "Maximum Bet" ) PORT_DIPLOCATION("SW1:9") // ベットMAX + PORT_DIPSETTING( 0x00, "5" ) + PORT_DIPSETTING( 0x40, "10" ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR(Flip_Screen) ) PORT_DIPLOCATION("SW1:10") // 画面反転 + PORT_DIPSETTING( 0x80, DEF_STR(Off) ) // 正 + PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 逆 + + PORT_START("FAKE") + PORT_DIPNAME( 0x03, 0x03, DEF_STR(Controls) ) PORT_DIPLOCATION("SW4:8,9") + PORT_DIPSETTING( 0x03, "Hanafuda Panel" ) // 花札パネル + PORT_DIPSETTING( 0x02, "Mahjong Panel" ) // 麻雀パネル + PORT_DIPSETTING( 0x01, "Hanaroku Panel" ) // 花六パネル (not supported) + //PORT_DIPSETTING( 0x00, "Hanaroku Panel" ) PORT_START("BET") - PORT_DIPNAME( 0x40, 0x40, "Allow Bets" ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x40, DEF_STR( On ) ) + PORT_DIPNAME( 0x40, 0x40, "Auto Bet" ) + PORT_DIPSETTING( 0x40, DEF_STR(Off) ) + PORT_DIPSETTING( 0x00, DEF_STR(On) ) // any credits added are bet immediately PORT_BIT( 0xbf, IP_ACTIVE_LOW, IPT_UNKNOWN) INPUT_PORTS_END @@ -7556,7 +7474,7 @@ INPUT_PORTS_END static INPUT_PORTS_START( mjmyornt ) // The manual provides three sets of standard settings: - // 標準設定 シングル向け 標準設定 メダル コーナー向け 標準設定 アミューズ コーナー向け + // 標準設定 シングル向け 標準設定 メダル コーナー向け 標準設定 アミューズ コーナー向け // SW 1 OFF OFF OFF ON ON ON OFF ON ON OFF OFF OFF OFF ON ON ON OFF ON ON OFF ON OFF OFF ON OFF OFF ON OFF ON OFF // SW 2 OFF OFF OFF OFF ON ON OFF ON ON ON OFF OFF OFF OFF OFF OFF ON ON ON ON OFF OFF OFF OFF OFF OFF OFF OFF OFF OFF // SW 3 OFF OFF OFF ON ON ON ON ON ON ON OFF OFF OFF ON ON ON ON ON ON OFF OFF ON OFF ON ON ON ON ON ON OFF @@ -7588,15 +7506,7 @@ static INPUT_PORTS_START( mjmyornt ) PORT_DIPSETTING( 0x00, "20" ) PORT_START("DSW2") - PORT_DIPNAME( 0x03, 0x03, DEF_STR(Coinage) ) PORT_DIPLOCATION("SW 2:1,2") // COIN RATE - PORT_DIPSETTING( 0x03, DEF_STR(1C_1C) ) PORT_CONDITION("DSW5", 0x01, EQUALS, 0x01) // 1コイン   1プレイ - PORT_DIPSETTING( 0x02, DEF_STR(1C_2C) ) PORT_CONDITION("DSW5", 0x01, EQUALS, 0x01) // 1コイン   2プレイ - PORT_DIPSETTING( 0x01, DEF_STR(1C_5C) ) PORT_CONDITION("DSW5", 0x01, EQUALS, 0x01) // 1コイン   5プレイ - PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" ) PORT_CONDITION("DSW5", 0x01, EQUALS, 0x01) // 1コイン  10プレイ - PORT_DIPSETTING( 0x01, DEF_STR(2C_2C) ) PORT_CONDITION("DSW5", 0x01, EQUALS, 0x00) - PORT_DIPSETTING( 0x03, DEF_STR(1C_1C) ) PORT_CONDITION("DSW5", 0x01, EQUALS, 0x00) - PORT_DIPSETTING( 0x00, DEF_STR(2C_3C) ) PORT_CONDITION("DSW5", 0x01, EQUALS, 0x00) - PORT_DIPSETTING( 0x02, DEF_STR(1C_2C) ) PORT_CONDITION("DSW5", 0x01, EQUALS, 0x00) + PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(NAME((&ddenlovr_state::io_fake_r<1, 2>))) PORT_DIPNAME( 0x0c, 0x0c, "Minimum Bet" ) PORT_DIPLOCATION("SW 2:3,4") // 最低 BET RATE PORT_DIPSETTING( 0x0c, "1" ) // レート 1 PORT_DIPSETTING( 0x08, "2" ) // レート 2 @@ -7663,9 +7573,7 @@ static INPUT_PORTS_START( mjmyornt ) PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "SW 4:8" ) // OFF固定 PORT_START("DSW5") - PORT_DIPNAME( 0x01, 0x01, "Alternate Coinage" ) PORT_DIPLOCATION("SW 4:9") // OFF固定 - PORT_DIPSETTING( 0x01, DEF_STR(Off) ) - PORT_DIPSETTING( 0x00, DEF_STR(On) ) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(FUNC(ddenlovr_state::io_fake_r<0>)) PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x02, "SW 4:10" ) // OFF固定 PORT_DIPNAME( 0x04, 0x00, "Auto Reach" ) PORT_DIPLOCATION("SW 3:9") // オート・リーチ機能の有無 PORT_DIPSETTING( 0x04, DEF_STR(Off) ) // 無 @@ -7678,24 +7586,67 @@ static INPUT_PORTS_START( mjmyornt ) PORT_DIPSETTING( 0x20, "Equal Yakuman/Fever Chance" ) // 役満チャンスとフィバーチャンスが同等 PORT_DIPSETTING( 0x10, "Frequent Fever Chance" ) // フィバーチャンスが多い PORT_DIPSETTING( 0x00, "Fever Chance Only" ) // フィバーチャンスのみ - MAHJONG_NOTE_CREDITS(6, "SW 1:9", "DSW2", 0) // NOTE RATE (TODO: this is affected by the alternate coinage setting) + PORT_DIPNAME( 0x40, 0x00, "Credits Per Note" ) PORT_DIPLOCATION("SW 1:9") // NOTE RATE + PORT_DIPSETTING( 0x40, "5" ) PORT_CONDITION("FAKE", 0x06, EQUALS, 0x06) // コイン・イン 5倍 + PORT_DIPSETTING( 0x40, "10" ) PORT_CONDITION("FAKE", 0x06, EQUALS, 0x04) + PORT_DIPSETTING( 0x40, "25" ) PORT_CONDITION("FAKE", 0x07, EQUALS, 0x03) + PORT_DIPSETTING( 0x40, "50" ) PORT_CONDITION("FAKE", 0x07, EQUALS, 0x01) + PORT_DIPSETTING( 0x40, "10" ) PORT_CONDITION("FAKE", 0x07, EQUALS, 0x02) + PORT_DIPSETTING( 0x40, "15" ) PORT_CONDITION("FAKE", 0x07, EQUALS, 0x00) + PORT_DIPSETTING( 0x00, "10" ) PORT_CONDITION("FAKE", 0x06, EQUALS, 0x06) // コイン・イン10倍 + PORT_DIPSETTING( 0x00, "20" ) PORT_CONDITION("FAKE", 0x06, EQUALS, 0x04) + PORT_DIPSETTING( 0x00, "50" ) PORT_CONDITION("FAKE", 0x07, EQUALS, 0x03) + PORT_DIPSETTING( 0x00, "100" ) PORT_CONDITION("FAKE", 0x07, EQUALS, 0x01) + PORT_DIPSETTING( 0x00, "20" ) PORT_CONDITION("FAKE", 0x07, EQUALS, 0x02) + PORT_DIPSETTING( 0x00, "30" ) PORT_CONDITION("FAKE", 0x07, EQUALS, 0x00) PORT_DIPNAME( 0x80, 0x80, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW 1:10") // ー画面反転 PORT_DIPSETTING( 0x80, DEF_STR(Off) ) // 通常 PORT_DIPSETTING( 0x00, DEF_STR(On) ) // 反転 + + PORT_START("FAKE") + PORT_DIPNAME( 0x01, 0x01, "Alternate Coinage" ) PORT_DIPLOCATION("SW 4:9") // OFF固定 + PORT_DIPSETTING( 0x01, DEF_STR(Off) ) + PORT_DIPSETTING( 0x00, DEF_STR(On) ) + PORT_DIPNAME( 0x06, 0x06, DEF_STR(Coinage) ) PORT_DIPLOCATION("SW 2:1,2") // COIN RATE + PORT_DIPSETTING( 0x06, DEF_STR(1C_1C) ) PORT_CONDITION("DSW5", 0x01, EQUALS, 0x01) // 1コイン   1プレイ + PORT_DIPSETTING( 0x04, DEF_STR(1C_2C) ) PORT_CONDITION("DSW5", 0x01, EQUALS, 0x01) // 1コイン   2プレイ + PORT_DIPSETTING( 0x02, DEF_STR(1C_5C) ) PORT_CONDITION("DSW5", 0x01, EQUALS, 0x01) // 1コイン   5プレイ + PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" ) PORT_CONDITION("DSW5", 0x01, EQUALS, 0x01) // 1コイン  10プレイ + PORT_DIPSETTING( 0x02, DEF_STR(2C_2C) ) PORT_CONDITION("DSW5", 0x01, EQUALS, 0x00) + PORT_DIPSETTING( 0x06, DEF_STR(1C_1C) ) PORT_CONDITION("DSW5", 0x01, EQUALS, 0x00) + PORT_DIPSETTING( 0x00, DEF_STR(2C_3C) ) PORT_CONDITION("DSW5", 0x01, EQUALS, 0x00) + PORT_DIPSETTING( 0x04, DEF_STR(1C_2C) ) PORT_CONDITION("DSW5", 0x01, EQUALS, 0x00) INPUT_PORTS_END static INPUT_PORTS_START( mjmyorn2 ) PORT_INCLUDE(mjmyornt) - PORT_MODIFY("DSW2") - PORT_DIPNAME( 0x03, 0x03, DEF_STR(Coinage) ) PORT_DIPLOCATION("SW 2:1,2") - PORT_DIPSETTING( 0x03, DEF_STR(1C_1C) ) PORT_CONDITION("DSW5", 0x01, EQUALS, 0x01) - PORT_DIPSETTING( 0x02, DEF_STR(1C_2C) ) PORT_CONDITION("DSW5", 0x01, EQUALS, 0x01) - PORT_DIPSETTING( 0x01, DEF_STR(1C_5C) ) PORT_CONDITION("DSW5", 0x01, EQUALS, 0x01) + PORT_MODIFY("DSW5") + PORT_DIPNAME( 0x40, 0x00, "Credits Per Note" ) PORT_DIPLOCATION("SW 1:9") + PORT_DIPSETTING( 0x40, "5" ) PORT_CONDITION("FAKE", 0x06, EQUALS, 0x06) + PORT_DIPSETTING( 0x40, "10" ) PORT_CONDITION("FAKE", 0x07, EQUALS, 0x05) + PORT_DIPSETTING( 0x40, "25" ) PORT_CONDITION("FAKE", 0x07, EQUALS, 0x03) + PORT_DIPSETTING( 0x40, "50" ) PORT_CONDITION("FAKE", 0x07, EQUALS, 0x01) + PORT_DIPSETTING( 0x40, "5" ) PORT_CONDITION("FAKE", 0x07, EQUALS, 0x04) // this setting differs from mjmyornt + PORT_DIPSETTING( 0x40, "10" ) PORT_CONDITION("FAKE", 0x07, EQUALS, 0x02) + PORT_DIPSETTING( 0x40, "15" ) PORT_CONDITION("FAKE", 0x07, EQUALS, 0x00) + PORT_DIPSETTING( 0x00, "10" ) PORT_CONDITION("FAKE", 0x06, EQUALS, 0x06) + PORT_DIPSETTING( 0x00, "20" ) PORT_CONDITION("FAKE", 0x07, EQUALS, 0x05) + PORT_DIPSETTING( 0x00, "50" ) PORT_CONDITION("FAKE", 0x07, EQUALS, 0x03) + PORT_DIPSETTING( 0x00, "100" ) PORT_CONDITION("FAKE", 0x07, EQUALS, 0x01) + PORT_DIPSETTING( 0x00, "10" ) PORT_CONDITION("FAKE", 0x07, EQUALS, 0x04) // this setting differs from mjmyornt + PORT_DIPSETTING( 0x00, "20" ) PORT_CONDITION("FAKE", 0x07, EQUALS, 0x02) + PORT_DIPSETTING( 0x00, "30" ) PORT_CONDITION("FAKE", 0x07, EQUALS, 0x00) + + PORT_MODIFY("FAKE") + PORT_DIPNAME( 0x06, 0x06, DEF_STR(Coinage) ) PORT_DIPLOCATION("SW 2:1,2") + PORT_DIPSETTING( 0x06, DEF_STR(1C_1C) ) PORT_CONDITION("DSW5", 0x01, EQUALS, 0x01) + PORT_DIPSETTING( 0x04, DEF_STR(1C_2C) ) PORT_CONDITION("DSW5", 0x01, EQUALS, 0x01) + PORT_DIPSETTING( 0x02, DEF_STR(1C_5C) ) PORT_CONDITION("DSW5", 0x01, EQUALS, 0x01) PORT_DIPSETTING( 0x00, "1 Coin/10 Credits" ) PORT_CONDITION("DSW5", 0x01, EQUALS, 0x01) - PORT_DIPSETTING( 0x02, DEF_STR(2C_1C) ) PORT_CONDITION("DSW5", 0x01, EQUALS, 0x00) // this setting differs from mjmyornt - PORT_DIPSETTING( 0x01, DEF_STR(2C_2C) ) PORT_CONDITION("DSW5", 0x01, EQUALS, 0x00) - PORT_DIPSETTING( 0x03, DEF_STR(1C_1C) ) PORT_CONDITION("DSW5", 0x01, EQUALS, 0x00) + PORT_DIPSETTING( 0x04, DEF_STR(2C_1C) ) PORT_CONDITION("DSW5", 0x01, EQUALS, 0x00) // this setting differs from mjmyornt + PORT_DIPSETTING( 0x02, DEF_STR(2C_2C) ) PORT_CONDITION("DSW5", 0x01, EQUALS, 0x00) + PORT_DIPSETTING( 0x06, DEF_STR(1C_1C) ) PORT_CONDITION("DSW5", 0x01, EQUALS, 0x00) PORT_DIPSETTING( 0x00, DEF_STR(2C_3C) ) PORT_CONDITION("DSW5", 0x01, EQUALS, 0x00) INPUT_PORTS_END @@ -9517,6 +9468,8 @@ void ddenlovr_state::hginga(machine_config &config) maincpu.out_pa_callback().set(FUNC(ddenlovr_state::mjmyster_rambank_w)); maincpu.out_pb_callback().set(FUNC(ddenlovr_state::hginga_rombank_w)); + HOPPER(config, m_hopper, attotime::from_msec(50)); + m_screen->screen_vblank().set("maincpu", FUNC(tmpz84c015_device::trg0)); subdevice("rtc")->out_int_handler().set(m_maincpu, FUNC(tmpz84c015_device::pa7_w)).invert(); diff --git a/src/mame/excellent/dblcrown.cpp b/src/mame/excellent/dblcrown.cpp index 73e8679237896..319a8e921b1ce 100644 --- a/src/mame/excellent/dblcrown.cpp +++ b/src/mame/excellent/dblcrown.cpp @@ -515,7 +515,7 @@ static const gfx_layout char_16x16_layout = static GFXDECODE_START( gfx_dblcrown ) GFXDECODE_ENTRY( "gfx1", 0, char_16x16_layout, 0, 0x10 ) - GFXDECODE_ENTRY( nullptr, 0, gfx_8x8x4_packed_lsb, 0, 0x10 ) + GFXDECODE_RAM( nullptr, 0, gfx_8x8x4_packed_lsb, 0, 0x10 ) GFXDECODE_END diff --git a/src/mame/gaelco/gaelco.cpp b/src/mame/gaelco/gaelco.cpp index b4a713dccd562..9bd9167e0980d 100644 --- a/src/mame/gaelco/gaelco.cpp +++ b/src/mame/gaelco/gaelco.cpp @@ -109,32 +109,24 @@ Year Game PCB NOTES * *************************************/ -void gaelco_state::coin1_lockout_w(int state) +template +void gaelco_state::coin_lockout_w(int state) { - machine().bookkeeping().coin_lockout_w(0, state); + machine().bookkeeping().coin_lockout_w(Which, state); } -void gaelco_state::coin2_lockout_w(int state) +template +void gaelco_state::coin_counter_w(int state) { - machine().bookkeeping().coin_lockout_w(1, state); + machine().bookkeeping().coin_counter_w(Which, state); } -void gaelco_state::coin1_counter_w(int state) -{ - machine().bookkeeping().coin_counter_w(0, state); -} - -void gaelco_state::coin2_counter_w(int state) -{ - machine().bookkeeping().coin_counter_w(1, state); -} - -void gaelco_state::oki_bankswitch_w(uint8_t data) +void gaelco_state::oki_bankswitch_w(u8 data) { m_okibank->set_entry(data & 0x0f); } -void gaelco_state::irqack_w(uint16_t data) +void gaelco_state::irqack_w(u16 data) { // INT 6 ACK or Watchdog timer - written at the end of an IRQ m_maincpu->set_input_line(6, CLEAR_LINE); @@ -142,7 +134,7 @@ void gaelco_state::irqack_w(uint16_t data) /*********** Squash Encryption Related Code ******************/ -void gaelco_state::vram_encrypted_w(offs_t offset, uint16_t data, uint16_t mem_mask) +void squash_state::vram_encrypted_w(offs_t offset, u16 data, u16 mem_mask) { // osd_printf_debug("vram_encrypted_w!!\n"); data = m_vramcrypt->gaelco_decrypt(*m_maincpu, offset, data); @@ -150,7 +142,7 @@ void gaelco_state::vram_encrypted_w(offs_t offset, uint16_t data, uint16_t mem_m } -void gaelco_state::encrypted_w(offs_t offset, uint16_t data, uint16_t mem_mask) +void squash_state::encrypted_w(offs_t offset, u16 data, u16 mem_mask) { // osd_printf_debug("encrypted_w!!\n"); data = m_vramcrypt->gaelco_decrypt(*m_maincpu, offset, data); @@ -163,15 +155,15 @@ void gaelco_state::encrypted_w(offs_t offset, uint16_t data, uint16_t mem_mask) * *************************************/ -void gaelco_state::bigkarnk_map(address_map &map) +void bigkarnk_state::bigkarnk_map(address_map &map) { map(0x000000, 0x07ffff).rom(); // ROM - map(0x100000, 0x101fff).ram().w(FUNC(gaelco_state::vram_w)).share("videoram"); // Video RAM + map(0x100000, 0x101fff).ram().w(FUNC(bigkarnk_state::vram_w)).share(m_videoram); // Video RAM map(0x102000, 0x103fff).ram(); // Screen RAM - map(0x108000, 0x108007).writeonly().share("vregs"); // Video Registers - map(0x10800c, 0x10800d).w(FUNC(gaelco_state::irqack_w)); // INT 6 ACK/Watchdog timer + map(0x108000, 0x108007).writeonly().share(m_vregs); // Video Registers + map(0x10800c, 0x10800d).w(FUNC(bigkarnk_state::irqack_w)); // INT 6 ACK/Watchdog timer map(0x200000, 0x2007ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); // Palette - map(0x440000, 0x440fff).ram().share("spriteram"); // Sprite RAM + map(0x440000, 0x440fff).ram().share(m_spriteram); // Sprite RAM map(0x700000, 0x700001).portr("DSW1"); map(0x700002, 0x700003).portr("DSW2"); map(0x700004, 0x700005).portr("P1"); @@ -182,7 +174,7 @@ void gaelco_state::bigkarnk_map(address_map &map) map(0xff8000, 0xffffff).ram(); // Work RAM } -void gaelco_state::bigkarnk_snd_map(address_map &map) +void bigkarnk_state::bigkarnk_snd_map(address_map &map) { map(0x0000, 0x07ff).ram(); // RAM map(0x0800, 0x0801).rw("oki", FUNC(okim6295_device::read), FUNC(okim6295_device::write)); // OKI6295 @@ -195,12 +187,12 @@ void gaelco_state::bigkarnk_snd_map(address_map &map) void gaelco_state::maniacsq_map(address_map &map) { map(0x000000, 0x0fffff).rom(); // ROM - map(0x100000, 0x101fff).ram().w(FUNC(gaelco_state::vram_w)).share("videoram"); // Video RAM + map(0x100000, 0x101fff).ram().w(FUNC(gaelco_state::vram_w)).share(m_videoram); // Video RAM map(0x102000, 0x103fff).ram(); // Screen RAM - map(0x108000, 0x108007).writeonly().share("vregs"); // Video Registers + map(0x108000, 0x108007).writeonly().share(m_vregs); // Video Registers map(0x10800c, 0x10800d).w(FUNC(gaelco_state::irqack_w)); // INT 6 ACK/Watchdog timer map(0x200000, 0x2007ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); // Palette - map(0x440000, 0x440fff).ram().share("spriteram"); // Sprite RAM + map(0x440000, 0x440fff).ram().share(m_spriteram); // Sprite RAM map(0x700000, 0x700001).portr("DSW2"); map(0x700002, 0x700003).portr("DSW1"); map(0x700004, 0x700005).portr("P1"); @@ -210,40 +202,40 @@ void gaelco_state::maniacsq_map(address_map &map) map(0xff0000, 0xffffff).ram(); // Work RAM } -void gaelco_state::squash_map(address_map &map) +void squash_state::squash_map(address_map &map) { map(0x000000, 0x0fffff).rom(); // ROM - map(0x100000, 0x101fff).ram().w(FUNC(gaelco_state::vram_encrypted_w)).share("videoram"); // Video RAM - map(0x102000, 0x103fff).ram().w(FUNC(gaelco_state::encrypted_w)).share("screenram"); // Screen RAM - map(0x108000, 0x108007).writeonly().share("vregs"); // Video Registers - map(0x10800c, 0x10800d).w(FUNC(gaelco_state::irqack_w)); // INT 6 ACK/Watchdog timer + map(0x100000, 0x101fff).ram().w(FUNC(squash_state::vram_encrypted_w)).share(m_videoram); // Video RAM + map(0x102000, 0x103fff).ram().w(FUNC(squash_state::encrypted_w)).share(m_screenram); // Screen RAM + map(0x108000, 0x108007).writeonly().share(m_vregs); // Video Registers + map(0x10800c, 0x10800d).w(FUNC(squash_state::irqack_w)); // INT 6 ACK/Watchdog timer map(0x200000, 0x2007ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); // Palette - map(0x440000, 0x440fff).ram().share("spriteram"); // Sprite RAM + map(0x440000, 0x440fff).ram().share(m_spriteram); // Sprite RAM map(0x700000, 0x700001).portr("DSW2"); map(0x700002, 0x700003).portr("DSW1"); map(0x700004, 0x700005).portr("P1"); map(0x700006, 0x700007).portr("P2"); map(0x70000b, 0x70000b).select(0x000070).lw8(NAME([this] (offs_t offset, u8 data) { m_outlatch->write_d0(offset >> 4, data); })); - map(0x70000d, 0x70000d).w(FUNC(gaelco_state::oki_bankswitch_w)); + map(0x70000d, 0x70000d).w(FUNC(squash_state::oki_bankswitch_w)); map(0x70000f, 0x70000f).rw("oki", FUNC(okim6295_device::read), FUNC(okim6295_device::write)); // OKI6295 status register map(0xff0000, 0xffffff).ram(); // Work RAM } -void gaelco_state::thoop_map(address_map &map) +void squash_state::thoop_map(address_map &map) { map(0x000000, 0x0fffff).rom(); // ROM - map(0x100000, 0x101fff).ram().w(FUNC(gaelco_state::vram_encrypted_w)).share("videoram"); // Video RAM - map(0x102000, 0x103fff).ram().w(FUNC(gaelco_state::encrypted_w)).share("screenram"); // Screen RAM - map(0x108000, 0x108007).writeonly().share("vregs"); // Video Registers - map(0x10800c, 0x10800d).w(FUNC(gaelco_state::irqack_w)); // INT 6 ACK/Watchdog timer + map(0x100000, 0x101fff).ram().w(FUNC(squash_state::vram_encrypted_w)).share(m_videoram); // Video RAM + map(0x102000, 0x103fff).ram().w(FUNC(squash_state::encrypted_w)).share(m_screenram); // Screen RAM + map(0x108000, 0x108007).writeonly().share(m_vregs); // Video Registers + map(0x10800c, 0x10800d).w(FUNC(squash_state::irqack_w)); // INT 6 ACK/Watchdog timer map(0x200000, 0x2007ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); // Palette - map(0x440000, 0x440fff).ram().share("spriteram"); // Sprite RAM + map(0x440000, 0x440fff).ram().share(m_spriteram); // Sprite RAM map(0x700000, 0x700001).portr("DSW2"); map(0x700002, 0x700003).portr("DSW1"); map(0x700004, 0x700005).portr("P1"); map(0x700006, 0x700007).portr("P2"); map(0x70000b, 0x70000b).select(0x000070).lw8(NAME([this] (offs_t offset, u8 data) { m_outlatch->write_d0(offset >> 4, data); })); - map(0x70000d, 0x70000d).w(FUNC(gaelco_state::oki_bankswitch_w)); + map(0x70000d, 0x70000d).w(FUNC(squash_state::oki_bankswitch_w)); map(0x70000f, 0x70000f).rw("oki", FUNC(okim6295_device::read), FUNC(okim6295_device::write)); // OKI6295 status register map(0xff0000, 0xffffff).ram(); // Work RAM } @@ -252,7 +244,7 @@ void gaelco_state::thoop_map(address_map &map) void gaelco_state::oki_map(address_map &map) { map(0x00000, 0x2ffff).rom(); - map(0x30000, 0x3ffff).bankr("okibank"); + map(0x30000, 0x3ffff).bankr(m_okibank); } @@ -678,8 +670,8 @@ static const gfx_layout tilelayout16 = }; static GFXDECODE_START( gfx_gaelco ) - GFXDECODE_ENTRY( "gfx1", 0x000000, tilelayout8, 0, 64 ) - GFXDECODE_ENTRY( "gfx1", 0x000000, tilelayout16, 0, 64 ) + GFXDECODE_ENTRY( "gfx", 0, tilelayout8, 0, 64 ) + GFXDECODE_ENTRY( "gfx", 0, tilelayout16, 0, 64 ) GFXDECODE_END @@ -696,23 +688,23 @@ void gaelco_state::machine_start() } // TODO: verify all clocks (XTALs are 8.0MHz & 24.000 MHz) - One PCB reported to have 8867.23 kHz instead of 8MHz -void gaelco_state::bigkarnk(machine_config &config) +void bigkarnk_state::bigkarnk(machine_config &config) { // Basic machine hardware M68000(config, m_maincpu, XTAL(24'000'000)/2); // MC68000P10, 12 MHz (verified) - m_maincpu->set_addrmap(AS_PROGRAM, &gaelco_state::bigkarnk_map); - m_maincpu->set_vblank_int("screen", FUNC(gaelco_state::irq6_line_assert)); + m_maincpu->set_addrmap(AS_PROGRAM, &bigkarnk_state::bigkarnk_map); + m_maincpu->set_vblank_int("screen", FUNC(bigkarnk_state::irq6_line_assert)); MC6809E(config, m_audiocpu, XTAL(8'000'000)/4); // 68B09EP, 2 MHz (verified) - m_audiocpu->set_addrmap(AS_PROGRAM, &gaelco_state::bigkarnk_snd_map); + m_audiocpu->set_addrmap(AS_PROGRAM, &bigkarnk_state::bigkarnk_snd_map); config.set_maximum_quantum(attotime::from_hz(600)); LS259(config, m_outlatch); - m_outlatch->q_out_cb<0>().set(FUNC(gaelco_state::coin1_lockout_w)).invert(); - m_outlatch->q_out_cb<1>().set(FUNC(gaelco_state::coin2_lockout_w)).invert(); - m_outlatch->q_out_cb<2>().set(FUNC(gaelco_state::coin1_counter_w)); - m_outlatch->q_out_cb<3>().set(FUNC(gaelco_state::coin2_counter_w)); + m_outlatch->q_out_cb<0>().set(FUNC(bigkarnk_state::coin_lockout_w<0>)).invert(); + m_outlatch->q_out_cb<1>().set(FUNC(bigkarnk_state::coin_lockout_w<1>)).invert(); + m_outlatch->q_out_cb<2>().set(FUNC(bigkarnk_state::coin_counter_w<0>)); + m_outlatch->q_out_cb<3>().set(FUNC(bigkarnk_state::coin_counter_w<1>)); // Video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); @@ -720,13 +712,13 @@ void gaelco_state::bigkarnk(machine_config &config) screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */); screen.set_size(32*16, 32*16); screen.set_visarea(0, 320-1, 16, 256-1); - screen.set_screen_update(FUNC(gaelco_state::screen_update_bigkarnk)); + screen.set_screen_update(FUNC(bigkarnk_state::screen_update_bigkarnk)); screen.set_palette(m_palette); GFXDECODE(config, m_gfxdecode, m_palette, gfx_gaelco); PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 1024); - MCFG_VIDEO_START_OVERRIDE(gaelco_state,bigkarnk) + MCFG_VIDEO_START_OVERRIDE(bigkarnk_state,bigkarnk) // Sound hardware SPEAKER(config, "mono").front_center(); @@ -768,12 +760,12 @@ void gaelco_state::maniacsq(machine_config &config) oki.add_route(ALL_OUTPUTS, "mono", 1.0); } -void gaelco_state::squash(machine_config &config) +void squash_state::squash(machine_config &config) { // Basic machine hardware M68000(config, m_maincpu, XTAL(20'000'000)/2); // Verified on PCB - m_maincpu->set_addrmap(AS_PROGRAM, &gaelco_state::squash_map); - m_maincpu->set_vblank_int("screen", FUNC(gaelco_state::irq6_line_assert)); + m_maincpu->set_addrmap(AS_PROGRAM, &squash_state::squash_map); + m_maincpu->set_vblank_int("screen", FUNC(squash_state::irq6_line_assert)); config.set_maximum_quantum(attotime::from_hz(600)); @@ -781,10 +773,10 @@ void gaelco_state::squash(machine_config &config) m_vramcrypt->set_params(0x0f, 0x4228); LS259(config, m_outlatch); // B8 - m_outlatch->q_out_cb<0>().set(FUNC(gaelco_state::coin1_lockout_w)).invert(); - m_outlatch->q_out_cb<1>().set(FUNC(gaelco_state::coin2_lockout_w)).invert(); - m_outlatch->q_out_cb<2>().set(FUNC(gaelco_state::coin1_counter_w)); - m_outlatch->q_out_cb<3>().set(FUNC(gaelco_state::coin2_counter_w)); + m_outlatch->q_out_cb<0>().set(FUNC(squash_state::coin_lockout_w<0>)).invert(); + m_outlatch->q_out_cb<1>().set(FUNC(squash_state::coin_lockout_w<1>)).invert(); + m_outlatch->q_out_cb<2>().set(FUNC(squash_state::coin_counter_w<0>)); + m_outlatch->q_out_cb<3>().set(FUNC(squash_state::coin_counter_w<1>)); m_outlatch->q_out_cb<4>().set_nop(); // used // Video hardware @@ -793,28 +785,28 @@ void gaelco_state::squash(machine_config &config) screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */); screen.set_size(32*16, 32*16); screen.set_visarea(0, 320-1, 16, 256-1); - screen.set_screen_update(FUNC(gaelco_state::screen_update_thoop)); + screen.set_screen_update(FUNC(squash_state::screen_update_thoop)); screen.set_palette(m_palette); GFXDECODE(config, m_gfxdecode, m_palette, gfx_gaelco); PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 1024); - MCFG_VIDEO_START_OVERRIDE(gaelco_state,squash) + MCFG_VIDEO_START_OVERRIDE(squash_state,squash) // Sound hardware SPEAKER(config, "mono").front_center(); okim6295_device &oki(OKIM6295(config, "oki", XTAL(1'000'000), okim6295_device::PIN7_HIGH)); /* verified on pcb */ - oki.set_addrmap(0, &gaelco_state::oki_map); + oki.set_addrmap(0, &squash_state::oki_map); oki.add_route(ALL_OUTPUTS, "mono", 1.0); } -void gaelco_state::thoop(machine_config &config) +void squash_state::thoop(machine_config &config) { // Basic machine hardware M68000(config, m_maincpu, XTAL(24'000'000)/2); // Verified on PCB - m_maincpu->set_addrmap(AS_PROGRAM, &gaelco_state::thoop_map); - m_maincpu->set_vblank_int("screen", FUNC(gaelco_state::irq6_line_assert)); + m_maincpu->set_addrmap(AS_PROGRAM, &squash_state::thoop_map); + m_maincpu->set_vblank_int("screen", FUNC(squash_state::irq6_line_assert)); config.set_maximum_quantum(attotime::from_hz(600)); @@ -822,10 +814,10 @@ void gaelco_state::thoop(machine_config &config) m_vramcrypt->set_params(0x0e, 0x4228); LS259(config, m_outlatch); // B8 - m_outlatch->q_out_cb<0>().set(FUNC(gaelco_state::coin1_lockout_w)); // not inverted - m_outlatch->q_out_cb<1>().set(FUNC(gaelco_state::coin2_lockout_w)); // not inverted - m_outlatch->q_out_cb<2>().set(FUNC(gaelco_state::coin1_counter_w)); - m_outlatch->q_out_cb<3>().set(FUNC(gaelco_state::coin2_counter_w)); + m_outlatch->q_out_cb<0>().set(FUNC(squash_state::coin_lockout_w<0>)); // not inverted + m_outlatch->q_out_cb<1>().set(FUNC(squash_state::coin_lockout_w<1>)); // not inverted + m_outlatch->q_out_cb<2>().set(FUNC(squash_state::coin_counter_w<0>)); + m_outlatch->q_out_cb<3>().set(FUNC(squash_state::coin_counter_w<1>)); m_outlatch->q_out_cb<4>().set_nop(); // used // Video hardware @@ -834,19 +826,19 @@ void gaelco_state::thoop(machine_config &config) screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */); screen.set_size(32*16, 32*16); screen.set_visarea(0, 320-1, 16, 256-1); - screen.set_screen_update(FUNC(gaelco_state::screen_update_thoop)); + screen.set_screen_update(FUNC(squash_state::screen_update_thoop)); screen.set_palette(m_palette); GFXDECODE(config, m_gfxdecode, m_palette, gfx_gaelco); PALETTE(config, m_palette).set_format(palette_device::xBGR_555, 1024); - MCFG_VIDEO_START_OVERRIDE(gaelco_state,bigkarnk) + MCFG_VIDEO_START_OVERRIDE(squash_state,bigkarnk) // Sound hardware SPEAKER(config, "mono").front_center(); okim6295_device &oki(OKIM6295(config, "oki", XTAL(1'000'000), okim6295_device::PIN7_HIGH)); // pin 7 not verified - oki.set_addrmap(0, &gaelco_state::oki_map); + oki.set_addrmap(0, &squash_state::oki_map); oki.add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -862,10 +854,10 @@ ROM_START( bigkarnk ) // PCB silkscreened REF.901112 ROM_LOAD16_BYTE( "d16", 0x000000, 0x040000, CRC(44fb9c73) SHA1(c33852b37afea15482f4a43cb045434660e7a056) ) ROM_LOAD16_BYTE( "d19", 0x000001, 0x040000, CRC(ff79dfdd) SHA1(2bfa440299317967ba2018d3a148291ae0c144ae) ) - ROM_REGION( 0x01e000, "audiocpu", 0 ) // 6809 code + ROM_REGION( 0x010000, "audiocpu", 0 ) // 6809 code ROM_LOAD( "d5", 0x000000, 0x010000, CRC(3b73b9c5) SHA1(1b1c5545609a695dab87d611bd53e0c3dd91e6b7) ) - ROM_REGION( 0x200000, "gfx1", 0 ) + ROM_REGION( 0x200000, "gfx", 0 ) ROM_LOAD( "h5", 0x000000, 0x080000, CRC(20e239ff) SHA1(685059340f0f3a8e3c98702bd760dae685a58ddb) ) ROM_LOAD( "h10",0x080000, 0x080000, CRC(ab442855) SHA1(bcd69d4908ff8dc1b2215d2c2d2e54b950e0c015) ) ROM_LOAD( "h8", 0x100000, 0x080000, CRC(83dce5a3) SHA1(b4f9473e93c96f4b86c446e89d13fd3ef2b03996) ) @@ -884,7 +876,7 @@ ROM_START( maniacsp ) // PCB - REF 922804/2 ROM_LOAD16_BYTE( "d18", 0x000000, 0x020000, CRC(740ecab2) SHA1(8d8583364cc6aeea58ea2b9cb9a2aab2a43a44df) ) ROM_LOAD16_BYTE( "d16", 0x000001, 0x020000, CRC(c6c42729) SHA1(1aac9f93d47a4eb57e06e206e9f50e349b1817da) ) - ROM_REGION( 0x200000, "gfx1", ROMREGION_ERASE00 ) + ROM_REGION( 0x200000, "gfx", ROMREGION_ERASE00 ) ROM_LOAD( "f3", 0x000000, 0x040000, CRC(e7f6582b) SHA1(9e352edf2f71d0edecb54a11ab3fd0e3ec867d42) ) // 0x040000-0x07ffff empty ROM_LOAD( "f2", 0x080000, 0x040000, CRC(ca43a5ae) SHA1(8d2ed537be1dee60096a58b68b735fb50cab3285) ) @@ -947,7 +939,7 @@ ROM_START( biomtoy ) // PCB - REF.922804/2 ROM_LOAD16_BYTE( "18.d18", 0x000000, 0x080000, CRC(4569ce64) SHA1(96557aca55779c23f7c2c11fddc618823c04ead0) ) // v1.0.1885 ROM_LOAD16_BYTE( "16.d16", 0x000001, 0x080000, CRC(739449bd) SHA1(711a8ea5081f15dea6067577516c9296239c4145) ) // v1.0.1885 - ROM_REGION( 0x400000, "gfx1", 0 ) + ROM_REGION( 0x400000, "gfx", 0 ) // weird gfx ordering ROM_LOAD( "h6", 0x040000, 0x040000, CRC(9416a729) SHA1(425149b3041554579791fc23c09fda6be054e89d) ) ROM_CONTINUE( 0x0c0000, 0x040000 ) @@ -978,7 +970,7 @@ ROM_START( biomtoya ) // PCB - REF.922804/2 ROM_LOAD16_BYTE( "18.d18", 0x000000, 0x080000, CRC(39b6cdbd) SHA1(3a22eb2e304d85ecafff677d83c3c4fca3f869d5) ) // v1.0.1884 - sldh ROM_LOAD16_BYTE( "16.d16", 0x000001, 0x080000, CRC(ab340671) SHA1(83f708a535048e927fd1c7de85a65282e460f98a) ) // v1.0.1884 - sldh - ROM_REGION( 0x400000, "gfx1", 0 ) + ROM_REGION( 0x400000, "gfx", 0 ) // weird gfx ordering ROM_LOAD( "h6", 0x040000, 0x040000, CRC(9416a729) SHA1(425149b3041554579791fc23c09fda6be054e89d) ) ROM_CONTINUE( 0x0c0000, 0x040000 ) @@ -1009,7 +1001,7 @@ ROM_START( biomtoyb ) // PCB - REF.922804/2 ROM_LOAD16_BYTE( "18.d18", 0x000000, 0x080000, CRC(2dfadee3) SHA1(55ab563a9a69da940ca015f292476068cf21b01c) ) // v1.0.1878 - sldh ROM_LOAD16_BYTE( "16.d16", 0x000001, 0x080000, CRC(b35e3ca6) SHA1(b323fcca99d088e6fbf6a1d660ef860987af77e4) ) // v1.0.1878 - sldh - ROM_REGION( 0x400000, "gfx1", 0 ) // Graphics & Sound ROMs soldered in, not verified 100% correct for this set + ROM_REGION( 0x400000, "gfx", 0 ) // Graphics & Sound ROMs soldered in, not verified 100% correct for this set // weird gfx ordering ROM_LOAD( "h6", 0x040000, 0x040000, CRC(9416a729) SHA1(425149b3041554579791fc23c09fda6be054e89d) ) ROM_CONTINUE( 0x0c0000, 0x040000 ) @@ -1040,7 +1032,7 @@ ROM_START( biomtoyc ) // PCB - REF.922804/1 or REF.922804/2 ROM_LOAD16_BYTE( "program18.d18", 0x000000, 0x080000, CRC(05ad7d30) SHA1(4b2596d225bf9b314db5a150921d7d6c99096ddb) ) // v1.0.1870 - sldh ROM_LOAD16_BYTE( "program16.d16", 0x000001, 0x080000, CRC(a288e73f) SHA1(13a53981e3fe6961494013e7466badae56481958) ) // v1.0.1870 - sldh - ROM_REGION( 0x400000, "gfx1", 0 ) // Graphics & Sound ROMs redumped from a REF.922804/1 PCB + ROM_REGION( 0x400000, "gfx", 0 ) // Graphics & Sound ROMs redumped from a REF.922804/1 PCB // weird gfx ordering ROM_LOAD( "gfx6.h6", 0x040000, 0x040000, CRC(ab19a1ce) SHA1(3cc896f8c20f692b02d43db8c30f410bd93fe3ca)) ROM_CONTINUE( 0x0c0000, 0x040000 ) @@ -1070,7 +1062,7 @@ ROM_START( bioplayc ) // PCB - REF.922804/2?? - Spanish version ROM_LOAD16_BYTE( "t.d18", 0x000000, 0x080000, CRC(ec518c6c) SHA1(8b96313582d252bebb4bcce8f2d993f751ad0a74) ) // v1.0.1823 ROM_LOAD16_BYTE( "t.d16", 0x000001, 0x080000, CRC(de4b031d) SHA1(d4bcdfedab1d48df0c48ffc775731a4981342c7a) ) // v1.0.1823 - ROM_REGION( 0x400000, "gfx1", 0 ) + ROM_REGION( 0x400000, "gfx", 0 ) // weird gfx ordering ROM_LOAD( "toy-high-3.h6", 0x040000, 0x040000, CRC(ab19a1ce) SHA1(3cc896f8c20f692b02d43db8c30f410bd93fe3ca)) ROM_CONTINUE( 0x0c0000, 0x040000 ) @@ -1101,7 +1093,7 @@ ROM_START( lastkm ) // PCB - REF 922804/2 ROM_LOAD16_BYTE( "prog-bici-e-8.11.95.d18", 0x000000, 0x080000, CRC(1fc5fba0) SHA1(1f954fca9f25df7379eff4ea905810fa06fcebb0)) // 1.0.0275 ROM_LOAD16_BYTE( "prog-bici-o-8.11.95.d16", 0x000001, 0x080000, CRC(b93e57e3) SHA1(df307191a214a32a26018ca2a9200742e39939d2)) // 1.0.0275 - ROM_REGION( 0x200000, "gfx1", 0 ) + ROM_REGION( 0x200000, "gfx", 0 ) ROM_LOAD( "bici-f3.h6", 0x000000, 0x080000, CRC(0bf9f213) SHA1(052abef60df419d32bf8a86c89d87e5bb281b4eb)) ROM_LOAD( "bici-f2.h7", 0x080000, 0x080000, CRC(c48d5376) SHA1(8e987839e7254e0fa631802733482726a289439c)) ROM_LOAD( "bici-f1.h9", 0x100000, 0x080000, CRC(e7958070) SHA1(7f065b429a500b714dfbf497b1353e90137abbd7)) @@ -1164,7 +1156,7 @@ ROM_START( squash ) // PCB - REF.922804/1 or REF.922804/2 ROM_LOAD16_BYTE( "squash.d18", 0x000000, 0x20000, CRC(ce7aae96) SHA1(4fe8666ae571bffc5a08fa68346c0623282989eb) ) ROM_LOAD16_BYTE( "squash.d16", 0x000001, 0x20000, CRC(8ffaedd7) SHA1(f4aada17ba67dd8b6c5a395e832bcbba2764c59d) ) - ROM_REGION( 0x200000, "gfx1", 0 ) + ROM_REGION( 0x200000, "gfx", 0 ) ROM_LOAD( "squash.c09", 0x180000, 0x80000, CRC(0bb91c69) SHA1(8be945049ab411a4d49bd64bd3937542ec9ef9fb) ) // Encrypted video RAM ROM_LOAD( "squash.c10", 0x100000, 0x80000, CRC(892a035c) SHA1(d0156ceb9aa6639a1124c17fb12389be319bb51f) ) // Encrypted video RAM ROM_LOAD( "squash.c11", 0x080000, 0x80000, CRC(9e19694d) SHA1(1df4646f3147719fef516a37aa361ae26d9b23a2) ) // Encrypted video RAM @@ -1202,7 +1194,7 @@ ROM_START( thoop ) // PCB - REF.922804/1 ROM_LOAD16_BYTE( "th18dea1.040", 0x000000, 0x80000, CRC(59bad625) SHA1(28e058b2290bc5f7130b801014d026432f9e7fd5) ) ROM_LOAD16_BYTE( "th161eb4.020", 0x000001, 0x40000, CRC(6add61ed) SHA1(0e789d9a0ac19b6143044fbc04ab2227735b2a8f) ) - ROM_REGION( 0x400000, "gfx1", 0 ) + ROM_REGION( 0x400000, "gfx", 0 ) ROM_LOAD( "c09", 0x300000, 0x040000, CRC(06f0edbf) SHA1(3cf2e5c29cd00b43d49a106084076f2ac0dbad98) ) // Encrypted video RAM ROM_CONTINUE( 0x380000, 0x040000 ) ROM_CONTINUE( 0x340000, 0x040000 ) @@ -1239,13 +1231,13 @@ ROM_END * *************************************/ -GAME( 1991, bigkarnk, 0, bigkarnk, bigkarnk, gaelco_state, empty_init, ROT0, "Gaelco", "Big Karnak (ver. 1.0, checksum 1e38c94)", MACHINE_SUPPORTS_SAVE ) -GAME( 1995, biomtoy, 0, maniacsq, biomtoy, gaelco_state, empty_init, ROT0, "Gaelco / Zeus", "Biomechanical Toy (ver. 1.0.1885, checksum 69f5e032)", MACHINE_SUPPORTS_SAVE ) -GAME( 1995, biomtoya, biomtoy, maniacsq, biomtoy, gaelco_state, empty_init, ROT0, "Gaelco / Zeus", "Biomechanical Toy (ver. 1.0.1884, checksum 3f316c70)", MACHINE_SUPPORTS_SAVE ) -GAME( 1995, biomtoyb, biomtoy, maniacsq, biomtoy, gaelco_state, empty_init, ROT0, "Gaelco / Zeus", "Biomechanical Toy (ver. 1.0.1878, checksum d84b28ff)", MACHINE_SUPPORTS_SAVE ) -GAME( 1994, biomtoyc, biomtoy, maniacsq, biomtoyc, gaelco_state, empty_init, ROT0, "Gaelco / Zeus", "Biomechanical Toy (ver. 1.0.1870, checksum ba682195)", MACHINE_SUPPORTS_SAVE ) -GAME( 1994, bioplayc, biomtoy, maniacsq, bioplayc, gaelco_state, empty_init, ROT0, "Gaelco / Zeus", "Bioplaything Cop (ver. 1.0.1823, checksum cd960fc9, prototype)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) // copyright based on Ver. 1.0.1870 -GAME( 1992, maniacsp, 0, maniacsq, maniacsq, gaelco_state, empty_init, ROT0, "Gaelco", "Maniac Square (ver 1.0, checksum b602, prototype)", MACHINE_SUPPORTS_SAVE ) // The prototype version was an earlier project, said to be from 1992, game was rewritten in 1996 -GAME( 1995, lastkm, 0, maniacsq, lastkm, gaelco_state, empty_init, ROT0, "Gaelco / Zeus", "Last KM (ver 1.0.0275, checksum 13bff751, prototype)", MACHINE_SUPPORTS_SAVE ) // Similar 'bike controller' idea to the Salter gym equipment Gaelco developed, but in game form -GAME( 1992, squash, 0, squash, squash, gaelco_state, empty_init, ROT0, "Gaelco", "Squash (ver. 1.0, checksum 015aef61)", MACHINE_SUPPORTS_SAVE ) -GAME( 1992, thoop, 0, thoop, thoop, gaelco_state, empty_init, ROT0, "Gaelco", "Thunder Hoop (ver. 1, checksum 02a09f7d)", MACHINE_SUPPORTS_SAVE ) // could be other versions, still Ver. 1 but different checksum listed on boot +GAME( 1991, bigkarnk, 0, bigkarnk, bigkarnk, bigkarnk_state, empty_init, ROT0, "Gaelco", "Big Karnak (ver. 1.0, checksum 1e38c94)", MACHINE_SUPPORTS_SAVE ) +GAME( 1995, biomtoy, 0, maniacsq, biomtoy, gaelco_state, empty_init, ROT0, "Gaelco / Zeus", "Biomechanical Toy (ver. 1.0.1885, checksum 69f5e032)", MACHINE_SUPPORTS_SAVE ) +GAME( 1995, biomtoya, biomtoy, maniacsq, biomtoy, gaelco_state, empty_init, ROT0, "Gaelco / Zeus", "Biomechanical Toy (ver. 1.0.1884, checksum 3f316c70)", MACHINE_SUPPORTS_SAVE ) +GAME( 1995, biomtoyb, biomtoy, maniacsq, biomtoy, gaelco_state, empty_init, ROT0, "Gaelco / Zeus", "Biomechanical Toy (ver. 1.0.1878, checksum d84b28ff)", MACHINE_SUPPORTS_SAVE ) +GAME( 1994, biomtoyc, biomtoy, maniacsq, biomtoyc, gaelco_state, empty_init, ROT0, "Gaelco / Zeus", "Biomechanical Toy (ver. 1.0.1870, checksum ba682195)", MACHINE_SUPPORTS_SAVE ) +GAME( 1994, bioplayc, biomtoy, maniacsq, bioplayc, gaelco_state, empty_init, ROT0, "Gaelco / Zeus", "Bioplaything Cop (ver. 1.0.1823, checksum cd960fc9, prototype)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND ) // copyright based on Ver. 1.0.1870 +GAME( 1992, maniacsp, 0, maniacsq, maniacsq, gaelco_state, empty_init, ROT0, "Gaelco", "Maniac Square (ver 1.0, checksum b602, prototype)", MACHINE_SUPPORTS_SAVE ) // The prototype version was an earlier project, said to be from 1992, game was rewritten in 1996 +GAME( 1995, lastkm, 0, maniacsq, lastkm, gaelco_state, empty_init, ROT0, "Gaelco / Zeus", "Last KM (ver 1.0.0275, checksum 13bff751, prototype)", MACHINE_SUPPORTS_SAVE ) // Similar 'bike controller' idea to the Salter gym equipment Gaelco developed, but in game form +GAME( 1992, squash, 0, squash, squash, squash_state, empty_init, ROT0, "Gaelco", "Squash (ver. 1.0, checksum 015aef61)", MACHINE_SUPPORTS_SAVE ) +GAME( 1992, thoop, 0, thoop, thoop, squash_state, empty_init, ROT0, "Gaelco", "Thunder Hoop (ver. 1, checksum 02a09f7d)", MACHINE_SUPPORTS_SAVE ) // could be other versions, still Ver. 1 but different checksum listed on boot diff --git a/src/mame/gaelco/gaelco.h b/src/mame/gaelco/gaelco.h index d62897ee8386a..7352514fa8217 100644 --- a/src/mame/gaelco/gaelco.h +++ b/src/mame/gaelco/gaelco.h @@ -5,13 +5,20 @@ Gaelco game hardware from 1991-1996 ***************************************************************************/ +#ifndef MAME_GAELCO_GAELCO_H +#define MAME_GAELCO_GAELCO_H + +#pragma once + +#include "gaelcrpt.h" #include "machine/gen_latch.h" #include "machine/74259.h" -#include "gaelcrpt.h" + #include "emupal.h" #include "tilemap.h" + class gaelco_state : public driver_device { public: @@ -20,74 +27,107 @@ class gaelco_state : public driver_device m_maincpu(*this, "maincpu"), m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette"), - m_vramcrypt(*this, "vramcrypt"), - m_audiocpu(*this, "audiocpu"), - m_soundlatch(*this, "soundlatch"), m_outlatch(*this, "outlatch"), m_okibank(*this, "okibank"), m_videoram(*this, "videoram"), m_vregs(*this, "vregs"), m_spriteram(*this, "spriteram"), - m_screenram(*this, "screenram"), m_sprite_palette_force_high(0x38) { } - void bigkarnk(machine_config &config); - void thoop(machine_config &config); - void maniacsq(machine_config &config); - void squash(machine_config &config); + void maniacsq(machine_config &config) ATTR_COLD; + +protected: + static constexpr double FRAMERATE_922804 = 57.42; -private: /* devices */ required_device m_maincpu; required_device m_gfxdecode; required_device m_palette; - optional_device m_vramcrypt; - optional_device m_audiocpu; - optional_device m_soundlatch; optional_device m_outlatch; optional_memory_bank m_okibank; /* memory pointers */ - required_shared_ptr m_videoram; - required_shared_ptr m_vregs; - required_shared_ptr m_spriteram; - optional_shared_ptr m_screenram; + required_shared_ptr m_videoram; + required_shared_ptr m_vregs; + required_shared_ptr m_spriteram; /* video-related */ tilemap_t *m_tilemap[2]{}; - void coin1_lockout_w(int state); - void coin2_lockout_w(int state); - void coin1_counter_w(int state); - void coin2_counter_w(int state); - void oki_bankswitch_w(uint8_t data); - void vram_encrypted_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - void encrypted_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + /* per-game configuration */ + u8 m_sprite_palette_force_high = 0; + + virtual void machine_start() override ATTR_COLD; + + template void coin_lockout_w(int state); + template void coin_counter_w(int state); + void oki_bankswitch_w(u8 data); void vram_w(offs_t offset, u16 data, u16 mem_mask); - void irqack_w(uint16_t data); + void irqack_w(u16 data); - template TILE_GET_INFO_MEMBER(get_tile_info); + template TILE_GET_INFO_MEMBER(get_tile_info); - virtual void machine_start() override ATTR_COLD; DECLARE_VIDEO_START(bigkarnk); DECLARE_VIDEO_START(maniacsq); - DECLARE_VIDEO_START(squash); - uint32_t screen_update_bigkarnk(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - uint32_t screen_update_maniacsq(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - uint32_t screen_update_thoop(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect ); + u32 screen_update_maniacsq(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void bigkarnk_map(address_map &map) ATTR_COLD; - void bigkarnk_snd_map(address_map &map) ATTR_COLD; void maniacsq_map(address_map &map) ATTR_COLD; void oki_map(address_map &map) ATTR_COLD; - void squash_map(address_map &map) ATTR_COLD; - void thoop_map(address_map &map) ATTR_COLD; +}; - /* per-game configuration */ - uint8_t m_sprite_palette_force_high = 0; +class bigkarnk_state : public gaelco_state +{ +public: + bigkarnk_state(const machine_config &mconfig, device_type type, const char *tag) : + gaelco_state(mconfig, type, tag), + m_audiocpu(*this, "audiocpu"), + m_soundlatch(*this, "soundlatch") + { } - static constexpr double FRAMERATE_922804 = 57.42; + void bigkarnk(machine_config &config) ATTR_COLD; + +private: + /* devices */ + required_device m_audiocpu; + required_device m_soundlatch; + + u32 screen_update_bigkarnk(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + + void bigkarnk_map(address_map &map) ATTR_COLD; + void bigkarnk_snd_map(address_map &map) ATTR_COLD; }; + +class squash_state : public gaelco_state +{ +public: + squash_state(const machine_config &mconfig, device_type type, const char *tag) : + gaelco_state(mconfig, type, tag), + m_vramcrypt(*this, "vramcrypt"), + m_screenram(*this, "screenram") + { } + + void thoop(machine_config &config) ATTR_COLD; + void squash(machine_config &config) ATTR_COLD; + +private: + /* devices */ + required_device m_vramcrypt; + + /* memory pointers */ + required_shared_ptr m_screenram; + + void vram_encrypted_w(offs_t offset, u16 data, u16 mem_mask = ~0); + void encrypted_w(offs_t offset, u16 data, u16 mem_mask = ~0); + + DECLARE_VIDEO_START(squash); + + u32 screen_update_thoop(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + + void squash_map(address_map &map) ATTR_COLD; + void thoop_map(address_map &map) ATTR_COLD; +}; + +#endif // MAME_GAELCO_GAELCO_H diff --git a/src/mame/gaelco/gaelco2.h b/src/mame/gaelco/gaelco2.h index cf36de82b3c02..7cb21cbba032a 100644 --- a/src/mame/gaelco/gaelco2.h +++ b/src/mame/gaelco/gaelco2.h @@ -1,13 +1,20 @@ // license:BSD-3-Clause // copyright-holders:Manuel Abadia, David Haywood +#ifndef MAME_GAELCO_GAELCO2_H +#define MAME_GAELCO_GAELCO2_H + +#pragma once + #include "cpu/m68000/m68000.h" -#include "video/bufsprite.h" #include "machine/74259.h" #include "machine/eepromser.h" #include "machine/timer.h" +#include "video/bufsprite.h" + #include "emupal.h" #include "tilemap.h" + class gaelco2_state : public driver_device { public: @@ -180,3 +187,5 @@ class wrally2_state : public gaelco2_state u8 m_analog_ports[2]{}; }; + +#endif // MAME_GAELCO_GAELCO2_H diff --git a/src/mame/gaelco/gaelco3d.cpp b/src/mame/gaelco/gaelco3d.cpp index d3d3346f88411..786e95874a68e 100644 --- a/src/mame/gaelco/gaelco3d.cpp +++ b/src/mame/gaelco/gaelco3d.cpp @@ -150,14 +150,26 @@ REF. 970429 #include "cpu/m68000/m68000.h" #include "cpu/m68000/m68020.h" -#include "emupal.h" +#include "emupal.h" #include "speaker.h" #include "speedup.lh" -#define LOG 0 +#define LOG_EEPROM (1U << 1) +#define LOG_SOUND (1U << 2) +#define LOG_TMS (1U << 3) +#define LOG_ADSP (1U << 4) + +#define VERBOSE 0 + +#include "logmacro.h" + +#define LOGEEPROM(...) LOGMASKED(LOG_EEPROM, __VA_ARGS__) +#define LOGSOUND(...) LOGMASKED(LOG_SOUND, __VA_ARGS__) +#define LOGTMS(...) LOGMASKED(LOG_TMS, __VA_ARGS__) +#define LOGADSP(...) LOGMASKED(LOG_ADSP, __VA_ARGS__) void gaelco3d_state::ser_irq(int state) @@ -177,10 +189,11 @@ void gaelco3d_state::ser_irq(int state) void gaelco3d_state::machine_start() { + m_adsp_bank->configure_entries(0, 256, memregion("adsprom")->base(), 0x4000); + // Save state support save_item(NAME(m_sound_status)); save_item(NAME(m_analog_ports)); - save_item(NAME(m_framenum)); save_item(NAME(m_adsp_ireg)); save_item(NAME(m_adsp_ireg_base)); save_item(NAME(m_adsp_incs)); @@ -194,17 +207,14 @@ void gaelco3d_state::machine_start() MACHINE_RESET_MEMBER(gaelco3d_state,common) { - m_framenum = 0; - // Boot the ADSP chip - uint16_t *src = (uint16_t *)memregion("user1")->base(); + uint16_t const *const src = (uint16_t *)memregion("adsprom")->base(); for (int i = 0; i < (src[3] & 0xff) * 8; i++) { - uint32_t opcode = ((src[i*4+0] & 0xff) << 16) | ((src[i*4+1] & 0xff) << 8) | (src[i*4+2] & 0xff); + uint32_t const opcode = ((src[i * 4 + 0] & 0xff) << 16) | ((src[i * 4 + 1] & 0xff) << 8) | (src[i * 4 + 2] & 0xff); m_adsp_ram_base[i] = opcode; } - m_adsp_bank->configure_entries(0, 256, memregion("user1")->base(), 0x4000); m_adsp_bank->set_entry(0); // Keep the TMS32031 halted until the code is ready to go @@ -214,14 +224,14 @@ MACHINE_RESET_MEMBER(gaelco3d_state,common) void gaelco3d_state::machine_reset() { - MACHINE_RESET_CALL_MEMBER( common ); + MACHINE_RESET_CALL_MEMBER(common); m_soundlatch->acknowledge_w(); } MACHINE_RESET_MEMBER(gaelco3d_state,gaelco3d2) { - MACHINE_RESET_CALL_MEMBER( common ); + MACHINE_RESET_CALL_MEMBER(common); m_fp_clock = 27; m_fp_state = 0; } @@ -268,8 +278,8 @@ uint16_t gaelco3d_state::eeprom_data_r(offs_t offset, uint16_t mem_mask) if (m_eeprom->do_read()) result ^= 0x0004; - if (LOG) - logerror("eeprom_data_r(%02X)\n", result); + if (!machine().side_effects_disabled()) + LOGEEPROM("eeprom_data_r(%02X)\n", result); return result; } @@ -283,8 +293,8 @@ uint16_t gaelco3d_state::eeprom_data_r(offs_t offset, uint16_t mem_mask) uint16_t gaelco3d_state::sound_status_r(offs_t offset, uint16_t mem_mask) { - if (LOG) - logerror("%s:sound_status_r(%02X) = %02X\n", machine().describe_context(), offset, m_sound_status); + if (!machine().side_effects_disabled()) + LOGSOUND("%s:sound_status_r(%02X) = %02X\n", machine().describe_context(), offset, m_sound_status); if (ACCESSING_BITS_0_7) return m_sound_status; return 0xffff; @@ -293,8 +303,7 @@ uint16_t gaelco3d_state::sound_status_r(offs_t offset, uint16_t mem_mask) void gaelco3d_state::sound_status_w(uint16_t data) { - if (LOG) - logerror("sound_status_w(%02X)\n", m_sound_status); + LOGSOUND("sound_status_w(%02X)\n", m_sound_status); m_sound_status = data; } @@ -309,7 +318,7 @@ void gaelco3d_state::sound_status_w(uint16_t data) template int gaelco3d_state::analog_bit_r() { - return (m_analog_ports[N] >> 7) & 0x01; + return BIT(m_analog_ports[N], 7); } @@ -341,7 +350,7 @@ void gaelco3d_state::analog_port_latch_w(int state) template int gaelco3d_state::fp_analog_bit_r() { - return (m_fp_analog_ports[N] >> m_fp_clock) & 1; + return BIT(m_fp_analog_ports[N], m_fp_clock); } void gaelco3d_state::fp_analog_clock_w(int state) @@ -355,12 +364,12 @@ void gaelco3d_state::fp_analog_clock_w(int state) m_fp_clock = 0; for (int i = 0; i < 2; i++) { - u32 ay = m_analog[i * 2].read_safe(0); - u32 ax = m_analog[i * 2 + 1].read_safe(0); + u32 const ay = m_analog[i * 2].read_safe(0); + u32 const ax = m_analog[i * 2 + 1].read_safe(0); m_fp_analog_ports[i] = (ax << 18) | ((ax ^ 0xff) << 10) | (ay << 2) | 1; - s32 aay = ay - 0x80; - s32 aax = ax - 0x80; - u32 len = aay * aay + aax * aax; + s32 const aay = ay - 0x80; + s32 const aax = ax - 0x80; + u32 const len = aay * aay + aax * aax; if (len <= m_fp_lenght[i]) m_fp_analog_ports[i] |= 2; m_fp_lenght[i] = len; @@ -378,7 +387,8 @@ void gaelco3d_state::fp_analog_clock_w(int state) uint32_t gaelco3d_state::tms_m68k_ram_r(offs_t offset) { -// logerror("%s:tms_m68k_ram_r(%04X) = %08X\n", machine().describe_context(), offset, !(offset & 1) ? ((int32_t)m_m68k_ram_base[offset/2] >> 16) : (int)(int16_t)m_m68k_ram_base[offset/2]); + //if (!machine().side_effects_disabled()) + //LOGTMS("%s:tms_m68k_ram_r(%04X) = %08X\n", machine().describe_context(), offset, !(offset & 1) ? ((int32_t)m_m68k_ram_base[offset/2] >> 16) : (int)(int16_t)m_m68k_ram_base[offset/2]); if (m_m68k_ram_base16) return (int32_t)(int16_t)m_m68k_ram_base16[offset]; else if (offset & 1) @@ -401,8 +411,7 @@ void gaelco3d_state::tms_m68k_ram_w(offs_t offset, uint32_t data) void gaelco3d_state::tms_iack_w(offs_t offset, uint8_t data) { - if (LOG) - logerror("iack_w(%d) - %06X\n", data, offset); + LOGTMS("iack_w(%d) - %06X\n", data, offset); m_tms->set_input_line(0, CLEAR_LINE); } @@ -418,8 +427,7 @@ void gaelco3d_state::tms_reset_w(int state) { /* this is set to 0 while data is uploaded, then set to $ffff after it is done. It does not ever appear to be touched after that */ - if (LOG) - logerror("%06X:tms_reset_w = %d\n", m_maincpu->pc(), state); + LOGTMS("%06X:tms_reset_w = %d\n", m_maincpu->pc(), state); m_tms->set_input_line(INPUT_LINE_RESET, state ? CLEAR_LINE : ASSERT_LINE); } @@ -428,16 +436,14 @@ void gaelco3d_state::tms_irq_w(int state) { /* This is written twice, 0,1, in quick succession. Done after uploading, and after modifying the comm area */ - if (LOG) - logerror("%06X:tms_irq_w = %d\n", m_maincpu->pc(), state); + LOGTMS("%06X:tms_irq_w = %d\n", m_maincpu->pc(), state); m_tms->set_input_line(0, state ? CLEAR_LINE : ASSERT_LINE); } void gaelco3d_state::tms_control3_w(int state) { - if (LOG) - logerror("%06X:tms_control3_w = %d\n", m_maincpu->pc(), state); + LOGTMS("%06X:tms_control3_w = %d\n", m_maincpu->pc(), state); } /************************************* @@ -479,15 +485,14 @@ ADSP control 3FFF W = 0C08 (SYSCONTROL_REG) void gaelco3d_state::adsp_control_w(offs_t offset, uint16_t data) { - if (LOG) - logerror("ADSP control %04X W = %04X\n", 0x3fe0 + offset, data); + LOGADSP("ADSP control %04X W = %04X\n", 0x3fe0 + offset, data); m_adsp_control_regs[offset] = data; switch (offset) { case SYSCONTROL_REG: // See if SPORT1 got disabled - if ((data & 0x0800) == 0) + if (BIT(~data, 11)) { for (uint8_t i = 0; i < SOUND_CHANNELS; i++) m_dmadac[i]->enable(0); @@ -498,7 +503,7 @@ void gaelco3d_state::adsp_control_w(offs_t offset, uint16_t data) case S1_AUTOBUF_REG: // Autobuffer off: nuke the timer, and disable the DAC - if ((data & 0x0002) == 0) + if (BIT(~data, 1)) { for (uint8_t i = 0; i < SOUND_CHANNELS; i++) m_dmadac[i]->enable(0); @@ -509,9 +514,9 @@ void gaelco3d_state::adsp_control_w(offs_t offset, uint16_t data) case S1_CONTROL_REG: if (((data >> 4) & 3) == 2) - logerror("Oh no!, the data is compressed with u-law encoding\n"); + LOGADSP("Oh no!, the data is compressed with u-law encoding\n"); if (((data >> 4) & 3) == 3) - logerror("Oh no!, the data is compressed with A-law encoding\n"); + LOGADSP("Oh no!, the data is compressed with A-law encoding\n"); break; } } @@ -519,8 +524,7 @@ void gaelco3d_state::adsp_control_w(offs_t offset, uint16_t data) void gaelco3d_state::adsp_rombank_w(offs_t offset, uint16_t data) { - if (LOG) - logerror("adsp_rombank_w(%d) = %04X\n", offset, data); + LOGADSP("adsp_rombank_w(%d) = %04X\n", offset, data); m_adsp_bank->set_entry((offset & 1) * 0x80 + (data & 0x7f)); } @@ -538,7 +542,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(gaelco3d_state::adsp_autobuffer_irq) int reg = m_adsp->state_int(ADSP2100_I0 + m_adsp_ireg); // Copy the current data into the buffer -// logerror("ADSP buffer: I%d=%04X incs=%04X size=%04X\n", m_adsp_ireg, reg, m_adsp_incs, m_adsp_size); +// LOGADSP("ADSP buffer: I%d=%04X incs=%04X size=%04X\n", m_adsp_ireg, reg, m_adsp_incs, m_adsp_size); if (m_adsp_incs) { for (uint8_t i = 0; i < SOUND_CHANNELS; i++) @@ -569,24 +573,20 @@ void gaelco3d_state::adsp_tx_callback(offs_t offset, uint32_t data) return; // Check if SPORT1 is enabled - if (m_adsp_control_regs[SYSCONTROL_REG] & 0x0800) // bit 11 + if (BIT(m_adsp_control_regs[SYSCONTROL_REG], 11)) // bit 11 { // We only support autobuffer here (which is what this thing uses), bail if not enabled - if (m_adsp_control_regs[S1_AUTOBUF_REG] & 0x0002) // bit 1 + if (BIT(m_adsp_control_regs[S1_AUTOBUF_REG], 1)) // bit 1 { // Get the autobuffer registers - int mreg, lreg; - uint16_t source; - attotime sample_period; - m_adsp_ireg = (m_adsp_control_regs[S1_AUTOBUF_REG] >> 9) & 7; - mreg = (m_adsp_control_regs[S1_AUTOBUF_REG] >> 7) & 3; + int mreg = (m_adsp_control_regs[S1_AUTOBUF_REG] >> 7) & 3; mreg |= m_adsp_ireg & 0x04; // msb comes from ireg - lreg = m_adsp_ireg; + int const lreg = m_adsp_ireg; /* Now get the register contents in a more legible format. We depend on register indexes to be continuous (which is the case in our core) */ - source = m_adsp->state_int(ADSP2100_I0 + m_adsp_ireg); + uint16_t source = m_adsp->state_int(ADSP2100_I0 + m_adsp_ireg); m_adsp_incs = m_adsp->state_int(ADSP2100_M0 + mreg); m_adsp_size = m_adsp->state_int(ADSP2100_L0 + lreg); @@ -602,7 +602,7 @@ void gaelco3d_state::adsp_tx_callback(offs_t offset, uint32_t data) // Calculate how long until we generate an interrupt // Period per each bit sent - sample_period = attotime::from_hz(m_adsp->clock()) * (2 * (m_adsp_control_regs[S1_SCLKDIV_REG] + 1)); + attotime sample_period = attotime::from_hz(m_adsp->clock()) * (2 * (m_adsp_control_regs[S1_SCLKDIV_REG] + 1)); // Now put it down to samples, so we know what the channel frequency has to be sample_period *= 16 * SOUND_CHANNELS; @@ -621,7 +621,7 @@ void gaelco3d_state::adsp_tx_callback(offs_t offset, uint32_t data) return; } else - logerror( "ADSP SPORT1: trying to transmit and autobuffer not enabled!\n" ); + LOGADSP( "ADSP SPORT1: trying to transmit and autobuffer not enabled!\n" ); } // If we get there, something went wrong. Disable playing @@ -643,13 +643,13 @@ void gaelco3d_state::adsp_tx_callback(offs_t offset, uint32_t data) void gaelco3d_state::unknown_137_w(int state) { // Only written $00 or $ff - logerror("%06X:unknown_137_w = %d\n", m_maincpu->pc(), state); + LOGADSP("%06X:unknown_137_w = %d\n", m_maincpu->pc(), state); } void gaelco3d_state::unknown_13a_w(int state) { // Only written $0000 or $0001 - logerror("%06X:unknown_13a_w = %04X\n", m_maincpu->pc(), state); + LOGADSP("%06X:unknown_13a_w = %04X\n", m_maincpu->pc(), state); } @@ -664,7 +664,7 @@ void gaelco3d_state::main_map(address_map &map) { map.unmap_value_high(); map(0x000000, 0x1fffff).rom(); - map(0x400000, 0x40ffff).ram().w(FUNC(gaelco3d_state::gaelco3d_paletteram_w)).share("paletteram16"); + map(0x400000, 0x40ffff).ram().w(FUNC(gaelco3d_state::paletteram_w)).share(m_paletteram16); map(0x51000c, 0x51000d).portr("IN0"); map(0x51001c, 0x51001d).portr("IN1"); map(0x51002c, 0x51002d).portr("IN2"); @@ -678,14 +678,14 @@ void gaelco3d_state::main_map(address_map &map) map(0x510105, 0x510105).w(m_serial, FUNC(gaelco_serial_device::data_w)); map(0x510106, 0x510107).mirror(0x000070).nopr(); // clr.b instructions do dummy reads map(0x510107, 0x510107).select(0x000070).lw8(NAME([this] (offs_t offset, u8 data) { m_outlatch->write_d0(offset >> 4, data); })); - map(0xfe0000, 0xfeffff).ram().share("m68k_ram_base16"); + map(0xfe0000, 0xfeffff).ram().share(m_m68k_ram_base16); } void gaelco3d_state::main020_map(address_map &map) { map(0x000000, 0x1fffff).rom(); - map(0x400000, 0x40ffff).ram().w(FUNC(gaelco3d_state::gaelco3d_paletteram_020_w)).share("paletteram32"); + map(0x400000, 0x40ffff).ram().w(FUNC(gaelco3d_state::paletteram_020_w)).share(m_paletteram32); map(0x51000c, 0x51000f).portr("IN0"); map(0x51001c, 0x51001f).portr("IN1"); map(0x51002c, 0x51002f).portr("IN2"); @@ -697,31 +697,31 @@ void gaelco3d_state::main020_map(address_map &map) map(0x510103, 0x510103).select(0x000038).lw8(NAME([this] (offs_t offset, u8 data) { m_mainlatch->write_d0(offset >> 3, data); })); map(0x510105, 0x510105).w(m_serial, FUNC(gaelco_serial_device::data_w)); map(0x510107, 0x510107).select(0x000070).lw8(NAME([this] (offs_t offset, u8 data) { m_outlatch->write_d0(offset >> 4, data); })); - map(0xfe0000, 0xfeffff).ram().share("m68k_ram_base32"); + map(0xfe0000, 0xfeffff).ram().share(m_m68k_ram_base32); } void gaelco3d_state::tms_map(address_map &map) { map(0x000000, 0x007fff).rw(FUNC(gaelco3d_state::tms_m68k_ram_r), FUNC(gaelco3d_state::tms_m68k_ram_w)); - map(0x400000, 0x7fffff).rom().region("user2", 0); - map(0xc00000, 0xc00007).w(FUNC(gaelco3d_state::gaelco3d_render_w)); + map(0x400000, 0x7fffff).rom().region("tmsrom", 0); + map(0xc00000, 0xc00007).w(FUNC(gaelco3d_state::render_w)); } void gaelco3d_state::adsp_program_map(address_map &map) { - map(0x0000, 0x03ff).ram().share("adsp_ram_base"); // 1k words internal RAM + map(0x0000, 0x03ff).ram().share(m_adsp_ram_base); // 1k words internal RAM map(0x37ff, 0x37ff).nopr(); // speedup hammers this for no apparent reason } void gaelco3d_state::adsp_data_map(address_map &map) { map(0x0000, 0x0001).w(FUNC(gaelco3d_state::adsp_rombank_w)); - map(0x0000, 0x1fff).bankr("adspbank"); + map(0x0000, 0x1fff).bankr(m_adsp_bank); map(0x2000, 0x2000).r(m_soundlatch, FUNC(generic_latch_8_device::read)).umask16(0x00ff); map(0x2000, 0x2000).w(FUNC(gaelco3d_state::sound_status_w)); - map(0x3800, 0x39ff).ram().share("adsp_fastram"); // 512 words internal RAM - map(0x3fe0, 0x3fff).w(FUNC(gaelco3d_state::adsp_control_w)).share("adsp_regs"); + map(0x3800, 0x39ff).ram().share(m_adsp_fastram_base); // 512 words internal RAM + map(0x3fe0, 0x3fff).w(FUNC(gaelco3d_state::adsp_control_w)).share(m_adsp_control_regs); } @@ -924,7 +924,7 @@ void gaelco3d_state::gaelco3d(machine_config &config) config.set_maximum_quantum(attotime::from_hz(6000)); - TIMER(config, "adsp_timer").configure_generic(FUNC(gaelco3d_state::adsp_autobuffer_irq)); + TIMER(config, m_adsp_autobuffer_timer).configure_generic(FUNC(gaelco3d_state::adsp_autobuffer_irq)); GAELCO_SERIAL(config, m_serial, 0); m_serial->irq_handler().set(FUNC(gaelco3d_state::ser_irq)); @@ -1030,20 +1030,20 @@ ROM_START( speedup ) // Version 2.20 - REF. 960717 ROM board ROM_LOAD16_BYTE( "sup_2.2_10.ic10", 0x000000, 0x80000, CRC(ee781e64) SHA1(d90fa9319982fa389c2032e13d59850971078006) ) // 2.2 is handwritten between SUP and 10 ROM_LOAD16_BYTE( "sup_2.2_15.ic15", 0x000001, 0x80000, CRC(1b8ff9d2) SHA1(4939b45844de962d2b93be058b44c09e366cf8db) ) // 2.2 is handwritten between SUP and 15 - ROM_REGION16_LE( 0x400000, "user1", 0 ) // ADSP-2115 code & data + ROM_REGION16_LE( 0x400000, "adsprom", 0 ) // ADSP-2115 code & data ROM_LOAD( "sup_ic25.ic25", 0x0000000, 0x400000, CRC(284c7cd1) SHA1(58fbe73195aac9808a347c543423593e17ad3a10) ) // designation silkscreend on mask ROM - ROM_REGION32_LE( 0x1000000, "user2", 0 ) + ROM_REGION32_LE( 0x1000000, "tmsrom", 0 ) ROM_LOAD32_WORD( "sup_ic32.ic32", 0x000000, 0x200000, CRC(aed151de) SHA1(a139d4451d3758aa70621a25289d64c98c26d5c0) ) // designation silkscreend on mask ROM ROM_LOAD32_WORD( "sup_ic33.ic33", 0x000002, 0x200000, CRC(9be6ab7d) SHA1(8bb07f2a096d1f8989a5a409f87b35b7d771de88) ) // designation silkscreend on mask ROM - ROM_REGION( 0x1000000, "gfx1", 0 ) + ROM_REGION( 0x1000000, "texture", 0 ) ROM_LOAD( "sup_ic12.ic12", 0x0000000, 0x400000, CRC(311f3247) SHA1(95014ea177011521a01df85fb511e5e6673dbdcb) ) // designation silkscreend on mask ROM ROM_LOAD( "sup_ic14.ic14", 0x0400000, 0x400000, CRC(3ad3c089) SHA1(1bd577679ed436251995a100aece2c26c0214fd8) ) // designation silkscreend on mask ROM ROM_LOAD( "sup_ic11.ic11", 0x0800000, 0x400000, CRC(b993e65a) SHA1(b95bd4c1eac7fba1d2429250446b58f741350bb3) ) // designation silkscreend on mask ROM ROM_LOAD( "sup_ic13.ic13", 0x0c00000, 0x400000, CRC(ad00023c) SHA1(9d7cce280fff38d7e0dac21e7a1774809d9758bd) ) // designation silkscreend on mask ROM - ROM_REGION( 0x0080000, "gfx2", 0 ) + ROM_REGION( 0x0080000, "texmask", 0 ) ROM_LOAD( "ic35.bin", 0x0000000, 0x020000, CRC(34737d1d) SHA1(e9109a88e211aa49851e72a6fa3417f1cad1cb8b) ) // nondescript green dot label ROM_LOAD( "ic34.bin", 0x0020000, 0x020000, CRC(e89e829b) SHA1(50c99bd9667d78a61252eaad5281a2e7f57be85a) ) // nondescript white dot label // These 2 are copies of the previous 2 at different IC locations @@ -1059,20 +1059,20 @@ ROM_START( speedup12 ) // Version 1.20 - REF. 960717 ROM board ROM_LOAD16_BYTE( "sup_10.ic10", 0x000000, 0x80000, CRC(07e70bae) SHA1(17013d859ec075e12518b094040a056d850b3271) ) ROM_LOAD16_BYTE( "sup_15.ic15", 0x000001, 0x80000, CRC(7947c28d) SHA1(46efb56d0f7fe2e92d0d04dcd2f130aef3be436d) ) - ROM_REGION16_LE( 0x400000, "user1", 0 ) // ADSP-2115 code & data + ROM_REGION16_LE( 0x400000, "adsprom", 0 ) // ADSP-2115 code & data ROM_LOAD( "sup_ic25.ic25", 0x0000000, 0x400000, CRC(284c7cd1) SHA1(58fbe73195aac9808a347c543423593e17ad3a10) ) // designation silkscreend on mask ROM - ROM_REGION32_LE( 0x1000000, "user2", 0 ) + ROM_REGION32_LE( 0x1000000, "tmsrom", 0 ) ROM_LOAD32_WORD( "sup_ic32.ic32", 0x000000, 0x200000, CRC(aed151de) SHA1(a139d4451d3758aa70621a25289d64c98c26d5c0) ) // designation silkscreend on mask ROM ROM_LOAD32_WORD( "sup_ic33.ic33", 0x000002, 0x200000, CRC(9be6ab7d) SHA1(8bb07f2a096d1f8989a5a409f87b35b7d771de88) ) // designation silkscreend on mask ROM - ROM_REGION( 0x1000000, "gfx1", 0 ) + ROM_REGION( 0x1000000, "texture", 0 ) ROM_LOAD( "sup_ic12.ic12", 0x0000000, 0x400000, CRC(311f3247) SHA1(95014ea177011521a01df85fb511e5e6673dbdcb) ) // designation silkscreend on mask ROM ROM_LOAD( "sup_ic14.ic14", 0x0400000, 0x400000, CRC(3ad3c089) SHA1(1bd577679ed436251995a100aece2c26c0214fd8) ) // designation silkscreend on mask ROM ROM_LOAD( "sup_ic11.ic11", 0x0800000, 0x400000, CRC(b993e65a) SHA1(b95bd4c1eac7fba1d2429250446b58f741350bb3) ) // designation silkscreend on mask ROM ROM_LOAD( "sup_ic13.ic13", 0x0c00000, 0x400000, CRC(ad00023c) SHA1(9d7cce280fff38d7e0dac21e7a1774809d9758bd) ) // designation silkscreend on mask ROM - ROM_REGION( 0x0080000, "gfx2", 0 ) + ROM_REGION( 0x0080000, "texmask", 0 ) ROM_LOAD( "ic35.bin", 0x0000000, 0x020000, CRC(34737d1d) SHA1(e9109a88e211aa49851e72a6fa3417f1cad1cb8b) ) // nondescript green dot label ROM_LOAD( "ic34.bin", 0x0020000, 0x020000, CRC(e89e829b) SHA1(50c99bd9667d78a61252eaad5281a2e7f57be85a) ) // nondescript white dot label // These 2 are copies of the previous 2 at different IC locations @@ -1088,20 +1088,20 @@ ROM_START( speedup10 ) // Version 1.00 - REF. 960717 ROM board ROM_LOAD16_BYTE( "ic10_1.00.ic10", 0x000000, 0x80000, CRC(24ed8f48) SHA1(59d59e2a0b2fb7aed5320167960129819adedd9a) ) // handwritten labels IC10 1.00 ROM_LOAD16_BYTE( "ic15_1.00.ic15", 0x000001, 0x80000, CRC(b3fda7f1) SHA1(e77ef3cb46be0767476f65dcc8d4fc12550be4a3) ) // handwritten labels IC15 1.00 - ROM_REGION16_LE( 0x400000, "user1", 0 ) // ADSP-2115 code & data + ROM_REGION16_LE( 0x400000, "adsprom", 0 ) // ADSP-2115 code & data ROM_LOAD( "sup_ic25.ic25", 0x0000000, 0x400000, CRC(284c7cd1) SHA1(58fbe73195aac9808a347c543423593e17ad3a10) ) // designation silkscreend on mask ROM - ROM_REGION32_LE( 0x1000000, "user2", 0 ) + ROM_REGION32_LE( 0x1000000, "tmsrom", 0 ) ROM_LOAD32_WORD( "sup_ic32.ic32", 0x000000, 0x200000, CRC(aed151de) SHA1(a139d4451d3758aa70621a25289d64c98c26d5c0) ) // designation silkscreend on mask ROM ROM_LOAD32_WORD( "sup_ic33.ic33", 0x000002, 0x200000, CRC(9be6ab7d) SHA1(8bb07f2a096d1f8989a5a409f87b35b7d771de88) ) // designation silkscreend on mask ROM - ROM_REGION( 0x1000000, "gfx1", 0 ) + ROM_REGION( 0x1000000, "texture", 0 ) ROM_LOAD( "sup_ic12.ic12", 0x0000000, 0x400000, CRC(311f3247) SHA1(95014ea177011521a01df85fb511e5e6673dbdcb) ) // designation silkscreend on mask ROM ROM_LOAD( "sup_ic14.ic14", 0x0400000, 0x400000, CRC(3ad3c089) SHA1(1bd577679ed436251995a100aece2c26c0214fd8) ) // designation silkscreend on mask ROM ROM_LOAD( "sup_ic11.ic11", 0x0800000, 0x400000, CRC(b993e65a) SHA1(b95bd4c1eac7fba1d2429250446b58f741350bb3) ) // designation silkscreend on mask ROM ROM_LOAD( "sup_ic13.ic13", 0x0c00000, 0x400000, CRC(ad00023c) SHA1(9d7cce280fff38d7e0dac21e7a1774809d9758bd) ) // designation silkscreend on mask ROM - ROM_REGION( 0x0080000, "gfx2", 0 ) + ROM_REGION( 0x0080000, "texmask", 0 ) ROM_LOAD( "ic35.bin", 0x0000000, 0x020000, CRC(34737d1d) SHA1(e9109a88e211aa49851e72a6fa3417f1cad1cb8b) ) // nondescript green dot label ROM_LOAD( "ic34.bin", 0x0020000, 0x020000, CRC(e89e829b) SHA1(50c99bd9667d78a61252eaad5281a2e7f57be85a) ) // nondescript white dot label // These 2 are copies of the previous 2 at different IC locations @@ -1120,20 +1120,20 @@ ROM_START( surfplnt ) // Version 4.1 - REF. 971223 ROM board ROM_LOAD16_BYTE( "pls_8.ic8", 0x100000, 0x80000, CRC(aef9e1d0) SHA1(15258e62fbf61e21e7d77aa7a81fdbf842fd4560) ) ROM_LOAD16_BYTE( "pls_13.ic13", 0x100001, 0x80000, CRC(d9754369) SHA1(0d82569cb925402a9f4634e52f15435112ec4878) ) - ROM_REGION16_LE( 0x400000, "user1", 0 ) // ADSP-2115 code & data + ROM_REGION16_LE( 0x400000, "adsprom", 0 ) // ADSP-2115 code & data ROM_LOAD( "pls_ic18.ic18", 0x0000000, 0x400000, CRC(a1b64695) SHA1(7487cd51305e30a5b55aada0bae9161fcb3fcd19) ) // designation silkscreend on SMT mask ROM - ROM_REGION32_LE( 0x1000000, "user2", 0 ) + ROM_REGION32_LE( 0x1000000, "tmsrom", 0 ) ROM_LOAD32_WORD( "pls_ic40.ic40", 0x000000, 0x400000, CRC(26877ad3) SHA1(2e0c15b0e060e0b3d5b5cdaf1e22b9ec8e1abc9a) ) // designation silkscreend on SMT mask ROM ROM_LOAD32_WORD( "pls_ic37.ic37", 0x000002, 0x400000, CRC(75893062) SHA1(81f10243336a309f8cc8532ee9a130ecc35bbcd6) ) // designation silkscreend on SMT mask ROM - ROM_REGION( 0x1000000, "gfx1", 0 ) + ROM_REGION( 0x1000000, "texture", 0 ) ROM_LOAD( "pls_ic7.ic7", 0x0000000, 0x400000, CRC(04bd1605) SHA1(4871758e57af5132c30137cd6c46f1a3a567b640) ) // designation silkscreend on SMT mask ROM ROM_LOAD( "pls_ic9.ic9", 0x0400000, 0x400000, CRC(f4400160) SHA1(206557cd4c73b6b3a04bd35b48de736c7546c5e1) ) // designation silkscreend on SMT mask ROM ROM_LOAD( "pls_ic12.ic12", 0x0800000, 0x400000, CRC(edc2e826) SHA1(48d428f928a9805a62bbeaecffcac21aaa76ce77) ) // designation silkscreend on SMT mask ROM ROM_LOAD( "pls_ic15.ic15", 0x0c00000, 0x400000, CRC(b0f6b8da) SHA1(7404ec7455adf145919a28907443994f6a5706a1) ) // designation silkscreend on SMT mask ROM - ROM_REGION( 0x0080000, "gfx2", 0 ) + ROM_REGION( 0x0080000, "texmask", 0 ) ROM_LOAD( "pls_19.ic19", 0x0000000, 0x020000, CRC(691bd7a7) SHA1(2ff404b3974a64097372ed15fb5fbbe52c503265) ) ROM_LOAD( "pls_20.ic20", 0x0020000, 0x020000, CRC(fb293318) SHA1(d255fe3db1b91ec7cc744b0158e70503bca5ceab) ) ROM_LOAD( "pls_21.ic21", 0x0040000, 0x020000, CRC(b80611fb) SHA1(70d6767ddfb04e94cf2796e3f7090f89fd36fe8c) ) @@ -1152,20 +1152,20 @@ ROM_START( surfplnt40 ) // Version 4.0 - REF. 970514 ROM board ROM_LOAD16_BYTE( "pls_8.ic8", 0x100000, 0x80000, CRC(aef9e1d0) SHA1(15258e62fbf61e21e7d77aa7a81fdbf842fd4560) ) ROM_LOAD16_BYTE( "pls_13.ic13", 0x100001, 0x80000, CRC(d9754369) SHA1(0d82569cb925402a9f4634e52f15435112ec4878) ) - ROM_REGION16_LE( 0x400000, "user1", 0 ) // ADSP-2115 code & data + ROM_REGION16_LE( 0x400000, "adsprom", 0 ) // ADSP-2115 code & data ROM_LOAD( "pls_ic18.ic18", 0x0000000, 0x400000, CRC(a1b64695) SHA1(7487cd51305e30a5b55aada0bae9161fcb3fcd19) ) // designation silkscreend on SMT mask ROM - ROM_REGION32_LE( 0x1000000, "user2", 0 ) + ROM_REGION32_LE( 0x1000000, "tmsrom", 0 ) ROM_LOAD32_WORD( "pls_ic40.ic40", 0x000000, 0x400000, CRC(26877ad3) SHA1(2e0c15b0e060e0b3d5b5cdaf1e22b9ec8e1abc9a) ) // designation silkscreend on SMT mask ROM ROM_LOAD32_WORD( "pls_ic37.ic37", 0x000002, 0x400000, CRC(75893062) SHA1(81f10243336a309f8cc8532ee9a130ecc35bbcd6) ) // designation silkscreend on SMT mask ROM - ROM_REGION( 0x1000000, "gfx1", 0 ) + ROM_REGION( 0x1000000, "texture", 0 ) ROM_LOAD( "pls_ic7.ic7", 0x0000000, 0x400000, CRC(04bd1605) SHA1(4871758e57af5132c30137cd6c46f1a3a567b640) ) // designation silkscreend on SMT mask ROM ROM_LOAD( "pls_ic9.ic9", 0x0400000, 0x400000, CRC(f4400160) SHA1(206557cd4c73b6b3a04bd35b48de736c7546c5e1) ) // designation silkscreend on SMT mask ROM ROM_LOAD( "pls_ic12.ic12", 0x0800000, 0x400000, CRC(edc2e826) SHA1(48d428f928a9805a62bbeaecffcac21aaa76ce77) ) // designation silkscreend on SMT mask ROM ROM_LOAD( "pls_ic15.ic15", 0x0c00000, 0x400000, CRC(b0f6b8da) SHA1(7404ec7455adf145919a28907443994f6a5706a1) ) // designation silkscreend on SMT mask ROM - ROM_REGION( 0x0080000, "gfx2", 0 ) + ROM_REGION( 0x0080000, "texmask", 0 ) ROM_LOAD( "pls_19.ic19", 0x0000000, 0x020000, CRC(691bd7a7) SHA1(2ff404b3974a64097372ed15fb5fbbe52c503265) ) ROM_LOAD( "pls_20.ic20", 0x0020000, 0x020000, CRC(fb293318) SHA1(d255fe3db1b91ec7cc744b0158e70503bca5ceab) ) ROM_LOAD( "pls_21.ic21", 0x0040000, 0x020000, CRC(b80611fb) SHA1(70d6767ddfb04e94cf2796e3f7090f89fd36fe8c) ) @@ -1184,20 +1184,20 @@ ROM_START( surfplnt30 ) // Version 3.0 - REF. 970514 ROM board ROM_LOAD16_BYTE( "pls_8.ic8", 0x100000, 0x80000, CRC(aef9e1d0) SHA1(15258e62fbf61e21e7d77aa7a81fdbf842fd4560) ) ROM_LOAD16_BYTE( "pls_13.ic13", 0x100001, 0x80000, CRC(d9754369) SHA1(0d82569cb925402a9f4634e52f15435112ec4878) ) - ROM_REGION16_LE( 0x400000, "user1", 0 ) // ADSP-2115 code & data + ROM_REGION16_LE( 0x400000, "adsprom", 0 ) // ADSP-2115 code & data ROM_LOAD( "pls_ic18.ic18", 0x0000000, 0x400000, CRC(a1b64695) SHA1(7487cd51305e30a5b55aada0bae9161fcb3fcd19) ) // designation silkscreend on SMT mask ROM - ROM_REGION32_LE( 0x1000000, "user2", 0 ) + ROM_REGION32_LE( 0x1000000, "tmsrom", 0 ) ROM_LOAD32_WORD( "pls_ic40.ic40", 0x000000, 0x400000, CRC(26877ad3) SHA1(2e0c15b0e060e0b3d5b5cdaf1e22b9ec8e1abc9a) ) // designation silkscreend on SMT mask ROM ROM_LOAD32_WORD( "pls_ic37.ic37", 0x000002, 0x400000, CRC(75893062) SHA1(81f10243336a309f8cc8532ee9a130ecc35bbcd6) ) // designation silkscreend on SMT mask ROM - ROM_REGION( 0x1000000, "gfx1", 0 ) + ROM_REGION( 0x1000000, "texture", 0 ) ROM_LOAD( "pls_ic7.ic7", 0x0000000, 0x400000, CRC(04bd1605) SHA1(4871758e57af5132c30137cd6c46f1a3a567b640) ) // designation silkscreend on SMT mask ROM ROM_LOAD( "pls_ic9.ic9", 0x0400000, 0x400000, CRC(f4400160) SHA1(206557cd4c73b6b3a04bd35b48de736c7546c5e1) ) // designation silkscreend on SMT mask ROM ROM_LOAD( "pls_ic12.ic12", 0x0800000, 0x400000, CRC(edc2e826) SHA1(48d428f928a9805a62bbeaecffcac21aaa76ce77) ) // designation silkscreend on SMT mask ROM ROM_LOAD( "pls_ic15.ic15", 0x0c00000, 0x400000, CRC(b0f6b8da) SHA1(7404ec7455adf145919a28907443994f6a5706a1) ) // designation silkscreend on SMT mask ROM - ROM_REGION( 0x0080000, "gfx2", 0 ) + ROM_REGION( 0x0080000, "texmask", 0 ) ROM_LOAD( "pls_19.ic19", 0x0000000, 0x020000, CRC(691bd7a7) SHA1(2ff404b3974a64097372ed15fb5fbbe52c503265) ) ROM_LOAD( "pls_20.ic20", 0x0020000, 0x020000, CRC(fb293318) SHA1(d255fe3db1b91ec7cc744b0158e70503bca5ceab) ) ROM_LOAD( "pls_21.ic21", 0x0040000, 0x020000, CRC(b80611fb) SHA1(70d6767ddfb04e94cf2796e3f7090f89fd36fe8c) ) @@ -1216,20 +1216,20 @@ ROM_START( surfplnt20 ) // Version 2.0 - REF. 970514 ROM board ROM_LOAD16_BYTE( "pls_8.ic8", 0x100000, 0x80000, CRC(aef9e1d0) SHA1(15258e62fbf61e21e7d77aa7a81fdbf842fd4560) ) ROM_LOAD16_BYTE( "pls_13.ic13", 0x100001, 0x80000, CRC(d9754369) SHA1(0d82569cb925402a9f4634e52f15435112ec4878) ) - ROM_REGION16_LE( 0x400000, "user1", 0 ) // ADSP-2115 code & data + ROM_REGION16_LE( 0x400000, "adsprom", 0 ) // ADSP-2115 code & data ROM_LOAD( "pls_ic18.ic18", 0x0000000, 0x400000, CRC(a1b64695) SHA1(7487cd51305e30a5b55aada0bae9161fcb3fcd19) ) // designation silkscreend on SMT mask ROM - ROM_REGION32_LE( 0x1000000, "user2", 0 ) + ROM_REGION32_LE( 0x1000000, "tmsrom", 0 ) ROM_LOAD32_WORD( "pls_ic40.ic40", 0x000000, 0x400000, CRC(26877ad3) SHA1(2e0c15b0e060e0b3d5b5cdaf1e22b9ec8e1abc9a) ) // designation silkscreend on SMT mask ROM ROM_LOAD32_WORD( "pls_ic37.ic37", 0x000002, 0x400000, CRC(75893062) SHA1(81f10243336a309f8cc8532ee9a130ecc35bbcd6) ) // designation silkscreend on SMT mask ROM - ROM_REGION( 0x1000000, "gfx1", 0 ) + ROM_REGION( 0x1000000, "texture", 0 ) ROM_LOAD( "pls_ic7.ic7", 0x0000000, 0x400000, CRC(04bd1605) SHA1(4871758e57af5132c30137cd6c46f1a3a567b640) ) // designation silkscreend on SMT mask ROM ROM_LOAD( "pls_ic9.ic9", 0x0400000, 0x400000, CRC(f4400160) SHA1(206557cd4c73b6b3a04bd35b48de736c7546c5e1) ) // designation silkscreend on SMT mask ROM ROM_LOAD( "pls_ic12.ic12", 0x0800000, 0x400000, CRC(edc2e826) SHA1(48d428f928a9805a62bbeaecffcac21aaa76ce77) ) // designation silkscreend on SMT mask ROM ROM_LOAD( "pls_ic15.ic15", 0x0c00000, 0x400000, CRC(b0f6b8da) SHA1(7404ec7455adf145919a28907443994f6a5706a1) ) // designation silkscreend on SMT mask ROM - ROM_REGION( 0x0080000, "gfx2", 0 ) + ROM_REGION( 0x0080000, "texmask", 0 ) ROM_LOAD( "pls_19.ic19", 0x0000000, 0x020000, CRC(691bd7a7) SHA1(2ff404b3974a64097372ed15fb5fbbe52c503265) ) ROM_LOAD( "pls_20.ic20", 0x0020000, 0x020000, CRC(fb293318) SHA1(d255fe3db1b91ec7cc744b0158e70503bca5ceab) ) ROM_LOAD( "pls_21.ic21", 0x0040000, 0x020000, CRC(b80611fb) SHA1(70d6767ddfb04e94cf2796e3f7090f89fd36fe8c) ) @@ -1249,14 +1249,14 @@ ROM_START( radikalb ) // Version 2.02 - REF. 980311 ROM board ROM_LOAD32_BYTE( "rab_14.ic14", 0x000002, 0x80000, CRC(4a0ac8cb) SHA1(4883e5eddb833dcd39376be435aa8e8e2ec47ab5) ) ROM_LOAD32_BYTE( "rab_19.ic19", 0x000003, 0x80000, CRC(c2d4fcb2) SHA1(8e389d1479ba084e5363aef9c797c65ca7f355d2) ) - ROM_REGION16_LE( 0x400000, "user1", 0 ) // ADSP-2115 code & data + ROM_REGION16_LE( 0x400000, "adsprom", 0 ) // ADSP-2115 code & data ROM_LOAD( "rab_ic23.ic23", 0x0000000, 0x400000, CRC(dcf52520) SHA1(ab54421c182436660d2a56a334c1aa335424644a) ) // designation silkscreend on SMT mask ROM - ROM_REGION32_LE( 0x1000000, "user2", 0 ) + ROM_REGION32_LE( 0x1000000, "tmsrom", 0 ) ROM_LOAD32_WORD( "rab_ic48.ic48", 0x000000, 0x400000, CRC(9c56a06a) SHA1(54f12d8b55fa14446c47e31684c92074c4157fe1) ) // designation silkscreend on SMT mask ROM ROM_LOAD32_WORD( "rab_ic45.ic45", 0x000002, 0x400000, CRC(7e698584) SHA1(a9423835a126396902c499e9f7df3b68c2ab28a8) ) // designation silkscreend on SMT mask ROM - ROM_REGION( 0x2000000, "gfx1", 0 ) + ROM_REGION( 0x2000000, "texture", 0 ) ROM_LOAD( "rab_ic8.ic8", 0x0000000, 0x400000, CRC(4fbd4737) SHA1(594438d3edbe00682290986cc631615d7bef67f3) ) // designation silkscreend on SMT mask ROM ROM_LOAD( "rab_ic10.ic10", 0x0800000, 0x400000, CRC(870b0ce4) SHA1(75910dca87d2eb3a6b4a28f6e9c63a6b6700de84) ) // designation silkscreend on SMT mask ROM ROM_LOAD( "rab_ic15.ic15", 0x1000000, 0x400000, CRC(edb9d409) SHA1(1f8df507e990eee197f2779b45bd8f143d1bd439) ) // designation silkscreend on SMT mask ROM @@ -1267,7 +1267,7 @@ ROM_START( radikalb ) // Version 2.02 - REF. 980311 ROM board ROM_LOAD( "rab_ic16.ic16", 0x1400000, 0x400000, CRC(9d595e46) SHA1(b985332974e1fb0b9d20d521da0d7deceea93a8a) ) // designation silkscreend on SMT mask ROM ROM_LOAD( "rab_ic18.ic18", 0x1c00000, 0x400000, CRC(3084bc49) SHA1(9da43482293eeb08ceae67455b2fcd97b6ef5109) ) // designation silkscreend on SMT mask ROM - ROM_REGION( 0x0080000, "gfx2", 0 ) + ROM_REGION( 0x0080000, "texmask", 0 ) ROM_LOAD( "rab_24.ic24", 0x0000000, 0x020000, CRC(2984bc1d) SHA1(1f62bdaa86feeff96640e325f8241b9c5f383a44) ) ROM_LOAD( "rab_25.ic25", 0x0020000, 0x020000, CRC(777758e3) SHA1(bd334b1ba46189ac8509eee3a4ab295c121400fd) ) ROM_LOAD( "rab_26.ic26", 0x0040000, 0x020000, CRC(bd9c1b54) SHA1(c9ef679cf7eca9ed315ea62a7ada452bc85f7a6a) ) @@ -1286,14 +1286,14 @@ ROM_START( radikalba ) // Version 2.02, Atari license - REF. 980311 ROM board ROM_LOAD32_BYTE( "rab_14.ic14", 0x000002, 0x80000, CRC(4a0ac8cb) SHA1(4883e5eddb833dcd39376be435aa8e8e2ec47ab5) ) ROM_LOAD32_BYTE( "rab_19.ic19", 0x000003, 0x80000, CRC(2631bd61) SHA1(57331ad49e7284b82073f696049de109b7683b03) ) // sldh - ROM_REGION16_LE( 0x400000, "user1", 0 ) // ADSP-2115 code & data + ROM_REGION16_LE( 0x400000, "adsprom", 0 ) // ADSP-2115 code & data ROM_LOAD( "rab_ic23.ic23", 0x0000000, 0x400000, CRC(dcf52520) SHA1(ab54421c182436660d2a56a334c1aa335424644a) ) // designation silkscreend on SMT mask ROM - ROM_REGION32_LE( 0x1000000, "user2", 0 ) + ROM_REGION32_LE( 0x1000000, "tmsrom", 0 ) ROM_LOAD32_WORD( "rab_ic48.ic48", 0x000000, 0x400000, CRC(9c56a06a) SHA1(54f12d8b55fa14446c47e31684c92074c4157fe1) ) // designation silkscreend on SMT mask ROM ROM_LOAD32_WORD( "rab_ic45.ic45", 0x000002, 0x400000, CRC(7e698584) SHA1(a9423835a126396902c499e9f7df3b68c2ab28a8) ) // designation silkscreend on SMT mask ROM - ROM_REGION( 0x2000000, "gfx1", 0 ) + ROM_REGION( 0x2000000, "texture", 0 ) ROM_LOAD( "rab_ic8.ic8", 0x0000000, 0x400000, CRC(4fbd4737) SHA1(594438d3edbe00682290986cc631615d7bef67f3) ) // designation silkscreend on SMT mask ROM ROM_LOAD( "rab_ic10.ic10", 0x0800000, 0x400000, CRC(870b0ce4) SHA1(75910dca87d2eb3a6b4a28f6e9c63a6b6700de84) ) // designation silkscreend on SMT mask ROM ROM_LOAD( "rab_ic15.ic15", 0x1000000, 0x400000, CRC(edb9d409) SHA1(1f8df507e990eee197f2779b45bd8f143d1bd439) ) // designation silkscreend on SMT mask ROM @@ -1304,7 +1304,7 @@ ROM_START( radikalba ) // Version 2.02, Atari license - REF. 980311 ROM board ROM_LOAD( "rab_ic16.ic16", 0x1400000, 0x400000, CRC(9d595e46) SHA1(b985332974e1fb0b9d20d521da0d7deceea93a8a) ) // designation silkscreend on SMT mask ROM ROM_LOAD( "rab_ic18.ic18", 0x1c00000, 0x400000, CRC(3084bc49) SHA1(9da43482293eeb08ceae67455b2fcd97b6ef5109) ) // designation silkscreend on SMT mask ROM - ROM_REGION( 0x0080000, "gfx2", 0 ) + ROM_REGION( 0x0080000, "texmask", 0 ) ROM_LOAD( "rab_24.ic24", 0x0000000, 0x020000, CRC(2984bc1d) SHA1(1f62bdaa86feeff96640e325f8241b9c5f383a44) ) ROM_LOAD( "rab_25.ic25", 0x0020000, 0x020000, CRC(777758e3) SHA1(bd334b1ba46189ac8509eee3a4ab295c121400fd) ) ROM_LOAD( "rab_26.ic26", 0x0040000, 0x020000, CRC(bd9c1b54) SHA1(c9ef679cf7eca9ed315ea62a7ada452bc85f7a6a) ) @@ -1343,20 +1343,20 @@ ROM_START( footbpow ) // Version 1.2 - REF. 000208 ROM board ROM_LOAD32_BYTE( "fop_13.ic13", 0x000002, 0x80000, CRC(57723eda) SHA1(09972b09444b6704dcc966033bfab61ea57d0cd0) ) ROM_LOAD32_BYTE( "fop_19.ic19", 0x000003, 0x80000, CRC(aa59cd2d) SHA1(7cc6edfd0896e4d2c881b16d5ad07361bdeff11d) ) - ROM_REGION16_LE( 0x400000, "user1", 0 ) // ADSP-2115 code & data + ROM_REGION16_LE( 0x400000, "adsprom", 0 ) // ADSP-2115 code & data ROM_LOAD( "fop_ic23.ic23", 0x0000000, 0x400000, CRC(3c02f7c6) SHA1(2325f2a1b260ac60929c82640ced481ad67bb2e0) ) // designation silkscreend on SMT mask ROM - ROM_REGION32_LE( 0x1000000, "user2", 0 ) + ROM_REGION32_LE( 0x1000000, "tmsrom", 0 ) ROM_LOAD32_WORD( "fop_ic48.ic48", 0x000000, 0x800000, CRC(efddf5c1) SHA1(1014b0193d17de05ebcc733fc5d26089b932385b) ) // designation silkscreend on SMT mask ROM ROM_LOAD32_WORD( "fop_ic42.ic42", 0x000002, 0x800000, CRC(8772e536) SHA1(530dfb4e27466bd97582c4fd50af01f14716ed2b) ) // designation silkscreend on SMT mask ROM - ROM_REGION( 0x2000000, "gfx1", 0 ) + ROM_REGION( 0x2000000, "texture", 0 ) ROM_LOAD( "fop_ic8.ic8", 0x0000000, 0x400000, CRC(eaff30ec) SHA1(63f5d33b98194a206c558f9e02c432e7e05aa0e6) ) // designation silkscreend on SMT mask ROM ROM_LOAD( "fop_ic10.ic10", 0x0800000, 0x400000, CRC(536c822b) SHA1(235e96af470785f6cca010782560a4071f285901) ) // designation silkscreend on SMT mask ROM ROM_LOAD( "fop_ic15.ic15", 0x1000000, 0x400000, CRC(c8903051) SHA1(b5927a0bbba017d42b98e7850df966cfa9eeb64a) ) // designation silkscreend on SMT mask ROM ROM_LOAD( "fop_ic17.ic17", 0x1800000, 0x400000, CRC(559a38ae) SHA1(e36d596ad90d0f3657d677e3afa984be30c1fa3b) ) // designation silkscreend on SMT mask ROM - ROM_REGION( 0x0080000, "gfx2", 0 ) + ROM_REGION( 0x0080000, "texmask", 0 ) ROM_LOAD( "fop_24.ic24", 0x0000000, 0x020000, CRC(3214ae1b) SHA1(3ae2fa28ef603b34b3c72313c513f200e2750b85) ) ROM_LOAD( "fop_25.ic25", 0x0020000, 0x020000, CRC(69a8734c) SHA1(835db85371d8fbf0c1a2bc0c6109286f12c95794) ) ROM_LOAD( "fop_26.ic26", 0x0040000, 0x020000, CRC(b5877b68) SHA1(6f6f00da84d6d84895691266c2022fd4cd92f228) ) @@ -1378,20 +1378,20 @@ ROM_START( footbpow11 ) // Version 1.1 - REF. 000208 ROM board ROM_LOAD32_BYTE( "fop_13..ic13", 0x000002, 0x80000, CRC(c58afb45) SHA1(0b0f95b31532bcdf599d160d1a9fd46fe9d24b55) ) // labeled FOP 13. ROM_LOAD32_BYTE( "fop_19..ic19", 0x000003, 0x80000, CRC(c6380cf1) SHA1(845d9db0e8f4a762f5e527da45f6751e5583cb71) ) // labeled FOP 19. - ROM_REGION16_LE( 0x400000, "user1", 0 ) // ADSP-2115 code & data + ROM_REGION16_LE( 0x400000, "adsprom", 0 ) // ADSP-2115 code & data ROM_LOAD( "fop_ic23.ic23", 0x0000000, 0x400000, CRC(3c02f7c6) SHA1(2325f2a1b260ac60929c82640ced481ad67bb2e0) ) // designation silkscreend on SMT mask ROM - ROM_REGION32_LE( 0x1000000, "user2", 0 ) + ROM_REGION32_LE( 0x1000000, "tmsrom", 0 ) ROM_LOAD32_WORD( "fop_ic48.ic48", 0x000000, 0x800000, CRC(efddf5c1) SHA1(1014b0193d17de05ebcc733fc5d26089b932385b) ) // designation silkscreend on SMT mask ROM ROM_LOAD32_WORD( "fop_ic42.ic42", 0x000002, 0x800000, CRC(8772e536) SHA1(530dfb4e27466bd97582c4fd50af01f14716ed2b) ) // designation silkscreend on SMT mask ROM - ROM_REGION( 0x2000000, "gfx1", 0 ) + ROM_REGION( 0x2000000, "texture", 0 ) ROM_LOAD( "fop_ic8.ic8", 0x0000000, 0x400000, CRC(eaff30ec) SHA1(63f5d33b98194a206c558f9e02c432e7e05aa0e6) ) // designation silkscreend on SMT mask ROM ROM_LOAD( "fop_ic10.ic10", 0x0800000, 0x400000, CRC(536c822b) SHA1(235e96af470785f6cca010782560a4071f285901) ) // designation silkscreend on SMT mask ROM ROM_LOAD( "fop_ic15.ic15", 0x1000000, 0x400000, CRC(c8903051) SHA1(b5927a0bbba017d42b98e7850df966cfa9eeb64a) ) // designation silkscreend on SMT mask ROM ROM_LOAD( "fop_ic17.ic17", 0x1800000, 0x400000, CRC(559a38ae) SHA1(e36d596ad90d0f3657d677e3afa984be30c1fa3b) ) // designation silkscreend on SMT mask ROM - ROM_REGION( 0x0080000, "gfx2", 0 ) + ROM_REGION( 0x0080000, "texmask", 0 ) ROM_LOAD( "fop_24.ic24", 0x0000000, 0x020000, CRC(3214ae1b) SHA1(3ae2fa28ef603b34b3c72313c513f200e2750b85) ) ROM_LOAD( "fop_25.ic25", 0x0020000, 0x020000, CRC(69a8734c) SHA1(835db85371d8fbf0c1a2bc0c6109286f12c95794) ) ROM_LOAD( "fop_26.ic26", 0x0040000, 0x020000, CRC(b5877b68) SHA1(6f6f00da84d6d84895691266c2022fd4cd92f228) ) diff --git a/src/mame/gaelco/gaelco3d.h b/src/mame/gaelco/gaelco3d.h index e6e76b4789624..e6875d1caab0f 100644 --- a/src/mame/gaelco/gaelco3d.h +++ b/src/mame/gaelco/gaelco3d.h @@ -23,8 +23,6 @@ #include "video/poly.h" #include "screen.h" -#define SOUND_CHANNELS 4 - class gaelco3d_state : public driver_device { @@ -60,11 +58,14 @@ class gaelco3d_state : public driver_device template int analog_bit_r(); template int fp_analog_bit_r(); -private: +protected: virtual void machine_start() override ATTR_COLD; virtual void machine_reset() override ATTR_COLD; virtual void video_start() override ATTR_COLD; +private: + static constexpr unsigned SOUND_CHANNELS = 4; + struct gaelco3d_object_data { uint32_t tex = 0, color = 0; @@ -130,7 +131,6 @@ class gaelco3d_state : public driver_device uint32_t m_fp_lenght[2]{}; uint8_t m_fp_clock = 0; uint8_t m_fp_state = 0; - uint8_t m_framenum = 0; uint8_t m_adsp_ireg = 0; offs_t m_adsp_ireg_base = 0; offs_t m_adsp_incs = 0; @@ -138,8 +138,8 @@ class gaelco3d_state : public driver_device std::unique_ptr m_palette; std::unique_ptr m_polydata_buffer; uint32_t m_polydata_count = 0; - int m_lastscan = 0; - int m_video_changed = 0; + int32_t m_lastscan = 0; + bool m_video_changed = false; std::unique_ptr m_poly; void irq_ack_w(uint16_t data); @@ -157,9 +157,9 @@ class gaelco3d_state : public driver_device void adsp_rombank_w(offs_t offset, uint16_t data); void unknown_137_w(int state); void unknown_13a_w(int state); - void gaelco3d_render_w(uint32_t data); - void gaelco3d_paletteram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - void gaelco3d_paletteram_020_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + void render_w(uint32_t data); + void paletteram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + void paletteram_020_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); void ser_irq(int state); uint16_t eeprom_data_r(offs_t offset, uint16_t mem_mask = ~0); diff --git a/src/mame/gaelco/gaelco3d_v.cpp b/src/mame/gaelco/gaelco3d_v.cpp index 78e70f37a9afe..9d7c033334f96 100644 --- a/src/mame/gaelco/gaelco3d_v.cpp +++ b/src/mame/gaelco/gaelco3d_v.cpp @@ -10,53 +10,55 @@ #include "emu.h" #include "gaelco3d.h" + #include "cpu/tms32031/tms32031.h" + #include "video/rgbutil.h" -#define MAX_POLYGONS 4096 -#define MAX_POLYDATA (MAX_POLYGONS * 21) -#define MAX_VERTICES 32 +static constexpr unsigned MAX_POLYGONS = 4096; +static constexpr unsigned MAX_POLYDATA = MAX_POLYGONS * 21; +static constexpr unsigned MAX_VERTICES = 32; #define DISPLAY_TEXTURE 0 #define LOG_POLYGONS 0 #define DISPLAY_STATS 0 -#define IS_POLYEND(x) (((x) ^ ((x) >> 1)) & 0x4000) +constexpr bool IS_POLYEND(uint32_t x) { return BIT(x ^ (x >> 1), 14); } -gaelco3d_state::gaelco3d_renderer::gaelco3d_renderer(gaelco3d_state &state) - : poly_manager(state.machine()), - m_state(state), - m_screenbits(state.m_screen->width(), state.m_screen->height()), - m_zbuffer(state.m_screen->width(), state.m_screen->height()), - m_polygons(0), - m_texture_size(state.memregion("gfx1")->bytes()), - m_texmask_size(state.memregion("gfx2")->bytes() * 8), - m_texture(std::make_unique(m_texture_size)), - m_texmask(std::make_unique(m_texmask_size)) +gaelco3d_state::gaelco3d_renderer::gaelco3d_renderer(gaelco3d_state &state) : + poly_manager(state.machine()), + m_state(state), + m_screenbits(state.m_screen->width(), state.m_screen->height()), + m_zbuffer(state.m_screen->width(), state.m_screen->height()), + m_polygons(0), + m_texture_size(state.memregion("texture")->bytes()), + m_texmask_size(state.memregion("texmask")->bytes() * 8), + m_texture(std::make_unique(m_texture_size)), + m_texmask(std::make_unique(m_texmask_size)) { state.machine().save().save_item(NAME(m_screenbits)); state.machine().save().save_item(NAME(m_zbuffer)); /* first expand the pixel data */ - uint8_t *src = state.memregion("gfx1")->base(); + uint8_t *src = state.memregion("texture")->base(); uint8_t *dst = m_texture.get(); for (int y = 0; y < m_texture_size/4096; y += 2) for (int x = 0; x < 4096; x += 2) { - dst[(y + 0) * 4096 + (x + 1)] = src[0*m_texture_size/4 + (y/2) * 2048 + (x/2)]; - dst[(y + 1) * 4096 + (x + 1)] = src[1*m_texture_size/4 + (y/2) * 2048 + (x/2)]; - dst[(y + 0) * 4096 + (x + 0)] = src[2*m_texture_size/4 + (y/2) * 2048 + (x/2)]; - dst[(y + 1) * 4096 + (x + 0)] = src[3*m_texture_size/4 + (y/2) * 2048 + (x/2)]; + dst[(y + 0) * 4096 + (x + 1)] = src[0 * m_texture_size / 4 + (y / 2) * 2048 + (x / 2)]; + dst[(y + 1) * 4096 + (x + 1)] = src[1 * m_texture_size / 4 + (y / 2) * 2048 + (x / 2)]; + dst[(y + 0) * 4096 + (x + 0)] = src[2 * m_texture_size / 4 + (y / 2) * 2048 + (x / 2)]; + dst[(y + 1) * 4096 + (x + 0)] = src[3 * m_texture_size / 4 + (y / 2) * 2048 + (x / 2)]; } /* then expand the mask data */ - src = state.memregion("gfx2")->base(); + src = state.memregion("texmask")->base(); dst = m_texmask.get(); for (int y = 0; y < m_texmask_size/4096; y++) for (int x = 0; x < 4096; x++) - dst[y * 4096 + x] = (src[(x / 1024) * (m_texmask_size/8/4) + (y * 1024 + x % 1024) / 8] >> (x % 8)) & 1; + dst[y * 4096 + x] = (src[(x / 1024) * (m_texmask_size / 8 / 4) + (y * 1024 + x % 1024) / 8] >> (x % 8)) & 1; } @@ -112,23 +114,21 @@ void gaelco3d_state::video_start() void gaelco3d_state::gaelco3d_renderer::render_poly(screen_device &screen, uint32_t *polydata) { - float midx = screen.width() / 2; - float midy = screen.height() / 2; - float z0 = tms3203x_device::fp_to_float(polydata[0]); - float voz_dy = tms3203x_device::fp_to_float(polydata[1]) * 256.0f; - float voz_dx = tms3203x_device::fp_to_float(polydata[2]) * 256.0f; - float ooz_dy = tms3203x_device::fp_to_float(polydata[3]); - float ooz_dx = tms3203x_device::fp_to_float(polydata[4]); - float uoz_dy = tms3203x_device::fp_to_float(polydata[5]) * 256.0f; - float uoz_dx = tms3203x_device::fp_to_float(polydata[6]) * 256.0f; - float voz_base = tms3203x_device::fp_to_float(polydata[7]) * 256.0f - midx * voz_dx - midy * voz_dy; - float ooz_base = tms3203x_device::fp_to_float(polydata[8]) - midx * ooz_dx - midy * ooz_dy; - float uoz_base = tms3203x_device::fp_to_float(polydata[9]) * 256.0f - midx * uoz_dx - midy * uoz_dy; + float const midx = screen.width() / 2; + float const midy = screen.height() / 2; + float const z0 = tms3203x_device::fp_to_float(polydata[0]); + float const voz_dy = tms3203x_device::fp_to_float(polydata[1]) * 256.0f; + float const voz_dx = tms3203x_device::fp_to_float(polydata[2]) * 256.0f; + float const ooz_dy = tms3203x_device::fp_to_float(polydata[3]); + float const ooz_dx = tms3203x_device::fp_to_float(polydata[4]); + float const uoz_dy = tms3203x_device::fp_to_float(polydata[5]) * 256.0f; + float const uoz_dx = tms3203x_device::fp_to_float(polydata[6]) * 256.0f; + float const voz_base = tms3203x_device::fp_to_float(polydata[7]) * 256.0f - midx * voz_dx - midy * voz_dy; + float const ooz_base = tms3203x_device::fp_to_float(polydata[8]) - midx * ooz_dx - midy * ooz_dy; + float const uoz_base = tms3203x_device::fp_to_float(polydata[9]) * 256.0f - midx * uoz_dx - midy * uoz_dy; gaelco3d_object_data &object = object_data().next(); - int color = (polydata[10] & 0x7f) << 8; + int const color = (polydata[10] & 0x7f) << 8; vertex_t vert[MAX_VERTICES]; - uint32_t data; - int vertnum; if (LOG_POLYGONS) { @@ -169,7 +169,8 @@ void gaelco3d_state::gaelco3d_renderer::render_poly(screen_device &screen, uint3 object.z0 = z0; /* extract vertices */ - data = 0; + uint32_t data = 0; + int vertnum; for (vertnum = 0; vertnum < std::size(vert) && !IS_POLYEND(data); vertnum++) { /* extract vertex data */ @@ -203,25 +204,24 @@ void gaelco3d_state::gaelco3d_renderer::render_poly(screen_device &screen, uint3 void gaelco3d_state::gaelco3d_renderer::render_noz_noperspective(int32_t scanline, const extent_t &extent, const gaelco3d_object_data &object, int threadid) { - float zbase = recip_approx(object.ooz_base); - float uoz_step = object.uoz_dx * zbase; - float voz_step = object.voz_dx * zbase; - int zbufval = (int)(-object.z0 * zbase); - offs_t endmask = m_texture_size - 1; - const rgb_t *palsource = m_state.m_palette.get() + object.color; - uint32_t tex = object.tex; - uint16_t *dest = &m_screenbits.pix(scanline); - uint16_t *zbuf = &m_zbuffer.pix(scanline); - int startx = extent.startx; + float const zbase = recip_approx(object.ooz_base); + float const uoz_step = object.uoz_dx * zbase; + float const voz_step = object.voz_dx * zbase; + int const zbufval = (int)(-object.z0 * zbase); + offs_t const endmask = m_texture_size - 1; + const rgb_t *const palsource = m_state.m_palette.get() + object.color; + uint32_t const tex = object.tex; + uint16_t *const dest = &m_screenbits.pix(scanline); + uint16_t *const zbuf = &m_zbuffer.pix(scanline); + int const startx = extent.startx; float uoz = (object.uoz_base + scanline * object.uoz_dy + startx * object.uoz_dx) * zbase; float voz = (object.voz_base + scanline * object.voz_dy + startx * object.voz_dx) * zbase; - int x; - for (x = startx; x < extent.stopx; x++) + for (int x = startx; x < extent.stopx; x++) { - int u = (int)uoz; - int v = (int)voz; - int pixeloffs = (tex + (v >> 8) * 4096 + (u >> 8)) & endmask; + int const u = (int)uoz; + int const v = (int)voz; + int const pixeloffs = (tex + (v >> 8) * 4096 + (u >> 8)) & endmask; if (pixeloffs >= m_texmask_size || !m_texmask[pixeloffs]) { uint32_t rgb00 = palsource[m_texture[pixeloffs]]; @@ -242,33 +242,32 @@ void gaelco3d_state::gaelco3d_renderer::render_noz_noperspective(int32_t scanlin void gaelco3d_state::gaelco3d_renderer::render_normal(int32_t scanline, const extent_t &extent, const gaelco3d_object_data &object, int threadid) { - float ooz_dx = object.ooz_dx; - float uoz_dx = object.uoz_dx; - float voz_dx = object.voz_dx; - offs_t endmask = m_texture_size - 1; - const rgb_t *palsource = m_state.m_palette.get() + object.color; - uint32_t tex = object.tex; - float z0 = object.z0; - uint16_t *dest = &m_screenbits.pix(scanline); - uint16_t *zbuf = &m_zbuffer.pix(scanline); - int startx = extent.startx; + float const ooz_dx = object.ooz_dx; + float const uoz_dx = object.uoz_dx; + float const voz_dx = object.voz_dx; + offs_t const endmask = m_texture_size - 1; + const rgb_t *const palsource = m_state.m_palette.get() + object.color; + uint32_t const tex = object.tex; + float const z0 = object.z0; + uint16_t *const dest = &m_screenbits.pix(scanline); + uint16_t *const zbuf = &m_zbuffer.pix(scanline); + int const startx = extent.startx; float ooz = object.ooz_base + scanline * object.ooz_dy + startx * ooz_dx; float uoz = object.uoz_base + scanline * object.uoz_dy + startx * uoz_dx; float voz = object.voz_base + scanline * object.voz_dy + startx * voz_dx; - int x; - for (x = startx; x < extent.stopx; x++) + for (int x = startx; x < extent.stopx; x++) { if (ooz > 0) { /* compute Z and check the Z buffer value first */ - float z = recip_approx(ooz); + float const z = recip_approx(ooz); int zbufval = (int)(z0 * z); if (zbufval < zbuf[x]) { - int u = (int)(uoz * z); - int v = (int)(voz * z); - int pixeloffs = (tex + (v >> 8) * 4096 + (u >> 8)) & endmask; + int const u = (int)(uoz * z); + int const v = (int)(voz * z); + int const pixeloffs = (tex + (v >> 8) * 4096 + (u >> 8)) & endmask; if (pixeloffs >= m_texmask_size || !m_texmask[pixeloffs]) { uint32_t rgb00 = palsource[m_texture[pixeloffs]]; @@ -292,33 +291,32 @@ void gaelco3d_state::gaelco3d_renderer::render_normal(int32_t scanline, const ex void gaelco3d_state::gaelco3d_renderer::render_alphablend(int32_t scanline, const extent_t &extent, const gaelco3d_object_data &object, int threadid) { - float ooz_dx = object.ooz_dx; - float uoz_dx = object.uoz_dx; - float voz_dx = object.voz_dx; - offs_t endmask = m_texture_size - 1; - const rgb_t *palsource = m_state.m_palette.get() + object.color; - uint32_t tex = object.tex; - float z0 = object.z0; - uint16_t *dest = &m_screenbits.pix(scanline); - uint16_t *zbuf = &m_zbuffer.pix(scanline); - int startx = extent.startx; + float const ooz_dx = object.ooz_dx; + float const uoz_dx = object.uoz_dx; + float const voz_dx = object.voz_dx; + offs_t const endmask = m_texture_size - 1; + const rgb_t *const palsource = m_state.m_palette.get() + object.color; + uint32_t const tex = object.tex; + float const z0 = object.z0; + uint16_t *const dest = &m_screenbits.pix(scanline); + uint16_t *const zbuf = &m_zbuffer.pix(scanline); + int const startx = extent.startx; float ooz = object.ooz_base + object.ooz_dy * scanline + startx * ooz_dx; float uoz = object.uoz_base + object.uoz_dy * scanline + startx * uoz_dx; float voz = object.voz_base + object.voz_dy * scanline + startx * voz_dx; - int x; - for (x = startx; x < extent.stopx; x++) + for (int x = startx; x < extent.stopx; x++) { if (ooz > 0) { /* compute Z and check the Z buffer value first */ - float z = recip_approx(ooz); - int zbufval = (int)(z0 * z); + float const z = recip_approx(ooz); + int const zbufval = (int)(z0 * z); if (zbufval < zbuf[x]) { - int u = (int)(uoz * z); - int v = (int)(voz * z); - int pixeloffs = (tex + (v >> 8) * 4096 + (u >> 8)) & endmask; + int const u = (int)(uoz * z); + int const v = (int)(voz * z); + int const pixeloffs = (tex + (v >> 8) * 4096 + (u >> 8)) & endmask; if (pixeloffs >= m_texmask_size || !m_texmask[pixeloffs]) { uint32_t rgb00 = palsource[m_texture[pixeloffs]]; @@ -353,7 +351,7 @@ void gaelco3d_state::gaelco3d_render(screen_device &screen) #if DISPLAY_STATS { - int scan = screen.vpos(); + int const scan = screen.vpos(); popmessage("Polys = %4d Timeleft = %3d", m_poly->polygons(), (m_lastscan < scan) ? (scan - m_lastscan) : (scan + (m_lastscan - screen.visible_area().max_y))); } #endif @@ -370,12 +368,12 @@ void gaelco3d_state::gaelco3d_render(screen_device &screen) * *************************************/ -void gaelco3d_state::gaelco3d_render_w(uint32_t data) +void gaelco3d_state::render_w(uint32_t data) { /* append the data to our buffer */ m_polydata_buffer[m_polydata_count++] = data; if (m_polydata_count >= MAX_POLYDATA) - fatalerror("Out of polygon buffer &space!\n"); + fatalerror("Out of polygon buffer space!\n"); /* if we've accumulated a completed poly set of data, queue it */ if (!machine().video().skip_this_frame()) @@ -401,7 +399,7 @@ void gaelco3d_state::gaelco3d_render_w(uint32_t data) * *************************************/ -void gaelco3d_state::gaelco3d_paletteram_w(offs_t offset, uint16_t data, uint16_t mem_mask) +void gaelco3d_state::paletteram_w(offs_t offset, uint16_t data, uint16_t mem_mask) { m_poly->wait("Palette change"); COMBINE_DATA(&m_paletteram16[offset]); @@ -409,12 +407,12 @@ void gaelco3d_state::gaelco3d_paletteram_w(offs_t offset, uint16_t data, uint16_ } -void gaelco3d_state::gaelco3d_paletteram_020_w(offs_t offset, uint32_t data, uint32_t mem_mask) +void gaelco3d_state::paletteram_020_w(offs_t offset, uint32_t data, uint32_t mem_mask) { m_poly->wait("Palette change"); COMBINE_DATA(&m_paletteram32[offset]); - m_palette[offset*2+0] = ((m_paletteram32[offset] & 0x7fe00000) >> 10) | ((m_paletteram32[offset] & 0x1f0000) >> 16); - m_palette[offset*2+1] = ((m_paletteram32[offset] & 0x7fe0) << 6) | (m_paletteram32[offset] & 0x1f); + m_palette[offset * 2 + 0] = ((m_paletteram32[offset] & 0x7fe00000) >> 10) | ((m_paletteram32[offset] & 0x1f0000) >> 16); + m_palette[offset * 2 + 1] = ((m_paletteram32[offset] & 0x7fe0) << 6) | (m_paletteram32[offset] & 0x1f); } @@ -427,7 +425,7 @@ void gaelco3d_state::gaelco3d_paletteram_020_w(offs_t offset, uint32_t data, uin uint32_t gaelco3d_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - int ret; + int ret = 0; /* if (DISPLAY_TEXTURE && (machine().input().code_pressed(KEYCODE_Z) || machine().input().code_pressed(KEYCODE_X))) @@ -470,7 +468,7 @@ uint32_t gaelco3d_state::screen_update(screen_device &screen, bitmap_ind16 &bitm { if (m_video_changed) copybitmap(bitmap, m_poly->screenbits(), 0,1, 0,0, cliprect); - ret = m_video_changed; + ret = m_video_changed ? 1 : 0; m_video_changed = false; } diff --git a/src/mame/gaelco/gaelco_v.cpp b/src/mame/gaelco/gaelco_v.cpp index c2498b15bb075..f111aea57c064 100644 --- a/src/mame/gaelco/gaelco_v.cpp +++ b/src/mame/gaelco/gaelco_v.cpp @@ -46,9 +46,9 @@ template TILE_GET_INFO_MEMBER(gaelco_state::get_tile_info) { - int data = m_videoram[(Layer * 0x1000 / 2) + (tile_index << 1)]; - int data2 = m_videoram[(Layer * 0x1000 / 2) + (tile_index << 1) + 1]; - int code = ((data & 0xfffc) >> 2); + int const data = m_videoram[(Layer * 0x1000 / 2) + (tile_index << 1)]; + int const data2 = m_videoram[(Layer * 0x1000 / 2) + (tile_index << 1) + 1]; + int const code = ((data & 0xfffc) >> 2); tileinfo.category = (data2 >> 6) & 0x03; @@ -63,7 +63,7 @@ TILE_GET_INFO_MEMBER(gaelco_state::get_tile_info) void gaelco_state::vram_w(offs_t offset, u16 data, u16 mem_mask) { - uint16_t old = m_videoram[offset]; + u16 const old = m_videoram[offset]; COMBINE_DATA(&m_videoram[offset]); if (old != m_videoram[offset]) m_tilemap[offset >> 11]->mark_tile_dirty(((offset << 1) & 0x0fff) >> 2); @@ -84,10 +84,10 @@ VIDEO_START_MEMBER(gaelco_state,bigkarnk) m_tilemap[1]->set_transmask(0, 0xff01, 0x00ff); // pens 1-7 opaque, pens 0, 8-15 transparent } -VIDEO_START_MEMBER(gaelco_state,squash) +VIDEO_START_MEMBER(squash_state,squash) { - m_tilemap[0] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(gaelco_state::get_tile_info<0>)), TILEMAP_SCAN_ROWS, 16, 16, 32, 32); - m_tilemap[1] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(gaelco_state::get_tile_info<1>)), TILEMAP_SCAN_ROWS, 16, 16, 32, 32); + m_tilemap[0] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(squash_state::get_tile_info<0>)), TILEMAP_SCAN_ROWS, 16, 16, 32, 32); + m_tilemap[1] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(squash_state::get_tile_info<1>)), TILEMAP_SCAN_ROWS, 16, 16, 32, 32); m_tilemap[0]->set_transmask(0, 0xff01, 0x00ff); // pens 1-7 opaque, pens 0, 8-15 transparent m_tilemap[1]->set_transmask(0, 0xff01, 0x00ff); // pens 1-7 opaque, pens 0, 8-15 transparent @@ -133,24 +133,22 @@ VIDEO_START_MEMBER(gaelco_state,maniacsq) void gaelco_state::draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect ) { - int i, x, y, ex, ey; gfx_element *gfx = m_gfxdecode->gfx(0); static const int x_offset[2] = {0x0,0x2}; static const int y_offset[2] = {0x0,0x1}; - for (i = 0x800 - 4 - 1; i >= 3; i -= 4) + for (int i = 0x800 - 4 - 1; i >= 3; i -= 4) { - int sx = m_spriteram[i + 2] & 0x01ff; - int sy = (240 - (m_spriteram[i] & 0x00ff)) & 0x00ff; + int const sx = m_spriteram[i + 2] & 0x01ff; + int const sy = (240 - (m_spriteram[i] & 0x00ff)) & 0x00ff; int number = m_spriteram[i + 3]; - int color = (m_spriteram[i + 2] & 0x7e00) >> 9; - int attr = (m_spriteram[i] & 0xfe00) >> 9; + int const color = (m_spriteram[i + 2] & 0x7e00) >> 9; + int const attr = (m_spriteram[i] & 0xfe00) >> 9; int priority = (m_spriteram[i] & 0x3000) >> 12; - int xflip = attr & 0x20; - int yflip = attr & 0x40; - int spr_size, pri_mask; + bool const xflip = BIT(attr, 5); + bool const yflip = BIT(attr, 6); /* palettes 0x38-0x3f are used for high priority sprites in Big Karnak the same logic in Squash causes player sprites to be drawn over the @@ -161,6 +159,7 @@ void gaelco_state::draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, co if (color >= m_sprite_palette_force_high) priority = 4; + u32 pri_mask = 0; switch (priority) { case 0: pri_mask = 0xff00; break; // above everything? @@ -171,6 +170,7 @@ void gaelco_state::draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, co case 4: pri_mask = 0; break; } + int spr_size; if (attr & 0x04) spr_size = 1; else @@ -179,17 +179,19 @@ void gaelco_state::draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, co number &= (~3); } - for (y = 0; y < spr_size; y++) + for (int y = 0; y < spr_size; y++) { - for (x = 0; x < spr_size; x++) + for (int x = 0; x < spr_size; x++) { - ex = xflip ? (spr_size - 1 - x) : x; - ey = yflip ? (spr_size - 1 - y) : y; - - gfx->prio_transpen(bitmap,cliprect,number + x_offset[ex] + y_offset[ey], - color,xflip,yflip, - sx-0x0f+x*8,sy+y*8, - screen.priority(),pri_mask,0); + int ex = xflip ? (spr_size - 1 - x) : x; + int ey = yflip ? (spr_size - 1 - y) : y; + + gfx->prio_transpen(bitmap, cliprect, + number + x_offset[ex] + y_offset[ey], + color, + xflip, yflip, + sx - 0x0f + x * 8, sy + y * 8, + screen.priority(), pri_mask, 0); } } } @@ -201,7 +203,7 @@ void gaelco_state::draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, co ***************************************************************************/ -uint32_t gaelco_state::screen_update_maniacsq(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +u32 gaelco_state::screen_update_maniacsq(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { /* set scroll registers */ m_tilemap[0]->set_scrolly(0, m_vregs[0]); @@ -228,7 +230,7 @@ uint32_t gaelco_state::screen_update_maniacsq(screen_device &screen, bitmap_ind1 return 0; } -uint32_t gaelco_state::screen_update_thoop(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +u32 squash_state::screen_update_thoop(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { /* set scroll registers */ m_tilemap[0]->set_scrolly(0, m_vregs[0]); @@ -272,7 +274,7 @@ uint32_t gaelco_state::screen_update_thoop(screen_device &screen, bitmap_ind16 & return 0; } -uint32_t gaelco_state::screen_update_bigkarnk(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +u32 bigkarnk_state::screen_update_bigkarnk(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { /* set scroll registers */ m_tilemap[0]->set_scrolly(0, m_vregs[0]); diff --git a/src/mame/gaelco/goldart.cpp b/src/mame/gaelco/goldart.cpp index 2fad6f64ed95d..455fcfc82d5ad 100644 --- a/src/mame/gaelco/goldart.cpp +++ b/src/mame/gaelco/goldart.cpp @@ -29,7 +29,7 @@ JP5 = Video out (6 pins) JP6 = Buttons (15 pins) - XATL = 32.000 MHz + XTAL = 32.000 MHz U7 = Oki U10 = Unpopulated socket for Max 202 @@ -55,9 +55,10 @@ class goldart_state : public driver_device public: goldart_state(const machine_config& mconfig, device_type type, const char* tag) : driver_device(mconfig, type, tag), - m_mcu(*this, "mcu"), + m_maincpu(*this, "maincpu"), m_palette(*this, "palette"), - m_data(*this, "data") + m_data(*this, "data"), + m_io_in0(*this, "IN0") { } void goldart(machine_config& config); @@ -68,37 +69,38 @@ class goldart_state : public driver_device virtual void video_start() override ATTR_COLD; private: - required_device m_mcu; + required_device m_maincpu; required_device m_palette; required_region_ptr m_data; + required_ioport m_io_in0; - void mcu_port1_w(uint8_t data); - uint8_t mcu_port1_r(); + void port1_w(uint8_t data); + uint8_t port1_r(); + uint32_t screen_update(screen_device& screen, bitmap_ind16& bitmap, const rectangle& cliprect); + void main_prgmap(address_map &map) ATTR_COLD; + void main_datamap(address_map &map) ATTR_COLD; - uint32_t screen_update_goldart(screen_device& screen, bitmap_ind16& bitmap, const rectangle& cliprect); - void dallas_rom(address_map &map) ATTR_COLD; - void dallas_ram(address_map &map) ATTR_COLD; - - uint8_t m_ram[0x10000]; - uint8_t m_ram2[0x10000]; + std::unique_ptr m_ram; + std::unique_ptr m_ram2; uint8_t m_port1 = 0; - uint8_t hostmem_r(offs_t offset); - void hostmem_w(offs_t offset, uint8_t data); + uint8_t mem_r(offs_t offset); + void mem_w(offs_t offset, uint8_t data); }; -void goldart_state::mcu_port1_w(uint8_t data) +void goldart_state::port1_w(uint8_t data) { - logerror("%s: mcu_port1_w %02x\n", machine().describe_context(), data); + logerror("%s: port1_w %02x\n", machine().describe_context(), data); m_port1 = data; } -uint8_t goldart_state::mcu_port1_r() +uint8_t goldart_state::port1_r() { - uint8_t ret = m_port1; - logerror("%s: mcu_port1_r %02x\n", machine().describe_context(), ret); + uint8_t const ret = m_port1; + if (!machine().side_effects_disabled()) + logerror("%s: port1_r %02x\n", machine().describe_context(), ret); return ret; } @@ -106,28 +108,28 @@ void goldart_state::video_start() { } -uint32_t goldart_state::screen_update_goldart(screen_device& screen, bitmap_ind16& bitmap, const rectangle& cliprect) +uint32_t goldart_state::screen_update(screen_device& screen, bitmap_ind16& bitmap, const rectangle& cliprect) { - int count = 0; - for (int y = 0; y < 288; y++) + for (int y = cliprect.min_y; y <= cliprect.max_y; y++) { - for (int x = 0; x < 192; x++) + int count = (y * 192) + (cliprect.min_x >> 1); + uint16_t *const dstptr_bitmap = &bitmap.pix(y); + for (int x = cliprect.min_x & ~1; x <= cliprect.max_x; x += 2) { - uint16_t *const dstptr_bitmap = &bitmap.pix(y); uint8_t const data = m_ram[count]; uint8_t const data2 = m_ram2[count]; count++; - dstptr_bitmap[x*2] = ((data&0xf0)>>4) | (data2 & 0xf0); - dstptr_bitmap[(x*2)+1] = (data&0x0f) | ((data2 & 0x0f)<<4); + dstptr_bitmap[x] = ((data & 0xf0) >> 4) | (data2 & 0xf0); + dstptr_bitmap[x + 1] = (data & 0x0f) | ((data2 & 0x0f) << 4); } } return 0; } -uint8_t goldart_state::hostmem_r(offs_t offset) +uint8_t goldart_state::mem_r(offs_t offset) { // must be some control bits (or DS5002FP memory access isn't correct) as registers map over ROM/RAM with no obvious way to select at the moment // and we need to be able to access full range of each ROM bank at least @@ -135,60 +137,61 @@ uint8_t goldart_state::hostmem_r(offs_t offset) // sometimes bit 0x40 is set in port1, but it doesn't seem a simple RAM/ROM select // also bit 0x20 has been seen set too - int bank = m_port1 & 0x07; + int const bank = m_port1 & 0x07; uint8_t ret = 0x00; ret = m_data[(bank * 0x10000) + offset]; - logerror("%s: hostmem_r %02x:%04x: %02x (from ROM?)\n", machine().describe_context(), m_port1, offset, ret); + if (!machine().side_effects_disabled()) + logerror("%s: mem_r %02x:%04x: %02x (from ROM?)\n", machine().describe_context(), m_port1, offset, ret); if (offset == 0xfff3) { - // logerror("%s: hostmem_r %04x: %02x (from ROM?) %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02 bank %02xx\n", machine().describe_context(), offset, ret, m_ram[0xfff0], m_ram[0xfff1], m_ram[0xfff2], m_ram[0xfff3], m_ram[0xfff4], m_ram[0xfff5], m_ram[0xfff6], m_ram[0xfff7], m_ram[0xfff8], m_ram[0xfff9], m_ram[0xfffa], m_ram[0xfffb], m_ram[0xfffc], m_ram[0xfffd], m_ram[0xfffe], m_ram[0xffff], m_port1); + // logerror("%s: mem_r %04x: %02x (from ROM?) %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02 bank %02xx\n", machine().describe_context(), offset, ret, m_ram[0xfff0], m_ram[0xfff1], m_ram[0xfff2], m_ram[0xfff3], m_ram[0xfff4], m_ram[0xfff5], m_ram[0xfff6], m_ram[0xfff7], m_ram[0xfff8], m_ram[0xfff9], m_ram[0xfffa], m_ram[0xfffb], m_ram[0xfffc], m_ram[0xfffd], m_ram[0xfffe], m_ram[0xffff], m_port1); return machine().rand(); } if (offset == 0xfff4) { - // logerror("%s: hostmem_r %04x: %02x (from ROM?) %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02 bank %02xx\n", machine().describe_context(), offset, ret, m_ram[0xfff0], m_ram[0xfff1], m_ram[0xfff2], m_ram[0xfff3], m_ram[0xfff4], m_ram[0xfff5], m_ram[0xfff6], m_ram[0xfff7], m_ram[0xfff8], m_ram[0xfff9], m_ram[0xfffa], m_ram[0xfffb], m_ram[0xfffc], m_ram[0xfffd], m_ram[0xfffe], m_ram[0xffff], m_port1); + // logerror("%s: mem_r %04x: %02x (from ROM?) %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02 bank %02xx\n", machine().describe_context(), offset, ret, m_ram[0xfff0], m_ram[0xfff1], m_ram[0xfff2], m_ram[0xfff3], m_ram[0xfff4], m_ram[0xfff5], m_ram[0xfff6], m_ram[0xfff7], m_ram[0xfff8], m_ram[0xfff9], m_ram[0xfffa], m_ram[0xfffb], m_ram[0xfffc], m_ram[0xfffd], m_ram[0xfffe], m_ram[0xffff], m_port1); return machine().rand(); } if (offset == 0xfff8) { - // logerror("%s: hostmem_r %04x: %02x (from ROM?) %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02 bank %02xx\n", machine().describe_context(), offset, ret, m_ram[0xfff0], m_ram[0xfff1], m_ram[0xfff2], m_ram[0xfff3], m_ram[0xfff4], m_ram[0xfff5], m_ram[0xfff6], m_ram[0xfff7], m_ram[0xfff8], m_ram[0xfff9], m_ram[0xfffa], m_ram[0xfffb], m_ram[0xfffc], m_ram[0xfffd], m_ram[0xfffe], m_ram[0xffff], m_port1); + // logerror("%s: mem_r %04x: %02x (from ROM?) %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02 bank %02xx\n", machine().describe_context(), offset, ret, m_ram[0xfff0], m_ram[0xfff1], m_ram[0xfff2], m_ram[0xfff3], m_ram[0xfff4], m_ram[0xfff5], m_ram[0xfff6], m_ram[0xfff7], m_ram[0xfff8], m_ram[0xfff9], m_ram[0xfffa], m_ram[0xfffb], m_ram[0xfffc], m_ram[0xfffd], m_ram[0xfffe], m_ram[0xffff], m_port1); return machine().rand(); } if (offset == 0xfffb) { - // logerror("%s: hostmem_r %04x: %02x (from ROM?) %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02 bank %02xx\n", machine().describe_context(), offset, ret, m_ram[0xfff0], m_ram[0xfff1], m_ram[0xfff2], m_ram[0xfff3], m_ram[0xfff4], m_ram[0xfff5], m_ram[0xfff6], m_ram[0xfff7], m_ram[0xfff8], m_ram[0xfff9], m_ram[0xfffa], m_ram[0xfffb], m_ram[0xfffc], m_ram[0xfffd], m_ram[0xfffe], m_ram[0xffff], m_port1); + // logerror("%s: mem_r %04x: %02x (from ROM?) %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02 bank %02xx\n", machine().describe_context(), offset, ret, m_ram[0xfff0], m_ram[0xfff1], m_ram[0xfff2], m_ram[0xfff3], m_ram[0xfff4], m_ram[0xfff5], m_ram[0xfff6], m_ram[0xfff7], m_ram[0xfff8], m_ram[0xfff9], m_ram[0xfffa], m_ram[0xfffb], m_ram[0xfffc], m_ram[0xfffd], m_ram[0xfffe], m_ram[0xffff], m_port1); return machine().rand(); } if (offset == 0xfffc) { - // logerror("%s: hostmem_r %04x: %02x (from ROM?) %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02 bank %02xx\n", machine().describe_context(), offset, ret, m_ram[0xfff0], m_ram[0xfff1], m_ram[0xfff2], m_ram[0xfff3], m_ram[0xfff4], m_ram[0xfff5], m_ram[0xfff6], m_ram[0xfff7], m_ram[0xfff8], m_ram[0xfff9], m_ram[0xfffa], m_ram[0xfffb], m_ram[0xfffc], m_ram[0xfffd], m_ram[0xfffe], m_ram[0xffff], m_port1); + // logerror("%s: mem_r %04x: %02x (from ROM?) %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02 bank %02xx\n", machine().describe_context(), offset, ret, m_ram[0xfff0], m_ram[0xfff1], m_ram[0xfff2], m_ram[0xfff3], m_ram[0xfff4], m_ram[0xfff5], m_ram[0xfff6], m_ram[0xfff7], m_ram[0xfff8], m_ram[0xfff9], m_ram[0xfffa], m_ram[0xfffb], m_ram[0xfffc], m_ram[0xfffd], m_ram[0xfffe], m_ram[0xffff], m_port1); // oki? return machine().rand(); } if (offset == 0xfffd) { - // logerror("%s: hostmem_r %04x: %02x (from ROM?) %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02 bank %02xx\n", machine().describe_context(), offset, ret, m_ram[0xfff0], m_ram[0xfff1], m_ram[0xfff2], m_ram[0xfff3], m_ram[0xfff4], m_ram[0xfff5], m_ram[0xfff6], m_ram[0xfff7], m_ram[0xfff8], m_ram[0xfff9], m_ram[0xfffa], m_ram[0xfffb], m_ram[0xfffc], m_ram[0xfffd], m_ram[0xfffe], m_ram[0xffff], m_port1); + // logerror("%s: mem_r %04x: %02x (from ROM?) %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02 bank %02xx\n", machine().describe_context(), offset, ret, m_ram[0xfff0], m_ram[0xfff1], m_ram[0xfff2], m_ram[0xfff3], m_ram[0xfff4], m_ram[0xfff5], m_ram[0xfff6], m_ram[0xfff7], m_ram[0xfff8], m_ram[0xfff9], m_ram[0xfffa], m_ram[0xfffb], m_ram[0xfffc], m_ram[0xfffd], m_ram[0xfffe], m_ram[0xffff], m_port1); // oki? return machine().rand(); } if (offset == 0xfffe) { - // logerror("%s: hostmem_r %04x: %02x (from ROM?) %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02 bank %02xx\n", machine().describe_context(), offset, ret, m_ram[0xfff0], m_ram[0xfff1], m_ram[0xfff2], m_ram[0xfff3], m_ram[0xfff4], m_ram[0xfff5], m_ram[0xfff6], m_ram[0xfff7], m_ram[0xfff8], m_ram[0xfff9], m_ram[0xfffa], m_ram[0xfffb], m_ram[0xfffc], m_ram[0xfffd], m_ram[0xfffe], m_ram[0xffff], m_port1); - return ioport("IN0")->read(); + // logerror("%s: mem_r %04x: %02x (from ROM?) %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02 bank %02xx\n", machine().describe_context(), offset, ret, m_ram[0xfff0], m_ram[0xfff1], m_ram[0xfff2], m_ram[0xfff3], m_ram[0xfff4], m_ram[0xfff5], m_ram[0xfff6], m_ram[0xfff7], m_ram[0xfff8], m_ram[0xfff9], m_ram[0xfffa], m_ram[0xfffb], m_ram[0xfffc], m_ram[0xfffd], m_ram[0xfffe], m_ram[0xffff], m_port1); + return m_io_in0->read(); } return ret; } -void goldart_state::hostmem_w(offs_t offset, uint8_t data) +void goldart_state::mem_w(offs_t offset, uint8_t data) { // registers seem to control write modes? (palette select bits, overwrite / transparent drawing etc.) @@ -230,11 +233,11 @@ void goldart_state::hostmem_w(offs_t offset, uint8_t data) // fe00 - ffdf is the palette (15 palettes) m_ram[offset] = data; - int index = (offset & 0x1fe)>>1; + int const index = (offset & 0x1fe) >> 1; - uint16_t pal = (m_ram[(offset&0xfffe)] << 8) | (m_ram[(offset&0xfffe)+1]); + uint16_t const pal = (m_ram[(offset & 0xfffe)] << 8) | (m_ram[(offset & 0xfffe) | 1]); - m_palette->set_pen_color(index, ((pal >> 10) & 0x1f)<<3, ((pal >> 5) & 0x1f)<<3, (pal & 0x1f)<<3); + m_palette->set_pen_color(index, ((pal >> 10) & 0x1f) << 3, ((pal >> 5) & 0x1f) << 3, (pal & 0x1f) << 3); } else { @@ -254,28 +257,26 @@ void goldart_state::hostmem_w(offs_t offset, uint8_t data) // fffe : xxxx ---- x = pen value to be copied to other ram area on pixel wirtes } - if (offset<0xd800) - logerror("%s: hostmem_w %04x: %02x (to VRAM?) %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x bank %02x\n", machine().describe_context(), offset, data, m_ram[0xfff0], m_ram[0xfff1], m_ram[0xfff2], m_ram[0xfff3], m_ram[0xfff4], m_ram[0xfff5], m_ram[0xfff6], m_ram[0xfff7], m_ram[0xfff8], m_ram[0xfff9], m_ram[0xfffa], m_ram[0xfffb], m_ram[0xfffc], m_ram[0xfffd], m_ram[0xfffe], m_ram[0xffff], m_port1); + logerror("%s: mem_w %04x: %02x (to VRAM?) %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x bank %02x\n", machine().describe_context(), offset, data, m_ram[0xfff0], m_ram[0xfff1], m_ram[0xfff2], m_ram[0xfff3], m_ram[0xfff4], m_ram[0xfff5], m_ram[0xfff6], m_ram[0xfff7], m_ram[0xfff8], m_ram[0xfff9], m_ram[0xfffa], m_ram[0xfffb], m_ram[0xfffc], m_ram[0xfffd], m_ram[0xfffe], m_ram[0xffff], m_port1); else if (offset<0xfe00) - logerror("%s: hostmem_w %04x: %02x (to non-screen VRAM?) %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x bank %02x\n", machine().describe_context(), offset, data, m_ram[0xfff0], m_ram[0xfff1], m_ram[0xfff2], m_ram[0xfff3], m_ram[0xfff4], m_ram[0xfff5], m_ram[0xfff6], m_ram[0xfff7], m_ram[0xfff8], m_ram[0xfff9], m_ram[0xfffa], m_ram[0xfffb], m_ram[0xfffc], m_ram[0xfffd], m_ram[0xfffe], m_ram[0xffff], m_port1); + logerror("%s: mem_w %04x: %02x (to non-screen VRAM?) %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x bank %02x\n", machine().describe_context(), offset, data, m_ram[0xfff0], m_ram[0xfff1], m_ram[0xfff2], m_ram[0xfff3], m_ram[0xfff4], m_ram[0xfff5], m_ram[0xfff6], m_ram[0xfff7], m_ram[0xfff8], m_ram[0xfff9], m_ram[0xfffa], m_ram[0xfffb], m_ram[0xfffc], m_ram[0xfffd], m_ram[0xfffe], m_ram[0xffff], m_port1); else if (offset<0xffe0) - logerror("%s: hostmem_w %04x: %02x (to palette)\n", machine().describe_context(), offset, data); + logerror("%s: mem_w %04x: %02x (to palette)\n", machine().describe_context(), offset, data); else - logerror("%s: hostmem_w %04x: %02x (to REGS?)\n", machine().describe_context(), offset, data); - + logerror("%s: mem_w %04x: %02x (to REGS?)\n", machine().describe_context(), offset, data); } -void goldart_state::dallas_rom(address_map &map) +void goldart_state::main_prgmap(address_map &map) { map(0x00000, 0x07fff).readonly().share("sram"); } -void goldart_state::dallas_ram(address_map &map) +void goldart_state::main_datamap(address_map &map) { - map(0x00000, 0x0ffff).rw(FUNC(goldart_state::hostmem_r), FUNC(goldart_state::hostmem_w)); + map(0x00000, 0x0ffff).rw(FUNC(goldart_state::mem_r), FUNC(goldart_state::mem_w)); map(0x10000, 0x17fff).ram().share("sram"); } @@ -306,13 +307,14 @@ INPUT_PORTS_END void goldart_state::machine_start() { + m_ram = make_unique_clear(0x10000); + m_ram2 = make_unique_clear(0x10000); + save_item(NAME(m_port1)); - save_item(NAME(m_ram)); - save_item(NAME(m_ram2)); + save_pointer(NAME(m_ram), 0x10000); + save_pointer(NAME(m_ram2), 0x10000); m_port1 = 0; - std::fill(std::begin(m_ram), std::end(m_ram), 0); - std::fill(std::begin(m_ram2), std::end(m_ram2), 0); } void goldart_state::machine_reset() @@ -322,13 +324,13 @@ void goldart_state::machine_reset() void goldart_state::goldart(machine_config &config) { /* basic machine hardware */ - ds5002fp_device &mcu(DS5002FP(config, "mcu", 12000000)); - mcu.set_addrmap(AS_PROGRAM, &goldart_state::dallas_rom); - mcu.set_addrmap(AS_IO, &goldart_state::dallas_ram); - mcu.set_vblank_int("screen", FUNC(goldart_state::irq0_line_hold)); + ds5002fp_device &maincpu(DS5002FP(config, "maincpu", 32_MHz_XTAL / 2)); + maincpu.set_addrmap(AS_PROGRAM, &goldart_state::main_prgmap); + maincpu.set_addrmap(AS_IO, &goldart_state::main_datamap); + maincpu.set_vblank_int("screen", FUNC(goldart_state::irq0_line_hold)); // only uses port 1? - mcu.port_out_cb<1>().set(FUNC(goldart_state::mcu_port1_w)); - mcu.port_in_cb<1>().set(FUNC(goldart_state::mcu_port1_r)); + maincpu.port_out_cb<1>().set(FUNC(goldart_state::port1_w)); + maincpu.port_in_cb<1>().set(FUNC(goldart_state::port1_r)); NVRAM(config, "sram", nvram_device::DEFAULT_ALL_0); @@ -338,7 +340,7 @@ void goldart_state::goldart(machine_config &config) screen.set_vblank_time(ATTOSECONDS_IN_USEC(0)); screen.set_size(256*2, 512); screen.set_visarea(0, (192*2)-1, 0, 288-1); - screen.set_screen_update(FUNC(goldart_state::screen_update_goldart)); + screen.set_screen_update(FUNC(goldart_state::screen_update)); screen.set_palette("palette"); PALETTE(config, m_palette, palette_device::BLACK, 256); @@ -346,7 +348,7 @@ void goldart_state::goldart(machine_config &config) /* sound hardware */ SPEAKER(config, "mono").front_center(); - OKIM6295(config, "oki", 1056000, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); // clock frequency & pin 7 not verified + OKIM6295(config, "oki", 32_MHz_XTAL / 32, okim6295_device::PIN7_HIGH).add_route(ALL_OUTPUTS, "mono", 1.0); // clock frequency & pin 7 not verified } /* Different versions of the internal code exist (0x6000-0x6fff code is VERY different between them) @@ -364,7 +366,7 @@ ROM_START( goldart ) ROM_REGION( 0x8000, "sram", 0 ) /* DS5002FP code */ ROM_LOAD( "ds5002fp_sram.bin", 0x00000, 0x8000, BAD_DUMP CRC(cd2bf151) SHA1(6f601cef86493fc2db181c93b17949b982149b0e) ) - ROM_REGION( 0x100, "mcu:internal", ROMREGION_ERASE00 ) + ROM_REGION( 0x100, "maincpu:internal", ROMREGION_ERASE00 ) DS5002FP_SET_MON( 0x79 ) DS5002FP_SET_RPCTL( 0x00 ) DS5002FP_SET_CRCR( 0x80 ) @@ -380,7 +382,7 @@ ROM_START( goldartp ) ROM_REGION( 0x8000, "sram", 0 ) /* DS5002FP code */ ROM_LOAD( "ds5002fp_sram.bin", 0x00000, 0x8000, BAD_DUMP CRC(cd2bf151) SHA1(6f601cef86493fc2db181c93b17949b982149b0e) ) - ROM_REGION( 0x100, "mcu:internal", ROMREGION_ERASE00 ) + ROM_REGION( 0x100, "maincpu:internal", ROMREGION_ERASE00 ) DS5002FP_SET_MON( 0x79 ) DS5002FP_SET_RPCTL( 0x00 ) DS5002FP_SET_CRCR( 0x80 ) diff --git a/src/mame/galaxian/fastfred.cpp b/src/mame/galaxian/fastfred.cpp index 322c0b0c1de13..00cc25fb03cba 100644 --- a/src/mame/galaxian/fastfred.cpp +++ b/src/mame/galaxian/fastfred.cpp @@ -592,7 +592,7 @@ GFXDECODE_END static GFXDECODE_START( gfx_imago ) GFXDECODE_ENTRY( "gfx1", 0, gfx_8x8x3_planar, 0, 32 ) - GFXDECODE_ENTRY( nullptr, 0xb800, imago_spritelayout, 0, 32 ) + GFXDECODE_RAM( nullptr, 0xb800, imago_spritelayout, 0, 32 ) GFXDECODE_ENTRY( "gfx3", 0, gfx_8x8x3_planar, 0, 32 ) GFXDECODE_ENTRY( "gfx4", 0, gfx_8x8x1, 0x140, 1 ) GFXDECODE_END diff --git a/src/mame/gottlieb/gottlieb.cpp b/src/mame/gottlieb/gottlieb.cpp index 0555c12018580..d321e44683451 100644 --- a/src/mame/gottlieb/gottlieb.cpp +++ b/src/mame/gottlieb/gottlieb.cpp @@ -284,7 +284,6 @@ class gottlieb_state : public driver_device virtual void machine_start() override ATTR_COLD; virtual void machine_reset() override ATTR_COLD; virtual void video_start() override ATTR_COLD; - virtual void device_post_load() override { m_gfxdecode->gfx(0)->mark_all_dirty(); } private: void analog_reset_w(u8 data); diff --git a/src/mame/handheld/hh_sm510.cpp b/src/mame/handheld/hh_sm510.cpp index 226c6d7ab61c7..8e133d6de492f 100644 --- a/src/mame/handheld/hh_sm510.cpp +++ b/src/mame/handheld/hh_sm510.cpp @@ -11583,6 +11583,99 @@ ROM_END +/******************************************************************************* + + Tronica: Diver's Adventure (model DA-37), Clever Chicken (model CC-38V) + * PCB labels: DA-37 260383 32-541-1 (DA-37) + CC38V 210483 32-545-1 (CC-38V) + * Sharp SM510 labels (no decap): 0029 235D TRONICA (DA-37) + 0029 238C TRONICA (CC-38V) + * lcd screen with custom segments, 1-bit sound + + DA-37 and CC-38V are the exact same MCU, but with different graphics. The + player moves horizontally in DA-37 and vertically in CC-38V. + +*******************************************************************************/ + +class trdivadv_state : public hh_sm510_state +{ +public: + trdivadv_state(const machine_config &mconfig, device_type type, const char *tag) : + hh_sm510_state(mconfig, type, tag) + { } + + void trdivadv(machine_config &config); + void trclchick(machine_config &config); +}; + +// inputs + +static INPUT_PORTS_START( trdivadv ) + PORT_START("IN.0") // S1 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_CB(input_changed) PORT_16WAY + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_CB(input_changed) PORT_16WAY + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_CB(input_changed) PORT_16WAY + + PORT_START("IN.1") // S2 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SELECT ) PORT_CHANGED_CB(input_changed) PORT_NAME("Time") + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) PORT_CHANGED_CB(input_changed) PORT_NAME("Game B") + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 ) PORT_CHANGED_CB(input_changed) PORT_NAME("Game A") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SERVICE2 ) PORT_CHANGED_CB(input_changed) PORT_NAME("Alarm") + + PORT_START("B") + PORT_CONFNAME( 0x01, 0x01, "Invincibility (Cheat)") // factory test, unpopulated on PCB + PORT_CONFSETTING( 0x01, DEF_STR( Off ) ) + PORT_CONFSETTING( 0x00, DEF_STR( On ) ) + + PORT_START("ACL") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_CHANGED_CB(acl_button) PORT_NAME("ACL") +INPUT_PORTS_END + +static INPUT_PORTS_START( trclchick ) + PORT_INCLUDE( trdivadv ) + + PORT_MODIFY("IN.0") // S1 + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_CHANGED_CB(input_changed) PORT_16WAY + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_CB(input_changed) PORT_16WAY + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_CB(input_changed) PORT_16WAY +INPUT_PORTS_END + +// config + +void trdivadv_state::trdivadv(machine_config &config) +{ + sm510_common(config, 1520, 1080); +} + +void trdivadv_state::trclchick(machine_config &config) +{ + sm510_common(config, 811, 1080); +} + +// roms + +ROM_START( trdivadv ) + ROM_REGION( 0x1000, "maincpu", 0 ) + ROM_LOAD( "0029_235d", 0x0000, 0x1000, CRC(8977a1cf) SHA1(9ac413efedcff8b53b859420c0575c66e7be6e73) ) + + ROM_REGION( 165418, "screen", 0) + ROM_LOAD( "trdivadv.svg", 0, 165418, CRC(727040f1) SHA1(2318d6973a165eedcd369bd11342eca7efd24c39) ) +ROM_END + +ROM_START( trclchick ) + ROM_REGION( 0x1000, "maincpu", 0 ) + ROM_LOAD( "0029_238c", 0x0000, 0x1000, CRC(8977a1cf) SHA1(9ac413efedcff8b53b859420c0575c66e7be6e73) ) + + ROM_REGION( 122284, "screen", 0) + ROM_LOAD( "trclchick.svg", 0, 122284, CRC(c8e67d54) SHA1(d3d113c7bcb597fafddb0fab5410808360ad9a4b) ) +ROM_END + + + + + /******************************************************************************* VTech Electronic Number Muncher @@ -11877,6 +11970,8 @@ SYST( 1983, trthuball, trsrescue, 0, trthuball, trsrescue, trsre SYST( 1983, trsgkeep, 0, 0, trsgkeep, trsgkeep, trsgkeep_state, empty_init, "Tronica", "Super Goal Keeper", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) SYST( 1982, trspacmis, 0, 0, trspacmis, trspacmis, trspacmis_state, empty_init, "Tronica", "Space Mission (Tronica)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) SYST( 1982, trspider, trspacmis, 0, trspider, trspacmis, trspacmis_state, empty_init, "Tronica", "Spider (Tronica)", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +SYST( 1983, trdivadv, 0, 0, trdivadv, trdivadv, trdivadv_state, empty_init, "Tronica", "Diver's Adventure", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) +SYST( 1983, trclchick, trdivadv, 0, trclchick, trclchick, trdivadv_state, empty_init, "Tronica", "Clever Chicken", MACHINE_SUPPORTS_SAVE | MACHINE_REQUIRES_ARTWORK ) // misc SYST( 1989, nummunch, 0, 0, nummunch, nummunch, nummunch_state, empty_init, "VTech", "Electronic Number Muncher", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/heathzenith/h89.cpp b/src/mame/heathzenith/h89.cpp index 04029c902eefe..19300b532e96a 100644 --- a/src/mame/heathzenith/h89.cpp +++ b/src/mame/heathzenith/h89.cpp @@ -43,12 +43,18 @@ #include "emu.h" -#include "intr_cntrl.h" - #include "bus/heathzenith/h19/tlb.h" #include "bus/heathzenith/h89/h89bus.h" -#include "bus/heathzenith/h89/cards.h" +#include "bus/heathzenith/h89/intr_cntrl.h" +#include "bus/heathzenith/h89/cdr_fdc_880h.h" +#include "bus/heathzenith/h89/h_88_3.h" +#include "bus/heathzenith/h89/h_88_5.h" +#include "bus/heathzenith/h89/mms77316_fdc.h" #include "bus/heathzenith/h89/sigmasoft_parallel_port.h" +#include "bus/heathzenith/h89/sigmasoft_sound.h" +#include "bus/heathzenith/h89/we_pullup.h" +#include "bus/heathzenith/h89/z_89_11.h" +#include "bus/heathzenith/h89/z37_fdc.h" #include "cpu/z80/z80.h" #include "machine/ins8250.h" @@ -161,6 +167,9 @@ class h89_base_state : public driver_device template void slot_irq(int state); void h89_left_cards(device_slot_interface &device); + void h89_right_cards(device_slot_interface &device); + void h89_right_cards_mms(device_slot_interface &device); + void h89_right_p506_cards(device_slot_interface &device); }; /** @@ -934,6 +943,39 @@ void h89_base_state::h89_left_cards(device_slot_interface &device) }); } +void h89_base_state::h89_right_cards(device_slot_interface &device) +{ + device.option_add("cdr_fdc", H89BUS_CDR_FDC_880H); + device.option_add("h_88_3", H89BUS_H_88_3); + device.option_add("ha_88_3", H89BUS_HA_88_3); + device.option_add("h_88_5", H89BUS_H_88_5); + device.option_add("ss_snd", H89BUS_SIGMASOFT_SND); + device.option_add("z_89_11", H89BUS_Z_89_11); + + device.option_add("z37fdc", H89BUS_Z37).machine_config( + [this](device_t *device) + { + downcast(*device).set_intr_cntrl(m_intr_socket); + }); +} + +void h89_base_state::h89_right_cards_mms(device_slot_interface &device) +{ + h89_right_cards(device); + device.option_add("mms77316", H89BUS_MMS77316).machine_config( + [this](device_t *device) + { + downcast(*device).set_intr_cntrl(m_intr_socket); + }); +} + +void h89_base_state::h89_right_p506_cards(device_slot_interface &device) +{ + device.option_add("h_88_3", H89BUS_H_88_3); + device.option_add("ha_88_3", H89BUS_HA_88_3); + device.option_add("ss_snd", H89BUS_SIGMASOFT_SND); + device.option_add("we_pullup", H89BUS_WE_PULLUP); +} void h89_base_state::h89_base(machine_config &config) { @@ -979,16 +1021,13 @@ void h89_base_state::h89_base(machine_config &config) m_h89bus->out_int4_callback().set(FUNC(h89_base_state::slot_irq<4>)); m_h89bus->out_int5_callback().set(FUNC(h89_base_state::slot_irq<5>)); m_h89bus->out_wait_callback().set(FUNC(h89_base_state::set_wait_state)); - m_h89bus->out_fdcirq_callback().set(m_intr_socket, FUNC(heath_intr_socket::set_irq)); - m_h89bus->out_fdcdrq_callback().set(m_intr_socket, FUNC(heath_intr_socket::set_drq)); - m_h89bus->out_blockirq_callback().set(m_intr_socket, FUNC(heath_intr_socket::block_interrupts)); m_h89bus->out_fmwe_callback().set(FUNC(h89_base_state::set_fmwe)); H89BUS_LEFT_SLOT(config, "p501", "h89bus", [this](device_slot_interface &device) { h89_left_cards(device); }, nullptr); H89BUS_LEFT_SLOT(config, "p502", "h89bus", [this](device_slot_interface &device) { h89_left_cards(device); }, nullptr); H89BUS_LEFT_SLOT(config, "p503", "h89bus", [this](device_slot_interface &device) { h89_left_cards(device); }, nullptr); - H89BUS_RIGHT_SLOT(config, "p504", "h89bus", h89_right_cards, nullptr); - H89BUS_RIGHT_SLOT(config, "p505", "h89bus", h89_right_cards, "ha_88_3"); - H89BUS_RIGHT_SLOT(config, "p506", "h89bus", h89_right_p506_cards, "we_pullup").set_p506_signalling(true); + H89BUS_RIGHT_SLOT(config, "p504", "h89bus", [this](device_slot_interface &device) { h89_right_cards(device); }, nullptr); + H89BUS_RIGHT_SLOT(config, "p505", "h89bus", [this](device_slot_interface &device) { h89_right_cards(device); }, "ha_88_3"); + H89BUS_RIGHT_SLOT(config, "p506", "h89bus", [this](device_slot_interface &device) { h89_right_p506_cards(device); }, "we_pullup").set_p506_signalling(true); // H89 interrupt interval is 2mSec TIMER(config, "irq_timer", 0).configure_periodic(FUNC(h89_base_state::h89_irq_timer), attotime::from_msec(2)); @@ -1002,7 +1041,7 @@ void h88_state::h88(machine_config &config) m_intr_socket->set_default_option("original"); m_intr_socket->set_fixed(true); - H89BUS_RIGHT_SLOT(config.replace(), "p504", "h89bus", h89_right_cards, "h_88_5"); + H89BUS_RIGHT_SLOT(config.replace(), "p504", "h89bus", [this](device_slot_interface &device) { h89_right_cards(device); }, "h_88_5"); } void h89_state::h89(machine_config &config) @@ -1013,7 +1052,7 @@ void h89_state::h89(machine_config &config) m_intr_socket->set_default_option("h37"); m_intr_socket->set_fixed(true); - H89BUS_RIGHT_SLOT(config.replace(), "p504", "h89bus", h89_right_cards, "z37fdc"); + H89BUS_RIGHT_SLOT(config.replace(), "p504", "h89bus", [this](device_slot_interface &device) { h89_right_cards(device); }, "z37fdc"); } void h89_cdr_state::h89_cdr(machine_config &config) @@ -1024,7 +1063,7 @@ void h89_cdr_state::h89_cdr(machine_config &config) m_intr_socket->set_default_option("original"); m_intr_socket->set_fixed(true); - H89BUS_RIGHT_SLOT(config.replace(), "p504", "h89bus", h89_right_cards, "cdr_fdc"); + H89BUS_RIGHT_SLOT(config.replace(), "p504", "h89bus", [this](device_slot_interface &device) { h89_right_cards(device); }, "cdr_fdc"); } void h89_mms_state::h89_mms(machine_config &config) @@ -1036,9 +1075,8 @@ void h89_mms_state::h89_mms(machine_config &config) m_h89bus->out_gpp_callback().set(FUNC(h89_mms_state::port_f2_mms_w)); // the card selection is different with the MMS mapping PROM - H89BUS_RIGHT_SLOT(config.replace(), "p504", "h89bus", h89_right_cards_mms, "mms77316"); - H89BUS_RIGHT_SLOT(config.replace(), "p505", "h89bus", h89_right_cards_mms, "ha_88_3"); - H89BUS_RIGHT_SLOT(config.replace(), "p506", "h89bus", h89_right_cards_mms, nullptr).set_p506_signalling(true); + H89BUS_RIGHT_SLOT(config.replace(), "p504", "h89bus", [this](device_slot_interface &device) { h89_right_cards_mms(device); }, "mms77316"); + H89BUS_RIGHT_SLOT(config.replace(), "p505", "h89bus", [this](device_slot_interface &device) { h89_right_cards_mms(device); }, "ha_88_3"); m_intr_socket->set_default_option("mms"); m_intr_socket->set_fixed(true); diff --git a/src/mame/hitachi/b16.cpp b/src/mame/hitachi/b16.cpp index 4621226d50970..cb9477a39404b 100644 --- a/src/mame/hitachi/b16.cpp +++ b/src/mame/hitachi/b16.cpp @@ -410,7 +410,7 @@ static const gfx_layout kanjilayout = static GFXDECODE_START( gfx_b16 ) GFXDECODE_ENTRY( "kanji", 0x0000, kanjilayout, 0, 1 ) - GFXDECODE_ENTRY( nullptr, 0x0000, charlayout, 0, 1 ) + GFXDECODE_RAM( nullptr, 0x0000, charlayout, 0, 1 ) GFXDECODE_END uint8_t b16_state::memory_read_byte(offs_t offset) diff --git a/src/mame/hitachi/bml3.cpp b/src/mame/hitachi/bml3.cpp index e4c6715b8679c..aea666becde39 100644 --- a/src/mame/hitachi/bml3.cpp +++ b/src/mame/hitachi/bml3.cpp @@ -839,7 +839,7 @@ static const gfx_layout ig_charlayout = }; static GFXDECODE_START( gfx_bml3mk5 ) - GFXDECODE_ENTRY( nullptr, 0, ig_charlayout, 0, 1 ) + GFXDECODE_RAM( nullptr, 0, ig_charlayout, 0, 1 ) GFXDECODE_END diff --git a/src/mame/hp/hp98x6.cpp b/src/mame/hp/hp98x6.cpp index 433bdc97ca9f4..8e50e364dbf65 100644 --- a/src/mame/hp/hp98x6.cpp +++ b/src/mame/hp/hp98x6.cpp @@ -32,13 +32,11 @@ // | Correct char. generator | * | * | N | N | // | 5.25 floppy drives | | 1 | 2 | 2 | // | RS232 interface | * | | | | +// | Expansion cards (hp98628, hp98629) | * | * | * | * | // // What's not in for 9836A/C models: // - Correct character generator // -// What's not in for all the models: -// - Expansion cards -// // Main references: // - Olivier De Smet's standalone emulator: // https://sites.google.com/site/olivier2smet2/hp_projects/hp98x6 @@ -50,11 +48,13 @@ #include "hp98x6_optrom.h" #include "hp98x6_upi.h" +#include "bus/hp_dio/hp_dio.h" #include "bus/ieee488/ieee488.h" #include "bus/rs232/rs232.h" #include "cpu/m68000/m68000.h" #include "imagedev/floppy.h" #include "machine/74123.h" +#include "machine/input_merger.h" #include "machine/ins8250.h" #include "machine/ram.h" #include "machine/rescap.h" @@ -138,6 +138,14 @@ class hp98x6_base_state : public driver_device , m_screen(*this, "screen") , m_upi(*this, "upi") , m_hpib(*this, "hpib") + , m_dio_bus(*this, "diobus") + , m_irq1_merger(*this , "merge_irq1") + , m_irq2_merger(*this , "merge_irq2") + , m_irq3_merger(*this , "merge_irq3") + , m_irq4_merger(*this , "merge_irq4") + , m_irq5_merger(*this , "merge_irq5") + , m_irq6_merger(*this , "merge_irq6") + , m_irq7_merger(*this , "merge_irq7") , m_chargen(*this, "chargen") , m_rom_drawers(*this, "drawer%u", 0U) { @@ -160,6 +168,14 @@ class hp98x6_base_state : public driver_device required_device m_screen; required_device m_upi; required_device m_hpib; + required_device m_dio_bus; + required_device m_irq1_merger; + required_device m_irq2_merger; + required_device m_irq3_merger; + required_device m_irq4_merger; + required_device m_irq5_merger; + required_device m_irq6_merger; + required_device m_irq7_merger; // Character generator required_region_ptr m_chargen; @@ -212,7 +228,6 @@ void hp98x6_base_state::hp98x6_base(machine_config &config, unsigned dot_clock, m_crtc->set_show_border_area(false); HP98X6_UPI(config, m_upi, HPIB_CLOCK); - m_upi->irq1_write_cb().set_inputline(m_cpu, M68K_IRQ_1); m_upi->irq7_write_cb().set(FUNC(hp98x6_base_state::upi_irq7_w)); TMS9914(config, m_hpib, HPIB_CLOCK); @@ -246,6 +261,31 @@ void hp98x6_base_state::hp98x6_base(machine_config &config, unsigned dot_clock, } SOFTWARE_LIST(config, "optrom_list").set_original("hp98x6_rom"); + + DIO16(config, m_dio_bus, 0); + m_dio_bus->set_program_space(m_cpu, AS_PROGRAM); + m_cpu->reset_cb().append(m_dio_bus, FUNC(bus::hp_dio::dio16_device::reset_in)); + // IRQ mergers + INPUT_MERGER_ANY_HIGH(config, m_irq1_merger).output_handler().set_inputline(m_cpu, M68K_IRQ_1); + INPUT_MERGER_ANY_HIGH(config, m_irq2_merger).output_handler().set_inputline(m_cpu, M68K_IRQ_2); + INPUT_MERGER_ANY_HIGH(config, m_irq3_merger).output_handler().set_inputline(m_cpu, M68K_IRQ_3); + INPUT_MERGER_ANY_HIGH(config, m_irq4_merger).output_handler().set_inputline(m_cpu, M68K_IRQ_4); + INPUT_MERGER_ANY_HIGH(config, m_irq5_merger).output_handler().set_inputline(m_cpu, M68K_IRQ_5); + INPUT_MERGER_ANY_HIGH(config, m_irq6_merger).output_handler().set_inputline(m_cpu, M68K_IRQ_6); + INPUT_MERGER_ANY_HIGH(config, m_irq7_merger).output_handler().set_inputline(m_cpu, M68K_IRQ_7); + + m_dio_bus->irq1_out_cb().set(m_irq1_merger, FUNC(input_merger_any_high_device::in_w<0>)); + m_dio_bus->irq2_out_cb().set(m_irq2_merger, FUNC(input_merger_any_high_device::in_w<0>)); + m_dio_bus->irq3_out_cb().set(m_irq3_merger, FUNC(input_merger_any_high_device::in_w<0>)); + m_dio_bus->irq4_out_cb().set(m_irq4_merger, FUNC(input_merger_any_high_device::in_w<0>)); + m_dio_bus->irq5_out_cb().set(m_irq5_merger, FUNC(input_merger_any_high_device::in_w<0>)); + m_dio_bus->irq6_out_cb().set(m_irq6_merger, FUNC(input_merger_any_high_device::in_w<0>)); + m_dio_bus->irq7_out_cb().set(m_irq7_merger, FUNC(input_merger_any_high_device::in_w<0>)); + + m_upi->irq1_write_cb().set(m_irq1_merger, FUNC(input_merger_any_high_device::in_w<1>)); + + DIO16_SLOT(config, "slot0", 0, "diobus", dio16_hp98x6_cards, nullptr, false); + DIO16_SLOT(config, "slot1", 0, "diobus", dio16_hp98x6_cards, nullptr, false); } void hp98x6_base_state::cpu_mem_map(address_map &map) @@ -292,13 +332,13 @@ void hp98x6_base_state::cpu_reset_w(int state) void hp98x6_base_state::hpib_irq_w(int state) { m_hpib_irq = bool(state); - m_cpu->set_input_line(M68K_IRQ_3, state); + m_irq3_merger->in_w<1>(state); } void hp98x6_base_state::upi_irq7_w(int state) { m_upi_irq7 = bool(state); - m_cpu->set_input_line(M68K_IRQ_7, state); + m_irq7_merger->in_w<1>(state); } // +--------------+ @@ -541,7 +581,7 @@ void hp9816_state::uart_reset() void hp9816_state::uart_update_irq() { - m_cpu->set_input_line(M68K_IRQ_4, m_uart_irq && m_uart_int_en); + m_irq4_merger->in_w<1>(m_uart_irq && m_uart_int_en); } uint8_t hp9816_state::uart_r(offs_t offset) @@ -1147,7 +1187,7 @@ void hp9826_36_state::fdc_irq_w(int state) { LOG_FDC("fdc IRQ %d\n", state); m_fdc_irq = bool(state); - m_cpu->set_input_line(M68K_IRQ_2, state); + m_irq2_merger->in_w<1>(state); } void hp9826_36_state::fdc_drq_w(int state) diff --git a/src/mame/igs/goldstar.cpp b/src/mame/igs/goldstar.cpp index e1b3bd05a0f63..37c13829cda6d 100644 --- a/src/mame/igs/goldstar.cpp +++ b/src/mame/igs/goldstar.cpp @@ -333,8 +333,10 @@ class goldstar_state : public driver_device void goldfrui(machine_config &config); void goldstar(machine_config &config); void goldstbl(machine_config &config); + void feverch(machine_config &config); void bonusch_portmap(address_map &map) ATTR_COLD; void feverch_portmap(address_map &map) ATTR_COLD; + void feverch_map(address_map &map) ATTR_COLD; void cm_map(address_map &map) ATTR_COLD; void crazybon_portmap(address_map &map) ATTR_COLD; void flaming7_map(address_map &map) ATTR_COLD; @@ -683,11 +685,9 @@ class unkch_state : public goldstar_state void megaline(machine_config &config); void unkch(machine_config &config); void bonusch(machine_config &config); - void feverch(machine_config &config); void rolling(machine_config &config); void bonusch_map(address_map &map) ATTR_COLD; - void feverch_map(address_map &map) ATTR_COLD; void megaline_map(address_map &map) ATTR_COLD; void unkch_map(address_map &map) ATTR_COLD; void unkch_portmap(address_map &map) ATTR_COLD; @@ -2865,30 +2865,25 @@ void goldstar_state::bonusch_portmap(address_map &map) map(0x60, 0x60).portr("IN3"); } -void unkch_state::feverch_map(address_map &map) +void goldstar_state::feverch_map(address_map &map) { map(0x0000, 0x7fff).rom(); - map(0xc000, 0xc7ff).ram().w(FUNC(unkch_state::fg_atrram_w)).share("fg_atrram"); + map(0xc000, 0xc7ff).ram(); map(0xc800, 0xcfff).ram(); - map(0xd000, 0xd7ff).ram().w(FUNC(unkch_state::fg_vidram_w)).share("fg_vidram"); - - // placeholders to appease validation, should be 0x200 each. - map(0xe000, 0xe000).ram().w(FUNC(unkch_state::goldstar_reel1_ram_w)).share("reel1_ram"); - map(0xe200, 0xe200).ram().w(FUNC(unkch_state::goldstar_reel2_ram_w)).share("reel2_ram"); - map(0xe400, 0xe400).ram().w(FUNC(unkch_state::goldstar_reel3_ram_w)).share("reel3_ram"); + map(0xd000, 0xd7ff).ram().w(FUNC(goldstar_state::fg_vidram_w)).share("fg_vidram"); + map(0xd800, 0xdfff).ram().w(FUNC(goldstar_state::fg_atrram_w)).share("fg_atrram"); - // placeholders to appease validation, should be 0x40 each. - map(0xe640, 0xe640).ram().share("reel1_scroll"); - map(0xe680, 0xe680).ram().share("reel2_scroll"); - map(0xe700, 0xe700).ram().share("reel3_scroll"); + map(0xe000, 0xe1ff).ram().w(FUNC(goldstar_state::goldstar_reel1_ram_w)).share("reel1_ram"); + map(0xe200, 0xe3ff).ram().w(FUNC(goldstar_state::goldstar_reel2_ram_w)).share("reel2_ram"); + map(0xe400, 0xe5ff).ram().w(FUNC(goldstar_state::goldstar_reel3_ram_w)).share("reel3_ram"); + map(0xe600, 0xe7ff).ram(); - // placeholders to appease validation, should be 0x200 each. - map(0xe800, 0xe800).ram().w(FUNC(unkch_state::reel1_attrram_w)).share("reel1_attrram"); - map(0xea00, 0xea00).ram().w(FUNC(unkch_state::reel2_attrram_w)).share("reel2_attrram"); - map(0xec00, 0xec00).ram().w(FUNC(unkch_state::reel3_attrram_w)).share("reel3_attrram"); + map(0xe800, 0xe83f).ram().share("reel1_scroll"); + map(0xea00, 0xea3f).ram().share("reel2_scroll"); + map(0xec00, 0xec3f).ram().share("reel3_scroll"); - map(0xf800, 0xffff).ram(); + map(0xf000, 0xffff).ram(); } void goldstar_state::feverch_portmap(address_map &map) @@ -8499,44 +8494,44 @@ INPUT_PORTS_END static INPUT_PORTS_START( feverch ) PORT_START("IN0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_1) PORT_NAME("IN0-1") - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_2) PORT_NAME("IN0-2") - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_3) PORT_NAME("IN0-3") - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_4) PORT_NAME("IN0-4") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_5) PORT_NAME("IN0-5") - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_6) PORT_NAME("IN0-6") - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_7) PORT_NAME("IN0-7") - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_8) PORT_NAME("IN0-8") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_CODE(KEYCODE_B) PORT_NAME("P1 - Big / Switch Controls") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_CODE(KEYCODE_C) PORT_NAME("P1 - Double-Up") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_CODE(KEYCODE_V) PORT_NAME("P1 - Take Score") + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(KEYCODE_Z) PORT_NAME("P1 - Bet") + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CODE(KEYCODE_N) PORT_NAME("P1 - Small / Info") + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CODE(KEYCODE_X) PORT_NAME("P1 - Start") PORT_START("IN1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Q) PORT_NAME("IN1-1") - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_W) PORT_NAME("IN1-2") - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_E) PORT_NAME("IN1-3") - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_R) PORT_NAME("IN1-4") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_T) PORT_NAME("IN1-5") - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Y) PORT_NAME("IN1-6") - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_U) PORT_NAME("IN1-7") - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_I) PORT_NAME("IN1-8") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON12 ) PORT_CODE(KEYCODE_G) PORT_NAME("P2 - Big / Switch Controls") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON10 ) PORT_CODE(KEYCODE_D) PORT_NAME("P2 - Double-Up") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON11 ) PORT_CODE(KEYCODE_F) PORT_NAME("P2 - Take Score") + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON13 ) PORT_CODE(KEYCODE_A) PORT_NAME("P2 - Bet") + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON15 ) PORT_CODE(KEYCODE_H) PORT_NAME("P2 - Small / Info") + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON14 ) PORT_CODE(KEYCODE_S) PORT_NAME("P2 - Start") PORT_START("IN2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_A) PORT_NAME("IN2-1") - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_S) PORT_NAME("IN2-2") - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_D) PORT_NAME("IN2-3") - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_F) PORT_NAME("IN2-4") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_G) PORT_NAME("IN2-5") - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_H) PORT_NAME("IN2-6") - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_J) PORT_NAME("IN2-7") - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_K) PORT_NAME("IN2-8") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("IN3") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_Z) PORT_NAME("IN3-1") - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_X) PORT_NAME("IN3-2") - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_C) PORT_NAME("IN3-3") - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_V) PORT_NAME("IN3-4") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_B) PORT_NAME("IN3-5") - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_N) PORT_NAME("IN3-6") - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_M) PORT_NAME("IN3-7") - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_L) PORT_NAME("IN3-8") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) PORT_NAME("Coin B") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN4 ) PORT_IMPULSE(2) PORT_NAME("Coin D") + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_IMPULSE(2) PORT_NAME("Coin C") + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) PORT_NAME("Coin A") PORT_START("IN4") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("IN4-1") @@ -8545,112 +8540,115 @@ static INPUT_PORTS_START( feverch ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("IN4-4") PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("IN4-5") PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("IN4-6") - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("IN4-7") // if low "check voltage call attendant" message will appear + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("IN4-8") PORT_START("DSW1") - PORT_DIPNAME( 0x01, 0x01, "DSW1" ) + PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW1:1") PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) + PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW1:2") PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) + PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW1:3") PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) + PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW1:4") PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) + PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW1:5") PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW1:6") PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW1:7") PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW1:8") PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_START("DSW2") - PORT_DIPNAME( 0x01, 0x01, "DSW2" ) - PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) + PORT_DIPNAME( 0x0f, 0x0f, "Main Game Pay Rate" ) PORT_DIPLOCATION("DSW2:1,2,3,4") + PORT_DIPSETTING( 0x0f, "60%" ) + PORT_DIPSETTING( 0x0e, "62%" ) + PORT_DIPSETTING( 0x0d, "65%" ) + PORT_DIPSETTING( 0x0c, "67%" ) + PORT_DIPSETTING( 0x0b, "70%" ) + PORT_DIPSETTING( 0x0a, "72%" ) + PORT_DIPSETTING( 0x09, "75%" ) + PORT_DIPSETTING( 0x08, "77%" ) + PORT_DIPSETTING( 0x07, "80%" ) + PORT_DIPSETTING( 0x06, "82%" ) + PORT_DIPSETTING( 0x05, "85%" ) + PORT_DIPSETTING( 0x04, "87%" ) + PORT_DIPSETTING( 0x03, "90%" ) + PORT_DIPSETTING( 0x02, "92%" ) + PORT_DIPSETTING( 0x01, "95%" ) + PORT_DIPSETTING( 0x00, "97%" ) + PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW2:5") PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW2:6") PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW2:7") PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW2:8") PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_START("DSW3") - PORT_DIPNAME( 0x01, 0x01, "DSW3" ) - PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) + PORT_DIPNAME( 0x07, 0x07, "Key In Rate" ) PORT_DIPLOCATION("DSW3:1,2,3") + PORT_DIPSETTING( 0x00, "5 Credits" ) + PORT_DIPSETTING( 0x01, "10 Credits" ) + PORT_DIPSETTING( 0x02, "20 Credits" ) + PORT_DIPSETTING( 0x03, "25 Credits" ) + PORT_DIPSETTING( 0x04, "40 Credits" ) + PORT_DIPSETTING( 0x05, "50 Credits" ) + PORT_DIPSETTING( 0x06, "60 Credits" ) + PORT_DIPSETTING( 0x07, "100 Credits" ) + PORT_DIPNAME( 0x38, 0x38, "Coin A Rate" ) PORT_DIPLOCATION("DSW3:4,5,6") + PORT_DIPSETTING( 0x38, "1 Coin/50 Credits" ) // why?? hacked? + PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0x10, DEF_STR( 1C_4C ) ) + PORT_DIPSETTING( 0x18, DEF_STR( 1C_5C ) ) + PORT_DIPSETTING( 0x20, DEF_STR( 1C_6C ) ) + PORT_DIPSETTING( 0x28, "1 Coin/10 Credits" ) + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW3:7") PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("DSW3:8") PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_START("DSW4") - PORT_DIPNAME( 0x01, 0x01, "DSW4" ) - PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x0f, 0x0f, "Coin D Rate" ) PORT_DIPLOCATION("DSW4:1,2,3,4") + PORT_DIPSETTING( 0x0f, "10 Coins/1 Credit" ) + PORT_DIPSETTING( 0x01, DEF_STR( 5C_1C ) ) + PORT_DIPSETTING( 0x02, "5 Coins/2 Credits" ) + PORT_DIPSETTING( 0x03, DEF_STR( 4C_1C ) ) + PORT_DIPSETTING( 0x04, DEF_STR( 3C_1C ) ) + PORT_DIPSETTING( 0x05, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x06, DEF_STR( 2C_3C ) ) + PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0x09, DEF_STR( 1C_3C ) ) + PORT_DIPSETTING( 0x0a, DEF_STR( 1C_5C ) ) + PORT_DIPSETTING( 0x0b, "1 Coin/10 Credits" ) + PORT_DIPNAME( 0x70, 0x70, "Coin C Rate" ) PORT_DIPLOCATION("DSW4:5,6,7") + PORT_DIPSETTING( 0x70, "1 Coin/50 Credits" ) // why?? hacked? + PORT_DIPSETTING( 0x10, "9 Coins/1 Credit" ) + PORT_DIPSETTING( 0x20, DEF_STR( 6C_1C ) ) + PORT_DIPSETTING( 0x30, DEF_STR( 5C_1C ) ) + PORT_DIPSETTING( 0x40, DEF_STR( 3C_1C ) ) + PORT_DIPSETTING( 0x50, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x60, DEF_STR( 1C_1C ) ) + PORT_DIPNAME( 0x80, 0x80, "4th Coin" ) PORT_DIPLOCATION("DSW4:8") + PORT_DIPSETTING( 0x80, "As Coin A" ) + PORT_DIPSETTING( 0x00, "As Hopper Line" ) INPUT_PORTS_END @@ -11416,11 +11414,11 @@ void unkch_state::bonusch(machine_config &config) SN76489(config, "sn4", PSG_CLOCK).add_route(ALL_OUTPUTS, "mono", 0.80); } -void unkch_state::feverch(machine_config &config) +void goldstar_state::feverch(machine_config &config) { Z80(config, m_maincpu, 12'000'000 / 2); // clock not verified - m_maincpu->set_addrmap(AS_PROGRAM, &unkch_state::feverch_map); - m_maincpu->set_addrmap(AS_IO, &unkch_state::feverch_portmap); + m_maincpu->set_addrmap(AS_PROGRAM, &goldstar_state::feverch_map); + m_maincpu->set_addrmap(AS_IO, &goldstar_state::feverch_portmap); I8255A(config, m_ppi[0]); m_ppi[0]->in_pa_callback().set_ioport("IN0"); @@ -11441,13 +11439,13 @@ void unkch_state::feverch(machine_config &config) screen.set_refresh_hz(60); screen.set_size(64*8, 32*8); screen.set_visarea(0*8, 64*8-1, 2*8, 30*8-1); - screen.set_screen_update(FUNC(unkch_state::screen_update_unkch)); + screen.set_screen_update(FUNC(goldstar_state::screen_update_goldstar)); screen.screen_vblank().set_inputline(m_maincpu, INPUT_LINE_NMI); GFXDECODE(config, m_gfxdecode, m_palette, gfx_ncb3); - PALETTE(config, m_palette, FUNC(goldstar_state::lucky8_palette)).set_format(palette_device::BGR_233, 256); + PALETTE(config, m_palette, FUNC(goldstar_state::cm_palette), 256); - MCFG_VIDEO_START_OVERRIDE(unkch_state, unkch) + MCFG_VIDEO_START_OVERRIDE(goldstar_state, goldstar) SPEAKER(config, "mono").front_center(); @@ -11863,6 +11861,20 @@ ROM_START( moonlghtc ) ROM_LOAD( "moon-sound.bin", 0x0000, 0x20000, CRC(9d58960f) SHA1(c68edf95743e146398aabf6b9617d18e1f9bf25b) ) ROM_END +ROM_START( gregular ) + ROM_REGION( 0x20000, "maincpu", 0 ) + ROM_LOAD( "30.prg", 0x00000, 0x20000, CRC(7219d1c1) SHA1(8d17f29f94f50db952a1dd144c971b2e3be2dad3) ) // 1ST AND 2ND HALF IDENTICAL + + ROM_REGION( 0x20000, "gfx1", 0 ) + ROM_LOAD( "28.gfx", 0x00000, 0x20000, CRC(dfd27fa2) SHA1(408ae9de1d6e869c6dc5daa073b845081204624b) ) // FIXED BITS (00xxxxxx), but correct + + ROM_REGION( 0x20000, "gfx2", 0 ) + ROM_LOAD( "29.gfx", 0x00000, 0x20000, CRC(8a5f274d) SHA1(0f2ad61b00e220fc509c01c11c1a8f4e47b54f2a) ) // 00xxxxxxxxxxxxxxx = 0xFF + + ROM_REGION( 0x40000, "oki", 0 ) + ROM_LOAD( "27.oki", 0x00000, 0x20000, CRC(9d58960f) SHA1(c68edf95743e146398aabf6b9617d18e1f9bf25b) ) +ROM_END + /* Gold Fruit @@ -12167,6 +12179,34 @@ ROM_START( cb3g ) ROM_LOAD( "dm74s288.d12", 0x0000, 0x0020, BAD_DUMP CRC(6df3f972) SHA1(0096a7f7452b70cac6c0752cb62e24b643015b5c) ) ROM_END + +ROM_START( cb3h ) // very similar to the cb3 set, but changes are legit + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "sub.u6", 0x00000, 0x10000, CRC(e154a31d) SHA1(18a7d36563ed914207100286fd6ad75e6180bae8) ) // encrypted, on subboard + + ROM_REGION( 0x18000, "gfx1", 0 ) + ROM_LOAD( "5.7h", 0x00000, 0x08000, CRC(83650a94) SHA1(e79420ab559d3f74013708767ca3f238fd333fb7) ) + ROM_LOAD( "6.8h", 0x08000, 0x08000, CRC(2f46a3f5) SHA1(3e6022ee8f84039e48f41aea5e68ee28aabdc556) ) + ROM_LOAD( "7.10h", 0x10000, 0x08000, CRC(dcf97517) SHA1(0a29696e0464c8878c499b1786a17080fd088a72) ) + + ROM_REGION( 0x8000, "gfx2", 0 ) + ROM_LOAD( "1.1h", 0x00000, 0x02000, CRC(7cc6d26b) SHA1(de33e8985affce7bd3ead89463117c9aaa93d5e4) ) + ROM_LOAD( "2.3h", 0x02000, 0x02000, CRC(e73ea4e3) SHA1(c9fd56461f6986d6bc170403d298fcc408a524e9) ) + ROM_LOAD( "3.4h", 0x04000, 0x02000, CRC(91162010) SHA1(3acc21e7074602b247f2f392eb181802092d2f21) ) + ROM_LOAD( "4.5h", 0x06000, 0x02000, CRC(cbcc6bfb) SHA1(5bafc934fef1f50d8c182c39d3a7ce795c89d175) ) + + ROM_REGION( 0x0200, "proms", 0 ) + ROM_LOAD_NIB_LOW( "n82s129.13g", 0x0000, 0x0100, CRC(59ac98e4) SHA1(5fc0f1a48c49c956cdb8826e20663dc57a9175e4) ) // 1st bank colors, low 4 bits. + ROM_LOAD_NIB_HIGH( "n82s129.14g", 0x0000, 0x0100, CRC(0d8f35bd) SHA1(0c2a0145cdaaf9beabdce241731a36b0c65f18a2) ) // 1st bank colors, high 4 bits. + ROM_LOAD( "dm74s288.13d", 0x0080, 0x0020, CRC(77a85e21) SHA1(3b41e0ab7cc55c5d78914d23e8289383f5bd5654) ) // 2nd bank colors + + ROM_REGION( 0x100, "unkprom", 0 ) + ROM_LOAD( "82s129.f3", 0x0000, 0x0100, CRC(1d668d4a) SHA1(459117f78323ea264d3a29f1da2889bbabe9e4be) ) + + ROM_REGION( 0x20, "unkprom2", 0 ) + ROM_LOAD( "dm74s288.d12", 0x0000, 0x0020, CRC(6df3f972) SHA1(0096a7f7452b70cac6c0752cb62e24b643015b5c) ) +ROM_END + /* Cherry Gold I (bootleg) It runs in CB3e similar hardware... @@ -13225,6 +13265,140 @@ ROM_START( cmasterk ) ROM_LOAD( "prom3.u46", 0x0000, 0x0100, CRC(50ec383b) SHA1(ae95b92bd3946b40134bcdc22708d5c6b0f4c23e) ) ROM_END +ROM_START( cmasterl ) // most similar to cmasterbv but without the extra ROM + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "sc9.16f", 0x0000, 0x1000, CRC(9b305a27) SHA1(7ab27f3ea1c0fd71ebaa54fc3d60d43cf6ab7c8b) ) + ROM_CONTINUE( 0x4000, 0x1000 ) + ROM_CONTINUE( 0x3000, 0x1000 ) + ROM_CONTINUE( 0x7000, 0x1000 ) + ROM_CONTINUE( 0x1000, 0x1000 ) + ROM_CONTINUE( 0x6000, 0x1000 ) + ROM_CONTINUE( 0x2000, 0x1000 ) + ROM_CONTINUE( 0x5000, 0x1000 ) + + ROM_REGION( 0x18000, "gfx1", 0 ) + ROM_LOAD( "5.1e", 0x00000, 0x8000, CRC(19cc1d67) SHA1(47487f9362bfb36a32100ed772960628844462bf) ) + ROM_LOAD( "6.2e", 0x08000, 0x8000, CRC(63b3df4e) SHA1(9bacd23da598805ec18ec5ad15cab95d71eb9262) ) + ROM_LOAD( "7.3e", 0x10000, 0x8000, CRC(e39fff9c) SHA1(22fdc517fa478441622c6245cecb5728c5595757) ) + + ROM_REGION( 0x8000, "gfx2", 0 ) + ROM_LOAD( "3.2f", 0x0000, 0x2000, CRC(8607ffd9) SHA1(9bc94715554aa2473ae2ed249a47f29c7886b3dc) ) + ROM_LOAD( "4.3f", 0x2000, 0x2000, CRC(c32367be) SHA1(ff217021b9c58e23b2226f8b0a7f5da966225715) ) + ROM_LOAD( "1.2h", 0x4000, 0x2000, CRC(6dfcb188) SHA1(22430429c798954d9d979e62699b58feae7fdbf4) ) + ROM_LOAD( "2.3h", 0x6000, 0x2000, CRC(9678ead2) SHA1(e80aefa98b2363fe9e6b2415762695ace272e4d3) ) + + ROM_REGION( 0x10000, "user1", 0 ) // girl bitmaps + ROM_LOAD( "1.10c", 0x0000, 0x10000, CRC(e92443d3) SHA1(4b6ca4521841610054165f085ae05510e77af191) ) + + ROM_REGION( 0x200, "proms", 0 ) + ROM_LOAD( "82s129.u84", 0x0000, 0x0100, CRC(0489b760) SHA1(78f8632b17a76335183c5c204cdec856988368b0) ) + ROM_LOAD( "82s129.u79", 0x0100, 0x0100, CRC(21eb5b19) SHA1(9b8425bdb97f11f4855c998c7792c3291fd07470) ) + + ROM_REGION( 0x100, "proms2", 0 ) + ROM_LOAD( "82s129.u46", 0x0000, 0x0100, CRC(50ec383b) SHA1(ae95b92bd3946b40134bcdc22708d5c6b0f4c23e) ) +ROM_END + +ROM_START( cutyline ) // Dyna D9001 PCB, DYNA QL-1 V1.01 string in ROM + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "16f", 0x0000, 0x1000, CRC(07accc1f) SHA1(fa6ff31acf93510530c81d474cccc0d4f73235dc) ) + ROM_CONTINUE( 0x4000, 0x1000 ) + ROM_CONTINUE( 0x3000, 0x1000 ) + ROM_CONTINUE( 0x7000, 0x1000 ) + ROM_CONTINUE( 0x1000, 0x1000 ) + ROM_CONTINUE( 0x6000, 0x1000 ) + ROM_CONTINUE( 0x2000, 0x1000 ) + ROM_CONTINUE( 0x5000, 0x1000 ) + + ROM_REGION( 0x18000, "gfx1", 0 ) + ROM_LOAD( "70.3e", 0x00000, 0x8000, CRC(19cc1d67) SHA1(47487f9362bfb36a32100ed772960628844462bf) ) + ROM_LOAD( "60.2e", 0x08000, 0x8000, CRC(63b3df4e) SHA1(9bacd23da598805ec18ec5ad15cab95d71eb9262) ) + ROM_LOAD( "50.1e", 0x10000, 0x8000, CRC(e39fff9c) SHA1(22fdc517fa478441622c6245cecb5728c5595757) ) + + ROM_REGION( 0x8000, "gfx2", 0 ) + ROM_LOAD( "4.3f", 0x0000, 0x2000, CRC(8607ffd9) SHA1(9bc94715554aa2473ae2ed249a47f29c7886b3dc) ) + ROM_LOAD( "3.2f", 0x2000, 0x2000, CRC(c32367be) SHA1(ff217021b9c58e23b2226f8b0a7f5da966225715) ) + ROM_LOAD( "2.3h", 0x4000, 0x2000, CRC(6dfcb188) SHA1(22430429c798954d9d979e62699b58feae7fdbf4) ) + ROM_LOAD( "1.2h", 0x6000, 0x2000, CRC(9678ead2) SHA1(e80aefa98b2363fe9e6b2415762695ace272e4d3) ) + + ROM_REGION( 0x10000, "user1", 0 ) // girl bitmaps + ROM_LOAD( "8.10c", 0x0000, 0x10000, CRC(e92443d3) SHA1(4b6ca4521841610054165f085ae05510e77af191) ) + + ROM_REGION( 0x200, "proms", 0 ) + ROM_LOAD( "16.16c", 0x0000, 0x0100, CRC(0489b760) SHA1(78f8632b17a76335183c5c204cdec856988368b0) ) + ROM_LOAD( "15.15c", 0x0100, 0x0100, CRC(21eb5b19) SHA1(9b8425bdb97f11f4855c998c7792c3291fd07470) ) + + ROM_REGION( 0x100, "proms2", 0 ) + ROM_LOAD( "9.9e", 0x0000, 0x0100, CRC(50ec383b) SHA1(ae95b92bd3946b40134bcdc22708d5c6b0f4c23e) ) +ROM_END + +ROM_START( cutylinea ) // bootleg PCB, DYNA QL-1 V8.05C string in ROM + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "rom9.16f", 0x0000, 0x1000, CRC(8a16515f) SHA1(411f1286c25905150e77f002d940b7a6de329b25) ) + ROM_CONTINUE( 0x4000, 0x1000 ) + ROM_CONTINUE( 0x3000, 0x1000 ) + ROM_CONTINUE( 0x7000, 0x1000 ) + ROM_CONTINUE( 0x1000, 0x1000 ) + ROM_CONTINUE( 0x6000, 0x1000 ) + ROM_CONTINUE( 0x2000, 0x1000 ) + ROM_CONTINUE( 0x5000, 0x1000 ) + ROM_CONTINUE( 0x8000, 0x8000 ) + + ROM_REGION( 0x18000, "gfx1", 0 ) + ROM_LOAD( "rom7.3e", 0x00000, 0x8000, CRC(1fa8d85e) SHA1(963570178dfb359c6ef4c322791de8f08306eb0c) ) + ROM_LOAD( "rom6.2e", 0x08000, 0x8000, CRC(36dfbbcb) SHA1(8dee44f4b007a41b67e2d4eb75b88b02b9118be0) ) + ROM_LOAD( "rom5.1e", 0x10000, 0x8000, CRC(2350e482) SHA1(03c4a83fb5b544d061378db319ff652a2c053062) ) + + ROM_REGION( 0x8000, "gfx2", 0 ) + ROM_LOAD( "rom4.3f", 0x0000, 0x2000, CRC(2d044e6b) SHA1(7ca60cca8de2c368ca43f1ce54a5140a3dd1ee37) ) + ROM_LOAD( "rom3.2f", 0x2000, 0x2000, CRC(e7e300c2) SHA1(b21926d41aa9d27c78fbf28efd86ac070891a7bb) ) + ROM_LOAD( "rom2.3h", 0x4000, 0x2000, CRC(955d0517) SHA1(3662f97996f80ef9093936dfe0a73de5f6850294) ) + ROM_LOAD( "rom1.2h", 0x6000, 0x2000, CRC(188fc72b) SHA1(501afe548dc279c5f77d9827d0a073875fa7a64f) ) + + ROM_REGION( 0x10000, "user1", 0 ) // girl bitmaps + ROM_LOAD( "rom8.10c", 0x0000, 0x10000, BAD_DUMP CRC(e92443d3) SHA1(4b6ca4521841610054165f085ae05510e77af191) ) // dump not included, but present on PCB pic + + ROM_REGION( 0x200, "proms", 0 ) + ROM_LOAD( "b12.16c", 0x0000, 0x0100, BAD_DUMP CRC(0489b760) SHA1(78f8632b17a76335183c5c204cdec856988368b0) ) // dump not included, but present on PCB pic + ROM_LOAD( "b12.15c", 0x0100, 0x0100, BAD_DUMP CRC(21eb5b19) SHA1(9b8425bdb97f11f4855c998c7792c3291fd07470) ) // dump not included, but present on PCB pic + + ROM_REGION( 0x100, "proms2", 0 ) + ROM_LOAD( "b11.9e", 0x0000, 0x0100, BAD_DUMP CRC(50ec383b) SHA1(ae95b92bd3946b40134bcdc22708d5c6b0f4c23e) ) // dump not included, but present on PCB pic +ROM_END + +ROM_START( cutylineb ) // bootleg PCB, DYNA QL-1 V7C.14 string in ROM + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "rom9.16f", 0x0000, 0x1000, CRC(90b700aa) SHA1(9abdedf144f631f21853e7df8f533a5b0d4bf43e) ) + ROM_CONTINUE( 0x4000, 0x1000 ) + ROM_CONTINUE( 0x3000, 0x1000 ) + ROM_CONTINUE( 0x7000, 0x1000 ) + ROM_CONTINUE( 0x1000, 0x1000 ) + ROM_CONTINUE( 0x6000, 0x1000 ) + ROM_CONTINUE( 0x2000, 0x1000 ) + ROM_CONTINUE( 0x5000, 0x1000 ) + ROM_CONTINUE( 0x8000, 0x8000 ) + + ROM_REGION( 0x18000, "gfx1", 0 ) + ROM_LOAD( "rom7.3e", 0x00000, 0x8000, CRC(1fa8d85e) SHA1(963570178dfb359c6ef4c322791de8f08306eb0c) ) + ROM_LOAD( "rom6.2e", 0x08000, 0x8000, CRC(36dfbbcb) SHA1(8dee44f4b007a41b67e2d4eb75b88b02b9118be0) ) + ROM_LOAD( "rom5.1e", 0x10000, 0x8000, CRC(2350e482) SHA1(03c4a83fb5b544d061378db319ff652a2c053062) ) + + ROM_REGION( 0x8000, "gfx2", 0 ) + ROM_LOAD( "rom4.3f", 0x0000, 0x2000, CRC(2d044e6b) SHA1(7ca60cca8de2c368ca43f1ce54a5140a3dd1ee37) ) + ROM_LOAD( "rom3.2f", 0x2000, 0x2000, CRC(e7e300c2) SHA1(b21926d41aa9d27c78fbf28efd86ac070891a7bb) ) + ROM_LOAD( "rom2.3h", 0x4000, 0x2000, CRC(955d0517) SHA1(3662f97996f80ef9093936dfe0a73de5f6850294) ) + ROM_LOAD( "rom1.2h", 0x6000, 0x2000, CRC(188fc72b) SHA1(501afe548dc279c5f77d9827d0a073875fa7a64f) ) + + ROM_REGION( 0x10000, "user1", 0 ) // girl bitmaps + ROM_LOAD( "rom8.10c", 0x0000, 0x10000, BAD_DUMP CRC(e92443d3) SHA1(4b6ca4521841610054165f085ae05510e77af191) ) // dump not included, but present on PCB pic + + ROM_REGION( 0x200, "proms", 0 ) + ROM_LOAD( "b12.16c", 0x0000, 0x0100, BAD_DUMP CRC(0489b760) SHA1(78f8632b17a76335183c5c204cdec856988368b0) ) // dump not included, but present on PCB pic + ROM_LOAD( "b12.15c", 0x0100, 0x0100, BAD_DUMP CRC(21eb5b19) SHA1(9b8425bdb97f11f4855c998c7792c3291fd07470) ) // dump not included, but present on PCB pic + + ROM_REGION( 0x100, "proms2", 0 ) + ROM_LOAD( "b11.9e", 0x0000, 0x0100, BAD_DUMP CRC(50ec383b) SHA1(ae95b92bd3946b40134bcdc22708d5c6b0f4c23e) ) // dump not included, but present on PCB pic +ROM_END + ROM_START( srmagic ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "real magic.u81", 0x00000, 0x10000, CRC(93ef9f6a) SHA1(ad482b5df9de02a245567642d20f51da2ec2dfed) ) @@ -13810,7 +13984,7 @@ ROM_START( cmast91 ) ROM_LOAD( "pld4.bin", 0x0600, 0x0104, NO_DUMP ) ROM_END -ROM_START( cll ) // Dyna D9004 PCB +ROM_START( cll ) // Dyna D9004 PCB, DYNA CLLB V1.30 string in ROM ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "cll_80_t.bin", 0x0000, 0x1000, CRC(62d386db) SHA1(9a061e80d78ed13a6dae59e447c138b0f5e5d892) ) // M27512 ROM_CONTINUE( 0x4000, 0x1000 ) @@ -15141,6 +15315,36 @@ ROM_START( ns8linesa ) ROM_END +ROM_START( f16s8l) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "f17.b14", 0x0000, 0x8000, CRC(5384e190) SHA1(9ef9b44206b258f5850d05c1b6aa738131842a50) ) + + ROM_REGION( 0x18000, "gfx1", 0 ) + ROM_LOAD( "5.bin", 0x00000, 0x8000, CRC(994a9894) SHA1(4063c2c5e111f24a85df1665fd3f9fbb20fda4da) ) + ROM_LOAD( "6.bin", 0x08000, 0x8000, CRC(80888d64) SHA1(91ec96709df77c534d381e391839984a88aeb1e0) ) + ROM_LOAD( "7.bin", 0x10000, 0x8000, CRC(255d5860) SHA1(f171fde3d542594132b38b44300f750d45fb67a2) ) + + ROM_REGION( 0x8000, "gfx2", 0 ) + ROM_LOAD( "1.bin", 0x0000, 0x2000, CRC(b45f41e2) SHA1(890c94c802f5ada97bc73f5a7a09e69c3207966c) ) + ROM_LOAD( "2.bin", 0x2000, 0x2000, CRC(0463413a) SHA1(061b8335fdd44767e8c1832f5b5101276ad0f689) ) + ROM_LOAD( "3.bin", 0x4000, 0x2000, CRC(6be213c8) SHA1(bf5a002961b0827581cbab4249321ae5b51316f0) ) + ROM_LOAD( "4.bin", 0x6000, 0x2000, CRC(0a25964b) SHA1(d41eda201bb01229fb6e2ff437196dd65eebe577) ) + + // PROMs weren't provided for this set, taken from other set with same GFX ROMs, so should be good + ROM_REGION( 0x200, "proms", 0 ) + ROM_LOAD( "2.13g", 0x0000, 0x0100, CRC(23e81049) SHA1(78071dae70fad870e972d944642fb3a2374be5e4) ) + ROM_LOAD( "1.14g", 0x0100, 0x0100, CRC(526cf9d3) SHA1(eb779d70f2507d0f26d225ac8f5de8f2243599ca) ) + + ROM_REGION( 0x20, "proms2", 0 ) + ROM_LOAD( "4.13d", 0x0000, 0x0020, CRC(c6b41352) SHA1(d7c3b5aa32e4e456c9432a13bede1db6d62eb270) ) + + ROM_REGION( 0x100, "unkprom", 0 ) + ROM_LOAD( "3.3f", 0x0000, 0x0100, CRC(1d668d4a) SHA1(459117f78323ea264d3a29f1da2889bbabe9e4be) ) + + ROM_REGION( 0x20, "unkprom2", 0 ) + ROM_LOAD( "5.12d", 0x0000, 0x0020, CRC(6df3f972) SHA1(0096a7f7452b70cac6c0752cb62e24b643015b5c) ) +ROM_END + /* Super 97-2 @@ -18528,6 +18732,18 @@ ROM_START( cmast97 ) ROM_LOAD( "82s135.c9", 0x100, 0x100, CRC(85883486) SHA1(adcee60f6fc1e8a75c529951df9e5e1ee277e131) ) ROM_END +ROM_START( cmast97a ) // D9503 DYNA + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD16_WORD( "c97.f10", 0x00000, 0x10000, CRC(fa0a6e69) SHA1(6d75cb4b4d16ae84dab55433d439f5d24fd52ed9) ) + + ROM_REGION( 0x080000, "gfx", 0 ) + ROM_LOAD( "c97.d9", 0x000000, 0x80000, CRC(c2c14738) SHA1(dd378cb77a7214ffe5fd9ba1dcbc54f6802b0e41) ) + + ROM_REGION( 0x200, "proms", 0 ) // bad decoded + ROM_LOAD( "82s135.c8", 0x000, 0x100, CRC(4b715969) SHA1(9429dc8698f4ff9195e5e975e62546b7b7e2f856) ) + ROM_LOAD( "82s135.c9", 0x100, 0x100, CRC(85883486) SHA1(adcee60f6fc1e8a75c529951df9e5e1ee277e131) ) +ROM_END + ROM_START( cmast97i ) // D9503 DYNA ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD16_WORD( "c97_14i.f10", 0x00000, 0x10000, CRC(db5132ba) SHA1(5635bf0fc959cbc9b305de31fdd004458338dae7) ) @@ -18587,6 +18803,25 @@ ROM_START( eldoraddo ) // String "DYNA ELD3 V1.1TA" on program ROM ROM_LOAD( "pal16l8.e11", 0x200, 0x104, NO_DUMP ) ROM_END +// DYNA D9105 PCB with Sharp LH0080B (Z80B) CPU and 2 customs (DYNA DC4000 and DYNA 22A078803), 5x 8-dips, XTAL 24 MHz. +// Seems to be using a different GFX hardware +ROM_START( eldoraddoc ) // String "DYNA ELD3 V1.1J" in program ROM + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD16_WORD( "nel.20d.14c", 0x00000, 0x10000, CRC(fee901b9) SHA1(d304fd5ea39cada5787c9f742f6b7801cf12670c) ) + + ROM_REGION( 0x100000, "gfx", 0 ) + ROM_LOAD( "tc538000p-dyna dm9106.g15", 0x000000, 0x100000, CRC(fa84c372) SHA1(a71e57e76321b7ebb16933d9bc983b9160995b4a) ) + + ROM_REGION( 0x300, "proms", 0 ) + ROM_LOAD( "mb7114.e8", 0x000, 0x100, CRC(fa274678) SHA1(6712cb1f7ead1a7aa703ec799e7199c33ace857c) ) + ROM_LOAD( "mb7114.e10", 0x100, 0x100, CRC(e58877ea) SHA1(30fa873fc05d91610ef68eef54b78f2c7301a62a) ) + ROM_LOAD( "mb7114.e12", 0x200, 0x100, CRC(781b2842) SHA1(566667d4f81e93b29bb01dbc51bf144c02dff75d) ) + + ROM_REGION( 0x400, "plds", 0 ) // available as brute-forced dumps, need to be verified and converted + ROM_LOAD( "pal16l8.d13", 0x000, 0x104, NO_DUMP ) + ROM_LOAD( "pal16l8.e11", 0x200, 0x104, NO_DUMP ) +ROM_END + // DYNA D9101 PCB with Z0840006VSC CPU and 2 customs (scratched), AY38910A/P, 6x 8-dip banks, XTAL 12 MHz. ROM_START( eldoraddoa ) // String "DYNA ELD2 V1.4D" in program ROM. The two dumps are nearly identical, but preserving both for now until it can be determined what the (very small) differences are ROM_REGION( 0x10000, "maincpu", 0 ) @@ -19280,6 +19515,32 @@ ROM_START( bonusch ) ROM_LOAD( "tbp24s10.4h", 0x0200, 0x0100, CRC(cbf0062d) SHA1(f49dfca34d2eb86b5ff16872fab23d3e3a10be9a) ) ROM_END +ROM_START( bonuscha ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "rom5.1u", 0x00000, 0x10000, CRC(9395bfaa) SHA1(aec2bb78ce3fbcaebe9cddc5519ca47fb29455c7) ) + + ROM_REGION( 0x1000, "mcu", 0 ) + ROM_LOAD( "0.5p", 0x0000, 0x1000, NO_DUMP ) + + ROM_REGION( 0x20000, "gfx1", 0 ) + ROM_LOAD( "1.1c", 0x00000, 0x10000, CRC(33ce67c0) SHA1(8f3d7e78a4616bebafed2779b7f793d41576c9c8) ) + ROM_LOAD( "2.1e", 0x10000, 0x10000, CRC(fc394767) SHA1(645bf0e60a7061771aa73bb4d10603eaaad17f20) ) + + ROM_REGION( 0x20000, "gfx2", 0 ) + ROM_LOAD( "3.1m", 0x00000, 0x10000, CRC(2acac012) SHA1(59d879214c4e473fa6fedb4a08dcd9b3c6a881a3) ) + ROM_LOAD( "4.1p", 0x10000, 0x10000, CRC(530bdec2) SHA1(2ce0993386fe6b165363a053b54fc66d8bf385d7) ) + + ROM_REGION( 0x300, "proms", 0 ) + ROM_LOAD( "tbp24s10.3e", 0x0000, 0x0100, CRC(f8d160c5) SHA1(a3cb9c4337f4f030d62e74ccc882052959b1fa4f) ) + ROM_LOAD( "tbp24s10.3f", 0x0100, 0x0100, CRC(bbc03eb2) SHA1(c0e44df0ec8268344f59965e3b9d62a4dca2ebb2) ) + ROM_LOAD( "tbp24s10.3h", 0x0200, 0x0100, CRC(77b2585d) SHA1(898302f9a0bd8e354794087461f8f1103bb63783) ) + + ROM_REGION( 0x300, "proms2", 0 ) + ROM_LOAD( "tbp24s10.4e", 0x0000, 0x0100, CRC(06fa2649) SHA1(b2f17d37826317ccad19d535cd5afeedb143778b) ) + ROM_LOAD( "tbp24s10.4f", 0x0100, 0x0100, CRC(38000593) SHA1(e0113590cb2dc338d61ae2e7e92b1046c5c2d19f) ) + ROM_LOAD( "tbp24s10.4h", 0x0200, 0x0100, CRC(cbf0062d) SHA1(f49dfca34d2eb86b5ff16872fab23d3e3a10be9a) ) +ROM_END + /* Fever Chance Wing 19?? (1986 in ROM). @@ -19289,7 +19550,9 @@ Wing license seal but Eagle labeled ROMs 1 x Z80 3 x I8255A 3 x SN76489AN -1 x unknown at 8d (possibly battery backed RAM) +1 x SM7831 at 8d (CMOS-LSI arithmetic processor) + +The Taiwan set doesn't have the SM7831 (hacked not to use it?) */ ROM_START( feverch ) @@ -19301,23 +19564,82 @@ ROM_START( feverch ) ROM_LOAD( "cf19.8h", 0x08000, 0x08000, CRC(f0229490) SHA1(665d335cc030a0cbec0c11c685a6f1e2f9706989) ) ROM_LOAD( "cf20.10h", 0x10000, 0x08000, CRC(1d831a06) SHA1(42d235b8dd894d38579886940a3e13adb843e00d) ) - ROM_REGION( 0x10000, "gfx2", 0 ) - ROM_LOAD( "cf1.1h", 0x00000, 0x02000, CRC(5f022073) SHA1(2e154837834cc9db452279b4933900234b568565) ) // 1st and 2nd half identical - ROM_CONTINUE(0x00000, 0x02000) - ROM_LOAD( "cf2.2h", 0x02000, 0x02000, CRC(e8f927b9) SHA1(29dec2f21a1bea250a4a2d75fab8d03a1fc70bcd) ) // 1st and 2nd half identical - ROM_CONTINUE(0x02000, 0x02000) - ROM_LOAD( "cf3.4h", 0x04000, 0x02000, CRC(79b06e00) SHA1(18f73527714914edb57e22909c95f2c764223900) ) // 1st and 2nd half identical - ROM_CONTINUE(0x04000, 0x02000) - ROM_LOAD( "cf4.5h", 0x06000, 0x02000, CRC(7f73744e) SHA1(7c07095f7ec4302a4839a279c755979ec10e0715) ) // 1st and 2nd half identical - ROM_CONTINUE(0x06000, 0x02000) - - // PROMs not dumped, taken from lucky8 + ROM_REGION( 0x8000, "gfx2", 0 ) + ROM_LOAD( "cf1.1h", 0x0000, 0x2000, CRC(5f022073) SHA1(2e154837834cc9db452279b4933900234b568565) ) // 1ST AND 2ND HALF IDENTICAL + ROM_CONTINUE( 0x0000, 0x2000 ) + ROM_LOAD( "cf2.2h", 0x2000, 0x2000, CRC(e8f927b9) SHA1(29dec2f21a1bea250a4a2d75fab8d03a1fc70bcd) ) // 1ST AND 2ND HALF IDENTICAL + ROM_CONTINUE( 0x2000, 0x2000 ) + ROM_LOAD( "cf3.4h", 0x4000, 0x2000, CRC(79b06e00) SHA1(18f73527714914edb57e22909c95f2c764223900) ) // 1ST AND 2ND HALF IDENTICAL + ROM_CONTINUE( 0x4000, 0x2000 ) + ROM_LOAD( "cf4.5h", 0x6000, 0x2000, CRC(7f73744e) SHA1(7c07095f7ec4302a4839a279c755979ec10e0715) ) // 1ST AND 2ND HALF IDENTICAL + ROM_CONTINUE( 0x6000, 0x2000 ) + ROM_REGION( 0x200, "proms", 0 ) - ROM_LOAD( "d12", 0x0000, 0x0100, BAD_DUMP CRC(23e81049) SHA1(78071dae70fad870e972d944642fb3a2374be5e4) ) - ROM_LOAD( "prom4", 0x0100, 0x0100, BAD_DUMP CRC(526cf9d3) SHA1(eb779d70f2507d0f26d225ac8f5de8f2243599ca) ) + ROM_LOAD_NIB_LOW( "82s129.11f", 0x000, 0x100, CRC(0a15ccc6) SHA1(7915e2cbfe4264cab42a780364ca56038412a249) ) + ROM_LOAD_NIB_HIGH( "82s129.12f", 0x000, 0x100, CRC(5b826df5) SHA1(c6e8ffec328f1bb8acdcad70d7045f96cc150166) ) + ROM_LOAD( "82s123.13f", 0x080, 0x020, CRC(82b2660a) SHA1(af4a8f4560ec22a7adda1f590651d6a84f894314) ) - ROM_REGION( 0x20, "proms2", 0 ) - ROM_LOAD( "d13", 0x0000, 0x0020, BAD_DUMP CRC(c6b41352) SHA1(d7c3b5aa32e4e456c9432a13bede1db6d62eb270) ) + ROM_REGION( 0x120, "unkproms", 0 ) + ROM_LOAD( "82s129.4e", 0x000, 0x0100, CRC(7edb311b) SHA1(8e7f933313dc7a1f2a5e8803c26953ced3f798d0) ) // same as megaline + ROM_LOAD( "82s123.10d", 0x100, 0x0020, CRC(71670863) SHA1(bd0d18c55774db7720413632d130cf3790fca1ad) ) +ROM_END + +ROM_START( fevercha ) + ROM_REGION( 0x10000, "maincpu", 0 ) // only a small data table changes wrt feverch + ROM_LOAD( "main.c11", 0x00000, 0x8000, CRC(29661207) SHA1(9092a528c630224e7abb2419db8ec6d6a5153bed) ) + + ROM_REGION( 0x18000, "gfx1", 0 ) // slightly different wrt feverch + ROM_LOAD( "7h", 0x00000, 0x08000, CRC(ef8bbc3f) SHA1(6787e9320f8d13d4b35e73befaffc251b6b5db65) ) + ROM_LOAD( "8h", 0x08000, 0x08000, CRC(7195d1cc) SHA1(cd7d55251cb1ce64dd4f9e9181acd7885317130c) ) + ROM_LOAD( "10h", 0x10000, 0x08000, CRC(343182c7) SHA1(227f0db85a7191cfb90a12402c8107537e8ca6db) ) + + ROM_REGION( 0x8000, "gfx2", 0 ) + ROM_LOAD( "1h", 0x0000, 0x2000, CRC(5f022073) SHA1(2e154837834cc9db452279b4933900234b568565) ) // 1ST AND 2ND HALF IDENTICAL + ROM_CONTINUE( 0x0000, 0x2000 ) + ROM_LOAD( "2h", 0x2000, 0x2000, CRC(e8f927b9) SHA1(29dec2f21a1bea250a4a2d75fab8d03a1fc70bcd) ) // 1ST AND 2ND HALF IDENTICAL + ROM_CONTINUE( 0x2000, 0x2000 ) + ROM_LOAD( "4h", 0x4000, 0x2000, CRC(79b06e00) SHA1(18f73527714914edb57e22909c95f2c764223900) ) // 1ST AND 2ND HALF IDENTICAL + ROM_CONTINUE( 0x4000, 0x2000 ) + ROM_LOAD( "5h", 0x6000, 0x2000, CRC(7f73744e) SHA1(7c07095f7ec4302a4839a279c755979ec10e0715) ) // 1ST AND 2ND HALF IDENTICAL + ROM_CONTINUE( 0x6000, 0x2000 ) + + ROM_REGION( 0x200, "proms", 0 ) + ROM_LOAD_NIB_LOW( "82s129.11f", 0x000, 0x100, CRC(0a15ccc6) SHA1(7915e2cbfe4264cab42a780364ca56038412a249) ) + ROM_LOAD_NIB_HIGH( "82s129.12f", 0x000, 0x100, CRC(5b826df5) SHA1(c6e8ffec328f1bb8acdcad70d7045f96cc150166) ) + ROM_LOAD( "82s123.13f", 0x080, 0x020, CRC(82b2660a) SHA1(af4a8f4560ec22a7adda1f590651d6a84f894314) ) + + ROM_REGION( 0x120, "unkproms", 0 ) + ROM_LOAD( "82s129.4e", 0x000, 0x0100, CRC(7edb311b) SHA1(8e7f933313dc7a1f2a5e8803c26953ced3f798d0) ) // same as megaline + ROM_LOAD( "82s123.10d", 0x100, 0x0020, CRC(71670863) SHA1(bd0d18c55774db7720413632d130cf3790fca1ad) ) +ROM_END + +ROM_START( feverchtw ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "main_tw.c11", 0x00000, 0x8000, CRC(a38376d8) SHA1(34b1966becae4adbde5554db95707683157d4fa4) ) + + ROM_REGION( 0x18000, "gfx1", 0 ) + ROM_LOAD( "7h", 0x00000, 0x08000, CRC(ef8bbc3f) SHA1(6787e9320f8d13d4b35e73befaffc251b6b5db65) ) + ROM_LOAD( "8h", 0x08000, 0x08000, CRC(7195d1cc) SHA1(cd7d55251cb1ce64dd4f9e9181acd7885317130c) ) + ROM_LOAD( "10h", 0x10000, 0x08000, CRC(343182c7) SHA1(227f0db85a7191cfb90a12402c8107537e8ca6db) ) + + ROM_REGION( 0x8000, "gfx2", 0 ) + ROM_LOAD( "1h", 0x0000, 0x2000, CRC(5f022073) SHA1(2e154837834cc9db452279b4933900234b568565) ) // 1ST AND 2ND HALF IDENTICAL + ROM_CONTINUE( 0x0000, 0x2000 ) + ROM_LOAD( "2h", 0x2000, 0x2000, CRC(e8f927b9) SHA1(29dec2f21a1bea250a4a2d75fab8d03a1fc70bcd) ) // 1ST AND 2ND HALF IDENTICAL + ROM_CONTINUE( 0x2000, 0x2000 ) + ROM_LOAD( "4h", 0x4000, 0x2000, CRC(79b06e00) SHA1(18f73527714914edb57e22909c95f2c764223900) ) // 1ST AND 2ND HALF IDENTICAL + ROM_CONTINUE( 0x4000, 0x2000 ) + ROM_LOAD( "5h", 0x6000, 0x2000, CRC(7f73744e) SHA1(7c07095f7ec4302a4839a279c755979ec10e0715) ) // 1ST AND 2ND HALF IDENTICAL + ROM_CONTINUE( 0x6000, 0x2000 ) + + ROM_REGION( 0x200, "proms", 0 ) + ROM_LOAD_NIB_LOW( "82s129.12f", 0x000, 0x100, CRC(5b826df5) SHA1(c6e8ffec328f1bb8acdcad70d7045f96cc150166) ) + ROM_LOAD_NIB_HIGH( "82s129.11f", 0x000, 0x100, CRC(0a15ccc6) SHA1(7915e2cbfe4264cab42a780364ca56038412a249) ) + ROM_LOAD( "82s123.13f", 0x080, 0x020, CRC(82b2660a) SHA1(af4a8f4560ec22a7adda1f590651d6a84f894314) ) + + ROM_REGION( 0x120, "unkproms", 0 ) + ROM_LOAD( "82s129.4e", 0x000, 0x0100, CRC(7edb311b) SHA1(8e7f933313dc7a1f2a5e8803c26953ced3f798d0) ) // same as megaline + ROM_LOAD( "82s123.10d", 0x100, 0x0020, CRC(71670863) SHA1(bd0d18c55774db7720413632d130cf3790fca1ad) ) ROM_END /* @@ -22426,6 +22748,7 @@ GAME( 199?, moonlght, goldstar, moonlght, goldstar, goldstar_state, empty_ini GAME( 199?, moonlghta, goldstar, moonlght, goldstar, goldstar_state, empty_init, ROT0, "bootleg", "Moon Light (v.0629, high program)", 0 ) GAME( 199?, moonlghtb, goldstar, moonlght, goldstar, goldstar_state, empty_init, ROT0, "bootleg", "Moon Light (v.02L0A, low program)", MACHINE_IMPERFECT_COLORS ) // need to check the odd palette value at 0xc780. should be black. GAME( 199?, moonlghtc, goldstar, moonlght, goldstar, goldstar_state, empty_init, ROT0, "bootleg", "Moon Light (v.02L0A, high program, alt gfx)", MACHINE_IMPERFECT_COLORS ) // need to check the odd palette value at 0xc780. should be black. +GAME( 199?, gregular, goldstar, moonlght, goldstar, goldstar_state, empty_init, ROT0, "bootleg (Playmark)","Golden Regular (version 388/2000)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_COLORS ) // I/O needs checking GAMEL( 199?, chrygld, 0, chrygld, chrygld, cb3_state, init_chrygld, ROT0, "bootleg", "Cherry Gold I (set 1)", 0, layout_chrygld ) GAMEL( 199?, chry10, 0, chrygld, chry10, cb3_state, init_chry10, ROT0, "bootleg", "Cherry 10 (bootleg with PIC16F84)", 0, layout_chrygld ) GAME( 199?, goldfrui, goldstar, goldfrui, goldstar, goldstar_state, empty_init, ROT0, "bootleg", "Gold Fruit", 0 ) // maybe fullname should be 'Gold Fruit (main 40%)' @@ -22444,6 +22767,7 @@ GAMEL( 199?, cb3d, ncb3, ncb3, ncb3, cb3_state, empty_ini GAMEL( 199?, cb3e, ncb3, cb3e, chrygld, cb3_state, init_cb3e, ROT0, "bootleg", "Cherry Bonus III (set 4, encrypted bootleg)", 0, layout_chrygld ) GAMEL( 199?, cb3f, ncb3, ncb3, ncb3, cb3_state, init_cb3f, ROT0, "bootleg (Cleco)", "Cherry Bonus III (set 5, encrypted bootleg)", MACHINE_NOT_WORKING, layout_chrygld ) // partially decrypted, stops at 'call attendant' GAMEL( 199?, cb3g, ncb3, ncb3, ncb3, cb3_state, init_cb3g, ROT0, "Dyna", "Cherry Bonus III (ver.1.40, set 6)", 0, layout_cherryb3 ) +GAMEL( 199?, cb3h, ncb3, ncb3, ncb3, cb3_state, init_cb3, ROT0, "Dyna", "Cherry Bonus III (ver.1.40, set 7)", 0, layout_cherryb3 ) GAMEL( 199?, chryglda, ncb3, cb3e, chrygld, cb3_state, init_cb3e, ROT0, "bootleg", "Cherry Gold I (set 2, encrypted bootleg)", 0, layout_chrygld ) // Runs in CB3e hardware. GAME( 1994, chryangla, ncb3, chryangla,ncb3, cb3_state, init_chryangl, ROT0, "bootleg (G.C.I.)", "Cherry Angel (encrypted, W-4 hardware)", MACHINE_NOT_WORKING ) // DYNA CB3 V1.40 string, decrypted but only test screens work @@ -22482,6 +22806,10 @@ GAMEL( 1991, cmasterh, cmaster, cm, cmasterh, cmaster_state, init_cmv4 GAMEL( 1991, cmasteri, cmaster, cm, cmasterb, cmaster_state, init_cmv4, ROT0, "Dyna", "Cherry Master I (ver.1.01, set 9)", 0, layout_cmasterb ) // NMC27CP128Q being 32k x8 instead of 16k x8... GAMEL( 1991, cmasterj, cmaster, cm, cmasterb, cmaster_state, init_cmv4, ROT0, "Dyna", "Cherry Master I (ver.1.01, set 10, BET stops all)", 0, layout_cmasterb ) GAMEL( 1991, cmasterk, cmaster, cm, cmasterb, cmaster_state, init_cmv4, ROT0, "Dyna", "Cherry Master I (ver.1.01, set 11, TAKE stops all)", 0, layout_cmasterb ) +GAMEL( 1991, cmasterl, cmaster, cm, cmasterb, cmaster_state, init_cmv4, ROT0, "Dyna", "Cherry Master I (ver.1.01, set 12)", 0, layout_cmasterb ) +GAMEL( 1991, cutyline, 0, cm, cmasterb, cmaster_state, init_cmv4, ROT0, "Dyna", "Cuty Line (ver.1.01)", 0, layout_cmasterb ) +GAMEL( 1991, cutylinea, cutyline, cm, cmasterb, cmaster_state, init_cmv4, ROT0, "bootleg", "Cuty Line (LC-88 bootleg, ver.8.05C)", MACHINE_NOT_WORKING, layout_cmasterb ) // needs correct memory map +GAMEL( 1991, cutylineb, cutyline, cm, cmasterb, cmaster_state, init_cmv4, ROT0, "bootleg", "Cuty Line (LC-88 bootleg, ver.7C.14)", MACHINE_NOT_WORKING, layout_cmasterb ) // needs correct memory map GAMEL( 199?, super7, cmaster, super7, cmaster, cmaster_state, init_super7, ROT0, "bootleg", "Super Seven", MACHINE_NOT_WORKING, layout_cmasterb ) // bad palette, no reels, decryption might be missing something, too GAME ( 199?, wcat3a, wcat3, chryangl, cmaster, cmaster_state, init_wcat3a, ROT0, "E.A.I.", "Wild Cat 3 (CMV4 hardware)", MACHINE_NOT_WORKING ) // does not boot. Wrong decryption, wrong machine or wrong what? GAMEL( 199?, ll3, cmaster, cm, cmasterb, cmaster_state, init_ll3, ROT0, "bootleg", "Lucky Line III", MACHINE_NOT_WORKING, layout_cmasterb ) // not looked at yet @@ -22507,7 +22835,9 @@ GAME( 1992, cmast92a, cmast92, eldoradd, cmast91, cmaster_state, init_cmas GAME( 1991, eldoradd, 0, eldoradd, cmast91, cmaster_state, empty_init, ROT0, "Dyna", "El Dorado (V5.1DR)", MACHINE_NOT_WORKING ) // different GFX hw? Game is running and sounds play GAME( 1991, eldoraddo, eldoradd, eldoradd, cmast91, cmaster_state, empty_init, ROT0, "Dyna", "El Dorado (V1.1TA)", MACHINE_NOT_WORKING ) // different GFX hw? GAME( 1991, eldoraddob, eldoradd, eldoradd, cmast91, cmaster_state, empty_init, ROT0, "Dyna", "El Dorado (V2.0D)", MACHINE_NOT_WORKING ) // different GFX hw? -GAME( 1996, cmast97, 0, cm97, cmv801, cmaster_state, empty_init, ROT0, "Dyna", "Cherry Master '97 (V1.7)", MACHINE_NOT_WORKING ) // fix prom decode, reels +GAME( 1991, eldoraddoc, eldoradd, eldoradd, cmast91, cmaster_state, empty_init, ROT0, "Dyna", "El Dorado (V1.1J)", MACHINE_NOT_WORKING ) // different GFX hw? +GAME( 1996, cmast97, 0, cm97, cmv801, cmaster_state, empty_init, ROT0, "Dyna", "Cherry Master '97 (V1.7, set 1)", MACHINE_NOT_WORKING ) // fix prom decode, reels +GAME( 1996, cmast97a, cmast97, cm97, cmv801, cmaster_state, empty_init, ROT0, "Dyna", "Cherry Master '97 (V1.7, set 2)", MACHINE_NOT_WORKING ) // fix prom decode, reels GAME( 1996, cmast97i, cmast97, cm97, cmv801, cmaster_state, empty_init, ROT0, "Dyna", "Cheri Mondo '97 (V1.4I)", MACHINE_NOT_WORKING ) // fix prom decode, reels GAME( 1999, cmast99, 0, cm, cmast99, cmaster_state, init_cmv4, ROT0, "Dyna", "Cherry Master '99 (V9B.00)", MACHINE_NOT_WORKING ) GAME( 1999, cmast99b, cmast99, cm, cmast99, cmaster_state, init_cmv4, ROT0, "bootleg", "Cherry Master '99 (V9B.00 bootleg / hack)", MACHINE_NOT_WORKING ) @@ -22537,6 +22867,7 @@ GAMEL( 198?, ns8lines, 0, lucky8, lucky8b, wingco_state, empty_ini GAMEL( 1985, ns8linesa, ns8lines, lucky8, lucky8b, wingco_state, empty_init, ROT0, "Yamate (bootleg)", "New Lucky 8 Lines / New Super 8 Lines (W-4, Lucky97 HW)", 0, layout_lucky8p1 ) // only 1 control set... GAMEL( 198?, ns8linew, ns8lines, lucky8, ns8linew, wingco_state, empty_init, ROT0, "", "New Lucky 8 Lines / New Super 8 Lines (F-5, Witch Bonus)", 0, layout_lucky8 ) // 2 control sets... GAMEL( 198?, ns8linewa, ns8lines, lucky8, ns8linwa, wingco_state, empty_init, ROT0, "", "New Lucky 8 Lines / New Super 8 Lines (W-4, Witch Bonus)", 0, layout_lucky8p1 ) // only 1 control set... +GAMEL( 1989, f16s8l, lucky8, lucky8, lucky8, wingco_state, empty_init, ROT0, "Leisure Ent", "F-16 Super 8 Lines", MACHINE_NOT_WORKING, layout_lucky8 ) // needs I/O check, seems mostly playable GAMEL( 1991, nd8lines, lucky8, nd8lines, nd8lines, wingco_state, init_nd8lines, ROT0, "Yamate (bootleg)", "New Draw 8 Lines (Version 2.1)", MACHINE_NOT_WORKING | MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_SOUND, layout_lucky8 ) // PROM decode wrong, SN emits terrible sound, inputs not done yet GAMEL( 198?, super972, ns8lines, super972, ns8linwa, wingco_state, init_super972, ROT0, "", "Super 97-2 (Witch Bonus)", MACHINE_NOT_WORKING, layout_lucky8p1 ) // decrypted, needs correct inputs GAME( 198?, luckybar, 0, lucky8, ns8linew, wingco_state, empty_init, ROT0, "", "Lucky Bar (W-4 with mc68705 MCU)", MACHINE_NOT_WORKING ) // MC68705 MCU @@ -22570,11 +22901,14 @@ GAME( 199?, fl7_tw, fl7_50, flam7_tw, flaming7, wingco_state, init_flam // --- Wing W-6 hardware --- -GAME( 1986, feverch, 0, feverch, feverch, unkch_state, empty_init, ROT0, "Wing Co., Ltd.", "Fever Chance (W-6)", MACHINE_NOT_WORKING ) // inputs, reels, etc.. +GAME( 1986, feverch, 0, feverch, feverch, goldstar_state, empty_init, ROT0, "Wing Co., Ltd.", "Fever Chance (W-6, Japan, set 1)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING ) // unimplemented arithmetic chip, reels scrolling, I/O +GAME( 1986, fevercha, feverch, feverch, feverch, goldstar_state, empty_init, ROT0, "Wing Co., Ltd.", "Fever Chance (W-6, Japan, set 2)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING ) // unimplemented arithmetic chip, reels scrolling, I/O +GAME( 1986, feverchtw, feverch, feverch, feverch, goldstar_state, empty_init, ROT0, "Yamate", "Fever Chance (W-6, Taiwan)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING ) // reels scrolling, I/O // --- Wing W-8 hardware --- -GAME( 1990, bonusch, 0, bonusch, bonusch, unkch_state, empty_init, ROT0, "Wing Co., Ltd.", "Bonus Chance (W-8)", MACHINE_NOT_WORKING ) // M80C51F MCU +GAME( 1990, bonusch, 0, bonusch, bonusch, unkch_state, empty_init, ROT0, "Wing Co., Ltd.", "Bonus Chance (W-8, set 1)", MACHINE_NOT_WORKING ) // M80C51F MCU +GAME( 1990, bonuscha, bonusch, bonusch, bonusch, unkch_state, empty_init, ROT0, "Wing Co., Ltd.", "Bonus Chance (W-8, set 2)", MACHINE_NOT_WORKING ) // M80C51F MCU // --- Magical Odds hardware --- diff --git a/src/mame/igs/igs_m027.cpp b/src/mame/igs/igs_m027.cpp index 7501eb420adbb..fd60ca0cafe24 100644 --- a/src/mame/igs/igs_m027.cpp +++ b/src/mame/igs/igs_m027.cpp @@ -2467,6 +2467,24 @@ ROM_START( lhdmgp ) // appears to be a different edition of lhzb3 and lthyp (GFX ROM_LOAD( "s2402.u14", 0x000000, 0x100000, CRC(56083fe2) SHA1(62afd651809bf5e639bfda6e5579dbf4b903b664) ) ROM_END +ROM_START( lhdmgp200c3m ) + ROM_REGION( 0x04000, "maincpu", 0 ) + // Internal ROM of IGS027A type G ARM based MCU + ROM_LOAD( "b4_igs027a", 0x00000, 0x4000, CRC(75645f8c) SHA1(738fba64a906f4f10e78e332ad30b8da9dc86b21) ) + + ROM_REGION32_LE( 0x80000, "user1", 0 ) // external ARM data / prg + ROM_LOAD( "lhdmg_plus_prg.u9", 0x000000, 0x80000, CRC(c94cd4ea) SHA1(006bfbd05e913564da6259acf30a18dc3a867703) ) // SLDH + + ROM_REGION( 0x80000, "igs017_igs031:tilemaps", 0 ) + ROM_LOAD( "m2403.u17", 0x000000, 0x80000, CRC(a82398a9) SHA1(4d2987f57096b7f24ce6571ed3be6dcb33bce88d) ) + + ROM_REGION( 0x400000, "igs017_igs031:sprites", 0 ) + ROM_LOAD( "m2401.u18", 0x000000, 0x400000, CRC(81428f18) SHA1(9fb19c8a79cc3443642f4b044e04735df2cb45be) ) // FIXED BITS (xxxxxxxx0xxxxxxx) + + ROM_REGION( 0x100000, "oki", 0 ) + ROM_LOAD( "s2402.u14", 0x000000, 0x100000, CRC(56083fe2) SHA1(62afd651809bf5e639bfda6e5579dbf4b903b664) ) +ROM_END + /* @@ -3232,6 +3250,7 @@ GAME( 1999, slqz3, 0, slqz3, slqz3, igs_m027_stat GAME( 1999, qlgs, 0, qlgs, qlgs, igs_m027_state, init_qlgs, ROT0, "IGS", "Que Long Gaoshou (S501CN)", MACHINE_NODEVICE_LAN ) GAME( 1999, lhdmg, 0, lhdmg, lhdmg, igs_m027_state, init_slqz3, ROT0, "IGS", "Long Hu Da Manguan (V102C3M)", 0 ) GAME( 1999, lhdmgp, 0, lhdmg, lhdmg, igs_m027_state, init_slqz3, ROT0, "IGS", "Long Hu Da Manguan Duizhan Jiaqiang Ban (V400C3M)", 0 ) +GAME( 1999, lhdmgp200c3m, lhdmgp, lhdmg, lhdmg, igs_m027_state, init_slqz3, ROT0, "IGS", "Long Hu Da Manguan Duizhan Jiaqiang Ban (V200C3M)", 0 ) GAME( 1999, lhzb3, 0, lhdmg, lhzb3, igs_m027_state, init_slqz3, ROT0, "IGS", "Long Hu Zhengba III (V400CN)", 0 ) GAME( 1999, lhzb3106c5m, lhzb3, lhzb3106c5m, lhzb3, igs_m027_state, init_slqz3, ROT0, "IGS", "Long Hu Zhengba III (V106C5M)", 0 ) GAME( 1999, lhzb3sjb, 0, lhzb3sjb, lhzb3sjb, igs_m027_state, init_slqz3, ROT0, "IGS", "Long Hu Zhengba III Shengji Ban (V300C5)", 0 ) diff --git a/src/mame/igs/igs_m036.cpp b/src/mame/igs/igs_m036.cpp index d428c1b74f9ae..7a67cfb237801 100644 --- a/src/mame/igs/igs_m036.cpp +++ b/src/mame/igs/igs_m036.cpp @@ -443,6 +443,106 @@ ROM_START( super70s ) ROM_END +ROM_START( jhzb ) + ROM_REGION( 0x4000, "maincpu", 0 ) + // Internal ROM of IGS036 ARM based MCU + ROM_LOAD( "jhzb_igs036", 0x0000, 0x4000, NO_DUMP ) // stickered K7 + + ROM_REGION( 0x10000, "xa:mcu", 0 ) // MX10EXAQC (80C51 XA based MCU) + ROM_LOAD( "xa", 0x00000, 0x10000, NO_DUMP ) + + ROM_REGION32_LE( 0x200000, "user1", 0 ) // external ARM data / prg + ROM_LOAD( "v113cn.u17", 0x000000, 0x200000, CRC(1c08099b) SHA1(125a5302935e8bef8d4a4d8a6db748110bcab692) ) // 11xxxxxxxxxxxxxxxxxxx = 0xFF + + ROM_REGION( 0x200000, "oki", 0 ) // samples + ROM_LOAD( "v113cn.u26", 0x000000, 0x200000, CRC(99fc5dcd) SHA1(e737299d770b0fc3606085a566ad9fbbaca15ff5) ) + + ROM_REGION( 0x1000000, "gfx", 0 ) + ROM_LOAD( "v113cn-cg0-h.u27", 0x000000, 0x800000, CRC(a8fb40e4) SHA1(074ab61158a0baa5811f7d33792bc71051faeb62) ) // FIXED BITS (xxxxxxxx0000xxxx) + ROM_LOAD( "v113cn-cg0-l.u29", 0x800000, 0x800000, CRC(a5f1952c) SHA1(3ae52eb604974414b6b97ff1e0156c39aa05a0cb) ) +ROM_END + + +ROM_START( jxry ) + ROM_REGION( 0x4000, "maincpu", 0 ) + // Internal ROM of IGS036 ARM based MCU + ROM_LOAD( "jhzb_igs036", 0x0000, 0x4000, NO_DUMP ) // stickered A3 + + ROM_REGION( 0x10000, "xa:mcu", 0 ) // MX10EXAQC (80C51 XA based MCU) stickered IL U14 + ROM_LOAD( "xa", 0x00000, 0x10000, NO_DUMP ) + + ROM_REGION32_LE( 0x200000, "user1", 0 ) // external ARM data / prg + ROM_LOAD( "v-116cn.u20", 0x000000, 0x200000, CRC(a8cd3431) SHA1(b978b2e27fc106a02213b6aa42620fbf287a4d24) ) + + ROM_REGION( 0x200000, "oki", 0 ) // samples + ROM_LOAD( "sp.u18", 0x000000, 0x200000, CRC(725950e1) SHA1(7226d3e9c2cb149dae598479cddeb12446944a1e) ) + + ROM_REGION( 0x1000000, "gfx", 0 ) + ROM_LOAD( "cg1.u22", 0x000000, 0x800000, CRC(bfbedd8c) SHA1(f4d97e9633de6dd87f11eade5752881d61a28a38) ) // FIXED BITS (xxxxxxxx0000xxxx) + ROM_LOAD( "cg2.u24", 0x800000, 0x800000, CRC(c40627e5) SHA1(795217425533c569bad868b16e5b31ba29c587fb) ) +ROM_END + + +ROM_START( slqzsp ) + ROM_REGION( 0x4000, "maincpu", 0 ) + // Internal ROM of IGS036 ARM based MCU + ROM_LOAD( "jhzb_igs036", 0x0000, 0x4000, NO_DUMP ) // stickered F8 + + ROM_REGION( 0x10000, "xa:mcu", 0 ) // MX10EXAQC (80C51 XA based MCU) stickered IU U23 + ROM_LOAD( "xa", 0x00000, 0x10000, NO_DUMP ) + + ROM_REGION32_LE( 0x200000, "user1", 0 ) // external ARM data / prg + ROM_LOAD( "v104cn.u18", 0x000000, 0x200000, CRC(7819aa1a) SHA1(c63b375916d0009e065b6239bcc752a56d2ee127) ) + + ROM_REGION( 0x800000, "tt5665", 0 ) // samples + ROM_LOAD( "v104cn.u27", 0x000000, 0x800000, CRC(440617cc) SHA1(87019bde5f0cf2215b6e28434a0593d0b910cbed) ) + + ROM_REGION( 0x1000000, "gfx", 0 ) + ROM_LOAD( "v104cn.u28", 0x000000, 0x800000, CRC(e102b951) SHA1(619cf2aa77996e1831d6ff2116d6ae8045b9066c) ) + ROM_LOAD( "v104cn.u30", 0x800000, 0x800000, CRC(eecf61c6) SHA1(59d330508482dcc0971c5255c6c70c83ba72323c) ) +ROM_END + + +ROM_START( sydh ) // PCB-0802-03-JL + ROM_REGION( 0x4000, "maincpu", 0 ) + // Internal ROM of IGS036 ARM based MCU + ROM_LOAD( "jhzb_igs036", 0x0000, 0x4000, NO_DUMP ) // stickered C3 + + ROM_REGION( 0x10000, "xa:mcu", 0 ) // MX10EXAQC (80C51 XA based MCU) + ROM_LOAD( "xa", 0x00000, 0x10000, NO_DUMP ) + + ROM_REGION32_LE( 0x200000, "user1", 0 ) // external ARM data / prg + ROM_LOAD( "v-104cn.u20", 0x000000, 0x200000, CRC(43219633) SHA1(0f709c700c661f20a3f47c6df5a35aff9eb05bc6) ) + + ROM_REGION( 0x800000, "tt5665", 0 ) // samples + ROM_LOAD( "v-104cn.u31", 0x000000, 0x800000, CRC(794a4ebf) SHA1(b6ea2228fc943dc65514d113c36a1e9d69564e9a) ) // 1xxxxxxxxxxxxxxxxxxxxxx = 0x00 + + ROM_REGION( 0x1000000, "gfx", 0 ) + ROM_LOAD( "v-104cn.u33", 0x000000, 0x800000, CRC(cd8a1633) SHA1(2f63167fe282fc648d9e22c6a32d593f41546ba3) ) + ROM_LOAD( "v-104cn.u34", 0x800000, 0x800000, CRC(cb33469a) SHA1(cf2c52ccc688880574452bc806b80519eeff0298) ) +ROM_END + + +ROM_START( xyddz ) + ROM_REGION( 0x4000, "maincpu", 0 ) + // Internal ROM of IGS036 ARM based MCU + ROM_LOAD( "jhzb_igs036", 0x0000, 0x4000, NO_DUMP ) // stickered K8 + + ROM_REGION( 0x10000, "xa:mcu", 0 ) // MX10EXAQC (80C51 XA based MCU) + ROM_LOAD( "xa", 0x00000, 0x10000, NO_DUMP ) + + ROM_REGION32_LE( 0x200000, "user1", 0 ) // external ARM data / prg + ROM_LOAD( "xyddz.u18", 0x000000, 0x200000, CRC(5c569b88) SHA1(760bb48bb4739ae6f34921b8ed499174a8960001) ) + + ROM_REGION( 0x800000, "tt5665", 0 ) // samples + ROM_LOAD( "m2401.u27", 0x000000, 0x800000, CRC(cfaa177a) SHA1(b1ba246a51c6ec451bcd04392460f7a7ccb75cda) ) + + ROM_REGION( 0x1000000, "gfx", 0 ) + ROM_LOAD( "m2403-cg0-l.u30", 0x000000, 0x800000, CRC(3065ee91) SHA1(9bb1a0a739c244513f7785305aff13c9314a5d16) ) + ROM_LOAD( "s2402-cg0-h.u28", 0x800000, 0x800000, CRC(b0f43dd4) SHA1(5d82fdf3bd5eef1791e7204a040ede06c6028187) ) +ROM_END + + void igs_m036_state::pgm_create_dummy_internal_arm_region(void) { uint16_t *temp16 = (uint16_t *)memregion("maincpu")->base(); @@ -557,25 +657,35 @@ void igs_m036_state::init_igsm312() ***************************************************************************/ -GAME( 200?, cjdh2, 0, igs_m036, igs_m036, igs_m036_state, init_cjdh2, ROT0, "IGS", "Chao Ji Da Heng 2 (V311CN)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) -GAME( 200?, cjdh2a, cjdh2, igs_m036, igs_m036, igs_m036_state, init_cjdh2, ROT0, "IGS", "Chao Ji Da Heng 2 (V311CNA)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) -GAME( 200?, cjdh2b, cjdh2, igs_m036, igs_m036, igs_m036_state, init_cjdh2, ROT0, "IGS", "Chao Ji Da Heng 2 (V311CNB)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) -GAME( 200?, cjdh2c, cjdh2, igs_m036, igs_m036, igs_m036_state, init_cjdh2, ROT0, "IGS", "Chao Ji Da Heng 2 (V215CN)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 200?, cjdh2, 0, igs_m036, igs_m036, igs_m036_state, init_cjdh2, ROT0, "IGS", "Chao Ji Da Heng 2 (V311CN)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 200?, cjdh2a, cjdh2, igs_m036, igs_m036, igs_m036_state, init_cjdh2, ROT0, "IGS", "Chao Ji Da Heng 2 (V311CNA)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 200?, cjdh2b, cjdh2, igs_m036, igs_m036, igs_m036_state, init_cjdh2, ROT0, "IGS", "Chao Ji Da Heng 2 (V311CNB)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 200?, cjdh2c, cjdh2, igs_m036, igs_m036, igs_m036_state, init_cjdh2, ROT0, "IGS", "Chao Ji Da Heng 2 (V215CN)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) + +GAME( 200?, cjddzsp, 0, igs_m036_tt, igs_m036, igs_m036_state, init_cjddzsp, ROT0, "IGS", "Super Dou Di Zhu Special (V122CN)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) + +GAME( 2007, qhzb, 0, igs_m036_tt, igs_m036, igs_m036_state, init_cjddzsp, ROT0, "IGS", "Que Huang Zheng Ba (V100CN)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) + +GAME( 2009, lhtb, 0, igs_m036_tt, igs_m036, igs_m036_state, init_cjddzsp, ROT0, "IGS", "Long Hu Tebie Ban (V101CN)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) // 龍虎特別版 - Lónghǔ tèbié bǎn + +GAME( 200?, lhzb3in1, 0, igs_m036_tt, igs_m036, igs_m036_state, init_cjddzsp, ROT0, "IGS", "Long Hu Zhengba San He Yi (V100CN)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) // 龙虎争霸三合一 + +GAME( 200?, igsm312, 0, igs_m036_tt, igs_m036, igs_m036_state, init_igsm312, ROT0, "IGS", "unknown 'IGS 6POKER2' game (V312CN)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) // there's very little code and no gfx ROMs, might be a 'set/clear' chip for a gambling game. -GAME( 200?, cjddzsp, 0, igs_m036_tt, igs_m036, igs_m036_state, init_cjddzsp, ROT0, "IGS", "Super Dou Di Zhu Special (V122CN)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 200?, super70s, 0, igs_m036_tt, igs_m036, igs_m036_state, init_igsm312, ROT0, "IGS", "Super 70's (V100US)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) -GAME( 2007, qhzb, 0, igs_m036_tt, igs_m036, igs_m036_state, init_cjddzsp, ROT0, "IGS", "Que Huang Zheng Ba (V100CN)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 200?, jhzb, 0, igs_m036, igs_m036, igs_m036_state, init_igs_m036, ROT0, "IGS", "Jin Hua Zheng Ba (V113CN)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) // 金花争霸 -GAME( 2009, lhtb, 0, igs_m036_tt, igs_m036, igs_m036_state, init_cjddzsp, ROT0, "IGS", "Long Hu Tebie Ban (V101CN)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) // 龍虎特別版 - Lónghǔ tèbié bǎn +GAME( 200?, jxry, 0, igs_m036, igs_m036, igs_m036_state, init_igs_m036, ROT0, "IGS", "Ji Xiang Ru Yi (V116CN)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) // 吉祥如意 -GAME( 200?, lhzb3in1, 0, igs_m036_tt, igs_m036, igs_m036_state, init_cjddzsp, ROT0, "IGS", "Long Hu Zhengba San He Yi (V100CN)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) // 龙虎争霸三合一 +GAME( 200?, slqzsp, 0, igs_m036_tt, igs_m036, igs_m036_state, init_igs_m036, ROT0, "IGS", "Shuang Long Qiang Zhu Te Bie Ban (V104CN)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) // 双龙抢珠特别版 -GAME( 200?, igsm312, 0, igs_m036_tt, igs_m036, igs_m036_state, init_igsm312, ROT0, "IGS", "unknown 'IGS 6POKER2' game (V312CN)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) // there's very little code and no gfx ROMs, might be a 'set/clear' chip for a gambling game. +GAME( 200?, sydh, 0, igs_m036_tt, igs_m036, igs_m036_state, init_igs_m036, ROT0, "IGS", "Sha Yu Da Heng (V104CN)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) // 鲨鱼大亨 -GAME( 200?, super70s, 0, igs_m036_tt, igs_m036, igs_m036_state, init_igsm312, ROT0, "IGS", "Super 70's (V100US)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 200?, xyddz, 0, igs_m036_tt, igs_m036, igs_m036_state, init_igs_m036, ROT0, "IGS", "Xiao Yao Dou Di Zhu", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) // 逍遥斗地主 -GAME( 2010, lhfy, 0, igs_m036_tt, igs_m036, igs_m036_state, init_igsm312, ROT0, "IGS", "Long Hu Feng Yun Gao Qing Ban (V206CN)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 2010, lhfy, 0, igs_m036_tt, igs_m036, igs_m036_state, init_igsm312, ROT0, "IGS", "Long Hu Feng Yun Gao Qing Ban (V206CN)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) -GAME( 2010, lhzbgqb, 0, igs_m036_tt, igs_m036, igs_m036_state, init_igsm312, ROT0, "IGS", "Long Hu Zheng Ba Gao Qing Ban (V105CN)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 2010, lhzbgqb, 0, igs_m036_tt, igs_m036, igs_m036_state, init_igsm312, ROT0, "IGS", "Long Hu Zheng Ba Gao Qing Ban (V105CN)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) -GAME( 2015, mghammer, 0, igs_m036_tt, igs_m036, igs_m036_state, init_igsm312, ROT0, "IGS / Enheart", "Medal Get Hammer (V100JP)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 2015, mghammer, 0, igs_m036_tt, igs_m036, igs_m036_state, init_igsm312, ROT0, "IGS / Enheart", "Medal Get Hammer (V100JP)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) diff --git a/src/mame/igs/igspoker.cpp b/src/mame/igs/igspoker.cpp index cca80ac697448..192a808eb1b1d 100644 --- a/src/mame/igs/igspoker.cpp +++ b/src/mame/igs/igspoker.cpp @@ -2040,7 +2040,7 @@ ROM_START( csk227it ) ROM_LOAD( "1.bin", 0x20000, 0x10000, CRC(921ad5de) SHA1(b06ab2e63b31361dcb0367110f47bf2453ecdca6) ) ROM_END -ROM_START( csk234it ) +ROM_START( csk234it ) // IGS NO-0139-3 PCB ROM_REGION( 0x20000, "maincpu", 0 ) ROM_LOAD( "v234it.bin", 0x0000, 0x10000, CRC(344b7059) SHA1(990cb84e35c0c50d3be9fbb76a11395114dc6c9b) ) ROM_LOAD( "7.234", 0x10000, 0x10000, CRC(ae6dd4ad) SHA1(4772d5c150d64d1ef3b68e16214f594eea0b3c1b) ) diff --git a/src/mame/igs/spoker.cpp b/src/mame/igs/spoker.cpp index 7f7c162023a7c..7be18e80a4b17 100644 --- a/src/mame/igs/spoker.cpp +++ b/src/mame/igs/spoker.cpp @@ -1685,11 +1685,11 @@ GAME( 1996, spk205us, spk306us, spokeru, spoker, spokeru_state, init_spok GAME( 1996, spk203us, spk306us, spokeru, spoker, spokeru_state, init_spokeru, ROT0, "IGS", "Super Poker (v203US)", MACHINE_SUPPORTS_SAVE ) // LS1. 8 203US in test mode GAME( 1996, spk201ua, spk306us, spokeru, spoker, spokeru_state, init_spokeru, ROT0, "IGS", "Super Poker (v201UA)", MACHINE_SUPPORTS_SAVE ) // still shows 200UA in test mode GAME( 1996, spk200ua, spk306us, spokeru, spoker, spokeru_state, init_spokeru, ROT0, "IGS", "Super Poker (v200UA)", MACHINE_SUPPORTS_SAVE ) -GAME( 1993?, spk120in, spk306us, spoker, spoker, spoker_state, init_spk120in, ROT0, "IGS", "Super Poker (v120IN)", MACHINE_SUPPORTS_SAVE ) -GAME( 1993?, spk116it, spk306us, spoker, spoker, spoker_state, init_spk116it, ROT0, "IGS", "Super Poker (v116IT)", MACHINE_SUPPORTS_SAVE ) -GAME( 1993?, spk116itmx, spk306us, spoker, spoker, spoker_state, init_spk114it, ROT0, "IGS", "Super Poker (v116IT-MX)", MACHINE_SUPPORTS_SAVE ) -GAME( 1993?, spk115it, spk306us, spoker, spoker, spoker_state, init_spk116it, ROT0, "IGS", "Super Poker (v115IT)", MACHINE_SUPPORTS_SAVE ) -GAME( 1993?, spk114it, spk306us, spoker, spk114it, spoker_state, init_spk114it, ROT0, "IGS", "Super Poker (v114IT)", MACHINE_SUPPORTS_SAVE ) +GAME( 1996, spk120in, spk306us, spoker, spoker, spoker_state, init_spk120in, ROT0, "IGS", "Super Poker (v120IN)", MACHINE_SUPPORTS_SAVE ) +GAME( 1996, spk116it, spk306us, spoker, spoker, spoker_state, init_spk116it, ROT0, "IGS", "Super Poker (v116IT)", MACHINE_SUPPORTS_SAVE ) +GAME( 1996, spk116itmx, spk306us, spoker, spoker, spoker_state, init_spk114it, ROT0, "IGS", "Super Poker (v116IT-MX)", MACHINE_SUPPORTS_SAVE ) +GAME( 1996, spk115it, spk306us, spoker, spoker, spoker_state, init_spk116it, ROT0, "IGS", "Super Poker (v115IT)", MACHINE_SUPPORTS_SAVE ) +GAME( 1996, spk114it, spk306us, spoker, spk114it, spoker_state, init_spk114it, ROT0, "IGS", "Super Poker (v114IT)", MACHINE_SUPPORTS_SAVE ) GAME( 1996, spk102ua, spk306us, spokeru, spoker, spokeru_state, init_spokeru, ROT0, "IGS", "Super Poker (v102UA)", MACHINE_SUPPORTS_SAVE ) GAME( 1996, spk100, spk306us, spoker, spk114it, spoker_state, init_spk100, ROT0, "IGS", "Super Poker (v100)", MACHINE_SUPPORTS_SAVE ) GAME( 1993?, 3super8, 0, _3super8, 3super8, spoker_state, init_3super8, ROT0, "", "3 Super 8 (Italy)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // ROMs are badly dumped diff --git a/src/mame/irem/m72.cpp b/src/mame/irem/m72.cpp index 225c856fbde51..18930bd6a4436 100644 --- a/src/mame/irem/m72.cpp +++ b/src/mame/irem/m72.cpp @@ -1099,9 +1099,9 @@ static INPUT_PORTS_START( bchopper ) PORT_DIPSETTING( 0x0002, "2" ) PORT_DIPSETTING( 0x0003, "3" ) PORT_DIPSETTING( 0x0001, "4" ) - PORT_DIPNAME( 0x0004, 0x0000, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:3") - PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:3") + PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0004, DEF_STR( On ) ) PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW1:4") PORT_DIPSETTING( 0x0008, "80K 200K 350K" ) PORT_DIPSETTING( 0x0000, "100K 250K 400K" ) @@ -1507,16 +1507,16 @@ static INPUT_PORTS_START( poundfor ) IREM_COIN_MODE_2_HIGH PORT_START("TRACK0_X") - PORT_BIT( 0x0fff, 0x0000, IPT_TRACKBALL_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(30) PORT_PLAYER(1) + PORT_BIT( 0x0fff, 0x0000, IPT_TRACKBALL_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(25) PORT_PLAYER(1) PORT_START("TRACK0_Y") - PORT_BIT( 0x0fff, 0x0000, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(50) PORT_KEYDELTA(30) PORT_REVERSE PORT_PLAYER(1) + PORT_BIT( 0x0fff, 0x0000, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(25) PORT_REVERSE PORT_PLAYER(1) PORT_START("TRACK1_X") - PORT_BIT( 0x0fff, 0x0000, IPT_TRACKBALL_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(30) PORT_REVERSE PORT_PLAYER(2) + PORT_BIT( 0x0fff, 0x0000, IPT_TRACKBALL_X ) PORT_SENSITIVITY(100) PORT_KEYDELTA(25) PORT_REVERSE PORT_PLAYER(2) PORT_START("TRACK1_Y") - PORT_BIT( 0x0fff, 0x0000, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(50) PORT_KEYDELTA(30) PORT_PLAYER(2) + PORT_BIT( 0x0fff, 0x0000, IPT_TRACKBALL_Y ) PORT_SENSITIVITY(100) PORT_KEYDELTA(25) PORT_PLAYER(2) INPUT_PORTS_END static INPUT_PORTS_START( airduel ) diff --git a/src/mame/irem/m72_v.cpp b/src/mame/irem/m72_v.cpp index fa03e65217096..ddaf12ca210f6 100644 --- a/src/mame/irem/m72_v.cpp +++ b/src/mame/irem/m72_v.cpp @@ -363,11 +363,11 @@ void m72_state::rtype2_port02_w(u8 data) void poundfor_state::poundfor_port02_w(u8 data) { - // bit 5 resets both uPD4701A? - m_upd4701[0]->resetx_w(BIT(data, 5)); - m_upd4701[0]->resety_w(BIT(data, 5)); - m_upd4701[1]->resetx_w(BIT(data, 5)); - m_upd4701[1]->resety_w(BIT(data, 5)); + // bit 6 resets both uPD4701A? + m_upd4701[0]->resetx_w(BIT(data, 6)); + m_upd4701[0]->resety_w(BIT(data, 6)); + m_upd4701[1]->resetx_w(BIT(data, 6)); + m_upd4701[1]->resety_w(BIT(data, 6)); rtype2_port02_w(data & 0xbf); } diff --git a/src/mame/kaneko/snowbros.cpp b/src/mame/kaneko/snowbros.cpp index f9538964a1863..0c4c82173d2fd 100644 --- a/src/mame/kaneko/snowbros.cpp +++ b/src/mame/kaneko/snowbros.cpp @@ -2955,7 +2955,7 @@ year : 1993.08.24 */ -ROM_START( finalttr ) +ROM_START( finalttr ) // also seen on a PCB with half sized GFX ROMs ROM_REGION( 0x100000, "maincpu", 0 ) /* 68000 Code */ ROM_LOAD16_BYTE( "10.7o", 0x00000, 0x20000, CRC(eecc83e5) SHA1(48088a2fae8852a73a325a9659c24b241515eac3) ) ROM_LOAD16_BYTE( "9.5o", 0x00001, 0x20000, CRC(58d3640e) SHA1(361bc64174a6c7b15a13e0d1f048c7ea270182ca) ) diff --git a/src/mame/koei/pasogo.cpp b/src/mame/koei/pasogo.cpp index 9665ce113b8de..d024789c5aa28 100644 --- a/src/mame/koei/pasogo.cpp +++ b/src/mame/koei/pasogo.cpp @@ -285,11 +285,12 @@ uint8_t pasogo_state::vg230_io_r(offs_t offset) break; case 0x79: - /*rtc status*/ + // rtc mode log = false; break; case 0x7a: + // rtc status data &= ~3; if (m_vg230.rtc.alarm_interrupt_request) data |= 1<<1; @@ -363,7 +364,7 @@ void pasogo_state::vg230_io_w(offs_t offset, uint8_t data) break; case 0x78: - m_vg230.rtc.days = data & 0x1f; + m_vg230.rtc.alarm_days = data & 0x1f; break; case 0x79: diff --git a/src/mame/konami/asterix.cpp b/src/mame/konami/asterix.cpp index 89b7183d87196..6869079598b7b 100644 --- a/src/mame/konami/asterix.cpp +++ b/src/mame/konami/asterix.cpp @@ -25,6 +25,7 @@ Asterix #include "machine/eepromser.h" #include "sound/k053260.h" #include "sound/ymopm.h" + #include "emupal.h" #include "screen.h" #include "speaker.h" @@ -126,10 +127,7 @@ K056832_CB_MEMBER(asterix_state::tile_callback) uint32_t asterix_state::screen_update_asterix(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - static const int K053251_CI[4] = { k053251_device::CI0, k053251_device::CI2, k053251_device::CI3, k053251_device::CI4 }; - int layer[3], plane, new_colorbase; - - /* Layer offsets are different if horizontally flipped */ + // layer offsets are different if horizontally flipped if (m_k056832->read_register(0x0) & 0x10) { m_k056832->set_layer_offs(0, 89 - 176, 0); @@ -145,30 +143,37 @@ uint32_t asterix_state::screen_update_asterix(screen_device &screen, bitmap_ind1 m_k056832->set_layer_offs(3, 95, 0); } + // update color info and refresh tilemaps + bool tilemaps_dirty = false; - m_tilebanks[0] = (m_k056832->get_lookup(0) << 10); - m_tilebanks[1] = (m_k056832->get_lookup(1) << 10); - m_tilebanks[2] = (m_k056832->get_lookup(2) << 10); - m_tilebanks[3] = (m_k056832->get_lookup(3) << 10); + for (int bank = 0; bank < 4; bank++) + { + int prev_tilebank = m_tilebanks[bank]; + m_tilebanks[bank] = m_k056832->get_lookup(bank) << 10; - // update color info and refresh tilemaps + if (m_tilebanks[bank] != prev_tilebank) + tilemaps_dirty = true; + } + + static const int K053251_CI[4] = { k053251_device::CI0, k053251_device::CI2, k053251_device::CI3, k053251_device::CI4 }; m_sprite_colorbase = m_k053251->get_palette_index(k053251_device::CI1); - for (plane = 0; plane < 4; plane++) + for (int plane = 0; plane < 4; plane++) { - new_colorbase = m_k053251->get_palette_index(K053251_CI[plane]); - if (m_layer_colorbase[plane] != new_colorbase) - { - m_layer_colorbase[plane] = new_colorbase; + int prev_colorbase = m_layer_colorbase[plane]; + m_layer_colorbase[plane] = m_k053251->get_palette_index(K053251_CI[plane]); + + if (!tilemaps_dirty && m_layer_colorbase[plane] != prev_colorbase) m_k056832->mark_plane_dirty(plane); - } } - layer[0] = 0; + if (tilemaps_dirty) + m_k056832->mark_all_tilemaps_dirty(); + + // sort layers and draw + int layer[3] = { 0, 1, 3 }; m_layerpri[0] = m_k053251->get_priority(k053251_device::CI0); - layer[1] = 1; m_layerpri[1] = m_k053251->get_priority(k053251_device::CI2); - layer[2] = 3; m_layerpri[2] = m_k053251->get_priority(k053251_device::CI4); konami_sortlayers3(layer, m_layerpri); @@ -180,7 +185,7 @@ uint32_t asterix_state::screen_update_asterix(screen_device &screen, bitmap_ind1 m_k056832->tilemap_draw(screen, bitmap, cliprect, layer[1], K056832_DRAW_FLAG_MIRROR, 2); m_k056832->tilemap_draw(screen, bitmap, cliprect, layer[2], K056832_DRAW_FLAG_MIRROR, 4); -/* this isn't supported anymore and it is unsure if still needed; keeping here for reference + /* this isn't supported anymore and it is unsure if still needed; keeping here for reference pdrawgfx_shadow_lowpri = 1; fix shadows in front of feet */ m_k053244->sprites_draw(bitmap, cliprect, screen.priority()); @@ -200,6 +205,7 @@ void asterix_state::control2_w(offs_t offset, uint16_t data, uint16_t mem_mask) /* bit 5 is select tile bank */ m_k056832->set_tile_bank((data & 0x20) >> 5); + // TODO: looks like 0xffff is used from time to time for chip selection/reset something, not unlike Jackal if((data & 0xff) != 0xff) { @@ -424,10 +430,10 @@ void asterix_state::asterix(machine_config &config) ROM_START( asterix ) ROM_REGION( 0x100000, "maincpu", 0 ) - ROM_LOAD16_BYTE( "068_ea_d01.8c", 0x000000, 0x20000, CRC(61d6621d) SHA1(908a344e9bbce0c7544bd049494258d1d3ad073b) ) - ROM_LOAD16_BYTE( "068_ea_d02.8d", 0x000001, 0x20000, CRC(53aac057) SHA1(7401ca5b70f384688c3353fc1ac9ef0b27814c66) ) - ROM_LOAD16_BYTE( "068a03.7c", 0x080000, 0x20000, CRC(8223ebdc) SHA1(e4aa39e4bc1d210bdda5b0cb41d6c8006c48dd24) ) - ROM_LOAD16_BYTE( "068a04.7d", 0x080001, 0x20000, CRC(9f351828) SHA1(e03842418f08e6267eeea03362450da249af73be) ) + ROM_LOAD16_BYTE( "068_ea_d01.8c", 0x000000, 0x20000, CRC(61d6621d) SHA1(908a344e9bbce0c7544bd049494258d1d3ad073b) ) + ROM_LOAD16_BYTE( "068_ea_d02.8d", 0x000001, 0x20000, CRC(53aac057) SHA1(7401ca5b70f384688c3353fc1ac9ef0b27814c66) ) + ROM_LOAD16_BYTE( "068a03.7c", 0x080000, 0x20000, CRC(8223ebdc) SHA1(e4aa39e4bc1d210bdda5b0cb41d6c8006c48dd24) ) + ROM_LOAD16_BYTE( "068a04.7d", 0x080001, 0x20000, CRC(9f351828) SHA1(e03842418f08e6267eeea03362450da249af73be) ) ROM_REGION( 0x010000, "audiocpu", 0 ) ROM_LOAD( "068_a05.5f", 0x000000, 0x010000, CRC(d3d0d77b) SHA1(bfa77a8bf651dc27f481e96a2d63242084cc214c) ) @@ -449,10 +455,10 @@ ROM_END ROM_START( asterixeac ) ROM_REGION( 0x100000, "maincpu", 0 ) - ROM_LOAD16_BYTE( "068_ea_c01.8c", 0x000000, 0x20000, CRC(0ccd1feb) SHA1(016d642e3a745f0564aa93f0f66d5c0f37962990) ) - ROM_LOAD16_BYTE( "068_ea_c02.8d", 0x000001, 0x20000, CRC(b0805f47) SHA1(b58306164e8fec69002656993ae80abbc8f136cd) ) - ROM_LOAD16_BYTE( "068a03.7c", 0x080000, 0x20000, CRC(8223ebdc) SHA1(e4aa39e4bc1d210bdda5b0cb41d6c8006c48dd24) ) - ROM_LOAD16_BYTE( "068a04.7d", 0x080001, 0x20000, CRC(9f351828) SHA1(e03842418f08e6267eeea03362450da249af73be) ) + ROM_LOAD16_BYTE( "068_ea_c01.8c", 0x000000, 0x20000, CRC(0ccd1feb) SHA1(016d642e3a745f0564aa93f0f66d5c0f37962990) ) + ROM_LOAD16_BYTE( "068_ea_c02.8d", 0x000001, 0x20000, CRC(b0805f47) SHA1(b58306164e8fec69002656993ae80abbc8f136cd) ) + ROM_LOAD16_BYTE( "068a03.7c", 0x080000, 0x20000, CRC(8223ebdc) SHA1(e4aa39e4bc1d210bdda5b0cb41d6c8006c48dd24) ) + ROM_LOAD16_BYTE( "068a04.7d", 0x080001, 0x20000, CRC(9f351828) SHA1(e03842418f08e6267eeea03362450da249af73be) ) ROM_REGION( 0x010000, "audiocpu", 0 ) ROM_LOAD( "068_a05.5f", 0x000000, 0x010000, CRC(d3d0d77b) SHA1(bfa77a8bf651dc27f481e96a2d63242084cc214c) ) @@ -474,10 +480,10 @@ ROM_END ROM_START( asterixeaa ) ROM_REGION( 0x100000, "maincpu", 0 ) - ROM_LOAD16_BYTE( "068_ea_a01.8c", 0x000000, 0x20000, CRC(85b41d8e) SHA1(e1326f6d61b8097f5201d5bd37e4d2a357d17b47) ) - ROM_LOAD16_BYTE( "068_ea_a02.8d", 0x000001, 0x20000, CRC(8e886305) SHA1(41a9de2cdad8c1185b4d13ea5b4a9309716947c5) ) - ROM_LOAD16_BYTE( "068a03.7c", 0x080000, 0x20000, CRC(8223ebdc) SHA1(e4aa39e4bc1d210bdda5b0cb41d6c8006c48dd24) ) - ROM_LOAD16_BYTE( "068a04.7d", 0x080001, 0x20000, CRC(9f351828) SHA1(e03842418f08e6267eeea03362450da249af73be) ) + ROM_LOAD16_BYTE( "068_ea_a01.8c", 0x000000, 0x20000, CRC(85b41d8e) SHA1(e1326f6d61b8097f5201d5bd37e4d2a357d17b47) ) + ROM_LOAD16_BYTE( "068_ea_a02.8d", 0x000001, 0x20000, CRC(8e886305) SHA1(41a9de2cdad8c1185b4d13ea5b4a9309716947c5) ) + ROM_LOAD16_BYTE( "068a03.7c", 0x080000, 0x20000, CRC(8223ebdc) SHA1(e4aa39e4bc1d210bdda5b0cb41d6c8006c48dd24) ) + ROM_LOAD16_BYTE( "068a04.7d", 0x080001, 0x20000, CRC(9f351828) SHA1(e03842418f08e6267eeea03362450da249af73be) ) ROM_REGION( 0x010000, "audiocpu", 0 ) ROM_LOAD( "068_a05.5f", 0x000000, 0x010000, CRC(d3d0d77b) SHA1(bfa77a8bf651dc27f481e96a2d63242084cc214c) ) @@ -499,10 +505,10 @@ ROM_END ROM_START( asterixaad ) ROM_REGION( 0x100000, "maincpu", 0 ) - ROM_LOAD16_BYTE( "068_aa_d01.8c", 0x000000, 0x20000, CRC(3fae5f1f) SHA1(73ef65dac8e1cd4d9a3695963231e3a2a860b486) ) - ROM_LOAD16_BYTE( "068_aa_d02.8d", 0x000001, 0x20000, CRC(171f0ba0) SHA1(1665f23194da5811e4708ad0495378957b6e6251) ) - ROM_LOAD16_BYTE( "068a03.7c", 0x080000, 0x20000, CRC(8223ebdc) SHA1(e4aa39e4bc1d210bdda5b0cb41d6c8006c48dd24) ) - ROM_LOAD16_BYTE( "068a04.7d", 0x080001, 0x20000, CRC(9f351828) SHA1(e03842418f08e6267eeea03362450da249af73be) ) + ROM_LOAD16_BYTE( "068_aa_d01.8c", 0x000000, 0x20000, CRC(3fae5f1f) SHA1(73ef65dac8e1cd4d9a3695963231e3a2a860b486) ) + ROM_LOAD16_BYTE( "068_aa_d02.8d", 0x000001, 0x20000, CRC(171f0ba0) SHA1(1665f23194da5811e4708ad0495378957b6e6251) ) + ROM_LOAD16_BYTE( "068a03.7c", 0x080000, 0x20000, CRC(8223ebdc) SHA1(e4aa39e4bc1d210bdda5b0cb41d6c8006c48dd24) ) + ROM_LOAD16_BYTE( "068a04.7d", 0x080001, 0x20000, CRC(9f351828) SHA1(e03842418f08e6267eeea03362450da249af73be) ) ROM_REGION( 0x010000, "audiocpu", 0 ) ROM_LOAD( "068_a05.5f", 0x000000, 0x010000, CRC(d3d0d77b) SHA1(bfa77a8bf651dc27f481e96a2d63242084cc214c) ) @@ -524,10 +530,10 @@ ROM_END ROM_START( asterixj ) ROM_REGION( 0x100000, "maincpu", 0 ) - ROM_LOAD16_BYTE( "068_ja_d01.8c", 0x000000, 0x20000, CRC(2bc10940) SHA1(e25cc97435f157bed9c28d9e9277c9f47d4fb5fb) ) - ROM_LOAD16_BYTE( "068_ja_d02.8d", 0x000001, 0x20000, CRC(de438300) SHA1(8d72988409e6c28a06fb2325087d27ebd2d02c92) ) - ROM_LOAD16_BYTE( "068a03.7c", 0x080000, 0x20000, CRC(8223ebdc) SHA1(e4aa39e4bc1d210bdda5b0cb41d6c8006c48dd24) ) - ROM_LOAD16_BYTE( "068a04.7d", 0x080001, 0x20000, CRC(9f351828) SHA1(e03842418f08e6267eeea03362450da249af73be) ) + ROM_LOAD16_BYTE( "068_ja_d01.8c", 0x000000, 0x20000, CRC(2bc10940) SHA1(e25cc97435f157bed9c28d9e9277c9f47d4fb5fb) ) + ROM_LOAD16_BYTE( "068_ja_d02.8d", 0x000001, 0x20000, CRC(de438300) SHA1(8d72988409e6c28a06fb2325087d27ebd2d02c92) ) + ROM_LOAD16_BYTE( "068a03.7c", 0x080000, 0x20000, CRC(8223ebdc) SHA1(e4aa39e4bc1d210bdda5b0cb41d6c8006c48dd24) ) + ROM_LOAD16_BYTE( "068a04.7d", 0x080001, 0x20000, CRC(9f351828) SHA1(e03842418f08e6267eeea03362450da249af73be) ) ROM_REGION( 0x010000, "audiocpu", 0 ) ROM_LOAD( "068_a05.5f", 0x000000, 0x010000, CRC(d3d0d77b) SHA1(bfa77a8bf651dc27f481e96a2d63242084cc214c) ) diff --git a/src/mame/konami/blockhl.cpp b/src/mame/konami/blockhl.cpp index 9a8eefaf75dd4..7e8a8fb21e6ac 100644 --- a/src/mame/konami/blockhl.cpp +++ b/src/mame/konami/blockhl.cpp @@ -138,7 +138,7 @@ uint32_t blockhl_state::screen_update(screen_device &screen, bitmap_ind16 &bitma screen.priority().fill(0, cliprect); m_k052109->tilemap_update(); - m_k052109->tilemap_draw(screen, bitmap, cliprect, 2, TILEMAP_DRAW_OPAQUE, 0); // tile 2 + m_k052109->tilemap_draw(screen, bitmap, cliprect, 2, TILEMAP_DRAW_OPAQUE, 0); // tile 2 m_k052109->tilemap_draw(screen, bitmap, cliprect, 1, 0, 1); // tile 1 m_k051960->k051960_sprites_draw(bitmap, cliprect, screen.priority(), -1, -1); m_k052109->tilemap_draw(screen, bitmap, cliprect, 0, 0, 0); // tile 0 diff --git a/src/mame/konami/k052109.cpp b/src/mame/konami/k052109.cpp index e45e9e264d934..851b328e83843 100644 --- a/src/mame/konami/k052109.cpp +++ b/src/mame/konami/k052109.cpp @@ -172,8 +172,8 @@ GFXDECODE_MEMBER( k052109_device::gfxinfo_ram ) GFXDECODE_END -k052109_device::k052109_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : device_t(mconfig, K052109, tag, owner, clock), +k052109_device::k052109_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + device_t(mconfig, K052109, tag, owner, clock), device_gfx_interface(mconfig, *this, gfxinfo), device_video_interface(mconfig, *this, false), m_ram(nullptr), @@ -265,14 +265,15 @@ void k052109_device::device_start() m_tilemap[2]->set_scrolldy(m_dy, m_dy); save_pointer(NAME(m_ram), 0x6000); + save_item(NAME(m_tileflip_enable)); + save_item(NAME(m_charrombank)); + save_item(NAME(m_charrombank_2)); + save_item(NAME(m_has_extra_video_ram)); save_item(NAME(m_rmrd_line)); + save_item(NAME(m_irq_enabled)); save_item(NAME(m_romsubbank)); save_item(NAME(m_scrollctrl)); - save_item(NAME(m_irq_enabled)); - save_item(NAME(m_charrombank)); - save_item(NAME(m_charrombank_2)); save_item(NAME(m_addrmap)); - save_item(NAME(m_has_extra_video_ram)); } //------------------------------------------------- @@ -667,6 +668,12 @@ void k052109_device::tilemap_draw( screen_device &screen, bitmap_ind16 &bitmap, m_tilemap[tmap_num]->draw(screen, bitmap, cliprect, flags, priority); } +void k052109_device::mark_tilemap_dirty( uint8_t tmap_num ) +{ + assert(tmap_num <= 2); + m_tilemap[tmap_num]->mark_all_dirty(); +} + /*************************************************************************** diff --git a/src/mame/konami/k052109.h b/src/mame/konami/k052109.h index 35ca8d2f54146..9f5b6c0d71987 100644 --- a/src/mame/konami/k052109.h +++ b/src/mame/konami/k052109.h @@ -51,6 +51,7 @@ class k052109_device : public device_t, public device_gfx_interface, public devi int get_rmrd_line(); void tilemap_update(); void tilemap_draw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int tmap_num, uint32_t flags, uint8_t priority); + void mark_tilemap_dirty(uint8_t tmap_num); void vblank_callback(screen_device &screen, bool state); @@ -64,7 +65,7 @@ class k052109_device : public device_t, public device_gfx_interface, public devi private: // internal state - std::unique_ptr m_ram; + std::unique_ptr m_ram; uint8_t *m_videoram_F; uint8_t *m_videoram_A; uint8_t *m_videoram_B; @@ -76,7 +77,7 @@ class k052109_device : public device_t, public device_gfx_interface, public devi uint8_t *m_colorram_B; tilemap_t *m_tilemap[3]; - int m_tileflip_enable; + uint8_t m_tileflip_enable; uint8_t m_charrombank[4]; uint8_t m_charrombank_2[4]; uint8_t m_has_extra_video_ram; diff --git a/src/mame/konami/k053246_k053247_k055673.cpp b/src/mame/konami/k053246_k053247_k055673.cpp index 987ff8bde12e5..4e5545c3786f1 100644 --- a/src/mame/konami/k053246_k053247_k055673.cpp +++ b/src/mame/konami/k053246_k053247_k055673.cpp @@ -31,7 +31,6 @@ The sprite RAM format is very similar to the 053245. ???-??? R reads data from the gfx ROMs (16 bits in total). The address of the data is determined by the registers above - */ #include "emu.h" @@ -48,7 +47,6 @@ The sprite RAM format is very similar to the 053245. DEVICE HANDLERS *****************************************************************************/ - void k053247_device::clear_all() { m_ram = nullptr; @@ -135,7 +133,7 @@ u16 k053247_device::k055673_5bpp_rom_word_r(offs_t offset) // 5bpp int size4 = (m_gfxrom.length() / (1024 * 1024)) / 5; int romofs; - size4 *= 4 * 1024 * 1024; // get offset to 5th bit + size4 *= 4 * 1024 * 1024; // get offset to 5th bit ROM8 += size4; romofs = m_kx46_regs[6] << 16 | m_kx46_regs[7] << 8 | m_kx46_regs[4]; @@ -452,14 +450,14 @@ void k053247_device::zdrawgfxzoom32GP( #define FPENT 0 // inner loop - const u8 *src_ptr; + const u8 *src_ptr; int src_x; int eax, ecx; int src_fx, src_fdx; int shdpen; - u8 z8 = 0, p8 = 0; - u8 *ozbuf_ptr; - u8 *szbuf_ptr; + u8 z8 = 0, p8 = 0; + u8 *ozbuf_ptr; + u8 *szbuf_ptr; const pen_t *pal_base; const pen_t *shd_base; u32 *dst_ptr; @@ -922,7 +920,7 @@ void k055673_device::device_start() int gfx_index = 0; u32 total; - static const gfx_layout spritelayout = /* System GX sprite layout */ + static const gfx_layout spritelayout = /* System GX sprite layout */ { 16,16, 0, @@ -994,7 +992,7 @@ void k055673_device::device_start() d = (u8 *)alt_k055673_rom; // now combine the graphics together to form 5bpp s1 = (u8 *)&m_gfxrom[0]; // 4bpp area - s2 = s1 + (size4); // 1bpp area + s2 = s1 + (size4); // 1bpp area for (i = 0; i < size4; i+= 4) { *d++ = *s1++; @@ -1040,7 +1038,7 @@ void k055673_device::device_start() m_objcha_line = CLEAR_LINE; m_ram = std::make_unique(0x4000/2); - memset(m_ram.get(), 0, 0x4000); + memset(m_ram.get(), 0, 0x4000); std::fill(std::begin(m_kx46_regs), std::end(m_kx46_regs), 0); std::fill(std::begin(m_kx47_regs), std::end(m_kx47_regs), 0); diff --git a/src/mame/konami/k053251.cpp b/src/mame/konami/k053251.cpp index 76bd47c621d7c..24aabac2213a6 100644 --- a/src/mame/konami/k053251.cpp +++ b/src/mame/konami/k053251.cpp @@ -207,12 +207,12 @@ void k053251_device::write(offs_t offset, u8 data) } } -int k053251_device::get_priority( int ci ) +int k053251_device::get_priority(int ci) { return m_ram[ci]; } -int k053251_device::get_palette_index( int ci ) +int k053251_device::get_palette_index(int ci) { return m_palette_index[ci]; } diff --git a/src/mame/konami/k054000.cpp b/src/mame/konami/k054000.cpp index 0b10111330161..7e873350bada1 100644 --- a/src/mame/konami/k054000.cpp +++ b/src/mame/konami/k054000.cpp @@ -37,8 +37,6 @@ //#include "logmacro.h" - - DEFINE_DEVICE_TYPE(K054000, k054000_device, "k054000", "K054000 Protection") k054000_device::k054000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) @@ -52,6 +50,10 @@ k054000_device::k054000_device(const machine_config &mconfig, const char *tag, d void k054000_device::device_start() { + save_item(NAME(m_raw_Acx)); + save_item(NAME(m_raw_Acy)); + save_item(NAME(m_raw_Bcx)); + save_item(NAME(m_raw_Bcy)); save_item(NAME(m_Acx)); save_item(NAME(m_Acy)); save_item(NAME(m_Aax)); @@ -60,10 +62,6 @@ void k054000_device::device_start() save_item(NAME(m_Bcy)); save_item(NAME(m_Bax)); save_item(NAME(m_Bay)); - save_pointer(NAME(m_raw_Acx), 4); - save_pointer(NAME(m_raw_Acy), 4); - save_pointer(NAME(m_raw_Bcx), 4); - save_pointer(NAME(m_raw_Bcy), 4); } //------------------------------------------------- diff --git a/src/mame/konami/nemesis.h b/src/mame/konami/nemesis.h index 632b2d673b29f..6c029dcd9f403 100644 --- a/src/mame/konami/nemesis.h +++ b/src/mame/konami/nemesis.h @@ -37,7 +37,6 @@ class gx400_base_state : public driver_device m_io_wheel(*this, "WHEEL") { } - virtual void device_post_load() override ATTR_COLD; virtual void machine_start() override ATTR_COLD; virtual void machine_reset() override ATTR_COLD; virtual void video_start() override ATTR_COLD; diff --git a/src/mame/konami/nemesis_v.cpp b/src/mame/konami/nemesis_v.cpp index 723b93040a284..d4df585e1e35e 100644 --- a/src/mame/konami/nemesis_v.cpp +++ b/src/mame/konami/nemesis_v.cpp @@ -181,15 +181,6 @@ void gx400_base_state::charram_w(offs_t offset, uint16_t data, uint16_t mem_mask } -void gx400_base_state::device_post_load() -{ - for (int i = 0; i < 8; i++) - { - m_gfxdecode->gfx(i)->mark_all_dirty(); - } -} - - void gx400_base_state::video_start() { m_spriteram_words = m_spriteram.bytes() / 2; diff --git a/src/mame/konami/parodius.cpp b/src/mame/konami/parodius.cpp index f51ddb5516cdd..7d5b578eca8db 100644 --- a/src/mame/konami/parodius.cpp +++ b/src/mame/konami/parodius.cpp @@ -129,22 +129,29 @@ K05324X_CB_MEMBER(parodius_state::sprite_callback) uint32_t parodius_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { + // update color info and refresh tilemaps + static const int K053251_CI[3] = { k053251_device::CI2, k053251_device::CI4, k053251_device::CI3 }; int bg_colorbase = m_k053251->get_palette_index(k053251_device::CI0); - m_sprite_colorbase = m_k053251->get_palette_index(k053251_device::CI1); - m_layer_colorbase[0] = m_k053251->get_palette_index(k053251_device::CI2); - m_layer_colorbase[1] = m_k053251->get_palette_index(k053251_device::CI4); - m_layer_colorbase[2] = m_k053251->get_palette_index(k053251_device::CI3); + m_sprite_colorbase = m_k053251->get_palette_index(k053251_device::CI1); + + for (int i = 0; i < 3; i++) + { + int prev_colorbase = m_layer_colorbase[i]; + m_layer_colorbase[i] = m_k053251->get_palette_index(K053251_CI[i]); + + if (m_layer_colorbase[i] != prev_colorbase) + m_k052109->mark_tilemap_dirty(i); + } m_k052109->tilemap_update(); + // sort layers and draw int layer[3]; - - layer[0] = 0; - m_layerpri[0] = m_k053251->get_priority(k053251_device::CI2); - layer[1] = 1; - m_layerpri[1] = m_k053251->get_priority(k053251_device::CI4); - layer[2] = 2; - m_layerpri[2] = m_k053251->get_priority(k053251_device::CI3); + for (int i = 0; i < 3; i++) + { + layer[i] = i; + m_layerpri[i] = m_k053251->get_priority(K053251_CI[i]); + } konami_sortlayers3(layer, m_layerpri); diff --git a/src/mame/konami/rungun.cpp b/src/mame/konami/rungun.cpp index 1ba3e9d13bed0..e19321b7d31cb 100644 --- a/src/mame/konami/rungun.cpp +++ b/src/mame/konami/rungun.cpp @@ -988,7 +988,7 @@ ROM_START( rungunbd ) // same as above set, but with demux adapter connected ROM_LOAD( "runguna.nv", 0x0000, 0x080, CRC(7bbf0e3c) SHA1(0fd3c9400e9b97a06517e0c8620f773a383100fd) ) ROM_END -ROM_START( rungunua ) +ROM_START( rungunuba ) /* main program US Version BA 1993 10.8 */ ROM_REGION( 0x300000, "maincpu", 0) ROM_LOAD16_BYTE( "247uba03.bin", 0x000000, 0x80000, CRC(c24d7500) SHA1(38e6ae9fc00bf8f85549be4733992336c46fe1f3) ) @@ -1030,7 +1030,7 @@ ROM_START( rungunua ) ROM_END -ROM_START( rungunuad ) // same as above set, but with demux adapter connected +ROM_START( rungunubad ) // same as above set, but with demux adapter connected /* main program US Version BA 1993 10.8 */ ROM_REGION( 0x300000, "maincpu", 0) ROM_LOAD16_BYTE( "247uba03.bin", 0x000000, 0x80000, CRC(c24d7500) SHA1(38e6ae9fc00bf8f85549be4733992336c46fe1f3) ) @@ -1157,7 +1157,7 @@ ROM_END -ROM_START( rungunud ) // dual cabinet setup ONLY +ROM_START( rungunuabd ) // dual cabinet setup ONLY /* main program US Version AB 1993 10.12 */ ROM_REGION( 0x300000, "maincpu", 0) ROM_LOAD16_BYTE( "247uab03.bin", 0x000000, 0x80000, CRC(f259fd11) SHA1(60381a3fa7f78022dcb3e2f3d13ea32a10e4e36e) ) @@ -1196,6 +1196,46 @@ ROM_START( rungunud ) // dual cabinet setup ONLY ROM_LOAD( "rungunu.nv", 0x0000, 0x080, CRC(d501f579) SHA1(9e01d9a6a8cdc782dd2a92fbf2295e8df732f892) ) ROM_END + +ROM_START( rungunuaad ) // dual cabinet setup ONLY + /* main program US Version AB 1993 9.10 (note program ROMs have UA A labels, but it shows VER.UAB on-screen) */ + ROM_REGION( 0x300000, "maincpu", 0) + ROM_LOAD16_BYTE( "247uaa03.bin", 0x000000, 0x80000, CRC(a05f4cd0) SHA1(1ec8941293a173c659b8503837617ce098390ccd) ) + ROM_LOAD16_BYTE( "247uaa04.bin", 0x000001, 0x80000, CRC(ebb11bef) SHA1(587c97659fa59c3895886a7b98cd9c91b21f0ed4) ) + + /* data */ + ROM_LOAD16_BYTE( "247a01", 0x100000, 0x80000, CRC(8341cf7d) SHA1(372c147c4a5d54aed2a16b0ed258247e65dda563) ) + ROM_LOAD16_BYTE( "247a02", 0x100001, 0x80000, CRC(f5ef3f45) SHA1(2e1d8f672c130dbfac4365dc1301b47beee10161) ) + + /* sound program */ + ROM_REGION( 0x030000, "soundcpu", 0 ) + ROM_LOAD("247a05", 0x000000, 0x20000, CRC(64e85430) SHA1(542919c3be257c8f118fc21d3835d7b6426a22ed) ) + ROM_RELOAD( 0x010000, 0x20000 ) + + /* '936 tiles */ + ROM_REGION( 0x400000, "gfx1", 0) + ROM_LOAD( "247a13", 0x000000, 0x200000, CRC(c5a8ef29) SHA1(23938b8093bc0b9eef91f6d38127ca7acbdc06a6) ) + + /* sprites */ + ROM_REGION( 0x800000, "k055673", 0) + ROM_LOAD64_WORD( "247-a11", 0x000000, 0x200000, CRC(c3f60854) SHA1(cbee7178ab9e5aa6a5aeed0511e370e29001fb01) ) // 5y + ROM_LOAD64_WORD( "247-a08", 0x000002, 0x200000, CRC(3e315eef) SHA1(898bc4d5ad244e5f91cbc87820b5d0be99ef6662) ) // 2u + ROM_LOAD64_WORD( "247-a09", 0x000004, 0x200000, CRC(5ca7bc06) SHA1(83c793c68227399f93bd1ed167dc9ed2aaac4167) ) // 2y + ROM_LOAD64_WORD( "247-a10", 0x000006, 0x200000, CRC(a5ccd243) SHA1(860b88ade1a69f8b6c5b8206424814b386343571) ) // 5u + + /* TTL text plane ("fix layer") */ + ROM_REGION( 0x20000, "gfx3", 0) + ROM_LOAD( "247-a12", 0x000000, 0x20000, CRC(57a8d26e) SHA1(0431d10b76d77c26a1f6f2b55d9dbcfa959e1cd0) ) + + /* sound data */ + ROM_REGION( 0x400000, "k054539", 0) + ROM_LOAD( "247-a06", 0x000000, 0x200000, CRC(b8b2a67e) SHA1(a873d32f4b178c714743664fa53c0dca29cb3ce4) ) + ROM_LOAD( "247-a07", 0x200000, 0x200000, CRC(0108142d) SHA1(4dc6a36d976dad9c0da5a5b1f01f2eb3b369c99d) ) + + ROM_REGION( 0x80, "eeprom", 0 ) // default eeprom to prevent game booting upside down with error + ROM_LOAD( "rungunu.nv", 0x0000, 0x080, CRC(d501f579) SHA1(9e01d9a6a8cdc782dd2a92fbf2295e8df732f892) ) +ROM_END + } // anonymous namespace @@ -1208,15 +1248,16 @@ ROM_END GAME( 1993, rungun, 0, rng, rng, rungun_state, empty_init, ROT0, "Konami", "Run and Gun (ver EAA 1993 10.8)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND ) GAME( 1993, runguna, rungun, rng, rng, rungun_state, empty_init, ROT0, "Konami", "Run and Gun (ver EAA 1993 10.4)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND ) GAME( 1993, rungunb, rungun, rng, rng, rungun_state, empty_init, ROT0, "Konami", "Run and Gun (ver EAA 1993 9.10, prototype?)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND ) -GAME( 1993, rungunua, rungun, rng, rng, rungun_state, empty_init, ROT0, "Konami", "Run and Gun (ver UBA 1993 10.8)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND ) +GAME( 1993, rungunuba,rungun, rng, rng, rungun_state, empty_init, ROT0, "Konami", "Run and Gun (ver UBA 1993 10.8)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND ) GAME( 1993, slmdunkj, rungun, rng, rng, rungun_state, empty_init, ROT0, "Konami", "Slam Dunk (ver JAA 1993 10.8)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND ) // these sets have the demux adapter connected, and output to 2 screens (as the adapter represents a physical hardware difference, albeit a minor one, use clone sets) -GAMEL( 1993, rungund, rungun, rng_dual, rng_dual, rungun_state, empty_init, ROT0, "Konami", "Run and Gun (ver EAA 1993 10.8) (dual screen with demux adapter)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND, layout_rungun_dual ) -GAMEL( 1993, rungunad, rungun, rng_dual, rng_dual, rungun_state, empty_init, ROT0, "Konami", "Run and Gun (ver EAA 1993 10.4) (dual screen with demux adapter)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND, layout_rungun_dual ) -GAMEL( 1993, rungunbd, rungun, rng_dual, rng_dual, rungun_state, empty_init, ROT0, "Konami", "Run and Gun (ver EAA 1993 9.10, prototype?) (dual screen with demux adapter)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND, layout_rungun_dual ) -GAMEL( 1993, rungunuad,rungun, rng_dual, rng_dual, rungun_state, empty_init, ROT0, "Konami", "Run and Gun (ver UBA 1993 10.8) (dual screen with demux adapter)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND, layout_rungun_dual ) -GAMEL( 1993, slmdunkjd,rungun, rng_dual, rng_dual, rungun_state, empty_init, ROT0, "Konami", "Slam Dunk (ver JAA 1993 10.8) (dual screen with demux adapter)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND, layout_rungun_dual ) - -// this set has no dipswitches to select single screen mode (they're not even displayed in test menu) it's twin cabinet ONLY -GAMEL( 1993, rungunud, rungun, rng_dual, rng_nodip, rungun_state, empty_init, ROT0, "Konami", "Run and Gun (ver UAB 1993 10.12, dedicated twin cabinet)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND, layout_rungun_dual ) +GAMEL( 1993, rungund, rungun, rng_dual, rng_dual, rungun_state, empty_init, ROT0, "Konami", "Run and Gun (ver EAA 1993 10.8) (dual screen with demux adapter)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND, layout_rungun_dual ) +GAMEL( 1993, rungunad, rungun, rng_dual, rng_dual, rungun_state, empty_init, ROT0, "Konami", "Run and Gun (ver EAA 1993 10.4) (dual screen with demux adapter)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND, layout_rungun_dual ) +GAMEL( 1993, rungunbd, rungun, rng_dual, rng_dual, rungun_state, empty_init, ROT0, "Konami", "Run and Gun (ver EAA 1993 9.10, prototype?) (dual screen with demux adapter)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND, layout_rungun_dual ) +GAMEL( 1993, rungunubad,rungun, rng_dual, rng_dual, rungun_state, empty_init, ROT0, "Konami", "Run and Gun (ver UBA 1993 10.8) (dual screen with demux adapter)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND, layout_rungun_dual ) +GAMEL( 1993, slmdunkjd, rungun, rng_dual, rng_dual, rungun_state, empty_init, ROT0, "Konami", "Slam Dunk (ver JAA 1993 10.8) (dual screen with demux adapter)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND, layout_rungun_dual ) + +// these sets have no DIP switches to select single screen mode (they're not even displayed in test menu) they're twin cabinet ONLY +GAMEL( 1993, rungunuabd,rungun, rng_dual, rng_nodip, rungun_state, empty_init, ROT0, "Konami", "Run and Gun (ver UAB 1993 10.12, dedicated twin cabinet)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND, layout_rungun_dual ) +GAMEL( 1993, rungunuaad,rungun, rng_dual, rng_nodip, rungun_state, empty_init, ROT0, "Konami", "Run and Gun (ver UAB 1993 9.10, dedicated twin cabinet)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND, layout_rungun_dual ) diff --git a/src/mame/konami/simpsons.cpp b/src/mame/konami/simpsons.cpp index da9e1a05d7b64..2d8b159d077b3 100644 --- a/src/mame/konami/simpsons.cpp +++ b/src/mame/konami/simpsons.cpp @@ -132,10 +132,11 @@ class simpsons_state : public driver_device void simpsons(machine_config &config); -private: +protected: virtual void machine_start() override ATTR_COLD; virtual void machine_reset() override ATTR_COLD; +private: void bank0000_map(address_map &map) ATTR_COLD; void bank2000_map(address_map &map) ATTR_COLD; void main_map(address_map &map) ATTR_COLD; @@ -280,22 +281,29 @@ void simpsons_state::video_bank_select( int bank ) uint32_t simpsons_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - int layer[3], bg_colorbase; - - bg_colorbase = m_k053251->get_palette_index(k053251_device::CI0); + // update color info and refresh tilemaps + static const int K053251_CI[3] = { k053251_device::CI2, k053251_device::CI3, k053251_device::CI4 }; + int bg_colorbase = m_k053251->get_palette_index(k053251_device::CI0); m_sprite_colorbase = m_k053251->get_palette_index(k053251_device::CI1); - m_layer_colorbase[0] = m_k053251->get_palette_index(k053251_device::CI2); - m_layer_colorbase[1] = m_k053251->get_palette_index(k053251_device::CI3); - m_layer_colorbase[2] = m_k053251->get_palette_index(k053251_device::CI4); + + for (int i = 0; i < 3; i++) + { + int prev_colorbase = m_layer_colorbase[i]; + m_layer_colorbase[i] = m_k053251->get_palette_index(K053251_CI[i]); + + if (m_layer_colorbase[i] != prev_colorbase) + m_k052109->mark_tilemap_dirty(i); + } m_k052109->tilemap_update(); - layer[0] = 0; - m_layerpri[0] = m_k053251->get_priority(k053251_device::CI2); - layer[1] = 1; - m_layerpri[1] = m_k053251->get_priority(k053251_device::CI3); - layer[2] = 2; - m_layerpri[2] = m_k053251->get_priority(k053251_device::CI4); + // sort layers and draw + int layer[3]; + for (int i = 0; i < 3; i++) + { + layer[i] = i; + m_layerpri[i] = m_k053251->get_priority(K053251_CI[i]); + } konami_sortlayers3(layer, m_layerpri); diff --git a/src/mame/konami/surpratk.cpp b/src/mame/konami/surpratk.cpp index 6cf7431ca7b27..f0b4fbd32c0c2 100644 --- a/src/mame/konami/surpratk.cpp +++ b/src/mame/konami/surpratk.cpp @@ -121,22 +121,29 @@ K05324X_CB_MEMBER(surpratk_state::sprite_callback) uint32_t surpratk_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { + // update color info and refresh tilemaps + static const int K053251_CI[3] = { k053251_device::CI2, k053251_device::CI4, k053251_device::CI3 }; int bg_colorbase = m_k053251->get_palette_index(k053251_device::CI0); m_sprite_colorbase = m_k053251->get_palette_index(k053251_device::CI1); - m_layer_colorbase[0] = m_k053251->get_palette_index(k053251_device::CI2); - m_layer_colorbase[1] = m_k053251->get_palette_index(k053251_device::CI4); - m_layer_colorbase[2] = m_k053251->get_palette_index(k053251_device::CI3); + + for (int i = 0; i < 3; i++) + { + int prev_colorbase = m_layer_colorbase[i]; + m_layer_colorbase[i] = m_k053251->get_palette_index(K053251_CI[i]); + + if (m_layer_colorbase[i] != prev_colorbase) + m_k052109->mark_tilemap_dirty(i); + } m_k052109->tilemap_update(); + // sort layers and draw int layer[3]; - - layer[0] = 0; - m_layerpri[0] = m_k053251->get_priority(k053251_device::CI2); - layer[1] = 1; - m_layerpri[1] = m_k053251->get_priority(k053251_device::CI4); - layer[2] = 2; - m_layerpri[2] = m_k053251->get_priority(k053251_device::CI3); + for (int i = 0; i < 3; i++) + { + layer[i] = i; + m_layerpri[i] = m_k053251->get_priority(K053251_CI[i]); + } konami_sortlayers3(layer, m_layerpri); diff --git a/src/mame/konami/tmnt.cpp b/src/mame/konami/tmnt.cpp index c773674bc9c18..ce4cfb41974cf 100644 --- a/src/mame/konami/tmnt.cpp +++ b/src/mame/konami/tmnt.cpp @@ -312,7 +312,7 @@ K052109_CB_MEMBER(tmnt_state::cuebrick_tile_callback) if ((m_k052109->get_rmrd_line() == CLEAR_LINE) && (layer == 0)) { *code |= ((*color & 0x01) << 8); - *color = m_layer_colorbase[layer] + ((*color & 0x0e) >> 1); + *color = m_layer_colorbase[layer] + ((*color & 0x0e) >> 1); } else { diff --git a/src/mame/konami/tmnt2.cpp b/src/mame/konami/tmnt2.cpp index bd529e7c91fb9..5ac99b03e2789 100644 --- a/src/mame/konami/tmnt2.cpp +++ b/src/mame/konami/tmnt2.cpp @@ -1012,19 +1012,27 @@ uint16_t prmrsocr_state::prmrsocr_rom_r(offs_t offset) uint32_t tmnt2_state::screen_update_punkshot(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { + // update color info and refresh tilemaps + static const int K053251_CI[3] = { k053251_device::CI2, k053251_device::CI4, k053251_device::CI3 }; m_sprite_colorbase = m_k053251->get_palette_index(k053251_device::CI1); - m_layer_colorbase[0] = m_k053251->get_palette_index(k053251_device::CI2); - m_layer_colorbase[1] = m_k053251->get_palette_index(k053251_device::CI4); - m_layer_colorbase[2] = m_k053251->get_palette_index(k053251_device::CI3); + + for (int i = 0; i < 3; i++) + { + int prev_colorbase = m_layer_colorbase[i]; + m_layer_colorbase[i] = m_k053251->get_palette_index(K053251_CI[i]); + + if (m_layer_colorbase[i] != prev_colorbase) + m_k052109->mark_tilemap_dirty(i); + } m_k052109->tilemap_update(); - m_sorted_layer[0] = 0; - m_layerpri[0] = m_k053251->get_priority(k053251_device::CI2); - m_sorted_layer[1] = 1; - m_layerpri[1] = m_k053251->get_priority(k053251_device::CI4); - m_sorted_layer[2] = 2; - m_layerpri[2] = m_k053251->get_priority(k053251_device::CI3); + // sort layers and draw + for (int i = 0; i < 3; i++) + { + m_sorted_layer[i] = i; + m_layerpri[i] = m_k053251->get_priority(K053251_CI[i]); + } konami_sortlayers3(m_sorted_layer, m_layerpri); @@ -1040,22 +1048,28 @@ uint32_t tmnt2_state::screen_update_punkshot(screen_device &screen, bitmap_ind16 uint32_t tmnt2_state::screen_update_lgtnfght(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - int bg_colorbase; - - bg_colorbase = m_k053251->get_palette_index(k053251_device::CI0); + // update color info and refresh tilemaps + static const int K053251_CI[3] = { k053251_device::CI2, k053251_device::CI4, k053251_device::CI3 }; + int bg_colorbase = m_k053251->get_palette_index(k053251_device::CI0); m_sprite_colorbase = m_k053251->get_palette_index(k053251_device::CI1); - m_layer_colorbase[0] = m_k053251->get_palette_index(k053251_device::CI2); - m_layer_colorbase[1] = m_k053251->get_palette_index(k053251_device::CI4); - m_layer_colorbase[2] = m_k053251->get_palette_index(k053251_device::CI3); + + for (int i = 0; i < 3; i++) + { + int prev_colorbase = m_layer_colorbase[i]; + m_layer_colorbase[i] = m_k053251->get_palette_index(K053251_CI[i]); + + if (m_layer_colorbase[i] != prev_colorbase) + m_k052109->mark_tilemap_dirty(i); + } m_k052109->tilemap_update(); - m_sorted_layer[0] = 0; - m_layerpri[0] = m_k053251->get_priority(k053251_device::CI2); - m_sorted_layer[1] = 1; - m_layerpri[1] = m_k053251->get_priority(k053251_device::CI4); - m_sorted_layer[2] = 2; - m_layerpri[2] = m_k053251->get_priority(k053251_device::CI3); + // sort layers and draw + for (int i = 0; i < 3; i++) + { + m_sorted_layer[i] = i; + m_layerpri[i] = m_k053251->get_priority(K053251_CI[i]); + } konami_sortlayers3(m_sorted_layer, m_layerpri); @@ -1073,9 +1087,9 @@ uint32_t tmnt2_state::screen_update_lgtnfght(screen_device &screen, bitmap_ind16 uint16_t glfgreat_state::glfgreat_ball_r() { #ifdef MAME_DEBUG -popmessage("%04x", m_glfgreat_pixel); + popmessage("%04x", m_glfgreat_pixel); #endif - /* if out of the ROZ layer palette range, it's in the water - return 0 */ + // if out of the ROZ layer palette range, it's in the water - return 0 if (m_glfgreat_pixel < 0x400 || m_glfgreat_pixel >= 0x500) return 0; else @@ -1084,27 +1098,33 @@ popmessage("%04x", m_glfgreat_pixel); uint32_t tmnt2_state::screen_update_glfgreat(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - int bg_colorbase; - - bg_colorbase = m_k053251->get_palette_index(k053251_device::CI0); + // update color info and refresh tilemaps + static const int K053251_CI[3] = { k053251_device::CI2, k053251_device::CI3, k053251_device::CI4 }; + int bg_colorbase = m_k053251->get_palette_index(k053251_device::CI0); m_sprite_colorbase = m_k053251->get_palette_index(k053251_device::CI1); - m_layer_colorbase[0] = m_k053251->get_palette_index(k053251_device::CI2); - m_layer_colorbase[1] = m_k053251->get_palette_index(k053251_device::CI3) + 8; /* weird... */ - m_layer_colorbase[2] = m_k053251->get_palette_index(k053251_device::CI4); + + for (int i = 0; i < 3; i++) + { + int prev_colorbase = m_layer_colorbase[i]; + m_layer_colorbase[i] = m_k053251->get_palette_index(K053251_CI[i]); + if (i == 1) m_layer_colorbase[i] += 8; // weird + + if (m_layer_colorbase[i] != prev_colorbase) + m_k052109->mark_tilemap_dirty(i); + } m_k052109->tilemap_update(); - m_sorted_layer[0] = 0; - m_layerpri[0] = m_k053251->get_priority(k053251_device::CI2); - m_sorted_layer[1] = 1; - m_layerpri[1] = m_k053251->get_priority(k053251_device::CI3); - m_sorted_layer[2] = 2; - m_layerpri[2] = m_k053251->get_priority(k053251_device::CI4); + // sort layers and draw + for (int i = 0; i < 3; i++) + { + m_sorted_layer[i] = i; + m_layerpri[i] = m_k053251->get_priority(K053251_CI[i]); + } konami_sortlayers3(m_sorted_layer, m_layerpri); - /* not sure about the 053936 priority, but it seems to work */ - + // not sure about the 053936 priority, but it seems to work screen.priority().fill(0, cliprect); bitmap.fill(16 * bg_colorbase, cliprect); m_k052109->tilemap_draw(screen, bitmap, cliprect, m_sorted_layer[0], 0, 1); @@ -1189,22 +1209,28 @@ uint32_t tmnt2_state::screen_update_tmnt2(screen_device &screen, bitmap_ind16 &b uint32_t tmnt2_state::screen_update_thndrx2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - int bg_colorbase; - - bg_colorbase = m_k053251->get_palette_index(k053251_device::CI0); + // update color info and refresh tilemaps + static const int K053251_CI[3] = { k053251_device::CI2, k053251_device::CI4, k053251_device::CI3 }; + int bg_colorbase = m_k053251->get_palette_index(k053251_device::CI0); m_sprite_colorbase = m_k053251->get_palette_index(k053251_device::CI1); - m_layer_colorbase[0] = m_k053251->get_palette_index(k053251_device::CI2); - m_layer_colorbase[1] = m_k053251->get_palette_index(k053251_device::CI4); - m_layer_colorbase[2] = m_k053251->get_palette_index(k053251_device::CI3); + + for (int i = 0; i < 3; i++) + { + int prev_colorbase = m_layer_colorbase[i]; + m_layer_colorbase[i] = m_k053251->get_palette_index(K053251_CI[i]); + + if (m_layer_colorbase[i] != prev_colorbase) + m_k052109->mark_tilemap_dirty(i); + } m_k052109->tilemap_update(); - m_sorted_layer[0] = 0; - m_layerpri[0] = m_k053251->get_priority(k053251_device::CI2); - m_sorted_layer[1] = 1; - m_layerpri[1] = m_k053251->get_priority(k053251_device::CI4); - m_sorted_layer[2] = 2; - m_layerpri[2] = m_k053251->get_priority(k053251_device::CI3); + // sort layers and draw + for (int i = 0; i < 3; i++) + { + m_sorted_layer[i] = i; + m_layerpri[i] = m_k053251->get_priority(K053251_CI[i]); + } konami_sortlayers3(m_sorted_layer, m_layerpri); diff --git a/src/mame/konami/twin16.h b/src/mame/konami/twin16.h index 60b7ea11ef048..d5711cf683abe 100644 --- a/src/mame/konami/twin16.h +++ b/src/mame/konami/twin16.h @@ -64,15 +64,15 @@ class twin16_state : public driver_device uint16_t m_CPUA_register = 0; uint16_t m_CPUB_register = 0; bool m_is_fround = false; - uint16_t m_sprite_buffer[0x800]{}; + uint16_t m_sprite_buffer[0x800] = { }; emu_timer *m_sprite_timer = nullptr; int m_sprite_busy = 0; int m_need_process_spriteram = 0; - uint16_t m_scrollx[3]{}; - uint16_t m_scrolly[3]{}; + uint16_t m_scrollx[3] = { }; + uint16_t m_scrolly[3] = { }; uint16_t m_video_register = 0; tilemap_t *m_fixed_tmap = nullptr; - tilemap_t *m_scroll_tmap[2]{}; + tilemap_t *m_scroll_tmap[2] = { }; void CPUA_register_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); void CPUB_register_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); @@ -108,15 +108,14 @@ class twin16_state : public driver_device void spriteram_process(); void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); int spriteram_process_enable(); - void twin16_postload(); }; class fround_state : public twin16_state { public: - fround_state(const machine_config &mconfig, device_type type, const char *tag) - : twin16_state(mconfig, type, tag) - {} + fround_state(const machine_config &mconfig, device_type type, const char *tag) : + twin16_state(mconfig, type, tag) + { } void fround(machine_config &config); @@ -131,15 +130,15 @@ class fround_state : public twin16_state virtual void video_start() override ATTR_COLD; virtual void tile_get_info(tile_data &tileinfo, uint16_t data, int color_base) override; - uint8_t m_gfx_bank[4]{}; + uint8_t m_gfx_bank[4] = { }; }; class cuebrickj_state : public twin16_state { public: - cuebrickj_state(const machine_config &mconfig, device_type type, const char *tag) - : twin16_state(mconfig, type, tag) - {} + cuebrickj_state(const machine_config &mconfig, device_type type, const char *tag) : + twin16_state(mconfig, type, tag) + { } void cuebrickj(machine_config &config); diff --git a/src/mame/konami/twin16_v.cpp b/src/mame/konami/twin16_v.cpp index f108a1c7d248a..7133f8148c684 100644 --- a/src/mame/konami/twin16_v.cpp +++ b/src/mame/konami/twin16_v.cpp @@ -17,8 +17,6 @@ #include "twin16.h" - - enum { TWIN16_SCREEN_FLIPY = 0x01, @@ -64,11 +62,6 @@ void twin16_state::zipram_w(offs_t offset, uint16_t data, uint16_t mem_mask) m_gfxdecode->gfx(1)->mark_dirty(offset / 16); } -void twin16_state::twin16_postload() -{ - m_gfxdecode->gfx(1)->mark_all_dirty(); -} - void fround_state::gfx_bank_w(offs_t offset, uint16_t data, uint16_t mem_mask) { int changed = 0; @@ -103,12 +96,12 @@ void twin16_state::video_register_w(offs_t offset, uint16_t data, uint16_t mem_m case 0: { int old = m_video_register; - COMBINE_DATA( &m_video_register ); + COMBINE_DATA(&m_video_register); int changed = old ^ m_video_register; if (changed & (TWIN16_SCREEN_FLIPX | TWIN16_SCREEN_FLIPY)) { - int flip = (m_video_register&TWIN16_SCREEN_FLIPX) ? TILEMAP_FLIPX : 0; - flip |= (m_video_register&TWIN16_SCREEN_FLIPY) ? TILEMAP_FLIPY : 0; + int flip = (m_video_register & TWIN16_SCREEN_FLIPX) ? TILEMAP_FLIPX : 0; + flip |= (m_video_register & TWIN16_SCREEN_FLIPY) ? TILEMAP_FLIPY : 0; machine().tilemap().set_flip_all(flip); } if (changed & TWIN16_TILE_FLIPY) @@ -119,22 +112,22 @@ void twin16_state::video_register_w(offs_t offset, uint16_t data, uint16_t mem_m break; } - case 1: COMBINE_DATA( &m_scrollx[0] ); break; - case 2: COMBINE_DATA( &m_scrolly[0] ); break; + case 1: COMBINE_DATA(&m_scrollx[0]); break; + case 2: COMBINE_DATA(&m_scrolly[0]); break; case 3: - COMBINE_DATA( &m_scrollx[1] ); + COMBINE_DATA(&m_scrollx[1]); m_scroll_tmap[0]->set_scrollx(0, m_scrollx[1]); break; case 4: - COMBINE_DATA( &m_scrolly[1] ); + COMBINE_DATA(&m_scrolly[1]); m_scroll_tmap[0]->set_scrolly(0, m_scrolly[1]); break; case 5: - COMBINE_DATA( &m_scrollx[2] ); + COMBINE_DATA(&m_scrollx[2]); m_scroll_tmap[1]->set_scrollx(0, m_scrollx[2]); break; case 6: - COMBINE_DATA( &m_scrolly[2] ); + COMBINE_DATA(&m_scrolly[2]); m_scroll_tmap[1]->set_scrolly(0, m_scrolly[2]); break; @@ -200,7 +193,7 @@ TIMER_CALLBACK_MEMBER(twin16_state::sprite_tick) m_sprite_busy = 0; } -int twin16_state::set_sprite_timer( ) +int twin16_state::set_sprite_timer() { if (m_sprite_busy) return 1; @@ -211,7 +204,7 @@ int twin16_state::set_sprite_timer( ) return 0; } -void twin16_state::spriteram_process( ) +void twin16_state::spriteram_process() { uint16_t *spriteram16 = m_spriteram->live(); uint16_t dx = m_scrollx[0]; @@ -221,17 +214,17 @@ void twin16_state::spriteram_process( ) const uint16_t *finish = &spriteram16[0x1800]; set_sprite_timer(); - memset(&spriteram16[0x1800],0xff,0x800*sizeof(uint16_t)); + memset(&spriteram16[0x1800], 0xff, 0x800 * sizeof(uint16_t)); - while( source>8) - dx)&0xffff; - dest[2] = ((ypos>>8) - dy)&0xffff; + dest[1] = ((xpos>>8) - dx) & 0xffff; + dest[2] = ((ypos>>8) - dy) & 0xffff; dest[3] = attributes; } source += 0x50/2; @@ -260,35 +253,36 @@ void twin16_state::spriteram_process( ) m_need_process_spriteram = 0; } -void twin16_state::draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect ) +void twin16_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - const uint16_t *source = 0x1800+m_spriteram->buffer() + 0x800 - 4; - const uint16_t *finish = 0x1800+m_spriteram->buffer(); + const uint16_t *source = 0x1800 + m_spriteram->buffer() + 0x800 - 4; + const uint16_t *finish = 0x1800 + m_spriteram->buffer(); for (; source >= finish; source -= 4) { uint16_t attributes = source[3]; uint16_t code = source[0]; - if((code!=0xffff) && (attributes&0x8000)) + if ((code != 0xffff) && (attributes & 0x8000)) { int xpos = source[1]; int ypos = source[2]; - int pal_base = ((attributes&0xf)+0x10)*16; - int height = 16<<((attributes>>6)&0x3); - int width = 16<<((attributes>>4)&0x3); + int pal_base = ((attributes & 0xf) + 0x10) * 16; + int height = 16 << ((attributes >> 6) & 0x3); + int width = 16 << ((attributes >> 4) & 0x3); const uint16_t *pen_data = nullptr; - int flipy = attributes&0x0200; - int flipx = attributes&0x0100; + int flipy = attributes & 0x0200; + int flipx = attributes & 0x0100; - if( m_is_fround ) { + if (m_is_fround) + { /* fround board */ pen_data = m_gfxrom; } else { - switch( (code>>12)&0x3 ) + switch ((code >> 12) & 0x3) { /* bank select */ case 0: @@ -301,7 +295,7 @@ void twin16_state::draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, co case 2: pen_data = m_gfxrom + 0x80000; - if( code&0x4000 ) pen_data += 0x40000; + if (code & 0x4000) pen_data += 0x40000; break; case 3: @@ -312,48 +306,48 @@ void twin16_state::draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, co } /* some code masking */ - if ((height&width) == 64) code &= ~8; // gradius2 ending sequence 64*64 - else if ((height&width) == 32) code &= ~3; // devilw 32*32 - else if ((height|width) == 48) code &= ~1; // devilw 32*16 / 16*32 + if ((height & width) == 64) code &= ~8; // gradius2 ending sequence 64*64 + else if ((height & width) == 32) code &= ~3; // devilw 32*32 + else if ((height | width) == 48) code &= ~1; // devilw 32*16 / 16*32 - pen_data += code*0x40; + pen_data += code * 0x40; - if( m_video_register&TWIN16_SCREEN_FLIPY ) + if (m_video_register & TWIN16_SCREEN_FLIPY) { - if (ypos>65000) ypos=ypos-65536; /* Bit hacky */ - ypos = 256-ypos-height; + if (ypos > 65000) ypos = ypos - 65536; /* Bit hacky */ + ypos = 256 - ypos - height; flipy = !flipy; } - if( m_video_register&TWIN16_SCREEN_FLIPX ) + if (m_video_register & TWIN16_SCREEN_FLIPX) { - if (xpos>65000) xpos=xpos-65536; /* Bit hacky */ - xpos = 320-xpos-width; + if (xpos > 65000) xpos = xpos - 65536; /* Bit hacky */ + xpos = 320 - xpos - width; flipx = !flipx; } - if( xpos>=320 ) xpos -= 65536; - if( ypos>=256 ) ypos -= 65536; + if (xpos >= 320) xpos -= 65536; + if (ypos >= 256) ypos -= 65536; /* slow slow slow, but it's ok for now */ - for( int y=0; y=cliprect.min_y && sy<=cliprect.max_y ) + int sy = (flipy) ? (ypos + height - 1 - y) : (ypos + y); + if (sy >= cliprect.min_y && sy <= cliprect.max_y) { uint16_t *const dest = &bitmap.pix(sy); uint8_t *const pdest = &screen.priority().pix(sy); - for( int x=0; x=cliprect.min_x && sx<=cliprect.max_x ) + int sx = (flipx) ? (xpos + width - 1 - x) : (xpos + x); + if (sx >= cliprect.min_x && sx <= cliprect.max_x) { - uint16_t pen = pen_data[x>>2]>>((~x&3)<<2)&0xf; + uint16_t pen = pen_data[x >> 2] >> ((~x & 3) << 2) & 0xf; - if( pen && !(pdest[sx] & TWIN16_SPRITE_OCCUPIED)) + if (pen && !(pdest[sx] & TWIN16_SPRITE_OCCUPIED)) { pdest[sx] |= TWIN16_SPRITE_OCCUPIED; - if (pen==0xf) // shadow + if (pen == 0xf) // shadow { if (!(pdest[sx] & TWIN16_BG_NO_SHADOW)) dest[sx] = m_palette->shadow_table()[dest[sx]]; @@ -386,8 +380,8 @@ TILE_GET_INFO_MEMBER(twin16_state::fix_tile_info) int color = (attr >> 9) & 0x0f; int flags=0; - if (attr&0x2000) flags|=TILE_FLIPX; - if (attr&0x4000) flags|=TILE_FLIPY; + if (attr & 0x2000) flags |= TILE_FLIPX; + if (attr & 0x4000) flags |= TILE_FLIPY; tileinfo.set(0, code, color, flags); } @@ -444,7 +438,7 @@ void twin16_state::video_start() m_palette->set_shadow_factor(0.4); // screenshots estimate - memset(m_sprite_buffer,0xff,0x800*sizeof(uint16_t)); + memset(m_sprite_buffer, 0xff, 0x800 * sizeof(uint16_t)); m_video_register = 0; m_sprite_busy = 0; m_sprite_timer = timer_alloc(FUNC(twin16_state::sprite_tick),this); @@ -458,9 +452,6 @@ void twin16_state::video_start() save_item(NAME(m_need_process_spriteram)); save_item(NAME(m_video_register)); save_item(NAME(m_sprite_busy)); - - if (!m_is_fround) - machine().save().register_postload(save_prepost_delegate(FUNC(twin16_state::twin16_postload), this)); } void fround_state::video_start() @@ -537,7 +528,7 @@ uint32_t twin16_state::screen_update_twin16(screen_device &screen, bitmap_ind16 break; } - draw_sprites( screen, bitmap, cliprect ); + draw_sprites(screen, bitmap, cliprect); m_fixed_tmap->draw(screen, bitmap, cliprect, 0); return 0; @@ -550,19 +541,19 @@ void twin16_state::screen_vblank_twin16(int state) { set_sprite_timer(); - if (spriteram_process_enable()) { + if (spriteram_process_enable()) + { if (m_need_process_spriteram) spriteram_process(); m_need_process_spriteram = 1; /* if the sprite preprocessor is used, sprite ram is copied to an external buffer first, as evidenced by 1-frame sprite lag in gradius2 and devilw otherwise, though there's probably more to it than that */ - memcpy(&m_spriteram->buffer()[0x1800],m_sprite_buffer,0x800*sizeof(uint16_t)); - memcpy(m_sprite_buffer,&m_spriteram->live()[0x1800],0x800*sizeof(uint16_t)); + memcpy(&m_spriteram->buffer()[0x1800], m_sprite_buffer, 0x800 * sizeof(uint16_t)); + memcpy(m_sprite_buffer, &m_spriteram->live()[0x1800], 0x800 * sizeof(uint16_t)); } - else { + else m_spriteram->copy(); - } // IRQ generation if (m_CPUA_register & 0x20) diff --git a/src/mame/konami/vendetta.cpp b/src/mame/konami/vendetta.cpp index 856527142800f..fe1c6a3a42dc5 100644 --- a/src/mame/konami/vendetta.cpp +++ b/src/mame/konami/vendetta.cpp @@ -217,7 +217,7 @@ K052109_CB_MEMBER(vendetta_state::esckids_tile_callback) K053246_CB_MEMBER(vendetta_state::sprite_callback) { - int pri = (*color & 0x03e0) >> 4; // ??????? + int pri = (*color & 0x03e0) >> 4; // ??????? if (pri <= m_layerpri[2]) *priority_mask = 0; else if (pri > m_layerpri[2] && pri <= m_layerpri[1]) @@ -239,21 +239,28 @@ K053246_CB_MEMBER(vendetta_state::sprite_callback) uint32_t vendetta_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - int layer[3]; - + // update color info and refresh tilemaps + static const int K053251_CI[3] = { k053251_device::CI2, k053251_device::CI3, k053251_device::CI4 }; m_sprite_colorbase = m_k053251->get_palette_index(k053251_device::CI1); - m_layer_colorbase[0] = m_k053251->get_palette_index(k053251_device::CI2); - m_layer_colorbase[1] = m_k053251->get_palette_index(k053251_device::CI3); - m_layer_colorbase[2] = m_k053251->get_palette_index(k053251_device::CI4); + + for (int i = 0; i < 3; i++) + { + int prev_colorbase = m_layer_colorbase[i]; + m_layer_colorbase[i] = m_k053251->get_palette_index(K053251_CI[i]); + + if (m_layer_colorbase[i] != prev_colorbase) + m_k052109->mark_tilemap_dirty(i); + } m_k052109->tilemap_update(); - layer[0] = 0; - m_layerpri[0] = m_k053251->get_priority(k053251_device::CI2); - layer[1] = 1; - m_layerpri[1] = m_k053251->get_priority(k053251_device::CI3); - layer[2] = 2; - m_layerpri[2] = m_k053251->get_priority(k053251_device::CI4); + // sort layers and draw + int layer[3]; + for (int i = 0; i < 3; i++) + { + layer[i] = i; + m_layerpri[i] = m_k053251->get_priority(K053251_CI[i]); + } konami_sortlayers3(layer, m_layerpri); @@ -434,6 +441,7 @@ void vendetta_state::sound_map(address_map &map) map(0xfc00, 0xfc2f).rw("k053260", FUNC(k053260_device::read), FUNC(k053260_device::write)); } + /*************************************************************************** Input Ports @@ -540,6 +548,7 @@ static INPUT_PORTS_START( esckids2p ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) INPUT_PORTS_END + /*************************************************************************** Machine Driver @@ -640,7 +649,7 @@ void vendetta_state::vendetta(machine_config &config) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - YM2151(config, "ymsnd", XTAL(3'579'545)).add_route(0, "lspeaker", 0.5).add_route(1, "rspeaker", 0.5); // verified with PCB + YM2151(config, "ymsnd", XTAL(3'579'545)).add_route(0, "lspeaker", 0.5).add_route(1, "rspeaker", 0.5); // verified with PCB k053260_device &k053260(K053260(config, "k053260", XTAL(3'579'545))); // verified with PCB k053260.add_route(0, "lspeaker", 0.75); diff --git a/src/mame/konami/xexex.cpp b/src/mame/konami/xexex.cpp index 76d1d78e04343..12e6960e16319 100644 --- a/src/mame/konami/xexex.cpp +++ b/src/mame/konami/xexex.cpp @@ -196,7 +196,11 @@ class xexex_state : public driver_device void xexex(machine_config &config); - void init_xexex(); +protected: + virtual void machine_start() override ATTR_COLD; + virtual void machine_reset() override ATTR_COLD; + virtual void video_start() override ATTR_COLD; + virtual void device_post_load() override { parse_control2(); } private: /* memory pointers */ @@ -213,8 +217,7 @@ class xexex_state : public driver_device int m_cur_alpha = 0; /* misc */ - uint16_t m_cur_control2 = 0; - int32_t m_strip_0x1a = 0; + uint16_t m_cur_control2 = 0; int m_suspension_active = 0; int m_resume_trigger = 0; emu_timer *m_dmadelay_timer = nullptr; @@ -245,13 +248,9 @@ class xexex_state : public driver_device void sound_irq_w(uint16_t data); void sound_bankswitch_w(uint8_t data); - virtual void machine_start() override ATTR_COLD; - virtual void machine_reset() override ATTR_COLD; - virtual void video_start() override ATTR_COLD; uint32_t screen_update_xexex(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); TIMER_CALLBACK_MEMBER(dmaend_callback); TIMER_DEVICE_CALLBACK_MEMBER(xexex_interrupt); - void xexex_postload(); void xexex_objdma(int limiter); void parse_control2(); K056832_CB_MEMBER(tile_callback); @@ -325,7 +324,7 @@ uint32_t xexex_state::screen_update_xexex(screen_device &screen, bitmap_rgb32 &b if (m_layer_colorbase[plane] != new_colorbase) { m_layer_colorbase[plane] = new_colorbase; - m_k056832->mark_plane_dirty( plane); + m_k056832->mark_plane_dirty(plane); } } @@ -361,7 +360,7 @@ uint32_t xexex_state::screen_update_xexex(screen_device &screen, bitmap_rgb32 &b } } - m_k053246->k053247_sprites_draw( bitmap, cliprect); + m_k053246->k053247_sprites_draw(bitmap, cliprect); if (m_cur_alpha) { @@ -407,7 +406,7 @@ void xexex_state::k053247_scattered_word_w(offs_t offset, uint16_t data, uint16_ #endif -void xexex_state::xexex_objdma( int limiter ) +void xexex_state::xexex_objdma(int limiter) { int counter, num_inactive; uint16_t *src, *dst; @@ -417,7 +416,7 @@ void xexex_state::xexex_objdma( int limiter ) if (limiter && counter == m_frame) return; // make sure we only do DMA transfer once per frame - m_k053246->k053247_get_ram( &dst); + m_k053246->k053247_get_ram(&dst); counter = m_k053246->k053247_get_dy(); src = m_spriteram; num_inactive = counter = 256; @@ -462,7 +461,7 @@ uint16_t xexex_state::xexex_waitskip_r() } -void xexex_state::parse_control2( ) +void xexex_state::parse_control2() { /* bit 0 is data */ /* bit 1 is cs (active low) */ @@ -473,7 +472,7 @@ void xexex_state::parse_control2( ) ioport("EEPROMOUT")->write(m_cur_control2, 0xff); /* bit 8 = enable sprite ROM reading */ - m_k053246->k053246_set_objcha_line( (m_cur_control2 & 0x0100) ? ASSERT_LINE : CLEAR_LINE); + m_k053246->k053246_set_objcha_line((m_cur_control2 & 0x0100) ? ASSERT_LINE : CLEAR_LINE); /* bit 9 = disable alpha channel on K054157 plane 0 (under investigation) */ m_cur_alpha = !(m_cur_control2 & 0x200); @@ -536,15 +535,15 @@ TIMER_DEVICE_CALLBACK_MEMBER(xexex_state::xexex_interrupt) machine().scheduler().trigger(m_resume_trigger); } - if(scanline == 0) + if (scanline == 0) { // IRQ 6 is for test mode only - if (m_cur_control2 & 0x0020) - m_maincpu->set_input_line(6, HOLD_LINE); + if (m_cur_control2 & 0x0020) + m_maincpu->set_input_line(6, HOLD_LINE); } /* TODO: vblank is at 256! (enable CCU then have fun in fixing offsetted layers) */ - if(scanline == 128) + if (scanline == 128) { if (m_k053246->k053246_is_irq_enabled()) { @@ -653,11 +652,6 @@ INPUT_PORTS_END -void xexex_state::xexex_postload() -{ - parse_control2(); -} - void xexex_state::machine_start() { m_z80bank->configure_entries(0, 8, memregion("audiocpu")->base(), 0x4000); @@ -672,16 +666,13 @@ void xexex_state::machine_start() save_item(NAME(m_frame)); save_item(NAME(m_cur_control2)); - machine().save().register_postload(save_prepost_delegate(FUNC(xexex_state::xexex_postload), this)); m_dmadelay_timer = timer_alloc(FUNC(xexex_state::dmaend_callback), this); } void xexex_state::machine_reset() { - int i; - - for (i = 0; i < 4; i++) + for (int i = 0; i < 4; i++) { m_layerpri[i] = 0; m_layer_colorbase[i] = 0; @@ -892,22 +883,9 @@ ROM_START( xexexj ) /* Japan, Version AA */ ROM_END -void xexex_state::init_xexex() -{ - m_strip_0x1a = 0; - - if (!strcmp(machine().system().name, "xexex")) - { - // Invulnerability -// *(uint16_t *)(memregion("maincpu")->base() + 0x648d4) = 0x4a79; -// *(uint16_t *)(memregion("maincpu")->base() + 0x00008) = 0x5500; - m_strip_0x1a = 1; - } -} - } // anonymous namespace -GAME( 1991, xexex, 0, xexex, xexex, xexex_state, init_xexex, ROT0, "Konami", "Xexex (ver EAA)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) -GAME( 1991, orius, xexex, xexex, xexex, xexex_state, init_xexex, ROT0, "Konami", "Orius (ver UAA)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) -GAME( 1991, xexexa, xexex, xexex, xexex, xexex_state, init_xexex, ROT0, "Konami", "Xexex (ver AAA)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) -GAME( 1991, xexexj, xexex, xexex, xexex, xexex_state, init_xexex, ROT0, "Konami", "Xexex (ver JAA)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) +GAME( 1991, xexex, 0, xexex, xexex, xexex_state, empty_init, ROT0, "Konami", "Xexex (ver EAA)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) +GAME( 1991, orius, xexex, xexex, xexex, xexex_state, empty_init, ROT0, "Konami", "Orius (ver UAA)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) +GAME( 1991, xexexa, xexex, xexex, xexex, xexex_state, empty_init, ROT0, "Konami", "Xexex (ver AAA)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) +GAME( 1991, xexexj, xexex, xexex, xexex, xexex_state, empty_init, ROT0, "Konami", "Xexex (ver JAA)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/konami/xmen.cpp b/src/mame/konami/xmen.cpp index 1f954df8339b5..7a09275d6ccf3 100644 --- a/src/mame/konami/xmen.cpp +++ b/src/mame/konami/xmen.cpp @@ -228,22 +228,29 @@ void xmen6p_state::video_start() uint32_t xmen_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - int const bg_colorbase = m_k053251->get_palette_index(k053251_device::CI4); + // update color info and refresh tilemaps + static const int K053251_CI[3] = { k053251_device::CI3, k053251_device::CI0, k053251_device::CI2 }; + const int bg_colorbase = m_k053251->get_palette_index(k053251_device::CI4); m_sprite_colorbase = m_k053251->get_palette_index(k053251_device::CI1); - m_layer_colorbase[0] = m_k053251->get_palette_index(k053251_device::CI3); - m_layer_colorbase[1] = m_k053251->get_palette_index(k053251_device::CI0); - m_layer_colorbase[2] = m_k053251->get_palette_index(k053251_device::CI2); + + for (int i = 0; i < 3; i++) + { + int prev_colorbase = m_layer_colorbase[i]; + m_layer_colorbase[i] = m_k053251->get_palette_index(K053251_CI[i]); + + if (m_layer_colorbase[i] != prev_colorbase) + m_k052109->mark_tilemap_dirty(i); + } m_k052109->tilemap_update(); + // sort layers and draw int layer[3]; - - layer[0] = 0; - m_layerpri[0] = m_k053251->get_priority(k053251_device::CI3); - layer[1] = 1; - m_layerpri[1] = m_k053251->get_priority(k053251_device::CI0); - layer[2] = 2; - m_layerpri[2] = m_k053251->get_priority(k053251_device::CI2); + for (int i = 0; i < 3; i++) + { + layer[i] = i; + m_layerpri[i] = m_k053251->get_priority(K053251_CI[i]); + } konami_sortlayers3(layer, m_layerpri); @@ -305,22 +312,29 @@ void xmen6p_state::screen_vblank(int state) m_k052109->write(offset, m_tilemap[index][offset] & 0x00ff); } - int const bg_colorbase = m_k053251->get_palette_index(k053251_device::CI4); + // update color info and refresh tilemaps + static const int K053251_CI[3] = { k053251_device::CI3, k053251_device::CI0, k053251_device::CI2 }; + const int bg_colorbase = m_k053251->get_palette_index(k053251_device::CI4); m_sprite_colorbase = m_k053251->get_palette_index(k053251_device::CI1); - m_layer_colorbase[0] = m_k053251->get_palette_index(k053251_device::CI3); - m_layer_colorbase[1] = m_k053251->get_palette_index(k053251_device::CI0); - m_layer_colorbase[2] = m_k053251->get_palette_index(k053251_device::CI2); + + for (int i = 0; i < 3; i++) + { + int prev_colorbase = m_layer_colorbase[i]; + m_layer_colorbase[i] = m_k053251->get_palette_index(K053251_CI[i]); + + if (m_layer_colorbase[i] != prev_colorbase) + m_k052109->mark_tilemap_dirty(i); + } m_k052109->tilemap_update(); + // sort layers and draw int layer[3]; - - m_layerpri[0] = m_k053251->get_priority(k053251_device::CI3); - layer[0] = 0; - m_layerpri[1] = m_k053251->get_priority(k053251_device::CI0); - layer[1] = 1; - m_layerpri[2] = m_k053251->get_priority(k053251_device::CI2); - layer[2] = 2; + for (int i = 0; i < 3; i++) + { + layer[i] = i; + m_layerpri[i] = m_k053251->get_priority(K053251_CI[i]); + } konami_sortlayers3(layer, m_layerpri); diff --git a/src/mame/konami/zr107.cpp b/src/mame/konami/zr107.cpp index 5a00db6b395ec..607b0e50ec672 100644 --- a/src/mame/konami/zr107.cpp +++ b/src/mame/konami/zr107.cpp @@ -8,7 +8,7 @@ TODO: - segfaults on soft reset; - - jetwave: fix debug mode; + - jetwave motors/sensors Hardware overview: @@ -193,8 +193,8 @@ namespace { class zr107_state : public driver_device { public: - zr107_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), + zr107_state(const machine_config &mconfig, device_type type, const char *tag) : + driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), m_audiocpu(*this, "audiocpu"), m_dsp(*this, "dsp"), @@ -231,7 +231,7 @@ class zr107_state : public driver_device required_device m_k001006_1; required_ioport_array<5> m_in; required_ioport m_out4, m_eepromout; - required_ioport_array<3> m_analog; + optional_ioport_array<3> m_analog; output_finder<2> m_pcb_digit; required_device m_screen; required_device m_palette; @@ -263,8 +263,8 @@ class zr107_state : public driver_device class midnrun_state : public zr107_state { public: - midnrun_state(const machine_config &mconfig, device_type type, const char *tag) - : zr107_state(mconfig, type, tag), + midnrun_state(const machine_config &mconfig, device_type type, const char *tag) : + zr107_state(mconfig, type, tag), m_k056832(*this, "k056832") { } @@ -286,8 +286,8 @@ class midnrun_state : public zr107_state class jetwave_state : public zr107_state { public: - jetwave_state(const machine_config &mconfig, device_type type, const char *tag) - : zr107_state(mconfig, type, tag), + jetwave_state(const machine_config &mconfig, device_type type, const char *tag) : + zr107_state(mconfig, type, tag), m_k001604(*this, "k001604"), m_k001006_2(*this, "k001006_2") { } @@ -492,13 +492,13 @@ void midnrun_state::main_memmap(address_map &map) map(0x74060000, 0x7406003f).rw(FUNC(midnrun_state::ccu_r), FUNC(midnrun_state::ccu_w)); map(0x74080000, 0x74081fff).ram().w(m_palette, FUNC(palette_device::write32)).share("palette"); map(0x740a0000, 0x740a3fff).r(m_k056832, FUNC(k056832_device::rom_word_r)); - map(0x78000000, 0x7800ffff).rw(m_konppc, FUNC(konppc_device::cgboard_dsp_shared_r_ppc), FUNC(konppc_device::cgboard_dsp_shared_w_ppc)); // 21N 21K 23N 23K + map(0x78000000, 0x7800ffff).rw(m_konppc, FUNC(konppc_device::cgboard_dsp_shared_r_ppc), FUNC(konppc_device::cgboard_dsp_shared_w_ppc)); // 21N 21K 23N 23K map(0x78010000, 0x7801ffff).w(m_konppc, FUNC(konppc_device::cgboard_dsp_shared_w_ppc)); map(0x78040000, 0x7804000f).rw(m_k001006_1, FUNC(k001006_device::read), FUNC(k001006_device::write)); map(0x780c0000, 0x780c0007).rw(m_konppc, FUNC(konppc_device::cgboard_dsp_comm_r_ppc), FUNC(konppc_device::cgboard_dsp_comm_w_ppc)); map(0x7e000000, 0x7e003fff).rw(FUNC(midnrun_state::sysreg_r), FUNC(midnrun_state::sysreg_w)); map(0x7e008000, 0x7e009fff).m(m_k056230, FUNC(k056230_device::regs_map)); // LANC registers - map(0x7e00a000, 0x7e00bfff).rw(m_k056230, FUNC(k056230_device::ram_r), FUNC(k056230_device::ram_w)); // LANC Buffer RAM (27E) + map(0x7e00a000, 0x7e00bfff).rw(m_k056230, FUNC(k056230_device::ram_r), FUNC(k056230_device::ram_w)); // LANC Buffer RAM (27E) map(0x7e00c000, 0x7e00c00f).rw(m_k056800, FUNC(k056800_device::host_r), FUNC(k056800_device::host_w)); map(0x7f800000, 0x7f9fffff).rom().region("prgrom", 0); map(0x7fe00000, 0x7fffffff).rom().region("prgrom", 0); @@ -512,14 +512,14 @@ void jetwave_state::main_memmap(address_map &map) map(0x74010000, 0x7401ffff).ram().w(m_palette, FUNC(palette_device::write32)).share("palette"); map(0x74020000, 0x7403ffff).rw(m_k001604, FUNC(k001604_device::tile_r), FUNC(k001604_device::tile_w)); map(0x74040000, 0x7407ffff).rw(m_k001604, FUNC(k001604_device::char_r), FUNC(k001604_device::char_w)); - map(0x78000000, 0x7800ffff).rw(m_konppc, FUNC(konppc_device::cgboard_dsp_shared_r_ppc), FUNC(konppc_device::cgboard_dsp_shared_w_ppc)); // 21N 21K 23N 23K + map(0x78000000, 0x7800ffff).rw(m_konppc, FUNC(konppc_device::cgboard_dsp_shared_r_ppc), FUNC(konppc_device::cgboard_dsp_shared_w_ppc)); // 21N 21K 23N 23K map(0x78010000, 0x7801ffff).w(m_konppc, FUNC(konppc_device::cgboard_dsp_shared_w_ppc)); map(0x78040000, 0x7804000f).rw(m_k001006_1, FUNC(k001006_device::read), FUNC(k001006_device::write)); map(0x78080000, 0x7808000f).rw(m_k001006_2, FUNC(k001006_device::read), FUNC(k001006_device::write)); map(0x780c0000, 0x780c0007).rw(m_konppc, FUNC(konppc_device::cgboard_dsp_comm_r_ppc), FUNC(konppc_device::cgboard_dsp_comm_w_ppc)); map(0x7e000000, 0x7e003fff).rw(FUNC(jetwave_state::sysreg_r), FUNC(jetwave_state::sysreg_w)); map(0x7e008000, 0x7e009fff).m(m_k056230, FUNC(k056230_device::regs_map)); // LANC registers - map(0x7e00a000, 0x7e00bfff).rw(m_k056230, FUNC(k056230_device::ram_r), FUNC(k056230_device::ram_w)); // LANC Buffer RAM (27E) + map(0x7e00a000, 0x7e00bfff).rw(m_k056230, FUNC(k056230_device::ram_r), FUNC(k056230_device::ram_w)); // LANC Buffer RAM (27E) map(0x7e00c000, 0x7e00c00f).rw(m_k056800, FUNC(k056800_device::host_r), FUNC(k056800_device::host_w)); map(0x7f000000, 0x7f3fffff).rom().region("datarom", 0); map(0x7f800000, 0x7f9fffff).rom().region("prgrom", 0); @@ -541,7 +541,7 @@ void zr107_state::sound_ctrl_w(uint8_t data) void zr107_state::sound_memmap(address_map &map) { map(0x000000, 0x01ffff).rom(); - map(0x100000, 0x103fff).ram(); // Work RAM + map(0x100000, 0x103fff).ram(); // Work RAM map(0x200000, 0x2004ff).rw("k054539_1", FUNC(k054539_device::read), FUNC(k054539_device::write)).umask16(0xff00); map(0x200000, 0x2004ff).rw("k054539_2", FUNC(k054539_device::read), FUNC(k054539_device::write)).umask16(0x00ff); map(0x400000, 0x40001f).rw(m_k056800, FUNC(k056800_device::sound_r), FUNC(k056800_device::sound_w)).umask16(0x00ff); @@ -595,8 +595,8 @@ static INPUT_PORTS_START( midnrun ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_NAME("Shift Up") PORT_4WAY PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_NAME("Shift Down") PORT_4WAY PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_NAME("Auto Shift") PORT_4WAY PORT_TOGGLE PORT_CONDITION("IN3", 0x02, EQUALS, 0x02) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("AT/MT Switch") PORT_CONDITION("IN3", 0x02, EQUALS, 0x00) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Service Button") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("AT/MT Switch") PORT_CONDITION("IN3", 0x02, EQUALS, 0x00) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_BIT( 0x0b, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("IN3") @@ -614,16 +614,16 @@ static INPUT_PORTS_START( midnrun ) PORT_DIPSETTING( 0x00, "Button" ) PORT_DIPNAME( 0x01, 0x01, "CG Board Type" ) PORT_DIPLOCATION("SW:1") PORT_DIPSETTING( 0x01, "Single" ) - PORT_DIPSETTING( 0x00, "Twin" ) //unused + PORT_DIPSETTING( 0x00, "Twin" ) // unused PORT_START("ANALOG1") - PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_NAME("Steering Wheel") PORT_MINMAX(0x00,0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(10) + PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_NAME("Steering Wheel") PORT_MINMAX(0x00,0xff) PORT_SENSITIVITY(25) PORT_KEYDELTA(16) PORT_START("ANALOG2") - PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_NAME("Gas Pedal") PORT_MINMAX(0x00,0xf0) PORT_SENSITIVITY(25) PORT_KEYDELTA(10) + PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_NAME("Gas Pedal") PORT_MINMAX(0x00,0x80) PORT_SENSITIVITY(25) PORT_KEYDELTA(16) PORT_START("ANALOG3") - PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_NAME("Brake Pedal") PORT_MINMAX(0x00,0xf0) PORT_SENSITIVITY(25) PORT_KEYDELTA(10) + PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_NAME("Brake Pedal") PORT_MINMAX(0x00,0x80) PORT_SENSITIVITY(25) PORT_KEYDELTA(16) INPUT_PORTS_END static INPUT_PORTS_START( jetwave ) @@ -631,15 +631,20 @@ static INPUT_PORTS_START( jetwave ) PORT_START("IN0") PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Start/View") - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("T-Center") //Non-analog acell - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("Angle") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_NAME("Left Turn") //Non-analog left - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_NAME("Right Turn") //Non-analog right + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CONDITION("IN0", 0x18, NOTEQUALS, 0x18) // T-Center + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Angle") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_NAME("Tilt Left") PORT_PLAYER(2) PORT_CONDITION("IN3", 0x01, EQUALS, 0x01) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_NAME("Tilt Right") PORT_PLAYER(2) PORT_CONDITION("IN3", 0x01, EQUALS, 0x01) PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_UNKNOWN ) + // digital controls when in dev mode + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Accelerator (Dev)") PORT_CONDITION("IN3", 0x01, EQUALS, 0x00) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_NAME("Handle Left (Dev)") PORT_CONDITION("IN3", 0x01, EQUALS, 0x00) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_NAME("Handle Right (Dev)") PORT_CONDITION("IN3", 0x01, EQUALS, 0x00) + PORT_START("IN3") PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Service Button") PORT_CODE(KEYCODE_9) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_DIPNAME( 0x0c, 0x0c, "Network ID" ) PORT_DIPLOCATION("SW:4,3") @@ -647,22 +652,18 @@ static INPUT_PORTS_START( jetwave ) PORT_DIPSETTING( 0x08, "2" ) PORT_DIPSETTING( 0x04, "3" ) PORT_DIPSETTING( 0x00, "4" ) - // TODO: make these two less confusing - PORT_DIPNAME( 0x02, 0x00, "Drive System" ) PORT_DIPLOCATION("SW:2") //Sensors for force feedback. Todo: "Disable" the sensors so this switch can be set to off without errors. + PORT_DIPNAME( 0x02, 0x00, "Drive System" ) PORT_DIPLOCATION("SW:2") + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) // Disables and bypasses all sensor checks. This disables the force feedback on actual hardware. PORT_DIPSETTING( 0x02, DEF_STR( On ) ) // Enables the sensors/normal use. - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) //Disables and bypasses all sensor checks. This disables the force feedback on actual hardware. PORT_DIPNAME( 0x01, 0x01, "Running Mode" ) PORT_DIPLOCATION("SW:1") - PORT_DIPSETTING( 0x01, "Product" ) //Enables the analog inputs; normal usage - PORT_DIPSETTING( 0x00, "Check" ) //Disables them for use with a JAMMA interface; intended for development purposes. + PORT_DIPSETTING( 0x01, "Production" ) // Enables the analog inputs; normal usage + PORT_DIPSETTING( 0x00, "Developer" ) // Disables them for use with a JAMMA interface; intended for development purposes. PORT_START("ANALOG1") - PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_NAME("Steering") PORT_MINMAX(0x20,0xe0) PORT_SENSITIVITY(25) PORT_KEYDELTA(10) PORT_REVERSE + PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_NAME("Steering Handle") PORT_MINMAX(0x70,0x90) PORT_SENSITIVITY(25) PORT_KEYDELTA(4) PORT_REVERSE PORT_START("ANALOG2") - PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_NAME("Accelerator") PORT_MINMAX(0x00,0x90) PORT_SENSITIVITY(25) PORT_KEYDELTA(10) - - PORT_START("ANALOG3") //actually required else MAME will crash if this port is removed. - PORT_BIT( 0xff, 0x00, IPT_UNUSED ) + PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_NAME("Accelerator") PORT_MINMAX(0x00,0x20) PORT_SENSITIVITY(25) PORT_KEYDELTA(4) INPUT_PORTS_END @@ -673,15 +674,15 @@ double zr107_state::adc0838_callback(uint8_t input) switch (input) { case ADC083X_CH0: - return (double)(5 * m_analog[0]->read()) / 255.0; + return (double)(5 * m_analog[0].read_safe(0)) / 255.0; case ADC083X_CH1: - return (double)(5 * m_analog[1]->read()) / 255.0; + return (double)(5 * m_analog[1].read_safe(0)) / 255.0; case ADC083X_CH2: - return (double)(5 * m_analog[2]->read()) / 255.0; + return (double)(5 * m_analog[2].read_safe(0)) / 255.0; case ADC083X_VREF: - return 5; - default: - return 0; + return 5.0; + case ADC083X_AGND: default: + return 0.0; } } @@ -724,9 +725,9 @@ void zr107_state::machine_reset() void zr107_state::zr107(machine_config &config) { // basic machine hardware - PPC403GA(config, m_maincpu, XTAL(64'000'000)/2); // PowerPC 403GA 32MHz + PPC403GA(config, m_maincpu, XTAL(64'000'000)/2); // PowerPC 403GA 32MHz - M68000(config, m_audiocpu, XTAL(64'000'000)/8); // 8MHz + M68000(config, m_audiocpu, XTAL(64'000'000)/8); // 8MHz m_audiocpu->set_addrmap(AS_PROGRAM, &zr107_state::sound_memmap); ADSP21062(config, m_dsp, XTAL(36'000'000)); @@ -804,7 +805,7 @@ void jetwave_state::jetwave(machine_config &config) // video hardware m_screen->set_size(1024, 1024); - m_screen->set_visarea(40, 511 + 40, 27, 383 + 27); // needs CRTC emulation + m_screen->set_visarea(40, 511 + 40, 27, 383 + 27); // needs CRTC emulation m_screen->set_screen_update(FUNC(jetwave_state::screen_update)); m_palette->set_format(4, raw_to_rgb_converter::standard_rgb_decoder<5,5,5, 10,5,0>, 16384); diff --git a/src/mame/layout/d70.lay b/src/mame/layout/d70.lay new file mode 100644 index 0000000000000..f3627c8348420 --- /dev/null +++ b/src/mame/layout/d70.lay @@ -0,0 +1,633 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + ]]> + + + + + + + ]]> + + + + + + + + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mame/layout/goldnpkr.lay b/src/mame/layout/goldnpkr.lay index 00eca2889e1bf..4f8249ac05b0a 100644 --- a/src/mame/layout/goldnpkr.lay +++ b/src/mame/layout/goldnpkr.lay @@ -75,6 +75,42 @@ license:CC0-1.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -117,5 +153,18 @@ license:CC0-1.0 + + + + + + + + + + + + + diff --git a/src/mame/layout/goldnswp.lay b/src/mame/layout/goldnswp.lay new file mode 100644 index 0000000000000..a0ca761561d99 --- /dev/null +++ b/src/mame/layout/goldnswp.lay @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mame/layout/kn5000.lay b/src/mame/layout/kn5000.lay index 4f9de1e8d10d7..dc7e20af98c8b 100644 --- a/src/mame/layout/kn5000.lay +++ b/src/mame/layout/kn5000.lay @@ -35,31 +35,38 @@ license:CC0-1.0 - + + - + + - + + - + + - + + - + + - + + @@ -70,6 +77,10 @@ license:CC0-1.0 + + + + @@ -289,169 +300,168 @@ license:CC0-1.0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - - + + - + - - - + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - + - + + + - - - - - - + + + + + + - + - + - + - + - + - + - + - + - + - + - + @@ -461,186 +471,188 @@ license:CC0-1.0 - + - + - + - + - + - + - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - + + + + - - - + + + - + - - - + + + + - - - - - + + + + + @@ -703,7 +715,7 @@ license:CC0-1.0 - + diff --git a/src/mame/layout/novag_beluga.lay b/src/mame/layout/novag_beluga.lay new file mode 100644 index 0000000000000..5655c439233ed --- /dev/null +++ b/src/mame/layout/novag_beluga.lay @@ -0,0 +1,502 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mame/layout/oberheim_dmx.lay b/src/mame/layout/oberheim_dmx.lay new file mode 100644 index 0000000000000..9a669dde2d04d --- /dev/null +++ b/src/mame/layout/oberheim_dmx.lay @@ -0,0 +1,589 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mame/lsi/m3.cpp b/src/mame/lsi/m3.cpp index a077124757d1f..4502cab39ac26 100644 --- a/src/mame/lsi/m3.cpp +++ b/src/mame/lsi/m3.cpp @@ -31,14 +31,13 @@ TODO: - Initial PC is currently hacked to f000 - - Verify/fix floppy hookup (CPU needs to be overclocked?) + - Verify/fix floppy hookup - Printer interface - Buzzer - Map the rest of the keys, verify existing keys - Switch FDC to 1 MHz for 5.25" drives Notes: - - No offical software available, but a custom version of CP/M - Y to boot from floppy, ESC to enter monitor, any other key to boot from IDE @@ -56,6 +55,7 @@ #include "bus/rs232/rs232.h" #include "emupal.h" #include "screen.h" +#include "softlist_dev.h" namespace { @@ -126,7 +126,9 @@ class m3_state : public driver_device void fdc_drq_w(int state); uint8_t fdc_data_r(offs_t offset); void fdc_data_w(offs_t offset, uint8_t data); - bool m_nmi_taken = 0; + + bool m_nmi_enabled = false; + bool m_nmi_taken = false; }; @@ -451,8 +453,8 @@ void m3_state::fdc_intrq_w(int state) { if (state) { + m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, CLEAR_LINE); m_nmi_taken = false; - m_maincpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE); } m_ctc->trg1(state); @@ -461,22 +463,25 @@ void m3_state::fdc_intrq_w(int state) void m3_state::fdc_drq_w(int state) { if (state) - m_maincpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE); - - if (state && !m_nmi_taken) { - m_nmi_taken = true; - m_maincpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero); + m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, CLEAR_LINE); + + if (m_nmi_enabled) + { + m_maincpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero); + + m_nmi_enabled = false; + m_nmi_taken = true; + } } } uint8_t m3_state::fdc_data_r(offs_t offset) { - if ((m_fdc->drq_r() == 0) && m_nmi_taken) + if (m_nmi_taken && m_fdc->drq_r() == 0) { - // cpu tries to read data without drq, halt it and reset pc - m_maincpu->set_input_line(INPUT_LINE_HALT, ASSERT_LINE); - m_maincpu->set_state_int(Z80_PC, m_maincpu->state_int(Z80_PC) - 2); + m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, ASSERT_LINE); + m_maincpu->retry_access(); return 0; } @@ -486,13 +491,10 @@ uint8_t m3_state::fdc_data_r(offs_t offset) void m3_state::fdc_data_w(offs_t offset, uint8_t data) { - if ((m_fdc->drq_r() == 0) && m_nmi_taken) + if (m_nmi_taken && m_fdc->drq_r() == 0) { - // cpu tries to write data without drq, halt it and reset pc - m_maincpu->set_input_line(INPUT_LINE_HALT, ASSERT_LINE); - m_maincpu->set_state_int(Z80_PC, m_maincpu->state_int(Z80_PC) - 2); - - return; + m_maincpu->set_input_line(Z80_INPUT_LINE_WAIT, ASSERT_LINE); + m_maincpu->retry_access(); } m_fdc->data_w(data); @@ -505,7 +507,7 @@ void m3_state::ppi2_pa_w(uint8_t data) // 7------- not used? // -6------ buzzer // --5----- not used? - // ---4---- unknown (motor?) + // ---4---- nmi enable // ----3--- unknown // -----2-- floppy side // ------10 drive select @@ -521,6 +523,8 @@ void m3_state::ppi2_pa_w(uint8_t data) if (floppy) floppy->ss_w(BIT(data, 2)); + + m_nmi_enabled = bool(BIT(~data, 4)); } uint8_t m3_state::ppi2_pb_r() @@ -534,6 +538,7 @@ void m3_state::machine_start() save_item(NAME(m_kbd_col)); save_item(NAME(m_kbd_row)); save_item(NAME(m_kbd_data)); + save_item(NAME(m_nmi_enabled)); save_item(NAME(m_nmi_taken)); } @@ -541,13 +546,8 @@ void m3_state::machine_reset() { m_maincpu->set_pc(0xf000); + m_nmi_enabled = false; m_nmi_taken = false; - - // floppy motor is always on - if (m_floppy[0]) - m_floppy[0]->get_device()->mon_w(0); - if (m_floppy[1]) - m_floppy[1]->get_device()->mon_w(0); } @@ -582,7 +582,6 @@ static void m3_floppies(device_slot_interface &device) void m3_state::m3(machine_config &config) { Z80(config, m_maincpu, 4.9152_MHz_XTAL / 2); - m_maincpu->set_clock_scale(1.2f); // needs to be overclocked or its too slow for the floppy m_maincpu->set_addrmap(AS_PROGRAM, &m3_state::mem_map); m_maincpu->set_addrmap(AS_IO, &m3_state::io_map); m_maincpu->set_daisy_config(daisy_chain); @@ -633,6 +632,8 @@ void m3_state::m3(machine_config &config) FLOPPY_CONNECTOR(config, "fdc:0", m3_floppies, "sa850", floppy_image_device::default_mfm_floppy_formats); FLOPPY_CONNECTOR(config, "fdc:1", m3_floppies, "sa850", floppy_image_device::default_mfm_floppy_formats); + SOFTWARE_LIST(config, "floppy_list").set_original("m3"); + // keyboard I8035(config, m_kbdmcu, 6.144_MHz_XTAL); m_kbdmcu->set_addrmap(AS_PROGRAM, &m3_state::kbd_mem_map); diff --git a/src/mame/mame.lst b/src/mame/mame.lst index 9946ce86875d2..2f4b3ddd3bf06 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -15961,7 +15961,7 @@ gngprot // Capcom/Romstar Proto gngt // 9/1985 (c) 1985 makaimur // 9/1985 (c) 1985 makaimurb // 9/1985 (c) 1985 -makaimurba // 9/1985 (c) 1985 +makaimurbbl // bootleg makaimurc // 9/1985 (c) 1985 makaimurg // 9/1985 (c) 1985 @@ -16250,7 +16250,9 @@ pinkswtsx // (c) 2006 Cave (AMI license) - 2006/xx/xx MAST pinkswtssc // bootleg @source:cave/fstgfish.cpp -fstgfish // (c) 2008 Cave +fstgfish // (c) 2009 Cave +oygt // (c) 2009 Cave +oyks // (c) 2009 Cave @source:cce/mc1000.cpp mc1000 // @@ -19395,6 +19397,8 @@ tmkombat // Tiger Electronics tnmarebc // Tiger Electronics topaliens // Tiger Electronics tpitfight // Tiger Electronics +trclchick // Tronica +trdivadv // Tronica trobhood // Tiger Electronics trobocop2 // Tiger Electronics trobocop3 // Tiger Electronics @@ -20155,7 +20159,7 @@ aplan // bootleg (WeaShing) bingowng // (c) 1993 Wing Co. Ltd bingownga // (c) 1993 Wing Co. Ltd bonusch // (c) 1990 Wing Co. Ltd -feverch // (c) 1990 Wing Co. Ltd +bonuscha // (c) 1990 Wing Co. Ltd carb2002 // bootleg carb2003 // bootleg cb3 // (c) 199? Dyna Electronics @@ -20166,6 +20170,7 @@ cb3d // (c) 199? Dyna Electronics cb3e // 199? bootleg cb3f // 199? bootleg cb3g // (c) 199? Dyna Electronics +cb3h // (c) 199? Dyna Electronics cherry96 // bootleg chry10 // bootleg chryangl // (c) 199? Dyna Electronics @@ -20179,6 +20184,7 @@ cmast91 // (c) 1991 Dyna Electronics cmast92 // (c) 1992 Dyna Electronics cmast92a // (c) 1992 Dyna Electronics cmast97 // (c) 1996 Dyna Electronics +cmast97a // (c) 1996 Dyna Electronics cmast97i // (c) 1996 Dyna Electronics cmast99 // (c) 1999 Dyna Electronics cmast99b // bootleg @@ -20194,6 +20200,7 @@ cmasterh // (c) 1991 Dyna Electronics cmasteri // (c) 1991 Dyna Electronics cmasterj // (c) 1991 Dyna Electronics cmasterk // (c) 1991 Dyna Electronics +cmasterl // (c) 1991 Dyna Electronics cmezspin // (c) 1991 Dyna Electronics cmfb55 // bootleg cmfun // (c) 1995 Dyna Electronics @@ -20215,11 +20222,19 @@ cmwm // (c) 199? Dyna Electronics crazybon // (c) 199? Sang Ho crazybona // (c) 199? Sang Ho crazybonb // (c) 199? unknown +cutyline // +cutylinea // +cutylineb // eldoradd // (c) 1991 Dyna Electronics eldoraddo // (c) 1991 Dyna Electronics eldoraddoa // (c) 1991 Dyna Electronics eldoraddob // (c) 1991 Dyna Electronics +eldoraddoc // (c) 1991 Dyna Electronics +f16s8l // fb2010 // (c) 2009 Amcoe +feverch // (c) 1986 Wing Co. Ltd +fevercha // (c) 1986 Wing Co. Ltd +feverchtw // (c) 1986 Wing Co. Ltd fl7_3121 // (c) 199? Cyberdyne Systems, Inc. fl7_50 // (c) 199? Cyberdyne Systems, Inc. fl7_500 // (c) 199? Cyberdyne Systems, Inc. @@ -20229,6 +20244,7 @@ fl7_tw // Taiwanese Hardware. goldfrui // bootleg goldstar // (c) 198? IGS goldstbl // (c) 198? IGS +gregular // Playmark halltsk // hamhouse // bootleg hamhouse9 // bootleg @@ -20435,6 +20451,7 @@ jking02 // (c) 2001 klxyj // (c) 200? lhdmg // (c) 1999 lhdmgp // (c) 1999 +lhdmgp200c3m // (c) 1999 lhzb3 // (c) 1999 lhzb3106c5m // (c) 1999 lhzb3sjb // (c) 1999 @@ -20483,13 +20500,18 @@ cjdh2a // (c) 200? cjdh2b // (c) 200? cjdh2c // (c) 200? igsm312 // (c) 200? +jhzb // (c) 200? +jxry // (c) 200? lhfy // (c) 2010 lhtb // (c) 2009 lhzb3in1 // (c) 200? lhzbgqb // (c) 2010 mghammer // (c) 2015 qhzb // (c) 2007 +slqzsp // (c) 200? super70s // (c) 200? +sydh // (c) 200? +xyddz // (c) 200? @source:igs/igspoker.cpp chleague // (c) 199? IGS @@ -20717,11 +20739,11 @@ jbell // (c) 1997 IGS jinhulu2 // (c) 1995 IGS spk100 // (c) 1996 IGS spk102ua // (c) 1996 IGS -spk114it // (c) 199? IGS -spk115it // (c) 199? IGS -spk116it // (c) 199? IGS -spk116itmx // (c) 199? IGS -spk120in // (c) 199? IGS +spk114it // (c) 1996 IGS +spk115it // (c) 1996 IGS +spk116it // (c) 1996 IGS +spk116itmx // (c) 1996 IGS +spk120in // (c) 1996 IGS spk200ua // (c) 1996 IGS spk201ua // (c) 1996 IGS spk203us // (c) 1996 IGS @@ -24882,9 +24904,10 @@ rungunad // GX247 (c) 1993 (World) rungunb // GX247 (c) 1993 (World) rungunbd // GX247 (c) 1993 (World) rungund // GX247 (c) 1993 (World) -rungunua // GX247 (c) 1993 (US) -rungunuad // GX247 (c) 1993 (US) -rungunud // GX247 (c) 1993 (US) +rungunuaad // GX247 (c) 1993 (US) +rungunuabd // GX247 (c) 1993 (US) +rungunuba // GX247 (c) 1993 (US) +rungunubad // GX247 (c) 1993 (US) slmdunkj // GX247 (c) 1993 (Japan) slmdunkjd // GX247 (c) 1993 (Japan) @@ -27577,6 +27600,7 @@ toride2g // (c) 1994 toride2gg // (c) 1994 toride2gk // (c) 1994 toride2j // (c) 1994 +toride2ji // (c) 1994 vmetal // (c) 1995 Excellent System? vmetaln // (c) 1995 Excellent System? @@ -29315,6 +29339,7 @@ texasrls // (c) 1998 Cadillac Jack @source:misc/blocktax.cpp blocktax // (c)2002 TAX / Game Revival +unktax @source:misc/bntyhunt.cpp bntyhunt // (c) 200? GCTech Co., LTD @@ -29400,10 +29425,12 @@ castrev // Revolution cb2001 // (c) 2000 Dyna Electronics cb4 // (c) 1997 Dyna Electronics cb5 // (c) 1997 Dyna Electronics +cb5_11 // (c) 1997 Dyna Electronics crzybell // (c) 1995 Dyna Electronics dynastye // (c) 2002 Dyna Electronics mystjb // (c) 1998 Dyna Electronics ndongmul2 // (c) 1999 Dyna Electronics +nmondop // (c) 1998 Dyna Electronics scherrym // (c) 1993 Dyna Electronics scherrym12 // (c) 1993 Dyna Electronics scherrymp // (c) 1997 Dyna Electronics @@ -30946,7 +30973,9 @@ istellar // (c) 1983 Funai / Gakken istellar2 // (c) 1984 Funai / Gakken @source:misc/itgambl2.cpp +7gold // (c) 200? unknown btorneo // (c) 200? unknown +ch3001r // (c) 200? unknown cmagica // (c) 200? unknown granfrat // (c) 200? unknown mcard_h8 // (c) 200? unknown @@ -30959,6 +30988,8 @@ mdrink // (c) 2001 unknown millsun // (c) 200? unknown mnumitg // (c) 200? unknown ntcash // (c) 1999 unknown +ntcasha // (c) 1999 unknown +pairsh8 // (c) 200? unknown pirati // (c) 2001 Cin smcard // (c) 200? unknown sspac2k1 // (c) 200? unknown @@ -30969,6 +31000,7 @@ toptcash // (c) 2002 VideoIdea trstar2k // (c) 1999 A.M. unkh8gam // (c) 200? unknown wizard // (c) 1999 A.A. +zupapah8 // (c) 200? unknown @source:misc/itgambl3.cpp ejollyx5 // (c) 200? Solar Games @@ -30989,6 +31021,7 @@ capunc // (c) 2000 Nazionale Elettronica euro2k2 // (c) 2001 Nazionale Elettronica euro2k2a // (c) 2001 Nazionale Elettronica euro2k2s // (c) 2002 Nazionale Elettronica +gnumber // (c) 200? M.M. - B.R.L. labrinth // (c) 2001 Nazionale Elettronica laperla // (c) 2002 Nazionale Elettronica laperlag // (c) 2001 Nazionale Elettronica @@ -31067,6 +31100,7 @@ awetoss // Lazer-Tron Awesome Toss 'Em ribrac // Lazer-Tron Ribbit Racin @source:misc/lependu.cpp +codemagik // (c) 198? Voyageur de L'Espace Inc. lependu // 198? Avenir Amusement Inc. @source:misc/limenko.cpp @@ -31234,6 +31268,9 @@ mil4000b // (c) 2000 Sure Milano mil4000c // (c) 2000 Sure Milano top21 // (c) 200? Assogiochi Assago (Mi) +@source:misc/mindset.cpp +mindset // (c) 1984 + @source:misc/miniboy7.cpp bejpoker // (c) 1992?, Bonanza Enterprises miniboy7 // (c) 1983, Bonanza Enterprises @@ -34459,7 +34496,7 @@ korinaim // (c) 1988 kyuhito // (c) 1988 ROLLER TRON livegal // (c) 1987 mcitylov // (c) 1986 -mjcamera // (c) 1988 MIKI SYOUJI +mjcamerao // (c) 1988 MIKI SYOUJI mjgaiden // (c) 1987 Central Denshi mjsikakb // (c) 1988 mjsikakc // (c) 1988 @@ -34481,6 +34518,7 @@ vipclub // (c) 1988 Daiichi Denshi @source:nichibutsu/nbmj8891.cpp abunai // (c) 1989 +avmjts // (c) 1990 bananadr // (c) 1989 DIGITAL SOFT chinmoku // (c) 1990 club90s // (c) 1990 @@ -34496,7 +34534,8 @@ lovehous // (c) 1990 maiko // (c) 1990 mgion // (c) 1989 mgmen89 // (c) 1989 -mjcamerb // (c) 1989 MIKI SYOUJI +mjcamera // (c) 1989 MIKI SYOUJI +mjcameram // (c) 1988 MIKI SYOUJI mjfocus // (c) 1989 mjfocusm // (c) 1989 mjnanpaa // (c) 1989 BROOKS @@ -34504,7 +34543,6 @@ mjnanpas // (c) 1989 BROOKS mjnanpau // (c) 1989 BROOKS mladyhtr // (c) 1990 mmaiko // (c) 1990 -mmcamera // (c) 1988 MIKI SYOUJI msjiken // (c) 1988 omotesnd // (c) 1989 pairsnb // (c) 1989 @@ -35466,6 +35504,7 @@ nmicro nmicro2 @source:novag/primo.cpp +beluga nprimo nsnova nsnovaa @@ -35517,6 +35556,12 @@ sbasssta // @source:novation/drumsta.cpp drumsta // +@source:oberheim/dmx.cpp +obdmx // Oberheim DMX + +@source:oberheim/ob8.cpp +ob8 // Oberheim OB8 + @source:olivetti/m20.cpp m20 // m40 // @@ -38800,6 +38845,7 @@ croupiera // (c) 1997 Playmark croupierb // (c) 1997 Playmark luckboom // magictch // +magictcha // sderby // (c) 1996 sderbya // (c) 1996 shinygld // @@ -41780,6 +41826,7 @@ deerhunte // (c) 2000 Sammy USA Corporation deerhuntj // (c) 2000 Sammy USA Corporation endrichs // (c) 1999 E.N.Tiger endrichsa // (c) 1999 E.N.Tiger +endrichsb // (c) 1999 E.N.Tiger funcube // (c) 2000 Namco funcube2 // (c) 2001 Namco funcube3 // (c) 2001 Namco @@ -42706,9 +42753,6 @@ mightyframe // Convergent @source:skeleton/milwaukee.cpp mc1200 // -@source:skeleton/mindset.cpp -mindset // (c) 1984 - @source:skeleton/mini2440.cpp mini2440 // diff --git a/src/mame/matsushita/jr200.cpp b/src/mame/matsushita/jr200.cpp index 799253a17bb63..4da4e0f0f55d9 100644 --- a/src/mame/matsushita/jr200.cpp +++ b/src/mame/matsushita/jr200.cpp @@ -92,6 +92,10 @@ class jr200_state : public driver_device void jr200(machine_config &config); DECLARE_INPUT_CHANGED_MEMBER(nmi_button); +protected: + virtual void machine_start() override ATTR_COLD; + virtual void machine_reset() override ATTR_COLD; + private: required_shared_ptr m_vram; required_shared_ptr m_cram; @@ -110,8 +114,6 @@ class jr200_state : public driver_device void jr200_border_col_w(uint8_t data); uint8_t mn1271_io_r(offs_t offset); void mn1271_io_w(offs_t offset, uint8_t data); - virtual void machine_start() override ATTR_COLD; - virtual void machine_reset() override ATTR_COLD; uint32_t screen_update_jr200(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); TIMER_CALLBACK_MEMBER(timer_d_callback); diff --git a/src/mame/metro/metro.cpp b/src/mame/metro/metro.cpp index a9fe023f7692f..60f94cfdf7007 100644 --- a/src/mame/metro/metro.cpp +++ b/src/mame/metro/metro.cpp @@ -5320,6 +5320,24 @@ ROM_START( toride2j ) ROM_LOAD( "tr2_ja_7.3g", 0x000000, 0x020000, CRC(6ee32315) SHA1(ef4d59576929deab0aa459a67be21d97c2803dea) ) ROM_END +ROM_START( toride2ji ) + ROM_REGION( 0x080000, "maincpu", 0 ) // 68000 Code + ROM_LOAD16_BYTE( "tr2_ji-5.20e", 0x000000, 0x040000, CRC(15906855) SHA1(ac905ed62a0a3cd951146224acc4dab75d730237) ) + ROM_LOAD16_BYTE( "tr2_ji-6.20c", 0x000001, 0x040000, CRC(e71e291e) SHA1(5ac5043208237d2b1ee45d34e5ad74ba2f821cd3) ) + + ROM_REGION( 0x20000, "audiocpu", 0 ) // NEC78C10 Code + ROM_LOAD( "tr2_jb-8.3i", 0x000000, 0x020000, CRC(0168f46f) SHA1(01bf4cc425d72936897c3c572f6c0b1366fe4041) ) + + ROM_REGION( 0x200000, "vdp2", 0 ) // Gfx + Data (Addressable by CPU & Blitter) + ROM_LOAD64_WORD( "tr2_jb-2.14i", 0x000000, 0x080000, CRC(b31754dc) SHA1(be2423bafbf07c93c3d222e907190b44616014f0) ) + ROM_LOAD64_WORD( "tr2_jb-4.18i", 0x000002, 0x080000, CRC(a855c3fa) SHA1(eca3e235256df7e6ae66ecbe43bc0edb974af503) ) + ROM_LOAD64_WORD( "tr2_jb-1.12i", 0x000004, 0x080000, CRC(856f40b7) SHA1(99aca5472b991cd08e9c2128ffdd40675a3b968d) ) + ROM_LOAD64_WORD( "tr2_jb-3.16i", 0x000006, 0x080000, CRC(78ba205f) SHA1(1069a362e60747aaa284c0d9bb7718013df347f3) ) + + ROM_REGION( 0x40000, "oki", 0 ) // Samples + ROM_LOAD( "tr2_ja_7.3g", 0x000000, 0x020000, CRC(6ee32315) SHA1(ef4d59576929deab0aa459a67be21d97c2803dea) ) +ROM_END + /*************************************************************************** Varia Metal @@ -5488,7 +5506,8 @@ GAME( 1994, dharmak, dharma, dharma, dharma, metro_upd7810_state, ini GAME( 1994, toride2g, 0, toride2g, toride2g, metro_upd7810_state, empty_init, ROT0, "Metro", "Toride II Adauchi Gaiden", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) GAME( 1994, toride2gg, toride2g, toride2g, toride2g, metro_upd7810_state, empty_init, ROT0, "Metro", "Toride II Adauchi Gaiden (German)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) GAME( 1994, toride2gk, toride2g, toride2g, toride2g, metro_upd7810_state, empty_init, ROT0, "Metro", "Toride II Bok Su Oi Jeon Adauchi Gaiden (Korea)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) -GAME( 1994, toride2j, toride2g, toride2g, toride2g, metro_upd7810_state, empty_init, ROT0, "Metro", "Toride II (Japan)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) +GAME( 1994, toride2j, toride2g, toride2g, toride2g, metro_upd7810_state, empty_init, ROT0, "Metro", "Toride II (Japan, revision K)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) +GAME( 1994, toride2ji, toride2g, toride2g, toride2g, metro_upd7810_state, empty_init, ROT0, "Metro", "Toride II (Japan, revision I)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) GAME( 1994, gunmast, 0, pururun, gunmast, metro_upd7810_state, empty_init, ROT0, "Metro", "Gun Master", MACHINE_SUPPORTS_SAVE ) GAME( 1995, daitorid, 0, daitorid, daitorid, metro_upd7810_state, empty_init, ROT0, "Metro", "Daitoride", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) GAME( 1995, pururun, 0, pururun, pururun, metro_upd7810_state, empty_init, ROT0, "Metro / Banpresto", "Pururun (set 1)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/microsoft/jazz.cpp b/src/mame/microsoft/jazz.cpp index 77d39e640194b..ac21852e9f414 100644 --- a/src/mame/microsoft/jazz.cpp +++ b/src/mame/microsoft/jazz.cpp @@ -35,7 +35,8 @@ * Intel 82358 EISA Bus Controller * Intel 82357 EISA Integrated System Peripheral (ISP) * Intel 82352 x 2 EISA Bus Buffer (EBB) - * Emulex FAS216 SCSI controller + * Emulex FAS216 SCSI controller (similar to NCR 53CF94-2; + * older boards have NCR 53C94 instead) * 27C01 128k EPROM * 28F020 256k flash memory * NEC μPD31432 ARC address path ASIC @@ -310,7 +311,7 @@ void jazz_state::jazz(machine_config &config) NSCSI_CONNECTOR(config, "scsi:6", jazz_scsi_devices, "cdrom"); // scsi host adapter - NSCSI_CONNECTOR(config, "scsi:7").option_set("ncr53cf94", NCR53CF94).clock(24_MHz_XTAL).machine_config( + NSCSI_CONNECTOR(config, "scsi:7").option_set("ncr53cf94", NCR53CF94).clock(40000000).machine_config( [this] (device_t *device) { ncr53cf94_device &adapter = downcast(*device); diff --git a/src/mame/microsoft/mct_adr.cpp b/src/mame/microsoft/mct_adr.cpp index f4d76ed861bd1..a6827abf36091 100644 --- a/src/mame/microsoft/mct_adr.cpp +++ b/src/mame/microsoft/mct_adr.cpp @@ -154,6 +154,8 @@ void mct_adr_device::device_start() m_out_int_timer_asserted = false; m_out_int_device_asserted = false; + + std::fill(std::begin(m_drq_active), std::end(m_drq_active), false); } void mct_adr_device::device_reset() @@ -262,11 +264,11 @@ TIMER_CALLBACK_MEMBER(mct_adr_device::dma_check) // check channel enabled if (!(m_dma_reg[(channel << 2) + REG_ENABLE] & DMA_ENABLE)) - return; + continue; // check transfer count if (!m_dma_reg[(channel << 2) + REG_COUNT]) - return; + continue; u32 const address = translate_address(m_dma_reg[(channel << 2) + REG_ADDRESS]); diff --git a/src/mame/midw8080/8080bw.h b/src/mame/midw8080/8080bw.h index 890b654409a9a..de607cea6c335 100644 --- a/src/mame/midw8080/8080bw.h +++ b/src/mame/midw8080/8080bw.h @@ -450,6 +450,7 @@ class ozmawars_state : public _8080bw_state void ozmawars_port04_w(uint8_t data); void ozmawars_port05_w(uint8_t data); void ozmawars_io_map(address_map &map) ATTR_COLD; + uint8_t m_port03 = 0; uint8_t m_port05 = 0; bool m_sound_enable = 0; @@ -480,8 +481,8 @@ class yosakdon_state : public invaders_clone_state void main_map(address_map &map) ATTR_COLD; void io_map(address_map &map) ATTR_COLD; - uint8_t m_port_1_last; - uint8_t m_port_2_last; + uint8_t m_port_1_last = 0; + uint8_t m_port_2_last = 0; }; diff --git a/src/mame/midway/balsente.cpp b/src/mame/midway/balsente.cpp index d1776eaa79c70..be4c9a5b095c3 100644 --- a/src/mame/midway/balsente.cpp +++ b/src/mame/midway/balsente.cpp @@ -760,7 +760,7 @@ static INPUT_PORTS_START( stocker ) PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_MODIFY("IN1") - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_TOGGLE PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_MODIFY("AN2") @@ -1024,11 +1024,14 @@ static INPUT_PORTS_START( nstocker ) PORT_MODIFY("IN0") PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(FUNC(balsente_state::nstocker_bits_r)) + PORT_MODIFY("IN1") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) + /* cheese alert -- we have to map this to player 2 so that it doesn't interfere with the crosshair controls */ PORT_MODIFY("AN3") - PORT_BIT( 0xff, 0, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(20) - PORT_CODE_DEC(KEYCODE_S) PORT_CODE_DEC(JOYCODE_X_LEFT_SWITCH) PORT_CODE_INC(KEYCODE_F) PORT_CODE_INC(JOYCODE_X_RIGHT_SWITCH) PORT_RESET PORT_PLAYER(2) + PORT_BIT( 0xff, 0, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(20) PORT_RESET PORT_PLAYER(2) + PORT_CODE_DEC(KEYCODE_S) PORT_CODE_DEC(JOYCODE_X_LEFT_SWITCH) PORT_CODE_INC(KEYCODE_F) PORT_CODE_INC(JOYCODE_X_RIGHT_SWITCH) /* extra ports for shooters */ PORT_START("FAKEX") /* fake analog X */ @@ -1156,25 +1159,26 @@ static INPUT_PORTS_START( stompin ) PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_MODIFY("IN1") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_BIT( 0x3c, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_MODIFY("AN0") PORT_BIT( 0x1f, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Top-Right") PORT_CODE(KEYCODE_9_PAD) PORT_PLAYER(1) - PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Top") PORT_CODE(KEYCODE_8_PAD) PORT_PLAYER(1) - PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Top-Left") PORT_CODE(KEYCODE_7_PAD) PORT_PLAYER(1) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Top-Right") PORT_CODE(KEYCODE_9_PAD) PORT_PLAYER(1) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Top") PORT_CODE(KEYCODE_8_PAD) PORT_PLAYER(1) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Top-Left") PORT_CODE(KEYCODE_7_PAD) PORT_PLAYER(1) PORT_MODIFY("AN1") PORT_BIT( 0x1f, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Right") PORT_CODE(KEYCODE_6_PAD) PORT_PLAYER(1) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Right") PORT_CODE(KEYCODE_6_PAD) PORT_PLAYER(1) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("Left") PORT_CODE(KEYCODE_4_PAD) PORT_PLAYER(1) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("Left") PORT_CODE(KEYCODE_4_PAD) PORT_PLAYER(1) PORT_MODIFY("AN2") PORT_BIT( 0x1f, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("Bot-Right") PORT_CODE(KEYCODE_3_PAD) PORT_PLAYER(1) - PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("Bottom") PORT_CODE(KEYCODE_2_PAD) PORT_PLAYER(1) - PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_NAME("Bot-Left") PORT_CODE(KEYCODE_1_PAD) PORT_PLAYER(1) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("Bot-Right") PORT_CODE(KEYCODE_3_PAD) PORT_PLAYER(1) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME("Bottom") PORT_CODE(KEYCODE_2_PAD) PORT_PLAYER(1) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_NAME("Bot-Left") PORT_CODE(KEYCODE_1_PAD) PORT_PLAYER(1) PORT_MODIFY("AN3") UNUSED_ANALOG diff --git a/src/mame/misc/4enraya.cpp b/src/mame/misc/4enraya.cpp index c562e35caf0c7..1234011ba0415 100644 --- a/src/mame/misc/4enraya.cpp +++ b/src/mame/misc/4enraya.cpp @@ -429,18 +429,16 @@ void unk_gambl_state::unkpacg_main_portmap(address_map &map) static INPUT_PORTS_START( 4enraya ) PORT_START("DSW") - PORT_DIPNAME( 0x01, 0x01, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW1:1") - PORT_DIPSETTING( 0x01, DEF_STR( Easy ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) - PORT_DIPNAME( 0x02, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:2") - PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x01, 0x01, "Speed" ) PORT_DIPLOCATION("SW1:1") + PORT_DIPSETTING( 0x01, "Slow" ) + PORT_DIPSETTING( 0x00, "Fast" ) + PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x02, "SW1:2" ) //It was identified with "Demo Sound", but not worked PORT_DIPNAME( 0x04, 0x04, "Pieces" ) PORT_DIPLOCATION("SW1:3") PORT_DIPSETTING( 0x04, "30" ) PORT_DIPSETTING( 0x00, "16" ) - PORT_DIPNAME( 0x08, 0x08, "Speed" ) PORT_DIPLOCATION("SW1:4") - PORT_DIPSETTING( 0x08, "Slow" ) - PORT_DIPSETTING( 0x00, "Fast" ) + PORT_DIPNAME( 0x08, 0x08, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW1:4") + PORT_DIPSETTING( 0x08, DEF_STR( Easy ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Hard ) ) PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:5,6") PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) ) PORT_DIPSETTING( 0x00, DEF_STR( 2C_3C ) ) diff --git a/src/mame/misc/blocktax.cpp b/src/mame/misc/blocktax.cpp index 1791ced4ade3c..56616aca2f125 100644 --- a/src/mame/misc/blocktax.cpp +++ b/src/mame/misc/blocktax.cpp @@ -30,8 +30,10 @@ there is no code to emulate tho as it is all inside the MCU. #include "emu.h" + #include "cpu/mcs51/mcs51.h" #include "sound/okim6295.h" + #include "emupal.h" #include "screen.h" #include "speaker.h" @@ -53,22 +55,23 @@ class blocktax_state : public driver_device virtual void video_start() override ATTR_COLD; private: - uint32_t screen_update_blocktax(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - [[maybe_unused]] void blocktax_map(address_map &map) ATTR_COLD; required_device m_maincpu; + + uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + [[maybe_unused]] void program_map(address_map &map) ATTR_COLD; }; void blocktax_state::video_start() { } -uint32_t blocktax_state::screen_update_blocktax(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +uint32_t blocktax_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { return 0; } //unused function -void blocktax_state::blocktax_map(address_map &map) +void blocktax_state::program_map(address_map &map) { } @@ -77,14 +80,14 @@ INPUT_PORTS_END void blocktax_state::blocktax(machine_config &config) { - I80C51(config, m_maincpu, 30_MHz_XTAL/2); /* P89C51RD2HBA (80C51 with internal flash rom) */ + I80C51(config, m_maincpu, 30_MHz_XTAL / 2); // P89C51RD2HBA (80C51 with internal flash ROM) screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(60); screen.set_vblank_time(ATTOSECONDS_IN_USEC(0)); screen.set_size(64*8, 32*8); screen.set_visarea(0*8, 32*8-1, 0*8, 32*8-1); - screen.set_screen_update(FUNC(blocktax_state::screen_update_blocktax)); + screen.set_screen_update(FUNC(blocktax_state::screen_update)); screen.set_palette("palette"); PALETTE(config, "palette").set_format(palette_device::xRGB_555, 0x200); @@ -95,21 +98,36 @@ void blocktax_state::blocktax(machine_config &config) } ROM_START( blocktax ) - ROM_REGION( 0x10000, "maincpu", 0 ) /* Internal MCU Flash */ + ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 ) // Internal MCU Flash ROM_LOAD( "p89c51rd2hba.mcu", 0x00000, 0x10000, NO_DUMP ) - ROM_REGION( 0x040000, "oki", 0 ) /* Samples */ - ROM_LOAD( "1_ht27c010.bin", 0x00000, 0x20000, CRC(5e5c29f8) SHA1(e62f81be8e90a098ea4a8a55cdf02c5b4c226317) ) - - ROM_REGION( 0x100000, "gfx1", 0 ) - ROM_LOAD( "4_ht27c020.bin", 0x40000, 0x40000, CRC(b43b91ff) SHA1(d5baad5819981d74aea2a142658af84b6445f324) ) + ROM_REGION( 0x40000, "gfx1", 0 ) + ROM_LOAD( "4_ht27c020.bin", 0x00000, 0x40000, CRC(b43b91ff) SHA1(d5baad5819981d74aea2a142658af84b6445f324) ) ROM_REGION( 0x80000, "gfx2", 0 ) ROM_LOAD( "2_ht27c020.bin", 0x00000, 0x40000, CRC(4800c3be) SHA1(befaf07a75fe57a910e0a89578bf352102ae773e) ) ROM_LOAD( "3_ht27c020.bin", 0x40000, 0x40000, CRC(ea1c66a2) SHA1(d10b9ca56d140235b6f31ab939613784f232caeb) ) + + ROM_REGION( 0x40000, "oki", 0 ) + ROM_LOAD( "1_ht27c010.bin", 0x00000, 0x20000, CRC(5e5c29f8) SHA1(e62f81be8e90a098ea4a8a55cdf02c5b4c226317) ) +ROM_END + +ROM_START( unktax ) // PCB_V.1-2 BY TAX. At least this one has a 1 MHz resonator for the Oki. + ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 ) // Internal MCU Flash + ROM_LOAD( "p89c51rd2hba.mcu", 0x00000, 0x10000, NO_DUMP ) + + ROM_REGION( 0x100000, "gfx1", 0 ) + ROM_LOAD( "1.bin", 0x00000, 0x40000, CRC(2e2aab2d) SHA1(7c2159efbce3c39bf5edf2d8266c636d55cbe1ab) ) + ROM_LOAD( "2.bin", 0x40000, 0x40000, CRC(5ebd892b) SHA1(f5ae1f7c3593ed1f4dca795d16c16432e8d46607) ) + ROM_LOAD( "3.bin", 0x80000, 0x40000, CRC(e4b9a3ce) SHA1(cab23255bf46d2d9e6b51fc04fee76e56808b2bf) ) + ROM_LOAD( "4.bin", 0xc0000, 0x40000, CRC(295af91d) SHA1(de69afa8c3aadd2084c14ceeca8dd4eaf8d9187d) ) + + ROM_REGION( 0x40000, "oki", 0 ) + ROM_LOAD( "mb2-v5-05.04_baks.bin", 0x00000, 0x40000, CRC(a674ced5) SHA1(fa4cc593afbb4a9ec21e680d178fcceb111f4da9) ) // 1xxxxxxxxxxxxxxxxx = 0xFF ROM_END } // anonymous namespace -GAME( 2002, blocktax, 0, blocktax, blocktax, blocktax_state, empty_init, ROT0, "TAX / Game Revival", "Blockout (TAX)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 2002, blocktax, 0, blocktax, blocktax, blocktax_state, empty_init, ROT0, "TAX / Game Revival", "Blockout (TAX)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 200?, unktax, 0, blocktax, blocktax, blocktax_state, empty_init, ROT0, "TAX / Game Revival", "unknown TAX game", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) diff --git a/src/mame/misc/cb2001.cpp b/src/mame/misc/cb2001.cpp index 2f35e3e7a4c75..0e0febde59131 100644 --- a/src/mame/misc/cb2001.cpp +++ b/src/mame/misc/cb2001.cpp @@ -1616,9 +1616,21 @@ ROM_START( cb5 ) // Wing W4 board + DYNA D9701 subboard; DYNA CB5 V1.3 in bookke ROM_REGION( 0x100000, "gfx", 0 ) // not dumped for this set, but seems to work fine. Pics of another PCB show D9801 marked on the flash, so it could be different. ROM_LOAD( "flash", 0x000000, 0x100000, BAD_DUMP CRC(07d711a6) SHA1(6b5a4017eb1d31dc184831f85d786331f4a8e01f) ) - ROM_REGION( 0x400, "proms", 0 ) // not dumped for this set, but seem to work fine. Marked as bad dump as precaution - ROM_LOAD( "82s147.9b", 0x000, 0x200, BAD_DUMP CRC(dcf976d2) SHA1(73a08e4587f3516d694a8060b79470cf71df3925) ) - ROM_LOAD( "82s147.11b", 0x200, 0x200, BAD_DUMP CRC(a67e7a63) SHA1(b23e0eb9af13e57bbc8602ddc7fb381ba5c8267e) ) + ROM_REGION( 0x200, "proms", 0 ) + ROM_LOAD( "n82s135n.2b", 0x000, 0x100, CRC(502be98c) SHA1(4591d1d5cfe9e83032705139e630dfa5df79689a) ) + ROM_LOAD( "n82s135n.2d", 0x100, 0x100, CRC(bb1865c9) SHA1(58acf909dd6de519d9675482d130b697856e1bf4) ) +ROM_END + +ROM_START( cb5_11) // Wing W4 board + DYNA D9701 subboard; DYNA CB5 V1.1 in bookkeeping screen. + ROM_REGION16_LE( 0x040000, "boot_prg", 0 ) + ROM_LOAD16_WORD( "cb5.11d", 0x020000, 0x20000, CRC(ea99dad0) SHA1(eaa899583b199db140dcc0fe750d388996b111a5) ) + + ROM_REGION( 0x100000, "gfx", 0 ) // not dumped for this set, but seems to work fine. Pics of another PCB show D9801 marked on the flash, so it could be different. + ROM_LOAD( "flash", 0x000000, 0x100000, BAD_DUMP CRC(07d711a6) SHA1(6b5a4017eb1d31dc184831f85d786331f4a8e01f) ) + + ROM_REGION( 0x200, "proms", 0 ) + ROM_LOAD( "n82s135n.2b", 0x000, 0x100, CRC(502be98c) SHA1(4591d1d5cfe9e83032705139e630dfa5df79689a) ) + ROM_LOAD( "n82s135n.2d", 0x100, 0x100, CRC(bb1865c9) SHA1(58acf909dd6de519d9675482d130b697856e1bf4) ) ROM_END /* New DongmulDongmul 2 (뉴 동물동물 2, New AnimalAnimal 2) runs on slightly different hardware, but with same CPU, custom and I/O. @@ -1713,6 +1725,18 @@ ROM_START( crzybell ) // DYNA D9401 PCB; DYNA CRBL1 V1.2D in bookkeeping screen ROM_LOAD( "82s135.k5", 0x100, 0x100, BAD_DUMP CRC(9940ef22) SHA1(42b0c6410d8db34e0316e95b7b7007abc3098341) ) ROM_END +ROM_START( nmondop ) // DYNA D9702 PCB; DYNA NMP V0.6I in bookkeeping screen + ROM_REGION16_LE( 0x040000, "boot_prg", 0 ) + ROM_LOAD16_WORD( "nmp12i.11f", 0x000000, 0x40000, CRC(a02d70f9) SHA1(26de0e09432fa5cccef502553bc6d65ec179c7a4) ) + + ROM_REGION( 0x080000, "gfx", 0 ) + ROM_LOAD( "nmp1i.12a", 0x000000, 0x80000, CRC(291ca4d1) SHA1(404439c0e73098e253160af1d36f7ceb7f98f49d) ) + + ROM_REGION( 0x400, "proms", 0 ) // not dumped yet + ROM_LOAD( "82s147.9b", 0x000, 0x200, BAD_DUMP CRC(6c90f6a2) SHA1(f3f592954000d189ded0ed8c6c4444ace0b616a4) ) + ROM_LOAD( "82s147.11b", 0x200, 0x200, BAD_DUMP CRC(e5aa3ec7) SHA1(675711dd6788b3d0c37573b49b6297cbcd8c8209) ) +ROM_END + void cb2001_state::init_smaller_proms() { @@ -1743,7 +1767,9 @@ GAME( 1993, scherrym12 , scherrym, scherrym, cb2001, cb2001_state, init_sm GAME( 1997, scherrymp, 0, scherrymp, scherrymp, cb2001_state, init_smaller_proms, ROT0, "Dyna", "Super Cherry Master Plus (V1.6)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) GAME( 1997, scherrymp10u, scherrymp, scherrymp, scherrymp, cb2001_state, empty_init, ROT0, "Dyna", "Super Cherry Master Plus (V1.0U)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) GAME( 1993, cb4, 0, cb5, cb5, cb2001_state, empty_init, ROT0, "Dyna", "Cherry Bonus IV (V5.0)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) -GAME( 1997, cb5, 0, cb5, cb5, cb2001_state, empty_init, ROT0, "Dyna", "Cherry Bonus V Five (V1.3)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1997, cb5, 0, cb5, cb5, cb2001_state, init_smaller_proms, ROT0, "Dyna", "Cherry Bonus V Five (V1.3)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1997, cb5_11, cb5, cb5, cb5, cb2001_state, init_smaller_proms, ROT0, "Dyna", "Cherry Bonus V Five (V1.1)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) GAME( 1998, mystjb, 0, scherrymp, scherrymp, cb2001_state, init_smaller_proms, ROT0, "Dyna", "Mystery J & B (V1.3G)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) GAME( 1998, tripjack, 0, scherrymp, scherrymp, cb2001_state, init_smaller_proms, ROT0, "Dyna", "Triple Jack (V1.6G)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) GAME( 1995, crzybell, 0, scherrym, cb2001, cb2001_state, init_smaller_proms, ROT0, "Dyna", "Crazy Bell (V1.2D)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1998, nmondop, 0, cb2001, cb2001, cb2001_state, empty_init, ROT0, "Dyna", "New Mondo Plus (V0.6I)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/misc/cvs.cpp b/src/mame/misc/cvs.cpp index df31ef4a03be2..d01eec6c7fa17 100644 --- a/src/mame/misc/cvs.cpp +++ b/src/mame/misc/cvs.cpp @@ -177,7 +177,6 @@ class cvs_state : public driver_device virtual void machine_start() override ATTR_COLD; virtual void machine_reset() override ATTR_COLD; virtual void video_start() override ATTR_COLD; - virtual void device_post_load() override { m_gfxdecode->gfx(1)->mark_all_dirty(); } private: // max stars is more than it needs to be, to allow experimenting with the star generator diff --git a/src/mame/misc/gms.cpp b/src/mame/misc/gms.cpp index 4b924e7e70ce7..9b5d69b245fa7 100644 --- a/src/mame/misc/gms.cpp +++ b/src/mame/misc/gms.cpp @@ -2179,12 +2179,11 @@ void gms_2layers_state::init_sball2k1() { uint16_t *rom = (uint16_t *)memregion("maincpu")->base(); - rom[0x14f6c / 2] = 0x4e71; - rom[0x14f6e / 2] = 0x4e71; - rom[0x14f9a / 2] = 0x6000; - rom[0x14f9c / 2] = 0x0010; - rom[0x15528 / 2] = 0x4e71; - rom[0x1552a / 2] = 0x4e71; + rom[0x14f6c / 2] = 0x4e71; // U135 ERROR + rom[0x14f6e / 2] = 0x4e71; // U135 ERROR + rom[0x14f9a / 2] = 0x6000; // U136 ERROR + rom[0x15528 / 2] = 0x4e71; // U135 ERROR + rom[0x1552a / 2] = 0x4e71; // U135 ERROR } void gms_3layers_state::init_sc2in1() diff --git a/src/mame/misc/goldnpkr.cpp b/src/mame/misc/goldnpkr.cpp index 275196bb39fc3..f94285de416e5 100644 --- a/src/mame/misc/goldnpkr.cpp +++ b/src/mame/misc/goldnpkr.cpp @@ -997,6 +997,7 @@ #include "machine/bankdev.h" #include "machine/nvram.h" #include "machine/segacrpt_device.h" +#include "machine/ticket.h" #include "machine/timekpr.h" #include "sound/ay8910.h" #include "sound/discrete.h" @@ -1009,6 +1010,7 @@ #include "pmpoker.lh" #include "goldnpkr.lh" +#include "goldnswp.lh" #include "upndown.lh" #include "lespendu.lh" @@ -1033,6 +1035,7 @@ class goldnpkr_state : public driver_device m_discrete(*this, "discrete"), m_videoram(*this, "videoram"), m_colorram(*this, "colorram"), + m_hopper(*this, "hopper"), m_ay8910(*this, "ay8910"), m_lamps(*this, "lamp%u", 0U) { } @@ -1115,6 +1118,7 @@ class goldnpkr_state : public driver_device required_device m_palette; optional_device m_discrete; + private: uint8_t goldnpkr_mux_port_r(); void mux_port_w(uint8_t data); @@ -1155,8 +1159,9 @@ class goldnpkr_state : public driver_device required_shared_ptr m_videoram; required_shared_ptr m_colorram; + optional_device m_hopper; optional_device m_ay8910; - output_finder<5> m_lamps; + output_finder<9> m_lamps; tilemap_t *m_bg_tilemap = nullptr; uint8_t m_mux_data = 0; @@ -1514,7 +1519,15 @@ uint8_t goldnpkr_state::pottnpkr_mux_port_r() void goldnpkr_state::mux_w(uint8_t data) { - m_mux_data = data ^ 0xff; // inverted + m_mux_data = data ^ 0xf0; // inverted + + // bit 0 - bit 1 -> Hopper + m_hopper->motor_w(BIT(~data, 0) && BIT(~data, 1)); + + m_lamps[5] = !BIT(data, 0); // hopper motor 1 + m_lamps[6] = !BIT(data, 1); // hopper motor 2 + m_lamps[7] = !BIT(data, 2); // diverter + m_lamps[8] = !BIT(data, 3); // coin lockout } void goldnpkr_state::lespendu_mux_w(uint8_t data) @@ -1926,6 +1939,35 @@ void goldnpkr_state::glfever_map(address_map &map) } +void blitz_state::megadpkr_map(address_map &map) +{ + map(0x0000, 0x07ff).ram(); //.share("nvram"); // battery backed RAM + map(0x0800, 0x0800).w("crtc", FUNC(mc6845_device::address_w)); + map(0x0801, 0x0801).rw("crtc", FUNC(mc6845_device::register_r), FUNC(mc6845_device::register_w)); + map(0x0844, 0x0847).rw("pia0", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); + map(0x0848, 0x084b).rw("pia1", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); + +/* There is another set of PIAs controlled by the code. + Maybe they are just mirrors... + + map(0x10f4, 0x10f7).rw("pia0", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); + map(0x10f8, 0x10fb).rw("pia1", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); +*/ + map(0x1000, 0x13ff).ram().w(FUNC(blitz_state::goldnpkr_videoram_w)).share("videoram"); + map(0x1800, 0x1bff).ram().w(FUNC(blitz_state::goldnpkr_colorram_w)).share("colorram"); + + map(0x4000, 0x7fff).rw(m_bankdev, FUNC(address_map_bank_device::read8), FUNC(address_map_bank_device::write8)); + map(0x8000, 0xbfff).nopr().w(FUNC(blitz_state::mcu_command_w)); + map(0xc000, 0xffff).rom(); +} + +void blitz_state::megadpkr_banked_map(address_map &map) +{ + map(0x00000, 0x07fff).r(FUNC(blitz_state::cpubank_decrypt_r)); + map(0x08000, 0x087ff).rw("timekpr", FUNC(m48t02_device::read), FUNC(m48t02_device::write)); +} + + /********************************************* * Input Ports * *********************************************/ @@ -1934,20 +1976,20 @@ static INPUT_PORTS_START( goldnpkr ) // Multiplexed - 4x5bits PORT_START("IN0-0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Meters") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Meters") PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_NAME("Deal / Draw") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_NAME("Deal / Draw") PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("IN0-1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_IMPULSE(3) PORT_NAME("Out (Manual Collect)") - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_NAME("Off (Payout)") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(ticket_dispenser_device::line_r)) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Big") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Small") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Big") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Small") PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -1964,7 +2006,7 @@ static INPUT_PORTS_START( goldnpkr ) PORT_START("IN0-3") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Learn Mode") PORT_CODE(KEYCODE_F2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("D-31") PORT_CODE(KEYCODE_E) // O.A.R? (D-31 in schematics) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("D-31") PORT_CODE(KEYCODE_E) PORT_TOGGLE // O.A.R? (D-31 in schematics) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(3) PORT_NAME("Coupon (Note In)") PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(3) PORT_NAME("Coin In") PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_NAME("Weight (Coupon In)") @@ -1984,9 +2026,9 @@ static INPUT_PORTS_START( goldnpkr ) PORT_DIPNAME( 0x20, 0x00, "50hz/60hz" ) PORT_DIPLOCATION("SW1:2") PORT_DIPSETTING( 0x20, "50hz" ) PORT_DIPSETTING( 0x00, "60hz" ) - PORT_DIPNAME( 0x40, 0x00, "Payout Mode" ) PORT_DIPLOCATION("SW1:3") // listed in the manual as "Play Mode" - PORT_DIPSETTING( 0x40, "Manual" ) // listed in the manual as "Out Play" - PORT_DIPSETTING( 0x00, "Auto" ) // listed in the manual as "Credit Play" + PORT_DIPNAME( 0x40, 0x00, "Payout Mode" ) PORT_DIPLOCATION("SW1:3") // listed in the manual as "Play Mode" + PORT_DIPSETTING( 0x40, "Auto" ) // listed in the manual as "Out Play" + PORT_DIPSETTING( 0x00, "Manual" ) // listed in the manual as "Credit Play" PORT_DIPNAME( 0x80, 0x00, "Royal Flush" ) PORT_DIPLOCATION("SW1:4") PORT_DIPSETTING( 0x80, DEF_STR( No ) ) PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) @@ -1995,6 +2037,9 @@ INPUT_PORTS_END static INPUT_PORTS_START( jkrbonus ) PORT_INCLUDE( goldnpkr ) + PORT_MODIFY("IN0-3") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Weight (Coupon In)") PORT_CODE(KEYCODE_H) PORT_TOGGLE + PORT_MODIFY("SW1") PORT_DIPNAME( 0x20, 0x20, "50hz/60hz" ) PORT_DIPLOCATION("SW1:2") PORT_DIPSETTING( 0x20, "50hz" ) @@ -2050,11 +2095,11 @@ static INPUT_PORTS_START( pmpoker ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("IN0-2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("Hold 1 / Take Score (Kasse)") - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) PORT_NAME("Hold 2 / Small (Tief)") - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) PORT_NAME("Hold 3 / Bet (Setze)") - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) PORT_NAME("Hold 4 / Big (Hoch)") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) PORT_NAME("Hold 5 / Double Up (Dopp.)") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("Hold 1 / Take Score (Kasse)") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) PORT_NAME("Hold 2 / Small (Tief)") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) PORT_NAME("Hold 3 / Bet (Setze)") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) PORT_NAME("Hold 4 / Big (Hoch)") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) PORT_NAME("Hold 5 / Double Up (Dopp.)") PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -2100,20 +2145,20 @@ static INPUT_PORTS_START( pottnpkr ) // Multiplexed - 4x5bits PORT_START("IN0-0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Meters") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Meters") PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_NAME("Deal / Draw") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_NAME("Deal / Draw") PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("IN0-1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_IMPULSE(3) PORT_NAME("Manual Collect") - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(ticket_dispenser_device::line_r)) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Big") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Small") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Big") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Small") PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -2132,8 +2177,9 @@ static INPUT_PORTS_START( pottnpkr ) PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Settings") PORT_CODE(KEYCODE_F2) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_NAME("Coupon (Note In)") - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(3) PORT_NAME("Coin In") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_NAME("Coin In") PORT_IMPULSE(3) +//* PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Weight (Coupon In)") PORT_CODE(KEYCODE_H) PORT_TOGGLE PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -2158,10 +2204,9 @@ static INPUT_PORTS_START( pottnpkr ) PORT_DIPNAME( 0x20, 0x00, "50hz/60hz" ) PORT_DIPLOCATION("SW1:2") PORT_DIPSETTING( 0x20, "50hz" ) PORT_DIPSETTING( 0x00, "60hz" ) - // listed in the manual as "Play Mode" - PORT_DIPNAME( 0x40, 0x00, "Payout Mode" ) PORT_DIPLOCATION("SW1:3") - PORT_DIPSETTING( 0x40, "Manual" ) // listed in the manual as "Out Play" - PORT_DIPSETTING( 0x00, "Auto" ) // listed in the manual as "Credit Play" + PORT_DIPNAME( 0x40, 0x00, "Payout Mode" ) PORT_DIPLOCATION("SW1:3") // listed in the manual as "Play Mode" + PORT_DIPSETTING( 0x40, "Auto" ) // listed in the manual as "Out Play" + PORT_DIPSETTING( 0x00, "Manual" ) // listed in the manual as "Credit Play" PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:4") PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -2171,20 +2216,20 @@ static INPUT_PORTS_START( potnpkra ) // Multiplexed - 4x5bits PORT_START("IN0-0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(3) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Meters") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Meters") PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_NAME("Deal / Draw") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_NAME("Deal / Draw") PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("IN0-1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_IMPULSE(3) PORT_NAME("Manual Collect") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(ticket_dispenser_device::line_r)) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Big") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Small") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Big") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Small") PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -2200,11 +2245,11 @@ static INPUT_PORTS_START( potnpkra ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("IN0-3") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Settings") PORT_CODE(KEYCODE_F2) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Settings") PORT_CODE(KEYCODE_F2) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_NAME("Note in") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_NAME("Note in") PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Weight (Coupon In)") PORT_CODE(KEYCODE_H) PORT_TOGGLE PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -2229,8 +2274,8 @@ static INPUT_PORTS_START( potnpkra ) PORT_DIPSETTING( 0x20, "250 by bet" ) PORT_DIPSETTING( 0x00, "500 by bet" ) PORT_DIPNAME( 0x40, 0x00, "Payout Mode" ) PORT_DIPLOCATION("SW1:3") - PORT_DIPSETTING( 0x40, "Manual" ) - PORT_DIPSETTING( 0x00, "Auto" ) + PORT_DIPSETTING( 0x40, "Auto" ) + PORT_DIPSETTING( 0x00, "Manual" ) PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:4") PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -2239,21 +2284,21 @@ INPUT_PORTS_END static INPUT_PORTS_START( animpkr ) // Multiplexed - 4x5bits PORT_START("IN0-0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(3) PORT_NAME("Coin 1 + Start") - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Meters") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_NAME("Coin 1 + Start") PORT_IMPULSE(3) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Meters") PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_NAME("Deal / Draw") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_NAME("Deal / Draw") PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN0-0 80") PORT_CODE(KEYCODE_G) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN0-0 80") PORT_CODE(KEYCODE_G) PORT_START("IN0-1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_IMPULSE(3) PORT_NAME("Manual Collect") - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(ticket_dispenser_device::line_r)) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Big") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Small") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Big") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Small") PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -2269,11 +2314,11 @@ static INPUT_PORTS_START( animpkr ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("IN0-3") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Settings") PORT_CODE(KEYCODE_F2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN0-3 02") PORT_CODE(KEYCODE_D) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_NAME("Coin 2") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Settings") PORT_CODE(KEYCODE_F2) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN0-3 02") PORT_CODE(KEYCODE_D) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_NAME("Coin 2") PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN0-3 10") PORT_CODE(KEYCODE_F) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN0-3 10") PORT_CODE(KEYCODE_F) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -2290,8 +2335,8 @@ static INPUT_PORTS_START( animpkr ) PORT_DIPSETTING( 0x20, "50hz" ) PORT_DIPSETTING( 0x00, "60hz" ) PORT_DIPNAME( 0x40, 0x00, "Payout Mode" ) PORT_DIPLOCATION("SW1:3") - PORT_DIPSETTING( 0x40, "Manual" ) - PORT_DIPSETTING( 0x00, "Auto" ) + PORT_DIPSETTING( 0x40, "Auto" ) + PORT_DIPSETTING( 0x00, "Manual" ) PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:4") PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -2314,20 +2359,20 @@ static INPUT_PORTS_START( ngold ) // Multiplexed - 4x5bits PORT_START("IN0-0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Meters") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Meters") PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_NAME("Deal / Draw") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_NAME("Deal / Draw") PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("IN0-1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_IMPULSE(3) PORT_NAME("Manual Collect") - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(ticket_dispenser_device::line_r)) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Big") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Small") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Big") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Small") PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -2345,9 +2390,9 @@ static INPUT_PORTS_START( ngold ) PORT_START("IN0-3") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Settings") PORT_CODE(KEYCODE_F2) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(3) PORT_NAME("Coin In") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_NAME("Coin In") PORT_IMPULSE(3) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_NAME("Coupon (Note In)") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Weight (Coupon In)") PORT_CODE(KEYCODE_H) PORT_TOGGLE PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -2372,10 +2417,9 @@ static INPUT_PORTS_START( ngold ) PORT_DIPNAME( 0x20, 0x00, "50hz/60hz" ) PORT_DIPLOCATION("SW1:2") PORT_DIPSETTING( 0x20, "50hz" ) PORT_DIPSETTING( 0x00, "60hz" ) - // listed in the manual as "Play Mode" - PORT_DIPNAME( 0x40, 0x00, "Payout Mode" ) PORT_DIPLOCATION("SW1:3") - PORT_DIPSETTING( 0x40, "Manual" ) // listed in the manual as "Out Play" - PORT_DIPSETTING( 0x00, "Auto" ) // listed in the manual as "Credit Play" + PORT_DIPNAME( 0x40, 0x00, "Payout Mode" ) PORT_DIPLOCATION("SW1:3") // listed in the manual as "Play Mode" + PORT_DIPSETTING( 0x40, "Auto" ) // listed in the manual as "Out Play" + PORT_DIPSETTING( 0x00, "Manual" ) // listed in the manual as "Credit Play" PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:4") PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -2395,15 +2439,15 @@ static INPUT_PORTS_START( goodluck ) PORT_INCLUDE( goldnpkr ) PORT_MODIFY("IN0-1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_IMPULSE(3) PORT_NAME("Manual Collect") - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(ticket_dispenser_device::line_r)) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_MODIFY("IN0-3") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Settings") PORT_CODE(KEYCODE_F2) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_NAME("Note In") - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(3) PORT_NAME("Coin In") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_NAME("Coin In") PORT_IMPULSE(3) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Weight (Coupon In)") PORT_CODE(KEYCODE_H) PORT_TOGGLE PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -2453,7 +2497,7 @@ static INPUT_PORTS_START( witchcrd ) PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Settings") PORT_CODE(KEYCODE_F2) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("D-31") PORT_CODE(KEYCODE_E) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_NAME("Note In") - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(3) PORT_NAME("Coin In") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_NAME("Coin In") PORT_IMPULSE(3) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -2522,21 +2566,21 @@ INPUT_PORTS_END static INPUT_PORTS_START( witchcda ) // Multiplexed - 4x5bits PORT_START("IN0-0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_NAME("Apuesta (Bet)") - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Contabilidad (Bookkeeping)") - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) PORT_NAME("Doblar (Double Up)") - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_NAME("Reparte (Deal)") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) PORT_NAME("Cancela (Cancel)") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_NAME("Apuesta (Bet)") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Contabilidad (Bookkeeping)") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) PORT_NAME("Doblar (Double Up)") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_NAME("Reparte (Deal)") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) PORT_NAME("Cancela (Cancel)") PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("IN0-1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_IMPULSE(3) PORT_NAME("Out (Manual Collect)") - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_NAME("Pagar (Payout)") - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) PORT_NAME("Cobrar (Take)") - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Alta (Big)") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Baja (Small)") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Out (Manual Collect)") PORT_IMPULSE(3) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_NAME("Pagar (Payout)") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) PORT_NAME("Cobrar (Take)") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Alta (Big)") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Baja (Small)") PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -2555,7 +2599,7 @@ static INPUT_PORTS_START( witchcda ) PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Configuracion (Settings)") PORT_CODE(KEYCODE_F2) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("D-31") PORT_CODE(KEYCODE_E) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_NAME("Billetes (Note In)") - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(3) PORT_NAME("Fichas (Coin In)") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_NAME("Fichas (Coin In)") PORT_IMPULSE(3) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -3278,10 +3322,10 @@ static INPUT_PORTS_START( wtchjack ) PORT_START("IN0-3") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Service") PORT_CODE(KEYCODE_F2) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("IN3-2") - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_NAME("Note In") - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(3) PORT_NAME("Coin In") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_NAME("Weight (Coupon In)") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN3-2") PORT_CODE(KEYCODE_2_PAD) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_NAME("Note In") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_NAME("Coin In") PORT_IMPULSE(3) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_NAME("Weight (Coupon In)") PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -3370,21 +3414,21 @@ INPUT_PORTS_END static INPUT_PORTS_START( bsuerte ) // Multiplexed - 4x5bits PORT_START("IN0-0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_NAME("Apostar (Bet)") - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Contabilidad (Meters)") - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) PORT_NAME("Doblar (Double Up)") - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_NAME("Dar/Virar (Deal/Draw)") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) PORT_NAME("Cancelar (Cancel)") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_NAME("Apostar (Bet)") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Contabilidad (Meters)") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) PORT_NAME("Doblar (Double Up)") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_NAME("Dar/Virar (Deal/Draw)") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) PORT_NAME("Cancelar (Cancel)") PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("IN0-1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_IMPULSE(3) PORT_NAME("Out (Manual Collect)") - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_NAME("Pagar (Payout)") - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) PORT_NAME("Cobrar (Take)") - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Mayor (Big)") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Menor (Small)") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(ticket_dispenser_device::line_r)) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Pagar (Payout)") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) PORT_NAME("Cobrar (Take)") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Mayor (Big)") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Menor (Small)") PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -3400,11 +3444,11 @@ static INPUT_PORTS_START( bsuerte ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("IN0-3") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Configuracion (Settings)") PORT_CODE(KEYCODE_F2) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Configuracion (Settings)") PORT_CODE(KEYCODE_F2) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_NAME("Billetes (Note In)") - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(3) PORT_NAME("Fichas (Coin In)") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_NAME("Cupones (Coupon In)") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_NAME("Billetes (Note In)") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_NAME("Fichas (Coin In)") PORT_IMPULSE(3) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_NAME("Cupones (Coupon In)") PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -3422,8 +3466,8 @@ static INPUT_PORTS_START( bsuerte ) PORT_DIPSETTING( 0x20, "50hz" ) PORT_DIPSETTING( 0x00, "60hz" ) PORT_DIPNAME( 0x40, 0x00, "Modo de Pago" ) PORT_DIPLOCATION("SW1:3") // left as 'auto' - PORT_DIPSETTING( 0x40, "Manual" ) - PORT_DIPSETTING( 0x00, "Auto" ) + PORT_DIPSETTING( 0x40, "Auto" ) + PORT_DIPSETTING( 0x00, "Manual" ) PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:4") PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -3650,9 +3694,9 @@ static INPUT_PORTS_START( caspoker ) // Multiplexed - 4x5bits PORT_START("IN0-0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Bookkeeping") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Bookkeeping") PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_NAME("Deal / Draw") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_NAME("Deal / Draw") PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -3669,11 +3713,11 @@ static INPUT_PORTS_START( caspoker ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("IN0-2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("Hold 1 / Take Score (Kasse)") - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) PORT_NAME("Hold 2 / Small (Tief)") - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) PORT_NAME("Hold 3 / Bet (Setzen)") - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) PORT_NAME("Hold 4 / Big (Hoch)") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) PORT_NAME("Hold 5 / Double Up (Doppeln)") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("Hold 1 / Take Score (Kasse)") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) PORT_NAME("Hold 2 / Small (Tief)") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) PORT_NAME("Hold 3 / Bet (Setzen)") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) PORT_NAME("Hold 4 / Big (Hoch)") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) PORT_NAME("Hold 5 / Double Up (Doppeln)") PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -3728,11 +3772,11 @@ static INPUT_PORTS_START( mondial ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("IN0-1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_IMPULSE(3) PORT_NAME("Out (Manual Collect)") - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(ticket_dispenser_device::line_r)) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Big") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Small") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Big") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Small") PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -3769,9 +3813,9 @@ static INPUT_PORTS_START( mondial ) PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:2") PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:3") - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x40, 0x00, "Payout Mode" ) PORT_DIPLOCATION("SW1:3") + PORT_DIPSETTING( 0x40, "Auto" ) + PORT_DIPSETTING( 0x00, "Manual" ) PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:4") PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -3798,32 +3842,32 @@ static INPUT_PORTS_START( videtron ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("IN0-1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_IMPULSE(3) PORT_NAME("Out (Manual Collect)") - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(ticket_dispenser_device::line_r)) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Big") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Small") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Big") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Small") PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("IN0-2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Card Selector") PORT_CODE(KEYCODE_Z) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Card Selector") PORT_CODE(KEYCODE_Z) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Hold Card") PORT_CODE(KEYCODE_X) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Hold Card") PORT_CODE(KEYCODE_X) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("IN0-3") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Settings") PORT_CODE(KEYCODE_F2) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Settings") PORT_CODE(KEYCODE_F2) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(3) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(3) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_IMPULSE(3) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(3) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(3) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_IMPULSE(3) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -3841,8 +3885,8 @@ static INPUT_PORTS_START( videtron ) PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x40, 0x00, "Payout Mode" ) PORT_DIPLOCATION("SW1:3") - PORT_DIPSETTING( 0x40, "Manual" ) - PORT_DIPSETTING( 0x00, "Auto" ) + PORT_DIPSETTING( 0x40, "Auto" ) + PORT_DIPSETTING( 0x00, "Manual" ) PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:4") PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -3863,21 +3907,21 @@ static INPUT_PORTS_START( super98 ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_MODIFY("IN0-1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(3) PORT_NAME("Note In") // Key '5' + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_NAME("Note In") PORT_IMPULSE(3) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Payout") PORT_CODE(KEYCODE_W) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) // Key '4' - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Big / Black") // Key 'A' - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Small / Red") // Key 'S' + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Big / Black") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Small / Red") PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_MODIFY("IN0-2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) // Key 'Z' - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) // Key 'X' - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) // Key 'C' - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) // Key 'V' - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) // Key 'B' + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -3886,7 +3930,7 @@ static INPUT_PORTS_START( super98 ) PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Unknown IN0-3 0x01") PORT_CODE(KEYCODE_H) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Unknown IN0-3 0x02") PORT_CODE(KEYCODE_J) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Unknown IN0-3 0x04") PORT_CODE(KEYCODE_K) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) // Key 'M' + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Unknown IN0-3 0x10") PORT_CODE(KEYCODE_L) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -3918,11 +3962,11 @@ static INPUT_PORTS_START( geniea ) PORT_INCLUDE( bsuerte ) PORT_MODIFY("IN0-0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(3) PORT_NAME("Coin In") // Key '5' + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(3) PORT_NAME("Coin In") PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Attendant Key") PORT_CODE(KEYCODE_0) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) // Key '3' - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_NAME("Deal / Settings") // Key '2' - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) // Key 'N' + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_NAME("Deal / Settings") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -3930,19 +3974,19 @@ static INPUT_PORTS_START( geniea ) PORT_MODIFY("IN0-1") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Unknown IN0-1 0x01") PORT_CODE(KEYCODE_K) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Payout") PORT_CODE(KEYCODE_W) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) // Key '4' - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Big / Black") // Key 'A' - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Small / Red") // Key 'S' + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Big / Black") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Small / Red") PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_MODIFY("IN0-2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) // Key 'Z' - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) // Key 'X' - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) // Key 'C' - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) // Key 'V' - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) // Key 'B' + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -3950,8 +3994,8 @@ static INPUT_PORTS_START( geniea ) PORT_MODIFY("IN0-3") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Supervisor Key") PORT_CODE(KEYCODE_9) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Unknown IN0-3 0x02") PORT_CODE(KEYCODE_J) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(3) PORT_NAME("Note In") // Key '6' - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) // Key 'M' + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(3) PORT_NAME("Note In") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Unknown IN0-3 0x10") PORT_CODE(KEYCODE_L) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -3982,62 +4026,19 @@ static INPUT_PORTS_START( bsuertev ) // Multiplexed - 4x5bits PORT_INCLUDE( bsuerte ) - PORT_MODIFY("IN0-0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(3) PORT_NAME("Coin In") // Key '5' - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Attendant Key") PORT_CODE(KEYCODE_0) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) // Key '3' - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_NAME("Deal / Settings") // Key '2' - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) // Key 'N' - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - PORT_MODIFY("IN0-1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Unknown IN0-1 0x01") PORT_CODE(KEYCODE_K) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Payout") PORT_CODE(KEYCODE_W) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) // Key '4' - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Big / Black") // Key 'A' - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Small / Red") // Key 'S' - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - PORT_MODIFY("IN0-2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) // Key 'Z' - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) // Key 'X' - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) // Key 'C' - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) // Key 'V' - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) // Key 'B' - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - - PORT_MODIFY("IN0-3") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Supervisor Key") PORT_CODE(KEYCODE_9) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Unknown IN0-3 0x02") PORT_CODE(KEYCODE_J) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(3) PORT_NAME("Note In") // Key '6' - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) // Key 'M' - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Unknown IN0-3 0x10") PORT_CODE(KEYCODE_L) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_MODIFY("SW1") // only bits 4-7 are connected here and were routed to SW1 1-4 PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_DIPNAME( 0x10, 0x10, "Par Simple" ) PORT_DIPLOCATION("SW1:1") + PORT_DIPNAME( 0x10, 0x10, "Par Simple" ) PORT_DIPLOCATION("SW1:1") // "Jack or Better" is not translated in this rare Spanish/Portuguese text hack version PORT_DIPSETTING( 0x10, DEF_STR( No ) ) PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:2") + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:2") // 50/60 Hz Selector on parent PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:3") - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:4") + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:4") // Royal Flush on parent PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) INPUT_PORTS_END @@ -4047,20 +4048,20 @@ static INPUT_PORTS_START( bonuspkr ) // Multiplexed - 4x5bits PORT_START("IN0-0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Meters") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Meters") PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_NAME("Deal / Draw") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_NAME("Deal / Draw") PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("IN0-1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_IMPULSE(3) PORT_NAME("Out (Manual Collect)") - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_NAME("Off (Payout)") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_READ_LINE_DEVICE_MEMBER("hopper", FUNC(ticket_dispenser_device::line_r)) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Big") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Small") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Big") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Small") PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -4141,9 +4142,9 @@ static INPUT_PORTS_START( super21p ) PORT_START("IN0-3") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_NAME("Not Use") PORT_CODE(KEYCODE_F) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_NAME("C.A.R.") PORT_CODE(KEYCODE_G) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(3) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(3) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_IMPULSE(3) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(3) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(3) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_IMPULSE(3) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -4362,41 +4363,41 @@ INPUT_PORTS_END static INPUT_PORTS_START( icproul ) // Multiplexed - 4x5bits PORT_START("IN0-0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN0-0-01") PORT_CODE(KEYCODE_1) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN0-0-01") PORT_CODE(KEYCODE_1) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Meters") - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN0-0-04") PORT_CODE(KEYCODE_3) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN0-0-04") PORT_CODE(KEYCODE_3) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("IN0-1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN0-1-01") PORT_CODE(KEYCODE_Q) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN0-1-01") PORT_CODE(KEYCODE_Q) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN0-1-04") PORT_CODE(KEYCODE_E) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN0-1-08") PORT_CODE(KEYCODE_R) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN0-1-10") PORT_CODE(KEYCODE_T) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN0-1-04") PORT_CODE(KEYCODE_E) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN0-1-08") PORT_CODE(KEYCODE_R) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN0-1-10") PORT_CODE(KEYCODE_T) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("IN0-2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Place Bet / Take Out") PORT_IMPULSE(5) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Place Bet / Take Out") PORT_IMPULSE(5) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Cancel Bets") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN0-2-10") PORT_CODE(KEYCODE_G) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Cancel Bets") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN0-2-10") PORT_CODE(KEYCODE_G) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_START("IN0-3") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Program") PORT_CODE(KEYCODE_9) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN0-3-02") PORT_CODE(KEYCODE_X) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_NAME("Note In") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Program") PORT_CODE(KEYCODE_9) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN0-3-02") PORT_CODE(KEYCODE_X) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_NAME("Note In") PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN0-3-10") PORT_CODE(KEYCODE_B) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN0-3-10") PORT_CODE(KEYCODE_B) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -4537,6 +4538,61 @@ static INPUT_PORTS_START( glfever ) INPUT_PORTS_END +static INPUT_PORTS_START( megadpkr ) + // Multiplexed - 4x5bits + PORT_START("IN0-0") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) + PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("IN0-1") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) // not used? + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Coins Reset") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Big") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Small") + PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("IN0-2") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) + PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("IN0-3") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Menu") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // not used? + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_NAME("Note") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_NAME("Credit") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_NAME("Coupon") + PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("SW1") + // only bits 4-7 are connected here and were routed to SW1 1-4 + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) +INPUT_PORTS_END + + static INPUT_PORTS_START( potnpkro ) // ICP-1 w/daughterboard PORT_INCLUDE( goldnpkr ) @@ -4836,6 +4892,7 @@ void goldnpkr_state::goldnpkr_base(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_goldnpkr); PALETTE(config, m_palette, FUNC(goldnpkr_state::goldnpkr_palette), 256); + HOPPER(config, m_hopper, attotime::from_msec(50)); } void goldnpkr_state::goldnpkr(machine_config &config) @@ -5074,9 +5131,6 @@ void goldnpkr_state::geniea(machine_config &config) // basic machine hardware m_maincpu->set_addrmap(AS_PROGRAM, &goldnpkr_state::goldnpkr_map); -// m_pia[0]->readpa_handler().set(FUNC(goldnpkr_state::pottnpkr_mux_port_r)); -// m_pia[0]->writepa_handler().set(FUNC(goldnpkr_state::mux_port_w)); - // video hardware m_palette->set_init(FUNC(goldnpkr_state::witchcrd_palette)); @@ -5193,128 +5247,6 @@ void goldnpkr_state::glfever(machine_config &config) } -/********************************************* -* Blitz System * -*********************************************/ - -uint8_t blitz_state::cpubank_decrypt_r(offs_t offset) -{ - return m_cpubank[offset] ^ m_cpubank_xor; -} - -void blitz_state::mcu_command_w(uint8_t data) -{ - m_mcu->pa_w(data); - if (BIT(m_portc_data, 0)) - { - m_mcu->set_input_line(M6805_IRQ_LINE, ASSERT_LINE); - m_maincpu->suspend(SUSPEND_REASON_HALT, true); - } -} - -void blitz_state::mcu_portb_w(uint8_t data) -{ - m_cpubank_xor = data; -} - -void blitz_state::mcu_portc_w(uint8_t data) -{ - if (!BIT(data, 0)) - { - m_mcu->set_input_line(M6805_IRQ_LINE, CLEAR_LINE); - m_maincpu->resume(SUSPEND_REASON_HALT); - } - - m_bankdev->set_bank((BIT(data, 2) << 1) | BIT(data, 3)); - - m_portc_data = data; -} - - -void blitz_state::megadpkr_map(address_map &map) -{ - map(0x0000, 0x07ff).ram(); //.share("nvram"); // battery backed RAM - map(0x0800, 0x0800).w("crtc", FUNC(mc6845_device::address_w)); - map(0x0801, 0x0801).rw("crtc", FUNC(mc6845_device::register_r), FUNC(mc6845_device::register_w)); - map(0x0844, 0x0847).rw("pia0", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); - map(0x0848, 0x084b).rw("pia1", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); - -/* There is another set of PIAs controlled by the code. - Maybe they are just mirrors... - - map(0x10f4, 0x10f7).rw("pia0", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); - map(0x10f8, 0x10fb).rw("pia1", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); -*/ - map(0x1000, 0x13ff).ram().w(FUNC(blitz_state::goldnpkr_videoram_w)).share("videoram"); - map(0x1800, 0x1bff).ram().w(FUNC(blitz_state::goldnpkr_colorram_w)).share("colorram"); - - map(0x4000, 0x7fff).rw(m_bankdev, FUNC(address_map_bank_device::read8), FUNC(address_map_bank_device::write8)); - map(0x8000, 0xbfff).nopr().w(FUNC(blitz_state::mcu_command_w)); - map(0xc000, 0xffff).rom(); -} - -void blitz_state::megadpkr_banked_map(address_map &map) -{ - map(0x00000, 0x07fff).r(FUNC(blitz_state::cpubank_decrypt_r)); - map(0x08000, 0x087ff).rw("timekpr", FUNC(m48t02_device::read), FUNC(m48t02_device::write)); -} - - -static INPUT_PORTS_START( megadpkr ) - // Multiplexed - 4x5bits - PORT_START("IN0-0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) - PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("IN0-1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) // not used? - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Coins Reset") - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Big") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Small") - PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("IN0-2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) - PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("IN0-3") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Menu") - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // not used? - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_NAME("Note") - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_NAME("Credit") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_NAME("Coupon") - PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("SW1") - // only bits 4-7 are connected here and were routed to SW1 1-4 - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) -INPUT_PORTS_END - - void blitz_state::megadpkr(machine_config &config) { // basic machine hardware @@ -5358,8 +5290,46 @@ void blitz_state::megadpkr(machine_config &config) } +/********************************************** +* Blitz System decrypt and MCU handlers * +**********************************************/ + +uint8_t blitz_state::cpubank_decrypt_r(offs_t offset) +{ + return m_cpubank[offset] ^ m_cpubank_xor; +} + +void blitz_state::mcu_command_w(uint8_t data) +{ + m_mcu->pa_w(data); + if (BIT(m_portc_data, 0)) + { + m_mcu->set_input_line(M6805_IRQ_LINE, ASSERT_LINE); + m_maincpu->suspend(SUSPEND_REASON_HALT, true); + } +} + +void blitz_state::mcu_portb_w(uint8_t data) +{ + m_cpubank_xor = data; +} + +void blitz_state::mcu_portc_w(uint8_t data) +{ + if (!BIT(data, 0)) + { + m_mcu->set_input_line(M6805_IRQ_LINE, CLEAR_LINE); + m_maincpu->resume(SUSPEND_REASON_HALT); + } + + m_bankdev->set_bank((BIT(data, 2) << 1) | BIT(data, 3)); + + m_portc_data = data; +} + + /********************************************* -* Rom Load * +* ROM Load * *********************************************/ /******************************* GOLDEN POKER SETS *******************************/ @@ -6057,7 +6027,7 @@ ROM_END The second set is a hack of the first with unknown mods. */ -ROM_START( potnpkro ) // ICP-1 wires hack set. +ROM_START( potnpkro ) // ICP-1 wires hack set. ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "7.16a", 0x6000, 0x1000, CRC(2dc5e372) SHA1(70a251efe879bc1122baa78984251041a355c895) ) ROM_LOAD( "x.17a", 0x7000, 0x1000, CRC(1694a0d8) SHA1(bb1132d1e75347ad5156d2b3866aad255f7d53ca) ) @@ -6076,7 +6046,7 @@ ROM_START( potnpkro ) // ICP-1 wires hack set. ROM_LOAD( "tbp24s10n_wh.bin", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) ROM_END -ROM_START( potnpkrp ) // ICP-1 PROM mod set. +ROM_START( potnpkrp ) // ICP-1 PROM mod set. ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "6.16a", 0x6000, 0x1000, CRC(2dc5e372) SHA1(70a251efe879bc1122baa78984251041a355c895) ) ROM_LOAD( "95_09_hn71_7.17a", 0x7000, 0x1000, CRC(2353317a) SHA1(18bf8cfe30aaa4b05207cc250ec1c024bc19ed56) ) @@ -12603,7 +12573,7 @@ ROM_END ICP-1 PCB. Obscure and rare roulette game with zillions of checks - and protected with password. See the notes above. + and protected with password. See the notes above... */ ROM_START( icproul ) @@ -13178,10 +13148,10 @@ GAMEL( 198?, videtron2, videtron, goldnpkr, videtron, goldnpkr_state, empty_init GAMEL( 198?, videtrna, videtron, goldnpkr, goldnpkr, goldnpkr_state, empty_init, ROT0, "", "Videotron Poker (normal controls)", 0, layout_goldnpkr ) GAMEL( 198?, pottnpkr, 0, pottnpkr, pottnpkr, goldnpkr_state, empty_init, ROT0, "bootleg", "Jack Potten's Poker (set 1)", 0, layout_goldnpkr ) -GAMEL( 198?, potnpkra, pottnpkr, pottnpkr, potnpkra, goldnpkr_state, empty_init, ROT0, "bootleg", "Jack Potten's Poker (set 2)", 0, layout_goldnpkr ) +GAMEL( 198?, potnpkra, pottnpkr, pottnpkr, potnpkra, goldnpkr_state, empty_init, ROT0, "bootleg", "Jack Potten's Poker (set 2)", 0, layout_goldnswp ) GAMEL( 198?, potnpkrb, pottnpkr, pottnpkr, pottnpkr, goldnpkr_state, empty_init, ROT0, "bootleg", "Jack Potten's Poker (set 3)", 0, layout_goldnpkr ) -GAMEL( 198?, potnpkrc, pottnpkr, pottnpkr, potnpkrc, goldnpkr_state, empty_init, ROT0, "bootleg", "Jack Potten's Poker (set 4)", 0, layout_goldnpkr ) -GAMEL( 198?, potnpkrd, pottnpkr, pottnpkr, potnpkrc, goldnpkr_state, empty_init, ROT0, "bootleg", "Jack Potten's Poker (set 5)", 0, layout_goldnpkr ) +GAMEL( 198?, potnpkrc, pottnpkr, pottnpkr, potnpkrc, goldnpkr_state, empty_init, ROT0, "bootleg", "Jack Potten's Poker (set 4)", 0, layout_goldnswp ) +GAMEL( 198?, potnpkrd, pottnpkr, pottnpkr, potnpkrc, goldnpkr_state, empty_init, ROT0, "bootleg", "Jack Potten's Poker (set 5)", 0, layout_goldnswp ) GAMEL( 198?, potnpkre, pottnpkr, pottnpkr, pottnpkr, goldnpkr_state, empty_init, ROT0, "bootleg", "Jack Potten's Poker (set 6)", 0, layout_goldnpkr ) GAMEL( 198?, potnpkrf, pottnpkr, goldnpkr, goldnpkr, goldnpkr_state, empty_init, ROT0, "bootleg", "Jack Potten's Poker (set 7, Royale GFX)", 0, layout_goldnpkr ) GAMEL( 198?, potnpkrg, pottnpkr, pottnpkr, potnpkra, goldnpkr_state, empty_init, ROT0, "bootleg", "Jack Potten's Poker (set 8, Australian)", 0, layout_goldnpkr ) @@ -13323,10 +13293,10 @@ GAMEL( 198?, superdbl, pottnpkr, goldnpkr, goldnpkr, goldnpkr_state, empty_init GAME( 198?, pokerdub, 0, pottnpkr, goldnpkr, goldnpkr_state, empty_init, ROT0, "", "unknown French poker game", MACHINE_NOT_WORKING ) // lacks of 2nd program ROM. GAMEL( 198?, pokersis, 0, goldnpkr, goldnpkr, goldnpkr_state, init_pokersis, ROT0, "Sisteme France", "Good Luck! poker (Sisteme France)", 0, layout_goldnpkr ) // fix banking (4 prgs?)... -GAME( 1987, pokermon, 0, mondial, mondial, goldnpkr_state, empty_init, ROT0, "", "Mundial/Mondial (Italian/French)", 0 ) // banked selectable program. +GAMEL( 1987, pokermon, 0, mondial, mondial, goldnpkr_state, empty_init, ROT0, "", "Mundial/Mondial (Italian/French)", 0, layout_goldnpkr ) // banked selectable program. GAME( 1998, super98, bsuerte, witchcrd, super98, goldnpkr_state, init_super98, ROT0, "", "Super 98 (3-hands, ICP-1)", 0 ) // complex protection. see notes. -GAME( 198?, animpkr, 0, icp_ext, animpkr, goldnpkr_state, empty_init, ROT0, "", "unknown rocket/animal-themed poker", MACHINE_IMPERFECT_COLORS ) // banked program. how to switch gfx? +GAMEL( 198?, animpkr, 0, icp_ext, animpkr, goldnpkr_state, empty_init, ROT0, "", "unknown rocket/animal-themed poker", MACHINE_IMPERFECT_COLORS, layout_goldnswp ) // banked program. how to switch gfx? GAME( 1987, super21p, 0, super21p, super21p, goldnpkr_state, empty_init, ROT0, "Public MNG", "Super 21", MACHINE_IMPERFECT_COLORS ) GAME( 1987, op5cards, 0, op5cards, op5cards, goldnpkr_state, init_op5cards, ROT0, "MNG", "Open 5 Cards", 0 ) // initialize lamps but doesn't seems to use them @@ -13336,6 +13306,7 @@ GAMEL( 198?, lespenduj, 0, lespendu, lespendu, goldnpkr_state, init_lespe GAME( 198?, icproul, 0, icproul, icproul, goldnpkr_state, empty_init, ROT0, "", "Roulette (ICP-1 PCB)", 0 ) // password protected + /*************************************** SETS W/IRQ0 ***************************************/ // YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS LAYOUT diff --git a/src/mame/misc/itgambl2.cpp b/src/mame/misc/itgambl2.cpp index 6ba7b9cc74ce9..fd3433e824542 100644 --- a/src/mame/misc/itgambl2.cpp +++ b/src/mame/misc/itgambl2.cpp @@ -1,5 +1,6 @@ // license:BSD-3-Clause -// copyright-holders:Roberto Fresca +// copyright-holders: Roberto Fresca + /************************************************************************ @@ -54,8 +55,10 @@ ************************************************************************/ #include "emu.h" + #include "cpu/h8/h83337.h" #include "sound/upd7759.h" + #include "emupal.h" #include "screen.h" #include "speaker.h" @@ -63,20 +66,17 @@ namespace { -#define MAIN_CLOCK XTAL(16'000'000) -#define SND_CLOCK XTAL(14'318'181) - - class itgambl2_state : public driver_device { public: itgambl2_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), - m_palette(*this, "palette") + m_palette(*this, "palette"), + m_blitter_rom(*this, "blitter") { } - void itgambl2(machine_config &config); + void itgambl2(machine_config &config) ATTR_COLD; protected: virtual void machine_reset() override ATTR_COLD; @@ -85,13 +85,16 @@ class itgambl2_state : public driver_device private: required_device m_maincpu; required_device m_palette; - int m_test_x = 0; - int m_test_y = 0; - int m_start_offs = 0; - void itgambl2_palette(palette_device &palette) const; - uint32_t screen_update_itgambl2(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - void itgambl2_map(address_map &map) ATTR_COLD; + required_region_ptr m_blitter_rom; + + uint32_t m_test_x = 0; + uint32_t m_test_y = 0; + uint32_t m_start_offs = 0; + + void palette_init(palette_device &palette) const; + uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + void program_map(address_map &map) ATTR_COLD; }; @@ -106,33 +109,31 @@ void itgambl2_state::video_start() m_start_offs = 0; } -/* (dirty) debug code for looking 8bpps blitter-based gfxs */ -uint32_t itgambl2_state::screen_update_itgambl2(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) +// (dirty) debug code for looking 8bpps blitter-based gfxs +uint32_t itgambl2_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { - const uint8_t *blit_ram = memregion("gfx1")->base(); - - if(machine().input().code_pressed(KEYCODE_Z)) + if (machine().input().code_pressed(KEYCODE_Z)) m_test_x++; - if(machine().input().code_pressed(KEYCODE_X)) + if (machine().input().code_pressed(KEYCODE_X) && (m_test_x > 0)) m_test_x--; - if(machine().input().code_pressed(KEYCODE_A)) + if (machine().input().code_pressed(KEYCODE_A)) m_test_y++; - if(machine().input().code_pressed(KEYCODE_S)) + if (machine().input().code_pressed(KEYCODE_S) && (m_test_y > 0)) m_test_y--; - if(machine().input().code_pressed(KEYCODE_Q)) - m_start_offs+=0x200; + if (machine().input().code_pressed(KEYCODE_Q) && m_start_offs <= (m_blitter_rom.bytes() - (m_test_x * m_test_y))) + m_start_offs += 0x200; - if(machine().input().code_pressed(KEYCODE_W)) - m_start_offs-=0x200; + if (machine().input().code_pressed(KEYCODE_W) && (m_start_offs >= 0x200)) + m_start_offs -= 0x200; - if(machine().input().code_pressed(KEYCODE_E)) + if (machine().input().code_pressed(KEYCODE_E) && m_start_offs <= (m_blitter_rom.bytes() - (m_test_x * m_test_y))) m_start_offs++; - if(machine().input().code_pressed(KEYCODE_R)) + if (machine().input().code_pressed(KEYCODE_R) && (m_start_offs > 0)) m_start_offs--; popmessage("%d %d %04x", m_test_x, m_test_y, m_start_offs); @@ -145,9 +146,9 @@ uint32_t itgambl2_state::screen_update_itgambl2(screen_device &screen, bitmap_rg { for(int x = 0; x < m_test_x; x++) { - uint32_t const color = (blit_ram[count] & 0xff) >> 0; + uint32_t const color = (m_blitter_rom[count] & 0xff) >> 0; - if(cliprect.contains(x, y)) + if (cliprect.contains(x, y)) bitmap.pix(y, x) = m_palette->pen(color); count++; @@ -162,9 +163,9 @@ uint32_t itgambl2_state::screen_update_itgambl2(screen_device &screen, bitmap_rg * Memory map information * *************************/ -void itgambl2_state::itgambl2_map(address_map &map) +void itgambl2_state::program_map(address_map &map) { - map(0x000000, 0x3fff).rom(); + map(0x000000, 0x00efff).rom(); } @@ -231,7 +232,7 @@ INPUT_PORTS_END static const gfx_layout gfxlayout_8x8x8 = { -/* this is wrong and need to be fixed */ +// TODO: this is wrong and need to be fixed 8, 8, RGN_FRAC(1,1), @@ -248,7 +249,7 @@ static const gfx_layout gfxlayout_8x8x8 = ******************************/ static GFXDECODE_START( gfx_itgambl2 ) - GFXDECODE_ENTRY( "gfx1", 0, gfxlayout_8x8x8, 0, 16 ) + GFXDECODE_ENTRY( "blitter", 0, gfxlayout_8x8x8, 0, 16 ) GFXDECODE_END @@ -258,12 +259,12 @@ GFXDECODE_END void itgambl2_state::machine_reset() { - /* stop the CPU, we have no code for it anyway */ + // stop the CPU, we have no code for it anyway m_maincpu->set_input_line(INPUT_LINE_HALT, ASSERT_LINE); } -/* default 444 palette for debug purpose*/ -void itgambl2_state::itgambl2_palette(palette_device &palette) const +// default 444 palette for debug purpose +void itgambl2_state::palette_init(palette_device &palette) const { for(int x = 0; x < 0x100; x++) { @@ -281,8 +282,8 @@ void itgambl2_state::itgambl2_palette(palette_device &palette) const void itgambl2_state::itgambl2(machine_config &config) { // basic machine hardware - H83337(config, m_maincpu, MAIN_CLOCK); - m_maincpu->set_addrmap(AS_PROGRAM, &itgambl2_state::itgambl2_map); + H83337(config, m_maincpu, 16_MHz_XTAL); + m_maincpu->set_addrmap(AS_PROGRAM, &itgambl2_state::program_map); // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); @@ -290,10 +291,10 @@ void itgambl2_state::itgambl2(machine_config &config) screen.set_vblank_time(ATTOSECONDS_IN_USEC(0)); screen.set_size(512, 256); screen.set_visarea(0, 512-1, 0, 256-1); - screen.set_screen_update(FUNC(itgambl2_state::screen_update_itgambl2)); + screen.set_screen_update(FUNC(itgambl2_state::screen_update)); GFXDECODE(config, "gfxdecode", m_palette, gfx_itgambl2); - PALETTE(config, m_palette, FUNC(itgambl2_state::itgambl2_palette), 0x200); + PALETTE(config, m_palette, FUNC(itgambl2_state::palette_init), 0x200); // sound hardware SPEAKER(config, "mono").front_center(); @@ -307,6 +308,7 @@ void itgambl2_state::itgambl2(machine_config &config) /* NtCash + 2-0235 PCB CPU: 1x HD64F3337CP16 (main) @@ -331,22 +333,37 @@ void itgambl2_state::itgambl2(machine_config &config) */ ROM_START( ntcash ) - ROM_REGION( 0x1000000, "maincpu", 0 ) /* all the program code is in here */ - ROM_LOAD( "ntcash_hd64f3337cp16.mcu", 0x00000, 0x4000, NO_DUMP ) + ROM_REGION( 0xf000, "maincpu", ROMREGION_ERASE00 ) // all the program code is in here + ROM_LOAD( "ntcash_hd64f3337cp16.mcu", 0x0000, 0xf000, NO_DUMP ) - ROM_REGION( 0x200000, "gfx1", 0 ) + ROM_REGION( 0x200000, "blitter", 0 ) ROM_LOAD( "ntcashep1.bin", 0x000000, 0x80000, CRC(f1e8b74d) SHA1(b84e36ab101d6b5b1f60d9778bd8e5d89b3d437d) ) ROM_LOAD( "ntcashep2.bin", 0x080000, 0x80000, CRC(b51513c8) SHA1(27b6469daecb92d8a8ed6e9ab317d20f49dd6475) ) ROM_LOAD( "ntcashep3.bin", 0x100000, 0x80000, CRC(ba46f1b2) SHA1(61f5b2f1732bbdb2bd21835d2c6e2890c1f0fc8c) ) ROM_LOAD( "ntcashep4.bin", 0x180000, 0x80000, CRC(1e42142d) SHA1(82444584b1d61ff0a34d7767f70cab995d26e1e1) ) - ROM_REGION( 0x20000, "upd", 0 ) /* NEC D7759GC samples */ + ROM_REGION( 0x20000, "upd", 0 ) // NEC D7759GC samples + ROM_LOAD( "ntcashmsg0.bin", 0x00000, 0x20000, CRC(e3022f30) SHA1(859bdf0ce871c0b39224dc93b8005a5e0a5552b1) ) +ROM_END + +ROM_START( ntcasha ) + ROM_REGION( 0xf000, "maincpu", ROMREGION_ERASE00 ) // all the program code is in here + ROM_LOAD( "ntcasha_hd64f3337cp16.mcu", 0x0000, 0xf000, NO_DUMP ) + + ROM_REGION( 0x200000, "blitter", 0 ) // weirdly no GFX ROM matches the other set, and they also seem to be in different order + ROM_LOAD( "1.bin", 0x000000, 0x80000, CRC(78c0af7f) SHA1(d5424eb35167c991e1b63760bbabbb80a744e718) ) + ROM_LOAD( "2.bin", 0x080000, 0x80000, CRC(47029306) SHA1(37e7dd25ee3e91568775934971f76fbc07e31672) ) + ROM_LOAD( "3.bin", 0x100000, 0x80000, CRC(31d11573) SHA1(8b156fcd41f7ff58465b2cc56a7ebe7be0b392b1) ) + ROM_LOAD( "4.bin", 0x180000, 0x80000, CRC(574a6938) SHA1(3ce0fb090da00b3098b04f367842b031ed4767ef) ) + + ROM_REGION( 0x20000, "upd", 0 ) // NEC D7759GC samples ROM_LOAD( "ntcashmsg0.bin", 0x00000, 0x20000, CRC(e3022f30) SHA1(859bdf0ce871c0b39224dc93b8005a5e0a5552b1) ) ROM_END /* Wizard (Ver 1.0) + 2-0250 PCB CPU: 1x HD64F3337CP16 (main) @@ -371,16 +388,16 @@ ROM_END */ ROM_START( wizard ) - ROM_REGION( 0x1000000, "maincpu", 0 ) /* all the program code is in here */ - ROM_LOAD( "wizard_ver1.2_hd64f3337cp16.mcu", 0x00000, 0x4000, NO_DUMP ) + ROM_REGION( 0xf000, "maincpu", ROMREGION_ERASE00 ) // all the program code is in here + ROM_LOAD( "wizard_ver1.2_hd64f3337cp16.mcu", 0x0000, 0xf000, NO_DUMP ) - ROM_REGION( 0x200000, "gfx1", 0 ) + ROM_REGION( 0x200000, "blitter", 0 ) ROM_LOAD( "wizardep1.bin", 0x000000, 0x80000, CRC(a99af86f) SHA1(4bf32df74e93a6b40cf8213e99ec6ef538d9802d) ) ROM_LOAD( "wizardep2.bin", 0x080000, 0x80000, CRC(bc52566d) SHA1(ecd4f3852c3ba8981316686042dfc2c0013f139f) ) ROM_LOAD( "wizardep3.bin", 0x100000, 0x80000, CRC(98e1905a) SHA1(805df94fef011b48d5eb2abbd294b7cd338d7124) ) ROM_LOAD( "wizardep4.bin", 0x180000, 0x80000, CRC(f129916a) SHA1(c1c0fcb04622dde196299c2e88a807b2aa00bf5e) ) - ROM_REGION( 0x20000, "upd", 0 ) /* NEC D7759GC samples */ + ROM_REGION( 0x20000, "upd", 0 ) // NEC D7759GC samples ROM_LOAD( "wizardmsg0.bin", 0x00000, 0x20000, CRC(94b28a4b) SHA1(2c10462cd7c8dc79dba735a061841a9c8b423091) ) ROM_END @@ -412,16 +429,16 @@ ROM_END */ ROM_START( laser2k1 ) - ROM_REGION( 0x1000000, "maincpu", 0 ) /* all the program code is in here */ - ROM_LOAD( "laser2k1_ver1.2_hd64f3337cp16.mcu", 0x00000, 0x4000, NO_DUMP ) + ROM_REGION( 0xf000, "maincpu", ROMREGION_ERASE00 ) // all the program code is in here + ROM_LOAD( "laser2k1_ver1.2_hd64f3337cp16.mcu", 0x0000, 0xf000, NO_DUMP ) - ROM_REGION( 0x200000, "gfx1", 0 ) + ROM_REGION( 0x200000, "blitter", 0 ) ROM_LOAD( "xlep1.bin", 0x000000, 0x80000, CRC(b45c9491) SHA1(1fa0572d3efb847dcf49bb99f429322dcb72b0d1) ) ROM_LOAD( "xlep2.bin", 0x080000, 0x80000, CRC(75c82293) SHA1(e6d847a2259393ef8877e9237c7624bf2e36f197) ) ROM_LOAD( "xlep3.bin", 0x100000, 0x80000, CRC(3a45d626) SHA1(c804916b6bfe04bacd7ac6f32e5041ed65e7b91e) ) ROM_LOAD( "xlep4.bin", 0x180000, 0x80000, CRC(d0381819) SHA1(30bab7e1c68192a2e1c324ef4c8a3d3b5696eb2b) ) - ROM_REGION( 0x20000, "upd", 0 ) /* NEC D7759GC samples */ + ROM_REGION( 0x20000, "upd", 0 ) // NEC D7759GC samples ROM_LOAD( "xlmsg0.bin", 0x00000, 0x20000, CRC(36287068) SHA1(d964837cb5370c7b878e1e531ef6d8c3840f776c) ) ROM_END @@ -453,15 +470,15 @@ ROM_END */ ROM_START( mdrink ) - ROM_REGION( 0x1000000, "maincpu", 0 ) /* all the program code is in here */ - ROM_LOAD( "mdrink_ver1.2_hd64f3337cp16.mcu", 0x00000, 0x4000, NO_DUMP ) + ROM_REGION( 0xf000, "maincpu", ROMREGION_ERASE00 ) // all the program code is in here + ROM_LOAD( "mdrink_ver1.2_hd64f3337cp16.mcu", 0x0000, 0xf000, NO_DUMP ) - ROM_REGION( 0x180000, "gfx1", 0 ) + ROM_REGION( 0x180000, "blitter", 0 ) ROM_LOAD( "mdrink-1.bin", 0x000000, 0x80000, CRC(25a7cea9) SHA1(d67a7264501699c8f7a48c3f3956903a5c95898f) ) ROM_LOAD( "mdrink-2.bin", 0x080000, 0x80000, CRC(c2a14bca) SHA1(8d0095333c34d81d103f15ee5731e2e4aa4d1fac) ) ROM_LOAD( "mdrink-3.bin", 0x100000, 0x80000, CRC(ff593676) SHA1(b21bb85df0b7b79c07ded2c4b950c94719e08302) ) - ROM_REGION( 0x40000, "upd", 0 ) /* NEC D7759GC samples */ + ROM_REGION( 0x40000, "upd", 0 ) // NEC D7759GC samples ROM_LOAD( "mdrink-s.bin", 0x00000, 0x40000, CRC(d78b7823) SHA1(ca01e4aa3e25c3a40517b4fe07c31915e79af650) ) ROM_END @@ -502,30 +519,30 @@ ROM_END */ ROM_START( te0144 ) - ROM_REGION( 0x1000000, "maincpu", 0 ) /* all the program code is in here */ - ROM_LOAD( "te0144_ver1.2_hdy1a3-64f3337f16.mcu", 0x00000, 0x4000, NO_DUMP ) + ROM_REGION( 0xf000, "maincpu", ROMREGION_ERASE00 ) // all the program code is in here + ROM_LOAD( "te0144_ver1.2_hdy1a3-64f3337f16.mcu", 0x0000, 0xf000, NO_DUMP ) - ROM_REGION( 0x200000, "gfx1", 0 ) + ROM_REGION( 0x200000, "blitter", 0 ) ROM_LOAD( "pb1.bin", 0x000000, 0x80000, CRC(b7b4ea0f) SHA1(d11096684059e6063747f3e082d70aef1ee8d259) ) ROM_LOAD( "pb2.bin", 0x080000, 0x80000, CRC(b02fd07e) SHA1(415a834cd47fdcb180b2a5fa267c1566b9ca0b61) ) ROM_LOAD( "pb3.bin", 0x100000, 0x80000, CRC(1984427e) SHA1(0200360f083019235f464ed9b96bf7f78a07df37) ) ROM_LOAD( "pb4.bin", 0x180000, 0x80000, CRC(ac513c2d) SHA1(aedc29b12157f02a014359ceae71a2a7892afa72) ) - ROM_REGION( 0x20000, "upd", 0 ) /* NEC D7759GC samples */ + ROM_REGION( 0x20000, "upd", 0 ) // NEC D7759GC samples ROM_LOAD( "pb0.bin", 0x00000, 0x20000, CRC(123ef964) SHA1(b36d91b58119c15211a54ff7d78c7137d638ea88) ) ROM_END ROM_START( btorneo ) // Silkscreened on PCB: "2-0250" (same as elvis set) - ROM_REGION( 0x1000000, "maincpu", 0 ) /* all the program code is in here */ - ROM_LOAD( "a1-hd64f3337cp16.mcu", 0x00000, 0x4000, NO_DUMP ) + ROM_REGION( 0xf000, "maincpu", ROMREGION_ERASE00 ) // all the program code is in here + ROM_LOAD( "a1-hd64f3337cp16.mcu", 0x0000, 0xf000, NO_DUMP ) - ROM_REGION( 0x200000, "gfx1", 0 ) + ROM_REGION( 0x200000, "blitter", 0 ) ROM_LOAD( "bt01.bin", 0x000000, 0x80000, CRC(e95d4f0e) SHA1(0c1a3c5e26102215e806f351279c4ee7858bd152) ) ROM_LOAD( "bt02.bin", 0x080000, 0x80000, CRC(177424a0) SHA1(d395dfb7af3ef44c99623101377cae152b0dda37) ) ROM_LOAD( "bt03.bin", 0x100000, 0x80000, CRC(1984427e) SHA1(0200360f083019235f464ed9b96bf7f78a07df37) ) // same as the one in te0144 romset ROM_LOAD( "bt04.bin", 0x180000, 0x80000, CRC(57de0f01) SHA1(b958497bdf890be4c8482c4c89c24fc9f02eebf9) ) - ROM_REGION( 0x80000, "upd", 0 ) /* NEC D7759GC samples */ + ROM_REGION( 0x80000, "upd", 0 ) // NEC D7759GC samples ROM_LOAD( "bt05.bin", 0x00000, 0x80000, CRC(1a399d20) SHA1(c21122275cf595493a101f3ad98aa9e839c82871) ) // 11xxxxxxxxxxxxxxxxx = 0xFF ROM_END @@ -562,15 +579,15 @@ ROM_END */ ROM_START( cmagica ) - ROM_REGION( 0x1000000, "maincpu", 0 ) /* all the program code is in here */ - ROM_LOAD( "cmagica_ver1.8_hd64f3337cp16.mcu", 0x00000, 0x4000, NO_DUMP ) + ROM_REGION( 0xf000, "maincpu", ROMREGION_ERASE00 ) // all the program code is in here + ROM_LOAD( "cmagica_ver1.8_hd64f3337cp16.mcu", 0x0000, 0xf000, NO_DUMP ) - ROM_REGION( 0x180000, "gfx1", 0 ) + ROM_REGION( 0x180000, "blitter", 0 ) ROM_LOAD( "1.u6", 0x000000, 0x80000, CRC(3e7e6c9f) SHA1(53a7c4422d9a7c63a21cf4d35d4d883dc2d0eac0) ) ROM_LOAD( "2.u7", 0x080000, 0x80000, CRC(6339b62d) SHA1(160030e07600c8db365429c27a33081cfa7d3d61) ) ROM_LOAD( "3.u4", 0x100000, 0x80000, CRC(ba636099) SHA1(3d3d9eee5d6808d7666dbf113d7c17a03b6b461e) ) - ROM_REGION( 0x20000, "upd", 0 ) /* NEC D7759GC samples */ + ROM_REGION( 0x20000, "upd", 0 ) // NEC D7759GC samples ROM_LOAD( "sound.bin", 0x00000, 0x20000, CRC(9dab99a6) SHA1(ce34056dd964be32359acd2e53a6101cb4d9ddff) ) ROM_END @@ -596,15 +613,15 @@ ROM_END */ ROM_START( mcard_h8 ) - ROM_REGION( 0x1000000, "maincpu", 0 ) /* all the program code is in here */ - ROM_LOAD( "cmcard_h8_hd64f3337cp16.mcu", 0x00000, 0x4000, NO_DUMP ) + ROM_REGION( 0xf000, "maincpu", ROMREGION_ERASE00 ) // all the program code is in here + ROM_LOAD( "cmcard_h8_hd64f3337cp16.mcu", 0x0000, 0xf000, NO_DUMP ) - ROM_REGION( 0x180000, "gfx1", 0 ) + ROM_REGION( 0x180000, "blitter", 0 ) ROM_LOAD( "m_card_ep_1.bin", 0x000000, 0x80000, CRC(f887f740) SHA1(d9a59ed753f3f61705658af1cac673c523ad2237) ) ROM_LOAD( "m_card_ep_2.bin", 0x080000, 0x80000, CRC(e5fa014c) SHA1(96fcdf6a15617dbf928f465e21df3638cbae26aa) ) ROM_LOAD( "m_card_ep_3.bin", 0x100000, 0x80000, CRC(cd6f22cf) SHA1(0b8f5d9ce4f9bb5b776beec38087494d1e4bae7e) ) - ROM_REGION( 0x20000, "upd", 0 ) /* NEC D7759GC samples */ + ROM_REGION( 0x20000, "upd", 0 ) // NEC D7759GC samples ROM_LOAD( "m_card_msg_0.bin", 0x00000, 0x20000, CRC(9dab99a6) SHA1(ce34056dd964be32359acd2e53a6101cb4d9ddff) ) ROM_END @@ -612,9 +629,9 @@ ROM_END // PCB is marked 2-0249 and has a SanRemo Games sticker. ROM_START( smcard ) ROM_REGION( 0x1000000, "maincpu", 0 ) // all the program code is in here - ROM_LOAD( "smcard_h8_hd64f3337cp16.mcu", 0x00000, 0x4000, NO_DUMP ) + ROM_LOAD( "smcard_h8_hd64f3337cp16.mcu", 0x0000, 0xf000, NO_DUMP ) - ROM_REGION( 0x200000, "gfx1", 0 ) // all handwritten labels + ROM_REGION( 0x200000, "blitter", 0 ) // all handwritten labels ROM_LOAD( "1.bin", 0x000000, 0x80000, CRC(0edd5f93) SHA1(a6cfe88a3d3e5be7948e125f9911ed120be5202a) ) ROM_LOAD( "2.bin", 0x080000, 0x80000, CRC(e09748c3) SHA1(9778498745176ee36d5f6bec5fdd2f071f595936) ) ROM_LOAD( "3.bin", 0x100000, 0x80000, CRC(69832697) SHA1(51da0149849b8f11422de91728ea27148f602a54) ) @@ -656,16 +673,16 @@ ROM_END */ ROM_START( millsun ) - ROM_REGION( 0x1000000, "maincpu", 0 ) /* all the program code is in here */ - ROM_LOAD( "millsun_hd64f3337f16.mcu", 0x00000, 0x4000, NO_DUMP ) + ROM_REGION( 0xf000, "maincpu", ROMREGION_ERASE00 ) // all the program code is in here + ROM_LOAD( "millsun_hd64f3337f16.mcu", 0x0000, 0xf000, NO_DUMP ) - ROM_REGION( 0x200000, "gfx1", 0 ) + ROM_REGION( 0x200000, "blitter", 0 ) ROM_LOAD( "msun_ep1.bin", 0x000000, 0x80000, CRC(06f10795) SHA1(f88a36e11f8ba38439aa066dc013427f204be3d7) ) ROM_LOAD( "msun_ep2.bin", 0x080000, 0x80000, CRC(f85d10e6) SHA1(d33017c4a4883a4c9c76132deb5c57eb38f9fdb3) ) ROM_LOAD( "msun_ep3.bin", 0x100000, 0x80000, CRC(329d380c) SHA1(618a7010fca8be6c368c3cc09fe129d8a4c72087) ) ROM_LOAD( "msun_ep4.bin", 0x180000, 0x80000, CRC(071f5257) SHA1(891116086f5ce99327d9752c99465c25bd6dd69e) ) - ROM_REGION( 0x20000, "upd", 0 ) /* NEC D7759GC samples */ + ROM_REGION( 0x20000, "upd", 0 ) // NEC D7759GC samples ROM_LOAD( "msun_msg0.bin", 0x00000, 0x20000, CRC(b4bfbbb9) SHA1(ba2d6555f169273fa43de320614a5ea3ba2857e8) ) ROM_END @@ -702,16 +719,16 @@ ROM_END */ ROM_START( sspac2k1 ) - ROM_REGION( 0x1000000, "maincpu", 0 ) /* all the program code is in here */ - ROM_LOAD( "sspac2k1_hd64f3337f16.mcu", 0x00000, 0x4000, NO_DUMP ) + ROM_REGION( 0xf000, "maincpu", ROMREGION_ERASE00 ) // all the program code is in here + ROM_LOAD( "sspac2k1_hd64f3337f16.mcu", 0x0000, 0xf000, NO_DUMP ) - ROM_REGION( 0x200000, "gfx1", 0 ) + ROM_REGION( 0x200000, "blitter", 0 ) ROM_LOAD( "sup_spaces_ep1.bin", 0x000000, 0x80000, CRC(d512ee80) SHA1(f113218899394bf1dfe81518746414c4eda9a94c) ) ROM_LOAD( "sup_spaces_ep2.bin", 0x080000, 0x80000, CRC(775eb938) SHA1(a83851ea6d90aaf3cad064cdbcc8379eed3d90ca) ) ROM_LOAD( "sup_spaces_ep3.bin", 0x100000, 0x80000, CRC(d1d9c06c) SHA1(64993b5572201cc2c29d8900a89f036e96221e05) ) ROM_LOAD( "sup_spaces_ep4.bin", 0x180000, 0x80000, CRC(0c02ad49) SHA1(64b382bf6dabf08229324807c6b66e600f38039d) ) - ROM_REGION( 0x20000, "upd", 0 ) /* NEC D7759GC samples */ + ROM_REGION( 0x20000, "upd", 0 ) // NEC D7759GC samples ROM_LOAD( "sup_spaces_msg0.bin", 0x00000, 0x20000, CRC(93edd0ad) SHA1(f122e147c918c6cb12043008ede729d6e0a4e543) ) ROM_END @@ -747,20 +764,21 @@ ROM_END */ ROM_START( elvis ) - ROM_REGION( 0x1000000, "maincpu", 0 ) /* all the program code is in here */ - ROM_LOAD( "elvis_hd64f3337cp16.mcu", 0x00000, 0x4000, NO_DUMP ) + ROM_REGION( 0xf000, "maincpu", ROMREGION_ERASE00 ) // all the program code is in here + ROM_LOAD( "elvis_hd64f3337cp16.mcu", 0x0000, 0xf000, NO_DUMP ) - ROM_REGION( 0x180000, "gfx1", 0 ) + ROM_REGION( 0x180000, "blitter", 0 ) ROM_LOAD( "1.bin", 0x000000, 0x80000, CRC(9e15983f) SHA1(272673ac9685cf0f5cc8a9263c91e4f93c30197f) ) ROM_LOAD( "2.bin", 0x080000, 0x80000, CRC(c420af73) SHA1(fb0e03456a4b2f18c35d5ee2efeb29e3f2f26eae) ) ROM_LOAD( "3.bin", 0x100000, 0x80000, CRC(bc10b1b6) SHA1(ef25f974cd0b44b91a8db215ff8d2dd3f4313bd8) ) - ROM_REGION( 0x20000, "upd", 0 ) /* NEC D7759GC samples */ + ROM_REGION( 0x20000, "upd", 0 ) // NEC D7759GC samples ROM_LOAD( "0.bin", 0x00000, 0x20000, CRC(833c5be5) SHA1(89110cb52265ee5bfdf73c0af343b7ce2356e394) ) ROM_END /* Triple Star 2000. + 2-0250 PCB CPU: 1x HD64F3337YCP16 (main)(not dumped) @@ -791,16 +809,16 @@ ROM_END */ ROM_START( trstar2k ) - ROM_REGION( 0x1000000, "maincpu", 0 ) /* all the program code is in here */ - ROM_LOAD( "trstar2k_hd64f3337ycp16.mcu", 0x00000, 0x4000, NO_DUMP ) + ROM_REGION( 0xf000, "maincpu", ROMREGION_ERASE00 ) // all the program code is in here + ROM_LOAD( "trstar2k_hd64f3337ycp16.mcu", 0x0000, 0xf000, NO_DUMP ) - ROM_REGION( 0x200000, "gfx1", 0 ) + ROM_REGION( 0x200000, "blitter", 0 ) ROM_LOAD( "ep1.bin", 0x000000, 0x80000, CRC(59394c87) SHA1(a8b5de197b474714a8e5a5c959b81cb78fc69291) ) ROM_LOAD( "ep2.bin", 0x080000, 0x80000, CRC(80608870) SHA1(5af501e4bb9498d2b9b614cc98ec9f4c907f207d) ) ROM_LOAD( "ep3.bin", 0x100000, 0x80000, CRC(cad4523f) SHA1(1a16f200622a8c9666beea2da2ec64bf7c9195a8) ) ROM_LOAD( "ep4.bin", 0x180000, 0x80000, CRC(e488d31d) SHA1(e0a51abf1459a1c7205750b9cad28a63bbabed96) ) - ROM_REGION( 0x20000, "upd", 0 ) /* NEC D7759GC samples */ + ROM_REGION( 0x20000, "upd", 0 ) // NEC D7759GC samples ROM_LOAD( "msg0.bin", 0x00000, 0x20000, CRC(b25e1c8a) SHA1(a211412c3354a9f1a9662445b4cc379dad27813b) ) ROM_END @@ -838,15 +856,15 @@ ROM_END ROM_START( sstar ) - ROM_REGION( 0x1000000, "maincpu", 0 ) /* all the program code is in here */ - ROM_LOAD( "sstar_hd64f3337cp16.mcu", 0x00000, 0x4000, NO_DUMP ) + ROM_REGION( 0xf000, "maincpu", ROMREGION_ERASE00 ) // all the program code is in here + ROM_LOAD( "sstar_hd64f3337cp16.mcu", 0x0000, 0xf000, NO_DUMP ) - ROM_REGION( 0x180000, "gfx1", 0 ) + ROM_REGION( 0x180000, "blitter", 0 ) ROM_LOAD( "sstar.ep1", 0x000000, 0x80000, CRC(e798295e) SHA1(ed9a0ceeaefccfb1bde5894548ba91d631055b69) ) //contains C-based strings? ROM_LOAD( "sstar.ep2", 0x080000, 0x80000, CRC(5e9fa33b) SHA1(5196723db69bf9f1df497f4d8f84ac1d9768736f) ) ROM_LOAD( "sstar.ep3", 0x100000, 0x80000, CRC(67abc2a1) SHA1(877e233b2120281779a2480e8035a73df87e7240) ) - ROM_REGION( 0x20000, "upd", 0 ) /* NEC D7759GC samples */ + ROM_REGION( 0x20000, "upd", 0 ) // NEC D7759GC samples ROM_LOAD( "sstar.msg0", 0x00000, 0x20000, CRC(04f44a53) SHA1(0b27d1fe1992d1769abec2078defc30896c36bcb) ) ROM_END @@ -860,20 +878,21 @@ D7759GC */ ROM_START( pirati ) - ROM_REGION( 0x1000000, "maincpu", 0 ) /* all the program code is in here */ - ROM_LOAD( "pirati_hd64f3337cp16.mcu", 0x00000, 0x4000, NO_DUMP ) + ROM_REGION( 0xf000, "maincpu", ROMREGION_ERASE00 ) // all the program code is in here + ROM_LOAD( "pirati_hd64f3337cp16.mcu", 0x0000, 0xf000, NO_DUMP ) - ROM_REGION( 0x180000, "gfx1", 0 ) + ROM_REGION( 0x180000, "blitter", 0 ) ROM_LOAD( "s.ch.ep1", 0x000000, 0x80000, CRC(735d28a6) SHA1(feaf71b64db45e9dd68bff4daf75d3bd5e6ab6c8) ) ROM_LOAD( "s.ch.ep2", 0x080000, 0x80000, CRC(35b75de6) SHA1(95c85c505ed0f3ddcc8c5d0d9e19128515840282) ) ROM_LOAD( "s.ch.ep3", 0x100000, 0x80000, CRC(faff2daa) SHA1(ea7376d20d5ddd50c7a4b0c86d7998bcc0fa1598) ) - ROM_REGION( 0x20000, "upd", 0 ) /* NEC D7759GC samples */ + ROM_REGION( 0x20000, "upd", 0 ) // NEC D7759GC samples ROM_LOAD( "m.s.g.0", 0x00000, 0x20000, CRC(01ed1dcd) SHA1(69b0b4ff2633ca4ca7b3a01830582c8b6df059e8) ) ROM_END /* Magic Number + 2-0250 PCB CPUs 1x H8/3337 32-bit Single-Chip Microcomputer - main (internal ROM not dumped) @@ -905,20 +924,21 @@ ROM_END */ ROM_START( mnumitg ) - ROM_REGION( 0x1000000, "maincpu", 0 ) /* all the program code is in here */ - ROM_LOAD( "mnum_hd64f3337cp16.mcu", 0x00000, 0x4000, NO_DUMP ) + ROM_REGION( 0xf000, "maincpu", ROMREGION_ERASE00 ) // all the program code is in here + ROM_LOAD( "mnum_hd64f3337cp16.mcu", 0x0000, 0xf000, NO_DUMP ) - ROM_REGION( 0x180000, "gfx1", 0 ) + ROM_REGION( 0x180000, "blitter", 0 ) ROM_LOAD( "mnum-ep1.bin", 0x000000, 0x80000, CRC(ee80b8d6) SHA1(49dd3323f4369759c38c168d172f7716a9132f98) ) ROM_LOAD( "mnum-ep2.bin", 0x080000, 0x80000, CRC(685cb1cf) SHA1(7815ec3dcbf2c78f85520e533d9cbf51a119255d) ) ROM_LOAD( "mnum-ep3.bin", 0x100000, 0x80000, CRC(ebebd71c) SHA1(98902e43c69d207aa7dbca23d10bbeb81272292f) ) - ROM_REGION( 0x20000, "upd", 0 ) /* NEC D7759GC samples */ + ROM_REGION( 0x20000, "upd", 0 ) // NEC D7759GC samples ROM_LOAD( "mnum-msg0.bin", 0x00000, 0x20000, CRC(b25e1c8a) SHA1(a211412c3354a9f1a9662445b4cc379dad27813b) ) ROM_END /* Magic Class (Ver 2.2) + 2-0273/A PCB CPUs 1x H8/3337 32-bit Single-Chip Microcomputer - main (internal ROM not dumped) @@ -952,15 +972,15 @@ ROM_END */ ROM_START( mclass ) - ROM_REGION( 0x1000000, "maincpu", 0 ) /* all the program code is in here */ - ROM_LOAD( "mclass_hd64f3337cp16.mcu", 0x00000, 0x4000, NO_DUMP ) + ROM_REGION( 0xf000, "maincpu", ROMREGION_ERASE00 ) // all the program code is in here + ROM_LOAD( "mclass_hd64f3337cp16.mcu", 0x0000, 0xf000, NO_DUMP ) - ROM_REGION( 0x180000, "gfx1", 0 ) + ROM_REGION( 0x180000, "blitter", 0 ) ROM_LOAD( "magicclass1.bin", 0x000000, 0x80000, CRC(12927480) SHA1(380e980cf5d869fbcba224d75c7eaee650465227) ) ROM_LOAD( "magicclass2.bin", 0x080000, 0x80000, CRC(b472dda6) SHA1(e23202157dfa6f1f76f9dc410ef7e1f12b5031bf) ) ROM_LOAD( "magicclass3.bin", 0x100000, 0x80000, CRC(b1bc38e4) SHA1(7dfa352535baae7d048ef4537f2d9ac72c46dedc) ) - ROM_REGION( 0x20000, "upd", 0 ) /* NEC D7759GC samples */ + ROM_REGION( 0x20000, "upd", 0 ) // NEC D7759GC samples ROM_LOAD( "magicclasssnd.bin", 0x00000, 0x20000, CRC(9dab99a6) SHA1(ce34056dd964be32359acd2e53a6101cb4d9ddff) ) ROM_END @@ -998,42 +1018,42 @@ ROM_END */ ROM_START( europass ) - ROM_REGION( 0x1000000, "maincpu", 0 ) /* all the program code is in here */ - ROM_LOAD( "europass_hd64f3337cp16.mcu", 0x00000, 0x4000, NO_DUMP ) + ROM_REGION( 0xf000, "maincpu", ROMREGION_ERASE00 ) // all the program code is in here + ROM_LOAD( "europass_hd64f3337cp16.mcu", 0x0000, 0xf000, NO_DUMP ) - ROM_REGION( 0x180000, "gfx1", 0 ) + ROM_REGION( 0x180000, "blitter", 0 ) ROM_LOAD( "europass1.bin", 0x000000, 0x80000, CRC(93c54f02) SHA1(b0371c70363b6b2097dc478320bdae0856211d2e) ) ROM_LOAD( "europass2.bin", 0x080000, 0x80000, CRC(62bcb3de) SHA1(fc35f534635340f5ae22ae838bc10605ae0b7a4b) ) ROM_LOAD( "europass3.bin", 0x100000, 0x80000, CRC(0f2b2c21) SHA1(c4706585e4176e4a5f5ce40046e6e14b93952816) ) - ROM_REGION( 0x20000, "upd", 0 ) /* NEC D7759GC samples */ + ROM_REGION( 0x20000, "upd", 0 ) // NEC D7759GC samples ROM_LOAD( "xninesnd.bin", 0x00000, 0x20000, CRC(9dab99a6) SHA1(ce34056dd964be32359acd2e53a6101cb4d9ddff) ) ROM_END ROM_START( thedrink ) - ROM_REGION( 0x1000000, "maincpu", 0 ) /* all the program code is in here */ - ROM_LOAD( "thedrink_hd64f3337cp16.mcu", 0x00000, 0x4000, NO_DUMP ) + ROM_REGION( 0xf000, "maincpu", ROMREGION_ERASE00 ) // all the program code is in here + ROM_LOAD( "thedrink_hd64f3337cp16.mcu", 0x0000, 0xf000, NO_DUMP ) - ROM_REGION( 0x200000, "gfx1", 0 ) + ROM_REGION( 0x200000, "blitter", 0 ) ROM_LOAD( "the-drink-ep1.bin", 0x000000, 0x80000, CRC(9d0f61ad) SHA1(8e45afdd7e31a830b62b3dc85e21e9bc024262ff) ) ROM_LOAD( "the-drink-ep2.bin", 0x080000, 0x80000, CRC(b21f349a) SHA1(c46b95af869a648a17e0dd8f0eb82d5e347289ab) ) ROM_LOAD( "the-drink-ep3.bin", 0x100000, 0x80000, CRC(bb1af614) SHA1(77496efc361b6fd2b4bac0304032ea44e47d1819) ) ROM_LOAD( "the-drink-ep4.bin", 0x180000, 0x80000, CRC(f02a6387) SHA1(59d2a20d4fa9c78ef49c9afe82939c0a882012cc) ) - ROM_REGION( 0x20000, "upd", 0 ) /* NEC D7759GC samples */ + ROM_REGION( 0x20000, "upd", 0 ) // NEC D7759GC samples ROM_LOAD( "the-drink-msg0.bin", 0x00000, 0x20000, CRC(5eefd405) SHA1(7b1d91181f5078c55cfa623d7e8fc5b4ebfff110) ) ROM_END ROM_START( unkh8gam ) - ROM_REGION( 0x1000000, "maincpu", 0 ) /* all the program code is in here */ - ROM_LOAD( "unkh8gam.mcu", 0x00000, 0x4000, NO_DUMP ) + ROM_REGION( 0xf000, "maincpu", ROMREGION_ERASE00 ) // all the program code is in here + ROM_LOAD( "unkh8gam.mcu", 0x0000, 0xf000, NO_DUMP ) - ROM_REGION( 0x180000, "gfx1", 0 ) + ROM_REGION( 0x180000, "blitter", 0 ) ROM_LOAD( "24.bin", 0x000000, 0x80000, CRC(240eb4bf) SHA1(f79a735ed290f84a44411127af3e16a514b62b6b) ) ROM_LOAD( "25.bin", 0x080000, 0x80000, CRC(c273c0ce) SHA1(8774cb101fccf1d97d66816df56dec8fa4e24ee6) ) ROM_LOAD( "26.bin", 0x100000, 0x80000, CRC(0293b9bb) SHA1(00794fab4d9deb2ca5ce352ac7ed7aedb59bec7b) ) - ROM_REGION( 0x20000, "upd", 0 ) /* NEC D7759GC samples */ + ROM_REGION( 0x20000, "upd", 0 ) // NEC D7759GC samples ROM_LOAD( "30.bin", 0x00000, 0x20000, CRC(72e56518) SHA1(7afdd6434beeea22673228c2417e4dee253a42b5) ) ROM_END @@ -1070,15 +1090,15 @@ ROM_END */ ROM_START( eurodsr ) - ROM_REGION( 0x1000000, "maincpu", 0 ) /* all the program code is in here */ - ROM_LOAD( "europass_hd64f3337cp16.mcu", 0x00000, 0x4000, NO_DUMP ) + ROM_REGION( 0xf000, "maincpu", ROMREGION_ERASE00 ) // all the program code is in here + ROM_LOAD( "europass_hd64f3337cp16.mcu", 0x0000, 0xf000, NO_DUMP ) - ROM_REGION( 0x180000, "gfx1", 0 ) + ROM_REGION( 0x180000, "blitter", 0 ) ROM_LOAD( "red.bin", 0x000000, 0x80000, CRC(a8e57e99) SHA1(0b7ce23ec7892733efff5e41fc7ea22eda04416b) ) ROM_LOAD( "green.bin", 0x080000, 0x80000, CRC(62ebc05f) SHA1(d59298241c14b459f00b9d36e819a00a2c075e96) ) ROM_LOAD( "blue.bin", 0x100000, 0x80000, CRC(14a9b936) SHA1(8892b1e0dbf4c756b0e16c766fa10c4f17da9fd2) ) - ROM_REGION( 0x20000, "upd", 0 ) /* NEC D7759GC samples */ + ROM_REGION( 0x20000, "upd", 0 ) // NEC D7759GC samples ROM_LOAD( "yellow.bin", 0x00000, 0x20000, CRC(04f44a53) SHA1(0b27d1fe1992d1769abec2078defc30896c36bcb) ) ROM_END @@ -1116,16 +1136,16 @@ ROM_END */ ROM_START( granfrat ) - ROM_REGION( 0x1000000, "maincpu", 0 ) /* all the program code is in here */ - ROM_LOAD( "granfrat_hd64f3337cp16.mcu", 0x00000, 0x4000, NO_DUMP ) + ROM_REGION( 0xf000, "maincpu", ROMREGION_ERASE00 ) // all the program code is in here + ROM_LOAD( "granfrat_hd64f3337cp16.mcu", 0x0000, 0xf000, NO_DUMP ) - ROM_REGION( 0x200000, "gfx1", 0 ) + ROM_REGION( 0x200000, "blitter", 0 ) ROM_LOAD( "gra.frat.ep1.u4", 0x000000, 0x80000, CRC(e200dd23) SHA1(ffe9f6517a0b2de0863cefaf9696ca256ae8b555) ) ROM_LOAD( "gra.frat.ep2.u5", 0x080000, 0x80000, CRC(1b4861c2) SHA1(9b70d8bd8d682b754be4a90b01eea7bdf9d400e1) ) ROM_LOAD( "gra.frat.ep3.u6", 0x100000, 0x80000, CRC(37d63df2) SHA1(bcb5271d7c966087b3059c1c7cbefa68427e7e07) ) ROM_LOAD( "gra.frat.ep4.u7", 0x180000, 0x80000, CRC(a71a39a2) SHA1(2f53f30c415d2c6acf8201090b4cfab4b3e0f4d0) ) - ROM_REGION( 0x40000, "upd", 0 ) /* NEC D7759GC samples */ + ROM_REGION( 0x40000, "upd", 0 ) // NEC D7759GC samples ROM_LOAD( "gra.frat.msg0.u8", 0x00000, 0x40000, CRC(1c58d0e8) SHA1(69c125775f7b9a2e4db6aa942d8a7b099ea19c36) ) ROM_END @@ -1164,19 +1184,78 @@ PCB is labeled: "BACCHI 1883 - 21/02/02 - Rip[] RiProg[X]" on component side */ ROM_START( toptcash ) - ROM_REGION( 0x1000000, "maincpu", 0 ) /* all the program code is in here */ - ROM_LOAD( "top t. cash_hd64f3337cp16.mcu", 0x00000, 0x4000, NO_DUMP ) + ROM_REGION( 0xf000, "maincpu", ROMREGION_ERASE00 ) // all the program code is in here + ROM_LOAD( "top t. cash_hd64f3337cp16.mcu", 0x0000, 0xf000, NO_DUMP ) - ROM_REGION( 0x200000, "gfx1", 0 ) + ROM_REGION( 0x200000, "blitter", 0 ) ROM_LOAD( "top t. cash ep1.bin", 0x000000, 0x80000, CRC(95f449e1) SHA1(97eecb438e6896085247b53bf7947b2b0054768f) ) ROM_LOAD( "top t. cash ep2.bin", 0x080000, 0x80000, CRC(a89a207d) SHA1(deac27e5dba1ae8e12db05d8383d9d961adcbcd9) ) ROM_LOAD( "top t. cash ep3.bin", 0x100000, 0x80000, CRC(ccf13921) SHA1(4bc7ff81aae1034549cd1a406e17ed097f2c2b47) ) ROM_LOAD( "top t. cash ep4.bin", 0x180000, 0x80000, CRC(8a229c4d) SHA1(9188d74595fea900fba4e176beed23cbbb5d89c4) ) - ROM_REGION( 0x80000, "upd", 0 ) /* NEC D7759GC samples */ + ROM_REGION( 0x80000, "upd", 0 ) // NEC D7759GC samples ROM_LOAD( "top t. cash msg0.bin", 0x00000, 0x80000, CRC(babe87c7) SHA1(7ed226224c03a094844e838aebaead67e9ae9a2d) ) // 1xxxxxxxxxxxxxxxxxx = 0x00 ROM_END + +ROM_START( 7gold ) // 2-235 PCB + ROM_REGION( 0xf000, "maincpu", ROMREGION_ERASE00 ) // all the program code is in here + ROM_LOAD( "7gold_hd64f3337cp16.mcu", 0x0000, 0xf000, NO_DUMP ) + + ROM_REGION( 0x100000, "blitter", 0 ) + ROM_LOAD( "3.bin", 0x000000, 0x80000, CRC(cbfb424f) SHA1(b3382bca91289ed34df3d94b4b549a5a7b5c0b00) ) + ROM_LOAD( "4.bin", 0x080000, 0x80000, CRC(1b9fc0b7) SHA1(2894d9a31900919ff5b7a77058eb6b90243b7b17) ) + // only 2 GFX ROMs present + + ROM_REGION( 0x20000, "upd", 0 ) // NEC D7759GC samples + ROM_LOAD( "0.bin", 0x00000, 0x20000, CRC(d0309e6d) SHA1(c7dfa75cc4575ac5dc810f9927345a89c31a7a59) ) +ROM_END + + +ROM_START( ch3001r ) // 2-276-B PCB + ROM_REGION( 0xf000, "maincpu", ROMREGION_ERASE00 ) // all the program code is in here + ROM_LOAD( "ch3001r_hd64f3337cp16.mcu", 0x0000, 0xf000, NO_DUMP ) + + ROM_REGION( 0x200000, "blitter", 0 ) + ROM_LOAD( "ch_3001r_ep.1.bin", 0x000000, 0x80000, CRC(603c8cce) SHA1(c6cef80d4822d0decee8e33b69ab67c4bf181cd3) ) + ROM_LOAD( "ch_3001r_ep.2.bin", 0x080000, 0x80000, CRC(919eb3ba) SHA1(7ca6f7fdb653e34d0d52e3c441ae6a53292233f0) ) + ROM_LOAD( "ch_3001r_ep.3.bin", 0x100000, 0x80000, CRC(d8bd8e4f) SHA1(2d3fb6b7a1e8ab124566f9cf2490c759f9461974) ) + ROM_LOAD( "ch_3001r_ep.4.bin", 0x180000, 0x80000, CRC(9d5caef0) SHA1(f93fd729b9d395c0323de9b438a6c39efc7d92a5) ) // 1xxxxxxxxxxxxxxxxxx = 0xFF + + ROM_REGION( 0x20000, "upd", 0 ) // NEC D7759GC samples + ROM_LOAD( "ch_3001r_msg.0.bin", 0x00000, 0x20000, CRC(3e7ce516) SHA1(cb7acf1cb7fce54b3cf0722207b31845d18cf5ac) ) +ROM_END + + +ROM_START( zupapah8 ) // 2-276-B PCB + ROM_REGION( 0xf000, "maincpu", ROMREGION_ERASE00 ) // all the program code is in here + ROM_LOAD( "zupapah8_hd64f3337cp16.mcu", 0x0000, 0xf000, NO_DUMP ) + + ROM_REGION( 0x200000, "blitter", 0 ) // very similar to the te0144 set + ROM_LOAD( "1.bin", 0x000000, 0x80000, CRC(b2a896c3) SHA1(b2fa8f945fae7d38c7500a989207a8f1afe67a18) ) + ROM_LOAD( "2.bin", 0x080000, 0x80000, CRC(b02fd07e) SHA1(415a834cd47fdcb180b2a5fa267c1566b9ca0b61) ) + ROM_LOAD( "3.bin", 0x100000, 0x80000, CRC(1984427e) SHA1(0200360f083019235f464ed9b96bf7f78a07df37) ) + ROM_LOAD( "4.bin", 0x180000, 0x80000, CRC(ac513c2d) SHA1(aedc29b12157f02a014359ceae71a2a7892afa72) ) + + ROM_REGION( 0x80000, "upd", 0 ) // NEC D7759GC samples + ROM_LOAD( "0.bin", 0x00000, 0x80000, CRC(34f64bb1) SHA1(196697f6b707e98b0896ba9d0ea2c7f0779e8eed) ) +ROM_END + + +ROM_START( pairsh8) // PCB without markings + ROM_REGION( 0xf000, "maincpu", ROMREGION_ERASE00 ) // all the program code is in here + ROM_LOAD( "pairsh8_hd64f3337cp16.mcu", 0x0000, 0xf000, NO_DUMP ) + + ROM_REGION( 0x200000, "blitter", 0 ) + ROM_LOAD( "pairs_ep.1.bin", 0x000000, 0x80000, CRC(649bb6c5) SHA1(b6191c8c26873a4f29457f1405dbfe4e6fbfc00d) ) + ROM_LOAD( "pairs_ep.2.bin", 0x080000, 0x80000, CRC(f8b37174) SHA1(900faec54f6d85b806aebc51cc32df1777e0796c) ) + ROM_LOAD( "pairs_ep.3.bin", 0x100000, 0x80000, CRC(ac2ee8d0) SHA1(c1dad512ff7fa33a5462f859c3852211d0a79260) ) + ROM_LOAD( "pairs_ep.4.bin", 0x180000, 0x80000, CRC(687b5745) SHA1(8b97fbd496f6603a15a3fd2db0bfa252a326a438) ) + + ROM_REGION( 0x80000, "upd", 0 ) // NEC D7759GC samples + ROM_LOAD( "pairs_msg.0.bin", 0x00000, 0x80000, CRC(035cecfa) SHA1(60cc3ead49668f208de3300ab4c056f0fde287f1) ) +ROM_END + } // anonymous namespace @@ -1184,27 +1263,32 @@ ROM_END * Game Drivers * *************************/ -// YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS -GAME( 1999, ntcash, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "", "NtCash", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) -GAME( 1999, wizard, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "A.A.", "Wizard (Ver 1.0)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) -GAME( 200?, trstar2k, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "A.M.", "Triple Star 2000", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) -GAME( 2001, laser2k1, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "", "Laser 2001 (Ver 1.2)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) -GAME( 2001, mdrink, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "", "Magic Drink (Ver 1.2)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) -GAME( 2001, te0144, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "", "Puzzle Bobble (Italian gambling game)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) -GAME( 200?, btorneo, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "", "Bubble Torneo", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) -GAME( 200?, cmagica, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "", "Carta Magica (Ver 1.8)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) -GAME( 200?, mcard_h8, cmagica, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "", "Magic Card (H8, English)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) -GAME( 200?, smcard, cmagica, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "", "Super Magic Card", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) -GAME( 200?, millsun, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "", "Millennium Sun", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) -GAME( 200?, sspac2k1, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "", "Super Space 2001", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) -GAME( 200?, elvis, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "", "Elvis?", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) -GAME( 200?, sstar, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "", "Super Star", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) -GAME( 2001, pirati, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "Cin", "Pirati", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +// YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS +GAME( 1999, ntcash, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "", "NtCash (set 1)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 1999, ntcasha, ntcash, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "", "NtCash (set 2)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 1999, wizard, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "A.A.", "Wizard (Ver 1.0)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 200?, trstar2k, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "A.M.", "Triple Star 2000", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 2001, laser2k1, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "", "Laser 2001 (Ver 1.2)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 2001, mdrink, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "", "Magic Drink (Ver 1.2)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 2001, te0144, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "", "Puzzle Bobble (Italian gambling game)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 200?, btorneo, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "", "Bubble Torneo", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 200?, cmagica, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "", "Carta Magica (Ver 1.8)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 200?, mcard_h8, cmagica, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "", "Magic Card (H8, English)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 200?, smcard, cmagica, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "", "Super Magic Card", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 200?, millsun, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "", "Millennium Sun", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 200?, sspac2k1, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "", "Super Space 2001", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 200?, elvis, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "", "Elvis?", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 200?, sstar, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "", "Super Star", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 2001, pirati, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "Cin", "Pirati", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) GAME( 200?, mnumitg, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "", "Magic Number (Italian gambling game, Ver 1.5)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) -GAME( 200?, mclass, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "", "Magic Class (Ver 2.2)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) -GAME( 200?, europass, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "", "Euro Pass (Ver 1.1)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) -GAME( 200?, thedrink, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "", "The Drink", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) -GAME( 200?, unkh8gam, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "", "unknown H8 Italian gambling game", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) -GAME( 200?, eurodsr, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "", "Euro Double Star Record (ver.1.2)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) -GAME( 200?, granfrat, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "", "Grande Fratello (Ver. 1.7)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) -GAME( 2002, toptcash, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "VideoIdea", "Top T. Cash", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 200?, mclass, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "", "Magic Class (Ver 2.2)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 200?, europass, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "", "Euro Pass (Ver 1.1)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 200?, thedrink, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "", "The Drink", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 200?, unkh8gam, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "", "unknown H8 Italian gambling game", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 200?, eurodsr, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "", "Euro Double Star Record (ver.1.2)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 200?, granfrat, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "", "Grande Fratello (Ver. 1.7)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 2002, toptcash, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "VideoIdea", "Top T. Cash", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 200?, 7gold, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "", "7 Gold", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 200?, ch3001r, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "", "Champion 3001 Regular", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 200?, zupapah8, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "", "Zupapa (Italian gambling game)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 200?, pairsh8, 0, itgambl2, itgambl2, itgambl2_state, empty_init, ROT0, "", "Pairs (Italian gambling game)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) diff --git a/src/mame/misc/itgamble.cpp b/src/mame/misc/itgamble.cpp index 5aa2df24736cd..d8d7ccbeae1f4 100644 --- a/src/mame/misc/itgamble.cpp +++ b/src/mame/misc/itgamble.cpp @@ -1,5 +1,6 @@ // license:BSD-3-Clause -// copyright-holders:David Haywood +// copyright-holders: David Haywood + /****************************************************************** Nazionale Elettronica + others (mostly Italian) Gambling games @@ -117,8 +118,10 @@ Known games on this hardware revision are: *******************************************************************/ #include "emu.h" + #include "cpu/h8/h83048.h" #include "sound/okim6295.h" + #include "emupal.h" #include "screen.h" #include "speaker.h" @@ -135,21 +138,20 @@ class itgamble_state : public driver_device m_palette(*this, "palette") { } - void mnumber(machine_config &config); - void itgamble(machine_config &config); + void mnumber(machine_config &config) ATTR_COLD; + void itgamble(machine_config &config) ATTR_COLD; -private: - uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - - void itgamble_map(address_map &map) ATTR_COLD; +protected: + virtual void machine_reset() override ATTR_COLD; + virtual void video_start() override ATTR_COLD; - // devices +private: required_device m_maincpu; required_device m_palette; - // driver_device overrides - virtual void machine_reset() override ATTR_COLD; - virtual void video_start() override ATTR_COLD; + uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + + void itgamble_map(address_map &map) ATTR_COLD; }; @@ -174,8 +176,7 @@ uint32_t itgamble_state::screen_update(screen_device &screen, bitmap_ind16 &bitm void itgamble_state::itgamble_map(address_map &map) { - map.global_mask(0xffffff); - map(0x000000, 0xffffff).rom(); + map(0x000000, 0x01ffff).rom(); } @@ -236,28 +237,12 @@ static INPUT_PORTS_START( itgamble ) INPUT_PORTS_END -/************************* -* Graphics Layouts * -*************************/ - -static const gfx_layout gfxlayout_8x8x8 = -{ - 8,8, - RGN_FRAC(1,1), - 8, - { 0, 1, 2, 3, 4, 5, 6, 7 }, - { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, - { 0*64, 1*64, 2*64, 3*64, 4*64, 5*64, 6*64, 7*64 }, - 8*64 -}; - - /****************************** * Graphics Decode Information * ******************************/ static GFXDECODE_START( gfx_itgamble ) - GFXDECODE_ENTRY( "gfx1", 0, gfxlayout_8x8x8, 0, 16 ) + GFXDECODE_ENTRY( "tiles", 0, gfx_8x8x8_raw, 0, 16 ) GFXDECODE_END @@ -267,7 +252,7 @@ GFXDECODE_END void itgamble_state::machine_reset() { - /* stop the CPU, we have no code for it anyway */ + // stop the CPU, we have no code for it anyway m_maincpu->set_input_line(INPUT_LINE_HALT, ASSERT_LINE); } @@ -277,11 +262,11 @@ void itgamble_state::machine_reset() void itgamble_state::itgamble(machine_config &config) { - /* basic machine hardware */ - H83048(config, m_maincpu, 30_MHz_XTAL / 2 ); + // basic machine hardware + H83048(config, m_maincpu, 30_MHz_XTAL / 2); m_maincpu->set_addrmap(AS_PROGRAM, &itgamble_state::itgamble_map); - /* video hardware */ + // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(60); screen.set_vblank_time(ATTOSECONDS_IN_USEC(0)); @@ -293,9 +278,9 @@ void itgamble_state::itgamble(machine_config &config) GFXDECODE(config, "gfxdecode", m_palette, gfx_itgamble); PALETTE(config, m_palette).set_entries(0x200); - /* sound hardware */ + // sound hardware SPEAKER(config, "mono").front_center(); - okim6295_device &oki(OKIM6295(config, "oki", 1_MHz_XTAL, okim6295_device::PIN7_HIGH)); /* 1MHz resonator */ + okim6295_device &oki(OKIM6295(config, "oki", 1_MHz_XTAL, okim6295_device::PIN7_HIGH)); // 1MHz resonator oki.add_route(ALL_OUTPUTS, "mono", 1.0); } @@ -303,9 +288,7 @@ void itgamble_state::itgamble(machine_config &config) void itgamble_state::mnumber(machine_config &config) { itgamble(config); - m_maincpu->set_clock(24_MHz_XTAL / 2); /* probably the wrong CPU */ - - subdevice("oki")->set_clock(16_MHz_XTAL / 16); /* clock frequency & pin 7 not verified */ + m_maincpu->set_clock(16_MHz_XTAL); } @@ -319,14 +302,14 @@ PCB is marked: "H83048 bottom" on solder side PCB is labeled: "BOOK THEATER Vers. 1.2" on component side */ ROM_START( bookthr ) - ROM_REGION( 0x1000000, "maincpu", 0 ) - ROM_LOAD( "bookthr_ver1.2_hd64f3048f16.mcu", 0x00000, 0x4000, NO_DUMP ) + ROM_REGION( 0x20000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD( "bookthr_ver1.2_hd64f3048f16.mcu", 0x00000, 0x20000, NO_DUMP ) - ROM_REGION( 0x100000, "gfx1", 0 ) //bigger than 8bpps? + ROM_REGION( 0x100000, "tiles", 0 ) //bigger than 8bpps? ROM_LOAD( "2.ic18", 0x000000, 0x80000, CRC(39433a74) SHA1(088944bfb43b4f239f22d0d2213efd19cea7db30) ) ROM_LOAD( "3.ic17", 0x080000, 0x80000, CRC(893abdcc) SHA1(4dd28fd46bec8be5549d679d31c771888fcb1286) ) - ROM_REGION( 0x40000, "oki", 0 ) /* M6295 samples */ + ROM_REGION( 0x40000, "oki", 0 ) // M6295 samples ROM_LOAD( "1.ic25", 0x00000, 0x40000, CRC(4fe79e43) SHA1(7c154cb00e9b64fbdcc218280f2183b816cef20b) ) //same as Abacus ROM_END @@ -338,14 +321,14 @@ PCB is labeled: "Capitan Uncino Vers. 1.3" and " PASSED 12/04/00" on component s PCB is labeled Ver 1.3, while EPROMs are labeled Ver 1.2 */ ROM_START( capunc ) - ROM_REGION( 0x1000000, "maincpu", 0 ) - ROM_LOAD( "capunc.ver1.2.mcu", 0x00000, 0x4000, NO_DUMP ) + ROM_REGION( 0x20000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD( "capunc.ver1.2.mcu", 0x00000, 0x20000, NO_DUMP ) - ROM_REGION( 0x100000, "gfx1", 0 ) + ROM_REGION( 0x100000, "tiles", 0 ) ROM_LOAD( "2.ver.1.2.ic18", 0x000000, 0x80000, CRC(5030f7eb) SHA1(106b61c84e3647b8d68d6c30ee7e63ec2df1f5fd) ) ROM_LOAD( "3.ver.1.2.ic17", 0x080000, 0x80000, CRC(2b50e312) SHA1(dc901540a5e1a25fe6e7deb58b0fe01f116aaf63) ) - ROM_REGION( 0x40000, "oki", 0 ) /* M6295 samples */ + ROM_REGION( 0x40000, "oki", 0 ) // M6295 samples ROM_LOAD( "1.ic25", 0x00000, 0x40000, CRC(4fe79e43) SHA1(7c154cb00e9b64fbdcc218280f2183b816cef20b) ) ROM_END @@ -355,14 +338,14 @@ PCB is marked: "H83048 bottom" on solder side PCB is labeled: "Capitani Coraggiosi Vers. 1.3" and "PASSED 02/2001" on component side */ ROM_START( capcor ) - ROM_REGION( 0x1000000, "maincpu", 0 ) - ROM_LOAD( "capcor.ver1.3.mcu", 0x00000, 0x4000, NO_DUMP ) + ROM_REGION( 0x20000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD( "capcor.ver1.3.mcu", 0x00000, 0x20000, NO_DUMP ) - ROM_REGION( 0x100000, "gfx1", 0 ) + ROM_REGION( 0x100000, "tiles", 0 ) ROM_LOAD( "2.ic18", 0x000000, 0x80000, CRC(342bea85) SHA1(885080a9b55d64f9a93e3d5e31e6b13f272bdb93) ) ROM_LOAD( "3.ic17", 0x080000, 0x80000, CRC(ac530eff) SHA1(7c3a6e322311a1cd93801639a0498d5947fb14f2) ) - ROM_REGION( 0x40000, "oki", 0 ) /* M6295 samples */ + ROM_REGION( 0x40000, "oki", 0 ) // M6295 samples ROM_LOAD( "1.ic25", 0x00000, 0x40000, CRC(4fe79e43) SHA1(7c154cb00e9b64fbdcc218280f2183b816cef20b) ) ROM_END @@ -372,14 +355,14 @@ PCB is marked: "H83048 bottom" on solder side PCB is labeled: "Bowling Road Ver. 1.5" on component side */ ROM_START( bowlroad ) - ROM_REGION( 0x1000000, "maincpu", 0 ) - ROM_LOAD( "bowlroad_ver1.5_hd64f3048f16.mcu", 0x00000, 0x4000, NO_DUMP ) + ROM_REGION( 0x20000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD( "bowlroad_ver1.5_hd64f3048f16.mcu", 0x00000, 0x20000, NO_DUMP ) - ROM_REGION( 0x100000, "gfx1", 0 ) //bigger than 8bpps? + ROM_REGION( 0x100000, "tiles", 0 ) //bigger than 8bpps? ROM_LOAD( "bowling road 2.ic18", 0x000000, 0x80000, CRC(bc389c0a) SHA1(26f29820cce7b984c212a44842551b2960d371ae) ) ROM_LOAD( "bowling road 3.ic17", 0x080000, 0x80000, CRC(8a306a4c) SHA1(d94e2c266fb80343028da3dabe25a35b933d9e8e) ) - ROM_REGION( 0x40000, "oki", 0 ) /* M6295 samples */ + ROM_REGION( 0x40000, "oki", 0 ) // M6295 samples ROM_LOAD( "1.ic25", 0x00000, 0x20000, CRC(e6a0854b) SHA1(394e01bb24abd1e0d2c447b4d620fc5d02257d8a) ) ROM_END @@ -389,16 +372,16 @@ PCB is marked: "H83048 bottom" on solder side PCB is labeled: "EUROPA 2002 Versione 2_0" and "Non rimuovere PASSED 11/2001 Garanzia 6 MESI" on component side */ ROM_START( euro2k2 ) - ROM_REGION( 0x1000000, "maincpu", 0 ) - ROM_LOAD( "euro2k2_ver2.0_hd64f3048f16.mcu", 0x00000, 0x4000, NO_DUMP ) + ROM_REGION( 0x20000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD( "euro2k2_ver2.0_hd64f3048f16.mcu", 0x00000, 0x20000, NO_DUMP ) - ROM_REGION( 0x180000, "gfx1", 0 ) + ROM_REGION( 0x180000, "tiles", 0 ) ROM_LOAD( "4a.ic18", 0x000000, 0x80000, CRC(5decae2d) SHA1(d918aad0e2a1249b18677833f743c92fb678050a) ) ROM_LOAD( "5a.ic17", 0x080000, 0x80000, CRC(8f1bbbf3) SHA1(5efcf77674f8737fc1b98881acebacb26b10adc1) ) ROM_LOAD( "2a.ic20", 0x100000, 0x40000, CRC(f9bffb07) SHA1(efba175189d99a4548739a72f8a1f03c2782a3d0) ) ROM_LOAD( "3a.ic19", 0x140000, 0x40000, CRC(8b29cd56) SHA1(8a09e307271bceef6e9f863153d0f7a9bc6dc6bd) ) - ROM_REGION( 0x40000, "oki", 0 ) /* M6295 samples */ + ROM_REGION( 0x40000, "oki", 0 ) // M6295 samples ROM_LOAD( "1.ic25", 0x00000, 0x40000, CRC(b9b1aff0) SHA1(35622d7d099a10e5c6bcae152fded1f50692f740) ) ROM_END @@ -408,16 +391,16 @@ PCB is marked: "H83048 bottom" on solder side PCB is labeled: "EUROPA 2002 Versione 2_0" and "PASSED 10/2001" on component side */ ROM_START( euro2k2a ) - ROM_REGION( 0x1000000, "maincpu", 0 ) - ROM_LOAD( "euro2k2a_ver2.0_hd64f3048f16.mcu", 0x00000, 0x4000, NO_DUMP ) + ROM_REGION( 0x20000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD( "euro2k2a_ver2.0_hd64f3048f16.mcu", 0x00000, 0x20000, NO_DUMP ) - ROM_REGION( 0x1c0000, "gfx1", 0 ) + ROM_REGION( 0x1c0000, "tiles", 0 ) ROM_LOAD( "4a.ic18", 0x000000, 0x80000, CRC(5decae2d) SHA1(d918aad0e2a1249b18677833f743c92fb678050a) ) ROM_LOAD( "5a.ic17", 0x080000, 0x80000, CRC(8f1bbbf3) SHA1(5efcf77674f8737fc1b98881acebacb26b10adc1) ) ROM_LOAD( "2a.ic20", 0x100000, 0x40000, CRC(f9bffb07) SHA1(efba175189d99a4548739a72f8a1f03c2782a3d0) ) - ROM_LOAD( "3a.ic19", 0x140000, 0x80000, CRC(56c8a73d) SHA1(49b44e5604cd8675d8f9770e5fb68dad4394e11d) ) /* identical halves */ // sldh + ROM_LOAD( "3a.ic19", 0x140000, 0x80000, CRC(56c8a73d) SHA1(49b44e5604cd8675d8f9770e5fb68dad4394e11d) ) // identical halves, sldh - ROM_REGION( 0x40000, "oki", 0 ) /* M6295 samples */ + ROM_REGION( 0x40000, "oki", 0 ) // M6295 samples ROM_LOAD( "1.ic25", 0x00000, 0x40000, CRC(4fe79e43) SHA1(7c154cb00e9b64fbdcc218280f2183b816cef20b) ) // sldh ROM_END @@ -428,14 +411,14 @@ PCB is labeled: "LABYRINTH Versione 1.5" on component side */ ROM_START( labrinth ) - ROM_REGION( 0x1000000, "maincpu", 0 ) - ROM_LOAD( "labyrinth_ver1.5_hd64f3048f16.mcu", 0x00000, 0x4000, NO_DUMP ) + ROM_REGION( 0x20000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD( "labyrinth_ver1.5_hd64f3048f16.mcu", 0x00000, 0x20000, NO_DUMP ) - ROM_REGION( 0x100000, "gfx1", 0 ) + ROM_REGION( 0x100000, "tiles", 0 ) ROM_LOAD( "labyrinth_2.ic18", 0x000000, 0x80000, CRC(2e29606c) SHA1(29a47b05556278cdea6b35414abed5b26dcfff9b) ) ROM_LOAD( "labyrinth_3.ic17", 0x080000, 0x80000, CRC(8b5e7556) SHA1(3e8e3b2724930349e3ca121fb5f61fac0dac9fa1) ) - ROM_REGION( 0x40000, "oki", 0 ) /* M6295 samples */ + ROM_REGION( 0x40000, "oki", 0 ) // M6295 samples ROM_LOAD( "1.ic25", 0x00000, 0x40000, CRC(4fe79e43) SHA1(7c154cb00e9b64fbdcc218280f2183b816cef20b) ) ROM_END @@ -445,14 +428,14 @@ PCB is marked: "H83048 bottom" on solder side PCB is labeled: "LA PERLA NERA Versione 2.0" and "Non Rimuovere PASSED 01/2002 garanzia 6 MESI" on component side */ ROM_START( laperla ) - ROM_REGION( 0x1000000, "maincpu", 0 ) - ROM_LOAD( "laperla_ver2.0_hd64f3048f16.mcu", 0x00000, 0x4000, NO_DUMP ) + ROM_REGION( 0x20000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD( "laperla_ver2.0_hd64f3048f16.mcu", 0x00000, 0x20000, NO_DUMP ) - ROM_REGION( 0x100000, "gfx1", 0 ) + ROM_REGION( 0x100000, "tiles", 0 ) ROM_LOAD( "2jolly.ic18", 0x000000, 0x80000, CRC(7bf3d5f2) SHA1(f3a51dd642358a20f6324f28fdf458e8ceaca7a1) ) ROM_LOAD( "3jolly.ic17", 0x080000, 0x80000, CRC(c3a8d9a0) SHA1(cc95c56ebc6137e11c82ed17be7c9f83ed7b6cfc) ) - ROM_REGION( 0x40000, "oki", 0 ) /* M6295 samples */ + ROM_REGION( 0x40000, "oki", 0 ) // M6295 samples ROM_LOAD( "1.ic25", 0x00000, 0x40000, CRC(4fe79e43) SHA1(7c154cb00e9b64fbdcc218280f2183b816cef20b) ) ROM_END @@ -463,14 +446,14 @@ PCB is marked: "H83048 bottom" on solder side PCB is labeled: "LA PERLA NERA GOLD Versione 2.0" and "Non Rimuovere PASSED 11/2001 garanzia 6 MESI" on component side */ ROM_START( laperlag ) - ROM_REGION( 0x1000000, "maincpu", 0 ) - ROM_LOAD( "laperlag_ver2.0_hd64f3048f16.mcu", 0x00000, 0x4000, NO_DUMP ) + ROM_REGION( 0x20000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD( "laperlag_ver2.0_hd64f3048f16.mcu", 0x00000, 0x20000, NO_DUMP ) - ROM_REGION( 0x100000, "gfx1", 0 ) + ROM_REGION( 0x100000, "tiles", 0 ) ROM_LOAD( "ic18-laperlaneragold2.bin", 0x000000, 0x80000, CRC(ae37de44) SHA1(089f97678fa39aee1885d7c63c4bc7c88e7fe553) ) ROM_LOAD( "ic17-laperlaneragold3.bin", 0x080000, 0x80000, CRC(86da6d11) SHA1(e6b7f9ccbf2e91a60fdf38067ec7ac7e73dea8cd) ) - ROM_REGION( 0x40000, "oki", 0 ) /* M6295 samples */ + ROM_REGION( 0x40000, "oki", 0 ) // M6295 samples ROM_LOAD( "ic25-uno.bin", 0x00000, 0x20000, CRC(e6a0854b) SHA1(394e01bb24abd1e0d2c447b4d620fc5d02257d8a) ) ROM_END @@ -481,16 +464,16 @@ PCB is marked: "H83048 bottom" on solder side PCB is labeled: "PIN UPS VER.1.0 REV.A" on component side */ ROM_START( pinups ) - ROM_REGION( 0x1000000, "maincpu", 0 ) - ROM_LOAD( "pinups_ver1.0_rev_a_hd64f3048f16.mcu", 0x00000, 0x4000, NO_DUMP ) + ROM_REGION( 0x20000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD( "pinups_ver1.0_rev_a_hd64f3048f16.mcu", 0x00000, 0x20000, NO_DUMP ) - ROM_REGION( 0x200000, "gfx1", 0 ) + ROM_REGION( 0x200000, "tiles", 0 ) ROM_LOAD( "pin_ups_4.ic18", 0x000000, 0x80000, CRC(e1996e31) SHA1(5da10a0d6443410558ec1a2cfbae62ac83d85c78) ) // FIXED BITS (xxxxxxx0) ROM_LOAD( "pin_ups_5.ic17", 0x080000, 0x80000, CRC(1ac8bdb0) SHA1(9475135a13ffc7c4855b7749debbaad7800a3239) ) ROM_LOAD( "pin_ups_2-a.ic20", 0x100000, 0x80000, CRC(f106709d) SHA1(cd925059480dcda031d770db7e955f053aebb6fa) ) ROM_LOAD( "pin_ups_3-a.ic19", 0x180000, 0x80000, CRC(e2e13670) SHA1(96b6a90d8f841990f9e66ebc3b26146f8f6ee5e8) ) - ROM_REGION( 0x40000, "oki", 0 ) /* M6295 samples */ + ROM_REGION( 0x40000, "oki", 0 ) // M6295 samples ROM_LOAD( "1-a.ic25", 0x00000, 0x40000, CRC(55b73599) SHA1(20a19668392267a1cf5e148f8a9bf5970852698c) ) // 1ST AND 2ND HALF IDENTICAL, if split matches euro2k2s and uforobot ROM_END @@ -502,14 +485,14 @@ PCB is labeled: "WORLD CUP Versione 1.5" on component side It is the same game as World Cup (Ver 1.4) but with less RAM */ ROM_START( wcup ) - ROM_REGION( 0x1000000, "maincpu", 0 ) - ROM_LOAD( "wcup_ver1.5_hd64f3048f16.mcu", 0x00000, 0x4000, NO_DUMP ) + ROM_REGION( 0x20000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD( "wcup_ver1.5_hd64f3048f16.mcu", 0x00000, 0x20000, NO_DUMP ) - ROM_REGION( 0x100000, "gfx1", 0 ) //bigger than 8bpps? + ROM_REGION( 0x100000, "tiles", 0 ) //bigger than 8bpps? ROM_LOAD( "world cup 2.ic18", 0x000000, 0x80000, CRC(4524445b) SHA1(50ec31ac9e4cd807fd4bf3d667644ed662681782) ) ROM_LOAD( "world cup 3.ic17", 0x080000, 0x80000, CRC(0df1af40) SHA1(f5050533e5a9cf2113e5aeffaeca23c7572cafae) ) - ROM_REGION( 0x40000, "oki", 0 ) /* M6295 samples */ + ROM_REGION( 0x40000, "oki", 0 ) // M6295 samples ROM_LOAD( "1.ic25", 0x00000, 0x20000, CRC(e6a0854b) SHA1(394e01bb24abd1e0d2c447b4d620fc5d02257d8a) ) // same as laperlag ROM_END @@ -519,14 +502,14 @@ PCB is marked: "bottom" and "H83048 Rev. 1.1" on solder side PCB is labeled: "ABACUS Vers. 1.0" and "FR 24.08.01" on component side */ ROM_START( abacus ) - ROM_REGION( 0x1000000, "maincpu", 0 ) - ROM_LOAD( "abacus_ver1.0_hd64f3048f16.mcu", 0x00000, 0x4000, NO_DUMP ) + ROM_REGION( 0x20000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD( "abacus_ver1.0_hd64f3048f16.mcu", 0x00000, 0x20000, NO_DUMP ) - ROM_REGION( 0x100000, "gfx1", 0 ) //bigger than 8bpps? + ROM_REGION( 0x100000, "tiles", 0 ) //bigger than 8bpps? ROM_LOAD( "abacus2.ic18", 0x000000, 0x80000, CRC(9884ee09) SHA1(85875dbcd6821c8173457df0216145b4208d5c06) ) ROM_LOAD( "abacus3.ic17", 0x080000, 0x80000, CRC(ec6473c4) SHA1(49980b94ccf77fbfdaa151fccaeb3c2ddad3c119) ) - ROM_REGION( 0x40000, "oki", 0 ) /* M6295 samples */ + ROM_REGION( 0x40000, "oki", 0 ) // M6295 samples ROM_LOAD( "1.ic25", 0x00000, 0x40000, CRC(4fe79e43) SHA1(7c154cb00e9b64fbdcc218280f2183b816cef20b) ) ROM_END @@ -536,14 +519,14 @@ PCB is marked: "bottom" and "H83048 Rev. 1.1" on solder side PCB is labeled: "Bowling Road Ver. 1.4" and "Non Rimuovere PASSED 11/2001 Garanzia 6 MESI" on component side */ ROM_START( bowlroad14 ) - ROM_REGION( 0x1000000, "maincpu", 0 ) - ROM_LOAD( "bowlroad_ver1.5_hd64f3048f16.mcu", 0x00000, 0x4000, NO_DUMP ) + ROM_REGION( 0x20000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD( "bowlroad_ver1.5_hd64f3048f16.mcu", 0x00000, 0x20000, NO_DUMP ) - ROM_REGION( 0x100000, "gfx1", 0 ) //bigger than 8bpps? + ROM_REGION( 0x100000, "tiles", 0 ) //bigger than 8bpps? ROM_LOAD( "bowling road 2.ic18", 0x000000, 0x80000, CRC(ee3756ea) SHA1(9f77f4ebb9f5991ee9aa54a0f7e5d1159a0e53ce) ) // sldh ROM_LOAD( "bowling road 3.ic17", 0x080000, 0x80000, CRC(fec5ad64) SHA1(b0178313fac8e2f118a8c3752ee55456a638e015) ) // sldh - ROM_REGION( 0x40000, "oki", 0 ) /* M6295 samples */ + ROM_REGION( 0x40000, "oki", 0 ) // M6295 samples ROM_LOAD( "1.ic25", 0x00000, 0x40000, CRC(4fe79e43) SHA1(7c154cb00e9b64fbdcc218280f2183b816cef20b) ) ROM_END @@ -553,16 +536,16 @@ PCB is marked: "bottom" and "H83048 Rev. 1.1" on solder side PCB is labeled: "EUROPA 2002 SPACE Ver. 3.0" and "Non rimuovere PASSED 04/2002 Garanzia 6 MESI" on component side */ ROM_START( euro2k2s ) - ROM_REGION( 0x1000000, "maincpu", 0 ) - ROM_LOAD( "euro2k2s_ver3.0_hd64f3048f16.mcu", 0x00000, 0x4000, NO_DUMP ) + ROM_REGION( 0x20000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD( "euro2k2s_ver3.0_hd64f3048f16.mcu", 0x00000, 0x20000, NO_DUMP ) - ROM_REGION( 0x180000, "gfx1", 0 ) + ROM_REGION( 0x180000, "tiles", 0 ) ROM_LOAD( "europa2002space4.ic18", 0x000000, 0x80000, CRC(cf4db4f1) SHA1(6c03e54e30eb83778d1cad5ade17c26a370ea8a3) ) ROM_LOAD( "europa2002space5.ic17", 0x080000, 0x80000, CRC(1070b4ac) SHA1(3492de52cd0c784479d2774f6050b24cf4591484) ) ROM_LOAD( "europa2002_2-a.ic20", 0x100000, 0x40000, CRC(971bc33b) SHA1(c385e5bef57cdb52a86c1e38fca471ef5ab3da7c) ) - ROM_LOAD( "europa2002space3.ic19", 0x140000, 0x40000, CRC(d82dba04) SHA1(63d407dd036d3c7f190ad7b6d694288e9a9e56d0) ) /* identical halves */ + ROM_LOAD( "europa2002space3.ic19", 0x140000, 0x40000, CRC(d82dba04) SHA1(63d407dd036d3c7f190ad7b6d694288e9a9e56d0) ) // identical halves - ROM_REGION( 0x40000, "oki", 0 ) /* M6295 samples */ + ROM_REGION( 0x40000, "oki", 0 ) // M6295 samples ROM_LOAD( "1-a.ic25", 0x00000, 0x20000, CRC(8fcb283d) SHA1(9e95c72967da13606eed6d16f84145273b9ffddf) ) ROM_END @@ -573,16 +556,16 @@ PCB is labeled: "UFO ROBOT Ver. 1.0 Rev.A" and " Non Rimuovere PASSED 12/2002 Ga */ ROM_START( uforobot ) - ROM_REGION( 0x1000000, "maincpu", 0 ) - ROM_LOAD( "uforobot_ver1.0_rev_a_hd64f3048f16.mcu", 0x00000, 0x4000, NO_DUMP ) + ROM_REGION( 0x20000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD( "uforobot_ver1.0_rev_a_hd64f3048f16.mcu", 0x00000, 0x20000, NO_DUMP ) - ROM_REGION( 0x200000, "gfx1", 0 ) + ROM_REGION( 0x200000, "tiles", 0 ) ROM_LOAD( "ufo_robot_4-a.ic18", 0x000000, 0x80000, CRC(dbd03bfc) SHA1(8d5a721869f95ee075cf3ee7743ee1b9ea9626dc) ) // FIXED BITS (xxxxxxx0) ROM_LOAD( "ufo_robot_5-a.ic17", 0x080000, 0x80000, CRC(72ebd037) SHA1(4f133bba88dacda6a1e1d8b1469e76aae7b2db15) ) ROM_LOAD( "ufo_robot_2-a.ic20", 0x100000, 0x80000, CRC(c2d3fc8f) SHA1(12dd6c77f403fcaa5331ca6f8d02fd60f223b453) ) ROM_LOAD( "ufo_robot_3-a.ic19", 0x180000, 0x80000, CRC(4991101b) SHA1(a8943fa6986799b9b039c4208301a003333cc49a) ) - ROM_REGION( 0x40000, "oki", 0 ) /* M6295 samples */ + ROM_REGION( 0x40000, "oki", 0 ) // M6295 samples ROM_LOAD( "uno-a.ic25", 0x00000, 0x20000, CRC(8fcb283d) SHA1(9e95c72967da13606eed6d16f84145273b9ffddf) ) ROM_END @@ -594,14 +577,14 @@ PCB is labeled: "Bowling Road Ver. 1.4" and "Non Rimuovere PASSED 11/2001 Garanz GFX ROMs are the same as Bowling Road (Ver 1.5) but ICs location are numbered differently due to a different PCB layout. Oki ROM is different. */ ROM_START( bowlroad14n ) - ROM_REGION( 0x1000000, "maincpu", 0 ) - ROM_LOAD( "bowlroad_ver1.4_nh_hd64f3048f16.mcu", 0x00000, 0x4000, NO_DUMP ) + ROM_REGION( 0x20000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD( "bowlroad_ver1.4_nh_hd64f3048f16.mcu", 0x00000, 0x20000, NO_DUMP ) - ROM_REGION( 0x100000, "gfx1", 0 ) //bigger than 8bpps? + ROM_REGION( 0x100000, "tiles", 0 ) //bigger than 8bpps? ROM_LOAD( "bowling road 2.ic7", 0x000000, 0x80000, CRC(bc389c0a) SHA1(26f29820cce7b984c212a44842551b2960d371ae) ) ROM_LOAD( "bowling road 3.ic6", 0x080000, 0x80000, CRC(8a306a4c) SHA1(d94e2c266fb80343028da3dabe25a35b933d9e8e) ) - ROM_REGION( 0x40000, "oki", 0 ) /* M6295 samples */ + ROM_REGION( 0x40000, "oki", 0 ) // M6295 samples ROM_LOAD( "uno.ic25", 0x00000, 0x20000, CRC(e6a0854b) SHA1(394e01bb24abd1e0d2c447b4d620fc5d02257d8a) ) ROM_END @@ -614,14 +597,14 @@ It is the same game as World Cup (Ver 1.5) but ICs location are numbered differe */ ROM_START( wcup14 ) - ROM_REGION( 0x1000000, "maincpu", 0 ) - ROM_LOAD( "wcup_ver1.4_hd64f3048f16.mcu", 0x00000, 0x4000, NO_DUMP ) + ROM_REGION( 0x20000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD( "wcup_ver1.4_hd64f3048f16.mcu", 0x00000, 0x20000, NO_DUMP ) - ROM_REGION( 0x100000, "gfx1", 0 ) //bigger than 8bpps? + ROM_REGION( 0x100000, "tiles", 0 ) //bigger than 8bpps? ROM_LOAD( "world cup 2.ic18", 0x000000, 0x80000, CRC(4524445b) SHA1(50ec31ac9e4cd807fd4bf3d667644ed662681782) ) ROM_LOAD( "world cup 3.ic17", 0x080000, 0x80000, CRC(0df1af40) SHA1(f5050533e5a9cf2113e5aeffaeca23c7572cafae) ) - ROM_REGION( 0x40000, "oki", 0 ) /* M6295 samples */ + ROM_REGION( 0x40000, "oki", 0 ) // M6295 samples ROM_LOAD( "1.ic25", 0x00000, 0x20000, CRC(e6a0854b) SHA1(394e01bb24abd1e0d2c447b4d620fc5d02257d8a) ) ROM_END @@ -629,6 +612,7 @@ ROM_END /* Mystery Number +GIFE-001 PCB CPU: @@ -653,20 +637,34 @@ ROM_END */ -ROM_START( mnumber ) /* clocks should be changed for this game */ - ROM_REGION( 0x1000000, "maincpu", 0 ) - ROM_LOAD( "mnumber_hd64f3048f16.mcu", 0x00000, 0x4000, NO_DUMP ) +ROM_START( mnumber ) + ROM_REGION( 0x20000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD( "mnumber_hd64f3048f16.mcu", 0x00000, 0x20000, NO_DUMP ) - ROM_REGION( 0x200000, "gfx1", 0 ) /* different encoded gfx */ + ROM_REGION( 0x200000, "tiles", 0 ) // differently encoded gfx ROM_LOAD( "mysterynumber3.u20", 0x000000, 0x80000, CRC(251f1e11) SHA1(e8c90b289e76cea6a541b701859be6465a381668) ) ROM_LOAD( "mysterynumber4.u21", 0x080000, 0x80000, CRC(2b8744e4) SHA1(8a12c6f300818de3738e7c44c7df71c432cb9975) ) ROM_LOAD( "mysterynumber1.u22", 0x100000, 0x80000, CRC(d2ce1f61) SHA1(8f30407050fc102191747996258d4b5da3a0d994) ) - ROM_LOAD( "mysterynumber2.u19", 0x180000, 0x80000, CRC(7b3a3b32) SHA1(9db46aa12077a48951056705491da1cce747c374) ) /* identical halves */ + ROM_LOAD( "mysterynumber2.u19", 0x180000, 0x80000, CRC(7b3a3b32) SHA1(9db46aa12077a48951056705491da1cce747c374) ) // identical halves - ROM_REGION( 0x40000, "oki", 0 ) /* M6295 samples */ + ROM_REGION( 0x40000, "oki", 0 ) // M6295 samples ROM_LOAD( "mysterynumber5.u6", 0x00000, 0x40000, CRC(80aba466) SHA1(e9bf7e1c3d1c6b1b0dba43dd79a71f89e63df814) ) ROM_END +ROM_START( gnumber ) + ROM_REGION( 0x20000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD( "gnumber_hd64f3048f16.mcu", 0x00000, 0x20000, NO_DUMP ) + + ROM_REGION( 0x200000, "tiles", 0 ) // differently encoded gfx + ROM_LOAD( "golden_number_3.u20", 0x000000, 0x80000, CRC(ae927b5b) SHA1(7f27c8e1a165cd663469e768159aeac45328879c) ) + ROM_LOAD( "golden_number_4.u21", 0x080000, 0x80000, CRC(e3de62ee) SHA1(212bfad6798332f459382ad7f9de23b9890e0981) ) + ROM_LOAD( "golden_number_1.u22", 0x100000, 0x80000, CRC(8bd15448) SHA1(0ab853f55dd520c6b0dbcc4a604c86b54b4dc5c2) ) + ROM_LOAD( "golden_number_2.u19", 0x180000, 0x80000, CRC(d40ffba5) SHA1(925cfdd4cbd5610d87f48c1202fa7ba7357e37d2) ) + + ROM_REGION( 0x40000, "oki", 0 ) // M6295 samples + ROM_LOAD( "golden_number_5.u6", 0x00000, 0x40000, CRC(5264ad9e) SHA1(e076e0cd4a6b08b7c2ca01d85eecd0c2e34ad8b0) ) // 11xxxxxxxxxxxxxxxx = 0xFF +ROM_END + } // anonymous namespace @@ -675,12 +673,12 @@ ROM_END *************************/ // YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS -/* hardware green H83048*/ +// hardware green H83048 GAME( 200?, bookthr, 0, itgamble, itgamble, itgamble_state, empty_init, ROT0, "Nazionale Elettronica", "Book Theatre (Ver 1.2)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) GAME( 2000, capunc, 0, itgamble, itgamble, itgamble_state, empty_init, ROT0, "Nazionale Elettronica", "Capitan Uncino (Nazionale Elettronica, Ver 1.2)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) GAME( 2001, capcor, 0, itgamble, itgamble, itgamble_state, empty_init, ROT0, "Nazionale Elettronica", "Capitani Coraggiosi (Ver 1.3)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) -/* hardware green H83048 + piggyback for timekeeping*/ +// hardware green H83048 + piggyback for timekeeping GAME( 2001, bowlroad, 0, itgamble, itgamble, itgamble_state, empty_init, ROT0, "Nazionale Elettronica", "Bowling Road (Ver 1.5)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) GAME( 2001, euro2k2, 0, itgamble, itgamble, itgamble_state, empty_init, ROT0, "Nazionale Elettronica", "Europa 2002 (Ver 2.0, set 1)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) GAME( 2001, euro2k2a, euro2k2, itgamble, itgamble, itgamble_state, empty_init, ROT0, "Nazionale Elettronica", "Europa 2002 (Ver 2.0, set 2)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) @@ -690,15 +688,16 @@ GAME( 2001, laperlag, 0, itgamble, itgamble, itgamble_state, empty_ini GAME( 200?, pinups, 0, itgamble, itgamble, itgamble_state, empty_init, ROT0, "Nazionale Elettronica", "Pin Ups (Ver 1.0 Rev A)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) GAME( 2001, wcup, 0, itgamble, itgamble, itgamble_state, empty_init, ROT0, "Nazionale Elettronica", "World Cup (Ver 1.5)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) -/* hardware red H83048 Rev 1.1 + timekeeping on board*/ +// hardware red H83048 Rev 1.1 + timekeeping on board GAME( 2001, abacus, 0, itgamble, itgamble, itgamble_state, empty_init, ROT0, "Nazionale Elettronica", "Abacus (Ver 1.0)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) GAME( 2001, bowlroad14, bowlroad, itgamble, itgamble, itgamble_state, empty_init, ROT0, "Nazionale Elettronica", "Bowling Road (Ver 1.4)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) GAME( 2002, euro2k2s, euro2k2, itgamble, itgamble, itgamble_state, empty_init, ROT0, "Nazionale Elettronica", "Europa 2002 Space (Ver 3.0)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) GAME( 2001, uforobot, 0, itgamble, itgamble, itgamble_state, empty_init, ROT0, "Nazionale Elettronica", "UFO Robot (Ver 1.0 Rev A)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) -/* hardware green ND2001 Rev 1.0*/ +// hardware green ND2001 Rev 1.0 GAME( 2001, bowlroad14n, bowlroad, itgamble, itgamble, itgamble_state, empty_init, ROT0, "Nazionale Elettronica", "Bowling Road (Ver 1.4, ND2001 hardware)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) GAME( 2001, wcup14, wcup, itgamble, itgamble, itgamble_state, empty_init, ROT0, "Nazionale Elettronica", "World Cup (Ver 1.4)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) -/* different hardware */ +// hardware GIFE-001 GAME( 2000, mnumber, 0, mnumber, itgamble, itgamble_state, empty_init, ROT0, "MM / BRL Bologna", "Mystery Number", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) +GAME( 200?, gnumber, 0, mnumber, itgamble, itgamble_state, empty_init, ROT0, "MM / BRL Bologna", "Golden Number", MACHINE_NO_SOUND | MACHINE_NOT_WORKING ) diff --git a/src/mame/misc/lependu.cpp b/src/mame/misc/lependu.cpp index bd7609d5a9e2d..b9bc510ff479f 100644 --- a/src/mame/misc/lependu.cpp +++ b/src/mame/misc/lependu.cpp @@ -587,6 +587,7 @@ ROM_START( lependu ) ROM_REGION( 0x08000, "data1", 0 ) // banked data ROM_LOAD( "fra_04.12a", 0x0000, 0x8000, CRC(60b9a387) SHA1(b455f7e955869308dcc5709db34a478f08dc69bb) ) + ROM_REGION( 0x08000, "data2", 0 ) // banked data ROM_LOAD( "fra_05.14a", 0x0000, 0x8000, CRC(5834b8e3) SHA1(f4377b54761ae934ff2c09c2808424e2b4a44898) ) @@ -605,6 +606,48 @@ ROM_START( lependu ) ROM_LOAD( "mini.5d", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) ROM_END +/* + Code Magik + Voyageur de L'Espace Inc. + + Obscure vintage game. + Using IRQ instead of NMI. + + VideoRAM: 0x800-0xbff + ColorRAM: 0xc00-0xfff + + CRTC addr: 0x10b0-0x10b0 + CRTC data: 0x10b1-0x10b1 + + PIA0 offs: 0x10f4-0x10f7 + PIA1 offs: 0x10f8-0x10fb + +*/ +ROM_START( codemagik ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "2764.11a", 0xc000, 0x2000, CRC(61a6ffef) SHA1(d7f0f1b415b14d9919f9ac3b8a1d74f3e14ccc2d) ) + ROM_LOAD( "2764.10a", 0xe000, 0x2000, CRC(4aac24d5) SHA1(06c89052d0f6f9d435ff88be62706595fe716791) ) + + ROM_REGION( 0x08000, "data1", 0 ) // banked data + ROM_FILL( 0x0000, 0x8000, 0x0000 ) // filling the bank + + ROM_REGION( 0x08000, "data2", 0 ) // banked data + ROM_FILL( 0x0000, 0x8000, 0x0000 ) // filling the bank + + ROM_REGION( 0x6000, "gfx1", 0 ) + ROM_FILL( 0x0000, 0x4000, 0x0000 ) // filling the R-G bitplanes + ROM_LOAD( "1y_2764.4a", 0x4000, 0x2000, CRC(41b83c2d) SHA1(b46a43636c577c4a3620c69ef874f11aa9d48473) ) // chars / multicolor tiles, bitplane 3 + + ROM_REGION( 0x3000, "gfx2", 0 ) + ROM_LOAD( "3y_2732.1a", 0x0000, 0x1000, CRC(ea868221) SHA1(fcf9a840537feb28c9fb65b58b9a41b2412aa4ef) ) // cards deck and alt gfx, bitplane1 + ROM_LOAD( "2y_2732.3a", 0x1000, 0x1000, CRC(6d1da4bb) SHA1(dc8c70faa301e2f7e9089d38e0ef618e8352e569) ) // cards deck gfx, bitplane2 + ROM_COPY( "gfx1", 0x4800, 0x2000, 0x0800 ) // cards deck gfx, bitplane3. + ROM_COPY( "gfx1", 0x5800, 0x2800, 0x0800 ) // cards deck alt gfx, bitplane3. + + ROM_REGION( 0x0100, "proms", 0 ) + ROM_LOAD( "dex.5d", 0x0000, 0x0100, CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) ) +ROM_END + /********************************************* * Driver Init * @@ -636,5 +679,6 @@ void lependu_state::init_lependu() * Game Drivers * *********************************************/ -// YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS LAYOUT -GAMEL( 198?, lependu, 0, lependu, lependu, lependu_state, init_lependu, ROT0, "Avenir Amusement Inc.", "Le Pendu (Bilingue, Version 04)", 0, layout_lependu ) +// YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS LAYOUT +GAMEL( 198?, lependu, 0, lependu, lependu, lependu_state, init_lependu, ROT0, "Avenir Amusement Inc.", "Le Pendu (Bilingue, Version 04)", 0, layout_lependu ) +GAMEL( 198?, codemagik, 0, lependu, lependu, lependu_state, empty_init, ROT0, "Voyageur de L'Espace Inc.", "Code Magik", MACHINE_NOT_WORKING, layout_lependu ) diff --git a/src/mame/misc/micro3d.cpp b/src/mame/misc/micro3d.cpp index 75c387a43008b..86766148cc58f 100644 --- a/src/mame/misc/micro3d.cpp +++ b/src/mame/misc/micro3d.cpp @@ -27,6 +27,7 @@ #include "emu.h" #include "micro3d.h" #include "micro3d_a.h" + #include "cpu/am29000/am29000.h" #include "cpu/m68000/m68000.h" #include "cpu/mcs51/mcs51.h" @@ -80,7 +81,7 @@ static INPUT_PORTS_START( micro3d ) PORT_DIPSETTING( 0x0000, DEF_STR(On) ) PORT_START("SOUND_SW") - PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Sound PCB Test SW") PORT_CODE(KEYCODE_F1) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Sound PCB Test SW") PORT_CODE(KEYCODE_F1) PORT_START("VOLUME") PORT_ADJUSTER(100, "Volume") @@ -108,10 +109,10 @@ static INPUT_PORTS_START( f15se ) PORT_BIT( 0xfff, 0x000, IPT_AD_STICK_X ) PORT_MINMAX(0xf5a, 0x0a6) PORT_SENSITIVITY(25) PORT_KEYDELTA(50) PORT_REVERSE PORT_START("JOYSTICK_Y") - PORT_BIT(0xfff, 0x000, IPT_AD_STICK_Y ) PORT_MINMAX(0xf5a, 0x0a6) PORT_SENSITIVITY(25) PORT_KEYDELTA(50) + PORT_BIT( 0xfff, 0x000, IPT_AD_STICK_Y ) PORT_MINMAX(0xf5a, 0x0a6) PORT_SENSITIVITY(25) PORT_KEYDELTA(50) PORT_START("THROTTLE") - PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Z ) PORT_MINMAX(0x00,0xff) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_CENTERDELTA(0) PORT_NAME("Throttle") + PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Z ) PORT_MINMAX(0x00,0xff) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_CENTERDELTA(0) PORT_REVERSE PORT_NAME("Throttle") INPUT_PORTS_END static INPUT_PORTS_START( botss ) @@ -135,10 +136,10 @@ static INPUT_PORTS_START( botss ) PORT_BIT( 0xfff, 0x000, IPT_AD_STICK_X ) PORT_MINMAX(0xf5a, 0x0a6) PORT_SENSITIVITY(25) PORT_KEYDELTA(50) PORT_REVERSE PORT_START("JOYSTICK_Y") - PORT_BIT(0xfff, 0x000, IPT_AD_STICK_Y ) PORT_MINMAX(0xf5a, 0x0a6) PORT_SENSITIVITY(25) PORT_KEYDELTA(50) + PORT_BIT( 0xfff, 0x000, IPT_AD_STICK_Y ) PORT_MINMAX(0xf5a, 0x0a6) PORT_SENSITIVITY(25) PORT_KEYDELTA(50) PORT_START("THROTTLE") - PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Z ) PORT_MINMAX(0x00,0xff) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_CENTERDELTA(0) PORT_NAME("Throttle") + PORT_BIT( 0xff, 0x80, IPT_AD_STICK_Z ) PORT_MINMAX(0x00,0xff) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_CENTERDELTA(0) PORT_REVERSE PORT_NAME("Throttle") INPUT_PORTS_END static INPUT_PORTS_START( botss11 ) @@ -154,8 +155,8 @@ static INPUT_PORTS_START( botss11 ) PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_START("INPUTS_C_D") - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Throttle up") - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("Throttle down") + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Throttle Up") + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("Throttle Down") PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Trigger") @@ -215,7 +216,7 @@ void micro3d_state::hostmem(address_map &map) map(0x960000, 0x960001).w(FUNC(micro3d_state::reset_w)); map(0x980001, 0x980001).rw("adc", FUNC(adc0844_device::read), FUNC(adc0844_device::write)); map(0x9a0000, 0x9a0007).rw(m_vgb, FUNC(tms34010_device::host_r), FUNC(tms34010_device::host_w)); - map(0x9c0000, 0x9c0001).noprw(); // Lamps + map(0x9c0000, 0x9c0001).noprw(); // Lamps map(0x9e0000, 0x9e002f).rw("mfp", FUNC(mc68901_device::read), FUNC(mc68901_device::write)).umask16(0xff00); map(0xa00000, 0xa0003f).rw(m_duart, FUNC(mc68681_device::read), FUNC(mc68681_device::write)).umask16(0xff00); map(0xa20000, 0xa20001).r(FUNC(micro3d_state::encoder_h_r)); @@ -272,6 +273,7 @@ void micro3d_state::drmath_data(address_map &map) map(0x03fffff0, 0x03ffffff).rw("scc", FUNC(z80scc_device::ab_dc_r), FUNC(z80scc_device::ab_dc_w)).umask32(0x000000ff); } + /************************************* * * Sound memory map diff --git a/src/mame/skeleton/mindset.cpp b/src/mame/misc/mindset.cpp similarity index 100% rename from src/mame/skeleton/mindset.cpp rename to src/mame/misc/mindset.cpp diff --git a/src/mame/misc/policetr.cpp b/src/mame/misc/policetr.cpp index c9ea28310b396..17a949e5ea04a 100644 --- a/src/mame/misc/policetr.cpp +++ b/src/mame/misc/policetr.cpp @@ -244,11 +244,6 @@ void policetr_state::speedup_w(offs_t offset, uint32_t data, uint32_t mem_mask) * *************************************/ -void policetr_state::ramdac_map(address_map &map) -{ - map(0x000, 0x2ff).rw(m_ramdac, FUNC(ramdac_device::ramdac_pal_r), FUNC(ramdac_device::ramdac_rgb888_w)); -} - void policetr_state::mem(address_map &map) { map.global_mask(0x3fffffff); @@ -260,8 +255,9 @@ void policetr_state::mem(address_map &map) map(0x00600002, 0x00600002).r(FUNC(policetr_state::bsmt2000_data_r)); map(0x00700000, 0x00700003).w(FUNC(policetr_state::bsmt2000_reg_w)); map(0x00800000, 0x00800003).w(FUNC(policetr_state::bsmt2000_data_w)); - map(0x00900001, 0x00900001).w(m_ramdac, FUNC(ramdac_device::index_w)); - map(0x00920001, 0x00920001).w(m_ramdac, FUNC(ramdac_device::pal_w)); + map(0x00900001, 0x00900001).w(m_ramdac, FUNC(bt481_device::address_w)); + map(0x00920001, 0x00920001).w(m_ramdac, FUNC(bt481_device::palette_w)); + map(0x00940001, 0x00940001).w(m_ramdac, FUNC(bt481_device::mask_w)); map(0x00a00000, 0x00a00003).w(FUNC(policetr_state::control_w)); map(0x00a00000, 0x00a00003).portr("IN0"); map(0x00a20000, 0x00a20003).portr("IN1"); @@ -277,8 +273,9 @@ void sshooter_state::mem(address_map &map) map(0x00000000, 0x0001ffff).ram().share(m_rambase); map(0x00200000, 0x00200003).w(FUNC(sshooter_state::bsmt2000_data_w)); - map(0x00300001, 0x00300001).w(m_ramdac, FUNC(ramdac_device::index_w)); - map(0x00320001, 0x00320001).w(m_ramdac, FUNC(ramdac_device::pal_w)); + map(0x00300001, 0x00300001).w(m_ramdac, FUNC(bt481_device::address_w)); + map(0x00320001, 0x00320001).w(m_ramdac, FUNC(bt481_device::palette_w)); + map(0x00340001, 0x00340001).w(m_ramdac, FUNC(bt481_device::mask_w)); map(0x00400000, 0x00400003).r(FUNC(sshooter_state::video_r)); map(0x00500000, 0x00500003).nopw(); // copies ROM here at startup, plus checksum map(0x00600002, 0x00600002).r(FUNC(sshooter_state::bsmt2000_data_r)); @@ -452,10 +449,7 @@ void policetr_state::policetr(machine_config &config) m_screen->set_screen_update(FUNC(policetr_state::screen_update)); m_screen->screen_vblank().set(FUNC(policetr_state::vblank)); - PALETTE(config, m_palette).set_entries(256); - - RAMDAC(config, m_ramdac, 0, m_palette); // BT481A Palette RAMDAC - m_ramdac->set_addrmap(0, &policetr_state::ramdac_map); + BT481(config, m_ramdac, 0); // Bt481AKPJ110 /* sound hardware */ SPEAKER(config, m_lspeaker).front_left(); diff --git a/src/mame/misc/policetr.h b/src/mame/misc/policetr.h index 03c8cd1722f9c..d692ad5c89bd9 100644 --- a/src/mame/misc/policetr.h +++ b/src/mame/misc/policetr.h @@ -9,8 +9,7 @@ #include "cpu/mips/mips1.h" #include "machine/eepromser.h" #include "sound/bsmt2000.h" -#include "video/ramdac.h" -#include "emupal.h" +#include "video/bt48x.h" #include "screen.h" #include "speaker.h" @@ -37,7 +36,6 @@ class policetr_state : public driver_device m_rspeaker(*this, "rspeaker"), m_eeprom(*this, "eeprom"), m_screen(*this, "screen"), - m_palette(*this, "palette"), m_ramdac(*this, "ramdac"), m_leds(*this, "leds%u", 0U), m_gun_x_io(*this, "GUNX%u", 1U), @@ -51,8 +49,6 @@ class policetr_state : public driver_device void mem(address_map &map) ATTR_COLD; - void ramdac_map(address_map &map) ATTR_COLD; - void control_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); void speedup_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); @@ -75,8 +71,7 @@ class policetr_state : public driver_device required_device m_rspeaker; required_device m_eeprom; required_device m_screen; - required_device m_palette; - required_device m_ramdac; + required_device m_ramdac; enum { diff --git a/src/mame/misc/policetr_v.cpp b/src/mame/misc/policetr_v.cpp index f10f4829f6512..c7acb4e9ad024 100644 --- a/src/mame/misc/policetr_v.cpp +++ b/src/mame/misc/policetr_v.cpp @@ -306,16 +306,15 @@ uint32_t policetr_state::video_r() uint32_t policetr_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { const int width = cliprect.width(); - rgb_t const *const palette = m_palette->palette()->entry_list_raw(); /* render all the scanlines from the dstbitmap to MAME's bitmap */ for (int y = cliprect.min_y; y <= cliprect.max_y; y++) { - uint8_t const *src = &m_dstbitmap->pix(y,cliprect.min_x); - uint32_t *dst = &bitmap.pix(y,cliprect.min_x); + uint8_t const *src = &m_dstbitmap->pix(y, cliprect.min_x); + uint32_t *dst = &bitmap.pix(y, cliprect.min_x); //draw_scanline8(bitmap, cliprect.min_x, y, width, src, nullptr); for (int x = 0; x < width; x++, dst++, src++) - *dst = palette[*src]; + *dst = m_ramdac->pixel_select(*src); } return 0; diff --git a/src/mame/misc/truco.cpp b/src/mame/misc/truco.cpp index 12f39aae585f9..28a6b4a653784 100644 --- a/src/mame/misc/truco.cpp +++ b/src/mame/misc/truco.cpp @@ -70,7 +70,7 @@ - U1 : 40-pin IC YES CPU MOTOROLA M6809EP 8-bit microprocessor. - U2 : 28-pin IC YES ROM M27128A (or M27512FI) NMOS 128K 16K x 8 UV EPROM (or 64K x 8). - U3 : 28-pin IC YES ROM M27128A (or M27512FI) NMOS 128K 16K x 8 UV EPROM (or 64K x 8). - - U4 : 40-pin IC YES I/O EF6821P PIA: Peripheral Interface Adapter. + - U4 : 40-pin IC YES I/O MC6821P PIA: Peripheral Interface Adapter. - U5 : 16-pin IC YES TTL 74HC157 Quad 2 Channel Multiplexer. - U6 : 16-pin IC YES TTL 74HC157 Quad 2 Channel Multiplexer. - U7 : 16-pin IC YES TTL 74HC157 Quad 2 Channel Multiplexer. diff --git a/src/mame/misc/trvmadns.cpp b/src/mame/misc/trvmadns.cpp index cbde533ef5773..d8e1cc43988d5 100644 --- a/src/mame/misc/trvmadns.cpp +++ b/src/mame/misc/trvmadns.cpp @@ -133,8 +133,6 @@ class trvmadns_state : public driver_device void unknown_w(uint8_t data); void lamps_w(uint8_t data); - void postload(); - void gfxram_w(offs_t offset, uint8_t data); void palette_w(offs_t offset, uint8_t data); void tileram_w(offs_t offset, uint8_t data); @@ -299,15 +297,9 @@ void trvmadns_state::lamps_w(uint8_t data) void trvmadns_state::machine_start() { - machine().save().register_postload(save_prepost_delegate(FUNC(trvmadns_state::postload), this)); m_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(trvmadns_state::tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); } -void trvmadns_state::postload() -{ - m_gfxdecode->gfx(0)->mark_all_dirty(); -} - //************************************************************************** // MACHINE DEFINTIONS diff --git a/src/mame/moog/memorymoog.cpp b/src/mame/moog/memorymoog.cpp index 99c091f7b0683..3afcc8480f242 100644 --- a/src/mame/moog/memorymoog.cpp +++ b/src/mame/moog/memorymoog.cpp @@ -827,82 +827,82 @@ DECLARE_INPUT_CHANGED_MEMBER(memorymoog_state::octave_button_pressed) // All strings in PORT_NAME(...) match those in the schematic. INPUT_PORTS_START(memorymoog) - PORT_START("keyboard_column_0") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("C0") PORT_CODE(KEYCODE_Z) - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("C#0") - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("D0") - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("D#0") - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("E0") - PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("F0") - PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("F#0") - PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("G0") - - PORT_START("keyboard_column_1") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("G#0") - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("A0") - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("A#0") - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("B0") PORT_CODE(KEYCODE_X) - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("C1") - PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("C#1") - PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("D1") - PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("D#1") - - PORT_START("keyboard_column_2") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("E1") - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("F1") - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("F#1") - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("G1") - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("G#1") - PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("A1") - PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("A#1") - PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("B1") - - PORT_START("keyboard_column_3") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("C2") - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("C#2") - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("D2") - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("D#2") - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("E2") - PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("F2") - PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("F#2") - PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("G2") - - PORT_START("keyboard_column_4") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("G#2") - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("A2") - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("A#2") - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("B2") - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("C3") - PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("C#3") - PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("D3") - PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("D#3") - - PORT_START("keyboard_column_5") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("E3") - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("F3") - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("F#3") - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("G3") - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("G#3") - PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("A3") - PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("A#3") - PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("B3") - - PORT_START("keyboard_column_6") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("C4") - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("C#4") - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("D4") - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("D#4") - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("E4") - PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("F4") - PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("F#4") - PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("G4") PORT_CODE(KEYCODE_C) - - PORT_START("keyboard_column_7") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("G#4") - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("A4") - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("A#4") - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("B4") - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("C5") PORT_CODE(KEYCODE_V) + PORT_START("keyboard_column_0") // C0 - G0 in schematic. + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_C2 PORT_CODE(KEYCODE_Z) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_CS2 + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_D2 + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_DS2 + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_E2 + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_F2 + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_FS2 + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_G2 + + PORT_START("keyboard_column_1") // G#0 - D#1 + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_GS2 + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_A2 + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_AS2 + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_B2 PORT_CODE(KEYCODE_X) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_C3 + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_CS3 + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_D3 + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_DS3 + + PORT_START("keyboard_column_2") // E1 - B1 + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_E3 + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_F3 + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_FS3 + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_G3 + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_GS3 + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_A3 + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_AS3 + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_B3 + + PORT_START("keyboard_column_3") // C2 - G2 + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_C4 + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_CS4 + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_D4 + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_DS4 + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_E4 + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_F4 + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_FS4 + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_G4 + + PORT_START("keyboard_column_4") // G#2 - D#3 + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_GS4 + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_A4 + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_AS4 + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_B4 + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_C5 + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_CS5 + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_D5 + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_DS5 + + PORT_START("keyboard_column_5") // E3 - B3 + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_E5 + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_F5 + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_FS5 + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_G5 + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_GS5 + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_A5 + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_AS5 + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_B5 + + PORT_START("keyboard_column_6") // C4 - G4 + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_C6 + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_CS6 + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_D6 + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_DS6 + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_E6 + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_F6 + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_FS6 + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_G6 PORT_CODE(KEYCODE_C) + + PORT_START("keyboard_column_7") // G#4 - C5 + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_GS6 + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_A6 + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_AS6 + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_B6 + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_C7 PORT_CODE(KEYCODE_V) PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) // NC PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) // NC PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) // NC diff --git a/src/mame/moog/source.cpp b/src/mame/moog/source.cpp index e9fe8a5032532..1f1cf6de9ceb1 100644 --- a/src/mame/moog/source.cpp +++ b/src/mame/moog/source.cpp @@ -771,49 +771,49 @@ INPUT_PORTS_START(source) PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(source_state::encoder_moved), 1) PORT_START("keyboard_oct_1") - PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("C1") - PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("C#1") - PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("D1") - PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("D#1") - PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("E1") - PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("F1") - PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("F#1") - PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("G1") - PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("G#1") - PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("A1") - PORT_BIT(0x400, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("A#1") - PORT_BIT(0x800, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("B1") + PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_OTHER) PORT_GM_C2 + PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_OTHER) PORT_GM_CS2 + PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_OTHER) PORT_GM_D2 + PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_OTHER) PORT_GM_DS2 + PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_OTHER) PORT_GM_E2 + PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_OTHER) PORT_GM_F2 + PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_OTHER) PORT_GM_FS2 + PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_OTHER) PORT_GM_G2 + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_OTHER) PORT_GM_GS2 + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_OTHER) PORT_GM_A2 + PORT_BIT(0x400, IP_ACTIVE_HIGH, IPT_OTHER) PORT_GM_AS2 + PORT_BIT(0x800, IP_ACTIVE_HIGH, IPT_OTHER) PORT_GM_B2 PORT_START("keyboard_oct_2") - PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("C2") - PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("C#2") - PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("D2") - PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("D#2") - PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("E2") - PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("F2") - PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("F#2") - PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("G2") - PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("G#2") - PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("A2") - PORT_BIT(0x400, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("A#2") - PORT_BIT(0x800, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("B2") + PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_OTHER) PORT_GM_C3 + PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_OTHER) PORT_GM_CS3 + PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_OTHER) PORT_GM_D3 + PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_OTHER) PORT_GM_DS3 + PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_OTHER) PORT_GM_E3 + PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_OTHER) PORT_GM_F3 + PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_OTHER) PORT_GM_FS3 + PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_OTHER) PORT_GM_G3 + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_OTHER) PORT_GM_GS3 + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_OTHER) PORT_GM_A3 + PORT_BIT(0x400, IP_ACTIVE_HIGH, IPT_OTHER) PORT_GM_AS3 + PORT_BIT(0x800, IP_ACTIVE_HIGH, IPT_OTHER) PORT_GM_B3 PORT_START("keyboard_oct_3") - PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("C3") - PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("C#3") - PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("D3") - PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("D#3") - PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("E3") - PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("F3") - PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("F#3") - PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("G3") - PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("G#3") - PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("A3") - PORT_BIT(0x400, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("A#3") - PORT_BIT(0x800, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("B3") + PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_OTHER) PORT_GM_C4 + PORT_BIT(0x002, IP_ACTIVE_HIGH, IPT_OTHER) PORT_GM_CS4 + PORT_BIT(0x004, IP_ACTIVE_HIGH, IPT_OTHER) PORT_GM_D4 + PORT_BIT(0x008, IP_ACTIVE_HIGH, IPT_OTHER) PORT_GM_DS4 + PORT_BIT(0x010, IP_ACTIVE_HIGH, IPT_OTHER) PORT_GM_E4 + PORT_BIT(0x020, IP_ACTIVE_HIGH, IPT_OTHER) PORT_GM_F4 + PORT_BIT(0x040, IP_ACTIVE_HIGH, IPT_OTHER) PORT_GM_FS4 + PORT_BIT(0x080, IP_ACTIVE_HIGH, IPT_OTHER) PORT_GM_G4 + PORT_BIT(0x100, IP_ACTIVE_HIGH, IPT_OTHER) PORT_GM_GS4 + PORT_BIT(0x200, IP_ACTIVE_HIGH, IPT_OTHER) PORT_GM_A4 + PORT_BIT(0x400, IP_ACTIVE_HIGH, IPT_OTHER) PORT_GM_AS4 + PORT_BIT(0x800, IP_ACTIVE_HIGH, IPT_OTHER) PORT_GM_B4 PORT_START("keyboard_oct_4") - PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("C4") + PORT_BIT(0x001, IP_ACTIVE_HIGH, IPT_OTHER) PORT_GM_C5 PORT_START("trigger_in") // External trigger input (see keyboard_r()). PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("S TRIG IN") PORT_CODE(KEYCODE_T) diff --git a/src/mame/namco/namcona1.cpp b/src/mame/namco/namcona1.cpp index f411005b1674f..153b6452d0392 100644 --- a/src/mame/namco/namcona1.cpp +++ b/src/mame/namco/namcona1.cpp @@ -196,7 +196,8 @@ void namcona1_state::simulate_mcu() void namcona1_state::write_version_info() { static const u16 source[0x8] = - { /* "NSA-BIOS ver"... */ + { + /* "NSA-BIOS ver"... */ 0x534e,0x2d41,0x4942,0x534f,0x7620,0x7265,0x2e31,0x3133 }; for (int i = 0; i < 8; i++) @@ -301,11 +302,11 @@ u16 namcona1_state::custom_key_r(offs_t offset) return 0; } return machine().rand()&0xffff; -} /* custom_key_r */ +} void namcona1_state::custom_key_w(u16 data) { -} /* custom_key_w */ +} /***************************************************************/ @@ -357,12 +358,13 @@ int namcona1_state::transfer_dword(u32 dest, u32 source) return -1; } return 0; -} /* transfer_dword */ +} void namcona1_state::blit_setup(int format, int *bytes_per_row, int *pitch, int mode) { if (mode == 3) - { /* TILE DATA */ + { + /* TILE DATA */ switch (format) { case 0x0001: @@ -385,7 +387,8 @@ void namcona1_state::blit_setup(int format, int *bytes_per_row, int *pitch, int } } else - { /* SHAPE DATA */ + { + /* SHAPE DATA */ switch (format) { case 0x00bd: /* Numan Athletics */ @@ -428,7 +431,7 @@ void namcona1_state::blit_setup(int format, int *bytes_per_row, int *pitch, int break; } } -} /* blit_setup */ +} void namcona1_state::blit() { @@ -505,7 +508,7 @@ void namcona1_state::blit() src_offset = 0; } } -} /* blit */ +} void namcona1_state::vreg_w(offs_t offset, u16 data, u16 mem_mask) { @@ -542,7 +545,7 @@ void namcona1_state::vreg_w(offs_t offset, u16 data, u16 mem_mask) } break; } -} /* vreg_w */ +} /***************************************************************/ diff --git a/src/mame/namco/namcona1.h b/src/mame/namco/namcona1.h index e8d492171e244..4b22bb24281eb 100644 --- a/src/mame/namco/namcona1.h +++ b/src/mame/namco/namcona1.h @@ -64,7 +64,6 @@ class namcona1_state : public driver_device virtual void machine_start() override ATTR_COLD; virtual void machine_reset() override ATTR_COLD; virtual void video_start() override ATTR_COLD; - virtual void device_post_load() override; TIMER_CALLBACK_MEMBER(set_scanline_interrupt); void scanline_interrupt(int scanline); diff --git a/src/mame/namco/namcona1_v.cpp b/src/mame/namco/namcona1_v.cpp index 7de7d66ba8123..5f51f9f3cb1ad 100644 --- a/src/mame/namco/namcona1_v.cpp +++ b/src/mame/namco/namcona1_v.cpp @@ -41,7 +41,7 @@ void namcona1_state::tilemap_get_info( tileinfo.set(gfx, tile, color, 0); tileinfo.mask_data = &m_shaperam[tile << 3]; } -} /* tilemap_get_info */ +} TILE_GET_INFO_MEMBER(namcona1_state::tilemap_get_info0) { @@ -83,7 +83,7 @@ TILE_GET_INFO_MEMBER(namcona1_state::roz_get_info) tileinfo.set(gfx, tile, color, 0); tileinfo.mask_data = &m_shaperam[tile << 3]; } -} /* roz_get_info */ +} /*************************************************************************/ @@ -107,7 +107,7 @@ void namcona1_state::videoram_w(offs_t offset, u16 data, u16 mem_mask) } } } -} /* videoram_w */ +} /*************************************************************************/ @@ -132,7 +132,8 @@ void namcona1_state::paletteram_w(offs_t offset, u16 data, u16 mem_mask) { COMBINE_DATA(&m_paletteram[offset]); if (m_vreg[0x8e / 2]) - { /* graphics enabled; update palette immediately */ + { + /* graphics enabled; update palette immediately */ update_palette(offset); } else @@ -158,7 +159,7 @@ u16 namcona1_state::gfxram_r(offs_t offset) return m_cgram[offset]; } return 0x0000; -} /* gfxram_r */ +} void namcona1_state::gfxram_w(offs_t offset, u16 data, u16 mem_mask) { @@ -186,7 +187,7 @@ void namcona1_state::gfxram_w(offs_t offset, u16 data, u16 mem_mask) m_gfxdecode->gfx(1)->mark_dirty(offset >> 5); } } -} /* gfxram_w */ +} void namcona1_state::video_start() { @@ -205,12 +206,6 @@ void namcona1_state::video_start() save_item(NAME(m_shaperam)); save_item(NAME(m_palette_is_dirty)); -} /* video_start */ - -void namcona1_state::device_post_load() -{ - for (int i = 0; i < 3; i++) - m_gfxdecode->gfx(i)->mark_all_dirty(); } @@ -268,31 +263,36 @@ void namcona1_state::pdraw_tile( } if (sx < clip.min_x) - { /* clip left */ + { + /* clip left */ int pixels = clip.min_x - sx; sx += pixels; x_index_base += pixels * dx; } if (sy < clip.min_y) - { /* clip top */ + { + /* clip top */ int pixels = clip.min_y - sy; sy += pixels; y_index += pixels * dy; } /* NS 980211 - fixed incorrect clipping */ if (ex > clip.max_x + 1) - { /* clip right */ + { + /* clip right */ int pixels = ex - clip.max_x - 1; ex -= pixels; } if (ey > clip.max_y + 1) - { /* clip bottom */ + { + /* clip bottom */ int pixels = ey - clip.max_y - 1; ey -= pixels; } if (ex > sx) - { /* skip if inner loop doesn't draw anything */ + { + /* skip if inner loop doesn't draw anything */ for (int y = sy; y < ey; y++) { u8 const *const source = source_base + y_index * gfx->rowbytes(); @@ -348,7 +348,7 @@ void namcona1_state::pdraw_tile( y_index += dy; } } -} /* pdraw_tile */ +} void namcona1_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { @@ -358,7 +358,8 @@ void namcona1_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, c if (sprite_control & 1) source += 0x400; /* alternate spriteram bank */ for (int which = 0; which < 0x100; which++) - { /* max 256 sprites */ + { + /* max 256 sprites */ int bpp4,palbase; const u16 ypos = source[0]; /* FHHH---Y YYYYYYYY flipy, height, ypos */ const u16 tile = source[1]; /* O???TTTT TTTTTTTT opaque tile */ @@ -423,7 +424,7 @@ void namcona1_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, c } /* next row */ source += 4; } -} /* draw_sprites */ +} void namcona1_state::draw_pixel_line(const rectangle &cliprect, u16 *pDest, u8 *pPri, u16 *pSource, const pen_t *paldata) { @@ -437,7 +438,7 @@ void namcona1_state::draw_pixel_line(const rectangle &cliprect, u16 *pDest, u8 * if (x+1 >= cliprect.min_x && x+1 <= cliprect.max_x) pDest[x+1] = paldata[data&0xff]; } /* next x */ -} /* draw_pixel_line */ +} void namcona1_state::draw_background(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int which, int primask) { @@ -520,7 +521,7 @@ void namcona1_state::draw_background(screen_device &screen, bitmap_ind16 &bitmap } } } -} /* draw_background */ +} // CRTC safety checks bool namcona1_state::screen_enabled(const rectangle &cliprect) diff --git a/src/mame/namco/namconb1.cpp b/src/mame/namco/namconb1.cpp index 449b44e593dce..0b1631abec2c9 100644 --- a/src/mame/namco/namconb1.cpp +++ b/src/mame/namco/namconb1.cpp @@ -2044,7 +2044,7 @@ ROM_END /***************************************************************/ -/* YEAR, NAME, PARENT, MACHINE, INPUT, CLASS, INIT, MONITOR,COMPANY,FULLNAME, FLAGS */ +/* YEAR, NAME, PARENT, MACHINE, INPUT, CLASS, INIT, MONITOR,COMPANY,FULLNAME, FLAGS */ GAME( 1994, nebulray, 0, namconb1, namconb1, namconb1_state, init_nebulray, ROT90, "Namco", "Nebulas Ray (World, NR2)", MACHINE_SUPPORTS_SAVE ) GAME( 1994, nebulrayj, nebulray, namconb1, namconb1, namconb1_state, init_nebulray, ROT90, "Namco", "Nebulas Ray (Japan, NR1)", MACHINE_SUPPORTS_SAVE ) GAME( 1994, nebulrayp, nebulray, namconb1, namconb1, namconb1_state, init_nebulray, ROT90, "Namco", "Nebulas Ray (prototype)", MACHINE_SUPPORTS_SAVE ) @@ -2060,9 +2060,9 @@ GAME( 1996, sws96, 0, namconb1, namconb1, namconb1_state, init_sws96 GAME( 1997, sws97, 0, namconb1, namconb1, namconb1_state, init_sws97, ROT0, "Namco", "Super World Stadium '97 (Japan)", MACHINE_SUPPORTS_SAVE ) GAME( 1994, vshoot, 0, namconb1, namconb1, namconb1_state, init_vshoot, ROT0, "Namco", "J-League Soccer V-Shoot (Japan)", MACHINE_SUPPORTS_SAVE ) -GAME( 1994, outfxies, 0, outfxies, namconb1, namconb2_state, init_outfxies, ROT0, "Namco", "The Outfoxies (World, OU2)", MACHINE_SUPPORTS_SAVE ) -GAME( 1994, outfxiesj, outfxies, outfxies, namconb1, namconb2_state, init_outfxies, ROT0, "Namco", "The Outfoxies (Japan, OU1)", MACHINE_SUPPORTS_SAVE ) -GAME( 1994, outfxiesja, outfxies, machbrkr, namconb1, namconb2_state, init_outfxies, ROT0, "Namco", "The Outfoxies (Japan, OU1, alternate GFX ROMs)", MACHINE_SUPPORTS_SAVE ) // GFX ROMs are different and are in the same format as the Mach Breakers ones -GAME( 1994, outfxiesa, outfxies, outfxies, namconb1, namconb2_state, init_outfxies, ROT0, "Namco", "The Outfoxies (Korea?)", MACHINE_SUPPORTS_SAVE ) -GAME( 1995, machbrkr, 0, machbrkr, namconb1, namconb2_state, init_machbrkr, ROT0, "Namco", "Mach Breakers (World, MB2)", MACHINE_SUPPORTS_SAVE ) /* Title screen doesn't show subtitle "Numan Athletics 2" */ -GAME( 1995, machbrkrj, machbrkr, machbrkr, namconb1, namconb2_state, init_machbrkr, ROT0, "Namco", "Mach Breakers - Numan Athletics 2 (Japan, MB1)", MACHINE_SUPPORTS_SAVE ) +GAME( 1994, outfxies, 0, outfxies, namconb1, namconb2_state, init_outfxies, ROT0, "Namco", "The Outfoxies (World, OU2)", MACHINE_SUPPORTS_SAVE ) +GAME( 1994, outfxiesj, outfxies, outfxies, namconb1, namconb2_state, init_outfxies, ROT0, "Namco", "The Outfoxies (Japan, OU1)", MACHINE_SUPPORTS_SAVE ) +GAME( 1994, outfxiesja, outfxies, machbrkr, namconb1, namconb2_state, init_outfxies, ROT0, "Namco", "The Outfoxies (Japan, OU1, alternate GFX ROMs)", MACHINE_SUPPORTS_SAVE ) // GFX ROMs are different and are in the same format as the Mach Breakers ones +GAME( 1994, outfxiesa, outfxies, outfxies, namconb1, namconb2_state, init_outfxies, ROT0, "Namco", "The Outfoxies (Korea?)", MACHINE_SUPPORTS_SAVE ) +GAME( 1995, machbrkr, 0, machbrkr, namconb1, namconb2_state, init_machbrkr, ROT0, "Namco", "Mach Breakers (World, MB2)", MACHINE_SUPPORTS_SAVE ) // Title screen doesn't show subtitle "Numan Athletics 2" +GAME( 1995, machbrkrj, machbrkr, machbrkr, namconb1, namconb2_state, init_machbrkr, ROT0, "Namco", "Mach Breakers - Numan Athletics 2 (Japan, MB1)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/namco/namcond1.cpp b/src/mame/namco/namcond1.cpp index c60ad3300c4d9..214e15f8679f6 100644 --- a/src/mame/namco/namcond1.cpp +++ b/src/mame/namco/namcond1.cpp @@ -553,7 +553,7 @@ ROM_START( ncv1 ) ROM_LOAD( "nc1sub.1c", 0x00000, 0x80000, CRC(48ea0de2) SHA1(33e57c8d084a960ccbda462d18e355de44ec7ad9) ) ROM_REGION( 0x800000, "ygv608", 0 ) // 2MB character generator - ROM_LOAD( "nc1cg0.10c", 0x000000, 0x200000, CRC(355e7f29) SHA1(47d92c4e28c3610a620d3c9b3be558199477f6d8) ) + ROM_LOAD( "nc1cg0.10c", 0x000000, 0x200000, CRC(d4383199) SHA1(3263874ba838651631ad6d11afb150206de760bb) ) ROM_RELOAD( 0x200000, 0x200000 ) ROM_RELOAD( 0x400000, 0x200000 ) ROM_RELOAD( 0x600000, 0x200000 ) @@ -571,7 +571,7 @@ ROM_START( ncv1j ) ROM_LOAD( "nc1sub.1c", 0x00000, 0x80000, CRC(48ea0de2) SHA1(33e57c8d084a960ccbda462d18e355de44ec7ad9) ) ROM_REGION( 0x800000, "ygv608", 0 ) // 2MB character generator - ROM_LOAD( "nc1cg0.10c", 0x000000, 0x200000, CRC(355e7f29) SHA1(47d92c4e28c3610a620d3c9b3be558199477f6d8) ) + ROM_LOAD( "nc1cg0.10c", 0x000000, 0x200000, CRC(d4383199) SHA1(3263874ba838651631ad6d11afb150206de760bb) ) ROM_RELOAD( 0x200000, 0x200000 ) ROM_RELOAD( 0x400000, 0x200000 ) ROM_RELOAD( 0x600000, 0x200000 ) @@ -589,7 +589,7 @@ ROM_START( ncv1j2 ) ROM_LOAD( "nc1sub.1c", 0x00000, 0x80000, CRC(48ea0de2) SHA1(33e57c8d084a960ccbda462d18e355de44ec7ad9) ) ROM_REGION( 0x800000, "ygv608", 0 ) // 2MB character generator - ROM_LOAD( "nc1cg0.10c", 0x000000, 0x200000, CRC(355e7f29) SHA1(47d92c4e28c3610a620d3c9b3be558199477f6d8) ) + ROM_LOAD( "nc1cg0.10c", 0x000000, 0x200000, CRC(d4383199) SHA1(3263874ba838651631ad6d11afb150206de760bb) ) ROM_RELOAD( 0x200000, 0x200000 ) ROM_RELOAD( 0x400000, 0x200000 ) ROM_RELOAD( 0x600000, 0x200000 ) diff --git a/src/mame/namco/namcos1.cpp b/src/mame/namco/namcos1.cpp index 1350b6c73b0e0..ecd7ccb4da557 100644 --- a/src/mame/namco/namcos1.cpp +++ b/src/mame/namco/namcos1.cpp @@ -196,10 +196,9 @@ Vernon C. Brooks, Acho A. Tang, Nicola Salmoria, Alex W. Jackson RAM is cleared on purpose during boot and there is no default. - bakutotu: - The main and sub processors work closely together and the game - quickly runs into trouble when one of them lacks behind. Heavy - sync and overclocking will help but there's a particularly nasty - loop appearing in more than 40 places of the code: + The main and sub processors work closely together and the game quickly runs into + trouble when one of them lags behind. Heavy sync and overclocking will help but + there's a particularly nasty loop appearing in more than 40 places of the code: 1) kick the watchdog 2) raise a flag @@ -419,11 +418,12 @@ void namcos1_state::virtual_map(address_map &map) void namcos1_state::sound_map(address_map &map) { - map(0x0000, 0x3fff).bankr(m_soundbank); /* Banked ROMs */ + map(0x0000, 0x3fff).bankr(m_soundbank); /* Banked ROMs */ map(0x4000, 0x4001).rw("ymsnd", FUNC(ym2151_device::status_r), FUNC(ym2151_device::write)); - map(0x5000, 0x53ff).rw("namco", FUNC(namco_cus30_device::namcos1_cus30_r), FUNC(namco_cus30_device::namcos1_cus30_w)).mirror(0x400); /* PSG ( Shared ) */ - map(0x7000, 0x77ff).ram().share(m_triram); + map(0x5000, 0x53ff).rw("namco", FUNC(namco_cus30_device::namcos1_cus30_r), FUNC(namco_cus30_device::namcos1_cus30_w)).mirror(0xc00); /* PSG ( Shared ) */ + map(0x7000, 0x77ff).ram().share(m_triram).mirror(0x800); map(0x8000, 0x9fff).ram(); /* Sound RAM 3 */ + map(0xa000, 0xa000).nopr(); map(0xc000, 0xc001).w(FUNC(namcos1_state::sound_bankswitch_w)); /* ROM bank selector */ map(0xd001, 0xd001).w(m_c117, FUNC(namco_c117_device::sound_watchdog_w)); map(0xe000, 0xe000).w(FUNC(namcos1_state::audiocpu_irq_ack_w)); @@ -493,7 +493,7 @@ static INPUT_PORTS_START( ns1 ) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* OUT:coin counter 2 */ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Service Button") PORT_CODE(KEYCODE_F1) // service switch from the edge connector + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Service Button") PORT_CODE(KEYCODE_F1) // service switch from the edge connector PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) INPUT_PORTS_END diff --git a/src/mame/namco/namcos1_m.cpp b/src/mame/namco/namcos1_m.cpp index 83e9e63d1a2e4..a55b229d54eda 100644 --- a/src/mame/namco/namcos1_m.cpp +++ b/src/mame/namco/namcos1_m.cpp @@ -132,7 +132,7 @@ CPU #0 PC e3d4: keychip read 0003 [AND #$37 = key no.] */ u8 namcos1_state::key_type1_r(offs_t offset) { -// logerror("%s: keychip read %04x\n", machine().describe_context(), offset); + //logerror("%s: keychip read %04x\n", machine().describe_context(), offset); if (offset < 3) { @@ -163,7 +163,7 @@ u8 namcos1_state::key_type1_r(offs_t offset) void namcos1_state::key_type1_w(offs_t offset, u8 data) { -// logerror("%s: keychip write %04x=%02x\n", machine().describe_context(), offset, data); + //logerror("%s: keychip write %04x=%02x\n", machine().describe_context(), offset, data); if (offset < 4) m_key[offset] = data; @@ -315,7 +315,7 @@ CPU #0 PC e574: keychip read 0001 u8 namcos1_state::key_type2_r(offs_t offset) { -// logerror("%s: keychip read %04x\n", machine().describe_context(), offset); + //logerror("%s: keychip read %04x\n", machine().describe_context(), offset); m_key_numerator_high_word = 0; @@ -334,7 +334,7 @@ u8 namcos1_state::key_type2_r(offs_t offset) void namcos1_state::key_type2_w(offs_t offset, u8 data) { -// logerror("%s: keychip write %04x=%02x\n", machine().describe_context(), offset, data); + //logerror("%s: keychip write %04x=%02x\n", machine().describe_context(), offset, data); if (offset < 5) { @@ -356,7 +356,7 @@ void namcos1_state::key_type2_w(offs_t offset, u8 data) m_key_reminder = 0x0000; } -// logerror("calculating division: %08x / %04x = %04x, %04x\n", n, d, key_quotient, m_key_reminder); + //logerror("calculating division: %08x / %04x = %04x, %04x\n", n, d, key_quotient, m_key_reminder); m_key_numerator_high_word = (m_key[2] << 8) | m_key[3]; } @@ -441,7 +441,7 @@ CPU #0 PC e45a: keychip read 0030 [discarded] u8 namcos1_state::key_type3_r(offs_t offset) { -// logerror("%s: keychip read %04x\n", machine().describe_context(), offset); + //logerror("%s: keychip read %04x\n", machine().describe_context(), offset); /* I need to handle blastoff's read from 0858. The game previously writes to 0858, using it as temporary storage, so maybe it expects to act as RAM, however @@ -465,7 +465,7 @@ u8 namcos1_state::key_type3_r(offs_t offset) void namcos1_state::key_type3_w(offs_t offset, u8 data) { -// logerror("%s: keychip write %04x=%02x\n", machine().describe_context(), offset, data); + //logerror("%s: keychip write %04x=%02x\n", machine().describe_context(), offset, data); m_key[(offset & 0x70) >> 4] = data; } @@ -493,7 +493,8 @@ void namcos1_state::sound_bankswitch_w(u8 data) void namcos1_state::subres_w(int state) { -// logerror("reset control %s %02x\n",machine().describe_context(),data); + //logerror("reset control %s %02x\n",machine().describe_context(),data); + if (state != m_reset) { m_mcu_patch_data = 0; @@ -593,6 +594,7 @@ void namcos1_state::mcu_bankswitch_w(u8 data) void namcos1_state::mcu_patch_w(u8 data) { //logerror("mcu C000 write %s data=%02x\n",machine().describe_context(),data); + if (m_mcu_patch_data == 0xa6) return; m_mcu_patch_data = data; m_triram[0] = data; @@ -608,7 +610,7 @@ void namcos1_state::mcu_patch_w(u8 data) void namcos1_state::driver_init() { // bit 16 of the address is inverted for PRG7 (and bits 17,18 just not connected) - for (int i = 0x380000;i < 0x400000;i++) + for (int i = 0x380000; i < 0x400000; i++) { if ((i & 0x010000) == 0) { diff --git a/src/mame/namco/namcos1_v.cpp b/src/mame/namco/namcos1_v.cpp index 1b5e8250d029c..b8ce4399293bf 100644 --- a/src/mame/namco/namcos1_v.cpp +++ b/src/mame/namco/namcos1_v.cpp @@ -68,15 +68,15 @@ void namcos1_state::TilemapCB(u16 code, int &tile, int &mask) void namcos1_state::video_start() { - /* set table for sprite color == 0x7f */ + // set table for sprite color == 0x7f for (int i = 0; i < 15; i++) m_drawmode_table[i] = DRAWMODE_SHADOW; m_drawmode_table[15] = DRAWMODE_NONE; - /* all palette entries are not affected by shadow sprites... */ + // all palette entries are not affected by shadow sprites... for (int i = 0; i < 0x2000; i++) m_c116->shadow_table()[i] = i; - /* ... except for tilemap colors */ + // ... except for tilemap colors for (int i = 0x0800; i < 0x1000; i++) m_c116->shadow_table()[i] = i + 0x0800; @@ -95,11 +95,11 @@ void namcos1_state::video_start() void namcos1_state::spriteram_w(offs_t offset, u8 data) { - /* 0000-07ff work ram */ - /* 0800-0fff sprite ram */ + // 0000-07ff work ram + // 0800-0fff sprite ram m_spriteram[offset] = data; - /* a write to this offset tells the sprite chip to buffer the sprite list */ + // a write to this offset tells the sprite chip to buffer the sprite list if (offset == 0x0ff2) m_copy_sprites = true; } @@ -135,7 +135,7 @@ sprite format: void namcos1_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { u8 *spriteram = m_spriteram + 0x800; - const u8 *source = &spriteram[0x800-0x20]; /* the last is NOT a sprite */ + const u8 *source = &spriteram[0x800-0x20]; // the last is NOT a sprite const u8 *finish = &spriteram[0]; gfx_element *gfx = m_gfxdecode->gfx(0); @@ -175,7 +175,7 @@ void namcos1_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, co flipy = !flipy; } - sy++; /* sprites are buffered and delayed by one scanline */ + sy++; // sprites are buffered and delayed by one scanline gfx->set_source_clip(tx, sizex, ty, sizey); if (color != 0x7f) @@ -207,14 +207,14 @@ u32 namcos1_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, co { rectangle new_clip = cliprect; - /* flip screen is embedded in the sprite control registers */ + // flip screen is embedded in the sprite control registers flip_screen_set(m_spriteram[0x0ff6] & 1); - /* background color */ + // background color bitmap.fill(m_c116->black_pen(), cliprect); - /* berabohm uses asymmetrical visibility windows to iris on the character */ - int i = m_c116->get_reg(0) - 1; // min x + // berabohm uses asymmetrical visibility windows to iris on the character + int i = m_c116->get_reg(0) - 1; // min x if (new_clip.min_x < i) new_clip.min_x = i; i = m_c116->get_reg(1) - 1 - 1; // max x if (new_clip.max_x > i) new_clip.max_x = i; @@ -230,8 +230,8 @@ u32 namcos1_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, co screen.priority().fill(0, new_clip); - /* bit 0-2 priority */ - /* bit 3 disable */ + // bit 0-2 priority + // bit 3 disable for (int priority = 0; priority < 8; priority++) { m_c123tmap->draw(screen, bitmap, new_clip, priority, priority, 0); @@ -244,9 +244,9 @@ u32 namcos1_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, co void namcos1_state::screen_vblank(int state) { - // rising edge if (state) { + // rising edge if (m_copy_sprites) { u8 *spriteram = m_spriteram + 0x800; @@ -259,8 +259,14 @@ void namcos1_state::screen_vblank(int state) m_copy_sprites = false; } + m_maincpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE); m_subcpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE); + } + else + { + // falling edge + // splatter 2nd bossfight music fails if audiocpu irq is at the same time as main/sub irq m_audiocpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE); m_mcu->set_input_line(HD6301_IRQ1_LINE, ASSERT_LINE); } diff --git a/src/mame/namco/namcos22.cpp b/src/mame/namco/namcos22.cpp index 304d615485bf1..e44cc4d40a07a 100644 --- a/src/mame/namco/namcos22.cpp +++ b/src/mame/namco/namcos22.cpp @@ -3598,12 +3598,12 @@ static const gfx_layout namcos22_cg_layout = static GFXLAYOUT_RAW(sprite_layout, 32, 32, 32*8, 32*32*8) static GFXDECODE_START( gfx_namcos22 ) - GFXDECODE_ENTRY( nullptr, 0, namcos22_cg_layout, 0, 0x800 ) + GFXDECODE_RAM( nullptr, 0, namcos22_cg_layout, 0, 0x800 ) GFXDECODE_ENTRY( "textile", 0, gfx_16x16x8_raw, 0, 0x80 ) GFXDECODE_END static GFXDECODE_START( gfx_super ) - GFXDECODE_ENTRY( nullptr, 0, namcos22_cg_layout, 0, 0x800 ) + GFXDECODE_RAM( nullptr, 0, namcos22_cg_layout, 0, 0x800 ) GFXDECODE_ENTRY( "textile", 0, gfx_16x16x8_raw, 0, 0x80 ) GFXDECODE_ENTRY( "sprite", 0, sprite_layout, 0, 0x80 ) GFXDECODE_END @@ -3618,11 +3618,6 @@ void namcos22_state::machine_reset() m_mcu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); } -void namcos22_state::device_post_load() -{ - m_gfxdecode->gfx(0)->mark_all_dirty(); -} - // allow save_item on a non-fundamental type ALLOW_SAVE_TYPE(namcos22_dsp_upload_state); diff --git a/src/mame/namco/namcos22.h b/src/mame/namco/namcos22.h index ed55756d944f2..2e2be7c4a1a01 100644 --- a/src/mame/namco/namcos22.h +++ b/src/mame/namco/namcos22.h @@ -275,7 +275,6 @@ class namcos22_state : public driver_device virtual void machine_reset() override ATTR_COLD; virtual void machine_start() override ATTR_COLD; virtual void video_start() override ATTR_COLD; - virtual void device_post_load() override; void namcos22_textram_w(offs_t offset, u32 data, u32 mem_mask = ~0); u16 namcos22_tilemapattr_r(offs_t offset); diff --git a/src/mame/namco/namcos23.cpp b/src/mame/namco/namcos23.cpp index dcba321cce72a..0cebfe9efae98 100644 --- a/src/mame/namco/namcos23.cpp +++ b/src/mame/namco/namcos23.cpp @@ -6117,12 +6117,12 @@ static const gfx_layout namcos23_cg_layout = static GFXLAYOUT_RAW(namcos23_sprite_layout, 32, 32, 32*8, 32*32*8) static GFXDECODE_START( gfx_namcos23 ) - GFXDECODE_ENTRY( nullptr, 0, namcos23_cg_layout, 0, 0x800 ) + GFXDECODE_RAM( nullptr, 0, namcos23_cg_layout, 0, 0x800 ) GFXDECODE_ENTRY( "textile", 0, gfx_16x16x8_raw, 0, 0x80 ) GFXDECODE_END static GFXDECODE_START( gfx_gorgon ) - GFXDECODE_ENTRY( nullptr, 0, namcos23_cg_layout, 0, 0x800 ) + GFXDECODE_RAM( nullptr, 0, namcos23_cg_layout, 0, 0x800 ) GFXDECODE_ENTRY( "textile", 0, gfx_16x16x8_raw, 0, 0x80 ) GFXDECODE_ENTRY( "sprites", 0, namcos23_sprite_layout, 0, 0x80 ) GFXDECODE_END diff --git a/src/mame/namco/skykid.cpp b/src/mame/namco/skykid.cpp index d14c7e0c9437d..dc8dd92f3cba2 100644 --- a/src/mame/namco/skykid.cpp +++ b/src/mame/namco/skykid.cpp @@ -578,9 +578,9 @@ static INPUT_PORTS_START( drgnbstr ) PORT_SERVICE_DIPLOC( 0x80, IP_ACTIVE_LOW, "SWA:1" ) PORT_START("DSWB") - PORT_DIPNAME( 0x01, 0x01, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SWB:8") // Does not work? - PORT_DIPSETTING( 0x01, DEF_STR( No ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Yes ) ) + PORT_DIPNAME( 0x01, 0x01, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SWB:8") // When vitality is under 32 + PORT_DIPSETTING( 0x00, DEF_STR( No ) ) + PORT_DIPSETTING( 0x01, DEF_STR( Yes ) ) PORT_DIPNAME( 0x02, 0x02, "Bonus Level" ) PORT_DIPLOCATION("SWB:7") // Clear Round PORT_DIPSETTING( 0x00, "Partial" ) PORT_DIPSETTING( 0x02, "Full" ) diff --git a/src/mame/nec/pc88va.cpp b/src/mame/nec/pc88va.cpp index f401d5484d21e..4513506a2b91e 100644 --- a/src/mame/nec/pc88va.cpp +++ b/src/mame/nec/pc88va.cpp @@ -952,8 +952,8 @@ static const gfx_layout pc88va_kanji_16x16 = static GFXDECODE_START( gfx_pc88va ) GFXDECODE_ENTRY( "kanji", 0x00000, pc88va_chars_8x8, 0, 16 ) GFXDECODE_ENTRY( "kanji", 0x00000, pc88va_chars_16x16, 0, 16 ) - GFXDECODE_ENTRY( nullptr, 0x00000, pc88va_kanji_8x8, 0, 16 ) - GFXDECODE_ENTRY( nullptr, 0x00000, pc88va_kanji_16x16, 0, 16 ) + GFXDECODE_RAM( nullptr, 0x00000, pc88va_kanji_8x8, 0, 16 ) + GFXDECODE_RAM( nullptr, 0x00000, pc88va_kanji_16x16, 0, 16 ) GFXDECODE_END diff --git a/src/mame/netronics/elf.cpp b/src/mame/netronics/elf.cpp index 60d7c7d54fc47..9be0c506a21aa 100644 --- a/src/mame/netronics/elf.cpp +++ b/src/mame/netronics/elf.cpp @@ -9,8 +9,11 @@ /* TODO: - + - Problem with DMA: open MAME debugger to see RAM, set LOAD, input a value, + and it will write twice. It is because set_input_line is delayed until + the CPU finished execute_run after sc_w. - proper layout + - add cassette I/O */ @@ -20,18 +23,12 @@ #include "speaker.h" #include "elf2.lh" -#define RUN \ - BIT(m_special->read(), 0) - #define LOAD \ BIT(m_special->read(), 1) #define MEMORY_PROTECT \ BIT(m_special->read(), 2) -#define INPUT \ - BIT(m_special->read(), 3) - /* Read/Write Handlers */ uint8_t elf2_state::dispon_r() @@ -92,13 +89,18 @@ void elf2_state::elf2_io(address_map &map) /* Input Ports */ -INPUT_CHANGED_MEMBER( elf2_state::input_w ) +INPUT_CHANGED_MEMBER(elf2_state::load_w) { - if (newval) - { - /* assert DMAIN */ + /* DMAIN is reset while LOAD is off */ + if (!newval) + m_maincpu->set_input_line(COSMAC_INPUT_LINE_DMAIN, CLEAR_LINE); +} + +INPUT_CHANGED_MEMBER(elf2_state::input_w) +{ + /* assert DMAIN */ + if (LOAD && !newval && ~m_sc & 2) m_maincpu->set_input_line(COSMAC_INPUT_LINE_DMAIN, ASSERT_LINE); - } } static INPUT_PORTS_START( elf2 ) @@ -132,33 +134,13 @@ static INPUT_PORTS_START( elf2 ) PORT_START("SPECIAL") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("RUN") PORT_CODE(KEYCODE_R) PORT_TOGGLE - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("LOAD") PORT_CODE(KEYCODE_L) PORT_TOGGLE + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("LOAD") PORT_CODE(KEYCODE_L) PORT_TOGGLE PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(elf2_state::load_w), 0) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("M/P") PORT_CODE(KEYCODE_M) PORT_TOGGLE - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("INPUT") PORT_CODE(KEYCODE_ENTER) PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(elf2_state::input_w), 0) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("IN") PORT_CODE(KEYCODE_ENTER) PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(elf2_state::input_w), 0) INPUT_PORTS_END /* CDP1802 Configuration */ -int elf2_state::wait_r() -{ - return LOAD; -} - -int elf2_state::clear_r() -{ - return RUN; -} - -int elf2_state::ef4_r() -{ - return INPUT; -} - -void elf2_state::q_w(int state) -{ - m_led = state ? 1 : 0; -} - uint8_t elf2_state::dma_r() { return m_data; @@ -166,17 +148,11 @@ uint8_t elf2_state::dma_r() void elf2_state::sc_w(uint8_t data) { - switch (data) - { - case COSMAC_STATE_CODE_S2_DMA: - case COSMAC_STATE_CODE_S3_INTERRUPT: - /* clear DMAIN */ + /* DMAIN is reset while SC1 is high */ + if (data & 2) m_maincpu->set_input_line(COSMAC_INPUT_LINE_DMAIN, CLEAR_LINE); - break; - default: - break; - } + m_sc = data; } /* MM74C923 Interface */ @@ -204,19 +180,13 @@ void elf2_state::machine_start() { address_space &program = m_maincpu->space(AS_PROGRAM); - m_led.resolve(); - - /* initialize LED displays */ - m_7segs.resolve(); - m_led_l->rbi_w(1); - m_led_h->rbi_w(1); - /* setup memory banking */ program.install_rom(0x0000, 0x00ff, m_ram->pointer()); program.install_write_handler(0x0000, 0x00ff, write8sm_delegate(*this, FUNC(elf2_state::memory_w))); /* register for state saving */ save_item(NAME(m_data)); + save_item(NAME(m_sc)); } /* Machine Driver */ @@ -241,10 +211,10 @@ void elf2_state::elf2(machine_config &config) CDP1802(config, m_maincpu, XTAL(3'579'545)/2); m_maincpu->set_addrmap(AS_PROGRAM, &elf2_state::elf2_mem); m_maincpu->set_addrmap(AS_IO, &elf2_state::elf2_io); - m_maincpu->wait_cb().set(FUNC(elf2_state::wait_r)); - m_maincpu->clear_cb().set(FUNC(elf2_state::clear_r)); - m_maincpu->ef4_cb().set(FUNC(elf2_state::ef4_r)); - m_maincpu->q_cb().set(FUNC(elf2_state::q_w)); + m_maincpu->wait_cb().set_ioport("SPECIAL").bit(1).invert(); + m_maincpu->clear_cb().set_ioport("SPECIAL").bit(0); + m_maincpu->ef4_cb().set_ioport("SPECIAL").bit(3); + m_maincpu->q_cb().set_output("led0"); m_maincpu->dma_rd_cb().set(FUNC(elf2_state::dma_r)); m_maincpu->dma_wr_cb().set(m_vdc, FUNC(cdp1861_device::dma_w)); m_maincpu->sc_cb().set(FUNC(elf2_state::sc_w)); @@ -254,7 +224,7 @@ void elf2_state::elf2(machine_config &config) CDP1861(config, m_vdc, XTAL(3'579'545)/2).set_screen(SCREEN_TAG); m_vdc->int_cb().set_inputline(m_maincpu, COSMAC_INPUT_LINE_INT); - m_vdc->dma_out_cb().set_inputline(m_maincpu, COSMAC_INPUT_LINE_DMAOUT); + m_vdc->dma_out_cb().set_inputline(m_maincpu, COSMAC_INPUT_LINE_DMAOUT); m_vdc->efx_cb().set_inputline(m_maincpu, COSMAC_INPUT_LINE_EF1); SCREEN(config, SCREEN_TAG, SCREEN_TYPE_RASTER); @@ -268,8 +238,8 @@ void elf2_state::elf2(machine_config &config) m_kb->x3_rd_callback().set_ioport("X3"); m_kb->x4_rd_callback().set_ioport("X4"); - DM9368(config, m_led_h, 0).update_cb().set(FUNC(elf2_state::digit_w<0>)); - DM9368(config, m_led_l, 0).update_cb().set(FUNC(elf2_state::digit_w<1>)); + DM9368(config, m_led_h).update_cb().set_output("digit0"); + DM9368(config, m_led_l).update_cb().set_output("digit1"); SPEAKER(config, "mono").front_center(); @@ -292,4 +262,4 @@ ROM_END /* System Drivers */ // YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS -COMP( 1978, elf2, 0, 0, elf2, elf2, elf2_state, empty_init, "Netronics", "Elf II", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND) +COMP( 1978, elf2, 0, 0, elf2, elf2, elf2_state, empty_init, "Netronics", "Elf II", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW ) diff --git a/src/mame/netronics/elf.h b/src/mame/netronics/elf.h index fa417950b8529..5ace7a8138e21 100644 --- a/src/mame/netronics/elf.h +++ b/src/mame/netronics/elf.h @@ -35,34 +35,29 @@ class elf2_state : public driver_device , m_cassette(*this, "cassette") , m_ram(*this, RAM_TAG) , m_special(*this, "SPECIAL") - , m_7segs(*this, "digit%u", 0U) - , m_led(*this, "led0") { } void elf2(machine_config &config); - DECLARE_INPUT_CHANGED_MEMBER( input_w ); + DECLARE_INPUT_CHANGED_MEMBER(load_w); + DECLARE_INPUT_CHANGED_MEMBER(input_w); + +protected: + virtual void machine_start() override ATTR_COLD; private: uint8_t dispon_r(); uint8_t data_r(); void data_w(uint8_t data); void memory_w(offs_t offset, uint8_t data); - int wait_r(); - int clear_r(); - int ef4_r(); - void q_w(int state); uint8_t dma_r(); void sc_w(uint8_t data); void da_w(int state); - template void digit_w(uint8_t data) { m_7segs[N] = data; } - DECLARE_QUICKLOAD_LOAD_MEMBER( quickload_cb ); + DECLARE_QUICKLOAD_LOAD_MEMBER(quickload_cb); void elf2_io(address_map &map) ATTR_COLD; void elf2_mem(address_map &map) ATTR_COLD; - virtual void machine_start() override ATTR_COLD; - required_device m_maincpu; required_device m_vdc; required_device m_kb; @@ -71,11 +66,10 @@ class elf2_state : public driver_device required_device m_cassette; required_device m_ram; required_ioport m_special; - output_finder<2> m_7segs; - output_finder<> m_led; - // display state + // internal state uint8_t m_data = 0; + uint8_t m_sc = 0; }; #endif // MAME_NETRONICS_ELF_H diff --git a/src/mame/nichibutsu/nbmj8688.cpp b/src/mame/nichibutsu/nbmj8688.cpp index 725ef41a4dc82..53973aae8d595 100644 --- a/src/mame/nichibutsu/nbmj8688.cpp +++ b/src/mame/nichibutsu/nbmj8688.cpp @@ -3835,7 +3835,7 @@ ROM_START( otonano ) ROM_LOAD( "otona_13.bin", 0x0e0000, 0x20000, CRC(208dee43) SHA1(f154ac4dab929c6f610038dbbebcf5283258e553) ) ROM_END -ROM_START( mjcamera ) +ROM_START( mjcamerao ) ROM_REGION( 0x10000, "maincpu", 0 ) /* program */ ROM_LOAD( "mcam_01.bin", 0x00000, 0x10000, CRC(73d4b9ff) SHA1(219bc9617c14490d70bb3e28ab497dfd2ef01cf8) ) @@ -3987,4 +3987,4 @@ GAME( 1988, mjsikakc, mjsikaku, mjsikaku, mjsikaku, nbmj8688_state, empty GAME( 1988, mjsikakd, mjsikaku, mjsikaku, mjsikaku, nbmj8688_state, empty_init, ROT0, "Nichibutsu", "Mahjong Shikaku (Japan 880802)", MACHINE_SUPPORTS_SAVE ) GAME( 1988, mmsikaku, mjsikaku, mmsikaku, mmsikaku, nbmj8688_state, empty_init, ROT0, "Nichibutsu", "Mahjong Shikaku (Japan 880929, medal)", MACHINE_SUPPORTS_SAVE ) GAME( 1988, otonano, 0, otonano, otonano, nbmj8688_state, empty_init, ROT0, "Apple", "Otona no Mahjong (Japan 880628)", MACHINE_SUPPORTS_SAVE ) // おとなの麻雀 -GAME( 1988, mjcamera, 0, mjcamera, mjcamera, nbmj8688_state, init_mjcamera, ROT0, "Miki Syouji", "Mahjong Camera Kozou (set 1) (Japan 881109)", MACHINE_SUPPORTS_SAVE ) +GAME( 1988, mjcamerao,mjcamera, mjcamera, mjcamera, nbmj8688_state, init_mjcamera, ROT0, "Miki Syouji", "Mahjong Camera Kozou (Japan 881109, older hardware)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/nichibutsu/nbmj8891.cpp b/src/mame/nichibutsu/nbmj8891.cpp index ca6a2d02b6864..7e2e55e3062bf 100644 --- a/src/mame/nichibutsu/nbmj8891.cpp +++ b/src/mame/nichibutsu/nbmj8891.cpp @@ -11,8 +11,8 @@ Notes: -- mjcamerb and mmcamera is the medal version of mjcamera, however the - two don't run on the same hardware. mjcamera is in nbmj8688.cpp. +- mjcameram is the medal version of mjcamera. mjcamerao is a version of the + game on different hardware in nbmj8688.cpp. - In mjfocus(Medal Type), sometimes CPU's hands are forced out from the screen. This is correct behaviour. @@ -621,7 +621,7 @@ static INPUT_PORTS_START( hanamomo ) PORT_INCLUDE( nbmjcontrols ) INPUT_PORTS_END -static INPUT_PORTS_START( mjcamerb ) +static INPUT_PORTS_START( mjcamera ) PORT_START("DSWA") PORT_DIPNAME( 0x07, 0x07, DEF_STR( Difficulty ) ) PORT_DIPSETTING( 0x07, "1 (Easy)" ) @@ -687,7 +687,7 @@ static INPUT_PORTS_START( mjcamerb ) PORT_INCLUDE( nbmjcontrols ) INPUT_PORTS_END -static INPUT_PORTS_START( mmcamera ) +static INPUT_PORTS_START( mjcameram ) PORT_START("DSWA") PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) @@ -2254,7 +2254,7 @@ void nbmj8891_state::abunai(machine_config &config) } /* NBMJDRV2 */ -void nbmj8891_state::mjcamerb(machine_config &config) +void nbmj8891_state::mjcamera(machine_config &config) { gionbana(config); @@ -2270,7 +2270,7 @@ void nbmj8891_state::mjcamerb(machine_config &config) MCFG_VIDEO_START_OVERRIDE(nbmj8891_state,_1layer) } -void nbmj8891_state::mmcamera(machine_config &config) +void nbmj8891_state::mjcameram(machine_config &config) { gionbana(config); @@ -3119,6 +3119,29 @@ ROM_START( pairsten ) ROM_LOAD( "mask.f2", 0x00000, 0x40000, CRC(77ba1eaf) SHA1(bde55b4d2938f44fd07ff7d5b5a845f2ea64b4fc) ) // same as housemnq/5i.bin gfx data ROM_END +ROM_START( avmjts ) // GH1701 PCB + VCR tape controller PCB + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "c.3h", 0x00000, 0x10000, CRC(c3265f26) SHA1(4361fc8e6fb9ff84b2a59441bc1784fd5d084b90) ) + + ROM_REGION( 0x20000, "voice", 0 ) + ROM_LOAD( "b.2k", 0x00000, 0x10000, CRC(a57e449e) SHA1(11cfbcf28813253ad3c51867539195c86e7c51b4) ) + // 2j not populated + + ROM_REGION( 0xf0000, "gfx1", 0 ) + ROM_LOAD( "d.8c", 0x00000, 0x10000, CRC(9e109649) SHA1(b0e47c1ca3ccd954813d355afe1ae6664e811e0a) ) + ROM_LOAD( "e.8d", 0x10000, 0x10000, CRC(3b2b8d35) SHA1(8d5f20c1ebe1dc1773398046740b8f73049fb503) ) + ROM_LOAD( "f.8e", 0x20000, 0x10000, CRC(0db818c3) SHA1(2e00a32d33c9713c8aa91ea66a1a181a511a71e3) ) + ROM_LOAD( "g.8f", 0x30000, 0x10000, CRC(4e00c976) SHA1(72fa67bab145280e5a175b9e2b66795bbfbc41fa) ) + ROM_LOAD( "h.8h", 0x40000, 0x10000, CRC(a2f63dd6) SHA1(7469a68917a0553489fe70abdb81f761384fa6e3) ) + // 8k socketed but no ROM, everything else not populated + + ROM_REGION( 0x40000, "protection", 0 ) + ROM_LOAD( "mask.f2", 0x00000, 0x40000, CRC(2199e3e9) SHA1(965af4a29db4ff909dbeeebab1b828eb4f23f57e) ) + + DISK_REGION( "vhs" ) /* Video Home System tape */ + DISK_IMAGE_READONLY( "avmjts", 0, NO_DUMP ) +ROM_END + ROM_START( bananadr ) ROM_REGION( 0x10000, "maincpu", 0 ) /* program */ ROM_LOAD( "1.4h", 0x00000, 0x10000, CRC(a6344e0d) SHA1(ee8df28fb2f579d3eb10d8aa454c6289de4a9239) ) @@ -3339,7 +3362,7 @@ ROM_START( hanaojia ) ROM_LOAD( "hnoj_11.bin", 0x100000, 0x20000, CRC(bfe38671) SHA1(6c81864caab61ea60dfe446b390221bdcfb0895e) ) ROM_END -ROM_START( mjcamerb ) +ROM_START( mjcamera ) ROM_REGION( 0x10000, "maincpu", 0 ) /* program */ ROM_LOAD( "2.3h", 0x00000, 0x10000, CRC(3a0f110b) SHA1(8923136ed25ed91c90f93c3f75f5532ff8f9d420) ) @@ -3369,7 +3392,7 @@ ROM_START( mjcamerb ) ROM_LOAD( "mcam_m1.bin", 0x00000, 0x40000, CRC(f85c5b07) SHA1(0fc55e9b60ccc630a0d77862eb5e64a3ba366947) ) // same as housemnq/3i.bin gfx data ROM_END -ROM_START( mmcamera ) +ROM_START( mjcameram ) ROM_REGION( 0x10000, "maincpu", 0 ) /* program */ ROM_LOAD( "2.3ha", 0x00000, 0x10000, CRC(b6eed2cf) SHA1(87171ba9ba247e54244867f720738f9b88a1213e) ) @@ -3537,8 +3560,8 @@ GAME( 1989, abunai, 0, abunai, abunai, nbmj8891_state, empty_init, GAME( 1989, mjfocus, 0, mjfocus, mjfocus, nbmj8891_state, init_mjfocus, ROT0, "Nichibutsu", "Mahjong Focus (Japan 890313)", MACHINE_SUPPORTS_SAVE ) GAME( 1989, mjfocusm, mjfocus, mjfocusm, mjfocusm, nbmj8891_state, init_mjfocusm, ROT0, "Nichibutsu", "Mahjong Focus (Japan 890510, medal)", MACHINE_SUPPORTS_SAVE ) GAME( 1989, peepshow, mjfocus, mjfocus, mjfocus, nbmj8891_state, init_mjfocus, ROT0, "AC", "Nozokimeguri Mahjong Peep Show (Japan 890404)", MACHINE_SUPPORTS_SAVE ) -GAME( 1989, mjcamerb, 0, mjcamerb, mjcamerb, nbmj8891_state, empty_init, ROT0, "Miki Syouji", "Mahjong Camera Kozou (set 2) (Japan 881109)", MACHINE_SUPPORTS_SAVE ) -GAME( 1989, mmcamera, mjcamerb, mmcamera, mmcamera, nbmj8891_state, empty_init, ROT0, "Miki Syouji", "Mahjong Camera Kozou (Japan 890509, medal)", MACHINE_SUPPORTS_SAVE ) +GAME( 1989, mjcamera, 0, mjcamera, mjcamera, nbmj8891_state, empty_init, ROT0, "Miki Syouji", "Mahjong Camera Kozou (Japan 881109, newer hardware)", MACHINE_SUPPORTS_SAVE ) +GAME( 1989, mjcameram, mjcamera, mjcameram,mjcameram,nbmj8891_state, empty_init, ROT0, "Miki Syouji", "Mahjong Camera Kozou (Japan 890509, medal)", MACHINE_SUPPORTS_SAVE ) GAME( 1989, scandal, 0, scandal, scandal, nbmj8891_state, init_scandal, ROT0, "Nichibutsu", "Scandal Mahjong (Japan 890213)", MACHINE_SUPPORTS_SAVE ) GAME( 1989, scandalm, scandal, scandalm, scandalm, nbmj8891_state, empty_init, ROT0, "Nichibutsu", "Scandal Mahjong (Japan 890217, medal)", MACHINE_SUPPORTS_SAVE ) GAME( 1989, mgmen89, 0, mgmen89, mgmen89, nbmj8891_state, init_mgmen89, ROT0, "Nichibutsu", "Mahjong G-MEN'89 (Japan 890425)", MACHINE_SUPPORTS_SAVE ) @@ -3550,6 +3573,7 @@ GAME( 1990, mladyhtr, 0, mladyhtr, mladyhtr, nbmj8891_state, empty_init, GAME( 1990, chinmoku, 0, chinmoku, chinmoku, nbmj8891_state, empty_init, ROT0, "Nichibutsu", "Mahjong Chinmoku no Hentai (Japan 900511)", MACHINE_SUPPORTS_SAVE ) GAME( 1990, maiko, 0, maiko, maiko, nbmj8891_state, empty_init, ROT0, "Nichibutsu", "Maikobana (Japan 900802)", MACHINE_SUPPORTS_SAVE ) GAME( 1990, mmaiko, 0, mmaiko, mmaiko, nbmj8891_state, empty_init, ROT0, "Nichibutsu", "Maikobana (Japan 900911, medal)", MACHINE_SUPPORTS_SAVE ) +GAME( 1990, avmjts, 0, mjfocus, mjfocus, nbmj8891_state, init_mjfocus, ROT0, "Nichibutsu", "AV-Mahjong Two Shot (Japan Ver 1.00 1990/05/21)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) GAME( 1990, hnxmasev, 0, hnxmasev, maiko, nbmj8891_state, empty_init, ROT180, "Nichibutsu / AV Japan", "AV Hanafuda Hana no Christmas Eve (Japan 901204)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) GAME( 1990, hnageman, 0, hnageman, maiko, nbmj8891_state, empty_init, ROT180, "Nichibutsu / AV Japan", "AV Hanafuda Hana no Ageman (Japan 900716)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) GAME( 1990, club90s, 0, club90s, club90s, nbmj8891_state, empty_init, ROT0, "Nichibutsu", "Mahjong CLUB 90's (set 1) (Japan 900919)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/nichibutsu/nbmj8891.h b/src/mame/nichibutsu/nbmj8891.h index 1f34521b3465d..9c6df68908432 100644 --- a/src/mame/nichibutsu/nbmj8891.h +++ b/src/mame/nichibutsu/nbmj8891.h @@ -30,9 +30,9 @@ class nbmj8891_state : public driver_device void chinmoku(machine_config &config); void msjiken(machine_config &config); void hnageman(machine_config &config); - void mjcamerb(machine_config &config); + void mjcamera(machine_config &config); void mjnanpas(machine_config &config); - void mmcamera(machine_config &config); + void mjcameram(machine_config &config); void pairsnb(machine_config &config); void taiwanmb(machine_config &config); void hanaoji(machine_config &config); diff --git a/src/mame/nintendo/spacefb.cpp b/src/mame/nintendo/spacefb.cpp index f588c812fc73f..e5939d2ff452f 100644 --- a/src/mame/nintendo/spacefb.cpp +++ b/src/mame/nintendo/spacefb.cpp @@ -131,15 +131,17 @@ namespace { class spacefb_state : public driver_device { public: - spacefb_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), + spacefb_state(const machine_config &mconfig, device_type type, const char *tag) : + driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), m_audiocpu(*this, "audiocpu"), m_samples(*this, "samples"), m_screen(*this, "screen"), - m_videoram(*this, "videoram") { } + m_videoram(*this, "videoram") + { } void spacefb(machine_config &config); + void spacedem(machine_config &config); void spacefb_audio(machine_config &config); protected: @@ -148,8 +150,8 @@ class spacefb_state : public driver_device virtual void video_start() override ATTR_COLD; private: -// SPACEFB_PIXEL_CLOCK clocks the star generator circuit. The rest of the graphics -// use a clock half of SPACEFB_PIXEL_CLOCK, thus creating double width pixels. + // SPACEFB_PIXEL_CLOCK clocks the star generator circuit. The rest of the graphics + // use a clock half of SPACEFB_PIXEL_CLOCK, thus creating double width pixels. static constexpr int SPACEFB_MASTER_CLOCK = 20160000; static constexpr int SPACEFB_MAIN_CPU_CLOCK = 6000000 / 2; static constexpr int SPACEFB_AUDIO_CPU_CLOCK = 6000000; // this goes to X2, pixel clock goes to X1 @@ -168,6 +170,7 @@ class spacefb_state : public driver_device void spacefb_main_map(address_map &map) ATTR_COLD; void spacefb_main_io_map(address_map &map) ATTR_COLD; + void spacedem_main_io_map(address_map &map) ATTR_COLD; void spacefb_audio_map(address_map &map) ATTR_COLD; required_device m_maincpu; @@ -189,6 +192,7 @@ class spacefb_state : public driver_device void port_0_w(u8 data); void port_1_w(u8 data); void port_2_w(u8 data); + void spacedem_port_2_w(u8 data); u8 audio_p2_r(); u8 audio_t0_r(); u8 audio_t1_r(); @@ -288,7 +292,6 @@ void spacefb_state::spacefb_audio(machine_config &config) void spacefb_state::port_0_w(u8 data) { -// m_screen->update_now(); m_screen->update_partial(m_screen->vpos()); m_port_0 = data; } @@ -296,12 +299,21 @@ void spacefb_state::port_0_w(u8 data) void spacefb_state::port_2_w(u8 data) { -// m_screen->update_now(); m_screen->update_partial(m_screen->vpos()); m_port_2 = data; } +void spacefb_state::spacedem_port_2_w(u8 data) +{ + // bit 4 enables Epson 7910E melody chip + // TODO + + // rest is same as spacefb? + port_2_w(data & ~0x10); +} + + /************************************* * @@ -625,7 +637,6 @@ u32 spacefb_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, co * *************************************/ - TIMER_CALLBACK_MEMBER(spacefb_state::interrupt_callback) { int next_vpos; @@ -729,6 +740,12 @@ void spacefb_state::spacefb_main_io_map(address_map &map) map(0x03, 0x03).mirror(0x04).nopw(); } +void spacefb_state::spacedem_main_io_map(address_map &map) +{ + spacefb_main_io_map(map); + map(0x02, 0x02).mirror(0x04).w(FUNC(spacefb_state::spacedem_port_2_w)); +} + /************************************* @@ -840,6 +857,12 @@ void spacefb_state::spacefb(machine_config &config) spacefb_audio(config); } +void spacefb_state::spacedem(machine_config &config) +{ + spacefb(config); + m_maincpu->set_addrmap(AS_IO, &spacefb_state::spacedem_main_io_map); +} + /************************************* @@ -951,7 +974,6 @@ ROM_START( spacefba ) ROM_LOAD( "mb7051-a.3n", 0x0000, 0x0020, CRC(465d07af) SHA1(25e246f7674c25d05e5f6e68db88c15aaa10cee1) ) ROM_END - ROM_START( spacefbg ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "tst-c.5e", 0x0000, 0x0800, CRC(07949110) SHA1(b090e629203c54fc0937d82b0cfe355153a65d6b) ) @@ -1028,31 +1050,6 @@ ROM_START( spacefbb ) ROM_LOAD( "mb7051.3n", 0x0000, 0x0020, CRC(465d07af) SHA1(25e246f7674c25d05e5f6e68db88c15aaa10cee1) ) ROM_END -ROM_START( spacedem ) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "sdm-c-5e", 0x0000, 0x0800, CRC(be4b9cbb) SHA1(345ea1e56754e0c8300148b53346dbec50b3608e) ) - ROM_LOAD( "sdm-c-5f", 0x0800, 0x0800, CRC(0814f964) SHA1(0186d11ca98f4b2e4c2572db9d440456370275e7) ) - ROM_LOAD( "sdm-c-5h", 0x1000, 0x0800, CRC(ebfff682) SHA1(e060627de302a9ce125d939d9890739d2154a507) ) - ROM_LOAD( "sdm-c-5i", 0x1800, 0x0800, CRC(dd7e1378) SHA1(94a756036e7d03c42ee896b794cb1f8753a67b91) ) - ROM_LOAD( "sdm-c-5j", 0x2000, 0x0800, CRC(98334fda) SHA1(9990bbfb2aa4d953e531bb49eab1c3a999b78b9c) ) - ROM_LOAD( "sdm-c-5k", 0x2800, 0x0800, CRC(ba4933b2) SHA1(9e5003849185ea35b5929c9a8ae188a87bb522cc) ) - ROM_LOAD( "sdm-c-5m", 0x3000, 0x0800, CRC(14d3c656) SHA1(55522df8c2e484b8d5d4a32bf7cfb2b30dcdab4a) ) - ROM_LOAD( "sdm-c-5n", 0x3800, 0x0800, CRC(7e0e41b0) SHA1(e7dd509ab36e0f9be6350b5fa9de4694224477db) ) - - ROM_REGION( 0x1000, "audiocpu", 0 ) - ROM_LOAD( "sdm-e-20", 0x0000, 0x0400, CRC(55f40a0b) SHA1(8dff27b636f7f1831f71816505e451cf97fc3f98) ) - - ROM_REGION( 0x1000, "sprites", 0 ) - ROM_LOAD( "sdm-v-5k", 0x0000, 0x0800, CRC(55758e4d) SHA1(1338b45f76f5a31a5350c953eac36cc543fbe62e) ) - ROM_LOAD( "sdm-v-6k", 0x0800, 0x0800, CRC(3fcbb20c) SHA1(674de509f7b6c5d7c41112881b0c3093b9b176a0) ) - - ROM_REGION( 0x0100, "bullets", 0 ) - ROM_LOAD( "4i.vid", 0x0000, 0x0100, CRC(528e8533) SHA1(8e41eee1016c98a4f08acbd902daf8e32aa9d9ab) ) - - ROM_REGION( 0x0020, "proms", 0 ) - ROM_LOAD( "sdm-v-3n", 0x0000, 0x0020, CRC(6d8ad169) SHA1(6ccc931774183e14e28bb9b93223d366fd596f30) ) -ROM_END - ROM_START( starwarr ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "sw51.5e", 0x0000, 0x0800, CRC(a0f5e690) SHA1(03b81d88ef6c3eaf2d23f1526f02d4ae5ba569a1) ) @@ -1104,22 +1101,48 @@ ROM_START( redbird ) ROM_LOAD( "6331.m3", 0x0000, 0x0020, CRC(465d07af) SHA1(25e246f7674c25d05e5f6e68db88c15aaa10cee1) ) ROM_END +ROM_START( spacedem ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "sdm-c-5e", 0x0000, 0x0800, CRC(be4b9cbb) SHA1(345ea1e56754e0c8300148b53346dbec50b3608e) ) + ROM_LOAD( "sdm-c-5f", 0x0800, 0x0800, CRC(0814f964) SHA1(0186d11ca98f4b2e4c2572db9d440456370275e7) ) + ROM_LOAD( "sdm-c-5h", 0x1000, 0x0800, CRC(ebfff682) SHA1(e060627de302a9ce125d939d9890739d2154a507) ) + ROM_LOAD( "sdm-c-5i", 0x1800, 0x0800, CRC(dd7e1378) SHA1(94a756036e7d03c42ee896b794cb1f8753a67b91) ) + ROM_LOAD( "sdm-c-5j", 0x2000, 0x0800, CRC(98334fda) SHA1(9990bbfb2aa4d953e531bb49eab1c3a999b78b9c) ) + ROM_LOAD( "sdm-c-5k", 0x2800, 0x0800, CRC(ba4933b2) SHA1(9e5003849185ea35b5929c9a8ae188a87bb522cc) ) + ROM_LOAD( "sdm-c-5m", 0x3000, 0x0800, CRC(14d3c656) SHA1(55522df8c2e484b8d5d4a32bf7cfb2b30dcdab4a) ) + ROM_LOAD( "sdm-c-5n", 0x3800, 0x0800, CRC(7e0e41b0) SHA1(e7dd509ab36e0f9be6350b5fa9de4694224477db) ) + + ROM_REGION( 0x1000, "audiocpu", 0 ) + ROM_LOAD( "sdm-e-20", 0x0000, 0x0400, CRC(55f40a0b) SHA1(8dff27b636f7f1831f71816505e451cf97fc3f98) ) + + ROM_REGION( 0x1000, "sprites", 0 ) + ROM_LOAD( "sdm-v-5k", 0x0000, 0x0800, CRC(55758e4d) SHA1(1338b45f76f5a31a5350c953eac36cc543fbe62e) ) + ROM_LOAD( "sdm-v-6k", 0x0800, 0x0800, CRC(3fcbb20c) SHA1(674de509f7b6c5d7c41112881b0c3093b9b176a0) ) + + ROM_REGION( 0x0100, "bullets", 0 ) + ROM_LOAD( "4i.vid", 0x0000, 0x0100, CRC(528e8533) SHA1(8e41eee1016c98a4f08acbd902daf8e32aa9d9ab) ) + + ROM_REGION( 0x0020, "proms", 0 ) + ROM_LOAD( "sdm-v-3n", 0x0000, 0x0020, CRC(6d8ad169) SHA1(6ccc931774183e14e28bb9b93223d366fd596f30) ) +ROM_END + } // anonymouse namespace + /************************************* * * Game drivers * *************************************/ -// YEAR NAME PARENT MACHINE INPUT CLASS INIT ROT COMPANY FULLNAME FLAGS -GAME( 1980, spacefb, 0, spacefb, spacefb, spacefb_state, empty_init, ROT270, "Nintendo", "Space Firebird (rev. 04-u)", MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) -GAME( 1980, spacefbe, spacefb, spacefb, spacefb, spacefb_state, empty_init, ROT270, "Nintendo", "Space Firebird (rev. 03-e set 1)", MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) -GAME( 1980, spacefbe2, spacefb, spacefb, spacefb, spacefb_state, empty_init, ROT270, "Nintendo", "Space Firebird (rev. 03-e set 2)", MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) -GAME( 1980, spacefba, spacefb, spacefb, spacefb, spacefb_state, empty_init, ROT270, "Nintendo", "Space Firebird (rev. 02-a)", MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) -GAME( 1980, spacefbg, spacefb, spacefb, spacefb, spacefb_state, empty_init, ROT270, "Nintendo (Gremlin license)", "Space Firebird (Gremlin)", MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) -GAME( 1980, spacebrd, spacefb, spacefb, spacefb, spacefb_state, empty_init, ROT270, "bootleg (Karateco)", "Space Bird (bootleg)", MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) -GAME( 1980, spacefbb, spacefb, spacefb, spacefb, spacefb_state, empty_init, ROT270, "bootleg", "Space Firebird (bootleg)", MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) -GAME( 1980, spacedem, spacefb, spacefb, spacedem, spacefb_state, empty_init, ROT270, "Nintendo (Fortrek license)", "Space Demon", MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) -GAME( 1980, starwarr, spacefb, spacefb, spacefb, spacefb_state, empty_init, ROT270, "bootleg (Potomac Mortgage)", "Star Warrior", MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) -GAME( 1980, redbird, spacefb, spacefb, spacefb, spacefb_state, empty_init, ROT270, "bootleg (Codematic)", "Red Bird (bootleg of Space Firebird)", MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +// YEAR NAME PARENT MACHINE INPUT CLASS INIT ROT COMPANY FULLNAME FLAGS +GAME( 1980, spacefb, 0, spacefb, spacefb, spacefb_state, empty_init, ROT270, "Nintendo", "Space Firebird (rev. 04-u)", MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1980, spacefbe, spacefb, spacefb, spacefb, spacefb_state, empty_init, ROT270, "Nintendo", "Space Firebird (rev. 03-e set 1)", MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1980, spacefbe2, spacefb, spacefb, spacefb, spacefb_state, empty_init, ROT270, "Nintendo", "Space Firebird (rev. 03-e set 2)", MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1980, spacefba, spacefb, spacefb, spacefb, spacefb_state, empty_init, ROT270, "Nintendo", "Space Firebird (rev. 02-a)", MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1980, spacefbg, spacefb, spacefb, spacefb, spacefb_state, empty_init, ROT270, "Nintendo (Gremlin license)", "Space Firebird (Gremlin)", MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1980, spacebrd, spacefb, spacefb, spacefb, spacefb_state, empty_init, ROT270, "bootleg (Karateco)", "Space Bird (bootleg)", MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1980, spacefbb, spacefb, spacefb, spacefb, spacefb_state, empty_init, ROT270, "bootleg", "Space Firebird (bootleg)", MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1980, starwarr, spacefb, spacefb, spacefb, spacefb_state, empty_init, ROT270, "bootleg (Potomac Mortgage)", "Star Warrior", MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1980, redbird, spacefb, spacefb, spacefb, spacefb_state, empty_init, ROT270, "bootleg (Codematic)", "Red Bird (bootleg of Space Firebird)", MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1980, spacedem, spacefb, spacedem, spacedem, spacefb_state, empty_init, ROT270, "Nintendo (Fortrek license)", "Space Demon", MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/nmk/nmk004.cpp b/src/mame/nmk/nmk004.cpp index 2e5932f9290e7..56502717f976b 100644 --- a/src/mame/nmk/nmk004.cpp +++ b/src/mame/nmk/nmk004.cpp @@ -33,16 +33,33 @@ void nmk004_device::port4_w(uint8_t data) m_reset_cb(BIT(data, 0) ? ASSERT_LINE : CLEAR_LINE); } -void nmk004_device::oki0_bankswitch_w(uint8_t data) +uint8_t nmk004_device::ym_r(offs_t offset) { - data &= 3; - membank(":okibank1")->set_entry(data); + return m_ym_read_cb(offset); +} + +void nmk004_device::ym_w(offs_t offset, uint8_t data) +{ + m_ym_write_cb(offset, data); +} + +template +uint8_t nmk004_device::oki_r() +{ + return m_oki_read_cb[Which](); +} + +template +void nmk004_device::oki_w(uint8_t data) +{ + m_oki_write_cb[Which](data); } -void nmk004_device::oki1_bankswitch_w(uint8_t data) +template +void nmk004_device::oki_bankswitch_w(uint8_t data) { data &= 3; - membank(":okibank2")->set_entry(data); + m_okibank[Which]->set_entry(data); } uint8_t nmk004_device::tonmk004_r() @@ -63,18 +80,18 @@ void nmk004_device::ym2203_irq_handler(int irq) m_cpu->set_input_line(0, irq ? ASSERT_LINE : CLEAR_LINE); } -void nmk004_device::nmk004_sound_mem_map(address_map &map) +void nmk004_device::mem_map(address_map &map) { //map(0x0000, 0x1fff).rom(); /* 0x0000 - 0x1fff = internal ROM */ - map(0x2000, 0xefff).rom().region(":audiocpu", 0x2000); + map(0x2000, 0xefff).rom().region(DEVICE_SELF, 0x2000); map(0xf000, 0xf7ff).ram(); - map(0xf800, 0xf801).rw(":ymsnd", FUNC(ym2203_device::read), FUNC(ym2203_device::write)); - map(0xf900, 0xf900).rw(":oki1", FUNC(okim6295_device::read), FUNC(okim6295_device::write)); - map(0xfa00, 0xfa00).rw(":oki2", FUNC(okim6295_device::read), FUNC(okim6295_device::write)); + map(0xf800, 0xf801).rw(FUNC(nmk004_device::ym_r), FUNC(nmk004_device::ym_w)); + map(0xf900, 0xf900).rw(FUNC(nmk004_device::oki_r<0>), FUNC(nmk004_device::oki_w<0>)); + map(0xfa00, 0xfa00).rw(FUNC(nmk004_device::oki_r<1>), FUNC(nmk004_device::oki_w<1>)); map(0xfb00, 0xfb00).r(FUNC(nmk004_device::tonmk004_r)); // from main cpu map(0xfc00, 0xfc00).w(FUNC(nmk004_device::tomain_w)); // to main cpu - map(0xfc01, 0xfc01).w(FUNC(nmk004_device::oki0_bankswitch_w)); - map(0xfc02, 0xfc02).w(FUNC(nmk004_device::oki1_bankswitch_w)); + map(0xfc01, 0xfc01).w(FUNC(nmk004_device::oki_bankswitch_w<0>)); + map(0xfc02, 0xfc02).w(FUNC(nmk004_device::oki_bankswitch_w<1>)); } @@ -87,11 +104,17 @@ ROM_END DEFINE_DEVICE_TYPE(NMK004, nmk004_device, "nmk004", "NMK004") nmk004_device::nmk004_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : device_t(mconfig, NMK004, tag, owner, clock), - m_cpu(*this, "mcu"), - m_reset_cb(*this), - to_nmk004(0xff), - to_main(0xff) + : device_t(mconfig, NMK004, tag, owner, clock) + , m_cpu(*this, "mcu") + , m_okirom(*this, {finder_base::DUMMY_TAG, finder_base::DUMMY_TAG}) + , m_okibank(*this, {finder_base::DUMMY_TAG, finder_base::DUMMY_TAG}) + , m_reset_cb(*this) + , m_ym_read_cb(*this, 0) + , m_ym_write_cb(*this) + , m_oki_read_cb{{*this, 0}, {*this, 0}} + , m_oki_write_cb{{*this}, {*this}} + , to_nmk004(0xff) + , to_main(0xff) { } @@ -104,8 +127,10 @@ void nmk004_device::device_start() save_item(NAME(to_main)); save_item(NAME(to_nmk004)); - membank(":okibank1")->configure_entries(0, 4, memregion(":oki1")->base() + 0x20000, 0x20000); - membank(":okibank2")->configure_entries(0, 4, memregion(":oki2")->base() + 0x20000, 0x20000); + for (int i = 0; i < 2; i++) + { + m_okibank[i]->configure_entries(0, 4, m_okirom[i] + 0x20000, 0x20000); + } } //------------------------------------------------- @@ -114,7 +139,7 @@ void nmk004_device::device_start() void nmk004_device::device_add_mconfig(machine_config &config) { TMP90840(config, m_cpu, DERIVED_CLOCK(1,1)); // Toshiba TMP90C840AF in QFP64 package with 8Kbyte internal ROM - m_cpu->set_addrmap(AS_PROGRAM, &nmk004_device::nmk004_sound_mem_map); + m_cpu->set_addrmap(AS_PROGRAM, &nmk004_device::mem_map); m_cpu->port_write<4>().set(FUNC(nmk004_device::port4_w)); } @@ -124,5 +149,5 @@ void nmk004_device::device_add_mconfig(machine_config &config) //------------------------------------------------- const tiny_rom_entry *nmk004_device::device_rom_region() const { - return ROM_NAME(nmk004 ); + return ROM_NAME(nmk004); } diff --git a/src/mame/nmk/nmk004.h b/src/mame/nmk/nmk004.h index 15446354d7bc5..e985ce3dee0fe 100644 --- a/src/mame/nmk/nmk004.h +++ b/src/mame/nmk/nmk004.h @@ -18,17 +18,30 @@ class nmk004_device : public device_t public: nmk004_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + // configuration auto reset_cb() { return m_reset_cb.bind(); } + template void set_rom_tag(T &&tag1, U &&tag2) + { + m_okirom[0].set_tag(std::forward(tag1)); + m_okirom[1].set_tag(std::forward(tag2)); + } + template void set_rombank_tag(T &&tag1, U &&tag2) + { + m_okibank[0].set_tag(std::forward(tag1)); + m_okibank[1].set_tag(std::forward(tag2)); + } + auto ym_read_callback() { return m_ym_read_cb.bind(); } + auto ym_write_callback() { return m_ym_write_cb.bind(); } + template auto oki_read_callback() { return m_oki_read_cb[Which].bind(); } + template auto oki_write_callback() { return m_oki_write_cb[Which].bind(); } // host interface void write(uint8_t data); uint8_t read(); void nmi_w(int state) { m_cpu->set_input_line(INPUT_LINE_NMI, state); } - void port4_w(uint8_t data); void ym2203_irq_handler(int irq); - void nmk004_sound_mem_map(address_map &map) ATTR_COLD; protected: // device-level overrides virtual void device_start() override ATTR_COLD; @@ -37,16 +50,29 @@ class nmk004_device : public device_t private: // internal state - required_device m_cpu; - devcb_write_line m_reset_cb; + required_device m_cpu; + required_region_ptr_array m_okirom; + required_memory_bank_array<2> m_okibank; + devcb_write_line m_reset_cb; + devcb_read8 m_ym_read_cb; + devcb_write8 m_ym_write_cb; + devcb_read8 m_oki_read_cb[2]; + devcb_write8 m_oki_write_cb[2]; uint8_t to_nmk004; uint8_t to_main; - void oki0_bankswitch_w(uint8_t data); - void oki1_bankswitch_w(uint8_t data); + template void oki_bankswitch_w(uint8_t data); + uint8_t ym_r(offs_t offset); + void ym_w(offs_t offset, uint8_t data); + template uint8_t oki_r(); + template void oki_w(uint8_t data); uint8_t tonmk004_r(); void tomain_w(uint8_t data); + + void port4_w(uint8_t data); + + void mem_map(address_map &map) ATTR_COLD; }; DECLARE_DEVICE_TYPE(NMK004, nmk004_device) diff --git a/src/mame/nmk/nmk16.cpp b/src/mame/nmk/nmk16.cpp index a51e632634f1c..71c398707b32c 100644 --- a/src/mame/nmk/nmk16.cpp +++ b/src/mame/nmk/nmk16.cpp @@ -331,7 +331,7 @@ u8 nmk16_state::powerins_bootleg_fake_ym2203_r() ***************************************************************************/ void nmk16_state::tharrier_mcu_control_w(u16 data) { -// LOG("%04x: mcu_control_w %02x\n",m_maincpu->pc(),data); +// LOG("%06x: mcu_control_w %02x\n", m_maincpu->pc(), data); } u16 nmk16_state::tharrier_mcu_r(offs_t offset, u16 mem_mask) @@ -347,13 +347,17 @@ u16 nmk16_state::tharrier_mcu_r(offs_t offset, u16 mem_mask) int res; - if (m_maincpu->pc()==0x8aa) res = (m_mainram[0x9064/2])|0x20; // Task Force Harrier - else if (m_maincpu->pc()==0x8ce) res = (m_mainram[0x9064/2])|0x60; // Task Force Harrier + if (m_maincpu->pc() == 0x8aa) res = (m_mainram[0x9064/2]) | 0x20; // Task Force Harrier + else if (m_maincpu->pc() == 0x8ce) res = (m_mainram[0x9064/2]) | 0x60; // Task Force Harrier else { - res = to_main[m_prot_count++]; - if (m_prot_count == sizeof(to_main)) - m_prot_count = 0; + res = to_main[m_prot_count]; + if (!machine().side_effects_disabled()) + { + m_prot_count++; + if (m_prot_count == sizeof(to_main)) + m_prot_count = 0; + } } return res << 8; @@ -440,7 +444,7 @@ void tharrierb_state::mcu_portc_w(u8 data) u8 tharrierb_state::mcu_portd_r() { - u8 select = m_mcu_portc & 0x07; + const u8 select = m_mcu_portc & 0x07; if (select < 5) return m_inputs[select]->read(); @@ -474,15 +478,15 @@ void nmk16_state::scroll_w(offs_t offset, u8 data) { m_scroll[Layer][offset] = data; - if (offset & 2) + if (BIT(offset, 1)) { - m_bg_tilemap[Layer]->set_scrolly(0,((m_scroll[Layer][2] << 8) | m_scroll[Layer][3])); + m_bg_tilemap[Layer]->set_scrolly(0, ((m_scroll[Layer][2] << 8) | m_scroll[Layer][3])); } else { if ((m_bgvideoram[Layer].bytes() > 0x4000) && (offset == 0)) { - int newbank = (m_scroll[Layer][0] >> 4) & ((m_bgvideoram[Layer].bytes() >> 14) - 1); + const int newbank = (m_scroll[Layer][0] >> 4) & ((m_bgvideoram[Layer].bytes() >> 14) - 1); if (m_tilerambank != newbank) { m_tilerambank = newbank; @@ -491,7 +495,7 @@ void nmk16_state::scroll_w(offs_t offset, u8 data) } } - m_bg_tilemap[Layer]->set_scrollx(0,(m_scroll[Layer][0] << 8) | m_scroll[Layer][1]); + m_bg_tilemap[Layer]->set_scrollx(0, (m_scroll[Layer][0] << 8) | m_scroll[Layer][1]); } } @@ -512,10 +516,10 @@ void nmk16_state::vandyke_map(address_map &map) map(0x08001f, 0x08001f).w(m_nmk004, FUNC(nmk004_device::write)); map(0x088000, 0x0887ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); map(0x08c000, 0x08c007).w(FUNC(nmk16_state::vandyke_scroll_w)); - map(0x090000, 0x093fff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share("bgvideoram0"); + map(0x090000, 0x093fff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share(m_bgvideoram[0]); map(0x094000, 0x097fff).ram(); // what is this? - map(0x09d000, 0x09d7ff).ram().w(FUNC(nmk16_state::txvideoram_w)).share("txvideoram"); - map(0x0f0000, 0x0fffff).ram().w(FUNC(nmk16_state::mainram_strange_w)).share("mainram"); + map(0x09d000, 0x09d7ff).ram().w(FUNC(nmk16_state::txvideoram_w)).share(m_txvideoram); + map(0x0f0000, 0x0fffff).ram().w(FUNC(nmk16_state::mainram_strange_w)).share(m_mainram); } void nmk16_state::vandykeb_map(address_map &map) @@ -533,10 +537,10 @@ void nmk16_state::vandykeb_map(address_map &map) // map(0x08001f, 0x08001f).w(m_nmk004, FUNC(nmk004_device::write)); map(0x088000, 0x0887ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); map(0x08c000, 0x08c007).nopw(); // just in case... - map(0x090000, 0x093fff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share("bgvideoram0"); + map(0x090000, 0x093fff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share(m_bgvideoram[0]); map(0x094000, 0x097fff).ram(); // what is this? - map(0x09d000, 0x09d7ff).ram().w(FUNC(nmk16_state::txvideoram_w)).share("txvideoram"); - map(0x0f0000, 0x0fffff).ram().w(FUNC(nmk16_state::mainram_strange_w)).share("mainram"); + map(0x09d000, 0x09d7ff).ram().w(FUNC(nmk16_state::txvideoram_w)).share(m_txvideoram); + map(0x0f0000, 0x0fffff).ram().w(FUNC(nmk16_state::mainram_strange_w)).share(m_mainram); } void nmk16_state::manybloc_map(address_map &map) @@ -551,10 +555,10 @@ void nmk16_state::manybloc_map(address_map &map) map(0x08001c, 0x08001d).nopw(); // See notes at the top of the driver map(0x08001f, 0x08001f).r("soundlatch2", FUNC(generic_latch_8_device::read)).w(m_soundlatch, FUNC(generic_latch_8_device::write)).umask16(0x00ff); map(0x088000, 0x0883ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); - map(0x090000, 0x093fff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share("bgvideoram0"); - map(0x09c000, 0x09cfff).ram().w(FUNC(nmk16_state::manybloc_scroll_w)).share("scrollram"); - map(0x09d000, 0x09d7ff).ram().w(FUNC(nmk16_state::txvideoram_w)).share("txvideoram"); - map(0x0f0000, 0x0fffff).ram().share("mainram"); + map(0x090000, 0x093fff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share(m_bgvideoram[0]); + map(0x09c000, 0x09cfff).ram().w(FUNC(nmk16_state::manybloc_scroll_w)).share(m_gunnail_scrollram); + map(0x09d000, 0x09d7ff).ram().w(FUNC(nmk16_state::txvideoram_w)).share(m_txvideoram); + map(0x0f0000, 0x0fffff).ram().share(m_mainram); } void nmk16_tomagic_state::tomagic_map(address_map &map) @@ -568,19 +572,19 @@ void nmk16_tomagic_state::tomagic_map(address_map &map) map(0x080018, 0x080019).w(FUNC(nmk16_tomagic_state::tilebank_w)); map(0x08001f, 0x08001f).w(m_soundlatch, FUNC(generic_latch_8_device::write)); map(0x088000, 0x0887ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); - map(0x08c000, 0x08c1ff).writeonly().share("scrollram"); - map(0x08c200, 0x08c3ff).writeonly().share("scrollramy"); - map(0x090000, 0x093fff).ram().w(FUNC(nmk16_tomagic_state::bgvideoram_w<0>)).share("bgvideoram0"); + map(0x08c000, 0x08c1ff).writeonly().share(m_gunnail_scrollram); + map(0x08c200, 0x08c3ff).writeonly().share(m_gunnail_scrollramy); + map(0x090000, 0x093fff).ram().w(FUNC(nmk16_tomagic_state::bgvideoram_w<0>)).share(m_bgvideoram[0]); map(0x094001, 0x094001).w(m_oki[0], FUNC(okim6295_device::write)); map(0x094003, 0x094003).r(m_oki[0], FUNC(okim6295_device::read)); - map(0x09c000, 0x09cfff).mirror(0x001000).ram().w(FUNC(nmk16_tomagic_state::txvideoram_w)).share("txvideoram"); - map(0x0f0000, 0x0fffff).ram().share("mainram"); + map(0x09c000, 0x09cfff).mirror(0x001000).ram().w(FUNC(nmk16_tomagic_state::txvideoram_w)).share(m_txvideoram); + map(0x0f0000, 0x0fffff).ram().share(m_mainram); } void nmk16_tomagic_state::tomagic_sound_map(address_map &map) { map(0x0000, 0x7fff).rom().region("audiocpu", 0); - map(0x8000, 0xbfff).bankr("audiobank"); + map(0x8000, 0xbfff).bankr(m_audiobank); map(0xc000, 0xdfff).ram(); } @@ -603,14 +607,15 @@ void nmk16_state::tharrier_map(address_map &map) map(0x080012, 0x080013).nopw(); // map(0x080015, 0x080015).w(FUNC(nmk16_state::flipscreen_w)); // map(0x080019, 0x080019).w(FUNC(nmk16_state::tilebank_w)); +// map(0x08001c, 0x08001d) sound reset map(0x08001f, 0x08001f).w(m_soundlatch, FUNC(generic_latch_8_device::write)); map(0x080202, 0x080203).portr("IN2"); map(0x088000, 0x0883ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); // map(0x08c000, 0x08c007).w(FUNC(nmk16_state::scroll_w<0>)).umask16(0x00ff); - map(0x090000, 0x093fff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share("bgvideoram0"); + map(0x090000, 0x093fff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share(m_bgvideoram[0]); map(0x09c000, 0x09c7ff).ram(); // Unused txvideoram area? - map(0x09d000, 0x09d7ff).ram().w(FUNC(nmk16_state::txvideoram_w)).share("txvideoram"); - map(0x0f0000, 0x0fffff).ram().w(FUNC(nmk16_state::mainram_strange_w)).share("mainram"); + map(0x09d000, 0x09d7ff).ram().w(FUNC(nmk16_state::txvideoram_w)).share(m_txvideoram); + map(0x0f0000, 0x0fffff).ram().w(FUNC(nmk16_state::mainram_strange_w)).share(m_mainram); } void tharrierb_state::tharrierb_map(address_map &map) @@ -625,11 +630,11 @@ void tharrierb_state::tharrierb_map(address_map &map) map(0x08001c, 0x08001d).unmaprw(); // sound cpu reset map(0x08001f, 0x08001f).w(m_soundlatch, FUNC(generic_latch_8_device::write)); map(0x088000, 0x0883ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); - map(0x090000, 0x093fff).ram().w(FUNC(tharrierb_state::bgvideoram_w<0>)).share("bgvideoram0"); + map(0x090000, 0x093fff).ram().w(FUNC(tharrierb_state::bgvideoram_w<0>)).share(m_bgvideoram[0]); map(0x09c000, 0x09cfff).ram(); // verified in test mode - map(0x09d000, 0x09d7ff).ram().w(FUNC(tharrierb_state::txvideoram_w)).share("txvideoram"); + map(0x09d000, 0x09d7ff).ram().w(FUNC(tharrierb_state::txvideoram_w)).share(m_txvideoram); map(0x09d800, 0x09dfff).ram(); // verified in test mode - map(0x0f0000, 0x0fffff).ram().w(FUNC(tharrierb_state::mainram_strange_w)).share("mainram"); + map(0x0f0000, 0x0fffff).ram().w(FUNC(tharrierb_state::mainram_strange_w)).share(m_mainram); } void nmk16_state::tharrier_sound_map(address_map &map) @@ -666,9 +671,9 @@ void nmk16_state::mustang_map(address_map &map) map(0x088000, 0x0887ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); map(0x08c000, 0x08c001).w(FUNC(nmk16_state::mustang_scroll_w)); map(0x08c002, 0x08c087).nopw(); // ?? - map(0x090000, 0x093fff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share("bgvideoram0"); - map(0x09c000, 0x09c7ff).ram().w(FUNC(nmk16_state::txvideoram_w)).share("txvideoram"); - map(0x0f0000, 0x0fffff).ram().w(FUNC(nmk16_state::mainram_strange_w)).share("mainram"); + map(0x090000, 0x093fff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share(m_bgvideoram[0]); + map(0x09c000, 0x09c7ff).ram().w(FUNC(nmk16_state::txvideoram_w)).share(m_txvideoram); + map(0x0f0000, 0x0fffff).ram().w(FUNC(nmk16_state::mainram_strange_w)).share(m_mainram); } void nmk16_state::mustangb_map(address_map &map) @@ -684,9 +689,9 @@ void nmk16_state::mustangb_map(address_map &map) map(0x088000, 0x0887ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); map(0x08c000, 0x08c001).w(FUNC(nmk16_state::mustang_scroll_w)); map(0x08c002, 0x08c087).nopw(); // ?? - map(0x090000, 0x093fff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share("bgvideoram0"); - map(0x09c000, 0x09c7ff).ram().w(FUNC(nmk16_state::txvideoram_w)).share("txvideoram"); - map(0x0f0000, 0x0fffff).ram().w(FUNC(nmk16_state::mainram_strange_w)).share("mainram"); + map(0x090000, 0x093fff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share(m_bgvideoram[0]); + map(0x09c000, 0x09c7ff).ram().w(FUNC(nmk16_state::txvideoram_w)).share(m_txvideoram); + map(0x0f0000, 0x0fffff).ram().w(FUNC(nmk16_state::mainram_strange_w)).share(m_mainram); } void nmk16_state::mustangb3_map(address_map &map) @@ -704,9 +709,9 @@ void nmk16_state::mustangb3_map(address_map &map) map(0x088000, 0x0887ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); map(0x08c000, 0x08c001).w(FUNC(nmk16_state::mustang_scroll_w)); map(0x08c002, 0x08c087).nopw(); - map(0x090000, 0x093fff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share("bgvideoram0"); - map(0x09c000, 0x09c7ff).ram().w(FUNC(nmk16_state::txvideoram_w)).share("txvideoram"); - map(0x0f0000, 0x0fffff).ram().w(FUNC(nmk16_state::mainram_strange_w)).share("mainram"); + map(0x090000, 0x093fff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share(m_bgvideoram[0]); + map(0x09c000, 0x09c7ff).ram().w(FUNC(nmk16_state::txvideoram_w)).share(m_txvideoram); + map(0x0f0000, 0x0fffff).ram().w(FUNC(nmk16_state::mainram_strange_w)).share(m_mainram); } void nmk16_state::mustangb3_sound_map(address_map &map) @@ -731,15 +736,15 @@ void nmk16_state::twinactn_map(address_map &map) map(0x088000, 0x0887ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); map(0x08c000, 0x08c001).w(FUNC(nmk16_state::mustang_scroll_w)); map(0x08c002, 0x08c087).nopw(); // ?? - map(0x090000, 0x093fff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share("bgvideoram0"); - map(0x09c000, 0x09c7ff).ram().w(FUNC(nmk16_state::txvideoram_w)).share("txvideoram"); - map(0x0f0000, 0x0fffff).ram().w(FUNC(nmk16_state::mainram_strange_w)).share("mainram"); + map(0x090000, 0x093fff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share(m_bgvideoram[0]); + map(0x09c000, 0x09c7ff).ram().w(FUNC(nmk16_state::txvideoram_w)).share(m_txvideoram); + map(0x0f0000, 0x0fffff).ram().w(FUNC(nmk16_state::mainram_strange_w)).share(m_mainram); } void nmk16_state::acrobatm_map(address_map &map) { map(0x00000, 0x3ffff).rom(); - map(0x80000, 0x8ffff).ram().share("mainram"); + map(0x80000, 0x8ffff).ram().share(m_mainram); map(0xc0000, 0xc0001).portr("IN0"); map(0xc0002, 0xc0003).portr("IN1"); map(0xc0008, 0xc0009).portr("DSW1"); @@ -751,14 +756,14 @@ void nmk16_state::acrobatm_map(address_map &map) map(0xc001f, 0xc001f).w(m_nmk004, FUNC(nmk004_device::write)); map(0xc4000, 0xc45ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); map(0xc8000, 0xc8007).ram().w(FUNC(nmk16_state::scroll_w<0>)).umask16(0x00ff); - map(0xcc000, 0xcffff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share("bgvideoram0"); - map(0xd4000, 0xd47ff).ram().w(FUNC(nmk16_state::txvideoram_w)).share("txvideoram"); + map(0xcc000, 0xcffff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share(m_bgvideoram[0]); + map(0xd4000, 0xd47ff).ram().w(FUNC(nmk16_state::txvideoram_w)).share(m_txvideoram); } void nmk16_state::acrobatmbl_map(address_map &map) { map(0x00000, 0x3ffff).rom(); - map(0x80000, 0x8ffff).ram().share("mainram"); + map(0x80000, 0x8ffff).ram().share(m_mainram); map(0xc0000, 0xc0001).portr("IN0"); map(0xc0002, 0xc0003).portr("IN1"); map(0xc0008, 0xc0009).portr("DSW1"); @@ -768,8 +773,8 @@ void nmk16_state::acrobatmbl_map(address_map &map) map(0xc001e, 0xc001f).w("seibu_sound", FUNC(seibu_sound_device::main_mustb_w)); map(0xc4000, 0xc45ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); map(0xc8000, 0xc8007).ram().w(FUNC(nmk16_state::scroll_w<0>)).umask16(0x00ff); - map(0xcc000, 0xcffff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share("bgvideoram0"); - map(0xd4000, 0xd47ff).ram().w(FUNC(nmk16_state::txvideoram_w)).share("txvideoram"); + map(0xcc000, 0xcffff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share(m_bgvideoram[0]); + map(0xd4000, 0xd47ff).ram().w(FUNC(nmk16_state::txvideoram_w)).share(m_txvideoram); } void nmk16_state::bioship_map(address_map &map) @@ -788,8 +793,8 @@ void nmk16_state::bioship_map(address_map &map) map(0x08c000, 0x08c007).ram().w(FUNC(nmk16_state::scroll_w<1>)).umask16(0xff00); map(0x08c010, 0x08c017).ram().w(FUNC(nmk16_state::scroll_w<0>)).umask16(0xff00); map(0x090000, 0x093fff).ram().w(FUNC(nmk16_state::bgvideoram_w<1>)).share("bgvideoram1"); - map(0x09c000, 0x09c7ff).ram().w(FUNC(nmk16_state::txvideoram_w)).share("txvideoram"); - map(0x0f0000, 0x0fffff).ram().w(FUNC(nmk16_state::mainram_strange_w)).share("mainram"); + map(0x09c000, 0x09c7ff).ram().w(FUNC(nmk16_state::txvideoram_w)).share(m_txvideoram); + map(0x0f0000, 0x0fffff).ram().w(FUNC(nmk16_state::mainram_strange_w)).share(m_mainram); } void nmk16_state::hachamf_map(address_map &map) @@ -808,9 +813,9 @@ void nmk16_state::hachamf_map(address_map &map) map(0x088000, 0x0887ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); map(0x08c000, 0x08c007).w(FUNC(nmk16_state::scroll_w<0>)).umask16(0x00ff); - map(0x090000, 0x093fff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share("bgvideoram0"); - map(0x09c000, 0x09c7ff).ram().w(FUNC(nmk16_state::txvideoram_w)).share("txvideoram"); - map(0x0f0000, 0x0fffff).ram().share("mainram"); // Main RAM, inc sprites, shared with MCU + map(0x090000, 0x093fff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share(m_bgvideoram[0]); + map(0x09c000, 0x09c7ff).ram().w(FUNC(nmk16_state::txvideoram_w)).share(m_txvideoram); + map(0x0f0000, 0x0fffff).ram().share(m_mainram); // Main RAM, inc sprites, shared with MCU } void nmk16_state::tdragon_map(address_map &map) @@ -818,7 +823,7 @@ void nmk16_state::tdragon_map(address_map &map) map(0x000000, 0x03ffff).rom(); map(0x044022, 0x044023).nopr(); // No Idea (ROM mirror? - does this even exist on originals?) - map(0x080000, 0x08ffff).mirror(0x030000).ram().share("mainram"); + map(0x080000, 0x08ffff).mirror(0x030000).ram().share(m_mainram); map(0x0c0000, 0x0c0001).mirror(0x020000).portr("IN0"); map(0x0c0002, 0x0c0003).mirror(0x020000).portr("IN1"); @@ -832,8 +837,8 @@ void nmk16_state::tdragon_map(address_map &map) map(0x0c4000, 0x0c4007).ram().w(FUNC(nmk16_state::scroll_w<0>)).umask16(0x00ff); map(0x0c8000, 0x0c87ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); - map(0x0cc000, 0x0cffff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share("bgvideoram0"); - map(0x0d0000, 0x0d07ff).ram().w(FUNC(nmk16_state::txvideoram_w)).share("txvideoram"); + map(0x0cc000, 0x0cffff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share(m_bgvideoram[0]); + map(0x0d0000, 0x0d07ff).ram().w(FUNC(nmk16_state::txvideoram_w)).share(m_txvideoram); } // No sprites without this. Is it actually protection? @@ -846,7 +851,7 @@ void nmk16_state::tdragonb_map(address_map &map) { map(0x000000, 0x03ffff).rom(); map(0x044022, 0x044023).r(FUNC(nmk16_state::tdragonb_prot_r)); - map(0x0b0000, 0x0bffff).ram().share("mainram"); + map(0x0b0000, 0x0bffff).ram().share(m_mainram); map(0x0c0000, 0x0c0001).portr("IN0"); map(0x0c0002, 0x0c0003).portr("IN1"); map(0x0c0008, 0x0c0009).portr("DSW1"); @@ -856,8 +861,8 @@ void nmk16_state::tdragonb_map(address_map &map) map(0x0c001e, 0x0c001f).w("seibu_sound", FUNC(seibu_sound_device::main_mustb_w)); map(0x0c4000, 0x0c4007).ram().w(FUNC(nmk16_state::scroll_w<0>)).umask16(0x00ff); map(0x0c8000, 0x0c87ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); - map(0x0cc000, 0x0cffff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share("bgvideoram0"); - map(0x0d0000, 0x0d07ff).ram().w(FUNC(nmk16_state::txvideoram_w)).share("txvideoram"); + map(0x0cc000, 0x0cffff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share(m_bgvideoram[0]); + map(0x0d0000, 0x0d07ff).ram().w(FUNC(nmk16_state::txvideoram_w)).share(m_txvideoram); } void nmk16_state::tdragonb3_map(address_map &map) @@ -871,7 +876,7 @@ void nmk16_state::tdragonb3_map(address_map &map) void nmk16_state::tdragonb2_map(address_map &map) { map(0x000000, 0x03ffff).rom(); - map(0x0b0000, 0x0bffff).ram().share("mainram"); + map(0x0b0000, 0x0bffff).ram().share(m_mainram); map(0x08e294, 0x08e925).portr("IN1"); map(0x0c0000, 0x0c0001).portr("IN0"); map(0x0c0002, 0x0c0003).nopr(); // leftover from the original? @@ -889,14 +894,14 @@ void nmk16_state::tdragonb2_map(address_map &map) map(0x0c4006, 0x0c4007).nopw(); // duplicate value of the above map(0x0c4018, 0x0c4019).nopr(); // ?? map(0x0c8000, 0x0c87ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); - map(0x0cc000, 0x0cffff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share("bgvideoram0"); - map(0x0d0000, 0x0d07ff).ram().w(FUNC(nmk16_state::txvideoram_w)).share("txvideoram"); + map(0x0cc000, 0x0cffff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share(m_bgvideoram[0]); + map(0x0d0000, 0x0d07ff).ram().w(FUNC(nmk16_state::txvideoram_w)).share(m_txvideoram); } void nmk16_state::ssmissin_map(address_map &map) { map(0x000000, 0x03ffff).rom(); - map(0x0b0000, 0x0bffff).ram().share("mainram"); + map(0x0b0000, 0x0bffff).ram().share(m_mainram); map(0x0c0000, 0x0c0001).portr("IN0"); map(0x0c0004, 0x0c0005).portr("IN1"); map(0x0c0006, 0x0c0007).portr("DSW1"); @@ -906,8 +911,8 @@ void nmk16_state::ssmissin_map(address_map &map) map(0x0c001f, 0x0c001f).w(m_soundlatch, FUNC(generic_latch_8_device::write)); map(0x0c4000, 0x0c4007).ram().w(FUNC(nmk16_state::scroll_w<0>)).umask16(0x00ff); map(0x0c8000, 0x0c87ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); - map(0x0cc000, 0x0cffff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share("bgvideoram0"); - map(0x0d0000, 0x0d07ff).mirror(0x1800).ram().w(FUNC(nmk16_state::txvideoram_w)).share("txvideoram"); //mirror for airattck + map(0x0cc000, 0x0cffff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share(m_bgvideoram[0]); + map(0x0d0000, 0x0d07ff).mirror(0x1800).ram().w(FUNC(nmk16_state::txvideoram_w)).share(m_txvideoram); //mirror for airattck } void nmk16_state::ssmissin_sound_map(address_map &map) @@ -922,13 +927,13 @@ void nmk16_state::ssmissin_sound_map(address_map &map) void nmk16_state::oki1_map(address_map &map) { map(0x00000, 0x1ffff).rom().region("oki1", 0); - map(0x20000, 0x3ffff).bankr("okibank1"); + map(0x20000, 0x3ffff).bankr(m_okibank[0]); } void nmk16_state::oki2_map(address_map &map) { map(0x00000, 0x1ffff).rom().region("oki2", 0); - map(0x20000, 0x3ffff).bankr("okibank2"); + map(0x20000, 0x3ffff).bankr(m_okibank[1]); } void nmk16_state::strahl_map(address_map &map) @@ -945,10 +950,10 @@ void nmk16_state::strahl_map(address_map &map) map(0x84000, 0x84007).ram().w(FUNC(nmk16_state::scroll_w<0>)).umask16(0x00ff); map(0x88000, 0x88007).ram().w(FUNC(nmk16_state::scroll_w<1>)).umask16(0x00ff); map(0x8c000, 0x8c7ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); - map(0x90000, 0x93fff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share("bgvideoram0"); + map(0x90000, 0x93fff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share(m_bgvideoram[0]); map(0x94000, 0x97fff).ram().w(FUNC(nmk16_state::bgvideoram_w<1>)).share("bgvideoram1"); - map(0x9c000, 0x9c7ff).ram().w(FUNC(nmk16_state::txvideoram_w)).share("txvideoram"); - map(0xf0000, 0xfffff).ram().share("mainram"); + map(0x9c000, 0x9c7ff).ram().w(FUNC(nmk16_state::txvideoram_w)).share(m_txvideoram); + map(0xf0000, 0xfffff).ram().share(m_mainram); } void nmk16_state::strahljbl_map(address_map &map) @@ -963,10 +968,10 @@ void nmk16_state::strahljbl_map(address_map &map) map(0x84000, 0x84007).ram().w(FUNC(nmk16_state::scroll_w<0>)).umask16(0x00ff); map(0x88000, 0x88007).ram().w(FUNC(nmk16_state::scroll_w<1>)).umask16(0x00ff); map(0x8c000, 0x8c7ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); - map(0x90000, 0x93fff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share("bgvideoram0"); + map(0x90000, 0x93fff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share(m_bgvideoram[0]); map(0x94000, 0x97fff).ram().w(FUNC(nmk16_state::bgvideoram_w<1>)).share("bgvideoram1"); - map(0x9c000, 0x9c7ff).ram().w(FUNC(nmk16_state::txvideoram_w)).share("txvideoram"); - map(0xf0000, 0xfffff).ram().share("mainram"); + map(0x9c000, 0x9c7ff).ram().w(FUNC(nmk16_state::txvideoram_w)).share(m_txvideoram); + map(0xf0000, 0xfffff).ram().share(m_mainram); } void nmk16_state::macross_map(address_map &map) @@ -983,9 +988,9 @@ void nmk16_state::macross_map(address_map &map) map(0x08001f, 0x08001f).w(m_nmk004, FUNC(nmk004_device::write)); map(0x088000, 0x0887ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); map(0x08c000, 0x08c007).ram().w(FUNC(nmk16_state::scroll_w<0>)).umask16(0x00ff); - map(0x090000, 0x093fff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share("bgvideoram0"); - map(0x09c000, 0x09c7ff).ram().w(FUNC(nmk16_state::txvideoram_w)).share("txvideoram"); - map(0x0f0000, 0x0fffff).ram().w(FUNC(nmk16_state::mainram_strange_w)).share("mainram"); + map(0x090000, 0x093fff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share(m_bgvideoram[0]); + map(0x09c000, 0x09c7ff).ram().w(FUNC(nmk16_state::txvideoram_w)).share(m_txvideoram); + map(0x0f0000, 0x0fffff).ram().w(FUNC(nmk16_state::mainram_strange_w)).share(m_mainram); } void nmk16_state::gunnail_map(address_map &map) @@ -1001,12 +1006,12 @@ void nmk16_state::gunnail_map(address_map &map) map(0x080019, 0x080019).w(FUNC(nmk16_state::tilebank_w)); map(0x08001f, 0x08001f).w(m_nmk004, FUNC(nmk004_device::write)); map(0x088000, 0x0887ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); - map(0x08c000, 0x08c1ff).writeonly().share("scrollram"); - map(0x08c200, 0x08c3ff).writeonly().share("scrollramy"); + map(0x08c000, 0x08c1ff).writeonly().share(m_gunnail_scrollram); + map(0x08c200, 0x08c3ff).writeonly().share(m_gunnail_scrollramy); map(0x08c400, 0x08c7ff).nopw(); // unknown - map(0x090000, 0x093fff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share("bgvideoram0"); - map(0x09c000, 0x09cfff).mirror(0x001000).ram().w(FUNC(nmk16_state::txvideoram_w)).share("txvideoram"); - map(0x0f0000, 0x0fffff).ram().share("mainram"); + map(0x090000, 0x093fff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share(m_bgvideoram[0]); + map(0x09c000, 0x09cfff).mirror(0x001000).ram().w(FUNC(nmk16_state::txvideoram_w)).share(m_txvideoram); + map(0x0f0000, 0x0fffff).ram().share(m_mainram); } void nmk16_state::gunnailb_map(address_map &map) @@ -1022,19 +1027,19 @@ void nmk16_state::gunnailb_map(address_map &map) map(0x080019, 0x080019).w(FUNC(nmk16_state::tilebank_w)); map(0x08001f, 0x08001f).w(m_soundlatch, FUNC(generic_latch_8_device::write)); map(0x088000, 0x0887ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); - map(0x08c000, 0x08c1ff).writeonly().share("scrollram"); - map(0x08c200, 0x08c3ff).writeonly().share("scrollramy"); + map(0x08c000, 0x08c1ff).writeonly().share(m_gunnail_scrollram); + map(0x08c200, 0x08c3ff).writeonly().share(m_gunnail_scrollramy); map(0x08c400, 0x08c7ff).nopw(); // unknown - map(0x090000, 0x093fff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share("bgvideoram0"); - map(0x09c000, 0x09cfff).mirror(0x001000).ram().w(FUNC(nmk16_state::txvideoram_w)).share("txvideoram"); - map(0x0f0000, 0x0fffff).ram().share("mainram"); + map(0x090000, 0x093fff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share(m_bgvideoram[0]); + map(0x09c000, 0x09cfff).mirror(0x001000).ram().w(FUNC(nmk16_state::txvideoram_w)).share(m_txvideoram); + map(0x0f0000, 0x0fffff).ram().share(m_mainram); map(0x194001, 0x194001).w(m_oki[0], FUNC(okim6295_device::write)); } void nmk16_state::gunnailb_sound_map(address_map &map) { map(0x0000, 0x7fff).rom(); - map(0x8000, 0xbfff).bankr("audiobank"); + map(0x8000, 0xbfff).bankr(m_audiobank); map(0xc000, 0xdfff).ram(); } @@ -1061,15 +1066,15 @@ void nmk16_state::macross2_map(address_map &map) map(0x10001f, 0x10001f).w(m_soundlatch, FUNC(generic_latch_8_device::write)); // to Z80 map(0x120000, 0x1207ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); map(0x130000, 0x130007).ram().w(FUNC(nmk16_state::scroll_w<0>)).umask16(0x00ff); - map(0x140000, 0x14ffff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share("bgvideoram0"); - map(0x170000, 0x170fff).mirror(0x1000).ram().w(FUNC(nmk16_state::txvideoram_w)).share("txvideoram"); - map(0x1f0000, 0x1fffff).ram().share("mainram"); + map(0x140000, 0x14ffff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share(m_bgvideoram[0]); + map(0x170000, 0x170fff).mirror(0x1000).ram().w(FUNC(nmk16_state::txvideoram_w)).share(m_txvideoram); + map(0x1f0000, 0x1fffff).ram().share(m_mainram); } void nmk16_state::tdragon2_map(address_map &map) { // mainram address scrambled macross2_map(map); - map(0x1f0000, 0x1fffff).rw(FUNC(nmk16_state::mainram_swapped_r), FUNC(nmk16_state::mainram_swapped_w)).share("mainram"); + map(0x1f0000, 0x1fffff).rw(FUNC(nmk16_state::mainram_swapped_r), FUNC(nmk16_state::mainram_swapped_w)).share(m_mainram); } void nmk16_state::tdragon3h_map(address_map &map) @@ -1092,18 +1097,18 @@ void nmk16_state::raphero_map(address_map &map) map(0x100019, 0x100019).w(FUNC(nmk16_state::tilebank_w)); map(0x10001f, 0x10001f).w(m_soundlatch, FUNC(generic_latch_8_device::write)); // to Z80 map(0x120000, 0x1207ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); - map(0x130000, 0x1301ff).ram().w(FUNC(nmk16_state::raphero_scroll_w)).share("scrollram"); - map(0x130200, 0x1303ff).ram().share("scrollramy"); + map(0x130000, 0x1301ff).ram().w(FUNC(nmk16_state::raphero_scroll_w)).share(m_gunnail_scrollram); + map(0x130200, 0x1303ff).ram().share(m_gunnail_scrollramy); map(0x130400, 0x1307ff).ram(); - map(0x140000, 0x14ffff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share("bgvideoram0"); - map(0x170000, 0x170fff).mirror(0x1000).ram().w(FUNC(nmk16_state::txvideoram_w)).share("txvideoram"); - map(0x1f0000, 0x1fffff).rw(FUNC(nmk16_state::mainram_swapped_r), FUNC(nmk16_state::mainram_swapped_w)).share("mainram"); + map(0x140000, 0x14ffff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share(m_bgvideoram[0]); + map(0x170000, 0x170fff).mirror(0x1000).ram().w(FUNC(nmk16_state::txvideoram_w)).share(m_txvideoram); + map(0x1f0000, 0x1fffff).rw(FUNC(nmk16_state::mainram_swapped_r), FUNC(nmk16_state::mainram_swapped_w)).share(m_mainram); } void nmk16_state::raphero_sound_mem_map(address_map &map) { map(0x0000, 0x7fff).rom(); - map(0x8000, 0xbfff).bankr("audiobank"); + map(0x8000, 0xbfff).bankr(m_audiobank); map(0xc000, 0xc001).rw("ymsnd", FUNC(ym2203_device::read), FUNC(ym2203_device::write)); map(0xc800, 0xc800).rw(m_oki[0], FUNC(okim6295_device::read), FUNC(okim6295_device::write)); map(0xc808, 0xc808).rw(m_oki[1], FUNC(okim6295_device::read), FUNC(okim6295_device::write)); @@ -1116,7 +1121,7 @@ void nmk16_state::raphero_sound_mem_map(address_map &map) void nmk16_state::macross2_sound_map(address_map &map) { map(0x0000, 0x7fff).rom(); - map(0x8000, 0xbfff).bankr("audiobank"); // banked ROM + map(0x8000, 0xbfff).bankr(m_audiobank); // banked ROM map(0xa000, 0xa000).nopr(); // IRQ ack? watchdog? map(0xc000, 0xdfff).ram(); map(0xe001, 0xe001).w(FUNC(nmk16_state::macross2_audiobank_w)); @@ -1155,8 +1160,8 @@ void nmk16_state::bjtwin_map(address_map &map) map(0x088000, 0x0887ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); map(0x094001, 0x094001).w(FUNC(nmk16_state::tilebank_w)); map(0x094003, 0x094003).w(FUNC(nmk16_state::bjtwin_scroll_w)); // sabotenb specific? - map(0x09c000, 0x09cfff).mirror(0x1000).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share("bgvideoram0"); - map(0x0f0000, 0x0fffff).ram().share("mainram"); + map(0x09c000, 0x09cfff).mirror(0x1000).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share(m_bgvideoram[0]); + map(0x0f0000, 0x0fffff).ram().share(m_mainram); } void nmk16_state::powerins_map(address_map &map) @@ -1174,7 +1179,7 @@ void nmk16_state::powerins_map(address_map &map) map(0x130000, 0x130007).ram().w(FUNC(nmk16_state::scroll_w<0>)).umask16(0x00ff); map(0x140000, 0x143fff).ram().w(FUNC(nmk16_state::bgvideoram_w<0>)).share(m_bgvideoram[0]); map(0x170000, 0x170fff).mirror(0x1000).ram().w(FUNC(nmk16_state::txvideoram_w)).share(m_txvideoram); - map(0x180000, 0x18ffff).ram().share("mainram"); + map(0x180000, 0x18ffff).ram().share(m_mainram); } // powerinsa: same as the original one but without the sound CPU (and inferior sound HW) @@ -4168,14 +4173,14 @@ static GFXDECODE_START( gfx_bioship ) GFXDECODE_ENTRY( "fgtile", 0, gfx_8x8x4_packed_msb, 0x300, 16 ) // color 0x300-0x3ff GFXDECODE_ENTRY( "bgtile", 0, gfx_8x8x4_col_2x2_group_packed_msb, 0x100, 16 ) // color 0x100-0x1ff GFXDECODE_ENTRY( "sprites", 0, gfx_8x8x4_col_2x2_group_packed_msb, 0x200, 16 ) // color 0x200-0x2ff - GFXDECODE_ENTRY( "gfx4", 0, gfx_8x8x4_col_2x2_group_packed_msb, 0x000, 16 ) // color 0x000-0x0ff + GFXDECODE_ENTRY( "bg2tile", 0, gfx_8x8x4_col_2x2_group_packed_msb, 0x000, 16 ) // color 0x000-0x0ff GFXDECODE_END static GFXDECODE_START( gfx_strahl ) GFXDECODE_ENTRY( "fgtile", 0, gfx_8x8x4_packed_msb, 0x000, 16 ) // color 0x000-0x0ff GFXDECODE_ENTRY( "bgtile", 0, gfx_8x8x4_col_2x2_group_packed_msb, 0x300, 16 ) // color 0x300-0x3ff GFXDECODE_ENTRY( "sprites", 0, gfx_8x8x4_col_2x2_group_packed_msb, 0x100, 16 ) // color 0x100-0x1ff - GFXDECODE_ENTRY( "gfx4", 0, gfx_8x8x4_col_2x2_group_packed_msb, 0x200, 16 ) // color 0x200-0x2ff + GFXDECODE_ENTRY( "bg2tile", 0, gfx_8x8x4_col_2x2_group_packed_msb, 0x200, 16 ) // color 0x200-0x2ff GFXDECODE_END static GFXDECODE_START( gfx_powerins ) @@ -4407,24 +4412,24 @@ TIMER_DEVICE_CALLBACK_MEMBER(nmk16_state::nmk16_scanline) constexpr int PROM_START_OFFSET = 0x75; // previous entries are never addressed constexpr int PROM_FRAME_OFFSET = 0x0b; // first 11 "used" entries (from 0x75 to 0x7f: 0xb entries) are prior to start of frame, which occurs on 0x80 address (128 entry) - u8 *prom = m_vtiming_prom->base(); - int len = m_vtiming_prom->bytes(); + u8 const *const prom = m_vtiming_prom->base(); + const int len = m_vtiming_prom->bytes(); - int scanline = param; + const int scanline = param; // every PROM entry is addressed each 2 scanlines, so only even lines are actually addressing it: if ((scanline & 0x1) == 0x0) { - u8 address = ((((scanline / 2) + PROM_FRAME_OFFSET) % (0x100 - PROM_START_OFFSET)) + PROM_START_OFFSET) % len; + const u8 address = ((((scanline / 2) + PROM_FRAME_OFFSET) % (0x100 - PROM_START_OFFSET)) + PROM_START_OFFSET) % len; LOG("nmk16_scanline: Scanline: %03d - Current PROM entry: %03d\n", scanline, address); - u8 val = prom[address]; + const u8 val = prom[address]; // Interrupt requests are triggered at rising edge of bit 7: if (BIT(val & ~m_vtiming_val, TRIGG_INDEX)) { - u8 int_level = bitswap<3>(val, IPL2_INDEX, IPL1_INDEX, IPL0_INDEX); + const u8 int_level = bitswap<3>(val, IPL2_INDEX, IPL1_INDEX, IPL0_INDEX); if (int_level > 0) { LOG("nmk16_scanline: Triggered interrupt: IRQ%d at scanline: %03d\n", int_level, scanline); @@ -4486,7 +4491,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(nmk16_state::nmk16_hacky_scanline) const int IRQ1_SCANLINE_1 = VBIN_SCANLINE + 52; // 52 lines after VBIN and 68 from the start of frame const int IRQ1_SCANLINE_2 = IRQ1_SCANLINE_1 + 128; // 128 lines after IRQ1_SCANLINE_1 - int scanline = param; + const int scanline = param; if (scanline == VBOUT_SCANLINE) // vblank-out irq m_maincpu->set_input_line(4, HOLD_LINE); @@ -4517,11 +4522,24 @@ void nmk16_state::set_hacky_interrupt_timing(machine_config &config) void nmk16_state::sprite_dma() { // 2 buffers confirmed on PCB, 1 on sabotenb - memcpy(m_spriteram_old2.get(),m_spriteram_old.get(), 0x1000); + memcpy(m_spriteram_old2.get(), m_spriteram_old.get(), 0x1000); memcpy(m_spriteram_old.get(), m_mainram + m_sprdma_base / 2, 0x1000); //m_maincpu->spin_until_time(attotime::from_usec(694)); // stop cpu during DMA? } +void nmk16_state::configure_nmk004(machine_config &config) +{ + m_nmk004->reset_cb().set_inputline(m_maincpu, INPUT_LINE_RESET); + m_nmk004->set_rom_tag("oki1", "oki2"); + m_nmk004->set_rombank_tag(m_okibank[0], m_okibank[1]); + m_nmk004->ym_read_callback().set("ymsnd", FUNC(ym2203_device::read)); + m_nmk004->ym_write_callback().set("ymsnd", FUNC(ym2203_device::write)); + m_nmk004->oki_read_callback<0>().set(m_oki[0], FUNC(okim6295_device::read)); + m_nmk004->oki_write_callback<0>().set(m_oki[0], FUNC(okim6295_device::write)); + m_nmk004->oki_read_callback<1>().set(m_oki[1], FUNC(okim6295_device::read)); + m_nmk004->oki_write_callback<1>().set(m_oki[1], FUNC(okim6295_device::write)); +} + // OSC : 10MHz, 12MHz, 4MHz, 4.9152MHz void nmk16_state::tharrier(machine_config &config) { @@ -4602,7 +4620,7 @@ void nmk16_state::mustang(machine_config &config) SPEAKER(config, "mono").front_center(); NMK004(config, m_nmk004, 8000000); - m_nmk004->reset_cb().set_inputline(m_maincpu, INPUT_LINE_RESET); + configure_nmk004(config); ym2203_device &ymsnd(YM2203(config, "ymsnd", 1500000)); ymsnd.irq_handler().set("nmk004", FUNC(nmk004_device::ym2203_irq_handler)); @@ -4717,7 +4735,7 @@ void nmk16_state::bioship(machine_config &config) SPEAKER(config, "mono").front_center(); NMK004(config, m_nmk004, XTAL(8'000'000)); - m_nmk004->reset_cb().set_inputline(m_maincpu, INPUT_LINE_RESET); + configure_nmk004(config); ym2203_device &ymsnd(YM2203(config, "ymsnd", XTAL(12'000'000) / 8)); // 1.5 Mhz (verified) ymsnd.irq_handler().set("nmk004", FUNC(nmk004_device::ym2203_irq_handler)); @@ -4755,7 +4773,7 @@ void nmk16_state::vandyke(machine_config &config) SPEAKER(config, "mono").front_center(); NMK004(config, m_nmk004, 8000000); - m_nmk004->reset_cb().set_inputline(m_maincpu, INPUT_LINE_RESET); + configure_nmk004(config); ym2203_device &ymsnd(YM2203(config, "ymsnd", XTAL(12'000'000)/8)); // verified on PCB ymsnd.irq_handler().set("nmk004", FUNC(nmk004_device::ym2203_irq_handler)); @@ -4819,7 +4837,7 @@ void nmk16_state::acrobatm(machine_config &config) SPEAKER(config, "mono").front_center(); NMK004(config, m_nmk004, XTAL(16'000'000)/2); - m_nmk004->reset_cb().set_inputline(m_maincpu, INPUT_LINE_RESET); + configure_nmk004(config); ym2203_device &ymsnd(YM2203(config, "ymsnd", XTAL(12'000'000)/8)); // verified on PCB ymsnd.irq_handler().set("nmk004", FUNC(nmk004_device::ym2203_irq_handler)); @@ -4964,7 +4982,7 @@ void nmk16_state::tdragon(machine_config &config) SPEAKER(config, "mono").front_center(); NMK004(config, m_nmk004, 8000000); - m_nmk004->reset_cb().set_inputline(m_maincpu, INPUT_LINE_RESET); + configure_nmk004(config); ym2203_device &ymsnd(YM2203(config, "ymsnd", XTAL(12'000'000)/8)); // verified on PCB ymsnd.irq_handler().set("nmk004", FUNC(nmk004_device::ym2203_irq_handler)); @@ -5062,8 +5080,9 @@ void tdragon_prot_state::mcu_side_shared_w(offs_t offset, u8 data) u8 tdragon_prot_state::mcu_side_shared_r(offs_t offset) { - u8 retval = m_maincpu->space(AS_PROGRAM).read_byte((offset)); - LOG("%s: mcu_side_shared_r offset %08x (retval %02x)\n", machine().describe_context(), offset, retval); + const u8 retval = m_maincpu->space(AS_PROGRAM).read_byte(offset); + if (!machine().side_effects_disabled()) + LOG("%s: mcu_side_shared_r offset %08x (retval %02x)\n", machine().describe_context(), offset, retval); return retval; } @@ -5136,7 +5155,7 @@ void nmk16_state::strahl(machine_config &config) SPEAKER(config, "mono").front_center(); NMK004(config, m_nmk004, 8000000); - m_nmk004->reset_cb().set_inputline(m_maincpu, INPUT_LINE_RESET); + configure_nmk004(config); ym2203_device &ymsnd(YM2203(config, "ymsnd", 1500000)); ymsnd.irq_handler().set("nmk004", FUNC(nmk004_device::ym2203_irq_handler)); @@ -5209,7 +5228,7 @@ void nmk16_state::hachamf(machine_config &config) SPEAKER(config, "mono").front_center(); NMK004(config, m_nmk004, 8000000); - m_nmk004->reset_cb().set_inputline(m_maincpu, INPUT_LINE_RESET); + configure_nmk004(config); ym2203_device &ymsnd(YM2203(config, "ymsnd", 1500000)); ymsnd.irq_handler().set("nmk004", FUNC(nmk004_device::ym2203_irq_handler)); @@ -5286,7 +5305,7 @@ void nmk16_state::macross(machine_config &config) SPEAKER(config, "mono").front_center(); NMK004(config, m_nmk004, XTAL(16'000'000)/2); // verified on PCB - m_nmk004->reset_cb().set_inputline(m_maincpu, INPUT_LINE_RESET); + configure_nmk004(config); ym2203_device &ymsnd(YM2203(config, "ymsnd", XTAL(12'000'000)/8)); // verified on PCB ymsnd.irq_handler().set("nmk004", FUNC(nmk004_device::ym2203_irq_handler)); @@ -5324,7 +5343,7 @@ void nmk16_state::blkheart(machine_config &config) SPEAKER(config, "mono").front_center(); NMK004(config, m_nmk004, 8000000); - m_nmk004->reset_cb().set_inputline(m_maincpu, INPUT_LINE_RESET); + configure_nmk004(config); ym2203_device &ymsnd(YM2203(config, "ymsnd", XTAL(12'000'000)/8)); // verified on PCB ymsnd.irq_handler().set("nmk004", FUNC(nmk004_device::ym2203_irq_handler)); @@ -5361,7 +5380,7 @@ void nmk16_state::gunnail(machine_config &config) SPEAKER(config, "mono").front_center(); NMK004(config, m_nmk004, XTAL(16'000'000)/2); // verified on PCB - m_nmk004->reset_cb().set_inputline(m_maincpu, INPUT_LINE_RESET); + configure_nmk004(config); ym2203_device &ymsnd(YM2203(config, "ymsnd", XTAL(12'000'000)/8)); // verified on PCB ymsnd.irq_handler().set("nmk004", FUNC(nmk004_device::ym2203_irq_handler)); @@ -6272,13 +6291,13 @@ void afega_state::afega_map(address_map &map) map(0x084000, 0x084003).ram().w(FUNC(afega_state::afega_scroll_w<0>)); // Scroll on redhawkb (mirror or changed?..) map(0x084004, 0x084007).ram().w(FUNC(afega_state::afega_scroll_w<1>)); // Scroll on redhawkb (mirror or changed?..) map(0x088000, 0x0885ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); // Palette - map(0x08c000, 0x08c003).ram().w(FUNC(afega_state::afega_scroll_w<0>)).share("afega_scroll_0"); // Scroll - map(0x08c004, 0x08c007).ram().w(FUNC(afega_state::afega_scroll_w<1>)).share("afega_scroll_1"); // - map(0x090000, 0x093fff).ram().w(FUNC(afega_state::bgvideoram_w<0>)).share("bgvideoram0"); // Layer 0 // ? - map(0x09c000, 0x09c7ff).ram().w(FUNC(afega_state::txvideoram_w)).share("txvideoram"); // Layer 1 + map(0x08c000, 0x08c003).ram().w(FUNC(afega_state::afega_scroll_w<0>)).share(m_afega_scroll[0]); // Scroll + map(0x08c004, 0x08c007).ram().w(FUNC(afega_state::afega_scroll_w<1>)).share(m_afega_scroll[1]); // + map(0x090000, 0x093fff).ram().w(FUNC(afega_state::bgvideoram_w<0>)).share(m_bgvideoram[0]); // Layer 0 // ? + map(0x09c000, 0x09c7ff).ram().w(FUNC(afega_state::txvideoram_w)).share(m_txvideoram); // Layer 1 - map(0x0c0000, 0x0cffff).ram().w(FUNC(afega_state::mainram_strange_w)).share("mainram"); - map(0x0f0000, 0x0fffff).ram().w(FUNC(afega_state::mainram_strange_w)).share("mainram"); + map(0x0c0000, 0x0cffff).ram().w(FUNC(afega_state::mainram_strange_w)).share(m_mainram); + map(0x0f0000, 0x0fffff).ram().w(FUNC(afega_state::mainram_strange_w)).share(m_mainram); } // firehawk has 0x100000 bytes of program ROM (at least the switchable version) so the above can't work. @@ -6294,13 +6313,13 @@ void afega_state::firehawk_map(address_map &map) map(0x284000, 0x284003).ram().w(FUNC(afega_state::afega_scroll_w<0>)); // Scroll on redhawkb (mirror or changed?..) map(0x284004, 0x284007).ram().w(FUNC(afega_state::afega_scroll_w<1>)); // Scroll on redhawkb (mirror or changed?..) map(0x288000, 0x2885ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); // Palette - map(0x28c000, 0x28c003).ram().w(FUNC(afega_state::afega_scroll_w<0>)).share("afega_scroll_0"); // Scroll - map(0x28c004, 0x28c007).ram().w(FUNC(afega_state::afega_scroll_w<1>)).share("afega_scroll_1"); // - map(0x290000, 0x293fff).ram().w(FUNC(afega_state::bgvideoram_w<0>)).share("bgvideoram0"); // Layer 0 // ? - map(0x29c000, 0x29c7ff).ram().w(FUNC(afega_state::txvideoram_w)).share("txvideoram"); // Layer 1 + map(0x28c000, 0x28c003).ram().w(FUNC(afega_state::afega_scroll_w<0>)).share(m_afega_scroll[0]); // Scroll + map(0x28c004, 0x28c007).ram().w(FUNC(afega_state::afega_scroll_w<1>)).share(m_afega_scroll[1]); // + map(0x290000, 0x293fff).ram().w(FUNC(afega_state::bgvideoram_w<0>)).share(m_bgvideoram[0]); // Layer 0 // ? + map(0x29c000, 0x29c7ff).ram().w(FUNC(afega_state::txvideoram_w)).share(m_txvideoram); // Layer 1 - map(0x3c0000, 0x3cffff).ram().w(FUNC(afega_state::mainram_strange_w)).share("mainram"); - map(0x3f0000, 0x3fffff).ram().w(FUNC(afega_state::mainram_strange_w)).share("mainram"); + map(0x3c0000, 0x3cffff).ram().w(FUNC(afega_state::mainram_strange_w)).share(m_mainram); + map(0x3f0000, 0x3fffff).ram().w(FUNC(afega_state::mainram_strange_w)).share(m_mainram); } @@ -6319,7 +6338,7 @@ void afega_state::spec2k_oki1_banking_w(u8 data) m_oki[1]->set_rom_bank(1); } -void afega_state::afega_sound_cpu(address_map &map) +void afega_state::afega_sound_map(address_map &map) { map(0x0003, 0x0003).nopw(); // bug in sound prg? map(0x0004, 0x0004).nopw(); // bug in sound prg? @@ -6330,7 +6349,7 @@ void afega_state::afega_sound_cpu(address_map &map) map(0xf80a, 0xf80a).rw(m_oki[0], FUNC(okim6295_device::read), FUNC(okim6295_device::write)); // M6295 } -void afega_state::firehawk_sound_cpu(address_map &map) +void afega_state::firehawk_sound_map(address_map &map) { map(0x0000, 0xefff).rom(); map(0xf000, 0xf7ff).ram(); @@ -6391,7 +6410,7 @@ void afega_state::stagger1(machine_config &config) set_hacky_interrupt_timing(config); Z80(config, m_audiocpu, XTAL(4'000'000)); // verified on PCB - m_audiocpu->set_addrmap(AS_PROGRAM, &afega_state::afega_sound_cpu); + m_audiocpu->set_addrmap(AS_PROGRAM, &afega_state::afega_sound_map); // video hardware set_screen_lowres(config); @@ -6474,7 +6493,7 @@ void afega_state::firehawk(machine_config &config) set_hacky_interrupt_timing(config); Z80(config, m_audiocpu, 4000000); - m_audiocpu->set_addrmap(AS_PROGRAM, &afega_state::firehawk_sound_cpu); + m_audiocpu->set_addrmap(AS_PROGRAM, &afega_state::firehawk_sound_map); // video hardware set_screen_lowres(config); @@ -6569,7 +6588,7 @@ ROM_START( vandyke ) ROM_LOAD16_BYTE( "vdk-1.16", 0x00000, 0x20000, CRC(c1d01c59) SHA1(04a7fd31ca4d87d078070390660edf08bf1d96b5) ) ROM_LOAD16_BYTE( "vdk-2.15", 0x00001, 0x20000, CRC(9d741cc2) SHA1(2d101044fba5fc5b7d63869a0a053c42fdc2598b) ) - ROM_REGION(0x10000, "audiocpu", 0 ) // 64k for sound CPU code + ROM_REGION(0x10000, "nmk004", 0 ) // 64k for sound CPU code ROM_LOAD( "vdk-4.127", 0x00000, 0x10000, CRC(eba544f0) SHA1(36f6d048d15a392542a9220a244d8a7049aaff8b) ) ROM_REGION( 0x010000, "fgtile", 0 ) @@ -6602,7 +6621,7 @@ ROM_START( vandykejal ) ROM_LOAD16_BYTE( "vdk-1.16", 0x00000, 0x20000, CRC(c1d01c59) SHA1(04a7fd31ca4d87d078070390660edf08bf1d96b5) ) ROM_LOAD16_BYTE( "jaleco2.15", 0x00001, 0x20000, CRC(170e4d2e) SHA1(6009d19d30e345fea93e039d165061e2b20ff058) ) - ROM_REGION(0x10000, "audiocpu", 0 ) // 64k for sound CPU code + ROM_REGION(0x10000, "nmk004", 0 ) // 64k for sound CPU code ROM_LOAD( "vdk-4.127", 0x00000, 0x10000, CRC(eba544f0) SHA1(36f6d048d15a392542a9220a244d8a7049aaff8b) ) ROM_REGION( 0x010000, "fgtile", 0 ) @@ -6635,7 +6654,7 @@ ROM_START( vandykejal2 ) ROM_LOAD16_BYTE( "vdk-even.16", 0x00000, 0x20000, CRC(cde05a84) SHA1(dab5981d7dad9abe86cfe011da8ca0b11d484a3f) ) // Hand written labels, dated 2/12 ROM_LOAD16_BYTE( "vdk-odd.15", 0x00001, 0x20000, CRC(0f6fea40) SHA1(3acbe72c251d51b028d8c66274263a2b39b042ea) ) - ROM_REGION(0x10000, "audiocpu", 0 ) // 64k for sound CPU code + ROM_REGION(0x10000, "nmk004", 0 ) // 64k for sound CPU code ROM_LOAD( "vdk-4.127", 0x00000, 0x10000, CRC(eba544f0) SHA1(36f6d048d15a392542a9220a244d8a7049aaff8b) ) ROM_REGION( 0x010000, "fgtile", 0 ) @@ -6918,7 +6937,7 @@ ROM_START( mustang ) ROM_LOAD16_BYTE( "2.bin", 0x00000, 0x20000, CRC(bd9f7c89) SHA1(a0af46a8ff82b90bece2515e1bd74e7a7ddf5379) ) ROM_LOAD16_BYTE( "3.bin", 0x00001, 0x20000, CRC(0eec36a5) SHA1(c549fbcd3e2741a6d0f2633ded6a85909d37f633) ) - ROM_REGION(0x10000, "audiocpu", 0 ) // 64k for sound CPU code + ROM_REGION(0x10000, "nmk004", 0 ) // 64k for sound CPU code ROM_LOAD( "90058-7", 0x00000, 0x10000, CRC(920a93c8) SHA1(7660ca419e2fd98848ae7f5994994eaed023151e) ) ROM_REGION( 0x020000, "fgtile", 0 ) @@ -6949,7 +6968,7 @@ ROM_START( mustangs ) ROM_LOAD16_BYTE( "90058-2", 0x00000, 0x20000, CRC(833aa458) SHA1(a9924f7044397e3a36c674b064173ffae80a79ec) ) ROM_LOAD16_BYTE( "90058-3", 0x00001, 0x20000, CRC(e4b80f06) SHA1(ce589cebb5ea85c89eb44796b821a4bd0c44b9a8) ) - ROM_REGION(0x10000, "audiocpu", 0 ) // 64k for sound CPU code + ROM_REGION(0x10000, "nmk004", 0 ) // 64k for sound CPU code ROM_LOAD( "90058-7", 0x00000, 0x10000, CRC(920a93c8) SHA1(7660ca419e2fd98848ae7f5994994eaed023151e) ) ROM_REGION( 0x020000, "fgtile", 0 ) @@ -7151,7 +7170,7 @@ ROM_START( acrobatm ) ROM_LOAD( "am-01.ic42", 0x000000, 0x100000, CRC(5672bdaa) SHA1(5401a104d72904de19b73125451767bc63d36809) ) // Sprites ROM_LOAD( "am-02.ic29", 0x100000, 0x080000, CRC(b4c0ace3) SHA1(5d638781d588cfbf4025d002d5a2309049fe1ee5) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) + ROM_REGION( 0x10000, "nmk004", 0 ) ROM_LOAD( "4.ic74", 0x00000, 0x10000, CRC(176905fb) SHA1(135a184f44bedd93b293b9124fa0bd725e0ee93b) ) ROM_REGION( 0x80000, "oki1", 0 ) // OKIM6295 samples @@ -7197,7 +7216,7 @@ ROM_END /* -S.B.S. Gomorrah / Bio-ship Paladin (UPL, 1993) +S.B.S. Gomorrah / Bio-ship Paladin (UPL, 1990) Hardware info by Guru PCB Layout @@ -7256,14 +7275,14 @@ ROM_START( bioship ) ROM_REGION( 0x80000, "sprites", 0 ) ROM_LOAD( "sbs-g_03.ic194", 0x000000, 0x80000, CRC(60e00d7b) SHA1(36fd02a7842ce1e79b8c4cfbe9c97052bef4aa62) ) // Sprites - ROM_REGION( 0x80000, "gfx4", 0 ) + ROM_REGION( 0x80000, "bg2tile", 0 ) ROM_LOAD( "sbs-g_02.ic4", 0x000000, 0x80000, CRC(f31eb668) SHA1(67d6d56ea203edfbae4db658399bf61f14134206) ) // Background ROM_REGION16_BE(0x20000, "tilerom", 0 ) // Background tilemaps (used at runtime) ROM_LOAD16_BYTE( "8.ic27", 0x00000, 0x10000, CRC(75a46fea) SHA1(3d78cfc482b42779bb5aedb722c4a39cbc71bd10) ) ROM_LOAD16_BYTE( "9.ic26", 0x00001, 0x10000, CRC(d91448ee) SHA1(7f84ca3605edcab4bf226dab8dd7218cd5c3e5a4) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) + ROM_REGION( 0x10000, "nmk004", 0 ) ROM_LOAD( "6.ic120", 0x00000, 0x10000, CRC(5f39a980) SHA1(2a440f86685249f9c317634cad8cdedc8a8f1491) ) ROM_REGION(0x80000, "oki1", 0 ) // Oki sample data @@ -7296,14 +7315,14 @@ ROM_START( sbsgomo ) ROM_REGION( 0x80000, "sprites", 0 ) ROM_LOAD( "sbs-g_03.ic194", 0x000000, 0x80000, CRC(60e00d7b) SHA1(36fd02a7842ce1e79b8c4cfbe9c97052bef4aa62) ) // Sprites - ROM_REGION( 0x80000, "gfx4", 0 ) + ROM_REGION( 0x80000, "bg2tile", 0 ) ROM_LOAD( "sbs-g_02.ic4", 0x000000, 0x80000, CRC(f31eb668) SHA1(67d6d56ea203edfbae4db658399bf61f14134206) ) // Background ROM_REGION16_BE(0x20000, "tilerom", 0 ) // Background tilemaps (used at runtime) ROM_LOAD16_BYTE( "8.ic27", 0x00000, 0x10000, CRC(75a46fea) SHA1(3d78cfc482b42779bb5aedb722c4a39cbc71bd10) ) ROM_LOAD16_BYTE( "9.ic26", 0x00001, 0x10000, CRC(d91448ee) SHA1(7f84ca3605edcab4bf226dab8dd7218cd5c3e5a4) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) + ROM_REGION( 0x10000, "nmk004", 0 ) ROM_LOAD( "6.ic120", 0x00000, 0x10000, CRC(5f39a980) SHA1(2a440f86685249f9c317634cad8cdedc8a8f1491) ) ROM_REGION(0x80000, "oki1", 0 ) // Oki sample data @@ -7327,7 +7346,7 @@ ROM_START( blkheart ) ROM_LOAD16_BYTE( "blkhrt.7", 0x00000, 0x20000, CRC(5bd248c0) SHA1(0649f4f8682404aeb3fc80643fcabc2d7836bb23) ) ROM_LOAD16_BYTE( "blkhrt.6", 0x00001, 0x20000, CRC(6449e50d) SHA1(d8cd126d921c95478346da96c20da01212395d77) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) // Code for (unknown?) CPU + ROM_REGION( 0x10000, "nmk004", 0 ) // Code for NMK004 CPU ROM_LOAD( "4.bin", 0x00000, 0x10000, CRC(7cefa295) SHA1(408f46613b3620cee31dec43281688d231b47ddd) ) ROM_REGION( 0x020000, "fgtile", 0 ) @@ -7357,7 +7376,7 @@ ROM_START( blkheartj ) ROM_LOAD16_BYTE( "7.bin", 0x00000, 0x20000, CRC(e0a5c667) SHA1(3ef39b2dc1f7ffdddf586f0b3080ecd1f362ec37) ) ROM_LOAD16_BYTE( "6.bin", 0x00001, 0x20000, CRC(7cce45e8) SHA1(72491e30d1f9be2eede21fdde5a7484d4f65cfbf) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) // Code for (unknown?) CPU + ROM_REGION( 0x10000, "nmk004", 0 ) // Code for NMK004 CPU ROM_LOAD( "4.bin", 0x00000, 0x10000, CRC(7cefa295) SHA1(408f46613b3620cee31dec43281688d231b47ddd) ) ROM_REGION( 0x020000, "fgtile", 0 ) @@ -7396,7 +7415,7 @@ ROM_START( tdragon ) ROM_REGION( 0x100000, "sprites", 0 ) ROM_LOAD16_WORD_SWAP( "91070.4", 0x000000, 0x100000, CRC(3eedc2fe) SHA1(9f48986c231a8fbc07f2b39b2017d1e967b2ed3c) ) // Sprites - ROM_REGION( 0x010000, "audiocpu", 0 ) // NMK004 sound data + ROM_REGION( 0x010000, "nmk004", 0 ) // NMK004 sound data ROM_LOAD( "91070.1", 0x00000, 0x10000, CRC(bf493d74) SHA1(6f8f5eff4b71fb6cabda10075cfa88a3f607859e) ) ROM_REGION( 0x080000, "oki1", 0 ) // OKIM6295 samples @@ -7429,7 +7448,7 @@ ROM_START( tdragon1 ) ROM_REGION( 0x100000, "sprites", 0 ) ROM_LOAD16_WORD_SWAP( "91070.4", 0x000000, 0x100000, CRC(3eedc2fe) SHA1(9f48986c231a8fbc07f2b39b2017d1e967b2ed3c) ) // Sprites - ROM_REGION( 0x010000, "audiocpu", 0 ) // NMK004 sound data + ROM_REGION( 0x010000, "nmk004", 0 ) // NMK004 sound data ROM_LOAD( "91070.1", 0x00000, 0x10000, CRC(bf493d74) SHA1(6f8f5eff4b71fb6cabda10075cfa88a3f607859e) ) ROM_REGION( 0x080000, "oki1", 0 ) // OKIM6295 samples @@ -7648,10 +7667,10 @@ ROM_START( strahl ) ROM_LOAD( "strl4-02.57", 0x080000, 0x80000, CRC(2a38552b) SHA1(82335fc6aa3de9145dd84952e5ed423493bf7141) ) ROM_LOAD( "strl5-03.58", 0x100000, 0x80000, CRC(a0e7d210) SHA1(96a762a3a1cdeaa91bde50429e0ac665fb81190b) ) - ROM_REGION( 0x80000, "gfx4", 0 ) + ROM_REGION( 0x80000, "bg2tile", 0 ) ROM_LOAD( "str6b1w1.776", 0x000000, 0x80000, CRC(bb1bb155) SHA1(83a02e89180e15f0e7817e0e92b4bf4e209bb69a) ) // Tiles - ROM_REGION( 0x10000, "audiocpu", 0 ) + ROM_REGION( 0x10000, "nmk004", 0 ) ROM_LOAD( "strahl-4.66", 0x00000, 0x10000, CRC(60a799c4) SHA1(8ade3cf827a389f7cb4080957dc4d67077ea4166) ) ROM_REGION( 0xa0000, "oki1", 0 ) // Oki sample data @@ -7685,10 +7704,10 @@ ROM_START( strahlj ) ROM_LOAD( "strl4-02.57", 0x080000, 0x80000, CRC(2a38552b) SHA1(82335fc6aa3de9145dd84952e5ed423493bf7141) ) ROM_LOAD( "strl5-03.58", 0x100000, 0x80000, CRC(a0e7d210) SHA1(96a762a3a1cdeaa91bde50429e0ac665fb81190b) ) - ROM_REGION( 0x80000, "gfx4", 0 ) + ROM_REGION( 0x80000, "bg2tile", 0 ) ROM_LOAD( "str6b1w1.776", 0x000000, 0x80000, CRC(bb1bb155) SHA1(83a02e89180e15f0e7817e0e92b4bf4e209bb69a) ) // Tiles - ROM_REGION( 0x10000, "audiocpu", 0 ) + ROM_REGION( 0x10000, "nmk004", 0 ) ROM_LOAD( "strahl-4.66", 0x00000, 0x10000, CRC(60a799c4) SHA1(8ade3cf827a389f7cb4080957dc4d67077ea4166) ) ROM_REGION( 0xa0000, "oki1", 0 ) // Oki sample data @@ -7722,10 +7741,10 @@ ROM_START( strahlja ) ROM_LOAD( "strl4-02.57", 0x080000, 0x80000, CRC(2a38552b) SHA1(82335fc6aa3de9145dd84952e5ed423493bf7141) ) ROM_LOAD( "strl5-03.58", 0x100000, 0x80000, CRC(a0e7d210) SHA1(96a762a3a1cdeaa91bde50429e0ac665fb81190b) ) - ROM_REGION( 0x80000, "gfx4", 0 ) + ROM_REGION( 0x80000, "bg2tile", 0 ) ROM_LOAD( "str6b1w1.776", 0x000000, 0x80000, CRC(bb1bb155) SHA1(83a02e89180e15f0e7817e0e92b4bf4e209bb69a) ) // Tiles - ROM_REGION( 0x10000, "audiocpu", 0 ) + ROM_REGION( 0x10000, "nmk004", 0 ) ROM_LOAD( "strahl-4.66", 0x00000, 0x10000, CRC(60a799c4) SHA1(8ade3cf827a389f7cb4080957dc4d67077ea4166) ) ROM_REGION( 0xa0000, "oki1", 0 ) // Oki sample data @@ -7758,7 +7777,7 @@ ROM_START( strahljbl ) // N0 892 PCB, this bootleg uses SEIBU sound system ROM_LOAD( "d.8m", 0x000000, 0x100000, CRC(09ede4d4) SHA1(5c5dcc57f78145b9c6e711a32afc0aab7a5a0450) ) ROM_LOAD( "5.4m", 0x100000, 0x080000, CRC(a0e7d210) SHA1(96a762a3a1cdeaa91bde50429e0ac665fb81190b) ) - ROM_REGION( 0x80000, "gfx4", 0 ) // same as original + ROM_REGION( 0x80000, "bg2tile", 0 ) // same as original ROM_LOAD( "4.4m", 0x000000, 0x80000, CRC(bb1bb155) SHA1(83a02e89180e15f0e7817e0e92b4bf4e209bb69a) ) // Tiles ROM_REGION(0x20000, "audiocpu", 0 ) @@ -7782,7 +7801,7 @@ ROM_START( hachamf ) // has 'WAKAUS' for the game name string, and appears to have programs for multiple games, depending on port 7 reads ROM_LOAD( "nmk-113.bin", 0x00000, 0x04000, CRC(f3072715) SHA1(cee6534de6645c41cbbb1450ad3e5207e44460c7) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) // NMK004 sound data + ROM_REGION( 0x10000, "nmk004", 0 ) // NMK004 sound data ROM_LOAD( "1.70", 0x00000, 0x10000, CRC(9e6f48fc) SHA1(aeb5bfecc025b5478f6de874792fc0f7f54932be) ) ROM_REGION( 0x020000, "fgtile", 0 ) @@ -7818,7 +7837,7 @@ ROM_START( hachamfa) // reportedly a Korean PCB / version // has 'WAKAUS' for the game name string, and appears to have programs for multiple games, depending on port 7 reads ROM_LOAD( "nmk-113.bin", 0x00000, 0x04000, CRC(f3072715) SHA1(cee6534de6645c41cbbb1450ad3e5207e44460c7) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) // NMK004 sound data + ROM_REGION( 0x10000, "nmk004", 0 ) // NMK004 sound data ROM_LOAD( "1.70", 0x00000, 0x10000, CRC(9e6f48fc) SHA1(aeb5bfecc025b5478f6de874792fc0f7f54932be) ) ROM_REGION( 0x020000, "fgtile", 0 ) // Smaller NMK logo plus alternate Distributed by UPL Company Limited starting at tile 0xF80 @@ -7850,7 +7869,7 @@ ROM_START( hachamfb ) // Thunder Dragon conversion - unprotected prototype or bo ROM_LOAD16_BYTE( "8.bin", 0x00000, 0x20000, CRC(14845b65) SHA1(5cafd07a8a6f5ccbb36de7a90571f8b33ecf273e) ) // internally reports as 19th Sep. 1991 ROM_LOAD16_BYTE( "7.bin", 0x00001, 0x20000, CRC(069ca579) SHA1(0db4c3c41e17fca613d11de89b388a4af206ec6b) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) // NMK004 sound data + ROM_REGION( 0x10000, "nmk004", 0 ) // NMK004 sound data ROM_LOAD( "1.70", 0x00000, 0x10000, CRC(9e6f48fc) SHA1(aeb5bfecc025b5478f6de874792fc0f7f54932be) ) ROM_REGION( 0x020000, "fgtile", 0 ) @@ -7882,7 +7901,7 @@ ROM_START( hachamfp ) // Protoype Location Test Release; Hand-written labels wit ROM_LOAD16_BYTE( "kf-68-pe-b.ic7", 0x00000, 0x20000, CRC(b98a525e) SHA1(161c3b3360068e606e4d4104cc172b9736a52eeb) ) // Label says "KF 9/25 II 68 PE B" ROM_LOAD16_BYTE( "kf-68-po-b.ic6", 0x00001, 0x20000, CRC(b62ad179) SHA1(60a66fb9eb3fc792d172e1f4507a806ac2ad4217) ) // Label says "KF 9/25 II 68 PO B" - ROM_REGION( 0x10000, "audiocpu", 0 ) // NMK004 sound data + ROM_REGION( 0x10000, "nmk004", 0 ) // NMK004 sound data ROM_LOAD( "kf-snd.ic4", 0x00000, 0x10000, CRC(f7cace47) SHA1(599f6406f5bea69d77f39847d5d5fa361cdb7d00) ) // Label says "KF 9/20 SND" ROM_REGION( 0x020000, "fgtile", 0 ) @@ -7913,7 +7932,7 @@ ROM_START( macross ) ROM_REGION( 0x80000, "maincpu", 0 ) // 68000 code ROM_LOAD16_WORD_SWAP( "921a03", 0x00000, 0x80000, CRC(33318d55) SHA1(c99f85e09bd334dc8ce138b08cbed2331b0d67dd) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) // sound program (unknown CPU) + ROM_REGION( 0x10000, "nmk004", 0 ) // sound program (NMK004) ROM_LOAD( "921a02", 0x00000, 0x10000, CRC(77c082c7) SHA1(be07aa14d0116f830f98e11a19f1debb48a5230e) ) ROM_REGION( 0x020000, "fgtile", 0 ) @@ -8018,7 +8037,7 @@ ROM_START( gunnail ) ROM_LOAD16_BYTE( "3e.u131", 0x00000, 0x40000, CRC(61d985b2) SHA1(96daca603f18accb47f98a3e584b2c84fc5a2ca4) ) ROM_LOAD16_BYTE( "3o.u133", 0x00001, 0x40000, CRC(f114e89c) SHA1(a12f5278167f446bb5277e87289c41b5aa365c86) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) // Code for NMK004 CPU + ROM_REGION( 0x10000, "nmk004", 0 ) // Code for NMK004 CPU ROM_LOAD( "92077_2.u101", 0x00000, 0x10000, CRC(cd4e55f8) SHA1(92182767ca0ec37ec4949bd1a88c2efdcdcb60ed) ) ROM_REGION( 0x020000, "fgtile", 0 ) @@ -8055,7 +8074,7 @@ ROM_START( gunnailp ) ROM_REGION( 0x80000, "maincpu", 0 ) // 68000 code ROM_LOAD16_WORD_SWAP( "3.u132", 0x00000, 0x80000, CRC(93570f03) SHA1(54fb203b5bfceb0ac86627bff3e67863f460fe73) ) - ROM_REGION( 0x10000, "audiocpu", 0 ) // Code for NMK004 CPU + ROM_REGION( 0x10000, "nmk004", 0 ) // Code for NMK004 CPU ROM_LOAD( "92077_2.u101", 0x00000, 0x10000, CRC(cd4e55f8) SHA1(92182767ca0ec37ec4949bd1a88c2efdcdcb60ed) ) ROM_REGION( 0x020000, "fgtile", 0 ) @@ -10605,7 +10624,7 @@ GAME( 1993, powerinsc, powerins, powerinsc, powerins, nmk16_state, GAME( 1991, manybloc, 0, manybloc, manybloc, nmk16_state, init_tharrier, ROT270, "Bee-Oh", "Many Block", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_SOUND ) // clone board, different sound / bg hardware, but similar memory maps, same tx layer, sprites etc. -GAME( 1997, tomagic, 0, tomagic, tomagic, nmk16_tomagic_state, init_tomagic, ROT0, "Hobbitron T.K.Trading Co. Ltd.", "Tom Tom Magic", 0 ) +GAME( 1997, tomagic, 0, tomagic, tomagic, nmk16_tomagic_state, init_tomagic, ROT0, "Hobbitron T.K.Trading Co. Ltd.", "Tom Tom Magic", 0 ) // these use the Seibu sound system (sound / music stolen from Raiden) rather than the bootleggers copying the nmk004 GAME( 1990, mustangb, mustang, mustangb, mustang, nmk16_state, empty_init, ROT0, "bootleg", "US AAF Mustang (bootleg, set 1)", 0 ) diff --git a/src/mame/nmk/nmk16.h b/src/mame/nmk/nmk16.h index 1c307dee8657b..9c223b7dca829 100644 --- a/src/mame/nmk/nmk16.h +++ b/src/mame/nmk/nmk16.h @@ -105,22 +105,6 @@ class nmk16_state : public driver_device, public seibu_sound_common virtual void machine_start() override ATTR_COLD; virtual void machine_reset() override ATTR_COLD; - TIMER_DEVICE_CALLBACK_MEMBER(nmk16_scanline); - TIMER_DEVICE_CALLBACK_MEMBER(nmk16_hacky_scanline); - u32 screen_update_macross(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - - void txvideoram_w(offs_t offset, u16 data, u16 mem_mask = ~0); - void flipscreen_w(u8 data); - void vandyke_flipscreen_w(u8 data); - void tilebank_w(u8 data); - - void macross2_sound_reset_w(u16 data); - void macross2_audiobank_w(u8 data); - void ssmissin_okibank_w(u8 data); - void powerinsa_okibank_w(u8 data); - template void tharrier_okibank_w(u8 data); - u8 powerins_bootleg_fake_ym2203_r(); - required_device m_maincpu; optional_device m_audiocpu; optional_device_array m_oki; @@ -146,19 +130,18 @@ class nmk16_state : public driver_device, public seibu_sound_common optional_ioport_array<2> m_dsw_io; optional_ioport_array<3> m_in_io; - int m_tilerambank = 0; + u32 m_tilerambank = 0; int m_sprdma_base = 0; - int mask[4*2]{}; std::unique_ptr m_spriteram_old; std::unique_ptr m_spriteram_old2; - int m_bgbank = 0; - int m_bioship_background_bank = 0; + u8 m_bgbank = 0; + u8 m_bioship_background_bank = 0; tilemap_t *m_bg_tilemap[2]{}; tilemap_t *m_tx_tilemap = nullptr; - int m_mustang_bg_xscroll = 0; + s32 m_mustang_bg_xscroll = 0; u8 m_scroll[2][4]{}; u16 m_vscroll[4]{}; - int m_prot_count = 0; + u8 m_prot_count = 0; u8 m_vtiming_val = 0; void mainram_strange_w(offs_t offset, u16 data/*, u16 mem_mask = ~0*/); @@ -168,6 +151,11 @@ class nmk16_state : public driver_device, public seibu_sound_common u16 tharrier_mcu_r(offs_t offset, u16 mem_mask = ~0); u16 vandykeb_r(); u16 tdragonb_prot_r(); + + void flipscreen_w(u8 data); + void vandyke_flipscreen_w(u8 data); + + void txvideoram_w(offs_t offset, u16 data, u16 mem_mask = ~0); template void bgvideoram_w(offs_t offset, u16 data, u16 mem_mask = ~0); void mustang_scroll_w(u16 data); void raphero_scroll_w(offs_t offset, u16 data, u16 mem_mask = ~0); @@ -176,16 +164,29 @@ class nmk16_state : public driver_device, public seibu_sound_common void vandyke_scroll_w(offs_t offset, u16 data); void vandykeb_scroll_w(offs_t offset, u16 data, u16 mem_mask = ~0); void manybloc_scroll_w(offs_t offset, u16 data, u16 mem_mask = ~0); + void tilebank_w(u8 data); void bioship_bank_w(u8 data); void nmk004_x0016_w(u16 data); void nmk004_bioship_x0016_w(u16 data); + void macross2_sound_reset_w(u16 data); + void macross2_audiobank_w(u8 data); + void ssmissin_okibank_w(u8 data); + void powerinsa_okibank_w(u8 data); + template void tharrier_okibank_w(u8 data); + u8 powerins_bootleg_fake_ym2203_r(); + void set_interrupt_timing(machine_config &config); void set_hacky_interrupt_timing(machine_config &config); void set_screen_lowres(machine_config &config); void set_screen_midres(machine_config &config); void set_screen_hires(machine_config &config); + void configure_nmk004(machine_config &config); + + TIMER_DEVICE_CALLBACK_MEMBER(nmk16_scanline); + TIMER_DEVICE_CALLBACK_MEMBER(nmk16_hacky_scanline); + TILEMAP_MAPPER_MEMBER(tilemap_scan_pages); template TILE_GET_INFO_MEMBER(common_get_bg_tile_info); TILE_GET_INFO_MEMBER(common_get_tx_tile_info); @@ -204,6 +205,7 @@ class nmk16_state : public driver_device, public seibu_sound_common void get_colour_6bit(u32 &colour, u32 &pri_mask); void get_sprite_flip(u16 attr, int &flipx, int &flipy, int &code); void get_flip_extcode_powerins(u16 attr, int &flipx, int &flipy, int &code); + u32 screen_update_macross(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); u32 screen_update_tharrier(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); u32 screen_update_strahl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); u32 screen_update_bjtwin(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); @@ -381,9 +383,9 @@ class afega_state : public nmk16_state void redhawki_video_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void afega_map(address_map &map) ATTR_COLD; - void afega_sound_cpu(address_map &map) ATTR_COLD; + void afega_sound_map(address_map &map) ATTR_COLD; void firehawk_map(address_map &map) ATTR_COLD; - void firehawk_sound_cpu(address_map &map) ATTR_COLD; + void firehawk_sound_map(address_map &map) ATTR_COLD; }; class nmk16_tomagic_state : public nmk16_state diff --git a/src/mame/nmk/nmk16_v.cpp b/src/mame/nmk/nmk16_v.cpp index a3f325f3a3848..2aee8b0877461 100644 --- a/src/mame/nmk/nmk16_v.cpp +++ b/src/mame/nmk/nmk16_v.cpp @@ -94,8 +94,7 @@ void nmk16_state::video_init() save_pointer(NAME(m_spriteram_old2), 0x1000/2); save_item(NAME(m_bgbank)); save_item(NAME(m_mustang_bg_xscroll)); - save_item(NAME(m_scroll[0])); - save_item(NAME(m_scroll[1])); + save_item(NAME(m_scroll)); save_item(NAME(m_vscroll)); save_item(NAME(m_tilerambank)); } @@ -112,7 +111,7 @@ VIDEO_START_MEMBER(nmk16_state, bioship) m_tx_tilemap->set_transparent_pen(15); video_init(); - m_bioship_background_bank=0; + m_bioship_background_bank = 0; save_item(NAME(m_bioship_background_bank)); m_bg_tilemap[0]->set_scrolldx(92, 92); m_bg_tilemap[1]->set_scrolldx(92, 92); @@ -209,7 +208,7 @@ void nmk16_state::mustang_scroll_w(u16 data) switch (data & 0xff00) { case 0x0000: - m_mustang_bg_xscroll = (m_mustang_bg_xscroll & 0x00ff) | ((data & 0x00ff)<<8); + m_mustang_bg_xscroll = (m_mustang_bg_xscroll & 0x00ff) | ((data & 0x00ff) << 8); break; case 0x0100: @@ -226,20 +225,20 @@ void nmk16_state::mustang_scroll_w(u16 data) break; } - m_bg_tilemap[0]->set_scrollx(0,m_mustang_bg_xscroll); + m_bg_tilemap[0]->set_scrollx(0, m_mustang_bg_xscroll); } void nmk16_state::bjtwin_scroll_w(offs_t offset, u8 data) { - m_bg_tilemap[0]->set_scrolly(0,-data); + m_bg_tilemap[0]->set_scrolly(0, -data); } void nmk16_state::vandyke_scroll_w(offs_t offset, u16 data) { m_vscroll[offset] = data; - m_bg_tilemap[0]->set_scrollx(0,m_vscroll[0] * 256 + (m_vscroll[1] >> 8)); - m_bg_tilemap[0]->set_scrolly(0,m_vscroll[2] * 256 + (m_vscroll[3] >> 8)); + m_bg_tilemap[0]->set_scrollx(0, m_vscroll[0] * 256 + (m_vscroll[1] >> 8)); + m_bg_tilemap[0]->set_scrolly(0, m_vscroll[2] * 256 + (m_vscroll[3] >> 8)); } void nmk16_state::vandykeb_scroll_w(offs_t offset, u16 data, u16 mem_mask) @@ -252,21 +251,21 @@ void nmk16_state::vandykeb_scroll_w(offs_t offset, u16 data, u16 mem_mask) case 6: COMBINE_DATA(&m_vscroll[0]); break; } - m_bg_tilemap[0]->set_scrollx(0,m_vscroll[0] * 256 + (m_vscroll[1] >> 8)); - m_bg_tilemap[0]->set_scrolly(0,m_vscroll[2] * 256 + (m_vscroll[3] >> 8)); + m_bg_tilemap[0]->set_scrollx(0, m_vscroll[0] * 256 + (m_vscroll[1] >> 8)); + m_bg_tilemap[0]->set_scrolly(0, m_vscroll[2] * 256 + (m_vscroll[3] >> 8)); } void nmk16_state::manybloc_scroll_w(offs_t offset, u16 data, u16 mem_mask) { COMBINE_DATA(&m_gunnail_scrollram[offset]); - m_bg_tilemap[0]->set_scrollx(0,m_gunnail_scrollram[0x82/2]); - m_bg_tilemap[0]->set_scrolly(0,m_gunnail_scrollram[0xc2/2]); + m_bg_tilemap[0]->set_scrollx(0, m_gunnail_scrollram[0x82/2]); + m_bg_tilemap[0]->set_scrolly(0, m_gunnail_scrollram[0xc2/2]); } void nmk16_state::flipscreen_w(u8 data) { - flip_screen_set(data & 0x01); + flip_screen_set(BIT(data, 0)); m_spritegen->set_flip_screen(flip_screen()); } @@ -292,7 +291,7 @@ void nmk16_state::raphero_scroll_w(offs_t offset, u16 data, u16 mem_mask) COMBINE_DATA(&m_gunnail_scrollram[offset]); if ((m_bgvideoram[0].bytes() > 0x4000) && (offset == 0)) { - int newbank = (m_gunnail_scrollram[0] >> 12) & ((m_bgvideoram[0].bytes() >> 14) - 1); + const int newbank = (m_gunnail_scrollram[0] >> 12) & ((m_bgvideoram[0].bytes() >> 14) - 1); if (m_tilerambank != newbank) { m_tilerambank = newbank; @@ -343,13 +342,13 @@ void nmk16_state::get_colour_6bit(u32 &colour, u32 &pri_mask) void nmk16_state::get_sprite_flip(u16 attr, int &flipx, int &flipy, int &code) { - flipy = (attr & 0x200) >> 9; - flipx = (attr & 0x100) >> 8; + flipy = BIT(attr, 9); + flipx = BIT(attr, 8); } void nmk16_state::get_flip_extcode_powerins(u16 attr, int &flipx, int &flipy, int &code) { - flipx = (attr & 0x1000) >> 12; + flipx = BIT(attr, 12); code = (code & 0x7fff) | ((attr & 0x100) << 7); } @@ -425,7 +424,7 @@ u32 nmk16_state::screen_update_tharrier(screen_device &screen, bitmap_ind16 &bit { screen.priority().fill(0, cliprect); /* I think the protection device probably copies this to the regs... */ - u16 tharrier_scroll = m_mainram[0x9f00/2]; + const u16 tharrier_scroll = m_mainram[0x9f00/2]; m_bg_tilemap[0]->set_scrollx(0, tharrier_scroll); @@ -459,7 +458,7 @@ void nmk16_state::screen_vblank_powerins_bootleg(int state) { m_maincpu->set_input_line(4, HOLD_LINE); // bootlegs don't have DMA? - memcpy(m_spriteram_old2.get(),m_spriteram_old.get(), 0x1000); + memcpy(m_spriteram_old2.get(), m_spriteram_old.get(), 0x1000); memcpy(m_spriteram_old.get(), m_mainram + m_sprdma_base / 2, 0x1000); } } @@ -511,8 +510,8 @@ void afega_state::video_update(screen_device &screen, bitmap_ind16 &bitmap, cons screen.priority().fill(0, cliprect); if (dsw_flipscreen) { - flip_screen_x_set(~m_dsw_io[0]->read() & 0x0100); - flip_screen_y_set(~m_dsw_io[0]->read() & 0x0200); + flip_screen_x_set(BIT(~m_dsw_io[0]->read(), 8)); + flip_screen_y_set(BIT(~m_dsw_io[0]->read(), 9)); } m_bg_tilemap[0]->set_scrollx(0, m_afega_scroll[0][1] + xoffset); @@ -531,8 +530,8 @@ void afega_state::video_update(screen_device &screen, bitmap_ind16 &bitmap, cons void afega_state::redhawki_video_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { screen.priority().fill(0, cliprect); - m_bg_tilemap[0]->set_scrollx(0, m_afega_scroll[1][0]&0xff); - m_bg_tilemap[0]->set_scrolly(0, m_afega_scroll[1][1]&0xff); + m_bg_tilemap[0]->set_scrollx(0, m_afega_scroll[1][0] & 0xff); + m_bg_tilemap[0]->set_scrolly(0, m_afega_scroll[1][1] & 0xff); m_bg_tilemap[0]->draw(screen, bitmap, cliprect, 0, 1); diff --git a/src/mame/novag/diablo.cpp b/src/mame/novag/diablo.cpp index e25f63e88808f..e6730d318e157 100644 --- a/src/mame/novag/diablo.cpp +++ b/src/mame/novag/diablo.cpp @@ -7,7 +7,8 @@ Novag Diablo 68000 (model 908) Novag Scorpio 68000 (model 909) Hardware notes (Diablo 68000): -- M68000 @ 16MHz, IPL1 256Hz, IPL2 from ACIA IRQ(always high) +- PCB label: 100126 REV-2 +- TMP68HC000P-16 @ 16MHz, IPL1 256Hz, IPL2 from ACIA IRQ(always high) - 2*8KB RAM TC5565 battery-backed, 2*32KB hashtable RAM TC55257 - 3*32KB ROM (27C256 or equivalent) - HD44780A00 LCD controller (16x1) diff --git a/src/mame/novag/primo.cpp b/src/mame/novag/primo.cpp index e0b6a19f8f6b5..3b1c3a5358347 100644 --- a/src/mame/novag/primo.cpp +++ b/src/mame/novag/primo.cpp @@ -12,29 +12,36 @@ properly. - if/when MAME supports an exit callback, hook up power-off switch to that - Novag Super System peripherals don't work on nsnova due to serial clock drift, baud rate differs a bit between host and client, m6801 serial emulation issue -- unmapped reads from 0x3c/0x3d (primo/supremo) or 0x33/0x34 (nsnova) +- unmapped reads from 0x33/0x34 (nsnova) or 0x3c/0x3d (others) - supremo unmapped writes to 0x2000/0x6000, always 0? - is the 1st version of supremo(black plastic) the same ROM? - is "Aquamarine / Super Nova" the same ROM as nsnova and just a redesign? BTANB: -- primo has the same bug as nvip, where if the user presses Go right after - entering a move during the opening, the CPU opponent will answer by playing - a move with white +- nprimo/beluga has the same bug as nvip, where if the user presses Go right + after entering a move during the opening, the CPU opponent will answer by + playing a move with white ================================================================================ -Novag Primo (model 871) ------------------------ +Novag Primo family +------------------ Hardware notes: + +Primo (model 871): - PCB label: 100059/100060 - Hitachi HD6301Y0P (mode 2) @ 8MHz - 2KB RAM(M5M5118P) - LCD with 4 7segs and custom segments, no LCD chip - buzzer, 16 LEDs, 8*8 chessboard buttons -The LCD is the same as the one in VIP / Super VIP. +Beluga (model 903): +- PCB label: 100116 +- CPU runs at 16MHz, rest is same as Primo + +The LCD is the same as the one in VIP / Super VIP. Beluga is an updated version +of the program in Primo, just in a different housing (more similar to nsnova). ================================================================================ @@ -83,6 +90,7 @@ the Super VIP combined with the Novag Super System Touch Sensory board. #include "speaker.h" // internal artwork +#include "novag_beluga.lh" #include "novag_primo.lh" #include "novag_snova.lh" #include "novag_supremo.lh" @@ -106,6 +114,7 @@ class primo_state : public driver_device { } void primo(machine_config &config); + void beluga(machine_config &config); void supremo(machine_config &config); void snova(machine_config &config); @@ -216,14 +225,14 @@ u8 primo_state::p2_r() if (BIT(m_select, i + 6)) data |= BIT(m_inputs[i]->read(), m_inp_mux); - // P23 (nprimo, supremo): power switch - if (!m_power) - data |= 8; - // P23 (nsnova): serial rx if (m_rs232) data |= m_rs232->rxd_r() << 3; + // P23 (others): power switch + if (!m_power) + data |= 8; + return data ^ 1; } @@ -330,28 +339,47 @@ static INPUT_PORTS_START( supremo ) INPUT_PORTS_END -static INPUT_PORTS_START( snova ) +static INPUT_PORTS_START( beluga ) PORT_START("IN.0") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_8) PORT_NAME("Trace Back / Next Best") PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_7) PORT_NAME("Trace Forward / Auto Play") PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6) PORT_NAME("Set Level / Pawn") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_NAME("Info / Knight") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_NAME("Easy / Bishop") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_NAME("Solve Mate / Rook") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_NAME("Sound / Queen") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_NAME("Referee / King") + + PORT_START("IN.1") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_I) PORT_NAME("Go") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_U) PORT_NAME("Restore") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Y) PORT_NAME("Hint") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) PORT_NAME("Clear Board / Clear") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_NAME("Color") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) PORT_NAME("Set Up / Verify") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W) PORT_NAME("Random") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Q) PORT_CODE(KEYCODE_N) PORT_NAME("New Game") + + PORT_START("POWER") // needs to be triggered for nvram to work + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_POWER_OFF) PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(primo_state::primo_power_off), 0) +INPUT_PORTS_END + +static INPUT_PORTS_START( snova ) + PORT_INCLUDE( beluga ) + + PORT_MODIFY("IN.0") PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5) PORT_NAME("Info / Echo / Knight") PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4) PORT_NAME("Easy / Moves / Bishop") PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3) PORT_NAME("Solve Mate / Language / Rook") PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2) PORT_NAME("Sound / Game / Queen") PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1) PORT_NAME("Referee / Board / King") - PORT_START("IN.1") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_I) PORT_NAME("Go") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_U) PORT_NAME("Restore") + PORT_MODIFY("IN.1") PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Y) PORT_NAME("Hint / Human") - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_T) PORT_NAME("Clear Board / Clear") PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_NAME("Color / Video") - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) PORT_NAME("Set Up / Verify") PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_W) PORT_NAME("Random / Auto Clock") - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_Q) PORT_CODE(KEYCODE_N) PORT_NAME("New Game") - PORT_START("POWER") // needs to be triggered for nvram to work + PORT_MODIFY("POWER") // needs to be triggered for nvram to work PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_POWER_OFF) PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(primo_state::snova_power_off), 0) INPUT_PORTS_END @@ -398,6 +426,20 @@ void primo_state::primo(machine_config &config) DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.25); } +void primo_state::beluga(machine_config &config) +{ + primo(config); + + // basic machine hardware + m_maincpu->set_clock(16_MHz_XTAL); + m_maincpu->in_p2_cb().set(FUNC(primo_state::p2_r)).mask(0xef); + + // P24 is tied to P52 (freq sel via P50-P53) + m_maincpu->in_p2_cb().append([this]() { return m_select << 2; }).mask(0x10); + + config.set_default_layout(layout_novag_beluga); +} + void primo_state::supremo(machine_config &config) { primo(config); @@ -445,6 +487,15 @@ ROM_START( nprimo ) ROM_END +ROM_START( beluga ) + ROM_REGION( 0x4000, "maincpu", 0 ) + ROM_LOAD("novag_903_31y0rm59p.u1", 0x0000, 0x4000, CRC(16fc6bfc) SHA1(5ab4c7e92eb7b6b449c388f50293dfd01aa87c24) ) + + ROM_REGION( 36256, "screen", 0 ) + ROM_LOAD("nvip.svg", 0, 36256, CRC(3373e0d5) SHA1(25bfbf0405017388c30f4529106baccb4723bc6b) ) +ROM_END + + ROM_START( supremo ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD("sp_a10.u5", 0x8000, 0x8000, CRC(1db63786) SHA1(4f24452ed8955b31ba88f68cc95c357660930aa4) ) @@ -481,6 +532,8 @@ ROM_END // YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS SYST( 1987, nprimo, 0, 0, primo, primo, primo_state, empty_init, "Novag Industries / Intelligent Heuristic Programming", "Primo (Novag)", MACHINE_SUPPORTS_SAVE ) +SYST( 1990, beluga, 0, 0, beluga, beluga, primo_state, empty_init, "Novag Industries / Intelligent Heuristic Programming", "Beluga", MACHINE_SUPPORTS_SAVE ) + SYST( 1988, supremo, 0, 0, supremo, supremo, primo_state, empty_init, "Novag Industries / Intelligent Heuristic Programming", "Supremo", MACHINE_SUPPORTS_SAVE ) SYST( 1990, nsnova, 0, 0, snova, snova, primo_state, empty_init, "Novag Industries / Intelligent Heuristic Programming", "Super Nova (Novag, set 1)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/oberheim/dmx.cpp b/src/mame/oberheim/dmx.cpp new file mode 100644 index 0000000000000..2e87b31d570bd --- /dev/null +++ b/src/mame/oberheim/dmx.cpp @@ -0,0 +1,1315 @@ +// license:BSD-3-Clause +// copyright-holders:m1macrophage + +/* +The Oberheim DMX is a digital drum machine. + +The firmware, running on a Z80, implements the drum machine functionality (e.g. +sequencer), controls the UI (scans for button presses, drives the display), +triggers voices, and controls voice variations. All hardware functionality is +mapped to I/O ports. Only ROM and RAM are mapped to memory. + +There are 8 voice cards, each of which can produce 3 variations, for a total of +24 sounds. The 8 voice cards can play back simultaneously, but only 1 variation +per card can be active at a time, for a total of 8 voices of polyphony. + +The drum sounds are samples stored in ROMs. During playback, they are +post-processed by an analog VCA, which is modulated by a Release envelope +genereator. Pitch and volume variations for each voice are also controlled by +analog circuitry. + +With the exception of the Cymbal voice, the bare voice PCBs are identical. +Other than having different ROMs, the voice cards are further configured by +multiple jumpers and differing component values. This configuration controls +nominal pitch, variation type (pitch, volume, decay, sample), and the +frequency response of the reconstruction filter. + +The Cymbal voice consists of 2 voice cards. One implements most of the circuit +found in the other voice cards, while the other holds the 8 2732 ROMS. + +Currently, this driver emulates the early version of the DMX. A later hardware +revision added additional memory, and the final hardware revision added MIDI. +Furthermore, later versions shipped with the "Mark II" voice cards. +These subsequent hardware revisions and the Mark II voice cards are not yet +emulated. + +The driver is based on the DMX's service manual, DMX schematics, and +http://www.electrongate.com/dmxfiles/dmxcards.html. It is intended as an +educational tool. + +PCBoards: +- Processor Board (includes the power supply and connectors) +- Switch Board (buttons, faders and display) +- 7 x voice cards: Bass, Snare, Hi-hat, Tom 1, Tom 2, Perc 1, Perc 2. +- 2 x cymbal cards: A single voice that occupies two card slots. + +Known audio inaccuracies (reasons for MACHINE_IMPERFECT_SOUND): +- No anti-aliasing filters (coming soon). +- Closed and Accent hi-hat volume variations might be wrong. See comments in + HIHAT_CONFIG (to be researched soon). +- No metronome yet. +- Linear- instead of audio-taper faders. +- The DMX stereo output uses fixed panning for each voice. Not yet emulated. +- Envelope decay ignores diodes in capacitor discharge path. Given the quick + decay, and that the error is larger at low volumes, this might not be + noticeable. +- Simplified diode model in pitch control. Very unlikely to be noticeable. + Error is within component tolerance margins. +- Simplified diode model in volume control. Very unlikely to be noticeable. + Error is within component tolerance margins. It is very small at high volumes, + and approaches component tolerance extremes at low volumes. + +Usage notes: +- Interactive layout included. +- The mixer faders can be controlled with the mouse, or from the "Slider + Controls" menu. +- Voices can be tuned using the "Sider Controls" menu. +- The drum keys are mapped to the keyboard, starting at "Q". Specifically: + Q - Bass 1, W - Snare 1, ... + A - Bass 2, S - Snare 2, ... + Z - Bass 3, X - Snare 3, ... +- The number buttons on the layout are mapped to the numeric keypad. +- Can run with a high sample rate: ./mame -window obdmx -samplerate 96000 +*/ + +#include "emu.h" +#include "cpu/z80/z80.h" +#include "machine/nvram.h" +#include "machine/output_latch.h" +#include "machine/rescap.h" +#include "machine/timer.h" +#include "sound/dac76.h" +#include "sound/mixer.h" +#include "video/dl1416.h" +#include "speaker.h" + +#include "oberheim_dmx.lh" + +#define LOG_TRIGGERS (1U << 1) +#define LOG_INT_TIMER (1U << 2) +#define LOG_FADERS (1U << 3) +#define LOG_SOUND (1U << 4) +#define LOG_PITCH (1U << 5) +#define LOG_VOLUME (1U << 6) +#define LOG_SAMPLES (1U << 7) + +#define VERBOSE (LOG_GENERAL) +//#define LOG_OUTPUT_FUNC osd_printf_info + +#include "logmacro.h" + +// Voice card configuration. Captures jumper configuration and component values. +struct dmx_voice_card_config +{ + const float c2; // Pitch control capacitor. In Farads. + const float c3; // EG capacitor. In Farads. 0 if unused. + + // R12 and R17 control how the different trigger modes affect pitch (for + // voices wired for pitch control), or volume and decay (for voices wired + // for volume control). + // The values of R12 and R17 in the 1981 service manual are flipped compared + // to the values in the 1983 schematics and in + // http://www.electrongate.com/dmxfiles/dmxcards.html. The values in the + // 1983 schematic (and electrongate.com) are most probably the right ones, + // since they create more variation, especially for volume. Using those. + const float r12; + const float r17; + + // ROM contains 2 different samples. + const bool split_rom; + + // Contains 8 ROMs instead of 1. Used for Cymbal voice cards. + const bool multi_rom; + + // Triggers control pitch variations (rather than volume variations). + const bool pitch_control; + + enum class decay_mode : s8 // Controlled by jumper Z on voice card. + { + DISABLED, // 4.7K resistor connected to position 1 (+5V). + ENABLED, // Jumper disconnected. + ENABLED_ON_TR12, // 4.7K resistor connected to position 2 (/Q of U1B). + // Decay enabled when trigger mode is 1 or 2. + }; + const decay_mode decay; + + // This jumper won't make a difference when `decay` is `DISABLED`. + enum class early_decay_mode : s8 // Controlled by jumper S on voice card. + { + ENABLED, // Jumper connected to position 2 (+5V). + ENABLED_ON_TR1, // Jumper connected to position 1 (Q of U1A). + // Early decay enabled when trigger mode is 1. + }; + const early_decay_mode early_decay; +}; + +// Emulates the original DMX voice cards, including the cymbal card. Later +// DMX models shipped with the "Mark II" voice cards for the Tom voices. +// The Mark II cards are not yet emulated. +class dmx_voice_card : public device_t, public device_sound_interface +{ +public: + // Default value of pitch adjustment trimpot. + static constexpr const s32 T1_DEFAULT_PERCENT = 50; + + dmx_voice_card(const machine_config &mconfig, const char *tag, device_t *owner, const dmx_voice_card_config &config, required_memory_region *sample_rom) ATTR_COLD; + dmx_voice_card(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0) ATTR_COLD; + + void trigger(bool tr0, bool tr1); + void set_pitch_adj(s32 t1_percent); // Valid values: 0-100. + +protected: + void device_add_mconfig(machine_config &config) override ATTR_COLD; + void device_start() override ATTR_COLD; + void device_reset() override ATTR_COLD; + void sound_stream_update(sound_stream &stream, const std::vector &inputs, std::vector &outputs) override; + +private: + void reset_counter(); + void init_pitch() ATTR_COLD; + void compute_pitch_variations(); + void select_pitch(); + void configure_volume(); + + bool is_decay_enabled() const; + bool is_early_decay_enabled() const; + TIMER_DEVICE_CALLBACK_MEMBER(clock_callback); + + sound_stream *m_stream = nullptr; + + required_device m_timer; // 555, U5. + required_device m_dac; // AM6070, U8. Compatible with DAC76. + + // Configuration. Do not include in save state. + const dmx_voice_card_config m_config; + required_memory_region *m_sample_rom = nullptr; + std::vector m_cv; // 555 CV (pin 5) voltage variations. + std::vector m_sample_t; // Sample period variations. + s32 m_t1_percent = T1_DEFAULT_PERCENT; + + // Device state. + + bool m_counting = false; + u16 m_counter = 0; // 4040 counter. + u8 m_trigger_mode = 0; // Valid modes: 1-3. + float m_volume = 0; // Volume attenuation: 0-1. + + bool m_decaying = false; + attotime m_decay_start_time; + + static constexpr const float VCC = 5; + static constexpr const float R8 = RES_K(2.7); + static constexpr const float R9 = RES_K(5.6); +}; + +DEFINE_DEVICE_TYPE(DMX_VOICE_CARD, dmx_voice_card, "dmx_voice_card", "DMX Voice Card"); + +dmx_voice_card::dmx_voice_card( + const machine_config &mconfig, + const char *tag, device_t *owner, + const dmx_voice_card_config &config, + required_memory_region *sample_rom) + : device_t(mconfig, DMX_VOICE_CARD, tag, owner, 0) + , device_sound_interface(mconfig, *this) + , m_timer(*this, "555_u5") + , m_dac(*this, "dac_u8") + , m_config(config) + , m_sample_rom(sample_rom) +{ + init_pitch(); +} + +dmx_voice_card::dmx_voice_card( + const machine_config &mconfig, const char *tag, device_t *owner, + uint32_t clock) + : device_t(mconfig, DMX_VOICE_CARD, tag, owner, clock) + , device_sound_interface(mconfig, *this) + , m_timer(*this, "555_u5") + , m_dac(*this, "dac_u8") + , m_config(dmx_voice_card_config{}) +{ +} + +void dmx_voice_card::trigger(bool tr0, bool tr1) +{ + assert(tr0 || tr1); + if (tr1 && tr0) + m_trigger_mode = 3; + else if (tr1) + m_trigger_mode = 2; + else if (tr0) + m_trigger_mode = 1; + else + return + + m_stream->update(); + m_counter = 0; + m_counting = true; + m_volume = 1; + m_decaying = false; + + if (m_config.pitch_control) + select_pitch(); + else + configure_volume(); + + LOGMASKED(LOG_SOUND, "Trigger: (%d, %d) %d %f\n", + tr0, tr1, m_trigger_mode, m_volume); +} + +void dmx_voice_card::set_pitch_adj(s32 t1_percent) +{ + m_stream->update(); + m_t1_percent = t1_percent; + compute_pitch_variations(); +} + +void dmx_voice_card::device_add_mconfig(machine_config &config) +{ + TIMER(config, m_timer).configure_generic(FUNC(dmx_voice_card::clock_callback)); + DAC76(config, m_dac, 0U).add_route(ALL_OUTPUTS, *this, 1.0); +} + +void dmx_voice_card::device_start() +{ + m_stream = stream_alloc(1, 1, machine().sample_rate()); + + save_item(NAME(m_counting)); + save_item(NAME(m_counter)); + save_item(NAME(m_trigger_mode)); + save_item(NAME(m_volume)); + save_item(NAME(m_decaying)); + save_item(NAME(m_decay_start_time)); +} + +void dmx_voice_card::device_reset() +{ + m_trigger_mode = 0; + reset_counter(); + compute_pitch_variations(); + configure_volume(); +} + +void dmx_voice_card::sound_stream_update( + sound_stream &stream, + const std::vector &inputs, + std::vector &outputs) +{ + const read_stream_view &in = inputs[0]; + write_stream_view &out = outputs[0]; + + float rc_inv = 0; + if (m_decaying) + { + float r_lower = R9; + if (m_trigger_mode == 1) + r_lower = RES_3_PARALLEL(R9, m_config.r12, m_config.r17); + else if (m_trigger_mode == 2) + r_lower = RES_2_PARALLEL(R9, m_config.r12); + rc_inv = 1.0F / ((R8 + r_lower) * m_config.c3); + } + + const int n = in.samples(); + attotime t = in.start_time() - m_decay_start_time; + for (int i = 0; i < n; ++i, t += in.sample_period()) + { + const float decay = m_decaying ? expf(-t.as_double() * rc_inv) : 1.0F; + out.put(i, decay * m_volume * in.get(i)); + if (m_counting && i == 0) + { + LOGMASKED(LOG_SAMPLES, "Sample: %d, %d, %f, %d, %f, %f\n", + i, m_counter, m_volume, m_decaying, t.as_double(), decay); + } + } +} + +void dmx_voice_card::reset_counter() +{ + m_stream->update(); + m_counter = 0; + m_counting = false; +} + +void dmx_voice_card::init_pitch() +{ + // Precompute all variations of CV (pin 5 of 555 timer). + + // The CV equations were derived from Kirchhoff analysis and verified with + // simulations: https://tinyurl.com/26x8oq75 + + // Diode drop for pitch circuit. The value is based on simulations with the + // various pitch configurations, instead of picking the typical 0.6V. This + // should help with accuracy. + static constexpr const float VD = 0.48F; + static constexpr const float R_555 = RES_K(5); + static constexpr const float R5 = RES_K(3.3); + + m_cv.clear(); + m_cv.push_back(VCC * 2 / 3); // The 555 default, if pin 5 is floating. + + if (m_config.pitch_control) + { + const float r12 = m_config.r12; + + // For trigger mode 1. + const float alpha = 1.0F + r12 / m_config.r17; + m_cv.push_back((alpha * R5 + r12) * (2 * VCC - 3 * VD) / + (3 * alpha * R5 + 3 * r12 + 2 * alpha * R_555) + VD); + + // For trigger mode 2. + m_cv.push_back((R5 + r12) * (2 * VCC - 3 * VD) / + (3 * R5 + 3 * r12 + 2 * R_555) + VD); + + // For trigger mode 3. + m_cv.push_back(m_cv[0]); + } + + for (int i = 0; i < m_cv.size(); ++i) + LOGMASKED(LOG_PITCH, "%s 555 CV %d: %f\n", tag(), i, m_cv[i]); + + // m_sample_t will be populated by subsequent calls to configure_pitch(). + m_sample_t.clear(); + m_sample_t.resize(m_cv.size()); +} + +void dmx_voice_card::compute_pitch_variations() +{ + static constexpr const float R3 = RES_K(1); + static constexpr const float R4 = RES_K(10); + static constexpr const float T1_MAX = RES_K(10); + + // The baseline pitch (and sampling rate) for all voice cards is controlled + // by a 555 timer (U5). Users can adjust the pitch with a trimpot (T1). + + // For voice cards configured for pitch control (m_config.pitch_control is + // true), pitch variations are accomplished by changing the Control Voltage + // (pin 5) of the 555 (see init_pitch()). + + // Computing the timer period is a bit involved, because of the use of CV, + // and because the 555 is not configured in the typical astable mode. + // For an RC circuit, V(t) = Vstart + (Vend - Vstart) * (1 - exp(-t / RC)). + // Solving for t: t = -RC * log( (Vend - V) / (Vend - Vstart) ). + // Let t_high be the time interval for which the 555 output is high. This is + // the time it takes for the capacitor to charge from CV/2 to CV. + // Let t_low be the time interval for which the 555 output is low. This is + // the time it takes for the capacitor to discharge from CV to CV/2. + // The timer period is then: t_high + t_low. t_* can be computed by + // substituting appropriate values in the function for `t`, keeping in mind + // that RC, Vstart, Vend and V are different for charging and discharging. + + // Compute RC time constant for charging. + assert(m_t1_percent >= 0 && m_t1_percent <= 100); + const float r_charge = m_t1_percent * T1_MAX / 100 + R4; + const float rc_charge = r_charge * m_config.c2; + + // Compute Vend and RC time constant for discharging, taking into account + // the atypical 555 configuration. + const float rc_discharge = RES_2_PARALLEL(r_charge, R3) * m_config.c2; + const float ve_discharge = VCC * RES_VOLTAGE_DIVIDER(r_charge, R3); + + // Optimization: when m_config.pitch_control is true, + // m_sample_t[0] = m_sample_t[3]. So skip index 0 and copy after the loop. + const int start_i = m_config.pitch_control ? 1 : 0; + + for (int i = start_i; i < m_sample_t.size(); ++i) + { + const float cv = m_cv[i]; + const float half_cv = 0.5F * cv; + + // Time for C2 to charge from CV/2 (Vstart) to CV (V). Vend = VCC + const float t_high = -rc_charge * logf((VCC - cv) / (VCC - half_cv)); + assert(t_high > 0); + + // Time for C2 to discharge from CV (Vstart) to CV/2 (V). + const float t_low = -rc_discharge * logf((ve_discharge - half_cv) / (ve_discharge - cv)); + assert(t_low > 0); + + m_sample_t[i] = attotime::from_double(t_high + t_low); + LOGMASKED(LOG_PITCH, "%s Pitch variation %d: %f (%f, %f)\n", + tag(), i, 1.0 / m_sample_t[i].as_double(), t_high, t_low); + } + + if (m_config.pitch_control) + m_sample_t[0] = m_sample_t[3]; + + select_pitch(); +} + +void dmx_voice_card::select_pitch() +{ + attotime sampling_t; + if (m_config.pitch_control) + sampling_t = m_sample_t[m_trigger_mode]; + else + sampling_t = m_sample_t[0]; + + if (sampling_t == m_timer->period()) + return; // Avoid resetting the timer in this case. + + m_timer->adjust(sampling_t, 0, sampling_t); + LOGMASKED(LOG_PITCH, "Setting sampling frequency: %f\n", + 1.0 / sampling_t.as_double()); +} + +void dmx_voice_card::configure_volume() +{ + // The equations below were derived from Kirchhoff analysis and verified + // with simulations: https://tinyurl.com/22wxwh8h + + static constexpr const float VD = 0.6; // Diode drop. + static constexpr const float MAX_IREF = 5.0 / (R8 + R9); + + const float r12 = m_config.r12; + const float r17 = m_config.r17; + + float i_ref = MAX_IREF; + if (m_trigger_mode == 1) + { + i_ref = (r12 * r17 * VCC + R8 * r12 * VD + R8 * r17 * VD) / + ((R8 * r12 * r17) + (r12 * r17 * R9) + (R8 * r17 * R9) + (R8 * r12 * R9)); + } + else if (m_trigger_mode == 2) + { + i_ref = (r12 * VCC + R8 * VD) / (r12 * R8 + R8 * R9 + r12 * R9); + } + + m_volume = i_ref / MAX_IREF; + LOGMASKED(LOG_VOLUME, "Volume %d, Iref: %f uA\n", m_volume, i_ref * 1e6f); +} + +bool dmx_voice_card::is_decay_enabled() const +{ + switch (m_config.decay) + { + case dmx_voice_card_config::decay_mode::ENABLED: + return true; + case dmx_voice_card_config::decay_mode::ENABLED_ON_TR12: + return m_trigger_mode == 1 || m_trigger_mode == 2; + case dmx_voice_card_config::decay_mode::DISABLED: + return false; + } + return false; +} + +bool dmx_voice_card::is_early_decay_enabled() const +{ + switch (m_config.early_decay) + { + case dmx_voice_card_config::early_decay_mode::ENABLED: + return true; + case dmx_voice_card_config::early_decay_mode::ENABLED_ON_TR1: + return m_trigger_mode == 1; + } + return false; +} + +TIMER_DEVICE_CALLBACK_MEMBER(dmx_voice_card::clock_callback) +{ + if (!m_counting) + return; + + ++m_counter; + + const u16 rom_size = m_config.multi_rom ? 8 * 0x1000 : 0x1000; + const u16 max_count = m_config.split_rom ? rom_size / 2 : rom_size; + if (m_counter >= max_count) + { + reset_counter(); + LOGMASKED(LOG_SOUND, "Done counting %d\n\n", m_config.split_rom); + } + + const u16 offset = (m_config.split_rom && m_trigger_mode != 3) ? max_count : 0; + const u8 sample = (*m_sample_rom)->as_u8(m_counter + offset); + m_dac->update(); + m_dac->sb_w(BIT(sample, 7)); + m_dac->b1_w(BIT(sample, 6)); + m_dac->b2_w(BIT(sample, 5)); + m_dac->b3_w(BIT(sample, 4)); + m_dac->b4_w(BIT(sample, 3)); + m_dac->b5_w(BIT(sample, 2)); + m_dac->b6_w(BIT(sample, 1)); + m_dac->b7_w(BIT(sample, 0)); + + // Early decay starts when the counter's bit 6 transitions to 1. + static constexpr const u16 EARLY_DECAY_START = 1 << 6; + // If early decay is not enabled, but decay is enabled, it will start when + // the counter's bit 10 transitions to 1. + static constexpr const u16 LATE_DECAY_START = 1 << 10; + + if (!m_decaying && is_decay_enabled()) + { + if ((is_early_decay_enabled() && m_counter >= EARLY_DECAY_START) || + m_counter >= LATE_DECAY_START) + { + m_stream->update(); + m_decaying = true; + m_decay_start_time = machine().time(); + } + } +} + +namespace { + +constexpr const char MAINCPU_TAG[] = "z80"; +constexpr const char NVRAM_TAG[] = "nvram"; + +// Voice card configurations below reverse R12 and R17 compared to the 1981 +// schematics. See comments in dmx_voice_card_config for more on this. + +constexpr const dmx_voice_card_config BASS_CONFIG = +{ + .c2 = CAP_U(0.0033), + .c3 = CAP_U(3.3), + .r12 = RES_R(750), + .r17 = RES_R(47), + .split_rom = false, + .multi_rom = false, + .pitch_control = false, + .decay = dmx_voice_card_config::decay_mode::ENABLED, + .early_decay = dmx_voice_card_config::early_decay_mode::ENABLED, +}; + +constexpr const dmx_voice_card_config SNARE_CONFIG = +{ + .c2 = CAP_U(0.0022), + .c3 = 0, + .r12 = RES_K(1.5), + .r17 = RES_R(15), + .split_rom = false, + .multi_rom = false, + .pitch_control = false, + .decay = dmx_voice_card_config::decay_mode::DISABLED, + .early_decay = dmx_voice_card_config::early_decay_mode::ENABLED_ON_TR1, +}; + +// Some component values in HIHAT_CONFIG might be wrong. +// The 1981 schematic shows 6.8uF for c3. electrongate.com reports 2.2uF. The +// service manual states that c3 can be changed, and offers a useful range of +// 2uF - 10uF. +// Similarly, resistor values in electrongate.com disagree with schematics. +// - electrongate.com: R12 = 6.8K, R17 not installed. +// - schematics: R12 = 1.5K, R17 = 15. +constexpr const dmx_voice_card_config HIHAT_CONFIG = +{ + .c2 = CAP_U(0.0033), + .c3 = CAP_U(6.8), + .r12 = RES_K(1.5), + .r17 = RES_R(15), + .split_rom = false, + .multi_rom = false, + .pitch_control = false, + .decay = dmx_voice_card_config::decay_mode::ENABLED_ON_TR12, + .early_decay = dmx_voice_card_config::early_decay_mode::ENABLED_ON_TR1, +}; + +constexpr const dmx_voice_card_config TOM_CONFIG = +{ + .c2 = CAP_U(0.0033), + .c3 = CAP_U(6.8), + .r12 = RES_K(33), + .r17 = RES_K(18), + .split_rom = false, + .multi_rom = false, + .pitch_control = true, + .decay = dmx_voice_card_config::decay_mode::ENABLED, + .early_decay = dmx_voice_card_config::early_decay_mode::ENABLED, +}; + +constexpr dmx_voice_card_config PERC_CONFIG(float c2) +{ + return + { + .c2 = c2, + .c3 = 0, + .r12 = RES_K(1.5), + .r17 = RES_R(30), + .split_rom = true, + .multi_rom = false, + .pitch_control = false, + .decay = dmx_voice_card_config::decay_mode::DISABLED, + .early_decay = dmx_voice_card_config::early_decay_mode::ENABLED_ON_TR1, + }; +} + +constexpr const dmx_voice_card_config CYMBAL_CONFIG = +{ + .c2 = CAP_U(0.0033), + .c3 = 0, + .r12 = RES_R(680), + .r17 = RES_R(100), + .split_rom = true, + .multi_rom = true, + .pitch_control = false, + .decay = dmx_voice_card_config::decay_mode::DISABLED, + .early_decay = dmx_voice_card_config::early_decay_mode::ENABLED_ON_TR1, +}; + + +class dmx_state : public driver_device +{ +public: + enum voice_card_indices + { + VC_BASS = 0, + VC_SNARE, + VC_HIHAT, + VC_SMALL_TOMS, + VC_LARGE_TOMS, + VC_PERC1, + VC_PERC2, + VC_CYMBAL, + NUM_VOICE_CARDS + }; + + dmx_state(const machine_config &mconfig, device_type type, const char *tag) ATTR_COLD + : driver_device(mconfig, type, tag) + , m_maincpu(*this, MAINCPU_TAG) + , m_digit_device(*this, "dl1414_%d", 0) + , m_digit_output(*this, "digit_%d", 0U) + , m_metronome_timer(*this, "metronome_timer") + , m_buttons(*this, "buttons_%d", 0) + , m_switches(*this, "switches") + , m_external_triggers(*this, "external_triggers") + , m_clk_in(*this, "clk_in") + , m_clk_out_tip(*this, "CLK_OUT_tip") + , m_metronome_mix(*this, "METRONOME_MIX") + , m_metronome(*this, "METRONOME") + , m_mixer(*this, "mixer") + , m_voices(*this, "voice_%d", 0) + , m_samples(*this, "sample_%d", 0) + { + } + + void dmx(machine_config &config) ATTR_COLD; + + DECLARE_INPUT_CHANGED_MEMBER(clk_in_changed); + DECLARE_INPUT_CHANGED_MEMBER(voice_volume_changed); + DECLARE_INPUT_CHANGED_MEMBER(metronome_volume_changed); + DECLARE_INPUT_CHANGED_MEMBER(master_volume_changed); + DECLARE_INPUT_CHANGED_MEMBER(pitch_adj_changed); + +protected: + void machine_start() override ATTR_COLD; + +private: + void refresh_int_flipflop(); + void int_timer_preset_w(u8 data); + void int_timer_enable_w(int state); + TIMER_DEVICE_CALLBACK_MEMBER(int_timer_tick); + + void metronome_trigger_w(u8 data); + void metronome_mix_w(u8 data); + TIMER_DEVICE_CALLBACK_MEMBER(metronome_timer_tick); + + void display_w(offs_t offset, u8 data); + template void display_output_w(offs_t offset, u16 data); + + u8 buttons_r(offs_t offset); + u8 external_triggers_r(); + u8 cassette_r(); + template void gen_trigger_w(u8 data); + + void memory_map(address_map &map) ATTR_COLD; + void io_map(address_map &map) ATTR_COLD; + + required_device m_maincpu; + required_device_array m_digit_device; + output_finder<16> m_digit_output; + required_device m_metronome_timer; + required_ioport_array<6> m_buttons; + required_ioport m_switches; // Includes foot switches. + required_ioport m_external_triggers; + required_ioport m_clk_in; + output_finder<> m_clk_out_tip; // Tip conncetion of "CLK OUT" TRS jack. + output_finder<> m_metronome_mix; + output_finder<> m_metronome; + + required_device m_mixer; + required_device_array m_voices; + required_memory_region_array<8> m_samples; + + // 40103 timer (U11 in Processor Board) + u8 m_int_timer_preset = 0xff; + bool m_int_timer_enabled = true; + s16 m_int_timer_value = 0xff; + u8 m_int_timer_out = 1; + u8 m_int_flipflop_clock = 0; + + // The service manual states that the crystal is 4.912MHz, in the section + // that describes the clock circuitry. However, the parts list specifies + // this as a 4.9152 MHz crystal. The parts list value is likely the correct + // one. + // Divided by U35, 74LS74. + static constexpr const XTAL CPU_CLOCK = 4.9152_MHz_XTAL / 2; + // Divided by U34, 74LS393. + static constexpr const XTAL INT_TIMER_CLOCK = CPU_CLOCK / 256; + + // Configuration for each voice needs to appear in the index specified by + // the voice_card_indices enum for that voice. + static constexpr const dmx_voice_card_config VOICE_CONFIGS[NUM_VOICE_CARDS] = + { + BASS_CONFIG, // VC_BASS + SNARE_CONFIG, // VC_SNARE + HIHAT_CONFIG, // VC_HIHAT + TOM_CONFIG, // VC_SMALL_TOMS + TOM_CONFIG, // VC_LARGE_TOMS + PERC_CONFIG(CAP_U(0.0033)), // VC_PERC1 + PERC_CONFIG(CAP_U(0.0047)), // VC_PERC2 + CYMBAL_CONFIG, // VC_CYMBAL + }; +}; + +void dmx_state::refresh_int_flipflop() +{ + // All component designations refer to the Processor Board. + + // Interrups are used for maintaining tempo. They are generated by an SR + // flipflop (U23B, 4013), with /Q connected to /INT. D is always 1. + // If CLK IN is not connected, the flipflop is clocked by the timer's output + // (U11, 40103). + // If CLK IN is connected, it will clock the flipflop, and the timer's + // output will be ignored. + // The Z80's interrupt acknowledge cycle clears the flipfop (flipflop + // "clear" connected to NOR(/M1, /IORQ) (U32, 4001)). + // CSYN (cassette sync) will also trigger interrupts, via the flipflop's + // "set" input. + // The circuit ensures that either the timer is enabled, or CSYN signals + // are generated, but not both. This prevents potentially conflicting + // interrupts. + + u8 new_int_flipflop_clock = 0; + if (m_clk_in->read() & 0x01) // Is CLK IN plugged? + { + new_int_flipflop_clock = (m_clk_in->read() & 0x02) ? 1 : 0; + } + else + { + // 40103 (U11) timer output is inverted by Q1, R20 and R43. + new_int_flipflop_clock = m_int_timer_out ? 0 : 1; + } + + if (!m_int_flipflop_clock && new_int_flipflop_clock) // 0->1 transition. + m_maincpu->set_input_line(INPUT_LINE_IRQ0, HOLD_LINE); + + m_int_flipflop_clock = new_int_flipflop_clock; + m_clk_out_tip = m_int_flipflop_clock; +} + +void dmx_state::int_timer_preset_w(u8 data) +{ + if (m_int_timer_preset == data) + return; + m_int_timer_preset = data; + LOGMASKED(LOG_INT_TIMER, "INT timer preset: %02x\n", m_int_timer_preset); +} + +void dmx_state::int_timer_enable_w(int state) +{ + // When the INT timer is enabled, the cassette sync INT generator is + // disabled, and vice versa. Cassette functionality (including sync) is + // not currently emulated. + if (m_int_timer_enabled == bool(state)) + return; + + // The CLEN signal is inverted by U28 (4011 NAND), but it is active low + // since it is connected on the /CE input of a 40103. So, logically, + // "1" == "enabled". + m_int_timer_enabled = bool(state); + LOGMASKED(LOG_INT_TIMER, "INT timer enabled: %d\n", m_int_timer_enabled); +} + +TIMER_DEVICE_CALLBACK_MEMBER(dmx_state::int_timer_tick) +{ + if (!m_int_timer_enabled) + return; + + if (m_int_timer_value <= 0) // We reached 0 in the previous clock cycle. + { + // The 40103 timer is configured for synchronous loading of the preset + // value. So it starts over in the next clock cycle after reaching 0. + // TODO: Actually verify that a preset of 0 means 256. Not clear in + // the datasheet. + if (m_int_timer_preset == 0) + m_int_timer_value = 256; + else + m_int_timer_value = m_int_timer_preset; + + // The timer's output transitions to 1 in the clock cycle after reaching + // 0 (the one we are handling here). + m_int_timer_out = 1; + refresh_int_flipflop(); + return; + } + + --m_int_timer_value; + + if (m_int_timer_value <= 0) + { + // The timer's output goes low when its counter reaches 0. + m_int_timer_out = 0; + refresh_int_flipflop(); + } +} + +void dmx_state::metronome_trigger_w(u8 /*data*/) +{ + // Writing to this port clocks U33A (D-flipflop). R62 and C32 form an RC + // network that resets the flipflop after ~1ms. This becomes a 1ms, 10-12V + // pulse (via Q8, R55, R54) on the "metronome out" connection. + // (component designations refer to the Processor Board) + m_metronome_timer->adjust(attotime::from_msec(1)); + m_metronome = 1; +} + +void dmx_state::metronome_mix_w(u8 data) +{ + // D0 connected to D of U35 74LS74 (D-flipflop), which is clocked by + // CLICK* from the address decoder (U7, 74LS42). + + // The service manual states that this bit enables mixing the metronome into + // the main mix, and that the LVI signal controls the volume. But that seems + // to describe how the firmware uses these. Looking at the schematic, it + // seems that both this signal and LVI would enable mixing on their own, and + // setting both to 1 would increase the volume. + m_metronome_mix = BIT(data, 0); +} + +TIMER_DEVICE_CALLBACK_MEMBER(dmx_state::metronome_timer_tick) +{ + m_metronome = 0; +} + +void dmx_state::display_w(offs_t offset, u8 data) +{ + // Decoding between different displays is done by U2 (74LS42). The + // m_digit_device array is ordered from right to left (U6-U3). All + // components are on the Switch Board. + m_digit_device[offset >> 2]->bus_w(offset & 0x03, data); +} + +template void dmx_state::display_output_w(offs_t offset, u16 data) +{ + // The displays and the digits within each display are addressed from right + // to left with increassing offset. Reversing that order in m_digit_output, + // since left-to-right is more convenient for building the layout. + static_assert(DISPLAY >= 0 && DISPLAY < 4); + const int display_in_layout = 3 - DISPLAY; + const int digit_in_layout = 3 - (offset & 0x03); + m_digit_output[4 * display_in_layout + digit_in_layout] = data; +} + +u8 dmx_state::buttons_r(offs_t offset) +{ + // Switches are inverted and buffered by 2 x 80C98 (inverting 3-state + // buffers), U7 and U8 on Switch Board. + return ~m_buttons[offset]->read(); +} + +u8 dmx_state::external_triggers_r() +{ + // External triggers are inverted by 2 X CA3086 NPN arrays (U4 for D0-D3 and + // U5 for D4-D7) and buffered by U6 (74LS244). All components are on the + // Processor Board. + return ~m_external_triggers->read(); +} + +u8 dmx_state::cassette_r() +{ + // All components are on the Processor Board. + // Inputs buffered by U19 (75LS244). This is a mix of cassette-related + // inputs and the states of foot-switches and toggle-switches. + + const u8 data = m_switches->read(); + + const u8 d0 = 0; // CD0: not yet implemented. + const u8 d1 = 0; // CD1: not yet implemented. + const u8 d2 = 0; // CD2: not yet implemented. + + const u8 d3 = BIT(data, 3); // CASEN* (cassette enable switch. Active low). + + // START footswitch input is pulled high (R41) and ANDed with 1 (U22, + // 74LS08, with the other input tied high via R42). So U22 is logically a + // no-op. However, the NEXT footswitch is tied directly to U19. + const u8 d4 = BIT(data, 4); // START* (output of U22). + const u8 d5 = BIT(data, 5); // NEXT (pulled high by R58). + const u8 d6 = BIT(data, 6); // TSYN* (pulled high by R23). + const u8 d7 = BIT(data, 7); // PROT* (memory protect switch. Active low). + + return (d7 << 7) | (d6 << 6) | (d5 << 5) | (d4 << 4) | + (d3 << 3) | (d2 << 2) | (d1 << 1) | d0; +} + +template void dmx_state::gen_trigger_w(u8 data) +{ + // Triggers are active-high and only last for the duration of the write. + // They are implemented by enabling an 74LS244 (U8 and U9) whose outputs are + // normally pulled low. + + static_assert(GROUP >= 0 && GROUP <= 1); + static constexpr const int TRIGGER_MAPPINGS[2][NUM_VOICE_CARDS] = + { + {0, 2, 4, 6, 1, 3, 5, 7}, + {8, 14, 10, 12, 9, 15, 11, 13}, + }; + + if (data == 0) + return; + + std::vector triggers(2 * NUM_VOICE_CARDS, false); + for (int i = 0; i < NUM_VOICE_CARDS; ++i) + { + if (BIT(data, i)) + { + const int trig_index = TRIGGER_MAPPINGS[GROUP][i]; + triggers[trig_index] = true; + LOGMASKED(LOG_TRIGGERS, "Trigerred TR%d\n", trig_index); + } + } + + for (int i = 0; i < NUM_VOICE_CARDS; ++i) + { + const bool tr0 = triggers[2 * i]; + const bool tr1 = triggers[2 * i + 1]; + if (tr0 || tr1) + m_voices[i]->trigger(tr0, tr1); + } +} + +void dmx_state::memory_map(address_map &map) +{ + // Component designations refer to the Processor Board. + // Memory decoding done by U2 (74LS42) and U22 (74LS08). + map.global_mask(0x3fff); // A14 and A15 not used. + map(0x0000, 0x1fff).rom(); // 2 x 2732 (4K x 8bit) ROMs, U18-U17. + // 4 x 6116 (2K x 8bit) RAMs, U16-U13. U3 (4071, OR-gate) will only allow + // RAM select signals to go through if fully powered up. + map(0x2000, 0x3fff).ram().share(NVRAM_TAG); +} + +void dmx_state::io_map(address_map &map) +{ + // Signal names (e.g. GEN0*) match those in the schematics. + + map.global_mask(0x7f); // A7-A15 not used for port decoding or I/O. + + // Write decoding done by U7 (74LS42) on the Processor Board. + map(0x00, 0x0f).w(FUNC(dmx_state::display_w)); // ID*. + map(0x10, 0x10).mirror(0x0f).w(FUNC(dmx_state::gen_trigger_w<0>)); // GEN0* + map(0x20, 0x20).mirror(0x0f).w(FUNC(dmx_state::gen_trigger_w<1>)); // GEN1* + map(0x30, 0x30).mirror(0x0f).w(FUNC(dmx_state::int_timer_preset_w)); // STIM* + map(0x40, 0x40).mirror(0x0f).w(FUNC(dmx_state::metronome_trigger_w)); // METRONOME OUT + map(0x50, 0x50).mirror(0x0f).w("cas_latch", FUNC(output_latch_device::write)); // CAS0* + map(0x60, 0x60).mirror(0x0f).w(FUNC(dmx_state::metronome_mix_w)); // CLICK* + + // Read decoding done by U9 (74LS42) on the Switch Board. + map(0x00, 0x05).mirror(0x78).r(FUNC(dmx_state::buttons_r)); // IORD* + map(0x06, 0x06).mirror(0x78).r(FUNC(dmx_state::external_triggers_r)); // SW6* + map(0x07, 0x07).mirror(0x78).r(FUNC(dmx_state::cassette_r)); // CASI* +} + +void dmx_state::machine_start() +{ + m_clk_out_tip.resolve(); + m_metronome_mix.resolve(); + m_metronome.resolve(); + m_digit_output.resolve(); + + save_item(NAME(m_int_timer_preset)); + save_item(NAME(m_int_timer_enabled)); + save_item(NAME(m_int_timer_value)); + save_item(NAME(m_int_timer_out)); + save_item(NAME(m_int_flipflop_clock)); +} + +void dmx_state::dmx(machine_config &config) +{ + Z80(config, m_maincpu, CPU_CLOCK); + m_maincpu->set_addrmap(AS_PROGRAM, &dmx_state::memory_map); + m_maincpu->set_addrmap(AS_IO, &dmx_state::io_map); + + NVRAM(config, NVRAM_TAG, nvram_device::DEFAULT_ALL_0); + + // 40103 timer (U11 on Processor Board). See refresh_int_flipflop() and + // int_timer_tick(). + TIMER(config, "int_timer_u11").configure_periodic( + FUNC(dmx_state::int_timer_tick), attotime::from_hz(INT_TIMER_CLOCK)); + + // A one-shot timer based on an RC-cicruit. See metronome_trigger_w(). + TIMER(config, m_metronome_timer).configure_generic( + FUNC(dmx_state::metronome_timer_tick)); + + DL1414T(config, m_digit_device[0], 0U).update().set(FUNC(dmx_state::display_output_w<0>)); + DL1414T(config, m_digit_device[1], 0U).update().set(FUNC(dmx_state::display_output_w<1>)); + DL1414T(config, m_digit_device[2], 0U).update().set(FUNC(dmx_state::display_output_w<2>)); + DL1414T(config, m_digit_device[3], 0U).update().set(FUNC(dmx_state::display_output_w<3>)); + + config.set_default_layout(layout_oberheim_dmx); + + // 74C174 (U20, on Processor Board), 6-bit latch. + output_latch_device &cas_latch(OUTPUT_LATCH(config, "cas_latch")); + cas_latch.bit_handler<0>().set_output("CDATO"); + cas_latch.bit_handler<1>().set_output("ARM"); + cas_latch.bit_handler<2>().set(FUNC(dmx_state::int_timer_enable_w)); + // Bit 3 is an open-collector connection to the Ring of the "CLK OUT" TRS jack. + cas_latch.bit_handler<3>().set_output("CLK_OUT_ring").invert(); + cas_latch.bit_handler<4>().set_output("LVI"); + // Bit 5 not connected. + + MIXER(config, m_mixer); + for (int i = 0; i < NUM_VOICE_CARDS; ++i) + { + DMX_VOICE_CARD(config, m_voices[i], VOICE_CONFIGS[i], &m_samples[i]); + m_voices[i]->add_route(ALL_OUTPUTS, m_mixer, 1.0); + } + + SPEAKER(config, "mono").front_center(); + m_mixer->add_route(ALL_OUTPUTS, "mono", 1.0); +} + +DECLARE_INPUT_CHANGED_MEMBER(dmx_state::clk_in_changed) +{ + refresh_int_flipflop(); +} + +DECLARE_INPUT_CHANGED_MEMBER(dmx_state::voice_volume_changed) +{ + const s32 voice = param; + m_mixer->set_input_gain(voice, newval / 100.0F); + LOGMASKED(LOG_FADERS, "Voice %d volume changed: %d\n", voice, newval); +} + +DECLARE_INPUT_CHANGED_MEMBER(dmx_state::metronome_volume_changed) +{ + // TODO: Implement once metronome is emulated. + LOGMASKED(LOG_FADERS, "Metronome volume changed: %d\n", newval); +} + +DECLARE_INPUT_CHANGED_MEMBER(dmx_state::master_volume_changed) +{ + m_mixer->set_output_gain(0, newval / 100.0F); + LOGMASKED(LOG_FADERS, "Master volume changed: %d\n", newval); +} + +DECLARE_INPUT_CHANGED_MEMBER(dmx_state::pitch_adj_changed) +{ + // Using "100 -" so that larger values increase pitch. + m_voices[param]->set_pitch_adj(100 - newval); + LOGMASKED(LOG_PITCH, "Voice %d pitch adjustment changed: %d\n", param, newval); +} + +INPUT_PORTS_START(dmx) + PORT_START("buttons_0") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("2") PORT_CODE(KEYCODE_2_PAD) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("3") PORT_CODE(KEYCODE_3_PAD) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("4") PORT_CODE(KEYCODE_4_PAD) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("5") PORT_CODE(KEYCODE_5_PAD) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("6") PORT_CODE(KEYCODE_6_PAD) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("7") PORT_CODE(KEYCODE_7_PAD) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("8") PORT_CODE(KEYCODE_8_PAD) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("9") PORT_CODE(KEYCODE_9_PAD) + + PORT_START("buttons_1") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("0") PORT_CODE(KEYCODE_0_PAD) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("1") PORT_CODE(KEYCODE_1_PAD) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("<") PORT_CODE(KEYCODE_LEFT) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME(">") PORT_CODE(KEYCODE_RIGHT) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SWING") PORT_CODE(KEYCODE_BACKSPACE) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SONG") PORT_CODE(KEYCODE_INSERT) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("EDIT") PORT_CODE(KEYCODE_HOME) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("STEP") PORT_CODE(KEYCODE_PGUP) + + PORT_START("buttons_2") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("RECORD") PORT_CODE(KEYCODE_ENTER) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("ERASE") PORT_CODE(KEYCODE_BACKSLASH) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("COPY") PORT_CODE(KEYCODE_DEL) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("LENGTH") PORT_CODE(KEYCODE_END) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("PLAY") PORT_CODE(KEYCODE_SPACE) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("TEMPO") PORT_CODE(KEYCODE_L) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("QUANT") PORT_CODE(KEYCODE_QUOTE) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SIGN") PORT_CODE(KEYCODE_COLON) + + PORT_START("buttons_3") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("BASS 3") PORT_CODE(KEYCODE_Z) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SNARE 3") PORT_CODE(KEYCODE_X) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("HI-HAT OPEN") PORT_CODE(KEYCODE_C) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("TOM 3") PORT_CODE(KEYCODE_V) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("TOM 6") PORT_CODE(KEYCODE_B) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("CYMB 3") PORT_CODE(KEYCODE_N) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("RIMSHOT") PORT_CODE(KEYCODE_M) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("CLAPS") PORT_CODE(KEYCODE_COMMA) + + PORT_START("buttons_4") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("BASS 2") PORT_CODE(KEYCODE_A) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SNARE 2") PORT_CODE(KEYCODE_S) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("HI-HAT ACC") PORT_CODE(KEYCODE_D) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("TOM 2") PORT_CODE(KEYCODE_F) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("TOM 5") PORT_CODE(KEYCODE_G) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("CYMB 2") PORT_CODE(KEYCODE_H) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("TAMP 2") PORT_CODE(KEYCODE_J) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SHAKE 2") PORT_CODE(KEYCODE_K) + + PORT_START("buttons_5") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("BASS 1") PORT_CODE(KEYCODE_Q) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SNARE 1") PORT_CODE(KEYCODE_W) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("HI-HAT CLOSED") PORT_CODE(KEYCODE_E) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("TOM 1") PORT_CODE(KEYCODE_R) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("TOM 4") PORT_CODE(KEYCODE_T) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("CYMB 1") PORT_CODE(KEYCODE_Y) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("TAMB 1") PORT_CODE(KEYCODE_U) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SHAKE 1") PORT_CODE(KEYCODE_I) + + PORT_START("switches") + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("CASSETTE ENABLE") PORT_TOGGLE + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("START") // Footswitch. + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("NEXT") // Footswitch. + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SYNC IN middle") // Plug input. + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("MEMORY PROTECT") PORT_TOGGLE + + PORT_START("external_triggers") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("BASS TRIG") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("PERC1 TRIG") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("CYMBAL TRIG") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("TOM2 TRIG") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("TOM1 TRIG") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("HI-HAT TRIG") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("SNARE TRIG") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("PERC2 TRIG") + + PORT_START("clk_in") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("CLK IN plugged") PORT_CODE(KEYCODE_QUOTE) PORT_TOGGLE + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("CLK IN") PORT_CODE(KEYCODE_SLASH) + PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(dmx_state::clk_in_changed), 0) + + // Fader potentiometers. P1-P10 on the Switch Board. + + PORT_START("fader_p1") + PORT_ADJUSTER(100, "BASS volume") + PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(dmx_state::voice_volume_changed), dmx_state::VC_BASS) + + PORT_START("fader_p2") + PORT_ADJUSTER(100, "SNARE volume") + PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(dmx_state::voice_volume_changed), dmx_state::VC_SNARE) + + PORT_START("fader_p3") + PORT_ADJUSTER(100, "HI-HAT volume") + PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(dmx_state::voice_volume_changed), dmx_state::VC_HIHAT) + + PORT_START("fader_p4") + PORT_ADJUSTER(100, "TOM1 volume") + PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(dmx_state::voice_volume_changed), dmx_state::VC_SMALL_TOMS) + + PORT_START("fader_p5") + PORT_ADJUSTER(100, "TOM2 volume") + PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(dmx_state::voice_volume_changed), dmx_state::VC_LARGE_TOMS) + + PORT_START("fader_p6") + PORT_ADJUSTER(100, "CYMBAL volume") + PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(dmx_state::voice_volume_changed), dmx_state::VC_CYMBAL) + + PORT_START("fader_p7") + PORT_ADJUSTER(100, "PERC1 volume") + PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(dmx_state::voice_volume_changed), dmx_state::VC_PERC1) + + PORT_START("fader_p8") + PORT_ADJUSTER(100, "PERC2 volume") + PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(dmx_state::voice_volume_changed), dmx_state::VC_PERC2) + + PORT_START("fader_p9") + PORT_ADJUSTER(100, "MET volume") + PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(dmx_state::metronome_volume_changed), 0) + + PORT_START("fader_p10") + PORT_ADJUSTER(100, "VOLUME") + PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(dmx_state::master_volume_changed), 0) + + // Tunning potentiomenters. One per voice card, designated as T1 and labeled + // as "PITCH ADJ." + + PORT_START("pitch_adj_0") + PORT_ADJUSTER(dmx_voice_card::T1_DEFAULT_PERCENT, "BASS pitch") + PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(dmx_state::pitch_adj_changed), dmx_state::VC_BASS) + + PORT_START("pitch_adj_1") + PORT_ADJUSTER(dmx_voice_card::T1_DEFAULT_PERCENT, "SNARE pitch") + PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(dmx_state::pitch_adj_changed), dmx_state::VC_SNARE) + + PORT_START("pitch_adj_2") + PORT_ADJUSTER(dmx_voice_card::T1_DEFAULT_PERCENT, "HI-HAT pitch") + PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(dmx_state::pitch_adj_changed), dmx_state::VC_HIHAT) + + PORT_START("pitch_adj_3") + PORT_ADJUSTER(dmx_voice_card::T1_DEFAULT_PERCENT, "TOM1 pitch") + PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(dmx_state::pitch_adj_changed), dmx_state::VC_SMALL_TOMS) + + PORT_START("pitch_adj_4") + PORT_ADJUSTER(dmx_voice_card::T1_DEFAULT_PERCENT, "TOM2 pitch") + PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(dmx_state::pitch_adj_changed), dmx_state::VC_LARGE_TOMS) + + PORT_START("pitch_adj_5") + PORT_ADJUSTER(dmx_voice_card::T1_DEFAULT_PERCENT, "PERC1 pitch") + PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(dmx_state::pitch_adj_changed), dmx_state::VC_PERC1) + + PORT_START("pitch_adj_6") + PORT_ADJUSTER(dmx_voice_card::T1_DEFAULT_PERCENT, "PERC2 pitch") + PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(dmx_state::pitch_adj_changed), dmx_state::VC_PERC2) + + PORT_START("pitch_adj_7") + PORT_ADJUSTER(dmx_voice_card::T1_DEFAULT_PERCENT, "CYMBAL pitch") + PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(dmx_state::pitch_adj_changed), dmx_state::VC_CYMBAL) +INPUT_PORTS_END + +ROM_START(obdmx) + ROM_REGION(0x2000, MAINCPU_TAG, 0) // 2 x 2732 (4K x 8bit) ROMs, U18 and U17. + ROM_DEFAULT_BIOS("rev_f") + + ROM_SYSTEM_BIOS(0, "debug", "DMX debug firmware") + ROMX_LOAD("dmx_dbg.u18", 0x000000, 0x001000, CRC(b3a24d64) SHA1(99a64b92f1520aaf2e7117b2fc75bdbd847f3a7f), ROM_BIOS(0)) + ROMX_FILL(0x001000, 0x001000, 0xff, ROM_BIOS(0)) // No ROM needed in U17. + + ROM_SYSTEM_BIOS(1, "rev_b", "DMX 1.00 (Revision B), 1981") + ROMX_LOAD("dmx_b0.u18", 0x000000, 0x001000, CRC(69116c5b) SHA1(29448b60d7f864b0a9df2a786b877feb7b019c05), ROM_BIOS(1)) + ROMX_LOAD("dmx_b1.u17", 0x001000, 0x001000, CRC(49084dee) SHA1(fffe4e6592dc586c0a0f03bed18308df38b991da), ROM_BIOS(1)) + + ROM_SYSTEM_BIOS(2, "rev_f", "DMX 2.21 (Revision F), 1982") + ROMX_LOAD("dmx_f0.u18", 0x000000, 0x001000, CRC(a01e5e7d) SHA1(74faf9c056c7e3eb89ed7657d8b64b1d3fe0ec22), ROM_BIOS(2)) + ROMX_LOAD("dmx_f1.u17", 0x001000, 0x001000, CRC(b24d4040) SHA1(74e7ae87cdcf9442cf76b696970c0efe52a30262), ROM_BIOS(2)) + + // Sample ROMs. The number appended to "sample_" needs to match the + // corresponding voice in the dmx_state::voice_card_indices enum. + + ROM_REGION(0x1000, "sample_0", 0) // Bass (dmx_state::VC_BASS). + ROM_LOAD("21kick.u7", 0x000000, 0x001000, CRC(3ab63275) SHA1(83b0e61e42c9d277f205f4ff5dfcb796c05084b8)) + + ROM_REGION(0x1000, "sample_1", 0) // Snare (dmx_state::VC_SNARE). + ROM_LOAD("snare6.u7", 0x000000, 0x001000, CRC(eca57ad7) SHA1(f65dcae905e0f7db9bf9324153ddd16a33dbdc8b)) + + ROM_REGION(0x1000, "sample_2", 0) // Hi-Hat (dmx_state::VC_HIHAT). + ROM_LOAD("hat1a.u7", 0x000000, 0x001000, CRC(36e934f9) SHA1(e97d65bfb2d98cbf463a92d12e2ab91938757d37)) + + ROM_REGION(0x1000, "sample_3", 0) // Small Toms (dmx_state::VC_SMALL_TOMS). + ROM_LOAD("stom5.u7", 0x000000, 0x001000, CRC(e8022d72) SHA1(61a14da4d96db12b040ab9529208b165212b3693)) + + ROM_REGION(0x1000, "sample_4", 0) // Large Toms (dmx_state::VC_LARGE_TOMS). + ROM_LOAD("sfltom2.u7", 0x000000, 0x001000, CRC(f5b48db0) SHA1(a85e72a9f87838c26538e5873f6938e51a517c90)) + + ROM_REGION(0x1000, "sample_5", 0) // Perc 1: Tambourine / Rimshot (dmx_state::VC_PERC1). + ROM_LOAD("stik.u7", 0x000000, 0x001000, CRC(61af39e3) SHA1(5648674854a8db80656bf729c4f353b75d101d7b)) + + ROM_REGION(0x1000, "sample_6", 0) // Perc 2: Shaker / Claps (dmx_state::VC_PERC2). + ROM_LOAD("shake6.u7", 0x000000, 0x001000, CRC(00549f07) SHA1(d41c3357d486c398f882774130789c9756dfb9af)) + + ROM_REGION(0x8000, "sample_7", 0) // Cymbal: Ride / Crash (dmx_state::VC_CYMBAL). + ROM_LOAD("crash1.u12", 0x000000, 0x001000, CRC(40d584af) SHA1(98702946e80892eb834433268164404fab3b0e28)) + ROM_LOAD("crash2.u11", 0x001000, 0x001000, CRC(8daf2447) SHA1(59c0af6c46c04ccd0eff90070de4fe08c5a47b42)) + ROM_LOAD("crash3.u10", 0x002000, 0x001000, CRC(4a41c86d) SHA1(baffb30659bb628d4fd9a382dc851683aad92b88)) + ROM_LOAD("crash4.u9", 0x003000, 0x001000, CRC(b30876a9) SHA1(fe9f906f38ad9354d043794d6c22d07c78672261)) + ROM_LOAD("ride2a1.u8", 0x004000, 0x001000, CRC(17c960e8) SHA1(5f4681979c6339ff1c38dc90257d14a0a7516c52)) + ROM_LOAD("ride2a2.u7", 0x005000, 0x001000, CRC(5b2198d0) SHA1(5e008c76f949a6357c1160e00d43631585702d45)) + ROM_LOAD("ride2a3.u6", 0x006000, 0x001000, CRC(4f67cacb) SHA1(8abc2c6769bd315c489969486de02b567348ea94)) + ROM_LOAD("ride2a4.u5", 0x007000, 0x001000, CRC(25656751) SHA1(46e5f70da82f8845dd820cbcf942bd0e7e328d56)) +ROM_END + +} // anonymous namespace + +SYST(1980, obdmx, 0, 0, dmx, dmx, dmx_state, empty_init, "Oberheim", "DMX", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND) + diff --git a/src/mame/oberheim/ob8.cpp b/src/mame/oberheim/ob8.cpp new file mode 100644 index 0000000000000..df5758494b5b0 --- /dev/null +++ b/src/mame/oberheim/ob8.cpp @@ -0,0 +1,446 @@ +// license:BSD-3-Clause +// copyright-holders:m1macrophage +/* +The OB-8 is an 8-voice digitally-controlled analog synthesizer. + +The firmware runs on a Z80. + +The driver is based on the OB8 srevice manual and schematics, and is intended +as an educational tool. + +This driver is very much an early-stage skeleton. + +Board prefixes in component designations (e.g. PB:U54) +PB - Processor Board. +BB - Bend Board. +TB - Pot Board. +*/ + +#include "emu.h" + +#include "cpu/z80/z80.h" +#include "machine/nvram.h" +#include "machine/output_latch.h" +#include "machine/pit8253.h" +#include "video/pwm.h" + +namespace { + +constexpr const char MAINCPU_TAG[] = "z80"; +constexpr const char NVRAM_TAG[] = "nvram"; + +class ob8_state : public driver_device +{ +public: + ob8_state(const machine_config &mconfig, device_type type, const char *tag) ATTR_COLD + : driver_device(mconfig, type, tag) + , m_maincpu(*this, MAINCPU_TAG) + , m_pit(*this, "pit_8253") + , m_led_matrix_device(*this, "led_matrix_device") + , m_switch_io(*this, "switch_column_%d", 0U) + , m_b_switch_io(*this, "b_switch_%d", 0U) + { + } + + void ob8(machine_config &config) ATTR_COLD; + +private: + u8 switches_r(offs_t offset); + u8 b_switches_r(offs_t offset); + void leds_w(offs_t offset, u8 data); + + void memory_map(address_map &map) ATTR_COLD; + void io_map(address_map &map) ATTR_COLD; + + required_device m_maincpu; + required_device m_pit; + required_device m_led_matrix_device; + required_ioport_array<16> m_switch_io; + required_ioport_array<2> m_b_switch_io; + + u8 m_selected_pot = 0; + bool m_hold_pedal_enabled = false; +}; + +u8 ob8_state::switches_r(offs_t offset) +{ + const u8 selected_pot = offset & 0x1f; + const u8 selected_column = offset & 0x0f; + + if (!machine().side_effects_disabled()) + { + // A3-A4 select the MUX device, and A0-A2 select the MUX input. + m_selected_pot = selected_pot; + const u8 selected_mux_device = m_selected_pot >> 3; + if (selected_mux_device == 3) + { + // MUX 3 (BB:U1) has its "C" input grounded, so A2 has no effect. + m_selected_pot &= 0xfb; + } + + m_hold_pedal_enabled = (selected_column == 9); + } + + // Inverted by buffers PB:U53 and PB:U54. + return ~m_switch_io[selected_column]->read(); +} + +u8 ob8_state::b_switches_r(offs_t offset) +{ + // BSWEN* further decoded by U56. + // A0 == 0: BSW0*, A0 == 1: BSW1*. + // Inverted by BB:U3 (80C98). + // Only D0-D5 are relevant, D6-D7 are pulled high. + return 0xc0 | (~m_b_switch_io[offset]->read() & 0x3f); +} + +void ob8_state::leds_w(offs_t offset, u8 data) +{ + // The LED sources (rows) are controlled by D2-D7 (schematic signals LR2-7. + // LR = Led Row). They are active low. Inverting 'data' because matrix() + // expects an active-high mask. + const u8 source_mask = (~data >> 2) & 0x3f; + + // The LED sink (column) is controlled by A0-A2, which are decoded by U1 + // (4028) and inverted by TB:U2. This creates a single-bit, active-low mask. + // But matrix() requires an active-high mask. + const u8 sink_mask = 1 << (offset & 0x07); + + m_led_matrix_device->matrix(source_mask, sink_mask); +} + +void ob8_state::memory_map(address_map &map) +{ + // Signal names below (e.g. PROT*, IOR*) match those in the schematic. + + // ROM decoding done by PB:U32A (74LS139). + map(0x0000, 0x3fff).rom(); // 4 x 2732, 4Kbyte ROMs (PB:U24-U21). + + // RAM decoding done by PB:U32B (74LS139). + // RAMs powered by battery when there is no power. + map(0x4000, 0x5fff).ram().share(NVRAM_TAG); // 4 x 6116 2KB RAMs (PB:U20-U17). + // TODO: Is U17 populated? + // TODO: Implement write protection for PB:U18-19. + + // TODO: map(0x6000, 0x7fff) // CHEN* // Decoded by PB:U41A (74LS139). + + map(0x7c00, 0x7c1f).mirror(0x0060).r(FUNC(ob8_state::switches_r)); // IOR* + map(0x7c80, 0x7c87).mirror(0x0078).w(FUNC(ob8_state::leds_w)); // LEDS* + + // 0x7d00- 0x7d7f: SWTCH*. Further decoding done by PB:U55 (LS139) + map(0x7d00, 0x7d00).mirror(0x001f).w("latch_bled0", FUNC(output_latch_device::write)); // BLED0* + map(0x7d20, 0x7d20).mirror(0x001f).w("latch_bled1", FUNC(output_latch_device::write)); // BLED1* + //TODO: map(0x7d40, 0x7d5f); // MISC* + map(0x7d60, 0x7d61).mirror(0x001e).r(FUNC(ob8_state::b_switches_r)); // BSWEN* + + map(0x7d80, 0x7d83).mirror(0x007c).rw(m_pit, FUNC(pit8253_device::read), FUNC(pit8253_device::write)); // TIMER* + // TODO: map(0x7e00, 0x7e7f); // STAT* + + map(0x7e80, 0x7e80).mirror(0x007f).w("latch_pb_u4", FUNC(output_latch_device::write)); // LATCH* + + // TODO: map(0x7f00, 0x7f7f); // MISC2* + // 0x7f80 - 0x7fff: unused. Decoder output not connected. +} + +void ob8_state::io_map(address_map &map) +{ +} + +void ob8_state::ob8(machine_config &config) +{ + Z80(config, m_maincpu, 8_MHz_XTAL / 2); + m_maincpu->set_addrmap(AS_PROGRAM, &ob8_state::memory_map); + m_maincpu->set_addrmap(AS_IO, &ob8_state::io_map); + + NVRAM(config, NVRAM_TAG, nvram_device::DEFAULT_ALL_0); + + PIT8253(config, m_pit); + // TODO: clock 0 connected to OSC. + m_pit->set_clk<1>(8_MHz_XTAL / 2); + m_pit->set_clk<2>(8_MHz_XTAL / 2); + // TODO: The rest of the connections. + + PWM_DISPLAY(config, m_led_matrix_device).set_size(6, 8); + // TODO: Set up LED outputs. + + // 74HC174, 6-bit latch, PB:U4. + output_latch_device &u4_pb(OUTPUT_LATCH(config, "latch_pb_u4")); + u4_pb.bit_handler<0>().set_output("ARM"); + u4_pb.bit_handler<1>().set_output("AUTOST"); + // Bits 2-5 not connected. + + // 74LS174, 6-bit latch, BB:U5. Controls LEDs, active low. + output_latch_device &bled0(OUTPUT_LATCH(config, "latch_bled0")); + bled0.bit_handler<0>().set_output("led_osc1").invert(); + bled0.bit_handler<1>().set_output("led_osc2").invert(); + bled0.bit_handler<2>().set_output("led_osc2only").invert(); + bled0.bit_handler<3>().set_output("led_amount").invert(); + bled0.bit_handler<4>().set_output("led_down").invert(); + bled0.bit_handler<5>().set_output("led_up").invert(); + + // 74LS174, 6-bit latch, BB:U4. Controls LEDs, active low. + output_latch_device &bled1(OUTPUT_LATCH(config, "latch_bled1")); + bled1.bit_handler<0>().set_output("led_rate").invert(); + bled1.bit_handler<1>().set_output("led_mode").invert(); + bled1.bit_handler<2>().set_output("led_lower").invert(); + bled1.bit_handler<3>().set_output("led_upper").invert(); + bled1.bit_handler<4>().set_output("led_arpegiate").invert(); + // Bit 5 is unused. +} + +INPUT_PORTS_START(ob8) + PORT_START("switch_column_0") // C0 - G0 in schematic. + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_C2 + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_CS2 + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_D2 + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_DS2 + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_E2 + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_F2 + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_FS2 + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_G2 + + PORT_START("switch_column_1") // G0# - D1# + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_GS2 + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_A2 + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_AS2 + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_B2 + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_C3 + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_CS3 + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_D3 + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_DS3 + + PORT_START("switch_column_2") // E1 - B1 + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_E3 + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_F3 + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_FS3 + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_G3 + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_GS3 + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_A3 + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_AS3 + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_B3 + + PORT_START("switch_column_3") // C2 - G2 + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_C4 + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_CS4 + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_D4 + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_DS4 + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_E4 + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_F4 + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_FS4 + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_G4 + + PORT_START("switch_column_4") // G2# - D3# + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_GS4 + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_A4 + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_AS4 + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_B4 + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_C5 + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_CS5 + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_D5 + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_DS5 + + PORT_START("switch_column_5") // E3 - B3 + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_E5 + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_F5 + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_FS5 + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_G5 + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_GS5 + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_A5 + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_AS5 + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_B5 + + PORT_START("switch_column_6") // C4 - G4 + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_C6 + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_CS6 + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_D6 + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_DS6 + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_E6 + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_F6 + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_FS6 + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_G6 + + PORT_START("switch_column_7") // G4# - C5 + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_GS6 + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_A6 + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_AS6 + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_B6 + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_GM_C7 + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) + + PORT_START("switch_column_8") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("PRG1") + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("PRG2") + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("PRG3") + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("PRG4") + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("PRG5") + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("PRG6") + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("PRG7") + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("PRG8") + + PORT_START("switch_column_9") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("HOLD") + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("OSC2 FM") + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("FILTER FM") + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("UNISON") + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("LFO SIN") + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("LFO SQR") + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("LFO S/H") + + PORT_START("switch_column_10") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("OSC1 PWM") + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("OSC2 PWM") + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("OSC1 SAW") + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("OSC1 PULSE") + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("OSC2 SAW") + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("OSC2 PULSE") + + PORT_START("switch_column_11") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("TRACK") + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("OSC1 FULL") + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("OSC1 HALF") + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("OSC2 FULL") + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("4 POLE") + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("NOISE") + + PORT_START("switch_column_12") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("TEST1") + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("TEST2") + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("OSC1 FM") + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SYNC") + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("F-ENV") + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("VCA") + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("AUTO") + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("CHORD") + + PORT_START("switch_column_13") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("LOWER") + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("UPPER") + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("SPLIT") + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("GRP A") + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("GRP B") + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("GRP C") + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("GRP D") + + PORT_START("switch_column_14") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("DOUBLE") + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("MANUAL") + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("WRITE") + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) + + // TODO: Find actual usage. See SWENF* in PB sheet 2/4. + // (SWENF* is coming from TB). + PORT_START("switch_column_15") + PORT_BIT(0xff, IP_ACTIVE_LOW, IPT_UNUSED) + + PORT_START("b_switch_0") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("OSC1") + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("OSC2") + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("OSC2 ONLY") + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("AMNT") + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("DOWN") + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("UP") + + PORT_START("b_switch_1") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("WAVE") + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("MODE") + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("LOWER") + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("UPPER") + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("ARPEG") + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("DEPTH ON/OFF") + + // 4051 MUX TB:U7 (Pot Board), enabled by POT0*. + PORT_START("pot_0") + PORT_ADJUSTER(50, "VCF REL") + PORT_START("pot_1") + PORT_ADJUSTER(50, "VCA REL") + PORT_START("pot_2") + PORT_ADJUSTER(50, "VCF DCY") + PORT_START("pot_3") + PORT_ADJUSTER(50, "VCA DCY") + PORT_START("pot_4") + PORT_ADJUSTER(50, "VCF ATK") + PORT_START("pot_5") + PORT_ADJUSTER(50, "VCA ATK") + PORT_START("pot_6") + PORT_ADJUSTER(50, "VCF SUS") + PORT_START("pot_7") + PORT_ADJUSTER(50, "VCA SUS") + + // 4051 MUX TB:U5 (Pot Board), enabled by POT1*. + PORT_START("pot_8") + PORT_ADJUSTER(50, "VCF MOD") + PORT_START("pot_9") + PORT_ADJUSTER(50, "VCF RES") + PORT_START("pot_10") + PORT_ADJUSTER(50, "VCO PW") + PORT_START("pot_11") + PORT_ADJUSTER(50, "LFO FREQ") + PORT_START("pot_12") + PORT_ADJUSTER(50, "FM AMNT") + PORT_START("pot_13") + PORT_ADJUSTER(50, "PWM AMNT") + PORT_START("pot_14") + PORT_ADJUSTER(50, "PORT AMNT") + PORT_START("pot_15") + PORT_ADJUSTER(50, "VCO2 DETUNE") + + // 4051 MUX TB:U6 (Pot Board), enabled by POT2*. + PORT_START("pot_16") + PORT_ADJUSTER(50, "VCF FREQ") + PORT_START("pot_17") + PORT_ADJUSTER(50, "VCO2 FREQ") + PORT_START("pot_18") + PORT_ADJUSTER(50, "VCO1 FREQ") + PORT_START("pot_19") + PORT_ADJUSTER(50, "BALANCER PROG VOL") + PORT_START("pot_20") + PORT_ADJUSTER(50, "MASTER TUNE") + // The rest of the mux inputs are grounded. + PORT_START("pot_21") + PORT_BIT(0xff, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_START("pot_22"); + PORT_BIT(0xff, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_START("pot_23") + PORT_BIT(0xff, IP_ACTIVE_HIGH, IPT_UNUSED) + + // 4051 MUX BB:U1 (Bend Board), enabled by POT3*. + PORT_START("pot_24") + PORT_ADJUSTER(50, "SPEED") + PORT_START("pot_25") + PORT_ADJUSTER(50, "DEPTH") + PORT_START("pot_26") + PORT_ADJUSTER(50, "BEND LEVER") + PORT_START("pot_27") + PORT_ADJUSTER(50, "VIBRATO LEVER") + // The rest of the mux inputs are grounded, but they can never be addressed + // Mux address "C" tied to ground, essentially mirroring the above 4 inputs. +INPUT_PORTS_END + +ROM_START(ob8) + ROM_REGION(0X4000, MAINCPU_TAG, 0) + ROM_DEFAULT_BIOS("a8") + + ROM_SYSTEM_BIOS(0, "a8", "OB-8 A8 OS") + ROMX_LOAD("ob8a80.u24", 0x000000, 0x001000, CRC(3d141a93) SHA1(4d9866687f5dfe09133da9a4feedd9af0862cfbe), ROM_BIOS(0)) + ROMX_LOAD("ob8a81.u23", 0x001000, 0x001000, CRC(fba31703) SHA1(487258baac9d5bb399c5ad1630249e41302305ba), ROM_BIOS(0)) + ROMX_LOAD("ob8a82.u22", 0x002000, 0x001000, CRC(e6e99305) SHA1(f2c4c28cf3feb77fb8e401e191b0f22af6b09e90), ROM_BIOS(0)) + ROMX_LOAD("ob8a83.u21", 0x003000, 0x001000, CRC(6912415d) SHA1(77108a9540e4d84833dc0fa8066025d812bb6e7c), ROM_BIOS(0)) +ROM_END + +} // anonymous namespace + +// 1983 - 1985. +SYST(1983, ob8, 0, 0, ob8, ob8, ob8_state, empty_init, "Oberheim", "OB8", MACHINE_NOT_WORKING | MACHINE_NO_SOUND) + diff --git a/src/mame/orca/espial.cpp b/src/mame/orca/espial.cpp index 1432286213b1c..31fa4534180ea 100644 --- a/src/mame/orca/espial.cpp +++ b/src/mame/orca/espial.cpp @@ -3,13 +3,18 @@ /*************************************************************************** - Espial hardware games +Espial hardware games + +2 XTALS (12.0MHz and 18.432MHz), both CPUs are 3.0MHz and the AY is 1.5MHz. +18.432MHz XTAL is probably for the pixel clock. Espial: The Orca logo is displayed, but looks to be "blacked out" via the color PROMs by having 0x1c & 0x1d set to black. TODO: - merge with orca/zodiack.cpp +- where do the sound NMIs come from exactly? + Stephh's notes (based on the games Z80 code and some tests) : @@ -43,7 +48,6 @@ Stephh's notes (based on the games Z80 code and some tests) : #include "cpu/z80/z80.h" #include "machine/gen_latch.h" -#include "machine/timer.h" #include "machine/watchdog.h" #include "sound/ay8910.h" @@ -67,9 +71,11 @@ class espial_state : public driver_device m_colorram(*this, "colorram"), m_maincpu(*this, "maincpu"), m_audiocpu(*this, "audiocpu"), + m_screen(*this, "screen"), m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette"), - m_soundlatch(*this, "soundlatch") + m_soundlatch(*this, "soundlatch%u", 0), + m_aysnd(*this, "aysnd") { } void espial(machine_config &config); @@ -88,22 +94,29 @@ class espial_state : public driver_device // video-related tilemap_t *m_bg_tilemap = nullptr; - uint8_t m_flipscreen = 0U; + uint8_t m_flipscreen = 0; // sound-related - uint8_t m_main_nmi_enabled = 0U; - uint8_t m_sound_nmi_enabled = 0U; + uint8_t m_main_nmi_enabled = 0; + uint8_t m_sound_nmi_enabled = 0; + uint8_t m_sound_nmi_freq = 0; + emu_timer *m_sound_nmi_timer; // devices required_device m_maincpu; required_device m_audiocpu; + required_device m_screen; required_device m_gfxdecode; required_device m_palette; - required_device m_soundlatch; + required_device_array m_soundlatch; + required_device m_aysnd; void master_interrupt_mask_w(uint8_t data); - void master_soundlatch_w(uint8_t data); void sound_nmi_mask_w(uint8_t data); + void porta_w(offs_t offset, uint8_t data, uint8_t mem_mask); + TIMER_CALLBACK_MEMBER(sound_nmi_gen); + void vblank(int state); + void videoram_w(offs_t offset, uint8_t data); void colorram_w(offs_t offset, uint8_t data); void attributeram_w(offs_t offset, uint8_t data); @@ -112,9 +125,8 @@ class espial_state : public driver_device TILE_GET_INFO_MEMBER(get_tile_info); void palette(palette_device &palette) const; uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - INTERRUPT_GEN_MEMBER(sound_nmi_gen); - TIMER_DEVICE_CALLBACK_MEMBER(scanline); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); + void main_map(address_map &map) ATTR_COLD; void sound_io_map(address_map &map) ATTR_COLD; void sound_map(address_map &map) ATTR_COLD; @@ -123,7 +135,9 @@ class espial_state : public driver_device class netwars_state : public espial_state { public: - using espial_state::espial_state; + netwars_state(const machine_config &mconfig, device_type type, const char *tag) : + espial_state(mconfig, type, tag) + { } void netwars(machine_config &config); @@ -135,7 +149,35 @@ class netwars_state : public espial_state }; -/*************************************************************************** + +/************************************* + * + * Machine initialization + * + *************************************/ + +void espial_state::machine_start() +{ + save_item(NAME(m_flipscreen)); + save_item(NAME(m_main_nmi_enabled)); + save_item(NAME(m_sound_nmi_enabled)); + save_item(NAME(m_sound_nmi_freq)); + + m_sound_nmi_timer = timer_alloc(FUNC(espial_state::sound_nmi_gen), this); +} + +void espial_state::machine_reset() +{ + m_main_nmi_enabled = false; + m_sound_nmi_enabled = false; + + // HACK: prevent NMI immediately after soft reset + m_maincpu->pulse_input_line(INPUT_LINE_RESET, attotime::zero); +} + + + +/************************************* Convert the color PROMs into a more useable format. @@ -153,7 +195,7 @@ class netwars_state : public espial_state -- 470 ohm resistor -- RED bit 0 -- 1 kohm resistor -- RED -***************************************************************************/ +*************************************/ void espial_state::palette(palette_device &palette) const { @@ -168,11 +210,13 @@ void espial_state::palette(palette_device &palette) const bit1 = BIT(color_prom[i], 1); bit2 = BIT(color_prom[i], 2); int const r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; + // green component bit0 = BIT(color_prom[i], 3); bit1 = BIT(color_prom[i + palette.entries()], 0); bit2 = BIT(color_prom[i + palette.entries()], 1); int const g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; + // blue component bit0 = 0; bit1 = BIT(color_prom[i + palette.entries()], 2); @@ -185,23 +229,6 @@ void espial_state::palette(palette_device &palette) const -/*************************************************************************** - - Callbacks for the TileMap code - -***************************************************************************/ - -TILE_GET_INFO_MEMBER(espial_state::get_tile_info) -{ - uint8_t const code = m_videoram[tile_index]; - uint8_t const col = m_colorram[tile_index]; - uint8_t const attr = m_attributeram[tile_index]; - - tileinfo.set(0, code | ((attr & 0x03) << 8), col & 0x3f, TILE_FLIPYX(attr >> 2)); -} - - - /************************************* * * Video system start @@ -212,61 +239,25 @@ void espial_state::video_start() { m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(espial_state::get_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); m_bg_tilemap->set_scroll_cols(32); - - save_item(NAME(m_flipscreen)); } void netwars_state::video_start() { // Net Wars has a tile map that's twice as big as Espial's m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(netwars_state::get_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 64); - m_bg_tilemap->set_scroll_cols(32); - - save_item(NAME(m_flipscreen)); } - -/************************************* - * - * Memory handlers - * - *************************************/ - -void espial_state::videoram_w(offs_t offset, uint8_t data) -{ - m_videoram[offset] = data; - m_bg_tilemap->mark_tile_dirty(offset); -} - - -void espial_state::colorram_w(offs_t offset, uint8_t data) -{ - m_colorram[offset] = data; - m_bg_tilemap->mark_tile_dirty(offset); -} - - -void espial_state::attributeram_w(offs_t offset, uint8_t data) +TILE_GET_INFO_MEMBER(espial_state::get_tile_info) { - m_attributeram[offset] = data; - m_bg_tilemap->mark_tile_dirty(offset); -} - + uint8_t const code = m_videoram[tile_index]; + uint8_t const col = m_colorram[tile_index]; + uint8_t const attr = m_attributeram[tile_index]; -void espial_state::scrollram_w(offs_t offset, uint8_t data) -{ - m_scrollram[offset] = data; - m_bg_tilemap->set_scrolly(offset, data); + tileinfo.set(0, code | ((attr & 0x03) << 8), col & 0x3f, TILE_FLIPYX(attr >> 2)); } -void espial_state::flipscreen_w(uint8_t data) -{ - m_flipscreen = data; - m_bg_tilemap->set_flip(m_flipscreen ? TILEMAP_FLIPX | TILEMAP_FLIPY : 0); -} - /************************************* * @@ -333,7 +324,6 @@ void espial_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect) } } - uint32_t espial_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0); @@ -342,57 +332,118 @@ uint32_t espial_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap } -void espial_state::machine_reset() + +/************************************* + * + * Memory handlers + * + *************************************/ + +void espial_state::vblank(int state) { - m_flipscreen = 0; + // vblank irq + if (state && m_main_nmi_enabled) + m_maincpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero); - m_main_nmi_enabled = false; - m_sound_nmi_enabled = false; + // timer irq, checks soundlatch port then updates some sound related work RAM buffers + if (state) + m_maincpu->set_input_line(0, HOLD_LINE); } -void espial_state::machine_start() + +TIMER_CALLBACK_MEMBER(espial_state::sound_nmi_gen) { - save_item(NAME(m_sound_nmi_enabled)); + if (m_sound_nmi_enabled) + m_audiocpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero); } -void espial_state::master_interrupt_mask_w(uint8_t data) +void espial_state::videoram_w(offs_t offset, uint8_t data) { - m_main_nmi_enabled = ~(data & 1); + m_videoram[offset] = data; + m_bg_tilemap->mark_tile_dirty(offset); } -void espial_state::sound_nmi_mask_w(uint8_t data) +void espial_state::colorram_w(offs_t offset, uint8_t data) { - m_sound_nmi_enabled = data & 1; + m_colorram[offset] = data; + m_bg_tilemap->mark_tile_dirty(offset); } -TIMER_DEVICE_CALLBACK_MEMBER(espial_state::scanline) + +void espial_state::attributeram_w(offs_t offset, uint8_t data) { - int const scanline = param; + m_attributeram[offset] = data; + m_bg_tilemap->mark_tile_dirty(offset); +} - if (scanline == 240 && m_main_nmi_enabled) // vblank-out irq - m_maincpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero); - if (scanline == 16) // timer irq, checks soundlatch port then updates some sound related work RAM buffers - m_maincpu->set_input_line(0, HOLD_LINE); +void espial_state::scrollram_w(offs_t offset, uint8_t data) +{ + m_scrollram[offset] = data; + m_bg_tilemap->set_scrolly(offset, data); } -INTERRUPT_GEN_MEMBER(espial_state::sound_nmi_gen) +void espial_state::flipscreen_w(uint8_t data) { - if (m_sound_nmi_enabled) - m_audiocpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero); + m_flipscreen = data; + m_bg_tilemap->set_flip(m_flipscreen ? TILEMAP_FLIPX | TILEMAP_FLIPY : 0); +} + +void espial_state::master_interrupt_mask_w(uint8_t data) +{ + m_main_nmi_enabled = ~(data & 1); } -void espial_state::master_soundlatch_w(uint8_t data) +void espial_state::sound_nmi_mask_w(uint8_t data) +{ + m_sound_nmi_enabled = data & 1; +} + +void espial_state::porta_w(offs_t offset, uint8_t data, uint8_t mem_mask) { - m_soundlatch->write(data); - m_audiocpu->set_input_line(0, HOLD_LINE); + if (mem_mask && data != m_sound_nmi_freq) + { + // sound NMI frequency + m_sound_nmi_freq = data; + attotime period; + + // netwars writes 0xf8 and expects 32 NMIs per frame + // espial writes 0xfe and expects 4 NMIs per frame + switch (data) + { + case 0: + period = attotime::never; + break; + + case 0xfe: + period = m_screen->frame_period() / 4; + break; + + case 0xf8: + period = m_screen->frame_period() / 32; + break; + + default: + logerror("%s: unknown sound NMI frequency %02X", machine().describe_context(), data); + return; + } + + m_sound_nmi_timer->adjust(period, 0, period); + } } + +/************************************* + * + * Address maps + * + *************************************/ + void espial_state::main_map(address_map &map) { map(0x0000, 0x4fff).rom(); @@ -401,7 +452,7 @@ void espial_state::main_map(address_map &map) map(0x6082, 0x6082).portr("DSW1"); map(0x6083, 0x6083).portr("IN1"); map(0x6084, 0x6084).portr("IN2"); - map(0x6090, 0x6090).r("soundlatch2", FUNC(generic_latch_8_device::read)).w(FUNC(espial_state::master_soundlatch_w)); + map(0x6090, 0x6090).r(m_soundlatch[1], FUNC(generic_latch_8_device::read)).w(m_soundlatch[0], FUNC(generic_latch_8_device::write)); map(0x7000, 0x7000).rw("watchdog", FUNC(watchdog_timer_device::reset_r), FUNC(watchdog_timer_device::reset_w)); map(0x7100, 0x7100).w(FUNC(espial_state::master_interrupt_mask_w)); map(0x7200, 0x7200).w(FUNC(espial_state::flipscreen_w)); @@ -427,7 +478,7 @@ void netwars_state::main_map(address_map &map) map(0x6082, 0x6082).portr("DSW1"); map(0x6083, 0x6083).portr("IN1"); map(0x6084, 0x6084).portr("IN2"); - map(0x6090, 0x6090).r("soundlatch2", FUNC(generic_latch_8_device::read)).w(FUNC(netwars_state::master_soundlatch_w)); + map(0x6090, 0x6090).r(m_soundlatch[1], FUNC(generic_latch_8_device::read)).w(m_soundlatch[0], FUNC(generic_latch_8_device::write)); map(0x7000, 0x7000).rw("watchdog", FUNC(watchdog_timer_device::reset_r), FUNC(watchdog_timer_device::reset_w)); map(0x7100, 0x7100).w(FUNC(netwars_state::master_interrupt_mask_w)); map(0x7200, 0x7200).w(FUNC(netwars_state::flipscreen_w)); @@ -446,16 +497,23 @@ void espial_state::sound_map(address_map &map) map(0x0000, 0x1fff).rom(); map(0x2000, 0x23ff).ram(); map(0x4000, 0x4000).w(FUNC(espial_state::sound_nmi_mask_w)); - map(0x6000, 0x6000).r(m_soundlatch, FUNC(generic_latch_8_device::read)).w("soundlatch2", FUNC(generic_latch_8_device::write)); + map(0x6000, 0x6000).r(m_soundlatch[0], FUNC(generic_latch_8_device::read)).w(m_soundlatch[1], FUNC(generic_latch_8_device::write)); } void espial_state::sound_io_map(address_map &map) { map.global_mask(0xff); - map(0x00, 0x01).w("aysnd", FUNC(ay8910_device::address_data_w)); + map(0x00, 0x01).w(m_aysnd, FUNC(ay8910_device::address_data_w)); } + +/************************************* + * + * Input ports + * + *************************************/ + // verified from Z80 code static INPUT_PORTS_START( espial ) PORT_START("IN0") @@ -580,6 +638,13 @@ static INPUT_PORTS_START( netwars ) INPUT_PORTS_END + +/************************************* + * + * GFX layouts + * + *************************************/ + static const gfx_layout charlayout = { 8,8, @@ -610,29 +675,35 @@ GFXDECODE_END +/************************************* + * + * Machine configs + * + *************************************/ void espial_state::espial(machine_config &config) { // basic machine hardware - Z80(config, m_maincpu, 3'072'000); // 3.072 MHz + Z80(config, m_maincpu, 12_MHz_XTAL / 4); m_maincpu->set_addrmap(AS_PROGRAM, &espial_state::main_map); - TIMER(config, "scantimer").configure_scanline(FUNC(espial_state::scanline), "screen", 0, 1); - Z80(config, m_audiocpu, 3'072'000); // 2 MHz?????? + Z80(config, m_audiocpu, 12_MHz_XTAL / 4); m_audiocpu->set_addrmap(AS_PROGRAM, &espial_state::sound_map); m_audiocpu->set_addrmap(AS_IO, &espial_state::sound_io_map); - m_audiocpu->set_periodic_int(FUNC(espial_state::sound_nmi_gen), attotime::from_hz(4 * 60)); + + config.set_maximum_quantum(attotime::from_hz(600)); WATCHDOG_TIMER(config, "watchdog"); // video hardware - screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_refresh_hz(60); - screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); // not accurate - screen.set_size(32*8, 32*8); - screen.set_visarea(0*8, 32*8-1, 2*8, 30*8-1); - screen.set_screen_update(FUNC(espial_state::screen_update)); - screen.set_palette(m_palette); + SCREEN(config, m_screen, SCREEN_TYPE_RASTER); + m_screen->set_refresh_hz(59); + m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500)); // not accurate + m_screen->set_size(32*8, 32*8); + m_screen->set_visarea(0*8, 32*8-1, 2*8, 30*8-1); + m_screen->set_screen_update(FUNC(espial_state::screen_update)); + m_screen->set_palette(m_palette); + m_screen->screen_vblank().set(FUNC(espial_state::vblank)); GFXDECODE(config, m_gfxdecode, m_palette, gfx_espial); PALETTE(config, m_palette, FUNC(espial_state::palette), 256); @@ -640,10 +711,14 @@ void espial_state::espial(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - GENERIC_LATCH_8(config, m_soundlatch); - GENERIC_LATCH_8(config, "soundlatch2"); + GENERIC_LATCH_8(config, m_soundlatch[0]); + m_soundlatch[0]->data_pending_callback().set_inputline(m_audiocpu, 0); + + GENERIC_LATCH_8(config, m_soundlatch[1]); - AY8910(config, "aysnd", 1'500'000).add_route(ALL_OUTPUTS, "mono", 0.50); + AY8910(config, m_aysnd, 12_MHz_XTAL / 8).add_route(ALL_OUTPUTS, "mono", 0.50); + m_aysnd->port_a_write_callback().set(FUNC(espial_state::porta_w)); + m_aysnd->port_b_write_callback().set_nop(); // spams 0x00 } void netwars_state::netwars(machine_config &config) @@ -652,18 +727,15 @@ void netwars_state::netwars(machine_config &config) // basic machine hardware m_maincpu->set_addrmap(AS_PROGRAM, &netwars_state::main_map); - - // video hardware - subdevice("screen")->set_size(32*8, 64*8); } -/*************************************************************************** - - Game driver(s) - -***************************************************************************/ +/************************************* + * + * ROM definitions + * + *************************************/ ROM_START( espial ) ROM_REGION( 0x10000, "maincpu", 0 ) @@ -786,6 +858,13 @@ ROM_END } // anonymous namespace + +/************************************* + * + * Game driver(s) + * + *************************************/ + GAME( 1983, espial, 0, espial, espial, espial_state, empty_init, ROT0, "Orca / Thunderbolt", "Espial (Europe)", MACHINE_SUPPORTS_SAVE ) GAME( 1983, espialj, espial, espial, espial, espial_state, empty_init, ROT0, "Orca / Thunderbolt", "Espial (Japan)", MACHINE_SUPPORTS_SAVE ) GAME( 1983, espialn, espial, espial, espial, espial_state, empty_init, ROT0, "Orca / Thunderbolt", "Espial (Nova Apparate license)", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/orca/orca40c.cpp b/src/mame/orca/orca40c.cpp index bd5ebac0b26f0..d694ae68524b9 100644 --- a/src/mame/orca/orca40c.cpp +++ b/src/mame/orca/orca40c.cpp @@ -28,17 +28,17 @@ DEFINE_DEVICE_TYPE(ORCA_OVG_40C, orca_ovg_40c_device, "orca_ovg_40c", "Orca OVG 40c video PCB") -orca_ovg_40c_device::orca_ovg_40c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : device_t(mconfig, ORCA_OVG_40C, tag, owner, clock), - device_gfx_interface(mconfig, *this, nullptr, "palette"), - device_video_interface(mconfig, *this), - m_videoram(*this, "videoram"), - m_videoram_2(*this,"videoram_2"), - m_attributeram(*this, "attributeram"), - m_spriteram(*this, "spriteram"), - m_bulletsram(*this, "bulletsram"), - m_percuss_hardware(false), - m_flip_screen(false) +orca_ovg_40c_device::orca_ovg_40c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + device_t(mconfig, ORCA_OVG_40C, tag, owner, clock), + device_gfx_interface(mconfig, *this, nullptr, "palette"), + device_video_interface(mconfig, *this), + m_videoram(*this, "videoram"), + m_videoram_2(*this,"videoram_2"), + m_attributeram(*this, "attributeram"), + m_spriteram(*this, "spriteram"), + m_bulletsram(*this, "bulletsram"), + m_percuss_hardware(false), + m_flip_screen(false) { } diff --git a/src/mame/orca/vastar.cpp b/src/mame/orca/vastar.cpp index 56b1e11bc7b38..f3b679129f580 100644 --- a/src/mame/orca/vastar.cpp +++ b/src/mame/orca/vastar.cpp @@ -700,7 +700,7 @@ ROM_START( dogfightp ) // all 2732 ROM_LOAD( "10.7p", 0x1800, 0x1000, CRC(2cb51793) SHA1(d90177ef28730774202a04a0846281537a1883df) ) ROM_REGION( 0x0040, "videopcb:proms", 0 ) // on ORCA OVG-40c sub board - ROM_LOAD( "blue.2a.82s123", 0x0000, 0x0020, CRC(aa839a24) SHA1(9b8217e1c257d24e873888fd083c099fc93c7878) ) //doesn't match parent + ROM_LOAD( "blue.2a.82s123", 0x0000, 0x0020, CRC(aa839a24) SHA1(9b8217e1c257d24e873888fd083c099fc93c7878) ) // doesn't match parent ROM_LOAD( "pink.2b.82s123", 0x0020, 0x0020, CRC(596ae457) SHA1(1c1a3130d88c5fd5c66ce9f91d97a09c0a0b535f) ) ROM_END diff --git a/src/mame/orca/zodiack.cpp b/src/mame/orca/zodiack.cpp index 5620f974d641c..cb69240a5aa87 100644 --- a/src/mame/orca/zodiack.cpp +++ b/src/mame/orca/zodiack.cpp @@ -26,7 +26,7 @@ driver by Zsolt Vasvari TODO: - improve video emulation (especially moguchan colors) -- where do the sound related irqs come from exactly? +- where do the sound NMIs come from exactly? - can eventually be merged with orca/espial.cpp ============================================================================ @@ -117,11 +117,12 @@ class zodiack_state : public driver_device driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), m_audiocpu(*this, "audiocpu"), - m_soundlatch(*this, "soundlatch%u", 0) + m_screen(*this, "screen"), + m_soundlatch(*this, "soundlatch%u", 0), + m_aysnd(*this, "aysnd") { } void zodiack(machine_config &config); - void dogfight(machine_config &config); void percuss(machine_config &config); protected: @@ -133,18 +134,23 @@ class zodiack_state : public driver_device void irq_mask_w(uint8_t data); void sound_nmi_enable_w(uint8_t data); void control_w(uint8_t data); + void porta_w(offs_t offset, uint8_t data, uint8_t mem_mask); // devices required_device m_maincpu; required_device m_audiocpu; + required_device m_screen; required_device_array m_soundlatch; + required_device m_aysnd; // state uint8_t m_main_nmi_enabled = 0; uint8_t m_main_irq_enabled = 0; uint8_t m_sound_nmi_enabled = 0; + uint8_t m_sound_nmi_freq = 0; + emu_timer *m_sound_nmi_timer; - INTERRUPT_GEN_MEMBER(sound_nmi_gen); + TIMER_CALLBACK_MEMBER(sound_nmi_gen); void vblank(int state); void io_map(address_map &map) ATTR_COLD; @@ -152,6 +158,39 @@ class zodiack_state : public driver_device void sound_map(address_map &map) ATTR_COLD; }; + + +/************************************* + * + * Machine initialization + * + *************************************/ + +void zodiack_state::machine_start() +{ + save_item(NAME(m_main_nmi_enabled)); + save_item(NAME(m_main_irq_enabled)); + save_item(NAME(m_sound_nmi_enabled)); + save_item(NAME(m_sound_nmi_freq)); + + m_sound_nmi_timer = timer_alloc(FUNC(zodiack_state::sound_nmi_gen), this); +} + +void zodiack_state::machine_reset() +{ + m_main_nmi_enabled = 0; + m_main_irq_enabled = 0; + m_sound_nmi_enabled = 0; +} + + + +/************************************* + * + * Memory handlers + * + *************************************/ + void zodiack_state::nmi_mask_w(uint8_t data) { m_main_nmi_enabled = (data & 1) ^ 1; @@ -176,7 +215,7 @@ void zodiack_state::vblank(int state) m_maincpu->set_input_line(0, HOLD_LINE); } -INTERRUPT_GEN_MEMBER(zodiack_state::sound_nmi_gen) +TIMER_CALLBACK_MEMBER(zodiack_state::sound_nmi_gen) { if (m_sound_nmi_enabled) m_audiocpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero); @@ -190,6 +229,46 @@ void zodiack_state::control_w(uint8_t data) // Bit 2 - ???? } +void zodiack_state::porta_w(offs_t offset, uint8_t data, uint8_t mem_mask) +{ + if (mem_mask && data != m_sound_nmi_freq) + { + // sound NMI frequency + m_sound_nmi_freq = data; + attotime period; + + // dogfight writes 0xc0 and expects 4 NMIs per frame + // others write 0xe0 and expect 8 NMIs per frame + switch (data) + { + case 0: + period = attotime::never; + break; + + case 0xc0: + period = m_screen->frame_period() / 4; + break; + + case 0xe0: + period = m_screen->frame_period() / 8; + break; + + default: + logerror("%s: unknown sound NMI frequency %02X", machine().describe_context(), data); + return; + } + + m_sound_nmi_timer->adjust(period, 0, period); + } +} + + + +/************************************* + * + * Address maps + * + *************************************/ void zodiack_state::main_map(address_map &map) { @@ -224,11 +303,17 @@ void zodiack_state::sound_map(address_map &map) void zodiack_state::io_map(address_map &map) { map.global_mask(0xff); - map(0x00, 0x01).w("aysnd", FUNC(ay8910_device::address_data_w)); + map(0x00, 0x01).w(m_aysnd, FUNC(ay8910_device::address_data_w)); } +/************************************* + * + * Input ports + * + *************************************/ + static INPUT_PORTS_START( zodiack ) PORT_START("DSW0") // never read in this game PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) @@ -540,39 +625,30 @@ static INPUT_PORTS_START( bounty ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY INPUT_PORTS_END -void zodiack_state::machine_start() -{ - save_item(NAME(m_main_nmi_enabled)); - save_item(NAME(m_main_irq_enabled)); - save_item(NAME(m_sound_nmi_enabled)); -} - -void zodiack_state::machine_reset() -{ - m_main_nmi_enabled = 0; - m_main_irq_enabled = 0; - m_sound_nmi_enabled = 0; -} +/************************************* + * + * Machine configs + * + *************************************/ void zodiack_state::zodiack(machine_config &config) { // basic machine hardware - Z80(config, m_maincpu, XTAL(18'432'000) / 6); + Z80(config, m_maincpu, 18.432_MHz_XTAL / 6); m_maincpu->set_addrmap(AS_PROGRAM, &zodiack_state::main_map); - Z80(config, m_audiocpu, XTAL(18'432'000) / 6); + Z80(config, m_audiocpu, 18.432_MHz_XTAL / 6); m_audiocpu->set_addrmap(AS_PROGRAM, &zodiack_state::sound_map); m_audiocpu->set_addrmap(AS_IO, &zodiack_state::io_map); - m_audiocpu->set_periodic_int(FUNC(zodiack_state::sound_nmi_gen), attotime::from_hz(8 * 60)); // sound tempo - unknown source, timing is guessed config.set_maximum_quantum(attotime::from_hz(600)); WATCHDOG_TIMER(config, "watchdog"); // video hardware - SCREEN(config, "screen", SCREEN_TYPE_RASTER).screen_vblank().set(FUNC(zodiack_state::vblank)); + SCREEN(config, m_screen, SCREEN_TYPE_RASTER).screen_vblank().set(FUNC(zodiack_state::vblank)); orca_ovg_40c_device &videopcb(ORCA_OVG_40C(config, "videopcb", 0)); videopcb.set_screen("screen"); @@ -585,7 +661,8 @@ void zodiack_state::zodiack(machine_config &config) GENERIC_LATCH_8(config, m_soundlatch[1]); - AY8910(config, "aysnd", XTAL(18'432'000) / 12).add_route(ALL_OUTPUTS, "mono", 0.50); + AY8910(config, m_aysnd, 18.432_MHz_XTAL / 12).add_route(ALL_OUTPUTS, "mono", 0.50); + m_aysnd->port_a_write_callback().set(FUNC(zodiack_state::porta_w)); } void zodiack_state::percuss(machine_config &config) @@ -596,19 +673,13 @@ void zodiack_state::percuss(machine_config &config) videopcb.set_percuss_hardware(true); } -void zodiack_state::dogfight(machine_config &config) -{ - zodiack(config); - - m_audiocpu->set_periodic_int(FUNC(zodiack_state::sound_nmi_gen), attotime::from_hz(4 * 60)); // 4 interrupts per frame -} - - -/*************************************************************************** - Game driver(s) -***************************************************************************/ +/************************************* + * + * ROM definitions + * + *************************************/ ROM_START( zodiack ) ROM_REGION( 0x10000, "maincpu", 0 ) @@ -735,9 +806,16 @@ ROM_END } // anonymous namespace -GAME( 1983, zodiack, 0, zodiack, zodiack, zodiack_state, empty_init, ROT270, "Orca (Esco Trading Co., Inc. license)", "Zodiack", MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE ) // bullet color needs to be verified -GAME( 1983, dogfight, 0, dogfight, dogfight, zodiack_state, empty_init, ROT270, "Orca / Thunderbolt", "Dog Fight (Thunderbolt)", MACHINE_SUPPORTS_SAVE ) -GAME( 1982, moguchan, 0, percuss, moguchan, zodiack_state, empty_init, ROT270, "Orca (Eastern Commerce Inc. license)", "Mogu Chan (bootleg?)", MACHINE_WRONG_COLORS | MACHINE_SUPPORTS_SAVE ) // license copyright taken from ROM string at $0b5c -GAME( 1981, percuss, 0, percuss, percuss, zodiack_state, empty_init, ROT270, "Orca", "The Percussor", MACHINE_SUPPORTS_SAVE ) -GAME( 1982, bounty, 0, percuss, bounty, zodiack_state, empty_init, ROT180, "Orca", "The Bounty (set 1)", MACHINE_SUPPORTS_SAVE ) -GAME( 1982, bounty2, bounty, percuss, bounty, zodiack_state, empty_init, ROT180, "Orca", "The Bounty (set 2)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // seems to use a different memory map + +/************************************* + * + * Game driver(s) + * + *************************************/ + +GAME( 1983, zodiack, 0, zodiack, zodiack, zodiack_state, empty_init, ROT270, "Orca (Esco Trading Co., Inc. license)", "Zodiack", MACHINE_IMPERFECT_COLORS | MACHINE_SUPPORTS_SAVE ) // bullet color needs to be verified +GAME( 1983, dogfight, 0, zodiack, dogfight, zodiack_state, empty_init, ROT270, "Orca / Thunderbolt", "Dog Fight (Thunderbolt)", MACHINE_SUPPORTS_SAVE ) +GAME( 1982, moguchan, 0, percuss, moguchan, zodiack_state, empty_init, ROT270, "Orca (Eastern Commerce Inc. license)", "Mogu Chan (bootleg?)", MACHINE_WRONG_COLORS | MACHINE_SUPPORTS_SAVE ) // license copyright taken from ROM string at $0b5c +GAME( 1981, percuss, 0, percuss, percuss, zodiack_state, empty_init, ROT270, "Orca", "The Percussor", MACHINE_SUPPORTS_SAVE ) +GAME( 1982, bounty, 0, percuss, bounty, zodiack_state, empty_init, ROT180, "Orca", "The Bounty (set 1)", MACHINE_SUPPORTS_SAVE ) +GAME( 1982, bounty2, bounty, percuss, bounty, zodiack_state, empty_init, ROT180, "Orca", "The Bounty (set 2)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) // seems to use a different memory map diff --git a/src/mame/pacman/jrpacman.cpp b/src/mame/pacman/jrpacman.cpp index 8f3f2dd262c57..6b087b94fe7b0 100644 --- a/src/mame/pacman/jrpacman.cpp +++ b/src/mame/pacman/jrpacman.cpp @@ -115,7 +115,8 @@ class jrpacman_state : public pacman_state { public: jrpacman_state(const machine_config &mconfig, device_type type, const char *tag) - : pacman_state(mconfig, type, tag) { } + : pacman_state(mconfig, type, tag) + { } void jrpacman(machine_config &config); @@ -285,14 +286,14 @@ void jrpacman_state::jrpacman(machine_config &config) WATCHDOG_TIMER(config, m_watchdog); /* video hardware */ - screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_refresh_hz(60.606060); - screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */ - screen.set_size(36*8, 28*8); - screen.set_visarea(0*8, 36*8-1, 0*8, 28*8-1); - screen.set_screen_update(FUNC(jrpacman_state::screen_update_pacman)); - screen.set_palette(m_palette); - screen.screen_vblank().set(FUNC(jrpacman_state::vblank_irq)); + SCREEN(config, m_screen, SCREEN_TYPE_RASTER); + m_screen->set_refresh_hz(60.606060); + m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */ + m_screen->set_size(36*8, 28*8); + m_screen->set_visarea(0*8, 36*8-1, 0*8, 28*8-1); + m_screen->set_screen_update(FUNC(jrpacman_state::screen_update_pacman)); + m_screen->set_palette(m_palette); + m_screen->screen_vblank().set(FUNC(jrpacman_state::vblank_irq)); GFXDECODE(config, m_gfxdecode, m_palette, gfx_jrpacman); PALETTE(config, m_palette, FUNC(jrpacman_state::pacman_palette), 128 * 4, 32); diff --git a/src/mame/pacman/jumpshot.cpp b/src/mame/pacman/jumpshot.cpp index d140bf145d0c0..30f1be811f058 100644 --- a/src/mame/pacman/jumpshot.cpp +++ b/src/mame/pacman/jumpshot.cpp @@ -23,7 +23,6 @@ uint8_t pacman_state::jumpshot_decrypt(int addr, uint8_t e) uint32_t method = 0; const uint8_t *tbl; - /* pick method from bits 0 2 5 7 9 of the address */ method = picktable[ (addr & 0x001) | @@ -43,14 +42,10 @@ uint8_t pacman_state::jumpshot_decrypt(int addr, uint8_t e) void pacman_state::jumpshot_decode() { - int i; - uint8_t *RAM; - /* CPU ROMs */ - - RAM = memregion("maincpu")->base(); - for (i = 0; i < 0x4000; i++) + uint8_t *ROM = memregion("maincpu")->base(); + for (int i = 0; i < 0x4000; i++) { - RAM[i] = jumpshot_decrypt(i,RAM[i]); + ROM[i] = jumpshot_decrypt(i, ROM[i]); } } diff --git a/src/mame/pacman/pacman.cpp b/src/mame/pacman/pacman.cpp index 68ebff80a43cd..1b1403cf4ef0d 100644 --- a/src/mame/pacman/pacman.cpp +++ b/src/mame/pacman/pacman.cpp @@ -32,7 +32,6 @@ * Eeekk! TODO: - * Mystery items in Ali Baba don't work correctly because of protection. * mspactwin shows a green "0" in the corner on the PCB at tilescreen, but "18" on MAME. * mspactwin_map supposed ROM 0x2000 mirroring implementation doesn't make much sense, there's a bus conflict now @@ -554,33 +553,58 @@ void pacman_state::coin_lockout_global_w(int state) /************************************* * - * Ali Baba sound + * Ali Baba mystery item and sound * *************************************/ -void pacman_state::alibaba_sound_w(offs_t offset, uint8_t data) +void alibaba_state::machine_start() { - /* since the sound region in Ali Baba is not contiguous, translate the - offset into the 0-0x1f range */ - offset = (offset >> 1 & 0x10) | (offset & 0x0f); - m_namco_sound->pacman_sound_w(offset, data); + pacman_state::machine_start(); + + save_item(NAME(m_mystery_control)); + save_item(NAME(m_mystery_clock)); + save_item(NAME(m_mystery_prescaler)); +} + +void alibaba_state::mystery_tick(int state) +{ + if (state) + { + // increment clock every 64 frames (approx 1.05s) + m_mystery_prescaler = (m_mystery_prescaler + 1) & 0x3f; + + if (m_mystery_prescaler == 0 && m_mystery_control & 1) + m_mystery_clock = (m_mystery_clock + 1) & 0x1f; + } } -uint8_t pacman_state::alibaba_mystery_1_r() +uint8_t alibaba_state::mystery_1_r() { - /* The return value determines what the mystery item is. Each bit corresponds - to a question mark */ + // the return value determines what the mystery item is return machine().rand() & 0x0f; -// return m_maincpu->state_int(Z80_R) & 0x0f; } +uint8_t alibaba_state::mystery_2_r() +{ + // the single bit return value determines when the mystery is lit up + return (m_mystery_clock >= 24) ? 1 : 0; +} + +void alibaba_state::mystery_w(uint8_t data) +{ + // d0: start/stop clock + if ((m_mystery_control ^ data) & 1) + m_mystery_prescaler = m_mystery_clock = 0; + + // d1: show clock + m_mystery_control = data; +} -uint8_t pacman_state::alibaba_mystery_2_r() +void alibaba_state::sound_w(offs_t offset, uint8_t data) { - /* The single bit return value determines when the mystery is lit up. - This is certainly wrong */ - m_mystery++; - return (m_mystery >> 10) & 1; + // since the sound region is not contiguous, translate the offset into the 0-0x1f range + offset = (offset >> 1 & 0x10) | (offset & 0x0f); + m_namco_sound->pacman_sound_w(offset, data); } @@ -1027,7 +1051,7 @@ uint8_t pacman_state::pacman_read_nop() void pacman_state::pacman_map(address_map &map) { - //A lot of games don't have an a15 at the cpu. Generally only games with a cpu daughter board can access the full 32k of romspace. + // A lot of games don't have an a15 at the cpu. Generally only games with a cpu daughterboard can access the full 32k of romspace. map(0x0000, 0x3fff).mirror(0x8000).rom(); map(0x4000, 0x43ff).mirror(0xa000).ram().w(FUNC(pacman_state::pacman_videoram_w)).share("videoram"); map(0x4400, 0x47ff).mirror(0xa000).ram().w(FUNC(pacman_state::pacman_colorram_w)).share("colorram"); @@ -1208,28 +1232,28 @@ void pacman_state::numcrash_map(address_map &map) } -void pacman_state::alibaba_map(address_map &map) +void alibaba_state::alibaba_map(address_map &map) { map(0x0000, 0x3fff).rom(); - map(0x4000, 0x43ff).mirror(0xa000).ram().w(FUNC(pacman_state::pacman_videoram_w)).share("videoram"); - map(0x4400, 0x47ff).mirror(0xa000).ram().w(FUNC(pacman_state::pacman_colorram_w)).share("colorram"); - map(0x4800, 0x4bff).mirror(0xa000).r(FUNC(pacman_state::pacman_read_nop)).nopw(); + map(0x4000, 0x43ff).mirror(0xa000).ram().w(FUNC(alibaba_state::pacman_videoram_w)).share("videoram"); + map(0x4400, 0x47ff).mirror(0xa000).ram().w(FUNC(alibaba_state::pacman_colorram_w)).share("colorram"); + map(0x4800, 0x4bff).mirror(0xa000).r(FUNC(alibaba_state::pacman_read_nop)).nopw(); map(0x4c00, 0x4eef).mirror(0xa000).ram(); map(0x4ef0, 0x4eff).mirror(0xa000).ram().share("spriteram"); map(0x4f00, 0x4fff).mirror(0xa000).ram(); map(0x5000, 0x5007).mirror(0xaf38).w("latch1", FUNC(ls259_device::write_d0)); map(0x5000, 0x5000).mirror(0xaf38).w(m_watchdog, FUNC(watchdog_timer_device::reset_w)); - map(0x5040, 0x506f).mirror(0xaf00).w(FUNC(pacman_state::alibaba_sound_w)); /* the sound region is not contiguous */ + map(0x5040, 0x506f).mirror(0xaf00).w(FUNC(alibaba_state::sound_w)); /* the sound region is not contiguous */ map(0x5050, 0x505f).mirror(0xaf00).writeonly().share("spriteram2"); map(0x5070, 0x507f).mirror(0xaf00).nopw(); - map(0x5080, 0x5080).mirror(0xaf3f).nopw(); + map(0x5080, 0x5080).mirror(0xaf3f).w(FUNC(alibaba_state::mystery_w)); map(0x50c0, 0x50c7).mirror(0xaf00).w("latch2", FUNC(ls259_device::write_d0)); map(0x5000, 0x5000).mirror(0xaf3f).portr("IN0"); map(0x5040, 0x5040).mirror(0xaf3f).portr("IN1"); map(0x5080, 0x5080).mirror(0xaf3f).portr("DSW1"); - map(0x50c0, 0x50c0).mirror(0xaf00).r(FUNC(pacman_state::alibaba_mystery_1_r)); - map(0x50c1, 0x50c1).mirror(0xaf00).r(FUNC(pacman_state::alibaba_mystery_2_r)); - map(0x50c2, 0x50ff).mirror(0xaf00).r(FUNC(pacman_state::pacman_read_nop)); + map(0x50c0, 0x50c0).mirror(0xaf00).r(FUNC(alibaba_state::mystery_1_r)); + map(0x50c1, 0x50c1).mirror(0xaf00).r(FUNC(alibaba_state::mystery_2_r)); + map(0x50c2, 0x50ff).mirror(0xaf00).r(FUNC(alibaba_state::pacman_read_nop)); map(0x8000, 0x8fff).rom(); map(0x9000, 0x93ff).mirror(0x0c00).ram(); map(0xa000, 0xa7ff).mirror(0x1800).rom(); @@ -1418,7 +1442,6 @@ void pacman_state::crushs_map(address_map &map) } - void pacman_state::pengojpm_map(address_map &map) { map(0x0000, 0x0fff).rom(); @@ -3562,52 +3585,71 @@ INPUT_PORTS_END static const gfx_layout tilelayout = { - 8,8, /* 8*8 characters */ - RGN_FRAC(1,2), /* 256 characters */ - 2, /* 2 bits per pixel */ - { 0, 4 }, /* the two bitplanes for 4 pixels are packed into one byte */ - { 8*8+0, 8*8+1, 8*8+2, 8*8+3, 0, 1, 2, 3 }, /* bits are packed in groups of four */ + 8,8, // 8*8 characters + RGN_FRAC(1,2), // 256 characters + 2, // 2 bits per pixel + { 0, 4 }, // the two bitplanes for 4 pixels are packed into one byte + { 8*8+0, 8*8+1, 8*8+2, 8*8+3, 0, 1, 2, 3 }, // bits are packed in groups of four { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, - 16*8 /* every char takes 16 bytes */ + 16*8 // every char takes 16 bytes }; static const gfx_layout spritelayout = { - 16,16, /* 16*16 sprites */ - RGN_FRAC(1,2), /* 64 sprites */ - 2, /* 2 bits per pixel */ - { 0, 4 }, /* the two bitplanes for 4 pixels are packed into one byte */ + 16,16, // 16*16 sprites + RGN_FRAC(1,2), // 64 sprites + 2, // 2 bits per pixel + { 0, 4 }, // the two bitplanes for 4 pixels are packed into one byte { 8*8, 8*8+1, 8*8+2, 8*8+3, 16*8+0, 16*8+1, 16*8+2, 16*8+3, 24*8+0, 24*8+1, 24*8+2, 24*8+3, 0, 1, 2, 3 }, { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, 32*8, 33*8, 34*8, 35*8, 36*8, 37*8, 38*8, 39*8 }, - 64*8 /* every sprite takes 64 bytes */ + 64*8 // every sprite takes 64 bytes +}; + + +static const gfx_layout alibaba_clocklayout = +{ + 24,16, // 24*16 characters + RGN_FRAC(1,2), + 2, + { RGN_FRAC(1,2), RGN_FRAC(0,2) }, + { + 16*8+7, 16*8+6, 16*8+5, 16*8+4, 16*8+3, 16*8+2, 16*8+1, 16*8+0, + 8*8+7, 8*8+6, 8*8+5, 8*8+4, 8*8+3, 8*8+2, 8*8+1, 8*8+0, + 0*8+7, 0*8+6, 0*8+5, 0*8+4, 0*8+3, 0*8+2, 0*8+1, 0*8+0 + }, + { + 256+0*8, 256+1*8, 256+2*8, 256+3*8, 256+4*8, 256+5*8, 256+6*8, 256+7*8, + 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 + }, + 32*16 // every char takes 64 bytes }; static const gfx_layout crush4_tilelayout = { - 8,8, /* 8*8 characters */ + 8,8, // 8*8 characters RGN_FRAC(1,4), - 2, /* 2 bits per pixel */ + 2, // 2 bits per pixel { RGN_FRAC(1,2), RGN_FRAC(0,2)+4 }, - { 8*8+0, 8*8+1, 8*8+2, 8*8+3, 0, 1, 2, 3 }, /* bits are packed in groups of four */ + { 8*8+0, 8*8+1, 8*8+2, 8*8+3, 0, 1, 2, 3 }, // bits are packed in groups of four { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, - 16*8 /* every char takes 16 bytes */ + 16*8 // every char takes 16 bytes }; static const gfx_layout crush4_spritelayout = { - 16,16, /* 16*16 sprites */ + 16,16, // 16*16 sprites RGN_FRAC(1,4), - 2, /* 2 bits per pixel */ + 2, // 2 bits per pixel { RGN_FRAC(1,2), RGN_FRAC(0,2)+4 }, { 8*8, 8*8+1, 8*8+2, 8*8+3, 16*8+0, 16*8+1, 16*8+2, 16*8+3, 24*8+0, 24*8+1, 24*8+2, 24*8+3, 0, 1, 2, 3 }, { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, 32*8, 33*8, 34*8, 35*8, 36*8, 37*8, 38*8, 39*8 }, - 64*8 /* every sprite takes 64 bytes */ + 64*8 // every sprite takes 64 bytes }; @@ -3623,6 +3665,13 @@ static GFXDECODE_START( gfx_s2650games ) GFXDECODE_END +static GFXDECODE_START( gfx_alibaba ) + GFXDECODE_ENTRY( "gfx1", 0x0000, tilelayout, 0, 128 ) + GFXDECODE_ENTRY( "gfx1", 0x1000, spritelayout, 0, 128 ) + GFXDECODE_ENTRY( "gfx2", 0x0000, alibaba_clocklayout, 0, 128 ) +GFXDECODE_END + + static GFXDECODE_START( gfx_superabc ) GFXDECODE_ENTRY( "gfx1", 0x0000, tilelayout, 0, 128 ) GFXDECODE_ENTRY( "gfx1", 0x8000, spritelayout, 0, 128 ) @@ -3672,11 +3721,11 @@ void pacman_state::pacman(machine_config &config, bool latch) PALETTE(config, m_palette, FUNC(pacman_state::pacman_palette), 128*4, 32); - screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_raw(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART); - screen.set_screen_update(FUNC(pacman_state::screen_update_pacman)); - screen.set_palette("palette"); - screen.screen_vblank().set(FUNC(pacman_state::vblank_irq)); + SCREEN(config, m_screen, SCREEN_TYPE_RASTER); + m_screen->set_raw(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART); + m_screen->set_screen_update(FUNC(pacman_state::screen_update_pacman)); + m_screen->set_palette("palette"); + m_screen->screen_vblank().set(FUNC(pacman_state::vblank_irq)); MCFG_VIDEO_START_OVERRIDE(pacman_state,pacman) @@ -3814,23 +3863,29 @@ void pacman_state::numcrash(machine_config &config) m_mainlatch->q_out_cb<7>().set_nop(); // ??? } -void pacman_state::alibaba(machine_config &config) +void alibaba_state::alibaba(machine_config &config) { pacman(config, false); // Basic machine hardware - m_maincpu->set_addrmap(AS_PROGRAM, &pacman_state::alibaba_map); + m_maincpu->set_addrmap(AS_PROGRAM, &alibaba_state::alibaba_map); ls259_device &latch1(LS259(config, "latch1")); latch1.q_out_cb<4>().set_output("led0"); latch1.q_out_cb<5>().set_output("led1"); - latch1.q_out_cb<6>().set(FUNC(pacman_state::coin_lockout_global_w)); - latch1.q_out_cb<7>().set(FUNC(pacman_state::coin_counter_w)); + latch1.q_out_cb<6>().set(FUNC(alibaba_state::coin_lockout_global_w)); + latch1.q_out_cb<7>().set(FUNC(alibaba_state::coin_counter_w)); ls259_device &latch2(LS259(config, "latch2")); latch2.q_out_cb<0>().set("namco", FUNC(namco_device::sound_enable_w)); - latch2.q_out_cb<1>().set(FUNC(pacman_state::flipscreen_w)); - latch2.q_out_cb<2>().set(FUNC(pacman_state::irq_mask_w)); + latch2.q_out_cb<1>().set(FUNC(alibaba_state::flipscreen_w)); + latch2.q_out_cb<2>().set(FUNC(alibaba_state::irq_mask_w)); + + // Video hardware + m_gfxdecode->set_info(gfx_alibaba); + + m_screen->set_screen_update(FUNC(alibaba_state::screen_update)); + m_screen->screen_vblank().append(FUNC(alibaba_state::mystery_tick)); } void pacman_state::dremshpr(machine_config &config) @@ -3842,7 +3897,7 @@ void pacman_state::dremshpr(machine_config &config) m_maincpu->set_addrmap(AS_IO, &pacman_state::dremshpr_portmap); m_maincpu->remove_irq_acknowledge_callback(); - subdevice("screen")->screen_vblank().set(FUNC(pacman_state::vblank_nmi)); + m_screen->screen_vblank().set(FUNC(pacman_state::vblank_nmi)); // Sound hardware config.device_remove("namco"); @@ -3902,9 +3957,8 @@ void pacman_state::vanvan(machine_config &config) m_maincpu->remove_irq_acknowledge_callback(); // Video hardware - screen_device &screen(*subdevice("screen")); - screen.set_visarea(2*8, 34*8-1, 0*8, 28*8-1); - screen.screen_vblank().set(FUNC(pacman_state::vblank_nmi)); + m_screen->set_visarea(2*8, 34*8-1, 0*8, 28*8-1); + m_screen->screen_vblank().set(FUNC(pacman_state::vblank_nmi)); // Sound hardware config.device_remove("namco"); @@ -3928,7 +3982,7 @@ void pacman_state::bigbucks(machine_config &config) m_maincpu->set_periodic_int(FUNC(pacman_state::periodic_irq), attotime::from_hz(20*60)); m_maincpu->remove_irq_acknowledge_callback(); - subdevice("screen")->set_visarea(0*8, 36*8-1, 0*8, 28*8-1); + m_screen->set_visarea(0*8, 36*8-1, 0*8, 28*8-1); m_mainlatch->q_out_cb<7>().set_nop(); /*?*/ } @@ -3956,12 +4010,11 @@ void pacman_state::s2650games(machine_config &config) m_gfxdecode->set_info(gfx_s2650games); - screen_device &screen(*subdevice("screen")); - screen.set_size(32*8, 32*8); - screen.set_visarea(0*8, 32*8-1, 2*8, 30*8-1); - screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */ - screen.set_screen_update(FUNC(pacman_state::screen_update_s2650games)); - screen.screen_vblank().set(FUNC(pacman_state::s2650_interrupt)); + m_screen->set_size(32*8, 32*8); + m_screen->set_visarea(0*8, 32*8-1, 2*8, 30*8-1); + m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */ + m_screen->set_screen_update(FUNC(pacman_state::screen_update_s2650games)); + m_screen->screen_vblank().set(FUNC(pacman_state::s2650_interrupt)); MCFG_VIDEO_START_OVERRIDE(pacman_state,s2650games) @@ -4005,8 +4058,7 @@ void pacman_state::rocktrv2(machine_config &config) // Basic machine hardware m_maincpu->set_addrmap(AS_PROGRAM, &pacman_state::rocktrv2_map); - screen_device &screen(*subdevice("screen")); - screen.set_visarea(0*8, 36*8-1, 0*8, 28*8-1); + m_screen->set_visarea(0*8, 36*8-1, 0*8, 28*8-1); } @@ -4106,13 +4158,12 @@ ROM_START( puckman ) ROM_LOAD( "pm1-1.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) // 82s123 ROM_LOAD( "pm1-4.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) // 82s126 - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "pm1-3.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) // 82s126 ROM_LOAD( "pm1-2.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // 82s126 - timing - not used ROM_END - ROM_START( pacmanso ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "pm-1r.6e", 0x0000, 0x0800, CRC(76dbed21) SHA1(400e5821aef77c9bb7117b7703afff911786d55a) ) // different @@ -4134,7 +4185,7 @@ ROM_START( pacmanso ) ROM_LOAD( "pm1-1.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) // 82s123 ROM_LOAD( "pm1-4.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) // 82s126 - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "pm1-3.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) // 82s126 ROM_LOAD( "pm1-2.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // 82s126 - timing - not used ROM_END @@ -4188,7 +4239,7 @@ ROM_START( pacmanpe ) ROM_LOAD( "pm1-1.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) // 82s123 ROM_LOAD( "pm1-4.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) // 82s126 - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "pm1-3.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) // 82s126 ROM_LOAD( "pm1-2.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // 82s126 - timing - not used ROM_END @@ -4208,9 +4259,9 @@ ROM_START( puckmanb ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s126.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END @@ -4229,9 +4280,9 @@ ROM_START( puckmanf ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s126.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END @@ -4250,9 +4301,9 @@ ROM_START( puckmod ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s126.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END @@ -4271,9 +4322,9 @@ ROM_START( pacman ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s126.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END @@ -4292,9 +4343,9 @@ ROM_START( pacmanf ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s126.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END @@ -4313,9 +4364,9 @@ ROM_START( pacmod ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s126.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END @@ -4336,9 +4387,9 @@ ROM_START( pacmansp ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s126.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END /* @@ -4371,7 +4422,7 @@ ROM_START( mspacmanbg ) ROM_LOAD( "82s123.h7", 0x0000, 0x0020, CRC(3545e7e9) SHA1(b866b02579438afb11296e5c53a32c6425bd044d) ) // slightly different to original (verified) ROM_LOAD( "82s129-3.d1", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) // == 82s126.4a - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s129-1.a9", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) // == 82s126.1m ROM_LOAD( "82s129-2.c9", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used // == 82s126.3m ROM_END @@ -4392,7 +4443,7 @@ ROM_START( mspacmanbg2 ) ROM_LOAD( "82s123.h7", 0x0000, 0x0020, BAD_DUMP CRC(3545e7e9) SHA1(b866b02579438afb11296e5c53a32c6425bd044d) ) ROM_LOAD( "82s129-3.d1", 0x0020, 0x0100, BAD_DUMP CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs, not dumped for this set + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs, not dumped for this set ROM_LOAD( "82s129-1.a9", 0x0000, 0x0100, BAD_DUMP CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) ROM_LOAD( "82s129-2.c9", 0x0100, 0x0100, BAD_DUMP CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) ROM_END @@ -4418,7 +4469,7 @@ ROM_START( mspacmanbi ) // very similar to mspacmanbg ROM_LOAD( "82s123.h7", 0x0000, 0x0020, BAD_DUMP CRC(3545e7e9) SHA1(b866b02579438afb11296e5c53a32c6425bd044d) ) ROM_LOAD( "82s129-3.d1", 0x0020, 0x0100, BAD_DUMP CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs, not dumped for this set + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs, not dumped for this set ROM_LOAD( "82s129-1.a9", 0x0000, 0x0100, BAD_DUMP CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) ROM_LOAD( "82s129-2.c9", 0x0100, 0x0100, BAD_DUMP CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) ROM_END @@ -4439,7 +4490,7 @@ ROM_START( mspacmanbgd ) ROM_LOAD( "82s123.h7", 0x0000, 0x0020, CRC(3545e7e9) SHA1(b866b02579438afb11296e5c53a32c6425bd044d) ) // slightly different to original (verified) ROM_LOAD( "82s129-3.d1", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) // == 82s126.4a - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s129-1.a9", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) // == 82s126.1m ROM_LOAD( "82s129-2.c9", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used // == 82s126.3m ROM_END @@ -4460,7 +4511,7 @@ ROM_START( mspacmanbco ) ROM_LOAD( "82s123.h7", 0x0000, 0x0020, CRC(3545e7e9) SHA1(b866b02579438afb11296e5c53a32c6425bd044d) ) // slightly different to original (verified) ROM_LOAD( "82s129-3.d1", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) // == 82s126.4a - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s129-1.a9", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) // == 82s126.1m ROM_LOAD( "82s129-2.c9", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used // == 82s126.3m ROM_END @@ -4480,7 +4531,7 @@ ROM_START( mspacmanblt ) ROM_LOAD( "82s123.h7", 0x0000, 0x0020, CRC(3545e7e9) SHA1(b866b02579438afb11296e5c53a32c6425bd044d) ) ROM_LOAD( "82s129-3.d1", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s129-1.a9", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) ROM_LOAD( "82s129-2.c9", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) ROM_END @@ -4522,7 +4573,7 @@ ROM_START( mspacmanbcc ) ROM_LOAD( "82s123.h7", 0x0000, 0x0020, CRC(3545e7e9) SHA1(b866b02579438afb11296e5c53a32c6425bd044d) ) // slightly different to original (verified) ROM_LOAD( "82s129-3.d1", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) // == 82s126.4a - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s129-1.a9", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) // == 82s126.1m ROM_LOAD( "82s129-2.c9", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used // == 82s126.3m ROM_END @@ -4564,7 +4615,7 @@ ROM_START( mspacmanbhe ) ROM_LOAD( "82s123.h7", 0x0000, 0x0020, CRC(3545e7e9) SHA1(b866b02579438afb11296e5c53a32c6425bd044d) ) // slightly different to original (verified) ROM_LOAD( "82s129-3.d1", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) // == 82s126.4a - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s129-1.a9", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) // == 82s126.1m ROM_LOAD( "82s129-2.c9", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used // == 82s126.3m ROM_END @@ -4585,7 +4636,7 @@ ROM_START( mspacmanbgc ) ROM_LOAD( "82s123.h7", 0x0000, 0x0020, CRC(3545e7e9) SHA1(b866b02579438afb11296e5c53a32c6425bd044d) ) // slightly different to original (verified) ROM_LOAD( "82s129-3.d1", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) // == 82s126.4a - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s129-1.a9", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) // == 82s126.1m ROM_LOAD( "82s129-2.c9", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used // == 82s126.3m ROM_END @@ -4735,9 +4786,9 @@ ROM_START( clubpacm ) ROM_LOAD( "n82s123n.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "m7611.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "m7611.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "m7611.3m", 0x0100, 0x0100, CRC(0e307106) SHA1(6140b5339008dd3110cd5be2e2fb4813779dfe28) ) // Timing - not used + ROM_LOAD( "m7611.3m", 0x0100, 0x0100, CRC(0e307106) SHA1(6140b5339008dd3110cd5be2e2fb4813779dfe28) ) // Timing - not used ROM_END ROM_START( clubpacma ) @@ -4758,9 +4809,9 @@ ROM_START( clubpacma ) ROM_LOAD( "n82s123n.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "m7611.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "m7611.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "m7611.3m", 0x0100, 0x0100, CRC(0e307106) SHA1(6140b5339008dd3110cd5be2e2fb4813779dfe28) ) // Timing - not used + ROM_LOAD( "m7611.3m", 0x0100, 0x0100, CRC(0e307106) SHA1(6140b5339008dd3110cd5be2e2fb4813779dfe28) ) // Timing - not used ROM_END @@ -4804,15 +4855,15 @@ ROM_START( mspacmanhnc ) ROM_LOAD( "6f.bin", 0x0000, 0x8000, CRC(db164116) SHA1(e5b16b37e765ee46681b1d565c67d3eda94cd0f1) ) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_COPY( "bigeprom", 0x0000, 0x0000, 0x1000 ) // copy segment to 0000-0fff - ROM_COPY( "bigeprom", 0x2000, 0x1000, 0x1000 ) // copy segment to 1000-1fff - ROM_COPY( "bigeprom", 0x6000, 0x2000, 0x1000 ) // copy segment to 2000-2fff - ROM_COPY( "bigeprom", 0x7000, 0x3000, 0x1000 ) // copy segment to 3000-3fff - ROM_COPY( "bigeprom", 0x1000, 0x8000, 0x1000 ) // copy segment to 8000-8fff - ROM_COPY( "bigeprom", 0x3000, 0x9000, 0x0800 ) // copy segment to 9000-97ff + ROM_COPY( "bigeprom", 0x0000, 0x0000, 0x1000 ) // copy segment to 0000-0fff + ROM_COPY( "bigeprom", 0x2000, 0x1000, 0x1000 ) // copy segment to 1000-1fff + ROM_COPY( "bigeprom", 0x6000, 0x2000, 0x1000 ) // copy segment to 2000-2fff + ROM_COPY( "bigeprom", 0x7000, 0x3000, 0x1000 ) // copy segment to 3000-3fff + ROM_COPY( "bigeprom", 0x1000, 0x8000, 0x1000 ) // copy segment to 8000-8fff + ROM_COPY( "bigeprom", 0x3000, 0x9000, 0x0800 ) // copy segment to 9000-97ff ROM_REGION( 0x2000, "gfx1", 0 ) -// ROM_COPY( "bigeprom", 0x4000, 0x0000, 0x2000 ) // copy segments to 0000-1fff, same GFX set of the GFX EPROMs +// ROM_COPY( "bigeprom", 0x4000, 0x0000, 0x2000 ) // copy segments to 0000-1fff, same GFX set of the GFX EPROMs ROM_LOAD( "5e.bin", 0x0000, 0x0800, CRC(93933d1d) SHA1(fa38d2cb87e872bb9a3158a4df98f38360dc85ec) ) ROM_LOAD( "5h.bin", 0x0800, 0x0800, CRC(7409fbec) SHA1(f440f08ba026ae6172666e1bdc0894ce33bba420) ) ROM_LOAD( "5f.bin", 0x1000, 0x0800, CRC(22b0188a) SHA1(a9ed9ca8b36a60081fd364abc9bc23963932cc0b) ) @@ -4823,9 +4874,9 @@ ROM_START( mspacmanhnc ) ROM_LOAD( "82s123-cpu.7f", 0x0000, 0x0020, BAD_DUMP CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s129-vid.4a", 0x0020, 0x0100, BAD_DUMP CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s129-vid.1m", 0x0000, 0x0100, BAD_DUMP CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s129-vid.3m", 0x0100, 0x0100, BAD_DUMP CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s129-vid.3m", 0x0100, 0x0100, BAD_DUMP CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END @@ -5224,7 +5275,7 @@ ROM_END *****************************************************************************/ ROM_START( mspactwin ) - ROM_REGION( 0x10000, "maincpu", 0 ) // 64k for encrypted code + ROM_REGION( 0x10000, "maincpu", 0 ) // 64k for encrypted code ROM_LOAD( "m27256.bin", 0x0000, 0x4000, CRC(77a99184) SHA1(9dcb1a1b78994aa401d653bec571cb3e6f9d900b) ) ROM_CONTINUE(0x8000,0x4000) @@ -5238,7 +5289,7 @@ ROM_START( mspactwin ) ROM_LOAD( "mb7051.8h", 0x0000, 0x0020, CRC(ff344446) SHA1(45eb37533da8912645a089b014f3b3384702114a) ) ROM_LOAD( "82s129.4a", 0x0020, 0x0100, CRC(a8202d0d) SHA1(2a615211c33f3ef75af14e4bbedd2a700100be29) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "mb7052.1k", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) ROM_LOAD( "82s129.3k", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) ROM_END @@ -5251,13 +5302,13 @@ ROM_END m27256.bin [1/4] 6_db.u4 [1/4] 16.503906% */ ROM_START( mspactwina ) - ROM_REGION( 0x10000, "maincpu", 0 ) // 64k for encrypted code + ROM_REGION( 0x10000, "maincpu", 0 ) // 64k for encrypted code ROM_LOAD( "6_db.u4", 0x0000, 0x4000, CRC(a0fb55ba) SHA1(ad591aa6511600f4687b7c4e70882d87386c9fb9) ) ROM_CONTINUE(0x8000,0x4000) ROM_REGION( 0x2000, "gfx1", 0 ) ROM_LOAD( "1.5e", 0x0000, 0x0800, CRC(483c1d1c) SHA1(d3b967c6a71cf02b825d800f56d5268f2e0e60eb) ) - ROM_LOAD( "3.5h", 0x0800, 0x0800, CRC(703912f5) SHA1(03f5d7b30bacabf388fdcfa13fe6a5b0e3027fe7) ) // this ROM has additional tiles + ROM_LOAD( "3.5h", 0x0800, 0x0800, CRC(703912f5) SHA1(03f5d7b30bacabf388fdcfa13fe6a5b0e3027fe7) ) // this ROM has additional tiles ROM_LOAD( "2.5f", 0x1000, 0x0800, CRC(22b0188a) SHA1(a9ed9ca8b36a60081fd364abc9bc23963932cc0b) ) ROM_LOAD( "4.5j", 0x1800, 0x0800, CRC(0a8c46a0) SHA1(e38e9e3258ab26fcbc6fdf258844e364f4b165ab) ) @@ -5265,7 +5316,7 @@ ROM_START( mspactwina ) ROM_LOAD( "mb7051.8h", 0x0000, 0x0020, CRC(ff344446) SHA1(45eb37533da8912645a089b014f3b3384702114a) ) ROM_LOAD( "82s129.4a", 0x0020, 0x0100, CRC(a8202d0d) SHA1(2a615211c33f3ef75af14e4bbedd2a700100be29) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "mb7052.1k", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) ROM_LOAD( "82s129.3k", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) ROM_END @@ -5286,9 +5337,9 @@ ROM_START( hangly ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s126.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END @@ -5309,9 +5360,9 @@ ROM_START( hangly2 ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s126.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END ROM_START( hangly3 ) @@ -5335,9 +5386,9 @@ ROM_START( hangly3 ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s126.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END // PCB marked KPM-II @@ -5360,7 +5411,7 @@ ROM_START( baracuda ) ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END ROM_START( popeyeman ) @@ -5384,9 +5435,9 @@ ROM_START( popeyeman ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s126.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END ROM_START( crockman ) @@ -5410,9 +5461,9 @@ ROM_START( crockman ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s126.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END /* Bootleg from Marti Colls (Falgas) of Crock-Man. @@ -5440,9 +5491,9 @@ ROM_START( crockmnf ) ROM_LOAD( "82s126.4a", 0x0020, 0x0100, BAD_DUMP CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) // Undumped on the Marti Colls PCB, taken from the parent set - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, BAD_DUMP CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, BAD_DUMP CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, BAD_DUMP CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END ROM_START( puckmana ) // Alca bootleg @@ -5466,9 +5517,9 @@ ROM_START( puckmana ) // Alca bootleg ROM_LOAD( "mb7051.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "6301.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "6301.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "6301.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "6301.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END ROM_START( puckmanh ) @@ -5488,9 +5539,9 @@ ROM_START( puckmanh ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s126.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END @@ -5509,9 +5560,9 @@ ROM_START( newpuckx ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s126.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END @@ -5536,9 +5587,9 @@ ROM_START( pacheart ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s126.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END ROM_START( pacmanjpm ) @@ -5562,9 +5613,9 @@ ROM_START( pacmanjpm ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s126.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END ROM_START( pacmanmr ) // PCB is marked "PAC/M" on component side @@ -5588,9 +5639,9 @@ ROM_START( pacmanmr ) // PCB is marked "PAC/M" on component side ROM_LOAD( "pacm.8h", 0x0000, 0x0020, CRC(2c3cc909) SHA1(32d68d4cfdf9f3e7351353428d268c763e809c63) ) ROM_LOAD( "pacm.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "pacm.1m", 0x0000, 0x0100, CRC(3cb61034) SHA1(2f24b88839aee107a0ac1064f8bc4853933f5205) ) - ROM_LOAD( "pacm.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "pacm.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END // this bootleg on Pacman hardware has half as many tiles as the original and some gfx / animations @@ -5616,9 +5667,9 @@ ROM_START( pengojpm ) ROM_LOAD( "pr1633.78", 0x0000, 0x0020, CRC(3a5844ec) SHA1(680eab0e1204c9b74adc11588461651b474021bb) ) // Color palette ROM_LOAD( "pr1634.88", 0x0020, 0x0400, CRC(766b139b) SHA1(3fcd66610fcaee814953a115bf5e04788923181f) ) // Color lookup - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END ROM_START( pengopac ) @@ -5639,9 +5690,9 @@ ROM_START( pengopac ) ROM_LOAD( "pr1633.78", 0x0000, 0x0020, CRC(3a5844ec) SHA1(680eab0e1204c9b74adc11588461651b474021bb) ) // Color palette ROM_LOAD( "pengopac.4a", 0x0020, 0x0100, CRC(ef283be2) SHA1(6d616348c06d08f3ffbe875a40036a2453cb45ad) ) // Color lookup - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END /* Marti Colls bootleg (set 1). @@ -5702,7 +5753,7 @@ ROM_START( pengomc2 ) // identical to pengojpm, but maincpu ROMs content was rea ROM_LOAD( "pr1634.88", 0x0020, 0x0400, BAD_DUMP CRC(766b139b) SHA1(3fcd66610fcaee814953a115bf5e04788923181f) ) // Color lookup // Undumped on the Marti Colls PCB, taken from "pengojpm" set - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, BAD_DUMP CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) ROM_LOAD( "82s126.3m", 0x0100, 0x0100, BAD_DUMP CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END @@ -5725,9 +5776,9 @@ ROM_START( pinguinos ) ROM_LOAD( "pr1633.78", 0x0000, 0x0020, BAD_DUMP CRC(3a5844ec) SHA1(680eab0e1204c9b74adc11588461651b474021bb) ) // Color palette ROM_LOAD( "pengopac.4a", 0x0020, 0x0100, BAD_DUMP CRC(ef283be2) SHA1(6d616348c06d08f3ffbe875a40036a2453cb45ad) ) // Color lookup - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, BAD_DUMP CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, BAD_DUMP CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, BAD_DUMP CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END ROM_START( bucaner ) @@ -5751,9 +5802,9 @@ ROM_START( bucaner ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s126.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END ROM_START( bucanera ) @@ -5777,9 +5828,9 @@ ROM_START( bucanera ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s126.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END ROM_START( joyman ) @@ -5803,9 +5854,9 @@ ROM_START( joyman ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s126.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END // There is a 10 page Service Manual with basic wiring schematics for Titan in German claiming copyright by NSM - Apparatebau GmbH & Co. @@ -5833,7 +5884,7 @@ ROM_START( titanpac ) // GDP-01 main PCB with GDP-02 auxiliary card (same as Pir ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END /* Bootleg from Spanish company "FAMARE S.A.". Board labeled "FAMARESA 560-002" @@ -5861,7 +5912,7 @@ ROM_START( pacmanfm ) ROM_LOAD( "pm1-4.4a", 0x0020, 0x0100, BAD_DUMP CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) // 82s126 // Undumped on the Famaresa PCB, taken from the parent set - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "pm1-3.1m", 0x0000, 0x0100, BAD_DUMP CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) // 82s126 ROM_LOAD( "pm1-2.3m", 0x0100, 0x0100, BAD_DUMP CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // 82s126 - timing - not used ROM_END @@ -5888,7 +5939,7 @@ ROM_START( pacmanug ) ROM_LOAD( "sig82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "mmi6301-1j.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "mmi6301-1j.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) ROM_LOAD( "mmi63s141j.3m", 0x0100, 0x0100, CRC(deadc015) SHA1(751029630dcfef61dc834203eaffaf6afc7d83fc) ) ROM_END @@ -5916,7 +5967,7 @@ ROM_START( piranha ) // GDP-01 main PCB with GDP-02 auxiliary card ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END ROM_START( piranhao ) // GDP-01 main PCB with GDP-02 auxiliary card @@ -5942,7 +5993,7 @@ ROM_START( piranhao ) // GDP-01 main PCB with GDP-02 auxiliary card ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END ROM_START( piranhah ) @@ -5962,9 +6013,9 @@ ROM_START( piranhah ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s126.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END ROM_START( abscam ) @@ -5990,7 +6041,7 @@ ROM_START( abscam ) ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END ROM_START( mspacmab3 ) // main PCB with GDP-02 auxiliary card @@ -6016,7 +6067,7 @@ ROM_START( mspacmab3 ) // main PCB with GDP-02 auxiliary card ROM_REGION( 0x0200, "namco", 0 ) // sound PROMs ROM_LOAD( "63s141.1k", 0x0000, 0x0100, CRC(459d2618) SHA1(14ba61caada575909b4dbd57e7342dc84722325d) ) ROM_IGNORE( 0x0100 ) // 1xxxxxxxx = 0x00 - ROM_LOAD( "63s141.3k", 0x0100, 0x0100, CRC(fcc24d5d) SHA1(7ae2523f92cccdbd8db8bda80c613a2f90220807) ) // timing - not used + ROM_LOAD( "63s141.3k", 0x0100, 0x0100, CRC(fcc24d5d) SHA1(7ae2523f92cccdbd8db8bda80c613a2f90220807) ) // Timing - not used ROM_IGNORE( 0x0100 ) // 11xxxxxxx = 0x00 ROM_REGION( 0x0200, "gdp02_prom", 0 ) // currently not used by the emulation @@ -6046,7 +6097,7 @@ ROM_START( ctrpllrp ) ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END @@ -6065,9 +6116,9 @@ ROM_START( pacplus ) ROM_LOAD( "pacplus.7f", 0x0000, 0x0020, CRC(063dd53a) SHA1(2e43b46ec3b101d1babab87cdaddfa944116ec06) ) ROM_LOAD( "pacplus.4a", 0x0020, 0x0100, CRC(e271a166) SHA1(cf006536215a7a1d488eebc1d8a2e2a8134ce1a6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END @@ -6089,13 +6140,13 @@ ROM_START( mspacman ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s126.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END -ROM_START( mspacmancr ) // Bootleg on Crush Roller Board - Midway Graphics and Namco mentions are gone but Easter Egg still works +ROM_START( mspacmancr ) // Bootleg on Crush Roller Board - Midway Graphics and Namco mentions are gone but Easter Egg still works ROM_REGION( 0x20000, "maincpu", 0 ) // 64k for code+64k for decrypted code ROM_LOAD( "pacman.6e", 0x0000, 0x1000, CRC(c1e6ab10) SHA1(e87e059c5be45753f7e9f33dff851f16d6751181) ) // a.6e ROM_LOAD( "pacman.6f", 0x1000, 0x1000, CRC(1a6fb2d4) SHA1(674d3a7f00d8be5e38b1fdc208ebef5a92d38329) ) // b.6f @@ -6113,9 +6164,9 @@ ROM_START( mspacmancr ) // Bootleg on Crush Roller Board - Midway Graphics and ROM_LOAD( "mb7051.7f", 0x0000, 0x0020, CRC(ff344446) SHA1(45eb37533da8912645a089b014f3b3384702114a) ) ROM_LOAD( "82s126.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) // m82s129n.4a - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) // 7052.1m - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // 7052.3m // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // 7052.3m // Timing - not used ROM_END @@ -6137,9 +6188,9 @@ ROM_START( mspacmnf ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s126.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END @@ -6160,9 +6211,9 @@ ROM_START( mspacmab ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s126.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END @@ -6180,9 +6231,9 @@ ROM_START( mspacmab2 ) ROM_LOAD( "tbp18s030_p1.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "pac.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "63s141.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "63s141.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_REGION( 0x0100, "plds", 0 ) ROM_LOAD( "82s153.d", 0x0000, 0x00eb, CRC(0294d8bc) SHA1(7b66d39c464ee2a3f7a659bf066d2ebb487605fd) ) @@ -6229,9 +6280,9 @@ ROM_START( mspacmbe ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s126.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END // Marti Colls (Falgas) bootleg @@ -6255,9 +6306,9 @@ ROM_START( mspacmbmc ) ROM_LOAD( "82s126.4a", 0x0020, 0x0100, BAD_DUMP CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) // Undumped on the Marti Colls PCB, taken from the parent set - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, BAD_DUMP CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, BAD_DUMP CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, BAD_DUMP CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END ROM_START( mspacii ) @@ -6277,9 +6328,9 @@ ROM_START( mspacii ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s126.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END @@ -6300,9 +6351,9 @@ ROM_START( mspacii2 ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s126.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END @@ -6324,9 +6375,9 @@ ROM_START( mspacmat ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s126.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END @@ -6349,9 +6400,9 @@ ROM_START( msheartb ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s126.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END @@ -6372,9 +6423,9 @@ ROM_START( mspacpls ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s126.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END // This is a bootleg Ms. Pac-Man auxiliary board that displays "Miss Packman Plus" at the title screen and @@ -6406,9 +6457,9 @@ ROM_START( mspackpls ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s126.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END ROM_START( mspacmanlai ) @@ -6430,9 +6481,9 @@ ROM_START( mspacmanlai ) ROM_LOAD( "82s123-cpu.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s129-vid.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s129-vid.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s129-vid.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s129-vid.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END ROM_START( mspacmane ) @@ -6454,9 +6505,9 @@ ROM_START( mspacmane ) ROM_LOAD( "8h", 0x0000, 0x0020, CRC(2c3cc909) SHA1(32d68d4cfdf9f3e7351353428d268c763e809c63) ) ROM_LOAD( "4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "1m", 0x0000, 0x0100, CRC(0922b031) SHA1(1eb9e1f8e6b027ca80a0ee0b391d4e904e9ea49b) ) - ROM_LOAD( "3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END ROM_START( mspacmane2 ) // G-GA-2 + G-GB-2 PCBs @@ -6478,9 +6529,9 @@ ROM_START( mspacmane2 ) // G-GA-2 + G-GB-2 PCBs ROM_LOAD( "8h", 0x0000, 0x0020, BAD_DUMP CRC(2c3cc909) SHA1(32d68d4cfdf9f3e7351353428d268c763e809c63) ) ROM_LOAD( "4a", 0x0020, 0x0100, BAD_DUMP CRC(4c8e83a4) SHA1(e522cbc6c14bc481f2e97f1a7224c66bb283f553) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs, not provided for this set + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs, not provided for this set ROM_LOAD( "1m", 0x0000, 0x0100, BAD_DUMP CRC(7b1f9b71) SHA1(5ef72bbdfb72db3eb1175fed652a761938eeb6cd) ) - ROM_LOAD( "3m", 0x0100, 0x0100, BAD_DUMP CRC(05197026) SHA1(9b71fb175331bbc12e43441ecfad75b633e2f953) ) // Timing - not used + ROM_LOAD( "3m", 0x0100, 0x0100, BAD_DUMP CRC(05197026) SHA1(9b71fb175331bbc12e43441ecfad75b633e2f953) ) // Timing - not used ROM_END ROM_START( pacgal ) @@ -6501,9 +6552,9 @@ ROM_START( pacgal ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s129.4a", 0x0020, 0x0100, CRC(63efb927) SHA1(5c144a613fc4960a1dfd7ead89e7fee258a63171) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END ROM_START( pacgal2 ) @@ -6528,11 +6579,11 @@ ROM_START( pacgal2 ) ROM_REGION( 0x0120, "proms", 0 ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) - ROM_LOAD( "82s126.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) // 7611p4.4a + ROM_LOAD( "82s126.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) // 7611p4.4a - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END // Main PCB H-P1, with Novatronic NVS sub PCB with main CPU ROMs, marked Novatronic and 1982 @@ -6584,7 +6635,7 @@ ROM_END ROM_START( mschamp ) // "Original" Zola-Puc board. FORCE ELECTRONICS KM-001 PCB copyright by RAYGLO MFG CO 1992/1993 ROM_REGION( 0x20000, "maincpu", 0 ) - ROM_LOAD( "9fg.bin", 0x10000, 0x10000, CRC(04dba113) SHA1(6260fb58c47a506a60385fb7536fc4fbd8e02c7c) ) // Banked + ROM_LOAD( "9fg.bin", 0x10000, 0x10000, CRC(04dba113) SHA1(6260fb58c47a506a60385fb7536fc4fbd8e02c7c) ) // Banked ROM_REGION( 0x2000, "gfx1", 0 ) ROM_LOAD( "8e.bin", 0x0000, 0x0800, CRC(17435f53) SHA1(e844a7dfdb56a6f6cce5a3cf505d018434294470) ) @@ -6604,7 +6655,7 @@ ROM_END ROM_START( mschamps ) // Hack of hack??? Hack of the above "Rayglo" set??? ROM_REGION( 0x20000, "maincpu", 0 ) - ROM_LOAD( "pm4.bin", 0x10000, 0x10000, CRC(7d6b6303) SHA1(65ad72a9188422653c02a48c07ed2661e1e36961) ) // Banked + ROM_LOAD( "pm4.bin", 0x10000, 0x10000, CRC(7d6b6303) SHA1(65ad72a9188422653c02a48c07ed2661e1e36961) ) // Banked ROM_REGION( 0x2000, "gfx1", 0 ) ROM_LOAD( "pm5.bin", 0x0000, 0x0800, CRC(7fe6b9e2) SHA1(bfd0d84c7ef909ae078d8f60340682b3ff230aa6) ) @@ -6624,45 +6675,45 @@ ROM_END ROM_START( superabc ) ROM_REGION( 0x80000, "maincpu", 0 ) - ROM_LOAD( "superabc.u14", 0x00000, 0x80000, CRC(a560efe6) SHA1(c7d43cc3bb3b1b10d06403462276231bfc8542dd) ) // Banked + ROM_LOAD( "superabc.u14", 0x00000, 0x80000, CRC(a560efe6) SHA1(c7d43cc3bb3b1b10d06403462276231bfc8542dd) ) // Banked ROM_REGION( 0x10000, "gfx1", ROMREGION_ERASE00 ) // descrambled rom goes here ROM_REGION( 0x20000, "user1", 0 ) ROM_LOAD( "char5e5f.u1", 0x00000, 0x20000, CRC(45caace0) SHA1(f850bd09ec68b0263ac8b30ae38c3878c7978ace) ) - ROM_REGION( 0x0120, "proms", 0 ) // Color PROMs + ROM_REGION( 0x0120, "proms", 0 ) // Color PROMs ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(3a188666) SHA1(067386e477ce48bbde3cf71f744a78a42238d236) ) ROM_LOAD( "82s129.4a", 0x0020, 0x0100, CRC(4382c049) SHA1(5e535b1a6852260f38ae1e5cd57290a85cb6927f) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_REGION( 0x0020, "unknown", 0 ) - ROM_LOAD( "82s123.u18", 0x0000, 0x0020, CRC(23b2863c) SHA1(e62f87d2145e94be06dbd90fa8d9a79760bfcc4b) ) // PROM on daughterboard, unknown function + ROM_LOAD( "82s123.u18", 0x0000, 0x0020, CRC(23b2863c) SHA1(e62f87d2145e94be06dbd90fa8d9a79760bfcc4b) ) // PROM on daughterboard, unknown function ROM_END ROM_START( superabco ) ROM_REGION( 0x80000, "maincpu", 0 ) - ROM_LOAD( "superabco.u14", 0x00000, 0x80000, CRC(62565ad8) SHA1(cb434c608ee463788b73152d84ce6173bdfa350d) ) // Banked + ROM_LOAD( "superabco.u14", 0x00000, 0x80000, CRC(62565ad8) SHA1(cb434c608ee463788b73152d84ce6173bdfa350d) ) // Banked ROM_REGION( 0x10000, "gfx1", ROMREGION_ERASE00 ) // descrambled rom goes here ROM_REGION( 0x20000, "user1", 0 ) ROM_LOAD( "char5e5f.u1", 0x00000, 0x20000, CRC(45caace0) SHA1(f850bd09ec68b0263ac8b30ae38c3878c7978ace) ) - ROM_REGION( 0x0120, "proms", 0 ) // Color PROMs + ROM_REGION( 0x0120, "proms", 0 ) // Color PROMs ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(3a188666) SHA1(067386e477ce48bbde3cf71f744a78a42238d236) ) ROM_LOAD( "82s129.4a", 0x0020, 0x0100, CRC(4382c049) SHA1(5e535b1a6852260f38ae1e5cd57290a85cb6927f) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_REGION( 0x0020, "unknown", 0 ) - ROM_LOAD( "82s123.u18", 0x0000, 0x0020, CRC(23b2863c) SHA1(e62f87d2145e94be06dbd90fa8d9a79760bfcc4b) ) // PROM on daughterboard, unknown function + ROM_LOAD( "82s123.u18", 0x0000, 0x0020, CRC(23b2863c) SHA1(e62f87d2145e94be06dbd90fa8d9a79760bfcc4b) ) // PROM on daughterboard, unknown function ROM_END @@ -6681,9 +6732,9 @@ ROM_START( crush ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "2s140.4a", 0x0020, 0x0100, CRC(63efb927) SHA1(5c144a613fc4960a1dfd7ead89e7fee258a63171) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END @@ -6703,9 +6754,9 @@ ROM_START( crushbl ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "2s140.4a", 0x0020, 0x0100, CRC(63efb927) SHA1(5c144a613fc4960a1dfd7ead89e7fee258a63171) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END ROM_START( crushbl2 ) @@ -6718,16 +6769,16 @@ ROM_START( crushbl2 ) ROM_REGION( 0x2000, "gfx1", 0 ) ROM_LOAD( "cr1.5e", 0x0000, 0x0800, CRC(c7617198) SHA1(95b204af0345163f93811cc770ee0ca2851a39c1) ) ROM_LOAD( "cr3.5h", 0x0800, 0x0800, CRC(c15b6967) SHA1(d8f16e2d6af5bf0f610d1e23614c531f67490da9) ) - ROM_LOAD( "cr2.5f", 0x1000, 0x0800, CRC(d5bc5cb8) SHA1(269b82ae2b838c72ae06bff77412f22bb779ad2e) ) // Copyright sign was removed + ROM_LOAD( "cr2.5f", 0x1000, 0x0800, CRC(d5bc5cb8) SHA1(269b82ae2b838c72ae06bff77412f22bb779ad2e) ) // Copyright sign was removed ROM_LOAD( "cr4.5j", 0x1800, 0x0800, CRC(d35d1caf) SHA1(65dd7861e05651485626465dc97215fed58db551) ) ROM_REGION( 0x0120, "proms", 0 ) ROM_LOAD( "74s288.8a", 0x0000, 0x0020, CRC(ff344446) SHA1(45eb37533da8912645a089b014f3b3384702114a) ) ROM_LOAD( "2s140.4a", 0x0020, 0x0100, CRC(63efb927) SHA1(5c144a613fc4960a1dfd7ead89e7fee258a63171) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END ROM_START( crushbl3 ) @@ -6740,23 +6791,23 @@ ROM_START( crushbl3 ) ROM_REGION( 0x2000, "gfx1", 0 ) ROM_LOAD( "cr1.5e", 0x0000, 0x0800, CRC(c7617198) SHA1(95b204af0345163f93811cc770ee0ca2851a39c1) ) ROM_LOAD( "cr3.5h", 0x0800, 0x0800, CRC(c15b6967) SHA1(d8f16e2d6af5bf0f610d1e23614c531f67490da9) ) - ROM_LOAD( "cr2.5f", 0x1000, 0x0800, CRC(d5bc5cb8) SHA1(269b82ae2b838c72ae06bff77412f22bb779ad2e) ) // Copyright sign was removed + ROM_LOAD( "cr2.5f", 0x1000, 0x0800, CRC(d5bc5cb8) SHA1(269b82ae2b838c72ae06bff77412f22bb779ad2e) ) // Copyright sign was removed ROM_LOAD( "cr4.5j", 0x1800, 0x0800, CRC(d35d1caf) SHA1(65dd7861e05651485626465dc97215fed58db551) ) // the set with the above 'crushbl3' program roms and these gfx roms just seems to be a bad dump (some bad maze tiles?) // ROM_REGION( 0x2000, "gfx1", 0 ) // ROM_LOAD( "cr1.bin", 0x0000, 0x0800, CRC(cc31c649) SHA1(a0640d2abc21872b0e680e8e31e3bcb7e7a07953) ) // ROM_LOAD( "cr3.bin", 0x0800, 0x0800, CRC(14c121d8) SHA1(05f900a2e2a67401ab357340c1fb36153f365f1b) ) -// ROM_LOAD( "cr2.bin", 0x1000, 0x0800, CRC(882dc667) SHA1(5ea01d9c692b3061a0e39e2227fbc6af4baaab11) ) // Copyright sign was removed +// ROM_LOAD( "cr2.bin", 0x1000, 0x0800, CRC(882dc667) SHA1(5ea01d9c692b3061a0e39e2227fbc6af4baaab11) ) // Copyright sign was removed // ROM_LOAD( "cr4.bin", 0x1800, 0x0800, CRC(0d3877c4) SHA1(0a6f4098181480aa85225324129e37bba375252d) ) ROM_REGION( 0x0120, "proms", 0 ) ROM_LOAD( "74s288.8a", 0x0000, 0x0020, CRC(ff344446) SHA1(45eb37533da8912645a089b014f3b3384702114a) ) ROM_LOAD( "2s140.4a", 0x0020, 0x0100, CRC(63efb927) SHA1(5c144a613fc4960a1dfd7ead89e7fee258a63171) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END ROM_START( crush2 ) @@ -6780,30 +6831,29 @@ ROM_START( crush2 ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "2s140.4a", 0x0020, 0x0100, CRC(63efb927) SHA1(5c144a613fc4960a1dfd7ead89e7fee258a63171) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END ROM_START( crushrlf ) ROM_REGION( 0x10000, "maincpu", 0 ) - - ROM_LOAD( "pin1cc_6e.bin", 0x0400, 0x0400, CRC(65e469cf) SHA1(baeb5ba0ca0d78bca07f7830269f9c079f36d425) ) - ROM_CONTINUE(0x0000,0x0400) - ROM_LOAD( "pin5cc_6k.bin", 0x0c00, 0x0400, CRC(15f0415b) SHA1(90c663387a81ad206874a531d9fe631ac0175975) ) - ROM_CONTINUE(0x0800,0x0400) - ROM_LOAD( "pin2cc_6f.bin", 0x1400, 0x0400, CRC(653f726d) SHA1(3121315cf3e8be86d29687f29fc514e29dc64a02) ) - ROM_CONTINUE(0x1000,0x400) - ROM_LOAD( "pin6cc_6m.bin", 0x1c00, 0x0400, CRC(4536ea5b) SHA1(6e0b22dd05a76644b13f1c71f771d686cd411eea) ) - ROM_CONTINUE(0x1800,0x400) - ROM_LOAD( "pin3cc_6h.bin", 0x2400, 0x0400, CRC(55e15863) SHA1(bcbf4e5a268739c906e5c400e639e0e055799d47) ) - ROM_CONTINUE(0x2000,0x400) - ROM_LOAD( "pin7cc_6n.bin", 0x2c00, 0x0400, CRC(409111ec) SHA1(ba98cfc1cce8627d11fda4954c3776d0b90cb584) ) - ROM_CONTINUE(0x2800,0x400) - ROM_LOAD( "pin4cc_6j.bin", 0x3400, 0x0400, CRC(4fc4b582) SHA1(cb73b5f9171ba493afdfced0baeef9bb6bdb428d) ) - ROM_CONTINUE(0x3000,0x400) - ROM_LOAD( "pin8cc_6p.bin", 0x3c00, 0x0400, CRC(0d97a047) SHA1(d0024a87a7530246bfbef7d1603b599e2f168973) ) - ROM_CONTINUE(0x3800,0x400) + ROM_LOAD( "pin1cc_6e.bin", 0x0400, 0x0400, CRC(65e469cf) SHA1(baeb5ba0ca0d78bca07f7830269f9c079f36d425) ) + ROM_CONTINUE( 0x0000, 0x0400 ) + ROM_LOAD( "pin5cc_6k.bin", 0x0c00, 0x0400, CRC(15f0415b) SHA1(90c663387a81ad206874a531d9fe631ac0175975) ) + ROM_CONTINUE( 0x0800, 0x0400 ) + ROM_LOAD( "pin2cc_6f.bin", 0x1400, 0x0400, CRC(653f726d) SHA1(3121315cf3e8be86d29687f29fc514e29dc64a02) ) + ROM_CONTINUE( 0x1000, 0x0400 ) + ROM_LOAD( "pin6cc_6m.bin", 0x1c00, 0x0400, CRC(4536ea5b) SHA1(6e0b22dd05a76644b13f1c71f771d686cd411eea) ) + ROM_CONTINUE( 0x1800, 0x0400 ) + ROM_LOAD( "pin3cc_6h.bin", 0x2400, 0x0400, CRC(55e15863) SHA1(bcbf4e5a268739c906e5c400e639e0e055799d47) ) + ROM_CONTINUE( 0x2000, 0x0400 ) + ROM_LOAD( "pin7cc_6n.bin", 0x2c00, 0x0400, CRC(409111ec) SHA1(ba98cfc1cce8627d11fda4954c3776d0b90cb584) ) + ROM_CONTINUE( 0x2800, 0x0400 ) + ROM_LOAD( "pin4cc_6j.bin", 0x3400, 0x0400, CRC(4fc4b582) SHA1(cb73b5f9171ba493afdfced0baeef9bb6bdb428d) ) + ROM_CONTINUE( 0x3000, 0x0400 ) + ROM_LOAD( "pin8cc_6p.bin", 0x3c00, 0x0400, CRC(0d97a047) SHA1(d0024a87a7530246bfbef7d1603b599e2f168973) ) + ROM_CONTINUE( 0x3800, 0x0400 ) ROM_REGION( 0x2000, "gfx1", 0 ) ROM_LOAD( "pin9cc_5e.bin", 0x0000, 0x0800, CRC(b6551507) SHA1(a544e6afda0dd1bea526cb94b9c456d923054698)) @@ -6815,9 +6865,9 @@ ROM_START( crushrlf ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "2s140.4a", 0x0020, 0x0100, CRC(63efb927) SHA1(5c144a613fc4960a1dfd7ead89e7fee258a63171) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END ROM_START( crush3 ) @@ -6835,9 +6885,9 @@ ROM_START( crush3 ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(ff344446) SHA1(45eb37533da8912645a089b014f3b3384702114a) ) // sldh w/crush4 ROM_LOAD( "82s129.4a", 0x0020, 0x0100, CRC(63efb927) SHA1(5c144a613fc4960a1dfd7ead89e7fee258a63171) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s129.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s129.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s129.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END ROM_START( crush4 ) @@ -6861,15 +6911,15 @@ ROM_START( crush4 ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) // sldh w/crush3 ROM_LOAD( "2s140.4a", 0x0020, 0x0100, CRC(63efb927) SHA1(5c144a613fc4960a1dfd7ead89e7fee258a63171) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END ROM_START( crush5 ) ROM_REGION( 0x20000, "maincpu", 0 ) - ROM_LOAD( "crtwt.2", 0x10000, 0x10000, CRC(adbd21f7) SHA1(984b005cd7a73f697715ecb7a4d806024cb7596d) ) // Banked + ROM_LOAD( "crtwt.2", 0x10000, 0x10000, CRC(adbd21f7) SHA1(984b005cd7a73f697715ecb7a4d806024cb7596d) ) // Banked ROM_REGION( 0x4000, "gfx1", 0 ) ROM_LOAD( "crtwt.1", 0x0000, 0x0800, CRC(4250a9ea) SHA1(496a368afcf09c09205f7d0882320d2022e6fc98) ) @@ -6885,9 +6935,9 @@ ROM_START( crush5 ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s129.bin", 0x0020, 0x0100, CRC(2bc5d339) SHA1(446e234df94d9ef34c3191877bb33dd775acfdf5) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END @@ -6906,9 +6956,9 @@ ROM_START( maketrax ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "2s140.4a", 0x0020, 0x0100, CRC(63efb927) SHA1(5c144a613fc4960a1dfd7ead89e7fee258a63171) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END @@ -6927,9 +6977,9 @@ ROM_START( maketrxb ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "2s140.4a", 0x0020, 0x0100, CRC(63efb927) SHA1(5c144a613fc4960a1dfd7ead89e7fee258a63171) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END ROM_START( korosuke ) @@ -6947,9 +6997,9 @@ ROM_START( korosuke ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "2s140.4a", 0x0020, 0x0100, CRC(63efb927) SHA1(5c144a613fc4960a1dfd7ead89e7fee258a63171) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END @@ -6963,16 +7013,16 @@ ROM_START( mbrush ) ROM_REGION( 0x2000, "gfx1", 0 ) ROM_LOAD( "tpa", 0x0000, 0x0800, CRC(c7617198) SHA1(95b204af0345163f93811cc770ee0ca2851a39c1) ) ROM_LOAD( "mbrush.5h", 0x0800, 0x0800, CRC(c15b6967) SHA1(d8f16e2d6af5bf0f610d1e23614c531f67490da9) ) - ROM_LOAD( "mbrush.5f", 0x1000, 0x0800, CRC(d5bc5cb8) SHA1(269b82ae2b838c72ae06bff77412f22bb779ad2e) ) // Copyright sign was removed + ROM_LOAD( "mbrush.5f", 0x1000, 0x0800, CRC(d5bc5cb8) SHA1(269b82ae2b838c72ae06bff77412f22bb779ad2e) ) // Copyright sign was removed ROM_LOAD( "tpd", 0x1800, 0x0800, CRC(d35d1caf) SHA1(65dd7861e05651485626465dc97215fed58db551) ) ROM_REGION( 0x0120, "proms", 0 ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "2s140.4a", 0x0020, 0x0100, CRC(63efb927) SHA1(5c144a613fc4960a1dfd7ead89e7fee258a63171) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END @@ -6990,16 +7040,16 @@ ROM_START( paintrlr ) ROM_REGION( 0x2000, "gfx1", 0 ) ROM_LOAD( "tpa", 0x0000, 0x0800, CRC(c7617198) SHA1(95b204af0345163f93811cc770ee0ca2851a39c1) ) ROM_LOAD( "mbrush.5h", 0x0800, 0x0800, CRC(c15b6967) SHA1(d8f16e2d6af5bf0f610d1e23614c531f67490da9) ) - ROM_LOAD( "mbrush.5f", 0x1000, 0x0800, CRC(d5bc5cb8) SHA1(269b82ae2b838c72ae06bff77412f22bb779ad2e) ) // Copyright sign was removed + ROM_LOAD( "mbrush.5f", 0x1000, 0x0800, CRC(d5bc5cb8) SHA1(269b82ae2b838c72ae06bff77412f22bb779ad2e) ) // Copyright sign was removed ROM_LOAD( "tpd", 0x1800, 0x0800, CRC(d35d1caf) SHA1(65dd7861e05651485626465dc97215fed58db551) ) ROM_REGION( 0x0120, "proms", 0 ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "2s140.4a", 0x0020, 0x0100, CRC(63efb927) SHA1(5c144a613fc4960a1dfd7ead89e7fee258a63171) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END // PCB is marked: "CRUSH ROLLER" on component side @@ -7015,7 +7065,7 @@ ROM_START( painter ) ROM_REGION( 0x2000, "gfx1", 0 ) ROM_LOAD( "pain5.5e", 0x0000, 0x1000, CRC(bd819afc) SHA1(2e8762c3c480aa669f7e87651ddfdbb965ea4211) ) - ROM_LOAD( "pain6.5f", 0x1000, 0x1000, BAD_DUMP CRC(014e5ed3) SHA1(8e01c640457515da89723215b19684ceb4556997) ) // BADADDR xx-xxxxxxxxx, dumped with 3 different programmers with same result, but probably damaged ROM + ROM_LOAD( "pain6.5f", 0x1000, 0x1000, BAD_DUMP CRC(014e5ed3) SHA1(8e01c640457515da89723215b19684ceb4556997) ) // BADADDR xx-xxxxxxxxx, dumped with 3 different programmers with same result, but probably damaged ROM ROM_REGION( 0x0120, "proms", 0 ) ROM_LOAD( "mb7051.7f", 0x0000, 0x0020, CRC(ff344446) SHA1(45eb37533da8912645a089b014f3b3384702114a) ) @@ -7023,7 +7073,7 @@ ROM_START( painter ) ROM_REGION( 0x0200, "namco", 0 ) ROM_LOAD( "mb7052.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "mb7052.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "mb7052.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END /* @@ -7084,9 +7134,9 @@ ROM_START( ponpoko ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s126.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END @@ -7109,9 +7159,9 @@ ROM_START( ponpokov ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s126.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END @@ -7134,9 +7184,9 @@ ROM_START( candory ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s126.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END ROM_START( eyes ) @@ -7154,9 +7204,9 @@ ROM_START( eyes ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s129.4a", 0x0020, 0x0100, CRC(d8d78829) SHA1(19820d1651423210083a087fb70ebea73ad34951) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END @@ -7168,16 +7218,16 @@ ROM_START( eyes2 ) ROM_LOAD( "g38204.7h", 0x3000, 0x1000, CRC(cf038276) SHA1(bcf4e129a151e2245e630cf865ce6cb009b405a5) ) ROM_REGION( 0x2000, "gfx1", 0 ) - ROM_LOAD( "g38205.5d", 0x0000, 0x1000, CRC(03b1b4c7) SHA1(a90b2fbaee2888ee4f0bcdf80a069c8594ef5ea1) ) // This one has a (c) sign + ROM_LOAD( "g38205.5d", 0x0000, 0x1000, CRC(03b1b4c7) SHA1(a90b2fbaee2888ee4f0bcdf80a069c8594ef5ea1) ) // This one has a (c) sign ROM_LOAD( "g38206.5e", 0x1000, 0x1000, CRC(a42b5201) SHA1(2e5cede3b6039c7bd5230de27d02aaa3f35a7b64) ) ROM_REGION( 0x0120, "proms", 0 ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s129.4a", 0x0020, 0x0100, CRC(d8d78829) SHA1(19820d1651423210083a087fb70ebea73ad34951) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END @@ -7202,7 +7252,7 @@ ROM_START( eyesb ) ROM_LOAD( "7051.bin", 0x0000, 0x0020, CRC(2c3cc909) SHA1(32d68d4cfdf9f3e7351353428d268c763e809c63) ) // fixed 3x bytes with inverse second half ROM_LOAD( "7051-3.bin", 0x0020, 0x0100, CRC(d8d78829) SHA1(19820d1651423210083a087fb70ebea73ad34951) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) // not dumped, taken from parent ROM_LOAD( "7051-2.bin", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // two of these? ROM_END @@ -7223,7 +7273,7 @@ ROM_START( eyeszac ) // All ROMs / PROMs dumped and verified from actual PCB ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s129.4a", 0x0020, 0x0100, CRC(d8d78829) SHA1(19820d1651423210083a087fb70ebea73ad34951) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) ROM_END @@ -7253,9 +7303,9 @@ ROM_START( eyeszacb ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s129.4a", 0x0020, 0x0100, CRC(d8d78829) SHA1(19820d1651423210083a087fb70ebea73ad34951) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END @@ -7297,9 +7347,9 @@ ROM_START( birdiy ) ROM_LOAD( "n82s123n.10n", 0x0000, 0x0020, CRC(ff344446) SHA1(45eb37533da8912645a089b014f3b3384702114a) ) ROM_LOAD( "n82s129n.9m", 0x0020, 0x0100, CRC(63efb927) SHA1(5c144a613fc4960a1dfd7ead89e7fee258a63171) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "n82s129n.4k", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "n82s129n.6l", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "n82s129n.6l", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END @@ -7318,9 +7368,9 @@ ROM_START( mrtnt ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s126.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m" , 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END ROM_START( gorkans ) @@ -7344,9 +7394,9 @@ ROM_START( gorkans ) ROM_LOAD( "gorkprom.4", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "gorkprom.1", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "gorkprom.3", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "gorkprom.2" , 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "gorkprom.2", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END ROM_START( eggor ) @@ -7372,9 +7422,9 @@ ROM_START( eggor ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, BAD_DUMP CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s126.4a", 0x0020, 0x0100, BAD_DUMP CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END ROM_START( lizwiz ) @@ -7394,9 +7444,9 @@ ROM_START( lizwiz ) ROM_LOAD( "7f.cpu", 0x0000, 0x0020, CRC(7549a947) SHA1(4f2c3e7d6c38f0b9a90317f91feb3f86c9a0d0a5) ) ROM_LOAD( "4a.cpu", 0x0020, 0x0100, CRC(5fdca536) SHA1(3a09b29374031aaa3722932aff974a467b3bb201) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m" , 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END @@ -7414,9 +7464,9 @@ ROM_START( theglobp ) // Pac-Man PCB conversion kit. Includes a small daughterca ROM_LOAD( "7 f the glob.7f", 0x0000, 0x0020, CRC(1f617527) SHA1(448845cab63800a05fcb106897503d994377f78f) ) // Actual label: 7 F THE GLOB (black dot preceeds "THE") ROM_LOAD( "4 a the glob.4a", 0x0020, 0x0100, CRC(28faa769) SHA1(7588889f3102d4e0ca7918f536556209b2490ea1) ) // Actual label: 7 F THE GLOB (black dot preceeds "THE") - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m" , 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END ROM_START( theglobpa ) @@ -7440,7 +7490,7 @@ ROM_START( theglobpa ) ROM_LOAD( "tbp18s030.8h", 0x0000, 0x0020, CRC(1f617527) SHA1(448845cab63800a05fcb106897503d994377f78f) ) ROM_LOAD( "82s129.4a", 0x0020, 0x0100, CRC(28faa769) SHA1(7588889f3102d4e0ca7918f536556209b2490ea1) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "63s141.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) ROM_LOAD( "63s141.3m", 0x0100, 0x0100, CRC(2ee34ade) SHA1(7cd43283b9648feb9a15466212b7a480fad20a39) ) // Timing - not used @@ -7462,9 +7512,9 @@ ROM_START( sprglobp ) ROM_LOAD( "7 f the glob.7f", 0x0000, 0x0020, CRC(1f617527) SHA1(448845cab63800a05fcb106897503d994377f78f) ) ROM_LOAD( "4 a the glob.4a", 0x0020, 0x0100, CRC(28faa769) SHA1(7588889f3102d4e0ca7918f536556209b2490ea1) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m" , 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END // A second dump exists. It has half sized program ROMs. The blister was missing 2 ROMs. @@ -7484,9 +7534,9 @@ ROM_START( sprglobp2 ) ROM_LOAD( "7 f the glob.7f", 0x0000, 0x0020, BAD_DUMP CRC(1f617527) SHA1(448845cab63800a05fcb106897503d994377f78f) ) ROM_LOAD( "4 a the glob.4a", 0x0020, 0x0100, BAD_DUMP CRC(28faa769) SHA1(7588889f3102d4e0ca7918f536556209b2490ea1) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs, not dumped for this set + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs, not dumped for this set ROM_LOAD( "82s126.1m", 0x0000, 0x0100, BAD_DUMP CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m" , 0x0100, 0x0100, BAD_DUMP CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, BAD_DUMP CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END /* This set is from a modified Pengo board. Pengo and Pacman are functionally the same. @@ -7505,9 +7555,9 @@ ROM_START( sprglbpg ) ROM_LOAD( "ic78.prm", 0x0000, 0x0020, CRC(1f617527) SHA1(448845cab63800a05fcb106897503d994377f78f) ) ROM_LOAD( "ic88.prm", 0x0020, 0x0100, CRC(28faa769) SHA1(7588889f3102d4e0ca7918f536556209b2490ea1) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "ic51.prm", 0x0000, 0x0100, CRC(c29dea27) SHA1(563c9770028fe39188e62630711589d6ed242a66) ) - ROM_LOAD( "ic70.prm" , 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "ic70.prm", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END // 2 PCB set (G-GA-2 and G-GB-2). It was modified to use one 27128 instead of eight 2716 for the program ROMs. @@ -7525,9 +7575,9 @@ ROM_START( theglobme ) ROM_LOAD( "n82s123an_a.7f", 0x0000, 0x0020, CRC(1f617527) SHA1(448845cab63800a05fcb106897503d994377f78f) ) ROM_LOAD( "n82s129n_b.4a", 0x0020, 0x0100, CRC(28faa769) SHA1(7588889f3102d4e0ca7918f536556209b2490ea1) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs, Harris 63S141J + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs, Harris 63S141J ROM_LOAD( "63s141_b.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "63s141_b.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "63s141_b.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END @@ -7547,9 +7597,9 @@ ROM_START( beastfp ) ROM_LOAD( "7_f_the_glob.7f", 0x0000, 0x0020, CRC(1f617527) SHA1(448845cab63800a05fcb106897503d994377f78f) ) ROM_LOAD( "4_a_the_glob.4a", 0x0020, 0x0100, CRC(28faa769) SHA1(7588889f3102d4e0ca7918f536556209b2490ea1) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m" , 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END @@ -7569,7 +7619,7 @@ ROM_START( eeekkp ) // Pac-Man PCB conversion kit. Includes a small daughtercard ROM_LOAD( "7_f_eeekk.7f", 0x0000, 0x0020, CRC(c64c8a53) SHA1(55e7b88cb1ce129e8154722a489d76c38924d3f1) ) // 82s123 ROM_LOAD( "4_a_eeekk.4a", 0x0020, 0x0100, CRC(a5044ded) SHA1(566bd06674bf8069dc633102493c9991b64e4379) ) // 82s126 - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) // 82s126 ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // 82s126 - timing - not used ROM_END @@ -7663,17 +7713,17 @@ ROM_START( alibaba ) ROM_LOAD( "5f", 0x1000, 0x0800, CRC(b5715c86) SHA1(ed6aee778295b0182d32846b5e41776b5b15420c) ) ROM_LOAD( "5k", 0x1800, 0x0800, CRC(713086b3) SHA1(a1609bae637207a82920678f05bcc10a5ff096de) ) + ROM_REGION( 0x1000, "gfx2", 0 ) + ROM_LOAD( "ab7.bin", 0x0000, 0x0800, CRC(52294ef5) SHA1(1d76e16c95cb2873d898a4151a902113fccafe1c) ) // 7.p6 dumped as 0x1000 - 1ST AND 2ND HALF IDENTICAL + ROM_RELOAD( 0x0800, 0x0800 ) + ROM_REGION( 0x0120, "proms", 0 ) ROM_LOAD( "82s123.e7", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s129.a4", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used - - // Unknown, used for the mystery items? - ROM_REGION( 0x1000, "user1", 0 ) - ROM_LOAD( "ab7.bin", 0x0000, 0x0800, CRC(52294ef5) SHA1(1d76e16c95cb2873d898a4151a902113fccafe1c) ) // 7.p6 dumped as 0x1000 - 1ST AND 2ND HALF IDENTICAL + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END @@ -7692,17 +7742,17 @@ ROM_START( alibabab ) ROM_LOAD( "5f", 0x1000, 0x0800, CRC(b5715c86) SHA1(ed6aee778295b0182d32846b5e41776b5b15420c) ) // ab9.bin ROM_LOAD( "5k", 0x1800, 0x0800, CRC(713086b3) SHA1(a1609bae637207a82920678f05bcc10a5ff096de) ) // ab11.bin + ROM_REGION( 0x1000, "gfx2", 0 ) + ROM_LOAD( "ab7.bin", 0x0000, 0x0800, CRC(52294ef5) SHA1(1d76e16c95cb2873d898a4151a902113fccafe1c) ) + ROM_RELOAD( 0x0800, 0x0800 ) + ROM_REGION( 0x0120, "proms", 0 ) ROM_LOAD( "82s123.e7", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s129.a4", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used - - // Unknown, used for the mystery items? - ROM_REGION( 0x1000, "user1", 0 ) - ROM_LOAD( "ab7.bin", 0x0000, 0x0800, CRC(52294ef5) SHA1(1d76e16c95cb2873d898a4151a902113fccafe1c) ) + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END @@ -7721,18 +7771,18 @@ ROM_START( jumpshot ) ROM_LOAD( "prom.7f", 0x0000, 0x0020, CRC(872b42f3) SHA1(bbcd392ba3d2a5715e92fa0f7a7cf1e7e6e655a2) ) ROM_LOAD( "prom.4a", 0x0020, 0x0100, CRC(0399f39f) SHA1(e98f08da4666cab44e01acb760a1bd2fc858bc0d) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END ROM_START( jumpshotp ) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "js6e.bin", 0x0000, 0x1000, CRC(acc5e15e) SHA1(c9516f2d0862b29a3efe19eb13ab68decd670ca8) ) - ROM_LOAD( "js6f.bin", 0x1000, 0x1000, CRC(62b48ba4) SHA1(a17d8ca68de6116822cf4eff70eada04a3fbb4c3) ) - ROM_LOAD( "js6h.bin", 0x2000, 0x1000, CRC(7c9b5e30) SHA1(44c7694b8bd774550ec865d133f5660b90350428) ) - ROM_LOAD( "js6j.bin", 0x3000, 0x1000, CRC(9f0c39f6) SHA1(8714c9b0853206ec5d79155b4310195b46fafbf6) ) + ROM_LOAD( "js6e.bin", 0x0000, 0x1000, CRC(acc5e15e) SHA1(c9516f2d0862b29a3efe19eb13ab68decd670ca8) ) + ROM_LOAD( "js6f.bin", 0x1000, 0x1000, CRC(62b48ba4) SHA1(a17d8ca68de6116822cf4eff70eada04a3fbb4c3) ) + ROM_LOAD( "js6h.bin", 0x2000, 0x1000, CRC(7c9b5e30) SHA1(44c7694b8bd774550ec865d133f5660b90350428) ) + ROM_LOAD( "js6j.bin", 0x3000, 0x1000, CRC(9f0c39f6) SHA1(8714c9b0853206ec5d79155b4310195b46fafbf6) ) ROM_REGION( 0x2000, "gfx1", 0 ) ROM_LOAD( "5e", 0x0000, 0x1000, CRC(d9fa90f5) SHA1(3c37fe077a77baa802230dddbc4bb2c05985d2bb) ) @@ -7742,9 +7792,9 @@ ROM_START( jumpshotp ) ROM_LOAD( "prom.7f", 0x0000, 0x0020, CRC(872b42f3) SHA1(bbcd392ba3d2a5715e92fa0f7a7cf1e7e6e655a2) ) ROM_LOAD( "prom.4a", 0x0020, 0x0100, CRC(0399f39f) SHA1(e98f08da4666cab44e01acb760a1bd2fc858bc0d) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END @@ -7784,7 +7834,7 @@ ROM_START( acitya ) ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m" , 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END ROM_START( bwcasino ) // Pac-Man PCB conversion kit. Includes a small daughtercard (2 roms + 4 PLDs, plugs in through the Z80 socket), 1 rom + 2 BPROMs @@ -7802,7 +7852,7 @@ ROM_START( bwcasino ) // Pac-Man PCB conversion kit. Includes a small daughterca ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m" , 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END @@ -7829,18 +7879,18 @@ ROM_START( newpuc2 ) ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END ROM_START( newpuc2b ) ROM_REGION( 0x10000, "maincpu",0 ) ROM_LOAD( "np2b1.bin", 0x0000, 0x0800, CRC(9d027c4a) SHA1(88e094880057451a75cdc2ce9477403021813982) ) - ROM_LOAD( "6k.cpu", 0x0800, 0x0800, CRC(158fc01c) SHA1(2f7a1e24d259fdc716ef8e7354a87780595f3c4e) ) - ROM_LOAD( "6f.cpu", 0x1000, 0x0800, CRC(7d177853) SHA1(9b5ddaaa8b564654f97af193dbcc29f81f230a25) ) - ROM_LOAD( "6m.cpu", 0x1800, 0x0800, CRC(70810ccf) SHA1(3941678606aab1e53356a6781e24d84e83cc88ce) ) + ROM_LOAD( "6k.cpu", 0x0800, 0x0800, CRC(158fc01c) SHA1(2f7a1e24d259fdc716ef8e7354a87780595f3c4e) ) + ROM_LOAD( "6f.cpu", 0x1000, 0x0800, CRC(7d177853) SHA1(9b5ddaaa8b564654f97af193dbcc29f81f230a25) ) + ROM_LOAD( "6m.cpu", 0x1800, 0x0800, CRC(70810ccf) SHA1(3941678606aab1e53356a6781e24d84e83cc88ce) ) ROM_LOAD( "np2b3.bin", 0x2000, 0x0800, CRC(f5e4b2b1) SHA1(68464f61cc50931f6cd4bb493dd703c139500825) ) - ROM_LOAD( "6n.cpu", 0x2800, 0x0800, CRC(3f250c58) SHA1(53bf2270c26f10f7e97960cd4c96e09e16b9bdf3) ) + ROM_LOAD( "6n.cpu", 0x2800, 0x0800, CRC(3f250c58) SHA1(53bf2270c26f10f7e97960cd4c96e09e16b9bdf3) ) ROM_LOAD( "np2b4.bin", 0x3000, 0x0800, CRC(f068e009) SHA1(a30763935e116559d535654827230bb21a5734bb) ) ROM_LOAD( "np2b8.bin", 0x3800, 0x0800, CRC(1fadcc2f) SHA1(2d636cfc2b52b671ac5a26a03b1195e2cf8d4718) ) @@ -7856,7 +7906,7 @@ ROM_START( newpuc2b ) ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END ROM_START( pacuman ) @@ -7882,7 +7932,7 @@ ROM_START( pacuman ) ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END @@ -7907,9 +7957,9 @@ ROM_START( nmouse ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "naumouse.a4", 0x0020, 0x0100, CRC(d8772167) SHA1(782fa53f0de7262924a92d75f12a42bc4e44c812) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END ROM_START( nmouseb ) @@ -7933,9 +7983,9 @@ ROM_START( nmouseb ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "naumouse.a4", 0x0020, 0x0100, CRC(d8772167) SHA1(782fa53f0de7262924a92d75f12a42bc4e44c812) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END @@ -8028,9 +8078,9 @@ ROM_START( woodpeck ) ROM_LOAD( "pr.8h", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "pr.4a", 0x0020, 0x0100, CRC(d8772167) SHA1(782fa53f0de7262924a92d75f12a42bc4e44c812) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "pr.1k", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "pr.3k", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "pr.3k", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END ROM_START( woodpeca ) @@ -8050,9 +8100,9 @@ ROM_START( woodpeca ) ROM_LOAD( "pr.8h", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "pr.4a", 0x0020, 0x0100, CRC(d8772167) SHA1(782fa53f0de7262924a92d75f12a42bc4e44c812) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "pr.1k", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "pr.3k", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "pr.3k", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END @@ -8129,9 +8179,9 @@ ROM_START( numcrash ) ROM_LOAD( "7051p1.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "7052.4a", 0x0020, 0x0100, CRC(2bc5d339) SHA1(446e234df94d9ef34c3191877bb33dd775acfdf5) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "7611p3.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "7611p2.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "7611p2.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END @@ -8148,11 +8198,11 @@ ROM_START( bigbucks ) ROM_LOAD( "82s123.7f", 0x0000, 0x0020, CRC(2fc650bd) SHA1(8d0268dee78e47c712202b0ec4f1f51109b1f2a5) ) ROM_LOAD( "82s126.4a", 0x0020, 0x0100, CRC(3eb3a8e4) SHA1(19097b5f60d1030f8b82d9f1d3a241f93e5c75d6) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used - ROM_REGION( 0x60000, "user1", 0 ) // Question ROMs + ROM_REGION( 0x60000, "user1", 0 ) // Question ROMs ROM_LOAD( "rom1.rom", 0x00000, 0x8000, CRC(90b7785f) SHA1(7fc5aa2be868b87ffb9e957c204dabf1508e212e) ) ROM_LOAD( "rom2.rom", 0x08000, 0x8000, CRC(60172d77) SHA1(92cb2312c6f3395f7ddb45e58695dd000d6ec756) ) ROM_LOAD( "rom3.rom", 0x10000, 0x8000, CRC(a2207320) SHA1(18ad94b62e7e611ab8a1cbf2d2c6576b8840da2f) ) @@ -8254,11 +8304,11 @@ ROM_START( rocktrv2 ) ROM_LOAD( "7f.cpu", 0x0000, 0x0020, CRC(7549a947) SHA1(4f2c3e7d6c38f0b9a90317f91feb3f86c9a0d0a5) ) ROM_LOAD( "4a.cpu", 0x0020, 0x0100, CRC(ddd5d88e) SHA1(f28e1d90bb495001c30c63b0ef2eec45de568174) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m" , 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used - ROM_REGION( 0x40000, "user1", 0 ) // Question ROMs + ROM_REGION( 0x40000, "user1", 0 ) // Question ROMs ROM_LOAD( "3.aux", 0x00000, 0x4000, CRC(5b117ca6) SHA1(08d625312a751b99e132b90dcf8274d0ff2aecf2) ) ROM_LOAD( "4.aux", 0x04000, 0x4000, CRC(81bfd4c3) SHA1(300cb4a38d3a1234bfc793f0574527033697f5a2) ) ROM_LOAD( "5.aux", 0x08000, 0x4000, CRC(e976423c) SHA1(53a7f100943313014285ce09c03bd3eabd1388b0) ) @@ -8298,9 +8348,9 @@ ROM_START( cannonbp ) ROM_LOAD( "colorprom_1", 0x0000, 0x0020, CRC(08f8ae7e) SHA1(cd1e26da5f214f4d9924a30e6d9cf312f91c2028) ) ROM_LOAD( "colorprom_2", 0x0020, 0x0100, CRC(359a15dc) SHA1(e57ef15eb3baac70fe9e2db897c4165da3c00e20) ) - ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs + ROM_REGION( 0x0200, "namco", 0 ) // Sound PROMs ROM_LOAD( "82s126.1m", 0x0000, 0x0100, CRC(a9cc86bf) SHA1(bbcec0570aeceb582ff8238a4bc8546a23430081) ) - ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used + ROM_LOAD( "82s126.3m", 0x0100, 0x0100, CRC(77245b66) SHA1(0c4d0bee858b97632411c440bea6948a74759746) ) // Timing - not used ROM_END @@ -8333,51 +8383,45 @@ void pacman_state::init_ponpoko() /* The gfx data is swapped wrt the other Pac-Man hardware games. */ /* Here we revert it to the usual format. */ - int i, j; - uint8_t *RAM, temp; + uint8_t *ROM, temp; int length = memregion("gfx1")->bytes()/2; /* Characters */ - RAM = memregion("gfx1")->base(); - for (i = 0;i < length;i += 0x10) + ROM = memregion("gfx1")->base(); + for (int i = 0; i < length; i += 0x10) { - for (j = 0; j < 8; j++) + for (int j = 0; j < 8; j++) { - temp = RAM[i+j+0x08]; - RAM[i+j+0x08] = RAM[i+j+0x00]; - RAM[i+j+0x00] = temp; + temp = ROM[i+j+0x08]; + ROM[i+j+0x08] = ROM[i+j+0x00]; + ROM[i+j+0x00] = temp; } } /* Sprites */ - RAM = memregion("gfx1")->base()+length; - for (i = 0;i < length;i += 0x20) + ROM = memregion("gfx1")->base()+length; + for (int i = 0; i < length; i += 0x20) { - for (j = 0; j < 8; j++) + for (int j = 0; j < 8; j++) { - temp = RAM[i+j+0x18]; - RAM[i+j+0x18] = RAM[i+j+0x10]; - RAM[i+j+0x10] = RAM[i+j+0x08]; - RAM[i+j+0x08] = RAM[i+j+0x00]; - RAM[i+j+0x00] = temp; + temp = ROM[i+j+0x18]; + ROM[i+j+0x18] = ROM[i+j+0x10]; + ROM[i+j+0x10] = ROM[i+j+0x08]; + ROM[i+j+0x08] = ROM[i+j+0x00]; + ROM[i+j+0x00] = temp; } } } void pacman_state::eyes_decode(uint8_t *data) { - int j; uint8_t swapbuffer[8]; - for (j = 0; j < 8; j++) - { + for (int j = 0; j < 8; j++) swapbuffer[j] = data[bitswap<16>(j,15,14,13,12,11,10,9,8,7,6,5,4,3,0,1,2)]; - } - for (j = 0; j < 8; j++) - { + for (int j = 0; j < 8; j++) data[j] = bitswap<8>(swapbuffer[j],7,4,5,6,3,2,1,0); - } } void pacman_state::init_eyes() @@ -8385,20 +8429,17 @@ void pacman_state::init_eyes() /* CPU ROMs */ /* Data lines D3 and D5 swapped */ - uint8_t *RAM = memregion("maincpu")->base(); + uint8_t *ROM = memregion("maincpu")->base(); for (int i = 0; i < 0xc000; i++) - { - RAM[i] = bitswap<8>(RAM[i],7,6,3,4,5,2,1,0); - } - + ROM[i] = bitswap<8>(ROM[i],7,6,3,4,5,2,1,0); /* Graphics ROMs */ /* Data lines D4 and D6 and address lines A0 and A2 are swapped */ - RAM = memregion("gfx1")->base(); + ROM = memregion("gfx1")->base(); int len = memregion("gfx1")->bytes(); for (int i = 0; i < len; i += 8) - eyes_decode(&RAM[i]); + eyes_decode(&ROM[i]); } void pacman_state::mspacman_install_patches(uint8_t *ROM) @@ -8453,38 +8494,39 @@ void pacman_state::mspacman_install_patches(uint8_t *ROM) void pacman_state::init_mspacman() { - /* CPU ROMs */ + // CPU ROMs - /* Pac-Man code is in low bank */ + // Pac-Man code is in low bank uint8_t *ROM = memregion("maincpu")->base(); - /* decrypted Ms. Pac-Man code is in high bank */ + // decrypted Ms. Pac-Man code is in high bank uint8_t *DROM = &memregion("maincpu")->base()[0x10000]; - /* copy ROMs into decrypted bank */ + // copy ROMs into decrypted bank for (int i = 0; i < 0x1000; i++) { - DROM[0x0000+i] = ROM[0x0000+i]; /* pacman.6e */ - DROM[0x1000+i] = ROM[0x1000+i]; /* pacman.6f */ - DROM[0x2000+i] = ROM[0x2000+i]; /* pacman.6h */ - DROM[0x3000+i] = bitswap<8>(ROM[0xb000+bitswap<12>(i,11,3,7,9,10,8,6,5,4,2,1,0)],0,4,5,7,6,3,2,1); /* decrypt u7 */ + DROM[0x0000+i] = ROM[0x0000+i]; // pacman.6e + DROM[0x1000+i] = ROM[0x1000+i]; // pacman.6f + DROM[0x2000+i] = ROM[0x2000+i]; // pacman.6h + DROM[0x3000+i] = bitswap<8>(ROM[0xb000+bitswap<12>(i,11,3,7,9,10,8,6,5,4,2,1,0)],0,4,5,7,6,3,2,1); // decrypt u7 } for (int i = 0; i < 0x800; i++) { - DROM[0x8000+i] = bitswap<8>(ROM[0x8000+bitswap<11>(i,8,7,5,9,10,6,3,4,2,1,0)],0,4,5,7,6,3,2,1); /* decrypt u5 */ - DROM[0x8800+i] = bitswap<8>(ROM[0x9800+bitswap<11>(i,3,7,9,10,8,6,5,4,2,1,0)],0,4,5,7,6,3,2,1); /* decrypt half of u6 */ - DROM[0x9000+i] = bitswap<8>(ROM[0x9000+bitswap<11>(i,3,7,9,10,8,6,5,4,2,1,0)],0,4,5,7,6,3,2,1); /* decrypt half of u6 */ - DROM[0x9800+i] = ROM[0x1800+i]; /* mirror of pacman.6f high */ + DROM[0x8000+i] = bitswap<8>(ROM[0x8000+bitswap<11>(i,8,7,5,9,10,6,3,4,2,1,0)],0,4,5,7,6,3,2,1); // decrypt u5 + DROM[0x8800+i] = bitswap<8>(ROM[0x9800+bitswap<11>(i,3,7,9,10,8,6,5,4,2,1,0)],0,4,5,7,6,3,2,1); // decrypt half of u6 + DROM[0x9000+i] = bitswap<8>(ROM[0x9000+bitswap<11>(i,3,7,9,10,8,6,5,4,2,1,0)],0,4,5,7,6,3,2,1); // decrypt half of u6 + DROM[0x9800+i] = ROM[0x1800+i]; // mirror of pacman.6f high } for (int i = 0; i < 0x1000; i++) { - DROM[0xa000+i] = ROM[0x2000+i]; /* mirror of pacman.6h */ - DROM[0xb000+i] = ROM[0x3000+i]; /* mirror of pacman.6j */ + DROM[0xa000+i] = ROM[0x2000+i]; // mirror of pacman.6h + DROM[0xb000+i] = ROM[0x3000+i]; // mirror of pacman.6j } - /* install patches into decrypted bank */ + + // install patches into decrypted bank mspacman_install_patches(DROM); - /* mirror Pac-Man ROMs into upper addresses of normal bank */ + // mirror Pac-Man ROMs into upper addresses of normal bank for (int i = 0; i < 0x1000; i++) { ROM[0x8000+i] = ROM[0x0000+i]; @@ -8493,7 +8535,7 @@ void pacman_state::init_mspacman() ROM[0xb000+i] = ROM[0x3000+i]; } - /* initialize the banks */ + // initialize the banks membank("bank1")->configure_entries(0, 2, &ROM[0x00000], 0x10000); membank("bank1")->set_entry(1); } @@ -8506,13 +8548,30 @@ void pacman_state::init_mschamp() void pacman_state::init_woodpek() { - /* Graphics ROMs */ + // Graphics ROMs - /* Data lines D4 and D6 and address lines A0 and A2 are swapped */ - uint8_t *RAM = memregion("gfx1")->base(); + // Data lines D4 and D6 and address lines A0 and A2 are swapped + uint8_t *ROM = memregion("gfx1")->base(); int len = memregion("gfx1")->bytes(); - for (int i = 0;i < len;i += 8) - eyes_decode(&RAM[i]); + + for (int i = 0; i < len; i += 8) + eyes_decode(&ROM[i]); +} + +void alibaba_state::init_alibaba() +{ + uint8_t *ROM = memregion("gfx2")->base(); + int len = memregion("gfx2")->bytes(); + + // reorder clock graphics a bit to make it work with gfxdecode + for (int i = 0; i < len; i++) + { + if ((i & 0x3f) < 0x18) + { + ROM[i] = ROM[i + 8]; + ROM[i + 8] = 0; + } + } } void pacman_state::init_pacplus() @@ -8536,7 +8595,7 @@ void pacman_state::init_drivfrcp() void pacman_state::init_8bpm() { - /* Data lines D0 and D6 swapped */ + // Data lines D0 and D6 swapped uint8_t *ROM = memregion("maincpu")->base(); for (int i = 0; i < 0x8000; i++) { @@ -8551,7 +8610,7 @@ void pacman_state::init_8bpm() void pacman_state::init_porky() { - /* Data lines D0 and D4 swapped */ + // Data lines D0 and D4 swapped uint8_t *ROM = memregion("maincpu")->base(); for (int i = 0; i < 0x10000; i++) { @@ -8571,7 +8630,7 @@ void pacman_state::init_porky() void pacman_state::init_rocktrv2() { - /* hack to pass the rom check for the bad rom */ + // hack to pass the rom check for the bad rom uint8_t *ROM = memregion("maincpu")->base(); ROM[0x7ffe] = 0xa7; @@ -8580,12 +8639,13 @@ void pacman_state::init_rocktrv2() save_item(NAME(m_rocktrv2_question_bank)); } -/* The encryption is provided by a 74298 sitting on top of the rom at 6f. -The select line is tied to a2; a0 and a1 of the eprom are are left out of -socket and run through the 74298. Clock is tied to system clock. */ void pacman_state::init_mspacmbe() { - /* Address lines A1 and A0 swapped if A2=0 */ + // The encryption is provided by a 74298 sitting on top of the rom at 6f. + // The select line is tied to a2; a0 and a1 of the eprom are are left out of + // socket and run through the 74298. Clock is tied to system clock. + + // Address lines A1 and A0 swapped if A2=0 uint8_t *ROM = memregion("maincpu")->base(); for (int i = 0x1000; i < 0x2000; i += 4) { @@ -8600,7 +8660,7 @@ void pacman_state::init_mspacmbe() uint8_t pacman_state::mspacii_protection_r(offs_t offset) { - /* used by extra routine at $3FE, bit 4 of 504d needs to be low, and of 504e to be high */ + // used by extra routine at $3FE, bit 4 of 504d needs to be low, and of 504e to be high uint8_t data = ioport("IN1")->read(); return (data & 0xef) | (offset << 4 & 0x10); } @@ -8623,8 +8683,8 @@ void pacman_state::init_superabc() uint8_t pacman_state::cannonbp_protection_r(offs_t offset) { - /* At 6p where a rom would usually be there is an epoxy resin chip with 'Novomatic Industrie' Cannon Ball tm 1984 label. */ - /* As I have no clue about what shall be in this chip, what follows is only a simulation which is enough to play the game. */ + // At 6p where a rom would usually be there is an epoxy resin chip with 'Novomatic Industrie' Cannon Ball tm 1984 label. + // As I have no clue about what shall be in this chip, what follows is only a simulation which is enough to play the game. switch (offset) { default: @@ -8637,15 +8697,15 @@ uint8_t pacman_state::cannonbp_protection_r(offs_t offset) return 0x00; /* code at 0x2b77 : - - after partial checksum (range 0x0000-0x1e7c), HL = 0x9d39 - - then L += A and HL += 0x717c to determine jump address after bonus round - where A is the result of 8 reads from 0x3001 - - as jump address shall be 0x0efb, A = 0x46 - - as H after partial checksum is wrong in the bootlegs, - they will reset or hang after bonus round - unless you patch ROM at 0x2ba0 with this code : - 2BA0: 21 FB 0E ld hl,$0EFB - 2BA3: 00 nop + - after partial checksum (range 0x0000-0x1e7c), HL = 0x9d39 + - then L += A and HL += 0x717c to determine jump address after bonus round + where A is the result of 8 reads from 0x3001 + - as jump address shall be 0x0efb, A = 0x46 + - as H after partial checksum is wrong in the bootlegs, + they will reset or hang after bonus round + unless you patch ROM at 0x2ba0 with this code : + 2BA0: 21 FB 0E ld hl,$0EFB + 2BA3: 00 nop */ case 0x0004: m_cannonb_bit_to_read = 7; @@ -8654,9 +8714,9 @@ uint8_t pacman_state::cannonbp_protection_r(offs_t offset) if (m_maincpu->pc() == 0x2b97) return (BIT(0x46, m_cannonb_bit_to_read--) << 7); else - return 0xff; /* value taken from the bootlegs */ + return 0xff; // value taken from the bootlegs - /* code at 0x2613 : HL += 0xd088 for start position - in the bootlegs, start position = 0x1088 */ + // code at 0x2613 : HL += 0xd088 for start position - in the bootlegs, start position = 0x1088 case 0x0105: // player start x position -> register L return 0x00; case 0x0107: // player start y position -> register H @@ -8733,22 +8793,22 @@ void epospm_state::init_sprglobp2() static const uint8_t data_xortable[16][8] = { - { 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, }, // 0x0000 - { 0xa0, 0xa0, 0x88, 0x88, 0x88, 0x88, 0xa0, 0xa0, }, // 0x0001 - { 0x00, 0x00, 0x88, 0x88, 0x00, 0x00, 0x88, 0x88, }, // 0x0010 - { 0xa0, 0xa0, 0x88, 0x88, 0x88, 0x88, 0xa0, 0xa0, }, // 0x0011 - { 0x88, 0x88, 0xa0, 0xa0, 0x28, 0x28, 0x00, 0x00, }, // 0x0100 - { 0xa0, 0xa0, 0x88, 0x88, 0x88, 0x88, 0xa0, 0xa0, }, // 0x0101 - { 0x20, 0x20, 0x20, 0x20, 0x80, 0x80, 0x80, 0x80, }, // 0x0110 - { 0xa0, 0xa0, 0x88, 0x88, 0x88, 0x88, 0xa0, 0xa0, }, // 0x0111 - { 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, }, // 0x1000 - { 0x28, 0x28, 0xa0, 0xa0, 0x00, 0x00, 0x88, 0x88, }, // 0x1001 - { 0x00, 0x00, 0x88, 0x88, 0x00, 0x00, 0x88, 0x88, }, // 0x1010 - { 0x28, 0x28, 0xa0, 0xa0, 0x00, 0x00, 0x88, 0x88, }, // 0x1011 - { 0x88, 0x88, 0xa0, 0xa0, 0x28, 0x28, 0x00, 0x00, }, // 0x1100 - { 0x28, 0x28, 0xa0, 0xa0, 0x00, 0x00, 0x88, 0x88, }, // 0x1101 - { 0x20, 0x20, 0x20, 0x20, 0x80, 0x80, 0x80, 0x80, }, // 0x1110 - { 0x28, 0x28, 0xa0, 0xa0, 0x00, 0x00, 0x88, 0x88, } // 0x1111 + { 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, }, // 0x0000 + { 0xa0, 0xa0, 0x88, 0x88, 0x88, 0x88, 0xa0, 0xa0, }, // 0x0001 + { 0x00, 0x00, 0x88, 0x88, 0x00, 0x00, 0x88, 0x88, }, // 0x0010 + { 0xa0, 0xa0, 0x88, 0x88, 0x88, 0x88, 0xa0, 0xa0, }, // 0x0011 + { 0x88, 0x88, 0xa0, 0xa0, 0x28, 0x28, 0x00, 0x00, }, // 0x0100 + { 0xa0, 0xa0, 0x88, 0x88, 0x88, 0x88, 0xa0, 0xa0, }, // 0x0101 + { 0x20, 0x20, 0x20, 0x20, 0x80, 0x80, 0x80, 0x80, }, // 0x0110 + { 0xa0, 0xa0, 0x88, 0x88, 0x88, 0x88, 0xa0, 0xa0, }, // 0x0111 + { 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, 0xa8, }, // 0x1000 + { 0x28, 0x28, 0xa0, 0xa0, 0x00, 0x00, 0x88, 0x88, }, // 0x1001 + { 0x00, 0x00, 0x88, 0x88, 0x00, 0x00, 0x88, 0x88, }, // 0x1010 + { 0x28, 0x28, 0xa0, 0xa0, 0x00, 0x00, 0x88, 0x88, }, // 0x1011 + { 0x88, 0x88, 0xa0, 0xa0, 0x28, 0x28, 0x00, 0x00, }, // 0x1100 + { 0x28, 0x28, 0xa0, 0xa0, 0x00, 0x00, 0x88, 0x88, }, // 0x1101 + { 0x20, 0x20, 0x20, 0x20, 0x80, 0x80, 0x80, 0x80, }, // 0x1110 + { 0x28, 0x28, 0xa0, 0xa0, 0x00, 0x00, 0x88, 0x88, } // 0x1111 }; uint8_t *rom = memregion("maincpu")->base(); @@ -8771,6 +8831,7 @@ void epospm_state::init_sprglobp2() } } + /************************************* * * Game drivers @@ -8911,8 +8972,8 @@ GAME( 1982, ponpoko, 0, woodpek, ponpoko, pacman_state, init_ponpoko, GAME( 1982, ponpokov, ponpoko, woodpek, ponpoko, pacman_state, init_ponpoko, ROT0, "Sigma Enterprises Inc. (Venture Line license)", "Ponpoko (Venture Line)", MACHINE_SUPPORTS_SAVE ) GAME( 1982, candory, ponpoko, woodpek, ponpoko, pacman_state, init_ponpoko, ROT0, "bootleg", "Candory (Ponpoko bootleg with Mario)", MACHINE_SUPPORTS_SAVE ) -GAME( 1982, alibaba, 0, alibaba, alibaba, pacman_state, empty_init, ROT90, "Sega", "Ali Baba and 40 Thieves", MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE ) -GAME( 1982, alibabab, alibaba, alibaba, alibaba, pacman_state, empty_init, ROT90, "bootleg", "Mustafa and 40 Thieves (bootleg)", MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE ) +GAME( 1982, alibaba, 0, alibaba, alibaba, alibaba_state, init_alibaba, ROT90, "Sega", "Ali Baba and 40 Thieves", MACHINE_SUPPORTS_SAVE ) +GAME( 1982, alibabab, alibaba, alibaba, alibaba, alibaba_state, init_alibaba, ROT90, "bootleg", "Mustafa and 40 Thieves (bootleg)", MACHINE_SUPPORTS_SAVE ) GAME( 1982, dremshpr, 0, dremshpr, dremshpr, pacman_state, empty_init, ROT270, "Sanritsu", "Dream Shopper", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/pacman/pacman.h b/src/mame/pacman/pacman.h index 2a668a1f16671..567ea75f8dfed 100644 --- a/src/mame/pacman/pacman.h +++ b/src/mame/pacman/pacman.h @@ -37,11 +37,11 @@ class pacman_state : public driver_device , m_rocktrv2_prot_data(*this, "rocktrv2_prot") , m_gfxdecode(*this, "gfxdecode") , m_palette(*this, "palette") + , m_screen(*this, "screen") { } protected: void _8bpm_portmap(address_map &map) ATTR_COLD; - void alibaba_map(address_map &map) ATTR_COLD; void bigbucks_map(address_map &map) ATTR_COLD; void bigbucks_portmap(address_map &map) ATTR_COLD; void birdiy_map(address_map &map) ATTR_COLD; @@ -82,9 +82,9 @@ class pacman_state : public driver_device optional_shared_ptr m_rocktrv2_prot_data; required_device m_gfxdecode; required_device m_palette; + required_device m_screen; uint8_t m_cannonb_bit_to_read = 0; - int m_mystery = 0; uint8_t m_counter = 0; int m_bigbucks_bank = 0; uint8_t m_rocktrv2_question_bank = 0; @@ -111,9 +111,6 @@ class pacman_state : public driver_device IRQ_CALLBACK_MEMBER(interrupt_vector_r); void coin_counter_w(int state); void coin_lockout_global_w(int state); - void alibaba_sound_w(offs_t offset, uint8_t data); - uint8_t alibaba_mystery_1_r(); - uint8_t alibaba_mystery_2_r(); void maketrax_protection_w(uint8_t data); uint8_t mbrush_prot_r(offs_t offset); uint8_t maketrax_special_port2_r(offs_t offset); @@ -194,6 +191,7 @@ class pacman_state : public driver_device DECLARE_MACHINE_RESET(maketrax); DECLARE_VIDEO_START(pengo); DECLARE_VIDEO_START(jrpacman); + void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_pacman(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_s2650games(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void vblank_irq(int state); @@ -230,7 +228,6 @@ class pacman_state : public driver_device void _8bpm(machine_config &config); void crush2(machine_config &config); void korosuke(machine_config &config); - void alibaba(machine_config &config); void drivfrcp(machine_config &config); void pengojpm(machine_config &config); void piranha(machine_config &config); @@ -246,10 +243,43 @@ class pacman_state : public driver_device }; +class alibaba_state : public pacman_state +{ +public: + alibaba_state(const machine_config &mconfig, device_type type, const char *tag) + : pacman_state(mconfig, type, tag) + { } + + void alibaba(machine_config &config); + + void init_alibaba(); + +protected: + virtual void machine_start() override ATTR_COLD; + +private: + uint8_t m_mystery_control = 0; + uint8_t m_mystery_clock = 0; + uint8_t m_mystery_prescaler = 0; + + void mystery_tick(int state); + uint8_t mystery_1_r(); + uint8_t mystery_2_r(); + void mystery_w(uint8_t data); + void sound_w(offs_t offset, uint8_t data); + + void alibaba_map(address_map &map) ATTR_COLD; + + void draw_clock(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); +}; + class epospm_state : public pacman_state { public: - using pacman_state::pacman_state; + epospm_state(const machine_config &mconfig, device_type type, const char *tag) + : pacman_state(mconfig, type, tag) + { } void acitya(machine_config &config); void theglobp(machine_config &config); @@ -297,7 +327,6 @@ class mspactwin_state : public clubpacm_state public: mspactwin_state(const machine_config &mconfig, device_type type, const char *tag) : clubpacm_state(mconfig, type, tag) - , m_screen(*this, "screen") , m_decrypted_opcodes(*this, "decrypted_opcodes") , m_decrypted_opcodes_high(*this, "decrypted_opcodes_high") { } @@ -308,9 +337,6 @@ class mspactwin_state : public clubpacm_state void flipscreen_w(int state); -private: - required_device m_screen; - protected: void mspactwin_map(address_map &map) ATTR_COLD; void mspactwin_decrypted_map(address_map &map) ATTR_COLD; diff --git a/src/mame/pacman/pacman_v.cpp b/src/mame/pacman/pacman_v.cpp index 8a030e788c003..00639d08555f0 100644 --- a/src/mame/pacman/pacman_v.cpp +++ b/src/mame/pacman/pacman_v.cpp @@ -182,9 +182,10 @@ TILE_GET_INFO_MEMBER(pacman_state::pacman_get_tile_info) int code = m_videoram[tile_index] | (m_charbank << 8); int attr = (m_colorram[tile_index] & 0x1f) | (m_colortablebank << 5) | (m_palettebank << 6); - tileinfo.set(0,code,attr,0); + tileinfo.set(0, code, attr, 0); } + /*************************************************************************** Start the video hardware emulation. @@ -260,10 +261,104 @@ void mspactwin_state::flipscreen_w(int state) { m_flipscreen = state; m_bg_tilemap->set_flip(m_flipscreen * (TILEMAP_FLIPX + TILEMAP_FLIPY)); -// logerror("Flip: %02x\n", state); + //logerror("Flip: %02x\n", state); } +/************************************************************************* + + Screen update + +**************************************************************************/ + +void pacman_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +{ + uint8_t *spriteram = m_spriteram; + uint8_t *spriteram_2 = m_spriteram2; + + rectangle spriteclip(2*8, 34*8-1, 0*8, 28*8-1); + spriteclip &= cliprect; + + /* Draw the sprites. Note that it is important to draw them exactly in this */ + /* order, to have the correct priorities. */ + for (int offs = m_spriteram.bytes() - 2; offs > 2*2; offs -= 2) + { + int color; + int sx,sy; + uint8_t fx,fy; + + if (m_inv_spr) + { + sx = spriteram_2[offs + 1]; + sy = 240 - (spriteram_2[offs]); + } + else + { + sx = 272 - spriteram_2[offs + 1]; + sy = spriteram_2[offs] - 31; + } + + fx = (spriteram[offs] & 1) ^ m_inv_spr; + fy = (spriteram[offs] & 2) ^ ((m_inv_spr) << 1); + + color = (spriteram[offs + 1] & 0x1f) | (m_colortablebank << 5) | (m_palettebank << 6); + + m_gfxdecode->gfx(1)->transmask(bitmap,spriteclip, + (spriteram[offs] >> 2) | (m_spritebank << 6), + color, + fx,fy, + sx,sy, + m_palette->transpen_mask(*m_gfxdecode->gfx(1), color & 0x3f, 0)); + + /* also plot the sprite with wraparound (tunnel in Crush Roller) */ + m_gfxdecode->gfx(1)->transmask(bitmap,spriteclip, + (spriteram[offs] >> 2) | (m_spritebank << 6), + color, + fx,fy, + sx - 256,sy, + m_palette->transpen_mask(*m_gfxdecode->gfx(1), color & 0x3f, 0)); + } + + /* In the Pac Man based games (NOT Pengo) the first two sprites must be offset */ + /* one pixel to the left to get a more correct placement */ + for (int offs = 2*2; offs >= 0; offs -= 2) + { + int color; + int sx,sy; + uint8_t fx,fy; + + if (m_inv_spr) + { + sx = spriteram_2[offs + 1]; + sy = 240 - (spriteram_2[offs]); + } + else + { + sx = 272 - spriteram_2[offs + 1]; + sy = spriteram_2[offs] - 31; + } + color = (spriteram[offs + 1] & 0x1f) | (m_colortablebank << 5) | (m_palettebank << 6); + + fx = (spriteram[offs] & 1) ^ m_inv_spr; + fy = (spriteram[offs] & 2) ^ ((m_inv_spr) << 1); + + m_gfxdecode->gfx(1)->transmask(bitmap,spriteclip, + (spriteram[offs] >> 2) | (m_spritebank << 6), + color, + fx,fy, + sx,sy + m_xoffsethack, + m_palette->transpen_mask(*m_gfxdecode->gfx(1), color & 0x3f, 0)); + + /* also plot the sprite with wraparound (tunnel in Crush Roller) */ + m_gfxdecode->gfx(1)->transmask(bitmap,spriteclip, + (spriteram[offs] >> 2) | (m_spritebank << 6), + color, + fx,fy, + sx - 256,sy + m_xoffsethack, + m_palette->transpen_mask(*m_gfxdecode->gfx(1), color & 0x3f, 0)); + } +} + uint32_t pacman_state::screen_update_pacman(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { if (m_bgpriority != 0) @@ -272,102 +367,79 @@ uint32_t pacman_state::screen_update_pacman(screen_device &screen, bitmap_ind16 m_bg_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); if (m_spriteram != nullptr) - { - uint8_t *spriteram = m_spriteram; - uint8_t *spriteram_2 = m_spriteram2; - int offs; + draw_sprites(screen, bitmap, cliprect); - rectangle spriteclip(2*8, 34*8-1, 0*8, 28*8-1); - spriteclip &= cliprect; + if (m_bgpriority != 0) + m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0); - /* Draw the sprites. Note that it is important to draw them exactly in this */ - /* order, to have the correct priorities. */ - for (offs = m_spriteram.bytes() - 2; offs > 2*2; offs -= 2) - { - int color; - int sx,sy; - uint8_t fx,fy; - - if(m_inv_spr) - { - sx = spriteram_2[offs + 1]; - sy = 240 - (spriteram_2[offs]); - } - else - { - sx = 272 - spriteram_2[offs + 1]; - sy = spriteram_2[offs] - 31; - } - - fx = (spriteram[offs] & 1) ^ m_inv_spr; - fy = (spriteram[offs] & 2) ^ ((m_inv_spr) << 1); - - color = (spriteram[offs + 1] & 0x1f) | (m_colortablebank << 5) | (m_palettebank << 6); - - m_gfxdecode->gfx(1)->transmask(bitmap,spriteclip, - (spriteram[offs] >> 2) | (m_spritebank << 6), - color, - fx,fy, - sx,sy, - m_palette->transpen_mask(*m_gfxdecode->gfx(1), color & 0x3f, 0)); - - /* also plot the sprite with wraparound (tunnel in Crush Roller) */ - m_gfxdecode->gfx(1)->transmask(bitmap,spriteclip, - (spriteram[offs] >> 2) | (m_spritebank << 6), - color, - fx,fy, - sx - 256,sy, - m_palette->transpen_mask(*m_gfxdecode->gfx(1), color & 0x3f, 0)); - } - /* In the Pac Man based games (NOT Pengo) the first two sprites must be offset */ - /* one pixel to the left to get a more correct placement */ - for (offs = 2*2; offs >= 0; offs -= 2) + return 0; +} + + +/************************************************************************* + + Sega Ali Baba + +**************************************************************************/ + +void alibaba_state::draw_clock(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +{ + // inactive half + if (m_mystery_clock <= 16) + { + int x = 120; + int y = 112; + + if (m_flipscreen) { - int color; - int sx,sy; - uint8_t fx,fy; - - if(m_inv_spr) - { - sx = spriteram_2[offs + 1]; - sy = 240 - (spriteram_2[offs]); - } - else - { - sx = 272 - spriteram_2[offs + 1]; - sy = spriteram_2[offs] - 31; - } - color = (spriteram[offs + 1] & 0x1f) | (m_colortablebank << 5) | (m_palettebank << 6); - - fx = (spriteram[offs] & 1) ^ m_inv_spr; - fy = (spriteram[offs] & 2) ^ ((m_inv_spr) << 1); - - m_gfxdecode->gfx(1)->transmask(bitmap,spriteclip, - (spriteram[offs] >> 2) | (m_spritebank << 6), - color, - fx,fy, - sx,sy + m_xoffsethack, - m_palette->transpen_mask(*m_gfxdecode->gfx(1), color & 0x3f, 0)); - - /* also plot the sprite with wraparound (tunnel in Crush Roller) */ - m_gfxdecode->gfx(1)->transmask(bitmap,spriteclip, - (spriteram[offs] >> 2) | (m_spritebank << 6), - color, - fx,fy, - sx - 256,sy + m_xoffsethack, - m_palette->transpen_mask(*m_gfxdecode->gfx(1), color & 0x3f, 0)); + x = 264 - x; + y = 208 - y; } + + m_gfxdecode->gfx(2)->transpen(bitmap, cliprect, 0x1f, 1, 0, 0, x, y, 0); } - if (m_bgpriority != 0) - m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0); + // active half + int x = 120; + int y = 96 + (m_mystery_clock & 0x10); + int fx = 0, fy = 0; + + if (m_flipscreen) + { + x = 264 - x; + y = 208 - y; + fx = !fx; + fy = !fy; + } + + m_gfxdecode->gfx(2)->transpen(bitmap, cliprect, m_mystery_clock ^ 0x1f, 1, fx, fy, x, y, 0); +} + +uint32_t alibaba_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +{ + m_bg_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0); + + // sprites clipped area is larger than with pacman + rectangle spriteclip = cliprect; + if (m_flipscreen) + spriteclip.min_x = 6*8; + else + spriteclip.max_x = 30*8-1; + + spriteclip &= cliprect; + draw_sprites(screen, bitmap, spriteclip); + + // draw the mystery item clock + if (m_mystery_control & 2) + draw_clock(screen, bitmap, cliprect); + return 0; } /************************************************************************* - Sega Pengo + Sega Pengo **************************************************************************/ @@ -409,20 +481,17 @@ void pacman_state::pengo_gfxbank_w(int state) /************************************************************************* -S2650 Games + S2650 Games **************************************************************************/ TILE_GET_INFO_MEMBER(pacman_state::s2650_get_tile_info) { - int colbank, code, attr; - - colbank = m_s2650games_tileram[tile_index & 0x1f] & 0x3; - - code = m_videoram[tile_index] + (colbank << 8); - attr = m_colorram[tile_index & 0x1f]; + int colbank = m_s2650games_tileram[tile_index & 0x1f] & 0x3; + int code = m_videoram[tile_index] + (colbank << 8); + int attr = m_colorram[tile_index & 0x1f]; - tileinfo.set(0,code,attr & 0x1f,0); + tileinfo.set(0, code, attr & 0x1f, 0); } VIDEO_START_MEMBER(pacman_state,s2650games) @@ -447,16 +516,14 @@ uint32_t pacman_state::screen_update_s2650games(screen_device &screen, bitmap_in { uint8_t *spriteram = m_spriteram; uint8_t *spriteram_2 = m_spriteram2; - int offs; m_bg_tilemap->draw(screen, bitmap, cliprect, 0,0); - for (offs = m_spriteram.bytes() - 2; offs > 2*2; offs -= 2) + for (int offs = m_spriteram.bytes() - 2; offs > 2*2; offs -= 2) { int color; int sx,sy; - sx = 255 - spriteram_2[offs + 1]; sy = spriteram_2[offs] - 15; color = spriteram[offs + 1] & 0x1f; @@ -469,14 +536,14 @@ uint32_t pacman_state::screen_update_s2650games(screen_device &screen, bitmap_in sx,sy, m_palette->transpen_mask(*m_gfxdecode->gfx(1), color & 0x3f, 0)); } + /* In the Pac Man based games (NOT Pengo) the first two sprites must be offset */ /* one pixel to the left to get a more correct placement */ - for (offs = 2*2;offs >= 0;offs -= 2) + for (int offs = 2*2;offs >= 0;offs -= 2) { int color; int sx,sy; - sx = 255 - spriteram_2[offs + 1]; sy = spriteram_2[offs] - 15; color = spriteram[offs + 1] & 0x1f; @@ -489,6 +556,7 @@ uint32_t pacman_state::screen_update_s2650games(screen_device &screen, bitmap_in sx,sy + m_xoffsethack, m_palette->transpen_mask(*m_gfxdecode->gfx(1), color & 0x3f, 0)); } + return 0; } @@ -500,9 +568,8 @@ void pacman_state::s2650games_videoram_w(offs_t offset, uint8_t data) void pacman_state::s2650games_colorram_w(offs_t offset, uint8_t data) { - int i; m_colorram[offset & 0x1f] = data; - for (i = offset; i < 0x0400; i += 32) + for (int i = offset; i < 0x0400; i += 32) m_bg_tilemap->mark_tile_dirty(i); } @@ -520,7 +587,7 @@ void pacman_state::s2650games_tilesbank_w(offs_t offset, uint8_t data) /************************************************************************* -Jr. Pac-Man + Jr. Pac-Man **************************************************************************/ @@ -554,7 +621,7 @@ TILEMAP_MAPPER_MEMBER(pacman_state::jrpacman_scan_rows) TILE_GET_INFO_MEMBER(pacman_state::jrpacman_get_tile_info) { - int color_index, code, attr; + int color_index; if (tile_index < 1792) { color_index = tile_index & 0x1f; @@ -564,10 +631,10 @@ TILE_GET_INFO_MEMBER(pacman_state::jrpacman_get_tile_info) color_index = tile_index + 0x80; } - code = m_videoram[tile_index] | (m_charbank << 8); - attr = (m_videoram[color_index] & 0x1f) | (m_colortablebank << 5) | (m_palettebank << 6); + int code = m_videoram[tile_index] | (m_charbank << 8); + int attr = (m_videoram[color_index] & 0x1f) | (m_colortablebank << 5) | (m_palettebank << 6); - tileinfo.set(0,code,attr,0); + tileinfo.set(0, code, attr, 0); } void pacman_state::jrpacman_mark_tile_dirty(int offset) diff --git a/src/mame/pacman/pacplus.cpp b/src/mame/pacman/pacplus.cpp index 311263060016c..cf9d30c97a556 100644 --- a/src/mame/pacman/pacplus.cpp +++ b/src/mame/pacman/pacplus.cpp @@ -23,7 +23,6 @@ uint8_t pacman_state::pacplus_decrypt(int addr, uint8_t e) uint32_t method = 0; const uint8_t *tbl; - /* pick method from bits 0 2 5 7 9 of the address */ method = picktable[ (addr & 0x001) | @@ -43,14 +42,10 @@ uint8_t pacman_state::pacplus_decrypt(int addr, uint8_t e) void pacman_state::pacplus_decode() { - int i; - uint8_t *RAM; - /* CPU ROMs */ - - RAM = memregion("maincpu")->base(); - for (i = 0; i < 0x4000; i++) + uint8_t *ROM = memregion("maincpu")->base(); + for (int i = 0; i < 0x4000; i++) { - RAM[i] = pacplus_decrypt(i,RAM[i]); + ROM[i] = pacplus_decrypt(i, ROM[i]); } } diff --git a/src/mame/pacman/pengo.cpp b/src/mame/pacman/pengo.cpp index 9687660601806..8a5d7af25356d 100644 --- a/src/mame/pacman/pengo.cpp +++ b/src/mame/pacman/pengo.cpp @@ -395,11 +395,11 @@ void pengo_state::pengo(machine_config &config) GFXDECODE(config, m_gfxdecode, m_palette, gfx_pengo); PALETTE(config, m_palette, FUNC(pengo_state::pacman_palette), 128 * 4, 32); - screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_raw(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART); - screen.set_screen_update(FUNC(pengo_state::screen_update_pacman)); - screen.set_palette(m_palette); - screen.screen_vblank().set(FUNC(pengo_state::vblank_irq)); + SCREEN(config, m_screen, SCREEN_TYPE_RASTER); + m_screen->set_raw(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART); + m_screen->set_screen_update(FUNC(pengo_state::screen_update_pacman)); + m_screen->set_palette(m_palette); + m_screen->screen_vblank().set(FUNC(pengo_state::vblank_irq)); MCFG_VIDEO_START_OVERRIDE(pengo_state,pengo) @@ -734,7 +734,6 @@ ROM_END * *************************************/ - void pengo_state::decode_pengo6(int end, int nodecend) { /* diff --git a/src/mame/philips/minitel_2_rpic.cpp b/src/mame/philips/minitel_2_rpic.cpp index 1869c8ed1808e..a0f91b0c16179 100644 --- a/src/mame/philips/minitel_2_rpic.cpp +++ b/src/mame/philips/minitel_2_rpic.cpp @@ -22,11 +22,7 @@ - Keyboard - 24C02 EPROM - Modem serial interface. - - What is implemented but not working : - - - The rear serial port.(Prise péri-informatique) - (Internal 8051 serial port emulation missing). + - The rear serial port (prise péri-informatique). What is not yet implemented : @@ -56,6 +52,10 @@ the modem port : "-modem null_modem -bitb socket.127.0.0.1:20000" Once mame started you can then send vdt files with netcat to this socket. + Example 2 : Connecting the modem and periinfo ports to different TCP + sockets : "-modem null_modem -bitb1 socket.127.0.0.1:20000 + -periinfo null_modem -bitb2 socket.127.0.0.1:20001" + ****************************************************************************/ #include "emu.h" @@ -170,14 +170,14 @@ class minitel_state : public driver_device void minitel_state::machine_start() { - m_palette->set_pen_color( 0, 0, 0, 0); - m_palette->set_pen_color( 1, 86, 86, 86); - m_palette->set_pen_color( 2, 172, 172, 172); - m_palette->set_pen_color( 3, 255, 255, 255); - m_palette->set_pen_color( 4, 44, 44, 44); - m_palette->set_pen_color( 5, 86, 86, 86); - m_palette->set_pen_color( 6, 172, 172, 172); - m_palette->set_pen_color( 7, 255, 255, 255); + m_palette->set_pen_color(0, 0, 0, 0); + m_palette->set_pen_color(1, 80, 80, 80); + m_palette->set_pen_color(2, 160, 160, 160); + m_palette->set_pen_color(3, 230, 230, 230); + m_palette->set_pen_color(4, 40, 40, 40); + m_palette->set_pen_color(5, 120, 120, 120); + m_palette->set_pen_color(6, 200, 200, 200); + m_palette->set_pen_color(7, 255, 255, 255); } void minitel_state::port1_w(uint8_t data) @@ -511,10 +511,10 @@ static DEVICE_INPUT_DEFAULTS_START( m_modem ) DEVICE_INPUT_DEFAULTS_END static DEVICE_INPUT_DEFAULTS_START( m_serport ) - DEVICE_INPUT_DEFAULTS( "RS232_TXBAUD", 0xff, RS232_BAUD_9600 ) - DEVICE_INPUT_DEFAULTS( "RS232_RXBAUD", 0xff, RS232_BAUD_9600 ) - DEVICE_INPUT_DEFAULTS( "RS232_DATABITS", 0xff, RS232_DATABITS_8 ) - DEVICE_INPUT_DEFAULTS( "RS232_PARITY", 0xff, RS232_PARITY_NONE ) + DEVICE_INPUT_DEFAULTS( "RS232_TXBAUD", 0xff, RS232_BAUD_1200 ) + DEVICE_INPUT_DEFAULTS( "RS232_RXBAUD", 0xff, RS232_BAUD_1200 ) + DEVICE_INPUT_DEFAULTS( "RS232_DATABITS", 0xff, RS232_DATABITS_7 ) + DEVICE_INPUT_DEFAULTS( "RS232_PARITY", 0xff, RS232_PARITY_EVEN ) DEVICE_INPUT_DEFAULTS( "RS232_STOPBITS", 0xff, RS232_STOPBITS_1 ) DEVICE_INPUT_DEFAULTS_END @@ -538,10 +538,12 @@ void minitel_state::minitel2(machine_config &config) RS232_PORT(config, m_modem, default_rs232_devices, nullptr); m_modem->rxd_handler().set_inputline(m_maincpu, MCS51_INT1_LINE).invert(); + m_modem->set_option_device_input_defaults("null_modem", DEVICE_INPUT_DEFAULTS_NAME(m_modem)); m_modem->set_option_device_input_defaults("terminal", DEVICE_INPUT_DEFAULTS_NAME(m_modem)); RS232_PORT(config, m_serport, default_rs232_devices, nullptr); m_serport->rxd_handler().set(FUNC(minitel_state::serial_rxd)); + m_serport->set_option_device_input_defaults("null_modem", DEVICE_INPUT_DEFAULTS_NAME(m_serport)); m_serport->set_option_device_input_defaults("terminal", DEVICE_INPUT_DEFAULTS_NAME(m_serport)); lineconnected = 0; diff --git a/src/mame/playmark/sderby.cpp b/src/mame/playmark/sderby.cpp index 2d39de1319e7b..d1392b11f0d6b 100644 --- a/src/mame/playmark/sderby.cpp +++ b/src/mame/playmark/sderby.cpp @@ -1368,8 +1368,30 @@ ZW3 PCB with 'MAGIC' sticker ROM_START( magictch ) ROM_REGION( 0x40000, "maincpu", 0 ) - ROM_LOAD16_BYTE( "22.u43", 0x00000, 0x20000, CRC(47f047b1) SHA1(f47ab9734f6bb1dc50baf159bca144fa79eac1a5) ) // TMS27C010A - ROM_LOAD16_BYTE( "23.u42", 0x00001, 0x20000, CRC(f63e31bf) SHA1(e96da519a8d6488d600e031ac48f5ce1a8a376f5) ) // TMS27C010A + ROM_LOAD16_BYTE( "22.u43", 0x00000, 0x20000, CRC(7826e130) SHA1(f4928661fee1170c3df03be0842cab57c338a7c6) ) + ROM_LOAD16_BYTE( "23.u42", 0x00001, 0x20000, CRC(8f74ec63) SHA1(b158851872dcc2af9c349926d26c36fd097fb418) ) + + ROM_REGION( 0x4008, "pic16c65", 0 ) + ROM_LOAD( "pic16c65.u28", 0x0000, 0x4008, NO_DUMP ) + + ROM_REGION( 0x040000, "oki", 0 ) + ROM_LOAD( "21.u16", 0x00000, 0x40000, CRC(e06a023f) SHA1(b4cd64f6c97e9c3e50a9658e171d748cb9f1c4ef) ) + + ROM_REGION( 0xa0000, "gfx", 0 ) + ROM_LOAD( "28.u76", 0x000000, 0x20000, CRC(ca49b54c) SHA1(69d6a3b32ebc357231b22ded40468971ba9ef8c3) ) + ROM_LOAD( "27.u77", 0x020000, 0x20000, CRC(55b10fe5) SHA1(caf16512afe1b3fa66018075598cbc2626a63b3e) ) + ROM_LOAD( "26.u78", 0x040000, 0x20000, CRC(d7974bd9) SHA1(b49678697e30d104a88adcc8e2c09cd62233c7b4) ) + ROM_LOAD( "25.u79", 0x060000, 0x20000, CRC(f825cb9d) SHA1(10ffa614ac82e5c625c36095b298a8acfc7465bf) ) + ROM_LOAD( "24.u80", 0x080000, 0x20000, CRC(3bdaea12) SHA1(8d9493ab80f96e6f941039ce6d1b8f1ed3c78379) ) + + ROM_REGION( 0x300, "plds", 0) + ROM_LOAD( "gal22cv10-15lnc.u40", 0x000, 0x2e5, NO_DUMP ) // soldered +ROM_END + +ROM_START( magictcha ) + ROM_REGION( 0x40000, "maincpu", 0 ) + ROM_LOAD16_BYTE( "22.u43", 0x00000, 0x20000, CRC(47f047b1) SHA1(f47ab9734f6bb1dc50baf159bca144fa79eac1a5) ) // TMS27C010A, SLDH + ROM_LOAD16_BYTE( "23.u42", 0x00001, 0x20000, CRC(f63e31bf) SHA1(e96da519a8d6488d600e031ac48f5ce1a8a376f5) ) // TMS27C010A, SLDH ROM_REGION( 0x4008, "pic16c65", 0 ) ROM_LOAD( "pic16c65.u28", 0x0000, 0x4008, NO_DUMP ) @@ -1451,5 +1473,6 @@ GAMEL( 1997, croupier, 0, pmroulet, pmroulet, sderby_state, empty_init, GAMEL( 1997, croupiera, croupier, pmroulet, pmroulet, sderby_state, empty_init, ROT0, "Playmark", "Croupier (Playmark Roulette v.09.04)", MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING, layout_pmroulet ) GAMEL( 1997, croupierb, croupier, zw3, croupierb, zw3_state, empty_init, ROT0, "Playmark", "Croupier II (Playmark Roulette v.03.09)", MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS, layout_pmroulet ) // title screen says Croupier 2 but every string in ROM says Croupier. GAME( 1996, luckboom, 0, luckboom, luckboom, sderby_state, empty_init, ROT0, "Playmark", "Lucky Boom", 0 ) -GAME( 1998, magictch, 0, zw3, magictch, zw3_state, empty_init, ROT0, "Playmark", "Magic Touch", MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS ) // sprite offsets aren't 100% correct, no PIC16C65 emulation, needs proper layout +GAME( 1998, magictch, 0, zw3, magictch, zw3_state, empty_init, ROT0, "Playmark", "Magic Touch (v. 28.05)", MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS ) // sprite offsets aren't 100% correct, no PIC16C65 emulation, needs proper layout +GAME( 1998, magictcha, magictch, zw3, magictch, zw3_state, empty_init, ROT0, "Playmark", "Magic Touch (v. 24.03)", MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS ) // sprite offsets aren't 100% correct, no PIC16C65 emulation, needs proper layout GAME( 1999, tropfrt, 0, zw3, tropfrt, zw3_state, empty_init, ROT0, "Playmark", "Tropical Fruits (V. 24-06.00 Rev. 4.0)", MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS ) // sprite offsets aren't 100% correct, no PIC16C74 emulation, needs proper layout diff --git a/src/mame/qume/qvt70.cpp b/src/mame/qume/qvt70.cpp index 5a8ebe3d8e5c9..ced83238763b2 100644 --- a/src/mame/qume/qvt70.cpp +++ b/src/mame/qume/qvt70.cpp @@ -35,10 +35,12 @@ ****************************************************************************/ #include "emu.h" + #include "cpu/z80/z80.h" #include "machine/z80sio.h" #include "bus/centronics/ctronics.h" #include "bus/rs232/rs232.h" + #include "emupal.h" #include "screen.h" diff --git a/src/mame/roland/roland_d70.cpp b/src/mame/roland/roland_d70.cpp index cc0c1d9f45342..0a2ac968a1304 100644 --- a/src/mame/roland/roland_d70.cpp +++ b/src/mame/roland/roland_d70.cpp @@ -23,6 +23,7 @@ #include "screen.h" #include "softlist_dev.h" #include "speaker.h" +#include "d70.lh" #include "multibyte.h" @@ -32,13 +33,15 @@ namespace { // unscramble address: ROM dump offset -> proper (descrambled) offset -#define UNSCRAMBLE_ADDR_INT(_offset) \ - bitswap<19>(_offset, 18, 17, 15, 14, 16, 12, 11, 7, 9, 13, 10, 8, 3, 2, 1, 6, 4, 5, 0) +template constexpr auto UNSCRAMBLE_ADDR_INT(T offset) { + return bitswap<19>(offset, 18, 17, 15, 14, 16, 12, 11, 7, 9, 13, 10, 8, 3, 2, 1, 6, 4, 5, 0); +} // scramble address: proper offset -> ROM dump offset -#define SCRAMBLE_ADDR_INT(_offset) \ - bitswap<19>(_offset, 18, 17, 14, 16, 15, 9, 13, 12, 8, 10, 7, 11, 3, 1, 2, 6, 5, 4, 0) +template constexpr auto SCRAMBLE_ADDR_INT(T offset) { + return bitswap<19>(offset, 18, 17, 14, 16, 15, 9, 13, 12, 8, 10, 7, 11, 3, 1, 2, 6, 5, 4, 0); +} -#define UNSCRAMBLE_DATA(_data) bitswap<8>(_data, 1, 2, 7, 3, 5, 0, 4, 6) +constexpr u8 UNSCRAMBLE_DATA(u8 data) { return bitswap<8>(data, 1, 2, 7, 3, 5, 0, 4, 6); } // Bitmasks for the display board interface via PORT1 static constexpr u8 CONT_MASK = 0b10000000; @@ -82,12 +85,14 @@ static INPUT_PORTS_START(d70) PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Number 8") PORT_CODE(KEYCODE_8) PORT_START("KEY3") - PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Inc/Ins") PORT_CODE(KEYCODE_H) - PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Dec/Del") PORT_CODE(KEYCODE_J) - PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("S") PORT_CODE(KEYCODE_DOWN) - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("A") PORT_CODE(KEYCODE_LEFT) - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("D") PORT_CODE(KEYCODE_RIGHT) - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("W") PORT_CODE(KEYCODE_UP) + // NOTE: Signals for DEC and INC buttons seem to be incorrectly described + // (swapped) on the schematics available in the service manual. + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Dec/Del") PORT_CODE(KEYCODE_H) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Inc/Ins") PORT_CODE(KEYCODE_J) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Down") PORT_CODE(KEYCODE_DOWN) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Left") PORT_CODE(KEYCODE_LEFT) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Right") PORT_CODE(KEYCODE_RIGHT) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Up") PORT_CODE(KEYCODE_UP) PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Midi Out") PORT_CODE(KEYCODE_N) PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Tone Display") PORT_CODE(KEYCODE_B) @@ -109,7 +114,7 @@ static INPUT_PORTS_START(d70) PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Tuning") PORT_CODE(KEYCODE_V) PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Attack") PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Release") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Pcm Card") PORT_CODE(KEYCODE_C) + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("PCM Card") PORT_CODE(KEYCODE_C) PORT_START("KEY6") PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Play") PORT_CODE(KEYCODE_Z) @@ -130,9 +135,40 @@ static INPUT_PORTS_START(d70) PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED) PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED) PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Effect/Ctrl") PORT_CODE(KEYCODE_M) + + PORT_START("PROTECT_SW") + PORT_DIPNAME(0x01, 0x01, "Memory Protect Switch") + PORT_DIPSETTING( 0x00, DEF_STR(On)) + PORT_DIPSETTING( 0x01, DEF_STR(Off)) + + PORT_START("SLIDER0") + PORT_ADJUSTER(100, "MODU") + + PORT_START("SLIDER1") + PORT_ADJUSTER(100, "AFTER") + + PORT_START("SLIDER2") + PORT_ADJUSTER(100, "C2") + + PORT_START("SLIDER3") + PORT_ADJUSTER(100, "C1") + + PORT_START("SLIDER4") + PORT_ADJUSTER(100, "LOWER (1)") + + PORT_START("SLIDER5") + PORT_ADJUSTER(100, "LOWER (2)") + + PORT_START("SLIDER6") + PORT_ADJUSTER(100, "UPPER (3)") + + PORT_START("SLIDER7") + PORT_ADJUSTER(100, "UPPER (4)") INPUT_PORTS_END -class roland_d70_state : public driver_device { + +class roland_d70_state : public driver_device +{ public: roland_d70_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), @@ -147,6 +183,9 @@ class roland_d70_state : public driver_device { m_lcd(*this, "lcd"), m_midi_timer(*this, "midi_timer"), m_keys(*this, "KEY%u", 0), + m_sliders(*this, "SLIDER%u", 0), + m_protect_sw(*this, "PROTECT_SW"), + m_selected_slider(0), m_sw_scan_index(0), m_sw_scan_bank(-1), m_sw_scan_state(0xff), @@ -157,22 +196,24 @@ class roland_d70_state : public driver_device { { } - void d70(machine_config &config); - void init_d70(); + void d70(machine_config &config) ATTR_COLD; + void init_d70() ATTR_COLD; protected: virtual void machine_start() override ATTR_COLD; private: void lcd_map(address_map &map) ATTR_COLD; - void lcd_palette(palette_device &palette) const; + void lcd_palette(palette_device &palette) const ATTR_COLD; void bank_w(u8 data); u8 ksga_io_r(offs_t offset); void ksga_io_w(offs_t offset, u8 data); u16 port0_r(); u8 port1_r(); + u8 port2_r(); void port1_w(u8 data); + void port2_w(u8 data); u8 dsp_io_r(offs_t offset); void dsp_io_w(offs_t offset, u8 data); u8 tvf_io_r(offs_t offset); @@ -193,8 +234,8 @@ class roland_d70_state : public driver_device { void d70_map(address_map &map) ATTR_COLD; - void descramble_rom_internal(u8 *dst, const u8 *src); - void descramble_rom_external(u8 *dst, const u8 *src); + void descramble_rom_internal(u8 *dst, const u8 *src) ATTR_COLD; + void descramble_rom_external(u8 *dst, const u8 *src) ATTR_COLD; memory_view m_bank_view; memory_share_creator m_ram; @@ -207,9 +248,12 @@ class roland_d70_state : public driver_device { required_device m_lcd; required_device m_midi_timer; required_ioport_array<8> m_keys; + required_ioport_array<8> m_sliders; + required_ioport m_protect_sw; u8 m_sound_io_buffer[0x100]; u8 m_dsp_io_buffer[0x80]; + u8 m_selected_slider; int m_sw_scan_index; int m_sw_scan_bank; u8 m_sw_scan_state; @@ -324,6 +368,17 @@ void roland_d70_state::port1_w(u8 data) { m_ram[0x0f / 2] = (m_ram[0x0f / 2] & 0x00ff) | (u16(m_sw_scan_current_out) << 8); } +u8 roland_d70_state::port2_r() { + u8 value = m_selected_slider << 5; + if (m_protect_sw->read()) + value |= (1 << 4); + return value; +} + +void roland_d70_state::port2_w(u8 data) { + m_selected_slider = data >> 5; +} + u8 roland_d70_state::dsp_io_r(offs_t offset) { return m_dsp_io_buffer[offset]; } @@ -412,18 +467,21 @@ void roland_d70_state::snd_io_w(offs_t offset, u8 data) { m_sound_io_buffer[offset] = data; } -u8 roland_d70_state::ach0_r() { return 128; } -u8 roland_d70_state::ach1_r() { return 128; } -u8 roland_d70_state::ach2_r() { return 128; } -u8 roland_d70_state::ach3_r() { return 128; } -u8 roland_d70_state::ach4_r() { return 128; } +u8 roland_d70_state::ach0_r() { + return m_sliders[m_selected_slider & 7]->read(); +} + +u8 roland_d70_state::ach1_r() { return 128; } // TODO: EXT PEDAL +u8 roland_d70_state::ach2_r() { return 128; } // TODO: BENDER +u8 roland_d70_state::ach3_r() { return 128; } // TODO: BATTERY +u8 roland_d70_state::ach4_r() { return 128; } // TODO: RAM CARD (VBB) TIMER_DEVICE_CALLBACK_MEMBER(roland_d70_state::samples_timer_cb) { } void roland_d70_state::lcd_palette(palette_device &palette) const { - palette.set_pen_color(0, rgb_t(138, 146, 148)); - palette.set_pen_color(1, rgb_t(69, 62, 66)); + palette.set_pen_color(0, rgb_t(0x9f, 0xb4, 0x86)); + palette.set_pen_color(1, rgb_t(0x5e, 0x5f, 0x71)); } void roland_d70_state::d70_map(address_map &map) { @@ -447,6 +505,8 @@ void roland_d70_state::d70(machine_config &config) { maincpu.in_p0_cb().set(FUNC(roland_d70_state::port0_r)); maincpu.in_p1_cb().set(FUNC(roland_d70_state::port1_r)); maincpu.out_p1_cb().set(FUNC(roland_d70_state::port1_w)); + maincpu.in_p2_cb().set(FUNC(roland_d70_state::port2_r)); + maincpu.out_p2_cb().set(FUNC(roland_d70_state::port2_w)); maincpu.ach0_cb().set(FUNC(roland_d70_state::ach0_r)); maincpu.ach1_cb().set(FUNC(roland_d70_state::ach1_r)); maincpu.ach2_cb().set(FUNC(roland_d70_state::ach2_r)); @@ -483,6 +543,8 @@ void roland_d70_state::d70(machine_config &config) { MIDI_PORT(config, "mdout", midiout_slot, "midiout"); MIDI_PORT(config, "mdthru", midiout_slot, "midiout"); + + config.set_default_layout(layout_d70); } void roland_d70_state::init_d70() { @@ -510,8 +572,33 @@ void roland_d70_state::descramble_rom_internal(u8 *dst, const u8 *src) { ROM_START(d70) ROM_REGION(0x20000, "maincpu", 0) - ROM_SYSTEM_BIOS(0, "v203", "Version 2.03") - ROMX_LOAD("roland_d70_v110_combined.bin", 0x00000, 0x20000, CRC(52deab1e) SHA1(87d7196888edec65c9feddd16d4c715f6992abc7), ROM_BIOS(0)) + ROM_DEFAULT_BIOS("v119") + ROM_SYSTEM_BIOS( 0, "v119", "Version 1.19 - March 9, 1993" ) + ROM_SYSTEM_BIOS( 1, "v116", "Version 1.16 - January 28, 1991" ) + ROM_SYSTEM_BIOS( 2, "v114", "Version 1.14 - September 20, 1990" ) + ROM_SYSTEM_BIOS( 3, "v112", "Version 1.12 - August 8, 1990" ) + ROM_SYSTEM_BIOS( 4, "v110", "Version 1.10 - April 19, 1990" ) + ROM_SYSTEM_BIOS( 5, "v100", "Version 1.00 - March 10, 1990" ) + + ROMX_LOAD("roland_d70_v1.19_a_even.ic4", 0, 0x10000, CRC(95fcf250) SHA1(174962eb42f56aaf936aeca4db77228bf19ec97a), ROM_BIOS(0) | ROM_SKIP(1) ) + ROMX_LOAD("roland_d70_v1.19_b_odd.ic9", 1, 0x10000, CRC(a14f0ce1) SHA1(9ef2d62b1be5c38b9fa0072a5889b8ab0e47623e), ROM_BIOS(0) | ROM_SKIP(1) ) + + ROMX_LOAD("roland_d70_v1.16_a_even.ic4", 0, 0x10000, CRC(761f6eac) SHA1(18bd2c8390d67f1000fae652f51a03322bb088cd), ROM_BIOS(1) | ROM_SKIP(1) ) + ROMX_LOAD("roland_d70_v1.16_b_odd.ic9", 1, 0x10000, CRC(103a1f07) SHA1(530408a8ae8d74786cb8179892b7e3a24db93000), ROM_BIOS(1) | ROM_SKIP(1) ) + + ROMX_LOAD("roland_d70_v1.14_a_even.ic4", 0, 0x10000, CRC(651e7cd5) SHA1(73ad2d897f51449111064e92b515a4118fee4dad), ROM_BIOS(2) | ROM_SKIP(1) ) + ROMX_LOAD("roland_d70_v1.14_b_odd.ic9", 1, 0x10000, CRC(b3533278) SHA1(8c2019c20b60d4fbb5f5956bce672a84f515215b), ROM_BIOS(2) | ROM_SKIP(1) ) + + ROMX_LOAD("roland_d70_v1.12_a_even.ic4", 0, 0x10000, CRC(86032879) SHA1(07e7545c2dae93311f7b5d77b65c548e56391748), ROM_BIOS(3) | ROM_SKIP(1) ) + ROMX_LOAD("roland_d70_v1.12_b_odd.ic9", 1, 0x10000, CRC(910cf30e) SHA1(15cb5ecb956205dc9d6254822178139a228790d8), ROM_BIOS(3) | ROM_SKIP(1) ) + + ROMX_LOAD("roland_d70_v1.10_a_even.ic4", 0, 0x10000, CRC(5f7374c5) SHA1(15d9249c35c3db6a7d1df6a4f4e42f0ce99f11a5), ROM_BIOS(4) | ROM_SKIP(1) ) + ROMX_LOAD("roland_d70_v1.10_b_odd.ic9", 1, 0x10000, CRC(f024220e) SHA1(cde358c1ec205f446114f478b43269b01b8be048), ROM_BIOS(4) | ROM_SKIP(1) ) + + // Seen at https://www.youtube.com/watch?v=9zGcHzpz7zo + ROMX_LOAD("roland_d70_v1.00_a_even.ic4", 0, 0x10000, NO_DUMP, ROM_BIOS(5) | ROM_SKIP(1) ) + ROMX_LOAD("roland_d70_v1.00_b_odd.ic9", 1, 0x10000, NO_DUMP, ROM_BIOS(5) | ROM_SKIP(1) ) + ROM_REGION(0x600000, "pcmorg", 0) // ROMs before descrambling ROM_LOAD("roland_d70_waverom-a.bin", 0x000000, 0x80000, CRC(8e53b2a3) SHA1(4872530870d5079776e80e477febe425dc0ec1df)) diff --git a/src/mame/sanritsu/drmicro.cpp b/src/mame/sanritsu/drmicro.cpp index b095e1d0abf2a..32836cf77ab58 100644 --- a/src/mame/sanritsu/drmicro.cpp +++ b/src/mame/sanritsu/drmicro.cpp @@ -251,6 +251,7 @@ void drmicro_state::pcm_set_w(uint8_t data) pcm_w(1); } + /************************************* * * Address maps @@ -277,6 +278,7 @@ void drmicro_state::io_map(address_map &map) map(0x05, 0x05).noprw(); // unused? / watchdog? } + /************************************* * * Input ports @@ -343,6 +345,7 @@ static INPUT_PORTS_START( drmicro ) PORT_DIPUNUSED_DIPLOC( 0x80, IP_ACTIVE_HIGH, "SW2:!8" ) // Service Mode shows as "X" INPUT_PORTS_END + /************************************* * * Graphics definitions @@ -432,8 +435,6 @@ void drmicro_state::drmicro(machine_config &config) m_maincpu->set_addrmap(AS_IO, &drmicro_state::io_map); m_maincpu->set_vblank_int("screen", FUNC(drmicro_state::interrupt)); - config.set_maximum_quantum(attotime::from_hz(60)); - // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(60); @@ -449,9 +450,9 @@ void drmicro_state::drmicro(machine_config &config) // sound hardware SPEAKER(config, "mono").front_center(); - SN76496(config, "sn1", MCLK / 4).add_route(ALL_OUTPUTS, "mono", 0.50); - SN76496(config, "sn2", MCLK / 4).add_route(ALL_OUTPUTS, "mono", 0.50); - SN76496(config, "sn3", MCLK / 4).add_route(ALL_OUTPUTS, "mono", 0.50); + SN76496(config, "sn1", MCLK / 6).add_route(ALL_OUTPUTS, "mono", 0.50); + SN76496(config, "sn2", MCLK / 6).add_route(ALL_OUTPUTS, "mono", 0.50); + SN76496(config, "sn3", MCLK / 6).add_route(ALL_OUTPUTS, "mono", 0.50); MSM5205(config, m_msm, 384_kHz_XTAL); m_msm->vck_legacy_callback().set(FUNC(drmicro_state::pcm_w)); // IRQ handler @@ -459,6 +460,7 @@ void drmicro_state::drmicro(machine_config &config) m_msm->add_route(ALL_OUTPUTS, "mono", 0.75); } + /************************************* * * ROM definition(s) diff --git a/src/mame/sega/coolridr.cpp b/src/mame/sega/coolridr.cpp index ab0a6da018056..cbd052ebb9863 100644 --- a/src/mame/sega/coolridr.cpp +++ b/src/mame/sega/coolridr.cpp @@ -2982,11 +2982,6 @@ void coolridr_state::scsp_map(address_map &map) } -static GFXDECODE_START( gfx_coolridr ) -// GFXDECODE_ENTRY( nullptr, 0, tiles16x16_layout, 0, 0x100 ) -GFXDECODE_END - - static INPUT_PORTS_START( coolridr ) PORT_START("IN0") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_NAME("P1 Coin") @@ -3253,7 +3248,7 @@ void coolridr_state::coolridr(machine_config &config) io.an_port_callback<5>().set_ioport("AN5"); io.an_port_callback<6>().set_ioport("AN6"); - GFXDECODE(config, m_gfxdecode, m_palette, gfx_coolridr); + GFXDECODE(config, m_gfxdecode, m_palette, gfxdecode_device::empty); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); m_screen->set_refresh_hz(57); // measured at 57.0426Hz diff --git a/src/mame/sega/mdconsole.cpp b/src/mame/sega/mdconsole.cpp index 6ddda9a62b6cb..976969cb6654b 100644 --- a/src/mame/sega/mdconsole.cpp +++ b/src/mame/sega/mdconsole.cpp @@ -657,7 +657,7 @@ void md_cons_cd_state::genesis_scd(machine_config &config) CDROM(config, "cdrom").set_interface("scd_cdrom"); - SOFTWARE_LIST(config, "cd_list").set_original("segacd"); + SOFTWARE_LIST(config, "cd_list").set_original("megacd").set_filter("NTSC-U"); } void md_cons_cd_state::genesis2_scd(machine_config &config) @@ -677,7 +677,7 @@ void md_cons_cd_state::genesis2_scd(machine_config &config) CDROM(config, "cdrom").set_interface("scd_cdrom"); - SOFTWARE_LIST(config, "cd_list").set_original("segacd"); + SOFTWARE_LIST(config, "cd_list").set_original("megacd").set_filter("NTSC-U"); } void md_cons_cd_state::md_scd(machine_config &config) @@ -698,7 +698,7 @@ void md_cons_cd_state::md_scd(machine_config &config) CDROM(config, "cdrom").set_interface("scd_cdrom"); - SOFTWARE_LIST(config, "cd_list").set_original("megacd"); + SOFTWARE_LIST(config, "cd_list").set_original("megacd").set_filter("PAL"); } void md_cons_cd_state::md2_scd(machine_config &config) @@ -718,7 +718,7 @@ void md_cons_cd_state::md2_scd(machine_config &config) CDROM(config, "cdrom").set_interface("scd_cdrom"); - SOFTWARE_LIST(config, "cd_list").set_original("megacd"); + SOFTWARE_LIST(config, "cd_list").set_original("megacd").set_filter("PAL"); } void md_cons_cd_state::mdj_scd(machine_config &config) @@ -739,7 +739,7 @@ void md_cons_cd_state::mdj_scd(machine_config &config) CDROM(config, "cdrom").set_interface("scd_cdrom"); - SOFTWARE_LIST(config, "cd_list").set_original("megacdj"); + SOFTWARE_LIST(config, "cd_list").set_original("megacd").set_filter("NTSC-J"); } void md_cons_cd_state::md2j_scd(machine_config &config) @@ -759,7 +759,7 @@ void md_cons_cd_state::md2j_scd(machine_config &config) CDROM(config, "cdrom").set_interface("scd_cdrom"); - SOFTWARE_LIST(config, "cd_list").set_original("megacdj"); + SOFTWARE_LIST(config, "cd_list").set_original("megacd").set_filter("NTSC-J"); } /******************SEGA CD + 32X****************************/ @@ -781,7 +781,7 @@ void md_cons_cd_state::genesis_32x_scd(machine_config &config) GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "_32x_cart", "32x,bin").set_device_load(FUNC(md_cons_cd_state::_32x_cart)); //config.m_perfect_cpu_quantum = subtag("32x_master_sh2"); - SOFTWARE_LIST(config, "cd_list").set_original("segacd"); + SOFTWARE_LIST(config, "cd_list").set_original("megacd").set_filter("NTSC-U"); } void md_cons_cd_state::md_32x_scd(machine_config &config) @@ -801,7 +801,7 @@ void md_cons_cd_state::md_32x_scd(machine_config &config) GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "_32x_cart", "32x,bin").set_device_load(FUNC(md_cons_cd_state::_32x_cart)); //config.m_perfect_cpu_quantum = subtag("32x_master_sh2"); - SOFTWARE_LIST(config, "cd_list").set_original("megacd"); + SOFTWARE_LIST(config, "cd_list").set_original("megacd").set_filter("PAL"); } void md_cons_cd_state::mdj_32x_scd(machine_config &config) @@ -821,7 +821,7 @@ void md_cons_cd_state::mdj_32x_scd(machine_config &config) GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "_32x_cart", "32x,bin").set_device_load(FUNC(md_cons_cd_state::_32x_cart)); //config.m_perfect_cpu_quantum = subtag("32x_master_sh2"); - SOFTWARE_LIST(config, "cd_list").set_original("megacdj"); + SOFTWARE_LIST(config, "cd_list").set_original("megacd").set_filter("NTSC-J"); } /* We need proper names for most of these BIOS ROMs! */ diff --git a/src/mame/sega/segag80r.cpp b/src/mame/sega/segag80r.cpp index 7a650494c347d..0a851a6ab44b6 100644 --- a/src/mame/sega/segag80r.cpp +++ b/src/mame/sega/segag80r.cpp @@ -811,19 +811,19 @@ static const gfx_layout charlayout = static GFXDECODE_START( gfx_segag80r ) - GFXDECODE_ENTRY( nullptr, 0x0000, charlayout, 0, 16 ) + GFXDECODE_RAM( nullptr, 0x0000, charlayout, 0, 16 ) GFXDECODE_END static GFXDECODE_START( gfx_spaceod ) - GFXDECODE_ENTRY( nullptr, 0x0000, charlayout, 0, 16 ) - GFXDECODE_ENTRY( "gfx1", 0x0000, gfx_8x8x6_planar, 64, 1 ) + GFXDECODE_RAM( nullptr, 0x0000, charlayout, 0, 16 ) + GFXDECODE_ENTRY( "gfx1", 0x0000, gfx_8x8x6_planar, 64, 1 ) GFXDECODE_END static GFXDECODE_START( gfx_monsterb ) - GFXDECODE_ENTRY( nullptr, 0x0000, charlayout, 0, 16 ) - GFXDECODE_ENTRY( "gfx1", 0x0000, gfx_8x8x2_planar, 64, 16 ) + GFXDECODE_RAM( nullptr, 0x0000, charlayout, 0, 16 ) + GFXDECODE_ENTRY( "gfx1", 0x0000, gfx_8x8x2_planar, 64, 16 ) GFXDECODE_END diff --git a/src/mame/sega/segas32_v.cpp b/src/mame/sega/segas32_v.cpp index 7b921596f665a..6251cd135d5de 100644 --- a/src/mame/sega/segas32_v.cpp +++ b/src/mame/sega/segas32_v.cpp @@ -17,9 +17,8 @@ The theory is that opaque pens should go above background layer and behind everything else like System 24. - - radr uses $1A0 as the X center for zooming; however, this - contradicts the theory that bit 9 is a sign bit. For now, the code - assumes that the X center has 10 bits of resolution. + - Verify that X/Y center has 10 bits of resolution when zooming and + 9 when not. - In svf (the field) and radr (on the field), they use tilemap-specific flip in conjunction with rowscroll AND rowselect. According to Charles, @@ -33,10 +32,6 @@ effect to draw the boxing ring over NBG0. Same deal for ga2 when in stage 2 cave a wall torch is lit. - - harddunk draws solid white in attract mode when the players are presented. - NBG0 is set with $200 on center X/Y, same as above or perhaps missing - tilemap wraparound? - - Wrong priority cases (parenthesis for the level setup): dbzvrvs: draws text layer ($e) behind sprite-based gauges ($f). dbzvrvs: Sheng-Long speech balloon during Piccoro ending (fixme: check levels). @@ -126,14 +121,15 @@ F44 -wwwwwww -------- Layer 1 upper-right page select -------- -wwwwwww Layer 1 upper-left page select F46 -wwwwwww -------- Layer 1 lower-right page select - -------- -wwwwwww Layer 2 upper-left page select - F48 -wwwwwww -------- Layer 2 upper-right page select - -------- -wwwwwww Layer 2 lower-left page select - F4A -wwwwwww -------- Layer 2 lower-right page select - -------- -wwwwwww Layer 3 upper-left page select - -wwwwwww -------- Layer 3 upper-right page select - F4E -------- -wwwwwww Layer 3 lower-left page select - -wwwwwww -------- Layer 3 lower-right page select + -------- -wwwwwww Layer 1 lower-left page select + F48 -wwwwwww -------- Layer 2 upper-left page select + -------- -wwwwwww Layer 2 upper-right page select + F4A -wwwwwww -------- Layer 2 lower-left page select + -------- -wwwwwww Layer 2 lower-right page select + F4C -wwwwwww -------- Layer 3 upper-left page select + -------- -wwwwwww Layer 3 upper-right page select + F4E -wwwwwww -------- Layer 3 lower-left page select + -------- -wwwwwww Layer 3 lower-right page select F50 xxxxxxxx xxxxxxxx Layer 0 X step increment (0x200 = 1.0) F52 yyyyyyyy yyyyyyyy Layer 0 Y step increment (0x200 = 1.0) F54 xxxxxxxx xxxxxxxx Layer 1 X step increment (0x200 = 1.0) @@ -743,9 +739,14 @@ void segas32_state::update_tilemap_zoom(screen_device &screen, segas32_state::la uint32_t srcy = (m_videoram[0x1ff16/2 + 4 * bgnum] & 0x1ff) << 20; srcy += (m_videoram[0x1ff14/2 + 4 * bgnum] & 0xfe00) << 4; - /* then account for the destination center coordinates */ - srcx_start -= util::sext(m_videoram[0x1ff30/2 + 2 * bgnum], 10) * srcxstep; - srcy -= util::sext(m_videoram[0x1ff32/2 + 2 * bgnum], 9) * srcystep; + /* + Then account for the destination center coordinates - We currently expand the resolution + from 9 bit to 10 bit while zooming which correctly centers the bg during attract mode in + harddunk at the lower resolution and the course selection bg in radr at the higher resolution. + This behavior has not been verified yet on real hardware and might be a hack. + */ + srcx_start -= util::sext(m_videoram[0x1ff30/2 + 2 * bgnum], (dstxstep != 0x200) ? 10 : 9) * srcxstep; + srcy -= util::sext(m_videoram[0x1ff32/2 + 2 * bgnum], (dstystep != 0x200) ? 10 : 9) * srcystep; /* finally, account for destination top,left coordinates */ srcx_start += cliprect.min_x * srcxstep; diff --git a/src/mame/seta/macs.cpp b/src/mame/seta/macs.cpp index f891e7fcbc5a1..1d4cafac73511 100644 --- a/src/mame/seta/macs.cpp +++ b/src/mame/seta/macs.cpp @@ -221,10 +221,6 @@ void macs_state::macs_io(address_map &map) //map(0xf0, 0xf0).rw(FUNC(macs_state::st0016_dma_r)); } -//static GFXDECODE_START( macs ) -// GFXDECODE_ENTRY( nullptr, 0, charlayout, 0, 16*4 ) -//GFXDECODE_END - static INPUT_PORTS_START( macs_base ) PORT_START("DSW0") PORT_DIPNAME( 0x01, 0x01, "DSW0 - BIT 1" ) diff --git a/src/mame/seta/seta2.cpp b/src/mame/seta/seta2.cpp index 838f7c3d6ebe2..a70617b2e6d25 100644 --- a/src/mame/seta/seta2.cpp +++ b/src/mame/seta/seta2.cpp @@ -3753,6 +3753,24 @@ ROM_START( endrichsa ) ROM_LOAD( "gal16v8_kf-001.u38", 0x000, 0x117, NO_DUMP ) ROM_END +ROM_START( endrichsb ) + ROM_REGION( 0x100000, "maincpu", 0 ) // TMP68301 Code + ROM_LOAD16_BYTE( "kfp_u02_c11.u2", 0x00000, 0x80000, CRC(12613215) SHA1(b39526b13fdf6ce7d7ece664356a075f61fea368) ) + ROM_LOAD16_BYTE( "kfp_u03_c11.u3", 0x00001, 0x80000, CRC(e32152eb) SHA1(2dbe413fc1fb84a88b3033ad567b743ca70e0d74) ) + + ROM_REGION( 0x800000, "sprites", 0 ) // Sprites + ROM_LOAD64_WORD( "kfc-u16-c00.u16", 0x000000, 0x200000, CRC(cbfe5e0f) SHA1(6c7c8088c43231997ac47ce05cf43c78c1fdad47) ) + ROM_LOAD64_WORD( "kfc-u15-c00.u15", 0x000002, 0x200000, CRC(98e4c36c) SHA1(651be122b78f225d38878ae90776f66989440590) ) + ROM_LOAD64_WORD( "kfc-u18-c00.u18", 0x000004, 0x200000, CRC(561ac136) SHA1(96da493157405a5d3d72b8cc3004abd3fa3eadfa) ) + ROM_LOAD64_WORD( "kfc-u17-c00.u17", 0x000006, 0x200000, CRC(34660029) SHA1(cf09b97422497d739f71e6ff8b9974fca0329928) ) + + ROM_REGION( 0x200000, "x1snd", 0 ) // Samples + ROM_LOAD( "kfs-u32-c00.u32", 0x000000, 0x200000, CRC(e9ffbecf) SHA1(3cc9ab3f4be1a305235603a68ca1e15797fb27cb) ) + + ROM_REGION( 0x117, "plds", 0 ) + ROM_LOAD( "gal16v8_kf-001.u38", 0x000, 0x117, NO_DUMP ) +ROM_END + /*************************************************************************** Star Audition @@ -4415,6 +4433,7 @@ GAME( 1997, reelquak, 0, reelquak, reelquak, seta2_state, empty_init, GAME( 1999, endrichs, 0, reelquak, endrichs, seta2_state, empty_init, ROT0, "E.N.Tiger", "Endless Riches (Ver 1.21)", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS ) GAME( 1999, endrichsa, endrichs, reelquak, endrichs, seta2_state, empty_init, ROT0, "E.N.Tiger", "Endless Riches (Ver 1.20)", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS ) +GAME( 1999, endrichsb, endrichs, reelquak, endrichs, seta2_state, empty_init, ROT0, "E.N.Tiger", "Endless Riches (Ver 1.10)", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS ) GAME( 1997, staraudi, 0, staraudi, staraudi, staraudi_state, empty_init, ROT0, "Namco", "Star Audition", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) // needs flipscreen hooking up properly with new code to function at all diff --git a/src/mame/seta/ssv.cpp b/src/mame/seta/ssv.cpp index 88633bdf816b0..a60a44c24f2ea 100644 --- a/src/mame/seta/ssv.cpp +++ b/src/mame/seta/ssv.cpp @@ -2358,7 +2358,7 @@ static const gfx_layout layout_16x8x8_ram = }; static GFXDECODE_START( gfx_eaglshot ) - GFXDECODE_ENTRY( nullptr, 0, layout_16x8x8_ram, 0, 0x8000/64 ) // [0] Sprites (256 colors, decoded from RAM) + GFXDECODE_RAM( nullptr, 0, layout_16x8x8_ram, 0, 0x8000/64 ) // [0] Sprites (256 colors, decoded from RAM) GFXDECODE_END static GFXDECODE_START( gfx_gdfs ) diff --git a/src/mame/sgi/gm1.cpp b/src/mame/sgi/gm1.cpp new file mode 100644 index 0000000000000..f56a00065232d --- /dev/null +++ b/src/mame/sgi/gm1.cpp @@ -0,0 +1,138 @@ +// license:BSD-3-Clause +// copyright-holders:Patrick Mackinlay + +/* + * Silicon Graphics GT Graphics (aka Clover 2) Graphics Manager 1 (GM1) board, part 030-0076-00[34]. + * + * TODO: + * - everything (skeleton only) + * + * WIP: + * - launch with -vme:slot9 gm1 [-vme:slot9:gm1:serial0 terminal] + * - skeleton is sufficient to pass gm1 diagnostics, but nothing else + */ + +#include "emu.h" +#include "gm1.h" + +//#define VERBOSE (LOG_GENERAL) + +#include "logmacro.h" + +DEFINE_DEVICE_TYPE(SGI_GM1, sgi_gm1_device, "sgi_gm1", "SGI GM1") + +sgi_gm1_device::sgi_gm1_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock) + : device_t(mconfig, SGI_GM1, tag, owner, clock) + , device_vme_card_interface(mconfig, *this) + , m_cpu(*this, "cpu") + , m_duart(*this, "duart") + , m_serial(*this, "serial%u", 0U) +{ +} + +void sgi_gm1_device::cpu_map(address_map &map) +{ + map(0x0000'0000, 0x0000'ffff).rom().region("eprom", 0); + + map(0x0200'0000, 0x0200'000f).rw(m_duart, FUNC(scn2681_device::read), FUNC(scn2681_device::write)); + + map(0x9800'0000, 0x980f'ffff).ram().share("gm_dram"); // 1M? + + // polygon processor (pp) interface? + map(0xc800'2000, 0xc800'3fff).ram().share("pp_sram"); // 8K + map(0xc800'4000, 0xc800'4003).umask32(0xffff'0000).lr16([this]() { return m_pp_wc; }, "pp_wc_r"); + + map(0xcc00'0000, 0xcc00'0000).umask32(0xff00'0000).lrw8( + []() { return 0x02; }, "pp_sts_r", + [this](u8 data) { LOG("pp_cmd_w 0x%02x (%s)\n", data, machine().describe_context()); }, "pp_cmd_w"); + map(0xcc00'0010, 0xcc00'0013).umask32(0xffff'0000).lw16([this](u16 data) { m_pp_wc = data; }, "pp_wc_w"); + + map(0xce00'0000, 0xce00'ffff).ram().share("pp_ucode"); // 64K? +} + +void sgi_gm1_device::vme_a16_map(address_map &map) +{ + map(0x0, 0x3).umask32(0x0000'ffff).rw(FUNC(sgi_gm1_device::status_r), FUNC(sgi_gm1_device::reset_w)); + map(0x4, 0x7).umask32(0x0000'ffff).w(FUNC(sgi_gm1_device::interrupt_w)); + map(0x8, 0xb).umask32(0x0000'ffff).w(FUNC(sgi_gm1_device::interrupt_disable_w)); + map(0xc, 0xf).umask32(0x0000'ffff).w(FUNC(sgi_gm1_device::interrupt_vector_w)); +} +void sgi_gm1_device::vme_a32_map(address_map &map) +{ + map(0x0000'0000, 0x000f'ffff).ram().share("gm_dram"); + // TODO: pipe +} + +u16 sgi_gm1_device::status_r() { return 0x0700; } +void sgi_gm1_device::reset_w(u16 data) { LOG("reset_w 0x%04x (%s)\n", data, machine().describe_context()); } +void sgi_gm1_device::interrupt_w(u16 data) { LOG("interrupt_w 0x%04x (%s)\n", data, machine().describe_context()); } +void sgi_gm1_device::interrupt_disable_w(u16 data) { LOG("interrupt_disable_w 0x%04x (%s)\n", data, machine().describe_context()); } +void sgi_gm1_device::interrupt_vector_w(u16 data) { LOG("interrupt_vector_w 0x%04x (%s)\n", data, machine().describe_context()); } + +void sgi_gm1_device::device_add_mconfig(machine_config &config) +{ + /* + * irq source + * 1 unused + * 2 pp + * 3 unused + * 4 fifo + * 5 retrace + * 6 host + * 7 uart + */ + M68020(config, m_cpu, 16_MHz_XTAL); + m_cpu->set_addrmap(AS_PROGRAM, &sgi_gm1_device::cpu_map); + + SCN2681(config, m_duart, 3.6864_MHz_XTAL); // SCN2681AC1N24 + + RS232_PORT(config, m_serial[0], default_rs232_devices, nullptr); + RS232_PORT(config, m_serial[1], default_rs232_devices, nullptr); + + m_duart->irq_cb().set_inputline(m_cpu, INPUT_LINE_IRQ7); + m_duart->a_tx_cb().set(m_serial[0], FUNC(rs232_port_device::write_txd)); + m_duart->b_tx_cb().set(m_serial[1], FUNC(rs232_port_device::write_txd)); + + m_serial[0]->rxd_handler().set(m_duart, FUNC(scn2681_device::rx_a_w)); + m_serial[1]->rxd_handler().set(m_duart, FUNC(scn2681_device::rx_b_w)); +} + +void sgi_gm1_device::device_start() +{ + m_pp_wc = 0; +} + +void sgi_gm1_device::device_reset() +{ + /* + * #define GM_VME_BASE_ADDR 0xbd002000 // in VME A16 space + * #define GM_VME_DRAM_ADDR 0xb8800000 // in VME A32 space + * #define GM_VME_PIPE_ADDR 0xb8900000 // in VME A32 space + */ + vme_space(vme::AM_2d).install_device(0x2000, 0x200f, *this, &sgi_gm1_device::vme_a16_map); + vme_space(vme::AM_09).install_device(0x1880'0000, 0x189f'ffff, *this, &sgi_gm1_device::vme_a32_map); + + // FIXME: interrupts asserted at power-on? + m_cpu->set_input_line(INPUT_LINE_IRQ2, HOLD_LINE); + m_cpu->set_input_line(INPUT_LINE_IRQ5, HOLD_LINE); +} + +ROM_START(gm1) + ROM_REGION32_BE(0x10000, "eprom", 0) + + // "GM-1 Prom revision Thu Mar 16 18:52:42 PST 1989" + ROM_LOAD("070-0253-005.bin", 0x00000, 0x10000, CRC(a5b883b8) SHA1(ad22a07d0a57b012e708b38216b7f3e600e12597)) +ROM_END + +static INPUT_PORTS_START(gm1) +INPUT_PORTS_END + +tiny_rom_entry const *sgi_gm1_device::device_rom_region() const +{ + return ROM_NAME(gm1); +} + +ioport_constructor sgi_gm1_device::device_input_ports() const +{ + return INPUT_PORTS_NAME(gm1); +} diff --git a/src/mame/sgi/gm1.h b/src/mame/sgi/gm1.h new file mode 100644 index 0000000000000..2358d4b1a9f85 --- /dev/null +++ b/src/mame/sgi/gm1.h @@ -0,0 +1,51 @@ +// license:BSD-3-Clause +// copyright-holders:Patrick Mackinlay + +#ifndef MAME_SGI_GM1_H +#define MAME_SGI_GM1_H + +#pragma once + +#include "cpu/m68000/m68020.h" + +#include "machine/mc68681.h" +#include "machine/timer.h" + +#include "bus/rs232/rs232.h" +#include "bus/vme/vme.h" + +class sgi_gm1_device + : public device_t + , public device_vme_card_interface +{ +public: + sgi_gm1_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock); + +protected: + virtual tiny_rom_entry const *device_rom_region() const override ATTR_COLD; + virtual void device_add_mconfig(machine_config &config) override ATTR_COLD; + virtual ioport_constructor device_input_ports() const override ATTR_COLD; + virtual void device_start() override ATTR_COLD; + virtual void device_reset() override ATTR_COLD; + + void cpu_map(address_map &map) ATTR_COLD; + void vme_a16_map(address_map &map) ATTR_COLD; + void vme_a32_map(address_map &map) ATTR_COLD; + + u16 status_r(); + void reset_w(u16 data); + void interrupt_w(u16 data); + void interrupt_disable_w(u16 data); + void interrupt_vector_w(u16 data); + +private: + required_device m_cpu; + required_device m_duart; + required_device_array m_serial; + + u16 m_pp_wc; // pp sram word count +}; + +DECLARE_DEVICE_TYPE(SGI_GM1, sgi_gm1_device) + +#endif // MAME_SGI_GM1_H diff --git a/src/mame/sgi/ip4.cpp b/src/mame/sgi/ip4.cpp index 6f1e7a996f08f..50345d578cd51 100644 --- a/src/mame/sgi/ip4.cpp +++ b/src/mame/sgi/ip4.cpp @@ -3,11 +3,50 @@ /* * Silicon Graphics Professional IRIS 4D/50 and 4D/70 CPU board. - * + */ + +/* * WIP: + * + * bios 0: configuration is already set in the provided nvram, otherwise configure monitor as follows: + * setenv bootfile dksc(0,1,8)sash # configure boot device + * setenv netaddr 192.168.137.2 # configure network address + * setenv console d # configure terminal I/O + * + * label/partition disk using fx: + * boot -f dksc(0,4,8)sash.IP4 + * boot -f dksc(0,4,7)stand/fx.IP4 # start fx, enable advanced options + * # label all, sync, exit + * + * install irix from cdrom: + * boot -f dksc(0,4,8)sash.IP4 --m # start sash from CDROM, and copy/boot miniroot from swap + * install audio.data.sounds # optionally install sound data + * go # launch installation + * quit # exit installer, wait for post-installation processing + * + * use "auto" to boot from monitor + * + * bios 1 fpu diagnostic fails at 0x9fc0499c: + * fcr31=0 + * f2=0x7fe52c4d'716169fe + * cvt.w.s $f20,$f2 # result: f20=0xffffffff'80000000 fcr31=0x00010040 == "invalid operation" cause + flag + * cvt.s.d $f20,$f2 # result: f20=0xffffffff'7f800000 fcr31=0x00015054 == "invalid operation" cause + flag + overflow/inexact + * ... + * expect fcr31 == 0x00020000 == "unimplemented operation" + * + * bios 1 also recognizes cdrom as floppy, requiring installation workarounds: + * setenv tapedevice dksc(0,4,8) * setenv root dks0d1s0 - * setenv bootfile dksc(0,1,8)sash - * auto + * boot -f dksc(0,4,8)sash.IP4 --m + * sh: mkdir /mnt; mount /dev/dks0d4s7 /mnt; exit + * from /mnt/dist + * go + * + * TODO: + * - fpu/cpu id, switches and leds + * - fix parity diagnostic error + * - fpu unimplemented operations + * */ #include "emu.h" @@ -18,6 +57,7 @@ #include "bus/nscsi/hd.h" #include "bus/nscsi/cd.h" +#include "bus/nscsi/tape.h" #include "bus/rs232/hlemouse.h" #include "kbd.h" @@ -46,12 +86,14 @@ sgi_ip4_device::sgi_ip4_device(machine_config const &mconfig, char const *tag, d , m_nvram(*this, "nvram", 0x800, ENDIANNESS_BIG) , m_ram(*this, "ram") , m_leds(*this, "led%u", 0U) + , m_dma_hi{} + , m_dma_page(0) { } enum cpucfg_mask : u16 { - CPUCFG_LEDS = 0x001f, + CPUCFG_LEDS = 0x003f, CPUCFG_S01 = 0x0040, // enable serial ports 0,1 CPUCFG_S23 = 0x0080, // enable serial ports 2,3 CPUCFG_MAIL = 0x0100, // enable mailbox interrupts @@ -105,20 +147,24 @@ void sgi_ip4_device::map(address_map &map) map(0x1f60'0000, 0x1f60'0003).umask32(0xff00'0000).w(m_saa, FUNC(saa1099_device::data_w)); map(0x1f60'0010, 0x1f60'0013).umask32(0xff00'0000).w(m_saa, FUNC(saa1099_device::control_w)); - map(0x1f80'0000, 0x1f80'0003).umask32(0x00ff'0000).lr8(NAME([]() { return 0; })); // TODO: system id prom/coprocessor present + map(0x1f80'0000, 0x1f80'0003).umask32(0x00ff'0000).lr8(NAME([]() { return 0; })); // TODO: system id prom/coprocessor present (2=no fpu) map(0x1f84'0000, 0x1f84'0003).umask32(0x0000'00ff).lrw8(NAME([this]() { LOG("vme_isr_r 0x%02x\n", m_vme_isr); return m_vme_isr; }), NAME([this](u8 data) { LOG("vme_isr_w 0x%02x\n", data); m_vme_isr = data; })); map(0x1f84'0008, 0x1f84'000b).umask32(0x0000'00ff).lrw8(NAME([this]() { LOG("vme_imr_r 0x%02x\n", m_vme_imr); return m_vme_imr; }), NAME([this](u8 data) { LOG("vme_imr_w 0x%02x\n", data); m_vme_imr = data; })); map(0x1f88'0000, 0x1f88'0003).umask32(0x0000'ffff).rw(FUNC(sgi_ip4_device::cpucfg_r), FUNC(sgi_ip4_device::cpucfg_w)); - map(0x1f90'0000, 0x1f90'0003).umask32(0x0000'ffff).lw16(NAME([this](u16 data) { m_dmalo = data; })); - map(0x1f92'0000, 0x1f92'0003).umask32(0x0000'ffff).lw16(NAME([this](u16 data) { m_dmahi = data; })); + map(0x1f90'0000, 0x1f90'0003).umask32(0x0000'ffff).lrw16( + NAME([this]() { return m_dma_lo; }), + NAME([this](u16 data) { m_dma_lo = data; m_dma_page = 0; })); + map(0x1f92'0000, 0x1f92'003f).umask32(0x0000'ffff).lrw16( + NAME([this](offs_t offset) { return m_dma_hi[offset]; }), + NAME([this](offs_t offset, u16 data) { m_dma_hi[offset] = data; })); map(0x1f94'0000, 0x1f94'0003).nopw(); // dma flush map(0x1f98'0000, 0x1f98'0003).umask32(0x0000'00ff).lr8(NAME([this]() { return m_lio_isr; })); - map(0x1f9a'0000, 0x1f9a'0003).nopr(); // TODO: switches + map(0x1f9a'0000, 0x1f9a'0003).umask32(0x0000'ffff).lr16([]() { return 0; }, "switch_r"); // TODO: switches (0x84 == nodiag) map(0x1fa0'0000, 0x1fa0'0003).umask32(0xff00'0000).lr8(NAME([this]() { m_cpu->set_input_line(INPUT_LINE_IRQ4, 0); return 0; })); map(0x1fa2'0000, 0x1fa2'0003).umask32(0xff00'0000).lr8(NAME([this]() { m_cpu->set_input_line(INPUT_LINE_IRQ2, 0); return 0; })); @@ -159,6 +205,7 @@ static void scsi_devices(device_slot_interface &device) downcast(*device).set_block_size(512); }); device.option_add("harddisk", NSCSI_HARDDISK); + device.option_add("tape", NSCSI_TAPE); } void sgi_ip4_device::device_add_mconfig(machine_config &config) @@ -172,7 +219,7 @@ void sgi_ip4_device::device_add_mconfig(machine_config &config) NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // CXK5816PN-15L - PIT8254(config, m_pit); + PIT8253(config, m_pit); m_pit->set_clk<2>(3.6864_MHz_XTAL); m_pit->out_handler<0>().set([this](int state) { if (state) m_cpu->set_input_line(INPUT_LINE_IRQ2, 1); }); m_pit->out_handler<1>().set([this](int state) { if (state) m_cpu->set_input_line(INPUT_LINE_IRQ4, 1); }); @@ -192,9 +239,9 @@ void sgi_ip4_device::device_add_mconfig(machine_config &config) NSCSI_CONNECTOR(config, "scsi:1", scsi_devices, "harddisk", false); NSCSI_CONNECTOR(config, "scsi:2", scsi_devices, nullptr, false); NSCSI_CONNECTOR(config, "scsi:3", scsi_devices, nullptr, false); - NSCSI_CONNECTOR(config, "scsi:4", scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsi:4", scsi_devices, "cdrom", false); NSCSI_CONNECTOR(config, "scsi:5", scsi_devices, nullptr, false); - NSCSI_CONNECTOR(config, "scsi:6", scsi_devices, nullptr, false); + NSCSI_CONNECTOR(config, "scsi:6", scsi_devices, "tape", false); NSCSI_CONNECTOR(config, "scsi:7", scsi_devices, nullptr, false); // duart 0 (keyboard/mouse) @@ -300,8 +347,9 @@ void sgi_ip4_device::device_start() m_leds.resolve(); save_item(NAME(m_cpucfg)); - save_item(NAME(m_dmalo)); - save_item(NAME(m_dmahi)); + save_item(NAME(m_dma_lo)); + save_item(NAME(m_dma_hi)); + save_item(NAME(m_dma_page)); save_item(NAME(m_lio_isr)); save_item(NAME(m_vme_isr)); save_item(NAME(m_vme_imr)); @@ -312,8 +360,7 @@ void sgi_ip4_device::device_start() save_item(NAME(m_vme_irq)); m_cpucfg = 0; - m_dmalo = 0; - m_dmahi = 0; + m_dma_lo = 0; m_lio_isr = 0xff; m_vme_isr = 0; m_vme_imr = 0; @@ -368,17 +415,17 @@ void sgi_ip4_device::scsi_drq(int state) { if (state) { - u32 const addr = (u32(m_dmahi) << 12) | (m_dmalo & 0x0fff); + u32 const addr = (u32(m_dma_hi[m_dma_page]) << 12) | (m_dma_lo & 0x0fff); - if (m_dmalo & 0x8000) + if (m_dma_lo & 0x8000) m_cpu->space(0).write_byte(addr, m_scsi->dma_r()); else m_scsi->dma_w(m_cpu->space(0).read_byte(addr)); - m_dmalo = (m_dmalo + 1) & 0x8fff; + m_dma_lo = (m_dma_lo + 1) & 0x8fff; - if (!(m_dmalo & 0xfff)) - m_dmahi++; + if (!(m_dma_lo & 0xfff)) + m_dma_page = (m_dma_page + 1) & 0xf; } } @@ -387,7 +434,7 @@ void sgi_ip4_device::cpucfg_w(u16 data) //LOG("cpucfg_w 0x%04x (%s)\n", data, machine().describe_context()); // update leds - for (unsigned i = 0; i < 5; i++) + for (unsigned i = 0; i < 6; i++) m_leds[i] = BIT(data, i); if ((m_cpucfg & CPUCFG_MAIL) && !BIT(data, 8)) @@ -533,6 +580,7 @@ void sgi_ip4_device::nvram_w(offs_t offset, u8 data) ROM_START(ip4) ROM_REGION32_BE(0x40000, "boot", 0) + ROM_SYSTEM_BIOS(0, "4d1v30", "Version 4D1-3.0 PROM IP4 Mon Jan 4 20:29:51 PST 1988 SGI") ROMX_LOAD("070-0093-009.bin", 0x000000, 0x010000, CRC(261b0a4c) SHA1(59f73d0e022a502dc5528289e388700b51b308da), ROM_BIOS(0) | ROM_SKIP(3)) ROMX_LOAD("070-0094-009.bin", 0x000001, 0x010000, CRC(8c05f591) SHA1(d4f86ad274f9dfe10c38551f3b6b9ba73570747f), ROM_BIOS(0) | ROM_SKIP(3)) @@ -547,6 +595,9 @@ ROM_START(ip4) ROM_REGION32_BE(0x20, "idprom", 0) ROM_LOAD("idprom.bin", 0, 0x20, NO_DUMP) + + ROM_REGION(0x800, "nvram", 0) + ROM_LOAD("nvram", 0, 0x800, CRC(333443d0) SHA1(aceb115a2f4d2e3a229b2c2c3b20314674113705)) ROM_END static INPUT_PORTS_START(ip4) diff --git a/src/mame/sgi/ip4.h b/src/mame/sgi/ip4.h index 88c0b2a0b1dd2..88b2e7f816cd3 100644 --- a/src/mame/sgi/ip4.h +++ b/src/mame/sgi/ip4.h @@ -53,7 +53,7 @@ class sgi_ip4_device private: required_device m_cpu; required_device m_rtc; - required_device m_pit; + required_device m_pit; required_device m_scsi; required_device_array m_duart; required_device_array m_serial; @@ -62,12 +62,13 @@ class sgi_ip4_device memory_share_creator m_nvram; required_shared_ptr m_ram; - output_finder<5> m_leds; + output_finder<6> m_leds; // machine registers u16 m_cpucfg; - u16 m_dmalo; - u16 m_dmahi; + u16 m_dma_lo; + u16 m_dma_hi[16]; + u8 m_dma_page; u8 m_lio_isr; u8 m_vme_isr; u8 m_vme_imr; diff --git a/src/mame/sgi/tt.cpp b/src/mame/sgi/tt.cpp index e2c7493f09c00..92ec810eb84b0 100644 --- a/src/mame/sgi/tt.cpp +++ b/src/mame/sgi/tt.cpp @@ -25,6 +25,9 @@ #include "ip4.h" +// graphics cards +#include "gm1.h" + //#define VERBOSE (0) #include "logmacro.h" @@ -69,6 +72,33 @@ static void vme_cards(device_slot_interface &device) device.option_add("enp10", VME_ENP10); } +static void slot8_cards(device_slot_interface &device) +{ + vme_cards(device); + + //device.option_add("ge4", SGI_GE4); // GT +} +static void slot9_cards(device_slot_interface &device) +{ + //device.option_add("de3", SGI_DE3); // B,G + device.option_add("gm1", SGI_GM1); // GT +} +static void slot10_cards(device_slot_interface &device) +{ + //device.option_add("gf3", SGI_GF3); // B,G + //device.option_add("rm1", SGI_RM1); // GT +} +static void slot11_cards(device_slot_interface &device) +{ + //device.option_add("tb2", SGI_TB2); // B,G + //device.option_add("rv1", SGI_RV1); // GT +} +static void slot12_cards(device_slot_interface &device) +{ + //device.option_add("zb2", SGI_ZB2); // G + //device.option_add("rm1", SGI_RM1); // GT +} + void ip4_state::tt12(machine_config &config, XTAL clock) { VME(config, m_vme); @@ -81,12 +111,12 @@ void ip4_state::tt12(machine_config &config, XTAL clock) VME_SLOT(config, m_slot[4], vme_cards, nullptr, false); VME_SLOT(config, m_slot[5], vme_cards, nullptr, false); VME_SLOT(config, m_slot[6], vme_cards, nullptr, false); - VME_SLOT(config, m_slot[7], vme_cards, nullptr, false); + VME_SLOT(config, m_slot[7], slot8_cards, nullptr, false); - VME_SLOT(config, m_slot[8], vme_cards, nullptr, false); - VME_SLOT(config, m_slot[9], vme_cards, nullptr, false); - VME_SLOT(config, m_slot[10], vme_cards, nullptr, false); - VME_SLOT(config, m_slot[11], vme_cards, nullptr, false); + VME_SLOT(config, m_slot[8], slot9_cards, nullptr, false); + VME_SLOT(config, m_slot[9], slot10_cards, nullptr, false); + VME_SLOT(config, m_slot[10], slot11_cards, nullptr, false); + VME_SLOT(config, m_slot[11], slot12_cards, nullptr, false); } void ip4_state::machine_start() @@ -105,5 +135,5 @@ ROM_END } // anonymous namespace // YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS -COMP(1987, pi4d50, 0, 0, pi4d50, 0, ip4_state, empty_init, "Silicon Graphics", "Professional IRIS 4D/50", MACHINE_NOT_WORKING) -COMP(1987, pi4d70, 0, 0, pi4d70, 0, ip4_state, empty_init, "Silicon Graphics", "Professional IRIS 4D/70", MACHINE_NOT_WORKING) +COMP(1987, pi4d50, 0, 0, pi4d50, 0, ip4_state, empty_init, "Silicon Graphics", "Professional IRIS 4D/50", 0) +COMP(1987, pi4d70, 0, 0, pi4d70, 0, ip4_state, empty_init, "Silicon Graphics", "Professional IRIS 4D/70", 0) diff --git a/src/mame/sinclair/tsconf.cpp b/src/mame/sinclair/tsconf.cpp index ebe7ec88a711d..5df2573f83007 100644 --- a/src/mame/sinclair/tsconf.cpp +++ b/src/mame/sinclair/tsconf.cpp @@ -41,6 +41,10 @@ FAQ-RUS: https://forum.tslabs.info/viewtopic.php?f=35&t=157 #include "sound/ay8910.h" #include "speaker.h" + +ALLOW_SAVE_TYPE(tsconf_state::gluk_ext); + + TILE_GET_INFO_MEMBER(tsconf_state::get_tile_info_txt) { u8 *m_row_location = &m_ram->pointer()[get_vpage_offset() + (tile_index / tilemap.cols() * 256)]; @@ -52,14 +56,13 @@ TILE_GET_INFO_MEMBER(tsconf_state::get_tile_info_txt) template TILE_GET_INFO_MEMBER(tsconf_state::get_tile_info_16c) { - u8 col_offset = (tile_index % tilemap.cols() + Layer * 64) << 1; - u16 row_offset = (tile_index / tilemap.cols() * 64 * 2) << 1; + const u8 col_offset = (tile_index & 0x03f) << 1; + const u16 row_offset = (tile_index & 0xfc0) << 2; - u8 *tile_info_addr = &m_ram->pointer()[(m_regs[T_MAP_PAGE] << 14) + row_offset + col_offset]; + u8 *tile_info_addr = &m_ram->pointer()[(m_regs[T_MAP_PAGE] << 14) | row_offset | (Layer ? 0x80 : 0x00) | col_offset]; u8 hi = tile_info_addr[1]; - u32 /*u16*/ tile = ((u16(hi) & 0x0f) << 8) | tile_info_addr[0]; - tile = tile / tilemap.cols() * 64 * 8 + (tile % tilemap.cols()); // same as: tmp_tile_oversized_to_code() + u16 tile = ((u16(hi) & 0x0f) << 8) | tile_info_addr[0]; u8 pal = (BIT(m_regs[PAL_SEL], 4 + Layer * 2, 2) << 2) | BIT(hi, 4, 2); tileinfo.set(TM_TILES0 + Layer, tile, pal, TILE_FLIPYX(BIT(hi, 6, 2))); tileinfo.category = tile == 0 ? 2 : 1; @@ -135,23 +138,11 @@ static const gfx_layout tsconf_charlayout = 8 * 8 }; -static const gfx_layout tsconf_tile_16cpp_layout = -{ - 8, - 8, - 64 * 64 * 8, - 4, - {STEP4(0, 1)}, - {STEP8(0, 4)}, - {STEP8(0, 256 * 8)}, // Much more tiles when needed. Because tiles are in RAW format but we don't know region properties. - 8 * 4 -}; - static GFXDECODE_START(gfx_tsconf) GFXDECODE_ENTRY("maincpu", 0, tsconf_charlayout, 0xf7, 1) // TM_TS_CHAR : TXT - GFXDECODE_ENTRY("maincpu", 0, tsconf_tile_16cpp_layout, 0, 16) // TM_TILES0 : T0 16cpp - GFXDECODE_ENTRY("maincpu", 0, tsconf_tile_16cpp_layout, 0, 16) // TM_TILES1 : T1 16cpp - GFXDECODE_ENTRY("maincpu", 0, tsconf_tile_16cpp_layout, 0, 16) // TM_SPRITES : Sprites 16cpp + GFXDECODE_RAM("tiles0_raw", 0, gfx_8x8x8_raw, 0, 16) // TM_TILES0 : T0 16cpp + GFXDECODE_RAM("tiles1_raw", 0, gfx_8x8x8_raw, 0, 16) // TM_TILES1 : T1 16cpp + GFXDECODE_RAM("sprites_raw", 0, gfx_8x8x8_raw, 0, 16) // TM_SPRITES : Sprites 16cpp GFXDECODE_ENTRY("maincpu", 0x1fd00, spectrum_charlayout, 0xf7, 1) // TM_ZX_CHAR GFXDECODE_END @@ -164,9 +155,13 @@ void tsconf_state::video_start() m_ts_tilemap[TM_TILES0] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(tsconf_state::get_tile_info_16c<0>)), TILEMAP_SCAN_ROWS, 8, 8, 64, 64); m_ts_tilemap[TM_TILES0]->set_transparent_pen(0); + m_gfxdecode->gfx(TM_TILES0)->set_granularity(16); m_ts_tilemap[TM_TILES1] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(tsconf_state::get_tile_info_16c<1>)), TILEMAP_SCAN_ROWS, 8, 8, 64, 64); m_ts_tilemap[TM_TILES1]->set_transparent_pen(0); + m_gfxdecode->gfx(TM_TILES1)->set_granularity(16); + + m_gfxdecode->gfx(TM_SPRITES)->set_granularity(16); m_frame_irq_timer = timer_alloc(FUNC(tsconf_state::irq_frame), this); m_scanline_irq_timer = timer_alloc(FUNC(tsconf_state::irq_scanline), this); @@ -177,13 +172,18 @@ void tsconf_state::machine_start() spectrum_128_state::machine_start(); m_maincpu->space(AS_PROGRAM).specific(m_program); - save_item(NAME(m_regs)); - // TODO save'm'all! - // reconfigure ROMs memory_region *rom = memregion("maincpu"); m_bank_rom[0]->configure_entries(0, rom->bytes() / 0x4000, rom->base(), 0x4000); m_bank_ram[0]->configure_entries(0, m_ram->size() / 0x4000, m_ram->pointer(), 0x4000); + + save_item(NAME(m_int_mask)); + save_pointer(NAME(m_regs), 0x100); + save_item(NAME(m_zctl_di)); + save_item(NAME(m_zctl_cs)); + save_item(NAME(m_port_f7_ext)); + save_item(NAME(m_gfx_y_frame_offset)); + save_item(NAME(m_ay_selected)); } void tsconf_state::machine_reset() @@ -238,6 +238,9 @@ void tsconf_state::device_post_load() { spectrum_128_state::device_post_load(); m_sprites_cache.clear(); + copy_tiles_to_raw(m_ram->pointer() + ((m_regs[SG_PAGE] & 0xf8) << 14), m_sprites_raw.target()); + copy_tiles_to_raw(m_ram->pointer() + ((m_regs[T0_G_PAGE] & 0xf8) << 14), m_sprites_raw.target()); + copy_tiles_to_raw(m_ram->pointer() + ((m_regs[T1_G_PAGE] & 0xf8) << 14), m_sprites_raw.target()); } INPUT_PORTS_START( tsconf ) @@ -314,7 +317,7 @@ void tsconf_state::tsconf(machine_config &config) DAC_8BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "mono", 0.75);; - PALETTE(config, "palette", FUNC(tsconf_state::tsconf_palette), 256); + PALETTE(config, "palette", palette_device::BLACK, 256); m_screen->set_raw(14_MHz_XTAL / 2, 448, with_hblank(0), 448, 320, with_vblank(0), 320); m_screen->set_screen_update(FUNC(tsconf_state::screen_update)); m_screen->set_no_palette(); @@ -341,4 +344,4 @@ ROM_START(tsconf) ROM_END // YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS -COMP( 2011, tsconf, spec128, 0, tsconf, tsconf, tsconf_state, empty_init, "NedoPC, TS-Labs", "ZX Evolution: TS-Configuration", 0) +COMP( 2011, tsconf, spec128, 0, tsconf, tsconf, tsconf_state, empty_init, "NedoPC, TS-Labs", "ZX Evolution: TS-Configuration", MACHINE_SUPPORTS_SAVE) diff --git a/src/mame/sinclair/tsconf.h b/src/mame/sinclair/tsconf.h index 37dfe65b808c0..46d627574f2d7 100644 --- a/src/mame/sinclair/tsconf.h +++ b/src/mame/sinclair/tsconf.h @@ -29,6 +29,8 @@ class tsconf_state : public spectrum_128_state tsconf_state(const machine_config &mconfig, device_type type, const char *tag) : spectrum_128_state(mconfig, type, tag) , m_bank0_rom(*this, "bank0_rom") + , m_tiles_raw(*this, "tiles%u_raw", 0U, 64U * 64 * 8 * 8, ENDIANNESS_LITTLE) + , m_sprites_raw(*this, "sprites_raw", 64U * 64 * 8 * 8, ENDIANNESS_LITTLE) , m_keyboard(*this, "pc_keyboard") , m_io_mouse(*this, "mouse_input%u", 1U) , m_beta(*this, BETA_DISK_TAG) @@ -170,8 +172,8 @@ class tsconf_state : public spectrum_128_state void tsconf_draw_txt(bitmap_rgb32 &bitmap, const rectangle &cliprect); void tsconf_draw_gfx(bitmap_rgb32 &bitmap, const rectangle &cliprect); void draw_sprites(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - void tsconf_palette(palette_device &palette) const; void tsconf_update_video_mode(); + void copy_tiles_to_raw(const u8 *tiles_src, u8 *raw_target); u8 tsconf_port_xx1f_r(offs_t offset); void tsconf_port_7ffd_w(u8 data); @@ -214,6 +216,8 @@ class tsconf_state : public spectrum_128_state memory_access<16, 0, 0, ENDIANNESS_LITTLE>::specific m_program; memory_view m_bank0_rom; + memory_share_array_creator m_tiles_raw; + memory_share_creator m_sprites_raw; required_device m_keyboard; required_ioport_array<3> m_io_mouse; diff --git a/src/mame/sinclair/tsconf_m.cpp b/src/mame/sinclair/tsconf_m.cpp index 92f9678fd1776..43ee709668fdb 100644 --- a/src/mame/sinclair/tsconf_m.cpp +++ b/src/mame/sinclair/tsconf_m.cpp @@ -29,11 +29,6 @@ enum v_mode : u8 VM_TXT }; -static constexpr u32 tmp_tile_oversized_to_code(u16 code) -{ - return code / 64 * 64 * 8 + (code % 64); -} - // https://github.com/tslabs/zx-evo/blob/master/pentevo/vdac/vdac1/cpld/top.v static constexpr u8 pwm_to_rgb[32] = { 0, 10, 21, 31, 42, 53, 63, 74, @@ -54,12 +49,6 @@ rectangle tsconf_state::get_screen_area() return info; } -void tsconf_state::tsconf_palette(palette_device &palette) const -{ - rgb_t colors[256] = {0}; - palette.set_pen_colors(0, colors); -} - void tsconf_state::tsconf_update_bank0() { u8 page0 = m_regs[PAGE0]; @@ -364,7 +353,7 @@ void tsconf_state::draw_sprites(screen_device &screen_d, bitmap_rgb32 &bitmap, c for (auto spr = m_sprites_cache.rbegin(); spr != m_sprites_cache.rend(); ++spr) { m_gfxdecode->gfx(TM_SPRITES)->prio_transpen(bitmap, cliprect, - tmp_tile_oversized_to_code(spr->code), spr->color, spr->flipx, spr->flipy, spr->destx, spr->desty, + spr->code, spr->color, spr->flipx, spr->flipy, spr->destx, spr->desty, screen_d.priority(), spr->pmask, 0); } @@ -395,6 +384,11 @@ void tsconf_state::ram_bank_write(u8 bank, offs_t offset, u8 data) ram_page_write(m_regs[PAGE0 + bank], offset, data); } +static int tiles_offset_to_raw(int t_offset) +{ + return bitswap<17>(t_offset, 16, 15, 14, 13, 12, 11, 7, 6, 5, 4, 3, 2, 10, 9, 8, 1, 0) << 1; +} + void tsconf_state::ram_page_write(u8 page, offs_t offset, u8 data) { u32 ram_addr = PAGE4K(page) + offset; @@ -405,15 +399,21 @@ void tsconf_state::ram_page_write(u8 page, offs_t offset, u8 data) } else { - if (ram_addr >= PAGE4K(m_regs[T0_G_PAGE] & 0xf8) && ram_addr < PAGE4K((m_regs[T0_G_PAGE] & 0xf8) + 8)) + const int t0_offset = ram_addr - PAGE4K(m_regs[T0_G_PAGE] & 0xf8); + if ((t0_offset >= 0) && (t0_offset < PAGE4K(8))) { - m_gfxdecode->gfx(TM_TILES0)->mark_all_dirty(); + const int raw_offset = tiles_offset_to_raw(t0_offset); + m_tiles_raw[0][raw_offset] = data >> 4; + m_tiles_raw[0][raw_offset + 1] = data & 0x0f; m_ts_tilemap[TM_TILES0]->mark_all_dirty(); } - if (ram_addr >= PAGE4K(m_regs[T1_G_PAGE] & 0xf8) && ram_addr < PAGE4K((m_regs[T1_G_PAGE] & 0xf8) + 8)) + const int t1_offset = ram_addr - PAGE4K(m_regs[T1_G_PAGE] & 0xf8); + if ((t1_offset >= 0) && (t1_offset < PAGE4K(8))) { - m_gfxdecode->gfx(TM_TILES1)->mark_all_dirty(); + const int raw_offset = tiles_offset_to_raw(t1_offset); + m_tiles_raw[1][raw_offset] = data >> 4; + m_tiles_raw[1][raw_offset + 1] = data & 0x0f; m_ts_tilemap[TM_TILES1]->mark_all_dirty(); } } @@ -424,8 +424,13 @@ void tsconf_state::ram_page_write(u8 page, offs_t offset, u8 data) if (ram_addr >= PAGE4K(m_regs[m_regs[V_PAGE] ^ 0x01]) && ram_addr < PAGE4K(m_regs[m_regs[V_PAGE] ^ 0x01] + 1)) m_gfxdecode->gfx(TM_TS_CHAR)->mark_all_dirty(); - if (ram_addr >= PAGE4K(m_regs[SG_PAGE] & 0xf8) && ram_addr < PAGE4K((m_regs[SG_PAGE] & 0xf8) + 8)) - m_gfxdecode->gfx(TM_SPRITES)->mark_all_dirty(); + const int spr_offset = ram_addr - PAGE4K(m_regs[SG_PAGE] & 0xf8); + if ((spr_offset >= 0) && (spr_offset < PAGE4K(8))) + { + const int raw_offset = tiles_offset_to_raw(spr_offset); + m_sprites_raw[raw_offset] = data >> 4; + m_sprites_raw[raw_offset + 1] = data & 0x0f; + } m_ram->pointer()[ram_addr] = data; } @@ -438,7 +443,7 @@ u16 tsconf_state::ram_read16(offs_t offset) void tsconf_state::ram_write16(offs_t offset, u16 data) { ram_page_write(0, offset & ~offs_t(1), data >> 8); - m_ram->pointer()[offset | 1] = data & 0xff; + ram_page_write(0, offset | 1, data & 0xff); } u16 tsconf_state::spi_read16() @@ -534,6 +539,20 @@ u8 tsconf_state::tsconf_port_xxaf_r(offs_t port) return data; } +void tsconf_state::copy_tiles_to_raw(const u8 *tiles_src, u8 *raw_target) +{ + for(u32 ln = 0; ln < PAGE4K(8); ln += 4) + { + int targ = tiles_offset_to_raw(ln); + for (u8 x = 0; x < 4; ++x) + { + const u8 data = tiles_src[ln + x]; + raw_target[targ + (x << 1)] = data >> 4; + raw_target[targ + (x << 1) + 1] = data & 0x0f; + } + } +} + void tsconf_state::tsconf_port_xxaf_w(offs_t port, u8 data) { u8 nreg = port >> 8; @@ -666,7 +685,7 @@ void tsconf_state::tsconf_port_xxaf_w(offs_t port, u8 data) break; case SG_PAGE: - m_gfxdecode->gfx(TM_SPRITES)->set_source(m_ram->pointer() + PAGE4K(data & 0xf8)); + copy_tiles_to_raw(m_ram->pointer() + PAGE4K(data & 0xf8), m_sprites_raw.target()); break; case SYS_CONFIG: @@ -916,12 +935,12 @@ TIMER_CALLBACK_MEMBER(tsconf_state::irq_scanline) break; case T0_G_PAGE: - m_gfxdecode->gfx(TM_TILES0)->set_source(m_ram->pointer() + PAGE4K(val & 0xf8)); + copy_tiles_to_raw(m_ram->pointer() + PAGE4K(val & 0xf8), m_tiles_raw[0].target()); m_ts_tilemap[TM_TILES0]->mark_all_dirty(); break; case T1_G_PAGE: - m_gfxdecode->gfx(TM_TILES1)->set_source(m_ram->pointer() + PAGE4K(val & 0xf8)); + copy_tiles_to_raw(m_ram->pointer() + PAGE4K(val & 0xf8), m_tiles_raw[1].target()); m_ts_tilemap[TM_TILES1]->mark_all_dirty(); break; diff --git a/src/mame/sinclair/tsconfdma.cpp b/src/mame/sinclair/tsconfdma.cpp index 69f0dbbb4fd73..29885e0468cd1 100644 --- a/src/mame/sinclair/tsconfdma.cpp +++ b/src/mame/sinclair/tsconfdma.cpp @@ -35,18 +35,18 @@ void tsconfdma_device::device_start() save_item(NAME(m_address_d)); save_item(NAME(m_block_len)); save_item(NAME(m_block_num)); - save_item(NAME(m_align_s)); - save_item(NAME(m_align_d)); - save_item(NAME(m_align)); - save_item(NAME(m_m1)); - save_item(NAME(m_m2)); - save_item(NAME(m_asz)); - save_item(NAME(m_task)); save_item(NAME(m_tx_s_addr)); save_item(NAME(m_tx_d_addr)); save_item(NAME(m_tx_data)); save_item(NAME(m_tx_block_num)); save_item(NAME(m_tx_block)); + save_item(NAME(m_task)); + save_item(NAME(m_align_s)); + save_item(NAME(m_align_d)); + save_item(NAME(m_asz)); + save_item(NAME(m_align)); + save_item(NAME(m_m1)); + save_item(NAME(m_m2)); } void tsconfdma_device::device_reset() diff --git a/src/mame/skeleton/cosmicos.cpp b/src/mame/skeleton/cosmicos.cpp index c3bc38b9e556b..e47b9f82269ca 100644 --- a/src/mame/skeleton/cosmicos.cpp +++ b/src/mame/skeleton/cosmicos.cpp @@ -605,9 +605,6 @@ void cosmicos_state::machine_start() m_digits.resolve(); m_leds.resolve(); - /* initialize LED display */ - m_led->rbi_w(1); - /* register for state saving */ save_item(NAME(m_wait)); save_item(NAME(m_clear)); @@ -672,7 +669,7 @@ void cosmicos_state::cosmicos(machine_config &config) /* video hardware */ config.set_default_layout(layout_cosmicos); - DM9368(config, m_led, 0); + DM9368(config, m_led); TIMER(config, "digit").configure_periodic(FUNC(cosmicos_state::digit_tick), attotime::from_hz(100)); TIMER(config, "interrupt").configure_periodic(FUNC(cosmicos_state::int_tick), attotime::from_hz(1000)); diff --git a/src/mame/skeleton/didact.cpp b/src/mame/skeleton/didact.cpp index 5c79a00d18ea9..f383f4423803a 100644 --- a/src/mame/skeleton/didact.cpp +++ b/src/mame/skeleton/didact.cpp @@ -95,7 +95,7 @@ namespace { /* Didact base class */ class didact_state : public driver_device { - public: +public: didact_state(const machine_config &mconfig, device_type type, const char * tag) : driver_device(mconfig, type, tag) , m_cass(*this, "cassette") @@ -107,6 +107,7 @@ class didact_state : public driver_device DECLARE_INPUT_CHANGED_MEMBER(trigger_reset); DECLARE_INPUT_CHANGED_MEMBER(trigger_shift); + protected: virtual void machine_start() override { m_led.resolve(); } @@ -327,14 +328,12 @@ void md6802_state::md6802_map(address_map &map) */ /* Didact mp68a driver class */ -// Just a statement that the real mp68a hardware was designed with 6820 and not 6821 +// The real mp68a hardware was designed with 6820 and not 6821. // They are functional equivalents BUT has different electrical characteristics. // 2019-07-27 Cassette added: saves ok, load is unreliable, probably an original design problem. -#define pia6820_device pia6821_device -#define PIA6820 PIA6821 class mp68a_state : public didact_state { - public: +public: mp68a_state(const machine_config &mconfig, device_type type, const char * tag) : didact_state(mconfig, type, tag) , m_maincpu(*this, "maincpu") @@ -361,9 +360,10 @@ class mp68a_state : public didact_state virtual void machine_start() override ATTR_COLD; void mp68a(machine_config &config); void mp68a_map(address_map &map) ATTR_COLD; + protected: - required_device m_pia1; - required_device m_pia2; + required_device m_pia1; + required_device m_pia2; }; INPUT_CHANGED_MEMBER(didact_state::trigger_shift) @@ -425,13 +425,13 @@ uint8_t mp68a_state::pia2_kbB_r() while (a012 > 0 && !(line & (1 << --a012))); a012 += 8; } - if ( a012 == 0 && (line = ((m_lines[2]) | m_lines[3])) != 0) + if (a012 == 0 && (line = ((m_lines[2]) | m_lines[3])) != 0) { a012 = 8; while (a012 > 0 && !(line & (1 << --a012))); } - pb = a012; // A0-A2 -> PB0-PB3 + pb = a012; // A0-A2 -> PB0-PB3 if (m_shift) { @@ -486,8 +486,8 @@ void mp68a_state::machine_start() void mp68a_state::mp68a_map(address_map &map) { map(0x0000, 0x00ff).ram().mirror(0xf000); - map(0x0500, 0x0503).rw(m_pia1, FUNC(pia6820_device::read), FUNC(pia6820_device::write)).mirror(0xf0fc); - map(0x0600, 0x0603).rw(m_pia2, FUNC(pia6820_device::read), FUNC(pia6820_device::write)).mirror(0xf0fc); + map(0x0500, 0x0503).rw(m_pia1, FUNC(pia6821_device::read), FUNC(pia6821_device::write)).mirror(0xf0fc); + map(0x0600, 0x0603).rw(m_pia2, FUNC(pia6821_device::read), FUNC(pia6821_device::write)).mirror(0xf0fc); map(0x0700, 0x07ff).ram().mirror(0xf000); map(0x0800, 0x0bff).rom().mirror(0xf400).region("maincpu", 0x0800); } @@ -536,7 +536,7 @@ void mp68a_state::mp68a_map(address_map &map) /* Didact modulab driver class */ class modulab_state : public didact_state { - public: +public: modulab_state(const machine_config &mconfig, device_type type, const char * tag) : didact_state(mconfig, type, tag) , m_maincpu(*this, "maincpu") @@ -553,10 +553,12 @@ class modulab_state : public didact_state virtual void machine_reset() override ATTR_COLD; virtual void machine_start() override ATTR_COLD; void modulab(machine_config &config); + protected: uint8_t io_r(offs_t offset); void io_w(offs_t offset, u8 data); void da_w(int state); + private: void modulab_map(address_map &map) ATTR_COLD; // Offsets for display and keyboard i/o @@ -571,7 +573,7 @@ class modulab_state : public didact_state class shift8 { public: - shift8(){ byte = 0; } + shift8() { byte = 0; } void shiftIn(uint8_t in){ byte = ((byte << 1) & 0xfe) | (in & 1 ? 1 : 0); } uint8_t byte; }; @@ -850,10 +852,10 @@ void mp68a_state::mp68a(machine_config &config) /* Devices */ /* PIA #1 0x500-0x503 - used differently by laborations and loaded software */ - PIA6820(config, m_pia1, 0); + PIA6821(config, m_pia1, 0); // actually 6820 /* PIA #2 Keyboard & Display 0x600-0x603 */ - PIA6820(config, m_pia2, 0); + PIA6821(config, m_pia2, 0); // actually 6820 /* --PIA inits----------------------- */ /* 0x0BAF 0x601 (Control A) = 0x30 - CA2 is low and enable DDRA */ /* 0x0BB1 0x603 (Control B) = 0x30 - CB2 is low and enable DDRB */ @@ -886,12 +888,12 @@ void mp68a_state::mp68a(machine_config &config) /* 0x086B 0x600 (Port A) = 0x70 */ /* 0x086B 0x600 (Port A) = 0x50 */ /* 0x086B 0x600 (Port A) = 0x70 */ - DM9368(config, m_digits[0], 0).update_cb().set(FUNC(mp68a_state::digit_w<0>)); - DM9368(config, m_digits[1], 0).update_cb().set(FUNC(mp68a_state::digit_w<1>)); - DM9368(config, m_digits[2], 0).update_cb().set(FUNC(mp68a_state::digit_w<2>)); - DM9368(config, m_digits[3], 0).update_cb().set(FUNC(mp68a_state::digit_w<3>)); - DM9368(config, m_digits[4], 0).update_cb().set(FUNC(mp68a_state::digit_w<4>)); - DM9368(config, m_digits[5], 0).update_cb().set(FUNC(mp68a_state::digit_w<5>)); + DM9368(config, m_digits[0]).update_cb().set(FUNC(mp68a_state::digit_w<0>)); + DM9368(config, m_digits[1]).update_cb().set(FUNC(mp68a_state::digit_w<1>)); + DM9368(config, m_digits[2]).update_cb().set(FUNC(mp68a_state::digit_w<2>)); + DM9368(config, m_digits[3]).update_cb().set(FUNC(mp68a_state::digit_w<3>)); + DM9368(config, m_digits[4]).update_cb().set(FUNC(mp68a_state::digit_w<4>)); + DM9368(config, m_digits[5]).update_cb().set(FUNC(mp68a_state::digit_w<5>)); /* Cassette */ SPEAKER(config, "mono").front_center(); diff --git a/src/mame/snk/lasso.cpp b/src/mame/snk/lasso.cpp index ccd99c0a18ce1..9a00805418046 100644 --- a/src/mame/snk/lasso.cpp +++ b/src/mame/snk/lasso.cpp @@ -1,77 +1,517 @@ // license:BSD-3-Clause // copyright-holders:Phil Stroffolino, Nicola Salmoria, Luca Elia -/*************************************************************************** +/******************************************************************************* - Lasso and similar hardware + Lasso and similar hardware - driver by Phil Stroffolino, Nicola Salmoria, Luca Elia + driver by Phil Stroffolino, Nicola Salmoria, Luca Elia --------------------------------------------------------------------------------------- -Year + Game By CPUs Sound Chips Misc Info --------------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- +Year + Game By CPUs Sound Chips Misc Info +-------------------------------------------------------------------------------- 82 Lasso SNK 3 x 6502 2 x SN76489 83 Chameleon Jaleco 2 x 6502 2 x SN76489 -84 Wai Wai Jockey Gate-In! Jaleco/Casio 2 x 6502 2 x SN76489 + DAC -84 Pinbo Jaleco 6502 + Z80 2 x AY-8910 6502 @ 18MHz/24, Z80 @ 18MHz/6, AY @ 18MHz/12 +84 Wai Wai Jockey Gate-In! Jaleco/Casio 2 x 6502 2 x SN76489 +84 Pinbo Jaleco 6502 + Z80 2 x AY-8910 6502 @ 18MHz/24, Z80 @ 18MHz/6, AY @ 18MHz/12 -------------------------------------------------------------------------------------- Notes: - unknown CPU speeds unless noted above (affect game timing), currently using same as the Rock-Ola games of the same area. Lot of similarities between - these hardware. The music ends at the perfect time with this clock speed + these hardware. - Lasso: fire button auto-repeats on high score entry screen (real behavior?) -- Pinbo: bgcolor is wrong, how does it generate it? ($a0, should be darkblue) -*************************************************************************** +******************************************************************************** + +Video hardware notes: + +Every game has 1 256 x 256 tilemap (non scrollable) made of 8 x 8 tiles, and +16 x 16 sprites (some games use 32, some more). The graphics for tiles and +sprites are held inside the same ROMs, but aren't shared between the two: + +the first $100 tiles are for the tilemap, the following $100 are for sprites. +This constitutes the first graphics bank. There can be several. -DIP locations verified for: - - lasso +Lasso has an additional pixel layer (256 x 256 x 1) and a third CPU devoted to +drawing into it (the lasso!) -***************************************************************************/ +Wwjgtin has an additional $800 x $400 scrolling tilemap in ROM and $100 more +16 x 16 x 4 tiles for it. + +The colors are static ($40 colors, 2 PROMs) but the background color can be +changed at runtime. Wwjgtin can change the last 4 colors (= last palette) too. + +*******************************************************************************/ #include "emu.h" -#include "lasso.h" #include "cpu/m6502/m6502.h" #include "cpu/z80/z80.h" +#include "machine/gen_latch.h" #include "sound/ay8910.h" -#include "sound/dac.h" +#include "sound/sn76496.h" + +#include "emupal.h" #include "screen.h" #include "speaker.h" +#include "tilemap.h" -INPUT_CHANGED_MEMBER(lasso_state::coin_inserted) +namespace { + +class lasso_state : public driver_device { - /* coin insertion causes an NMI */ - m_maincpu->set_input_line(INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE); +public: + lasso_state(const machine_config &mconfig, device_type type, const char *tag) : + driver_device(mconfig, type, tag), + m_videoram(*this, "videoram"), + m_colorram(*this, "colorram"), + m_spriteram(*this, "spriteram"), + m_back_color(*this, "back_color"), + m_chip_data(*this, "chip_data"), + m_bitmap_ram(*this, "bitmap_ram"), + m_last_colors(*this, "last_colors"), + m_track_scroll(*this, "track_scroll"), + m_maincpu(*this, "maincpu"), + m_audiocpu(*this, "audiocpu"), + m_sn(*this, "sn76489_%u", 0), + m_gfxdecode(*this, "gfxdecode"), + m_palette(*this, "palette"), + m_screen(*this, "screen"), + m_soundlatch(*this, "soundlatch") + { } + + void base(machine_config &config); + void wwjgtin(machine_config &config); + void lasso(machine_config &config); + void chameleo(machine_config &config); + void pinbo(machine_config &config); + + DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); + +protected: + virtual void machine_start() override ATTR_COLD; + virtual void video_start() override ATTR_COLD; + +private: + // memory pointers + required_shared_ptr m_videoram; + required_shared_ptr m_colorram; + required_shared_ptr m_spriteram; + required_shared_ptr m_back_color; + optional_shared_ptr m_chip_data; + optional_shared_ptr m_bitmap_ram; // 0x2000 bytes for a 256 x 256 x 1 bitmap + optional_shared_ptr m_last_colors; + optional_shared_ptr m_track_scroll; + + // video-related + tilemap_t *m_bg_tilemap = nullptr; + tilemap_t *m_track_tilemap = nullptr; + uint8_t m_vidctrl = 0; + uint8_t m_gfxbank = 0; + + // devices + required_device m_maincpu; + required_device m_audiocpu; + optional_device_array m_sn; + required_device m_gfxdecode; + required_device m_palette; + required_device m_screen; + required_device m_soundlatch; + + uint8_t sound_status_r(); + void sound_select_w(uint8_t data); + void lasso_videoram_w(offs_t offset, uint8_t data); + void lasso_colorram_w(offs_t offset, uint8_t data); + void common_vidctrl_w(uint8_t data); + void lasso_vidctrl_w(uint8_t data); + void wwjgtin_vidctrl_w(uint8_t data); + void pinbo_vidctrl_w(uint8_t data); + TILE_GET_INFO_MEMBER(lasso_get_bg_tile_info); + TILE_GET_INFO_MEMBER(wwjgtin_get_track_tile_info); + TILE_GET_INFO_MEMBER(pinbo_get_bg_tile_info); + void lasso_palette(palette_device &palette) const; + DECLARE_VIDEO_START(wwjgtin); + void wwjgtin_palette(palette_device &palette) const; + DECLARE_VIDEO_START(pinbo); + uint32_t screen_update_lasso(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + uint32_t screen_update_chameleo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + uint32_t screen_update_wwjgtin(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + uint32_t screen_update_pinbo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + static rgb_t get_color(int data); + void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int reverse); + void draw_lasso(bitmap_ind16 &bitmap, const rectangle &cliprect); + + void chameleo_audio_map(address_map &map) ATTR_COLD; + void chameleo_main_map(address_map &map) ATTR_COLD; + void lasso_audio_map(address_map &map) ATTR_COLD; + void lasso_coprocessor_map(address_map &map) ATTR_COLD; + void lasso_main_map(address_map &map) ATTR_COLD; + void pinbo_audio_io_map(address_map &map) ATTR_COLD; + void pinbo_audio_map(address_map &map) ATTR_COLD; + void pinbo_main_map(address_map &map) ATTR_COLD; + void wwjgtin_audio_map(address_map &map) ATTR_COLD; + void wwjgtin_main_map(address_map &map) ATTR_COLD; +}; + + + +/************************************* + * + * Colors (BBGGGRRR) + * + *************************************/ + +rgb_t lasso_state::get_color(int data) +{ + int bit0, bit1, bit2; + + // red component + bit0 = BIT(data, 0); + bit1 = BIT(data, 1); + bit2 = BIT(data, 2); + int const r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; + + // green component + bit0 = BIT(data, 3); + bit1 = BIT(data, 4); + bit2 = BIT(data, 5); + int const g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; + + // blue component + bit0 = BIT(data, 6); + bit1 = BIT(data, 7); + int const b = 0x52 * bit0 + 0xad * bit1; + + return rgb_t(r, g, b); } -/* Write to the sound latch and generate an IRQ on the sound CPU */ -void lasso_state::sound_command_w(uint8_t data) +void lasso_state::lasso_palette(palette_device &palette) const { - m_soundlatch->write(data); - m_audiocpu->set_input_line(0, HOLD_LINE); + uint8_t const *const color_prom = memregion("proms")->base(); + + for (int i = 0; i < 0x40; i++) + palette.set_pen_color(i, get_color(color_prom[i])); } -uint8_t lasso_state::sound_status_r() + +void lasso_state::wwjgtin_palette(palette_device &palette) const { - /* 0x01: chip#0 ready; 0x02: chip#1 ready */ - return 0x03; + uint8_t const *const color_prom = memregion("proms")->base(); + + for (int i = 0; i < 0x40; i++) + palette.set_indirect_color(i, get_color(color_prom[i])); + + // characters/sprites + for (int i = 0; i < 0x40; i++) + palette.set_pen_indirect(i, i); + + // track + for (int i = 0; i < 0x100; i++) + { + uint8_t const ctabentry = (i & 0x03) ? ((((i & 0xf0) >> 2) + (i & 0x03)) & 0x3f) : 0; + palette.set_pen_indirect(i + 0x40, ctabentry); + } } -void lasso_state::sound_select_w(uint8_t data) + +/************************************* + * + * Callbacks for the TileMap code + * + *************************************/ + +TILE_GET_INFO_MEMBER(lasso_state::lasso_get_bg_tile_info) +{ + int code = m_videoram[tile_index]; + int color = m_colorram[tile_index]; + + tileinfo.set(0, code | (m_gfxbank << 8), color & 0x0f, 0); +} + +TILE_GET_INFO_MEMBER(lasso_state::wwjgtin_get_track_tile_info) +{ + uint8_t *ROM = memregion("user1")->base(); + int code = ROM[tile_index]; + int color = ROM[tile_index + 0x2000]; + + tileinfo.set(2, code, color & 0x0f, 0); +} + +TILE_GET_INFO_MEMBER(lasso_state::pinbo_get_bg_tile_info) +{ + int code = m_videoram[tile_index]; + int color = m_colorram[tile_index]; + + tileinfo.set(0, code + ((color & 0x30) << 4), color & 0x0f, 0); +} + + +/************************************* + * + * Video system start + * + *************************************/ + +void lasso_state::video_start() +{ + // create tilemap + m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(lasso_state::lasso_get_bg_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); + m_bg_tilemap->set_transparent_pen(0); +} + +VIDEO_START_MEMBER(lasso_state, wwjgtin) +{ + // create tilemaps + m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(lasso_state::lasso_get_bg_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); + m_bg_tilemap->set_transparent_pen(0); + + m_track_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(lasso_state::wwjgtin_get_track_tile_info)), TILEMAP_SCAN_ROWS, 16, 16, 128, 64); +} + +VIDEO_START_MEMBER(lasso_state, pinbo) +{ + // create tilemap + m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(lasso_state::pinbo_get_bg_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); + m_bg_tilemap->set_transparent_pen(0); +} + + +/************************************* + * + * Video update + * + *************************************/ + +void lasso_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int reverse) +{ + const uint8_t *finish, *source; + int inc; + + if (reverse) + { + source = m_spriteram; + finish = m_spriteram + m_spriteram.bytes(); + inc = 4; + } + else + { + source = m_spriteram + m_spriteram.bytes() - 4; + finish = m_spriteram - 4; + inc = -4; + } + + while (source != finish) + { + int sx = source[3]; + int sy = source[0]; + int flipx = source[1] & 0x40; + int flipy = source[1] & 0x80; + + if (flip_screen_x()) + { + sx = 240 - sx; + flipx = !flipx; + } + + if (flip_screen_y()) + flipy = !flipy; + else + sy = 240 - sy; + + int code = (source[1] & 0x3f) | (m_gfxbank << 6); + int color = source[2] & 0x0f; + + m_gfxdecode->gfx(1)->transpen(bitmap, cliprect, code, color, flipx, flipy, sx, sy, 0); + + // wraparound + const int dx = flip_screen_x() ? +256 : -256; + m_gfxdecode->gfx(1)->transpen(bitmap, cliprect, code, color, flipx, flipy, sx + dx, sy, 0); + + source += inc; + } +} + + +void lasso_state::draw_lasso(bitmap_ind16 &bitmap, const rectangle &cliprect) +{ + for (offs_t offs = 0; offs < 0x2000; offs++) + { + uint8_t y = offs >> 5; + + if (flip_screen_y()) + y = ~y; + + if ((y < cliprect.min_y) || (y > cliprect.max_y)) + continue; + + uint8_t x = (offs & 0x1f) << 3; + uint8_t data = m_bitmap_ram[offs]; + + if (flip_screen_x()) + x = ~x; + + for (int bit = 0; bit < 8; bit++) + { + if ((data & 0x80) && (x >= cliprect.min_x) && (x <= cliprect.max_x)) + bitmap.pix(y, x) = 0x3f; + + if (flip_screen_x()) + x--; + else + x++; + + data <<= 1; + } + } +} + + +uint32_t lasso_state::screen_update_lasso(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +{ + m_palette->set_pen_color(0, get_color(*m_back_color)); + bitmap.fill(0, cliprect); + + m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0); + draw_lasso(bitmap, cliprect); + draw_sprites(bitmap, cliprect, 0); + + return 0; +} + +uint32_t lasso_state::screen_update_chameleo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +{ + m_palette->set_pen_color(0, get_color(*m_back_color)); + bitmap.fill(0, cliprect); + + m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0); + draw_sprites(bitmap, cliprect, 0); + + return 0; +} + +uint32_t lasso_state::screen_update_wwjgtin(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +{ + m_palette->set_indirect_color(0, get_color(*m_back_color)); + + // the last palette entries can be changed + for (int i = 0; i < 3; i++) + m_palette->set_indirect_color(0x3d + i, get_color(m_last_colors[i])); + + m_track_tilemap->set_scrollx(0, m_track_scroll[0] + m_track_scroll[1] * 256); + m_track_tilemap->set_scrolly(0, m_track_scroll[2] + m_track_scroll[3] * 256); + + if (m_vidctrl & 8) + m_track_tilemap->draw(screen, bitmap, cliprect, 0, 0); + else + bitmap.fill(m_palette->black_pen(), cliprect); + + draw_sprites(bitmap, cliprect, 1); // reverse order + m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0); + + return 0; +} + +uint32_t lasso_state::screen_update_pinbo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +{ + // background color (always 0xa0?) + int r = pal4bit(*m_back_color & 7); + int g = pal4bit(*m_back_color >> 3 & 7); + int b = pal4bit(*m_back_color >> 4 & 0xc); + + m_palette->set_pen_color(0, rgb_t(r, g, b)); + bitmap.fill(0, cliprect); + + m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0); + draw_sprites(bitmap, cliprect, 0); + + return 0; +} + + +/************************************* + * + * Memory handlers + * + *************************************/ + +void lasso_state::lasso_videoram_w(offs_t offset, uint8_t data) +{ + m_videoram[offset] = data; + m_bg_tilemap->mark_tile_dirty(offset); +} + +void lasso_state::lasso_colorram_w(offs_t offset, uint8_t data) +{ + m_colorram[offset] = data; + m_bg_tilemap->mark_tile_dirty(offset); +} + + +void lasso_state::common_vidctrl_w(uint8_t data) +{ + // don't know which is which, but they are always set together + flip_screen_x_set(data & 0x01); + flip_screen_y_set(data & 0x02); + + machine().tilemap().set_flip_all((flip_screen_x() ? TILEMAP_FLIPX : 0) | (flip_screen_y() ? TILEMAP_FLIPY : 0)); + + m_vidctrl = data; +} + +void lasso_state::lasso_vidctrl_w(uint8_t data) +{ + if (m_gfxbank != BIT(data, 2)) + machine().tilemap().mark_all_dirty(); + m_gfxbank = BIT(data, 2); + + common_vidctrl_w(data); +} + +void lasso_state::wwjgtin_vidctrl_w(uint8_t data) +{ + m_gfxbank = BIT(~data, 2) | BIT(data, 4) << 1; + common_vidctrl_w(data); +} + +void lasso_state::pinbo_vidctrl_w(uint8_t data) +{ + m_gfxbank = (data & 0x0c) >> 2; + common_vidctrl_w(data); +} + + +INPUT_CHANGED_MEMBER(lasso_state::coin_inserted) { - uint8_t to_write = bitswap<8>(*m_chip_data, 0, 1, 2, 3, 4, 5, 6, 7); + // coin insertion causes an NMI + m_maincpu->set_input_line(INPUT_LINE_NMI, newval ? CLEAR_LINE : ASSERT_LINE); +} - if (~data & 0x01) /* chip #0 */ - m_sn_1->write(to_write); - if (~data & 0x02) /* chip #1 */ - m_sn_2->write(to_write); +uint8_t lasso_state::sound_status_r() +{ + // 0x01: chip#0 ready; 0x02: chip#1 ready + return m_sn[0]->ready_r() | m_sn[1]->ready_r() << 1; } +void lasso_state::sound_select_w(uint8_t data) +{ + for (int i = 0; i < 2; i++) + { + // 0x01: chip#0; 0x02: chip#1 + if (BIT(~data, i)) + m_sn[i]->write(bitswap<8>(*m_chip_data, 0, 1, 2, 3, 4, 5, 6, 7)); + } +} + + +/************************************* + * + * Address maps + * + *************************************/ void lasso_state::lasso_main_map(address_map &map) { @@ -80,12 +520,12 @@ void lasso_state::lasso_main_map(address_map &map) map(0x0800, 0x0bff).ram().w(FUNC(lasso_state::lasso_colorram_w)).share("colorram"); map(0x0c00, 0x0c7f).ram().share("spriteram"); map(0x1000, 0x17ff).ram().share("share1"); - map(0x1800, 0x1800).w(FUNC(lasso_state::sound_command_w)); + map(0x1800, 0x1800).w(m_soundlatch, FUNC(generic_latch_8_device::write)); map(0x1801, 0x1801).writeonly().share("back_color"); - map(0x1802, 0x1802).w(FUNC(lasso_state::lasso_video_control_w)); + map(0x1802, 0x1802).w(FUNC(lasso_state::lasso_vidctrl_w)); map(0x1804, 0x1804).portr("1804"); map(0x1805, 0x1805).portr("1805"); - map(0x1806, 0x1806).portr("1806").nopw(); /* game uses 'lsr' to read port */ + map(0x1806, 0x1806).portr("1806").nopw(); // game uses 'lsr' to read port map(0x1807, 0x1807).portr("1807"); map(0x8000, 0xbfff).mirror(0x4000).rom(); } @@ -119,9 +559,9 @@ void lasso_state::chameleo_main_map(address_map &map) map(0x0c00, 0x0fff).ram(); map(0x1000, 0x107f).ram().share("spriteram"); map(0x1080, 0x10ff).ram(); - map(0x1800, 0x1800).w(FUNC(lasso_state::sound_command_w)); + map(0x1800, 0x1800).w(m_soundlatch, FUNC(generic_latch_8_device::write)); map(0x1801, 0x1801).writeonly().share("back_color"); - map(0x1802, 0x1802).w(FUNC(lasso_state::lasso_video_control_w)); + map(0x1802, 0x1802).w(FUNC(lasso_state::lasso_vidctrl_w)); map(0x1804, 0x1804).portr("1804"); map(0x1805, 0x1805).portr("1805"); map(0x1806, 0x1806).portr("1806"); @@ -150,15 +590,15 @@ void lasso_state::wwjgtin_main_map(address_map &map) map(0x0800, 0x0bff).ram().w(FUNC(lasso_state::lasso_videoram_w)).share("videoram"); map(0x0c00, 0x0fff).ram().w(FUNC(lasso_state::lasso_colorram_w)).share("colorram"); map(0x1000, 0x10ff).ram().share("spriteram"); - map(0x1800, 0x1800).w(FUNC(lasso_state::sound_command_w)); + map(0x1800, 0x1800).w(m_soundlatch, FUNC(generic_latch_8_device::write)); map(0x1801, 0x1801).writeonly().share("back_color"); - map(0x1802, 0x1802).w(FUNC(lasso_state::wwjgtin_video_control_w)); + map(0x1802, 0x1802).w(FUNC(lasso_state::wwjgtin_vidctrl_w)); map(0x1804, 0x1804).portr("1804"); map(0x1805, 0x1805).portr("1805"); map(0x1806, 0x1806).portr("1806"); map(0x1807, 0x1807).portr("1807"); - map(0x1c00, 0x1c02).writeonly().share("last_colors"); - map(0x1c04, 0x1c07).writeonly().share("track_scroll"); + map(0x1c00, 0x1c02).nopr().writeonly().share("last_colors"); + map(0x1c04, 0x1c07).nopr().writeonly().share("track_scroll"); map(0x4000, 0xbfff).rom(); map(0xc000, 0xffff).rom().region("maincpu", 0x8000); } @@ -170,7 +610,7 @@ void lasso_state::wwjgtin_audio_map(address_map &map) map(0x4000, 0x7fff).mirror(0x8000).rom(); map(0xb000, 0xb000).writeonly().share("chip_data"); map(0xb001, 0xb001).w(FUNC(lasso_state::sound_select_w)); - map(0xb003, 0xb003).w("dac", FUNC(dac_byte_interface::data_w)); + map(0xb003, 0xb003).nopw(); // ? map(0xb004, 0xb004).r(FUNC(lasso_state::sound_status_r)); map(0xb005, 0xb005).r(m_soundlatch, FUNC(generic_latch_8_device::read)); } @@ -182,9 +622,9 @@ void lasso_state::pinbo_main_map(address_map &map) map(0x0400, 0x07ff).ram().w(FUNC(lasso_state::lasso_videoram_w)).share("videoram"); map(0x0800, 0x0bff).ram().w(FUNC(lasso_state::lasso_colorram_w)).share("colorram"); map(0x1000, 0x10ff).ram().share("spriteram"); - map(0x1800, 0x1800).w(FUNC(lasso_state::sound_command_w)); + map(0x1800, 0x1800).w(m_soundlatch, FUNC(generic_latch_8_device::write)); map(0x1801, 0x1801).writeonly().share("back_color"); - map(0x1802, 0x1802).w(FUNC(lasso_state::pinbo_video_control_w)); + map(0x1802, 0x1802).w(FUNC(lasso_state::pinbo_vidctrl_w)); map(0x1804, 0x1804).portr("1804"); map(0x1805, 0x1805).portr("1805"); map(0x1806, 0x1806).portr("1806"); @@ -209,11 +649,16 @@ void lasso_state::pinbo_audio_io_map(address_map &map) map(0x02, 0x02).r("ay1", FUNC(ay8910_device::data_r)); map(0x04, 0x05).w("ay2", FUNC(ay8910_device::address_data_w)); map(0x06, 0x06).r("ay2", FUNC(ay8910_device::data_r)); - map(0x08, 0x08).r(m_soundlatch, FUNC(generic_latch_8_device::read)).nopw(); /* ??? */ - map(0x14, 0x14).nopw(); /* ??? */ + map(0x08, 0x08).r(m_soundlatch, FUNC(generic_latch_8_device::read)).nopw(); // ? + map(0x14, 0x14).nopw(); // ? } +/************************************* + * + * Input ports + * + *************************************/ static INPUT_PORTS_START( lasso ) PORT_START("1804") @@ -221,8 +666,8 @@ static INPUT_PORTS_START( lasso ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) /* lasso */ - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) /* shoot */ + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) // lasso + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) // shoot PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) @@ -246,18 +691,18 @@ static INPUT_PORTS_START( lasso ) PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) ) PORT_DIPSETTING( 0x04, DEF_STR( 1C_3C ) ) PORT_DIPSETTING( 0x0c, DEF_STR( 1C_6C ) ) -// PORT_DIPSETTING( 0x06, DEF_STR( 1C_1C ) ) /* Not documented */ -// PORT_DIPSETTING( 0x0a, DEF_STR( 1C_1C ) ) /* Not documented */ -// PORT_DIPSETTING( 0x0e, DEF_STR( 1C_1C ) ) /* Not documented */ +// PORT_DIPSETTING( 0x06, DEF_STR( 1C_1C ) ) // Not documented +// PORT_DIPSETTING( 0x0a, DEF_STR( 1C_1C ) ) // Not documented +// PORT_DIPSETTING( 0x0e, DEF_STR( 1C_1C ) ) // Not documented PORT_DIPNAME( 0x30, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:!5,!6") PORT_DIPSETTING( 0x00, "3" ) PORT_DIPSETTING( 0x10, "4" ) PORT_DIPSETTING( 0x20, "5" ) -// PORT_DIPSETTING( 0x30, "3" ) /* Not documented */ +// PORT_DIPSETTING( 0x30, "3" ) // Not documented PORT_DIPNAME( 0x40, 0x00, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:!1") PORT_DIPSETTING( 0x40, DEF_STR( 2C_1C ) ) PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) - PORT_DIPNAME( 0x80, 0x80, "Warm-Up Instructions" ) PORT_DIPLOCATION("SW1:!4") /* Listed as "Unused" */ + PORT_DIPNAME( 0x80, 0x80, "Warm-Up Instructions" ) PORT_DIPLOCATION("SW1:!4") // Listed as "Unused" PORT_DIPSETTING( 0x00, DEF_STR( No ) ) PORT_DIPSETTING( 0x80, DEF_STR( Yes ) ) @@ -268,8 +713,8 @@ static INPUT_PORTS_START( lasso ) PORT_DIPNAME( 0x02, 0x00, "Warm-Up Language" ) PORT_DIPLOCATION("SW1:!2") PORT_DIPSETTING( 0x00, DEF_STR( English ) ) PORT_DIPSETTING( 0x02, DEF_STR( German ) ) - PORT_DIPUNUSED_DIPLOC( 0x04, 0x00, "SW1:!5" ) /* Listed as "Unused" */ - PORT_DIPNAME( 0x08, 0x00, "Invulnerability (Cheat)") PORT_DIPLOCATION("SW1:!6") /* Listed as "Test" */ + PORT_DIPUNUSED_DIPLOC( 0x04, 0x00, "SW1:!5" ) // Listed as "Unused" + PORT_DIPNAME( 0x08, 0x00, "Invulnerability (Cheat)") PORT_DIPLOCATION("SW1:!6") // Listed as "Test" PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x08, DEF_STR( On ) ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(lasso_state::coin_inserted), 0) @@ -296,9 +741,9 @@ static INPUT_PORTS_START( chameleo ) PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x00, "SW1:!4" ) PORT_MODIFY("1807") - PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x00, "SW1:!3" ) /* Probably unused */ - PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x00, "SW1:!2" ) /* Probably unused */ - PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x00, "SW1:!5" ) /* Probably unused */ + PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x00, "SW1:!3" ) // Probably unused + PORT_DIPUNKNOWN_DIPLOC( 0x02, 0x00, "SW1:!2" ) // Probably unused + PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x00, "SW1:!5" ) // Probably unused PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:!6") PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x08, DEF_STR( On ) ) @@ -316,10 +761,10 @@ static INPUT_PORTS_START( wwjgtin ) PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_MODIFY("1806") - PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x00, "SW2:!1" ) /* used - has to do with the controls */ - PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x00, "SW2:!5" ) /* probably unused */ - PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x00, "SW2:!6" ) /* probably unused */ - PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x00, "SW1:!4" ) /* probably unused */ + PORT_DIPUNKNOWN_DIPLOC( 0x01, 0x00, "SW2:!1" ) // used - has to do with the controls + PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x00, "SW2:!5" ) // probably unused + PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x00, "SW2:!6" ) // probably unused + PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x00, "SW1:!4" ) // probably unused PORT_MODIFY("1807") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Bonus_Life) ) PORT_DIPLOCATION("SW1:!3") @@ -328,8 +773,8 @@ static INPUT_PORTS_START( wwjgtin ) PORT_DIPNAME( 0x02, 0x02, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:!2") PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x02, DEF_STR( On ) ) - PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x00, "SW1:!5" ) /* probably unused */ - PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x00, "SW1:!6" ) /* probably unused */ + PORT_DIPUNKNOWN_DIPLOC( 0x04, 0x00, "SW1:!5" ) // probably unused + PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x00, "SW1:!6" ) // probably unused PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(lasso_state::coin_inserted), 0) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, FUNC(lasso_state::coin_inserted), 0) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_START1 ) @@ -365,7 +810,7 @@ static INPUT_PORTS_START( pinbo ) PORT_DIPSETTING( 0x10, "4" ) PORT_DIPSETTING( 0x20, "5" ) PORT_DIPSETTING( 0x30, "70 (Cheat)") - PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x00, "SW1:!4" ) /* probably unused */ + PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x00, "SW1:!4" ) // probably unused PORT_MODIFY("1807") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Bonus_Life) ) PORT_DIPLOCATION("SW1:!3") @@ -374,7 +819,7 @@ static INPUT_PORTS_START( pinbo ) PORT_DIPNAME( 0x02, 0x02, DEF_STR( Controls ) ) PORT_DIPLOCATION("SW1:!2") PORT_DIPSETTING( 0x02, DEF_STR( Normal ) ) PORT_DIPSETTING( 0x00, "Reversed" ) - PORT_DIPUNUSED_DIPLOC( 0x04, 0x00, "SW1:!5" ) /* probably unused */ + PORT_DIPUNUSED_DIPLOC( 0x04, 0x00, "SW1:!5" ) // probably unused PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION("SW1:!6") PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x08, DEF_STR( On ) ) @@ -392,6 +837,12 @@ static INPUT_PORTS_START( pinboa ) INPUT_PORTS_END +/************************************* + * + * GFX layouts + * + *************************************/ + static const gfx_layout lasso_charlayout = { 8,8, @@ -425,7 +876,7 @@ static const gfx_layout wwjgtin_tracklayout = 16*16 }; -/* Pinbo is 3bpp, otherwise the same */ +// Pinbo is 3bpp, otherwise the same static const gfx_layout pinbo_charlayout = { 8,8, @@ -466,70 +917,59 @@ static GFXDECODE_START( gfx_pinbo ) GFXDECODE_END +/************************************* + * + * Machine driver + * + *************************************/ + void lasso_state::machine_start() { + save_item(NAME(m_vidctrl)); save_item(NAME(m_gfxbank)); } -MACHINE_START_MEMBER(lasso_state,wwjgtin) -{ - lasso_state::machine_start(); - - save_item(NAME(m_track_enable)); -} - -void lasso_state::machine_reset() -{ - m_gfxbank = 0; -} - -MACHINE_RESET_MEMBER(lasso_state,wwjgtin) -{ - lasso_state::machine_reset(); - - m_track_enable = 0; -} - void lasso_state::base(machine_config &config) { - /* basic machine hardware */ - M6502(config, m_maincpu, 11289000/16); /* guess */ + // basic machine hardware + M6502(config, m_maincpu, 11'289'000/16); // guess m_maincpu->set_addrmap(AS_PROGRAM, &lasso_state::lasso_main_map); m_maincpu->set_vblank_int("screen", FUNC(lasso_state::irq0_line_hold)); - M6502(config, m_audiocpu, 600000); + M6502(config, m_audiocpu, 11'289'000/16); m_audiocpu->set_addrmap(AS_PROGRAM, &lasso_state::lasso_audio_map); - config.set_maximum_quantum(attotime::from_hz(6000)); - - /* video hardware */ - screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_refresh_hz(57); /* guess, but avoids glitching of Chameleon's high score table */ - screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500) /* not accurate */); - screen.set_size(32*8, 32*8); - screen.set_visarea(0, 32*8-1, 2*8, 30*8-1); - screen.set_screen_update(FUNC(lasso_state::screen_update_lasso)); - screen.set_palette(m_palette); + // video hardware + SCREEN(config, m_screen, SCREEN_TYPE_RASTER); + m_screen->set_refresh_hz(61); // guess based on intro song finish time compared to PCB + m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(0)); + m_screen->set_size(32*8, 32*8); + m_screen->set_visarea(0*8, 32*8-1, 2*8, 30*8-1); + m_screen->set_screen_update(FUNC(lasso_state::screen_update_lasso)); + m_screen->set_palette(m_palette); GFXDECODE(config, m_gfxdecode, m_palette, gfx_lasso); - /* sound hardware */ + // sound hardware SPEAKER(config, "speaker").front_center(); GENERIC_LATCH_8(config, m_soundlatch); + m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, 0); - SN76489(config, m_sn_1, 2000000).add_route(ALL_OUTPUTS, "speaker", 1.0); - SN76489(config, m_sn_2, 2000000).add_route(ALL_OUTPUTS, "speaker", 1.0); + SN76489(config, m_sn[0], 11'289'000/4).add_route(ALL_OUTPUTS, "speaker", 0.5); // correct + SN76489(config, m_sn[1], 11'289'000/4).add_route(ALL_OUTPUTS, "speaker", 0.5); // " } void lasso_state::lasso(machine_config &config) { base(config); - /* basic machine hardware */ - m6502_device & blitter(M6502(config, "blitter", 11289000/16)); /* guess */ + // basic machine hardware + m6502_device &blitter(M6502(config, "blitter", 11'289'000/16)); // guess blitter.set_addrmap(AS_PROGRAM, &lasso_state::lasso_coprocessor_map); + config.set_maximum_quantum(attotime::from_hz(6000)); + PALETTE(config, m_palette, FUNC(lasso_state::lasso_palette), 0x40); } @@ -537,70 +977,77 @@ void lasso_state::chameleo(machine_config &config) { base(config); - /* basic machine hardware */ + // basic machine hardware + m_maincpu->set_clock(18'000'000/24); m_maincpu->set_addrmap(AS_PROGRAM, &lasso_state::chameleo_main_map); + m_audiocpu->set_clock(18'000'000/24); m_audiocpu->set_addrmap(AS_PROGRAM, &lasso_state::chameleo_audio_map); - /* video hardware */ + // video hardware PALETTE(config, m_palette, FUNC(lasso_state::lasso_palette), 0x40); - subdevice("screen")->set_screen_update(FUNC(lasso_state::screen_update_chameleo)); + m_screen->set_refresh_hz(59); // guess based on intro song finish time compared to PCB + m_screen->set_screen_update(FUNC(lasso_state::screen_update_chameleo)); + + // sound hardware + m_sn[0]->set_clock(18'000'000/6); // correct + m_sn[1]->set_clock(18'000'000/6); // " } void lasso_state::wwjgtin(machine_config &config) { - base(config); + chameleo(config); - /* basic machine hardware */ + // basic machine hardware m_maincpu->set_addrmap(AS_PROGRAM, &lasso_state::wwjgtin_main_map); m_audiocpu->set_addrmap(AS_PROGRAM, &lasso_state::wwjgtin_audio_map); - MCFG_MACHINE_START_OVERRIDE(lasso_state,wwjgtin) - MCFG_MACHINE_RESET_OVERRIDE(lasso_state,wwjgtin) - - /* video hardware */ - subdevice("screen")->set_visarea(0*8, 32*8-1, 2*8, 30*8-1); - subdevice("screen")->set_screen_update(FUNC(lasso_state::screen_update_wwjgtin)); - m_gfxdecode->set_info(gfx_wwjgtin); // Has 1 additional layer + // video hardware + m_screen->set_screen_update(FUNC(lasso_state::screen_update_wwjgtin)); + m_gfxdecode->set_info(gfx_wwjgtin); // has 1 additional layer - PALETTE(config, m_palette, FUNC(lasso_state::wwjgtin_palette), 0x40 + 16*16, 64); - MCFG_VIDEO_START_OVERRIDE(lasso_state,wwjgtin) - - /* sound hardware */ - DAC_8BIT_R2R(config, "dac", 0).add_route(ALL_OUTPUTS, "speaker", 0.5); // unknown DAC + PALETTE(config.replace(), m_palette, FUNC(lasso_state::wwjgtin_palette), 0x40 + 16*16, 64); + MCFG_VIDEO_START_OVERRIDE(lasso_state, wwjgtin) } void lasso_state::pinbo(machine_config &config) { - base(config); + chameleo(config); - /* basic machine hardware */ - M6502(config.replace(), m_maincpu, XTAL(18'000'000)/24); + // basic machine hardware + m_maincpu->set_clock(18_MHz_XTAL/24); m_maincpu->set_addrmap(AS_PROGRAM, &lasso_state::pinbo_main_map); m_maincpu->set_vblank_int("screen", FUNC(lasso_state::irq0_line_hold)); - Z80(config.replace(), m_audiocpu, XTAL(18'000'000)/6); + Z80(config.replace(), m_audiocpu, 18_MHz_XTAL/6); m_audiocpu->set_addrmap(AS_PROGRAM, &lasso_state::pinbo_audio_map); m_audiocpu->set_addrmap(AS_IO, &lasso_state::pinbo_audio_io_map); - /* video hardware */ + // video hardware m_gfxdecode->set_info(gfx_pinbo); - PALETTE(config, m_palette, palette_device::RGB_444_PROMS, "proms", 256); - MCFG_VIDEO_START_OVERRIDE(lasso_state,pinbo) - subdevice("screen")->set_screen_update(FUNC(lasso_state::screen_update_chameleo)); + PALETTE(config.replace(), m_palette, palette_device::RGB_444_PROMS, "proms", 256); + MCFG_VIDEO_START_OVERRIDE(lasso_state, pinbo) - /* sound hardware */ - config.device_remove("sn76489.1"); - config.device_remove("sn76489.2"); + m_screen->set_screen_update(FUNC(lasso_state::screen_update_pinbo)); - AY8910(config, "ay1", XTAL(18'000'000)/12).add_route(ALL_OUTPUTS, "speaker", 0.55); - AY8910(config, "ay2", XTAL(18'000'000)/12).add_route(ALL_OUTPUTS, "speaker", 0.55); + // sound hardware + config.device_remove("sn76489_0"); + config.device_remove("sn76489_1"); + + AY8910(config, "ay1", 18_MHz_XTAL/12).add_route(ALL_OUTPUTS, "speaker", 0.5); + AY8910(config, "ay2", 18_MHz_XTAL/12).add_route(ALL_OUTPUTS, "speaker", 0.5); } +/************************************* + * + * ROM definitions + * + *************************************/ + ROM_START( lasso ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "wm3", 0x8000, 0x2000, CRC(f93addd6) SHA1(b0a1b263874da8608c3bab4e8785358e2aa19c2e) ) @@ -683,12 +1130,12 @@ ROM_START( wwjgtin ) ROM_CONTINUE( 0x7800, 0x0800 ) ROM_REGION( 0x4000, "gfx2", 0 ) - ROM_LOAD( "ic47.3", 0x0000, 0x2000, CRC(40594c59) SHA1(94533be8e267d9aa5bcdd52b45f6974436d3fed5) ) // 1xxxxxxxxxxxx = 0xFF + ROM_LOAD( "ic47.3", 0x0000, 0x2000, CRC(40594c59) SHA1(94533be8e267d9aa5bcdd52b45f6974436d3fed5) ) // 1xxxxxxxxxxxx = 0xFF ROM_LOAD( "ic46.4", 0x2000, 0x2000, CRC(d1921348) SHA1(8b5506ff80a31ce721aed515cad1b4a7e52e47a2) ) - ROM_REGION( 0x4000, "user1", 0 ) /* tilemap */ + ROM_REGION( 0x4000, "user1", 0 ) // tilemap ROM_LOAD( "ic48.2", 0x0000, 0x2000, CRC(a4a7df77) SHA1(476aab702346a402169ab404a8b06589e4932d37) ) - ROM_LOAD( "ic49.1", 0x2000, 0x2000, CRC(e480fbba) SHA1(197c86747ef8477040169f90eb6e04d928aedbe5) ) // FIXED BITS (1111xxxx) + ROM_LOAD( "ic49.1", 0x2000, 0x2000, CRC(e480fbba) SHA1(197c86747ef8477040169f90eb6e04d928aedbe5) ) // FIXED BITS (1111xxxx) ROM_REGION( 0x40, "proms", 0 ) ROM_LOAD( "2.bpr", 0x0000, 0x0020, CRC(79adda5d) SHA1(e54de3eb02f744d49f524cd81e1cf993338916e3) ) @@ -722,12 +1169,12 @@ ROM_START( photof ) ROM_CONTINUE( 0x7800, 0x0800 ) ROM_REGION( 0x4000, "gfx2", 0 ) - ROM_LOAD( "3-ic47.bin", 0x0000, 0x2000, CRC(40594c59) SHA1(94533be8e267d9aa5bcdd52b45f6974436d3fed5) ) // 1xxxxxxxxxxxx = 0xFF + ROM_LOAD( "3-ic47.bin", 0x0000, 0x2000, CRC(40594c59) SHA1(94533be8e267d9aa5bcdd52b45f6974436d3fed5) ) // 1xxxxxxxxxxxx = 0xFF ROM_LOAD( "4-ic46.bin", 0x2000, 0x2000, CRC(d1921348) SHA1(8b5506ff80a31ce721aed515cad1b4a7e52e47a2) ) - ROM_REGION( 0x4000, "user1", 0 ) /* tilemap */ + ROM_REGION( 0x4000, "user1", 0 ) // tilemap ROM_LOAD( "2-ic48.bin", 0x0000, 0x2000, CRC(a4a7df77) SHA1(476aab702346a402169ab404a8b06589e4932d37) ) - ROM_LOAD( "1-ic49.bin", 0x2000, 0x2000, CRC(e480fbba) SHA1(197c86747ef8477040169f90eb6e04d928aedbe5) ) // FIXED BITS (1111xxxx) + ROM_LOAD( "1-ic49.bin", 0x2000, 0x2000, CRC(e480fbba) SHA1(197c86747ef8477040169f90eb6e04d928aedbe5) ) // FIXED BITS (1111xxxx) ROM_REGION( 0x40, "proms", 0 ) ROM_LOAD( "2.bpr", 0x0000, 0x0020, CRC(79adda5d) SHA1(e54de3eb02f744d49f524cd81e1cf993338916e3) ) @@ -745,7 +1192,7 @@ ROM_START( pinbo ) ROM_LOAD( "rom1.s8", 0x0000, 0x2000, CRC(ca45a1be) SHA1(d0b2d8f1e6d01b60cba83d2bd458a57548549b4b) ) ROM_REGION( 0xc000, "gfx1", 0 ) - ROM_LOAD( "rom6.a1", 0x0000, 0x0800, CRC(74fe8e98) SHA1(3c9ac38d7054b2831a515786b6f204b1804aaea3) ) /* tiles */ + ROM_LOAD( "rom6.a1", 0x0000, 0x0800, CRC(74fe8e98) SHA1(3c9ac38d7054b2831a515786b6f204b1804aaea3) ) // tiles ROM_CONTINUE( 0x2000, 0x0800 ) ROM_CONTINUE( 0x0800, 0x0800 ) ROM_CONTINUE( 0x2800, 0x0800 ) @@ -761,7 +1208,7 @@ ROM_START( pinbo ) ROM_CONTINUE( 0x7000, 0x0800 ) ROM_CONTINUE( 0x5800, 0x0800 ) ROM_CONTINUE( 0x7800, 0x0800 ) - ROM_LOAD( "rom7.d1", 0x8000, 0x0800, CRC(327a3c21) SHA1(e938915d28ac4ec033b20d33728788493e3f30f6) ) /* 3rd bitplane */ + ROM_LOAD( "rom7.d1", 0x8000, 0x0800, CRC(327a3c21) SHA1(e938915d28ac4ec033b20d33728788493e3f30f6) ) // 3rd bitplane ROM_CONTINUE( 0xa000, 0x0800 ) ROM_CONTINUE( 0x8800, 0x0800 ) ROM_CONTINUE( 0xa800, 0x0800 ) @@ -787,7 +1234,7 @@ ROM_START( pinboa ) ROM_LOAD( "8.bin", 0x0000, 0x2000, CRC(32d1df14) SHA1(c0d4181378bbd6f2c594e923e2f8b21647c7fb0e) ) ROM_REGION( 0xc000, "gfx1", 0 ) - ROM_LOAD( "rom6.a1", 0x0000, 0x0800, CRC(74fe8e98) SHA1(3c9ac38d7054b2831a515786b6f204b1804aaea3) ) /* tiles */ + ROM_LOAD( "rom6.a1", 0x0000, 0x0800, CRC(74fe8e98) SHA1(3c9ac38d7054b2831a515786b6f204b1804aaea3) ) // tiles ROM_CONTINUE( 0x2000, 0x0800 ) ROM_CONTINUE( 0x0800, 0x0800 ) ROM_CONTINUE( 0x2800, 0x0800 ) @@ -803,7 +1250,7 @@ ROM_START( pinboa ) ROM_CONTINUE( 0x7000, 0x0800 ) ROM_CONTINUE( 0x5800, 0x0800 ) ROM_CONTINUE( 0x7800, 0x0800 ) - ROM_LOAD( "2.bin", 0x8000, 0x0800, CRC(33cac92e) SHA1(55d4ff3ae9c9519a59bd6021a53584c873b4d327) ) /* 3rd bitplane */ + ROM_LOAD( "2.bin", 0x8000, 0x0800, CRC(33cac92e) SHA1(55d4ff3ae9c9519a59bd6021a53584c873b4d327) ) // 3rd bitplane ROM_CONTINUE( 0xa000, 0x0800 ) ROM_CONTINUE( 0x8800, 0x0800 ) ROM_CONTINUE( 0xa800, 0x0800 ) @@ -829,7 +1276,7 @@ ROM_START( pinbos ) ROM_LOAD( "b8.bin", 0x0000, 0x2000, CRC(32d1df14) SHA1(c0d4181378bbd6f2c594e923e2f8b21647c7fb0e) ) ROM_REGION( 0xc000, "gfx1", 0 ) - ROM_LOAD( "rom6.a1", 0x0000, 0x0800, CRC(74fe8e98) SHA1(3c9ac38d7054b2831a515786b6f204b1804aaea3) ) /* tiles */ + ROM_LOAD( "rom6.a1", 0x0000, 0x0800, CRC(74fe8e98) SHA1(3c9ac38d7054b2831a515786b6f204b1804aaea3) ) // tiles ROM_CONTINUE( 0x2000, 0x0800 ) ROM_CONTINUE( 0x0800, 0x0800 ) ROM_CONTINUE( 0x2800, 0x0800 ) @@ -845,7 +1292,7 @@ ROM_START( pinbos ) ROM_CONTINUE( 0x7000, 0x0800 ) ROM_CONTINUE( 0x5800, 0x0800 ) ROM_CONTINUE( 0x7800, 0x0800 ) - ROM_LOAD( "rom7.d1", 0x8000, 0x0800, CRC(327a3c21) SHA1(e938915d28ac4ec033b20d33728788493e3f30f6) ) /* 3rd bitplane */ + ROM_LOAD( "rom7.d1", 0x8000, 0x0800, CRC(327a3c21) SHA1(e938915d28ac4ec033b20d33728788493e3f30f6) ) // 3rd bitplane ROM_CONTINUE( 0xa000, 0x0800 ) ROM_CONTINUE( 0x8800, 0x0800 ) ROM_CONTINUE( 0xa800, 0x0800 ) @@ -860,13 +1307,14 @@ ROM_START( pinbos ) ROM_LOAD( "blue.n10", 0x0200, 0x0100, CRC(e41250ad) SHA1(2e9a2babbacb1753057d46cf1dd6dc183611747e) ) ROM_END +} // anonymous namespace -/*************************************************************************** - - Game Drivers - -***************************************************************************/ +/************************************* + * + * Game Drivers + * + *************************************/ GAME( 1982, lasso, 0, lasso, lasso, lasso_state, empty_init, ROT90, "SNK", "Lasso", MACHINE_SUPPORTS_SAVE ) GAME( 1983, chameleo, 0, chameleo, chameleo, lasso_state, empty_init, ROT0, "Jaleco", "Chameleon", MACHINE_SUPPORTS_SAVE ) diff --git a/src/mame/snk/lasso.h b/src/mame/snk/lasso.h deleted file mode 100644 index 28f5d5604b12a..0000000000000 --- a/src/mame/snk/lasso.h +++ /dev/null @@ -1,116 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Phil Stroffolino, Nicola Salmoria, Luca Elia -/*************************************************************************** - - Lasso and similar hardware - -***************************************************************************/ -#ifndef MAME_SNK_LASSO_H -#define MAME_SNK_LASSO_H - -#pragma once - -#include "machine/gen_latch.h" -#include "sound/sn76496.h" -#include "emupal.h" -#include "tilemap.h" - -class lasso_state : public driver_device -{ -public: - lasso_state(const machine_config &mconfig, device_type type, const char *tag) : - driver_device(mconfig, type, tag), - m_videoram(*this, "videoram"), - m_colorram(*this, "colorram"), - m_spriteram(*this, "spriteram"), - m_back_color(*this, "back_color"), - m_chip_data(*this, "chip_data"), - m_bitmap_ram(*this, "bitmap_ram"), - m_last_colors(*this, "last_colors"), - m_track_scroll(*this, "track_scroll"), - m_maincpu(*this, "maincpu"), - m_audiocpu(*this, "audiocpu"), - m_sn_1(*this, "sn76489.1"), - m_sn_2(*this, "sn76489.2"), - m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette"), - m_soundlatch(*this, "soundlatch") - { } - - void base(machine_config &config); - void wwjgtin(machine_config &config); - void lasso(machine_config &config); - void chameleo(machine_config &config); - void pinbo(machine_config &config); - - DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); - -protected: - virtual void machine_start() override ATTR_COLD; - virtual void machine_reset() override ATTR_COLD; - virtual void video_start() override ATTR_COLD; - -private: - /* memory pointers */ - required_shared_ptr m_videoram; - required_shared_ptr m_colorram; - required_shared_ptr m_spriteram; - required_shared_ptr m_back_color; - optional_shared_ptr m_chip_data; - optional_shared_ptr m_bitmap_ram; /* 0x2000 bytes for a 256 x 256 x 1 bitmap */ - optional_shared_ptr m_last_colors; - optional_shared_ptr m_track_scroll; - - /* video-related */ - tilemap_t *m_bg_tilemap = nullptr; - tilemap_t *m_track_tilemap = nullptr; - uint8_t m_gfxbank = 0U; /* used by lasso, chameleo, wwjgtin and pinbo */ - uint8_t m_track_enable = 0U; /* used by wwjgtin */ - - /* devices */ - required_device m_maincpu; - required_device m_audiocpu; - optional_device m_sn_1; - optional_device m_sn_2; - required_device m_gfxdecode; - required_device m_palette; - required_device m_soundlatch; - - void sound_command_w(uint8_t data); - uint8_t sound_status_r(); - void sound_select_w(uint8_t data); - void lasso_videoram_w(offs_t offset, uint8_t data); - void lasso_colorram_w(offs_t offset, uint8_t data); - void lasso_flip_screen_w(uint8_t data); - void lasso_video_control_w(uint8_t data); - void wwjgtin_video_control_w(uint8_t data); - void pinbo_video_control_w(uint8_t data); - TILE_GET_INFO_MEMBER(lasso_get_bg_tile_info); - TILE_GET_INFO_MEMBER(wwjgtin_get_track_tile_info); - TILE_GET_INFO_MEMBER(pinbo_get_bg_tile_info); - void lasso_palette(palette_device &palette) const; - DECLARE_MACHINE_START(wwjgtin); - DECLARE_MACHINE_RESET(wwjgtin); - DECLARE_VIDEO_START(wwjgtin); - void wwjgtin_palette(palette_device &palette) const; - DECLARE_VIDEO_START(pinbo); - uint32_t screen_update_lasso(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - uint32_t screen_update_chameleo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - uint32_t screen_update_wwjgtin(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - static rgb_t get_color(int data); - void wwjgtin_set_last_four_colors(); - void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect, int reverse); - void draw_lasso(bitmap_ind16 &bitmap, const rectangle &cliprect); - void chameleo_audio_map(address_map &map) ATTR_COLD; - void chameleo_main_map(address_map &map) ATTR_COLD; - void lasso_audio_map(address_map &map) ATTR_COLD; - void lasso_coprocessor_map(address_map &map) ATTR_COLD; - void lasso_main_map(address_map &map) ATTR_COLD; - void pinbo_audio_io_map(address_map &map) ATTR_COLD; - void pinbo_audio_map(address_map &map) ATTR_COLD; - void pinbo_main_map(address_map &map) ATTR_COLD; - void wwjgtin_audio_map(address_map &map) ATTR_COLD; - void wwjgtin_main_map(address_map &map) ATTR_COLD; -}; - -#endif // MAME_SNK_LASSO_H diff --git a/src/mame/snk/lasso_v.cpp b/src/mame/snk/lasso_v.cpp deleted file mode 100644 index 834a2d852f75a..0000000000000 --- a/src/mame/snk/lasso_v.cpp +++ /dev/null @@ -1,381 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Phil Stroffolino, Nicola Salmoria, Luca Elia -/*************************************************************************** - - Lasso and similar hardware - - driver by Phil Stroffolino, Nicola Salmoria, Luca Elia - - - Every game has 1 256 x 256 tilemap (non scrollable) made of 8 x 8 - tiles, and 16 x 16 sprites (some games use 32, some more). - - The graphics for tiles and sprites are held inside the same ROMs, - but aren't shared between the two: - - the first $100 tiles are for the tilemap, the following $100 are - for sprites. This constitutes the first graphics bank. There can - be several. - - Lasso has an additional pixel layer (256 x 256 x 1) and a third - CPU devoted to drawing into it (the lasso!) - - Wwjgtin has an additional $800 x $400 scrolling tilemap in ROM - and $100 more 16 x 16 x 4 tiles for it. - - The colors are static ($40 colors, 2 PROMs) but the background - color can be changed at runtime. Wwjgtin can change the last - 4 colors (= last palette) too. - -***************************************************************************/ - -#include "emu.h" -#include "lasso.h" - -/*************************************************************************** - - - Colors (BBGGGRRR) - - -***************************************************************************/ - -rgb_t lasso_state::get_color(int data) -{ - int bit0, bit1, bit2; - - // red component - bit0 = BIT(data, 0); - bit1 = BIT(data, 1); - bit2 = BIT(data, 2); - int const r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; - - // green component - bit0 = BIT(data, 3); - bit1 = BIT(data, 4); - bit2 = BIT(data, 5); - int const g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; - - // blue component - bit0 = BIT(data, 6); - bit1 = BIT(data, 7); - int const b = 0x52 * bit0 + 0xad * bit1; - - return rgb_t(r, g, b); -} - - -void lasso_state::lasso_palette(palette_device &palette) const -{ - uint8_t const *const color_prom = memregion("proms")->base(); - - for (int i = 0; i < 0x40; i++) - palette.set_pen_color(i, get_color(color_prom[i])); -} - - -void lasso_state::wwjgtin_palette(palette_device &palette) const -{ - uint8_t const *const color_prom = memregion("proms")->base(); - - for (int i = 0; i < 0x40; i++) - palette.set_indirect_color(i, get_color(color_prom[i])); - - // characters/sprites - for (int i = 0; i < 0x40; i++) - palette.set_pen_indirect(i, i); - - // track - for (int i = 0; i < 0x100; i++) - { - uint8_t const ctabentry = (i & 0x03) ? ((((i & 0xf0) >> 2) + (i & 0x03)) & 0x3f) : 0; - - palette.set_pen_indirect(i + 0x40, ctabentry); - } -} - - -void lasso_state::wwjgtin_set_last_four_colors() -{ - // the last palette entries can be changed - for (int i = 0; i < 3; i++) - m_palette->set_indirect_color(0x3d + i, get_color(m_last_colors[i])); -} - - - -/*************************************************************************** - - Callbacks for the TileMap code - -***************************************************************************/ - -TILE_GET_INFO_MEMBER(lasso_state::lasso_get_bg_tile_info) -{ - int code = m_videoram[tile_index]; - int color = m_colorram[tile_index]; - - tileinfo.set(0, - code + ((uint16_t)m_gfxbank << 8), - color & 0x0f, - 0); -} - -TILE_GET_INFO_MEMBER(lasso_state::wwjgtin_get_track_tile_info) -{ - uint8_t *ROM = memregion("user1")->base(); - int code = ROM[tile_index]; - int color = ROM[tile_index + 0x2000]; - - tileinfo.set(2, - code, - color & 0x0f, - 0); -} - -TILE_GET_INFO_MEMBER(lasso_state::pinbo_get_bg_tile_info) -{ - int code = m_videoram[tile_index]; - int color = m_colorram[tile_index]; - - tileinfo.set(0, - code + ((color & 0x30) << 4), - color & 0x0f, - 0); -} - - -/************************************* - * - * Video system start - * - *************************************/ - -void lasso_state::video_start() -{ - /* create tilemap */ - m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(lasso_state::lasso_get_bg_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); - - m_bg_tilemap->set_transparent_pen(0); -} - -VIDEO_START_MEMBER(lasso_state,wwjgtin) -{ - /* create tilemaps */ - m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(lasso_state::lasso_get_bg_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); - m_track_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(lasso_state::wwjgtin_get_track_tile_info)), TILEMAP_SCAN_ROWS, 16, 16, 128, 64); - - m_bg_tilemap->set_transparent_pen(0); -} - -VIDEO_START_MEMBER(lasso_state,pinbo) -{ - /* create tilemap */ - m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(lasso_state::pinbo_get_bg_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); - - m_bg_tilemap->set_transparent_pen(0); -} - - -/************************************* - * - * Memory handlers - * - *************************************/ - -void lasso_state::lasso_videoram_w(offs_t offset, uint8_t data) -{ - m_videoram[offset] = data; - m_bg_tilemap->mark_tile_dirty(offset); -} - -void lasso_state::lasso_colorram_w(offs_t offset, uint8_t data) -{ - m_colorram[offset] = data; - m_bg_tilemap->mark_tile_dirty(offset); -} - - -void lasso_state::lasso_flip_screen_w(uint8_t data) -{ - /* don't know which is which, but they are always set together */ - flip_screen_x_set(data & 0x01); - flip_screen_y_set(data & 0x02); - - machine().tilemap().set_flip_all((flip_screen_x() ? TILEMAP_FLIPX : 0) | (flip_screen_y() ? TILEMAP_FLIPY : 0)); -} - - -void lasso_state::lasso_video_control_w(uint8_t data) -{ - int bank = (data & 0x04) >> 2; - - if (m_gfxbank != bank) - { - m_gfxbank = bank; - machine().tilemap().mark_all_dirty(); - } - - lasso_flip_screen_w(data); -} - -void lasso_state::wwjgtin_video_control_w(uint8_t data) -{ - int bank = ((data & 0x04) ? 0 : 1) + ((data & 0x10) ? 2 : 0); - m_track_enable = data & 0x08; - - if (m_gfxbank != bank) - { - m_gfxbank = bank; - machine().tilemap().mark_all_dirty(); - } - - lasso_flip_screen_w(data); -} - -void lasso_state::pinbo_video_control_w(uint8_t data) -{ - /* no need to dirty the tilemap -- only the sprites use the global bank */ - m_gfxbank = (data & 0x0c) >> 2; - - lasso_flip_screen_w(data); -} - - -/************************************* - * - * Video update - * - *************************************/ - -void lasso_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, int reverse ) -{ - const uint8_t *finish, *source; - int inc; - - if (reverse) - { - source = m_spriteram; - finish = m_spriteram + m_spriteram.bytes(); - inc = 4; - } - else - { - source = m_spriteram + m_spriteram.bytes() - 4; - finish = m_spriteram - 4; - inc = -4; - } - - while (source != finish) - { - int sx, sy, flipx, flipy; - int code, color; - - sx = source[3]; - sy = source[0]; - flipx = source[1] & 0x40; - flipy = source[1] & 0x80; - - if (flip_screen_x()) - { - sx = 240 - sx; - flipx = !flipx; - } - - if (flip_screen_y()) - flipy = !flipy; - else - sy = 240 - sy; - - code = source[1] & 0x3f; - color = source[2] & 0x0f; - - m_gfxdecode->gfx(1)->transpen(bitmap,cliprect, - code | ((uint16_t)m_gfxbank << 6), - color, - flipx, flipy, - sx,sy,0); - - source += inc; - } -} - - -void lasso_state::draw_lasso( bitmap_ind16 &bitmap, const rectangle &cliprect ) -{ - pen_t pen = 0x3f; - - for (offs_t offs = 0; offs < 0x2000; offs++) - { - uint8_t y = offs >> 5; - - if (flip_screen_y()) - y = ~y; - - if ((y < cliprect.min_y) || (y > cliprect.max_y)) - continue; - - uint8_t x = (offs & 0x1f) << 3; - uint8_t data = m_bitmap_ram[offs]; - - if (flip_screen_x()) - x = ~x; - - for (int bit = 0; bit < 8; bit++) - { - if ((data & 0x80) && (x >= cliprect.min_x) && (x <= cliprect.max_x)) - bitmap.pix(y, x) = pen; - - if (flip_screen_x()) - x--; - else - x++; - - data <<= 1; - } - } -} - - -uint32_t lasso_state::screen_update_lasso(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) -{ - m_palette->set_pen_color(0, get_color(*m_back_color)); - bitmap.fill(0, cliprect); - - m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0); - draw_lasso(bitmap, cliprect); - draw_sprites(bitmap, cliprect, 0); - - return 0; -} - -uint32_t lasso_state::screen_update_chameleo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) -{ - m_palette->set_pen_color(0, get_color(*m_back_color)); - bitmap.fill(0, cliprect); - - m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0); - draw_sprites(bitmap, cliprect, 0); - - return 0; -} - - -uint32_t lasso_state::screen_update_wwjgtin(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) -{ - m_palette->set_indirect_color(0, get_color(*m_back_color)); - wwjgtin_set_last_four_colors(); - - m_track_tilemap->set_scrollx(0, m_track_scroll[0] + m_track_scroll[1] * 256); - m_track_tilemap->set_scrolly(0, m_track_scroll[2] + m_track_scroll[3] * 256); - - if (m_track_enable) - m_track_tilemap->draw(screen, bitmap, cliprect, 0, 0); - else - bitmap.fill(m_palette->black_pen(), cliprect); - - draw_sprites(bitmap, cliprect, 1); // reverse order - m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0); - - return 0; -} diff --git a/src/mame/snk/munchmo.cpp b/src/mame/snk/munchmo.cpp index 3f1830e14e38c..8bf632614f52a 100644 --- a/src/mame/snk/munchmo.cpp +++ b/src/mame/snk/munchmo.cpp @@ -1,6 +1,7 @@ // license:BSD-3-Clause // copyright-holders:Phil Stroffolino -/*************************************************************************** +/******************************************************************************* + Munch Mobile (C) 1983 SNK @@ -9,8 +10,8 @@ 15 MHz crystal Known Issues: - - it's unclear if mirroring the videoram chunks is correct behavior - - several unmapped registers + - it's unclear if mirroring the videoram chunks is correct behavior + - several unmapped registers Stephh's notes (based on the game Z80 code and some tests) : @@ -23,7 +24,7 @@ Stephh's notes (based on the game Z80 code and some tests) : - DIPs are now verified from Munch Mobile manual and playtesting. -***************************************************************************/ +*******************************************************************************/ #include "emu.h" @@ -119,6 +120,12 @@ class munchmo_state : public driver_device }; +/************************************* + * + * Video hardware + * + *************************************/ + void munchmo_state::palette(palette_device &palette) const { u8 const *const color_prom = memregion("proms")->base(); @@ -185,19 +192,18 @@ void munchmo_state::draw_status(bitmap_ind16 &bitmap, const rectangle &cliprect) for (int sy = 0; sy < 256; sy += 8) { - gfx->opaque(bitmap, cliprect, - *source++, - 0, // color - 0, 0, // no flip - sx, sy); + gfx->opaque(bitmap, cliprect, + *source++, + 0, // color + 0, 0, // no flip + sx, sy); } } } void munchmo_state::draw_background(bitmap_ind16 &bitmap, const rectangle &cliprect) { -// ROM B1.2C contains 256 tilemaps defining 4x4 configurations of the tiles in ROM B2.2B - + // ROM B1.2C contains 256 tilemaps defining 4x4 configurations of the tiles in ROM B2.2B gfx_element *const gfx = m_gfxdecode->gfx(1); for (int offs = 0; offs < 0x100; offs++) @@ -210,11 +216,11 @@ void munchmo_state::draw_background(bitmap_ind16 &bitmap, const rectangle &clipr { for (int col = 0; col < 4; col++) { - gfx->opaque(*m_tmpbitmap, m_tmpbitmap->cliprect(), - m_tiles_rom[col + tile_number * 4 + row * 0x400], - m_palette_bank, - 0, 0, // flip - sx + col * 8, sy + row * 8); + gfx->opaque(*m_tmpbitmap, m_tmpbitmap->cliprect(), + m_tiles_rom[col + tile_number * 4 + row * 0x400], + m_palette_bank, + 0, 0, // flip + sx + col * 8, sy + row * 8); } } } @@ -234,6 +240,7 @@ void munchmo_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect gfx_element *const gfx = m_gfxdecode->gfx(2 + bank); int const color_base = m_palette_bank * 4 + 3; int const firstsprite = m_vreg[0] & 0x3f; + for (int i = firstsprite; i < firstsprite + 0x40; i++) { for (int j = 0; j < 8; j++) @@ -244,15 +251,17 @@ void munchmo_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect int sx = m_sprite_xpos[offs]; // XXXXXXX? int sy = (offs >> 6) << 5; // Y YY------ sy += (attributes >> 2) & 0x1f; + if (attributes & 0x80) { sx = (sx >> 1) | (tile_number & 0x80); - sx = 2 * ((- 32 - scroll - sx) & 0xff) + xadjust; - gfx->transpen(bitmap, cliprect, - 0x7f - (tile_number & 0x7f), - color_base - (attributes & 0x03), - 0, 0, // no flip - sx, sy, 7); + sx = 2 * ((-32 - scroll - sx) & 0xff) + xadjust; + + gfx->transpen(bitmap, cliprect, + 0x7f - (tile_number & 0x7f), + color_base - (attributes & 0x03), + 0, 0, // no flip + sx, sy, 7); } } } @@ -310,10 +319,12 @@ void munchmo_state::sound_nmi_ack_w(u8 data) template u8 munchmo_state::ayreset_r() { - m_ay8910[Which]->reset_w(); + if (!machine().side_effects_disabled()) + m_ay8910[Which]->reset_w(); return 0; } + /************************************* * * Address maps @@ -393,7 +404,7 @@ static INPUT_PORTS_START( mnchmobl ) PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("DSW1") - // See notes about this DIP + // See notes about this DIP PORT_DIPNAME( 0x01, 0x00, "Continue after Game Over (Cheat)" ) PORT_DIPLOCATION("SW1:1") PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x01, DEF_STR( On ) ) @@ -417,7 +428,6 @@ static INPUT_PORTS_START( mnchmobl ) PORT_DIPSETTING( 0x0c, DEF_STR( 1C_7C ) ) PORT_DIPSETTING( 0x0e, DEF_STR( 1C_8C ) ) - PORT_DIPNAME( 0xe0, 0x00, "1st Bonus" ) PORT_DIPLOCATION("SW1:6,7,8") PORT_DIPSETTING( 0x00, "10000" ) PORT_DIPSETTING( 0x20, "20000" ) @@ -453,6 +463,7 @@ static INPUT_PORTS_START( mnchmobl ) PORT_DIPSETTING( 0x80, DEF_STR( Yes ) ) INPUT_PORTS_END + /************************************* * * Graphics definitions @@ -493,8 +504,8 @@ static const gfx_layout sprite_layout1 = 0x8000+3,0x8000+3,0x8000+2,0x8000+2,0x8000+1,0x8000+1,0x8000+0,0x8000+0 }, { - 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, - 8*8, 9*8,10*8,11*8,12*8,13*8,14*8,15*8, + 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, + 8*8, 9*8, 10*8,11*8,12*8,13*8,14*8,15*8, 16*8,17*8,18*8,19*8,20*8,21*8,22*8,23*8, 24*8,25*8,26*8,27*8,28*8,29*8,30*8,31*8 }, @@ -513,8 +524,8 @@ static const gfx_layout sprite_layout2 = 0x8000+3,0x8000+3,0x8000+2,0x8000+2,0x8000+1,0x8000+1,0x8000+0,0x8000+0 }, { - 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, - 8*8, 9*8,10*8,11*8,12*8,13*8,14*8,15*8, + 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, + 8*8, 9*8, 10*8,11*8,12*8,13*8,14*8,15*8, 16*8,17*8,18*8,19*8,20*8,21*8,22*8,23*8, 24*8,25*8,26*8,27*8,28*8,29*8,30*8,31*8 }, @@ -522,12 +533,13 @@ static const gfx_layout sprite_layout2 = }; static GFXDECODE_START( gfx_mnchmobl ) - GFXDECODE_ENTRY( "chars", 0, char_layout, 0, 4 ) // colors 0- 63 - GFXDECODE_ENTRY( "tiles", 0x1000, tile_layout, 64, 4 ) // colors 64-127 - GFXDECODE_ENTRY( "sprites", 0, sprite_layout1, 128, 16 ) // colors 128-255 - GFXDECODE_ENTRY( "monochrome_sprites", 0, sprite_layout2, 128, 16 ) // colors 128-255 + GFXDECODE_ENTRY( "chars", 0, char_layout, 0, 4 ) // colors 0- 63 + GFXDECODE_ENTRY( "tiles", 0x1000, tile_layout, 64, 4 ) // colors 64-127 + GFXDECODE_ENTRY( "sprites", 0, sprite_layout1, 128, 16 ) // colors 128-255 + GFXDECODE_ENTRY( "monochrome_sprites", 0, sprite_layout2, 128, 16 ) // colors 128-255 GFXDECODE_END + /************************************* * * Machine driver diff --git a/src/mame/snk/snk6502.cpp b/src/mame/snk/snk6502.cpp index 72962178d11b1..853ec0c1da624 100644 --- a/src/mame/snk/snk6502.cpp +++ b/src/mame/snk/snk6502.cpp @@ -772,18 +772,18 @@ static const gfx_layout charlayout_memory = static GFXDECODE_START( gfx_sasuke ) - GFXDECODE_ENTRY( nullptr, 0x1000, swapcharlayout, 0, 4 ) /* the game dynamically modifies this */ - GFXDECODE_ENTRY( "gfx1", 0x0000, swapcharlayout, 4*4, 4 ) + GFXDECODE_RAM( nullptr, 0x1000, swapcharlayout, 0, 4 ) + GFXDECODE_ENTRY( "gfx1", 0x0000, swapcharlayout, 4*4, 4 ) GFXDECODE_END static GFXDECODE_START( gfx_satansat ) - GFXDECODE_ENTRY( nullptr, 0x1000, charlayout_memory, 0, 4 ) /* the game dynamically modifies this */ - GFXDECODE_ENTRY( "gfx1", 0x0000, charlayout, 4*4, 4 ) + GFXDECODE_RAM( nullptr, 0x1000, charlayout_memory, 0, 4 ) + GFXDECODE_ENTRY( "gfx1", 0x0000, charlayout, 4*4, 4 ) GFXDECODE_END static GFXDECODE_START( gfx_vanguard ) - GFXDECODE_ENTRY( nullptr, 0x1000, charlayout_memory, 0, 8 ) /* the game dynamically modifies this */ - GFXDECODE_ENTRY( "gfx1", 0x0000, charlayout, 8*4, 8 ) + GFXDECODE_RAM( nullptr, 0x1000, charlayout_memory, 0, 8 ) + GFXDECODE_ENTRY( "gfx1", 0x0000, charlayout, 8*4, 8 ) GFXDECODE_END @@ -795,7 +795,7 @@ GFXDECODE_END INTERRUPT_GEN_MEMBER(snk6502_state::satansat_interrupt) { - if(m_irq_mask) + if (m_irq_mask) device.execute().set_input_line(M6502_IRQ_LINE, HOLD_LINE); /* one IRQ per frame */ } @@ -833,7 +833,6 @@ void snk6502_state::sasuke(machine_config &config) MCFG_MACHINE_RESET_OVERRIDE(snk6502_state,sasuke) // video hardware - screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz((MASTER_CLOCK / 16) / (45 * 32 * 8)); screen.set_vblank_time(ATTOSECONDS_IN_USEC(0)); @@ -1049,9 +1048,6 @@ ROM_START( zarzon ) ROM_LOAD( "zarz134.54", 0x0800, 0x0800, CRC(580934d2) SHA1(c1c7eba56bca2a0ea6a68c0245b071a3308f92bd) ) ROM_END - - - ROM_START( satansatind ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "ss01.rom", 0x4000, 0x0800, CRC(7f16f8fe) SHA1(7ba2a3c31f7463eda0f300a27008a3fed9c84d9d) ) diff --git a/src/mame/snk/snk6502.h b/src/mame/snk/snk6502.h index 440fa8078c01f..839672f121946 100644 --- a/src/mame/snk/snk6502.h +++ b/src/mame/snk/snk6502.h @@ -90,7 +90,6 @@ class snk6502_state : public driver_device TIMER_DEVICE_CALLBACK_MEMBER(sasuke_update_counter); void sasuke_start_counter(); - void postload(); void sasuke_map(address_map &map) ATTR_COLD; void satansat_map(address_map &map) ATTR_COLD; diff --git a/src/mame/snk/snk6502_v.cpp b/src/mame/snk/snk6502_v.cpp index 70dd2ac19b6fe..599f4719f5bec 100644 --- a/src/mame/snk/snk6502_v.cpp +++ b/src/mame/snk/snk6502_v.cpp @@ -2,8 +2,6 @@ // copyright-holders:Nicola Salmoria, Dan Boris /*************************************************************************** - snk6502.c - Functions to emulate the video hardware of the machine. ***************************************************************************/ @@ -168,12 +166,6 @@ VIDEO_START_MEMBER(snk6502_state,snk6502) m_fg_tilemap->set_transparent_pen(0); m_gfxdecode->gfx(0)->set_source(m_charram); - machine().save().register_postload(save_prepost_delegate(FUNC(snk6502_state::postload), this)); -} - -void snk6502_state::postload() -{ - m_gfxdecode->gfx(0)->mark_all_dirty(); } VIDEO_START_MEMBER(snk6502_state,pballoon) @@ -290,5 +282,4 @@ VIDEO_START_MEMBER(snk6502_state,satansat) m_fg_tilemap->set_transparent_pen(0); m_gfxdecode->gfx(0)->set_source(m_charram); - machine().save().register_postload(save_prepost_delegate(FUNC(snk6502_state::postload), this)); } diff --git a/src/mame/stern/supdrapo.cpp b/src/mame/stern/supdrapo.cpp index 191f2f2e95747..61539330e8160 100644 --- a/src/mame/stern/supdrapo.cpp +++ b/src/mame/stern/supdrapo.cpp @@ -518,6 +518,9 @@ ROM_START( supdrapo ) ROM_REGION( 0x00200, "proms", 0 ) ROM_LOAD( "a1-9n", 0x0000, 0x0100, CRC(e62529e3) SHA1(176f2069b0c06c1d088909e81658652af06c8eec) ) ROM_LOAD( "a1-9p", 0x0100, 0x0100, CRC(a0547746) SHA1(747c8aef5afa26124fe0763e7f96c4ff6be31863) ) + + ROM_REGION (0x104, "plds", 0) + ROM_LOAD( "pal16r6.1p", 0x000, 0x104, CRC(13f14bbf) SHA1(b8c4ddf61609465f3a3699dd42796f15a7b17979) ) ROM_END /* diff --git a/src/mame/taito/2mindril.cpp b/src/mame/taito/2mindril.cpp index d07b98e2ef284..49e91152f61b6 100644 --- a/src/mame/taito/2mindril.cpp +++ b/src/mame/taito/2mindril.cpp @@ -303,8 +303,8 @@ static const gfx_layout layout_6bpp_tile_hi = }; static GFXDECODE_START( gfx_2mindril ) - GFXDECODE_ENTRY( nullptr, 0, charlayout, 0x0000, 0x0400>>4 ) /* Dynamically modified */ - GFXDECODE_ENTRY( nullptr, 0, pivotlayout, 0x0000, 0x400>>4 ) /* Dynamically modified */ + GFXDECODE_RAM( nullptr, 0, charlayout, 0x0000, 0x0400>>4 ) // dynamically modified + GFXDECODE_RAM( nullptr, 0, pivotlayout, 0x0000, 0x400>>4 ) // dynamically modified GFXDECODE_ENTRY( "sprites", 0, gfx_16x16x4_packed_lsb, 0x1000, 0x1000>>4 ) // low 4bpp of 6bpp sprite data GFXDECODE_ENTRY( "tilemap", 0, gfx_16x16x4_packed_lsb, 0x0000, 0x2000>>4 ) // low 4bpp of 6bpp tilemap data GFXDECODE_ENTRY( "tilemap_hi", 0, layout_6bpp_tile_hi, 0x0000, 0x2000>>4 ) // hi 2bpp of 6bpp tilemap data diff --git a/src/mame/taito/grchamp.cpp b/src/mame/taito/grchamp.cpp index 88d1199d091d6..ffeed5ff5ef6f 100644 --- a/src/mame/taito/grchamp.cpp +++ b/src/mame/taito/grchamp.cpp @@ -110,7 +110,7 @@ void grchamp_state::machine_start() save_item(NAME(m_collmode)); } - void grchamp_state::machine_reset() +void grchamp_state::machine_reset() { m_soundnmi->in_w<0>(0); // disable sound nmi /* if the coin system is 1 way, lock Coin B (Page 40) */ @@ -365,13 +365,11 @@ void grchamp_state::cpu1_outputs_w(offs_t offset, uint8_t data) uint8_t grchamp_state::get_pc3259_bits(int offs) { - int bits; - /* force a partial update to the current position */ m_screen->update_partial(m_screen->vpos()); /* get the relevant 4 bits */ - bits = (m_collide >> (offs*4)) & 0x0f; + uint8_t bits = (m_collide >> (offs*4)) & 0x0f; /* replicate to both nibbles */ return bits | (bits << 4); @@ -440,6 +438,7 @@ uint8_t grchamp_state::main_to_sub_comm_r(offs_t offset) * Sound port handlers * *************************************/ + TIMER_CALLBACK_MEMBER(grchamp_state::soundlatch_w_cb) { if (m_soundlatch_flag && (m_soundlatch_data != param)) @@ -949,6 +948,6 @@ ROM_END * *************************************/ -GAMEL( 1981, grchamp, 0, grchamp, grchamp, grchamp_state, empty_init, ROT270, "Taito", "Grand Champion (set 1)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE, layout_grchamp ) +GAMEL( 1981, grchamp, 0, grchamp, grchamp, grchamp_state, empty_init, ROT270, "Taito", "Grand Champion (set 1)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE, layout_grchamp ) GAMEL( 1981, grchampa, grchamp, grchamp, grchamp, grchamp_state, empty_init, ROT270, "Taito", "Grand Champion (set 2)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE, layout_grchamp ) // uses different ports. Bad dump? GAMEL( 1981, grchampb, grchamp, grchamp, grchamp, grchamp_state, empty_init, ROT270, "Taito", "Grand Champion (set 3)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE, layout_grchamp ) diff --git a/src/mame/taito/scyclone.cpp b/src/mame/taito/scyclone.cpp index 801ab578ff1cb..716906506f84d 100644 --- a/src/mame/taito/scyclone.cpp +++ b/src/mame/taito/scyclone.cpp @@ -34,14 +34,21 @@ Furthermore, the game seems to set what I believe to be the 'flipscreen' bit for player 2 even when in 'upright' mode, so it's possible this romset was only really made for a cocktail table? + + The speech chip is unknown, it seems like it's some sort of 1-bit delta modulation. + Probably HC55516 or something similar. + + SN76477 parameters are unknown, so some sound effects are missing. */ #include "emu.h" #include "cpu/z80/z80.h" +#include "machine/clock.h" #include "machine/gen_latch.h" #include "machine/mb14241.h" #include "sound/dac.h" +#include "sound/hc55516.h" #include "sound/sn76477.h" #include "emupal.h" @@ -64,7 +71,8 @@ class scyclone_state : public driver_device m_screen(*this, "screen"), m_palette(*this, "palette"), m_snsnd(*this, "snsnd%u", 0), - m_dac(*this, "dac%u", 0), + m_cvsd(*this, "cvsd"), + m_cvsd_clock(*this, "cvsd_clock"), m_soundlatch(*this, "soundlatch") { } @@ -86,7 +94,8 @@ class scyclone_state : public driver_device required_device m_screen; required_device m_palette; required_device_array m_snsnd; - required_device_array m_dac; + required_device m_cvsd; + required_device m_cvsd_clock; required_device m_soundlatch; void scyclone_iomap(address_map &map) ATTR_COLD; @@ -95,7 +104,6 @@ class scyclone_state : public driver_device void scyclone_sub_map(address_map &map) ATTR_COLD; INTERRUPT_GEN_MEMBER(main_irq); - INTERRUPT_GEN_MEMBER(sound_irq); // video-related std::unique_ptr m_vram; @@ -134,15 +142,14 @@ class scyclone_state : public driver_device uint8_t vram_r(offs_t offset); // sound related - bool m_speech_enabled = false; uint8_t m_speech_data = 0; - uint8_t m_dac2_output = 0x80; void snd_3001_w(uint8_t data); void snd_3002_w(uint8_t data); void snd_3003_w(uint8_t data); void snd_3004_w(uint8_t data); void snd_3005_w(uint8_t data); + void cvsd_tick(int state); }; void scyclone_state::machine_start() @@ -157,10 +164,7 @@ void scyclone_state::machine_start() save_item(NAME(m_p0e)); save_item(NAME(m_vidctrl)); save_item(NAME(m_hascollided)); - - save_item(NAME(m_speech_enabled)); save_item(NAME(m_speech_data)); - save_item(NAME(m_dac2_output)); } @@ -485,7 +489,7 @@ void scyclone_state::snd_3002_w(uint8_t data) void scyclone_state::snd_3003_w(uint8_t data) { - m_speech_enabled = !BIT(data, 1); + m_cvsd->fzq_w(BIT(~data, 1)); } void scyclone_state::snd_3004_w(uint8_t data) @@ -498,25 +502,13 @@ void scyclone_state::snd_3005_w(uint8_t data) // written at the same time, with the same data as 0x3001 } -INTERRUPT_GEN_MEMBER(scyclone_state::sound_irq) +void scyclone_state::cvsd_tick(int state) { - m_subcpu->set_input_line(0, HOLD_LINE); - - // speech DAC is some sort of 1-bit delta modulation? - if (m_speech_enabled) + if (state) { - const int bit = BIT(m_speech_data, 7); - - if (bit && m_dac2_output < 0xff) - m_dac2_output++; - else if (!bit && m_dac2_output > 0) - m_dac2_output--; + m_cvsd->digin_w(BIT(m_speech_data, 7)); + m_speech_data <<= 1; } - else if (m_dac2_output != 0x80) - m_dac2_output += (m_dac2_output < 0x80) ? +1 : -1; - - m_speech_data <<= 1; - m_dac[1]->write(m_dac2_output); } @@ -561,7 +553,7 @@ void scyclone_state::scyclone_sub_map(address_map &map) map(0x0000, 0x1fff).rom(); map(0x2000, 0x23ff).ram(); - map(0x3000, 0x3000).r(m_soundlatch, FUNC(generic_latch_8_device::read)).w(m_dac[0], FUNC(dac_byte_interface::data_w)); // music + map(0x3000, 0x3000).r(m_soundlatch, FUNC(generic_latch_8_device::read)).w("dac", FUNC(dac_byte_interface::data_w)); // music map(0x3001, 0x3001).w(FUNC(scyclone_state::snd_3001_w)); map(0x3002, 0x3002).w(FUNC(scyclone_state::snd_3002_w)); // speech map(0x3003, 0x3003).w(FUNC(scyclone_state::snd_3003_w)); @@ -683,9 +675,6 @@ void scyclone_state::scyclone(machine_config &config) m_subcpu->set_addrmap(AS_PROGRAM, &scyclone_state::scyclone_sub_map); m_subcpu->set_addrmap(AS_IO, &scyclone_state::scyclone_sub_iomap); - attotime snd_irq_period = attotime::from_hz(14400); // drives speech pitch, unknown source but this matches PCB recording - m_subcpu->set_periodic_int(FUNC(scyclone_state::sound_irq), snd_irq_period); - GENERIC_LATCH_8(config, m_soundlatch); MB14241(config, "mb14241"); @@ -707,14 +696,19 @@ void scyclone_state::scyclone(machine_config &config) SN76477(config, m_snsnd[0]); m_snsnd[0]->set_enable(1); - m_snsnd[0]->add_route(ALL_OUTPUTS, "speaker", 0.05); + m_snsnd[0]->add_route(ALL_OUTPUTS, "speaker", 0.1); SN76477(config, m_snsnd[1]); m_snsnd[1]->set_enable(1); - m_snsnd[1]->add_route(ALL_OUTPUTS, "speaker", 0.05); + m_snsnd[1]->add_route(ALL_OUTPUTS, "speaker", 0.1); + + DAC_8BIT_R2R(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.1); // unknown DAC - DAC_8BIT_R2R(config, m_dac[0]).add_route(ALL_OUTPUTS, "speaker", 0.05); // unknown DAC - DAC_8BIT_R2R(config, m_dac[1]).add_route(ALL_OUTPUTS, "speaker", 1.0); // unknown DAC + HC55516(config, m_cvsd, 0).add_route(ALL_OUTPUTS, "speaker", 0.4); + CLOCK(config, m_cvsd_clock, 14400); // unknown clock source, but this matches PCB recording + m_cvsd_clock->signal_handler().set(FUNC(scyclone_state::cvsd_tick)); + m_cvsd_clock->signal_handler().append(m_cvsd, FUNC(hc55516_device::mclock_w)); + m_cvsd_clock->signal_handler().append_inputline(m_subcpu, 0, HOLD_LINE); } diff --git a/src/mame/taito/taito_b.cpp b/src/mame/taito/taito_b.cpp index 2c62ccf6d6d30..3a00e697b1cf2 100644 --- a/src/mame/taito/taito_b.cpp +++ b/src/mame/taito/taito_b.cpp @@ -232,17 +232,6 @@ B72-10.IC32 - MMI PAL16L8 HSync - 15.1782kHz \ VSync - 60.00000Hz / <-- actual measurements on PCB -*************************************************************************** - -Real Puncher -Taito, 1994 - -PCB Layout ----------- - -TODO! - - ***************************************************************************/ #include "emu.h" @@ -3282,7 +3271,7 @@ ROM_START( qzshowby ) ROM_LOAD16_BYTE( "d72-12.bin", 0x00001, 0x80000, CRC(522c09a7) SHA1(2ceeb7ac24bb621630cc996381e57501f9ea672e) ) ROM_REGION( 0x20000, "audiocpu", 0 ) /* 128k for Z80 code */ - ROM_LOAD( "d72-11.bin", 0x00000, 0x20000, CRC(2ca046e2) SHA1(983620e657d729e1441d509f18141bb3bb581855) ) + ROM_LOAD( "d72-11.bin", 0x00000, 0x20000, CRC(2ca046e2) SHA1(983620e657d729e1441d509f18141bb3bb581855) ) ROM_REGION( 0x400000, "tc0180vcu", 0 ) ROM_LOAD( "d72-03.bin", 0x000000, 0x200000, CRC(1de257d0) SHA1(df03b1fb5cd69e2d2eb2088f96f26b0ea9756fb7) ) @@ -3308,9 +3297,11 @@ ROM_START( viofight ) ROM_LOAD16_BYTE( "c16-06.22", 0x40001, 0x20000, CRC(043761d8) SHA1(4587cadd73b628b4b9ac5c537cec20f90fb4959d) ) ROM_REGION( 0x10000, "audiocpu", 0 ) /* 128k for Z80 code */ - ROM_LOAD( "c16-12.32", 0x00000, 0x10000, CRC(6fb028c7) SHA1(a808d82e872914f994652e95dca3fcad00ba02fc) ) + ROM_LOAD( "c16-12.32", 0x00000, 0x10000, CRC(6fb028c7) SHA1(a808d82e872914f994652e95dca3fcad00ba02fc) ) ROM_REGION( 0x200000, "tc0180vcu", 0 ) + // ROM dumps are confirmed good. Some bad GFX (MAME gfxdecode: 0000,0001, 1000,1001, 2000,2001, 3000,3001). + // See 3rd stage tiger fight background for example, see MT8048 for more information. ROM_LOAD( "c16-01.1", 0x000000, 0x080000, CRC(7059ce83) SHA1(1e6825ab944254cd4ba6574762172245b3352319) ) ROM_LOAD( "c16-02.2", 0x080000, 0x080000, CRC(b458e905) SHA1(b712cbf4a4015e1fc2243871fe753e230f0172c2) ) ROM_LOAD( "c16-03.3", 0x100000, 0x080000, CRC(515a9431) SHA1(836be28614326d093be8841617cca83cef8d55cc) ) @@ -3332,7 +3323,7 @@ ROM_START( viofightu ) ROM_LOAD16_BYTE( "c16-06.22", 0x40001, 0x20000, CRC(043761d8) SHA1(4587cadd73b628b4b9ac5c537cec20f90fb4959d) ) ROM_REGION( 0x10000, "audiocpu", 0 ) /* 128k for Z80 code */ - ROM_LOAD( "c16-12.32", 0x00000, 0x10000, CRC(6fb028c7) SHA1(a808d82e872914f994652e95dca3fcad00ba02fc) ) + ROM_LOAD( "c16-12.32", 0x00000, 0x10000, CRC(6fb028c7) SHA1(a808d82e872914f994652e95dca3fcad00ba02fc) ) ROM_REGION( 0x200000, "tc0180vcu", 0 ) ROM_LOAD( "c16-01.1", 0x000000, 0x080000, CRC(7059ce83) SHA1(1e6825ab944254cd4ba6574762172245b3352319) ) @@ -3356,7 +3347,7 @@ ROM_START( viofightj ) ROM_LOAD16_BYTE( "c16-06.22", 0x40001, 0x20000, CRC(043761d8) SHA1(4587cadd73b628b4b9ac5c537cec20f90fb4959d) ) ROM_REGION( 0x10000, "audiocpu", 0 ) /* 128k for Z80 code */ - ROM_LOAD( "c16-12.32", 0x00000, 0x10000, CRC(6fb028c7) SHA1(a808d82e872914f994652e95dca3fcad00ba02fc) ) + ROM_LOAD( "c16-12.32", 0x00000, 0x10000, CRC(6fb028c7) SHA1(a808d82e872914f994652e95dca3fcad00ba02fc) ) ROM_REGION( 0x200000, "tc0180vcu", 0 ) ROM_LOAD( "c16-01.1", 0x000000, 0x080000, CRC(7059ce83) SHA1(1e6825ab944254cd4ba6574762172245b3352319) ) @@ -3462,7 +3453,7 @@ ROM_START( silentd ) /* Silkscreened PCB number ET910000B */ ROM_LOAD16_BYTE( "east-09.ic9", 0x40001, 0x20000, CRC(2f05b14a) SHA1(f9ae935612e95d8ac2596af1728a6062569e9a42) ) ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for Z80 code */ - ROM_LOAD( "east-13.ic15", 0x00000, 0x10000, CRC(651861ab) SHA1(f94a120b70a4d59e17a6e120ca461b1f37587c0c) ) + ROM_LOAD( "east-13.ic15", 0x00000, 0x10000, CRC(651861ab) SHA1(f94a120b70a4d59e17a6e120ca461b1f37587c0c) ) ROM_REGION( 0x400000, "tc0180vcu", 0 ) ROM_LOAD( "east-04.ic28", 0x000000, 0x100000, CRC(53237217) SHA1(fec044c26b8c99235f88c8be0d9ac63b81a3a094) ) @@ -3485,7 +3476,7 @@ ROM_START( silentdj ) /* Silkscreened PCB number ET910000B */ ROM_LOAD16_BYTE( "east-09.ic9", 0x40001, 0x20000, CRC(2f05b14a) SHA1(f9ae935612e95d8ac2596af1728a6062569e9a42) ) ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for Z80 code */ - ROM_LOAD( "east-13.ic15", 0x00000, 0x10000, CRC(651861ab) SHA1(f94a120b70a4d59e17a6e120ca461b1f37587c0c) ) + ROM_LOAD( "east-13.ic15", 0x00000, 0x10000, CRC(651861ab) SHA1(f94a120b70a4d59e17a6e120ca461b1f37587c0c) ) ROM_REGION( 0x400000, "tc0180vcu", 0 ) ROM_LOAD( "east-04.ic28", 0x000000, 0x100000, CRC(53237217) SHA1(fec044c26b8c99235f88c8be0d9ac63b81a3a094) ) @@ -3508,7 +3499,7 @@ ROM_START( silentdu ) /* Dumped from an original Taito PCB (ET910000B) */ ROM_LOAD16_BYTE( "east-09.ic9", 0x40001, 0x20000, CRC(2f05b14a) SHA1(f9ae935612e95d8ac2596af1728a6062569e9a42) ) ROM_REGION( 0x10000, "audiocpu", 0 ) /* 64k for Z80 code */ - ROM_LOAD( "east-13.ic15", 0x00000, 0x10000, CRC(651861ab) SHA1(f94a120b70a4d59e17a6e120ca461b1f37587c0c) ) + ROM_LOAD( "east-13.ic15", 0x00000, 0x10000, CRC(651861ab) SHA1(f94a120b70a4d59e17a6e120ca461b1f37587c0c) ) ROM_REGION( 0x400000, "tc0180vcu", 0 ) ROM_LOAD( "east-04.ic28", 0x000000, 0x100000, CRC(53237217) SHA1(fec044c26b8c99235f88c8be0d9ac63b81a3a094) ) diff --git a/src/mame/taito/taito_f3.cpp b/src/mame/taito/taito_f3.cpp index 6712cb9db3a9c..826947467b4d5 100644 --- a/src/mame/taito/taito_f3.cpp +++ b/src/mame/taito/taito_f3.cpp @@ -395,8 +395,8 @@ static const gfx_layout layout_6bpp_tile_hi = { }; static GFXDECODE_START( gfx_taito_f3 ) - GFXDECODE_ENTRY( nullptr, 0, charlayout, 0x0000, 0x0400>>4 ) /* Dynamically modified */ - GFXDECODE_ENTRY( nullptr, 0, pivotlayout, 0x0000, 0x400>>4 ) /* Dynamically modified */ + GFXDECODE_RAM( nullptr, 0, charlayout, 0x0000, 0x0400>>4 ) // dynamically modified + GFXDECODE_RAM( nullptr, 0, pivotlayout, 0x0000, 0x400>>4 ) // dynamically modified GFXDECODE_ENTRY( "sprites", 0, gfx_16x16x4_packed_lsb, 0x1000, 0x1000>>4 ) // low 4bpp of 6bpp sprite data GFXDECODE_ENTRY( "tilemap", 0, gfx_16x16x4_packed_lsb, 0x0000, 0x2000>>4 ) // low 4bpp of 6bpp tilemap data GFXDECODE_ENTRY( "tilemap_hi", 0, layout_6bpp_tile_hi, 0x0000, 0x2000>>4 ) // hi 2bpp of 6bpp tilemap data @@ -513,9 +513,9 @@ static const gfx_layout bubsympb_layout_5bpp_tile_hi = { static GFXDECODE_START( gfx_bubsympb ) - GFXDECODE_ENTRY( nullptr, 0, charlayout, 0, 64 ) /* Dynamically modified */ - GFXDECODE_ENTRY( nullptr, 0, pivotlayout, 0, 64 ) /* Dynamically modified */ - GFXDECODE_ENTRY( "sprites", 0, bubsympb_sprite_layout, 4096, 256 ) /* Sprites area (6bpp planar) */ + GFXDECODE_RAM( nullptr, 0, charlayout, 0, 64 ) // dynamically modified + GFXDECODE_RAM( nullptr, 0, pivotlayout, 0, 64 ) // dynamically modified + GFXDECODE_ENTRY( "sprites", 0, bubsympb_sprite_layout, 4096, 256 ) /* sprites area (6bpp planar) */ GFXDECODE_ENTRY( "tilemap", 0, gfx_16x16x4_packed_lsb, 0, 512 ) // low 4bpp of 5bpp tilemap data GFXDECODE_ENTRY( "tilemap_hi", 0, bubsympb_layout_5bpp_tile_hi, 0, 512 ) // hi 1bpp of 5bpp tilemap data GFXDECODE_ENTRY( "sprites", 0, bubsympb_sprite_layout, 4096, 256 ) // dummy gfx duplicate for avoid crash diff --git a/src/mame/taito/taito_f3_v.cpp b/src/mame/taito/taito_f3_v.cpp index dd8aac28e620f..95f0bc0ff3bae 100644 --- a/src/mame/taito/taito_f3_v.cpp +++ b/src/mame/taito/taito_f3_v.cpp @@ -347,15 +347,11 @@ const taito_f3_state::F3config taito_f3_state::f3_config_table[] = { { POPNPOP, 1, 1 }, { LANDMAKR, 1, 1 }, { TMDRILL, 1, 0 }, - {0} + { 0 } }; void taito_f3_state::device_post_load() { - // force a reread of the dynamic tiles in the pixel layer - m_gfxdecode->gfx(0)->mark_all_dirty(); - m_gfxdecode->gfx(1)->mark_all_dirty(); - // refresh tile usage indexes std::fill_n(*m_tilemap_row_usage, 32 * 8, 0); std::fill_n(m_textram_row_usage, 64, 0); diff --git a/src/mame/taito/taitosj.cpp b/src/mame/taito/taitosj.cpp index b79f414cd021b..3e078d9f5ea31 100644 --- a/src/mame/taito/taitosj.cpp +++ b/src/mame/taito/taitosj.cpp @@ -1739,10 +1739,10 @@ static const gfx_layout spritelayout = static GFXDECODE_START( gfx_taitosj ) - GFXDECODE_ENTRY( nullptr, 0x9000, charlayout, 0, 8 ) // the game dynamically modifies this - GFXDECODE_ENTRY( nullptr, 0x9000, spritelayout, 0, 8 ) // the game dynamically modifies this - GFXDECODE_ENTRY( nullptr, 0xa800, charlayout, 0, 8 ) // the game dynamically modifies this - GFXDECODE_ENTRY( nullptr, 0xa800, spritelayout, 0, 8 ) // the game dynamically modifies this + GFXDECODE_RAM( nullptr, 0x9000, charlayout, 0, 8 ) + GFXDECODE_RAM( nullptr, 0x9000, spritelayout, 0, 8 ) + GFXDECODE_RAM( nullptr, 0xa800, charlayout, 0, 8 ) + GFXDECODE_RAM( nullptr, 0xa800, spritelayout, 0, 8 ) GFXDECODE_END static const discrete_dac_r1_ladder taitosj_dacvol_ladder = diff --git a/src/mame/taito/taitosj.h b/src/mame/taito/taitosj.h index bd2190ddc49c7..f660854327955 100644 --- a/src/mame/taito/taitosj.h +++ b/src/mame/taito/taitosj.h @@ -61,7 +61,6 @@ class taitosj_state : public driver_device virtual void machine_start() override ATTR_COLD; virtual void machine_reset() override ATTR_COLD; virtual void video_start() override ATTR_COLD; - virtual void device_post_load() override; private: required_shared_ptr_array m_videoram; diff --git a/src/mame/taito/taitosj_v.cpp b/src/mame/taito/taitosj_v.cpp index 3b6a0282fb638..c13b96331730d 100644 --- a/src/mame/taito/taitosj_v.cpp +++ b/src/mame/taito/taitosj_v.cpp @@ -161,14 +161,6 @@ void taitosj_state::compute_draw_order() } } -void taitosj_state::device_post_load() -{ - m_gfxdecode->gfx(0)->mark_all_dirty(); - m_gfxdecode->gfx(1)->mark_all_dirty(); - m_gfxdecode->gfx(2)->mark_all_dirty(); - m_gfxdecode->gfx(3)->mark_all_dirty(); -} - void taitosj_state::video_start() { m_sprite_layer_collbitmap1.allocate(16, 16); diff --git a/src/mame/taito/undrfire.cpp b/src/mame/taito/undrfire.cpp index 92a9ba0505903..3215d33cd3849 100644 --- a/src/mame/taito/undrfire.cpp +++ b/src/mame/taito/undrfire.cpp @@ -244,8 +244,6 @@ void undrfire_state::shared_ram_w(offs_t offset, u16 data, u16 mem_mask) u32 undrfire_state::undrfire_lightgun_r(offs_t offset) { - int x,y; - switch (offset) { /* NB we are raising the raw inputs by an arbitrary amount, @@ -256,8 +254,8 @@ u32 undrfire_state::undrfire_lightgun_r(offs_t offset) case 0x00: /* P1 */ case 0x01: /* P2 */ { - x = m_in_gunx[offset & 1]->read() << 6; - y = m_in_guny[offset & 1]->read() << 6; + int x = m_in_gunx[offset & 1]->read() << 6; + int y = m_in_guny[offset & 1]->read() << 6; return ((x << 24) &0xff000000) | ((x << 8) &0xff0000) | ((y << 8) &0xff00) | ((y >> 8) &0xff) ; @@ -421,7 +419,6 @@ static INPUT_PORTS_START( undrfire ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* Gun inputs (real range is 0-0xffff: we use standard 0-255 and shift later) */ - PORT_START("GUNX1") PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, -1.0, 0.0, 0) PORT_SENSITIVITY(20) PORT_KEYDELTA(25) PORT_REVERSE PORT_PLAYER(1) @@ -433,11 +430,6 @@ static INPUT_PORTS_START( undrfire ) PORT_START("GUNY2") PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(20) PORT_KEYDELTA(25) PORT_PLAYER(2) - - PORT_START("FAKE") - PORT_DIPNAME( 0x01, 0x00, "Show gun target" ) PORT_CODE(KEYCODE_F1) PORT_TOGGLE - PORT_DIPSETTING( 0x00, DEF_STR( No ) ) - PORT_DIPSETTING( 0x01, DEF_STR( Yes ) ) INPUT_PORTS_END @@ -507,6 +499,7 @@ static GFXDECODE_START( gfx_undrfire ) GFXDECODE_ENTRY( "sprites", 0x0, tile16x16_layout, 0, 512 ) GFXDECODE_END + /*********************************************************** MACHINE DRIVERS ***********************************************************/ diff --git a/src/mame/taito/undrfire.h b/src/mame/taito/undrfire.h index da7c9557d6d99..6cac9938cd05c 100644 --- a/src/mame/taito/undrfire.h +++ b/src/mame/taito/undrfire.h @@ -31,7 +31,6 @@ class undrfire_state : public driver_device m_spritemaphi(*this, "spritemaphi"), m_in_gunx(*this, "GUNX%u", 1U), m_in_guny(*this, "GUNY%u", 1U), - m_io_fake(*this, "FAKE"), m_lamp_start(*this, "P%u_lamp_start", 1U), m_gun_recoil(*this, "P%u_gun_recoil", 1U), m_lamp(*this, "Lamp_%u", 1U), @@ -80,7 +79,6 @@ class undrfire_state : public driver_device optional_ioport_array<2> m_in_gunx; optional_ioport_array<2> m_in_guny; - optional_ioport m_io_fake; output_finder<2> m_lamp_start; output_finder<2> m_gun_recoil; output_finder<6> m_lamp; diff --git a/src/mame/taito/undrfire_v.cpp b/src/mame/taito/undrfire_v.cpp index a09c8027c0e0c..8058bbd2bc393 100644 --- a/src/mame/taito/undrfire_v.cpp +++ b/src/mame/taito/undrfire_v.cpp @@ -441,14 +441,6 @@ u32 undrfire_state::screen_update_undrfire(screen_device &screen, bitmap_ind16 & m_tc0480scp->tilemap_draw(screen, bitmap, cliprect, layer[4], 0, 0); /* TC0480SCP text layer */ - /* See if we should draw artificial gun targets */ - /* (not yet implemented...) */ - - if (m_io_fake->read() & 0x1) /* Fake DSW */ - { - popmessage("Gunsights on"); - } - /* Enable this to see rotation (?) control words */ #if 0 { diff --git a/src/mame/tatsumi/tatsumi.cpp b/src/mame/tatsumi/tatsumi.cpp index b3af227e6295a..6bae4b2cbd5a6 100644 --- a/src/mame/tatsumi/tatsumi.cpp +++ b/src/mame/tatsumi/tatsumi.cpp @@ -835,7 +835,7 @@ GFXDECODE_END static GFXDECODE_START( gfx_roundup5 ) GFXDECODE_ENTRY( "sprites", 0, spritelayout, 1024, 256) - GFXDECODE_ENTRY( nullptr, 0, roundup5_vramlayout, 0, 16) + GFXDECODE_RAM( nullptr, 0, roundup5_vramlayout, 0, 16) GFXDECODE_END static GFXDECODE_START( gfx_cyclwarr ) diff --git a/src/mame/toaplan/fixeight.cpp b/src/mame/toaplan/fixeight.cpp index 0596885075481..5ffc92219bab8 100644 --- a/src/mame/toaplan/fixeight.cpp +++ b/src/mame/toaplan/fixeight.cpp @@ -86,8 +86,6 @@ class fixeight_state : public driver_device virtual void machine_reset() override ATTR_COLD; virtual void video_start() override ATTR_COLD; - virtual void device_post_load() override ATTR_COLD; - void fixeight_68k_mem(address_map &map) ATTR_COLD; void fixeight_v25_mem(address_map &map) ATTR_COLD; @@ -284,12 +282,6 @@ void fixeight_state::tx_gfxram_w(offs_t offset, u16 data, u16 mem_mask) } } -void fixeight_state::device_post_load() -{ - if (m_tx_gfxram != nullptr) - m_gfxdecode->gfx(0)->mark_all_dirty(); -} - static INPUT_PORTS_START( fixeight ) // The Suicide buttons are technically P1 and P2 Button 3, but we hook @@ -512,7 +504,7 @@ static const gfx_layout truxton2_tx_tilelayout = static GFXDECODE_START( gfx ) - GFXDECODE_ENTRY( nullptr, 0, truxton2_tx_tilelayout, 64*16, 64 ) + GFXDECODE_RAM( nullptr, 0, truxton2_tx_tilelayout, 64*16, 64 ) GFXDECODE_END static GFXDECODE_START( gfx_textrom ) diff --git a/src/mame/toaplan/raizing.cpp b/src/mame/toaplan/raizing.cpp index 46145bdf89dd1..35857f08b3ab3 100644 --- a/src/mame/toaplan/raizing.cpp +++ b/src/mame/toaplan/raizing.cpp @@ -142,14 +142,6 @@ void raizing_base_state::tx_linescroll_w(offs_t offset, u16 data, u16 mem_mask) } - -void raizing_base_state::device_post_load() -{ - if (m_tx_gfxram != nullptr) - m_gfxdecode->gfx(0)->mark_all_dirty(); -} - - u32 raizing_base_state::screen_update_base(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { bitmap.fill(0, cliprect); diff --git a/src/mame/toaplan/raizing.h b/src/mame/toaplan/raizing.h index 99203d3ee5f63..5581077073839 100644 --- a/src/mame/toaplan/raizing.h +++ b/src/mame/toaplan/raizing.h @@ -52,7 +52,6 @@ class raizing_base_state : public driver_device protected: u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - virtual void device_post_load() override ATTR_COLD; // used by everything void create_tx_tilemap(int dx = 0, int dx_flipped = 0); diff --git a/src/mame/toaplan/raizing_batrider.cpp b/src/mame/toaplan/raizing_batrider.cpp index 75754030b8de3..2d06f9dde6b69 100644 --- a/src/mame/toaplan/raizing_batrider.cpp +++ b/src/mame/toaplan/raizing_batrider.cpp @@ -790,7 +790,7 @@ static const gfx_layout batrider_tx_tilelayout = }; static GFXDECODE_START( gfx_batrider ) - GFXDECODE_ENTRY( nullptr, 0, batrider_tx_tilelayout, 64*16, 64 ) + GFXDECODE_RAM( nullptr, 0, batrider_tx_tilelayout, 64*16, 64 ) GFXDECODE_END diff --git a/src/mame/toaplan/truxton2.cpp b/src/mame/toaplan/truxton2.cpp index 84ddee1720ac6..01885e62dbcb2 100644 --- a/src/mame/toaplan/truxton2.cpp +++ b/src/mame/toaplan/truxton2.cpp @@ -58,7 +58,6 @@ class truxton2_state : public driver_device u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void create_tx_tilemap(int dx = 0, int dx_flipped = 0); - virtual void device_post_load() override; void screen_vblank(int state); void tx_gfxram_w(offs_t offset, u16 data, u16 mem_mask = ~0); @@ -101,12 +100,6 @@ class truxton2_state : public driver_device ---- ---x xxxx xxxx = X scroll for each line */ -void truxton2_state::device_post_load() -{ - m_gfxdecode->gfx(0)->mark_all_dirty(); -} - - TILE_GET_INFO_MEMBER(truxton2_state::get_text_tile_info) { const u16 attrib = m_tx_videoram[tile_index]; @@ -317,7 +310,7 @@ static const gfx_layout truxton2_tx_tilelayout = static GFXDECODE_START( gfx ) - GFXDECODE_ENTRY( nullptr, 0, truxton2_tx_tilelayout, 64*16, 64 ) + GFXDECODE_RAM( nullptr, 0, truxton2_tx_tilelayout, 64*16, 64 ) GFXDECODE_END diff --git a/src/mame/toaplan/twincobr.cpp b/src/mame/toaplan/twincobr.cpp index e6ab1d3b70739..fb47cfae9650c 100644 --- a/src/mame/toaplan/twincobr.cpp +++ b/src/mame/toaplan/twincobr.cpp @@ -957,8 +957,8 @@ ROM_END ROM_START( fshark ) ROM_REGION( 0x30000, "maincpu", 0 ) // Main 68K code - ROM_LOAD16_BYTE( "b02_18-1.m8", 0x00000, 0x10000, CRC(04739e02) SHA1(8a14284adb0f0f33adf9affdec081c90de85d594) ) - ROM_LOAD16_BYTE( "b02_17-1.p8", 0x00001, 0x10000, CRC(fd6ef7a8) SHA1(ddbc05ce694ab4d929f5f621d95800b612bc5f66) ) + ROM_LOAD16_BYTE( "b02_18-1.p8", 0x00000, 0x10000, CRC(04739e02) SHA1(8a14284adb0f0f33adf9affdec081c90de85d594) ) + ROM_LOAD16_BYTE( "b02_17-1.m8", 0x00001, 0x10000, CRC(fd6ef7a8) SHA1(ddbc05ce694ab4d929f5f621d95800b612bc5f66) ) ROM_REGION( 0x8000, "audiocpu", 0 ) // Sound Z80 code ROM_LOAD( "b02_16.l5", 0x0000, 0x8000, CRC(cdd1a153) SHA1(de9827a959039cf753ecac6756fb1925c37466d8) ) @@ -1000,8 +1000,8 @@ ROM_END // the ROM contents of the bootleg are the same of the original, the difference is the TMS320C10 code which is in external PROMs instead of internal ROM_START( fsharkb ) ROM_REGION( 0x30000, "maincpu", 0 ) // Main 68K code - ROM_LOAD16_BYTE( "b02_18-1.m8", 0x00000, 0x10000, CRC(04739e02) SHA1(8a14284adb0f0f33adf9affdec081c90de85d594) ) - ROM_LOAD16_BYTE( "b02_17-1.p8", 0x00001, 0x10000, CRC(fd6ef7a8) SHA1(ddbc05ce694ab4d929f5f621d95800b612bc5f66) ) + ROM_LOAD16_BYTE( "b02_18-1.p8", 0x00000, 0x10000, CRC(04739e02) SHA1(8a14284adb0f0f33adf9affdec081c90de85d594) ) + ROM_LOAD16_BYTE( "b02_17-1.m8", 0x00001, 0x10000, CRC(fd6ef7a8) SHA1(ddbc05ce694ab4d929f5f621d95800b612bc5f66) ) ROM_REGION( 0x8000, "audiocpu", 0 ) // Sound Z80 code ROM_LOAD( "b02_16.l5", 0x0000, 0x8000, CRC(cdd1a153) SHA1(de9827a959039cf753ecac6756fb1925c37466d8) ) @@ -1049,8 +1049,8 @@ ROM_END ROM_START( skyshark ) ROM_REGION( 0x30000, "maincpu", 0 ) // Main 68K code - ROM_LOAD16_BYTE( "b02_18-2.m8", 0x00000, 0x10000, CRC(888e90f3) SHA1(3a40d7e7653cc929af8186e48f272989fb332e14) ) - ROM_LOAD16_BYTE( "b02_17-2.p8", 0x00001, 0x10000, CRC(066d67be) SHA1(a66be35b956da2c2ddf97cae66d79c0efd228621) ) + ROM_LOAD16_BYTE( "b02_18-2.p8", 0x00000, 0x10000, CRC(888e90f3) SHA1(3a40d7e7653cc929af8186e48f272989fb332e14) ) + ROM_LOAD16_BYTE( "b02_17-2.m8", 0x00001, 0x10000, CRC(066d67be) SHA1(a66be35b956da2c2ddf97cae66d79c0efd228621) ) ROM_REGION( 0x8000, "audiocpu", 0 ) // Sound Z80 code ROM_LOAD( "b02_16.l5", 0x0000, 0x8000, CRC(cdd1a153) SHA1(de9827a959039cf753ecac6756fb1925c37466d8) ) @@ -1091,8 +1091,8 @@ ROM_END ROM_START( skysharka ) ROM_REGION( 0x30000, "maincpu", 0 ) // Main 68K code - ROM_LOAD16_BYTE( "b02_18-2.m8", 0x00000, 0x10000, CRC(341deaac) SHA1(8eac9cb1fa0861bff444847c530a075fd9a42695) ) // sldh - ROM_LOAD16_BYTE( "b02_17-2.p8", 0x00001, 0x10000, CRC(ec3b5a2c) SHA1(4e7a479cc401880d9fe932be2c386d07fe37197e) ) // sldh + ROM_LOAD16_BYTE( "b02_18-2.p8", 0x00000, 0x10000, CRC(341deaac) SHA1(8eac9cb1fa0861bff444847c530a075fd9a42695) ) // sldh + ROM_LOAD16_BYTE( "b02_17-2.m8", 0x00001, 0x10000, CRC(ec3b5a2c) SHA1(4e7a479cc401880d9fe932be2c386d07fe37197e) ) // sldh ROM_REGION( 0x8000, "audiocpu", 0 ) // Sound Z80 code ROM_LOAD( "b02_16.l5", 0x0000, 0x8000, CRC(cdd1a153) SHA1(de9827a959039cf753ecac6756fb1925c37466d8) ) @@ -1133,11 +1133,11 @@ ROM_END ROM_START( hishouza ) ROM_REGION( 0x30000, "maincpu", 0 ) // Main 68K code - ROM_LOAD16_BYTE( "b02_18.m8", 0x00000, 0x10000, CRC(4444bb94) SHA1(5ff955a5190d1b356187de105cfb8ea181fc1282) ) - ROM_LOAD16_BYTE( "b02_17.p8", 0x00001, 0x10000, CRC(cdac7228) SHA1(6b0d67e4b0661a858653d2eabb8936af9148167e) ) + ROM_LOAD16_BYTE( "b02_18.p8", 0x00000, 0x10000, CRC(4444bb94) SHA1(5ff955a5190d1b356187de105cfb8ea181fc1282) ) + ROM_LOAD16_BYTE( "b02_17.m8", 0x00001, 0x10000, CRC(cdac7228) SHA1(6b0d67e4b0661a858653d2eabb8936af9148167e) ) ROM_REGION( 0x8000, "audiocpu", 0 ) // Sound Z80 code - ROM_LOAD( "b02_16.l5", 0x0000, 0x8000, CRC(cdd1a153) SHA1(de9827a959039cf753ecac6756fb1925c37466d8) ) + ROM_LOAD( "b02_16.l5", 0x0000, 0x8000, CRC(f0b98af2) SHA1(7054029b1955c510a6b693d278dd4d8a384112df) ) ROM_REGION( 0x2000, "dsp", 0 ) // Co-Processor TMS320C10 MCU code ROM_LOAD( "d70011u_gxc-01_mcu_64000", 0x0000, 0x0c00, CRC(1ca63774) SHA1(e534325af9433fb0e9ccdf82ee3a192d2459b18f) ) // decapped, real label D70011U GXC-01 MCU 64000 @@ -1176,8 +1176,8 @@ ROM_END // The ROM contents of the bootleg are the same of the original, the difference is the TMS320C10 code which is in external PROMs instead of internal ROM_START( hishouzab ) ROM_REGION( 0x30000, "maincpu", 0 ) // Main 68K code - ROM_LOAD16_BYTE( "b02_18.m8", 0x00000, 0x10000, CRC(4444bb94) SHA1(5ff955a5190d1b356187de105cfb8ea181fc1282) ) - ROM_LOAD16_BYTE( "b02_17.p8", 0x00001, 0x10000, CRC(cdac7228) SHA1(6b0d67e4b0661a858653d2eabb8936af9148167e) ) + ROM_LOAD16_BYTE( "b02_18.p8", 0x00000, 0x10000, CRC(4444bb94) SHA1(5ff955a5190d1b356187de105cfb8ea181fc1282) ) + ROM_LOAD16_BYTE( "b02_17.m8", 0x00001, 0x10000, CRC(cdac7228) SHA1(6b0d67e4b0661a858653d2eabb8936af9148167e) ) ROM_REGION( 0x8000, "audiocpu", 0 ) // Sound Z80 code ROM_LOAD( "b02_16.l5", 0x0000, 0x8000, CRC(cdd1a153) SHA1(de9827a959039cf753ecac6756fb1925c37466d8) ) diff --git a/src/mame/ussr/tiamc1.cpp b/src/mame/ussr/tiamc1.cpp index ebc77e706cef5..f07751cf588b3 100644 --- a/src/mame/ussr/tiamc1.cpp +++ b/src/mame/ussr/tiamc1.cpp @@ -317,12 +317,12 @@ static const gfx_layout char_rom_layout = }; static GFXDECODE_START( gfx_tiamc1 ) - GFXDECODE_ENTRY( nullptr, 0x0000, char_layout, 0, 16 ) + GFXDECODE_RAM( nullptr, 0x0000, char_layout, 0, 16 ) GFXDECODE_ENTRY( "gfx1", 0x0000, sprites16x16_layout, 0, 16 ) GFXDECODE_END static GFXDECODE_START( gfx_kot ) - GFXDECODE_ENTRY( nullptr, 0x0000, char_rom_layout, 0, 16 ) + GFXDECODE_RAM( nullptr, 0x0000, char_rom_layout, 0, 16 ) GFXDECODE_ENTRY( "gfx1", 0x0000, sprites16x16_layout, 0, 16 ) GFXDECODE_END diff --git a/src/mame/vsystem/f1gp.cpp b/src/mame/vsystem/f1gp.cpp index 6d4d67451aac0..24bb3ce10900e 100644 --- a/src/mame/vsystem/f1gp.cpp +++ b/src/mame/vsystem/f1gp.cpp @@ -221,7 +221,6 @@ TILE_GET_INFO_MEMBER(f1gp2_state::get_roz_tile_info) ***************************************************************************/ - void f1gp_state::video_start() { m_roz_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(f1gp_state::get_roz_tile_info)), TILEMAP_SCAN_ROWS, 16, 16, 64, 64); @@ -361,6 +360,7 @@ uint32_t f1gp2_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, return 0; } + /*************************************************************************** BOOTLEG SUPPORT diff --git a/src/mame/zaccaria/seabattl.cpp b/src/mame/zaccaria/seabattl.cpp index db117b10a8297..1058fe3a9ab07 100644 --- a/src/mame/zaccaria/seabattl.cpp +++ b/src/mame/zaccaria/seabattl.cpp @@ -54,9 +54,8 @@ class seabattl_state : public driver_device m_videoram(*this, "videoram"), m_colorram(*this, "colorram"), m_objram(*this, "objram"), - m_digits(*this, { "sc_thousand", "sc_hundred", "sc_half", "sc_unity", "tm_half", "tm_unity" }), + m_digits(*this, "digit%u", 0U), m_s2636(*this, "s2636"), - m_7segs(*this, "digit%u", 0U), m_lamp(*this, "lamp0"), m_waveenable(false), m_collision(0), @@ -86,7 +85,6 @@ class seabattl_state : public driver_device void time_display_w(uint8_t data); void score_display_w(uint8_t data); void score2_display_w(uint8_t data); - template void digit_w(uint8_t data) { m_7segs[N] = data; } void seabattl_palette(palette_device &palette) const; uint32_t screen_update_seabattl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); @@ -100,7 +98,6 @@ class seabattl_state : public driver_device required_shared_ptr m_objram; required_device_array m_digits; required_device m_s2636; - output_finder<6> m_7segs; output_finder<> m_lamp; tilemap_t *m_bg_tilemap = nullptr; @@ -240,7 +237,6 @@ uint32_t seabattl_state::screen_update_seabattl(screen_device &screen, bitmap_in void seabattl_state::video_start() { - m_7segs.resolve(); m_screen->register_screen_bitmap(m_collision_bg); m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(seabattl_state::get_bg_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); m_bg_tilemap->set_transparent_pen(0); @@ -496,12 +492,12 @@ void seabattl_state::seabattl(machine_config &config) m_s2636->set_offsets(-13, -29); m_s2636->add_route(ALL_OUTPUTS, "mono", 0.10); - DM9368(config, m_digits[0], 0).update_cb().set(FUNC(seabattl_state::digit_w<0>)); - DM9368(config, m_digits[1], 0).update_cb().set(FUNC(seabattl_state::digit_w<1>)); - DM9368(config, m_digits[2], 0).update_cb().set(FUNC(seabattl_state::digit_w<2>)); - DM9368(config, m_digits[3], 0).update_cb().set(FUNC(seabattl_state::digit_w<3>)); - DM9368(config, m_digits[4], 0).update_cb().set(FUNC(seabattl_state::digit_w<4>)); - DM9368(config, m_digits[5], 0).update_cb().set(FUNC(seabattl_state::digit_w<5>)); + DM9368(config, m_digits[0]).update_cb().set_output("digit0"); + DM9368(config, m_digits[1]).update_cb().set_output("digit1"); + DM9368(config, m_digits[2]).update_cb().set_output("digit2"); + DM9368(config, m_digits[3]).update_cb().set_output("digit3"); + DM9368(config, m_digits[4]).update_cb().set_output("digit4"); + DM9368(config, m_digits[5]).update_cb().set_output("digit5"); /* video hardware */ SCREEN(config, m_screen, SCREEN_TYPE_RASTER); diff --git a/src/osd/modules/lib/osdlib_macosx.cpp b/src/osd/modules/lib/osdlib_macosx.cpp index 9d13f118ff2aa..54836f9ec69a8 100644 --- a/src/osd/modules/lib/osdlib_macosx.cpp +++ b/src/osd/modules/lib/osdlib_macosx.cpp @@ -56,6 +56,7 @@ void osd_process_kill() kill(getpid(), SIGKILL); } + //============================================================ // osd_break_into_debugger //============================================================ @@ -81,6 +82,22 @@ void osd_break_into_debugger(const char *message) } +//============================================================ +// osd_get_cache_line_size +//============================================================ + +std::pair osd_get_cache_line_size() noexcept +{ + size_t result = 0; + size_t resultsize = sizeof(result); + int const err = sysctlbyname("hw.cachelinesize", &result, &resultsize, 0, 0); + if (!err) + return std::make_pair(std::error_condition(), unsigned(result)); + else + return std::make_pair(std::error_condition(err, std::generic_category()), 0U); +} + + //============================================================ // osd_get_clipboard_text //============================================================ diff --git a/src/osd/modules/lib/osdlib_unix.cpp b/src/osd/modules/lib/osdlib_unix.cpp index 20f6a9ab40c3c..3600458022283 100644 --- a/src/osd/modules/lib/osdlib_unix.cpp +++ b/src/osd/modules/lib/osdlib_unix.cpp @@ -53,6 +53,7 @@ void osd_process_kill() kill(getpid(), SIGKILL); } + //============================================================ // osd_break_into_debugger //============================================================ @@ -68,6 +69,31 @@ void osd_break_into_debugger(const char *message) #endif } + +//============================================================ +// osd_get_cache_line_size +//============================================================ + +std::pair osd_get_cache_line_size() noexcept +{ +#if defined(__linux__) + FILE *const f = std::fopen("/sys/devices/system/cpu/cpu0/cache/index0/coherency_line_size", "r"); + if (!f) + return std::make_pair(std::error_condition(errno, std::generic_category()), 0U); + + unsigned result = 0; + auto const cnt = std::fscanf(f, "%u", &result); + std::fclose(f); + if (1 == cnt) + return std::make_pair(std::error_condition(), result); + else + return std::make_pair(std::errc::io_error, 0U); +#else // defined(__linux__) + return std::make_pair(std::errc::not_supported, 0U); +#endif +} + + #ifdef SDLMAME_ANDROID std::string osd_get_clipboard_text() noexcept { diff --git a/src/osd/modules/lib/osdlib_win32.cpp b/src/osd/modules/lib/osdlib_win32.cpp index d42ad14d3df64..cf3fd7c9320ab 100644 --- a/src/osd/modules/lib/osdlib_win32.cpp +++ b/src/osd/modules/lib/osdlib_win32.cpp @@ -106,6 +106,42 @@ void osd_break_into_debugger(const char *message) #endif } + +//============================================================ +// osd_get_cache_line_size +//============================================================ + +std::pair osd_get_cache_line_size() noexcept +{ + DWORD resultsize = 0; + if (GetLogicalProcessorInformation(nullptr, &resultsize) || (ERROR_INSUFFICIENT_BUFFER != GetLastError()) || !resultsize) + return std::make_pair(std::errc::operation_not_permitted, 0U); + + auto const result = reinterpret_cast(std::malloc(resultsize)); + if (!result) + return std::make_pair(std::errc::not_enough_memory, 0U); + + if (!GetLogicalProcessorInformation(result, &resultsize)) + { + std::free(result); + return std::make_pair(std::errc::operation_not_permitted, 0U); + } + + for (unsigned i = 0; i < (resultsize / sizeof(result[0])); ++i) + { + if ((RelationCache == result[i].Relationship) && (1 == result[i].Cache.Level)) + { + unsigned const linesize = result[i].Cache.LineSize; + std::free(result); + return std::make_pair(std::error_condition(), linesize); + } + } + + std::free(result); + return std::make_pair(std::errc::operation_not_permitted, 0U); +} + + //============================================================ // get_clipboard_text_by_format //============================================================ diff --git a/src/osd/osdcore.h b/src/osd/osdcore.h index f3f5fc2e9b33c..b3dc209991304 100644 --- a/src/osd/osdcore.h +++ b/src/osd/osdcore.h @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -128,6 +129,8 @@ osd_ticks_t osd_ticks_per_second() noexcept; -----------------------------------------------------------------------------*/ void osd_sleep(osd_ticks_t duration) noexcept; + + /*************************************************************************** WORK ITEM INTERFACES ***************************************************************************/ @@ -350,6 +353,14 @@ void osd_work_item_release(osd_work_item *item); void osd_break_into_debugger(const char *message); +/// \brief Get cache line size in bytes +/// +/// This function gets the host CPU's level 1 cache line size in bytes. +/// \return A pair consisting of an error condition and the cache line +/// size in bytes if successful. +std::pair osd_get_cache_line_size() noexcept; + + /*************************************************************************** UNCATEGORIZED INTERFACES diff --git a/src/osd/strconv.cpp b/src/osd/strconv.cpp index 83fb8eaecae63..130f259d70f32 100644 --- a/src/osd/strconv.cpp +++ b/src/osd/strconv.cpp @@ -294,6 +294,14 @@ int osd_uchar_from_osdchar(char32_t *uchar, const char *osdchar, size_t count) int osd_uchar_from_osdchar(char32_t *uchar, const char *osdchar, size_t count) { + // TODO: should this handle count == 0? + if (!*osdchar) + { + // mbstowcs stops on encountering NUL and doesn't include it in the output count + *uchar = char32_t(0); + return 1; + } + // FIXME: mbstowcs depends on global state wchar_t wch; count = mbstowcs(&wch, (char *)osdchar, 1);