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, "