diff -Nru mame-0.230+dfsg.1/3rdparty/lua-zlib/lua_zlib.c mame-0.231+dfsg.1/3rdparty/lua-zlib/lua_zlib.c --- mame-0.230+dfsg.1/3rdparty/lua-zlib/lua_zlib.c 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/3rdparty/lua-zlib/lua_zlib.c 2021-04-27 15:32:05.000000000 +0000 @@ -392,7 +392,7 @@ SETLITERAL("_COPYRIGHT", "Copyright (c) 2009-2010 Brian Maher"); SETLITERAL("_DESCRIPTION", "Yet another binding to the zlib library"); - SETLITERAL("_VERSION", "lua-zlib $Id: b619258c75f480717fad20c113c3b1a35f888ce0 $ (tag: mame0230)"); + SETLITERAL("_VERSION", "lua-zlib $Id: b619258c75f480717fad20c113c3b1a35f888ce0 $ (tag: mame0231)"); /* Expose this to lua so we can do a test: */ SETINT("_TEST_BUFSIZ", LUAL_BUFFERSIZE); diff -Nru mame-0.230+dfsg.1/android-project/app/src/main/AndroidManifest.xml mame-0.231+dfsg.1/android-project/app/src/main/AndroidManifest.xml --- mame-0.230+dfsg.1/android-project/app/src/main/AndroidManifest.xml 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/android-project/app/src/main/AndroidManifest.xml 2021-04-27 15:32:05.000000000 +0000 @@ -4,8 +4,8 @@ --> diff -Nru mame-0.230+dfsg.1/debian/changelog mame-0.231+dfsg.1/debian/changelog --- mame-0.230+dfsg.1/debian/changelog 2021-03-31 07:47:15.000000000 +0000 +++ mame-0.231+dfsg.1/debian/changelog 2021-04-28 20:11:00.000000000 +0000 @@ -1,9 +1,18 @@ -mame (0.230+dfsg.1-0ubuntu1~ppa1~focal1) focal; urgency=medium +mame (0.231+dfsg.1-0ubuntu1~ppa1~focal1) focal; urgency=medium * New upstream release. + + -- Cesare Falco Wed, 28 Apr 2021 22:11:00 +0200 + +mame (0.230+dfsg.1-1) unstable; urgency=medium + + [ Cesare Falco ] + * New upstream release. + + [ Jordi Mallach ] * Updated patches. - -- Cesare Falco Wed, 31 Mar 2021 09:47:15 +0200 + -- Jordi Mallach Fri, 02 Apr 2021 00:35:26 +0200 mame (0.229+dfsg.1-1) unstable; urgency=medium diff -Nru mame-0.230+dfsg.1/debian/control mame-0.231+dfsg.1/debian/control --- mame-0.230+dfsg.1/debian/control 2021-03-31 07:47:15.000000000 +0000 +++ mame-0.231+dfsg.1/debian/control 2021-04-28 20:11:00.000000000 +0000 @@ -5,7 +5,7 @@ XSBC-Original-Maintainer: Cesare Falco Build-Depends: debhelper-compat (= 12), dpkg-dev (>= 1.17), - g++-9 [armhf], + g++-9 [armhf arm64], libexpat1-dev, libflac-dev, libfontconfig1-dev, diff -Nru mame-0.230+dfsg.1/debian/rules mame-0.231+dfsg.1/debian/rules --- mame-0.230+dfsg.1/debian/rules 2021-03-31 07:47:15.000000000 +0000 +++ mame-0.231+dfsg.1/debian/rules 2021-04-28 20:11:00.000000000 +0000 @@ -27,7 +27,7 @@ LINK_WITH_GOLD = 1 # g++ 10 seems buggy on some archs, use to build with g++ 9 as a workaround -# if enabled, remember to add dependency on g++-9 in debian/control as well! +# if enabled, remember to add dependency in debian/control as well! COMPILE_WITH_GCC9 = # Override relevant make variables in original makefile @@ -80,6 +80,7 @@ ARCHOPTS="-mabi=lp64 -fPIC" # reduce jobs to release memory on Launchpad builder VM NUMJOBS = 2 +COMPILE_WITH_GCC9 = 1 endif ifeq ($(DEB_HOST_ARCH),armhf) diff -Nru mame-0.230+dfsg.1/docs/source/initialsetup/compilingmame.rst mame-0.231+dfsg.1/docs/source/initialsetup/compilingmame.rst --- mame-0.230+dfsg.1/docs/source/initialsetup/compilingmame.rst 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/docs/source/initialsetup/compilingmame.rst 2021-04-27 15:32:05.000000000 +0000 @@ -152,18 +152,15 @@ Building with Microsoft Visual Studio ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -* You can generate Visual Studio 2017 projects using **make vs2017**. The +* You can generate Visual Studio 2019 projects using **make vs2019**. The solution and project files will be created in - ``build/projects/windows/mame/vs2017`` by default (the name of the ``build`` + ``build/projects/windows/mame/vs2019`` by default (the name of the ``build`` folder can be changed using the ``BUILDDIR`` option). This will always regenerate the settings, so **REGENIE=1** is *not* needed. -* Adding **MSBUILD=1** to the make options will build build the solution using +* Adding **MSBUILD=1** to the make options will build the solution using the Microsoft Build Engine after generating the project files. Note that this requires paths and environment variables to be configured so the correct Visual Studio tools can be located. -* MAME can only be compiled with the Visual Studio 15.7.6 tools. Bugs in newer - versions of the Microsoft Visual C/C++ compiler prevent it from compiling - MAME. * The MSYS2 environment is still required to generate the project files, convert built-in layouts, compile UI translations, etc. @@ -220,7 +217,7 @@ You’ll need a few prerequisites from your Linux distribution. Make sure you get SDL2 2.0.4 or later as earlier versions are buggy:: - sudo dnf install gcc gcc-c++ SDL2-devel SDL2_ttf-devel libXi-devel libXinerama-devel qt5-qtbase-devel qt5-qttools expat-devel fontconfig-devel alsa-lib-devel + sudo dnf install gcc gcc-c++ SDL2-devel SDL2_ttf-devel libXi-devel libXinerama-devel qt5-qtbase-devel qt5-qttools expat-devel fontconfig-devel alsa-lib-devel pulseaudio-libs-devel Compilation is exactly as described above in All Platforms. diff -Nru mame-0.230+dfsg.1/hash/a2600_cass.xml mame-0.231+dfsg.1/hash/a2600_cass.xml --- mame-0.230+dfsg.1/hash/a2600_cass.xml 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/hash/a2600_cass.xml 2021-04-27 15:32:05.000000000 +0000 @@ -7,7 +7,7 @@ The scharger cartridge must be loaded before being able to load a tape. Press Play when asked. -e.g. mame64 a2600 scharger -cass commumut +e.g. mame a2600 scharger -cass commumut --> diff -Nru mame-0.230+dfsg.1/hash/a800_flop.xml mame-0.231+dfsg.1/hash/a800_flop.xml --- mame-0.230+dfsg.1/hash/a800_flop.xml 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/hash/a800_flop.xml 2021-04-27 15:32:05.000000000 +0000 @@ -288,7 +288,6 @@ - Mr. Robot and his Robot Factory 1983 @@ -355,17 +354,6 @@ - - Galahad and the Holy Grail - 1982 - Atari Program Exchange - - - - - - - Jumpman 1983 @@ -417,6 +405,49 @@ + + Ballyhoo + 1986 + Infocom + + + + + + + + + + + + + + Cutthroats + 1984 + Infocom + + + + + + + + + + + + + + Caverns of Mars + 1982 + Atari + + + + + + + Crush, Crumble and Chomp! 1981 @@ -429,6 +460,206 @@ + + + Dandy Dungeon + 1985 + Antic + + + + + + + + + + + + + + Enchanter + 1985 + Infocom + + + + + + + + + + + + + + Essex + 1985 + Synapse Software + + + + + + + + + + + + + + + + + + + + + + + + Galahad and the Holy Grail + 1982 + Atari Program Exchange + + + + + + + + + Kangaroo + 1982 + Atari Program Exchange + + + + + + + + + Moonmist + 1986 + Infocom + + + + + + + + + + + + + + Phantasie + 1987 + SSI + + + + + + + + + + + + + + + + + + + + + + + + Phobos v1.1 + 1983 + Atari Program Exchange + + + + + + + + + Planetfall + 1983 + Infocom + + + + + + + + + + + + + + Pogoman + 1982 + Computer Magic + + + + + + + + + Chronicles of Osgorth: The Shattered Alliance + 1981 + SSI + + + + + + + + + + Softporn Adventure + 1981 + On-Line Systems + + + + + + + + + + Spellbreaker + 1985 + Infocom + + + + + + + + + + + Microsoft BASIC II Programming Language (Extensions) diff -Nru mame-0.230+dfsg.1/hash/a800.xml mame-0.231+dfsg.1/hash/a800.xml --- mame-0.230+dfsg.1/hash/a800.xml 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/hash/a800.xml 2021-04-27 15:32:05.000000000 +0000 @@ -1281,7 +1281,7 @@ - + Bounty Bob Strikes Back! (Alt) 1984 diff -Nru mame-0.230+dfsg.1/hash/amiga_flop.xml mame-0.231+dfsg.1/hash/amiga_flop.xml --- mame-0.230+dfsg.1/hash/amiga_flop.xml 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/hash/amiga_flop.xml 2021-04-27 15:32:05.000000000 +0000 @@ -9414,5 +9414,29 @@ + + RAY Pokeri 100 mk (Fin) + 1991 + Las Vegas Games + + + + + + + + + + RAY Pokeri 200 mk (Fin) + 1992 + Las Vegas Games + + + + + + + + diff -Nru mame-0.230+dfsg.1/hash/apple2_flop_clcracked.xml mame-0.231+dfsg.1/hash/apple2_flop_clcracked.xml --- mame-0.230+dfsg.1/hash/apple2_flop_clcracked.xml 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/hash/apple2_flop_clcracked.xml 2021-04-27 15:32:05.000000000 +0000 @@ -6224,6 +6224,11 @@ + + + + + @@ -40650,7 +40655,7 @@ - + MECC-A712 Music Theory: Music Fundamentals (Version 1.0) (cleanly cracked) 1979 MECC @@ -40664,7 +40669,7 @@ - + MECC-A719 Elementary Volume 5: Language Arts: Prefixes (Version 1.5) (cleanly cracked) 1980 MECC @@ -40678,7 +40683,7 @@ - + MECC-A719 Elementary Volume 5: Language Arts: Prefixes (Version 1.7) (cleanly cracked) 1980 MECC @@ -40692,7 +40697,7 @@ - + MECC-A721 Business Volume 3: Accounting (Version 1.8) (cleanly cracked) 1981 MECC @@ -40706,7 +40711,78 @@ - + + Kampfgruppe (Version 1.0) (cleanly cracked) + 1985 + Strategic Simulations + + + + + + + + + + + + + + + + + + + Warriors of RAS Volume IV: Ziggurat (cleanly cracked) + 1982 + Screenplay + + + + + + + + + + + + GATO (Version 1.2) (cleanly cracked) + 1985 + Spectrum Holobyte + + + + + + + + + + + + + Trivia Fever (cleanly cracked) + 1984 + Professional Software + + + + + + + + + + + + + + + + + + MECC-A726 Spelling Volume 1: Primary (Version 2.0) (cleanly cracked) 1980 MECC @@ -40719,5 +40795,1180 @@ + + + MECC-A726 Spelling Volume 1: Primary (Version 3.1) (cleanly cracked) + 1980 + MECC + + + + + + + + + + + + MECC-A728 Spelling Volume 2: Secondary (Version 2.0) (cleanly cracked) + 1980 + MECC + + + + + + + + + + + + MECC-A728 Spelling Volume 2: Secondary (Version 3.1) (cleanly cracked) + 1980 + MECC + + + + + + + + + + + + MECC-A731 Elementary Volume 7: Pre-Reading and Counting (Version 1.0) (cleanly cracked) + 1981 + MECC + + + + + + + + + + + + MECC-A731 Elementary Volume 7: Pre-Reading and Counting (Version 1.1) (cleanly cracked) + 1981 + MECC + + + + + + + + + + + + MECC-A733 Elementary Volume 9: Geometry (Version 1.0) (cleanly cracked) + 1981 + MECC + + + + + + + + + + + + MECC-A733 Elementary Volume 9: Geometry (Version 2.1) (cleanly cracked) + 1981 + MECC + + + + + + + + + + + + MECC-A734 Elementary Volume 10: Geometry (Version 1.1) (cleanly cracked) + 1981 + MECC + + + + + + + + + + + + Algebra Volume 4 (Version 1.1) (cleanly cracked) + 1984 + Peachtree Software + + + + + + + + + + + + MECC-A735 Elementary Volume 11: Language Arts (Version 1.1) (cleanly cracked) + 1981 + MECC + + + + + + + + + + + + + MECC-A736 Elementary Volume 12: Language Arts (Version 1.0) (cleanly cracked) + 1980 + MECC + + + + + + + + + + + + + MECC-A736 Elementary Volume 12: Language Arts (Version 2.0) (cleanly cracked) + 1980 + MECC + + + + + + + + + + + + + MECC-A737 Mathematics Volume 2: Measurement (Version 1.2) (cleanly cracked) + 1981 + MECC + + + + + + + + + + + + + MECC-A738 Mathematics Volume 3: Geometry (Version 1.3) (cleanly cracked) + 1981 + MECC + + + + + + + + + + + + MECC-A738 Mathematics Volume 3: Geometry - (Limited Boot Backup) (Version 1.3) (cleanly cracked) + 1981 + MECC + + + + + + + + + + + + + MECC-A743 Elementary Volume 13: Nutrition (Version 1.0) (cleanly cracked) + 1981 + MECC + + + + + + + + + + + + + MECC-A746 English Volume 1: Parts of Speech (Version 1.3) (cleanly cracked) + 1981 + MECC + + + + + + + + + + + + + MECC-A746 English Volume 1: Parts of Speech (Version 1.4) (cleanly cracked) + 1981 + MECC + + + + + + + + + + + + + MECC-A749 School Utilities Volume 2: Readability (cleanly cracked) + 1982 + MECC + + + + + + + + + + + + Algebra Volume 3 (Revision 0) (cleanly cracked) + 1984 + EduWare + + + + + + + + + + + + MECC-A751 Health Maintenance Volume 2: Assessment (Version 1.0) (cleanly cracked) + 1982 + MECC + + + + + + + + + + + + + MECC-A752 Nutrition Volume 1 (Version 1.2) (cleanly cracked) + 1982 + MECC + + + + + + + + + + + + MECC-A753 Nutrition Volume 2 (Version 1.5) (cleanly cracked) + 1982 + MECC + + + + + + + + + + + + MECC-A757 Computer Generated Mathematics Materials Volume 1: Problem Solving (Version 1.1) (cleanly cracked) + 1983 + MECC + + + + + + + + + + + + MECC-A758 Computer Generated Mathematics Materials Volume 2: Problem Solving (Version 1.1) (cleanly cracked) + 1983 + MECC + + + + + + + + + + + + MECC-A771 Grade Manager (Version 1.0) (cleanly cracked) + 1983 + MECC + + + + + + + + + + + + MECC-A771 Grade Manager (Version 1.1) (cleanly cracked) + 1983 + MECC + + + + + + + + + + + + MECC-A771 Grade Manager Revised Edition (Version 2.1) (cleanly cracked) + 1985 + MECC + + + + + + + + + + + + MECC-A771 Grade Manager Revised Edition (Version 2.2) (cleanly cracked) + 1985 + MECC + + + + + + + + + + + + MECC-A771 Grade Manager Revised Edition (Version 2.3) (cleanly cracked) + 1985 + MECC + + + + + + + + + + + + Strip Poker (cleanly cracked) + 1982 + Artworx + + + + + + + + + + + + + + + + + + + + + + + + + + MECC-A773 Growgins' Fractions (Version 1.0) (cleanly cracked) + 1983 + MECC + + + + + + + + + + + + + MECC-A773 Growgins' Fractions (Version 1.1) (cleanly cracked) + 1983 + MECC + + + + + + + + + + + + + MECC-A774 Adventures with Fractions (Version 1.1) (cleanly cracked) + 1983 + MECC + + + + + + + + + + + + + MECC-A775 EZ Logo (Version 2.0) (cleanly cracked) + 1985 + MECC + + + + + + + + + + + + MECC-A776 Writing a Narrative (Version 1.0) (cleanly cracked) + 1983 + MECC + + + + + + + + + + + + MECC-A776 Writing a Narrative (Version 1.1) (cleanly cracked) + 1983 + MECC + + + + + + + + + + + + MECC-A777 Blissymbolics: Blissymbol Concepts (Version 1.1) (cleanly cracked) + 1983 + MECC + + + + + + + + + + + + MECC-A779 The Friendly Computer (Version 1.5) (cleanly cracked) + 1983 + MECC + + + + + + + + + + + + + MECC-A780 Mind Puzzles (Version 1.0) (cleanly cracked) + 1983 + MECC + + + + + + + + + + + + MECC-A780 Mind Puzzles (Version 1.3) (cleanly cracked) + 1983 + MECC + + + + + + + + + + + + PlayWriter: Mystery (cleanly cracked) + 1985 + Woodbury Software + + + + + + + + + + + + + + + + + + + MECC-A781 Oh, Deer! (Version 1.1) (cleanly cracked) + 1983 + MECC + + + + + + + + + + + + + MECC-A784 Problem-Solving Strategies (Version 1.0) (cleanly cracked) + 1983 + MECC + + + + + + + + + + + + + MECC-A784 Problem-Solving Strategies (Version 1.3) (cleanly cracked) + 1983 + MECC + + + + + + + + + + + + + MECC-A785 Writing a Character Sketch (Version 1.1) (cleanly cracked) + 1983 + MECC + + + + + + + + + + + + MECC-A785 Writing a Character Sketch (Version 1.2) (cleanly cracked) + 1983 + MECC + + + + + + + + + + + + MECC-A788 Early Addition (Version 1.1) (cleanly cracked) + 1983 + MECC + + + + + + + + + + + + + MECC-A788 Early Addition (Version 1.3) (cleanly cracked) + 1983 + MECC + + + + + + + + + + + + + MECC-A810 Experiencing Procedures (Version 1.0) (cleanly cracked) + 1983 + MECC + + + + + + + + + + + + + MECC-A811 The Three R's of Microcomputing (Version 1.0) (cleanly cracked) + 1983 + MECC + + + + + + + + + + + + MECC-A813 Processing Words (Version 1.0) (cleanly cracked) + 1983 + MECC + + + + + + + + + + + + + Dragon's Keep (Version 1984-06-05) (cleanly cracked) + 1983 + Sierra On-Line + + + + + + + + + + + + + MECC-A822 Nutrition (Version 1.0) (cleanly cracked) + 1983 + MECC + + + + + + + + + + + + + Quizagon (cleanly cracked) + 1983 + Springboard Software + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Pensate (cleanly cracked) + 1983 + Penguin Software + + + + + + + + + + + + Risk (Version 1.4) (cleanly cracked) + 1988 + Leisure Genius + + + + + + + + + + + + Clue (Version 1.5) (cleanly cracked) + 1989 + Leisure Genius + + + + + + + + + + + + The Computer Edition of Scrabble (cleanly cracked) + 1987 + Leisure Genius + + + + + + + + + + + + The Voyage of the Valkyrie (cleanly cracked) + 1980 + Advanced Operating Systems + + + + + + + + + + + + + Cytron Masters (cleanly cracked) + 1982 + Strategic Simulations + + + + + + + + + + + + + Six-Gun Shootout (cleanly cracked) + 1985 + Strategic Simulations + + + + + + + + + + + + Compuzzler (cleanly cracked) + 1984 + Uptown Software + + + + + + + + + + + + Algebra Action (cleanly cracked) + 1986 + Houghton Mifflin + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Wizard's Crown (Version 1.2) (cleanly cracked) + 1986 + Strategic Simulations + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Odyssey in Time (cleanly cracked) + 1981 + Krell Software + + + + + + + + + + + + Forbidden Quest (cleanly cracked) + 1983 + Pryority Software + + + + + + + + + + + + Flying Tigers (Version 1.3) (cleanly cracked) + 1982 + Discovery Games + + + + + + + + + + + + Apple How To: Lessons in Computing and Calculating (cleanly cracked) + 1980 + Apple Computer + + + + + + + + + + + + + The Desecration (cleanly cracked) + 1982 + Mind Games + + + + + + + + + + + + Just Around The Block (cleanly cracked) + 1987 + D.C. Heath + + + + + + + + + + + + + + + + + + + + Depreciation Log (cleanly cracked) + 1985 + Harvest Computer Systems + + + + + + + + + + + + Adventures in Space (cleanly cracked) + 1983 + Intellectual Software + + + + + + + + + + + + Utopia Graphics Tablet System (cleanly cracked) + 1980 + Utopia Software Development + + + + + + + + + + + + + The School Tool (cleanly cracked) + 1983 + Encyclopaedia Britannica + + + + + + + + + + + + + + + + + + + + + + diff -Nru mame-0.230+dfsg.1/hash/apple2_flop_orig.xml mame-0.231+dfsg.1/hash/apple2_flop_orig.xml --- mame-0.230+dfsg.1/hash/apple2_flop_orig.xml 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/hash/apple2_flop_orig.xml 2021-04-27 15:32:05.000000000 +0000 @@ -16628,4 +16628,90 @@ + + Sidewalk Sneakers + 1991 + Sunburst Communications + + + + + + + + + + + + + + + Animal Rescue + 1991 + Sunburst Communications + + + + + + + + + + + + + + + Mickey's Magic Reader + 1989 + Sunburst Communications + + + + + + + + + + + + + + + Modern Biology: Genetics + 1989 + Holt, Rinehart and Winston + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru mame-0.230+dfsg.1/hash/basf7100.xml mame-0.231+dfsg.1/hash/basf7100.xml --- mame-0.230+dfsg.1/hash/basf7100.xml 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/hash/basf7100.xml 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,31 @@ + + + + + + + + BOS 9.3 + 198? + BASF + + + + + + + + + BASIC-Kurs + 198? + <unknown> + + + + + + + + diff -Nru mame-0.230+dfsg.1/hash/cc40_cart.xml mame-0.231+dfsg.1/hash/cc40_cart.xml --- mame-0.230+dfsg.1/hash/cc40_cart.xml 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/hash/cc40_cart.xml 2021-04-27 15:32:05.000000000 +0000 @@ -4,21 +4,21 @@ license:CC0 --> - - + + Advanced Electrical Engineering 1983 diff -Nru mame-0.230+dfsg.1/hash/fm77av.xml mame-0.231+dfsg.1/hash/fm77av.xml --- mame-0.230+dfsg.1/hash/fm77av.xml 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/hash/fm77av.xml 2021-04-27 15:32:05.000000000 +0000 @@ -1108,6 +1108,20 @@ + + + + + FM-77AV/20EX Nyumon Disk + 198? + 富士通 (Fujitsu) + + + + + + + FM-77AV/40SX Nyumon Disk 1988 @@ -1141,6 +1155,19 @@ + + + + F-BASIC V3.3L30 + 1987 + 富士通 (Fujitsu) + + + + + + + F-BASIC V3.4L21 diff -Nru mame-0.230+dfsg.1/hash/fmtowns_cd.xml mame-0.231+dfsg.1/hash/fmtowns_cd.xml --- mame-0.230+dfsg.1/hash/fmtowns_cd.xml 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/hash/fmtowns_cd.xml 2021-04-27 15:32:05.000000000 +0000 @@ -39,7 +39,7 @@ Arquelphos D.O. 1993/7 CD Aska Base Algo 1989/5 SET(CD+FD) Aska Word Algo 1991/1 SET(CD+FD) -Band-kun Koei 1991/1 SET(CD+FD) +* Band-kun Koei 1991/1 SET(CD+FD) Birdy Soft Best Characters Birdy Soft 1995/4 CD Bohemia no Inori Fujitsu 1993/5 CD Bomber Quest Mink 1995/6 CD @@ -49,11 +49,8 @@ ByHAND V1.1 Fujitsu 1992/1 CD ByHAND V2.1 Fujitsu 1993/3 CD ByHAND V3.1 Fujitsu 1994/3 CD -California X Party: Joshi Daisei Himitsu Club HOP 1994/9 SET(CD+FD) -Car Marty Exciting CD Fujitsu Ten 1994/3 CD×2 Car Marty Exciting CD Fujitsu Ten 1994/3 CD×2 Car Marty Exciting CD Fujitsu Ten 1994/6 CD×2 -Castles 2: Bretagne Touitsu Senki Victor Entertainment 1993/10 SET(CD+FD) CB Trainer Data Library V1.1 L10 Fujitsu 1993/5 CD CB Trainer Jikkou System V2.1 Fujitsu 1994/9 ? CB Trainer V1.1 Fujitsu 1993/5 CD @@ -73,7 +70,6 @@ Chuugokugo de Ajiwau: Kanshi no Sekai CSK Research Institute (CRI) 1991/4 CD City Lights Raison 1992/8 CD ClearMind: Shimoguchi Yuuzan no Shuuchuuryoku Kaihatsu CSK Research Institute (CRI) 1989/8 CD -Collector D D.O. 1993/8 CD Computer Zukan: Shokubutsu-hen CD-ROM-ban Ratio International 1991/12 CD Config Rom Glams 1995/12 CD Cover Girls Vol. 1 Janis 1994/2 CD @@ -83,7 +79,6 @@ C-Trace Towns Cast 1989/6 CD * Custom Mate & Denwa no Bell ga… Cocktail Soft 1994/12 SET(CD+FD) Cutie Queen Crystal Eizou 1995/2 CD -Cybernoid Alpha D.O. 1996/4 CD CyberSculpt (HMC-140) Fujitsu 1991/11 CD Cyclone Express Alpha Towns Ans 1990/5 CD Dai-i-ku Sanshusha 1990/11 CD @@ -108,7 +103,7 @@ Den V1.0 Fujitsu 1991/7 CD Den V2 Fujitsu 1993/1 CD Den V3.0 Fujitsu 1994/8 SET(CD+FD) -Diamond Players Wolf Team 1993/6 SET(CD+FD) +* Diamond Players Wolf Team 1993/6 SET(CD+FD) Dick Amorphous 1996/1 CD Digital Pinup Girls Vol. 2 Transpegasus Limited 1993/6 CD Do-Re-Mi Canvas Tokyo Shoseki 1994/12 CD @@ -168,8 +163,6 @@ FM Towns Paso-Rika Ver. 3 Maris 1993/11 CD FM Towns Shougaku Ongaku (5-6-nensei You) Kyouiku Shuppan 1991/5 SET(CD+FD) FM Towns-ban Dyna-pers Dynaware 1989/12 CD -* Fujitsu Air Warrior V1.2 Fujitsu 1993/11 SET(CD+FD) -* Fujitsu Air Warrior V1.1 Fujitsu 1992/3 SET(CD+FD) Fujitsu Habitat V1.1 Fujitsu 1990/1 SET(CD+FD) Fujitsu Habitat V2.1 L11 Fujitsu 1994/? SET(CD+FD) Fukui Toshio no Otenki Map Inter Limited Logic 1991/2 CD @@ -215,7 +208,6 @@ Hello Kitty: Asobi no Omochabako Fujitsu Parex 1995/9 CD High C Compiler Multimedia Kaihatsu Kit V3.2 Fujitsu ? CD High School War ISC 1994/9 CD -* Hiouden 2 Nihon Telenet 1994/3 SET(CD+FD) HomeSTUDIO V1.1 Fujitsu 1992/12 SET(CD+FD) Hot de Art na Barcelona Media Art 1991/9 CD Hyoutan Shima Kouryaku-ki Nihon Dennou Koubou 1994/? ? @@ -244,18 +236,16 @@ Hyper DX Datt Japan 1989/10 SET(CD+FD) Hyper Ikuji Guide: Babubabu Tenshi Dennou Shoukai 1996/4 CD Hyper Koto no Tabi: Kyoto Nanken Koubou 1993/2 CD -Hyper Land: Doubutsu no Sekai Datt Japan 1993/3 CD +* Hyper Land: Doubutsu no Sekai Datt Japan 1993/3 CD Hyper Media NHK Zoku Kiso Eigo: Dai-1-kan CSK Research Institute (CRI) 1991/6 SET(CD+FD) Hyper Media NHK Zoku Kiso Eigo: Dai-2-kan CSK Research Institute (CRI) 1991/7 SET(CD+FD) * Hyper Media NHK Zoku Kiso Eigo: Dai-3-kan CSK Research Institute (CRI) 1991/9 SET(CD+FD) -Hyper Note Datt Japan 1991/12 SET(CD+FD) +* Hyper Note Datt Japan 1991/12 SET(CD+FD) Hyper Photo DB Fujitsu 1993/9 CD -* Hyper Planet Shiki Vol. 2: Utsukushii Fuyu no Seiza Hen Datt Japan 1993/12 CD Hyper Planet Shiki Vol. 3: Uraraka na Haru no Seiza Hen Datt Japan 1994/4 CD Hyper Planet Shiki Vol. 4: Fukamari Yuku Aki no Seiza Hen Datt Japan 1994/11 CD Hyper Touhouku Kikou Nanken Koubou 1991/12 SET(CD+FD) Hyper Wide Ban Rekishi Shiryoushuu Shingakusha 1993/7 CD -If Active 1993/6 CD Igo Doujou Yaburi: Menkyo Kaiden!! Mezase 7-kyuu Fujitsu OA 1990/10 CD Image Art System Raison 1990/6 CD Image Art System Pro Raison 1990/8 CD @@ -272,16 +262,12 @@ JAF Drive Guide JAF Shuppansha 1990/8 SET(CD+FD) JAF Drive Guide - Best Ski 150 (Resort-hen) JAF Shuppansha 1990/12 SET(CD+FD) JAF Drive Guide (Ver. 2) JAF Shuppansha 1992/2 SET(CD+FD) -Jinmon Yuugi Fairytale (Red Zone) 1995/8 SET(CD+FD) Jintaizu System Skeleton Medical System 1995/8 CD Jouhou Gijutsu Yougo Shuu CD-ROM Fujitsu 1991/12 CD JYB Cocktail Soft 1993/4 CD Kadokawa Ruigo Shin Jiten CD-ROM Fujitsu 1989/12 CD Kamigami no Daichi: Kojiki Gaiden Koei 1993/10 SET(CD+FD) -Kamimura Kei no Sexy Resort Pink Elephant 1992/9 CD -Kamimura Kei no Sexy Telephone Pink Elephant 1992/9 CD Kamiya Recliet Towns Raison 1990/10 CD -Kanade V1.1 Fujitsu 1995/4 CD Kanji Hitsujun Soft Nazoraa 2 Infortech 1994/5 CD Kanji Land 4-nen Fujitsu Ooita Software Laboratory 1995/11 CD Kanji Land 5-nen Fujitsu Ooita Software Laboratory 1995/12 CD @@ -291,18 +277,15 @@ Karyuugai Raison 1991/1 CD Katsuyaku Suru Computer (CD Town) Fujitsu Ooita Software Laboratory 1992/12 CD Kazadama Vol. 1: Maeda Shinzo no Sekai Ki - Japan Fujitsu 1993/9 CD -Kazadama Vol. 2: Ikeda Masuo Hanga-shuu Fujitsu 1995/4 CD Kazu ya Kimi Tashizan / Hikizan Hen Media Art 1995/1 CD Kenkyuusha Readers Eiwa CD-ROM Fujitsu 1993/2 CD Kerokero Keroppi to Origami no Tabibito Fujitsu Parex 1995/7 CD Kid Pix Companion Fujitsu Parex 1995/3 CD -Kikou Shidan 2 Artdink 1993/3 SET(CD+FD) +* Kikou Shidan 2 Artdink 1993/3 SET(CD+FD) Kitty Town no Nakama-tachi: Tanoshii Seikatsuka Fujitsu Parex 1995/10 CD Komaki Naomi Janis 1994/2 CD Koujien Daisanban CD-ROM Fujitsu 1989/12 CD Koujien Daiyonban CD-ROM Fujitsu 1993/3 CD -Kouryuuki Koei 1993/10 SET(CD+FD) -Kusuriyubi no Kyoukasho Active 1996/4 CD Kyouiku & FM Towns Vol. 1 Fujitsu ? CD Kyouiku & FM Towns Vol. 4 Fujitsu ? CD Let's go 1-1 DynEd Japan 1995/7 SET(CD+FD) @@ -310,22 +293,18 @@ Let's go 2-1 DynEd Japan 1995/7 SET(CD+FD) Let's go 2-2 DynEd Japan 1995/7 SET(CD+FD) * Lettuce Cooking 2: Tanoshiku Tsukureru Obentou SS Communications 1990/8 SET(CD+FD) -* Lipstick Adventure 3 Fairytale 1993/5 CD Little Big Adventure Electronic Arts Victor 1995/12 CD LiveAnimation V1.1 Fujitsu 1992/12 CD LiveAnimation V2.1 Fujitsu 1994/5 CD LiveMorph V1.1 Fujitsu 1994/2 CD LiveMovie V1.1 Fujitsu 1992/12 CD LiveMovie V2.1 Fujitsu 1994/3 CD -* Lodoss-tou Senki 2: Goshiki no Maryuu MAC 1994/6 SET(CD+FD) M Talk Fujitsu Office Kiki 1993/6 CD Manami no Dokomade Iku no? Wendy Magazine 1995/5 CD Manami: Ai to Koukan no Hibi Fairytale (Red Zone) 1995/10 SET(CD+FD) Many Colors 2 Amorphous 1995/6 CD Manyoushuu Uchida Youkou 1993/2 CD Maruanki Eitango: Chuugaku 1-nensei CSK Research Institute (CRI) 1989/12 SET(CD+FD) -Masuo per Masuo: Ikeda Masuo Hanga-shuu Kazadama Vol. 2 Fujitsu 1994/7 CD -Meisou Toshi Tiara 1995/12 CD Microsoft Windows 95 (Upgrade Package) Fujitsu 1996/6 CD Mietarou V2.0 Uchida Youkou 1992/12 SET(CD+FD) Migenerator V1.1 Fujitsu 1992/7 SET(CD+FD) @@ -340,7 +319,6 @@ Monoshiri Jiyuugaku Bannin Isshu-hen Shinkou Human Create 1994/10 CD Monster Planet 2255 Nihon Media Programming 1990/12 CD Moon Crystal Orange House 1992/6 ? -Moonlight Energy Inter Heart 1992/12 CD Mori no Ninkimono Fujitsu Social Science Laboratory 1993/12 CD Multimedia Nihon no Rekishi Dai-1-Shou: Kariya-ryou no Kurashi Tokyo Shoseki ? CD Multimedia Nihon no Rekishi Dai-2-Shou: Kome-zukuri no Mura kara Kofun no Kuni e Tokyo Shoseki 1995/4 CD @@ -404,52 +382,39 @@ Nihongo Nyuumon Dai-3-kan Infortech 1991/4 CD Nihongo Nyuumon Dai-4-kan Infortech 1991/4 CD Nihongo Nyuumon Dai-5-kan Infortech 1991/4 CD -* Nobunaga no Yabou: Tenshouki Koei 1995/3 SET(CD+FD) Nooch: Abakareta Inbou Bombee Bonbon 1992/11 ? -Nostalgia 1907 Sur de Wave 1992/5 CD Noyama no Kensakuka Fujitsu Social Science Laboratory 1995/3 CD O Hoshi Senjutsu Daireigen Victor Entertainment 1990/2 CD -Obaachan no Chiebukuro Gyousei 1991/11 CD Orient Express Gyousei 1994/12 CD Oryx Blue Wave: Eikou e no Kiseki Data West 1995/10 SET(CD+FD) Otto Anime-kun Nihon Micom Hanbai 1990/3 CD -Palamedes Ving 1991/10 CD Pasocon de Tanoshimu Yama to Chizu Inter Limited Logic 1995/10 CD Petit Collage Pandora Box 1994/3 CD -Planet Harmony Datt Japan 1993/9 SET(CD+FD) +* Planet Harmony Datt Japan 1993/9 SET(CD+FD) Pocky 1-2 & Ponyon Ponytail Soft 1994/6 CD Powers of Ten Datt Japan 1995/10 CD Present Orange House 1991/6 ? Primary Health Care System Raison 1990/9 CD -Private Slave Raccoon 1993/8 SET(CD+FD) -Psychic Detective Series Vol. 1: Invitation: Kage kara no Shoutaijou (Remake) Data West 1993/11 SET(CD+FD) Psychic Detective Series Vol. 2: Memories (Remake) Data West 1994/4 SET(CD+FD) Psychic Detective Series Vol. 3: Aya (Remake) Data West 1994/7 SET(CD+FD) -Psychic Detective Series Vol. 4: Orgel (Remake) Data West 1994/12 SET(CD+FD) Psychic Detective Series Vol. 5: Nightmare (Remake) Data West 1995/4 SET(CD+FD) Pyoko-tan no Niji no Shima: Nanairo no Ninjin wo Sagase Nanken Koubou 1994/3 CD Q2 ROM Magazine - Soukangou Disinfectant 1993/5 CD Queen of Duellist Gaiden + Gaiden Alpha Light Agumix 1994/4 CD Quiz de Let's Go! Great 1993/3 ? Rakuraku Sozai Vol. 1 Fujitsu 1995/3 CD -Reijou Monogatari Inter Heart 1995/4 CD Rekishi Shiryoukan Uchida Youkou 1990/12 CD Remember Beatles No.1 Yesterday SofMedia 1989/9 CD -Remember Beatles No.2 Michelle SofMedia 1989/12 CD Remember Beatles No.3 Lady Maddonna SofMedia 1990/6 CD -Remember Beatles No.4 Let It Be SofMedia 1990/7 CD -Remember Beatles No.5 The Long and Winding Road SofMedia 1990/8 CD -Remember Beatles No.6 Imagine SofMedia 1990/8 CD Rika Nenpyou CD-ROM Maruzen 1996/1 CD Robin Hood DynEd Japan 1993/12 SET(CD+FD) Rockpaedia Vol. 2: 1961-1970 Toshiba EMI ? CD Round the World in 80 Days DynEd Japan 1993/12 SET(CD+FD) -Royal Blood Koei 1992/5 SET(CD+FD) +* Royal Blood Koei 1992/5 SET(CD+FD) S-DAPS Demo CD [DWDC4922] Data West 1994/? CD Saishin American Idiom Jiten Sanshusha 1990/2 CD Saishin Igaku Daijiten CD-ROM Fujitsu 1990/5 CD Saishin Igaku Daijiten Standard-ban CD-ROM Fujitsu 1993/2 CD -* Sangokushi III Koei 1992/6 SET(CD+FD) Sanseido Word Hunter Multi CD-ROM Jiten Fujitsu 1991/10 CD School Accessory Illust-hen V1.0 Fujitsu 1993/2 CD School Navi Nihon no Rekishi CD: Heian, Kamakura Unitybell 1995/8 CD @@ -466,7 +431,6 @@ Seikatsuka 1-nen: Asobou Mitsukeyou Uchida Youkou 1994/4 CD Seikatsuka 2-nen: Wakuwaku Tanken Uchida Youkou 1994/5 CD Sekai no Ohanashi Gyousei 1992/5 CD -Sexy in the Hawaii: Nice Gal Hawaii Ban Birdy Soft 1994/12 CD Sexy PK 2 World Cup Ban Birdy Soft 1995/6 CD Sexy PK World Cup Ban Birdy Soft 1995/6 CD Shadow of the Beast: Mashou no Okite (1991-10-11) Victor Entertainment 1991/10? CD @@ -502,7 +466,6 @@ Stingo Monogatari ST-4: Stingo Yuuenchi ni Iku Technos Yashima 1995/1 CD Stingo Monogatari ST-5: Stingo no Christmas Technos Yashima 1995/1 CD Stress Toshiba EMI 1989/11 CD -* Suikoden: Tenmei no Chikai Koei 1990/2 SET(CD+FD) Suisai Graphic Art Software NTT Data Tsuushin 1993/8 CD Sunshine 1-nen Uchida Youkou 1993/7 CD Sunshine 2-nen Uchida Youkou 1993/7 CD @@ -511,11 +474,9 @@ Taiken Shiyou! Marty Channel 2 Fujitsu 1993/6 CD×02 Takken Ou Techno Business 1994/10 CD Tamashii no Mon: Dante "Shinkyoku" yori Koei 1993/6 SET(CD+FD) -Tania Tips 1996/11 CD Tankyuu-kun Fujitsu 1996/11 CD Tanoshii Sansuu Set 1-2-nen Dainippon Tosho 1994/3 SET(CD+FD) Teata -vision- (V1.0-1.3) Nanken Koubou 1995/6 SET(CD+FD) -Teitoku no Ketsudan Koei 1990/4 SET(CD+FD) Tender Light Vol. 1 Fujitsu 1994/3 CD Tensai Kyuutei Ongaku no Kanade Fujitsu 1992/12 CD Tenshi-tachi no Gogo 3: Bangai-hen Hanseiban JAST 1993/3 ? @@ -525,21 +486,19 @@ Teo: Mou Hitotsu no Chikyuu Fujitsu Parex 1995/9 SET(CD+FD) Teo: Mou Hitotsu no Chikyuu Ver. 2 Fujitsu Parex 1996/7 CD Tera Towns 2 Nihon Micom Hanbai 1993/4 CD -That's Toukou Birdy Soft 1993/12 CD -The 4th Unit Series: Wyatt (Demo-you Disc) [DWFT2901] Data West 1992/? SET(CD+FD) +* The 4th Unit Series: Wyatt (Demo-you Disc) [DWFT2901] Data West 1992/? SET(CD+FD) The Book of MIDI Fujitsu 1992/9 CD The Lost Secret DynEd Japan 1993/7 SET(CD+FD) The Manhole 2 Sun Denshi 1993/5 ? The Playroom Fujitsu 1995/2 CD The Sea in Your Eyes: Umi wo Mitsumete Inter Limited Logic 1995/4 CD The Yachtman Raison 1989/11 CD -Theme Park Electronic Arts Victor 1995/9 CD Think Read: Chuugaku Series Catena ? SET(CD+FD) Think Read: Shougaku Series Catena ? SET(CD+FD) Total English 1-nen Uchida Youkou 1993/9 CD Total English 2-nen Uchida Youkou 1993/9 CD Touch the Music by Casiopea Fujitsu 1994/3 SET(CD+FD) -Toukyou Genshikai - Tokyo Sexy Ave. HOP 1994/7 SET(CD+FD) +* Toukyou Genshikai - Tokyo Sexy Ave. HOP 1994/7 SET(CD+FD) Towns Amone Kozu System 1990/4 SET(CD+FD) Towns Chiri Shizen no Naritachi Fujitsu Ooita Software Laboratory 1991/9 CD Towns Cruising Chart Raison 1991/4 SET(CD+FD) @@ -576,10 +535,8 @@ Twinkle Star Studio Twinkle 1993/7 CD Ujibushi no Chiiku Game Nihon Keisoku Souchi 1994/4 CD Unmei no Tobira Fujitsu 1992/9 CD -URM: 15 Wakusei ni Umarete Japan Home Video (JHV) 1994/12 CD Ushiro no Shoumen Raison 1991/9 CD Utaimasenka GAM 1995/11 SET(CD+FD) -Vanishing Point: Tenshi no Kieta Machi Tiara 1995/10 CD Vector Moji Pattern 2 Fujitsu 1992/12 IC Video Koubou V1.1 Fujitsu 1992/6 SET(CD+FD) Video Koubou V1.2 Fujitsu 1993/4 CD @@ -604,7 +561,6 @@ Yellows Digital Rogue 1994/12 CD Yoshioka Mayumi: Last Nude Janis 1993/12 CD Youki de Cool na LA Towns Media Art 1990/12 CD -Yumeutsutsu Megami 1992/5 CD Z's Staff Pro Towns Zeit 1991/7 CD --> @@ -1404,6 +1360,24 @@ + + + + The 4th Unit 7 - Wyatt (demo) + 1992 + データウエスト (Data West) + + + + + + + + - + - Air Warrior V1.2 + Air Warrior V1.2L10 1993 富士通 (Fujitsu) + + + + + + @@ -1916,8 +1895,7 @@ - - + Appare CD Vol. 1 - Hiryuu no Maki 1994 - ソフトバンク (Softbank) + ソフトバンク (SoftBank) @@ -2413,7 +2397,7 @@ --> Appare CD Vol. 2 - Houou no Maki 1995 - ソフトバンク (Softbank) + ソフトバンク (SoftBank) @@ -2798,6 +2782,244 @@ + + + Remember Beatles No. 2 - Michelle + 1989 + ソフメディア (SofMedia) + + + + + + + + + + + + Remember Beatles No. 4 - Let It Be + 1990 + ソフメディア (SofMedia) + + + + + + + + + + + + Remember Beatles No. 5 - The Long and Winding Road + 1990 + ソフメディア (SofMedia) + + + + + + + + + + + + Remember Beatles No. 6 - Imagine + 1990 + ソフメディア (SofMedia) + + + + + + + + + + + + Band-kun + 1991 + 光栄 (Koei) + + + + + + + + + + + + + + + + + + Bell's Avenue Vol. 2 1994 シグナワークス (Signa Works) + - + @@ -3001,6 +3262,12 @@ + + + + + + --> Bible Master - Crash of the BlleotRutz 1993 @@ -3014,11 +3281,17 @@ - + + + + + + + @@ -3203,7 +3476,7 @@ --> Blue - Will to Power 1992 - Sofcom + ソフコム (Sofcom) @@ -3516,6 +3789,32 @@ + + + California X Party - Joshi Daisei Himitsu Club + 1994 + エイチオーピー (HOP) + + + + + + + + + + + + + + + + + + Castles II - Bretagne Touitsu Senki / Castles II - Siege & Conquest + 1993 + ビクター音楽産業 (Victor Musical Industries) + + + + + + + + + + + + Collector D + 1993 + ディー・オー (D.O.) + + + + + + + + + + + + Dalk 1993 アリスソフト (AliceSoft) - + @@ -4409,7 +4771,44 @@ - + + + + + + + + Dalk (alt floppy disk) + 1993 + アリスソフト (AliceSoft) + + + + + + + + + + + + @@ -4759,6 +5158,27 @@ + + + + Yumeutsutsu - Dreamy + 1992 + Megami + + + + + + + + + + + + Diamond Players + 1993 + ウルフチーム (WolfTeam) + + + + + + + + + + + + + + + + + + Europa Sensen 1992 @@ -6358,14 +6816,13 @@ - - - + + - + @@ -6962,7 +7419,7 @@ --> FM Towns Hyper CD Demo Futoppara No. 1 1989 - SoftBank + ソフトバンク (SoftBank) @@ -7080,7 +7537,7 @@ --> Free Will: Knight of Argent 1992 - Sofcom + ソフコム (Sofcom) @@ -7764,7 +8221,7 @@ 1996 アリスソフト (AliceSoft) - + @@ -7980,7 +8437,7 @@ --> Genocide Square 1993 - Zoom + ズーム (Zoom) @@ -8330,11 +8787,34 @@ Märchen Toshokan - Grimm Douwa - Akazukin 1989 @@ -8345,7 +8825,7 @@ - + @@ -8688,7 +9168,7 @@ - + @@ -8990,7 +9470,7 @@ @@ -9001,18 +9481,10 @@ - - + @@ -9126,49 +9598,62 @@ Hoshi no Suna Monogatari 2 1992 ディー・オー (D.O.) + - + + Hoshi no Suna Monogatari 3 1995 ディー・オー (D.O.) + - + @@ -9297,6 +9782,39 @@ + + + + Hyper Land - Doubutsu no Sekai + 1993 + ダットジャパン (Datt Japan) + + + + + + + + + + Hyper Planet Shiki Vol. 2 1993 ダットジャパン (Datt Japan) - + - + + + + + + + + + Hyper Note + 1991 + ダットジャパン (Datt Japan) + + + + + @@ -9713,18 +10251,39 @@ - - + + - if 1-2-3 CD Collection - 1996 + if - Invitations from Fantastic Stories + 1993 アクティブ (Active) - - + + + + + + + + + + + + + + + if 1-2-3 CD Collection + 1996 + アクティブ (Active) + + @@ -9733,6 +10292,7 @@ + Igo Doujou - Honkakuha Yose Tsumego Shinan 1989 富士通OA (Fujitsu OA) + + + + + + + + - + @@ -10061,7 +10626,7 @@ + Jinmon Yuugi + 1995 + フェアリーテール (Fairytale) + + + + + + + + + + + + + + + + + + @@ -10568,15 +11173,34 @@ + Kanade V1.1L20 + 1995 + 富士通 (Fujitsu) + + + + + + + + + + + + - Kanade V1.1L10 + Kanade V1.1L10A 1994 富士通 (Fujitsu) - - + + @@ -10607,6 +11231,80 @@ + + + Kazadama Vol. 2 - Masuo per Masuo - Ikeda Masuo Hanga-shuu + 1995 + 富士通 (Fujitsu) + + + + + + + + + + + + + + Kamimura Kei no Sexy Telephone - Pink no Hanayome + 1992 + ピンクエレファント (Pink Elephant) + + + + + + + + + + + + + + Kamimura Kei no Sexy Resort - Momoiro Quiz + 1992 + ピンクエレファント (Pink Elephant) + + + + + + + + + + + King's Bounty - Nusumareta Chitsujo 1994 @@ -10766,7 +11479,7 @@ - + @@ -10916,6 +11629,67 @@ + + + Kouryuuki + 1993 + 光栄 (Koei) + + + + + + + + + + + + + + + + + + + + Kusuriyubi no Kyoukasho + 1996 + アクティブ (Active) + + + + + + + + + + + Kyan Kyan Collection - Daifugouhen 1989 - I-Cell + アイセル (I-Cell) @@ -11967,6 +12741,7 @@ + J. R. R. Tolkien's The Lord of the Rings, Vol. II - The Two Towers 1993 @@ -12389,7 +13183,7 @@ - + @@ -13018,20 +13812,33 @@ Marine Philt 1993 フェアリーテール (Fairytale) - + - + @@ -13363,6 +14170,26 @@ + + + Meisou Toshi + 1995 + ティアラ (Tiara) + + + + + + + + + + + Mirrors 1992 - Apros + アプロス (Apros) @@ -13742,6 +14569,42 @@ + + + Moonlight Energy + 1992 + インターハート (Inter Heart) + + + + + + + + + + + Morita Shougi II 1989 エニックス (Enix) + - + @@ -14209,42 +15071,51 @@ Mr. Ed Bogas' Music Machine Lite 1993 富士通 (Fujitsu) - + - + Musium Towns 1993 ビクター音楽産業 (Victor Musical Industries) - + - + @@ -14868,6 +15739,7 @@ NHK Jissen Eikaiwa (HMC-120A) 1991 CRC総合研究所 (CRC Sougou Kenkyuusho) + @@ -14887,6 +15759,7 @@ NHK Jissen Eikaiwa (HMC-120) 1991 CRC総合研究所 (CRC Sougou Kenkyuusho) + @@ -15318,7 +16191,7 @@ --> Nijiiro Denshoku Musume 1994 - ISC + アイエスシー (ISC) @@ -15371,11 +16244,24 @@ Nobunaga no Yabou - Bushou Fuuunroku 1991 @@ -15385,14 +16271,13 @@ - - + @@ -15456,12 +16341,24 @@ - Nobunaga no Yabou - Tenshouki 1995 @@ -15477,7 +16374,7 @@ - + @@ -15599,6 +16496,51 @@ + + + Nostalgia 1907 - In North Atlantic Sea + 1992 + シュールド・ウェーブ (Sur Dé Wave) + + + + + + + + + + + + + + + + + Okiraku TownsGEAR 1994 - Softbank + ソフトバンク (SoftBank) @@ -15724,6 +16666,112 @@ + + + Obaachan no Chiebukuro + 1991 + ぎょうせい (Gyousei) + + + + + + + + + + + + Palamedes + 1991 + ビング (Ving) + + + + + + + + + + + + Kikou Shidan - Panzer Division II + 1993 + アートディンク (Artdink) + + + + + + + + + + + + + + + + + - Pegasus (Rev C) + Pegasus V1.1 L10C 1995 富士通 (Fujitsu) @@ -16291,7 +17406,7 @@ --> - Pegasus (Rev A) + Pegasus V1.1 L10A 1995 富士通 (Fujitsu) @@ -16303,6 +17418,40 @@ + + + + Planet Harmony + 1993 + ダットジャパン (Datt Japan) + + + + + + + + + Presence 1992 - シュールド・ウェーブ (Sur De Wave) + シュールド・ウェーブ (Sur Dé Wave) @@ -16757,7 +17905,7 @@ --> Provvidenza - Legenda la Spada di Alfa 1991 - Sofcom + ソフコム (Sofcom) @@ -16769,6 +17917,46 @@ + + + Private Slave + 1993 + ラクーン (Raccoon) + + + + + + + + + + + + + + + + + + + + Psychic Detective Series Vol. 1 - Invitation (DCCS remake) + 1993 + データウエスト (Data West) + + + + + + + + + + + + + + + + + + + Psychic Detective Series Vol. 4 - Orgel (DCCS remake) + 1994 + データウエスト (Data West) + + + + + + + + + + + + + + + + Puzznic 1990 @@ -17170,7 +18427,7 @@ - + @@ -17361,13 +18618,18 @@ - Railroad Tycoon + Sid Meier's Railroad Tycoon 1993 マイクロプローズジャパン (MicroProse Japan) @@ -17380,7 +18642,7 @@ - + @@ -17669,6 +18931,40 @@ + + + Reijou Monogatari + 1995 + インターハート (Inter Heart) + + + + + + + + + + + Rejection - Den-no Senshi 1992 - シュールド・ウェーブ (Sur De Wave) + シュールド・ウェーブ (Sur Dé Wave) @@ -17697,21 +18993,45 @@ Return to Zork 1994 データウエスト (Data West) + - + @@ -17792,6 +19112,41 @@ + + + Royal Blood + 1992 + 光栄 (Koei) + + + + + + + + + + + + + + + + Sakura no Mori 1995 アクティブ (Active) + - + @@ -18293,6 +19648,26 @@ + + + Sexy in the Hawaii - Nice Gal Hawaii-hen + 1994 + バーディーソフト (Birdy Soft) + + + + + + + + + + + Shinc 1993 @@ -18453,7 +19826,7 @@ - + @@ -18922,7 +20295,6 @@ --> Sotsugyou '93 - Graduation (newer floppy disk) - 1993 JHV @@ -19880,11 +21252,17 @@ Star Cruiser II - The Odysseus Project 1994 @@ -19893,14 +21271,14 @@ - + - + - + @@ -20012,12 +21390,19 @@ - - + Suikoden - Tenmei no Chikai 1990 @@ -20025,9 +21410,14 @@ + + + + + - + @@ -20103,7 +21493,7 @@ + + + Tania + 1996 + チップス (Tips) + + + + + + + + + + + Tanjou - Debut 1994 @@ -20212,7 +21627,7 @@ - + @@ -20292,9 +21707,41 @@ + + + Teitoku no Ketsudan + 1990 + 光栄 (Koei) + + + + + + + + + + + + + + + + Theme Park + 1995 + エレクトロニック・アーツ・ビクター (Electronic Arts Victor) + + + + + + + + + + + + The Queen of Duellist (HME-166) 1993 @@ -20917,7 +22394,7 @@ - + @@ -21005,6 +22482,32 @@ + + + Tokyo Sexy Ave. - Tokyo Genshi Machi + 1994 + エイチオーピー (HOP) + + + + + + + + + + + + + + + + + + That's Toukou Part 1 + 1993 + バーディーソフト (Birdy Soft) + + + + + + + + + + That's Toukou Part 2 - 1994? + 1994 バーディーソフト (Birdy Soft) - + + @@ -21066,9 +22590,9 @@ --> That's Toukou - Natsu no Daitokushuu - 1994? + 1994 バーディーソフト (Birdy Soft) - + @@ -21601,6 +23125,26 @@ + + + URM - M15 Wakusei ni Umarete + 1994 + JHV + + + + + + + + + + + Uwaki na Anata - Switch wo Irete 1994 - HOP + エイチオーピー (HOP) @@ -21757,6 +23301,26 @@ + + + Vanishing Point - Tenshi no Kieta Machi + 1995 + ティアラ (Tiara) + + + + + + + + + + + @@ -21899,6 +23463,13 @@ + + + + + + + @@ -22162,19 +23733,19 @@ Wing Commander Armada 1995 エレクトロニック・アーツ・ビクター (Electronic Arts Victor) - + - + @@ -22938,6 +24509,58 @@ + + + + + CD-ROM Bishoujo Senshi Collection - Yuu Disc Special + 1996 + ディー・オー (D.O.) + + + + + + + + + + + + International Soccer Challenge (Virtual Reality Vol. 1 compilation) + 1990 + Elite + + + + + + + + + + + + + Italy '90 Soccer 1989 @@ -14244,7 +14327,7 @@ - Xenon 2: Megablast (Power Pack Compilation) + Xenon 2: Megablast (Power Pack compilation) 1990 Beau Jolly - Mirrorsoft diff -Nru mame-0.230+dfsg.1/hash/ibm5170.xml mame-0.231+dfsg.1/hash/ibm5170.xml --- mame-0.230+dfsg.1/hash/ibm5170.xml 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/hash/ibm5170.xml 2021-04-27 15:32:05.000000000 +0000 @@ -5202,8 +5202,8 @@ - + CD-ROM God Boot Disk Version 5.5 BETA2 1998 Kristopher Marciniak @@ -5816,6 +5816,21 @@ + + + + + SmartBoard Driver (DOS) + 1995 + Tasc + + + + + + + + SN-3200 PCI Ethernet Adapter Driver (Jun 15 1998) 1999 @@ -8386,6 +8401,20 @@ + + + + SmartBoard Driver SDK (Win32) + 1998 + Tasc + + + + + + + + Windows 1.03 SDK 1986 @@ -10183,6 +10212,127 @@ + + Darklands (3.5") + 1992 + MicroProse + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Darklands (5.25") + 1992 + MicroProse + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Dark Seed 1992 @@ -10380,11 +10530,39 @@ - DOOM (1.2) - 1993 + DOOM (v1.666) + 1994 GT Interactive - + + + + + + + + + + + + + + + + + + + + + + + + + DOOM (v1.2) + 1994 + GT Interactive + + @@ -10408,11 +10586,11 @@ - DOOM (1.1) + DOOM (v1.1) 1993 GT Interactive - + @@ -10435,12 +10613,13 @@ + - DOOM (1.2, Shareware for BBS SysOps) + DOOM (v1.2, shareware for BBS SysOps) 1994 Sybex - + @@ -10459,12 +10638,12 @@ - - DOOM (1.25, Shareware) + + DOOM (v1.25, shareware, companion disk of "The Official DOOM Survivor's Strategies & Secrets" book) 1994 Sybex - + @@ -10477,20 +10656,39 @@ + - DOOM (1.1, Shareware) - 1993 + DOOM (v1.1, shareware) + 1994 Micro Star + + + + + + + + + + + + + + + DOOM (v1.2, shareware, Titanium Seal release) + 1994 + SoftKey + - + - + @@ -12349,6 +12547,43 @@ + + Inherit the Earth: Quest for the Orb + 1994 + New World Computing + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Innocent Until Caught 1993 @@ -15780,6 +16015,24 @@ + + + Stronghold + 1993 + SSI + + + + + + + + + + + + + Subwar 2050 - The Underwater Combat Simulation diff -Nru mame-0.230+dfsg.1/hash/ibmpcjr_cart.xml mame-0.231+dfsg.1/hash/ibmpcjr_cart.xml --- mame-0.230+dfsg.1/hash/ibmpcjr_cart.xml 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/hash/ibmpcjr_cart.xml 2021-04-27 15:32:05.000000000 +0000 @@ -44,7 +44,7 @@ included. Since the computer only has one floppy, you need to use MAME's File Manager to switch disks as needed. Please note that most actions take quite a while to happen. -Start the emulation with >mame64 ibmpcjr lotus123 +Start the emulation with >mame ibmpcjr lotus123 Wait for the floppy to boot, and answer the questions about date and time. The carts add 3 new internal commands: * TUTOR - to use the tutorial, select the Tutorial disk, then type in TUTOR. After a while it will start up. * 123 - this is the direct way to use the Lotus 1-2-3 spreadsheet program. To quit, press /QY . diff -Nru mame-0.230+dfsg.1/hash/leapfrog_ltleappad_cart.xml mame-0.231+dfsg.1/hash/leapfrog_ltleappad_cart.xml --- mame-0.230+dfsg.1/hash/leapfrog_ltleappad_cart.xml 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/hash/leapfrog_ltleappad_cart.xml 2021-04-27 15:32:05.000000000 +0000 @@ -5,6 +5,38 @@ --> + + + Tierbabys (Germany) + 2004 + LeapFrog + + + + + + + + + + + + + + + + + + + + + + + + + + + Baby's First Words (USA) 2003 @@ -35,6 +67,37 @@ + + Disney Puuh mag dich! (Germany) + 2004 + LeapFrog + + + + + + + + + + + + + + + + + + + + + + + + + + + If I were... (USA) 2003 @@ -49,5 +112,36 @@ + + + Was wäre, wenn ...? (Germany) + 2003 + LeapFrog + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru mame-0.230+dfsg.1/hash/megadriv.xml mame-0.231+dfsg.1/hash/megadriv.xml --- mame-0.230+dfsg.1/hash/megadriv.xml 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/hash/megadriv.xml 2021-04-27 15:32:05.000000000 +0000 @@ -2102,7 +2102,7 @@ Double Clutch (Euro) - 1992 + 1993 Sega @@ -3707,7 +3707,7 @@ Hook (Euro) - 1992 + 1993 Sony Imagesoft @@ -4663,7 +4663,7 @@ The Lost Vikings (Euro) - 1993 + 1994 Interplay @@ -5338,7 +5338,7 @@ NBA All-Star Challenge (Euro, USA) - 1992 + 1993 Flying Edge @@ -6479,7 +6479,7 @@ Prince of Persia (Euro) - 1993 + 1994 Domark @@ -7062,7 +7062,7 @@ Sensible Soccer - International Edition (Euro) - 1993 + 1994 Sony Imagesoft @@ -7682,7 +7682,7 @@ Stimpy's Invention Starring Starring Ren Hoëk & Stimpy (Euro) - 1993 + 1994 Sega @@ -8036,7 +8036,7 @@ Super Kick Off (Euro) - 1992 + 1993 U.S. Gold @@ -12477,7 +12477,7 @@ The Chaos Engine (Euro) - 1992 + 1994 Microprose @@ -15486,7 +15486,7 @@ Fantastic Dizzy (Euro, USA) - 1991 + 1993 Codemasters @@ -16795,7 +16795,7 @@ Hook (USA) - 1992 + 1993 Sony Imagesoft @@ -17146,6 +17146,20 @@ + + Futbol Argentino 96 (Argentina) (hack of J. League Pro Striker 2) + 1996 + bootleg + + + + + + + + + + Pro Striker Final Stage (Jpn) 1995 @@ -18303,7 +18317,7 @@ The Lost Vikings (USA) - 1992 + 1994 Interplay @@ -18313,7 +18327,7 @@ - Lotus II (Euro, USA) + Lotus II: RECS (Euro, USA) 1993 Electronic Arts @@ -22449,7 +22463,7 @@ Prince of Persia (USA) - 1993 + 1994 Tengen @@ -31492,8 +31506,9 @@ + - Truco '96 (Arg) + Truco '96 (Argentina, unprotected) 1996 Miky @@ -31503,9 +31518,23 @@ - + + Truco '96 (Argentina, protected) + 1996 + Miky + + + + + + + + + + + - TC 2000 (Arg) + TC 2000 (Argentina, unprotected) 199? <unlicensed> @@ -31514,6 +31543,19 @@ + + + TC 2000 (Argentina, protected) + 199? + <unlicensed> + + + + + + + + Ultimate Soccer (Euro, Prototype) diff -Nru mame-0.230+dfsg.1/hash/microvision.xml mame-0.231+dfsg.1/hash/microvision.xml --- mame-0.230+dfsg.1/hash/microvision.xml 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/hash/microvision.xml 2021-04-27 15:32:05.000000000 +0000 @@ -27,6 +27,7 @@ The "pla" feature is for TMS1100 output PLA type The "paddle" feature is used to indicate if paddle circuitry exists on the PCB The "butmask" feature indicates cartridge button restrict mask (active-low) + --> diff -Nru mame-0.230+dfsg.1/hash/msx2_flop.xml mame-0.231+dfsg.1/hash/msx2_flop.xml --- mame-0.230+dfsg.1/hash/msx2_flop.xml 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/hash/msx2_flop.xml 2021-04-27 15:32:05.000000000 +0000 @@ -3906,28 +3906,6 @@ - - Dragon Slayer IV - Drasle Family (Jpn) - 1987 - Falcom - - - - - - - - - Dragon Slayer IV - Drasle Family (Jpn, Alt) - 1987 - Falcom - - - - - - - Dragon Slayer - Eiyuu Densetsu (Jpn) 1990 @@ -16771,8 +16749,6 @@ --> - - Goody (Spa) 19?? @@ -16839,8 +16815,6 @@ --> - - 1942 (Jpn) 19?? @@ -17280,6 +17254,28 @@ + + + Dragon Slayer IV - Drasle Family (Jpn) + 19?? + <cart2disk hack> + + + + + + + + + Dragon Slayer IV - Drasle Family (Jpn, Alt) + 19?? + <cart2disk hack> + + + + + + Dynamite Bowl (Jpn) diff -Nru mame-0.230+dfsg.1/hash/pc98_cd.xml mame-0.231+dfsg.1/hash/pc98_cd.xml --- mame-0.230+dfsg.1/hash/pc98_cd.xml 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/hash/pc98_cd.xml 2021-04-27 15:32:05.000000000 +0000 @@ -620,72 +620,99 @@ - + - Alice no Yakata III + Alice no Yakata 3 (1995-06-19) 1995 アリスソフト (AliceSoft) - + + - + + + + + + + + + Alice no Yakata 3 (1995-05-16) + 1995 + アリスソフト (AliceSoft) + + + + + + + + Origin: redump.org (CD) / Neo Kobe Collection (floppy) + + + + + + + + + + + + + --> Angel 1993 カクテル・ソフト (Cocktail Soft) + + - + - + Angel Halo 1996 アクティブ (Active) + + - + @@ -782,28 +809,108 @@ + + + + Bell's Avenue Vol. 1 + 1993 + シグナワークス (Signa Works) + + + + + + + + + + + + + + Bell's Avenue Vol. 2 + 1994 + シグナワークス (Signa Works) + + + + + + + + + + + + + Bell's Avenue Vol. 3 + 1995 + シグナワークス (Signa Works) + + + + + + + + + + Ballade for Maria 1995 フェアリーテール (Fairytale) + + - + @@ -1283,43 +1390,59 @@ - + - De.FaNa - Full Animation Adventure Series #2 + De.FaNa 1995 姫屋ソフト (Himeya Soft) + + - + - + Desire - Haitoku no Rasen 1994 シーズウェア (C's Ware) + - + @@ -1381,40 +1504,31 @@ - - - - D.O. Kanshuu Premium Box - Touch My Heart - 1995 - ディー・オー (D.O.) - - - - - - - - - + - Doki Doki Disk CD-ban Dai-1-kan: Club D.O. Jimukyoku + Doki Doki Disk CD-ban Dai-1-kan - Club D.O. Jimukyoku 1994 ディー・オー (D.O.) + + - + @@ -1476,21 +1590,26 @@ - + D.P.S. Zenbu 1995 アリスソフト (AliceSoft) + + - + @@ -1841,11 +1960,35 @@ Emit Vol. 1 - Toki no Maigo 1994 @@ -1857,15 +2000,9 @@ - - - - - - - + @@ -1978,7 +2115,9 @@ - + + + + + + Gakuen Bakuretsu Tenkousei! + 1996 + ジックス (ZyX) + + + + + + + + + + + Hana no Kioku 1995 フォスター (Foster) + + - + + + + + + + + + Hana no Kioku - Dainishou + 1997 + フォスター (Foster) + + + + + + @@ -2378,6 +2576,37 @@ + + + + Running Girls - Hashiri Onna II + Rance 4.1 / 4.2 Hint Disk + 1995 + アリスソフト (AliceSoft) + + + + + + + + + + + + + if 1-2-3 CD Collection + 1996 + アクティブ (Active) + + + + + + + + + Innocent Tour 1995 ケイエスエス (KSS) + - + @@ -2524,6 +2773,26 @@ + + + + Kousoku Choujin + 1996 + フォスター (Foster) + + + + + + + + + + + Koko wa Rakuensou 1996 フォスター (Foster) + + - + - + Koko wa Rakuensou 2 1996 フォスター (Foster) + + - + + Kusuriyubi no Kyoukasho 1996 アクティブ (Active) + + - + @@ -2788,11 +3060,12 @@ + Golf Links 386 Pro 1995 @@ -2807,7 +3080,7 @@ - + Menzoberranzan - Yami no Monshou 1995 ケイエスエス (KSS) + - + @@ -3097,6 +3374,116 @@ + + + + Mahjong Gensoukyoku II - Mahjong Fantasia + 1993 + アクティブ (Active) + + + + + + + + + + + + + + Mahjong Gensoukyoku III - Mahjong Fantasia the 3rd Stage + 1995 + アクティブ (Active) + + + + + + + + + + + + + + Misato-chan no Yume Nikki + 1997 + アクティブ (Active) + + + + + + + + + + + Mugen Houyou 1995 アリスソフト (AliceSoft) + + - + @@ -3305,12 +3700,29 @@ Necronomicon 1994 @@ -3318,13 +3730,34 @@ + - + + + + + + + + + Never Land + 1996 + チップス (Tips) + + + + + + @@ -3350,24 +3783,59 @@ - + Only You - Seikimatsu no Juliet-tachi - 1995 + 1996 アリスソフト (AliceSoft) + - + - + @@ -3470,7 +3938,9 @@ - + + + + Ikazuchi no Senshi Raidy 1994 ジックス (ZyX) + + + - + - + + Ikazuchi no Senshi Raidy 2 (1996-08-01) + 1996 + ジックス (ZyX) + + + + + + + + + + + + - Ikazuchi no Senshi Raidy 2 + Ikazuchi no Senshi Raidy 2 (1996-03-11) 1996 ジックス (ZyX) + + @@ -3806,25 +4319,6 @@ - - - Rance 4.1 / 4.2 Hint Disk - 1995 - アリスソフト (AliceSoft) - - - - - - - - + Ring Out!! 1995 ジックス (ZyX) + + - + - + Rinkan Gakkou - 1995 + 1996 フォスター (Foster) + + - + @@ -4217,23 +4726,22 @@ + Sayonara no Mukougawa 1997 フォスター (Foster) + - + @@ -4473,6 +4981,24 @@ + + + + Special & Delicious! Original CD-ROM + 1995 + 大洋図書 (Taiyou Tosho) + + + + + + + + + + + + Time Stripper Mako-chan + 1996 + フォスター (Foster) + + + + + + + + + + - + - Toushin Toshi II + Toushin Toshi II (1996-06-26) 1995 アリスソフト (AliceSoft) @@ -4725,23 +5272,154 @@ + + + Toushin Toshi II (1995-04-26) + 1995 + アリスソフト (AliceSoft) + + + + + + + + + + + Toushin Toshi II - Soshite, Sorekara... 1995 アリスソフト (AliceSoft) + - + + + + + + + + + Touch My Heart + 1995 + ディー・オー (D.O.) + + + + + + + + + + + + + Trigger 2 + 1995 + ジックス (ZyX) + + + + + + @@ -4830,12 +5508,29 @@ Viper CTR - Asuka 1997 @@ -4844,7 +5539,7 @@ - + @@ -4929,22 +5624,24 @@ - + Xenon - Mugen no Shitai 1995 シーズウェア (C's Ware) + + - + @@ -5133,21 +5830,35 @@ - + Zatsuon Ryouiki 1995 ディー・オー (D.O.) + + - + diff -Nru mame-0.230+dfsg.1/hash/pc98.xml mame-0.231+dfsg.1/hash/pc98.xml --- mame-0.230+dfsg.1/hash/pc98.xml 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/hash/pc98.xml 2021-04-27 15:32:05.000000000 +0000 @@ -97,9 +97,9 @@ - MS-DOS 3.3 - 19?? - <unknown> + MS-DOS 3.30D + 1991 + NEC / Microsoft @@ -152,8 +152,8 @@ MS-DOS 5.0A - 19?? - <unknown> + 1992 + NEC / Microsoft @@ -230,8 +230,8 @@ MS-DOS 6.2 - 19?? - <unknown> + 1994 + NEC / Microsoft @@ -394,10 +394,14 @@ - + + + Windows 2.11 - 19?? - <unknown> + 1989 + NEC / Microsoft + + @@ -574,10 +578,14 @@ - + + + + Windows 3.1 199? Microsoft? + @@ -808,11 +816,12 @@ - - - Turbo C++ + + + Turbo C++ (v1.01) 1990 Borland + @@ -1532,10 +1541,10 @@ - - MS-DOS 3.3D - 19?? - <unknown> + + MS-DOS 3.30D (Alt) + 1991 + NEC / Microsoft @@ -2255,7 +2264,8 @@ - + + 46 Okunen Monogatari - The Shinkaron 1990 エニックス (Enix) @@ -2320,12 +2330,14 @@ - - 4D Boxing + + + 4D Boxing (v1.1) 1993 エレクトロニック・アーツ・ビクター (Electronic Arts Victor) + @@ -3300,7 +3312,9 @@ - + + + Agumix Selects! - Agumix Select Tokusen Graphic Shuu 1992 アグミックス (Agumix) @@ -3792,6 +3806,7 @@ + Aki to Tsukasa no Fushigi no Kabe 1988 @@ -3987,11 +4002,16 @@ - + + + + Alice no Yakata 1990 アリスソフト (AliceSoft) + + @@ -4622,7 +4642,9 @@ - + + + Animahjong V3 1993 ソニア (Sogna) @@ -4753,12 +4775,14 @@ - + + Anniversary - Memories of Summer Vacation - Natsuyasumi no Omoide 1993 ジャニス (Janis) + @@ -4798,12 +4822,14 @@ - + + Another Genesis 1990 ソフトプラン (Soft Plan) + @@ -4844,7 +4870,8 @@ - + + Aoki Ookami to Shiroki Mejika - Genghis Khan 1987 光栄 (Koei) @@ -4933,7 +4960,12 @@ - + + + + + + Apple Club 1 - Kinjirareta Asobi Series 1988 フェアリーテール (Fairytale) @@ -5144,7 +5176,8 @@ - + + Arcshu - Kagerou no Jidai o Koete 1990 ウルフチーム (WolfTeam) @@ -5157,7 +5190,8 @@ - + + Arctic 1988 アートディンク (Artdink) @@ -5183,7 +5217,8 @@ - + + Arcus II - Silent Symphony 1990 @@ -5440,6 +5475,7 @@ + Arquelphos 1993 @@ -5478,7 +5514,9 @@ - + + + Art Jigsaw - Vol. 1 Super Weapons 1992 システムソフト (SystemSoft) @@ -5491,7 +5529,9 @@ - + + + Art Jigsaw - Vol. 2 Pretty Girls 1992 システムソフト (SystemSoft) @@ -5511,7 +5551,10 @@ - + + + + Art Jigsaw - Vol. 3 Fantastic 1992 システムソフト (SystemSoft) @@ -5639,7 +5682,8 @@ - + + Asoko no Koufuku - Yamamoto-san-chi no Baai ni Okeru Asoko no Fukou ni Tsuite 1989 Zeit (ツァイト) @@ -5704,7 +5748,8 @@ - + + Atlantia 1994 ジャパンホームビデオ (Japan Home Video) @@ -5913,7 +5958,7 @@ - + Azusa 108 Jimusho 1988 @@ -5965,7 +6010,8 @@ - + + Bacta 2 1994 姫屋ソフト (Himeya Soft) @@ -6041,12 +6087,16 @@ - + + + Balance of Power - Geopolitics in the Nuclear Age 1988 アスキー (ASCII) + + @@ -6061,12 +6111,15 @@ - + + + Balance of Power - Geopolitics in the Nuclear Age (Alt Disk 1) 1988 アスキー (ASCII) + @@ -6165,7 +6218,8 @@ - + + Band-kun - Sound Entertainment 1990 光栄 (Koei) @@ -6365,7 +6419,8 @@ - + + Battle Skin Panic 9821 1993 ガイナックス (Gainax) @@ -6434,7 +6489,8 @@ - + + BattleTech - Ubawareta Seihai 1993 ビクター音楽産業 (Victor Musical Industries) @@ -6460,7 +6516,8 @@ - + + Bay City Elegy 1994 カクテル・ソフト FMC (Cocktail Soft FMC) @@ -6577,7 +6634,7 @@ - + Beast - Injuu no Yakata 1990 @@ -6604,7 +6661,8 @@ - + + Beast 2 - Incubuster 1991 バーディーソフト (Birdy Soft) @@ -6702,7 +6760,8 @@ - + + Bell's Avenue 1993 ウェンディマガジン (Wendy Magazine) @@ -6900,7 +6959,8 @@ - + + Bible Master 2 - The Chaos of Aglia 1994 グローディア (Glodia) @@ -6991,7 +7051,8 @@ - + + Birdy World 1991 バーディーソフト (Birdy Soft) @@ -7056,11 +7117,14 @@ - + + + Bishoujo Audition - Idol o Sagase! 1993 サンタ・フェ (Santa Fe) + @@ -7108,7 +7172,9 @@ - + + + Bishoujo Hunter ZX 1993 ボンびいボンボン! (Bonbee Bonbon!) @@ -7220,7 +7286,9 @@ - + + + Bishoujo Tsuushin - Chat no Susume 1992 カクテル・ソフト (Cocktail Soft) @@ -7535,7 +7603,7 @@ - + Block Out (Patched?) 1991 @@ -7687,7 +7755,8 @@ - + + Bokosuka Wars 1985 アスキー (ASCII) @@ -9291,13 +9360,14 @@ - - + + The Castle and Princess. 1985 アスキー (ASCII) + @@ -9413,6 +9483,7 @@ + Centurion - Defender of Rome @@ -9432,7 +9503,8 @@ - + + Centurion - Defender of Rome (Alt) @@ -9479,6 +9551,7 @@ + Champions of Krynn 1992 @@ -9824,7 +9897,8 @@ - + + Chikyuu Bouei Gun II - The Earth Self Defense Force - Far Side Moon 1989 アートディンク (Artdink) @@ -13324,13 +13398,14 @@ - - + + Deflektor 1991 B·P·S (Bullet-Proof Software) + @@ -13681,8 +13756,8 @@ - - + + Dennou Garou 1993 @@ -13940,7 +14015,8 @@ - + + Desert Dragoon - Sabaku no Ryuukihei @@ -13948,6 +14024,7 @@ ジャパンホームビデオ (Japan Home Video) + @@ -15234,7 +15311,8 @@ 1992 総合ビジネスアシスト (ABA) - + + @@ -17122,7 +17200,8 @@ - + + Dungeon Conquest 1993 アスキー (ASCII) @@ -17359,7 +17438,10 @@ - + + + + Ecology Magic 1992 ジーエーエム (GAM) @@ -17379,7 +17461,9 @@ - + + + Edge 1993 @@ -19370,13 +19454,14 @@ - + Finish Hold 2 - Tag 1996 システムソフト (SystemSoft) - + + @@ -20847,12 +20932,17 @@ - + + + + Gals Talk Hyper Bingo 1992 総合ビジネスアシスト (ABA) + + @@ -22983,7 +23073,8 @@ - + + Hayate - The Battle - Hyper Real Battle Action 1994 アルテシア (Altacia) @@ -23053,7 +23144,8 @@ - + + Heater Powerful 1993 アンビシャス (Ambitious) @@ -23073,11 +23165,13 @@ - + + HedgehoG 1996 電脳山城組 / コムレイドシステム (Dennou Yamashiro-gumi / Comrade System) + @@ -23104,7 +23198,8 @@ - + + Headquarters - America no Akumu 1994 アルゴラボ 算法研究所 (Algolab) @@ -23304,7 +23399,8 @@ - + + Hercequary 1994 ジックス (ZyX) @@ -24228,8 +24324,9 @@ - - The Incredible Machine + + + The Incredible Machine (v1.00) 1994 サイベル (Cybelle) @@ -24740,7 +24837,8 @@ - + + Jangou 2 - Kouchinou Ban 1989 ビクター音楽産業 (Victor Musical Industries) @@ -25561,12 +25659,14 @@ + Karateka 1988 ブロダーバンドジャパン (Brøderbund Japan) + @@ -26092,15 +26192,17 @@ - + + King's Dungeon - The Story of Heroes 1992 ソフトプラン (Soft Plan) + - + @@ -28104,7 +28206,9 @@ - + + + Lovely Horror - Ochame na Yuurei 1988 全流通 (Zenryutsu) @@ -28232,7 +28336,8 @@ - + + Madou Monogatari 1 1991 コンパイル (Compile) @@ -28252,7 +28357,8 @@ - + + Madou Monogatari 2 1991 コンパイル (Compile) @@ -30226,8 +30332,9 @@ - - Metal Orange + + + Cyber Block Metal Orange 1991 カスタム (Custom) @@ -34041,12 +34148,15 @@ - + + Pick Up Mahjong Master 1994 アレックス (Allex) + + @@ -34067,12 +34177,17 @@ - + + + + Pick Up Yadokari Eisei Housoukyoku 1 1994 アレックス (Allex) + + @@ -34913,13 +35028,15 @@ - - + + Policenauts 1994 コナミ (Konami) + + @@ -35568,12 +35685,15 @@ - + + + Prince of Persia 1990 ブロダーバンドジャパン (Brøderbund Japan) + @@ -35587,6 +35707,7 @@ ブロダーバンドジャパン (Brøderbund Japan) + @@ -35607,6 +35728,7 @@ ブロダーバンドジャパン (Brøderbund Japan) + @@ -35653,7 +35775,8 @@ - + + Princess Maker 2 1993 ガイナックス (Gainax) @@ -36218,7 +36341,8 @@ - + + Puyo Puyo 1993 コンパイル (Compile) @@ -36271,7 +36395,10 @@ - + + + + Quarth 1990 コナミ (Konami) @@ -37775,7 +37902,8 @@ - + + Rogue 1986 アスキー (ASCII) @@ -38033,12 +38161,15 @@ + + Rusty 1993 シーラボ (C-lab) + @@ -40434,7 +40565,8 @@ - + + Sorcerian 1988 日本ファルコム (Nihon Falcom) @@ -41143,7 +41275,8 @@ - + + Street Mahjong 2 1996 ブラッキー (Blucky) @@ -42854,13 +42987,14 @@ - + + Tekkou Kikan Atragon 1995 ムービック (Movic) - + @@ -43635,13 +43769,14 @@ - - + + Tetris 2 + Bombliss 1994 B·P·S (Bullet-Proof Software) + @@ -43864,7 +43999,8 @@ - + + Tokio - Tokyo-to Dai 24 Ku 1992 アートディンク (Artdink) @@ -44720,7 +44856,8 @@ - + + Twilight Zone III - Nagakute Amai Yoru 1989 グレイト (Great) @@ -49856,7 +49993,7 @@ - + Chou·Baku 1993 @@ -49927,8 +50064,10 @@ - + + Clipper - Takepon no Ochimono Puzzle + 19?? <unknown> @@ -49938,7 +50077,8 @@ - + + Computer Aided Economics 19?? <unknown> @@ -50605,7 +50745,8 @@ - + + F-1 Databox (Demo) 1990 リード・レックス (Reed Rex) @@ -52878,6 +53019,7 @@ + Mezase! Top Player - Tennis Tennis 2 1993 @@ -54805,7 +54947,8 @@ - + + Tennis Tennis 1992 日本ソフテック (Nihon Softec) @@ -57767,6 +57910,7 @@ + Elle @@ -61659,7 +61803,8 @@ - + + Ranma½ - Hiryuu Densetsu 1991 ボーステック (Bothtec) @@ -67671,7 +67816,8 @@ - + + Pentium 19?? <doujin> @@ -68223,10 +68369,13 @@ - + + Tokimeki Girls - 19?? + + 1994 <doujin> + @@ -68234,8 +68383,9 @@ - - Tono-sama VS Satan + + + Tono-sama VS Satan (v1.0) 1995 <doujin> @@ -68933,8 +69083,10 @@ - - + + + + Runner's High 1996 コンパイル (Compile) @@ -68945,7 +69097,8 @@ - + + TransbOrder 1993 コンパイル (Compile) diff -Nru mame-0.230+dfsg.1/hash/pet_rom.xml mame-0.231+dfsg.1/hash/pet_rom.xml --- mame-0.230+dfsg.1/hash/pet_rom.xml 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/hash/pet_rom.xml 2021-04-27 15:32:05.000000000 +0000 @@ -320,7 +320,7 @@ + + + + Karao Kids Songs 1 (Spain) + 200? + Taikee / Imaginarium / ItsMagical + + + + + + + + + Karao Kids Songs 2 (Spain) + 200? + Taikee / Imaginarium / ItsMagical + + + + + + + + + Original Karaoke + 200? + Taikee + + + + + + + + diff -Nru mame-0.230+dfsg.1/hash/sms.xml mame-0.231+dfsg.1/hash/sms.xml --- mame-0.230+dfsg.1/hash/sms.xml 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/hash/sms.xml 2021-04-27 15:32:05.000000000 +0000 @@ -7963,8 +7963,8 @@ kblink device, that simulates the function of the cable link. Example for a localhost (127.0.0.1) connection: - mame64 -window sg1000m3 -card f16falcjc -sgexp sk1100 -sgexp:sk1100:printer kblink -bitb socket.127.0.0.1:2345 - mame64 -window sg1000m3 -card f16falcjc -sgexp sk1100 -sgexp:sk1100:printer kblink -bitb socket.127.0.0.1:2345 + mame -window sg1000m3 -card f16falcjc -sgexp sk1100 -sgexp:sk1100:printer kblink -bitb socket.127.0.0.1:2345 + mame -window sg1000m3 -card f16falcjc -sgexp sk1100 -sgexp:sk1100:printer kblink -bitb socket.127.0.0.1:2345 After run both instances, press the CR key on the keyboard when the title screen is displayed. Next, when asked which player diff -Nru mame-0.230+dfsg.1/hash/spectrum_cass.xml mame-0.231+dfsg.1/hash/spectrum_cass.xml --- mame-0.230+dfsg.1/hash/spectrum_cass.xml 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/hash/spectrum_cass.xml 2021-04-27 15:32:05.000000000 +0000 @@ -76,7 +76,7 @@ 1942 1986 - Elite Systems Ltd + Elite Systems @@ -87,7 +87,7 @@ 1942 (Encore) 1986 - Elite Systems Ltd / Encore + Elite Systems / Encore @@ -98,7 +98,7 @@ 1942 (EDOS) 1986 - Elite Systems Ltd / EDOS + Elite Systems / EDOS @@ -106,8 +106,6 @@ - - 1943 1988 @@ -160,7 +158,7 @@ 3D Tanx 1982 - DK'Tronics Ltd + DK'Tronics @@ -171,7 +169,7 @@ 3D Tanx (Prism) 1982 - DK'Tronics Ltd / Prism + DK'Tronics / Prism @@ -499,7 +497,7 @@ Ant Attack 1983 - Quicksilva Ltd + Quicksilva @@ -510,7 +508,7 @@ Ant Attack (Hansesoft) 1983 - Quicksilva Ltd / Hansesoft + Quicksilva / Hansesoft @@ -704,7 +702,7 @@ Androids 1982 - Sunshine Books Ltd + Sunshine Books @@ -972,11 +970,10 @@ - Alien Storm 1991 - U.S. Gold Ltd + U.S. Gold @@ -989,7 +986,6 @@ - Afterburner 1988 @@ -1041,7 +1037,7 @@ Atom Ant 1990 - Hi-Tec Software Ltd + Hi-Tec Software @@ -1767,7 +1763,7 @@ Adventure A: Planet of Death (set 1) 1982 - Artic Computing Ltd + Artic Computing @@ -1778,7 +1774,7 @@ Adventure A: Planet of Death (set 2, Sinclair) 1982 - Artic Computing Ltd / Sinclair Research + Artic Computing / Sinclair Research @@ -1789,7 +1785,7 @@ Adventure A: Planet of Death (set 3, Profisoft) 1982 - Artic Computing Ltd / Profisoft + Artic Computing / Profisoft @@ -1800,7 +1796,7 @@ Adventure B: Inca Curse (set 1) 1982 - Artic Computing Ltd + Artic Computing @@ -1811,7 +1807,7 @@ Adventure B: Inca Curse (set 2) 1982 - Artic Computing Ltd + Artic Computing @@ -1822,7 +1818,7 @@ Adventure B: Inca Curse (set 3, Sinclair) 1982 - Artic Computing Ltd / Sinclair + Artic Computing / Sinclair @@ -1833,7 +1829,7 @@ Adventure C: The Ship Of Doom (set 1) 1982 - Artic Computing Ltd + Artic Computing @@ -1844,7 +1840,7 @@ Adventure C: The Ship Of Doom (set 2, Sinclair) 1982 - Artic Computing Ltd / Sinclair + Artic Computing / Sinclair @@ -1855,7 +1851,7 @@ Adventure D: Espionage Island (set 1) 1982 - Artic Computing Ltd + Artic Computing @@ -1866,7 +1862,7 @@ Adventure D: Espionage Island (set 2, Sinclair) 1982 - Artic Computing Ltd / Sinclair + Artic Computing / Sinclair @@ -1877,7 +1873,7 @@ Adventure D: Espionage Island (set 3, Profisoft) 1982 - Artic Computing Ltd / Profisoft + Artic Computing / Profisoft @@ -1888,7 +1884,7 @@ Adventure E: The Golden Apple (set 1) 1983 - Artic Computing Ltd + Artic Computing @@ -1899,7 +1895,7 @@ Adventure E: The Golden Apple (set 2) 1983 - Artic Computing Ltd + Artic Computing @@ -1910,7 +1906,7 @@ Adventure F: The Eye Of Bain (set 1) 1984 - Artic Computing Ltd + Artic Computing @@ -1921,7 +1917,7 @@ Adventure F: The Eye Of Bain (set 2) 1984 - Artic Computing Ltd + Artic Computing @@ -1932,7 +1928,7 @@ Adventure G: Ground Zero 1984 - Artic Computing Ltd + Artic Computing @@ -2579,7 +2575,7 @@ Bruce Lee (set 1) 1984 - U.S. Gold Ltd / Ocean + U.S. Gold / Ocean @@ -2590,7 +2586,7 @@ Bruce Lee (set 2, Americana) 1984 - U.S. Gold Ltd / Americana + U.S. Gold / Americana @@ -2601,7 +2597,7 @@ Bruce Lee (set 3, Dro Soft) 1984 - U.S. Gold Ltd / Dro Soft + U.S. Gold / Dro Soft @@ -2612,7 +2608,7 @@ Bruce Lee (set 4, Erbe, Small Case) 1984 - U.S. Gold Ltd / Erbe + U.S. Gold / Erbe @@ -2795,7 +2791,7 @@ Butch - Hard Guy 1987 - Advance Software Promotions Ltd + Advance Software Promotions @@ -2806,7 +2802,7 @@ Butch - Hard Guy (Alternative) 1987 - Advance Software Promotions Ltd / Alternative + Advance Software Promotions / Alternative @@ -2904,7 +2900,7 @@ The Birds And The Bees 1983 - Bug-Byte Software Ltd + Bug-Byte Software @@ -2915,7 +2911,7 @@ The Birds And The Bees 2 - Antics 1984 - Bug-Byte Software Ltd + Bug-Byte Software @@ -2923,12 +2919,11 @@ - The Birds 1983 - Rabbit Software Ltd + Rabbit Software @@ -2940,7 +2935,7 @@ Bomber Birds (The Birds) 1983 - Rabbit Software Ltd + Rabbit Software @@ -3325,7 +3320,7 @@ Blazing Thunder 1990 - Hi-Tec Software Ltd + Hi-Tec Software @@ -3464,7 +3459,7 @@ Beyond The Ice Palace 1988 - Elite Systems Ltd + Elite Systems @@ -3482,7 +3477,7 @@ Beyond The Ice Palace (EDOS) 1988 - Elite Systems Ltd / EDOS + Elite Systems / EDOS @@ -3493,7 +3488,7 @@ Beyond The Ice Palace (Encore) 1988 - Elite Systems Ltd / Encore + Elite Systems / Encore @@ -3593,7 +3588,7 @@ Booty 1984 - Firebird Software Ltd + Firebird Software @@ -3686,7 +3681,7 @@ Batman - The Movie (set 1) 1989 - Ocean Software + Ocean @@ -3724,7 +3719,7 @@ Batman The Caped Crusader (set 1) 1988 - Ocean Software + Ocean @@ -5112,7 +5107,7 @@ Conquestador 19?? - Erbe + Erbe Software @@ -5123,7 +5118,7 @@ Conquestador (Erbe) 19?? - Erbe + Erbe Software @@ -5323,7 +5318,7 @@ Chevy Chase 1991 - Hi-Tec Software Ltd + Hi-Tec Software @@ -5339,7 +5334,7 @@ Chickin Chase 1985 - Firebird Software Ltd + Firebird Software @@ -5618,7 +5613,7 @@ Commando (set 1) 1985 - Elite Systems Ltd + Elite Systems @@ -5634,7 +5629,7 @@ Commando (set 2) 1985 - Elite Systems Ltd + Elite Systems @@ -5650,7 +5645,7 @@ Commando (set 3, EDOS) 1985 - Elite Systems Ltd / EDOS + Elite Systems / EDOS @@ -5661,7 +5656,7 @@ Commando (set 4, Encore) 1985 - Elite Systems Ltd / Encore + Elite Systems / Encore @@ -5771,7 +5766,7 @@ California Games 1987 - U.S. Gold Ltd + U.S. Gold @@ -5803,7 +5798,7 @@ California Games (Erbe) 1987 - U.S. Gold Ltd / Erbe + U.S. Gold / Erbe @@ -6044,7 +6039,7 @@ Cabal (set 1) 1989 - Ocean Software + Ocean @@ -6206,7 +6201,7 @@ Cosmic Wartoad (set 1) 1985 - Ocean Software + Ocean @@ -7389,7 +7384,7 @@ Don't Buy This - Five of the Worst Games Ever (Race Ace, Fido, Weasel Willy, Fido 2 - Puppy Power, Fruit Machine) 1985 - Firebird Software Ltd + Firebird Software @@ -7520,7 +7515,7 @@ Dynasty Wars 1990 - U.S. Gold Ltd + U.S. Gold @@ -7648,7 +7643,7 @@ The Deep 1988 - U.S. Gold Ltd + U.S. Gold @@ -7659,7 +7654,7 @@ The Deep (Erbe) 1988 - U.S. Gold Ltd / Erbe + U.S. Gold / Erbe @@ -7990,7 +7985,7 @@ Duet 1987 - Elite Systems Ltd + Elite Systems @@ -8264,7 +8259,7 @@ Double Take (set 1) 1987 - Ocean Software + Ocean @@ -9231,7 +9226,7 @@ Forgotten Worlds (set 1) 1989 - U.S. Gold Ltd + U.S. Gold @@ -9249,7 +9244,7 @@ Forgotten Worlds (set 2) 1989 - U.S. Gold Ltd + U.S. Gold @@ -9527,7 +9522,7 @@ Final Fight 1991 - U.S. Gold Ltd + U.S. Gold @@ -9756,7 +9751,7 @@ Frenzy (Quicksilva Ltd) 1982 - Quicksilva Ltd + Quicksilva @@ -9865,7 +9860,7 @@ - Fighter Pilot (set 1, release 2) + Fighter Pilot (Digital Integration, release 2) 1983 Digital Integration @@ -9876,9 +9871,9 @@ - Fighter Pilot (set 2, release 2) - 19?? - <unknown> + Fighter Pilot (Digital Integration, release 2, alternate) + 1983 + Digital Integration @@ -9887,9 +9882,9 @@ - Fighter Pilot (set 3, release 1) - 19?? - <unknown> + Fighter Pilot (Digital Integration, release 1) + 1983 + Digital Integration @@ -9897,10 +9892,10 @@ - - Fighter Pilot (set 4, Byte-Back) - 19?? - <unknown> + + Fighter Pilot (Byte-Back) + 1983 + Byte Back @@ -9908,10 +9903,10 @@ - - Fighter Pilot (set 5, MCM) - 19?? - <unknown> + + Fighter Pilot (MCM) + 1988 + MCM Software @@ -9919,10 +9914,10 @@ - - Fighter Pilot (set 6, Silverbird) - 19?? - <unknown> + + Fighter Pilot (Silverbird) + 1983 + Silverbird Software @@ -9941,6 +9936,39 @@ + + Fighter Pilot (ABC Soft) + 1985 + ABC Soft + + + + + + + + + Fighter Pilot (Zafi Chip) + 1986 + Zafi Chip + + + + + + + + + Fighter Pilot (Z Cobra) + 1987 + Z Cobra + + + + + + + Flight Simulation (set 1, release 2) 1983 @@ -9988,7 +10016,7 @@ Flight Simulator 1983 - Artic Computing Ltd + Artic Computing @@ -10304,7 +10332,7 @@ Golden Axe 1990 - Probe Software Ltd / Sega + Virgin Games @@ -10322,7 +10350,7 @@ Golden Axe (Tronix) 1990 - Probe Software Ltd / Sega / Tronix + Tronix @@ -10338,9 +10366,9 @@ - Golden Axe (Erbe / MCM) + Golden Axe (MCM Software) 1990 - Probe Software Ltd / Sega / Erbe / MCM + MCM Software @@ -10519,7 +10547,7 @@ Ghosts 'n Goblins (set 1) 1986 - Elite Systems Ltd + Elite Systems @@ -10530,7 +10558,7 @@ Ghosts 'n Goblins (set 2) 1986 - Elite Systems Ltd + Elite Systems @@ -10546,7 +10574,7 @@ Ghosts 'n Goblins (Encore) 1986 - Elite Systems Ltd / Encore + Elite Systems / Encore @@ -10804,7 +10832,7 @@ Games Designer (Quicksilva) 1983 - Quicksilva Ltd + Quicksilva @@ -11091,7 +11119,7 @@ Ghouls n Ghosts 1989 - U.S. Gold Ltd + U.S. Gold @@ -11233,7 +11261,7 @@ The Goonies 1986 - U.S. Gold Ltd + U.S. Gold @@ -11244,7 +11272,7 @@ The Goonies (Erbe) 1986 - U.S. Gold Ltd / Erbe + U.S. Gold / Erbe @@ -11255,7 +11283,7 @@ Gothik 1987 - Firebird Software Ltd + Firebird Software @@ -11266,7 +11294,7 @@ Gothik (MCM) 1987 - Firebird Software Ltd / MCM + Firebird Software / MCM @@ -11371,7 +11399,7 @@ Gilligan's Gold (set 1) 1984 - Ocean Software + Ocean @@ -11393,7 +11421,7 @@ Gift From The Gods (set 1) 1984 - Ocean Software + Ocean @@ -12307,7 +12335,7 @@ High Steel 1989 - Screen 7 Ltd + Screen 7 @@ -12356,7 +12384,7 @@ Human Killing Machine 1988 - U.S. Gold Ltd + U.S. Gold @@ -12482,7 +12510,7 @@ Heist 2012 1987 - Firebird Software Ltd + Firebird Software @@ -12504,7 +12532,7 @@ Heli Chopper 1985 - Firebird Software Ltd + Firebird Software @@ -12608,7 +12636,7 @@ Highlander (set 1) 1986 - Ocean Software + Ocean @@ -12996,7 +13024,7 @@ I, Ball 1987 - Firebird Software Ltd + Firebird Software @@ -13007,7 +13035,7 @@ I, Ball (MCM) 1987 - Firebird Software Ltd / MCM + Firebird Software / MCM @@ -13018,7 +13046,7 @@ I, Ball 2 1987 - Firebird Software Ltd + Firebird Software @@ -13029,7 +13057,7 @@ Ikari Warriors 1988 - Elite Systems Ltd + Elite Systems @@ -13040,7 +13068,7 @@ Ikari Warriors (Encore) 1988 - Elite Systems Ltd / Encore + Elite Systems / Encore @@ -13074,7 +13102,7 @@ Insector Hecti In The Interchange 1991 - Hi-Tec Software Ltd + Hi-Tec Software @@ -13239,7 +13267,7 @@ It's A Knockout (set 1) 1986 - Ocean Software + Ocean @@ -13261,7 +13289,7 @@ International Match Day (set 1) 1985 - Ocean Software + Ocean @@ -13857,9 +13885,9 @@ - Jaws (set 1) + Jaws 1989 - Screen 7 Ltd + Screen 7 @@ -13873,9 +13901,9 @@ - Jaws (set 2, Alternative) + Jaws (Alternative release) 1989 - Screen 7 Ltd / Alternative + Alternative Software @@ -13889,9 +13917,9 @@ - Jaws (set 3, Tiburon, Erbe) - 19?? - <unknown> + Jaws / Tiburon (Erbe release) + 1989 + Erbe Software @@ -14662,7 +14690,7 @@ Kokotoni Wilf 1984 - Elite Systems Ltd + Elite Systems @@ -14673,7 +14701,7 @@ Kokotoni Wilf (Encore) 1984 - Elite Systems Ltd / Encore + Elite Systems / Encore @@ -14695,7 +14723,7 @@ Kung-Fu Master (set 1) 1986 - U.S. Gold Ltd + U.S. Gold @@ -14706,7 +14734,7 @@ Kung-Fu Master (set 2, Americana) 1986 - U.S. Gold Ltd / Americana + U.S. Gold / Americana @@ -14762,7 +14790,7 @@ Kong Strikes Back (set 1) 1984 - Ocean Software + Ocean @@ -14828,7 +14856,7 @@ Knight Rider (set 1) 1986 - Ocean Software + Ocean @@ -15460,7 +15488,7 @@ Last Duel 1989 - U.S. Gold Ltd + U.S. Gold @@ -16273,7 +16301,7 @@ Mutant Monty (set 1) 1984 - Artic Computing Ltd + Artic Computing @@ -16284,7 +16312,7 @@ Mutant Monty (set 2) 1984 - Artic Computing Ltd + Artic Computing @@ -16339,7 +16367,7 @@ Manic Miner (set 1) 1983 - Bug-Byte Software Ltd + Bug-Byte Software @@ -16350,7 +16378,7 @@ Manic Miner (set 2) 1983 - Bug-Byte Software Ltd + Bug-Byte Software @@ -16554,7 +16582,7 @@ Mercs 1991 - U.S. Gold Ltd + U.S. Gold @@ -16653,7 +16681,7 @@ Mikie (set 1) 1985 - Imagine Software Ltd + Imagine Software @@ -16664,7 +16692,7 @@ Mikie (set 2) 1985 - Imagine Software Ltd + Imagine Software @@ -16976,7 +17004,7 @@ Munch Man (DK'Tronics) 1983 - DK'Tronics Ltd + DK'Tronics @@ -17032,7 +17060,7 @@ Mr Heli 1989 - Firebird Software Ltd + Firebird Software @@ -17153,7 +17181,7 @@ Match Day (set 1) 1984 - Ocean Software + Ocean @@ -18109,7 +18137,7 @@ The Never Ending Story (128k release) 1985 - Ocean Software + Ocean @@ -18169,7 +18197,7 @@ N.O.M.A.D. (set 1) 1985 - Ocean Software + Ocean @@ -18397,7 +18425,7 @@ Olli & Lissa - The Ghost Of Shilmoore 1986 - Firebird Software Ltd + Firebird Software @@ -18695,7 +18723,7 @@ Out Run Europa 1991 - U.S. Gold Ltd + U.S. Gold @@ -18727,7 +18755,7 @@ Out Run Europa (Erbe) 1991 - U.S. Gold Ltd / Erbe + U.S. Gold / Erbe @@ -19620,7 +19648,7 @@ Park Patrol 1987 - Firebird Software Ltd + Firebird Software @@ -19942,7 +19970,7 @@ Psycho Pigs U.X.B. 1988 - U.S. Gold Ltd + U.S. Gold @@ -20048,7 +20076,7 @@ Paperboy 1986 - Elite Systems Ltd + Elite Systems @@ -20059,7 +20087,7 @@ Paperboy (Encore) 1986 - Elite Systems Ltd / Encore + Elite Systems / Encore @@ -20114,7 +20142,7 @@ The Plot 1988 - Firebird Software Ltd + Firebird Software @@ -20259,7 +20287,7 @@ P-47 Thunderbolt (P-47 The Freedom Fighter) (set 1) 1990 - Firebird Software Ltd + Firebird Software @@ -20275,7 +20303,7 @@ P-47 Thunderbolt (P-47 The Freedom Fighter) (set 2, small case) 1990 - Firebird Software Ltd + Firebird Software @@ -20291,7 +20319,7 @@ P-47 Thunderbolt (P-47 The Freedom Fighter) (set 3, MCM) 1990 - Firebird Software Ltd / MCM + Firebird Software / MCM @@ -20367,7 +20395,7 @@ Pud Pud (set 1) 1984 - Ocean Software + Ocean @@ -21402,7 +21430,7 @@ Roller Coaster 1986 - Elite Systems Ltd + Elite Systems @@ -21413,7 +21441,7 @@ Roller Coaster (Encore) 1986 - Elite Systems Ltd / Encore + Elite Systems / Encore @@ -21435,7 +21463,7 @@ Renegade 1987 - Imagine Software Ltd + Imagine Software @@ -21450,8 +21478,8 @@ Renegade - 128k (The Hit Squad) - 1987 - Imagine Software Ltd / The Hit Squad + 1989 + The Hit Squad @@ -21467,7 +21495,7 @@ Renegade (Erbe) 1987 - Imagine Software Ltd / Erbe + Erbe Software @@ -21481,9 +21509,9 @@ - Renegade 2 - Target Renegade + Target: Renegade 1988 - Imagine Software Ltd + Imagine Software @@ -21496,10 +21524,26 @@ - - Renegade 2 - Target Renegade (The Hit Squad) + + Target: Renegade (Erbe) 1988 - Imagine Software Ltd / The Hit Squad + Erbe Software + + + + + + + + + + + + + + Target: Renegade (The Hit Squad) + 1990 + The Hit Squad @@ -21509,9 +21553,9 @@ - Renegade 3 - The Final Chapter + Renegade III: The Final Chapter 1989 - Imagine Software Ltd + Imagine Software @@ -21524,10 +21568,10 @@ - - Renegade 3 - The Final Chapter (Erbe) + + Renegade III: The Final Chapter (Erbe) 1989 - Imagine Software Ltd / Erbe + Erbe Software @@ -21540,10 +21584,10 @@ - - Renegade 3 - The Final Chapter (The Hit Squad) - 1989 - Imagine Software Ltd / The Hit Squad + + Renegade III: The Final Chapter (The Hit Squad) + 1991 + The Hit Squad @@ -21902,7 +21946,7 @@ Road Runner (set 1) 1987 - U.S. Gold Ltd + U.S. Gold @@ -21934,7 +21978,7 @@ Road Runner (set 3) 1987 - U.S. Gold Ltd + U.S. Gold @@ -21945,7 +21989,7 @@ Road Runner (set 4, Correcaminos, Erbe) 1987 - U.S. Gold Ltd / Erbe + U.S. Gold / Erbe @@ -21972,7 +22016,7 @@ Road Runner And Wile E. Coyote 1991 - Hi-Tec Software Ltd + Hi-Tec Software @@ -21983,7 +22027,7 @@ Ricochet (Firebird Software) 1987 - Firebird Software Ltd + Firebird Software @@ -21995,7 +22039,7 @@ Rick Dangerous 1989 - Firebird Software Ltd + Firebird Software @@ -22011,7 +22055,7 @@ Rick Dangerous (Kixx) 1989 - Firebird Software Ltd / Kixx + Firebird Software / Kixx @@ -22022,7 +22066,7 @@ Rick Dangerous (MCM) 1989 - Firebird Software Ltd / MCM + Firebird Software / MCM @@ -22033,7 +22077,7 @@ Rick Dangerous (MCM, medium case) 1989 - Firebird Software Ltd / MCM + Firebird Software / MCM @@ -22222,7 +22266,7 @@ Revolution (set 1) 1986 - U.S. Gold Ltd + U.S. Gold @@ -22308,7 +22352,7 @@ - Red Heat (set 1) + Red Heat 1989 Ocean @@ -22324,7 +22368,7 @@ - Red Heat (set 2, Erbe) + Red Heat (Erbe) 19?? <unknown> @@ -22335,7 +22379,7 @@ - Red Heat (set 3, The Hit Squad) + Red Heat (The Hit Squad) 1991 The Hit Squad @@ -23084,7 +23128,7 @@ Star Firebirds 1985 - Firebird Software Ltd / Insight Software + Firebird Software / Insight Software @@ -23096,7 +23140,7 @@ Supertrux 1988 - Elite Systems Ltd + Elite Systems @@ -23115,7 +23159,7 @@ Supertrux (Encore) 1988 - Elite Systems Ltd / Encore + Elite Systems / Encore @@ -23290,7 +23334,7 @@ - Silk Worm + Silkworm 1989 Virgin Games Ltd @@ -23301,7 +23345,7 @@ - Silk Worm (Erbe) + Silkworm (Erbe) 1989 Virgin Games Ltd / Erbe @@ -23312,7 +23356,7 @@ - Silk Worm (Mastertronic Plus) + Silkworm (Mastertronic Plus) 1989 Virgin Games Ltd / Mastertronic Plus @@ -23323,7 +23367,7 @@ - Silk Worm (Tronix) + Silkworm (Tronix) 1989 Virgin Games Ltd / Tronix @@ -23462,7 +23506,7 @@ Scooby Doo 1986 - Elite Systems Ltd + Elite Systems @@ -23473,7 +23517,7 @@ Scooby Doo (Encore) 1986 - Elite Systems Ltd / Encore + Elite Systems / Encore @@ -23485,7 +23529,7 @@ Scooby And Scrappy Doo 1991 - Hi-Tec Software Ltd + Hi-Tec Software @@ -23496,7 +23540,7 @@ Spike 1985 - Firebird Software Ltd + Firebird Software @@ -23519,7 +23563,7 @@ Styx 1983 - Bug-Byte Software Ltd + Bug-Byte Software @@ -23966,7 +24010,7 @@ The Snowman 1984 - Quicksilva Ltd + Quicksilva @@ -24195,7 +24239,7 @@ Strider 1989 - U.S. Gold Ltd + U.S. Gold @@ -24217,7 +24261,7 @@ Strider II 1990 - U.S. Gold Ltd + U.S. Gold @@ -24234,7 +24278,7 @@ Strider II (Kixx) 1990 - U.S. Gold Ltd + U.S. Gold @@ -24734,7 +24778,7 @@ Shadow Dancer 1991 - U.S. Gold Ltd + U.S. Gold @@ -24750,7 +24794,7 @@ Shadow Dancer (Erbe) 1991 - U.S. Gold Ltd / Erbe + U.S. Gold / Erbe @@ -25182,7 +25226,7 @@ Super Bowl (set 1) 1986 - Ocean Software + Ocean @@ -25215,7 +25259,7 @@ Street Hawk (1986) (set 1) 1986 - Ocean Software + Ocean @@ -25510,7 +25554,7 @@ Sabotage (Quicksilva Ltd) (cracked) 1985 - Quicksilva Ltd + Quicksilva @@ -26584,7 +26628,7 @@ Turbo Outrun 1989 - U.S. Gold Ltd + U.S. Gold @@ -26600,7 +26644,7 @@ Turbo Outrun (Erbe) 1989 - U.S. Gold Ltd / Erbe + U.S. Gold / Erbe @@ -26993,7 +27037,7 @@ Thrust 1986 - Firebird Software Ltd + Firebird Software @@ -27004,7 +27048,7 @@ Thrust II 1987 - Firebird Software Ltd + Firebird Software @@ -27583,7 +27627,7 @@ UN Squadron 1990 - U.S. Gold Ltd + U.S. Gold @@ -27599,7 +27643,7 @@ The Untouchables (set 1) 1989 - Ocean Software + Ocean @@ -28037,7 +28081,7 @@ War Cars Construction Set 1987 - Firebird Software Ltd + Firebird Software @@ -28048,7 +28092,7 @@ War Cars Construction Set (MCM) 1987 - Firebird Software Ltd / MCM + Firebird Software / MCM @@ -28207,7 +28251,7 @@ W.E.C. Le Mans 1988 - Imagine Software Ltd + Imagine Software @@ -28492,7 +28536,7 @@ - World Series Basketball (set 1) + World Series Basketball 1985 Imagine Software @@ -28503,9 +28547,9 @@ - World Series Basketball (set 2, Erbe, medium case) - 19?? - <unknown> + World Series Basketball (Erbe, medium case) + 1985 + Erbe Software @@ -28514,9 +28558,9 @@ - World Series Basketball (set 3, Erbe, small case) - 19?? - <unknown> + World Series Basketball (Erbe, small case) + 1985 + Erbe Software @@ -28703,7 +28747,7 @@ Flintstones - Yabba Dabba Dooo! 1986 - Quicksilva Ltd + Quicksilva @@ -28759,7 +28803,7 @@ Yogi Bear And Friends - In The Greed Monster 1990 - Hi-Tec Software Ltd + Hi-Tec Software @@ -28770,7 +28814,7 @@ Yogi's Great Escape 1990 - Hi-Tec Software Ltd + Hi-Tec Software @@ -28786,7 +28830,7 @@ Yie Ar Kung Fu (set 1) 1985 - Imagine Software Ltd + Imagine Software @@ -28841,7 +28885,7 @@ Yie Ar Kung Fu (set 6) 1985 - Imagine Software Ltd + Imagine Software @@ -28853,7 +28897,7 @@ Yie Ar Kung Fu 2 (set 1) 1986 - Imagine Software Ltd + Imagine Software @@ -28864,7 +28908,7 @@ Yie Ar Kung Fu 2 (set 2) 1986 - Imagine Software Ltd + Imagine Software @@ -28946,7 +28990,7 @@ Zombie Zombie 1984 - Quicksilva Ltd + Quicksilva @@ -29562,7 +29606,7 @@ Arcade Hits - 2 In 1 (Bomb Jack, Ghosts 'n Goblins) 1985 - Elite Systems Ltd + Elite Systems @@ -29836,7 +29880,7 @@ Winners (compilation) 1990 - U.S. Gold Ltd + U.S. Gold @@ -29863,7 +29907,7 @@ Unbelievable Ultimate Vol 1 1987 - U.S. Gold Ltd + U.S. Gold @@ -29890,7 +29934,7 @@ The Crash Collection Vol 1 1989 - U.S. Gold Ltd + U.S. Gold @@ -29916,7 +29960,7 @@ The Gold Collection 2 1986 - U.S. Gold Ltd + U.S. Gold @@ -29942,7 +29986,7 @@ The Gold Collection III 1987 - U.S. Gold Ltd + U.S. Gold @@ -29969,7 +30013,7 @@ Spectrum Stingers (compilation) 1987 - U.S. Gold Ltd + U.S. Gold @@ -29986,7 +30030,7 @@ Platinum (set 1) (compilation) 1991 - U.S. Gold Ltd + U.S. Gold @@ -30032,7 +30076,7 @@ Platinum (set 2) (compilation) 1991 - U.S. Gold Ltd + U.S. Gold @@ -30080,7 +30124,7 @@ No Limits (compilation) 1990 - U.S. Gold Ltd + U.S. Gold @@ -30096,7 +30140,7 @@ Coin-Op Hits 1990 - U.S. Gold Ltd + U.S. Gold @@ -30122,7 +30166,7 @@ Coin-Op Hits II 1991 - U.S. Gold Ltd + U.S. Gold @@ -30214,7 +30258,7 @@ Assemblage (compilation) (Harry Hare's Lair, Mutant Monty and the Temple of Doom, Curse of the Seven Faces, Adventure H: Robin Hood) 1986 - Artic Computing Ltd + Artic Computing @@ -37416,7 +37460,7 @@ 4x4 Off-Road Racing (set 1) 1988 - U.S. Gold Ltd + U.S. Gold @@ -37487,7 +37531,7 @@ 720 Degrees (set 1) 1987 - U.S. Gold Ltd + U.S. Gold @@ -37498,7 +37542,7 @@ 720 Degrees (set 2, Erbe) 1987 - U.S. Gold Ltd / Erbe + U.S. Gold / Erbe @@ -39883,7 +39927,7 @@ Alien (Bug-Byte) 1986 - Bug-Byte + Bug-Byte Software @@ -41514,7 +41558,7 @@ Aquarius 1983 - Bug-Byte + Bug-Byte Software @@ -42125,7 +42169,7 @@ Aspect v4.2 (set 3) 1982 - Bug-Byte + Bug-Byte Software @@ -42297,23 +42341,23 @@ - Astroclone (Erbe) + Astroclone 1985 - Erbe Software + Hewson Consultants - - + + - Astroclone - 19?? - <unknown> + Astroclone (Erbe) + 1985 + Erbe Software - - + + @@ -43149,8 +43193,6 @@ - - The Legend Of Avalon 1984 @@ -47032,7 +47074,7 @@ Bomber Bob In Pentagon Capers 1985 - Bug-Byte + Bug-Byte Software @@ -49843,7 +49885,7 @@ Captain Kelly (Bug-Byte) 1986 - Bug-Byte + Bug-Byte Software @@ -50711,7 +50753,7 @@ Cavelon 1984 - Ocean Software + Ocean @@ -50760,7 +50802,7 @@ Cavern Fighter 1983 - Bug-Byte + Bug-Byte Software @@ -52043,7 +52085,7 @@ Chinese Juggler 1984 - Ocean Software + Ocean @@ -52339,19 +52381,30 @@ - - Circus (Channel 8) + + Circus 1983 - Channel 8 + Digital Fantasia - + - - Circus (set 3) + + Circus (alternate) + 1983 + Digital Fantasia + + + + + + + + + Circus (alternate 2) 1983 Digital Fantasia @@ -52361,13 +52414,13 @@ - - Circus (set 2) - 19?? - <unknown> + + Circus (Channel 8) + 1983 + Channel 8 - - + + @@ -52383,17 +52436,6 @@ - - Circus - 1983 - Digital Fantasia - - - - - - - Cisco Heat 1991 @@ -54574,7 +54616,7 @@ Core (Bug-Byte) 1986 - Bug-Byte + Bug-Byte Software @@ -55490,31 +55532,31 @@ - Crazy Cars (Erbe - The Hit Squad) - 1989 - IBSA + Crazy Cars + 1988 + Titus - - + + - + Crazy Cars (Proein) - 19?? - <unknown> + 1988 + Proein Soft Line - - + + - + Crazy Cars (The Hit Squad) - 19?? - <unknown> + 1989 + The Hit Squad @@ -55522,21 +55564,21 @@ - - Crazy Cars II (Proein) - 19?? - <unknown> + + Crazy Cars (Erbe - The Hit Squad) + 1989 + IBSA - - + + - + Crazy Cars II - 19?? - <unknown> + 1988 + Titus @@ -55544,13 +55586,13 @@ - - Crazy Cars - 19?? - <unknown> + + Crazy Cars II (Proein) + 1989 + Proein Soft Line - - + + @@ -55579,8 +55621,8 @@ Crazy Crane - Pre Production - 19?? - <unknown> + 1984 + Voyager Software @@ -55590,8 +55632,8 @@ Crazy Crane - 19?? - <unknown> + 1984 + Voyager Software @@ -55790,7 +55832,7 @@ Cricket Captain (1990, Hi-Tec) 1990 - Hi-Tec Software Ltd + Hi-Tec Software @@ -57288,7 +57330,7 @@ The Castle 1983 - Bug-Byte Software Ltd + Bug-Byte Software @@ -57387,7 +57429,7 @@ The Chess Player 1982 - Quicksilva Ltd + Quicksilva @@ -57653,7 +57695,7 @@ The Computer Cook Book - Menu Planner 1984 - Bug-Byte + Bug-Byte Software @@ -58434,7 +58476,7 @@ Darkman (set 1) 1991 - Ocean Software + Ocean @@ -59213,7 +59255,7 @@ Death Wake (Bug-Byte) 1985 - Bug-Byte + Bug-Byte Software @@ -59505,7 +59547,7 @@ Defcom (Bug-Byte) 1986 - Bug-Byte + Bug-Byte Software @@ -60719,7 +60761,7 @@ Digger Dan 1983 - Ocean Software + Ocean @@ -61479,7 +61521,7 @@ Dogsbody 1985 - Bug-Byte + Bug-Byte Software @@ -61751,7 +61793,7 @@ Don't Panic 1985 - Firebird Software Ltd + Firebird Software @@ -64783,7 +64825,7 @@ Elevator Action (Bug-Byte) 1987 - Bug-Byte + Bug-Byte Software @@ -66367,7 +66409,7 @@ Eskimo Eddie 1984 - Ocean Software + Ocean @@ -68354,10 +68396,21 @@ - + + Fighting Warrior + 1985 + Melbourne House + + + + + + + + Fighting Warrior (Mastertronic Plus) - 19?? - <unknown> + 1985 + Mastertronic Plus @@ -68365,13 +68418,24 @@ - - Fighting Warrior - 19?? - <unknown> + + Fighting Warrior (Erbe) + 1985 + Erbe Software - - + + + + + + + + Fighting Warrior (Erbe, small case) + 1985 + Erbe Software + + + @@ -68497,24 +68561,24 @@ - - Fire And Forget (Proein) - 1989 - Proein Soft Line + + Fire and Forget + 1988 + Titus - - + + - - Fire And Forget - 19?? - <unknown> + + Fire and Forget (Proein) + 1989 + Proein Soft Line - - + + @@ -68588,7 +68652,7 @@ Firefly 1988 - Ocean Software + Ocean @@ -69189,7 +69253,7 @@ Flyer Fox 1986 - Bug-Byte + Bug-Byte Software @@ -70062,7 +70126,7 @@ Spectrum Forth (set 1, v1.1) 1982 - Artic Computing Ltd + Artic Computing @@ -70259,7 +70323,7 @@ Frank Bruno's Boxing 1985 - Elite Systems Ltd + Elite Systems @@ -70275,7 +70339,7 @@ Frank Bruno's World Championship Boxing (Encore, set 1) 1985 - Elite Systems Ltd / Encore + Elite Systems / Encore @@ -70291,7 +70355,7 @@ Frank Bruno's World Championship Boxing (Encore, set 2) 1985 - Elite Systems Ltd / Encore + Elite Systems / Encore @@ -70635,7 +70699,7 @@ Frogger (1983, Rabbit Software) 1983 - Rabbit Software Ltd + Rabbit Software @@ -72350,7 +72414,7 @@ Galaxians (set 1) 1982 - Artic Computing Ltd + Artic Computing @@ -72361,7 +72425,7 @@ Galaxians (set 2) 1982 - Artic Computing Ltd + Artic Computing @@ -72383,7 +72447,7 @@ Galaxians (set 4, French cover) 1982 - Artic Computing Ltd + Artic Computing @@ -72394,7 +72458,7 @@ Galaxians (Pset 5, Profisoft) 1982 - Artic Computing Ltd / Profisoft + Artic Computing / Profisoft @@ -72788,7 +72852,7 @@ Gauntlet - The Deeper Dungeons (expansion pack) 1987 - U.S. Gold Ltd + U.S. Gold @@ -72799,7 +72863,7 @@ Gauntlet II (set 1) 1988 - U.S. Gold Ltd + U.S. Gold @@ -72815,7 +72879,7 @@ Gauntlet II (set 2, Erbe) 1988 - U.S. Gold Ltd / Erbe + U.S. Gold / Erbe @@ -72847,7 +72911,7 @@ Gauntlet II (set 4, faulty release) 1988 - U.S. Gold Ltd + U.S. Gold @@ -72863,7 +72927,7 @@ Gauntlet III (set 1) 1991 - U.S. Gold Ltd + U.S. Gold @@ -72879,7 +72943,7 @@ Gauntlet III (set 2, Erbe) 1991 - U.S. Gold Ltd / Erbe + U.S. Gold / Erbe @@ -73069,7 +73133,7 @@ General Election 1983 - Bug-Byte + Bug-Byte Software @@ -73473,7 +73537,7 @@ Glass (set 1) 1985 - Quicksilva Ltd + Quicksilva @@ -73506,7 +73570,7 @@ Glider Rider (Bug-Byte) 1987 - Bug-Byte + Bug-Byte Software @@ -75628,7 +75692,7 @@ Gutz 1988 - Ocean Software + Ocean @@ -76979,7 +77043,7 @@ Hard Cheese (set 1) 1983 - DK'Tronics Ltd + DK'Tronics @@ -76997,7 +77061,7 @@ Hard Cheese (set 2, Prism) 1983 - DK'Tronics Ltd / Prism + DK'Tronics / Prism @@ -77323,7 +77387,7 @@ Headstart 1987 - Bug-Byte + Bug-Byte Software @@ -77907,7 +77971,7 @@ Heroes Of The Lance (set 1) 1988 - U.S. Gold Ltd + U.S. Gold @@ -78594,7 +78658,7 @@ Hive 1986 - Firebird Software Ltd + Firebird Software @@ -78670,7 +78734,7 @@ Hocus Focus (Bug-Byte) 1986 - Bug-Byte + Bug-Byte Software @@ -78958,7 +79022,7 @@ Hopping Mad (set 1) 1988 - Elite Systems Ltd + Elite Systems @@ -80565,7 +80629,7 @@ Imagination (set 1) 1987 - Firebird Software Ltd + Firebird Software @@ -80576,7 +80640,7 @@ Imagination (set 2, no loading screen) 1987 - Firebird Software Ltd + Firebird Software @@ -80870,7 +80934,7 @@ Indiana Jones And The Temple Of Doom (set 1) 1987 - U.S. Gold Ltd + U.S. Gold @@ -80918,7 +80982,7 @@ Indiana Jones And The Last Crusade 1989 - U.S. Gold Ltd + U.S. Gold @@ -80950,7 +81014,7 @@ Indiana Jones Y La Ultima Cruzada (Erbe - Music) 1989 - U.S. Gold Ltd / Erbe + U.S. Gold / Erbe @@ -80966,7 +81030,7 @@ Indiana Jones Y La Ultima Cruzada (Erbe - Serie 5 Estrellas) 1989 - U.S. Gold Ltd / Erbe + U.S. Gold / Erbe @@ -80982,7 +81046,7 @@ Indiana Jones And The Fate Of Atlantis 1992 - U.S. Gold Ltd + U.S. Gold @@ -81064,7 +81128,7 @@ Infiltrator (set 1) 1986 - U.S. Gold Ltd + U.S. Gold @@ -81811,7 +81875,7 @@ International Rugby (set 1) 1985 - Artic Computing Ltd + Artic Computing @@ -81986,7 +82050,7 @@ Invaders (1982, Artic) (set 1) 1982 - Artic Computing Ltd + Artic Computing @@ -82063,7 +82127,7 @@ Invasion Force (1982, Artic) (set 1) 1982 - Artic Computing Ltd + Artic Computing @@ -82397,7 +82461,7 @@ Italy 1990 (set 1) 1990 - U.S. Gold Ltd + U.S. Gold @@ -82429,7 +82493,7 @@ Italy 1990 (set 3, Italia 1990, Erbe, cardboard case) 1990 - U.S. Gold Ltd / Erbe + U.S. Gold / Erbe @@ -82445,7 +82509,7 @@ Italy 1990 (set 4, Italia 1990, Erbe) 1990 - U.S. Gold Ltd / Erbe + U.S. Gold / Erbe @@ -82461,7 +82525,7 @@ Italy 1990 - Winners Edition 1990 - U.S. Gold Ltd + U.S. Gold @@ -82933,8 +82997,8 @@ Jack The Nipper (set 2, Kixx) - 19?? - <unknown> + 1986 + Kixx @@ -82943,7 +83007,7 @@ - Jack The Nipper II In Coconut Capers (set 1) + Jack The Nipper II: In Coconut Capers (set 1) 1987 Gremlin Graphics Software @@ -82954,9 +83018,9 @@ - Jack The Nipper II In Coconut Capers (set 2, Kixx) - 19?? - <unknown> + Jack The Nipper II: In Coconut Capers (set 2, Kixx) + 1987 + Kixx @@ -82965,9 +83029,9 @@ - Jack The Nipper II In Coconut Capers (set 3, Kixx) - 19?? - <unknown> + Jack The Nipper II: In Coconut Capers (set 3, Kixx) + 1987 + Kixx @@ -83232,23 +83296,23 @@ - Jaws Revenge (Riko Data) + Jaws Revenge 1983 - Riko Data + Work Force - - + + - Jaws Revenge - 19?? - <unknown> + Jaws Revenge (Riko Data) + 1983 + Riko Data - - + + @@ -85203,7 +85267,7 @@ Jumbly (set 1) 1983 - DK'Tronics Ltd + DK'Tronics @@ -85214,7 +85278,7 @@ Jumbly (set 2) 1983 - DK'Tronics Ltd + DK'Tronics @@ -85269,7 +85333,7 @@ Jumping Jack (set 1) 1983 - Imagine Software Ltd + Imagine Software @@ -85280,7 +85344,7 @@ Jumping Jack (set 2) 1983 - Imagine Software Ltd + Imagine Software @@ -86781,7 +86845,7 @@ Kong 1983 - Ocean Software + Ocean @@ -87135,7 +87199,7 @@ Kung Fu 1984 - Bug-Byte + Bug-Byte Software @@ -87834,7 +87898,7 @@ Laser Basic 1986 - Ocean Software + Ocean @@ -87860,7 +87924,7 @@ Laser Compiler 1986 - Ocean Software + Ocean @@ -87876,7 +87940,7 @@ Laser Genius 1986 - Ocean Software + Ocean @@ -91665,7 +91729,7 @@ The Ludoids 1985 - Bug-Byte + Bug-Byte Software @@ -92533,7 +92597,7 @@ Mailstrom 1986 - Ocean Software + Ocean @@ -95564,7 +95628,7 @@ Miami Dice 1986 - Bug-Byte + Bug-Byte Software @@ -96672,8 +96736,8 @@ Minitape 6 - 19?? - <unknown> + 1985 + LERM Software @@ -96849,7 +96913,7 @@ Mission Omega (Bug-Byte) 1988 - Bug-Byte + Bug-Byte Software @@ -97289,8 +97353,8 @@ Monty On The Run - 19?? - <unknown> + 1985 + Gremlin Graphics Software @@ -97354,7 +97418,7 @@ Moon Alert 1984 - Ocean Software + Ocean @@ -97815,7 +97879,7 @@ Mothership (set 1) 1984 - Artic Computing Ltd + Artic Computing @@ -98257,7 +98321,7 @@ Mr Wong's Loopy Laundry (set 1) 1984 - Artic Computing Ltd + Artic Computing @@ -98372,7 +98436,7 @@ Muggins The Spaceman 1987 - Firebird Software Ltd + Firebird Software @@ -98724,7 +98788,7 @@ Murder (1983, Rabbit Software) 1983 - Rabbit Software Ltd + Rabbit Software @@ -99506,7 +99570,7 @@ Mystery Of The Nile (set 1) 1987 - Firebird Software Ltd + Firebird Software @@ -99517,7 +99581,7 @@ Mystery Of The Nile (set 2) 1987 - Firebird Software Ltd + Firebird Software @@ -99738,7 +99802,7 @@ The Master 1986 - Artic Computing Ltd + Artic Computing @@ -100163,7 +100227,7 @@ Narc (set 1) 1990 - Ocean Software + Ocean @@ -100400,7 +100464,7 @@ Navy Seals (set 1) 1991 - Ocean Software + Ocean @@ -101004,7 +101068,7 @@ Night Breed 1990 - Ocean Software + Ocean @@ -101240,7 +101304,7 @@ Nightmare Rally (set 1) 1986 - Ocean Software + Ocean @@ -103429,7 +103493,7 @@ Orbix The Terrorball (Bug-Byte) 1986 - Bug-Byte + Bug-Byte Software @@ -103621,7 +103685,7 @@ Oriental Hero 1987 - Firebird Software Ltd + Firebird Software @@ -103857,7 +103921,7 @@ Out Run (set 1) 1987 - U.S. Gold Ltd + U.S. Gold @@ -103894,7 +103958,7 @@ Out Run (set 3, Erbe) 1987 - U.S. Gold Ltd / Erbe + U.S. Gold / Erbe @@ -103921,7 +103985,7 @@ Overlander (set 1) 1988 - Elite Systems Ltd + Elite Systems @@ -103953,7 +104017,7 @@ Overlander (set 3, Encore) 1988 - Elite Systems Ltd / Encore + Elite Systems / Encore @@ -105271,7 +105335,7 @@ Pedro 1984 - Imagine Software Ltd + Imagine Software @@ -105785,7 +105849,7 @@ Peter Shilton's Handball Maradona (Bug-Byte) 1987 - Bug-Byte + Bug-Byte Software @@ -106375,7 +106439,7 @@ Piggy (Bug-Byte) 1988 - Bug-Byte + Bug-Byte Software @@ -106386,7 +106450,7 @@ Piggy 1988 - Bug-Byte + Bug-Byte Software @@ -107025,7 +107089,7 @@ Plum Duff 1985 - Bug-Byte + Bug-Byte Software @@ -107163,7 +107227,7 @@ Pogo 1983 - Ocean Software + Ocean @@ -107473,7 +107537,7 @@ Pool 1983 - Bug-Byte + Bug-Byte Software @@ -109651,7 +109715,7 @@ Pyramania (Bug-Byte) 1984 - Bug-Byte Software Ltd + Bug-Byte Software @@ -111889,7 +111953,7 @@ Rapscallion 1984 - Bug-Byte + Bug-Byte Software @@ -111927,7 +111991,7 @@ Rastan (set 1) 1988 - Imagine Software Ltd + Imagine Software @@ -112547,7 +112611,7 @@ Red Scorpion (Bug-Byte) 1987 - Bug-Byte + Bug-Byte Software @@ -113521,7 +113585,7 @@ Road Blasters (set 1) 1988 - U.S. Gold Ltd + U.S. Gold @@ -113537,7 +113601,7 @@ Road Blasters (set 2, Erbe) 1988 - U.S. Gold Ltd / Erbe + U.S. Gold / Erbe @@ -113613,7 +113677,7 @@ Road Racers (set 1) 1983 - Artic Computing Ltd + Artic Computing @@ -113901,7 +113965,7 @@ Robocop (set 1) 1988 - Ocean Software + Ocean @@ -113992,7 +114056,7 @@ Robocop 3 1992 - Ocean Software + Ocean @@ -114119,7 +114183,7 @@ Roboto 1986 - Bug-Byte + Bug-Byte Software @@ -114495,7 +114559,7 @@ Roland's Rat Race (set 1) 1985 - Ocean Software + Ocean @@ -114544,7 +114608,7 @@ Rolling Thunder (set 1) 1988 - U.S. Gold Ltd + U.S. Gold @@ -114945,7 +115009,7 @@ Rubicon 1987 - Bug-Byte + Bug-Byte Software @@ -115244,9 +115308,9 @@ - Rupert And The Ice Castle + Rupert and the Ice Castle 1986 - Bug-Byte + Bug-Byte Software @@ -115254,10 +115318,10 @@ - - Rupert And The Toymaker's Party - 19?? - <unknown> + + Rupert and the Toymaker's Party + 1985 + Quicksilva @@ -116529,7 +116593,7 @@ Sbugetti Junction 1986 - Bug-Byte + Bug-Byte Software @@ -116693,6 +116757,17 @@ + + Esquizóides + 1983 + Timex Portugal / Alfamicro + + + + + + + Schwert 19?? @@ -119898,7 +119973,7 @@ Sly Spy (set 1) 1990 - Ocean Software + Ocean @@ -120034,7 +120109,7 @@ Smash TV 1991 - Ocean Software + Ocean @@ -120733,7 +120808,7 @@ Sodov The Sorcerer 1986 - Bug-Byte + Bug-Byte Software @@ -121462,7 +121537,7 @@ Souls Of Darkon (Bug-Byte) 1985 - Bug-Byte + Bug-Byte Software @@ -121968,6 +122043,17 @@ + + Space Racer + 1989 + Proein Soft Line + + + + + + + Space Raiders {Portuguese} 19?? @@ -122778,7 +122864,7 @@ Spectral Invaders - Release 1 1982 - Bug-Byte + Bug-Byte Software @@ -122931,7 +123017,7 @@ Spectres 1982 - Bug-Byte + Bug-Byte Software @@ -123134,7 +123220,7 @@ Spectrum Chess (set 1) 1982 - Artic Computing Ltd + Artic Computing @@ -123157,7 +123243,7 @@ Spectrum Chess (set 3, alt colours) 1982 - Artic Computing Ltd + Artic Computing @@ -123169,7 +123255,7 @@ Spectrum Chess 2 (set 1) 1982 - Artic Computing Ltd + Artic Computing @@ -125820,7 +125906,7 @@ Stay Kool 1984 - Bug-Byte + Bug-Byte Software @@ -126274,7 +126360,7 @@ Strange Loop (Bug-Byte) 1984 - Bug-Byte + Bug-Byte Software @@ -128123,7 +128209,7 @@ Superman - The Game (set 1) 1985 - Firebird Software Ltd + Firebird Software @@ -128135,7 +128221,7 @@ Superman - The Game (set 2) 1985 - Firebird Software Ltd + Firebird Software @@ -128801,7 +128887,7 @@ The Search For Terrestrial Intelligence 1988 - Bug-Byte + Bug-Byte Software @@ -129043,7 +129129,7 @@ The Sentinel (set 1) 1987 - Firebird Software Ltd + Firebird Software @@ -129054,7 +129140,7 @@ The Sentinel (set 2, Dro Soft) 1987 - Firebird Software Ltd / Dro Soft + Firebird Software / Dro Soft @@ -129785,7 +129871,7 @@ Tai-Pan 1987 - Ocean Software + Ocean @@ -130037,7 +130123,7 @@ Tank 1987 - Ocean Software + Ocean @@ -130048,7 +130134,7 @@ Tantalus (Bug-Byte) 1986 - Bug-Byte + Bug-Byte Software @@ -131027,7 +131113,7 @@ Terminator 2 - Judgement Day (set 1) 1991 - Ocean Software + Ocean @@ -131979,7 +132065,7 @@ The Tube (Bug-Byte) 1987 - Bug-Byte + Bug-Byte Software @@ -132623,8 +132709,8 @@ Thunder Blade (Erbe) - 19?? - <unknown> + 1988 + Erbe Software @@ -132639,8 +132725,8 @@ Thunder Blade (Erbe - Musical 1) - 19?? - <unknown> + 1991 + Musical 1 @@ -132655,8 +132741,8 @@ Thunder Blade (Kixx) - 19?? - <unknown> + 1988 + Kixx @@ -132738,10 +132824,26 @@ + + Thundercats (Elite) + 1987 + Elite System + + + + + + + + + + + + - Thundercats (MCM) - 19?? - <unknown> + Thundercats (MCM, double case) + 1988 + MCM Software @@ -132750,9 +132852,9 @@ - Thundercats (set 2) - 19?? - <unknown> + Thundercats (Elite, alternate) + 1987 + Elite System @@ -132765,18 +132867,13 @@ - - Thundercats - 19?? - <unknown> - - - - - - - - + + Thundercats (MCM, small case) + 1987 + MCM Software + + + @@ -133118,7 +133215,7 @@ Time Trax (Bug-Byte) 1986 - Bug-Byte + Bug-Byte Software @@ -133894,7 +133991,7 @@ Top Gun 1987 - Ocean Software + Ocean @@ -134549,7 +134646,7 @@ Transversion 1984 - Ocean Software + Ocean @@ -135876,7 +135973,7 @@ Turmoil 1984 - Bug-Byte + Bug-Byte Software @@ -136061,7 +136158,7 @@ Twin Kingdom Valley (set 2) 1984 - Bug-Byte + Bug-Byte Software @@ -138825,7 +138922,7 @@ - The Wizard Of Oz + The Wizard of Oz 1995 Zenobi Software @@ -138835,10 +138932,10 @@ - - The Wizard Of Tallyron - 19?? - <unknown> + + The Wizard of Tallyron + 1986 + C & VG @@ -138846,10 +138943,10 @@ - + The Wizards Orb - 19?? - <unknown> + 1986 + C. Davie / Gordon Yacomine @@ -138857,24 +138954,24 @@ - - The Wizards Scrolls (set 2) - 19?? - <unknown> + + The Wizard's Scrolls + 1984 + East Midlands Software - - + + - - The Wizards Scrolls - 19?? - <unknown> + + The Wizard's Scrolls (alternate) + 1984 + East Midlands Software - - + + @@ -138912,17 +139009,6 @@ - - The Wizard's Warriors - 19?? - <unknown> - - - - - - - The Wombles (Alternative) 1990 @@ -140378,8 +140464,8 @@ Wilds Sreets (Proein) - 19?? - <unknown> + 1990 + Proein Soft Line @@ -140387,11 +140473,10 @@ - Wild Water 1989 - Bug-Byte + Bug-Byte Software @@ -140914,6 +140999,17 @@ + + The Wizard's Warriors + 1983 + Abersoft + + + + + + + Wizball (EDOS) 1989 @@ -140950,7 +141046,7 @@ Wizball 1987 - Ocean Software + Ocean @@ -141799,7 +141895,7 @@ World War 1 (Bug-Byte) 1987 - Bug-Byte + Bug-Byte Software @@ -142449,7 +142545,7 @@ Xevious (set 1) 1987 - U.S. Gold Ltd + U.S. Gold @@ -142460,7 +142556,7 @@ Xevious (set 2, Americana) 1987 - U.S. Gold Ltd / Americana + U.S. Gold / Americana @@ -142471,7 +142567,7 @@ Xevious (set 3, Erbe) 1987 - U.S. Gold Ltd / Erbe + U.S. Gold / Erbe @@ -145400,7 +145496,7 @@ 100% Dynamite 1990 - Ocean Software + Ocean @@ -145947,7 +146043,7 @@ 2 Hot 2 Handle 1992 - Ocean Software + Ocean @@ -148925,7 +149021,7 @@ Conflict Command 1988 - Ocean Software + Ocean @@ -149028,7 +149124,7 @@ Dark Force 1990 - Ocean Software + Ocean @@ -149457,8 +149553,8 @@ Double Dragon III & Rod-Land - 19?? - <unknown> + 1991 + Storm Software @@ -151913,7 +152009,7 @@ Hollywood (Batman & The Untouchables) 1989 - Ocean Software + Ocean @@ -151939,7 +152035,7 @@ Hollywood Collection 1990 - Ocean Software + Ocean @@ -152187,8 +152283,8 @@ Igor - 19?? - <unknown> + 1987 + Grupo de Trabajo Software @@ -152943,7 +153039,7 @@ Live Action (compilation) 1987 - Ocean Software + Ocean @@ -152969,7 +153065,7 @@ Live Ammo (compilation) 1987 - Ocean Software + Ocean @@ -154059,7 +154155,7 @@ Ocean's Greatest Hits 1986 - Ocean Software + Ocean @@ -154803,7 +154899,7 @@ Power Up (compilation) 1991 - Ocean Software + Ocean @@ -155031,7 +155127,7 @@ Rainbow Collection (Bubble Bobble, Rainbow Islands, The New Zealand Story) 1991 - Ocean Software + Ocean @@ -156313,7 +156409,7 @@ Special Action 1989 - Ocean Software + Ocean @@ -158026,7 +158122,7 @@ Stars On The 128 1986 - Ocean Software + Ocean @@ -158881,7 +158977,7 @@ The Biz (compilation) 1990 - Ocean Software + Ocean @@ -159508,7 +159604,7 @@ The Magnificent 7 1987 - Ocean Software + Ocean diff -Nru mame-0.230+dfsg.1/hash/ti74_cart.xml mame-0.231+dfsg.1/hash/ti74_cart.xml --- mame-0.230+dfsg.1/hash/ti74_cart.xml 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/hash/ti74_cart.xml 2021-04-27 15:32:05.000000000 +0000 @@ -2,13 +2,16 @@ + + diff -Nru mame-0.230+dfsg.1/hash/ti95_cart.xml mame-0.231+dfsg.1/hash/ti95_cart.xml --- mame-0.230+dfsg.1/hash/ti95_cart.xml 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/hash/ti95_cart.xml 2021-04-27 15:32:05.000000000 +0000 @@ -2,14 +2,17 @@ + + diff -Nru mame-0.230+dfsg.1/hash/trs80_cass.xml mame-0.231+dfsg.1/hash/trs80_cass.xml --- mame-0.230+dfsg.1/hash/trs80_cass.xml 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/hash/trs80_cass.xml 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,128 @@ + + + + + + + Android Nim + 1978 + 80-NW Publishing Co + + + + + + + + + + + Meteor Mission 2 + 1982 + Big Five Software + + + + + + + + + + + MicroChess 1.5 (L1) + 1978 + Micro-ware Limited + + + + + + + + + + Haunted House (L1) + 1980 + Tandy Corporation + + + + + + + + + + Invasion Force (L1) + 1979 + Tandy Corporation + + + + + + + + + + TRS-80 Marquee (L1) + 1979 + Tandy Corporation + + + + + + + + + + Quick Watson (L1) + 1978 + Radio Shack + + + + + + + + + + Flying Saucers (L1) + 1979 + Radio Shack + + + + + + + + + + + diff -Nru mame-0.230+dfsg.1/hash/trs80_flop.xml mame-0.231+dfsg.1/hash/trs80_flop.xml --- mame-0.230+dfsg.1/hash/trs80_flop.xml 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/hash/trs80_flop.xml 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,75 @@ + + + + + + + LDOS 5.3.1 + 1991 + Misosys + + + + + + + + + + + Lensman/DOS + 19?? + <unknown> + + + + + + + + + + + TRSDOS 6.21 + 1986 + Radio Shack + + + + + + + + + + + CP/M 2.2 + 1982 + Digital Research + + + + + + + + + + diff -Nru mame-0.230+dfsg.1/hash/trs80m2.xml mame-0.231+dfsg.1/hash/trs80m2.xml --- mame-0.230+dfsg.1/hash/trs80m2.xml 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/hash/trs80m2.xml 2021-04-27 15:32:05.000000000 +0000 @@ -18,7 +18,7 @@ - + LS-DOS v6.3.1A 1990 Misosys @@ -66,7 +66,7 @@ - + TRSDOS II v4.2 & TRSDOS16 v4.1 1979 Tandy @@ -104,7 +104,7 @@ - + XENIX v3.02 198? Tandy @@ -140,7 +140,7 @@ - + XENIX v3.2 1987 Tandy @@ -181,7 +181,7 @@ - + Xenix Development System v3.0 1985 Tandy diff -Nru mame-0.230+dfsg.1/hash/trs80_quik.xml mame-0.231+dfsg.1/hash/trs80_quik.xml --- mame-0.230+dfsg.1/hash/trs80_quik.xml 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/hash/trs80_quik.xml 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,37 @@ + + + + + + + Frogger + 1981 + Misosys + + + + + + + + + + diff -Nru mame-0.230+dfsg.1/hash/u110_card.xml mame-0.231+dfsg.1/hash/u110_card.xml --- mame-0.230+dfsg.1/hash/u110_card.xml 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/hash/u110_card.xml 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,199 @@ + + + + + + + Musitronics 1 Akkordeon (U-25) + 199? + musitronics GmbH + + + + + + + + + SN-MV30-01 Rhythm Section (U-31) + 1991 + Roland + + + + + + + + SN-MV30-02 Orchestral (U-30) + 1991 + Roland + + + + + + + + SN-U110-01 Pipe Organ & Harpsichord + 1989 + Roland + + + + + + + + SN-U110-02 Latin & F.X. Percussions + 1989 + Roland + + + + + + + + SN-U110-03 Ethnic + 1989 + Roland + + + + + + + + SN-U110-04 Electric Grand & Clavi + 1989 + Roland + + + + + + + + SN-U110-05 Orchestral Strings + 1989 + Roland + + + + + + + + SN-U110-06 Orchestral Winds + 1989 + Roland + + + + + + + + SN-U110-07 Electric Guitar + 1989 + Roland + + + + + + + + SN-U110-08 Synthesizer + 1989 + Roland + + + + + + + + SN-U110-09 Guitar & Keyboards + 1989 + Roland + + + + + + + + SN-U110-10 Rock Drums + 1989 + Roland + + + + + + + + SN-U110-11 Sound Effects + 1989 + Roland + + + + + + + + SN-U110-12 Sax & Trombone + 1989 + Roland + + + + + + + + SN-U110-13 Super Strings + 1992 + Roland + + + + + + + + SN-U110-14 Super Ac Guitar + 1992 + Roland + + + + + + + + SN-U110-15 Super Brass + 1992 + Roland + + + + + + + diff -Nru mame-0.230+dfsg.1/hash/vsmile_cart.xml mame-0.231+dfsg.1/hash/vsmile_cart.xml --- mame-0.230+dfsg.1/hash/vsmile_cart.xml 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/hash/vsmile_cart.xml 2021-04-27 15:32:05.000000000 +0000 @@ -355,6 +355,7 @@ | | 80-092323(UK) | The Wiggles - It's Wiggle Time! | +========+===================+================================================================================================+ | XX | 80-092340(US) | Thomas The Tank - Engines Working Together | +| XX | 80-092340(US) | Thomas The Tank - Engines Working Together (alt, 52-092340(US) on back label) | | | 80-092340-101(US) | Thomas The Tank - Engines Working Together (rev. 101) | | | 80-092342(NL) | Thomas de Stoomlocomotief' - Locomotieven Werken Somen (need pic, even the manual has -123 on cover) | | 80-092342-123(NL) | Thomas de Stoomlocomotief' - Locomotieven Werken Somen (rev. 123) | @@ -4071,6 +4072,21 @@ + + + Thomas & Friends - Engines Working Together (USA, alt) + 2005 + VTech + + + + + + + + + + Thomas & Friends - Engines Working Together (UK) diff -Nru mame-0.230+dfsg.1/language/Dutch/strings.po mame-0.231+dfsg.1/language/Dutch/strings.po --- mame-0.230+dfsg.1/language/Dutch/strings.po 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/language/Dutch/strings.po 2021-04-27 15:32:05.000000000 +0000 @@ -9,7 +9,7 @@ "Project-Id-Version: MAME\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-03-17 13:37+1100\n" -"PO-Revision-Date: 2018-04-30 14:35+0200\n" +"PO-Revision-Date: 2021-04-04 13:08+0200\n" "Last-Translator: Jos van Mourik\n" "Language-Team: MAME Language Team\n" "Language: nl\n" @@ -17,7 +17,7 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 2.0.6\n" +"X-Generator: Poedit 2.4.2\n" #: src/frontend/mame/ui/videoopt.cpp:56 #, c-format @@ -165,7 +165,7 @@ #: src/frontend/mame/ui/dirmenu.cpp:58 msgid "GameOver" -msgstr "Game over" +msgstr "Gameover" #: src/frontend/mame/ui/dirmenu.cpp:59 src/frontend/mame/ui/selmenu.cpp:83 msgid "HowTo" @@ -420,11 +420,11 @@ #: src/frontend/mame/ui/mainmenu.cpp:110 src/frontend/mame/ui/submenu.cpp:101 msgid "Video Options" -msgstr "Videoopties" +msgstr "Video opties" #: src/frontend/mame/ui/mainmenu.cpp:113 msgid "Crosshair Options" -msgstr "Vizieropties" +msgstr "Vizier opties" #: src/frontend/mame/ui/mainmenu.cpp:116 plugins/cheat/init.lua:753 msgid "Cheat" @@ -432,7 +432,7 @@ #: src/frontend/mame/ui/mainmenu.cpp:119 msgid "Plugin Options" -msgstr "Pluginopties" +msgstr "Plugin opties" #: src/frontend/mame/ui/mainmenu.cpp:122 msgid "External DAT View" @@ -468,7 +468,7 @@ #: src/frontend/mame/ui/optsmenu.cpp:72 src/frontend/mame/ui/sndmenu.cpp:149 msgid "Sound Options" -msgstr "Geluidsopties" +msgstr "Geluid opties" #: src/frontend/mame/ui/optsmenu.cpp:75 msgid "General Inputs" @@ -569,7 +569,7 @@ #: src/frontend/mame/ui/simpleselgame.cpp:344 #: src/frontend/mame/ui/selmenu.cpp:675 msgid "Graphics: Unimplemented, " -msgstr "Beeld: Ongeïmplementeerd, " +msgstr "Beeld: Niet geïmplementeerd, " #: src/frontend/mame/ui/simpleselgame.cpp:346 #: src/frontend/mame/ui/selmenu.cpp:677 @@ -589,7 +589,7 @@ #: src/frontend/mame/ui/simpleselgame.cpp:353 #: src/frontend/mame/ui/selmenu.cpp:684 msgid "Sound: Unimplemented" -msgstr "Geluid: Ongeïmplementeerd" +msgstr "Geluid: Niet geïmplementeerd" #: src/frontend/mame/ui/simpleselgame.cpp:355 #: src/frontend/mame/ui/selmenu.cpp:686 @@ -1002,11 +1002,11 @@ #: src/frontend/mame/ui/utils.cpp:75 msgid "Save Supported" -msgstr "Opslaan ondersteund" +msgstr "Ondersteunt opslaan" #: src/frontend/mame/ui/utils.cpp:76 msgid "Save Unsupported" -msgstr "Opslaan niet ondersteund" +msgstr "Ondersteunt opslaan niet" #: src/frontend/mame/ui/utils.cpp:77 msgid "CHD Required" @@ -1075,7 +1075,7 @@ #: src/frontend/mame/ui/utils.cpp:524 msgid "Add filter" -msgstr "Voeg filter toe" +msgstr "Filter toevoegen" #: src/frontend/mame/ui/utils.cpp:966 msgid "Select category:" @@ -1255,7 +1255,7 @@ #: src/frontend/mame/ui/custui.cpp:452 msgid "Selected color" -msgstr "Geselecteerde kleur" +msgstr "Geselecteerd kleur" #: src/frontend/mame/ui/custui.cpp:453 msgid "Normal text background" @@ -1267,7 +1267,7 @@ #: src/frontend/mame/ui/custui.cpp:455 msgid "Subitem color" -msgstr "Kleur subitem" +msgstr "Subitemkleur" #: src/frontend/mame/ui/custui.cpp:456 src/frontend/mame/ui/custui.cpp:511 msgid "Clone" @@ -1287,7 +1287,7 @@ #: src/frontend/mame/ui/custui.cpp:460 msgid "Unavailable color" -msgstr "Onbeschikbare kleur" +msgstr "Onbeschikbaar kleur" #: src/frontend/mame/ui/custui.cpp:461 msgid "Slider color" @@ -1464,7 +1464,7 @@ #: src/frontend/mame/ui/miscmenu.cpp:602 #, c-format msgid "%s.xml saved under ui folder." -msgstr "%s.xml is opgeslagen in de map 'ui'." +msgstr "%s.xml is opgeslagen in de ui map." #: src/frontend/mame/ui/miscmenu.cpp:628 msgid "Name: Description:\n" @@ -1561,7 +1561,7 @@ #: src/frontend/mame/ui/selgame.cpp:1059 msgid "Graphics\tUnimplemented\n" -msgstr "Beeld\tOngeïmplementeerd\n" +msgstr "Beeld\tNiet geïmplementeerd\n" #: src/frontend/mame/ui/selgame.cpp:1061 msgid "Graphics\tWrong Colors\n" @@ -1585,7 +1585,7 @@ #: src/frontend/mame/ui/selgame.cpp:1072 msgid "Sound\tUnimplemented\n" -msgstr "Geluid\tOngeïmplementeerd\n" +msgstr "Geluid\tNiet geïmplementeerd\n" #: src/frontend/mame/ui/selgame.cpp:1074 msgid "Sound\tImperfect\n" @@ -1597,15 +1597,15 @@ #: src/frontend/mame/ui/selgame.cpp:1079 msgid "Capture\tUnimplemented\n" -msgstr "" +msgstr "Opname\tNiet geïmplementeerd\n" #: src/frontend/mame/ui/selgame.cpp:1081 msgid "Capture\tImperfect\n" -msgstr "" +msgstr "Opname\tOnvolledig\n" #: src/frontend/mame/ui/selgame.cpp:1084 msgid "Camera\tUnimplemented\n" -msgstr "Camera\tOngeïmplementeerd\n" +msgstr "Camera\tNiet geïmplementeerd\n" #: src/frontend/mame/ui/selgame.cpp:1086 msgid "Camera\tImperfect\n" @@ -1613,7 +1613,7 @@ #: src/frontend/mame/ui/selgame.cpp:1089 msgid "Microphone\tUnimplemented\n" -msgstr "Microfoon\tOngeïmplementeerd\n" +msgstr "Microfoon\tNiet geïmplementeerd\n" #: src/frontend/mame/ui/selgame.cpp:1091 msgid "Microphone\tImperfect\n" @@ -1621,7 +1621,7 @@ #: src/frontend/mame/ui/selgame.cpp:1094 msgid "Controls\tUnimplemented\n" -msgstr "Besturing\tOngeïmplementeerd\n" +msgstr "Besturing\tNiet geïmplementeerd\n" #: src/frontend/mame/ui/selgame.cpp:1096 msgid "Controls\tImperfect\n" @@ -1629,7 +1629,7 @@ #: src/frontend/mame/ui/selgame.cpp:1099 msgid "Keyboard\tUnimplemented\n" -msgstr "Toetsenbord\tOngeïmplementeerd\n" +msgstr "Toetsenbord\tNiet geïmplementeerd\n" #: src/frontend/mame/ui/selgame.cpp:1101 msgid "Keyboard\tImperfect\n" @@ -1637,7 +1637,7 @@ #: src/frontend/mame/ui/selgame.cpp:1104 msgid "Mouse\tUnimplemented\n" -msgstr "Muis\tOngeïmplementeerd\n" +msgstr "Muis\tNiet geïmplementeerd\n" #: src/frontend/mame/ui/selgame.cpp:1106 msgid "Mouse\tImperfect\n" @@ -1645,15 +1645,15 @@ #: src/frontend/mame/ui/selgame.cpp:1109 msgid "Media\tUnimplemented\n" -msgstr "" +msgstr "Media\tNiet geïmplementeerd\n" #: src/frontend/mame/ui/selgame.cpp:1111 msgid "Media\tImperfect\n" -msgstr "" +msgstr "Media\tOnvolledig\n" #: src/frontend/mame/ui/selgame.cpp:1114 msgid "Disk\tUnimplemented\n" -msgstr "Schijf\tOngeïmplementeerd\n" +msgstr "Schijf\tNiet geïmplementeerd\n" #: src/frontend/mame/ui/selgame.cpp:1116 msgid "Disk\tImperfect\n" @@ -1661,7 +1661,7 @@ #: src/frontend/mame/ui/selgame.cpp:1119 msgid "Printer\tUnimplemented\n" -msgstr "Printer\tOngeïmplementeerd\n" +msgstr "Printer\tNiet geïmplementeerd\n" #: src/frontend/mame/ui/selgame.cpp:1121 msgid "Printer\tImperfect\n" @@ -1669,47 +1669,47 @@ #: src/frontend/mame/ui/selgame.cpp:1124 msgid "Mag. Tape\tUnimplemented\n" -msgstr "" +msgstr "Mag. Band\tNiet geïmplementeerd\n" #: src/frontend/mame/ui/selgame.cpp:1126 msgid "Mag. Tape\tImperfect\n" -msgstr "" +msgstr "Mag. Band\tOnvolledig\n" #: src/frontend/mame/ui/selgame.cpp:1129 msgid "Punch Tape\tUnimplemented\n" -msgstr "" +msgstr "Ponsband\tNiet geïmplementeerd\n" #: src/frontend/mame/ui/selgame.cpp:1131 msgid "Punch Tape\tImperfect\n" -msgstr "" +msgstr "Ponsband\tOnvolledig\n" #: src/frontend/mame/ui/selgame.cpp:1134 msgid "Mag. Drum\tUnimplemented\n" -msgstr "" +msgstr "Mag. trommel\tNiet geïmplementeerd\n" #: src/frontend/mame/ui/selgame.cpp:1136 msgid "Mag. Drum\tImperfect\n" -msgstr "" +msgstr "Mag. trommel\tOnvolledig\n" #: src/frontend/mame/ui/selgame.cpp:1139 msgid "(EP)ROM\tUnimplemented\n" -msgstr "" +msgstr "(EP)ROM\tNiet geïmplementeerd\n" #: src/frontend/mame/ui/selgame.cpp:1141 msgid "(EP)ROM\tImperfect\n" -msgstr "" +msgstr "(EP)ROM\tOnvolledig\n" #: src/frontend/mame/ui/selgame.cpp:1144 msgid "Communications\tUnimplemented\n" -msgstr "" +msgstr "Communicatie\tNiet geïmplementeerd\n" #: src/frontend/mame/ui/selgame.cpp:1146 msgid "Communications\tImperfect\n" -msgstr "" +msgstr "Communicatie\tOnvolledig\n" #: src/frontend/mame/ui/selgame.cpp:1149 msgid "LAN\tUnimplemented\n" -msgstr "LAN\tOngeïmplementeerd\n" +msgstr "LAN\tNiet geïmplementeerd\n" #: src/frontend/mame/ui/selgame.cpp:1151 msgid "LAN\tImperfect\n" @@ -1717,7 +1717,7 @@ #: src/frontend/mame/ui/selgame.cpp:1154 msgid "WAN\tUnimplemented\n" -msgstr "WAN\tOngeïmplementeerd\n" +msgstr "WAN\tNiet geïmplementeerd\n" #: src/frontend/mame/ui/selgame.cpp:1156 msgid "WAN\tImperfect\n" @@ -1725,7 +1725,7 @@ #: src/frontend/mame/ui/selgame.cpp:1159 msgid "Timing\tUnimplemented\n" -msgstr "Timing\tOngeïmplementeerd\n" +msgstr "Timing\tNiet geïmplementeerd\n" #: src/frontend/mame/ui/selgame.cpp:1161 msgid "Timing\tImperfect\n" @@ -1914,7 +1914,7 @@ #: src/frontend/mame/ui/submenu.cpp:39 msgid "Performance Options" -msgstr "Prestatieopties" +msgstr "Prestatie opties" #: src/frontend/mame/ui/submenu.cpp:40 msgid "Auto frame skip" @@ -2070,7 +2070,7 @@ #: src/frontend/mame/ui/submenu.cpp:84 msgid "Simultaneous contradictory" -msgstr "Gelijktijdige tegenstrijding" +msgstr "Gelijktijdig tegenstrijdig" #: src/frontend/mame/ui/submenu.cpp:85 msgid "Coin impulse" @@ -2138,11 +2138,11 @@ #: src/frontend/mame/ui/submenu.cpp:110 msgid "Bitmap Prescaling" -msgstr "Bitmap preschaling" +msgstr "Bitmap voorschaling" #: src/frontend/mame/ui/submenu.cpp:111 msgid "Window Mode" -msgstr "Schermmodus" +msgstr "Venstermodus" #: src/frontend/mame/ui/submenu.cpp:112 msgid "Enforce Aspect Ratio" @@ -2321,7 +2321,7 @@ #: src/frontend/mame/ui/devopt.cpp:259 msgid "* Media Options:\n" -msgstr "* Media Opties:\n" +msgstr "* Media opties:\n" #: src/frontend/mame/ui/devopt.cpp:261 #, c-format @@ -2330,7 +2330,7 @@ #: src/frontend/mame/ui/devopt.cpp:267 msgid "* Slot Options:\n" -msgstr "* Plek Opties:\n" +msgstr "* Plek opties:\n" #: src/frontend/mame/ui/devopt.cpp:274 msgid "[None]\n" @@ -2398,7 +2398,7 @@ #: src/frontend/mame/ui/info.cpp:36 msgid "capture hardware" -msgstr "" +msgstr "opnamehardware" #: src/frontend/mame/ui/info.cpp:37 msgid "camera" @@ -2422,7 +2422,7 @@ #: src/frontend/mame/ui/info.cpp:42 msgid "media" -msgstr "" +msgstr "media" #: src/frontend/mame/ui/info.cpp:43 msgid "disk" @@ -2434,23 +2434,23 @@ #: src/frontend/mame/ui/info.cpp:45 msgid "magnetic tape" -msgstr "" +msgstr "magneetband" #: src/frontend/mame/ui/info.cpp:46 msgid "punch tape" -msgstr "" +msgstr "ponsband" #: src/frontend/mame/ui/info.cpp:47 msgid "magnetic drum" -msgstr "" +msgstr "trommelgeheugen" #: src/frontend/mame/ui/info.cpp:48 msgid "solid state storage" -msgstr "" +msgstr "solid state opslag" #: src/frontend/mame/ui/info.cpp:49 msgid "communications" -msgstr "" +msgstr "communicatie" #: src/frontend/mame/ui/info.cpp:50 msgid "LAN" @@ -2465,7 +2465,7 @@ "One or more ROMs/CHDs for this machine are incorrect. The machine may not " "run correctly.\n" msgstr "" -"Één of meer ROMs/CHDs voor deze machine zijn niet correct. De machine kan " +"Eén of meer ROMs/CHDs voor deze machine zijn niet correct. De machine kan " "mogelijk niet goed functioneren.\n" #: src/frontend/mame/ui/info.cpp:198 @@ -2479,7 +2479,7 @@ #: src/frontend/mame/ui/info.cpp:203 msgid "" "One or more ROMs/CHDs for this machine have not been correctly dumped.\n" -msgstr "Één of meer ROMs/CHDs voor deze machine zijn niet correct gedumpt.\n" +msgstr "Eén of meer ROMs/CHDs voor deze machine zijn niet correct gedumpt.\n" #: src/frontend/mame/ui/info.cpp:208 msgid "Completely unemulated features: " @@ -2921,15 +2921,16 @@ #: plugins/cheatfind/init.lua:504 msgid "Pause Mode" -msgstr "" +msgstr "Pauzeermodus" #: plugins/cheatfind/init.lua:511 msgid "Manually pause & unpause the game when needed with the pause hotkey" msgstr "" +"Handmatig het spel wanneer nodig pauzeren en hervatten met de pauze sneltoets" #: plugins/cheatfind/init.lua:536 msgid "All slots cleared and current state saved to Slot 1" -msgstr "" +msgstr "Alle slots geleegd en huidige state opgeslagen in slot 1" #: plugins/cheatfind/init.lua:551 msgid "Start new search" @@ -2938,11 +2939,11 @@ #: plugins/cheatfind/init.lua:564 #, lua-format msgid "Memory State saved to Slot %d" -msgstr "" +msgstr "Geheugen state opgeslagen in slot %d" #: plugins/cheatfind/init.lua:583 msgid "Save Current Memory State to Slot " -msgstr "" +msgstr "Sla huidige geheugen state op in slot " #: plugins/cheatfind/init.lua:614 #, lua-format @@ -2951,15 +2952,15 @@ #: plugins/cheatfind/init.lua:655 msgid "Perform Compare : " -msgstr "" +msgstr "Vergelijking uitvoeren : " #: plugins/cheatfind/init.lua:672 msgid "Left less than right" -msgstr "" +msgstr "Links kleiner dan rechts" #: plugins/cheatfind/init.lua:674 msgid "Left greater than right" -msgstr "" +msgstr "Links groter dan rechts" #: plugins/cheatfind/init.lua:676 msgid "Left equal to right" @@ -2967,7 +2968,7 @@ #: plugins/cheatfind/init.lua:678 msgid "Left not equal to right" -msgstr "" +msgstr "Links niet gelijk aan rechts" #: plugins/cheatfind/init.lua:680 msgid "Left equal to right with bitmask" @@ -2999,7 +3000,7 @@ #: plugins/cheatfind/init.lua:714 msgid "Difference" -msgstr "" +msgstr "Verschil" #: plugins/cheatfind/init.lua:719 msgid "Any" @@ -3007,99 +3008,103 @@ #: plugins/cheatfind/init.lua:725 msgid "Data Format" -msgstr "Data Format" +msgstr "Dataformaat" #: plugins/cheatfind/init.lua:731 msgid "Test/Write Poke Value" -msgstr "" +msgstr "Test/schrijf pokewaarde" #: plugins/cheatfind/init.lua:738 msgid "" "Use this if you want to poke the Slot 1 value (eg. You started with " "something but lost it)" msgstr "" +"Gebruik dit voor het poken van de slot 1 waarde (eg. Je begon met iets maar " +"verloor het)" #: plugins/cheatfind/init.lua:740 msgid "" "Use this if you want to poke the Last Slot value (eg. You started without an " "item but finally got it)" msgstr "" +"Gebruik dit voor het poken van de laatste slot waarde (eg. Je begon zonder " +"een item maar kreeg het)" #: plugins/cheatfind/init.lua:742 msgid "Use this if you want to poke 0x00" -msgstr "" +msgstr "Gebruik dit voor het poken van 0x00" #: plugins/cheatfind/init.lua:744 msgid "Use this if you want to poke 0x01" -msgstr "" +msgstr "Gebruik dit voor het poken van 0x01" #: plugins/cheatfind/init.lua:746 msgid "Use this if you want to poke 0x02" -msgstr "" +msgstr "Gebruik dit voor het poken van 0x02" #: plugins/cheatfind/init.lua:748 msgid "Use this if you want to poke 0x03" -msgstr "" +msgstr "Gebruik dit voor het poken van 0x03" #: plugins/cheatfind/init.lua:750 msgid "Use this if you want to poke 0x04" -msgstr "" +msgstr "Gebruik dit voor het poken van 0x04" #: plugins/cheatfind/init.lua:752 msgid "Use this if you want to poke 0x05" -msgstr "" +msgstr "Gebruik dit voor het poken van 0x05" #: plugins/cheatfind/init.lua:754 msgid "Use this if you want to poke 0x06" -msgstr "" +msgstr "Gebruik dit voor het poken van 0x06" #: plugins/cheatfind/init.lua:756 msgid "Use this if you want to poke 0x07" -msgstr "" +msgstr "Gebruik dit voor het poken van 0x07" #: plugins/cheatfind/init.lua:758 msgid "Use this if you want to poke 0x08" -msgstr "" +msgstr "Gebruik dit voor het poken van 0x08" #: plugins/cheatfind/init.lua:760 msgid "Use this if you want to poke 0x09" -msgstr "" +msgstr "Gebruik dit voor het poken van 0x09" #: plugins/cheatfind/init.lua:762 msgid "Use this if you want to poke 0x63 (Decimal 99)" -msgstr "" +msgstr "Gebruik dit voor het poken van 0x63 (decimaal 99)" #: plugins/cheatfind/init.lua:764 msgid "Use this if you want to poke 0x99 (BCD 99)" -msgstr "" +msgstr "Gebruik dit voor het poken van 0x99 (BCD 99)" #: plugins/cheatfind/init.lua:766 msgid "Use this if you want to poke 0xFF (Decimal 255)" -msgstr "" +msgstr "Use this if you want to poke 0x99 (BCD 99)" #: plugins/cheatfind/init.lua:768 msgid "Use this if you want to poke 0x3E7 (Decimal 999)" -msgstr "" +msgstr "Gebruik dit voor het poken van 0x3E7 (decimaal 999)" #: plugins/cheatfind/init.lua:770 msgid "Use this if you want to poke 0x999 (BCD 999)" -msgstr "" +msgstr "Gebruik dit voor het poken van 0x999 (BCD 999)" #: plugins/cheatfind/init.lua:772 msgid "Use this if you want to poke 0x270F (Decimal 9999)" -msgstr "" +msgstr "Gebruik dit voor het poken van 0x270F (decimaal 9999)" #: plugins/cheatfind/init.lua:774 msgid "Use this if you want to poke 0x9999 (BCD 9999)" -msgstr "" +msgstr "Gebruik dit voor het poken van 0x9999 (BCD 9999)" #: plugins/cheatfind/init.lua:776 msgid "Use this if you want to poke 0xFFFF (Decimal 65535)" -msgstr "" +msgstr "Gebruik dit voor het poken van 0xFFFF (decimaal 65535)" #: plugins/cheatfind/init.lua:816 msgid "Undo last search -- #" -msgstr "Laatste zoekopdracht ongedaan maken -- #" +msgstr "Ongedaan maken van laatste zoekopdracht -- #" #: plugins/cheatfind/init.lua:820 msgid "Match block" @@ -3112,7 +3117,7 @@ #: plugins/cheatfind/init.lua:934 #, lua-format msgid "Test Cheat %08X:%02X" -msgstr "" +msgstr "Test cheat %08X:%02X" #: plugins/cheatfind/init.lua:974 msgid "Cheat engine not available" @@ -3136,7 +3141,7 @@ #: plugins/cheatfind/init.lua:1063 msgid "Clear Watches" -msgstr "Herstel Watches" +msgstr "Herstel watches" #: plugins/cheatfind/init.lua:1078 msgid "Cheat Finder" diff -Nru mame-0.230+dfsg.1/makefile mame-0.231+dfsg.1/makefile --- mame-0.230+dfsg.1/makefile 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/makefile 2021-04-27 15:32:05.000000000 +0000 @@ -90,6 +90,7 @@ # OVERRIDE_CC = cc # OVERRIDE_CXX = c++ # OVERRIDE_LD = ld +# OVERRIDE_AR = ar # DEPRECATED = 0 # LTO = 1 @@ -108,7 +109,7 @@ # FORCE_VERSION_COMPILE = 1 # MSBUILD = 1 -# IGNORE_BAD_LOCALISATION=1 +# IGNORE_BAD_LOCALISATION = 1 # PRECOMPILE = 0 # DEBUG_DIR=c:\test\location @@ -238,6 +239,7 @@ # build scripts will be run from # scripts/target/$(TARGET)/$(SUBTARGET).lua #------------------------------------------------- + ifdef PROJECT PARAMS += --PROJECT='$(PROJECT)' TARGET := $(PROJECT) @@ -591,6 +593,12 @@ LD := $(OVERRIDE_LD) endif endif +ifdef OVERRIDE_AR +PARAMS += --AR='$(OVERRIDE_AR)' +ifndef CROSS_BUILD +AR := $(OVERRIDE_AR) +endif +endif #------------------------------------------------- # sanity check the configuration @@ -893,11 +901,11 @@ ifdef SANITIZE PARAMS += --SANITIZE='$(SANITIZE)' endif + #------------------------------------------------- # All scripts #------------------------------------------------- - SCRIPTS = scripts/genie.lua \ scripts/src/lib.lua \ scripts/src/emu.lua \ @@ -1466,6 +1474,7 @@ #------------------------------------------------- # gmake-solaris #------------------------------------------------- + ifndef CLANG_VERSION $(PROJECTDIR)/$(MAKETYPE)-solaris/Makefile: makefile $(SCRIPTS) $(GENIE) $(SILENT) $(GENIE) $(PARAMS) $(TARGET_PARAMS) --gcc=solaris --gcc_version=$(GCC_VERSION) $(MAKETYPE) @@ -1486,6 +1495,7 @@ #------------------------------------------------- # gmake-solaris-clang #------------------------------------------------- + ifdef CLANG_VERSION $(PROJECTDIR)/$(MAKETYPE)-solaris/Makefile: makefile $(SCRIPTS) $(GENIE) $(SILENT) $(GENIE) $(PARAMS) $(TARGET_PARAMS) --gcc=solaris --gcc_version=$(CLANG_VERSION) $(MAKETYPE) @@ -1503,7 +1513,6 @@ $(SILENT) $(MAKE) -C $(PROJECTDIR)/$(MAKETYPE)-solaris config=$(CONFIG)32 precompile $(SILENT) $(MAKE) -C $(PROJECTDIR)/$(MAKETYPE)-solaris config=$(CONFIG)32 - #------------------------------------------------- # gmake-freebsd #------------------------------------------------- @@ -1673,6 +1682,7 @@ #------------------------------------------------- # cmake #------------------------------------------------- + .PHONY: cmake cmake: generate $(SILENT) $(GENIE) $(PARAMS) $(TARGET_PARAMS) cmake @@ -1745,14 +1755,14 @@ ifeq (posix,$(SHELLTYPE)) $(GENDIR)/version.cpp: makefile $(GENDIR)/git_desc | $(GEN_FOLDERS) - @echo '#define BARE_BUILD_VERSION "0.230"' > $@ + @echo '#define BARE_BUILD_VERSION "0.231"' > $@ @echo 'extern const char bare_build_version[];' >> $@ @echo 'extern const char build_version[];' >> $@ @echo 'const char bare_build_version[] = BARE_BUILD_VERSION;' >> $@ @echo 'const char build_version[] = BARE_BUILD_VERSION " ($(NEW_GIT_VERSION))";' >> $@ else $(GENDIR)/version.cpp: makefile $(GENDIR)/git_desc | $(GEN_FOLDERS) - @echo #define BARE_BUILD_VERSION "0.230" > $@ + @echo #define BARE_BUILD_VERSION "0.231" > $@ @echo extern const char bare_build_version[]; >> $@ @echo extern const char build_version[]; >> $@ @echo const char bare_build_version[] = BARE_BUILD_VERSION; >> $@ @@ -1771,6 +1781,7 @@ else $(SILENT)$(PYTHON) scripts/build/msgfmt.py --output-file $@ $< endif + #------------------------------------------------- # Regression tests #------------------------------------------------- diff -Nru mame-0.230+dfsg.1/plugins/cheat/cheat_xml.lua mame-0.231+dfsg.1/plugins/cheat/cheat_xml.lua --- mame-0.230+dfsg.1/plugins/cheat/cheat_xml.lua 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/plugins/cheat/cheat_xml.lua 2021-04-27 15:32:05.000000000 +0000 @@ -264,14 +264,12 @@ if next(spaces) then data["cheat"][count]["space"] = {} for name, space in pairs(spaces) do - data["cheat"][count]["space"] = {} data["cheat"][count]["space"][name] = { type = space["type"], tag = space["tag"] } end end if next(regions) then data["cheat"][count]["region"] = {} for name, region in pairs(regions) do - data["cheat"][count]["region"] = {} data["cheat"][count]["region"][name] = region end end diff -Nru mame-0.230+dfsg.1/plugins/cheat/init.lua mame-0.231+dfsg.1/plugins/cheat/init.lua --- mame-0.230+dfsg.1/plugins/cheat/init.lua 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/plugins/cheat/init.lua 2021-04-27 15:32:05.000000000 +0000 @@ -95,17 +95,13 @@ local filename = emu.romname() local newcheats = {} local file = emu.file(manager.machine.options.entries.cheatpath:value():gsub("([^;]+)", "%1;%1/cheat") , 1) - if emu.softname() ~= "" then - if emu.softname():find(":") then - filename = emu.softname():gsub(":", "/") - else - for name, image in pairs(manager.machine.images) do - if image.exists and image.software_list_name ~= "" then - filename = image.software_list_name .. "/" .. emu.softname() - end - end + + for name, image in pairs(manager.machine.images) do + if image.exists and image.software_list_name ~= "" then + filename = image.software_list_name .. "/" .. image.filename end end + cheatname = filename local function add(addcheats) if not next(newcheats) then @@ -528,7 +524,8 @@ local scr = manager.machine.screens[screen] if not scr then local tag - tag, scr = next(manager.machine.screens) -- get any screen + local nxt, coll = manager.machine.screens:pairs() + tag, scr = nxt(coll) -- get any screen end cheat.cheat_env[name] = scr end diff -Nru mame-0.230+dfsg.1/plugins/data/data_history.lua mame-0.231+dfsg.1/plugins/data/data_history.lua --- mame-0.230+dfsg.1/plugins/data/data_history.lua 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/plugins/data/data_history.lua 2021-04-27 15:32:05.000000000 +0000 @@ -80,6 +80,8 @@ if dbver then db.exec("DELETE FROM \"" .. file .. "\"") db.check("deleting history") + db.exec("DELETE FROM \"" .. file .. "_idx\"") + db.check("deleting index") stmt = db.prepare("UPDATE version SET version = ? WHERE datfile = ?") db.check("updating history version") else diff -Nru mame-0.230+dfsg.1/scripts/genie.lua mame-0.231+dfsg.1/scripts/genie.lua --- mame-0.230+dfsg.1/scripts/genie.lua 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/scripts/genie.lua 2021-04-27 15:32:05.000000000 +0000 @@ -203,6 +203,11 @@ } newoption { + trigger = "AR", + description = "AR replacement", +} + +newoption { trigger = "TOOLCHAIN", description = "Toolchain prefix" } @@ -485,15 +490,13 @@ flags { "StaticRuntime", + "Cpp17", } configuration { "vs20*" } buildoptions { "/bigobj", } - buildoptions_cpp { - "/std:c++17", - } flags { "ExtraWarnings", } @@ -1434,6 +1437,7 @@ "-Wno-unused-local-typedef", "-Wno-unused-private-field", "-Wno-unused-variable", + "-Wno-microsoft-cast", } end diff -Nru mame-0.230+dfsg.1/scripts/src/bus.lua mame-0.231+dfsg.1/scripts/src/bus.lua --- mame-0.230+dfsg.1/scripts/src/bus.lua 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/scripts/src/bus.lua 2021-04-27 15:32:05.000000000 +0000 @@ -190,6 +190,19 @@ } end +--------------------------------------------------- +-- +--@src/devices/bus/adb/adb.h,BUSES["ADB"] = true +--------------------------------------------------- + +if (BUSES["ADB"]~=null) then + files { + MAME_DIR .. "src/devices/bus/adb/adb.cpp", + MAME_DIR .. "src/devices/bus/adb/adb.h", + MAME_DIR .. "src/devices/bus/adb/adbhle.cpp", + MAME_DIR .. "src/devices/bus/adb/adbhle.h", + } +end --------------------------------------------------- -- @@ -2417,8 +2430,8 @@ MAME_DIR .. "src/devices/bus/a2bus/corvfdc02.h", MAME_DIR .. "src/devices/bus/a2bus/ezcgi.cpp", MAME_DIR .. "src/devices/bus/a2bus/ezcgi.h", - MAME_DIR .. "src/devices/bus/a2bus/grapplerplus.cpp", - MAME_DIR .. "src/devices/bus/a2bus/grapplerplus.h", + MAME_DIR .. "src/devices/bus/a2bus/grappler.cpp", + MAME_DIR .. "src/devices/bus/a2bus/grappler.h", MAME_DIR .. "src/devices/bus/a2bus/laser128.cpp", MAME_DIR .. "src/devices/bus/a2bus/laser128.h", MAME_DIR .. "src/devices/bus/a2bus/mouse.cpp", @@ -2490,6 +2503,12 @@ MAME_DIR .. "src/devices/bus/nscsi/cdd2000.h", MAME_DIR .. "src/devices/bus/nscsi/cdrn820s.cpp", MAME_DIR .. "src/devices/bus/nscsi/cdrn820s.h", + MAME_DIR .. "src/devices/bus/nscsi/cdu75s.cpp", + MAME_DIR .. "src/devices/bus/nscsi/cdu75s.h", + MAME_DIR .. "src/devices/bus/nscsi/cdu415.cpp", + MAME_DIR .. "src/devices/bus/nscsi/cdu415.h", + MAME_DIR .. "src/devices/bus/nscsi/cdu561.cpp", + MAME_DIR .. "src/devices/bus/nscsi/cdu561.h", MAME_DIR .. "src/devices/bus/nscsi/cw7501.cpp", MAME_DIR .. "src/devices/bus/nscsi/cw7501.h", MAME_DIR .. "src/devices/bus/nscsi/devices.cpp", @@ -2568,6 +2587,8 @@ MAME_DIR .. "src/devices/bus/centronics/comxpl80.h", MAME_DIR .. "src/devices/bus/centronics/covox.cpp", MAME_DIR .. "src/devices/bus/centronics/covox.h", + MAME_DIR .. "src/devices/bus/centronics/digiblst.cpp", + MAME_DIR .. "src/devices/bus/centronics/digiblst.h", MAME_DIR .. "src/devices/bus/centronics/dsjoy.cpp", MAME_DIR .. "src/devices/bus/centronics/dsjoy.h", MAME_DIR .. "src/devices/bus/centronics/epson_ex800.cpp", @@ -2580,21 +2601,23 @@ MAME_DIR .. "src/devices/bus/centronics/nec_p72.h", MAME_DIR .. "src/devices/bus/centronics/printer.cpp", MAME_DIR .. "src/devices/bus/centronics/printer.h", - MAME_DIR .. "src/devices/bus/centronics/digiblst.cpp", - MAME_DIR .. "src/devices/bus/centronics/digiblst.h", MAME_DIR .. "src/devices/bus/centronics/samdac.cpp", MAME_DIR .. "src/devices/bus/centronics/samdac.h", + MAME_DIR .. "src/devices/bus/centronics/smartboard.cpp", + MAME_DIR .. "src/devices/bus/centronics/smartboard.h", } dependency { { MAME_DIR .. "src/devices/bus/centronics/epson_ex800.cpp", GEN_DIR .. "emu/layout/ex800.lh" }, { MAME_DIR .. "src/devices/bus/centronics/epson_lx800.cpp", GEN_DIR .. "emu/layout/lx800.lh" }, { MAME_DIR .. "src/devices/bus/centronics/epson_lx810l.cpp", GEN_DIR .. "emu/layout/lx800.lh" }, + { MAME_DIR .. "src/devices/bus/centronics/smartboard.cpp", GEN_DIR .. "emu/layout/smartboard.lh" }, } custombuildtask { layoutbuildtask("emu/layout", "ex800"), layoutbuildtask("emu/layout", "lx800"), + layoutbuildtask("emu/layout", "smartboard"), } end @@ -4474,3 +4497,25 @@ MAME_DIR .. "src/devices/bus/samcoupe/mouse/mouse.h", } end + +--------------------------------------------------- +-- +--@src/devices/bus/thomson/extension.h,BUSES["THOMSON"] = true +--------------------------------------------------- + +if (BUSES["THOMSON"]~=null) then + files { + MAME_DIR .. "src/devices/bus/thomson/extension.cpp", + MAME_DIR .. "src/devices/bus/thomson/extension.h", + MAME_DIR .. "src/devices/bus/thomson/cd90_015.cpp", + MAME_DIR .. "src/devices/bus/thomson/cd90_015.h", + MAME_DIR .. "src/devices/bus/thomson/cq90_028.cpp", + MAME_DIR .. "src/devices/bus/thomson/cq90_028.h", + MAME_DIR .. "src/devices/bus/thomson/cd90_351.cpp", + MAME_DIR .. "src/devices/bus/thomson/cd90_351.h", + MAME_DIR .. "src/devices/bus/thomson/cd90_640.cpp", + MAME_DIR .. "src/devices/bus/thomson/cd90_640.h", + MAME_DIR .. "src/devices/bus/thomson/nanoreseau.cpp", + MAME_DIR .. "src/devices/bus/thomson/nanoreseau.h", + } +end diff -Nru mame-0.230+dfsg.1/scripts/src/cpu.lua mame-0.231+dfsg.1/scripts/src/cpu.lua --- mame-0.230+dfsg.1/scripts/src/cpu.lua 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/scripts/src/cpu.lua 2021-04-27 15:32:05.000000000 +0000 @@ -666,6 +666,8 @@ MAME_DIR .. "src/devices/cpu/h8/h83006.h", MAME_DIR .. "src/devices/cpu/h8/h83008.cpp", MAME_DIR .. "src/devices/cpu/h8/h83008.h", + MAME_DIR .. "src/devices/cpu/h8/h83032.cpp", + MAME_DIR .. "src/devices/cpu/h8/h83032.h", MAME_DIR .. "src/devices/cpu/h8/h83048.cpp", MAME_DIR .. "src/devices/cpu/h8/h83048.h", MAME_DIR .. "src/devices/cpu/h8/h8s2245.cpp", diff -Nru mame-0.230+dfsg.1/scripts/src/machine.lua mame-0.231+dfsg.1/scripts/src/machine.lua --- mame-0.230+dfsg.1/scripts/src/machine.lua 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/scripts/src/machine.lua 2021-04-27 15:32:05.000000000 +0000 @@ -3172,6 +3172,19 @@ } end + +--------------------------------------------------- +-- +--@src/devices/machine/smartboard.h,MACHINES["TASC_SB30"] = true +--------------------------------------------------- + +if (MACHINES["TASC_SB30"]~=null) then + files { + MAME_DIR .. "src/devices/machine/smartboard.cpp", + MAME_DIR .. "src/devices/machine/smartboard.h", + } +end + --------------------------------------------------- -- --@src/devices/machine/tc009xlvc.h,MACHINES["TC0091LVC"] = true @@ -4606,6 +4619,7 @@ --------------------------------------------------- if (MACHINES["CXD1185"]~=null) then + MACHINES["NSCSI"] = true files { MAME_DIR .. "src/devices/machine/cxd1185.cpp", MAME_DIR .. "src/devices/machine/cxd1185.h", diff -Nru mame-0.230+dfsg.1/scripts/src/osd/modules.lua mame-0.231+dfsg.1/scripts/src/osd/modules.lua --- mame-0.230+dfsg.1/scripts/src/osd/modules.lua 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/scripts/src/osd/modules.lua 2021-04-27 15:32:05.000000000 +0000 @@ -82,6 +82,7 @@ MAME_DIR .. "src/osd/modules/sound/js_sound.cpp", MAME_DIR .. "src/osd/modules/sound/direct_sound.cpp", MAME_DIR .. "src/osd/modules/sound/pa_sound.cpp", + MAME_DIR .. "src/osd/modules/sound/pulse_sound.cpp", MAME_DIR .. "src/osd/modules/sound/coreaudio_sound.cpp", MAME_DIR .. "src/osd/modules/sound/sdl_sound.cpp", MAME_DIR .. "src/osd/modules/sound/xaudio2_sound.cpp", @@ -270,6 +271,12 @@ } end + if _OPTIONS["NO_USE_PULSEAUDIO"]=="1" then + defines { + "NO_USE_PULSEAUDIO", + } + end + if _OPTIONS["NO_USE_MIDI"]=="1" then defines { "NO_USE_MIDI", @@ -501,6 +508,11 @@ } end + if _OPTIONS["NO_USE_PULSEAUDIO"]=="0" then + links { + ext_lib("pulse"), + } + end end @@ -578,6 +590,23 @@ end end +newoption { + trigger = "NO_USE_PULSEAUDIO", + description = "Disable PulseAudio interface", + allowed = { + { "0", "Enable PulseAudio" }, + { "1", "Disable PulseAudio" }, + }, +} + +if not _OPTIONS["NO_USE_PULSEAUDIO"] then + if _OPTIONS["targetos"]=="linux" then + _OPTIONS["NO_USE_PULSEAUDIO"] = "0" + else + _OPTIONS["NO_USE_PULSEAUDIO"] = "1" + end +end + newoption { trigger = "MODERN_WIN_API", description = "Use Modern Windows APIs", diff -Nru mame-0.230+dfsg.1/scripts/src/sound.lua mame-0.231+dfsg.1/scripts/src/sound.lua --- mame-0.230+dfsg.1/scripts/src/sound.lua 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/scripts/src/sound.lua 2021-04-27 15:32:05.000000000 +0000 @@ -1175,13 +1175,12 @@ --@src/devices/sound/ym2608.h,SOUNDS["YM2608"] = true --@src/devices/sound/ym2610.h,SOUNDS["YM2610"] = true --@src/devices/sound/ym2612.h,SOUNDS["YM2612"] = true ---@src/devices/sound/3812intf.h,SOUNDS["YM3812"] = true ---@src/devices/sound/3526intf.h,SOUNDS["YM3526"] = true ---@src/devices/sound/8950intf.h,SOUNDS["Y8950"] = true +--@src/devices/sound/ym3526.h,SOUNDS["YM3526"] = true +--@src/devices/sound/ym3812.h,SOUNDS["YM3812"] = true --@src/devices/sound/ymf262.h,SOUNDS["YMF262"] = true --@src/devices/sound/ymf271.h,SOUNDS["YMF271"] = true --@src/devices/sound/ymf278b.h,SOUNDS["YMF278B"] = true ---@src/devices/sound/262intf.h,SOUNDS["YMF262"] = true +--@src/devices/sound/y8950.h,SOUNDS["Y8950"] = true --------------------------------------------------- if (SOUNDS["YM2151"]~=null) then @@ -1193,10 +1192,12 @@ } end -if (SOUNDS["YM2413"]~=null) then +if (SOUNDS["YM2413"]~=null or SOUNDS["YM2423"]~=null or SOUNDS["YMF281"]~=null or SOUNDS["DS1001"]~=null) then files { MAME_DIR .. "src/devices/sound/ym2413.cpp", MAME_DIR .. "src/devices/sound/ym2413.h", + MAME_DIR .. "src/devices/sound/ymfm.cpp", + MAME_DIR .. "src/devices/sound/ymfm.h", } end @@ -1252,34 +1253,30 @@ if (SOUNDS["YM3812"]~=null or SOUNDS["YM3526"]~=null or SOUNDS["Y8950"]~=null) then --if (SOUNDS["YM3812"]~=null) then files { - MAME_DIR .. "src/devices/sound/3812intf.cpp", - MAME_DIR .. "src/devices/sound/3812intf.h", - MAME_DIR .. "src/devices/sound/fmopl.cpp", - MAME_DIR .. "src/devices/sound/fmopl.h", - MAME_DIR .. "src/devices/sound/ymdeltat.cpp", - MAME_DIR .. "src/devices/sound/ymdeltat.h", + MAME_DIR .. "src/devices/sound/ym3812.cpp", + MAME_DIR .. "src/devices/sound/ym3812.h", + MAME_DIR .. "src/devices/sound/ymfm.cpp", + MAME_DIR .. "src/devices/sound/ymfm.h", } --end --if (SOUNDS["YM3526"]~=null) then files { - MAME_DIR .. "src/devices/sound/3526intf.cpp", - MAME_DIR .. "src/devices/sound/3526intf.h", - MAME_DIR .. "src/devices/sound/fmopl.cpp", - MAME_DIR .. "src/devices/sound/fmopl.h", - MAME_DIR .. "src/devices/sound/ymdeltat.cpp", - MAME_DIR .. "src/devices/sound/ymdeltat.h", + MAME_DIR .. "src/devices/sound/ym3526.cpp", + MAME_DIR .. "src/devices/sound/ym3526.h", + MAME_DIR .. "src/devices/sound/ymfm.cpp", + MAME_DIR .. "src/devices/sound/ymfm.h", } --end --if (SOUNDS["Y8950"]~=null) then files { - MAME_DIR .. "src/devices/sound/8950intf.cpp", - MAME_DIR .. "src/devices/sound/8950intf.h", - MAME_DIR .. "src/devices/sound/fmopl.cpp", - MAME_DIR .. "src/devices/sound/fmopl.h", - MAME_DIR .. "src/devices/sound/ymdeltat.cpp", - MAME_DIR .. "src/devices/sound/ymdeltat.h", + MAME_DIR .. "src/devices/sound/y8950.cpp", + MAME_DIR .. "src/devices/sound/y8950.h", + MAME_DIR .. "src/devices/sound/ymfm.cpp", + MAME_DIR .. "src/devices/sound/ymfm.h", + MAME_DIR .. "src/devices/sound/ymadpcm.cpp", + MAME_DIR .. "src/devices/sound/ymadpcm.h", } --end end @@ -1288,8 +1285,8 @@ files { MAME_DIR .. "src/devices/sound/ymf262.cpp", MAME_DIR .. "src/devices/sound/ymf262.h", - MAME_DIR .. "src/devices/sound/262intf.cpp", - MAME_DIR .. "src/devices/sound/262intf.h", + MAME_DIR .. "src/devices/sound/ymfm.cpp", + MAME_DIR .. "src/devices/sound/ymfm.h", } end @@ -1304,6 +1301,8 @@ files { MAME_DIR .. "src/devices/sound/ymf278b.cpp", MAME_DIR .. "src/devices/sound/ymf278b.h", + MAME_DIR .. "src/devices/sound/ymfm.cpp", + MAME_DIR .. "src/devices/sound/ymfm.h", } end diff -Nru mame-0.230+dfsg.1/scripts/target/mame/arcade.lua mame-0.231+dfsg.1/scripts/target/mame/arcade.lua --- mame-0.230+dfsg.1/scripts/target/mame/arcade.lua 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/scripts/target/mame/arcade.lua 2021-04-27 15:32:05.000000000 +0000 @@ -412,8 +412,6 @@ MACHINES["CR511B"] = true MACHINES["DMAC"] = true MACHINES["GAYLE"] = true -MACHINES["NCR53C7XX"] = true -MACHINES["LSI53C810"] = true MACHINES["2812FIFO"] = true MACHINES["6522VIA"] = true MACHINES["TPI6525"] = true @@ -479,6 +477,7 @@ --MACHINES["CS4031"] = true --MACHINES["CS8221"] = true MACHINES["CXD1095"] = true +MACHINES["CXD1185"] = true MACHINES["DP8390"] = true --MACHINES["DP8573"] = true MACHINES["DS1204"] = true @@ -543,7 +542,7 @@ MACHINES["LINFLASH"] = true --MACHINES["LOCOMO"] = true MACHINES["LPCI"] = true ---MACHINES["LSI53C810"] = true +MACHINES["LSI53C810"] = true --MACHINES["M3002"] = true --MACHINES["M68307"] = true --MACHINES["M68340"] = true @@ -594,7 +593,7 @@ MACHINES["NCR5390"] = true MACHINES["NCR539x"] = true MACHINES["NETLIST"] = true ---MACHINES["NCR53C7XX"] = true +MACHINES["NCR53C7XX"] = true MACHINES["NMC9306"] = true --MACHINES["NSC810"] = true MACHINES["NSCSI"] = true @@ -644,7 +643,7 @@ MACHINES["SCUDSP"] = true MACHINES["SDA2006"] = true --MACHINES["SECFLASH"] = true ---MACHINES["SENSORBOARD"] = true +MACHINES["SENSORBOARD"] = true MACHINES["SERFLASH"] = true MACHINES["SMC91C9X"] = true MACHINES["SEGA_SCU"] = true @@ -653,6 +652,7 @@ MACHINES["STVCD"] = true --MACHINES["SUN4C_MMU"] = true MACHINES["SWTPC8212"] = true +MACHINES["TASC_SB30"] = true MACHINES["TC0091LVC"] = true --MACHINES["TDC1008"] = true MACHINES["TE7750"] = true @@ -754,6 +754,7 @@ --BUSES["ABCKB"] = true --BUSES["ADAM"] = true --BUSES["ADAMNET"] = true +--BUSES["ADB"] = true --BUSES["APF"] = true BUSES["AMIGA_KEYBOARD"] = true --BUSES["ARCADIA"] = true @@ -842,6 +843,7 @@ --BUSES["X68K"] = true --BUSES["Z88"] = true BUSES["ZORRO"] = true +--BUSES["THOMSON"] = true -------------------------------------------------- @@ -2557,6 +2559,8 @@ MAME_DIR .. "src/mame/machine/k573msu.h", MAME_DIR .. "src/mame/machine/k573npu.cpp", MAME_DIR .. "src/mame/machine/k573npu.h", + MAME_DIR .. "src/mame/machine/k007452.cpp", + MAME_DIR .. "src/mame/machine/k007452.h", MAME_DIR .. "src/mame/machine/zs01.cpp", MAME_DIR .. "src/mame/machine/zs01.h", MAME_DIR .. "src/mame/drivers/labyrunr.cpp", @@ -2985,6 +2989,8 @@ MAME_DIR .. "src/mame/includes/namcos2.h", MAME_DIR .. "src/mame/machine/namcos2.cpp", MAME_DIR .. "src/mame/video/namcos2.cpp", + MAME_DIR .. "src/mame/video/namco_c45road.cpp", + MAME_DIR .. "src/mame/video/namco_c45road.h", MAME_DIR .. "src/mame/video/namco_c169roz.cpp", MAME_DIR .. "src/mame/video/namco_c169roz.h", MAME_DIR .. "src/mame/video/namco_c355spr.cpp", @@ -3082,8 +3088,6 @@ MAME_DIR .. "src/mame/audio/namco54.h", MAME_DIR .. "src/mame/video/namco_c116.cpp", MAME_DIR .. "src/mame/video/namco_c116.h", - MAME_DIR .. "src/mame/video/c45.cpp", - MAME_DIR .. "src/mame/video/c45.h", } createMAMEProjects(_target, _subtarget, "nasco") @@ -3860,8 +3864,9 @@ createMAMEProjects(_target, _subtarget, "snk") files { MAME_DIR .. "src/mame/drivers/bbusters.cpp", - MAME_DIR .. "src/mame/includes/bbusters.h", - MAME_DIR .. "src/mame/video/bbusters.cpp", + MAME_DIR .. "src/mame/drivers/mechatt.cpp", + MAME_DIR .. "src/mame/video/snk_bbusters_spr.cpp", + MAME_DIR .. "src/mame/video/snk_bbusters_spr.h", MAME_DIR .. "src/mame/drivers/dmndrby.cpp", MAME_DIR .. "src/mame/drivers/hng64.cpp", MAME_DIR .. "src/mame/includes/hng64.h", diff -Nru mame-0.230+dfsg.1/scripts/target/mame/mess.lua mame-0.231+dfsg.1/scripts/target/mame/mess.lua --- mame-0.230+dfsg.1/scripts/target/mame/mess.lua 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/scripts/target/mame/mess.lua 2021-04-27 15:32:05.000000000 +0000 @@ -689,6 +689,7 @@ MACHINES["STVCD"] = true MACHINES["SUN4C_MMU"] = true MACHINES["SWTPC8212"] = true +MACHINES["TASC_SB30"] = true MACHINES["TC0091LVC"] = true MACHINES["TDC1008"] = true --MACHINES["TE7750"] = true @@ -824,6 +825,7 @@ BUSES["ACORN"] = true BUSES["ADAM"] = true BUSES["ADAMNET"] = true +BUSES["ADB"] = true BUSES["APF"] = true BUSES["APRICOT_EXPANSION"] = true BUSES["APRICOT_KEYBOARD"] = true @@ -957,6 +959,7 @@ BUSES["SVI_SLOT"] = true BUSES["TANBUS"] = true BUSES["TATUNG_PIPE"] = true +BUSES["THOMSON"] = true BUSES["TMC600"] = true BUSES["TI8X"] = true BUSES["TI99"] = true @@ -2533,20 +2536,27 @@ createMESSProjects(_target, _subtarget, "hegener") files { MAME_DIR .. "src/mame/drivers/mephisto_academy.cpp", + MAME_DIR .. "src/mame/drivers/mephisto_amsterdam.cpp", MAME_DIR .. "src/mame/drivers/mephisto_berlin.cpp", MAME_DIR .. "src/mame/drivers/mephisto_brikett.cpp", MAME_DIR .. "src/mame/drivers/mephisto_glasgow.cpp", + MAME_DIR .. "src/mame/drivers/mephisto_milano.cpp", MAME_DIR .. "src/mame/drivers/mephisto_mm1.cpp", MAME_DIR .. "src/mame/drivers/mephisto_mm2.cpp", MAME_DIR .. "src/mame/drivers/mephisto_modena.cpp", MAME_DIR .. "src/mame/drivers/mephisto_modular.cpp", MAME_DIR .. "src/mame/drivers/mephisto_modular_tm.cpp", MAME_DIR .. "src/mame/drivers/mephisto_mondial.cpp", + MAME_DIR .. "src/mame/drivers/mephisto_mondial2.cpp", MAME_DIR .. "src/mame/drivers/mephisto_mondial68k.cpp", MAME_DIR .. "src/mame/drivers/mephisto_montec.cpp", MAME_DIR .. "src/mame/drivers/mephisto_polgar.cpp", + MAME_DIR .. "src/mame/drivers/mephisto_risc.cpp", + MAME_DIR .. "src/mame/drivers/mephisto_smondial.cpp", MAME_DIR .. "src/mame/machine/mmboard.cpp", MAME_DIR .. "src/mame/machine/mmboard.h", + MAME_DIR .. "src/mame/video/mmdisplay1.cpp", + MAME_DIR .. "src/mame/video/mmdisplay1.h", MAME_DIR .. "src/mame/video/mmdisplay2.cpp", MAME_DIR .. "src/mame/video/mmdisplay2.h", } @@ -2681,6 +2691,7 @@ MAME_DIR .. "src/mame/drivers/basic52.cpp", MAME_DIR .. "src/mame/drivers/imds2.cpp", MAME_DIR .. "src/mame/drivers/intellec4.cpp", + MAME_DIR .. "src/mame/drivers/intellec8.cpp", MAME_DIR .. "src/mame/drivers/ipc.cpp", MAME_DIR .. "src/mame/drivers/ipds.cpp", MAME_DIR .. "src/mame/drivers/isbc.cpp", @@ -3427,6 +3438,7 @@ MAME_DIR .. "src/mame/drivers/roland_jx8p.cpp", MAME_DIR .. "src/mame/drivers/roland_mc50.cpp", MAME_DIR .. "src/mame/drivers/roland_mt32.cpp", + MAME_DIR .. "src/mame/drivers/roland_pr100.cpp", MAME_DIR .. "src/mame/drivers/roland_r8.cpp", MAME_DIR .. "src/mame/drivers/roland_ra30.cpp", MAME_DIR .. "src/mame/drivers/roland_s10.cpp", @@ -3451,6 +3463,8 @@ MAME_DIR .. "src/mame/machine/mb62h195.h", MAME_DIR .. "src/mame/machine/mb63h149.cpp", MAME_DIR .. "src/mame/machine/mb63h149.h", + MAME_DIR .. "src/mame/machine/mb87013.cpp", + MAME_DIR .. "src/mame/machine/mb87013.h", MAME_DIR .. "src/mame/machine/pg200.cpp", MAME_DIR .. "src/mame/machine/pg200.h", } @@ -3848,8 +3862,6 @@ createMESSProjects(_target, _subtarget, "tasc") files { MAME_DIR .. "src/mame/drivers/tasc.cpp", - MAME_DIR .. "src/mame/machine/smartboard.cpp", - MAME_DIR .. "src/mame/machine/smartboard.h", } createMESSProjects(_target, _subtarget, "tatung") @@ -3933,8 +3945,6 @@ MAME_DIR .. "src/mame/drivers/thomson.cpp", MAME_DIR .. "src/mame/includes/thomson.h", MAME_DIR .. "src/mame/machine/thomson.cpp", - MAME_DIR .. "src/mame/machine/thomflop.cpp", - MAME_DIR .. "src/mame/machine/thomflop.h", MAME_DIR .. "src/mame/video/thomson.cpp", } @@ -4050,6 +4060,9 @@ MAME_DIR .. "src/mame/includes/dgnalpha.h", MAME_DIR .. "src/mame/video/gime.cpp", MAME_DIR .. "src/mame/video/gime.h", + MAME_DIR .. "src/mame/drivers/lnw80.cpp", + MAME_DIR .. "src/mame/drivers/max80.cpp", + MAME_DIR .. "src/mame/drivers/radionic.cpp", MAME_DIR .. "src/mame/drivers/trs80.cpp", MAME_DIR .. "src/mame/includes/trs80.h", MAME_DIR .. "src/mame/machine/trs80.cpp", @@ -4423,6 +4436,9 @@ MAME_DIR .. "src/mame/includes/aussiebyte.h", MAME_DIR .. "src/mame/video/aussiebyte.cpp", MAME_DIR .. "src/mame/drivers/ax20.cpp", + MAME_DIR .. "src/mame/drivers/basf7100.cpp", + MAME_DIR .. "src/mame/machine/basf7100_kbd.cpp", + MAME_DIR .. "src/mame/machine/basf7100_kbd.h", MAME_DIR .. "src/mame/drivers/binbug.cpp", MAME_DIR .. "src/mame/drivers/bert.cpp", MAME_DIR .. "src/mame/drivers/besta.cpp", @@ -4480,6 +4496,7 @@ MAME_DIR .. "src/mame/drivers/eacc.cpp", MAME_DIR .. "src/mame/drivers/easy_karaoke.cpp", MAME_DIR .. "src/mame/drivers/elwro800.cpp", + MAME_DIR .. "src/mame/drivers/elzet80.cpp", MAME_DIR .. "src/mame/drivers/epic14e.cpp", MAME_DIR .. "src/mame/drivers/esprit.cpp", MAME_DIR .. "src/mame/drivers/eti660.cpp", @@ -4527,6 +4544,7 @@ MAME_DIR .. "src/mame/drivers/jade.cpp", MAME_DIR .. "src/mame/drivers/jonos.cpp", MAME_DIR .. "src/mame/drivers/juku.cpp", + MAME_DIR .. "src/mame/drivers/junior80.cpp", MAME_DIR .. "src/mame/drivers/krokha.cpp", MAME_DIR .. "src/mame/drivers/kron.cpp", MAME_DIR .. "src/mame/drivers/lee1214.cpp", diff -Nru mame-0.230+dfsg.1/scripts/toolchain.lua mame-0.231+dfsg.1/scripts/toolchain.lua --- mame-0.230+dfsg.1/scripts/toolchain.lua 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/scripts/toolchain.lua 2021-04-27 15:32:05.000000000 +0000 @@ -488,6 +488,9 @@ if (_OPTIONS["LD"] ~= nil) then premake.gcc.ld = _OPTIONS["LD"] end + if (_OPTIONS["AR"] ~= nil) then + premake.gcc.ar = _OPTIONS["AR"] + end configuration {} -- reset configuration @@ -1006,12 +1009,6 @@ configuration { "asmjs" } targetdir (_buildDir .. "asmjs" .. "/bin") objdir (_buildDir .. "asmjs" .. "/obj") - includedirs { - "$(EMSCRIPTEN)/system/include", - "$(EMSCRIPTEN)/system/include/compat", - "$(EMSCRIPTEN)/system/include/libc", - "$(EMSCRIPTEN)/system/lib/libcxxabi/include", - } buildoptions { "-Wno-cast-align", "-Wno-tautological-compare", diff -Nru mame-0.230+dfsg.1/scripts/xslt/list-bios.xslt mame-0.231+dfsg.1/scripts/xslt/list-bios.xslt --- mame-0.230+dfsg.1/scripts/xslt/list-bios.xslt 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/scripts/xslt/list-bios.xslt 2021-04-27 15:32:05.000000000 +0000 @@ -2,7 +2,7 @@ out + * --- c2 | >--+------> out * --- .--|- / | * | | | / | * gnd | |/ | @@ -137,19 +137,34 @@ */ filter_biquad_device& filter_biquad_device::opamp_sk_lowpass_setup(double r1, double r2, double r3, double r4, double c1, double c2) { + filter_biquad_device::biquad_params p = opamp_sk_lowpass_calc(r1, r2, r3, r4, c1, c2); + return setup(p); +} + +void filter_biquad_device::opamp_sk_lowpass_modify(double r1, double r2, double r3, double r4, double c1, double c2) +{ + filter_biquad_device::biquad_params p = opamp_sk_lowpass_calc(r1, r2, r3, r4, c1, c2); + modify(p); +} + +filter_biquad_device::biquad_params filter_biquad_device::opamp_sk_lowpass_calc(double r1, double r2, double r3, double r4, double c1, double c2) +{ + filter_biquad_device::biquad_params r; if ((r1 == 0) || (r2 == 0) || (r3 == 0) || (r4 == 0) || (c1 == 0) || (c2 == 0)) { - fatalerror("filter_biquad_device::opamp_sk_lowpass_setup() - no parameters can be 0; parameters were: r1: %f, r2: %f, r3: %f, r4: %f, c1: %f, c2: %f", r1, r2, r3, r4, c1, c2); /* Filter can not be setup. Undefined results. */ + fatalerror("filter_biquad_device::opamp_sk_lowpass_calc() - no parameters can be 0; parameters were: r1: %f, r2: %f, r3: %f, r4: %f, c1: %f, c2: %f", r1, r2, r3, r4, c1, c2); /* Filter can not be setup. Undefined results. */ } - - // note: if R3 doesn't exist (no link to ground), pass a value of RES_M(999.99) or the like, i.e. an 'infinite resistor' - double const gain = (r3 + r4) / r3; - double const fc = 1.0 / (2 * M_PI * sqrt(r1 * r2 * c1 * c2)); - double const q = sqrt(r1 * r2 * c1 * c2) / ((r1 * c1) + (r2 * c1) + ((r2 * c2) * (1.0 - gain))); + // NOTE: if R3 doesn't exist (no link to ground), pass a value of RES_M(999.99) or the like, i.e. an 'infinite resistor' + // NOTE: if R4 is a direct short, set its resistance to RES_R(0.001) + // NOTE: if R3 doesn't exist AND R4 is a direct short, follow both rules above. + r.type = biquad_type::LOWPASS; + r.gain = 1.0 + (r4 / r3); // == (r3 + r4) / r3 + r.fc = 1.0 / (2 * M_PI * sqrt(r1 * r2 * c1 * c2)); + r.q = sqrt(r1 * r2 * c1 * c2) / ((r1 * c2) + (r2 * c2) + ((r2 * c1) * (1.0 - r.gain))); #ifdef FLT_BIQUAD_DEBUG_SETUP - logerror("filter_biquad_device::opamp_sk_lowpass_setup() yields: fc = %f, Q = %f, gain = %f\n", fc, q, gain); + logerror("filter_biquad_device::opamp_sk_lowpass_calc(%f, %f, %f, %f, %f, %f) yields: fc = %f, Q = %f, gain = %f\n", r1, r2, r3, r4, c1*1000000, c2*1000000, r.fc, r.q, r.gain); #endif - return setup(biquad_type::LOWPASS, fc, q, gain); + return r; } // Multiple-Feedback filters @@ -211,7 +226,7 @@ r.type = biquad_type::LOWPASS; } #ifdef FLT_BIQUAD_DEBUG_SETUP - logerror("filter_biquad_device::opamp_mfb_lowpass_setup(%f, %f, %f, %f, %f) yields:\n\ttype = %d, fc = %f, Q = %f, gain = %f\n", r1, r2, r3, c1*1000000, c2*1000000, static_cast(r.type), r.fc, r.q, r.gain); + logerror("filter_biquad_device::opamp_mfb_lowpass_calc(%f, %f, %f, %f, %f) yields:\n\ttype = %d, fc = %f, Q = %f, gain = %f\n", r1, r2, r3, c1*1000000, c2*1000000, static_cast(r.type), r.fc, r.q, r.gain); #endif return r; } @@ -489,7 +504,7 @@ logerror("a2: %f\n", m_a2); #endif // peak and shelf filters do not use gain for the entire signal, only for the peak/shelf portions - // side note: the first order lowpass and highpass filter analogues technically don't have gain either, + // side note: the first order lowpass and highpass filter analogs technically don't have gain either, // but this can be 'faked' by adjusting the bx factors, so we support that anyway, even if it isn't realistic. if ( (m_type != biquad_type::PEAK) && (m_type != biquad_type::LOWSHELF) diff -Nru mame-0.230+dfsg.1/src/devices/sound/flt_biquad.h mame-0.231+dfsg.1/src/devices/sound/flt_biquad.h --- mame-0.230+dfsg.1/src/devices/sound/flt_biquad.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/sound/flt_biquad.h 2021-04-27 15:32:05.000000000 +0000 @@ -44,10 +44,17 @@ void modify(biquad_type type, double fc, double q, double gain); void modify(biquad_params p); - // helper setup functions to create common filters representable by biquad filters + // helper setup functions to create common filters representable by biquad filters: + // Sallen-Key low-pass filter_biquad_device& opamp_sk_lowpass_setup(double r1, double r2, double r3, double r4, double c1, double c2); + void opamp_sk_lowpass_modify(double r1, double r2, double r3, double r4, double c1, double c2); + biquad_params opamp_sk_lowpass_calc(double r1, double r2, double r3, double r4, double c1, double c2); + // TODO when needed: Sallen-Key band-pass + + // TODO when needed: Sallen-Key band-reject + // TODO when needed: Sallen-Key high-pass // Multiple-Feedback low-pass diff -Nru mame-0.230+dfsg.1/src/devices/sound/fmopl.cpp mame-0.231+dfsg.1/src/devices/sound/fmopl.cpp --- mame-0.230+dfsg.1/src/devices/sound/fmopl.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/sound/fmopl.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,2554 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Jarek Burczynski,Tatsuyuki Satoh -/* -** -** File: fmopl.c - software implementation of FM sound generator -** types OPL and OPL2 -** -** Copyright Jarek Burczynski (bujar at mame dot net) -** Copyright Tatsuyuki Satoh , MultiArcadeMachineEmulator development -** -** Version 0.72 -** - -Revision History: - -04-08-2003 Jarek Burczynski: - - removed BFRDY hack. BFRDY is busy flag, and it should be 0 only when the chip - handles memory read/write or during the adpcm synthesis when the chip - requests another byte of ADPCM data. - -24-07-2003 Jarek Burczynski: - - added a small hack for Y8950 status BFRDY flag (bit 3 should be set after - some (unknown) delay). Right now it's always set. - -14-06-2003 Jarek Burczynski: - - implemented all of the status register flags in Y8950 emulation - - renamed y8950_set_delta_t_memory() parameters from _rom_ to _mem_ since - they can be either RAM or ROM - -08-10-2002 Jarek Burczynski (thanks to Dox for the YM3526 chip) - - corrected ym3526_read() to always set bit 2 and bit 1 - to HIGH state - identical to ym3812_read (verified on real YM3526) - -04-28-2002 Jarek Burczynski: - - binary exact Envelope Generator (verified on real YM3812); - compared to YM2151: the EG clock is equal to internal_clock, - rates are 2 times slower and volume resolution is one bit less - - modified interface functions (they no longer return pointer - - that's internal to the emulator now): - - new wrapper functions for OPLCreate: ym3526_init(), ym3812_init() and y8950_init() - - corrected 'off by one' error in feedback calculations (when feedback is off) - - enabled waveform usage (credit goes to Vlad Romascanu and zazzal22) - - speeded up noise generator calculations (Nicola Salmoria) - -03-24-2002 Jarek Burczynski (thanks to Dox for the YM3812 chip) - Complete rewrite (all verified on real YM3812): - - corrected sin_tab and tl_tab data - - corrected operator output calculations - - corrected waveform_select_enable register; - simply: ignore all writes to waveform_select register when - waveform_select_enable == 0 and do not change the waveform previously selected. - - corrected KSR handling - - corrected Envelope Generator: attack shape, Sustain mode and - Percussive/Non-percussive modes handling - - Envelope Generator rates are two times slower now - - LFO amplitude (tremolo) and phase modulation (vibrato) - - rhythm sounds phase generation - - white noise generator (big thanks to Olivier Galibert for mentioning Berlekamp-Massey algorithm) - - corrected key on/off handling (the 'key' signal is ORed from three sources: FM, rhythm and CSM) - - funky details (like ignoring output of operator 1 in BD rhythm sound when connect == 1) - -12-28-2001 Acho A. Tang - - reflected Delta-T EOS status on Y8950 status port. - - fixed subscription range of attack/decay tables - - - To do: - add delay before key off in CSM mode (see CSMKeyControll) - verify volume of the FM part on the Y8950 -*/ - -#include "emu.h" -#include "fmopl.h" -#include "ymdeltat.h" - - - -/* output final shift */ -#if (OPL_SAMPLE_BITS==16) - #define FINAL_SH (0) - #define MAXOUT (+32767) - #define MINOUT (-32768) -#else - #define FINAL_SH (8) - #define MAXOUT (+127) - #define MINOUT (-128) -#endif - - -#define FREQ_SH 16 /* 16.16 fixed point (frequency calculations) */ -#define EG_SH 16 /* 16.16 fixed point (EG timing) */ -#define LFO_SH 24 /* 8.24 fixed point (LFO calculations) */ -#define TIMER_SH 16 /* 16.16 fixed point (timers calculations) */ - -#define FREQ_MASK ((1<=0) - { - if (value < 0x0200) - return (value & ~0); - if (value < 0x0400) - return (value & ~1); - if (value < 0x0800) - return (value & ~3); - if (value < 0x1000) - return (value & ~7); - if (value < 0x2000) - return (value & ~15); - if (value < 0x4000) - return (value & ~31); - return (value & ~63); - } - /*else value < 0*/ - if (value > -0x0200) - return (~abs(value) & ~0); - if (value > -0x0400) - return (~abs(value) & ~1); - if (value > -0x0800) - return (~abs(value) & ~3); - if (value > -0x1000) - return (~abs(value) & ~7); - if (value > -0x2000) - return (~abs(value) & ~15); - if (value > -0x4000) - return (~abs(value) & ~31); - return (~abs(value) & ~63); -} - - -static FILE *sample[1]; - #if 1 /*save to MONO file */ - #define SAVE_ALL_CHANNELS \ - { signed int pom = acc_calc(lt); \ - fputc((unsigned short)pom&0xff,sample[0]); \ - fputc(((unsigned short)pom>>8)&0xff,sample[0]); \ - } - #else /*save to STEREO file */ - #define SAVE_ALL_CHANNELS \ - { signed int pom = lt; \ - fputc((unsigned short)pom&0xff,sample[0]); \ - fputc(((unsigned short)pom>>8)&0xff,sample[0]); \ - pom = rt; \ - fputc((unsigned short)pom&0xff,sample[0]); \ - fputc(((unsigned short)pom>>8)&0xff,sample[0]); \ - } - #endif -#endif - -#define OPL_TYPE_WAVESEL 0x01 /* waveform select */ -#define OPL_TYPE_ADPCM 0x02 /* DELTA-T ADPCM unit */ -#define OPL_TYPE_KEYBOARD 0x04 /* keyboard interface */ -#define OPL_TYPE_IO 0x08 /* I/O port */ - -/* ---------- Generic interface section ---------- */ -#define OPL_TYPE_YM3526 (0) -#define OPL_TYPE_YM3812 (OPL_TYPE_WAVESEL) -#define OPL_TYPE_Y8950 (OPL_TYPE_ADPCM|OPL_TYPE_KEYBOARD|OPL_TYPE_IO) - - -namespace { - -// TODO: make these static members - -#define RATE_STEPS (8) -extern const unsigned char eg_rate_shift[16+64+16]; -extern const unsigned char eg_rate_select[16+64+16]; - - -struct OPL_SLOT -{ - uint32_t ar; /* attack rate: AR<<2 */ - uint32_t dr; /* decay rate: DR<<2 */ - uint32_t rr; /* release rate:RR<<2 */ - uint8_t KSR; /* key scale rate */ - uint8_t ksl; /* keyscale level */ - uint8_t ksr; /* key scale rate: kcode>>KSR */ - uint8_t mul; /* multiple: mul_tab[ML] */ - - /* Phase Generator */ - uint32_t Cnt; /* frequency counter */ - uint32_t Incr; /* frequency counter step */ - uint8_t FB; /* feedback shift value */ - int32_t *connect1; /* slot1 output pointer */ - int32_t op1_out[2]; /* slot1 output for feedback */ - uint8_t CON; /* connection (algorithm) type */ - - /* Envelope Generator */ - uint8_t eg_type; /* percussive/non-percussive mode */ - uint8_t state; /* phase type */ - uint32_t TL; /* total level: TL << 2 */ - int32_t TLL; /* adjusted now TL */ - int32_t volume; /* envelope counter */ - uint32_t sl; /* sustain level: sl_tab[SL] */ - uint8_t eg_sh_ar; /* (attack state) */ - uint8_t eg_sel_ar; /* (attack state) */ - uint8_t eg_sh_dr; /* (decay state) */ - uint8_t eg_sel_dr; /* (decay state) */ - uint8_t eg_sh_rr; /* (release state) */ - uint8_t eg_sel_rr; /* (release state) */ - uint32_t key; /* 0 = KEY OFF, >0 = KEY ON */ - - /* LFO */ - uint32_t AMmask; /* LFO Amplitude Modulation enable mask */ - uint8_t vib; /* LFO Phase Modulation enable flag (active high)*/ - - /* waveform select */ - uint16_t wavetable; - - void KEYON(uint32_t key_set) - { - if( !key ) - { - /* restart Phase Generator */ - Cnt = 0; - /* phase -> Attack */ - state = EG_ATT; - } - key |= key_set; - } - - void KEYOFF(uint32_t key_clr) - { - if( key ) - { - key &= key_clr; - - if( !key ) - { - /* phase -> Release */ - if (state>EG_REL) - state = EG_REL; - } - } - } -}; - -struct OPL_CH -{ - OPL_SLOT SLOT[2]; - /* phase generator state */ - uint32_t block_fnum; /* block+fnum */ - uint32_t fc; /* Freq. Increment base */ - uint32_t ksl_base; /* KeyScaleLevel Base step */ - uint8_t kcode; /* key code (for key scaling) */ - - - /* update phase increment counter of operator (also update the EG rates if necessary) */ - void CALC_FCSLOT(OPL_SLOT &SLOT) - { - /* (frequency) phase increment counter */ - SLOT.Incr = fc * SLOT.mul; - int const ksr = kcode >> SLOT.KSR; - - if( SLOT.ksr != ksr ) - { - SLOT.ksr = ksr; - - /* calculate envelope generator rates */ - if ((SLOT.ar + SLOT.ksr) < 16+62) - { - SLOT.eg_sh_ar = eg_rate_shift [SLOT.ar + SLOT.ksr ]; - SLOT.eg_sel_ar = eg_rate_select[SLOT.ar + SLOT.ksr ]; - } - else - { - SLOT.eg_sh_ar = 0; - SLOT.eg_sel_ar = 13*RATE_STEPS; - } - SLOT.eg_sh_dr = eg_rate_shift [SLOT.dr + SLOT.ksr ]; - SLOT.eg_sel_dr = eg_rate_select[SLOT.dr + SLOT.ksr ]; - SLOT.eg_sh_rr = eg_rate_shift [SLOT.rr + SLOT.ksr ]; - SLOT.eg_sel_rr = eg_rate_select[SLOT.rr + SLOT.ksr ]; - } - } - - /* CSM Key Control */ - void CSMKeyControll() - { - SLOT[SLOT1].KEYON(4); - SLOT[SLOT2].KEYON(4); - - /* The key off should happen exactly one sample later - not implemented correctly yet */ - - SLOT[SLOT1].KEYOFF(~4); - SLOT[SLOT2].KEYOFF(~4); - } -}; - -/* OPL state */ -class FM_OPL -{ -protected: - FM_OPL() -#if BUILD_Y8950 - : deltat(nullptr, [] (YM_DELTAT *p) { p->~YM_DELTAT(); }) -#endif - { - } - -public: - ~FM_OPL() - { - UnLockTable(); - } - - /* FM channel slots */ - OPL_CH P_CH[9]; /* OPL/OPL2 chips have 9 channels*/ - - uint32_t eg_cnt; /* global envelope generator counter */ - uint32_t eg_timer; /* global envelope generator counter works at frequency = chipclock/72 */ - uint32_t eg_timer_add; /* step of eg_timer */ - uint32_t eg_timer_overflow; /* envelope generator timer overflows every 1 sample (on real chip) */ - - uint8_t rhythm; /* Rhythm mode */ - - uint32_t fn_tab[1024]; /* fnumber->increment counter */ - - /* LFO */ - uint32_t LFO_AM; - int32_t LFO_PM; - - uint8_t lfo_am_depth; - uint8_t lfo_pm_depth_range; - uint32_t lfo_am_cnt; - uint32_t lfo_am_inc; - uint32_t lfo_pm_cnt; - uint32_t lfo_pm_inc; - - uint32_t noise_rng; /* 23 bit noise shift register */ - uint32_t noise_p; /* current noise 'phase' */ - uint32_t noise_f; /* current noise period */ - - uint8_t wavesel; /* waveform select enable flag */ - - uint32_t T[2]; /* timer counters */ - uint8_t st[2]; /* timer enable */ - -#if BUILD_Y8950 - /* Delta-T ADPCM unit (Y8950) */ - - std::unique_ptr deltat; - - /* Keyboard and I/O ports interface */ - uint8_t portDirection; - uint8_t portLatch; - OPL_PORTHANDLER_R porthandler_r; - OPL_PORTHANDLER_W porthandler_w; - device_t * port_param; - OPL_PORTHANDLER_R keyboardhandler_r; - OPL_PORTHANDLER_W keyboardhandler_w; - device_t * keyboard_param; -#endif - - /* external event callback handlers */ - OPL_TIMERHANDLER timer_handler; /* TIMER handler */ - device_t *TimerParam; /* TIMER parameter */ - OPL_IRQHANDLER IRQHandler; /* IRQ handler */ - device_t *IRQParam; /* IRQ parameter */ - OPL_UPDATEHANDLER UpdateHandler;/* stream update handler */ - device_t *UpdateParam; /* stream update parameter */ - - uint8_t type; /* chip type */ - uint8_t address; /* address register */ - uint8_t status; /* status flag */ - uint8_t statusmask; /* status mask */ - uint8_t mode; /* Reg.08 : CSM,notesel,etc. */ - - uint32_t clock; /* master clock (Hz) */ - uint32_t rate; /* sampling rate (Hz) */ - double freqbase; /* frequency base */ - attotime TimerBase; /* Timer base time (==sampling time)*/ - device_t *device; - - signed int phase_modulation; /* phase modulation input (SLOT 2) */ - signed int output[1]; -#if BUILD_Y8950 - int32_t output_deltat[4]; /* for Y8950 DELTA-T, chip is mono, that 4 here is just for safety */ -#endif - - - /* status set and IRQ handling */ - void STATUS_SET(int flag) - { - /* set status flag */ - status |= flag; - if(!(status & 0x80)) - { - if(status & statusmask) - { /* IRQ on */ - status |= 0x80; - /* callback user interrupt handler (IRQ is OFF to ON) */ - if(IRQHandler) (IRQHandler)(IRQParam,1); - } - } - } - - /* status reset and IRQ handling */ - void STATUS_RESET(int flag) - { - /* reset status flag */ - status &=~flag; - if(status & 0x80) - { - if (!(status & statusmask) ) - { - status &= 0x7f; - /* callback user interrupt handler (IRQ is ON to OFF) */ - if(IRQHandler) (IRQHandler)(IRQParam,0); - } - } - } - - /* IRQ mask set */ - void STATUSMASK_SET(int flag) - { - statusmask = flag; - /* IRQ handling check */ - STATUS_SET(0); - STATUS_RESET(0); - } - - - /* advance LFO to next sample */ - void advance_lfo() - { - /* LFO */ - lfo_am_cnt += lfo_am_inc; - if (lfo_am_cnt >= (uint32_t(LFO_AM_TAB_ELEMENTS) << LFO_SH)) /* lfo_am_table is 210 elements long */ - lfo_am_cnt -= (uint32_t(LFO_AM_TAB_ELEMENTS) << LFO_SH); - - uint8_t const tmp = lfo_am_table[ lfo_am_cnt >> LFO_SH ]; - - LFO_AM = lfo_am_depth ? tmp : tmp >> 2; - - lfo_pm_cnt += lfo_pm_inc; - LFO_PM = (lfo_pm_cnt>>LFO_SH & 7) | lfo_pm_depth_range; - } - - /* advance to next sample */ - void advance() - { - eg_timer += eg_timer_add; - - while (eg_timer >= eg_timer_overflow) - { - eg_timer -= eg_timer_overflow; - - eg_cnt++; - - for (int i=0; i<9*2; i++) - { - OPL_CH &CH = P_CH[i/2]; - OPL_SLOT &op = CH.SLOT[i&1]; - - /* Envelope Generator */ - switch(op.state) - { - case EG_ATT: /* attack phase */ - if ( !(eg_cnt & ((1<>op.eg_sh_ar)&7)]) - ) >>3; - - if (op.volume <= MIN_ATT_INDEX) - { - op.volume = MIN_ATT_INDEX; - op.state = EG_DEC; - } - - } - break; - - case EG_DEC: /* decay phase */ - if ( !(eg_cnt & ((1<>op.eg_sh_dr)&7)]; - - if ( op.volume >= op.sl ) - op.state = EG_SUS; - - } - break; - - case EG_SUS: /* sustain phase */ - - /* this is important behaviour: - one can change percusive/non-percussive modes on the fly and - the chip will remain in sustain phase - verified on real YM3812 */ - - if(op.eg_type) /* non-percussive mode */ - { - /* do nothing */ - } - else /* percussive mode */ - { - /* during sustain phase chip adds Release Rate (in percussive mode) */ - if ( !(eg_cnt & ((1<>op.eg_sh_rr)&7)]; - - if ( op.volume >= MAX_ATT_INDEX ) - op.volume = MAX_ATT_INDEX; - } - /* else do nothing in sustain phase */ - } - break; - - case EG_REL: /* release phase */ - if ( !(eg_cnt & ((1<>op.eg_sh_rr)&7)]; - - if ( op.volume >= MAX_ATT_INDEX ) - { - op.volume = MAX_ATT_INDEX; - op.state = EG_OFF; - } - - } - break; - - default: - break; - } - } - } - - for (int i=0; i<9*2; i++) - { - OPL_CH &CH = P_CH[i/2]; - OPL_SLOT &op = CH.SLOT[i&1]; - - /* Phase Generator */ - if(op.vib) - { - unsigned int block_fnum = CH.block_fnum; - unsigned int const fnum_lfo = (block_fnum&0x0380) >> 7; - - signed int const lfo_fn_table_index_offset = lfo_pm_table[LFO_PM + 16*fnum_lfo ]; - - if (lfo_fn_table_index_offset) /* LFO phase modulation active */ - { - block_fnum += lfo_fn_table_index_offset; - uint8_t const block = (block_fnum&0x1c00) >> 10; - op.Cnt += (fn_tab[block_fnum&0x03ff] >> (7-block)) * op.mul; - } - else /* LFO phase modulation = zero */ - { - op.Cnt += op.Incr; - } - } - else /* LFO phase modulation disabled for this operator */ - { - op.Cnt += op.Incr; - } - } - - /* The Noise Generator of the YM3812 is 23-bit shift register. - * Period is equal to 2^23-2 samples. - * Register works at sampling frequency of the chip, so output - * can change on every sample. - * - * Output of the register and input to the bit 22 is: - * bit0 XOR bit14 XOR bit15 XOR bit22 - * - * Simply use bit 22 as the noise output. - */ - - noise_p += noise_f; - int i = noise_p >> FREQ_SH; /* number of events (shifts of the shift register) */ - noise_p &= FREQ_MASK; - while (i) - { - /* - uint32_t j; - j = ( (noise_rng) ^ (noise_rng>>14) ^ (noise_rng>>15) ^ (noise_rng>>22) ) & 1; - noise_rng = (j<<22) | (noise_rng>>1); - */ - - /* - Instead of doing all the logic operations above, we - use a trick here (and use bit 0 as the noise output). - The difference is only that the noise bit changes one - step ahead. This doesn't matter since we don't know - what is real state of the noise_rng after the reset. - */ - - if (noise_rng & 1) noise_rng ^= 0x800302; - noise_rng >>= 1; - - i--; - } - } - - /* calculate output */ - void CALC_CH(OPL_CH &CH) - { - OPL_SLOT *SLOT; - unsigned int env; - signed int out; - - phase_modulation = 0; - - /* SLOT 1 */ - SLOT = &CH.SLOT[SLOT1]; - env = volume_calc(*SLOT); - out = SLOT->op1_out[0] + SLOT->op1_out[1]; - SLOT->op1_out[0] = SLOT->op1_out[1]; - *SLOT->connect1 += SLOT->op1_out[0]; - SLOT->op1_out[1] = 0; - if( env < ENV_QUIET ) - { - if (!SLOT->FB) - out = 0; - SLOT->op1_out[1] = op_calc1(SLOT->Cnt, env, (out<FB), SLOT->wavetable ); - } - - /* SLOT 2 */ - SLOT++; - env = volume_calc(*SLOT); - if( env < ENV_QUIET ) - output[0] += op_calc(SLOT->Cnt, env, phase_modulation, SLOT->wavetable); - } - - /* - operators used in the rhythm sounds generation process: - - Envelope Generator: - - channel operator register number Bass High Snare Tom Top - / slot number TL ARDR SLRR Wave Drum Hat Drum Tom Cymbal - 6 / 0 12 50 70 90 f0 + - 6 / 1 15 53 73 93 f3 + - 7 / 0 13 51 71 91 f1 + - 7 / 1 16 54 74 94 f4 + - 8 / 0 14 52 72 92 f2 + - 8 / 1 17 55 75 95 f5 + - - Phase Generator: - - channel operator register number Bass High Snare Tom Top - / slot number MULTIPLE Drum Hat Drum Tom Cymbal - 6 / 0 12 30 + - 6 / 1 15 33 + - 7 / 0 13 31 + + + - 7 / 1 16 34 ----- n o t u s e d ----- - 8 / 0 14 32 + - 8 / 1 17 35 + + - - channel operator register number Bass High Snare Tom Top - number number BLK/FNUM2 FNUM Drum Hat Drum Tom Cymbal - 6 12,15 B6 A6 + - - 7 13,16 B7 A7 + + + - - 8 14,17 B8 A8 + + + - - */ - - /* calculate rhythm */ - - void CALC_RH() - { - unsigned int const noise = BIT(noise_rng, 0); - - OPL_SLOT *SLOT; - signed int out; - unsigned int env; - - - /* Bass Drum (verified on real YM3812): - - depends on the channel 6 'connect' register: - when connect = 0 it works the same as in normal (non-rhythm) mode (op1->op2->out) - when connect = 1 _only_ operator 2 is present on output (op2->out), operator 1 is ignored - - output sample always is multiplied by 2 - */ - - phase_modulation = 0; - /* SLOT 1 */ - SLOT = &P_CH[6].SLOT[SLOT1]; - env = volume_calc(*SLOT); - - out = SLOT->op1_out[0] + SLOT->op1_out[1]; - SLOT->op1_out[0] = SLOT->op1_out[1]; - - if (!SLOT->CON) - phase_modulation = SLOT->op1_out[0]; - /* else ignore output of operator 1 */ - - SLOT->op1_out[1] = 0; - if( env < ENV_QUIET ) - { - if (!SLOT->FB) - out = 0; - SLOT->op1_out[1] = op_calc1(SLOT->Cnt, env, (out<FB), SLOT->wavetable ); - } - - /* SLOT 2 */ - SLOT++; - env = volume_calc(*SLOT); - if( env < ENV_QUIET ) - output[0] += op_calc(SLOT->Cnt, env, phase_modulation, SLOT->wavetable) * 2; - - - /* Phase generation is based on: */ - /* HH (13) channel 7->slot 1 combined with channel 8->slot 2 (same combination as TOP CYMBAL but different output phases) */ - /* SD (16) channel 7->slot 1 */ - /* TOM (14) channel 8->slot 1 */ - /* TOP (17) channel 7->slot 1 combined with channel 8->slot 2 (same combination as HIGH HAT but different output phases) */ - - /* Envelope generation based on: */ - /* HH channel 7->slot1 */ - /* SD channel 7->slot2 */ - /* TOM channel 8->slot1 */ - /* TOP channel 8->slot2 */ - - - /* The following formulas can be well optimized. - I leave them in direct form for now (in case I've missed something). - */ - - /* High Hat (verified on real YM3812) */ - OPL_SLOT const &SLOT7_1 = P_CH[7].SLOT[SLOT1]; - OPL_SLOT const &SLOT8_2 = P_CH[8].SLOT[SLOT2]; - env = volume_calc(SLOT7_1); - if( env < ENV_QUIET ) - { - /* high hat phase generation: - phase = d0 or 234 (based on frequency only) - phase = 34 or 2d0 (based on noise) - */ - - /* base frequency derived from operator 1 in channel 7 */ - unsigned char const bit7 = BIT(SLOT7_1.Cnt >> FREQ_SH, 7); - unsigned char const bit3 = BIT(SLOT7_1.Cnt >> FREQ_SH, 3); - unsigned char const bit2 = BIT(SLOT7_1.Cnt >> FREQ_SH, 2); - - unsigned char const res1 = (bit2 ^ bit7) | bit3; - - /* when res1 = 0 phase = 0x000 | 0xd0; */ - /* when res1 = 1 phase = 0x200 | (0xd0>>2); */ - uint32_t phase = res1 ? (0x200|(0xd0>>2)) : 0xd0; - - /* enable gate based on frequency of operator 2 in channel 8 */ - unsigned char const bit5e= BIT(SLOT8_2.Cnt >> FREQ_SH, 5); - unsigned char const bit3e= BIT(SLOT8_2.Cnt >> FREQ_SH, 3); - - unsigned char const res2 = bit3e ^ bit5e; - - /* when res2 = 0 pass the phase from calculation above (res1); */ - /* when res2 = 1 phase = 0x200 | (0xd0>>2); */ - if (res2) - phase = (0x200|(0xd0>>2)); - - - /* when phase & 0x200 is set and noise=1 then phase = 0x200|0xd0 */ - /* when phase & 0x200 is set and noise=0 then phase = 0x200|(0xd0>>2), ie no change */ - if (phase&0x200) - { - if (noise) - phase = 0x200|0xd0; - } - else - /* when phase & 0x200 is clear and noise=1 then phase = 0xd0>>2 */ - /* when phase & 0x200 is clear and noise=0 then phase = 0xd0, ie no change */ - { - if (noise) - phase = 0xd0>>2; - } - - output[0] += op_calc(phase<> FREQ_SH, 8); - - /* when bit8 = 0 phase = 0x100; */ - /* when bit8 = 1 phase = 0x200; */ - uint32_t phase = bit8 ? 0x200 : 0x100; - - /* Noise bit XOR'es phase by 0x100 */ - /* when noisebit = 0 pass the phase from calculation above */ - /* when noisebit = 1 phase ^= 0x100; */ - /* in other words: phase ^= (noisebit<<8); */ - if (noise) - phase ^= 0x100; - - output[0] += op_calc(phase<> FREQ_SH, 7); - unsigned char const bit3 = BIT(SLOT7_1.Cnt >> FREQ_SH, 3); - unsigned char const bit2 = BIT(SLOT7_1.Cnt >> FREQ_SH, 2); - - unsigned char const res1 = (bit2 ^ bit7) | bit3; - - /* when res1 = 0 phase = 0x000 | 0x100; */ - /* when res1 = 1 phase = 0x200 | 0x100; */ - uint32_t phase = res1 ? 0x300 : 0x100; - - /* enable gate based on frequency of operator 2 in channel 8 */ - unsigned char const bit5e= BIT(SLOT8_2.Cnt >> FREQ_SH, 5); - unsigned char const bit3e= BIT(SLOT8_2.Cnt >> FREQ_SH, 3); - - unsigned char const res2 = bit3e ^ bit5e; - /* when res2 = 0 pass the phase from calculation above (res1); */ - /* when res2 = 1 phase = 0x200 | 0x100; */ - if (res2) - phase = 0x300; - - output[0] += op_calc(phase<> 6]; - SLOT.TL = (v&0x3f)<<(ENV_BITS-1-7); /* 7 bits TL (bit 6 = always 0) */ - - SLOT.TLL = SLOT.TL + (CH.ksl_base >> SLOT.ksl); - } - - /* set attack rate & decay rate */ - void set_ar_dr(int slot, int v) - { - OPL_CH &CH = P_CH[slot/2]; - OPL_SLOT &SLOT = CH.SLOT[slot&1]; - - SLOT.ar = (v>>4) ? 16 + ((v>>4) <<2) : 0; - - if ((SLOT.ar + SLOT.ksr) < 16+62) - { - SLOT.eg_sh_ar = eg_rate_shift [SLOT.ar + SLOT.ksr ]; - SLOT.eg_sel_ar = eg_rate_select[SLOT.ar + SLOT.ksr ]; - } - else - { - SLOT.eg_sh_ar = 0; - SLOT.eg_sel_ar = 13*RATE_STEPS; - } - - SLOT.dr = (v&0x0f)? 16 + ((v&0x0f)<<2) : 0; - SLOT.eg_sh_dr = eg_rate_shift [SLOT.dr + SLOT.ksr ]; - SLOT.eg_sel_dr = eg_rate_select[SLOT.dr + SLOT.ksr ]; - } - - /* set sustain level & release rate */ - void set_sl_rr(int slot, int v) - { - OPL_CH &CH = P_CH[slot/2]; - OPL_SLOT &SLOT = CH.SLOT[slot&1]; - - SLOT.sl = sl_tab[ v>>4 ]; - - SLOT.rr = (v&0x0f)? 16 + ((v&0x0f)<<2) : 0; - SLOT.eg_sh_rr = eg_rate_shift [SLOT.rr + SLOT.ksr ]; - SLOT.eg_sel_rr = eg_rate_select[SLOT.rr + SLOT.ksr ]; - } - - - void ResetChip(); - void postload(); - - void clock_changed(uint32_t c, uint32_t r) - { - clock = c; - rate = r; - - /* init global tables */ - initialize(); - } - - int Write(int a, int v) - { - if( !(a&1) ) - { /* address port */ - address = v & 0xff; - } - else - { /* data port */ - if (UpdateHandler) UpdateHandler(UpdateParam, 0); - WriteReg(address, v); - } - return status>>7; - } - - unsigned char Read(int a) - { - if( !(a&1) ) - { - /* status port */ - - #if BUILD_Y8950 - - if(type&OPL_TYPE_ADPCM) /* Y8950 */ - { - return (status & (statusmask|0x80)) | (deltat->PCM_BSY&1); - } - - #endif - - /* OPL and OPL2 */ - return status & (statusmask|0x80); - } - -#if BUILD_Y8950 - /* data port */ - switch(address) - { - case 0x05: /* KeyBoard IN */ - if(type&OPL_TYPE_KEYBOARD) - { - if(keyboardhandler_r) - return keyboardhandler_r(keyboard_param); - else - device->logerror("Y8950: read unmapped KEYBOARD port\n"); - } - return 0; - - case 0x0f: /* ADPCM-DATA */ - if(type&OPL_TYPE_ADPCM) - { - uint8_t val; - - val = deltat->ADPCM_Read(); - /*logerror("Y8950: read ADPCM value read=%02x\n",val);*/ - return val; - } - return 0; - - case 0x19: /* I/O DATA */ - if(type&OPL_TYPE_IO) - { - if(porthandler_r) - return porthandler_r(port_param); - else - device->logerror("Y8950:read unmapped I/O port\n"); - } - return 0; - case 0x1a: /* PCM-DATA */ - if(type&OPL_TYPE_ADPCM) - { - device->logerror("Y8950 A/D conversion is accessed but not implemented !\n"); - return 0x80; /* 2's complement PCM data - result from A/D conversion */ - } - return 0; - } -#endif - - return 0xff; - } - - - int TimerOver(int c) - { - if( c ) - { /* Timer B */ - STATUS_SET(0x20); - } - else - { /* Timer A */ - STATUS_SET(0x40); - /* CSM mode key,TL controll */ - if( mode & 0x80 ) - { /* CSM mode total level latch and auto key on */ - int ch; - if(UpdateHandler) UpdateHandler(UpdateParam,0); - for(ch=0; ch<9; ch++) - P_CH[ch].CSMKeyControll(); - } - } - /* reload timer */ - if (timer_handler) (timer_handler)(TimerParam,c,TimerBase * T[c]); - return status>>7; - } - - - /* Create one of virtual YM3812/YM3526/Y8950 */ - /* 'clock' is chip clock in Hz */ - /* 'rate' is sampling rate */ - static FM_OPL *Create(device_t *device, uint32_t clock, uint32_t rate, int type) - { - if (LockTable(device) == -1) - return nullptr; - - /* calculate OPL state size */ - size_t state_size = sizeof(FM_OPL); -#if BUILD_Y8950 - if (type & OPL_TYPE_ADPCM) - state_size+= sizeof(YM_DELTAT); -#endif - - /* allocate memory block */ - char *ptr = reinterpret_cast(::operator new(state_size)); - std::fill_n(ptr, state_size, 0); - - FM_OPL *const OPL = new(ptr) FM_OPL; - - ptr += sizeof(FM_OPL); - -#if BUILD_Y8950 - if (type & OPL_TYPE_ADPCM) - { - OPL->deltat.reset(reinterpret_cast(ptr)); - ptr += sizeof(YM_DELTAT); - } -#endif - - OPL->device = device; - OPL->type = type; - OPL->clock_changed(clock, rate); - - return OPL; - } - - - /* Optional handlers */ - - void SetTimerHandler(OPL_TIMERHANDLER handler, device_t *device) - { - timer_handler = handler; - TimerParam = device; - } - void SetIRQHandler(OPL_IRQHANDLER handler, device_t *device) - { - IRQHandler = handler; - IRQParam = device; - } - void SetUpdateHandler(OPL_UPDATEHANDLER handler, device_t *device) - { - UpdateHandler = handler; - UpdateParam = device; - } - -private: - void WriteReg(int r, int v); - - uint32_t volume_calc(OPL_SLOT const &OP) const - { - return OP.TLL + uint32_t(OP.volume) + (LFO_AM & OP.AMmask); - } - - static inline signed int op_calc(uint32_t phase, unsigned int env, signed int pm, unsigned int wave_tab) - { - uint32_t const p = (env<<4) + sin_tab[wave_tab + ((((signed int)((phase & ~FREQ_MASK) + (pm<<16))) >> FREQ_SH ) & SIN_MASK) ]; - - return (p >= TL_TAB_LEN) ? 0 : tl_tab[p]; - } - - static inline signed int op_calc1(uint32_t phase, unsigned int env, signed int pm, unsigned int wave_tab) - { - uint32_t const p = (env<<4) + sin_tab[wave_tab + ((((signed int)((phase & ~FREQ_MASK) + pm )) >> FREQ_SH ) & SIN_MASK) ]; - - return (p >= TL_TAB_LEN) ? 0 : tl_tab[p]; - } - - - /* lock/unlock for common table */ - static int LockTable(device_t *device) - { - num_lock++; - if(num_lock>1) return 0; - - /* first time */ - - /* allocate total level table (128kb space) */ - if( !init_tables() ) - { - num_lock--; - return -1; - } - - return 0; - } - - static void UnLockTable() - { - if(num_lock) num_lock--; - if(num_lock) return; - - /* last time */ - CloseTable(); - } - - static int init_tables(); - - static void CloseTable() - { -#ifdef SAVE_SAMPLE - fclose(sample[0]); -#endif - } - - - static constexpr uint32_t SC(uint32_t db) { return uint32_t(db * (2.0 / ENV_STEP)); } - - - static constexpr double DV = 0.1875 / 2.0; - - - /* TL_TAB_LEN is calculated as: - * 12 - sinus amplitude bits (Y axis) - * 2 - sinus sign bit (Y axis) - * TL_RES_LEN - sinus resolution (X axis) - */ - static constexpr unsigned TL_TAB_LEN = 12 * 2 * TL_RES_LEN; - static constexpr unsigned ENV_QUIET = TL_TAB_LEN >> 4; - - static constexpr unsigned LFO_AM_TAB_ELEMENTS = 210; - - static const double ksl_tab[8*16]; - static const uint32_t ksl_shift[4]; - static const uint32_t sl_tab[16]; - static const unsigned char eg_inc[15 * RATE_STEPS]; - - static const uint8_t mul_tab[16]; - static signed int tl_tab[TL_TAB_LEN]; - static unsigned int sin_tab[SIN_LEN * 4]; - - static const uint8_t lfo_am_table[LFO_AM_TAB_ELEMENTS]; - static const int8_t lfo_pm_table[8 * 8 * 2]; - - static int num_lock; -}; - - - -/* mapping of register number (offset) to slot number used by the emulator */ -static const int slot_array[32]= -{ - 0, 2, 4, 1, 3, 5,-1,-1, - 6, 8,10, 7, 9,11,-1,-1, - 12,14,16,13,15,17,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1 -}; - -/* key scale level */ -/* table is 3dB/octave , DV converts this into 6dB/octave */ -/* 0.1875 is bit 0 weight of the envelope counter (volume) expressed in the 'decibel' scale */ -const double FM_OPL::ksl_tab[8*16]= -{ - /* OCT 0 */ - 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV, - 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV, - 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV, - 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV, - /* OCT 1 */ - 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV, - 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV, - 0.000/DV, 0.750/DV, 1.125/DV, 1.500/DV, - 1.875/DV, 2.250/DV, 2.625/DV, 3.000/DV, - /* OCT 2 */ - 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV, - 0.000/DV, 1.125/DV, 1.875/DV, 2.625/DV, - 3.000/DV, 3.750/DV, 4.125/DV, 4.500/DV, - 4.875/DV, 5.250/DV, 5.625/DV, 6.000/DV, - /* OCT 3 */ - 0.000/DV, 0.000/DV, 0.000/DV, 1.875/DV, - 3.000/DV, 4.125/DV, 4.875/DV, 5.625/DV, - 6.000/DV, 6.750/DV, 7.125/DV, 7.500/DV, - 7.875/DV, 8.250/DV, 8.625/DV, 9.000/DV, - /* OCT 4 */ - 0.000/DV, 0.000/DV, 3.000/DV, 4.875/DV, - 6.000/DV, 7.125/DV, 7.875/DV, 8.625/DV, - 9.000/DV, 9.750/DV,10.125/DV,10.500/DV, - 10.875/DV,11.250/DV,11.625/DV,12.000/DV, - /* OCT 5 */ - 0.000/DV, 3.000/DV, 6.000/DV, 7.875/DV, - 9.000/DV,10.125/DV,10.875/DV,11.625/DV, - 12.000/DV,12.750/DV,13.125/DV,13.500/DV, - 13.875/DV,14.250/DV,14.625/DV,15.000/DV, - /* OCT 6 */ - 0.000/DV, 6.000/DV, 9.000/DV,10.875/DV, - 12.000/DV,13.125/DV,13.875/DV,14.625/DV, - 15.000/DV,15.750/DV,16.125/DV,16.500/DV, - 16.875/DV,17.250/DV,17.625/DV,18.000/DV, - /* OCT 7 */ - 0.000/DV, 9.000/DV,12.000/DV,13.875/DV, - 15.000/DV,16.125/DV,16.875/DV,17.625/DV, - 18.000/DV,18.750/DV,19.125/DV,19.500/DV, - 19.875/DV,20.250/DV,20.625/DV,21.000/DV -}; - -/* 0 / 3.0 / 1.5 / 6.0 dB/OCT */ -const uint32_t FM_OPL::ksl_shift[4] = { 31, 1, 2, 0 }; - - -/* sustain level table (3dB per step) */ -/* 0 - 15: 0, 3, 6, 9,12,15,18,21,24,27,30,33,36,39,42,93 (dB)*/ -const uint32_t FM_OPL::sl_tab[16]={ - SC( 0),SC( 1),SC( 2),SC( 3),SC( 4),SC( 5),SC( 6),SC( 7), - SC( 8),SC( 9),SC(10),SC(11),SC(12),SC(13),SC(14),SC(31) -}; - - -const unsigned char FM_OPL::eg_inc[15*RATE_STEPS]={ -/*cycle:0 1 2 3 4 5 6 7*/ - -/* 0 */ 0,1, 0,1, 0,1, 0,1, /* rates 00..12 0 (increment by 0 or 1) */ -/* 1 */ 0,1, 0,1, 1,1, 0,1, /* rates 00..12 1 */ -/* 2 */ 0,1, 1,1, 0,1, 1,1, /* rates 00..12 2 */ -/* 3 */ 0,1, 1,1, 1,1, 1,1, /* rates 00..12 3 */ - -/* 4 */ 1,1, 1,1, 1,1, 1,1, /* rate 13 0 (increment by 1) */ -/* 5 */ 1,1, 1,2, 1,1, 1,2, /* rate 13 1 */ -/* 6 */ 1,2, 1,2, 1,2, 1,2, /* rate 13 2 */ -/* 7 */ 1,2, 2,2, 1,2, 2,2, /* rate 13 3 */ - -/* 8 */ 2,2, 2,2, 2,2, 2,2, /* rate 14 0 (increment by 2) */ -/* 9 */ 2,2, 2,4, 2,2, 2,4, /* rate 14 1 */ -/*10 */ 2,4, 2,4, 2,4, 2,4, /* rate 14 2 */ -/*11 */ 2,4, 4,4, 2,4, 4,4, /* rate 14 3 */ - -/*12 */ 4,4, 4,4, 4,4, 4,4, /* rates 15 0, 15 1, 15 2, 15 3 (increment by 4) */ -/*13 */ 8,8, 8,8, 8,8, 8,8, /* rates 15 2, 15 3 for attack */ -/*14 */ 0,0, 0,0, 0,0, 0,0, /* infinity rates for attack and decay(s) */ -}; - - -#define O(a) (a*RATE_STEPS) - -/*note that there is no O(13) in this table - it's directly in the code */ -const unsigned char eg_rate_select[16+64+16]={ /* Envelope Generator rates (16 + 64 rates + 16 RKS) */ -/* 16 infinite time rates */ -O(14),O(14),O(14),O(14),O(14),O(14),O(14),O(14), -O(14),O(14),O(14),O(14),O(14),O(14),O(14),O(14), - -/* rates 00-12 */ -O( 0),O( 1),O( 2),O( 3), -O( 0),O( 1),O( 2),O( 3), -O( 0),O( 1),O( 2),O( 3), -O( 0),O( 1),O( 2),O( 3), -O( 0),O( 1),O( 2),O( 3), -O( 0),O( 1),O( 2),O( 3), -O( 0),O( 1),O( 2),O( 3), -O( 0),O( 1),O( 2),O( 3), -O( 0),O( 1),O( 2),O( 3), -O( 0),O( 1),O( 2),O( 3), -O( 0),O( 1),O( 2),O( 3), -O( 0),O( 1),O( 2),O( 3), -O( 0),O( 1),O( 2),O( 3), - -/* rate 13 */ -O( 4),O( 5),O( 6),O( 7), - -/* rate 14 */ -O( 8),O( 9),O(10),O(11), - -/* rate 15 */ -O(12),O(12),O(12),O(12), - -/* 16 dummy rates (same as 15 3) */ -O(12),O(12),O(12),O(12),O(12),O(12),O(12),O(12), -O(12),O(12),O(12),O(12),O(12),O(12),O(12),O(12), - -}; -#undef O - -/*rate 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 */ -/*shift 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0 */ -/*mask 4095, 2047, 1023, 511, 255, 127, 63, 31, 15, 7, 3, 1, 0, 0, 0, 0 */ - -#define O(a) (a*1) -const unsigned char eg_rate_shift[16+64+16]={ /* Envelope Generator counter shifts (16 + 64 rates + 16 RKS) */ -/* 16 infinite time rates */ -O(0),O(0),O(0),O(0),O(0),O(0),O(0),O(0), -O(0),O(0),O(0),O(0),O(0),O(0),O(0),O(0), - -/* rates 00-12 */ -O(12),O(12),O(12),O(12), -O(11),O(11),O(11),O(11), -O(10),O(10),O(10),O(10), -O( 9),O( 9),O( 9),O( 9), -O( 8),O( 8),O( 8),O( 8), -O( 7),O( 7),O( 7),O( 7), -O( 6),O( 6),O( 6),O( 6), -O( 5),O( 5),O( 5),O( 5), -O( 4),O( 4),O( 4),O( 4), -O( 3),O( 3),O( 3),O( 3), -O( 2),O( 2),O( 2),O( 2), -O( 1),O( 1),O( 1),O( 1), -O( 0),O( 0),O( 0),O( 0), - -/* rate 13 */ -O( 0),O( 0),O( 0),O( 0), - -/* rate 14 */ -O( 0),O( 0),O( 0),O( 0), - -/* rate 15 */ -O( 0),O( 0),O( 0),O( 0), - -/* 16 dummy rates (same as 15 3) */ -O( 0),O( 0),O( 0),O( 0),O( 0),O( 0),O( 0),O( 0), -O( 0),O( 0),O( 0),O( 0),O( 0),O( 0),O( 0),O( 0), - -}; -#undef O - - -/* multiple table */ -#define ML 2 -const uint8_t FM_OPL::mul_tab[16]= { -/* 1/2, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,10,12,12,15,15 */ - ML/2, 1*ML, 2*ML, 3*ML, 4*ML, 5*ML, 6*ML, 7*ML, - 8*ML, 9*ML,10*ML,10*ML,12*ML,12*ML,15*ML,15*ML -}; -#undef ML - -signed int FM_OPL::tl_tab[TL_TAB_LEN]; - -/* sin waveform table in 'decibel' scale */ -/* four waveforms on OPL2 type chips */ -unsigned int FM_OPL::sin_tab[SIN_LEN * 4]; - - -/* LFO Amplitude Modulation table (verified on real YM3812) - 27 output levels (triangle waveform); 1 level takes one of: 192, 256 or 448 samples - - Length: 210 elements. - - Each of the elements has to be repeated - exactly 64 times (on 64 consecutive samples). - The whole table takes: 64 * 210 = 13440 samples. - - When AM = 1 data is used directly - When AM = 0 data is divided by 4 before being used (losing precision is important) -*/ - -const uint8_t FM_OPL::lfo_am_table[LFO_AM_TAB_ELEMENTS] = { -0,0,0,0,0,0,0, -1,1,1,1, -2,2,2,2, -3,3,3,3, -4,4,4,4, -5,5,5,5, -6,6,6,6, -7,7,7,7, -8,8,8,8, -9,9,9,9, -10,10,10,10, -11,11,11,11, -12,12,12,12, -13,13,13,13, -14,14,14,14, -15,15,15,15, -16,16,16,16, -17,17,17,17, -18,18,18,18, -19,19,19,19, -20,20,20,20, -21,21,21,21, -22,22,22,22, -23,23,23,23, -24,24,24,24, -25,25,25,25, -26,26,26, -25,25,25,25, -24,24,24,24, -23,23,23,23, -22,22,22,22, -21,21,21,21, -20,20,20,20, -19,19,19,19, -18,18,18,18, -17,17,17,17, -16,16,16,16, -15,15,15,15, -14,14,14,14, -13,13,13,13, -12,12,12,12, -11,11,11,11, -10,10,10,10, -9,9,9,9, -8,8,8,8, -7,7,7,7, -6,6,6,6, -5,5,5,5, -4,4,4,4, -3,3,3,3, -2,2,2,2, -1,1,1,1 -}; - -/* LFO Phase Modulation table (verified on real YM3812) */ -const int8_t FM_OPL::lfo_pm_table[8*8*2] = { -/* FNUM2/FNUM = 00 0xxxxxxx (0x0000) */ -0, 0, 0, 0, 0, 0, 0, 0, /*LFO PM depth = 0*/ -0, 0, 0, 0, 0, 0, 0, 0, /*LFO PM depth = 1*/ - -/* FNUM2/FNUM = 00 1xxxxxxx (0x0080) */ -0, 0, 0, 0, 0, 0, 0, 0, /*LFO PM depth = 0*/ -1, 0, 0, 0,-1, 0, 0, 0, /*LFO PM depth = 1*/ - -/* FNUM2/FNUM = 01 0xxxxxxx (0x0100) */ -1, 0, 0, 0,-1, 0, 0, 0, /*LFO PM depth = 0*/ -2, 1, 0,-1,-2,-1, 0, 1, /*LFO PM depth = 1*/ - -/* FNUM2/FNUM = 01 1xxxxxxx (0x0180) */ -1, 0, 0, 0,-1, 0, 0, 0, /*LFO PM depth = 0*/ -3, 1, 0,-1,-3,-1, 0, 1, /*LFO PM depth = 1*/ - -/* FNUM2/FNUM = 10 0xxxxxxx (0x0200) */ -2, 1, 0,-1,-2,-1, 0, 1, /*LFO PM depth = 0*/ -4, 2, 0,-2,-4,-2, 0, 2, /*LFO PM depth = 1*/ - -/* FNUM2/FNUM = 10 1xxxxxxx (0x0280) */ -2, 1, 0,-1,-2,-1, 0, 1, /*LFO PM depth = 0*/ -5, 2, 0,-2,-5,-2, 0, 2, /*LFO PM depth = 1*/ - -/* FNUM2/FNUM = 11 0xxxxxxx (0x0300) */ -3, 1, 0,-1,-3,-1, 0, 1, /*LFO PM depth = 0*/ -6, 3, 0,-3,-6,-3, 0, 3, /*LFO PM depth = 1*/ - -/* FNUM2/FNUM = 11 1xxxxxxx (0x0380) */ -3, 1, 0,-1,-3,-1, 0, 1, /*LFO PM depth = 0*/ -7, 3, 0,-3,-7,-3, 0, 3 /*LFO PM depth = 1*/ -}; - - -/* lock level of common table */ -int FM_OPL::num_lock = 0; - - -#if 0 -static inline int limit( int val, int max, int min ) { - if ( val > max ) - val = max; - else if ( val < min ) - val = min; - - return val; -} -#endif - -/* generic table initialize */ -int FM_OPL::init_tables() -{ - signed int i,x; - signed int n; - double o,m; - - - for (x=0; x>= 4; /* 12 bits here */ - if (n&1) /* round to nearest */ - n = (n>>1)+1; - else - n = n>>1; - /* 11 bits here (rounded) */ - n <<= 1; /* 12 bits here (as in real chip) */ - tl_tab[ x*2 + 0 ] = n; - tl_tab[ x*2 + 1 ] = -tl_tab[ x*2 + 0 ]; - - for (i=1; i<12; i++) - { - tl_tab[ x*2+0 + i*2*TL_RES_LEN ] = tl_tab[ x*2+0 ]>>i; - tl_tab[ x*2+1 + i*2*TL_RES_LEN ] = -tl_tab[ x*2+0 + i*2*TL_RES_LEN ]; - } - #if 0 - logerror("tl %04i", x*2); - for (i=0; i<12; i++) - logerror(", [%02i] %5i", i*2, tl_tab[ x*2 /*+1*/ + i*2*TL_RES_LEN ] ); - logerror("\n"); - #endif - } - /*logerror("FMOPL.C: TL_TAB_LEN = %i elements (%i bytes)\n",TL_TAB_LEN, (int)sizeof(tl_tab));*/ - - - for (i=0; i0.0) - o = 8*log(1.0/m)/log(2.0); /* convert to 'decibels' */ - else - o = 8*log(-1.0/m)/log(2.0); /* convert to 'decibels' */ - - o = o / (ENV_STEP/4); - - n = (int)(2.0*o); - if (n&1) /* round to nearest */ - n = (n>>1)+1; - else - n = n>>1; - - sin_tab[ i ] = n*2 + (m>=0.0? 0: 1 ); - - /*logerror("FMOPL.C: sin [%4i (hex=%03x)]= %4i (tl_tab value=%5i)\n", i, i, sin_tab[i], tl_tab[sin_tab[i]] );*/ - } - - for (i=0; i>1) ]; - - /* waveform 3: _ _ _ _ */ - /* / |_/ |_/ |_/ |_*/ - /* abs(output only first quarter of the sinus waveform) */ - - if (i & (1<<(SIN_BITS-2)) ) - sin_tab[3*SIN_LEN+i] = TL_TAB_LEN; - else - sin_tab[3*SIN_LEN+i] = sin_tab[i & (SIN_MASK>>2)]; - - /*logerror("FMOPL.C: sin1[%4i]= %4i (tl_tab value=%5i)\n", i, sin_tab[1*SIN_LEN+i], tl_tab[sin_tab[1*SIN_LEN+i]] ); - logerror("FMOPL.C: sin2[%4i]= %4i (tl_tab value=%5i)\n", i, sin_tab[2*SIN_LEN+i], tl_tab[sin_tab[2*SIN_LEN+i]] ); - logerror("FMOPL.C: sin3[%4i]= %4i (tl_tab value=%5i)\n", i, sin_tab[3*SIN_LEN+i], tl_tab[sin_tab[3*SIN_LEN+i]] );*/ - } - /*logerror("FMOPL.C: ENV_QUIET= %08x (dec*8=%i)\n", ENV_QUIET, ENV_QUIET*8 );*/ - - -#ifdef SAVE_SAMPLE - sample[0]=fopen("sampsum.pcm","wb"); -#endif - - return 1; -} - - -void FM_OPL::initialize() -{ - int i; - - /* frequency base */ - freqbase = (rate) ? ((double)clock / 72.0) / rate : 0; -#if 0 - rate = (double)clock / 72.0; - freqbase = 1.0; -#endif - - /*logerror("freqbase=%f\n", freqbase);*/ - - /* Timer base time */ - TimerBase = clock ? attotime::from_hz(clock) * 72 : attotime::zero; - - /* make fnumber -> increment counter table */ - for( i=0 ; i < 1024 ; i++ ) - { - /* opn phase increment counter = 20bit */ - fn_tab[i] = (uint32_t)( (double)i * 64 * freqbase * (1<<(FREQ_SH-10)) ); /* -10 because chip works with 10.10 fixed point, while we use 16.16 */ -#if 0 - logerror("FMOPL.C: fn_tab[%4i] = %08x (dec=%8i)\n", - i, fn_tab[i]>>6, fn_tab[i]>>6 ); -#endif - } - -#if 0 - for( i=0 ; i < 16 ; i++ ) - { - logerror("FMOPL.C: sl_tab[%i] = %08x\n", - i, sl_tab[i] ); - } - for( i=0 ; i < 8 ; i++ ) - { - int j; - logerror("FMOPL.C: ksl_tab[oct=%2i] =",i); - for (j=0; j<16; j++) - { - logerror("%08x ", static_cast(ksl_tab[i*16+j]) ); - } - logerror("\n"); - } -#endif - - - /* Amplitude modulation: 27 output levels (triangle waveform); 1 level takes one of: 192, 256 or 448 samples */ - /* One entry from LFO_AM_TABLE lasts for 64 samples */ - lfo_am_inc = (1.0 / 64.0 ) * (1<>1)&1; - - /* IRQRST,T1MSK,t2MSK,EOSMSK,BRMSK,x,ST2,ST1 */ - STATUS_RESET(v & (0x78-0x08)); - STATUSMASK_SET((~v) & 0x78); - - /* timer 2 */ - if(st[1] != st2) - { - attotime period = st2 ? (TimerBase * T[1]) : attotime::zero; - st[1] = st2; - if (timer_handler) (timer_handler)(TimerParam,1,period); - } - /* timer 1 */ - if(st[0] != st1) - { - attotime period = st1 ? (TimerBase * T[0]) : attotime::zero; - st[0] = st1; - if (timer_handler) (timer_handler)(TimerParam,0,period); - } - } - break; -#if BUILD_Y8950 - case 0x06: /* Key Board OUT */ - if(type&OPL_TYPE_KEYBOARD) - { - if(keyboardhandler_w) - keyboardhandler_w(keyboard_param,v); - else - device->logerror("Y8950: write unmapped KEYBOARD port\n"); - } - break; - case 0x07: /* DELTA-T control 1 : START,REC,MEMDATA,REPT,SPOFF,x,x,RST */ - if(type&OPL_TYPE_ADPCM) - deltat->ADPCM_Write(r-0x07,v); - break; -#endif - case 0x08: /* MODE,DELTA-T control 2 : CSM,NOTESEL,x,x,smpl,da/ad,64k,rom */ - mode = v; -#if BUILD_Y8950 - if(type&OPL_TYPE_ADPCM) - deltat->ADPCM_Write(r-0x07,v&0x0f); /* mask 4 LSBs in register 08 for DELTA-T unit */ -#endif - break; - -#if BUILD_Y8950 - case 0x09: /* START ADD */ - case 0x0a: - case 0x0b: /* STOP ADD */ - case 0x0c: - case 0x0d: /* PRESCALE */ - case 0x0e: - case 0x0f: /* ADPCM data write */ - case 0x10: /* DELTA-N */ - case 0x11: /* DELTA-N */ - case 0x12: /* ADPCM volume */ - if(type&OPL_TYPE_ADPCM) - deltat->ADPCM_Write(r-0x07,v); - break; - - case 0x15: /* DAC data high 8 bits (F7,F6...F2) */ - case 0x16: /* DAC data low 2 bits (F1, F0 in bits 7,6) */ - case 0x17: /* DAC data shift (S2,S1,S0 in bits 2,1,0) */ - device->logerror("FMOPL.C: DAC data register written, but not implemented reg=%02x val=%02x\n",r,v); - break; - - case 0x18: /* I/O CTRL (Direction) */ - if(type&OPL_TYPE_IO) - portDirection = v&0x0f; - break; - case 0x19: /* I/O DATA */ - if(type&OPL_TYPE_IO) - { - portLatch = v; - if(porthandler_w) - porthandler_w(port_param,v&portDirection); - } - break; -#endif - default: - device->logerror("FMOPL.C: write to unknown register: %02x\n",r); - break; - } - break; - case 0x20: /* am ON, vib ON, ksr, eg_type, mul */ - slot = slot_array[r&0x1f]; - if(slot < 0) return; - set_mul(slot,v); - break; - case 0x40: - slot = slot_array[r&0x1f]; - if(slot < 0) return; - set_ksl_tl(slot,v); - break; - case 0x60: - slot = slot_array[r&0x1f]; - if(slot < 0) return; - set_ar_dr(slot,v); - break; - case 0x80: - slot = slot_array[r&0x1f]; - if(slot < 0) return; - set_sl_rr(slot,v); - break; - case 0xa0: - if (r == 0xbd) /* am depth, vibrato depth, r,bd,sd,tom,tc,hh */ - { - lfo_am_depth = v & 0x80; - lfo_pm_depth_range = (v&0x40) ? 8 : 0; - - rhythm = v&0x3f; - - if(rhythm&0x20) - { - /* BD key on/off */ - if(v&0x10) - { - P_CH[6].SLOT[SLOT1].KEYON(2); - P_CH[6].SLOT[SLOT2].KEYON(2); - } - else - { - P_CH[6].SLOT[SLOT1].KEYOFF(~2); - P_CH[6].SLOT[SLOT2].KEYOFF(~2); - } - /* HH key on/off */ - if(v&0x01) P_CH[7].SLOT[SLOT1].KEYON ( 2); - else P_CH[7].SLOT[SLOT1].KEYOFF(~2); - /* SD key on/off */ - if(v&0x08) P_CH[7].SLOT[SLOT2].KEYON ( 2); - else P_CH[7].SLOT[SLOT2].KEYOFF(~2); - /* TOM key on/off */ - if(v&0x04) P_CH[8].SLOT[SLOT1].KEYON ( 2); - else P_CH[8].SLOT[SLOT1].KEYOFF(~2); - /* TOP-CY key on/off */ - if(v&0x02) P_CH[8].SLOT[SLOT2].KEYON ( 2); - else P_CH[8].SLOT[SLOT2].KEYOFF(~2); - } - else - { - /* BD key off */ - P_CH[6].SLOT[SLOT1].KEYOFF(~2); - P_CH[6].SLOT[SLOT2].KEYOFF(~2); - /* HH key off */ - P_CH[7].SLOT[SLOT1].KEYOFF(~2); - /* SD key off */ - P_CH[7].SLOT[SLOT2].KEYOFF(~2); - /* TOM key off */ - P_CH[8].SLOT[SLOT1].KEYOFF(~2); - /* TOP-CY off */ - P_CH[8].SLOT[SLOT2].KEYOFF(~2); - } - return; - } - /* keyon,block,fnum */ - if( (r&0x0f) > 8) return; - CH = &P_CH[r&0x0f]; - if(!(r&0x10)) - { /* a0-a8 */ - block_fnum = (CH->block_fnum&0x1f00) | v; - } - else - { /* b0-b8 */ - block_fnum = ((v&0x1f)<<8) | (CH->block_fnum&0xff); - - if(v&0x20) - { - CH->SLOT[SLOT1].KEYON ( 1); - CH->SLOT[SLOT2].KEYON ( 1); - } - else - { - CH->SLOT[SLOT1].KEYOFF(~1); - CH->SLOT[SLOT2].KEYOFF(~1); - } - } - /* update */ - if(CH->block_fnum != block_fnum) - { - uint8_t block = block_fnum >> 10; - - CH->block_fnum = block_fnum; - - CH->ksl_base = static_cast(ksl_tab[block_fnum>>6]); - CH->fc = fn_tab[block_fnum&0x03ff] >> (7-block); - - /* BLK 2,1,0 bits -> bits 3,2,1 of kcode */ - CH->kcode = (CH->block_fnum&0x1c00)>>9; - - /* the info below is actually opposite to what is stated in the Manuals (verifed on real YM3812) */ - /* if notesel == 0 -> lsb of kcode is bit 10 (MSB) of fnum */ - /* if notesel == 1 -> lsb of kcode is bit 9 (MSB-1) of fnum */ - if (mode&0x40) - CH->kcode |= (CH->block_fnum&0x100)>>8; /* notesel == 1 */ - else - CH->kcode |= (CH->block_fnum&0x200)>>9; /* notesel == 0 */ - - /* refresh Total Level in both SLOTs of this channel */ - CH->SLOT[SLOT1].TLL = CH->SLOT[SLOT1].TL + (CH->ksl_base>>CH->SLOT[SLOT1].ksl); - CH->SLOT[SLOT2].TLL = CH->SLOT[SLOT2].TL + (CH->ksl_base>>CH->SLOT[SLOT2].ksl); - - /* refresh frequency counter in both SLOTs of this channel */ - CH->CALC_FCSLOT(CH->SLOT[SLOT1]); - CH->CALC_FCSLOT(CH->SLOT[SLOT2]); - } - break; - case 0xc0: - /* FB,C */ - if( (r&0x0f) > 8) return; - CH = &P_CH[r&0x0f]; - CH->SLOT[SLOT1].FB = (v>>1)&7 ? ((v>>1)&7) + 7 : 0; - CH->SLOT[SLOT1].CON = v&1; - CH->SLOT[SLOT1].connect1 = CH->SLOT[SLOT1].CON ? &output[0] : &phase_modulation; - break; - case 0xe0: /* waveform select */ - /* simply ignore write to the waveform select register if selecting not enabled in test register */ - if(wavesel) - { - slot = slot_array[r&0x1f]; - if(slot < 0) return; - CH = &P_CH[slot/2]; - - CH->SLOT[slot&1].wavetable = (v&0x03)*SIN_LEN; - } - break; - } -} - - -void FM_OPL::ResetChip() -{ - eg_timer = 0; - eg_cnt = 0; - - noise_rng = 1; /* noise shift register */ - mode = 0; /* normal mode */ - STATUS_RESET(0x7f); - - /* reset with register write */ - WriteReg(0x01,0); /* wavesel disable */ - WriteReg(0x02,0); /* Timer1 */ - WriteReg(0x03,0); /* Timer2 */ - WriteReg(0x04,0); /* IRQ mask clear */ - for(int i = 0xff ; i >= 0x20 ; i-- ) WriteReg(i,0); - - /* reset operator parameters */ - for(OPL_CH &CH : P_CH) - { - for(OPL_SLOT &SLOT : CH.SLOT) - { - /* wave table */ - SLOT.wavetable = 0; - SLOT.state = EG_OFF; - SLOT.volume = MAX_ATT_INDEX; - } - } -#if BUILD_Y8950 - if(type&OPL_TYPE_ADPCM) - { - deltat->freqbase = freqbase; - deltat->output_pointer = &output_deltat[0]; - deltat->portshift = 5; - deltat->output_range = 1<<23; - deltat->ADPCM_Reset(0,YM_DELTAT::EMULATION_MODE_NORMAL,device); - } -#endif -} - - -void FM_OPL::postload() -{ - for(OPL_CH &CH : P_CH) - { - /* Look up key scale level */ - uint32_t const block_fnum = CH.block_fnum; - CH.ksl_base = static_cast(ksl_tab[block_fnum >> 6]); - CH.fc = fn_tab[block_fnum & 0x03ff] >> (7 - (block_fnum >> 10)); - - for(OPL_SLOT &SLOT : CH.SLOT) - { - /* Calculate key scale rate */ - SLOT.ksr = CH.kcode >> SLOT.KSR; - - /* Calculate attack, decay and release rates */ - if ((SLOT.ar + SLOT.ksr) < 16+62) - { - SLOT.eg_sh_ar = eg_rate_shift [SLOT.ar + SLOT.ksr ]; - SLOT.eg_sel_ar = eg_rate_select[SLOT.ar + SLOT.ksr ]; - } - else - { - SLOT.eg_sh_ar = 0; - SLOT.eg_sel_ar = 13*RATE_STEPS; - } - SLOT.eg_sh_dr = eg_rate_shift [SLOT.dr + SLOT.ksr ]; - SLOT.eg_sel_dr = eg_rate_select[SLOT.dr + SLOT.ksr ]; - SLOT.eg_sh_rr = eg_rate_shift [SLOT.rr + SLOT.ksr ]; - SLOT.eg_sel_rr = eg_rate_select[SLOT.rr + SLOT.ksr ]; - - /* Calculate phase increment */ - SLOT.Incr = CH.fc * SLOT.mul; - - /* Total level */ - SLOT.TLL = SLOT.TL + (CH.ksl_base >> SLOT.ksl); - - /* Connect output */ - SLOT.connect1 = SLOT.CON ? &output[0] : &phase_modulation; - } - } -#if BUILD_Y8950 - if ( (type & OPL_TYPE_ADPCM) && (deltat) ) - { - // We really should call the postlod function for the YM_DELTAT, but it's hard without registers - // (see the way the YM2610 does it) - //deltat->postload(REGS); - } -#endif -} - -} // anonymous namespace - - -static void OPLsave_state_channel(device_t *device, OPL_CH *CH) -{ - int slot, ch; - - for( ch=0 ; ch < 9 ; ch++, CH++ ) - { - /* channel */ - device->save_item(NAME(CH->block_fnum), ch); - device->save_item(NAME(CH->kcode), ch); - /* slots */ - for( slot=0 ; slot < 2 ; slot++ ) - { - OPL_SLOT *SLOT = &CH->SLOT[slot]; - - device->save_item(NAME(SLOT->ar), ch * 2 + slot); - device->save_item(NAME(SLOT->dr), ch * 2 + slot); - device->save_item(NAME(SLOT->rr), ch * 2 + slot); - device->save_item(NAME(SLOT->KSR), ch * 2 + slot); - device->save_item(NAME(SLOT->ksl), ch * 2 + slot); - device->save_item(NAME(SLOT->mul), ch * 2 + slot); - - device->save_item(NAME(SLOT->Cnt), ch * 2 + slot); - device->save_item(NAME(SLOT->FB), ch * 2 + slot); - device->save_item(NAME(SLOT->op1_out), ch * 2 + slot); - device->save_item(NAME(SLOT->CON), ch * 2 + slot); - - device->save_item(NAME(SLOT->eg_type), ch * 2 + slot); - device->save_item(NAME(SLOT->state), ch * 2 + slot); - device->save_item(NAME(SLOT->TL), ch * 2 + slot); - device->save_item(NAME(SLOT->volume), ch * 2 + slot); - device->save_item(NAME(SLOT->sl), ch * 2 + slot); - device->save_item(NAME(SLOT->key), ch * 2 + slot); - - device->save_item(NAME(SLOT->AMmask), ch * 2 + slot); - device->save_item(NAME(SLOT->vib), ch * 2 + slot); - - device->save_item(NAME(SLOT->wavetable), ch * 2 + slot); - } - } -} - - -/* Register savestate for a virtual YM3812/YM3526Y8950 */ - -static void OPL_save_state(FM_OPL *OPL, device_t *device) -{ - OPLsave_state_channel(device, OPL->P_CH); - - device->save_item(NAME(OPL->eg_cnt)); - device->save_item(NAME(OPL->eg_timer)); - - device->save_item(NAME(OPL->rhythm)); - - device->save_item(NAME(OPL->lfo_am_depth)); - device->save_item(NAME(OPL->lfo_pm_depth_range)); - device->save_item(NAME(OPL->lfo_am_cnt)); - device->save_item(NAME(OPL->lfo_pm_cnt)); - - device->save_item(NAME(OPL->noise_rng)); - device->save_item(NAME(OPL->noise_p)); - - if( OPL->type & OPL_TYPE_WAVESEL ) - { - device->save_item(NAME(OPL->wavesel)); - } - - device->save_item(NAME(OPL->T)); - device->save_item(NAME(OPL->st)); - -#if BUILD_Y8950 - if ( (OPL->type & OPL_TYPE_ADPCM) && (OPL->deltat) ) - { - OPL->deltat->savestate(device); - } - - if ( OPL->type & OPL_TYPE_IO ) - { - device->save_item(NAME(OPL->portDirection)); - device->save_item(NAME(OPL->portLatch)); - } -#endif - - device->save_item(NAME(OPL->address)); - device->save_item(NAME(OPL->status)); - device->save_item(NAME(OPL->statusmask)); - device->save_item(NAME(OPL->mode)); - - device->machine().save().register_postload(save_prepost_delegate(FUNC(FM_OPL::postload), OPL)); -} - - -#define MAX_OPL_CHIPS 2 - - -#if (BUILD_YM3812) - -void ym3812_clock_changed(void *chip, uint32_t clock, uint32_t rate) -{ - reinterpret_cast(chip)->clock_changed(clock, rate); -} - -void * ym3812_init(device_t *device, uint32_t clock, uint32_t rate) -{ - /* emulator create */ - FM_OPL *YM3812 = FM_OPL::Create(device,clock,rate,OPL_TYPE_YM3812); - if (YM3812) - { - OPL_save_state(YM3812, device); - ym3812_reset_chip(YM3812); - } - return YM3812; -} - -void ym3812_shutdown(void *chip) -{ - FM_OPL *YM3812 = (FM_OPL *)chip; - - /* emulator shutdown */ - delete YM3812; -} -void ym3812_reset_chip(void *chip) -{ - FM_OPL *YM3812 = (FM_OPL *)chip; - YM3812->ResetChip(); -} - -int ym3812_write(void *chip, int a, int v) -{ - FM_OPL *YM3812 = (FM_OPL *)chip; - return YM3812->Write(a, v); -} - -unsigned char ym3812_read(void *chip, int a) -{ - FM_OPL *YM3812 = (FM_OPL *)chip; - /* YM3812 always returns bit2 and bit1 in HIGH state */ - return YM3812->Read(a) | 0x06 ; -} -int ym3812_timer_over(void *chip, int c) -{ - FM_OPL *YM3812 = (FM_OPL *)chip; - return YM3812->TimerOver(c); -} - -void ym3812_set_timer_handler(void *chip, OPL_TIMERHANDLER timer_handler, device_t *device) -{ - reinterpret_cast(chip)->SetTimerHandler(timer_handler, device); -} -void ym3812_set_irq_handler(void *chip,OPL_IRQHANDLER IRQHandler,device_t *device) -{ - reinterpret_cast(chip)->SetIRQHandler(IRQHandler, device); -} -void ym3812_set_update_handler(void *chip,OPL_UPDATEHANDLER UpdateHandler,device_t *device) -{ - reinterpret_cast(chip)->SetUpdateHandler(UpdateHandler, device); -} - - -/* -** Generate samples for one of the YM3812's -** -** 'which' is the virtual YM3812 number -** '*buffer' is the output buffer pointer -** 'length' is the number of samples that should be generated -*/ -void ym3812_update_one(void *chip, write_stream_view &buf) -{ - FM_OPL *OPL = (FM_OPL *)chip; - uint8_t rhythm = OPL->rhythm&0x20; - int i; - - for( i=0; i < buf.samples(); i++ ) - { - int lt; - - OPL->output[0] = 0; - - OPL->advance_lfo(); - - /* FM part */ - OPL->CALC_CH(OPL->P_CH[0]); - OPL->CALC_CH(OPL->P_CH[1]); - OPL->CALC_CH(OPL->P_CH[2]); - OPL->CALC_CH(OPL->P_CH[3]); - OPL->CALC_CH(OPL->P_CH[4]); - OPL->CALC_CH(OPL->P_CH[5]); - - if(!rhythm) - { - OPL->CALC_CH(OPL->P_CH[6]); - OPL->CALC_CH(OPL->P_CH[7]); - OPL->CALC_CH(OPL->P_CH[8]); - } - else /* Rhythm part */ - { - OPL->CALC_RH(); - } - - lt = OPL->output[0]; - - #ifdef SAVE_SAMPLE - if (which==0) - { - SAVE_ALL_CHANNELS - } - #endif - - /* store to sound buffer */ - buf.put_int_clamp(i, lt, 32768 << FINAL_SH); - - OPL->advance(); - } - -} -#endif /* BUILD_YM3812 */ - - - -#if (BUILD_YM3526) - -void ym3526_clock_changed(void *chip, uint32_t clock, uint32_t rate) -{ - reinterpret_cast(chip)->clock_changed(clock, rate); -} - -void *ym3526_init(device_t *device, uint32_t clock, uint32_t rate) -{ - /* emulator create */ - FM_OPL *YM3526 = FM_OPL::Create(device,clock,rate,OPL_TYPE_YM3526); - if (YM3526) - { - OPL_save_state(YM3526, device); - ym3526_reset_chip(YM3526); - } - return YM3526; -} - -void ym3526_shutdown(void *chip) -{ - FM_OPL *YM3526 = (FM_OPL *)chip; - /* emulator shutdown */ - delete YM3526; -} -void ym3526_reset_chip(void *chip) -{ - FM_OPL *YM3526 = (FM_OPL *)chip; - YM3526->ResetChip(); -} - -int ym3526_write(void *chip, int a, int v) -{ - FM_OPL *YM3526 = (FM_OPL *)chip; - return YM3526->Write(a, v); -} - -unsigned char ym3526_read(void *chip, int a) -{ - FM_OPL *YM3526 = (FM_OPL *)chip; - /* YM3526 always returns bit2 and bit1 in HIGH state */ - return YM3526->Read(a) | 0x06 ; -} -int ym3526_timer_over(void *chip, int c) -{ - FM_OPL *YM3526 = (FM_OPL *)chip; - return YM3526->TimerOver(c); -} - -void ym3526_set_timer_handler(void *chip, OPL_TIMERHANDLER timer_handler, device_t *device) -{ - reinterpret_cast(chip)->SetTimerHandler(timer_handler, device); -} -void ym3526_set_irq_handler(void *chip,OPL_IRQHANDLER IRQHandler,device_t *device) -{ - reinterpret_cast(chip)->SetIRQHandler(IRQHandler, device); -} -void ym3526_set_update_handler(void *chip,OPL_UPDATEHANDLER UpdateHandler,device_t *device) -{ - reinterpret_cast(chip)->SetUpdateHandler(UpdateHandler, device); -} - - -/* -** Generate samples for one of the YM3526's -** -** 'which' is the virtual YM3526 number -** '*buffer' is the output buffer pointer -** 'length' is the number of samples that should be generated -*/ -void ym3526_update_one(void *chip, write_stream_view &buf) -{ - FM_OPL *OPL = (FM_OPL *)chip; - uint8_t rhythm = OPL->rhythm&0x20; - int i; - - for( i=0; i < buf.samples() ; i++ ) - { - int lt; - - OPL->output[0] = 0; - - OPL->advance_lfo(); - - /* FM part */ - OPL->CALC_CH(OPL->P_CH[0]); - OPL->CALC_CH(OPL->P_CH[1]); - OPL->CALC_CH(OPL->P_CH[2]); - OPL->CALC_CH(OPL->P_CH[3]); - OPL->CALC_CH(OPL->P_CH[4]); - OPL->CALC_CH(OPL->P_CH[5]); - - if(!rhythm) - { - OPL->CALC_CH(OPL->P_CH[6]); - OPL->CALC_CH(OPL->P_CH[7]); - OPL->CALC_CH(OPL->P_CH[8]); - } - else /* Rhythm part */ - { - OPL->CALC_RH(); - } - - lt = OPL->output[0]; - - #ifdef SAVE_SAMPLE - if (which==0) - { - SAVE_ALL_CHANNELS - } - #endif - - /* store to sound buffer */ - buf.put_int_clamp(i, lt, 32768 << FINAL_SH); - - OPL->advance(); - } - -} -#endif /* BUILD_YM3526 */ - - - - -#if BUILD_Y8950 - -static void Y8950_deltat_status_set(void *chip, uint8_t changebits) -{ - FM_OPL *Y8950 = (FM_OPL *)chip; - Y8950->STATUS_SET(changebits); -} -static void Y8950_deltat_status_reset(void *chip, uint8_t changebits) -{ - FM_OPL *Y8950 = (FM_OPL *)chip; - Y8950->STATUS_RESET(changebits); -} - -void y8950_clock_changed(void *chip, uint32_t clock, uint32_t rate) -{ - reinterpret_cast(chip)->clock_changed(clock, rate); -} - -void *y8950_init(device_t *device, uint32_t clock, uint32_t rate) -{ - /* emulator create */ - FM_OPL *Y8950 = FM_OPL::Create(device,clock,rate,OPL_TYPE_Y8950); - if (Y8950) - { - Y8950->deltat->status_set_handler = Y8950_deltat_status_set; - Y8950->deltat->status_reset_handler = Y8950_deltat_status_reset; - Y8950->deltat->status_change_which_chip = Y8950; - Y8950->deltat->status_change_EOS_bit = 0x10; /* status flag: set bit4 on End Of Sample */ - Y8950->deltat->status_change_BRDY_bit = 0x08; /* status flag: set bit3 on BRDY (End Of: ADPCM analysis/synthesis, memory reading/writing) */ - - /*Y8950->deltat->write_time = 10.0 / clock;*/ /* a single byte write takes 10 cycles of main clock */ - /*Y8950->deltat->read_time = 8.0 / clock;*/ /* a single byte read takes 8 cycles of main clock */ - /* reset */ - OPL_save_state(Y8950, device); - y8950_reset_chip(Y8950); - } - - return Y8950; -} - -void y8950_shutdown(void *chip) -{ - FM_OPL *Y8950 = (FM_OPL *)chip; - /* emulator shutdown */ - delete Y8950; -} -void y8950_reset_chip(void *chip) -{ - FM_OPL *Y8950 = (FM_OPL *)chip; - Y8950->ResetChip(); -} - -int y8950_write(void *chip, int a, int v) -{ - FM_OPL *Y8950 = (FM_OPL *)chip; - return Y8950->Write(a, v); -} - -unsigned char y8950_read(void *chip, int a) -{ - FM_OPL *Y8950 = (FM_OPL *)chip; - return Y8950->Read(a); -} -int y8950_timer_over(void *chip, int c) -{ - FM_OPL *Y8950 = (FM_OPL *)chip; - return Y8950->TimerOver(c); -} - -void y8950_set_timer_handler(void *chip, OPL_TIMERHANDLER timer_handler, device_t *device) -{ - reinterpret_cast(chip)->SetTimerHandler(timer_handler, device); -} -void y8950_set_irq_handler(void *chip,OPL_IRQHANDLER IRQHandler,device_t *device) -{ - reinterpret_cast(chip)->SetIRQHandler(IRQHandler, device); -} -void y8950_set_update_handler(void *chip,OPL_UPDATEHANDLER UpdateHandler,device_t *device) -{ - reinterpret_cast(chip)->SetUpdateHandler(UpdateHandler, device); -} - -void y8950_set_delta_t_memory(void *chip, FM_READBYTE read_byte, FM_WRITEBYTE write_byte) -{ - FM_OPL *OPL = (FM_OPL *)chip; - OPL->deltat->read_byte = read_byte; - OPL->deltat->write_byte = write_byte; -} - -/* -** Generate samples for one of the Y8950's -** -** 'which' is the virtual Y8950 number -** '*buffer' is the output buffer pointer -** 'length' is the number of samples that should be generated -*/ -void y8950_update_one(void *chip, write_stream_view &buf) -{ - int i; - FM_OPL *OPL = (FM_OPL *)chip; - uint8_t rhythm = OPL->rhythm&0x20; - YM_DELTAT &DELTAT = *OPL->deltat; - - for( i=0; i < buf.samples() ; i++ ) - { - int lt; - - OPL->output[0] = 0; - OPL->output_deltat[0] = 0; - - OPL->advance_lfo(); - - /* deltaT ADPCM */ - if( DELTAT.portstate&0x80 ) - DELTAT.ADPCM_CALC(); - - /* FM part */ - OPL->CALC_CH(OPL->P_CH[0]); - OPL->CALC_CH(OPL->P_CH[1]); - OPL->CALC_CH(OPL->P_CH[2]); - OPL->CALC_CH(OPL->P_CH[3]); - OPL->CALC_CH(OPL->P_CH[4]); - OPL->CALC_CH(OPL->P_CH[5]); - - if(!rhythm) - { - OPL->CALC_CH(OPL->P_CH[6]); - OPL->CALC_CH(OPL->P_CH[7]); - OPL->CALC_CH(OPL->P_CH[8]); - } - else /* Rhythm part */ - { - OPL->CALC_RH(); - } - - lt = OPL->output[0] + (OPL->output_deltat[0]>>11); - - #ifdef SAVE_SAMPLE - if (which==0) - { - SAVE_ALL_CHANNELS - } - #endif - - /* store to sound buffer */ - buf.put_int_clamp(i, lt, 32768 << FINAL_SH); - - OPL->advance(); - } - -} - -void y8950_set_port_handler(void *chip,OPL_PORTHANDLER_W PortHandler_w,OPL_PORTHANDLER_R PortHandler_r,device_t *device) -{ - FM_OPL *OPL = (FM_OPL *)chip; - OPL->porthandler_w = PortHandler_w; - OPL->porthandler_r = PortHandler_r; - OPL->port_param = device; -} - -void y8950_set_keyboard_handler(void *chip,OPL_PORTHANDLER_W KeyboardHandler_w,OPL_PORTHANDLER_R KeyboardHandler_r,device_t *device) -{ - FM_OPL *OPL = (FM_OPL *)chip; - OPL->keyboardhandler_w = KeyboardHandler_w; - OPL->keyboardhandler_r = KeyboardHandler_r; - OPL->keyboard_param = device; -} - -#endif diff -Nru mame-0.230+dfsg.1/src/devices/sound/fmopl.h mame-0.231+dfsg.1/src/devices/sound/fmopl.h --- mame-0.230+dfsg.1/src/devices/sound/fmopl.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/sound/fmopl.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,112 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Jarek Burczynski,Tatsuyuki Satoh -#ifndef MAME_SOUND_FMOPL_H -#define MAME_SOUND_FMOPL_H - -#pragma once - -#include - - -/* --- select emulation chips --- */ -#define BUILD_YM3812 (1) -#define BUILD_YM3526 (1) -#define BUILD_Y8950 (1) - -/* select output bits size of output : 8 or 16 */ -#define OPL_SAMPLE_BITS 16 - -typedef s32 OPLSAMPLE; -/* -#if (OPL_SAMPLE_BITS==16) -typedef int16_t OPLSAMPLE; -#endif -#if (OPL_SAMPLE_BITS==8) -typedef int8_t OPLSAMPLE; -#endif -*/ - -typedef uint8_t (*FM_READBYTE)(device_t *device, offs_t offset); -typedef void(*FM_WRITEBYTE)(device_t *device, offs_t offset, uint8_t data); -typedef void (*OPL_TIMERHANDLER)(device_t *device,int timer,const attotime &period); -typedef void (*OPL_IRQHANDLER)(device_t *device,int irq); -typedef void (*OPL_UPDATEHANDLER)(device_t *device,int min_interval_us); -typedef void (*OPL_PORTHANDLER_W)(device_t *device,unsigned char data); -typedef unsigned char (*OPL_PORTHANDLER_R)(device_t *device); - - -#if BUILD_YM3812 - -void *ym3812_init(device_t *device, uint32_t clock, uint32_t rate); -void ym3812_clock_changed(void *chip, uint32_t clock, uint32_t rate); -void ym3812_shutdown(void *chip); -void ym3812_reset_chip(void *chip); -int ym3812_write(void *chip, int a, int v); -unsigned char ym3812_read(void *chip, int a); -int ym3812_timer_over(void *chip, int c); -void ym3812_update_one(void *chip, write_stream_view &buffer); - -void ym3812_set_timer_handler(void *chip, OPL_TIMERHANDLER TimerHandler, device_t *device); -void ym3812_set_irq_handler(void *chip, OPL_IRQHANDLER IRQHandler, device_t *device); -void ym3812_set_update_handler(void *chip, OPL_UPDATEHANDLER UpdateHandler, device_t *device); - -#endif /* BUILD_YM3812 */ - - -#if BUILD_YM3526 - -/* -** Initialize YM3526 emulator(s). -** -** 'num' is the number of virtual YM3526's to allocate -** 'clock' is the chip clock in Hz -** 'rate' is sampling rate -*/ -void *ym3526_init(device_t *device, uint32_t clock, uint32_t rate); -void ym3526_clock_changed(void *chip, uint32_t clock, uint32_t rate); -/* shutdown the YM3526 emulators*/ -void ym3526_shutdown(void *chip); -void ym3526_reset_chip(void *chip); -int ym3526_write(void *chip, int a, int v); -unsigned char ym3526_read(void *chip, int a); -int ym3526_timer_over(void *chip, int c); -/* -** Generate samples for one of the YM3526's -** -** 'which' is the virtual YM3526 number -** '*buffer' is the output buffer pointer -** 'length' is the number of samples that should be generated -*/ -void ym3526_update_one(void *chip, write_stream_view &buffer); - -void ym3526_set_timer_handler(void *chip, OPL_TIMERHANDLER TimerHandler, device_t *device); -void ym3526_set_irq_handler(void *chip, OPL_IRQHANDLER IRQHandler, device_t *device); -void ym3526_set_update_handler(void *chip, OPL_UPDATEHANDLER UpdateHandler, device_t *device); - -#endif /* BUILD_YM3526 */ - - -#if BUILD_Y8950 - -/* Y8950 port handlers */ -void y8950_set_port_handler(void *chip, OPL_PORTHANDLER_W PortHandler_w, OPL_PORTHANDLER_R PortHandler_r, device_t *device); -void y8950_set_keyboard_handler(void *chip, OPL_PORTHANDLER_W KeyboardHandler_w, OPL_PORTHANDLER_R KeyboardHandler_r, device_t *device); -void y8950_set_delta_t_memory(void *chip, FM_READBYTE read_byte, FM_WRITEBYTE write_byte); - -void * y8950_init(device_t *device, uint32_t clock, uint32_t rate); -void y8950_clock_changed(void *chip, uint32_t clock, uint32_t rate); -void y8950_shutdown(void *chip); -void y8950_reset_chip(void *chip); -int y8950_write(void *chip, int a, int v); -unsigned char y8950_read (void *chip, int a); -int y8950_timer_over(void *chip, int c); -void y8950_update_one(void *chip, write_stream_view &buffer); - -void y8950_set_timer_handler(void *chip, OPL_TIMERHANDLER TimerHandler, device_t *device); -void y8950_set_irq_handler(void *chip, OPL_IRQHANDLER IRQHandler, device_t *device); -void y8950_set_update_handler(void *chip, OPL_UPDATEHANDLER UpdateHandler, device_t *device); - -#endif /* BUILD_Y8950 */ - - -#endif // MAME_SOUND_FMOPL_H diff -Nru mame-0.230+dfsg.1/src/devices/sound/multipcm.cpp mame-0.231+dfsg.1/src/devices/sound/multipcm.cpp --- mame-0.230+dfsg.1/src/devices/sound/multipcm.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/sound/multipcm.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -44,7 +44,7 @@ ENVELOPE SECTION *******************************/ -//Times are based on a 44100Hz timebase. It's adjusted to the actual sampling rate on startup +// Times are based on a 44100Hz timebase. It's adjusted to the actual sampling rate on startup const double multipcm_device::BASE_TIMES[64] = { 0, 0, 0, 0, @@ -95,6 +95,21 @@ sample->m_lfo_amplitude_reg = read_byte(address + 11) & 0xf; } +void multipcm_device::retrigger_sample(slot_t &slot) +{ + slot.m_offset = 0; + slot.m_prev_sample = 0; + slot.m_total_level = slot.m_dest_total_level << TL_SHIFT; + + envelope_generator_calc(slot); + slot.m_envelope_gen.m_state = state_t::ATTACK; + slot.m_envelope_gen.m_volume = 0; + +#if MULTIPCM_LOG_SAMPLES + dump_sample(slot); +#endif +} + int32_t multipcm_device::envelope_generator_update(slot_t &slot) { switch(slot.m_envelope_gen.m_state) @@ -334,15 +349,21 @@ case 1: // Sample { - //according to YMF278 sample write causes some base params written to the regs (envelope+lfos) - //the game should never change the sample while playing. - sample_t sample; - init_sample(&sample, slot.m_regs[1] | ((slot.m_regs[2] & 1) << 8)); - write_slot(slot, 6, sample.m_lfo_vibrato_reg); - write_slot(slot, 7, sample.m_lfo_amplitude_reg); + // according to YMF278 sample write causes some base params written to the regs (envelope+lfos) + init_sample(&slot.m_sample, slot.m_regs[1] | ((slot.m_regs[2] & 1) << 8)); + write_slot(slot, 6, slot.m_sample.m_lfo_vibrato_reg); + write_slot(slot, 7, slot.m_sample.m_lfo_amplitude_reg); + + slot.m_base = slot.m_sample.m_start; + slot.m_format = slot.m_sample.m_format; + + // retrigger if key is on + if (slot.m_playing) + retrigger_sample(slot); + break; } - case 2: //Pitch + case 2: // Pitch case 3: { uint32_t oct = ((slot.m_regs[3] >> 4) - 1) & 0xf; @@ -359,24 +380,11 @@ slot.m_step = pitch / m_rate; } break; - case 4: //KeyOn/Off (and more?) - if (data & 0x80) //KeyOn + case 4: // KeyOn/Off + if (data & 0x80) // KeyOn { - init_sample(&slot.m_sample, slot.m_regs[1] | ((slot.m_regs[2] & 1) << 8)); slot.m_playing = true; - slot.m_base = slot.m_sample.m_start; - slot.m_offset = 0; - slot.m_prev_sample = 0; - slot.m_total_level = slot.m_dest_total_level << TL_SHIFT; - slot.m_format = slot.m_sample.m_format; - - envelope_generator_calc(slot); - slot.m_envelope_gen.m_state = state_t::ATTACK; - slot.m_envelope_gen.m_volume = 0; - -#if MULTIPCM_LOG_SAMPLES - dump_sample(slot); -#endif + retrigger_sample(slot); } else { @@ -395,7 +403,7 @@ break; case 5: // TL + Interpolation slot.m_dest_total_level = (data >> 1) & 0x7f; - if (!(data & 1)) //Interpolate TL + if (!(data & 1)) // Interpolate TL { if ((slot.m_total_level >> TL_SHIFT) > slot.m_dest_total_level) { @@ -437,7 +445,7 @@ { switch(offset) { - case 0: //Data write + case 0: // Data write write_slot(m_slots[m_cur_slot], m_address, data); break; case 1: @@ -450,7 +458,8 @@ } } -/* MAME/M1 access functions */ + +/* MAME access functions */ DEFINE_DEVICE_TYPE(MULTIPCM, multipcm_device, "ymw258f", "Yamaha YMW-258-F") @@ -539,7 +548,7 @@ } } - //Pitch steps + // Pitch steps m_freq_step_table = make_unique_clear(0x400); for (int32_t i = 0; i < 0x400; ++i) { @@ -633,8 +642,7 @@ } //----------------------------------------------------- -// convert_to_stream_sample - clamp a 32-bit value to -// 16 bits and convert to a stream_buffer::sample_t +// dump_sample - dump current sample to WAV file //----------------------------------------------------- #if MULTIPCM_LOG_SAMPLES diff -Nru mame-0.230+dfsg.1/src/devices/sound/multipcm.h mame-0.231+dfsg.1/src/devices/sound/multipcm.h --- mame-0.230+dfsg.1/src/devices/sound/multipcm.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/sound/multipcm.h 2021-04-27 15:32:05.000000000 +0000 @@ -123,6 +123,7 @@ uint32_t value_to_fixed(const uint32_t bits, const float value); void init_sample(sample_t *sample, uint32_t index); + void retrigger_sample(slot_t &slot); // Internal LFO functions void lfo_init(); diff -Nru mame-0.230+dfsg.1/src/devices/sound/rf5c68.cpp mame-0.231+dfsg.1/src/devices/sound/rf5c68.cpp --- mame-0.230+dfsg.1/src/devices/sound/rf5c68.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/sound/rf5c68.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -211,10 +211,8 @@ // TODO: RF5C164 only? u8 rf5c68_device::rf5c68_r(offs_t offset) { - u8 shift; - m_stream->update(); - shift = (offset & 1) ? 11 + 8 : 11; + u8 shift = (offset & 1) ? 11 + 8 : 11; // printf("%08x\n",(m_chan[(offset & 0x0e) >> 1].addr)); @@ -224,7 +222,6 @@ void rf5c68_device::rf5c68_w(offs_t offset, u8 data) { pcm_channel &chan = m_chan[m_cbank]; - int i; /* force the stream to update first */ m_stream->update(); @@ -271,7 +268,7 @@ break; case 0x08: /* channel on/off reg */ - for (i = 0; i < 8; i++) + for (int i = 0; i < 8; i++) { m_chan[i].enable = (~data >> i) & 1; if (!m_chan[i].enable) @@ -298,5 +295,6 @@ void rf5c68_device::rf5c68_mem_w(offs_t offset, u8 data) { + m_stream->update(); m_cache.write_byte(m_wbank | offset, data); } diff -Nru mame-0.230+dfsg.1/src/devices/sound/spkrdev.cpp mame-0.231+dfsg.1/src/devices/sound/spkrdev.cpp --- mame-0.230+dfsg.1/src/devices/sound/spkrdev.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/sound/spkrdev.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -1,17 +1,16 @@ // license:BSD-3-Clause -// copyright-holders:Nicola Salmoria +// copyright-holders:Nathan Woods, Anders Hallström /*************************************************************************** - speaker.c - Sound driver to emulate a simple speaker, driven by one or more output bits - Original author: (unsigned) - Filtering: Anders Hallstr?m + Original author: MESS Team + Filtering: Anders Hallström + ****************************************************************************/ -/* Discussion of oversampling and anti-alias filtering: (Anders Hallstr?m) +/* Discussion of oversampling and anti-alias filtering: (Anders Hallström) * * This driver is for machines that directly control * one or more simple digital-to-analog converters (DAC) @@ -54,11 +53,11 @@ * Virtual stream 2: Intermediate representation. * Sample rate = RATE_MULTIPLIER * stream 3 sample rate. * If effective rate of stream 1 exceeds rate of stream 2, - * some aliasing distorsion is introduced in this step because the average filtering is a compromise. - * The distorsion is however mostly in the higher frequencies. + * some aliasing distortion is introduced in this step because the average filtering is a compromise. + * The distortion is however mostly in the higher frequencies. * -> low-pass anti-alias filtering with kernel ampl[] -> * -> down-sampling -> - * Actual stream 3: channel output generated by speaker_sound_update(). + * Actual stream 3: channel output generated by sound_stream_update(). * Sample rate = device sample rate = configured "-samplerate". * * In the speaker_state data structure, @@ -78,7 +77,7 @@ static constexpr double default_levels[2] = {0.0, 1.0}; -// Internal oversampling factor (interm. samples vs stream samples) +// Internal oversampling factor (intermediate samples vs stream samples) static constexpr int RATE_MULTIPLIER = 4; @@ -93,6 +92,7 @@ { } + //------------------------------------------------- // device_start - device-specific startup //------------------------------------------------- @@ -109,16 +109,17 @@ m_composed_volume[i] = 0; m_composed_sample_index = 0; + m_interm_sample_index = 0; + m_prevx = m_prevy = 0.0; + m_last_update_time = machine().time(); m_channel_sample_period = HZ_TO_ATTOSECONDS(machine().sample_rate()); m_channel_sample_period_secfrac = ATTOSECONDS_TO_DOUBLE(m_channel_sample_period); m_interm_sample_period = m_channel_sample_period / RATE_MULTIPLIER; m_interm_sample_period_secfrac = ATTOSECONDS_TO_DOUBLE(m_interm_sample_period); - m_channel_last_sample_time = m_channel->sample_time(); + m_channel_last_sample_time = m_last_update_time; m_channel_next_sample_time = m_channel_last_sample_time + attotime(0, m_channel_sample_period); m_next_interm_sample_time = m_channel_last_sample_time + attotime(0, m_interm_sample_period); - m_interm_sample_index = 0; - m_prevx = m_prevy = 0.0; /* Note: To avoid time drift due to floating point inaccuracies, * it is good if the speaker time synchronizes itself with the stream timing regularly. @@ -172,23 +173,7 @@ void speaker_sound_device::device_reset() { - int i; - m_level = 0; - for (i = 0; i < FILTER_LENGTH; i++) - m_composed_volume[i] = 0; - - m_composed_sample_index = 0; - m_last_update_time = machine().time(); - m_channel_sample_period = HZ_TO_ATTOSECONDS(machine().sample_rate()); - m_channel_sample_period_secfrac = ATTOSECONDS_TO_DOUBLE(m_channel_sample_period); - m_interm_sample_period = m_channel_sample_period / RATE_MULTIPLIER; - m_interm_sample_period_secfrac = ATTOSECONDS_TO_DOUBLE(m_interm_sample_period); - m_channel_last_sample_time = m_channel->sample_time(); - m_channel_next_sample_time = m_channel_last_sample_time + attotime(0, m_channel_sample_period); - m_next_interm_sample_time = m_channel_last_sample_time + attotime(0, m_interm_sample_period); - m_interm_sample_index = 0; - m_prevx = m_prevy = 0.0; } void speaker_sound_device::device_post_load() @@ -224,7 +209,7 @@ for (int sampindex = 0; sampindex < buffer.samples(); ) { - /* Note that first interm. sample may be composed... */ + /* Note that first intermediate sample may be composed... */ filtered_volume = update_interm_samples_get_filtered_volume(volume); /* Composite volume is now quantized to the stream resolution */ @@ -249,7 +234,7 @@ void speaker_sound_device::level_w(int new_level) { - int volume; + double volume; attotime time; if (new_level == m_level) @@ -266,7 +251,7 @@ if (time < m_channel_next_sample_time) { - /* Stream sample is yet unfinished, but we may have one or more interm. samples */ + /* Stream sample is yet unfinished, but we may have one or more intermediate samples */ update_interm_samples(time, volume); /* Do not forget to update speaker state before returning! */ @@ -275,23 +260,28 @@ } /* Reaching here means such time has passed since last stream update * that we can add at least one complete sample to the stream. - * The details have to be handled by speaker_sound_update() + * The details have to be handled by sound_stream_update() */ - /* Force streams.c to update sound until this point in time now */ + /* Force stream to update sound until this point in time now */ m_channel->update(); - /* This is redundant because time update has to be done within speaker_sound_update() anyway, + /* This is redundant because time update has to be done within sound_stream_update() anyway, * however this ensures synchronization between the speaker and stream timing: */ m_channel_last_sample_time = m_channel->sample_time(); + + /* sample_time() may be ahead of us */ + if (m_channel_last_sample_time > time) + m_channel_last_sample_time -= attotime(0, m_channel_sample_period); + m_channel_next_sample_time = m_channel_last_sample_time + attotime(0, m_channel_sample_period); m_next_interm_sample_time = m_channel_last_sample_time + attotime(0, m_interm_sample_period); m_last_update_time = m_channel_last_sample_time; /* Assertion: time - last_update_time < channel_sample_period, i.e. time < channel_next_sample_time */ - /* The overshooting fraction of time will make zero, one or more interm. samples: */ + /* The overshooting fraction of time will make zero, one or more intermediate samples: */ update_interm_samples(time, volume); /* Finally update speaker state before returning */ @@ -299,14 +289,14 @@ } -void speaker_sound_device::update_interm_samples(const attotime &time, int volume) +void speaker_sound_device::update_interm_samples(const attotime &time, double volume) { double fraction; - /* We may have completed zero, one or more interm. samples: */ + /* We may have completed zero, one or more intermediate samples: */ while (time >= m_next_interm_sample_time) { - /* First interm. sample may be composed, subsequent samples will be homogeneous. */ + /* First intermediate sample may be composed, subsequent samples will be homogeneous. */ /* Treat all the same general way. */ finalize_interm_sample(volume); init_next_interm_sample(); @@ -325,20 +315,20 @@ { double filtered_volume, tempx; - /* We may have one or more interm. samples to go */ + /* We may have one or more intermediate samples to go */ if (m_interm_sample_index < RATE_MULTIPLIER) { - /* First interm. sample may be composed. */ + /* First intermediate sample may be composed. */ finalize_interm_sample(volume); - /* Subsequent interm. samples will be homogeneous. */ + /* Subsequent intermediate samples will be homogeneous. */ while (m_interm_sample_index + 1 < RATE_MULTIPLIER) { init_next_interm_sample(); m_composed_volume[m_composed_sample_index] = volume; } } - /* Important: next interm. sample not initialised yet, so that no data is destroyed before filtering... */ + /* Important: next intermediate sample not initialised yet, so that no data is destroyed before filtering... */ filtered_volume = get_filtered_volume(); init_next_interm_sample(); /* Reset counter to next stream sample: */ diff -Nru mame-0.230+dfsg.1/src/devices/sound/spkrdev.h mame-0.231+dfsg.1/src/devices/sound/spkrdev.h --- mame-0.230+dfsg.1/src/devices/sound/spkrdev.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/sound/spkrdev.h 2021-04-27 15:32:05.000000000 +0000 @@ -1,12 +1,12 @@ // license:BSD-3-Clause -// copyright-holders:Nicola Salmoria +// copyright-holders:Nathan Woods, Anders Hallström /********************************************************************** - speaker.h Sound driver to emulate a simple speaker, driven by one or more output bits **********************************************************************/ + #ifndef MAME_SOUND_SPKRDEV_H #define MAME_SOUND_SPKRDEV_H @@ -44,7 +44,7 @@ // internal state // Updates the composed volume array according to time - void update_interm_samples(const attotime &time, int volume); + void update_interm_samples(const attotime &time, double volume); // Updates the composed volume array and returns final filtered volume of next stream sample double update_interm_samples_get_filtered_volume(double volume); diff -Nru mame-0.230+dfsg.1/src/devices/sound/swp30.cpp mame-0.231+dfsg.1/src/devices/sound/swp30.cpp --- mame-0.230+dfsg.1/src/devices/sound/swp30.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/sound/swp30.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -6,6 +6,8 @@ #include "emu.h" #include "swp30.h" +static int scount = 0; + /* The SWP30 is the combination of a rompler called AWM2 (Advanced Wave Memory 2) and an effects DSP called MEG (Multiple Effects @@ -52,7 +54,7 @@ 25 bits address and 32 bits data wide. It applies four filters to the sample data, two of fixed type (low pass then highpass) and two free 3-point FIR filters (used for yet another lowpass and - highpass). Envelopes are handled automatically, and the final + highpass). Envelopes are handled semi-automatically, and the final panned result is sent to the mixer. @@ -163,9 +165,9 @@ void swp30_device::device_start() { - m_stream = stream_alloc(0, 2, 44100); + m_stream = stream_alloc(0, 2, 44100, STREAM_SYNCHRONOUS); - // Attenuantion for panning is 4.4 floating point. That means 0 + // Attenuation for panning is 4.4 floating point. That means 0 // to -96.3dB. Since it's a nice range, we assume it's the same // for other attenuation values. Computed value is 1.16 // format, to avoid overflow @@ -226,6 +228,8 @@ save_item(NAME(m_eq_filter)); save_item(NAME(m_routing)); + save_item(NAME(m_internal_adr)); + save_item(NAME(m_program_address)); } @@ -263,7 +267,7 @@ void swp30_device::rom_bank_updated() { - m_stream->update(); + // Nothing to do, stream is synchronous } void swp30_device::map(address_map &map) @@ -306,7 +310,10 @@ // Control registers // These appear as channel slots 0x0e and 0x0f - // 00-0b missing + // 00-01 missing + rctrl(map, 0x02).rw(FUNC(swp30_device::internal_adr_r), FUNC(swp30_device::internal_adr_w)); + rctrl(map, 0x03).r (FUNC(swp30_device::internal_r)); + // 04-0b missing rctrl(map, 0x0c).rw(FUNC(swp30_device::keyon_mask_r<3>), FUNC(swp30_device::keyon_mask_w<3>)); rctrl(map, 0x0d).rw(FUNC(swp30_device::keyon_mask_r<2>), FUNC(swp30_device::keyon_mask_w<2>)); rctrl(map, 0x0e).rw(FUNC(swp30_device::keyon_mask_r<1>), FUNC(swp30_device::keyon_mask_w<1>)); @@ -428,7 +435,7 @@ { m_stream->update(); u8 chan = offset >> 6; - if(0 && m_lpf_cutoff[chan] != data) + if(1 || m_lpf_cutoff[chan] != data) logerror("chan %02x lpf cutoff %04x\n", chan, data); m_lpf_cutoff[chan] = data; } @@ -442,7 +449,7 @@ { m_stream->update(); u8 chan = offset >> 6; - if(0 && m_lpf_cutoff_inc[chan] != data) + if(1 || m_lpf_cutoff_inc[chan] != data) logerror("chan %02x lpf cutoff increment %04x\n", chan, data); m_lpf_cutoff_inc[chan] = data; } @@ -456,7 +463,7 @@ { m_stream->update(); u8 chan = offset >> 6; - if(0 && m_hpf_cutoff[chan] != data) + if(1 || m_hpf_cutoff[chan] != data) logerror("chan %02x hpf cutoff %04x\n", chan, data); m_hpf_cutoff[chan] = data; } @@ -470,7 +477,7 @@ { m_stream->update(); u8 chan = offset >> 6; - if(0 && m_lpf_reso[chan] != data) + if(1 || m_lpf_reso[chan] != data) logerror("chan %02x lpf resonance %04x\n", chan, data); m_lpf_reso[chan] = data; } @@ -583,7 +590,7 @@ u8 chan = offset >> 6; bool ch = m_envelope[chan][sel] != data; m_envelope[chan][sel] = data; - if(0 && ch) + if(1 && ch) logerror("snd chan %02x envelopes %04x %04x %04x\n", chan, m_envelope[chan][0], m_envelope[chan][1], m_envelope[chan][2]); } @@ -660,6 +667,52 @@ logerror("snd chan %02x format %s flags %02x address %06x\n", chan, formats[m_address[chan] >> 30], (m_address[chan] >> 24) & 0x3f, m_address[chan] & 0xffffff); } +u16 swp30_device::internal_adr_r() +{ + return m_internal_adr; +} + +void swp30_device::internal_adr_w(u16 data) +{ + m_internal_adr = data; +} + +u16 swp30_device::internal_r() +{ + u8 chan = m_internal_adr & 0x3f; + switch(m_internal_adr >> 8) { + case 0: + // used at d312 + // r0 = [b15, b14, 0,0,0,0,0,0, !b13, !b12, !b11, !b10, !b9, !b8, 1, 1] + // voice[45] = (voice[4b] * r0l) >> 7 (unsigned) + // if(r0h == 0) voice[43] = 0xff + // else voice[43] = voice[51] - r0l; // 51 = inverse velocity + // if(r0l >= 0x80) ??? + logerror("read %02x.0\n", chan); + + // 3f -> active stays 2 until release where 1 + // 7f, bf, ff -> active = 0 immediatly + return 0x0000 | 0x0000; + + case 4: + // used at 44c4 + // tests & 0x4000 only + logerror("read %02x.4\n", chan); + return 0x0000; + + case 6: + // used at 3e7c + // tests & 0x8000 only, keyoff? + logerror("read %02x.6\n", chan); + return 0x0000; + } + + logerror("%s internal_r port %x channel %02x sample %d\n", machine().time().to_string(), m_internal_adr >> 8, m_internal_adr & 0x1f, scount); + machine().debug_break(); + + return 0; +} + // MEG registers forwarding @@ -751,8 +804,8 @@ preg = util::string_format("lf%02x", (slot-0x3e) + 2*chan); else preg = util::string_format("%02x.%02x", chan, slot); - if((slot >= 0xa && slot <= 0xd) || (slot >= 0x2c && slot <= 0x2f)) - machine().debug_break(); + // if((slot >= 0xa && slot <= 0xd) || (slot >= 0x2c && slot <= 0x2f)) + // machine().debug_break(); logerror("snd_w [%04x %04x] %-5s, %04x\n", offset, offset*2, preg, data); } @@ -763,117 +816,117 @@ void swp30_device::sound_stream_update(sound_stream &stream, std::vector const &inputs, std::vector &outputs) { - // Loop first on the samples and not on the channels otherwise - // effects will be annoying to implement. + if(outputs[0].samples() != 1) + fatalerror("Sync stream not sync?\n"); + + scount++; + + // Accumulate on 64 bits, shift/clamp at the end + s64 acc_left = 0, acc_right = 0; + + // Loop on channels + for(int channel = 0; channel < 64; channel++) + if(m_active_mask & (u64(1) << channel)) { + // First, read the sample + + // - Find the base sample index and base address + s32 spos = m_sample_pos[channel] >> 8; + offs_t base_address = (m_address[channel] & 0x1ffffff) << 2; + // - Read/decompress the sample + s16 samp = 0; + switch(m_address[channel] >> 30) { + case 0: { // 16-bits linear + offs_t adr = base_address + (spos << 1); + samp = read_word(adr); + break; + } - for(int sample = 0; sample < outputs[0].samples(); sample++) { - // Accumulate on 64 bits, shift/clamp at the end - s64 acc_left = 0, acc_right = 0; - - // Loop on channels - for(int channel = 0; channel < 64; channel++) - if(m_active_mask & (u64(1) << channel)) { - // First, read the sample - - // - Find the base sample index and base address - s32 spos = m_sample_pos[channel] >> 8; - offs_t base_address = (m_address[channel] & 0x1ffffff) << 2; - // - Read/decompress the sample - s16 samp = 0; - switch(m_address[channel] >> 30) { - case 0: { // 16-bits linear - offs_t adr = base_address + (spos << 1); - samp = read_word(adr); + case 1: { // 12-bits linear + offs_t adr = base_address + (spos >> 2)*6; + switch(spos & 3) { + case 0: { // .abc .... .... + u16 w0 = read_word(adr); + samp = (w0 & 0x0fff) << 4; break; } - - case 1: { // 12-bits linear - offs_t adr = base_address + (spos >> 2)*6; - switch(spos & 3) { - case 0: { // .abc .... .... - u16 w0 = read_word(adr); - samp = (w0 & 0x0fff) << 4; - break; - } - case 1: { // C... ..AB .... - u16 w0 = read_word(adr); - u16 w1 = read_word(adr+2); - samp = ((w0 & 0xf000) >> 8) | ((w1 & 0x00ff) << 8); - break; - } - case 2: { // .... bc.. ...a - u16 w0 = read_word(adr+2); - u16 w1 = read_word(adr+4); - samp = ((w0 & 0xff00) >> 4) | ((w1 & 0x000f) << 12); - break; - } - case 3: { // .... .... ABC. - u16 w1 = read_word(adr+4); - samp = w1 & 0xfff0; - break; - } - } + case 1: { // C... ..AB .... + u16 w0 = read_word(adr); + u16 w1 = read_word(adr+2); + samp = ((w0 & 0xf000) >> 8) | ((w1 & 0x00ff) << 8); break; } - - case 2: // 8-bits linear - samp = read_byte(base_address + spos) << 8; + case 2: { // .... bc.. ...a + u16 w0 = read_word(adr+2); + u16 w1 = read_word(adr+4); + samp = ((w0 & 0xff00) >> 4) | ((w1 & 0x000f) << 12); break; - - case 3: // 8-bits logarithmic - samp = m_sample_log8[read_byte(base_address + spos)]; + } + case 3: { // .... .... ABC. + u16 w1 = read_word(adr+4); + samp = w1 & 0xfff0; break; } - - //logerror("sample %02x %06x [%d] %+5d %04x %04x %04x\n", channel, base_address >> 2, m_address[channel] >> 30, spos, samp & 0xffff, m_volume[channel], m_pan[channel]); - - // Second, step the sample pos, loop/deactivate as needed - m_sample_pos[channel] += m_sample_increment[m_freq[channel] & 0x3fff]; - s32 loop_size = (m_post_size[channel] << 8) | ((m_address[channel] >> 22) & 0xf8); - if(m_sample_pos[channel] >= loop_size) { - // We reached the loop point, stop if loop size is zero, - // otherwise loop - if(!loop_size) - m_active_mask &= ~((u64(1) << channel)); - else - do - m_sample_pos[channel] -= loop_size; - while(m_sample_pos[channel] >= loop_size); } + break; + } - // Third, filter the sample - // - missing lpf_cutoff, lpf_reso, hpf_cutoff + case 2: // 8-bits linear + samp = read_byte(base_address + spos) << 8; + break; + + case 3: // 8-bits logarithmic + samp = m_sample_log8[read_byte(base_address + spos)]; + break; + } - // - eq lowpass - s32 samp1 = (samp * m_eq_filter[channel][2] + m_sample_history[channel][0][0] * m_eq_filter[channel][1] + m_sample_history[channel][0][1] * m_eq_filter[channel][0]) >> 13; - m_sample_history[channel][0][1] = m_sample_history[channel][0][0]; - m_sample_history[channel][0][0] = samp; - - // - eq highpass - s32 samp2 = (samp1 * m_eq_filter[channel][5] + m_sample_history[channel][1][0] * m_eq_filter[channel][4] + m_sample_history[channel][1][1] * m_eq_filter[channel][3]) >> 13; - m_sample_history[channel][1][1] = m_sample_history[channel][1][0]; - m_sample_history[channel][1][0] = samp1; - - // - anything else? - - // Fourth, volume (disabled) and pan, clamp the attenuation at -96dB - s32 sampl = samp2 * m_linear_attenuation[std::min(0xff, (m_volume[channel] & 0x00) + (m_pan[channel] >> 8))]; - s32 sampr = samp2 * m_linear_attenuation[std::min(0xff, (m_volume[channel] & 0x00) + (m_pan[channel] & 0xff))]; - - // Fifth, add to the accumulators - acc_left += sampl; - acc_right += sampr; + //logerror("sample %02x %06x [%d] %+5d %04x %04x %04x\n", channel, base_address >> 2, m_address[channel] >> 30, spos, samp & 0xffff, m_volume[channel], m_pan[channel]); - // Missing: reverb, chorus, effects in general + // Second, step the sample pos, loop/deactivate as needed + m_sample_pos[channel] += m_sample_increment[m_freq[channel] & 0x3fff]; + s32 loop_size = (m_post_size[channel] << 8) | ((m_address[channel] >> 22) & 0xf8); + if(m_sample_pos[channel] >= loop_size) { + // We reached the loop point, stop if loop size is zero, + // otherwise loop + if(!loop_size) + m_active_mask &= ~((u64(1) << channel)); + else + do + m_sample_pos[channel] -= loop_size; + while(m_sample_pos[channel] >= loop_size); } - // Samples are 16 bits, there are up to 64 of them, and the accumulators are fixed-point signed 48.16 - // Global EQ is missing (it's done in the MEG) + // Third, filter the sample + // - missing lpf_cutoff, lpf_reso, hpf_cutoff - acc_left >>= (16+6); - outputs[0].put_int_clamp(sample, acc_left, 32768); + // - eq lowpass + s32 samp1 = (samp * m_eq_filter[channel][2] + m_sample_history[channel][0][0] * m_eq_filter[channel][1] + m_sample_history[channel][0][1] * m_eq_filter[channel][0]) >> 13; + m_sample_history[channel][0][1] = m_sample_history[channel][0][0]; + m_sample_history[channel][0][0] = samp; + + // - eq highpass + s32 samp2 = (samp1 * m_eq_filter[channel][5] + m_sample_history[channel][1][0] * m_eq_filter[channel][4] + m_sample_history[channel][1][1] * m_eq_filter[channel][3]) >> 13; + m_sample_history[channel][1][1] = m_sample_history[channel][1][0]; + m_sample_history[channel][1][0] = samp1; + + // - anything else? + + // Fourth, volume (disabled) and pan, clamp the attenuation at -96dB + s32 sampl = samp2 * m_linear_attenuation[std::min(0xff, (m_volume[channel] & 0x00) + (m_pan[channel] >> 8))]; + s32 sampr = samp2 * m_linear_attenuation[std::min(0xff, (m_volume[channel] & 0x00) + (m_pan[channel] & 0xff))]; + + // Fifth, add to the accumulators + acc_left += sampl; + acc_right += sampr; - acc_right >>= (16+6); - outputs[1].put_int_clamp(sample, acc_right, 32768); - } + // Missing: reverb, chorus, effects in general + } + + // Samples are 16 bits, there are up to 64 of them, and the accumulators are fixed-point signed 48.16 + // Global EQ is missing (it's done in the MEG) + + acc_left >>= (16+6); + outputs[0].put_int_clamp(0, acc_left, 32768); + + acc_right >>= (16+6); + outputs[1].put_int_clamp(0, acc_right, 32768); } diff -Nru mame-0.230+dfsg.1/src/devices/sound/swp30.h mame-0.231+dfsg.1/src/devices/sound/swp30.h --- mame-0.230+dfsg.1/src/devices/sound/swp30.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/sound/swp30.h 2021-04-27 15:32:05.000000000 +0000 @@ -50,6 +50,8 @@ u16 m_routing[0x40][3]; u16 m_map[8]; + u16 m_internal_adr; + u16 m_program_address; // AWM2 per-channel registers @@ -87,6 +89,9 @@ void dry_rev_w(offs_t offset, u16 data); u16 cho_var_r(offs_t offset); void cho_var_w(offs_t offset, u16 data); + u16 internal_adr_r(); + void internal_adr_w(u16 data); + u16 internal_r(); template u16 routing_r(offs_t offset); template void routing_w(offs_t offset, u16 data); diff -Nru mame-0.230+dfsg.1/src/devices/sound/wave.cpp mame-0.231+dfsg.1/src/devices/sound/wave.cpp --- mame-0.230+dfsg.1/src/devices/sound/wave.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/sound/wave.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -2,17 +2,15 @@ // copyright-holders:Nathan Woods /*************************************************************************** - wave.c + Cassette wave samples sound driver - Code that interfaces - Functions to handle loading, creation, recording and playback - of wave samples for IO_CASSETTE + Code that interfaces functions to handle loading, creation, + recording and playback of wave samples for IO_CASSETTE 2010-06-19 - Found that since 0.132, the right channel is badly out of sync on a mono system, causing bad sound. Added code to disable the second channel on a mono system. - ****************************************************************************/ #include "emu.h" diff -Nru mame-0.230+dfsg.1/src/devices/sound/wave.h mame-0.231+dfsg.1/src/devices/sound/wave.h --- mame-0.230+dfsg.1/src/devices/sound/wave.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/sound/wave.h 2021-04-27 15:32:05.000000000 +0000 @@ -1,5 +1,11 @@ // license:BSD-3-Clause // copyright-holders:Nathan Woods +/********************************************************************** + + Cassette wave samples sound driver + +**********************************************************************/ + #ifndef MAME_SOUND_WAVE_H #define MAME_SOUND_WAVE_H diff -Nru mame-0.230+dfsg.1/src/devices/sound/y8950.cpp mame-0.231+dfsg.1/src/devices/sound/y8950.cpp --- mame-0.230+dfsg.1/src/devices/sound/y8950.cpp 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/sound/y8950.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,309 @@ +// license:BSD-3-Clause +// copyright-holders:Aaron Giles + +#include "emu.h" +#include "y8950.h" + + +DEFINE_DEVICE_TYPE(Y8950, y8950_device, "y8950", "Y8950 OPL MSX-Audio") + + +//********************************************************* +// Y8950 DEVICE +//********************************************************* + +//------------------------------------------------- +// y8950_device - constructor +//------------------------------------------------- + +y8950_device::y8950_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, device_type type) : + device_t(mconfig, type, tag, owner, clock), + device_sound_interface(mconfig, *this), + device_rom_interface(mconfig, *this), + m_address(0), + m_io_ddr(0), + m_stream(nullptr), + m_fm(*this), + m_adpcm_b(*this, read8sm_delegate(*this, FUNC(y8950_device::adpcm_b_read)), write8sm_delegate(*this, FUNC(y8950_device::adpcm_b_write))), + m_keyboard_read_handler(*this), + m_keyboard_write_handler(*this), + m_io_read_handler(*this), + m_io_write_handler(*this) +{ +} + + +//------------------------------------------------- +// status_r - return the status port (A0=0) +//------------------------------------------------- + +u8 y8950_device::status_r() +{ + m_stream->update(); + return combine_status(); +} + + +//------------------------------------------------- +// data_r - return specific register data (A0=1) +//------------------------------------------------- + +u8 y8950_device::data_r() +{ + u8 result = 0xff; + switch (m_address) + { + case 0x05: // keyboard in + result = m_keyboard_read_handler(0); + break; + + case 0x09: // ADPCM data + case 0x1a: + result = m_adpcm_b.read(m_address - 0x07); + break; + + case 0x19: // I/O data + result = m_io_read_handler(0); + break; + + default: + logerror("Unexpected read from Y8950 data port %02X\n", m_address); + break; + } + return result; +} + + +//------------------------------------------------- +// read - handle a read from the device +//------------------------------------------------- + +u8 y8950_device::read(offs_t offset) +{ + // A0 selects between status/data + return ((offset & 1) == 0) ? status_r() : data_r(); +} + + +//------------------------------------------------- +// address_w - write to the address port (A0=0) +//------------------------------------------------- + +void y8950_device::address_w(u8 value) +{ + m_address = value; +} + + +//------------------------------------------------- +// data_w - write to the data port (A0=1) +//------------------------------------------------- + +void y8950_device::data_w(u8 value) +{ + // force an update + m_stream->update(); + + // handle special addresses + switch (m_address) + { + case 0x04: // IRQ control + m_fm.write(m_address, value); + combine_status(); + break; + + case 0x06: // keyboard out + m_keyboard_write_handler(0, value); + break; + + case 0x08: // split FM/ADPCM-B + m_adpcm_b.write(m_address - 0x07, (value & 0x0f) | 0x80); + m_fm.write(m_address, value & 0xc0); + break; + + case 0x07: // ADPCM-B registers + case 0x09: + case 0x0a: + case 0x0b: + case 0x0c: + case 0x0d: + case 0x0e: + case 0x0f: + case 0x10: + case 0x11: + case 0x12: + case 0x15: + case 0x16: + case 0x17: + m_adpcm_b.write(m_address - 0x07, value); + break; + + case 0x18: // I/O direction + m_io_ddr = value & 0x0f; + break; + + case 0x19: // I/O data + m_io_write_handler(0, value & m_io_ddr); + break; + + default: // everything else to FM + m_fm.write(m_address, value); + break; + } +} + + +//------------------------------------------------- +// write - handle a write to the register +// interface +//------------------------------------------------- + +void y8950_device::write(offs_t offset, u8 value) +{ + // A0 selects between address/data + if ((offset & 1) == 0) + address_w(value); + else + data_w(value); +} + + +//------------------------------------------------- +// device_start - start of emulation +//------------------------------------------------- + +void y8950_device::device_start() +{ + // create our stream + m_stream = stream_alloc(0, fm_engine::OUTPUTS, m_fm.sample_rate(clock())); + + // resolve callbacks + m_keyboard_read_handler.resolve_safe(0); + m_keyboard_write_handler.resolve_safe(); + m_io_read_handler.resolve_safe(0); + m_io_write_handler.resolve_safe(); + + // save our data + save_item(YMFM_NAME(m_address)); + save_item(YMFM_NAME(m_io_ddr)); + + // save the engines + m_fm.save(*this); + m_adpcm_b.save(*this); +} + + +//------------------------------------------------- +// device_reset - start of emulation +//------------------------------------------------- + +void y8950_device::device_reset() +{ + // reset the engines + m_fm.reset(); + m_adpcm_b.reset(); +} + + +//------------------------------------------------- +// device_clock_changed - update if clock changes +//------------------------------------------------- + +void y8950_device::device_clock_changed() +{ + m_stream->set_sample_rate(m_fm.sample_rate(clock())); +} + + +//------------------------------------------------- +// rom_bank_updated - refresh the stream if the +// ROM banking changes +//------------------------------------------------- + +void y8950_device::rom_bank_updated() +{ + m_stream->update(); +} + + +//------------------------------------------------- +// sound_stream_update - update the sound stream +//------------------------------------------------- + +void y8950_device::sound_stream_update(sound_stream &stream, std::vector const &inputs, std::vector &outputs) +{ + // iterate over all target samples + for (int sampindex = 0; sampindex < outputs[0].samples(); sampindex++) + { + // clock the system + m_fm.clock(fm_engine::ALL_CHANNELS); + + // clock the ADPCM-B engine every cycle + m_adpcm_b.clock(0x01); + + // update the FM content; clipping is unknown + s32 sums[std::max(fm_engine::OUTPUTS, ymadpcm_b_engine::OUTPUTS)] = { 0 }; + m_fm.output(sums, 1, 32767, fm_engine::ALL_CHANNELS); + + // mix in the ADPCM; ADPCM-B is stereo, but only one channel + // not sure how it's wired up internally + m_adpcm_b.output(sums, 3, 0x01); + + // convert to 10.3 floating point value for the DAC and back + // Y8950 is mono + for (int index = 0; index < fm_engine::OUTPUTS; index++) + outputs[index].put_int(sampindex, ymfm_roundtrip_fp(sums[index]), 32768); + } + + // update the status in case of ADPCM EOS + combine_status(); +} + + +//------------------------------------------------- +// combine_status - combine status flags from +// OPN and ADPCM-B, masking out any indicated by +// the flag control register +//------------------------------------------------- + +u8 y8950_device::combine_status() +{ + // start with current FM status, masking out bits we might set + u8 status = m_fm.status() & ~(STATUS_ADPCM_B_EOS | STATUS_ADPCM_B_BRDY | STATUS_ADPCM_B_PLAYING); + + // insert the live ADPCM status bits + u8 adpcm_status = m_adpcm_b.status(); + if ((adpcm_status & ymadpcm_b_channel::STATUS_EOS) != 0) + status |= STATUS_ADPCM_B_EOS; + if ((adpcm_status & ymadpcm_b_channel::STATUS_BRDY) != 0) + status |= STATUS_ADPCM_B_BRDY; + if ((adpcm_status & ymadpcm_b_channel::STATUS_PLAYING) != 0) + status |= STATUS_ADPCM_B_PLAYING; + + // run it through the FM engine to handle interrupts for us + return m_fm.set_reset_status(status, ~status); +} + + +//------------------------------------------------- +// adpcm_b_read - callback to read data for the +// ADPCM-B engine; in this case, from our default +// address space +//------------------------------------------------- + +u8 y8950_device::adpcm_b_read(offs_t offset) +{ + return read_byte(offset); +} + + +//------------------------------------------------- +// adpcm_b_write - callback to write data to the +// ADPCM-B engine; in this case, to our default +// address space +//------------------------------------------------- + +void y8950_device::adpcm_b_write(offs_t offset, u8 data) +{ + space().write_byte(offset, data); +} diff -Nru mame-0.230+dfsg.1/src/devices/sound/y8950.h mame-0.231+dfsg.1/src/devices/sound/y8950.h --- mame-0.230+dfsg.1/src/devices/sound/y8950.h 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/sound/y8950.h 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,81 @@ +// license:BSD-3-Clause +// copyright-holders:Aaron Giles + +#ifndef MAME_SOUND_Y8950_H +#define MAME_SOUND_Y8950_H + +#pragma once + +#include "ymfm.h" +#include "ymadpcm.h" + + +// ======================> y8950_device + +DECLARE_DEVICE_TYPE(Y8950, y8950_device); + +class y8950_device : public device_t, public device_sound_interface, public device_rom_interface<21> +{ +public: + // YM2151 is OPL + using fm_engine = ymopl_engine; + + static constexpr u8 STATUS_ADPCM_B_PLAYING = 0x01; + static constexpr u8 STATUS_ADPCM_B_BRDY = 0x08; + static constexpr u8 STATUS_ADPCM_B_EOS = 0x10; + static constexpr u8 ALL_IRQS = STATUS_ADPCM_B_BRDY | STATUS_ADPCM_B_EOS | fm_engine::STATUS_TIMERA | fm_engine::STATUS_TIMERB; + + // constructor + y8950_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, device_type type = Y8950); + + // configuration helpers + auto irq_handler() { return m_fm.irq_handler(); } + auto keyboard_read() { return m_keyboard_read_handler.bind(); } + auto keyboard_write() { return m_keyboard_write_handler.bind(); } + auto io_read() { return m_io_read_handler.bind(); } + auto io_write() { return m_io_write_handler.bind(); } + + // read access + u8 status_r(); // A0=0 + u8 data_r(); // A0=1 + u8 read(offs_t offset); + + // write access + void address_w(u8 data); // A0=0 + void data_w(u8 data); // A0=1 + void write(offs_t offset, u8 data); + +protected: + // device-level overrides + virtual void device_start() override; + virtual void device_reset() override; + virtual void device_clock_changed() override; + + // ROM device overrides + virtual void rom_bank_updated() override; + + // sound overrides + virtual void sound_stream_update(sound_stream &stream, std::vector const &inputs, std::vector &outputs) override; + +private: + // combine ADPCM and OPN statuses + u8 combine_status(); + + // ADPCM read/write callbacks + u8 adpcm_b_read(offs_t address); + void adpcm_b_write(offs_t address, u8 data); + + // internal state + u8 m_address; // address register + u8 m_io_ddr; // data direction register for I/O + sound_stream *m_stream; // sound stream + fm_engine m_fm; // core FM engine + ymadpcm_b_engine m_adpcm_b; // ADPCM-B engine + devcb_read8 m_keyboard_read_handler; // keyboard port read + devcb_write8 m_keyboard_write_handler; // keyboard port write + devcb_read8 m_io_read_handler; // I/O port read + devcb_write8 m_io_write_handler; // I/O port write +}; + + +#endif // MAME_SOUND_Y8950_H diff -Nru mame-0.230+dfsg.1/src/devices/sound/ym2151.cpp mame-0.231+dfsg.1/src/devices/sound/ym2151.cpp --- mame-0.230+dfsg.1/src/devices/sound/ym2151.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/sound/ym2151.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -11,51 +11,6 @@ //********************************************************* -// INLINE HELPERS -//********************************************************* - -//------------------------------------------------- -// linear_to_fp - given a 32-bit signed input -// value, convert it to a signed 10.3 floating- -// point value -//------------------------------------------------- - -inline s16 linear_to_fp(s32 value) -{ - // start with the absolute value - s32 avalue = std::abs(value); - - // compute shift to fit in 9 bits (bit 10 is the sign) - int shift = (32 - 9) - count_leading_zeros(avalue); - - // if out of range, just return maximum; note that YM3012 DAC does - // not support a shift count of 7, so we clamp at 6 - if (shift >= 7) - shift = 6, avalue = 0x1ff; - else if (shift > 0) - avalue >>= shift; - else - shift = 0; - - // encode with shift in low 3 bits and signed mantissa in upper - return shift | (((value < 0) ? -avalue : avalue) << 3); -} - - -//------------------------------------------------- -// fp_to_linear - given a 10.3 floating-point -// value, convert it to a signed 16-bit value, -// clamping -//------------------------------------------------- - -inline s32 fp_to_linear(s16 value) -{ - return (value >> 3) << BIT(value, 0, 3); -} - - - -//********************************************************* // YM2151 DEVICE //********************************************************* @@ -66,10 +21,10 @@ ym2151_device::ym2151_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, device_type type) : device_t(mconfig, type, tag, owner, clock), device_sound_interface(mconfig, *this), - m_opm(*this), + m_fm(*this), m_stream(nullptr), m_port_w(*this), - m_busy_duration(m_opm.compute_busy_duration()), + m_busy_duration(m_fm.compute_busy_duration()), m_address(0), m_reset_state(1) { @@ -90,7 +45,7 @@ break; case 1: // status port, YM2203 compatible - result = m_opm.status(); + result = m_fm.status(); break; } return result; @@ -119,14 +74,14 @@ // force an update m_stream->update(); - // write to OPM - m_opm.write(m_address, value); + // write to FM + m_fm.write(m_address, value); // special cases if (m_address == 0x01 && BIT(value, 1)) { // writes to the test register can reset the LFO - m_opm.reset_lfo(); + m_fm.reset_lfo(); } else if (m_address == 0x1b) { @@ -135,7 +90,7 @@ } // mark busy for a bit - m_opm.set_busy_end(machine().time() + m_busy_duration); + m_fm.set_busy_end(machine().time() + m_busy_duration); break; } } @@ -161,7 +116,7 @@ void ym2151_device::device_start() { // create our stream - m_stream = stream_alloc(0, 2, clock() / (2 * 4 * 8)); + m_stream = stream_alloc(0, fm_engine::OUTPUTS, m_fm.sample_rate(clock())); // resolve the write callback m_port_w.resolve_safe(); @@ -174,7 +129,7 @@ save_item(YMFM_NAME(m_reset_state)); // save the engines - m_opm.save(*this); + m_fm.save(*this); } @@ -185,7 +140,7 @@ void ym2151_device::device_reset() { // reset the engines - m_opm.reset(); + m_fm.reset(); } @@ -195,8 +150,8 @@ void ym2151_device::device_clock_changed() { - m_stream->set_sample_rate(clock() / (2 * 4 * 8)); - m_busy_duration = m_opm.compute_busy_duration(); + m_stream->set_sample_rate(m_fm.sample_rate(clock())); + m_busy_duration = m_fm.compute_busy_duration(); } @@ -210,16 +165,16 @@ for (int sampindex = 0; sampindex < outputs[0].samples(); sampindex++) { // clock the system - m_opm.clock(0xff); + m_fm.clock(fm_engine::ALL_CHANNELS); - // update the OPM content; OPM is full 14-bit with no intermediate clipping - s32 lsum = 0, rsum = 0; - m_opm.output(lsum, rsum, 0, 32767, 0xff); + // update the FM content; YM2151 is full 14-bit with no intermediate clipping + s32 sums[fm_engine::OUTPUTS] = { 0 }; + m_fm.output(sums, 0, 32767, fm_engine::ALL_CHANNELS); // convert to 10.3 floating point value for the DAC and back - // OPM is stereo - outputs[0].put_int_clamp(sampindex, fp_to_linear(linear_to_fp(lsum)), 32768); - outputs[1].put_int_clamp(sampindex, fp_to_linear(linear_to_fp(rsum)), 32768); + // YM2151 is stereo + for (int index = 0; index < fm_engine::OUTPUTS; index++) + outputs[index].put_int(sampindex, ymfm_roundtrip_fp(sums[index]), 32768); } } @@ -260,15 +215,15 @@ // force an update m_stream->update(); - // write to OPM - m_opm.write(m_address, value); + // write to FM + m_fm.write(m_address, value); // writes to register 0x1B send the upper 2 bits to the output lines if (m_address == 0x1b) m_port_w(0, value >> 6, 0xff); // mark busy for a bit - m_opm.set_busy_end(machine().time() + m_busy_duration); + m_fm.set_busy_end(machine().time() + m_busy_duration); break; } } diff -Nru mame-0.230+dfsg.1/src/devices/sound/ym2151.h mame-0.231+dfsg.1/src/devices/sound/ym2151.h --- mame-0.230+dfsg.1/src/devices/sound/ym2151.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/sound/ym2151.h 2021-04-27 15:32:05.000000000 +0000 @@ -16,11 +16,14 @@ class ym2151_device : public device_t, public device_sound_interface { public: + // YM2151 is OPM + using fm_engine = ymopm_engine; + // constructor ym2151_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, device_type type = YM2151); // configuration helpers - auto irq_handler() { return m_opm.irq_handler(); } + auto irq_handler() { return m_fm.irq_handler(); } auto port_write_handler() { return m_port_w.bind(); } // read/write access @@ -43,7 +46,7 @@ virtual void sound_stream_update(sound_stream &stream, std::vector const &inputs, std::vector &outputs) override; // internal state - ymopm_engine m_opm; // core OPM engine + fm_engine m_fm; // core FM engine sound_stream *m_stream; // sound stream devcb_write8 m_port_w; // port write handler attotime m_busy_duration; // precomputed busy signal duration diff -Nru mame-0.230+dfsg.1/src/devices/sound/ym2203.cpp mame-0.231+dfsg.1/src/devices/sound/ym2203.cpp --- mame-0.230+dfsg.1/src/devices/sound/ym2203.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/sound/ym2203.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -9,51 +9,6 @@ //********************************************************* -// INLINE HELPERS -//********************************************************* - -//------------------------------------------------- -// linear_to_fp - given a 32-bit signed input -// value, convert it to a signed 10.3 floating- -// point value -//------------------------------------------------- - -inline s16 linear_to_fp(s32 value) -{ - // start with the absolute value - s32 avalue = std::abs(value); - - // compute shift to fit in 9 bits (bit 10 is the sign) - int shift = (32 - 9) - count_leading_zeros(avalue); - - // if out of range, just return maximum; note that YM3012 DAC does - // not support a shift count of 7, so we clamp at 6 - if (shift >= 7) - shift = 6, avalue = 0x1ff; - else if (shift > 0) - avalue >>= shift; - else - shift = 0; - - // encode with shift in low 3 bits and signed mantissa in upper - return shift | (((value < 0) ? -avalue : avalue) << 3); -} - - -//------------------------------------------------- -// fp_to_linear - given a 10.3 floating-point -// value, convert it to a signed 16-bit value, -// clamping -//------------------------------------------------- - -inline s32 fp_to_linear(s16 value) -{ - return (value >> 3) << BIT(value, 0, 3); -} - - - -//********************************************************* // YM2203 DEVICE //********************************************************* @@ -63,9 +18,9 @@ ym2203_device::ym2203_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : ay8910_device(mconfig, YM2203, tag, owner, clock, PSG_TYPE_YM, 3, 2), - m_opn(*this), + m_fm(*this), m_stream(nullptr), - m_busy_duration(m_opn.compute_busy_duration()), + m_busy_duration(m_fm.compute_busy_duration()), m_address(0) { } @@ -81,7 +36,7 @@ switch (offset & 1) { case 0: // status port - result = m_opn.status(); + result = m_fm.status(); break; case 1: // data port (only SSG) @@ -114,7 +69,7 @@ // prescaler select : 2d,2e,2f if (m_address == 0x2d) update_prescale(6); - else if (m_address == 0x2e && m_opn.clock_prescale() == 6) + else if (m_address == 0x2e && m_fm.clock_prescale() == 6) update_prescale(3); else if (m_address == 0x2f) update_prescale(2); @@ -129,13 +84,13 @@ } else { - // write to OPN + // write to FM m_stream->update(); - m_opn.write(m_address, value); + m_fm.write(m_address, value); } // mark busy for a bit - m_opn.set_busy_end(machine().time() + m_busy_duration); + m_fm.set_busy_end(machine().time() + m_busy_duration); break; } } @@ -151,13 +106,13 @@ ay8910_device::device_start(); // create our stream - m_stream = stream_alloc(0, 1, clock() / (4 * 3 * 6)); + m_stream = stream_alloc(0, fm_engine::OUTPUTS, m_fm.sample_rate(clock())); // save our data save_item(YMFM_NAME(m_address)); - // save the OPN engine - m_opn.save(*this); + // save the FM engine + m_fm.save(*this); } @@ -170,8 +125,8 @@ // reset the SSG device ay8910_device::device_reset(); - // reset the OPN engine - m_opn.reset(); + // reset the FM engine + m_fm.reset(); } @@ -182,7 +137,7 @@ void ym2203_device::device_clock_changed() { // refresh via prescale - update_prescale(m_opn.clock_prescale()); + update_prescale(m_fm.clock_prescale()); } @@ -203,15 +158,16 @@ for (int sampindex = 0; sampindex < outputs[0].samples(); sampindex++) { // clock the system - m_opn.clock(0x07); + m_fm.clock(fm_engine::ALL_CHANNELS); - // update the OPN content; OPN is full 14-bit with no intermediate clipping - s32 lsum = 0, rsum = 0; - m_opn.output(lsum, rsum, 0, 32767, 0x07); + // update the FM content; YM2203 is full 14-bit with no intermediate clipping + s32 sums[fm_engine::OUTPUTS] = { 0 }; + m_fm.output(sums, 0, 32767, fm_engine::ALL_CHANNELS); // convert to 10.3 floating point value for the DAC and back - // OPN is mono, so only the left sum matters - outputs[0].put_int_clamp(sampindex, fp_to_linear(linear_to_fp(lsum)), 32768); + // YM2203 is mono + for (int index = 0; index < fm_engine::OUTPUTS; index++) + outputs[index].put_int(sampindex, ymfm_roundtrip_fp(sums[index]), 32768); } } @@ -223,17 +179,17 @@ void ym2203_device::update_prescale(u8 newval) { - // inform the OPN engine and refresh our clock rate - m_opn.set_clock_prescale(newval); - m_stream->set_sample_rate(clock() / (4 * 3 * newval)); - logerror("Prescale = %d; sample_rate = %d\n", newval, clock() / (4 * 3 * newval)); + // inform the FM engine and refresh our clock rate + m_fm.set_clock_prescale(newval); + m_stream->set_sample_rate(m_fm.sample_rate(clock())); + logerror("Prescale = %d; sample_rate = %d\n", newval, m_fm.sample_rate(clock())); // also scale the SSG streams - // mapping is (OPN->SSG): 6->4, 3->2, 2->1 + // mapping is (FM->SSG): 6->4, 3->2, 2->1 u8 ssg_scale = 2 * newval / 3; // QUESTION: where does the *2 come from?? ay_set_clock(clock() * 2 / ssg_scale); // recompute the busy duration - m_busy_duration = m_opn.compute_busy_duration(); + m_busy_duration = m_fm.compute_busy_duration(); } diff -Nru mame-0.230+dfsg.1/src/devices/sound/ym2203.h mame-0.231+dfsg.1/src/devices/sound/ym2203.h --- mame-0.230+dfsg.1/src/devices/sound/ym2203.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/sound/ym2203.h 2021-04-27 15:32:05.000000000 +0000 @@ -17,11 +17,14 @@ class ym2203_device : public ay8910_device { public: + // YM2151 is OPN + using fm_engine = ymopn_engine; + // constructor ym2203_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // configuration helpers - auto irq_handler() { return m_opn.irq_handler(); } + auto irq_handler() { return m_fm.irq_handler(); } // read/write access u8 read(offs_t offset); @@ -47,7 +50,7 @@ void update_prescale(u8 newval); // internal state - ymopn_engine m_opn; // core OPN engine + fm_engine m_fm; // core FM engine sound_stream *m_stream; // sound stream attotime m_busy_duration; // precomputed busy signal duration u8 m_address; // address register diff -Nru mame-0.230+dfsg.1/src/devices/sound/ym2413.cpp mame-0.231+dfsg.1/src/devices/sound/ym2413.cpp --- mame-0.230+dfsg.1/src/devices/sound/ym2413.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/sound/ym2413.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -1,1782 +1,253 @@ -// license:GPL-2.0+ -// copyright-holders:Jarek Burczynski, Ernesto Corvi -/* -** -** File: ym2413.cpp - software implementation of YM2413 -** FM sound generator type OPLL -** -** Copyright Jarek Burczynski -** -** Version 1.0 -** - - Features as listed in LSI-212413A2 data sheet: - 1. FM Sound Generator for real sound creation. - 2. Two Selectable modes: 9 simultaneous sounds or 6 melody sounds plus 5 rhythm sounds - (different tones can be used together in either case). - 3. Built-in Instruments data (15 melody tones, 5 rhythm tones, "CAPTAIN and TELETEXT applicalbe tones). - 4. Built-in DA Converter. - 5. Built-in Quartz Oscillator. - 6. Built-in Vibrato Oscillator/AM Oscillator - 7. TTL Compatible Input. - 8. Si-Gate NMOS LSI - 9. A single 5V power source. - -to do: - -- make sure of the sinus amplitude bits - -- make sure of the EG resolution bits (looks like the biggest - modulation index generated by the modulator is 123, 124 = no modulation) -- find proper algorithm for attack phase of EG - -- tune up instruments ROM - -- support sample replay in test mode (it is NOT as simple as setting bit 0 - in register 0x0f and using register 0x10 for sample data). - Which games use this feature ? - - -*/ +// license:BSD-3-Clause +// copyright-holders:Aaron Giles #include "emu.h" #include "ym2413.h" -#include - -#define FREQ_SH 16 /* 16.16 fixed point (frequency calculations) */ -#define EG_SH 16 /* 16.16 fixed point (EG timing) */ -#define LFO_SH 24 /* 8.24 fixed point (LFO calculations) */ - -#define FREQ_MASK ((1<>5) - - -/* LFO Amplitude Modulation table (verified on real YM3812) - 27 output levels (triangle waveform); 1 level takes one of: 192, 256 or 448 samples - - Length: 210 elements. - - Each of the elements has to be repeated - exactly 64 times (on 64 consecutive samples). - The whole table takes: 64 * 210 = 13440 samples. - -We use data>>1, until we find what it really is on real chip... - -*/ -const uint8_t ym2413_device::lfo_am_table[LFO_AM_TAB_ELEMENTS] = { - 0,0,0,0,0,0,0, - 1,1,1,1, - 2,2,2,2, - 3,3,3,3, - 4,4,4,4, - 5,5,5,5, - 6,6,6,6, - 7,7,7,7, - 8,8,8,8, - 9,9,9,9, - 10,10,10,10, - 11,11,11,11, - 12,12,12,12, - 13,13,13,13, - 14,14,14,14, - 15,15,15,15, - 16,16,16,16, - 17,17,17,17, - 18,18,18,18, - 19,19,19,19, - 20,20,20,20, - 21,21,21,21, - 22,22,22,22, - 23,23,23,23, - 24,24,24,24, - 25,25,25,25, - 26,26,26, - 25,25,25,25, - 24,24,24,24, - 23,23,23,23, - 22,22,22,22, - 21,21,21,21, - 20,20,20,20, - 19,19,19,19, - 18,18,18,18, - 17,17,17,17, - 16,16,16,16, - 15,15,15,15, - 14,14,14,14, - 13,13,13,13, - 12,12,12,12, - 11,11,11,11, - 10,10,10,10, - 9,9,9,9, - 8,8,8,8, - 7,7,7,7, - 6,6,6,6, - 5,5,5,5, - 4,4,4,4, - 3,3,3,3, - 2,2,2,2, - 1,1,1,1 -}; - -/* LFO Phase Modulation table (verified on real YM2413) */ -const int8_t ym2413_device::lfo_pm_table[8*8] = { - /* FNUM2/FNUM = 0 00xxxxxx (0x0000) */ - 0, 0, 0, 0, 0, 0, 0, 0, - - /* FNUM2/FNUM = 0 01xxxxxx (0x0040) */ - 1, 0, 0, 0,-1, 0, 0, 0, - - /* FNUM2/FNUM = 0 10xxxxxx (0x0080) */ - 2, 1, 0,-1,-2,-1, 0, 1, - - /* FNUM2/FNUM = 0 11xxxxxx (0x00C0) */ - 3, 1, 0,-1,-3,-1, 0, 1, - - /* FNUM2/FNUM = 1 00xxxxxx (0x0100) */ - 4, 2, 0,-2,-4,-2, 0, 2, - - /* FNUM2/FNUM = 1 01xxxxxx (0x0140) */ - 5, 2, 0,-2,-5,-2, 0, 2, - - /* FNUM2/FNUM = 1 10xxxxxx (0x0180) */ - 6, 3, 0,-3,-6,-3, 0, 3, - - /* FNUM2/FNUM = 1 11xxxxxx (0x01C0) */ - 7, 3, 0,-3,-7,-3, 0, 3, -}; - - -/* This is not 100% perfect yet but very close */ -/* - - multi parameters are 100% correct (instruments and drums) - - LFO PM and AM enable are 100% correct - - waveform DC and DM select are 100% correct -*/ - -const uint8_t ym2413_device::table[19][8] = { -/* MULT MULT modTL DcDmFb AR/DR AR/DR SL/RR SL/RR */ -/* 0 1 2 3 4 5 6 7 */ -/* These YM2413(OPLL) patch dumps are done via audio analysis (and a/b testing?) from Jarek and are known to be inaccurate */ - {0x49, 0x4c, 0x4c, 0x12, 0x00, 0x00, 0x00, 0x00 }, //0 - - {0x61, 0x61, 0x1e, 0x17, 0xf0, 0x78, 0x00, 0x17 }, //1 - {0x13, 0x41, 0x1e, 0x0d, 0xd7, 0xf7, 0x13, 0x13 }, //2 - {0x13, 0x01, 0x99, 0x04, 0xf2, 0xf4, 0x11, 0x23 }, //3 - {0x21, 0x61, 0x1b, 0x07, 0xaf, 0x64, 0x40, 0x27 }, //4 - -//{0x22, 0x21, 0x1e, 0x09, 0xf0, 0x76, 0x08, 0x28 }, //5 - {0x22, 0x21, 0x1e, 0x06, 0xf0, 0x75, 0x08, 0x18 }, //5 - -//{0x31, 0x22, 0x16, 0x09, 0x90, 0x7f, 0x00, 0x08 }, //6 - {0x31, 0x22, 0x16, 0x05, 0x90, 0x71, 0x00, 0x13 }, //6 - - {0x21, 0x61, 0x1d, 0x07, 0x82, 0x80, 0x10, 0x17 }, //7 - {0x23, 0x21, 0x2d, 0x16, 0xc0, 0x70, 0x07, 0x07 }, //8 - {0x61, 0x61, 0x1b, 0x06, 0x64, 0x65, 0x10, 0x17 }, //9 - -//{0x61, 0x61, 0x0c, 0x08, 0x85, 0xa0, 0x79, 0x07 }, //A - {0x61, 0x61, 0x0c, 0x18, 0x85, 0xf0, 0x70, 0x07 }, //A - - {0x23, 0x01, 0x07, 0x11, 0xf0, 0xa4, 0x00, 0x22 }, //B - {0x97, 0xc1, 0x24, 0x07, 0xff, 0xf8, 0x22, 0x12 }, //C - -//{0x61, 0x10, 0x0c, 0x08, 0xf2, 0xc4, 0x40, 0xc8 }, //D - {0x61, 0x10, 0x0c, 0x05, 0xf2, 0xf4, 0x40, 0x44 }, //D - - {0x01, 0x01, 0x55, 0x03, 0xf3, 0x92, 0xf3, 0xf3 }, //E - {0x61, 0x41, 0x89, 0x03, 0xf1, 0xf4, 0xf0, 0x13 }, //F - -/* drum instruments definitions */ -/* MULTI MULTI modTL xxx AR/DR AR/DR SL/RR SL/RR */ -/* 0 1 2 3 4 5 6 7 */ -/* old dumps via audio analysis (and a/b testing?) from Jarek */ -//{0x01, 0x01, 0x16, 0x00, 0xfd, 0xf8, 0x2f, 0x6d },/* BD(multi verified, modTL verified, mod env - verified(close), carr. env verifed) */ -//{0x01, 0x01, 0x00, 0x00, 0xd8, 0xd8, 0xf9, 0xf8 },/* HH(multi verified), SD(multi not used) */ -//{0x05, 0x01, 0x00, 0x00, 0xf8, 0xba, 0x49, 0x55 },/* TOM(multi,env verified), TOP CYM(multi verified, env verified) */ -/* Drums dumped from the VRC7 using debug mode, these are likely also correct for ym2413(OPLL) but need verification */ - {0x01, 0x01, 0x18, 0x0f, 0xdf, 0xf8, 0x6a, 0x6d },/* BD */ - {0x01, 0x01, 0x00, 0x00, 0xc8, 0xd8, 0xa7, 0x68 },/* HH, SD */ - {0x05, 0x01, 0x00, 0x00, 0xf8, 0xaa, 0x59, 0x55 },/* TOM, TOP CYM */ -}; - -// VRC7 Instruments : Dumped from internal ROM -// reference : https://siliconpr0n.org/archive/doku.php?id=vendor:yamaha:opl2 -const uint8_t vrc7snd_device::vrc7_table[19][8] = { -/* MULT MULT modTL DcDmFb AR/DR AR/DR SL/RR SL/RR */ -/* 0 1 2 3 4 5 6 7 */ - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, //0 (This is the user-defined instrument, should this default to anything?) - - {0x03, 0x21, 0x05, 0x06, 0xe8, 0x81, 0x42, 0x27 }, //1 - {0x13, 0x41, 0x14, 0x0d, 0xd8, 0xf6, 0x23, 0x12 }, //2 - {0x11, 0x11, 0x08, 0x08, 0xfa, 0xb2, 0x20, 0x12 }, //3 - {0x31, 0x61, 0x0c, 0x07, 0xa8, 0x64, 0x61, 0x27 }, //4 - {0x32, 0x21, 0x1e, 0x06, 0xe1, 0x76, 0x01, 0x28 }, //5 - {0x02, 0x01, 0x06, 0x00, 0xa3, 0xe2, 0xf4, 0xf4 }, //6 - {0x21, 0x61, 0x1d, 0x07, 0x82, 0x81, 0x11, 0x07 }, //7 - {0x23, 0x21, 0x22, 0x17, 0xa2, 0x72, 0x01, 0x17 }, //8 - {0x35, 0x11, 0x25, 0x00, 0x40, 0x73, 0x72, 0x01 }, //9 - {0xb5, 0x01, 0x0f, 0x0f, 0xa8, 0xa5, 0x51, 0x02 }, //A - {0x17, 0xc1, 0x24, 0x07, 0xf8, 0xf8, 0x22, 0x12 }, //B - {0x71, 0x23, 0x11, 0x06, 0x65, 0x74, 0x18, 0x16 }, //C - {0x01, 0x02, 0xd3, 0x05, 0xc9, 0x95, 0x03, 0x02 }, //D - {0x61, 0x63, 0x0c, 0x00, 0x94, 0xc0, 0x33, 0xf6 }, //E - {0x21, 0x72, 0x0d, 0x00, 0xc1, 0xd5, 0x56, 0x06 }, //F - -/* Drums (silent due to no RO output pin(?) on VRC7, but present internally; these are probably shared with YM2413) */ -/* MULTI MULTI modTL xxx AR/DR AR/DR SL/RR SL/RR */ -/* 0 1 2 3 4 5 6 7 */ - {0x01, 0x01, 0x18, 0x0f, 0xdf, 0xf8, 0x6a, 0x6d },/* BD */ - {0x01, 0x01, 0x00, 0x00, 0xc8, 0xd8, 0xa7, 0x68 },/* HH, SD */ - {0x05, 0x01, 0x00, 0x00, 0xf8, 0xaa, 0x59, 0x55 },/* TOM, TOP CYM */ -}; - -/* work table */ -#define SLOT7_1 (&P_CH[7].SLOT[SLOT1]) -#define SLOT7_2 (&P_CH[7].SLOT[SLOT2]) -#define SLOT8_1 (&P_CH[8].SLOT[SLOT1]) -#define SLOT8_2 (&P_CH[8].SLOT[SLOT2]) - - -int ym2413_device::limit( int val, int max, int min ) -{ - if ( val > max ) - val = max; - else if ( val < min ) - val = min; - - return val; -} +DEFINE_DEVICE_TYPE(YM2413, ym2413_device, "ym2413", "YM2413 OPLL") +DEFINE_DEVICE_TYPE(YM2423, ym2423_device, "ym2423", "YM2423 OPLL-X") +DEFINE_DEVICE_TYPE(YMF281, ymf281_device, "ymf281", "YMF281 OPLLP") +DEFINE_DEVICE_TYPE(DS1001, ds1001_device, "ds1001", "Yamaha DS1001 / Konami 053982") -/* advance LFO to next sample */ -void ym2413_device::advance_lfo() -{ - /* LFO */ - lfo_am_cnt += lfo_am_inc; - if (lfo_am_cnt >= ((uint32_t)LFO_AM_TAB_ELEMENTS<> LFO_SH ] >> 1; +//********************************************************* +// YM2413 DEVICE +//********************************************************* - lfo_pm_cnt += lfo_pm_inc; - LFO_PM = (lfo_pm_cnt>>LFO_SH) & 7; -} +//------------------------------------------------- +// ym2413_device - constructor +//------------------------------------------------- -/* advance to next sample */ -void ym2413_device::advance() +ym2413_device::ym2413_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, device_type type, u8 const *instruments) : + device_t(mconfig, type, tag, owner, clock), + device_sound_interface(mconfig, *this), + m_address(0), + m_stream(nullptr), + m_internal(*this, "internal"), + m_fm(*this) { - OPLL_CH *CH; - OPLL_SLOT *op; - unsigned int i; - - /* Envelope Generator */ - eg_timer += eg_timer_add; - - while (eg_timer >= eg_timer_overflow) - { - eg_timer -= eg_timer_overflow; - - eg_cnt++; - - for (i=0; i<9*2; i++) - { - CH = &P_CH[i/2]; - - op = &CH->SLOT[i&1]; - - switch(op->state) - { - case EG_DMP: /* dump phase */ - /*dump phase is performed by both operators in each channel*/ - /*when CARRIER envelope gets down to zero level, - ** phases in BOTH opearators are reset (at the same time ?) - */ - if ( !(eg_cnt & ((1<eg_sh_dp)-1) ) ) - { - op->volume += eg_inc[op->eg_sel_dp + ((eg_cnt>>op->eg_sh_dp)&7)]; - - if ( op->volume >= MAX_ATT_INDEX ) - { - op->volume = MAX_ATT_INDEX; - op->state = EG_ATT; - /* restart Phase Generator */ - op->phase = 0; - } - } - break; - - case EG_ATT: /* attack phase */ - if ( !(eg_cnt & ((1<eg_sh_ar)-1) ) ) - { - op->volume += (~op->volume * - (eg_inc[op->eg_sel_ar + ((eg_cnt>>op->eg_sh_ar)&7)]) - ) >>2; - - if (op->volume <= MIN_ATT_INDEX) - { - op->volume = MIN_ATT_INDEX; - op->state = EG_DEC; - } - } - break; - - case EG_DEC: /* decay phase */ - if ( !(eg_cnt & ((1<eg_sh_dr)-1) ) ) - { - op->volume += eg_inc[op->eg_sel_dr + ((eg_cnt>>op->eg_sh_dr)&7)]; - - if ( op->volume >= op->sl ) - op->state = EG_SUS; - } - break; - - case EG_SUS: /* sustain phase */ - /* this is important behaviour: - one can change percusive/non-percussive modes on the fly and - the chip will remain in sustain phase - verified on real YM3812 */ - - if(op->eg_type) /* non-percussive mode (sustained tone) */ - { - /* do nothing */ - } - else /* percussive mode */ - { - /* during sustain phase chip adds Release Rate (in percussive mode) */ - if ( !(eg_cnt & ((1<eg_sh_rr)-1) ) ) - { - op->volume += eg_inc[op->eg_sel_rr + ((eg_cnt>>op->eg_sh_rr)&7)]; - - if ( op->volume >= MAX_ATT_INDEX ) - op->volume = MAX_ATT_INDEX; - } - /* else do nothing in sustain phase */ - } - break; - - case EG_REL: /* release phase */ - /* exclude modulators in melody channels from performing anything in this mode*/ - /* allowed are only carriers in melody mode and rhythm slots in rhythm mode */ - - /*This table shows which operators and on what conditions are allowed to perform EG_REL: - (a) - always perform EG_REL - (n) - never perform EG_REL - (r) - perform EG_REL in Rhythm mode ONLY - 0: 0 (n), 1 (a) - 1: 2 (n), 3 (a) - 2: 4 (n), 5 (a) - 3: 6 (n), 7 (a) - 4: 8 (n), 9 (a) - 5: 10(n), 11(a) - 6: 12(r), 13(a) - 7: 14(r), 15(a) - 8: 16(r), 17(a) - */ - if ( (i&1) || ((rhythm&0x20) && (i>=12)) )/* exclude modulators */ - { - if(op->eg_type) /* non-percussive mode (sustained tone) */ - /*this is correct: use RR when SUS = OFF*/ - /*and use RS when SUS = ON*/ - { - if (CH->sus) - { - if ( !(eg_cnt & ((1<eg_sh_rs)-1) ) ) - { - op->volume += eg_inc[op->eg_sel_rs + ((eg_cnt>>op->eg_sh_rs)&7)]; - if ( op->volume >= MAX_ATT_INDEX ) - { - op->volume = MAX_ATT_INDEX; - op->state = EG_OFF; - } - } - } - else - { - if ( !(eg_cnt & ((1<eg_sh_rr)-1) ) ) - { - op->volume += eg_inc[op->eg_sel_rr + ((eg_cnt>>op->eg_sh_rr)&7)]; - if ( op->volume >= MAX_ATT_INDEX ) - { - op->volume = MAX_ATT_INDEX; - op->state = EG_OFF; - } - } - } - } - else /* percussive mode */ - { - if ( !(eg_cnt & ((1<eg_sh_rs)-1) ) ) - { - op->volume += eg_inc[op->eg_sel_rs + ((eg_cnt>>op->eg_sh_rs)&7)]; - if ( op->volume >= MAX_ATT_INDEX ) - { - op->volume = MAX_ATT_INDEX; - op->state = EG_OFF; - } - } - } - } - break; - - default: - break; - } - } - } - - for (i=0; i<9*2; i++) - { - CH = &P_CH[i/2]; - op = &CH->SLOT[i&1]; - - /* Phase Generator */ - if(op->vib) - { - uint8_t block; - - unsigned int fnum_lfo = 8*((CH->block_fnum&0x01c0) >> 6); - unsigned int block_fnum = CH->block_fnum * 2; - signed int lfo_fn_table_index_offset = lfo_pm_table[LFO_PM + fnum_lfo ]; - - if (lfo_fn_table_index_offset) /* LFO phase modulation active */ - { - block_fnum += lfo_fn_table_index_offset; - block = (block_fnum&0x1c00) >> 10; - op->phase += (fn_tab[block_fnum&0x03ff] >> (7-block)) * op->mul; - } - else /* LFO phase modulation = zero */ - { - op->phase += op->freq; - } - } - else /* LFO phase modulation disabled for this operator */ - { - op->phase += op->freq; - } - } - - /* The Noise Generator of the YM3812 is 23-bit shift register. - * Period is equal to 2^23-2 samples. - * Register works at sampling frequency of the chip, so output - * can change on every sample. - * - * Output of the register and input to the bit 22 is: - * bit0 XOR bit14 XOR bit15 XOR bit22 - * - * Simply use bit 22 as the noise output. - */ - - noise_p += noise_f; - i = noise_p >> FREQ_SH; /* number of events (shifts of the shift register) */ - noise_p &= FREQ_MASK; - while (i) - { - /* - uint32_t j; - j = ( (noise_rng) ^ (noise_rng>>14) ^ (noise_rng>>15) ^ (noise_rng>>22) ) & 1; - noise_rng = (j<<22) | (noise_rng>>1); - */ - - /* - Instead of doing all the logic operations above, we - use a trick here (and use bit 0 as the noise output). - The difference is only that the noise bit changes one - step ahead. This doesn't matter since we don't know - what is real state of the noise_rng after the reset. - */ - - if (noise_rng & 1) noise_rng ^= 0x800302; - noise_rng >>= 1; - - i--; - } } -int ym2413_device::op_calc(uint32_t phase, unsigned int env, signed int pm, unsigned int wave_tab) -{ - uint32_t p; - - p = (env<<5) + sin_tab[wave_tab + ((((signed int)((phase & ~FREQ_MASK) + (pm<<17))) >> FREQ_SH ) & SIN_MASK) ]; - - if (p >= TL_TAB_LEN) - return 0; - return tl_tab[p]; -} +//------------------------------------------------- +// address_w - write to the address port (A0=0) +//------------------------------------------------- -int ym2413_device::op_calc1(uint32_t phase, unsigned int env, signed int pm, unsigned int wave_tab) +void ym2413_device::address_w(u8 value) { - uint32_t p; - int32_t i; - - i = (phase & ~FREQ_MASK) + pm; - -/*logerror("i=%08x (i>>16)&511=%8i phase=%i [pm=%08x] ",i, (i>>16)&511, phase>>FREQ_SH, pm);*/ - - p = (env<<5) + sin_tab[ wave_tab + ((i>>FREQ_SH) & SIN_MASK)]; - -/*logerror("(p&255=%i p>>8=%i) out= %i\n", p&255,p>>8, tl_tab[p&255]>>(p>>8) );*/ - - if (p >= TL_TAB_LEN) - return 0; - return tl_tab[p]; + m_address = value; } -#define volume_calc(OP) ((OP)->TLL + ((uint32_t)(OP)->volume) + (LFO_AM & (OP)->AMmask)) +//------------------------------------------------- +// data_w - write to the data port (A0=1) +//------------------------------------------------- -/* calculate output */ -void ym2413_device::chan_calc( OPLL_CH *CH ) +void ym2413_device::data_w(u8 value) { - OPLL_SLOT *SLOT; - unsigned int env; - signed int out; - signed int phase_modulation; /* phase modulation input (SLOT 2) */ - - - /* SLOT 1 */ - SLOT = &CH->SLOT[SLOT1]; - env = volume_calc(SLOT); - out = SLOT->op1_out[0] + SLOT->op1_out[1]; - - SLOT->op1_out[0] = SLOT->op1_out[1]; - phase_modulation = SLOT->op1_out[0]; - - SLOT->op1_out[1] = 0; - - if( env < ENV_QUIET ) - { - if (!SLOT->fb_shift) - out = 0; - SLOT->op1_out[1] = op_calc1(SLOT->phase, env, (out<fb_shift), SLOT->wavetable ); - } + // force an update + m_stream->update(); - /* SLOT 2 */ - SLOT++; - env = volume_calc(SLOT); - if( env < ENV_QUIET ) - { - output[0] += op_calc(SLOT->phase, env, phase_modulation, SLOT->wavetable); - } + // write to FM + m_fm.write(m_address, value); } -/* - operators used in the rhythm sounds generation process: - - Envelope Generator: - -channel operator register number Bass High Snare Tom Top -/ slot number TL ARDR SLRR Wave Drum Hat Drum Tom Cymbal - 6 / 0 12 50 70 90 f0 + - 6 / 1 15 53 73 93 f3 + - 7 / 0 13 51 71 91 f1 + - 7 / 1 16 54 74 94 f4 + - 8 / 0 14 52 72 92 f2 + - 8 / 1 17 55 75 95 f5 + - - Phase Generator: -channel operator register number Bass High Snare Tom Top -/ slot number MULTIPLE Drum Hat Drum Tom Cymbal - 6 / 0 12 30 + - 6 / 1 15 33 + - 7 / 0 13 31 + + + - 7 / 1 16 34 ----- n o t u s e d ----- - 8 / 0 14 32 + - 8 / 1 17 35 + + - -channel operator register number Bass High Snare Tom Top -number number BLK/FNUM2 FNUM Drum Hat Drum Tom Cymbal - 6 12,15 B6 A6 + - - 7 13,16 B7 A7 + + + - - 8 14,17 B8 A8 + + + - -*/ - -/* calculate rhythm */ - -void ym2413_device::rhythm_calc( OPLL_CH *CH, unsigned int noise ) -{ - OPLL_SLOT *SLOT; - signed int out; - unsigned int env; - signed int phase_modulation; /* phase modulation input (SLOT 2) */ - - - /* Bass Drum (verified on real YM3812): - - depends on the channel 6 'connect' register: - when connect = 0 it works the same as in normal (non-rhythm) mode (op1->op2->out) - when connect = 1 _only_ operator 2 is present on output (op2->out), operator 1 is ignored - - output sample always is multiplied by 2 - */ - - - /* SLOT 1 */ - SLOT = &CH[6].SLOT[SLOT1]; - env = volume_calc(SLOT); - - out = SLOT->op1_out[0] + SLOT->op1_out[1]; - SLOT->op1_out[0] = SLOT->op1_out[1]; - - phase_modulation = SLOT->op1_out[0]; - - SLOT->op1_out[1] = 0; - if( env < ENV_QUIET ) - { - if (!SLOT->fb_shift) - out = 0; - SLOT->op1_out[1] = op_calc1(SLOT->phase, env, (out<fb_shift), SLOT->wavetable ); - } - - /* SLOT 2 */ - SLOT++; - env = volume_calc(SLOT); - if( env < ENV_QUIET ) - output[1] += op_calc(SLOT->phase, env, phase_modulation, SLOT->wavetable) * 2; - - - /* Phase generation is based on: */ - // HH (13) channel 7->slot 1 combined with channel 8->slot 2 (same combination as TOP CYMBAL but different output phases) - // SD (16) channel 7->slot 1 - // TOM (14) channel 8->slot 1 - // TOP (17) channel 7->slot 1 combined with channel 8->slot 2 (same combination as HIGH HAT but different output phases) - - /* Envelope generation based on: */ - // HH channel 7->slot1 - // SD channel 7->slot2 - // TOM channel 8->slot1 - // TOP channel 8->slot2 - - - /* The following formulas can be well optimized. - I leave them in direct form for now (in case I've missed something). - */ - - /* High Hat (verified on real YM3812) */ - env = volume_calc(SLOT7_1); - if( env < ENV_QUIET ) - { - /* high hat phase generation: - phase = d0 or 234 (based on frequency only) - phase = 34 or 2d0 (based on noise) - */ - - /* base frequency derived from operator 1 in channel 7 */ - uint8_t bit7 = ((SLOT7_1->phase>>FREQ_SH)>>7)&1; - uint8_t bit3 = ((SLOT7_1->phase>>FREQ_SH)>>3)&1; - uint8_t bit2 = ((SLOT7_1->phase>>FREQ_SH)>>2)&1; - - uint8_t res1 = (bit2 ^ bit7) | bit3; - - /* when res1 = 0 phase = 0x000 | 0xd0; */ - /* when res1 = 1 phase = 0x200 | (0xd0>>2); */ - uint32_t phase = res1 ? (0x200|(0xd0>>2)) : 0xd0; - - /* enable gate based on frequency of operator 2 in channel 8 */ - uint8_t bit5e= ((SLOT8_2->phase>>FREQ_SH)>>5)&1; - uint8_t bit3e= ((SLOT8_2->phase>>FREQ_SH)>>3)&1; - - uint8_t res2 = (bit3e | bit5e); - - /* when res2 = 0 pass the phase from calculation above (res1); */ - /* when res2 = 1 phase = 0x200 | (0xd0>>2); */ - if (res2) - phase = (0x200|(0xd0>>2)); - - - /* when phase & 0x200 is set and noise=1 then phase = 0x200|0xd0 */ - /* when phase & 0x200 is set and noise=0 then phase = 0x200|(0xd0>>2), ie no change */ - if (phase&0x200) - { - if (noise) - phase = 0x200|0xd0; - } - else - /* when phase & 0x200 is clear and noise=1 then phase = 0xd0>>2 */ - /* when phase & 0x200 is clear and noise=0 then phase = 0xd0, ie no change */ - { - if (noise) - phase = 0xd0>>2; - } - - output[1] += op_calc(phase<wavetable) * 2; - } - - /* Snare Drum (verified on real YM3812) */ - env = volume_calc(SLOT7_2); - if( env < ENV_QUIET ) - { - /* base frequency derived from operator 1 in channel 7 */ - uint8_t bit8 = ((SLOT7_1->phase>>FREQ_SH)>>8)&1; - - /* when bit8 = 0 phase = 0x100; */ - /* when bit8 = 1 phase = 0x200; */ - uint32_t phase = bit8 ? 0x200 : 0x100; - - /* Noise bit XOR'es phase by 0x100 */ - /* when noisebit = 0 pass the phase from calculation above */ - /* when noisebit = 1 phase ^= 0x100; */ - /* in other words: phase ^= (noisebit<<8); */ - if (noise) - phase ^= 0x100; - - output[1] += op_calc(phase<wavetable) * 2; - } - - /* Tom Tom (verified on real YM3812) */ - env = volume_calc(SLOT8_1); - if( env < ENV_QUIET ) - output[1] += op_calc(SLOT8_1->phase, env, 0, SLOT8_1->wavetable) * 2; - - /* Top Cymbal (verified on real YM2413) */ - env = volume_calc(SLOT8_2); - if( env < ENV_QUIET ) - { - /* base frequency derived from operator 1 in channel 7 */ - uint8_t bit7 = ((SLOT7_1->phase>>FREQ_SH)>>7)&1; - uint8_t bit3 = ((SLOT7_1->phase>>FREQ_SH)>>3)&1; - uint8_t bit2 = ((SLOT7_1->phase>>FREQ_SH)>>2)&1; - - uint8_t res1 = (bit2 ^ bit7) | bit3; - - /* when res1 = 0 phase = 0x000 | 0x100; */ - /* when res1 = 1 phase = 0x200 | 0x100; */ - uint32_t phase = res1 ? 0x300 : 0x100; - - /* enable gate based on frequency of operator 2 in channel 8 */ - uint8_t bit5e= ((SLOT8_2->phase>>FREQ_SH)>>5)&1; - uint8_t bit3e= ((SLOT8_2->phase>>FREQ_SH)>>3)&1; - - uint8_t res2 = (bit3e | bit5e); - /* when res2 = 0 pass the phase from calculation above (res1); */ - /* when res2 = 1 phase = 0x200 | 0x100; */ - if (res2) - phase = 0x300; - - output[1] += op_calc(phase<wavetable) * 2; - } - -} +//------------------------------------------------- +// write - handle a write to the register +// interface +//------------------------------------------------- -void ym2413_device::key_on(OPLL_SLOT *SLOT, uint32_t key_set) +void ym2413_device::write(offs_t offset, u8 value) { - if( !SLOT->key ) - { - /* do NOT restart Phase Generator (verified on real YM2413)*/ - /* phase -> Dump */ - SLOT->state = EG_DMP; - } - SLOT->key |= key_set; + // A0 selects between address/data + if ((offset & 1) == 0) + address_w(value); + else + data_w(value); } -void ym2413_device::key_off(OPLL_SLOT *SLOT, uint32_t key_clr) -{ - if( SLOT->key ) - { - SLOT->key &= key_clr; - if( !SLOT->key ) - { - /* phase -> Release */ - if (SLOT->state>EG_REL) - SLOT->state = EG_REL; - } - } -} +//------------------------------------------------- +// device_start - start of emulation +//------------------------------------------------- -/* update phase increment counter of operator (also update the EG rates if necessary) */ -void ym2413_device::calc_fcslot(OPLL_CH *CH, OPLL_SLOT *SLOT) +void ym2413_device::device_start() { - int ksr; - uint32_t SLOT_rs; - uint32_t SLOT_dp; - - /* (frequency) phase increment counter */ - SLOT->freq = CH->fc * SLOT->mul; - ksr = CH->kcode >> SLOT->KSR; - - if( SLOT->ksr != ksr ) - { - SLOT->ksr = ksr; + // create our stream + m_stream = stream_alloc(0, fm_engine::OUTPUTS, m_fm.sample_rate(clock())); - /* calculate envelope generator rates */ - if ((SLOT->ar + SLOT->ksr) < 16+62) - { - SLOT->eg_sh_ar = eg_rate_shift [SLOT->ar + SLOT->ksr ]; - SLOT->eg_sel_ar = eg_rate_select[SLOT->ar + SLOT->ksr ]; - } - else - { - SLOT->eg_sh_ar = 0; - SLOT->eg_sel_ar = 13*RATE_STEPS; - } - SLOT->eg_sh_dr = eg_rate_shift [SLOT->dr + SLOT->ksr ]; - SLOT->eg_sel_dr = eg_rate_select[SLOT->dr + SLOT->ksr ]; - SLOT->eg_sh_rr = eg_rate_shift [SLOT->rr + SLOT->ksr ]; - SLOT->eg_sel_rr = eg_rate_select[SLOT->rr + SLOT->ksr ]; + // save our data + save_item(YMFM_NAME(m_address)); - } - - if (CH->sus) - SLOT_rs = 16 + (5<<2); - else - SLOT_rs = 16 + (7<<2); + // save the engines + m_fm.save(*this); - SLOT->eg_sh_rs = eg_rate_shift [SLOT_rs + SLOT->ksr ]; - SLOT->eg_sel_rs = eg_rate_select[SLOT_rs + SLOT->ksr ]; - - SLOT_dp = 16 + (13<<2); - SLOT->eg_sh_dp = eg_rate_shift [SLOT_dp + SLOT->ksr ]; - SLOT->eg_sel_dp = eg_rate_select[SLOT_dp + SLOT->ksr ]; + // set up the instrument data + m_fm.set_instrument_data(m_internal); } -/* set multi,am,vib,EG-TYP,KSR,mul */ -void ym2413_device::set_mul(int slot,int v) -{ - OPLL_CH *CH = &P_CH[slot/2]; - OPLL_SLOT *SLOT = &CH->SLOT[slot&1]; - SLOT->mul = mul_tab[v&0x0f]; - SLOT->KSR = (v&0x10) ? 0 : 2; - SLOT->eg_type = (v&0x20); - SLOT->vib = (v&0x40); - SLOT->AMmask = (v&0x80) ? ~0 : 0; - calc_fcslot(CH,SLOT); -} +//------------------------------------------------- +// device_reset - start of emulation +//------------------------------------------------- -/* set ksl, tl */ -void ym2413_device::set_ksl_tl(int chan,int v) +void ym2413_device::device_reset() { - OPLL_CH *CH = &P_CH[chan]; -/* modulator */ - OPLL_SLOT *SLOT = &CH->SLOT[SLOT1]; - - SLOT->ksl = ksl_shift[v >> 6]; - SLOT->TL = (v&0x3f)<<(ENV_BITS-2-7); /* 7 bits TL (bit 6 = always 0) */ - SLOT->TLL = SLOT->TL + (CH->ksl_base>>SLOT->ksl); + // reset the engines + m_fm.reset(); } -/* set ksl , waveforms, feedback */ -void ym2413_device::set_ksl_wave_fb(int chan,int v) -{ - OPLL_CH *CH = &P_CH[chan]; -/* modulator */ - OPLL_SLOT *SLOT = &CH->SLOT[SLOT1]; - SLOT->wavetable = ((v&0x08)>>3)*SIN_LEN; - SLOT->fb_shift = (v&7) ? (v&7) + 8 : 0; - -/*carrier*/ - SLOT = &CH->SLOT[SLOT2]; - SLOT->ksl = ksl_shift[v >> 6]; - SLOT->TLL = SLOT->TL + (CH->ksl_base>>SLOT->ksl); - - SLOT->wavetable = ((v&0x10)>>4)*SIN_LEN; -} +//------------------------------------------------- +// device_clock_changed - update if clock changes +//------------------------------------------------- -/* set attack rate & decay rate */ -void ym2413_device::set_ar_dr(int slot,int v) +void ym2413_device::device_clock_changed() { - OPLL_CH *CH = &P_CH[slot/2]; - OPLL_SLOT *SLOT = &CH->SLOT[slot&1]; - - SLOT->ar = (v>>4) ? 16 + ((v>>4) <<2) : 0; - - if ((SLOT->ar + SLOT->ksr) < 16+62) - { - SLOT->eg_sh_ar = eg_rate_shift [SLOT->ar + SLOT->ksr ]; - SLOT->eg_sel_ar = eg_rate_select[SLOT->ar + SLOT->ksr ]; - } - else - { - SLOT->eg_sh_ar = 0; - SLOT->eg_sel_ar = 13*RATE_STEPS; - } - - SLOT->dr = (v&0x0f)? 16 + ((v&0x0f)<<2) : 0; - SLOT->eg_sh_dr = eg_rate_shift [SLOT->dr + SLOT->ksr ]; - SLOT->eg_sel_dr = eg_rate_select[SLOT->dr + SLOT->ksr ]; + m_stream->set_sample_rate(m_fm.sample_rate(clock())); } -/* set sustain level & release rate */ -void ym2413_device::set_sl_rr(int slot,int v) -{ - OPLL_CH *CH = &P_CH[slot/2]; - OPLL_SLOT *SLOT = &CH->SLOT[slot&1]; - SLOT->sl = sl_tab[ v>>4 ]; +//------------------------------------------------- +// device_rom_region - return a pointer to our +// ROM region +//------------------------------------------------- - SLOT->rr = (v&0x0f)? 16 + ((v&0x0f)<<2) : 0; - SLOT->eg_sh_rr = eg_rate_shift [SLOT->rr + SLOT->ksr ]; - SLOT->eg_sel_rr = eg_rate_select[SLOT->rr + SLOT->ksr ]; -} +ROM_START( ym2413 ) + ROM_REGION( 0x90, "internal", 0 ) + // + // This is not the exact format + // + ROM_LOAD16_WORD( "ym2413_instruments.bin", 0x0000, 0x0090, CRC(6f582d01) SHA1(bb5537717e0b34849456b5ca7d405403dc3f8fda) ) +ROM_END -void ym2413_device::load_instrument(uint32_t chan, uint32_t slot, uint8_t* inst ) +const tiny_rom_entry *ym2413_device::device_rom_region() const { - set_mul (slot, inst[0]); - set_mul (slot+1, inst[1]); - set_ksl_tl (chan, inst[2]); - set_ksl_wave_fb (chan, inst[3]); - set_ar_dr (slot, inst[4]); - set_ar_dr (slot+1, inst[5]); - set_sl_rr (slot, inst[6]); - set_sl_rr (slot+1, inst[7]); + return ROM_NAME( ym2413 ); } -void ym2413_device::update_instrument_zero( uint8_t r ) -{ - uint8_t* inst = &inst_tab[0][0]; /* point to user instrument */ - uint32_t chan; - uint32_t chan_max; - - chan_max = 9; - if (rhythm & 0x20) - chan_max=6; - - switch(r) - { - case 0: - for (chan=0; chanSLOT[SLOT1]; /* modulator envelope is HH */ - SLOT->TL = ((instvol_r[chan]>>4)<<2)<<(ENV_BITS-2-7); /* 7 bits TL (bit 6 = always 0) */ - SLOT->TLL = SLOT->TL + (CH->ksl_base>>SLOT->ksl); - - /* Load instrument settings for channel nine. (Tom-tom and top cymbal) */ - chan = 8; - inst = &inst_tab[18][0]; - slot = chan*2; - - load_instrument(chan, slot, inst); - - CH = &P_CH[chan]; - SLOT = &CH->SLOT[SLOT1]; /* modulator envelope is TOM */ - SLOT->TL = ((instvol_r[chan]>>4)<<2)<<(ENV_BITS-2-7); /* 7 bits TL (bit 6 = always 0) */ - SLOT->TLL = SLOT->TL + (CH->ksl_base>>SLOT->ksl); - } - /* BD key on/off */ - if(v&0x10) - { - key_on (&P_CH[6].SLOT[SLOT1], 2); - key_on (&P_CH[6].SLOT[SLOT2], 2); - } - else - { - key_off(&P_CH[6].SLOT[SLOT1],~2); - key_off(&P_CH[6].SLOT[SLOT2],~2); - } - /* HH key on/off */ - if(v&0x01) key_on (&P_CH[7].SLOT[SLOT1], 2); - else key_off(&P_CH[7].SLOT[SLOT1],~2); - /* SD key on/off */ - if(v&0x08) key_on (&P_CH[7].SLOT[SLOT2], 2); - else key_off(&P_CH[7].SLOT[SLOT2],~2); - /* TOM key on/off */ - if(v&0x04) key_on (&P_CH[8].SLOT[SLOT1], 2); - else key_off(&P_CH[8].SLOT[SLOT1],~2); - /* TOP-CY key on/off */ - if(v&0x02) key_on (&P_CH[8].SLOT[SLOT2], 2); - else key_off(&P_CH[8].SLOT[SLOT2],~2); - } - else - { - if (rhythm&0x20) - /*rhythm on to off*/ - { - logerror("YM2413: Rhythm mode disable\n"); - /* Load instrument settings for channel seven(chan=6 since we're zero based).*/ - chan = 6; - inst = &inst_tab[instvol_r[chan]>>4][0]; - slot = chan*2; - - load_instrument(chan, slot, inst); - - /* Load instrument settings for channel eight.*/ - chan = 7; - inst = &inst_tab[instvol_r[chan]>>4][0]; - slot = chan*2; - - load_instrument(chan, slot, inst); - - /* Load instrument settings for channel nine.*/ - chan = 8; - inst = &inst_tab[instvol_r[chan]>>4][0]; - slot = chan*2; - - load_instrument(chan, slot, inst); - } - /* BD key off */ - key_off(&P_CH[6].SLOT[SLOT1],~2); - key_off(&P_CH[6].SLOT[SLOT2],~2); - /* HH key off */ - key_off(&P_CH[7].SLOT[SLOT1],~2); - /* SD key off */ - key_off(&P_CH[7].SLOT[SLOT2],~2); - /* TOM key off */ - key_off(&P_CH[8].SLOT[SLOT1],~2); - /* TOP-CY off */ - key_off(&P_CH[8].SLOT[SLOT2],~2); - } - rhythm = v&0x3f; - } - break; - } - } - break; - - case 0x10: - case 0x20: - { - int block_fnum; - - chan = r&0x0f; - - if (chan >= 9) - chan -= 9; /* verified on real YM2413 */ - - CH = &P_CH[chan]; - - if(r&0x10) - { /* 10-18: FNUM 0-7 */ - block_fnum = (CH->block_fnum&0x0f00) | v; - } - else - { /* 20-28: suson, keyon, block, FNUM 8 */ - block_fnum = ((v&0x0f)<<8) | (CH->block_fnum&0xff); - - if(v&0x10) - { - key_on (&CH->SLOT[SLOT1], 1); - key_on (&CH->SLOT[SLOT2], 1); - } - else - { - key_off(&CH->SLOT[SLOT1],~1); - key_off(&CH->SLOT[SLOT2],~1); - } - - - if (CH->sus!=(v&0x20)) - logerror("chan=%i sus=%2x\n",chan,v&0x20); - - CH->sus = v & 0x20; - } - /* update */ - if(CH->block_fnum != block_fnum) - { - uint8_t block; - - CH->block_fnum = block_fnum; - - /* BLK 2,1,0 bits -> bits 3,2,1 of kcode, FNUM MSB -> kcode LSB */ - CH->kcode = (block_fnum&0x0f00)>>8; - - CH->ksl_base = static_cast(ksl_tab[block_fnum>>5]); - - block_fnum = block_fnum * 2; - block = (block_fnum&0x1c00) >> 10; - CH->fc = fn_tab[block_fnum&0x03ff] >> (7-block); - - /* refresh Total Level in both SLOTs of this channel */ - CH->SLOT[SLOT1].TLL = CH->SLOT[SLOT1].TL + (CH->ksl_base>>CH->SLOT[SLOT1].ksl); - CH->SLOT[SLOT2].TLL = CH->SLOT[SLOT2].TL + (CH->ksl_base>>CH->SLOT[SLOT2].ksl); - - /* refresh frequency counter in both SLOTs of this channel */ - calc_fcslot(CH,&CH->SLOT[SLOT1]); - calc_fcslot(CH,&CH->SLOT[SLOT2]); - } - } - break; - - case 0x30: /* inst 4 MSBs, VOL 4 LSBs */ - { - uint8_t old_instvol; - - chan = r&0x0f; - - if (chan >= 9) - chan -= 9; /* verified on real YM2413 */ - - old_instvol = instvol_r[chan]; - instvol_r[chan] = v; /* store for later use */ - - CH = &P_CH[chan]; - SLOT = &CH->SLOT[SLOT2]; /* carrier */ - SLOT->TL = ((v&0x0f)<<2)<<(ENV_BITS-2-7); /* 7 bits TL (bit 6 = always 0) */ - SLOT->TLL = SLOT->TL + (CH->ksl_base>>SLOT->ksl); - - - /*check whether we are in rhythm mode and handle instrument/volume register accordingly*/ - if ((chan>=6) && (rhythm&0x20)) - { - /* we're in rhythm mode*/ - - if (chan>=7) /* only for channel 7 and 8 (channel 6 is handled in usual way)*/ - { - SLOT = &CH->SLOT[SLOT1]; /* modulator envelope is HH(chan=7) or TOM(chan=8) */ - SLOT->TL = ((instvol_r[chan]>>4)<<2)<<(ENV_BITS-2-7); /* 7 bits TL (bit 6 = always 0) */ - SLOT->TLL = SLOT->TL + (CH->ksl_base>>SLOT->ksl); - } - } - else - { - if ( (old_instvol&0xf0) == (v&0xf0) ) - return; - - inst = &inst_tab[instvol_r[chan]>>4][0]; - slot = chan*2; - - load_instrument(chan, slot, inst); - - #if 0 - logerror("YM2413: chan#%02i inst=%02i: (r=%2x, v=%2x)\n",chan,v>>4,r,v); - logerror(" 0:%2x 1:%2x\n",inst[0],inst[1]); logerror(" 2:%2x 3:%2x\n",inst[2],inst[3]); - logerror(" 4:%2x 5:%2x\n",inst[4],inst[5]); logerror(" 6:%2x 7:%2x\n",inst[6],inst[7]); - #endif - } - } - break; - - default: - break; - } -} //------------------------------------------------- -// sound_stream_update - handle a stream update +// sound_stream_update - update the sound stream //------------------------------------------------- void ym2413_device::sound_stream_update(sound_stream &stream, std::vector const &inputs, std::vector &outputs) { - for(int i=0; i < outputs[0].samples() ; i++ ) + // iterate over all target samples + for (int sampindex = 0; sampindex < outputs[0].samples(); sampindex++) { - output[0] = 0; - output[1] = 0; - - advance_lfo(); - - /* FM part */ - for(int j=0; j<6; j++) - chan_calc(&P_CH[j]); - - if(!(rhythm & 0x20)) - { - for(int j=6; j<9; j++) - chan_calc(&P_CH[j]); - } - else /* Rhythm part */ - { - rhythm_calc(&P_CH[0], noise_rng & 1 ); - } + // clock the system + m_fm.clock(fm_engine::ALL_CHANNELS); - outputs[0].put_int_clamp(i, output[0], 32768); - outputs[1].put_int_clamp(i, output[1], 32768); + // update the FM; YM3812 is 9-bit, unsure of clipping but guessing + // it is similar to YM2612 + s32 sums[fm_engine::OUTPUTS] = { 0 }; + m_fm.output(sums, 5, 256, fm_engine::ALL_CHANNELS); - advance(); + // the YM3812 is time multiplexed; just simulate this by summing all the + // channels and dividing down + for (int outnum = 0; outnum < fm_engine::OUTPUTS; outnum++) + outputs[outnum].put_int(sampindex, sums[outnum], 256*6*2); } } + +//********************************************************* +// YM2423 DEVICE (OPLL-X) +//********************************************************* + //------------------------------------------------- -// device_start - device-specific startup +// ym2423_device - constructor //------------------------------------------------- -void ym2413_device::device_start() +ym2423_device::ym2423_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + ym2413_device(mconfig, tag, owner, clock, YM2423) { - int rate = clock()/72; - - m_stream = stream_alloc(0,2,rate); - - for (int x=0; x>= 4; /* 12 bits here */ - if (n&1) /* round to nearest */ - n = (n>>1)+1; - else - n = n>>1; - /* 11 bits here (rounded) */ - tl_tab[ x*2 + 0 ] = n; - tl_tab[ x*2 + 1 ] = -tl_tab[ x*2 + 0 ]; - - for (int i=1; i<11; i++) - { - tl_tab[ x*2+0 + i*2*TL_RES_LEN ] = tl_tab[ x*2+0 ]>>i; - tl_tab[ x*2+1 + i*2*TL_RES_LEN ] = -tl_tab[ x*2+0 + i*2*TL_RES_LEN ]; - } - } - - for (int i=0; i>1)+1; - else - n = n>>1; - - /* waveform 0: standard sinus */ - sin_tab[ i ] = n*2 + (m>=0.0? 0: 1 ); - - /* waveform 1: __ __ */ - /* / \____/ \____*/ - /* output only first half of the sinus waveform (positive one) */ - if (i & (1<<(SIN_BITS-1)) ) - sin_tab[1*SIN_LEN+i] = TL_TAB_LEN; - else - sin_tab[1*SIN_LEN+i] = sin_tab[i]; - } - /* make fnumber -> increment counter table */ - for( int i = 0 ; i < 1024; i++ ) - { - /* OPLL (YM2413) phase increment counter = 18bit */ +//------------------------------------------------- +// device_rom_region - return a pointer to our +// ROM region +//------------------------------------------------- - fn_tab[i] = i * (64 <<(FREQ_SH-10)); /* -10 because chip works with 10.10 fixed point, while we use 16.16 */ - } +ROM_START( ym2423 ) + ROM_REGION( 0x90, "internal", 0 ) + // + // This is not the exact format + // + ROM_LOAD16_WORD( "ym2423_instruments.bin", 0x0000, 0x0090, CRC(cc51dd1b) SHA1(59c51918f02891d6a0e917f7ebc27e42f7eadd15) ) +ROM_END - /* Amplitude modulation: 27 output levels (triangle waveform); 1 level takes one of: 192, 256 or 448 samples */ - /* One entry from LFO_AM_TABLE lasts for 64 samples */ - lfo_am_inc = (1<set_sample_rate(clock() / 72); } + //------------------------------------------------- -// device_reset - device-specific reset +// device_rom_region - return a pointer to our +// ROM region //------------------------------------------------- -void ym2413_device::device_reset() -{ - eg_timer = 0; - eg_cnt = 0; - - noise_rng = 1; /* noise shift register */ - - /* setup instruments table */ - if (m_inst_table != nullptr) - { - for (int i=0; i<19; i++) - { - for (int c=0; c<8; c++) - { - inst_tab[i][c] = m_inst_table[i][c]; - } - } - } - - - /* reset with register write */ - write_reg(0x0f,0); /*test reg*/ - for(int i = 0x3f ; i >= 0x10 ; i-- ) - write_reg(i, 0x00); - - /* reset operator parameters */ - for(int c = 0 ; c < 9 ; c++ ) - { - OPLL_CH *CH = &P_CH[c]; - for(int s = 0 ; s < 2 ; s++ ) - { - /* wave table */ - CH->SLOT[s].wavetable = 0; - CH->SLOT[s].state = EG_OFF; - CH->SLOT[s].volume = MAX_ATT_INDEX; - } - } -} - +ROM_START( ymf281 ) + ROM_REGION( 0x90, "internal", 0 ) + // + // This is not the exact format + // + ROM_LOAD16_WORD( "ymf281_instruments.bin", 0x0000, 0x0090, CRC(1c68abba) SHA1(5242d7b9c677c48e156ba5753db1a73db627a1a9) ) +ROM_END -void ym2413_device::write(offs_t offset, u8 data) +const tiny_rom_entry *ymf281_device::device_rom_region() const { - if (offset) - data_port_w(data); - else - register_port_w(data); + return ROM_NAME( ymf281 ); } -void ym2413_device::register_port_w(u8 data) -{ - address = data; -} -void ym2413_device::data_port_w(u8 data) -{ - m_stream->update(); - write_reg(address, data); -} +//********************************************************* +// DS1001 DEVICE (Konami VRC7) +//********************************************************* -DEFINE_DEVICE_TYPE(YM2413, ym2413_device, "ym2413", "Yamaha YM2413 OPLL") +//------------------------------------------------- +// ds1001_device - constructor +//------------------------------------------------- -ym2413_device::ym2413_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : ym2413_device(mconfig, YM2413, tag, owner, clock) +ds1001_device::ds1001_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + ym2413_device(mconfig, tag, owner, clock, DS1001) { - for (int i = 0; i < 19; i++) - { - for (int c = 0; c < 8; c++) - { - m_inst_table[i][c] = table[i][c]; - } - } } -ym2413_device::ym2413_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_sound_interface(mconfig, *this) - , eg_cnt(0) - , eg_timer(0) - , eg_timer_add(0) - , eg_timer_overflow(0) - , rhythm(0) - , LFO_AM(0) - , LFO_PM(0) - , lfo_am_cnt(0) - , lfo_am_inc(0) - , lfo_pm_cnt(0) - , lfo_pm_inc(0) - , noise_rng(0) - , noise_p(0) - , noise_f(0) - , address(0) -{ - for (int i = 0; i < 19; i++) - { - std::fill_n(&m_inst_table[i][0], 8, 0); - std::fill_n(&inst_tab[i][0], 8, 0); - } - - std::fill(std::begin(tl_tab), std::end(tl_tab), 0); - std::fill(std::begin(sin_tab), std::end(sin_tab), 0); - std::fill(std::begin(instvol_r), std::end(instvol_r), 0); - std::fill(std::begin(fn_tab), std::end(fn_tab), 0); - std::fill(std::begin(output), std::end(output), 0); -} +//------------------------------------------------- +// device_rom_region - return a pointer to our +// ROM region +//------------------------------------------------- -DEFINE_DEVICE_TYPE(VRC7, vrc7snd_device, "vrc7snd", "Konami 053982 VRC VII (Sound)") // die label: D51001 +ROM_START( ds1001 ) + ROM_REGION( 0x90, "internal", 0 ) + // + // This is not the exact format + // + ROM_LOAD16_WORD( "ds1001_instruments.bin", 0x0000, 0x0090, CRC(9d699efc) SHA1(7adf1d77bab12c50ebfa9921774f9aea1e74dd7b) ) +ROM_END -vrc7snd_device::vrc7snd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : ym2413_device(mconfig, VRC7, tag, owner, clock) +const tiny_rom_entry *ds1001_device::device_rom_region() const { - for (int i = 0; i < 19; i++) - { - for (int c = 0; c < 8; c++) - { - m_inst_table[i][c] = vrc7_table[i][c]; - } - } + return ROM_NAME( ds1001 ); } diff -Nru mame-0.230+dfsg.1/src/devices/sound/ym2413.h mame-0.231+dfsg.1/src/devices/sound/ym2413.h --- mame-0.230+dfsg.1/src/devices/sound/ym2413.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/sound/ym2413.h 2021-04-27 15:32:05.000000000 +0000 @@ -1,203 +1,98 @@ -// license:GPL-2.0+ -// copyright-holders:Jarek Burczynski,Ernesto Corvi +// license:BSD-3-Clause +// copyright-holders:Aaron Giles + #ifndef MAME_SOUND_YM2413_H #define MAME_SOUND_YM2413_H #pragma once +#include "ymfm.h" + + +// ======================> ym2413_device + +DECLARE_DEVICE_TYPE(YM2413, ym2413_device); class ym2413_device : public device_t, public device_sound_interface { public: - ym2413_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + // YM2151 is OPLL + using fm_engine = ymopll_engine; - void write(offs_t offset, u8 data); + // constructor + ym2413_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, device_type type = YM2413, u8 const *instruments = nullptr); - void register_port_w(u8 data); - void data_port_w(u8 data); + // no read access present -protected: - ym2413_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + // write access + void address_w(u8 data); // A0=0 + void data_w(u8 data); // A0=1 + void write(offs_t offset, u8 data); +protected: // device-level overrides virtual void device_start() override; - virtual void device_clock_changed() override; virtual void device_reset() override; + virtual void device_clock_changed() override; + virtual const tiny_rom_entry *device_rom_region() const override; - // sound stream update overrides + // sound overrides virtual void sound_stream_update(sound_stream &stream, std::vector const &inputs, std::vector &outputs) override; - uint8_t m_inst_table[19][8]; + // internal state + u8 m_address; // address register + sound_stream *m_stream; // sound stream + required_region_ptr m_internal; // internal memory region + fm_engine m_fm; // core FM engine +}; -private: - struct OPLL_SLOT - { - uint32_t ar = 0; /* attack rate: AR<<2 */ - uint32_t dr = 0; /* decay rate: DR<<2 */ - uint32_t rr = 0; /* release rate:RR<<2 */ - uint8_t KSR = 0; /* key scale rate */ - uint8_t ksl = 0; /* keyscale level */ - uint8_t ksr = 0; /* key scale rate: kcode>>KSR */ - uint8_t mul = 0; /* multiple: mul_tab[ML] */ - - /* Phase Generator */ - uint32_t phase = 0; /* frequency counter */ - uint32_t freq = 0; /* frequency counter step */ - uint8_t fb_shift = 0; /* feedback shift value */ - int32_t op1_out[2] = { 0, 0 }; /* slot1 output for feedback */ - - /* Envelope Generator */ - uint8_t eg_type = 0; /* percussive/nonpercussive mode*/ - uint8_t state = 0; /* phase type */ - uint32_t TL = 0; /* total level: TL << 2 */ - int32_t TLL = 0; /* adjusted now TL */ - int32_t volume = 0; /* envelope counter */ - uint32_t sl = 0; /* sustain level: sl_tab[SL] */ - - uint8_t eg_sh_dp = 0; /* (dump state) */ - uint8_t eg_sel_dp = 0; /* (dump state) */ - uint8_t eg_sh_ar = 0; /* (attack state) */ - uint8_t eg_sel_ar = 0; /* (attack state) */ - uint8_t eg_sh_dr = 0; /* (decay state) */ - uint8_t eg_sel_dr = 0; /* (decay state) */ - uint8_t eg_sh_rr = 0; /* (release state for non-perc.)*/ - uint8_t eg_sel_rr = 0; /* (release state for non-perc.)*/ - uint8_t eg_sh_rs = 0; /* (release state for perc.mode)*/ - uint8_t eg_sel_rs = 0; /* (release state for perc.mode)*/ - - uint32_t key = 0; /* 0 = KEY OFF, >0 = KEY ON */ - - /* LFO */ - uint32_t AMmask = 0; /* LFO Amplitude Modulation enable mask */ - uint8_t vib = 0; /* LFO Phase Modulation enable flag (active high)*/ - - /* waveform select */ - unsigned int wavetable = 0; - }; - - struct OPLL_CH - { - OPLL_SLOT SLOT[2]; - /* phase generator state */ - uint32_t block_fnum = 0; /* block+fnum */ - uint32_t fc = 0; /* Freq. freqement base */ - uint32_t ksl_base = 0; /* KeyScaleLevel Base step */ - uint8_t kcode = 0; /* key code (for key scaling) */ - uint8_t sus = 0; /* sus on/off (release speed in percussive mode)*/ - }; - - enum { - RATE_STEPS = (8), - - /* sinwave entries */ - SIN_BITS = 10, - SIN_LEN = (1<increment counter */ +// ======================> ym2423_device - uint8_t address; /* address register */ +DECLARE_DEVICE_TYPE(YM2423, ym2423_device); - signed int output[2]; +class ym2423_device : public ym2413_device +{ +public: + // constructor + ym2423_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + +protected: + // device-level overrides + virtual const tiny_rom_entry *device_rom_region() const override; +}; - // internal state - sound_stream * m_stream; - int limit( int val, int max, int min ); - void advance_lfo(); - void advance(); - int op_calc(uint32_t phase, unsigned int env, signed int pm, unsigned int wave_tab); - int op_calc1(uint32_t phase, unsigned int env, signed int pm, unsigned int wave_tab); - void chan_calc( OPLL_CH *CH ); - void rhythm_calc( OPLL_CH *CH, unsigned int noise ); - void key_on(OPLL_SLOT *SLOT, uint32_t key_set); - void key_off(OPLL_SLOT *SLOT, uint32_t key_clr); - void calc_fcslot(OPLL_CH *CH, OPLL_SLOT *SLOT); - void set_mul(int slot,int v); - void set_ksl_tl(int chan,int v); - void set_ksl_wave_fb(int chan,int v); - void set_ar_dr(int slot,int v); - void set_sl_rr(int slot,int v); - void load_instrument(uint32_t chan, uint32_t slot, uint8_t* inst ); - void update_instrument_zero( uint8_t r ); - void write_reg(int r, int v); +// ======================> ymf281_device + +DECLARE_DEVICE_TYPE(YMF281, ymf281_device); + +class ymf281_device : public ym2413_device +{ +public: + // constructor + ymf281_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); +protected: + // device-level overrides + virtual const tiny_rom_entry *device_rom_region() const override; }; -DECLARE_DEVICE_TYPE(YM2413, ym2413_device) -class vrc7snd_device : public ym2413_device +// ======================> ds1001_device + +DECLARE_DEVICE_TYPE(DS1001, ds1001_device); + +class ds1001_device : public ym2413_device { public: - vrc7snd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + // constructor + ds1001_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); -private: - static const uint8_t vrc7_table[19][8]; +protected: + // device-level overrides + virtual const tiny_rom_entry *device_rom_region() const override; }; -DECLARE_DEVICE_TYPE(VRC7, vrc7snd_device) #endif // MAME_SOUND_YM2413_H diff -Nru mame-0.230+dfsg.1/src/devices/sound/ym2608.cpp mame-0.231+dfsg.1/src/devices/sound/ym2608.cpp --- mame-0.230+dfsg.1/src/devices/sound/ym2608.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/sound/ym2608.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -33,11 +33,11 @@ ay8910_device(mconfig, YM2608, tag, owner, clock, PSG_TYPE_YM, 1, 2), device_rom_interface(mconfig, *this), m_internal(*this, "internal"), - m_opn(*this), + m_fm(*this), m_adpcm_a(*this, read8sm_delegate(*this, FUNC(ym2608_device::adpcm_a_read)), 0), m_adpcm_b(*this, read8sm_delegate(*this, FUNC(ym2608_device::adpcm_b_read)), write8sm_delegate(*this, FUNC(ym2608_device::adpcm_b_write))), m_stream(nullptr), - m_busy_duration(m_opn.compute_busy_duration()), + m_busy_duration(m_fm.compute_busy_duration()), m_address(0), m_irq_enable(0x1f), m_flag_control(0x1c) @@ -55,7 +55,7 @@ switch (offset & 3) { case 0: // status port, YM2203 compatible - result = m_opn.status() & (ymopna_engine::STATUS_TIMERA | ymopna_engine::STATUS_TIMERB | ymopna_engine::STATUS_BUSY); + result = m_fm.status() & (fm_engine::STATUS_TIMERA | fm_engine::STATUS_TIMERB | fm_engine::STATUS_BUSY); break; case 1: // data port (only SSG) @@ -66,6 +66,7 @@ break; case 2: // status port, extended + m_stream->update(); result = combine_status(); break; @@ -99,7 +100,7 @@ // prescaler select : 2d,2e,2f if (m_address == 0x2d) update_prescale(6); - else if (m_address == 0x2e && m_opn.clock_prescale() == 6) + else if (m_address == 0x2e && m_fm.clock_prescale() == 6) update_prescale(3); else if (m_address == 0x2f) update_prescale(2); @@ -128,17 +129,17 @@ // special IRQ mask register m_stream->update(); m_irq_enable = value; - m_opn.set_irq_mask(m_irq_enable & ~m_flag_control & 0x1f); + m_fm.set_irq_mask(m_irq_enable & ~m_flag_control & 0x1f); } else { - // write to OPN + // write to FM m_stream->update(); - m_opn.write(m_address, value); + m_fm.write(m_address, value); } // mark busy for a bit - m_opn.set_busy_end(machine().time() + m_busy_duration); + m_fm.set_busy_end(machine().time() + m_busy_duration); break; case 2: // upper address port @@ -162,22 +163,22 @@ // IRQ flag control m_stream->update(); if (BIT(value, 7)) - m_opn.set_reset_status(0, 0xff); + m_fm.set_reset_status(0, 0xff); else { m_flag_control = value; - m_opn.set_irq_mask(m_irq_enable & ~m_flag_control & 0x1f); + m_fm.set_irq_mask(m_irq_enable & ~m_flag_control & 0x1f); } } else { - // write to OPN + // write to FM m_stream->update(); - m_opn.write(m_address, value); + m_fm.write(m_address, value); } // mark busy for a bit - m_opn.set_busy_end(machine().time() + m_busy_duration); + m_fm.set_busy_end(machine().time() + m_busy_duration); break; } } @@ -193,7 +194,7 @@ ay8910_device::device_start(); // create our stream - m_stream = stream_alloc(0, 2, clock() / (4 * 6 * 6)); + m_stream = stream_alloc(0, fm_engine::OUTPUTS, m_fm.sample_rate(clock())); // save our data save_item(YMFM_NAME(m_address)); @@ -201,17 +202,9 @@ save_item(YMFM_NAME(m_flag_control)); // save the engines - m_opn.save(*this); + m_fm.save(*this); m_adpcm_a.save(*this); m_adpcm_b.save(*this); - - // configure ADPCM percussion sounds - m_adpcm_a.set_start_end(0, 0x0000, 0x01bf); // bass drum - m_adpcm_a.set_start_end(1, 0x01c0, 0x043f); // snare drum - m_adpcm_a.set_start_end(2, 0x0440, 0x1b7f); // top cymbal - m_adpcm_a.set_start_end(3, 0x1b80, 0x1cff); // high hat - m_adpcm_a.set_start_end(4, 0x1d00, 0x1f7f); // tom tom - m_adpcm_a.set_start_end(5, 0x1f80, 0x1fff); // rim shot } @@ -225,10 +218,18 @@ ay8910_device::device_reset(); // reset the engines - m_opn.reset(); + m_fm.reset(); m_adpcm_a.reset(); m_adpcm_b.reset(); + // configure ADPCM percussion sounds + m_adpcm_a.set_start_end(0, 0x0000, 0x01bf); // bass drum + m_adpcm_a.set_start_end(1, 0x01c0, 0x043f); // snare drum + m_adpcm_a.set_start_end(2, 0x0440, 0x1b7f); // top cymbal + m_adpcm_a.set_start_end(3, 0x1b80, 0x1cff); // high hat + m_adpcm_a.set_start_end(4, 0x1d00, 0x1f7f); // tom tom + m_adpcm_a.set_start_end(5, 0x1f80, 0x1fff); // rim shot + // initialize our special interrupt states m_irq_enable = 0x1f; m_flag_control = 0x1c; @@ -243,7 +244,7 @@ void ym2608_device::device_clock_changed() { // refresh via prescale - update_prescale(m_opn.clock_prescale()); + update_prescale(m_fm.clock_prescale()); } @@ -301,13 +302,13 @@ } // top bit of the IRQ enable flags controls 3-channel vs 6-channel mode - u8 opnmask = BIT(m_irq_enable, 7) ? 0x3f : 0x07; + u8 fmmask = BIT(m_irq_enable, 7) ? 0x3f : 0x07; // iterate over all target samples for (int sampindex = 0; sampindex < outputs[0].samples(); sampindex++) { - // clock the OPN - u32 env_counter = m_opn.clock(opnmask); + // clock the FM + u32 env_counter = m_fm.clock(fmmask); // clock the ADPCM-A engine on every envelope cycle // (channels 4 and 5 clock every 2 envelope clocks) @@ -317,17 +318,17 @@ // clock the ADPCM-B engine every cycle m_adpcm_b.clock(0x01); - // update the OPN content; OPNA is 13-bit with no intermediate clipping - s32 lsum = 0, rsum = 0; - m_opn.output(lsum, rsum, 1, 32767, opnmask); + // update the FM content; YM2608 is 13-bit with no intermediate clipping + s32 sums[fm_engine::OUTPUTS] = { 0 }; + m_fm.output(sums, 1, 32767, fmmask); // mix in the ADPCM - m_adpcm_a.output(lsum, rsum, 0x3f); - m_adpcm_b.output(lsum, rsum, 2, 0x01); + m_adpcm_a.output(sums, 0x3f); + m_adpcm_b.output(sums, 2, 0x01); // YM2608 is stereo - outputs[0].put_int_clamp(sampindex, lsum, 32768); - outputs[1].put_int_clamp(sampindex, rsum, 32768); + for (int index = 0; index < fm_engine::OUTPUTS; index++) + outputs[index].put_int_clamp(sampindex, sums[index], 32768); } } @@ -339,32 +340,32 @@ void ym2608_device::update_prescale(u8 newval) { - // inform the OPN engine and refresh our clock rate - m_opn.set_clock_prescale(newval); - m_stream->set_sample_rate(clock() / (4 * 6 * newval)); - logerror("Prescale = %d; sample_rate = %d\n", newval, clock() / (4 * 6 * newval)); + // inform the FM engine and refresh our clock rate + m_fm.set_clock_prescale(newval); + m_stream->set_sample_rate(m_fm.sample_rate(clock())); + logerror("Prescale = %d; sample_rate = %d\n", newval, m_fm.sample_rate(clock())); // also scale the SSG streams - // mapping is (OPN->SSG): 6->4, 3->2, 2->1 + // mapping is (FM->SSG): 6->4, 3->2, 2->1 u8 ssg_scale = 2 * newval / 3; // QUESTION: where does the *2 come from?? ay_set_clock(clock() / ssg_scale); // recompute the busy duration - m_busy_duration = m_opn.compute_busy_duration(); + m_busy_duration = m_fm.compute_busy_duration(); } //------------------------------------------------- // combine_status - combine status flags from -// OPN and ADPCM-B, masking out any indicated by +// FM and ADPCM-B, masking out any indicated by // the flag control register //------------------------------------------------- u8 ym2608_device::combine_status() { - u8 status = m_opn.status(); - u8 adpcm_status = m_adpcm_b.status(0); + u8 status = m_fm.status() & ~(STATUS_ADPCM_B_EOS | STATUS_ADPCM_B_BRDY | STATUS_ADPCM_B_PLAYING); + u8 adpcm_status = m_adpcm_b.status(); if ((adpcm_status & ymadpcm_b_channel::STATUS_EOS) != 0) status |= STATUS_ADPCM_B_EOS; if ((adpcm_status & ymadpcm_b_channel::STATUS_BRDY) != 0) @@ -372,7 +373,7 @@ if ((adpcm_status & ymadpcm_b_channel::STATUS_PLAYING) != 0) status |= STATUS_ADPCM_B_PLAYING; status &= ~(m_flag_control & 0x1f); - m_opn.set_reset_status(status, ~status); + m_fm.set_reset_status(status, ~status); return status; } diff -Nru mame-0.230+dfsg.1/src/devices/sound/ym2608.h mame-0.231+dfsg.1/src/devices/sound/ym2608.h --- mame-0.230+dfsg.1/src/devices/sound/ym2608.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/sound/ym2608.h 2021-04-27 15:32:05.000000000 +0000 @@ -18,11 +18,14 @@ class ym2608_device : public ay8910_device, public device_rom_interface<21> { public: + // YM2608 is OPNA + using fm_engine = ymopna_engine; + // constructor ym2608_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // configuration helpers - auto irq_handler() { return m_opn.irq_handler(); } + auto irq_handler() { return m_fm.irq_handler(); } // read/write access u8 read(offs_t offset); @@ -33,9 +36,9 @@ virtual void device_start() override; virtual void device_reset() override; virtual void device_clock_changed() override; + virtual const tiny_rom_entry *device_rom_region() const override; // ROM device overrides - virtual const tiny_rom_entry *device_rom_region() const override; virtual void rom_bank_updated() override; // sound overrides @@ -45,7 +48,7 @@ // set a new prescale value and update clocks void update_prescale(u8 newval); - // combine ADPCM and OPN statuses + // combine ADPCM and FM statuses u8 combine_status(); // ADPCM read/write callbacks @@ -55,7 +58,7 @@ // internal state required_memory_region m_internal; // internal memory region - ymopna_engine m_opn; // core OPNA engine + fm_engine m_fm; // core FM engine ymadpcm_a_engine m_adpcm_a; // ADPCM-A engine ymadpcm_b_engine m_adpcm_b; // ADPCM-B engine sound_stream *m_stream; // sound stream diff -Nru mame-0.230+dfsg.1/src/devices/sound/ym2610.cpp mame-0.231+dfsg.1/src/devices/sound/ym2610.cpp --- mame-0.230+dfsg.1/src/devices/sound/ym2610.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/sound/ym2610.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -6,7 +6,7 @@ DEFINE_DEVICE_TYPE(YM2610, ym2610_device, "ym2610", "YM2610 OPNB") -DEFINE_DEVICE_TYPE(YM2610B, ym2610b_device, "ym2610b", "YM2610 OPNB2") +DEFINE_DEVICE_TYPE(YM2610B, ym2610b_device, "ym2610b", "YM2610B OPNB2") //********************************************************* @@ -17,20 +17,20 @@ // ym2610_device - constructor //------------------------------------------------- -ym2610_device::ym2610_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, device_type type, u8 opn_mask) : +ym2610_device::ym2610_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, device_type type, u8 fm_mask) : ay8910_device(mconfig, type, tag, owner, clock, PSG_TYPE_YM, 1, 0), device_memory_interface(mconfig, *this), m_adpcm_a_config("adpcm-a", ENDIANNESS_LITTLE, 8, 24, 0), m_adpcm_b_config("adpcm-b", ENDIANNESS_LITTLE, 8, 24, 0), m_adpcm_a_region(*this, "adpcma"), m_adpcm_b_region(*this, "adpcmb"), - m_opn(*this), + m_fm(*this), m_adpcm_a(*this, read8sm_delegate(*this, FUNC(ym2610_device::adpcm_a_read)), 8), m_adpcm_b(*this, read8sm_delegate(*this, FUNC(ym2610_device::adpcm_b_read)), write8sm_delegate(*this), 8), m_stream(nullptr), - m_busy_duration(m_opn.compute_busy_duration()), + m_busy_duration(m_fm.compute_busy_duration()), m_address(0), - m_opn_mask(opn_mask), + m_fm_mask(fm_mask), m_eos_status(0x00), m_flag_mask(0xbf) { @@ -57,7 +57,7 @@ switch (offset & 3) { case 0: // status port, YM2203 compatible - result = m_opn.status() & (ymopna_engine::STATUS_TIMERA | ymopna_engine::STATUS_TIMERB | ymopna_engine::STATUS_BUSY); + result = m_fm.status() & (fm_engine::STATUS_TIMERA | fm_engine::STATUS_TIMERB | fm_engine::STATUS_BUSY); break; case 1: // data port (only SSG) @@ -68,6 +68,7 @@ break; case 2: // status port, extended + m_stream->update(); result = m_eos_status & m_flag_mask; break; @@ -126,13 +127,13 @@ } else { - // write to OPN + // write to FM m_stream->update(); - m_opn.write(m_address, value); + m_fm.write(m_address, value); } // mark busy for a bit - m_opn.set_busy_end(machine().time() + m_busy_duration); + m_fm.set_busy_end(machine().time() + m_busy_duration); break; case 2: // upper address port @@ -153,13 +154,13 @@ } else { - // write to OPN + // write to FM m_stream->update(); - m_opn.write(m_address, value); + m_fm.write(m_address, value); } // mark busy for a bit - m_opn.set_busy_end(machine().time() + m_busy_duration); + m_fm.set_busy_end(machine().time() + m_busy_duration); break; } } @@ -189,7 +190,7 @@ ay8910_device::device_start(); // create our stream - m_stream = stream_alloc(0, 2, clock() / (4 * 6 * 6)); + m_stream = stream_alloc(0, fm_engine::OUTPUTS, m_fm.sample_rate(clock())); // save our data save_item(YMFM_NAME(m_address)); @@ -197,7 +198,7 @@ save_item(YMFM_NAME(m_flag_mask)); // save the engines - m_opn.save(*this); + m_fm.save(*this); m_adpcm_a.save(*this); m_adpcm_b.save(*this); @@ -225,7 +226,7 @@ ay8910_device::device_reset(); // reset the engines - m_opn.reset(); + m_fm.reset(); m_adpcm_a.reset(); m_adpcm_b.reset(); @@ -241,11 +242,11 @@ void ym2610_device::device_clock_changed() { - m_stream->set_sample_rate(clock() / (4 * 6 * 6)); + m_stream->set_sample_rate(m_fm.sample_rate(clock())); ay_set_clock(clock() / 4); // recompute the busy duration - m_busy_duration = m_opn.compute_busy_duration(); + m_busy_duration = m_fm.compute_busy_duration(); } @@ -265,8 +266,8 @@ // iterate over all target samples for (int sampindex = 0; sampindex < outputs[0].samples(); sampindex++) { - // clock the OPN - u32 env_counter = m_opn.clock(m_opn_mask); + // clock the FM + u32 env_counter = m_fm.clock(m_fm_mask); // clock the ADPCM-A engine on every envelope cycle if (BIT(env_counter, 0, 2) == 0) @@ -274,20 +275,20 @@ // clock the ADPCM-B engine every cycle m_adpcm_b.clock(0x01); - if ((m_adpcm_b.status(0) & ymadpcm_b_channel::STATUS_EOS) != 0) + if ((m_adpcm_b.status() & ymadpcm_b_channel::STATUS_EOS) != 0) m_eos_status |= 0x80; - // update the OPN content; OPNB is 13-bit with no intermediate clipping - s32 lsum = 0, rsum = 0; - m_opn.output(lsum, rsum, 1, 32767, m_opn_mask); + // update the FM content; YM2610 is 13-bit with no intermediate clipping + s32 sums[fm_engine::OUTPUTS] = { 0 }; + m_fm.output(sums, 1, 32767, m_fm_mask); // mix in the ADPCM - m_adpcm_a.output(lsum, rsum, 0x3f); - m_adpcm_b.output(lsum, rsum, 2, 0x01); + m_adpcm_a.output(sums, 0x3f); + m_adpcm_b.output(sums, 2, 0x01); // YM2608 is stereo - outputs[0].put_int_clamp(sampindex, lsum, 32768); - outputs[1].put_int_clamp(sampindex, rsum, 32768); + for (int index = 0; index < fm_engine::OUTPUTS; index++) + outputs[index].put_int_clamp(sampindex, sums[index], 32768); } } diff -Nru mame-0.230+dfsg.1/src/devices/sound/ym2610.h mame-0.231+dfsg.1/src/devices/sound/ym2610.h --- mame-0.230+dfsg.1/src/devices/sound/ym2610.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/sound/ym2610.h 2021-04-27 15:32:05.000000000 +0000 @@ -18,11 +18,14 @@ class ym2610_device : public ay8910_device, public device_memory_interface { public: + // YM2610 is OPNA + using fm_engine = ymopna_engine; + // constructor - ym2610_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, device_type type = YM2610, u8 opn_mask = 0x36); + ym2610_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, device_type type = YM2610, u8 fm_mask = 0x36); // configuration helpers - auto irq_handler() { return m_opn.irq_handler(); } + auto irq_handler() { return m_fm.irq_handler(); } // read/write access u8 read(offs_t offset); @@ -50,13 +53,13 @@ address_space_config const m_adpcm_b_config; // address space 1 config (ADPCM-B) optional_memory_region m_adpcm_a_region; // ADPCM-A memory region optional_memory_region m_adpcm_b_region; // ADPCM-B memory region - ymopna_engine m_opn; // core OPNA engine + fm_engine m_fm; // core FM engine ymadpcm_a_engine m_adpcm_a; // ADPCM-A engine ymadpcm_b_engine m_adpcm_b; // ADPCM-B engine sound_stream *m_stream; // sound stream attotime m_busy_duration; // precomputed busy signal duration u16 m_address; // address register - u8 const m_opn_mask; // OPN channel mask + u8 const m_fm_mask; // FM channel mask u8 m_eos_status; // end-of-sample signals u8 m_flag_mask; // flag mask control }; diff -Nru mame-0.230+dfsg.1/src/devices/sound/ym2612.cpp mame-0.231+dfsg.1/src/devices/sound/ym2612.cpp --- mame-0.230+dfsg.1/src/devices/sound/ym2612.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/sound/ym2612.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -8,7 +8,7 @@ // the YM2612/YM3438 just timeslice the output among all channels // instead of summing them; turn this on to simulate (may create // audible issues) -#define MULTIPLEX_YM2612_YM3438_OUTPUT (0) +#define MULTIPLEX_OUTPUT (0) DEFINE_DEVICE_TYPE(YM2612, ym2612_device, "ym2612", "YM2612 OPN2") @@ -27,9 +27,9 @@ ym2612_device::ym2612_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, device_type type) : device_t(mconfig, type, tag, owner, clock), device_sound_interface(mconfig, *this), - m_opn(*this), + m_fm(*this), m_stream(nullptr), - m_busy_duration(m_opn.compute_busy_duration()), + m_busy_duration(m_fm.compute_busy_duration()), m_address(0), m_dac_data(0), m_dac_enable(0), @@ -48,7 +48,7 @@ switch (offset & 3) { case 0: // status port, YM2203 compatible - result = m_opn.status(); + result = m_fm.status(); break; case 1: // data port (unused) @@ -100,12 +100,12 @@ } else { - // write to OPN - m_opn.write(m_address, value); + // write to FM + m_fm.write(m_address, value); } // mark busy for a bit - m_opn.set_busy_end(machine().time() + m_busy_duration); + m_fm.set_busy_end(machine().time() + m_busy_duration); break; case 2: // upper address port @@ -118,12 +118,12 @@ if (!BIT(m_address, 8)) break; - // write to OPN + // write to FM m_stream->update(); - m_opn.write(m_address, value); + m_fm.write(m_address, value); // mark busy for a bit - m_opn.set_busy_end(machine().time() + m_busy_duration); + m_fm.set_busy_end(machine().time() + m_busy_duration); break; } } @@ -136,7 +136,7 @@ void ym2612_device::device_start() { // create our stream - m_stream = stream_alloc(0, 2, clock() / (4 * 6 * 6)); + m_stream = stream_alloc(0, fm_engine::OUTPUTS, m_fm.sample_rate(clock())); // call this for the variants that need to adjust the rate device_clock_changed(); @@ -148,7 +148,7 @@ save_item(YMFM_NAME(m_channel)); // save the engines - m_opn.save(*this); + m_fm.save(*this); } @@ -159,7 +159,7 @@ void ym2612_device::device_reset() { // reset the engines - m_opn.reset(); + m_fm.reset(); // reset our internal state m_dac_enable = 0; @@ -173,10 +173,11 @@ void ym2612_device::device_clock_changed() { - m_stream->set_sample_rate(clock() / (4 * 6 * (MULTIPLEX_YM2612_YM3438_OUTPUT ? 1 : 6))); + u32 const sample_divider = MULTIPLEX_OUTPUT ? fm_engine::CHANNELS : 1; + m_stream->set_sample_rate(m_fm.sample_rate(clock()) * sample_divider); // recompute the busy duration - m_busy_duration = m_opn.compute_busy_duration(); + m_busy_duration = m_fm.compute_busy_duration(); } @@ -197,22 +198,22 @@ void ym2612_device::sound_stream_update_common(write_stream_view &outl, write_stream_view &outr, bool discontinuity) { - u32 const sample_divider = (discontinuity ? 260 : 256) * (MULTIPLEX_YM2612_YM3438_OUTPUT ? 1 : 6); + u32 const sample_divider = (discontinuity ? 260 : 256) * (MULTIPLEX_OUTPUT ? 1 : fm_engine::CHANNELS); // iterate over all target samples - s32 lsum = 0, rsum = 0; + s32 sums[2] = { 0 }; for (int sampindex = 0; sampindex < outl.samples(); ) { - // clock the OPN when we hit channel 0 + // clock the FM when we hit channel 0 if (m_channel == 0) - m_opn.clock(0x3f); + m_fm.clock(fm_engine::ALL_CHANNELS); - // update the current OPN channel; OPN2 is 9-bit with intermediate clipping - s32 lchan = 0, rchan = 0; + // update the current FM channel; YM2612 is 9-bit with intermediate clipping + s32 outputs[2] = { 0 }; if (m_channel != 5 || !m_dac_enable) - m_opn.output(lchan, rchan, 5, 256, 1 << m_channel); + m_fm.output(outputs, 5, 256, 1 << m_channel); else - lchan = rchan = s16(m_dac_data << 7) >> 7; + outputs[0] = outputs[1] = s16(m_dac_data << 7) >> 7; // hiccup in the internal YM2612 DAC means that there is a rather large // step between 0 and -1 (close to 6x the normal step); the approximation @@ -220,38 +221,37 @@ // fixed in the YM3438 if (discontinuity) { - if (lchan < 0) - lchan -= 2; + if (outputs[0] < 0) + outputs[0] -= 2; else - lchan += 3; - if (rchan < 0) - rchan -= 2; + outputs[0] += 3; + if (outputs[1] < 0) + outputs[1] -= 2; else - rchan += 3; + outputs[1] += 3; } // if multiplexing, just scale to 16 bits and output - if (MULTIPLEX_YM2612_YM3438_OUTPUT) + if (MULTIPLEX_OUTPUT) { - outl.put_int(sampindex, lchan, sample_divider); - outr.put_int(sampindex, rchan, sample_divider); + outl.put_int(sampindex, outputs[0], sample_divider); + outr.put_int(sampindex, outputs[1], sample_divider); sampindex++; - lsum = rsum = 0; } // if not, accumulate the sums else { - lsum += lchan; - rsum += rchan; + sums[0] += outputs[0]; + sums[1] += outputs[1]; // on the last channel, output the average and reset the sums if (m_channel == 5) { - outl.put_int(sampindex, lsum, sample_divider); - outr.put_int(sampindex, rsum, sample_divider); + outl.put_int(sampindex, sums[0], sample_divider); + outr.put_int(sampindex, sums[1], sample_divider); sampindex++; - lsum = rsum = 0; + sums[0] = sums[1] = 0; } } @@ -309,7 +309,7 @@ void ymf276_device::device_clock_changed() { - m_stream->set_sample_rate(clock() / (4 * 6 * 6)); + m_stream->set_sample_rate(m_fm.sample_rate(clock())); } @@ -320,32 +320,30 @@ void ymf276_device::sound_stream_update(sound_stream &stream, std::vector const &inputs, std::vector &outputs) { // mask off channel 6 if DAC is enabled - u8 const opn_mask = m_dac_enable ? 0x1f : 0x3f; + u8 const fm_mask = m_dac_enable ? 0x1f : 0x3f; // iterate over all target samples for (int sampindex = 0; sampindex < outputs[0].samples(); sampindex++) { - // clock the OPN - m_opn.clock(0x3f); + // clock the FM + m_fm.clock(fm_engine::ALL_CHANNELS); - // update the OPN content; OPN2L is 14-bit with intermediate clipping - s32 lsum = 0, rsum = 0; - m_opn.output(lsum, rsum, 0, 8191, opn_mask); + // update the FM content; YMF276 is 14-bit with intermediate clipping + s32 sums[fm_engine::OUTPUTS] = { 0 }; + m_fm.output(sums, 0, 8191, fm_mask); // shifted down 1 bit after mixer - lsum >>= 1; - rsum >>= 1; + for (int index = 0; index < fm_engine::OUTPUTS; index++) + sums[index] >>= 1; // add in DAC if enabled if (m_dac_enable) - { - lsum += s16(m_dac_data << 7) >> 3; - rsum += s16(m_dac_data << 7) >> 3; - } + for (int index = 0; index < fm_engine::OUTPUTS; index++) + sums[index] += s16(m_dac_data << 7) >> 3; // YMF3438 is stereo - outputs[0].put_int_clamp(sampindex, lsum, 32768); - outputs[1].put_int_clamp(sampindex, rsum, 32768); + for (int index = 0; index < fm_engine::OUTPUTS; index++) + outputs[index].put_int_clamp(sampindex, sums[0], 32768); } } diff -Nru mame-0.230+dfsg.1/src/devices/sound/ym2612.h mame-0.231+dfsg.1/src/devices/sound/ym2612.h --- mame-0.230+dfsg.1/src/devices/sound/ym2612.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/sound/ym2612.h 2021-04-27 15:32:05.000000000 +0000 @@ -16,11 +16,14 @@ class ym2612_device : public device_t, public device_sound_interface { public: + // YM2612 is OPNA + using fm_engine = ymopna_engine; + // constructor ym2612_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, device_type type = YM2612); // configuration helpers - auto irq_handler() { return m_opn.irq_handler(); } + auto irq_handler() { return m_fm.irq_handler(); } // read/write access u8 read(offs_t offset); @@ -39,7 +42,7 @@ void sound_stream_update_common(write_stream_view &outl, write_stream_view &outr, bool discontinuity); // internal state - ymopna_engine m_opn; // core OPN engine + fm_engine m_fm; // core FM engine sound_stream *m_stream; // sound stream attotime m_busy_duration; // precomputed busy signal duration u16 m_address; // address register diff -Nru mame-0.230+dfsg.1/src/devices/sound/ym3526.cpp mame-0.231+dfsg.1/src/devices/sound/ym3526.cpp --- mame-0.230+dfsg.1/src/devices/sound/ym3526.cpp 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/sound/ym3526.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,153 @@ +// license:BSD-3-Clause +// copyright-holders:Aaron Giles + +#include "emu.h" +#include "ym3526.h" + + +DEFINE_DEVICE_TYPE(YM3526, ym3526_device, "ym3526", "YM3526 OPL") + + +//********************************************************* +// YM3526 DEVICE +//********************************************************* + +//------------------------------------------------- +// ym3526_device - constructor +//------------------------------------------------- + +ym3526_device::ym3526_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, device_type type) : + device_t(mconfig, type, tag, owner, clock), + device_sound_interface(mconfig, *this), + m_address(0), + m_stream(nullptr), + m_fm(*this) +{ +} + + +//------------------------------------------------- +// status_r - return the status port (A0=0) +//------------------------------------------------- + +u8 ym3526_device::status_r() +{ + return m_fm.status() | 0x06; +} + + +//------------------------------------------------- +// read - handle a read from the device +//------------------------------------------------- + +u8 ym3526_device::read(offs_t offset) +{ + // datasheet says status only reads when A0=0 + if ((offset & 1) == 0) + return status_r(); + + // when A0=1 datasheet says "the data on the bus are not guaranteed" + logerror("Unexpected read from YM3526 offset %d\n", offset & 1); + return 0xff; +} + + +//------------------------------------------------- +// address_w - write to the address port (A0=0) +//------------------------------------------------- + +void ym3526_device::address_w(u8 value) +{ + m_address = value; +} + + +//------------------------------------------------- +// data_w - write to the data port (A0=1) +//------------------------------------------------- + +void ym3526_device::data_w(u8 value) +{ + // force an update + m_stream->update(); + + // write to FM + m_fm.write(m_address, value); +} + + +//------------------------------------------------- +// write - handle a write to the register +// interface +//------------------------------------------------- + +void ym3526_device::write(offs_t offset, u8 value) +{ + // A0 selects between address/data + if ((offset & 1) == 0) + address_w(value); + else + data_w(value); +} + + +//------------------------------------------------- +// device_start - start of emulation +//------------------------------------------------- + +void ym3526_device::device_start() +{ + // create our stream + m_stream = stream_alloc(0, fm_engine::OUTPUTS, m_fm.sample_rate(clock())); + + // save our data + save_item(YMFM_NAME(m_address)); + + // save the engines + m_fm.save(*this); +} + + +//------------------------------------------------- +// device_reset - start of emulation +//------------------------------------------------- + +void ym3526_device::device_reset() +{ + // reset the engines + m_fm.reset(); +} + + +//------------------------------------------------- +// device_clock_changed - update if clock changes +//------------------------------------------------- + +void ym3526_device::device_clock_changed() +{ + m_stream->set_sample_rate(m_fm.sample_rate(clock())); +} + + +//------------------------------------------------- +// sound_stream_update - update the sound stream +//------------------------------------------------- + +void ym3526_device::sound_stream_update(sound_stream &stream, std::vector const &inputs, std::vector &outputs) +{ + // iterate over all target samples + for (int sampindex = 0; sampindex < outputs[0].samples(); sampindex++) + { + // clock the system + m_fm.clock(fm_engine::ALL_CHANNELS); + + // update the FM content; clipping is unknown + s32 sums[fm_engine::OUTPUTS] = { 0 }; + m_fm.output(sums, 1, 32767, fm_engine::ALL_CHANNELS); + + // convert to 10.3 floating point value for the DAC and back + // YM3526 is mono + for (int index = 0; index < fm_engine::OUTPUTS; index++) + outputs[index].put_int(sampindex, ymfm_roundtrip_fp(sums[index]), 32768); + } +} diff -Nru mame-0.230+dfsg.1/src/devices/sound/ym3526.h mame-0.231+dfsg.1/src/devices/sound/ym3526.h --- mame-0.230+dfsg.1/src/devices/sound/ym3526.h 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/sound/ym3526.h 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,53 @@ +// license:BSD-3-Clause +// copyright-holders:Aaron Giles + +#ifndef MAME_SOUND_YM3526_H +#define MAME_SOUND_YM3526_H + +#pragma once + +#include "ymfm.h" + + +// ======================> ym3526_device + +DECLARE_DEVICE_TYPE(YM3526, ym3526_device); + +class ym3526_device : public device_t, public device_sound_interface +{ +public: + // YM3526 is OPL + using fm_engine = ymopl_engine; + + // constructor + ym3526_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, device_type type = YM3526); + + // configuration helpers + auto irq_handler() { return m_fm.irq_handler(); } + + // read access + u8 status_r(); // A0=0 + u8 read(offs_t offset); + + // write access + void address_w(u8 data); // A0=0 + void data_w(u8 data); // A0=1 + void write(offs_t offset, u8 data); + +protected: + // device-level overrides + virtual void device_start() override; + virtual void device_reset() override; + virtual void device_clock_changed() override; + + // sound overrides + virtual void sound_stream_update(sound_stream &stream, std::vector const &inputs, std::vector &outputs) override; + + // internal state + u8 m_address; // address register + sound_stream *m_stream; // sound stream + fm_engine m_fm; // core FM engine +}; + + +#endif // MAME_SOUND_YM3526_H diff -Nru mame-0.230+dfsg.1/src/devices/sound/ym3812.cpp mame-0.231+dfsg.1/src/devices/sound/ym3812.cpp --- mame-0.230+dfsg.1/src/devices/sound/ym3812.cpp 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/sound/ym3812.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,151 @@ +// license:BSD-3-Clause +// copyright-holders:Aaron Giles + +#include "emu.h" +#include "ym3812.h" + + +DEFINE_DEVICE_TYPE(YM3812, ym3812_device, "ym3812", "YM3812 OPL2") + + +//********************************************************* +// YM3812 DEVICE +//********************************************************* + +//------------------------------------------------- +// ym3812_device - constructor +//------------------------------------------------- + +ym3812_device::ym3812_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, device_type type) : + device_t(mconfig, type, tag, owner, clock), + device_sound_interface(mconfig, *this), + m_address(0), + m_stream(nullptr), + m_fm(*this) +{ +} + + +//------------------------------------------------- +// status_r - return the status port (A0=0) +//------------------------------------------------- + +u8 ym3812_device::status_r() +{ + return m_fm.status() | 0x06; +} + + +//------------------------------------------------- +// read - handle a read from the device +//------------------------------------------------- + +u8 ym3812_device::read(offs_t offset) +{ + // datasheet says status only reads when A0=0 + if ((offset & 1) == 0) + return status_r(); + logerror("Unexpected read from YM3812 offset %d\n", offset & 1); + return 0xff; +} + + +//------------------------------------------------- +// address_w - write to the address port (A0=0) +//------------------------------------------------- + +void ym3812_device::address_w(u8 value) +{ + m_address = value; +} + + +//------------------------------------------------- +// data_w - write to the data port (A0=1) +//------------------------------------------------- + +void ym3812_device::data_w(u8 value) +{ + // force an update + m_stream->update(); + + // write to FM + m_fm.write(m_address, value); +} + + +//------------------------------------------------- +// write - handle a write to the register +// interface +//------------------------------------------------- + +void ym3812_device::write(offs_t offset, u8 value) +{ + // A0 selects between address/data + if ((offset & 1) == 0) + address_w(value); + else + data_w(value); +} + + +//------------------------------------------------- +// device_start - start of emulation +//------------------------------------------------- + +void ym3812_device::device_start() +{ + // create our stream + m_stream = stream_alloc(0, fm_engine::OUTPUTS, m_fm.sample_rate(clock())); + + // save our data + save_item(YMFM_NAME(m_address)); + + // save the engines + m_fm.save(*this); +} + + +//------------------------------------------------- +// device_reset - start of emulation +//------------------------------------------------- + +void ym3812_device::device_reset() +{ + // reset the engines + m_fm.reset(); +} + + +//------------------------------------------------- +// device_clock_changed - update if clock changes +//------------------------------------------------- + +void ym3812_device::device_clock_changed() +{ + m_stream->set_sample_rate(m_fm.sample_rate(clock())); +} + + +//------------------------------------------------- +// sound_stream_update - update the sound stream +//------------------------------------------------- + +void ym3812_device::sound_stream_update(sound_stream &stream, std::vector const &inputs, std::vector &outputs) +{ + // iterate over all target samples + for (int sampindex = 0; sampindex < outputs[0].samples(); sampindex++) + { + // clock the system + m_fm.clock(fm_engine::ALL_CHANNELS); + + // update the FM content; clipping is unknown + s32 sums[fm_engine::OUTPUTS] = { 0 }; + m_fm.output(sums, 1, 32767, fm_engine::ALL_CHANNELS); + + // convert to 10.3 floating point value for the DAC and back + // YM3812 is mono + for (int index = 0; index < fm_engine::OUTPUTS; index++) + outputs[index].put_int(sampindex, ymfm_roundtrip_fp(sums[index]), 32768); + } +} diff -Nru mame-0.230+dfsg.1/src/devices/sound/ym3812.h mame-0.231+dfsg.1/src/devices/sound/ym3812.h --- mame-0.230+dfsg.1/src/devices/sound/ym3812.h 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/sound/ym3812.h 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,53 @@ +// license:BSD-3-Clause +// copyright-holders:Aaron Giles + +#ifndef MAME_SOUND_YM3812_H +#define MAME_SOUND_YM3812_H + +#pragma once + +#include "ymfm.h" + + +// ======================> ym3812_device + +DECLARE_DEVICE_TYPE(YM3812, ym3812_device); + +class ym3812_device : public device_t, public device_sound_interface +{ +public: + // YM3812 is OPL2 + using fm_engine = ymopl2_engine; + + // constructor + ym3812_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, device_type type = YM3812); + + // configuration helpers + auto irq_handler() { return m_fm.irq_handler(); } + + // read access + u8 status_r(); // A0=0 + u8 read(offs_t offset); + + // write access + void address_w(u8 data); // A0=0 + void data_w(u8 data); // A0=1 + void write(offs_t offset, u8 data); + +protected: + // device-level overrides + virtual void device_start() override; + virtual void device_reset() override; + virtual void device_clock_changed() override; + + // sound overrides + virtual void sound_stream_update(sound_stream &stream, std::vector const &inputs, std::vector &outputs) override; + + // internal state + u8 m_address; // address register + sound_stream *m_stream; // sound stream + fm_engine m_fm; // core FM engine +}; + + +#endif // MAME_SOUND_YM3812_H diff -Nru mame-0.230+dfsg.1/src/devices/sound/ymadpcm.cpp mame-0.231+dfsg.1/src/devices/sound/ymadpcm.cpp --- mame-0.230+dfsg.1/src/devices/sound/ymadpcm.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/sound/ymadpcm.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -10,6 +10,16 @@ //********************************************************* +// DEBUGGING +//********************************************************* + +// set this to only play certain channels: bits 0-5 are ADPCM-A +// channels and bit 0x80 is the ADPCM-B channel +constexpr u8 global_chanmask = 0xff; + + + +//********************************************************* // MACROS //********************************************************* @@ -21,6 +31,35 @@ //********************************************************* +// ADPCM "A" REGISTERS +//********************************************************* + +//------------------------------------------------- +// ymadpcm_a_registers - constructor +//------------------------------------------------- + +void ymadpcm_a_registers::save(device_t &device) +{ + device.save_item(ADPCM_A_NAME(m_regdata)); +} + + +//------------------------------------------------- +// reset - reset the register state +//------------------------------------------------- + +void ymadpcm_a_registers::reset() +{ + std::fill_n(&m_regdata[0], REGISTERS, 0); + + // initialize the pans to on by default, and max instrument volume; + // some neogeo homebrews (for example ffeast) rely on this + m_regdata[0x08] = m_regdata[0x09] = m_regdata[0x0a] = + m_regdata[0x0b] = m_regdata[0x0c] = m_regdata[0x0d] = 0xdf; +} + + +//********************************************************* // ADPCM "A" CHANNEL //********************************************************* @@ -28,16 +67,17 @@ // ymadpcm_a_channel - constructor //------------------------------------------------- -ymadpcm_a_channel::ymadpcm_a_channel(ymadpcm_a_registers regs, read8sm_delegate reader, u8 addrshift) : +ymadpcm_a_channel::ymadpcm_a_channel(ymadpcm_a_engine &owner, u32 choffs, read8sm_delegate reader, u32 addrshift) : + m_choffs(choffs), m_address_shift(addrshift), - m_reader(std::move(reader)), m_playing(0), m_curnibble(0), m_curbyte(0), m_curaddress(0), m_accumulator(0), m_step_index(0), - m_regs(regs) + m_reader(std::move(reader)), + m_regs(owner.regs()) { } @@ -46,7 +86,7 @@ // save - register for save states //------------------------------------------------- -void ymadpcm_a_channel::save(device_t &device, u8 index) +void ymadpcm_a_channel::save(device_t &device, u32 index) { device.save_item(ADPCM_A_NAME(m_playing), index); device.save_item(ADPCM_A_NAME(m_curnibble), index); @@ -82,12 +122,21 @@ m_playing = on; if (m_playing) { - m_curaddress = m_regs.start() << m_address_shift; + m_curaddress = m_regs.ch_start(m_choffs) << m_address_shift; m_curnibble = 0; m_curbyte = 0; m_accumulator = 0; m_step_index = 0; - LOG("KeyOn ADPCM-A%d: pan=%d%d start=%04X end=%04X level=%02X\n", m_regs.chbase(), m_regs.pan_left(), m_regs.pan_right(), m_regs.start(), m_regs.end(), m_regs.instrument_level()); + + // don't log masked channels + if (((global_chanmask >> m_choffs) & 1) != 0) + LOG("KeyOn ADPCM-A%d: pan=%d%d start=%04X end=%04X level=%02X\n", + m_choffs, + m_regs.ch_pan_left(m_choffs), + m_regs.ch_pan_right(m_choffs), + m_regs.ch_start(m_choffs), + m_regs.ch_end(m_choffs), + m_regs.ch_instrument_level(m_choffs)); } } @@ -105,8 +154,11 @@ return false; } - // stop when we hit the end address - if ((m_curaddress >> m_address_shift) >= m_regs.end()) + // stop when we hit the end address; apparently only low 20 bits are used for + // comparison on the YM2610: this affects sample playback in some games, for + // example twinspri character select screen music will skip some samples if + // this is not correct + if (((m_curaddress ^ (m_regs.ch_end(m_choffs) << m_address_shift)) & 0xfffff) == 0) { m_playing = m_accumulator = 0; return true; @@ -148,13 +200,7 @@ // adjust ADPCM step static s8 const s_step_inc[8] = { -1, -1, -1, -1, 2, 5, 7, 9 }; - m_step_index += s_step_inc[BIT(data, 0, 3)]; - - // clamp to the full range - if (m_step_index > 48) - m_step_index = 48; - else if (m_step_index < 0) - m_step_index = 0; + m_step_index = std::clamp(m_step_index + s_step_inc[BIT(data, 0, 3)], 0, 48); return false; } @@ -165,10 +211,10 @@ // panning applied //------------------------------------------------- -void ymadpcm_a_channel::output(s32 &leftout, s32 &rightout) const +void ymadpcm_a_channel::output(s32 outputs[2]) const { // volume combined instrument and total levels - int vol = (m_regs.instrument_level() ^ 0x1f) + (m_regs.total_level() ^ 0x3f); + int vol = (m_regs.ch_instrument_level(m_choffs) ^ 0x1f) + (m_regs.total_level() ^ 0x3f); // if combined is maximum, don't add to outputs if (vol >= 63) @@ -184,10 +230,10 @@ s16 value = ((s16(m_accumulator << 4) * mul) >> shift) & ~3; // apply to left/right as appropriate - if (m_regs.pan_left()) - leftout += value; - if (m_regs.pan_right()) - rightout += value; + if (m_regs.ch_pan_left(m_choffs)) + outputs[0] += value; + if (m_regs.ch_pan_right(m_choffs)) + outputs[1] += value; } @@ -200,13 +246,11 @@ // ymadpcm_a_engine - constructor //------------------------------------------------- -ymadpcm_a_engine::ymadpcm_a_engine(device_t &device, read8sm_delegate reader, u8 addrshift) : - m_regdata(0x30), - m_regs(m_regdata) +ymadpcm_a_engine::ymadpcm_a_engine(device_t &device, read8sm_delegate reader, u32 addrshift) { // create the channels - for (int chnum = 0; chnum < 6; chnum++) - m_channel[chnum] = std::make_unique(m_regs.channel_registers(chnum), reader, addrshift); + for (int chnum = 0; chnum < CHANNELS; chnum++) + m_channel[chnum] = std::make_unique(*this, chnum, reader, addrshift); } @@ -216,8 +260,8 @@ void ymadpcm_a_engine::save(device_t &device) { - // save our state - device.save_item(ADPCM_A_NAME(m_regdata)); + // save register state + m_regs.save(device); // save channel state for (int chnum = 0; chnum < std::size(m_channel); chnum++) @@ -231,6 +275,9 @@ void ymadpcm_a_engine::reset() { + // reset register state + m_regs.reset(); + // reset each channel for (auto &chan : m_channel) chan->reset(); @@ -241,10 +288,10 @@ // clock - master clocking function //------------------------------------------------- -u8 ymadpcm_a_engine::clock(u8 chanmask) +u32 ymadpcm_a_engine::clock(u32 chanmask) { // clock each channel, setting a bit in result if it finished - u8 result = 0; + u32 result = 0; for (int chnum = 0; chnum < std::size(m_channel); chnum++) if (BIT(chanmask, chnum)) if (m_channel[chnum]->clock()) @@ -259,12 +306,15 @@ // update - master update function //------------------------------------------------- -void ymadpcm_a_engine::output(s32 &lsum, s32 &rsum, u8 chanmask) +void ymadpcm_a_engine::output(s32 outputs[2], u32 chanmask) { + // mask out some channels for debug purposes + chanmask &= global_chanmask; + // compute the output of each channel for (int chnum = 0; chnum < std::size(m_channel); chnum++) if (BIT(chanmask, chnum)) - m_channel[chnum]->output(lsum, rsum); + m_channel[chnum]->output(outputs); } @@ -272,7 +322,7 @@ // write - handle writes to the ADPCM-A registers //------------------------------------------------- -void ymadpcm_a_engine::write(u8 regnum, u8 data) +void ymadpcm_a_engine::write(u32 regnum, u8 data) { // store the raw value to the register array; // most writes are passive, consumed only when needed @@ -288,6 +338,33 @@ //********************************************************* +// ADPCM "B" REGISTERS +//********************************************************* + +//------------------------------------------------- +// ymadpcm_b_registers - constructor +//------------------------------------------------- + +void ymadpcm_b_registers::save(device_t &device) +{ + device.save_item(ADPCM_B_NAME(m_regdata)); +} + + +//------------------------------------------------- +// reset - reset the register state +//------------------------------------------------- + +void ymadpcm_b_registers::reset() +{ + std::fill_n(&m_regdata[0], REGISTERS, 0); + + // default limit to wide open + m_regdata[0x0c] = m_regdata[0x0d] = 0xff; +} + + +//********************************************************* // ADPCM "B" CHANNEL //********************************************************* @@ -295,9 +372,7 @@ // ymadpcm_b_channel - constructor //------------------------------------------------- -ymadpcm_b_channel::ymadpcm_b_channel(ymadpcm_b_registers regs, read8sm_delegate reader, write8sm_delegate writer, u8 addrshift) : - m_reader(reader), - m_writer(writer), +ymadpcm_b_channel::ymadpcm_b_channel(ymadpcm_b_engine &owner, read8sm_delegate reader, write8sm_delegate writer, u32 addrshift) : m_address_shift(addrshift), m_status(STATUS_BRDY), m_curnibble(0), @@ -308,7 +383,9 @@ m_accumulator(0), m_prev_accum(0), m_adpcm_step(STEP_MIN), - m_regs(regs) + m_reader(reader), + m_writer(writer), + m_regs(owner.regs()) { } @@ -317,7 +394,7 @@ // save - register for save states //------------------------------------------------- -void ymadpcm_b_channel::save(device_t &device, u8 index) +void ymadpcm_b_channel::save(device_t &device, u32 index) { device.save_item(ADPCM_B_NAME(m_status), index); device.save_item(ADPCM_B_NAME(m_curnibble), index); @@ -388,6 +465,7 @@ m_accumulator = 0; m_prev_accum = 0; m_status = (m_status & ~STATUS_PLAYING) | STATUS_EOS; + LOG("ADPCM EOS\n"); return; } } @@ -433,19 +511,23 @@ // panning applied //------------------------------------------------- -void ymadpcm_b_channel::output(s32 &lsum, s32 &rsum, u8 rshift) const +void ymadpcm_b_channel::output(s32 outputs[2], u32 rshift) const { + // mask out some channels for debug purposes + if ((global_chanmask & 0x80) == 0) + return; + // do a linear interpolation between samples - s32 result = (m_prev_accum * ((m_position ^ 0xffff) + 1) + m_accumulator * m_position) >> 16; + s32 result = (m_prev_accum * s32((m_position ^ 0xffff) + 1) + m_accumulator * s32(m_position)) >> 16; // apply volume (level) in a linear fashion and reduce - result = (result * m_regs.level()) >> (8 + rshift); + result = (result * s32(m_regs.level())) >> (8 + rshift); // apply to left/right if (m_regs.pan_left()) - lsum += result; + outputs[0] += result; if (m_regs.pan_right()) - rsum += result; + outputs[1] += result; } @@ -453,7 +535,7 @@ // read - handle special register reads //------------------------------------------------- -u8 ymadpcm_b_channel::read(u8 regnum) +u8 ymadpcm_b_channel::read(u32 regnum) { u8 result = 0; @@ -469,7 +551,10 @@ // did we hit the end? if so, signal EOS if (at_end()) + { m_status = STATUS_EOS | STATUS_BRDY; + LOG("ADPCM EOS\n"); + } // otherwise, write the data and signal ready else @@ -486,7 +571,7 @@ // write - handle special register writes //------------------------------------------------- -void ymadpcm_b_channel::write(u8 regnum, u8 value) +void ymadpcm_b_channel::write(u32 regnum, u8 value) { // register 0 can do a reset; also use writes here to reset the // dummy read counter @@ -495,9 +580,29 @@ if (m_regs.execute()) { load_start(); - LOG("KeyOn ADPCM-B: repeat=%d speaker=%d pan=%d%d dac=%d 8bit=%d rom=%d start=%04X end=%04X prescale=%04X deltan=%04X level=%02X limit=%04X\n", m_regs.repeat(), m_regs.speaker(), m_regs.pan_left(), m_regs.pan_right(), m_regs.dac(), m_regs.dram_8bit(), m_regs.rom_ram(), m_regs.start(), m_regs.end(), m_regs.prescale(), m_regs.delta_n(), m_regs.level(), m_regs.limit()); + + // don't log masked channels + if ((global_chanmask & 0x80) != 0) + LOG("KeyOn ADPCM-B: rep=%d spk=%d pan=%d%d dac=%d 8b=%d rom=%d ext=%d rec=%d start=%04X end=%04X pre=%04X dn=%04X lvl=%02X lim=%04X\n", + m_regs.repeat(), + m_regs.speaker(), + m_regs.pan_left(), + m_regs.pan_right(), + m_regs.dac_enable(), + m_regs.dram_8bit(), + m_regs.rom_ram(), + m_regs.external(), + m_regs.record(), + m_regs.start(), + m_regs.end(), + m_regs.prescale(), + m_regs.delta_n(), + m_regs.level(), + m_regs.limit()); } - if (m_regs.reset()) + else + m_status &= ~STATUS_EOS; + if (m_regs.resetflag()) reset(); if (m_regs.external()) m_dummy_read = 2; @@ -522,7 +627,10 @@ // did we hit the end? if so, signal EOS if (at_end()) + { + LOG("ADPCM EOS\n"); m_status = STATUS_EOS | STATUS_BRDY; + } // otherwise, write the data and signal ready else @@ -540,7 +648,7 @@ // shift amount based on register settings //------------------------------------------------- -u8 ymadpcm_b_channel::address_shift() const +u32 ymadpcm_b_channel::address_shift() const { // if a constant address shift, just provide that if (m_address_shift != 0) @@ -584,19 +692,10 @@ // ymadpcm_b_engine - constructor //------------------------------------------------- -ymadpcm_b_engine::ymadpcm_b_engine(device_t &device, read8sm_delegate reader, write8sm_delegate writer, u8 addrshift) : - m_regdata(0x10), - m_regs(m_regdata) +ymadpcm_b_engine::ymadpcm_b_engine(device_t &device, read8sm_delegate reader, write8sm_delegate writer, u32 addrshift) { // create the channel (only one supported for now, but leaving possibilities open) - m_channel[0] = std::make_unique(m_regs, reader, writer, addrshift); - - // clear registers by default - std::fill_n(&m_regdata[0], m_regdata.size(), 0); - - // set the limit to 0xffff by default - m_regs.write(0x0c, 0xff); - m_regs.write(0x0d, 0xff); + m_channel[0] = std::make_unique(*this, reader, writer, addrshift); } @@ -607,7 +706,7 @@ void ymadpcm_b_engine::save(device_t &device) { // save our state - device.save_item(ADPCM_B_NAME(m_regdata)); + m_regs.save(device); // save channel state for (int chnum = 0; chnum < std::size(m_channel); chnum++) @@ -621,6 +720,9 @@ void ymadpcm_b_engine::reset() { + // reset registers + m_regs.reset(); + // reset each channel for (auto &chan : m_channel) chan->reset(); @@ -631,7 +733,7 @@ // clock - master clocking function //------------------------------------------------- -void ymadpcm_b_engine::clock(u8 chanmask) +void ymadpcm_b_engine::clock(u32 chanmask) { // clock each channel, setting a bit in result if it finished for (int chnum = 0; chnum < std::size(m_channel); chnum++) @@ -644,12 +746,12 @@ // output - master output function //------------------------------------------------- -void ymadpcm_b_engine::output(s32 &lsum, s32 &rsum, u8 rshift, u8 chanmask) +void ymadpcm_b_engine::output(s32 outputs[2], u32 rshift, u32 chanmask) { // compute the output of each channel for (int chnum = 0; chnum < std::size(m_channel); chnum++) if (BIT(chanmask, chnum)) - m_channel[chnum]->output(lsum, rsum, rshift); + m_channel[chnum]->output(outputs, rshift); } @@ -657,7 +759,7 @@ // write - handle writes to the ADPCM-B registers //------------------------------------------------- -void ymadpcm_b_engine::write(u8 regnum, u8 data) +void ymadpcm_b_engine::write(u32 regnum, u8 data) { // store the raw value to the register array; // most writes are passive, consumed only when needed diff -Nru mame-0.230+dfsg.1/src/devices/sound/ymadpcm.h mame-0.231+dfsg.1/src/devices/sound/ymadpcm.h --- mame-0.230+dfsg.1/src/devices/sound/ymadpcm.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/sound/ymadpcm.h 2021-04-27 15:32:05.000000000 +0000 @@ -8,6 +8,10 @@ #include "dirom.h" +// forward declarations +class ymadpcm_a_engine; +class ymadpcm_b_engine; + // ======================> ymadpcm_a_registers @@ -29,51 +33,60 @@ // class ymadpcm_a_registers { - // private constructor to directly specify channel base - ymadpcm_a_registers(ymadpcm_a_registers const &src, u8 chbase) : - m_chbase(chbase), - m_regdata(src.m_regdata) - { - } - public: + // constants + static constexpr u32 OUTPUTS = 2; + static constexpr u32 CHANNELS = 6; + static constexpr u32 REGISTERS = 0x30; + static constexpr u32 ALL_CHANNELS = (1 << CHANNELS) - 1; + // constructor - ymadpcm_a_registers(std::vector ®data) : - m_chbase(0), - m_regdata(regdata) + ymadpcm_a_registers() { } + + // register for save states + void save(device_t &device); + + // reset to initial state + void reset(); + + // map channel number to register offset + static constexpr u32 channel_offset(u32 chnum) { + assert(chnum < CHANNELS); + return chnum; } - u8 chbase() const { return m_chbase; } - // direct read/write access - u8 read(u8 index) { return m_regdata[index]; } - void write(u8 index, u8 data) { m_regdata[index] = data; } - - // create a new version of ourself with a different channel/operator base - ymadpcm_a_registers channel_registers(u8 chnum) { return ymadpcm_a_registers(*this, chnum); } + void write(u32 index, u8 data) { m_regdata[index] = data; } // system-wide registers - u8 dump() const /* 1 bit */ { return BIT(m_regdata[0x00], 7); } - u8 dump_mask() const /* 6 bits */ { return BIT(m_regdata[0x00], 0, 6); } - u8 total_level() const /* 6 bits */ { return BIT(m_regdata[0x01], 0, 6); } - u8 test() const /* 8 bits */ { return m_regdata[0x02]; } + u32 dump() const { return BIT(m_regdata[0x00], 7); } + u32 dump_mask() const { return BIT(m_regdata[0x00], 0, 6); } + u32 total_level() const { return BIT(m_regdata[0x01], 0, 6); } + u32 test() const { return m_regdata[0x02]; } // per-channel registers - u8 pan_left() const /* 1 bit */ { return BIT(m_regdata[m_chbase + 0x08], 7); } - u8 pan_right() const /* 1 bit */ { return BIT(m_regdata[m_chbase + 0x08], 6); } - u8 instrument_level() const /* 5 bits */ { return BIT(m_regdata[m_chbase + 0x08], 0, 5); } - u16 start() const /* 16 bits */ { return m_regdata[m_chbase + 0x10] | (m_regdata[m_chbase + 0x18] << 8); } - u16 end() const /* 16 bits */ { return m_regdata[m_chbase + 0x20] | (m_regdata[m_chbase + 0x28] << 8); } + u32 ch_pan_left(u32 choffs) const { return BIT(m_regdata[choffs + 0x08], 7); } + u32 ch_pan_right(u32 choffs) const { return BIT(m_regdata[choffs + 0x08], 6); } + u32 ch_instrument_level(u32 choffs) const { return BIT(m_regdata[choffs + 0x08], 0, 5); } + u32 ch_start(u32 choffs) const { return m_regdata[choffs + 0x10] | (m_regdata[choffs + 0x18] << 8); } + u32 ch_end(u32 choffs) const { return m_regdata[choffs + 0x20] | (m_regdata[choffs + 0x28] << 8); } // per-channel writes - void write_start(u16 address) { write(m_chbase + 0x10, address); write(m_chbase + 0x18, address >> 8); } - void write_end(u16 address) { write(m_chbase + 0x20, address); write(m_chbase + 0x28, address >> 8); } + void write_start(u32 choffs, u32 address) + { + write(choffs + 0x10, address); + write(choffs + 0x18, address >> 8); + } + void write_end(u32 choffs, u32 address) + { + write(choffs + 0x20, address); + write(choffs + 0x28, address >> 8); + } private: // internal state - u8 m_chbase; // base offset for channel-specific data - std::vector &m_regdata; // reference to the raw data + u8 m_regdata[REGISTERS]; // register data }; @@ -83,10 +96,10 @@ { public: // constructor - ymadpcm_a_channel(ymadpcm_a_registers regs, read8sm_delegate reader, u8 addrshift); + ymadpcm_a_channel(ymadpcm_a_engine &owner, u32 choffs, read8sm_delegate reader, u32 addrshift); // register for save states - void save(device_t &device, u8 index); + void save(device_t &device, u32 index); // reset the channel state void reset(); @@ -98,22 +111,20 @@ bool clock(); // return the computed output value, with panning applied - void output(s32 &lsum, s32 &rsum) const; - - // direct parameter setting for YM2608 ROM-based samples - void set_start_end(u16 start, u16 end) { m_regs.write_start(start); m_regs.write_end(end); } + void output(s32 outputs[ymadpcm_a_registers::OUTPUTS]) const; private: // internal state - u8 const m_address_shift; // address bits shift-left - read8sm_delegate const m_reader; // read delegate - u8 m_playing; // currently playing? - u8 m_curnibble; // index of the current nibble - u8 m_curbyte; // current byte of data + u32 const m_choffs; // channel offset + u32 const m_address_shift; // address bits shift-left + u32 m_playing; // currently playing? + u32 m_curnibble; // index of the current nibble + u32 m_curbyte; // current byte of data u32 m_curaddress; // current address - s16 m_accumulator; // accumulator - s8 m_step_index; // index in the stepping table - ymadpcm_a_registers m_regs; // register accessor + s32 m_accumulator; // accumulator + s32 m_step_index; // index in the stepping table + read8sm_delegate const m_reader; // read delegate + ymadpcm_a_registers &m_regs; // reference to registers }; @@ -121,11 +132,12 @@ class ymadpcm_a_engine { - static constexpr int CHANNELS = 6; - public: + static constexpr int OUTPUTS = ymadpcm_a_registers::OUTPUTS; + static constexpr int CHANNELS = ymadpcm_a_registers::CHANNELS; + // constructor - ymadpcm_a_engine(device_t &device, read8sm_delegate reader, u8 addrshift); + ymadpcm_a_engine(device_t &device, read8sm_delegate reader, u32 addrshift); // save state handling void save(device_t &device); @@ -134,21 +146,28 @@ void reset(); // master clocking function - u8 clock(u8 chanmask); + u32 clock(u32 chanmask); // compute sum of channel outputs - void output(s32 &lsum, s32 &rsum, u8 chanmask); + void output(s32 outputs[ymadpcm_a_registers::OUTPUTS], u32 chanmask); // write to the ADPCM-A registers - void write(u8 regnum, u8 data); + void write(u32 regnum, u8 data); // set the start/end address for a channel (for hardcoded YM2608 percussion) - void set_start_end(u8 chnum, u16 start, u16 end) { m_channel[chnum]->set_start_end(start, end); } + void set_start_end(u8 chnum, u16 start, u16 end) + { + u32 choffs = ymadpcm_a_registers::channel_offset(chnum); + m_regs.write_start(choffs, start); + m_regs.write_end(choffs, end); + } + + // return a reference to our registers + ymadpcm_a_registers ®s() { return m_regs; } private: // internal state std::unique_ptr m_channel[CHANNELS]; // array of channels - std::vector m_regdata; // raw register data ymadpcm_a_registers m_regs; // register accessor }; @@ -183,48 +202,59 @@ // 0b xxxxxxxx Level control // 0c xxxxxxxx Limit address (low) // 0d xxxxxxxx Limit address (high) -// 0e xxxxxxxx DAC data -// 0f xxxxxxxx PCM data +// 0e xxxxxxxx DAC data [YM2608/10] +// 0f xxxxxxxx PCM data [YM2608/10] +// 0e xxxxxxxx DAC data high [Y8950] +// 0f xx------ DAC data low [Y8950] +// 10 -----xxx DAC data exponent [Y8950] // class ymadpcm_b_registers { public: + // constants + static constexpr u32 OUTPUTS = 2; + static constexpr u32 CHANNELS = 1; + static constexpr u32 REGISTERS = 0x11; + static constexpr u32 ALL_CHANNELS = (1 << CHANNELS) - 1; + // constructor - ymadpcm_b_registers(std::vector ®data) : - m_regdata(regdata) - { - } + ymadpcm_b_registers() { } + + // register for save states + void save(device_t &device); + + // reset to initial state + void reset(); // direct read/write access - u8 read(u8 index) { return m_regdata[index]; } - void write(u8 index, u8 data) { m_regdata[index] = data; } + void write(u32 index, u8 data) { m_regdata[index] = data; } // system-wide registers - u8 execute() const /* 1 bit */ { return BIT(m_regdata[0x00], 7); } - u8 record() const /* 1 bit */ { return BIT(m_regdata[0x00], 6); } - u8 external() const /* 1 bit */ { return BIT(m_regdata[0x00], 5); } - u8 repeat() const /* 1 bit */ { return BIT(m_regdata[0x00], 4); } - u8 speaker() const /* 1 bit */ { return BIT(m_regdata[0x00], 3); } - u8 reset() const /* 1 bit */ { return BIT(m_regdata[0x00], 0); } - u8 pan_left() const /* 1 bit */ { return BIT(m_regdata[0x01], 7); } - u8 pan_right() const /* 1 bit */ { return BIT(m_regdata[0x01], 6); } - u8 start_conversion() const /* 1 bit */ { return BIT(m_regdata[0x01], 3); } - u8 dac_enable() const /* 1 bit */ { return BIT(m_regdata[0x01], 2); } - u8 dram_8bit() const /* 1 bit */ { return BIT(m_regdata[0x01], 1); } - u8 rom_ram() const /* 1 bit */ { return BIT(m_regdata[0x01], 0); } - u16 start() const /* 16 bits */ { return m_regdata[0x02] | (m_regdata[0x03] << 8); } - u16 end() const /* 16 bits */ { return m_regdata[0x04] | (m_regdata[0x05] << 8); } - u16 prescale() const /* 11 bits */ { return m_regdata[0x06] | (BIT(m_regdata[0x07], 0, 3) << 8); } - u8 cpudata() const /* 8 bits */ { return m_regdata[0x08]; } - u16 delta_n() const /* 16 bits */ { return m_regdata[0x09] | (m_regdata[0x0a] << 8); } - u8 level() const /* 8 bits */ { return m_regdata[0x0b]; } - u16 limit() const /* 16 bits */ { return m_regdata[0x0c] | (m_regdata[0x0d] << 8); } - u8 dac() const /* 8 bits */ { return m_regdata[0x0e]; } - u8 pcm() const /* 8 bits */ { return m_regdata[0x0f]; } + u32 execute() const { return BIT(m_regdata[0x00], 7); } + u32 record() const { return BIT(m_regdata[0x00], 6); } + u32 external() const { return BIT(m_regdata[0x00], 5); } + u32 repeat() const { return BIT(m_regdata[0x00], 4); } + u32 speaker() const { return BIT(m_regdata[0x00], 3); } + u32 resetflag() const { return BIT(m_regdata[0x00], 0); } + u32 pan_left() const { return BIT(m_regdata[0x01], 7); } + u32 pan_right() const { return BIT(m_regdata[0x01], 6); } + u32 start_conversion() const { return BIT(m_regdata[0x01], 3); } + u32 dac_enable() const { return BIT(m_regdata[0x01], 2); } + u32 dram_8bit() const { return BIT(m_regdata[0x01], 1); } + u32 rom_ram() const { return BIT(m_regdata[0x01], 0); } + u32 start() const { return m_regdata[0x02] | (m_regdata[0x03] << 8); } + u32 end() const { return m_regdata[0x04] | (m_regdata[0x05] << 8); } + u32 prescale() const { return m_regdata[0x06] | (BIT(m_regdata[0x07], 0, 3) << 8); } + u32 cpudata() const { return m_regdata[0x08]; } + u32 delta_n() const { return m_regdata[0x09] | (m_regdata[0x0a] << 8); } + u32 level() const { return m_regdata[0x0b]; } + u32 limit() const { return m_regdata[0x0c] | (m_regdata[0x0d] << 8); } + u32 dac() const { return m_regdata[0x0e]; } + u32 pcm() const { return m_regdata[0x0f]; } private: // internal state - std::vector &m_regdata; // reference to the raw data + u8 m_regdata[REGISTERS]; // register data }; @@ -241,10 +271,10 @@ static constexpr u8 STATUS_PLAYING = 0x04; // constructor - ymadpcm_b_channel(ymadpcm_b_registers regs, read8sm_delegate reader, write8sm_delegate writer, u8 addrshift); + ymadpcm_b_channel(ymadpcm_b_engine &owner, read8sm_delegate reader, write8sm_delegate writer, u32 addrshift); // register for save states - void save(device_t &device, u8 index); + void save(device_t &device, u32 index); // reset the channel state void reset(); @@ -256,20 +286,20 @@ void clock(); // return the computed output value, with panning applied - void output(s32 &lsum, s32 &rsum, u8 rshift) const; + void output(s32 outputs[ymadpcm_b_registers::OUTPUTS], u32 rshift) const; // return the status register u8 status() const { return m_status; } // handle special register reads - u8 read(u8 regnum); + u8 read(u32 regnum); // handle special register writes - void write(u8 regnum, u8 value); + void write(u32 regnum, u8 value); private: // helper - return the current address shift - u8 address_shift() const; + u32 address_shift() const; // load the start address void load_start(); @@ -281,19 +311,19 @@ bool at_end() const { return (m_curaddress >> address_shift()) > m_regs.end(); } // internal state - read8sm_delegate const m_reader; // read delegate - write8sm_delegate const m_writer;// write delegate - u8 const m_address_shift; // address bits shift-left - u8 m_status; // currently playing? - u8 m_curnibble; // index of the current nibble - u8 m_curbyte; // current byte of data - u8 m_dummy_read; // dummy read tracker - u16 m_position; // current fractional position + u32 const m_address_shift; // address bits shift-left + u32 m_status; // currently playing? + u32 m_curnibble; // index of the current nibble + u32 m_curbyte; // current byte of data + u32 m_dummy_read; // dummy read tracker + u32 m_position; // current fractional position u32 m_curaddress; // current address s32 m_accumulator; // accumulator s32 m_prev_accum; // previous accumulator (for linear interp) s32 m_adpcm_step; // next forecast - ymadpcm_b_registers m_regs; // register accessor + read8sm_delegate const m_reader; // read delegate + write8sm_delegate const m_writer;// write delegate + ymadpcm_b_registers &m_regs; // reference to registers }; @@ -301,11 +331,12 @@ class ymadpcm_b_engine { - static constexpr int CHANNELS = 1; - public: + static constexpr int OUTPUTS = ymadpcm_b_registers::OUTPUTS; + static constexpr int CHANNELS = ymadpcm_b_registers::CHANNELS; + // constructor - ymadpcm_b_engine(device_t &device, read8sm_delegate reader, write8sm_delegate writer, u8 addrshift = 0); + ymadpcm_b_engine(device_t &device, read8sm_delegate reader, write8sm_delegate writer, u32 addrshift = 0); // save state handling void save(device_t &device); @@ -314,24 +345,26 @@ void reset(); // master clocking function - void clock(u8 chanmask); + void clock(u32 chanmask); // compute sum of channel outputs - void output(s32 &lsum, s32 &rsum, u8 rshift, u8 chanmask); + void output(s32 outputs[2], u32 rshift, u32 chanmask); // read from the ADPCM-B registers - u8 read(u8 regnum) { return m_channel[0]->read(regnum); } + u32 read(u32 regnum) { return m_channel[0]->read(regnum); } // write to the ADPCM-B registers - void write(u8 regnum, u8 data); + void write(u32 regnum, u8 data); // status - u8 status(u8 chnum = 0) const { return m_channel[chnum]->status(); } + u8 status() const { return m_channel[0]->status(); } + + // return a reference to our registers + ymadpcm_b_registers ®s() { return m_regs; } private: // internal state std::unique_ptr m_channel[CHANNELS]; // array of channels - std::vector m_regdata; // raw register data ymadpcm_b_registers m_regs; // register accessor }; diff -Nru mame-0.230+dfsg.1/src/devices/sound/ymdeltat.cpp mame-0.231+dfsg.1/src/devices/sound/ymdeltat.cpp --- mame-0.230+dfsg.1/src/devices/sound/ymdeltat.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/sound/ymdeltat.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,628 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Jarek Burczynski -/* -** -** File: ymdeltat.c -** -** YAMAHA DELTA-T adpcm sound emulation subroutine -** used by fmopl.c (Y8950) and fm.c (YM2608 and YM2610/B) -** -** Base program is YM2610 emulator by Hiromitsu Shioya. -** Written by Tatsuyuki Satoh -** Improvements by Jarek Burczynski (bujar at mame dot net) -** -** -** History: -** -** 03-08-2003 Jarek Burczynski: -** - fixed BRDY flag implementation. -** -** 24-07-2003 Jarek Burczynski, Frits Hilderink: -** - fixed delault value for control2 in YM_DELTAT_ADPCM_Reset -** -** 22-07-2003 Jarek Burczynski, Frits Hilderink: -** - fixed external memory support -** -** 15-06-2003 Jarek Burczynski: -** - implemented CPU -> AUDIO ADPCM synthesis (via writes to the ADPCM data reg $08) -** - implemented support for the Limit address register -** - supported two bits from the control register 2 ($01): RAM TYPE (x1 bit/x8 bit), ROM/RAM -** - implemented external memory access (read/write) via the ADPCM data reg reads/writes -** Thanks go to Frits Hilderink for the example code. -** -** 14-06-2003 Jarek Burczynski: -** - various fixes to enable proper support for status register flags: BSRDY, PCM BSY, ZERO -** - modified EOS handling -** -** 05-04-2003 Jarek Burczynski: -** - implemented partial support for external/processor memory on sample replay -** -** 01-12-2002 Jarek Burczynski: -** - fixed first missing sound in gigandes thanks to previous fix (interpolator) by ElSemi -** - renamed/removed some YM_DELTAT struct fields -** -** 28-12-2001 Acho A. Tang -** - added EOS status report on ADPCM playback. -** -** 05-08-2001 Jarek Burczynski: -** - now_step is initialized with 0 at the start of play. -** -** 12-06-2001 Jarek Burczynski: -** - corrected end of sample bug in YM_DELTAT_ADPCM_CALC. -** Checked on real YM2610 chip - address register is 24 bits wide. -** Thanks go to Stefan Jokisch (stefan.jokisch@gmx.de) for tracking down the problem. -** -** TO DO: -** Check size of the address register on the other chips.... -** -** Version 0.72 -** -** sound chips that have this unit: -** YM2608 OPNA -** YM2610/B OPNB -** Y8950 MSX AUDIO -** -*/ - -#include "emu.h" -#include "ymdeltat.h" - -#define YM_DELTAT_SHIFT (16) - -#define YM_DELTAT_DELTA_MAX (24576) -#define YM_DELTAT_DELTA_MIN (127) -#define YM_DELTAT_DELTA_DEF (127) - -#define YM_DELTAT_DECODE_RANGE 32768 -#define YM_DELTAT_DECODE_MIN (-(YM_DELTAT_DECODE_RANGE)) -#define YM_DELTAT_DECODE_MAX ((YM_DELTAT_DECODE_RANGE)-1) - - -/* Forecast to next Forecast (rate = *8) */ -/* 1/8 , 3/8 , 5/8 , 7/8 , 9/8 , 11/8 , 13/8 , 15/8 */ -static constexpr int32_t ym_deltat_decode_tableB1[16] = { - 1, 3, 5, 7, 9, 11, 13, 15, - -1, -3, -5, -7, -9, -11, -13, -15, -}; -/* delta to next delta (rate= *64) */ -/* 0.9 , 0.9 , 0.9 , 0.9 , 1.2 , 1.6 , 2.0 , 2.4 */ -static constexpr int32_t ym_deltat_decode_tableB2[16] = { - 57, 57, 57, 57, 77, 102, 128, 153, - 57, 57, 57, 57, 77, 102, 128, 153 -}; - -#if 0 -void YM_DELTAT::BRDY_callback() -{ - logerror("BRDY_callback reached (flag set) !\n"); - - /* set BRDY bit in status register */ - if(status_set_handler) - if(status_change_BRDY_bit) - (status_set_handler)(status_change_which_chip, status_change_BRDY_bit); -} -#endif - -uint8_t YM_DELTAT::ADPCM_Read() -{ - uint8_t v = 0; - - /* external memory read */ - if ((portstate & 0xe0) == 0x20) - { - /* two dummy reads */ - if (memread) - { - now_addr = start << 1; - memread--; - return 0; - } - - - if (now_addr != (end << 1)) - { - v = read_byte(device, now_addr>>1); - - /*logerror("YM Delta-T memory read $%08x, v=$%02x\n", now_addr >> 1, v);*/ - - now_addr += 2; /* two nibbles at a time */ - - /* reset BRDY bit in status register, which means we are reading the memory now */ - if (status_reset_handler && status_change_BRDY_bit) - (status_reset_handler)(status_change_which_chip, status_change_BRDY_bit); - - /* setup a timer that will callback us in 10 master clock cycles for Y8950 - * in the callback set the BRDY flag to 1 , which means we have another data ready. - * For now, we don't really do this; we simply reset and set the flag in zero time, so that the IRQ will work. - */ - /* set BRDY bit in status register */ - if (status_set_handler && status_change_BRDY_bit) - (status_set_handler)(status_change_which_chip, status_change_BRDY_bit); - } - else - { - /* set EOS bit in status register */ - if (status_set_handler && status_change_EOS_bit) - (status_set_handler)(status_change_which_chip, status_change_EOS_bit); - } - } - - return v; -} - - -/* 0-DRAM x1, 1-ROM, 2-DRAM x8, 3-ROM (3 is bad setting - not allowed by the manual) */ -static constexpr uint8_t dram_rightshift[4]={3,0,0,0}; - -/* DELTA-T ADPCM write register */ -void YM_DELTAT::ADPCM_Write(int r, int v) -{ - if (r >= 0x10) return; - reg[r] = v; /* stock data */ - - switch (r) - { - case 0x00: -/* -START: - Accessing *external* memory is started when START bit (D7) is set to "1", so - you must set all conditions needed for recording/playback before starting. - If you access *CPU-managed* memory, recording/playback starts after - read/write of ADPCM data register $08. - -REC: - 0 = ADPCM synthesis (playback) - 1 = ADPCM analysis (record) - -MEMDATA: - 0 = processor (*CPU-managed*) memory (means: using register $08) - 1 = external memory (using start/end/limit registers to access memory: RAM or ROM) - - -SPOFF: - controls output pin that should disable the speaker while ADPCM analysis - -RESET and REPEAT only work with external memory. - - -some examples: -value: START, REC, MEMDAT, REPEAT, SPOFF, x,x,RESET meaning: - C8 1 1 0 0 1 0 0 0 Analysis (recording) from AUDIO to CPU (to reg $08), sample rate in PRESCALER register - E8 1 1 1 0 1 0 0 0 Analysis (recording) from AUDIO to EXT.MEMORY, sample rate in PRESCALER register - 80 1 0 0 0 0 0 0 0 Synthesis (playing) from CPU (from reg $08) to AUDIO,sample rate in DELTA-N register - a0 1 0 1 0 0 0 0 0 Synthesis (playing) from EXT.MEMORY to AUDIO, sample rate in DELTA-N register - - 60 0 1 1 0 0 0 0 0 External memory write via ADPCM data register $08 - 20 0 0 1 0 0 0 0 0 External memory read via ADPCM data register $08 - -*/ - /* handle emulation mode */ - if (emulation_mode == EMULATION_MODE_YM2610) - { - v |= 0x20; /* YM2610 always uses external memory and doesn't even have memory flag bit. */ - v &= ~0x40; /* YM2610 has no rec bit */ - } - - portstate = v & (0x80|0x40|0x20|0x10|0x01); /* start, rec, memory mode, repeat flag copy, reset(bit0) */ - - if (portstate & 0x80)/* START,REC,MEMDATA,REPEAT,SPOFF,--,--,RESET */ - { - /* set PCM BUSY bit */ - PCM_BSY = 1; - - /* start ADPCM */ - now_step = 0; - acc = 0; - prev_acc = 0; - adpcml = 0; - adpcmd = YM_DELTAT_DELTA_DEF; - now_data = 0; - - } - - if (portstate & 0x20) /* do we access external memory? */ - { - now_addr = start << 1; - memread = 2; /* two dummy reads needed before accesing external memory via register $08*/ - } - else /* we access CPU memory (ADPCM data register $08) so we only reset now_addr here */ - { - now_addr = 0; - } - - if (portstate & 0x01) - { - portstate = 0x00; - - /* clear PCM BUSY bit (in status register) */ - PCM_BSY = 0; - - /* set BRDY flag */ - if (status_set_handler && status_change_BRDY_bit) - (status_set_handler)(status_change_which_chip, status_change_BRDY_bit); - } - break; - - case 0x01: /* L,R,-,-,SAMPLE,DA/AD,RAMTYPE,ROM */ - /* handle emulation mode */ - if (emulation_mode == EMULATION_MODE_YM2610) - { - v |= 0x01; /* YM2610 always uses ROM as an external memory and doesn't tave ROM/RAM memory flag bit. */ - } - - pan = &output_pointer[(v >> 6) & 0x03]; - if ((control2 & 3) != (v & 3)) - { - /*0-DRAM x1, 1-ROM, 2-DRAM x8, 3-ROM (3 is bad setting - not allowed by the manual) */ - if (DRAMportshift != dram_rightshift[v & 3]) - { - DRAMportshift = dram_rightshift[v & 3]; - - /* final shift value depends on chip type and memory type selected: - 8 for YM2610 (ROM only), - 5 for ROM for Y8950 and YM2608, - 5 for x8bit DRAMs for Y8950 and YM2608, - 2 for x1bit DRAMs for Y8950 and YM2608. - */ - - /* refresh addresses */ - start = (reg[0x3] * 0x0100 | reg[0x2]) << (portshift - DRAMportshift); - end = (reg[0x5] * 0x0100 | reg[0x4]) << (portshift - DRAMportshift); - end += (1 << (portshift - DRAMportshift)) - 1; - limit = (reg[0xd]*0x0100 | reg[0xc]) << (portshift - DRAMportshift); - } - } - control2 = v; - break; - - case 0x02: /* Start Address L */ - case 0x03: /* Start Address H */ - start = (reg[0x3] * 0x0100 | reg[0x2]) << (portshift - DRAMportshift); - /*logerror("DELTAT start: 02=%2x 03=%2x addr=%8x\n",reg[0x2], reg[0x3],start );*/ - break; - - case 0x04: /* Stop Address L */ - case 0x05: /* Stop Address H */ - end = (reg[0x5]*0x0100 | reg[0x4]) << (portshift - DRAMportshift); - end += (1 << (portshift - DRAMportshift)) - 1; - /*logerror("DELTAT end : 04=%2x 05=%2x addr=%8x\n",reg[0x4], reg[0x5],end );*/ - break; - - case 0x06: /* Prescale L (ADPCM and Record frq) */ - case 0x07: /* Prescale H */ - break; - - case 0x08: /* ADPCM data */ -/* -some examples: -value: START, REC, MEMDAT, REPEAT, SPOFF, x,x,RESET meaning: - C8 1 1 0 0 1 0 0 0 Analysis (recording) from AUDIO to CPU (to reg $08), sample rate in PRESCALER register - E8 1 1 1 0 1 0 0 0 Analysis (recording) from AUDIO to EXT.MEMORY, sample rate in PRESCALER register - 80 1 0 0 0 0 0 0 0 Synthesis (playing) from CPU (from reg $08) to AUDIO,sample rate in DELTA-N register - a0 1 0 1 0 0 0 0 0 Synthesis (playing) from EXT.MEMORY to AUDIO, sample rate in DELTA-N register - - 60 0 1 1 0 0 0 0 0 External memory write via ADPCM data register $08 - 20 0 0 1 0 0 0 0 0 External memory read via ADPCM data register $08 - -*/ - - /* external memory write */ - if ((portstate & 0xe0) == 0x60) - { - if (memread) - { - now_addr = start << 1; - memread = 0; - } - - /*logerror("YM Delta-T memory write $%08x, v=$%02x\n", now_addr >> 1, v);*/ - - if (now_addr != (end << 1)) - { - write_byte(device, now_addr >> 1, v); - now_addr += 2; /* two nybbles at a time */ - - /* reset BRDY bit in status register, which means we are processing the write */ - if (status_reset_handler && status_change_BRDY_bit) - (status_reset_handler)(status_change_which_chip, status_change_BRDY_bit); - - /* setup a timer that will callback us in 10 master clock cycles for Y8950 - * in the callback set the BRDY flag to 1 , which means we have written the data. - * For now, we don't really do this; we simply reset and set the flag in zero time, so that the IRQ will work. - */ - /* set BRDY bit in status register */ - if (status_set_handler && status_change_BRDY_bit) - (status_set_handler)(status_change_which_chip, status_change_BRDY_bit); - - } - else - { - /* set EOS bit in status register */ - if (status_set_handler && status_change_EOS_bit) - (status_set_handler)(status_change_which_chip, status_change_EOS_bit); - } - - return; - } - - /* ADPCM synthesis from CPU */ - if ((portstate & 0xe0) == 0x80) - { - CPU_data = v; - - /* Reset BRDY bit in status register, which means we are full of data */ - if (status_reset_handler && status_change_BRDY_bit) - (status_reset_handler)(status_change_which_chip, status_change_BRDY_bit); - return; - } - - break; - - case 0x09: /* DELTA-N L (ADPCM Playback Prescaler) */ - case 0x0a: /* DELTA-N H */ - delta = (reg[0xa] * 0x0100 | reg[0x9]); - step = uint32_t(double(delta /* *(1<<(YM_DELTAT_SHIFT-16)) */) * freqbase); - /*logerror("DELTAT deltan:09=%2x 0a=%2x\n",reg[0x9], reg[0xa]);*/ - break; - - case 0x0b: /* Output level control (volume, linear) */ - { - const int32_t oldvol = volume; - volume = (v & 0xff) * (output_range / 256) / YM_DELTAT_DECODE_RANGE; -/* v * ((1<<16)>>8) >> 15; -* thus: v * (1<<8) >> 15; -* thus: output_range must be (1 << (15+8)) at least -* v * ((1<<23)>>8) >> 15; -* v * (1<<15) >> 15; -*/ - /*logerror("DELTAT vol = %2x\n",v&0xff);*/ - if (oldvol != 0) - { - adpcml = int(double(adpcml) / double(oldvol) * double(volume)); - } - } - break; - - case 0x0c: /* Limit Address L */ - case 0x0d: /* Limit Address H */ - limit = (reg[0xd] * 0x0100 | reg[0xc]) << (portshift - DRAMportshift); - /*logerror("DELTAT limit: 0c=%2x 0d=%2x addr=%8x\n",reg[0xc], reg[0xd],limit );*/ - break; - } -} - -void YM_DELTAT::ADPCM_Reset(int panidx, int mode, device_t *dev) -{ - device = dev; - now_addr = 0; - now_step = 0; - step = 0; - start = 0; - end = 0; - limit = ~0; /* this way YM2610 and Y8950 (both of which don't have limit address reg) will still work */ - volume = 0; - pan = &output_pointer[panidx]; - acc = 0; - prev_acc = 0; - adpcmd = 127; - adpcml = 0; - emulation_mode = uint8_t(mode); - portstate = (emulation_mode == EMULATION_MODE_YM2610) ? 0x20 : 0; - control2 = (emulation_mode == EMULATION_MODE_YM2610) ? 0x01 : 0; /* default setting depends on the emulation mode. MSX demo called "facdemo_4" doesn't setup control2 register at all and still works */ - DRAMportshift = dram_rightshift[control2 & 3]; - - /* The flag mask register disables the BRDY after the reset, however - ** as soon as the mask is enabled the flag needs to be set. */ - - /* set BRDY bit in status register */ - if (status_set_handler && status_change_BRDY_bit) - (status_set_handler)(status_change_which_chip, status_change_BRDY_bit); -} - -void YM_DELTAT::postload(uint8_t *regs) -{ - /* to keep adpcml */ - volume = 0; - /* update */ - for (int r = 1; r < 16; r++) - ADPCM_Write(r, regs[r]); - reg[0] = regs[0]; - - /* current rom data */ - now_data = read_byte(device, now_addr >> 1); - -} -void YM_DELTAT::savestate(device_t *device) -{ -#ifdef MAME_EMU_SAVE_H - YM_DELTAT *const DELTAT = this; // makes the save name sensible - device->save_item(NAME(DELTAT->portstate)); - device->save_item(NAME(DELTAT->now_addr)); - device->save_item(NAME(DELTAT->now_step)); - device->save_item(NAME(DELTAT->acc)); - device->save_item(NAME(DELTAT->prev_acc)); - device->save_item(NAME(DELTAT->adpcmd)); - device->save_item(NAME(DELTAT->adpcml)); -#endif -} - - -#define YM_DELTAT_Limit(val,max,min) \ -{ \ - if ( val > max ) val = max; \ - else if ( val < min ) val = min; \ -} - -static inline void YM_DELTAT_synthesis_from_external_memory(YM_DELTAT *DELTAT) -{ - uint32_t step; - int data; - - DELTAT->now_step += DELTAT->step; - if ( DELTAT->now_step >= (1<now_step >> YM_DELTAT_SHIFT; - DELTAT->now_step &= (1<now_addr == (DELTAT->limit<<1) ) - DELTAT->now_addr = 0; - - if ( DELTAT->now_addr == (DELTAT->end<<1) ) { /* 12-06-2001 JB: corrected comparison. Was > instead of == */ - if( DELTAT->portstate&0x10 ){ - /* repeat start */ - DELTAT->now_addr = DELTAT->start<<1; - DELTAT->acc = 0; - DELTAT->adpcmd = YM_DELTAT_DELTA_DEF; - DELTAT->prev_acc = 0; - }else{ - /* set EOS bit in status register */ - if(DELTAT->status_set_handler) - if(DELTAT->status_change_EOS_bit) - (DELTAT->status_set_handler)(DELTAT->status_change_which_chip, DELTAT->status_change_EOS_bit); - - /* clear PCM BUSY bit (reflected in status register) */ - DELTAT->PCM_BSY = 0; - - DELTAT->portstate = 0; - DELTAT->adpcml = 0; - DELTAT->prev_acc = 0; - return; - } - } - - if( DELTAT->now_addr&1 ) data = DELTAT->now_data & 0x0f; - else - { - DELTAT->now_data = DELTAT->read_byte(DELTAT->device, DELTAT->now_addr>>1); - data = DELTAT->now_data >> 4; - } - - DELTAT->now_addr++; - /* 12-06-2001 JB: */ - /* YM2610 address register is 24 bits wide.*/ - /* The "+1" is there because we use 1 bit more for nibble calculations.*/ - /* WARNING: */ - /* Side effect: we should take the size of the mapped ROM into account */ - DELTAT->now_addr &= ( (1<<(24+1))-1); - - /* store accumulator value */ - DELTAT->prev_acc = DELTAT->acc; - - /* Forecast to next Forecast */ - DELTAT->acc += (ym_deltat_decode_tableB1[data] * DELTAT->adpcmd / 8); - YM_DELTAT_Limit(DELTAT->acc,YM_DELTAT_DECODE_MAX, YM_DELTAT_DECODE_MIN); - - /* delta to next delta */ - DELTAT->adpcmd = (DELTAT->adpcmd * ym_deltat_decode_tableB2[data] ) / 64; - YM_DELTAT_Limit(DELTAT->adpcmd,YM_DELTAT_DELTA_MAX, YM_DELTAT_DELTA_MIN ); - - /* ElSemi: Fix interpolator. */ - /*DELTAT->prev_acc = prev_acc + ((DELTAT->acc - prev_acc) / 2 );*/ - - }while(--step); - - } - - /* ElSemi: Fix interpolator. */ - DELTAT->adpcml = DELTAT->prev_acc * (int)((1<now_step); - DELTAT->adpcml += (DELTAT->acc * (int)DELTAT->now_step); - DELTAT->adpcml = (DELTAT->adpcml>>YM_DELTAT_SHIFT) * (int)DELTAT->volume; - - /* output for work of output channels (outd[OPNxxxx])*/ - *(DELTAT->pan) += DELTAT->adpcml; -} - - - -static inline void YM_DELTAT_synthesis_from_CPU_memory(YM_DELTAT *DELTAT) -{ - uint32_t step; - int data; - - DELTAT->now_step += DELTAT->step; - if ( DELTAT->now_step >= (1<now_step >> YM_DELTAT_SHIFT; - DELTAT->now_step &= (1<now_addr&1 ) - { - data = DELTAT->now_data & 0x0f; - - DELTAT->now_data = DELTAT->CPU_data; - - /* after we used CPU_data, we set BRDY bit in status register, - * which means we are ready to accept another byte of data */ - if(DELTAT->status_set_handler) - if(DELTAT->status_change_BRDY_bit) - (DELTAT->status_set_handler)(DELTAT->status_change_which_chip, DELTAT->status_change_BRDY_bit); - } - else - { - data = DELTAT->now_data >> 4; - } - - DELTAT->now_addr++; - - /* store accumulator value */ - DELTAT->prev_acc = DELTAT->acc; - - /* Forecast to next Forecast */ - DELTAT->acc += (ym_deltat_decode_tableB1[data] * DELTAT->adpcmd / 8); - YM_DELTAT_Limit(DELTAT->acc,YM_DELTAT_DECODE_MAX, YM_DELTAT_DECODE_MIN); - - /* delta to next delta */ - DELTAT->adpcmd = (DELTAT->adpcmd * ym_deltat_decode_tableB2[data] ) / 64; - YM_DELTAT_Limit(DELTAT->adpcmd,YM_DELTAT_DELTA_MAX, YM_DELTAT_DELTA_MIN ); - - - }while(--step); - - } - - /* ElSemi: Fix interpolator. */ - DELTAT->adpcml = DELTAT->prev_acc * (int)((1<now_step); - DELTAT->adpcml += (DELTAT->acc * (int)DELTAT->now_step); - DELTAT->adpcml = (DELTAT->adpcml>>YM_DELTAT_SHIFT) * (int)DELTAT->volume; - - /* output for work of output channels (outd[OPNxxxx])*/ - *(DELTAT->pan) += DELTAT->adpcml; -} - - - -/* ADPCM B (Delta-T control type) */ -void YM_DELTAT::ADPCM_CALC() -{ -/* -some examples: -value: START, REC, MEMDAT, REPEAT, SPOFF, x,x,RESET meaning: - 80 1 0 0 0 0 0 0 0 Synthesis (playing) from CPU (from reg $08) to AUDIO,sample rate in DELTA-N register - a0 1 0 1 0 0 0 0 0 Synthesis (playing) from EXT.MEMORY to AUDIO, sample rate in DELTA-N register - C8 1 1 0 0 1 0 0 0 Analysis (recording) from AUDIO to CPU (to reg $08), sample rate in PRESCALER register - E8 1 1 1 0 1 0 0 0 Analysis (recording) from AUDIO to EXT.MEMORY, sample rate in PRESCALER register - - 60 0 1 1 0 0 0 0 0 External memory write via ADPCM data register $08 - 20 0 0 1 0 0 0 0 0 External memory read via ADPCM data register $08 - -*/ - - if ( (portstate & 0xe0)==0xa0 ) - { - YM_DELTAT_synthesis_from_external_memory(this); - return; - } - - if ( (portstate & 0xe0)==0x80 ) - { - /* ADPCM synthesis from CPU-managed memory (from reg $08) */ - YM_DELTAT_synthesis_from_CPU_memory(this); /* change output based on data in ADPCM data reg ($08) */ - return; - } - -//todo: ADPCM analysis -// if ( (portstate & 0xe0)==0xc0 ) -// if ( (portstate & 0xe0)==0xe0 ) - - return; -} diff -Nru mame-0.230+dfsg.1/src/devices/sound/ymdeltat.h mame-0.231+dfsg.1/src/devices/sound/ymdeltat.h --- mame-0.230+dfsg.1/src/devices/sound/ymdeltat.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/sound/ymdeltat.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,88 +0,0 @@ -// license:GPL-2.0+ -// copyright-holders:Jarek Burczynski -#ifndef MAME_SOUND_YMDELTAT_H -#define MAME_SOUND_YMDELTAT_H - -#pragma once - - -typedef uint8_t (*FM_READBYTE)(device_t *device, offs_t offset); -typedef void (*FM_WRITEBYTE)(device_t *device, offs_t offset, uint8_t data); -typedef void (*STATUS_CHANGE_HANDLER)(void *chip, uint8_t status_bits); - - -/* DELTA-T (adpcm type B) struct */ -struct YM_DELTAT { /* AT: rearranged and tightened structure */ - static constexpr int EMULATION_MODE_NORMAL = 0; - static constexpr int EMULATION_MODE_YM2610 = 1; - - FM_READBYTE read_byte; - FM_WRITEBYTE write_byte; - int32_t *output_pointer;/* pointer of output pointers */ - int32_t *pan; /* pan : &output_pointer[pan] */ - double freqbase; -#if 0 - double write_time; /* Y8950: 10 cycles of main clock; YM2608: 20 cycles of main clock */ - double read_time; /* Y8950: 8 cycles of main clock; YM2608: 18 cycles of main clock */ -#endif - uint32_t memory_size; - int output_range; - uint32_t now_addr; /* current address */ - uint32_t now_step; /* correct step */ - uint32_t step; /* step */ - uint32_t start; /* start address */ - uint32_t limit; /* limit address */ - uint32_t end; /* end address */ - uint32_t delta; /* delta scale */ - int32_t volume; /* current volume */ - int32_t acc; /* shift Measurement value*/ - int32_t adpcmd; /* next Forecast */ - int32_t adpcml; /* current value */ - int32_t prev_acc; /* leveling value */ - uint8_t now_data; /* current rom data */ - uint8_t CPU_data; /* current data from reg 08 */ - uint8_t portstate; /* port status */ - uint8_t control2; /* control reg: SAMPLE, DA/AD, RAM TYPE (x8bit / x1bit), ROM/RAM */ - uint8_t portshift; /* address bits shift-left: - ** 8 for YM2610, - ** 5 for Y8950 and YM2608 */ - - uint8_t DRAMportshift; /* address bits shift-right: - ** 0 for ROM and x8bit DRAMs, - ** 3 for x1 DRAMs */ - - uint8_t memread; /* needed for reading/writing external memory */ - - /* handlers and parameters for the status flags support */ - STATUS_CHANGE_HANDLER status_set_handler; - STATUS_CHANGE_HANDLER status_reset_handler; - - /* note that different chips have these flags on different - ** bits of the status register - */ - void * status_change_which_chip; /* this chip id */ - uint8_t status_change_EOS_bit; /* 1 on End Of Sample (record/playback/cycle time of AD/DA converting has passed)*/ - uint8_t status_change_BRDY_bit; /* 1 after recording 2 datas (2x4bits) or after reading/writing 1 data */ - uint8_t status_change_ZERO_bit; /* 1 if silence lasts for more than 290 milliseconds on ADPCM recording */ - - /* neither Y8950 nor YM2608 can generate IRQ when PCMBSY bit changes, so instead of above, - ** the statusflag gets ORed with PCM_BSY (below) (on each read of statusflag of Y8950 and YM2608) - */ - uint8_t PCM_BSY; /* 1 when ADPCM is playing; Y8950/YM2608 only */ - - uint8_t reg[16]; /* adpcm registers */ - uint8_t emulation_mode; /* which chip we're emulating */ - device_t *device; - - /*void BRDY_callback();*/ - - uint8_t ADPCM_Read(); - void ADPCM_Write(int r, int v); - void ADPCM_Reset(int panidx, int mode, device_t *dev); - void ADPCM_CALC(); - - void postload(uint8_t *regs); - void savestate(device_t *device); -}; - -#endif // MAME_SOUND_YMDELTAT_H diff -Nru mame-0.230+dfsg.1/src/devices/sound/ymf262.cpp mame-0.231+dfsg.1/src/devices/sound/ymf262.cpp --- mame-0.230+dfsg.1/src/devices/sound/ymf262.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/sound/ymf262.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -1,2803 +1,138 @@ -// license:GPL-2.0+ -// copyright-holders:Jarek Burczynski -/* -** -** File: ymf262.c - software implementation of YMF262 -** FM sound generator type OPL3 -** -** Copyright Jarek Burczynski -** -** Version 0.2 -** - -Revision History: - -03-03-2003: initial release - - thanks to Olivier Galibert and Chris Hardy for YMF262 and YAC512 chips - - thanks to Stiletto for the datasheets - - Features as listed in 4MF262A6 data sheet: - 1. Registers are compatible with YM3812 (OPL2) FM sound source. - 2. Up to six sounds can be used as four-operator melody sounds for variety. - 3. 18 simultaneous melody sounds, or 15 melody sounds with 5 rhythm sounds (with two operators). - 4. 6 four-operator melody sounds and 6 two-operator melody sounds, or 6 four-operator melody - sounds, 3 two-operator melody sounds and 5 rhythm sounds (with four operators). - 5. 8 selectable waveforms. - 6. 4-channel sound output. - 7. YMF262 compabile DAC (YAC512) is available. - 8. LFO for vibrato and tremolo effedts. - 9. 2 programable timers. - 10. Shorter register access time compared with YM3812. - 11. 5V single supply silicon gate CMOS process. - 12. 24 Pin SOP Package (YMF262-M), 48 Pin SQFP Package (YMF262-S). - - -differences between OPL2 and OPL3 not documented in Yamaha datahasheets: -- sinus table is a little different: the negative part is off by one... - -- in order to enable selection of four different waveforms on OPL2 - one must set bit 5 in register 0x01(test). - on OPL3 this bit is ignored and 4-waveform select works *always*. - (Don't confuse this with OPL3's 8-waveform select.) - -- Envelope Generator: all 15 x rates take zero time on OPL3 - (on OPL2 15 0 and 15 1 rates take some time while 15 2 and 15 3 rates - take zero time) - -- channel calculations: output of operator 1 is in perfect sync with - output of operator 2 on OPL3; on OPL and OPL2 output of operator 1 - is always delayed by one sample compared to output of operator 2 - - -differences between OPL2 and OPL3 shown in datasheets: -- YMF262 does not support CSM mode - - -*/ +// license:BSD-3-Clause +// copyright-holders:Aaron Giles #include "emu.h" #include "ymf262.h" -/* output final shift */ -#if (OPL3_SAMPLE_BITS==16) - #define FINAL_SH (0) - #define MAXOUT (+32767) - #define MINOUT (-32768) -#else - #define FINAL_SH (8) - #define MAXOUT (+127) - #define MINOUT (-128) -#endif - - -#define FREQ_SH 16 /* 16.16 fixed point (frequency calculations) */ -#define EG_SH 16 /* 16.16 fixed point (EG timing) */ -#define LFO_SH 24 /* 8.24 fixed point (LFO calculations) */ -#define TIMER_SH 16 /* 16.16 fixed point (timers calculations) */ - -#define FREQ_MASK ((1<>8)&0xff,sample[0]); \ - } - #else /*save to STEREO file */ - #define SAVE_ALL_CHANNELS \ - { signed int pom = a; \ - fputc((unsigned short)pom&0xff,sample[0]); \ - fputc(((unsigned short)pom>>8)&0xff,sample[0]); \ - pom = b; \ - fputc((unsigned short)pom&0xff,sample[0]); \ - fputc(((unsigned short)pom>>8)&0xff,sample[0]); \ - } - #endif -#endif - - -#define OPL3_TYPE_YMF262 (0) /* 36 operators, 8 waveforms */ - - -struct OPL3_SLOT -{ - uint32_t ar; /* attack rate: AR<<2 */ - uint32_t dr; /* decay rate: DR<<2 */ - uint32_t rr; /* release rate:RR<<2 */ - uint8_t KSR; /* key scale rate */ - uint8_t ksl; /* keyscale level */ - uint8_t ksr; /* key scale rate: kcode>>KSR */ - uint8_t mul; /* multiple: mul_tab[ML] */ - - /* Phase Generator */ - uint32_t Cnt; /* frequency counter */ - uint32_t Incr; /* frequency counter step */ - uint8_t FB; /* feedback shift value */ - uint8_t conn_enum; /* slot output route */ - int32_t *connect; /* slot output pointer */ - int32_t op1_out[2]; /* slot1 output for feedback */ - uint8_t CON; /* connection (algorithm) type */ - - /* Envelope Generator */ - uint8_t eg_type; /* percussive/non-percussive mode */ - uint8_t state; /* phase type */ - uint32_t TL; /* total level: TL << 2 */ - int32_t TLL; /* adjusted now TL */ - int32_t volume; /* envelope counter */ - uint32_t sl; /* sustain level: sl_tab[SL] */ - - uint32_t eg_m_ar; /* (attack state) */ - uint8_t eg_sh_ar; /* (attack state) */ - uint8_t eg_sel_ar; /* (attack state) */ - uint32_t eg_m_dr; /* (decay state) */ - uint8_t eg_sh_dr; /* (decay state) */ - uint8_t eg_sel_dr; /* (decay state) */ - uint32_t eg_m_rr; /* (release state) */ - uint8_t eg_sh_rr; /* (release state) */ - uint8_t eg_sel_rr; /* (release state) */ - - uint32_t key; /* 0 = KEY OFF, >0 = KEY ON */ - - /* LFO */ - uint32_t AMmask; /* LFO Amplitude Modulation enable mask */ - uint8_t vib; /* LFO Phase Modulation enable flag (active high)*/ - - /* waveform select */ - uint8_t waveform_number; - unsigned int wavetable; - - //unsigned char reserved[128-84];//speedup: pump up the struct size to power of 2 - unsigned char reserved[128-100];//speedup: pump up the struct size to power of 2 - -}; - -struct OPL3_CH -{ - OPL3_SLOT SLOT[2]; - - uint32_t block_fnum; /* block+fnum */ - uint32_t fc; /* Freq. Increment base */ - uint32_t ksl_base; /* KeyScaleLevel Base step */ - uint8_t kcode; /* key code (for key scaling) */ - - /* - there are 12 2-operator channels which can be combined in pairs - to form six 4-operator channel, they are: - 0 and 3, - 1 and 4, - 2 and 5, - 9 and 12, - 10 and 13, - 11 and 14 - */ - uint8_t extended; /* set to 1 if this channel forms up a 4op channel with another channel(only used by first of pair of channels, ie 0,1,2 and 9,10,11) */ - - unsigned char reserved[512-272];//speedup:pump up the struct size to power of 2 - -}; - -/* OPL3 state */ -struct OPL3 -{ - OPL3_CH P_CH[18]; /* OPL3 chips have 18 channels */ - - uint32_t pan[18*4]; /* channels output masks (0xffffffff = enable); 4 masks per one channel */ - uint32_t pan_ctrl_value[18]; /* output control values 1 per one channel (1 value contains 4 masks) */ - - signed int chanout[18]; - signed int phase_modulation; /* phase modulation input (SLOT 2) */ - signed int phase_modulation2; /* phase modulation input (SLOT 3 in 4 operator channels) */ - - uint32_t eg_cnt; /* global envelope generator counter */ - uint32_t eg_timer; /* global envelope generator counter works at frequency = chipclock/divider */ - uint32_t eg_timer_add; /* step of eg_timer */ - uint32_t eg_timer_overflow; /* envelope generator timer overflows every 1 sample (on real chip) */ - - uint32_t fn_tab[1024]; /* fnumber->increment counter */ - - /* LFO */ - uint32_t LFO_AM; - int32_t LFO_PM; - - uint8_t lfo_am_depth; - uint8_t lfo_pm_depth_range; - uint32_t lfo_am_cnt; - uint32_t lfo_am_inc; - uint32_t lfo_pm_cnt; - uint32_t lfo_pm_inc; - - uint32_t noise_rng; /* 23 bit noise shift register */ - uint32_t noise_p; /* current noise 'phase' */ - uint32_t noise_f; /* current noise period */ - - uint8_t OPL3_mode; /* OPL3 extension enable flag */ - - uint8_t rhythm; /* Rhythm mode */ - - int T[2]; /* timer counters */ - uint8_t st[2]; /* timer enable */ - - uint32_t address; /* address register */ - uint8_t status; /* status flag */ - uint8_t statusmask; /* status mask */ - - uint8_t nts; /* NTS (note select) */ - - /* external event callback handlers */ - OPL3_TIMERHANDLER timer_handler; - device_t *TimerParam; - OPL3_IRQHANDLER IRQHandler; - device_t *IRQParam; - OPL3_UPDATEHANDLER UpdateHandler; - device_t *UpdateParam; - - uint8_t type; /* chip type */ - int clock; /* master clock (Hz) */ - int rate; /* sampling rate (Hz) */ - int divider; /* clock divider */ - double freqbase; /* frequency base */ - attotime TimerBase; /* Timer base time (==sampling time)*/ - device_t *device; - - /* Optional handlers */ - void SetTimerHandler(OPL3_TIMERHANDLER handler, device_t *device) - { - timer_handler = handler; - TimerParam = device; - } - void SetIRQHandler(OPL3_IRQHANDLER handler, device_t *device) - { - IRQHandler = handler; - IRQParam = device; - } - void SetUpdateHandler(OPL3_UPDATEHANDLER handler, device_t *device) - { - UpdateHandler = handler; - UpdateParam = device; - } -}; +DEFINE_DEVICE_TYPE(YMF262, ymf262_device, "ymf262", "YMF262 OPL3") -} // anonymous namespace +//********************************************************* +// YMF262 DEVICE +//********************************************************* +//------------------------------------------------- +// ymf262_device - constructor +//------------------------------------------------- -/* mapping of register number (offset) to slot number used by the emulator */ -static const int slot_array[32]= -{ - 0, 2, 4, 1, 3, 5,-1,-1, - 6, 8,10, 7, 9,11,-1,-1, - 12,14,16,13,15,17,-1,-1, - -1,-1,-1,-1,-1,-1,-1,-1 -}; - -/* key scale level */ -/* table is 3dB/octave , DV converts this into 6dB/octave */ -/* 0.1875 is bit 0 weight of the envelope counter (volume) expressed in the 'decibel' scale */ -#define DV (0.1875/2.0) -static const double ksl_tab[8*16]= +ymf262_device::ymf262_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, device_type type) : + device_t(mconfig, type, tag, owner, clock), + device_sound_interface(mconfig, *this), + m_address(0), + m_stream(nullptr), + m_fm(*this) { - /* OCT 0 */ - 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV, - 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV, - 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV, - 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV, - /* OCT 1 */ - 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV, - 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV, - 0.000/DV, 0.750/DV, 1.125/DV, 1.500/DV, - 1.875/DV, 2.250/DV, 2.625/DV, 3.000/DV, - /* OCT 2 */ - 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV, - 0.000/DV, 1.125/DV, 1.875/DV, 2.625/DV, - 3.000/DV, 3.750/DV, 4.125/DV, 4.500/DV, - 4.875/DV, 5.250/DV, 5.625/DV, 6.000/DV, - /* OCT 3 */ - 0.000/DV, 0.000/DV, 0.000/DV, 1.875/DV, - 3.000/DV, 4.125/DV, 4.875/DV, 5.625/DV, - 6.000/DV, 6.750/DV, 7.125/DV, 7.500/DV, - 7.875/DV, 8.250/DV, 8.625/DV, 9.000/DV, - /* OCT 4 */ - 0.000/DV, 0.000/DV, 3.000/DV, 4.875/DV, - 6.000/DV, 7.125/DV, 7.875/DV, 8.625/DV, - 9.000/DV, 9.750/DV,10.125/DV,10.500/DV, - 10.875/DV,11.250/DV,11.625/DV,12.000/DV, - /* OCT 5 */ - 0.000/DV, 3.000/DV, 6.000/DV, 7.875/DV, - 9.000/DV,10.125/DV,10.875/DV,11.625/DV, - 12.000/DV,12.750/DV,13.125/DV,13.500/DV, - 13.875/DV,14.250/DV,14.625/DV,15.000/DV, - /* OCT 6 */ - 0.000/DV, 6.000/DV, 9.000/DV,10.875/DV, - 12.000/DV,13.125/DV,13.875/DV,14.625/DV, - 15.000/DV,15.750/DV,16.125/DV,16.500/DV, - 16.875/DV,17.250/DV,17.625/DV,18.000/DV, - /* OCT 7 */ - 0.000/DV, 9.000/DV,12.000/DV,13.875/DV, - 15.000/DV,16.125/DV,16.875/DV,17.625/DV, - 18.000/DV,18.750/DV,19.125/DV,19.500/DV, - 19.875/DV,20.250/DV,20.625/DV,21.000/DV -}; -#undef DV - -/* 0 / 3.0 / 1.5 / 6.0 dB/OCT */ -static const uint32_t ksl_shift[4] = { 31, 1, 2, 0 }; - - -/* sustain level table (3dB per step) */ -/* 0 - 15: 0, 3, 6, 9,12,15,18,21,24,27,30,33,36,39,42,93 (dB)*/ -#define SC(db) (uint32_t) ( db * (2.0/ENV_STEP) ) -static const uint32_t sl_tab[16]={ - SC( 0),SC( 1),SC( 2),SC(3 ),SC(4 ),SC(5 ),SC(6 ),SC( 7), - SC( 8),SC( 9),SC(10),SC(11),SC(12),SC(13),SC(14),SC(31) -}; -#undef SC - - -#define RATE_STEPS (8) -static const unsigned char eg_inc[15*RATE_STEPS]={ -/*cycle:0 1 2 3 4 5 6 7*/ - -/* 0 */ 0,1, 0,1, 0,1, 0,1, /* rates 00..12 0 (increment by 0 or 1) */ -/* 1 */ 0,1, 0,1, 1,1, 0,1, /* rates 00..12 1 */ -/* 2 */ 0,1, 1,1, 0,1, 1,1, /* rates 00..12 2 */ -/* 3 */ 0,1, 1,1, 1,1, 1,1, /* rates 00..12 3 */ - -/* 4 */ 1,1, 1,1, 1,1, 1,1, /* rate 13 0 (increment by 1) */ -/* 5 */ 1,1, 1,2, 1,1, 1,2, /* rate 13 1 */ -/* 6 */ 1,2, 1,2, 1,2, 1,2, /* rate 13 2 */ -/* 7 */ 1,2, 2,2, 1,2, 2,2, /* rate 13 3 */ - -/* 8 */ 2,2, 2,2, 2,2, 2,2, /* rate 14 0 (increment by 2) */ -/* 9 */ 2,2, 2,4, 2,2, 2,4, /* rate 14 1 */ -/*10 */ 2,4, 2,4, 2,4, 2,4, /* rate 14 2 */ -/*11 */ 2,4, 4,4, 2,4, 4,4, /* rate 14 3 */ - -/*12 */ 4,4, 4,4, 4,4, 4,4, /* rates 15 0, 15 1, 15 2, 15 3 for decay */ -/*13 */ 8,8, 8,8, 8,8, 8,8, /* rates 15 0, 15 1, 15 2, 15 3 for attack (zero time) */ -/*14 */ 0,0, 0,0, 0,0, 0,0, /* infinity rates for attack and decay(s) */ -}; - - -#define O(a) (a*RATE_STEPS) - -/* note that there is no O(13) in this table - it's directly in the code */ -static const unsigned char eg_rate_select[16+64+16]={ /* Envelope Generator rates (16 + 64 rates + 16 RKS) */ -/* 16 infinite time rates */ -O(14),O(14),O(14),O(14),O(14),O(14),O(14),O(14), -O(14),O(14),O(14),O(14),O(14),O(14),O(14),O(14), - -/* rates 00-12 */ -O( 0),O( 1),O( 2),O( 3), -O( 0),O( 1),O( 2),O( 3), -O( 0),O( 1),O( 2),O( 3), -O( 0),O( 1),O( 2),O( 3), -O( 0),O( 1),O( 2),O( 3), -O( 0),O( 1),O( 2),O( 3), -O( 0),O( 1),O( 2),O( 3), -O( 0),O( 1),O( 2),O( 3), -O( 0),O( 1),O( 2),O( 3), -O( 0),O( 1),O( 2),O( 3), -O( 0),O( 1),O( 2),O( 3), -O( 0),O( 1),O( 2),O( 3), -O( 0),O( 1),O( 2),O( 3), - -/* rate 13 */ -O( 4),O( 5),O( 6),O( 7), - -/* rate 14 */ -O( 8),O( 9),O(10),O(11), - -/* rate 15 */ -O(12),O(12),O(12),O(12), - -/* 16 dummy rates (same as 15 3) */ -O(12),O(12),O(12),O(12),O(12),O(12),O(12),O(12), -O(12),O(12),O(12),O(12),O(12),O(12),O(12),O(12), - -}; -#undef O - -/*rate 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 */ -/*shift 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0 */ -/*mask 4095, 2047, 1023, 511, 255, 127, 63, 31, 15, 7, 3, 1, 0, 0, 0, 0 */ - -#define O(a) (a*1) -static const unsigned char eg_rate_shift[16+64+16]={ /* Envelope Generator counter shifts (16 + 64 rates + 16 RKS) */ -/* 16 infinite time rates */ -O(0),O(0),O(0),O(0),O(0),O(0),O(0),O(0), -O(0),O(0),O(0),O(0),O(0),O(0),O(0),O(0), - -/* rates 00-12 */ -O(12),O(12),O(12),O(12), -O(11),O(11),O(11),O(11), -O(10),O(10),O(10),O(10), -O( 9),O( 9),O( 9),O( 9), -O( 8),O( 8),O( 8),O( 8), -O( 7),O( 7),O( 7),O( 7), -O( 6),O( 6),O( 6),O( 6), -O( 5),O( 5),O( 5),O( 5), -O( 4),O( 4),O( 4),O( 4), -O( 3),O( 3),O( 3),O( 3), -O( 2),O( 2),O( 2),O( 2), -O( 1),O( 1),O( 1),O( 1), -O( 0),O( 0),O( 0),O( 0), - -/* rate 13 */ -O( 0),O( 0),O( 0),O( 0), - -/* rate 14 */ -O( 0),O( 0),O( 0),O( 0), - -/* rate 15 */ -O( 0),O( 0),O( 0),O( 0), - -/* 16 dummy rates (same as 15 3) */ -O( 0),O( 0),O( 0),O( 0),O( 0),O( 0),O( 0),O( 0), -O( 0),O( 0),O( 0),O( 0),O( 0),O( 0),O( 0),O( 0), - -}; -#undef O - - -/* multiple table */ -#define ML 2 -static const uint8_t mul_tab[16]= { -/* 1/2, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,10,12,12,15,15 */ - ML/2, 1*ML, 2*ML, 3*ML, 4*ML, 5*ML, 6*ML, 7*ML, - 8*ML, 9*ML,10*ML,10*ML,12*ML,12*ML,15*ML,15*ML -}; -#undef ML - -/* TL_TAB_LEN is calculated as: - -* (12+1)=13 - sinus amplitude bits (Y axis) -* additional 1: to compensate for calculations of negative part of waveform -* (if we don't add it then the greatest possible _negative_ value would be -2 -* and we really need -1 for waveform #7) -* 2 - sinus sign bit (Y axis) -* TL_RES_LEN - sinus resolution (X axis) -*/ -#define TL_TAB_LEN (13*2*TL_RES_LEN) -static signed int tl_tab[TL_TAB_LEN]; - -#define ENV_QUIET (TL_TAB_LEN>>4) - -/* sin waveform table in 'decibel' scale */ -/* there are eight waveforms on OPL3 chips */ -static unsigned int sin_tab[SIN_LEN * 8]; - - -/* LFO Amplitude Modulation table (verified on real YM3812) - 27 output levels (triangle waveform); 1 level takes one of: 192, 256 or 448 samples - - Length: 210 elements. - - Each of the elements has to be repeated - exactly 64 times (on 64 consecutive samples). - The whole table takes: 64 * 210 = 13440 samples. - - When AM = 1 data is used directly - When AM = 0 data is divided by 4 before being used (losing precision is important) -*/ - -#define LFO_AM_TAB_ELEMENTS 210 - -static const uint8_t lfo_am_table[LFO_AM_TAB_ELEMENTS] = { -0,0,0,0,0,0,0, -1,1,1,1, -2,2,2,2, -3,3,3,3, -4,4,4,4, -5,5,5,5, -6,6,6,6, -7,7,7,7, -8,8,8,8, -9,9,9,9, -10,10,10,10, -11,11,11,11, -12,12,12,12, -13,13,13,13, -14,14,14,14, -15,15,15,15, -16,16,16,16, -17,17,17,17, -18,18,18,18, -19,19,19,19, -20,20,20,20, -21,21,21,21, -22,22,22,22, -23,23,23,23, -24,24,24,24, -25,25,25,25, -26,26,26, -25,25,25,25, -24,24,24,24, -23,23,23,23, -22,22,22,22, -21,21,21,21, -20,20,20,20, -19,19,19,19, -18,18,18,18, -17,17,17,17, -16,16,16,16, -15,15,15,15, -14,14,14,14, -13,13,13,13, -12,12,12,12, -11,11,11,11, -10,10,10,10, -9,9,9,9, -8,8,8,8, -7,7,7,7, -6,6,6,6, -5,5,5,5, -4,4,4,4, -3,3,3,3, -2,2,2,2, -1,1,1,1 -}; - -/* LFO Phase Modulation table (verified on real YM3812) */ -static const int8_t lfo_pm_table[8*8*2] = { -/* FNUM2/FNUM = 00 0xxxxxxx (0x0000) */ -0, 0, 0, 0, 0, 0, 0, 0, /*LFO PM depth = 0*/ -0, 0, 0, 0, 0, 0, 0, 0, /*LFO PM depth = 1*/ - -/* FNUM2/FNUM = 00 1xxxxxxx (0x0080) */ -0, 0, 0, 0, 0, 0, 0, 0, /*LFO PM depth = 0*/ -1, 0, 0, 0,-1, 0, 0, 0, /*LFO PM depth = 1*/ - -/* FNUM2/FNUM = 01 0xxxxxxx (0x0100) */ -1, 0, 0, 0,-1, 0, 0, 0, /*LFO PM depth = 0*/ -2, 1, 0,-1,-2,-1, 0, 1, /*LFO PM depth = 1*/ - -/* FNUM2/FNUM = 01 1xxxxxxx (0x0180) */ -1, 0, 0, 0,-1, 0, 0, 0, /*LFO PM depth = 0*/ -3, 1, 0,-1,-3,-1, 0, 1, /*LFO PM depth = 1*/ - -/* FNUM2/FNUM = 10 0xxxxxxx (0x0200) */ -2, 1, 0,-1,-2,-1, 0, 1, /*LFO PM depth = 0*/ -4, 2, 0,-2,-4,-2, 0, 2, /*LFO PM depth = 1*/ - -/* FNUM2/FNUM = 10 1xxxxxxx (0x0280) */ -2, 1, 0,-1,-2,-1, 0, 1, /*LFO PM depth = 0*/ -5, 2, 0,-2,-5,-2, 0, 2, /*LFO PM depth = 1*/ - -/* FNUM2/FNUM = 11 0xxxxxxx (0x0300) */ -3, 1, 0,-1,-3,-1, 0, 1, /*LFO PM depth = 0*/ -6, 3, 0,-3,-6,-3, 0, 3, /*LFO PM depth = 1*/ - -/* FNUM2/FNUM = 11 1xxxxxxx (0x0380) */ -3, 1, 0,-1,-3,-1, 0, 1, /*LFO PM depth = 0*/ -7, 3, 0,-3,-7,-3, 0, 3 /*LFO PM depth = 1*/ -}; - - -/* lock level of common table */ -static int num_lock = 0; - -/* work table */ -#define SLOT7_1 (&chip->P_CH[7].SLOT[SLOT1]) -#define SLOT7_2 (&chip->P_CH[7].SLOT[SLOT2]) -#define SLOT8_1 (&chip->P_CH[8].SLOT[SLOT1]) -#define SLOT8_2 (&chip->P_CH[8].SLOT[SLOT2]) - - -static inline void OPL3_SLOT_CONNECT(OPL3 *chip, OPL3_SLOT *slot) { - if (slot->conn_enum == CONN_NULL) { - slot->connect = nullptr; - } else if (slot->conn_enum >= CONN_CHAN0 && slot->conn_enum < CONN_PHASEMOD) { - slot->connect = &chip->chanout[slot->conn_enum - CONN_CHAN0]; - } else if (slot->conn_enum == CONN_PHASEMOD) { - slot->connect = &chip->phase_modulation; - } else if (slot->conn_enum == CONN_PHASEMOD2) { - slot->connect = &chip->phase_modulation2; - } } -#if 0 -static inline int limit( int val, int max, int min ) { - if ( val > max ) - val = max; - else if ( val < min ) - val = min; - - return val; -} -#endif -/* status set and IRQ handling */ -static inline void OPL3_STATUS_SET(OPL3 *chip,int flag) -{ - /* set status flag masking out disabled IRQs */ - chip->status |= (flag & chip->statusmask); - if(!(chip->status & 0x80)) - { - if(chip->status & 0x7f) - { /* IRQ on */ - chip->status |= 0x80; - /* callback user interrupt handler (IRQ is OFF to ON) */ - if(chip->IRQHandler) (chip->IRQHandler)(chip->IRQParam,1); - } - } -} +//------------------------------------------------- +// read - handle a read from the device +//------------------------------------------------- -/* status reset and IRQ handling */ -static inline void OPL3_STATUS_RESET(OPL3 *chip,int flag) +u8 ymf262_device::read(offs_t offset) { - /* reset status flag */ - chip->status &= ~flag; - if(chip->status & 0x80) + u8 result = 0x00; + switch (offset & 3) { - if (!(chip->status & 0x7f)) - { - chip->status &= 0x7f; - /* callback user interrupt handler (IRQ is ON to OFF) */ - if(chip->IRQHandler) (chip->IRQHandler)(chip->IRQParam,0); - } - } -} - -/* IRQ mask set */ -static inline void OPL3_STATUSMASK_SET(OPL3 *chip,int flag) -{ - chip->statusmask = flag; - /* IRQ handling check */ - OPL3_STATUS_SET(chip,0); - OPL3_STATUS_RESET(chip,0); -} - - -/* advance LFO to next sample */ -static inline void advance_lfo(OPL3 *chip) -{ - uint8_t tmp; - - /* LFO */ - chip->lfo_am_cnt += chip->lfo_am_inc; - if (chip->lfo_am_cnt >= ((uint32_t)LFO_AM_TAB_ELEMENTS<lfo_am_cnt -= ((uint32_t)LFO_AM_TAB_ELEMENTS<lfo_am_cnt >> LFO_SH ]; - - if (chip->lfo_am_depth) - chip->LFO_AM = tmp; - else - chip->LFO_AM = tmp>>2; - - chip->lfo_pm_cnt += chip->lfo_pm_inc; - chip->LFO_PM = ((chip->lfo_pm_cnt>>LFO_SH) & 7) | chip->lfo_pm_depth_range; -} - -/* advance to next sample */ -static inline void advance(OPL3 *chip) -{ - OPL3_CH *CH; - OPL3_SLOT *op; - int i; - - chip->eg_timer += chip->eg_timer_add; - - while (chip->eg_timer >= chip->eg_timer_overflow) - { - chip->eg_timer -= chip->eg_timer_overflow; - - chip->eg_cnt++; - - for (i=0; i<9*2*2; i++) - { - CH = &chip->P_CH[i/2]; - op = &CH->SLOT[i&1]; -#if 1 - /* Envelope Generator */ - switch(op->state) - { - case EG_ATT: /* attack phase */ -// if ( !(chip->eg_cnt & ((1<eg_sh_ar)-1) ) ) - if ( !(chip->eg_cnt & op->eg_m_ar) ) - { - op->volume += (~op->volume * - (eg_inc[op->eg_sel_ar + ((chip->eg_cnt>>op->eg_sh_ar)&7)]) - ) >>3; - - if (op->volume <= MIN_ATT_INDEX) - { - op->volume = MIN_ATT_INDEX; - op->state = EG_DEC; - } - - } - break; - - case EG_DEC: /* decay phase */ -// if ( !(chip->eg_cnt & ((1<eg_sh_dr)-1) ) ) - if ( !(chip->eg_cnt & op->eg_m_dr) ) - { - op->volume += eg_inc[op->eg_sel_dr + ((chip->eg_cnt>>op->eg_sh_dr)&7)]; - - if ( op->volume >= op->sl ) - op->state = EG_SUS; - - } + case 0: // status port (A0=0, A1=0) + result = m_fm.status(); break; - case EG_SUS: /* sustain phase */ - - /* this is important behaviour: - one can change percusive/non-percussive modes on the fly and - the chip will remain in sustain phase - verified on real YM3812 */ - - if(op->eg_type) /* non-percussive mode */ - { - /* do nothing */ - } - else /* percussive mode */ - { - /* during sustain phase chip adds Release Rate (in percussive mode) */ -// if ( !(chip->eg_cnt & ((1<eg_sh_rr)-1) ) ) - if ( !(chip->eg_cnt & op->eg_m_rr) ) - { - op->volume += eg_inc[op->eg_sel_rr + ((chip->eg_cnt>>op->eg_sh_rr)&7)]; - - if ( op->volume >= MAX_ATT_INDEX ) - op->volume = MAX_ATT_INDEX; - } - /* else do nothing in sustain phase */ - } + default: // datasheet says anything else is not guaranteed + logerror("Unexpected read from YMF262 offset %d\n", offset & 3); break; - - case EG_REL: /* release phase */ -// if ( !(chip->eg_cnt & ((1<eg_sh_rr)-1) ) ) - if ( !(chip->eg_cnt & op->eg_m_rr) ) - { - op->volume += eg_inc[op->eg_sel_rr + ((chip->eg_cnt>>op->eg_sh_rr)&7)]; - - if ( op->volume >= MAX_ATT_INDEX ) - { - op->volume = MAX_ATT_INDEX; - op->state = EG_OFF; - } - - } - break; - - default: - break; - } -#endif - } - } - - for (i=0; i<9*2*2; i++) - { - CH = &chip->P_CH[i/2]; - op = &CH->SLOT[i&1]; - - /* Phase Generator */ - if(op->vib) - { - uint8_t block; - unsigned int block_fnum = CH->block_fnum; - - unsigned int fnum_lfo = (block_fnum&0x0380) >> 7; - - signed int lfo_fn_table_index_offset = lfo_pm_table[chip->LFO_PM + 16*fnum_lfo ]; - - if (lfo_fn_table_index_offset) /* LFO phase modulation active */ - { - block_fnum += lfo_fn_table_index_offset; - block = (block_fnum&0x1c00) >> 10; - op->Cnt += (chip->fn_tab[block_fnum&0x03ff] >> (7-block)) * op->mul; - } - else /* LFO phase modulation = zero */ - { - op->Cnt += op->Incr; - } - } - else /* LFO phase modulation disabled for this operator */ - { - op->Cnt += op->Incr; - } - } - - /* The Noise Generator of the YM3812 is 23-bit shift register. - * Period is equal to 2^23-2 samples. - * Register works at sampling frequency of the chip, so output - * can change on every sample. - * - * Output of the register and input to the bit 22 is: - * bit0 XOR bit14 XOR bit15 XOR bit22 - * - * Simply use bit 22 as the noise output. - */ - - chip->noise_p += chip->noise_f; - i = chip->noise_p >> FREQ_SH; /* number of events (shifts of the shift register) */ - chip->noise_p &= FREQ_MASK; - while (i) - { - /* - uint32_t j; - j = ( (chip->noise_rng) ^ (chip->noise_rng>>14) ^ (chip->noise_rng>>15) ^ (chip->noise_rng>>22) ) & 1; - chip->noise_rng = (j<<22) | (chip->noise_rng>>1); - */ - - /* - Instead of doing all the logic operations above, we - use a trick here (and use bit 0 as the noise output). - The difference is only that the noise bit changes one - step ahead. This doesn't matter since we don't know - what is real state of the noise_rng after the reset. - */ - - if (chip->noise_rng & 1) chip->noise_rng ^= 0x800302; - chip->noise_rng >>= 1; - - i--; - } -} - - -static inline signed int op_calc(uint32_t phase, unsigned int env, signed int pm, unsigned int wave_tab) -{ - uint32_t p; - - p = (env<<4) + sin_tab[wave_tab + ((((signed int)((phase & ~FREQ_MASK) + (pm<<16))) >> FREQ_SH ) & SIN_MASK) ]; - - if (p >= TL_TAB_LEN) - return 0; - return tl_tab[p]; -} - -static inline signed int op_calc1(uint32_t phase, unsigned int env, signed int pm, unsigned int wave_tab) -{ - uint32_t p; - - p = (env<<4) + sin_tab[wave_tab + ((((signed int)((phase & ~FREQ_MASK) + pm))>>FREQ_SH) & SIN_MASK)]; - - if (p >= TL_TAB_LEN) - return 0; - return tl_tab[p]; -} - - -#define volume_calc(OP) ((OP)->TLL + ((uint32_t)(OP)->volume) + (chip->LFO_AM & (OP)->AMmask)) - -/* calculate output of a standard 2 operator channel - (or 1st part of a 4-op channel) */ -static inline void chan_calc( OPL3 *chip, OPL3_CH *CH ) -{ - OPL3_SLOT *SLOT; - unsigned int env; - signed int out; - - chip->phase_modulation = 0; - chip->phase_modulation2= 0; - - /* SLOT 1 */ - SLOT = &CH->SLOT[SLOT1]; - env = volume_calc(SLOT); - out = SLOT->op1_out[0] + SLOT->op1_out[1]; - SLOT->op1_out[0] = SLOT->op1_out[1]; - SLOT->op1_out[1] = 0; - if (env < ENV_QUIET) - { - if (!SLOT->FB) - out = 0; - SLOT->op1_out[1] = op_calc1(SLOT->Cnt, env, (out<FB), SLOT->wavetable ); - } - if (SLOT->connect) { - *SLOT->connect += SLOT->op1_out[1]; } -//logerror("out0=%5i vol0=%4i ", SLOT->op1_out[1], env ); - - /* SLOT 2 */ - SLOT++; - env = volume_calc(SLOT); - if ((env < ENV_QUIET) && SLOT->connect) - *SLOT->connect += op_calc(SLOT->Cnt, env, chip->phase_modulation, SLOT->wavetable); - -//logerror("out1=%5i vol1=%4i\n", op_calc(SLOT->Cnt, env, chip->phase_modulation, SLOT->wavetable), env ); - -} - -/* calculate output of a 2nd part of 4-op channel */ -static inline void chan_calc_ext( OPL3 *chip, OPL3_CH *CH ) -{ - OPL3_SLOT *SLOT; - unsigned int env; - - chip->phase_modulation = 0; - - /* SLOT 1 */ - SLOT = &CH->SLOT[SLOT1]; - env = volume_calc(SLOT); - if (env < ENV_QUIET && SLOT->connect) - *SLOT->connect += op_calc(SLOT->Cnt, env, chip->phase_modulation2, SLOT->wavetable ); - - /* SLOT 2 */ - SLOT++; - env = volume_calc(SLOT); - if (env < ENV_QUIET && SLOT->connect) - *SLOT->connect += op_calc(SLOT->Cnt, env, chip->phase_modulation, SLOT->wavetable); - + return result; } -/* - operators used in the rhythm sounds generation process: - - Envelope Generator: - -channel operator register number Bass High Snare Tom Top -/ slot number TL ARDR SLRR Wave Drum Hat Drum Tom Cymbal - 6 / 0 12 50 70 90 f0 + - 6 / 1 15 53 73 93 f3 + - 7 / 0 13 51 71 91 f1 + - 7 / 1 16 54 74 94 f4 + - 8 / 0 14 52 72 92 f2 + - 8 / 1 17 55 75 95 f5 + - - Phase Generator: - -channel operator register number Bass High Snare Tom Top -/ slot number MULTIPLE Drum Hat Drum Tom Cymbal - 6 / 0 12 30 + - 6 / 1 15 33 + - 7 / 0 13 31 + + + - 7 / 1 16 34 ----- n o t u s e d ----- - 8 / 0 14 32 + - 8 / 1 17 35 + + - -channel operator register number Bass High Snare Tom Top -number number BLK/FNUM2 FNUM Drum Hat Drum Tom Cymbal - 6 12,15 B6 A6 + - - 7 13,16 B7 A7 + + + - - 8 14,17 B8 A8 + + + - -*/ -/* calculate rhythm */ +//------------------------------------------------- +// write - handle a write to the register +// interface +//------------------------------------------------- -static inline void chan_calc_rhythm( OPL3 *chip, OPL3_CH *CH, unsigned int noise ) +void ymf262_device::write(offs_t offset, u8 value) { - OPL3_SLOT *SLOT; - signed int *chanout = chip->chanout; - signed int out; - unsigned int env; - - - /* Bass Drum (verified on real YM3812): - - depends on the channel 6 'connect' register: - when connect = 0 it works the same as in normal (non-rhythm) mode (op1->op2->out) - when connect = 1 _only_ operator 2 is present on output (op2->out), operator 1 is ignored - - output sample always is multiplied by 2 - */ - - chip->phase_modulation = 0; - - /* SLOT 1 */ - SLOT = &CH[6].SLOT[SLOT1]; - env = volume_calc(SLOT); - - out = SLOT->op1_out[0] + SLOT->op1_out[1]; - SLOT->op1_out[0] = SLOT->op1_out[1]; - - if (!SLOT->CON) - chip->phase_modulation = SLOT->op1_out[0]; - //else ignore output of operator 1 - - SLOT->op1_out[1] = 0; - if( env < ENV_QUIET ) - { - if (!SLOT->FB) - out = 0; - SLOT->op1_out[1] = op_calc1(SLOT->Cnt, env, (out<FB), SLOT->wavetable ); - } - - /* SLOT 2 */ - SLOT++; - env = volume_calc(SLOT); - if( env < ENV_QUIET ) - chanout[6] += op_calc(SLOT->Cnt, env, chip->phase_modulation, SLOT->wavetable) * 2; - - - /* Phase generation is based on: */ - // HH (13) channel 7->slot 1 combined with channel 8->slot 2 (same combination as TOP CYMBAL but different output phases) - // SD (16) channel 7->slot 1 - // TOM (14) channel 8->slot 1 - // TOP (17) channel 7->slot 1 combined with channel 8->slot 2 (same combination as HIGH HAT but different output phases) - - /* Envelope generation based on: */ - // HH channel 7->slot1 - // SD channel 7->slot2 - // TOM channel 8->slot1 - // TOP channel 8->slot2 - - - /* The following formulas can be well optimized. - I leave them in direct form for now (in case I've missed something). - */ - - /* High Hat (verified on real YM3812) */ - env = volume_calc(SLOT7_1); - if( env < ENV_QUIET ) - { - /* high hat phase generation: - phase = d0 or 234 (based on frequency only) - phase = 34 or 2d0 (based on noise) - */ - - /* base frequency derived from operator 1 in channel 7 */ - unsigned char bit7 = ((SLOT7_1->Cnt>>FREQ_SH)>>7)&1; - unsigned char bit3 = ((SLOT7_1->Cnt>>FREQ_SH)>>3)&1; - unsigned char bit2 = ((SLOT7_1->Cnt>>FREQ_SH)>>2)&1; - - unsigned char res1 = (bit2 ^ bit7) | bit3; - - /* when res1 = 0 phase = 0x000 | 0xd0; */ - /* when res1 = 1 phase = 0x200 | (0xd0>>2); */ - uint32_t phase = res1 ? (0x200|(0xd0>>2)) : 0xd0; - - /* enable gate based on frequency of operator 2 in channel 8 */ - unsigned char bit5e= ((SLOT8_2->Cnt>>FREQ_SH)>>5)&1; - unsigned char bit3e= ((SLOT8_2->Cnt>>FREQ_SH)>>3)&1; - - unsigned char res2 = (bit3e ^ bit5e); - - /* when res2 = 0 pass the phase from calculation above (res1); */ - /* when res2 = 1 phase = 0x200 | (0xd0>>2); */ - if (res2) - phase = (0x200|(0xd0>>2)); - - - /* when phase & 0x200 is set and noise=1 then phase = 0x200|0xd0 */ - /* when phase & 0x200 is set and noise=0 then phase = 0x200|(0xd0>>2), ie no change */ - if (phase&0x200) - { - if (noise) - phase = 0x200|0xd0; - } - else - /* when phase & 0x200 is clear and noise=1 then phase = 0xd0>>2 */ - /* when phase & 0x200 is clear and noise=0 then phase = 0xd0, ie no change */ - { - if (noise) - phase = 0xd0>>2; - } - - chanout[7] += op_calc(phase<wavetable) * 2; - } - - /* Snare Drum (verified on real YM3812) */ - env = volume_calc(SLOT7_2); - if( env < ENV_QUIET ) - { - /* base frequency derived from operator 1 in channel 7 */ - unsigned char bit8 = ((SLOT7_1->Cnt>>FREQ_SH)>>8)&1; - - /* when bit8 = 0 phase = 0x100; */ - /* when bit8 = 1 phase = 0x200; */ - uint32_t phase = bit8 ? 0x200 : 0x100; - - /* Noise bit XOR'es phase by 0x100 */ - /* when noisebit = 0 pass the phase from calculation above */ - /* when noisebit = 1 phase ^= 0x100; */ - /* in other words: phase ^= (noisebit<<8); */ - if (noise) - phase ^= 0x100; - - chanout[7] += op_calc(phase<wavetable) * 2; - } - - /* Tom Tom (verified on real YM3812) */ - env = volume_calc(SLOT8_1); - if( env < ENV_QUIET ) - chanout[8] += op_calc(SLOT8_1->Cnt, env, 0, SLOT8_1->wavetable) * 2; - - /* Top Cymbal (verified on real YM3812) */ - env = volume_calc(SLOT8_2); - if( env < ENV_QUIET ) + switch (offset & 1) { - /* base frequency derived from operator 1 in channel 7 */ - unsigned char bit7 = ((SLOT7_1->Cnt>>FREQ_SH)>>7)&1; - unsigned char bit3 = ((SLOT7_1->Cnt>>FREQ_SH)>>3)&1; - unsigned char bit2 = ((SLOT7_1->Cnt>>FREQ_SH)>>2)&1; - - unsigned char res1 = (bit2 ^ bit7) | bit3; - - /* when res1 = 0 phase = 0x000 | 0x100; */ - /* when res1 = 1 phase = 0x200 | 0x100; */ - uint32_t phase = res1 ? 0x300 : 0x100; - - /* enable gate based on frequency of operator 2 in channel 8 */ - unsigned char bit5e= ((SLOT8_2->Cnt>>FREQ_SH)>>5)&1; - unsigned char bit3e= ((SLOT8_2->Cnt>>FREQ_SH)>>3)&1; - - unsigned char res2 = (bit3e ^ bit5e); - /* when res2 = 0 pass the phase from calculation above (res1); */ - /* when res2 = 1 phase = 0x200 | 0x100; */ - if (res2) - phase = 0x300; - - chanout[8] += op_calc(phase<wavetable) * 2; - } - -} - - -/* generic table initialize */ -static int init_tables(void) -{ - signed int i,x; - signed int n; - double o,m; - - - for (x=0; x>= 4; /* 12 bits here */ - if (n&1) /* round to nearest */ - n = (n>>1)+1; - else - n = n>>1; - /* 11 bits here (rounded) */ - n <<= 1; /* 12 bits here (as in real chip) */ - tl_tab[ x*2 + 0 ] = n; - tl_tab[ x*2 + 1 ] = ~tl_tab[ x*2 + 0 ]; /* this *is* different from OPL2 (verified on real YMF262) */ - - for (i=1; i<13; i++) - { - tl_tab[ x*2+0 + i*2*TL_RES_LEN ] = tl_tab[ x*2+0 ]>>i; - tl_tab[ x*2+1 + i*2*TL_RES_LEN ] = ~tl_tab[ x*2+0 + i*2*TL_RES_LEN ]; /* this *is* different from OPL2 (verified on real YMF262) */ - } - #if 0 - logerror("tl %04i", x*2); - for (i=0; i<13; i++) - logerror(", [%02i] %5i", i*2, tl_tab[ x*2 +0 + i*2*TL_RES_LEN ] ); /* positive */ - logerror("\n"); - - logerror("tl %04i", x*2); - for (i=0; i<13; i++) - logerror(", [%02i] %5i", i*2, tl_tab[ x*2 +1 + i*2*TL_RES_LEN ] ); /* negative */ - logerror("\n"); - #endif - } - - for (i=0; i0.0) - o = 8*log(1.0/m)/log(2.0); /* convert to 'decibels' */ - else - o = 8*log(-1.0/m)/log(2.0); /* convert to 'decibels' */ - - o = o / (ENV_STEP/4); - - n = (int)(2.0*o); - if (n&1) /* round to nearest */ - n = (n>>1)+1; - else - n = n>>1; - - sin_tab[ i ] = n*2 + (m>=0.0? 0: 1 ); - - /*logerror("YMF262.C: sin [%4i (hex=%03x)]= %4i (tl_tab value=%5i)\n", i, i, sin_tab[i], tl_tab[sin_tab[i]] );*/ - } - - for (i=0; i>1) ]; - - /* waveform 3: _ _ _ _ */ - /* / |_/ |_/ |_/ |_*/ - /* abs(output only first quarter of the sinus waveform) */ - - if (i & (1<<(SIN_BITS-2)) ) - sin_tab[3*SIN_LEN+i] = TL_TAB_LEN; - else - sin_tab[3*SIN_LEN+i] = sin_tab[i & (SIN_MASK>>2)]; - - /* waveform 4: */ - /* /\ ____/\ ____*/ - /* \/ \/ */ - /* output whole sinus waveform in half the cycle(step=2) and output 0 on the other half of cycle */ - - if (i & (1<<(SIN_BITS-1)) ) - sin_tab[4*SIN_LEN+i] = TL_TAB_LEN; - else - sin_tab[4*SIN_LEN+i] = sin_tab[i*2]; - - /* waveform 5: */ - /* /\/\____/\/\____*/ - /* */ - /* output abs(whole sinus) waveform in half the cycle(step=2) and output 0 on the other half of cycle */ - - if (i & (1<<(SIN_BITS-1)) ) - sin_tab[5*SIN_LEN+i] = TL_TAB_LEN; - else - sin_tab[5*SIN_LEN+i] = sin_tab[(i*2) & (SIN_MASK>>1) ]; - - /* waveform 6: ____ ____ */ - /* */ - /* ____ ____*/ - /* output maximum in half the cycle and output minimum on the other half of cycle */ - - if (i & (1<<(SIN_BITS-1)) ) - sin_tab[6*SIN_LEN+i] = 1; /* negative */ - else - sin_tab[6*SIN_LEN+i] = 0; /* positive */ - - /* waveform 7: */ - /* |\____ |\____ */ - /* \| \|*/ - /* output sawtooth waveform */ - - if (i & (1<<(SIN_BITS-1)) ) - x = ((SIN_LEN-1)-i)*16 + 1; /* negative: from 8177 to 1 */ - else - x = i*16; /*positive: from 0 to 8176 */ - - if (x > TL_TAB_LEN) - x = TL_TAB_LEN; /* clip to the allowed range */ - - sin_tab[7*SIN_LEN+i] = x; - - //logerror("YMF262.C: sin1[%4i]= %4i (tl_tab value=%5i)\n", i, sin_tab[1*SIN_LEN+i], tl_tab[sin_tab[1*SIN_LEN+i]] ); - //logerror("YMF262.C: sin2[%4i]= %4i (tl_tab value=%5i)\n", i, sin_tab[2*SIN_LEN+i], tl_tab[sin_tab[2*SIN_LEN+i]] ); - //logerror("YMF262.C: sin3[%4i]= %4i (tl_tab value=%5i)\n", i, sin_tab[3*SIN_LEN+i], tl_tab[sin_tab[3*SIN_LEN+i]] ); - //logerror("YMF262.C: sin4[%4i]= %4i (tl_tab value=%5i)\n", i, sin_tab[4*SIN_LEN+i], tl_tab[sin_tab[4*SIN_LEN+i]] ); - //logerror("YMF262.C: sin5[%4i]= %4i (tl_tab value=%5i)\n", i, sin_tab[5*SIN_LEN+i], tl_tab[sin_tab[5*SIN_LEN+i]] ); - //logerror("YMF262.C: sin6[%4i]= %4i (tl_tab value=%5i)\n", i, sin_tab[6*SIN_LEN+i], tl_tab[sin_tab[6*SIN_LEN+i]] ); - //logerror("YMF262.C: sin7[%4i]= %4i (tl_tab value=%5i)\n", i, sin_tab[7*SIN_LEN+i], tl_tab[sin_tab[7*SIN_LEN+i]] ); - } - /*logerror("YMF262.C: ENV_QUIET= %08x (dec*8=%i)\n", ENV_QUIET, ENV_QUIET*8 );*/ - -#ifdef SAVE_SAMPLE - sample[0]=fopen("sampsum.pcm","wb"); -#endif - - return 1; -} - -static void OPLCloseTable( void ) -{ -#ifdef SAVE_SAMPLE - fclose(sample[0]); -#endif -} - - - -static void OPL3_initalize(OPL3 *chip) -{ - int i; - - /* frequency base */ - chip->freqbase = (chip->rate) ? ((double)chip->clock / chip->divider) / chip->rate : 0; -#if 0 - chip->rate = (double)chip->clock / chip->divider; - chip->freqbase = 1.0; -#endif - - /* logerror("YMF262: freqbase=%f\n", chip->freqbase); */ - - /* Timer base time */ - chip->TimerBase = chip->clock ? attotime::from_hz(chip->clock) * chip->divider : attotime::zero; - - /* make fnumber -> increment counter table */ - for( i=0 ; i < 1024 ; i++ ) - { - /* opn phase increment counter = 20bit */ - chip->fn_tab[i] = (uint32_t)( (double)i * 64 * chip->freqbase * (1<<(FREQ_SH-10)) ); /* -10 because chip works with 10.10 fixed point, while we use 16.16 */ -#if 0 - logerror("YMF262.C: fn_tab[%4i] = %08x (dec=%8i)\n", - i, chip->fn_tab[i]>>6, chip->fn_tab[i]>>6 ); -#endif - } - -#if 0 - for( i=0 ; i < 16 ; i++ ) - { - logerror("YMF262.C: sl_tab[%i] = %08x\n", - i, sl_tab[i] ); - } - for( i=0 ; i < 8 ; i++ ) - { - int j; - logerror("YMF262.C: ksl_tab[oct=%2i] =",i); - for (j=0; j<16; j++) - { - logerror("%08x ", static_cast(ksl_tab[i*16+j]) ); - } - logerror("\n"); - } -#endif - - - /* Amplitude modulation: 27 output levels (triangle waveform); 1 level takes one of: 192, 256 or 448 samples */ - /* One entry from LFO_AM_TABLE lasts for 64 samples */ - chip->lfo_am_inc = (1.0 / 64.0 ) * (1<freqbase; - - /* Vibrato: 8 output levels (triangle waveform); 1 level takes 1024 samples */ - chip->lfo_pm_inc = (1.0 / 1024.0) * (1<freqbase; - - /*logerror ("chip->lfo_am_inc = %8x ; chip->lfo_pm_inc = %8x\n", chip->lfo_am_inc, chip->lfo_pm_inc);*/ - - /* Noise generator: a step takes 1 sample */ - chip->noise_f = (1.0 / 1.0) * (1<freqbase; - - chip->eg_timer_add = (1<freqbase; - chip->eg_timer_overflow = ( 1 ) * (1<eg_timer_add, chip->eg_timer_overflow);*/ + case 0: // address ports - A1 references upper bank + m_address = value | (BIT(offset, 1) << 8); -} - -static void OPL3_clock_changed(OPL3 *chip, int clock, int rate) -{ - chip->clock = clock; - chip->rate = rate; - - /* init global tables */ - OPL3_initalize(chip); -} - -static inline void FM_KEYON(OPL3_SLOT *SLOT, uint32_t key_set) -{ - if( !SLOT->key ) - { - /* restart Phase Generator */ - SLOT->Cnt = 0; - /* phase -> Attack */ - SLOT->state = EG_ATT; - } - SLOT->key |= key_set; -} - -static inline void FM_KEYOFF(OPL3_SLOT *SLOT, uint32_t key_clr) -{ - if( SLOT->key ) - { - SLOT->key &= key_clr; - - if( !SLOT->key ) - { - /* phase -> Release */ - if (SLOT->state>EG_REL) - SLOT->state = EG_REL; - } - } -} - -/* update phase increment counter of operator (also update the EG rates if necessary) */ -static inline void CALC_FCSLOT(OPL3_CH *CH,OPL3_SLOT *SLOT) -{ - int ksr; - - /* (frequency) phase increment counter */ - SLOT->Incr = CH->fc * SLOT->mul; - ksr = CH->kcode >> SLOT->KSR; - - if( SLOT->ksr != ksr ) - { - SLOT->ksr = ksr; - - /* calculate envelope generator rates */ - if ((SLOT->ar + SLOT->ksr) < 16+60) - { - SLOT->eg_sh_ar = eg_rate_shift [SLOT->ar + SLOT->ksr ]; - SLOT->eg_m_ar = (1<eg_sh_ar)-1; - SLOT->eg_sel_ar = eg_rate_select[SLOT->ar + SLOT->ksr ]; - } - else - { - SLOT->eg_sh_ar = 0; - SLOT->eg_m_ar = (1<eg_sh_ar)-1; - SLOT->eg_sel_ar = 13*RATE_STEPS; - } - SLOT->eg_sh_dr = eg_rate_shift [SLOT->dr + SLOT->ksr ]; - SLOT->eg_m_dr = (1<eg_sh_dr)-1; - SLOT->eg_sel_dr = eg_rate_select[SLOT->dr + SLOT->ksr ]; - SLOT->eg_sh_rr = eg_rate_shift [SLOT->rr + SLOT->ksr ]; - SLOT->eg_m_rr = (1<eg_sh_rr)-1; - SLOT->eg_sel_rr = eg_rate_select[SLOT->rr + SLOT->ksr ]; - } -} - -/* set multi,am,vib,EG-TYP,KSR,mul */ -static inline void set_mul(OPL3 *chip,int slot,int v) -{ - OPL3_CH *CH = &chip->P_CH[slot/2]; - OPL3_SLOT *SLOT = &CH->SLOT[slot&1]; - - SLOT->mul = mul_tab[v&0x0f]; - SLOT->KSR = (v&0x10) ? 0 : 2; - SLOT->eg_type = (v&0x20); - SLOT->vib = (v&0x40); - SLOT->AMmask = (v&0x80) ? ~0 : 0; - - if (chip->OPL3_mode & 1) - { - int chan_no = slot/2; - - /* in OPL3 mode */ - //DO THIS: - //if this is one of the slots of 1st channel forming up a 4-op channel - //do normal operation - //else normal 2 operator function - //OR THIS: - //if this is one of the slots of 2nd channel forming up a 4-op channel - //update it using channel data of 1st channel of a pair - //else normal 2 operator function - switch(chan_no) - { - case 0: case 1: case 2: - case 9: case 10: case 11: - if (CH->extended) - { - /* normal */ - CALC_FCSLOT(CH,SLOT); - } - else - { - /* normal */ - CALC_FCSLOT(CH,SLOT); - } - break; - case 3: case 4: case 5: - case 12: case 13: case 14: - if ((CH-3)->extended) - { - /* update this SLOT using frequency data for 1st channel of a pair */ - CALC_FCSLOT(CH-3,SLOT); - } - else - { - /* normal */ - CALC_FCSLOT(CH,SLOT); - } - break; - default: - /* normal */ - CALC_FCSLOT(CH,SLOT); - break; - } - } - else - { - /* in OPL2 mode */ - CALC_FCSLOT(CH,SLOT); - } -} - -/* set ksl & tl */ -static inline void set_ksl_tl(OPL3 *chip,int slot,int v) -{ - OPL3_CH *CH = &chip->P_CH[slot/2]; - OPL3_SLOT *SLOT = &CH->SLOT[slot&1]; - - SLOT->ksl = ksl_shift[v >> 6]; - SLOT->TL = (v&0x3f)<<(ENV_BITS-1-7); /* 7 bits TL (bit 6 = always 0) */ - - if (chip->OPL3_mode & 1) - { - int chan_no = slot/2; - - /* in OPL3 mode */ - //DO THIS: - //if this is one of the slots of 1st channel forming up a 4-op channel - //do normal operation - //else normal 2 operator function - //OR THIS: - //if this is one of the slots of 2nd channel forming up a 4-op channel - //update it using channel data of 1st channel of a pair - //else normal 2 operator function - switch(chan_no) - { - case 0: case 1: case 2: - case 9: case 10: case 11: - if (CH->extended) - { - /* normal */ - SLOT->TLL = SLOT->TL + (CH->ksl_base>>SLOT->ksl); - } - else - { - /* normal */ - SLOT->TLL = SLOT->TL + (CH->ksl_base>>SLOT->ksl); - } - break; - case 3: case 4: case 5: - case 12: case 13: case 14: - if ((CH-3)->extended) - { - /* update this SLOT using frequency data for 1st channel of a pair */ - SLOT->TLL = SLOT->TL + ((CH-3)->ksl_base>>SLOT->ksl); - } - else - { - /* normal */ - SLOT->TLL = SLOT->TL + (CH->ksl_base>>SLOT->ksl); - } - break; - default: - /* normal */ - SLOT->TLL = SLOT->TL + (CH->ksl_base>>SLOT->ksl); - break; - } - } - else - { - /* in OPL2 mode */ - SLOT->TLL = SLOT->TL + (CH->ksl_base>>SLOT->ksl); - } - -} - -/* set attack rate & decay rate */ -static inline void set_ar_dr(OPL3 *chip,int slot,int v) -{ - OPL3_CH *CH = &chip->P_CH[slot/2]; - OPL3_SLOT *SLOT = &CH->SLOT[slot&1]; - - SLOT->ar = (v>>4) ? 16 + ((v>>4) <<2) : 0; - - if ((SLOT->ar + SLOT->ksr) < 16+60) /* verified on real YMF262 - all 15 x rates take "zero" time */ - { - SLOT->eg_sh_ar = eg_rate_shift [SLOT->ar + SLOT->ksr ]; - SLOT->eg_m_ar = (1<eg_sh_ar)-1; - SLOT->eg_sel_ar = eg_rate_select[SLOT->ar + SLOT->ksr ]; - } - else - { - SLOT->eg_sh_ar = 0; - SLOT->eg_m_ar = (1<eg_sh_ar)-1; - SLOT->eg_sel_ar = 13*RATE_STEPS; - } - - SLOT->dr = (v&0x0f)? 16 + ((v&0x0f)<<2) : 0; - SLOT->eg_sh_dr = eg_rate_shift [SLOT->dr + SLOT->ksr ]; - SLOT->eg_m_dr = (1<eg_sh_dr)-1; - SLOT->eg_sel_dr = eg_rate_select[SLOT->dr + SLOT->ksr ]; -} - -/* set sustain level & release rate */ -static inline void set_sl_rr(OPL3 *chip,int slot,int v) -{ - OPL3_CH *CH = &chip->P_CH[slot/2]; - OPL3_SLOT *SLOT = &CH->SLOT[slot&1]; - - SLOT->sl = sl_tab[ v>>4 ]; - - SLOT->rr = (v&0x0f)? 16 + ((v&0x0f)<<2) : 0; - SLOT->eg_sh_rr = eg_rate_shift [SLOT->rr + SLOT->ksr ]; - SLOT->eg_m_rr = (1<eg_sh_rr)-1; - SLOT->eg_sel_rr = eg_rate_select[SLOT->rr + SLOT->ksr ]; -} - - -static void update_channels(OPL3 *chip, OPL3_CH *CH) -{ - /* update channel passed as a parameter and a channel at CH+=3; */ - if (CH->extended) - { /* we've just switched to combined 4 operator mode */ - - } - else - { /* we've just switched to normal 2 operator mode */ - - } - -} - -/* write a value v to register r on OPL chip */ -static void OPL3WriteReg(OPL3 *chip, int r, int v) -{ - OPL3_CH *CH; - unsigned int ch_offset = 0; - int slot; - int block_fnum; - - if(r&0x100) - { - switch(r) - { - case 0x101: /* test register */ - return; - - case 0x104: /* 6 channels enable */ - { - uint8_t prev; - - CH = &chip->P_CH[0]; /* channel 0 */ - prev = CH->extended; - CH->extended = (v>>0) & 1; - if(prev != CH->extended) - update_channels(chip, CH); - CH++; /* channel 1 */ - prev = CH->extended; - CH->extended = (v>>1) & 1; - if(prev != CH->extended) - update_channels(chip, CH); - CH++; /* channel 2 */ - prev = CH->extended; - CH->extended = (v>>2) & 1; - if(prev != CH->extended) - update_channels(chip, CH); - - - CH = &chip->P_CH[9]; /* channel 9 */ - prev = CH->extended; - CH->extended = (v>>3) & 1; - if(prev != CH->extended) - update_channels(chip, CH); - CH++; /* channel 10 */ - prev = CH->extended; - CH->extended = (v>>4) & 1; - if(prev != CH->extended) - update_channels(chip, CH); - CH++; /* channel 11 */ - prev = CH->extended; - CH->extended = (v>>5) & 1; - if(prev != CH->extended) - update_channels(chip, CH); - - } - return; - - case 0x105: /* OPL3 extensions enable register */ - - chip->OPL3_mode = v&0x01; /* OPL3 mode when bit0=1 otherwise it is OPL2 mode */ - - /* following behaviour was tested on real YMF262, - switching OPL3/OPL2 modes on the fly: - - does not change the waveform previously selected (unless when ....) - - does not update CH.A, CH.B, CH.C and CH.D output selectors (registers c0-c8) (unless when ....) - - does not disable channels 9-17 on OPL3->OPL2 switch - - does not switch 4 operator channels back to 2 operator channels - */ - - return; - - default: - if (r < 0x120) - chip->device->logerror("YMF262: write to unknown register (set#2): %03x value=%02x\n",r,v); - break; - } - - ch_offset = 9; /* register page #2 starts from channel 9 (counting from 0) */ - } - - /* adjust bus to 8 bits */ - r &= 0xff; - v &= 0xff; - - - switch(r&0xe0) - { - case 0x00: /* 00-1f:control */ - switch(r&0x1f) - { - case 0x01: /* test register */ - break; - case 0x02: /* Timer 1 */ - chip->T[0] = (256-v)*4; - break; - case 0x03: /* Timer 2 */ - chip->T[1] = (256-v)*16; - break; - case 0x04: /* IRQ clear / mask and Timer enable */ - if(v&0x80) - { /* IRQ flags clear */ - OPL3_STATUS_RESET(chip,0x60); - } - else - { /* set IRQ mask ,timer enable */ - uint8_t st1 = v & 1; - uint8_t st2 = (v>>1) & 1; - - /* IRQRST,T1MSK,t2MSK,x,x,x,ST2,ST1 */ - OPL3_STATUS_RESET(chip, v & 0x60); - OPL3_STATUSMASK_SET(chip, (~v) & 0x60 ); - - /* timer 2 */ - if(chip->st[1] != st2) - { - attotime period = st2 ? chip->TimerBase * chip->T[1] : attotime::zero; - chip->st[1] = st2; - if (chip->timer_handler) (chip->timer_handler)(chip->TimerParam,1,period); - } - /* timer 1 */ - if(chip->st[0] != st1) - { - attotime period = st1 ? chip->TimerBase * chip->T[0] : attotime::zero; - chip->st[0] = st1; - if (chip->timer_handler) (chip->timer_handler)(chip->TimerParam,0,period); - } - } - break; - case 0x08: /* x,NTS,x,x, x,x,x,x */ - chip->nts = v; - break; - - default: - chip->device->logerror("YMF262: write to unknown register: %02x value=%02x\n",r,v); - break; - } - break; - case 0x20: /* am ON, vib ON, ksr, eg_type, mul */ - slot = slot_array[r&0x1f]; - if(slot < 0) return; - set_mul(chip, slot + ch_offset*2, v); - break; - case 0x40: - slot = slot_array[r&0x1f]; - if(slot < 0) return; - set_ksl_tl(chip, slot + ch_offset*2, v); - break; - case 0x60: - slot = slot_array[r&0x1f]; - if(slot < 0) return; - set_ar_dr(chip, slot + ch_offset*2, v); - break; - case 0x80: - slot = slot_array[r&0x1f]; - if(slot < 0) return; - set_sl_rr(chip, slot + ch_offset*2, v); - break; - case 0xa0: - if (r == 0xbd) /* am depth, vibrato depth, r,bd,sd,tom,tc,hh */ - { - if (ch_offset != 0) /* 0xbd register is present in set #1 only */ - return; - - chip->lfo_am_depth = v & 0x80; - chip->lfo_pm_depth_range = (v&0x40) ? 8 : 0; - - chip->rhythm = v&0x3f; - - if(chip->rhythm&0x20) - { - /* BD key on/off */ - if(v&0x10) - { - FM_KEYON (&chip->P_CH[6].SLOT[SLOT1], 2); - FM_KEYON (&chip->P_CH[6].SLOT[SLOT2], 2); - } - else - { - FM_KEYOFF(&chip->P_CH[6].SLOT[SLOT1],~2); - FM_KEYOFF(&chip->P_CH[6].SLOT[SLOT2],~2); - } - /* HH key on/off */ - if(v&0x01) FM_KEYON (&chip->P_CH[7].SLOT[SLOT1], 2); - else FM_KEYOFF(&chip->P_CH[7].SLOT[SLOT1],~2); - /* SD key on/off */ - if(v&0x08) FM_KEYON (&chip->P_CH[7].SLOT[SLOT2], 2); - else FM_KEYOFF(&chip->P_CH[7].SLOT[SLOT2],~2); - /* TOM key on/off */ - if(v&0x04) FM_KEYON (&chip->P_CH[8].SLOT[SLOT1], 2); - else FM_KEYOFF(&chip->P_CH[8].SLOT[SLOT1],~2); - /* TOP-CY key on/off */ - if(v&0x02) FM_KEYON (&chip->P_CH[8].SLOT[SLOT2], 2); - else FM_KEYOFF(&chip->P_CH[8].SLOT[SLOT2],~2); - } - else - { - /* BD key off */ - FM_KEYOFF(&chip->P_CH[6].SLOT[SLOT1],~2); - FM_KEYOFF(&chip->P_CH[6].SLOT[SLOT2],~2); - /* HH key off */ - FM_KEYOFF(&chip->P_CH[7].SLOT[SLOT1],~2); - /* SD key off */ - FM_KEYOFF(&chip->P_CH[7].SLOT[SLOT2],~2); - /* TOM key off */ - FM_KEYOFF(&chip->P_CH[8].SLOT[SLOT1],~2); - /* TOP-CY off */ - FM_KEYOFF(&chip->P_CH[8].SLOT[SLOT2],~2); - } - return; - } - - /* keyon,block,fnum */ - if( (r&0x0f) > 8) return; - CH = &chip->P_CH[(r&0x0f) + ch_offset]; - - if(!(r&0x10)) - { /* a0-a8 */ - block_fnum = (CH->block_fnum&0x1f00) | v; - } - else - { /* b0-b8 */ - block_fnum = ((v&0x1f)<<8) | (CH->block_fnum&0xff); - - if (chip->OPL3_mode & 1) - { - int chan_no = (r&0x0f) + ch_offset; - - /* in OPL3 mode */ - //DO THIS: - //if this is 1st channel forming up a 4-op channel - //ALSO keyon/off slots of 2nd channel forming up 4-op channel - //else normal 2 operator function keyon/off - //OR THIS: - //if this is 2nd channel forming up 4-op channel just do nothing - //else normal 2 operator function keyon/off - switch(chan_no) - { - case 0: case 1: case 2: - case 9: case 10: case 11: - if (CH->extended) - { - //if this is 1st channel forming up a 4-op channel - //ALSO keyon/off slots of 2nd channel forming up 4-op channel - if(v&0x20) - { - FM_KEYON (&CH->SLOT[SLOT1], 1); - FM_KEYON (&CH->SLOT[SLOT2], 1); - FM_KEYON (&(CH+3)->SLOT[SLOT1], 1); - FM_KEYON (&(CH+3)->SLOT[SLOT2], 1); - } - else - { - FM_KEYOFF(&CH->SLOT[SLOT1],~1); - FM_KEYOFF(&CH->SLOT[SLOT2],~1); - FM_KEYOFF(&(CH+3)->SLOT[SLOT1],~1); - FM_KEYOFF(&(CH+3)->SLOT[SLOT2],~1); - } - } - else - { - //else normal 2 operator function keyon/off - if(v&0x20) - { - FM_KEYON (&CH->SLOT[SLOT1], 1); - FM_KEYON (&CH->SLOT[SLOT2], 1); - } - else - { - FM_KEYOFF(&CH->SLOT[SLOT1],~1); - FM_KEYOFF(&CH->SLOT[SLOT2],~1); - } - } - break; - - case 3: case 4: case 5: - case 12: case 13: case 14: - if ((CH-3)->extended) - { - //if this is 2nd channel forming up 4-op channel just do nothing - } - else - { - //else normal 2 operator function keyon/off - if(v&0x20) - { - FM_KEYON (&CH->SLOT[SLOT1], 1); - FM_KEYON (&CH->SLOT[SLOT2], 1); - } - else - { - FM_KEYOFF(&CH->SLOT[SLOT1],~1); - FM_KEYOFF(&CH->SLOT[SLOT2],~1); - } - } - break; - - default: - if(v&0x20) - { - FM_KEYON (&CH->SLOT[SLOT1], 1); - FM_KEYON (&CH->SLOT[SLOT2], 1); - } - else - { - FM_KEYOFF(&CH->SLOT[SLOT1],~1); - FM_KEYOFF(&CH->SLOT[SLOT2],~1); - } - break; - } - } - else - { - if(v&0x20) - { - FM_KEYON (&CH->SLOT[SLOT1], 1); - FM_KEYON (&CH->SLOT[SLOT2], 1); - } - else - { - FM_KEYOFF(&CH->SLOT[SLOT1],~1); - FM_KEYOFF(&CH->SLOT[SLOT2],~1); - } - } - } - /* update */ - if(CH->block_fnum != block_fnum) - { - uint8_t block = block_fnum >> 10; - - CH->block_fnum = block_fnum; - - CH->ksl_base = static_cast(ksl_tab[block_fnum>>6]); - CH->fc = chip->fn_tab[block_fnum&0x03ff] >> (7-block); - - /* BLK 2,1,0 bits -> bits 3,2,1 of kcode */ - CH->kcode = (CH->block_fnum&0x1c00)>>9; - - /* the info below is actually opposite to what is stated in the Manuals (verifed on real YMF262) */ - /* if notesel == 0 -> lsb of kcode is bit 10 (MSB) of fnum */ - /* if notesel == 1 -> lsb of kcode is bit 9 (MSB-1) of fnum */ - if (chip->nts&0x40) - CH->kcode |= (CH->block_fnum&0x100)>>8; /* notesel == 1 */ - else - CH->kcode |= (CH->block_fnum&0x200)>>9; /* notesel == 0 */ - - if (chip->OPL3_mode & 1) - { - int chan_no = (r&0x0f) + ch_offset; - /* in OPL3 mode */ - //DO THIS: - //if this is 1st channel forming up a 4-op channel - //ALSO update slots of 2nd channel forming up 4-op channel - //else normal 2 operator function keyon/off - //OR THIS: - //if this is 2nd channel forming up 4-op channel just do nothing - //else normal 2 operator function keyon/off - switch(chan_no) - { - case 0: case 1: case 2: - case 9: case 10: case 11: - if (CH->extended) - { - //if this is 1st channel forming up a 4-op channel - //ALSO update slots of 2nd channel forming up 4-op channel - - /* refresh Total Level in FOUR SLOTs of this channel and channel+3 using data from THIS channel */ - CH->SLOT[SLOT1].TLL = CH->SLOT[SLOT1].TL + (CH->ksl_base>>CH->SLOT[SLOT1].ksl); - CH->SLOT[SLOT2].TLL = CH->SLOT[SLOT2].TL + (CH->ksl_base>>CH->SLOT[SLOT2].ksl); - (CH+3)->SLOT[SLOT1].TLL = (CH+3)->SLOT[SLOT1].TL + (CH->ksl_base>>(CH+3)->SLOT[SLOT1].ksl); - (CH+3)->SLOT[SLOT2].TLL = (CH+3)->SLOT[SLOT2].TL + (CH->ksl_base>>(CH+3)->SLOT[SLOT2].ksl); - - /* refresh frequency counter in FOUR SLOTs of this channel and channel+3 using data from THIS channel */ - CALC_FCSLOT(CH,&CH->SLOT[SLOT1]); - CALC_FCSLOT(CH,&CH->SLOT[SLOT2]); - CALC_FCSLOT(CH,&(CH+3)->SLOT[SLOT1]); - CALC_FCSLOT(CH,&(CH+3)->SLOT[SLOT2]); - } - else - { - //else normal 2 operator function - /* refresh Total Level in both SLOTs of this channel */ - CH->SLOT[SLOT1].TLL = CH->SLOT[SLOT1].TL + (CH->ksl_base>>CH->SLOT[SLOT1].ksl); - CH->SLOT[SLOT2].TLL = CH->SLOT[SLOT2].TL + (CH->ksl_base>>CH->SLOT[SLOT2].ksl); - - /* refresh frequency counter in both SLOTs of this channel */ - CALC_FCSLOT(CH,&CH->SLOT[SLOT1]); - CALC_FCSLOT(CH,&CH->SLOT[SLOT2]); - } - break; - - case 3: case 4: case 5: - case 12: case 13: case 14: - if ((CH-3)->extended) - { - //if this is 2nd channel forming up 4-op channel just do nothing - } - else - { - //else normal 2 operator function - /* refresh Total Level in both SLOTs of this channel */ - CH->SLOT[SLOT1].TLL = CH->SLOT[SLOT1].TL + (CH->ksl_base>>CH->SLOT[SLOT1].ksl); - CH->SLOT[SLOT2].TLL = CH->SLOT[SLOT2].TL + (CH->ksl_base>>CH->SLOT[SLOT2].ksl); - - /* refresh frequency counter in both SLOTs of this channel */ - CALC_FCSLOT(CH,&CH->SLOT[SLOT1]); - CALC_FCSLOT(CH,&CH->SLOT[SLOT2]); - } - break; - - default: - /* refresh Total Level in both SLOTs of this channel */ - CH->SLOT[SLOT1].TLL = CH->SLOT[SLOT1].TL + (CH->ksl_base>>CH->SLOT[SLOT1].ksl); - CH->SLOT[SLOT2].TLL = CH->SLOT[SLOT2].TL + (CH->ksl_base>>CH->SLOT[SLOT2].ksl); - - /* refresh frequency counter in both SLOTs of this channel */ - CALC_FCSLOT(CH,&CH->SLOT[SLOT1]); - CALC_FCSLOT(CH,&CH->SLOT[SLOT2]); - break; - } - } - else - { - /* in OPL2 mode */ - - /* refresh Total Level in both SLOTs of this channel */ - CH->SLOT[SLOT1].TLL = CH->SLOT[SLOT1].TL + (CH->ksl_base>>CH->SLOT[SLOT1].ksl); - CH->SLOT[SLOT2].TLL = CH->SLOT[SLOT2].TL + (CH->ksl_base>>CH->SLOT[SLOT2].ksl); - - /* refresh frequency counter in both SLOTs of this channel */ - CALC_FCSLOT(CH,&CH->SLOT[SLOT1]); - CALC_FCSLOT(CH,&CH->SLOT[SLOT2]); - } - } - break; - - case 0xc0: - /* CH.D, CH.C, CH.B, CH.A, FB(3bits), C */ - if( (r&0xf) > 8) return; - - CH = &chip->P_CH[(r&0xf) + ch_offset]; - - if( chip->OPL3_mode & 1 ) - { - int base = ((r&0xf) + ch_offset) * 4; - - /* OPL3 mode */ - chip->pan[ base ] = (v & 0x10) ? ~0 : 0; /* ch.A */ - chip->pan[ base +1 ] = (v & 0x20) ? ~0 : 0; /* ch.B */ - chip->pan[ base +2 ] = (v & 0x40) ? ~0 : 0; /* ch.C */ - chip->pan[ base +3 ] = (v & 0x80) ? ~0 : 0; /* ch.D */ - } - else - { - int base = ((r&0xf) + ch_offset) * 4; - - /* OPL2 mode - always enabled */ - chip->pan[ base ] = ~0; /* ch.A */ - chip->pan[ base +1 ] = ~0; /* ch.B */ - chip->pan[ base +2 ] = ~0; /* ch.C */ - chip->pan[ base +3 ] = ~0; /* ch.D */ - } - - chip->pan_ctrl_value[ (r&0xf) + ch_offset ] = v; /* store control value for OPL3/OPL2 mode switching on the fly */ - - CH->SLOT[SLOT1].FB = (v>>1)&7 ? ((v>>1)&7) + 7 : 0; - CH->SLOT[SLOT1].CON = v&1; - - if( chip->OPL3_mode & 1 ) - { - int chan_no = (r&0x0f) + ch_offset; - - switch(chan_no) - { - case 0: case 1: case 2: - case 9: case 10: case 11: - if (CH->extended) - { - uint8_t conn = (CH->SLOT[SLOT1].CON<<1) | ((CH+3)->SLOT[SLOT1].CON<<0); - switch(conn) - { - case 0: - /* 1 -> 2 -> 3 -> 4 - out */ - - CH->SLOT[SLOT1].conn_enum = CONN_PHASEMOD; - CH->SLOT[SLOT2].conn_enum = CONN_PHASEMOD2; - (CH+3)->SLOT[SLOT1].conn_enum = CONN_PHASEMOD; - (CH+3)->SLOT[SLOT2].conn_enum = CONN_CHAN0 + chan_no + 3; - break; - case 1: - /* 1 -> 2 -\ - 3 -> 4 -+- out */ - - CH->SLOT[SLOT1].conn_enum = CONN_PHASEMOD; - CH->SLOT[SLOT2].conn_enum = CONN_CHAN0 + chan_no; - (CH+3)->SLOT[SLOT1].conn_enum = CONN_PHASEMOD; - (CH+3)->SLOT[SLOT2].conn_enum = CONN_CHAN0 + chan_no + 3; - break; - case 2: - /* 1 -----------\ - 2 -> 3 -> 4 -+- out */ - - CH->SLOT[SLOT1].conn_enum = CONN_CHAN0 + chan_no; - CH->SLOT[SLOT2].conn_enum = CONN_PHASEMOD2; - (CH+3)->SLOT[SLOT1].conn_enum = CONN_PHASEMOD; - (CH+3)->SLOT[SLOT2].conn_enum = CONN_CHAN0 + chan_no + 3; - break; - case 3: - /* 1 ------\ - 2 -> 3 -+- out - 4 ------/ */ - CH->SLOT[SLOT1].conn_enum = CONN_CHAN0 + chan_no; - CH->SLOT[SLOT2].conn_enum = CONN_PHASEMOD2; - (CH+3)->SLOT[SLOT1].conn_enum = CONN_CHAN0 + chan_no + 3; - (CH+3)->SLOT[SLOT2].conn_enum = CONN_CHAN0 + chan_no + 3; - break; - } - OPL3_SLOT_CONNECT(chip, &CH->SLOT[SLOT1]); - OPL3_SLOT_CONNECT(chip, &CH->SLOT[SLOT2]); - OPL3_SLOT_CONNECT(chip, &(CH+3)->SLOT[SLOT1]); - OPL3_SLOT_CONNECT(chip, &(CH+3)->SLOT[SLOT2]); - } - else - { - /* 2 operators mode */ - CH->SLOT[SLOT1].conn_enum = CH->SLOT[SLOT1].CON ? CONN_CHAN0 + (r&0xf)+ch_offset : CONN_PHASEMOD; - CH->SLOT[SLOT2].conn_enum = CONN_CHAN0 + (r&0xf)+ch_offset; - OPL3_SLOT_CONNECT(chip, &CH->SLOT[SLOT1]); - OPL3_SLOT_CONNECT(chip, &CH->SLOT[SLOT2]); - } - break; - - case 3: case 4: case 5: - case 12: case 13: case 14: - if ((CH-3)->extended) - { - uint8_t conn = ((CH-3)->SLOT[SLOT1].CON<<1) | (CH->SLOT[SLOT1].CON<<0); - switch(conn) - { - case 0: - /* 1 -> 2 -> 3 -> 4 - out */ - - (CH-3)->SLOT[SLOT1].conn_enum = CONN_PHASEMOD; - (CH-3)->SLOT[SLOT2].conn_enum = CONN_PHASEMOD2; - CH->SLOT[SLOT1].conn_enum = CONN_PHASEMOD; - CH->SLOT[SLOT2].conn_enum = CONN_CHAN0 + chan_no; - break; - case 1: - /* 1 -> 2 -\ - 3 -> 4 -+- out */ - - (CH-3)->SLOT[SLOT1].conn_enum = CONN_PHASEMOD; - (CH-3)->SLOT[SLOT2].conn_enum = CONN_CHAN0 + chan_no - 3; - CH->SLOT[SLOT1].conn_enum = CONN_PHASEMOD; - CH->SLOT[SLOT2].conn_enum = CONN_CHAN0 + chan_no; - break; - case 2: - /* 1 -----------\ - 2 -> 3 -> 4 -+- out */ - - (CH-3)->SLOT[SLOT1].conn_enum = CONN_CHAN0 + chan_no - 3; - (CH-3)->SLOT[SLOT2].conn_enum = CONN_PHASEMOD2; - CH->SLOT[SLOT1].conn_enum = CONN_PHASEMOD; - CH->SLOT[SLOT2].conn_enum = CONN_CHAN0 + chan_no; - break; - case 3: - /* 1 ------\ - 2 -> 3 -+- out - 4 ------/ */ - (CH-3)->SLOT[SLOT1].conn_enum = CONN_CHAN0 + chan_no - 3; - (CH-3)->SLOT[SLOT2].conn_enum = CONN_PHASEMOD2; - CH->SLOT[SLOT1].conn_enum = CONN_CHAN0 + chan_no; - CH->SLOT[SLOT2].conn_enum = CONN_CHAN0 + chan_no; - break; - } - OPL3_SLOT_CONNECT(chip, &(CH-3)->SLOT[SLOT1]); - OPL3_SLOT_CONNECT(chip, &(CH-3)->SLOT[SLOT2]); - OPL3_SLOT_CONNECT(chip, &CH->SLOT[SLOT1]); - OPL3_SLOT_CONNECT(chip, &CH->SLOT[SLOT2]); - } - else - { - /* 2 operators mode */ - CH->SLOT[SLOT1].conn_enum = CH->SLOT[SLOT1].CON ? CONN_CHAN0 + (r&0xf)+ch_offset : CONN_PHASEMOD; - CH->SLOT[SLOT2].conn_enum = CONN_CHAN0 + (r&0xf)+ch_offset; - OPL3_SLOT_CONNECT(chip, &CH->SLOT[SLOT1]); - OPL3_SLOT_CONNECT(chip, &CH->SLOT[SLOT2]); - } - break; - - default: - /* 2 operators mode */ - CH->SLOT[SLOT1].conn_enum = CH->SLOT[SLOT1].CON ? CONN_CHAN0 + (r&0xf)+ch_offset : CONN_PHASEMOD; - CH->SLOT[SLOT2].conn_enum = CONN_CHAN0 + (r&0xf)+ch_offset; - OPL3_SLOT_CONNECT(chip, &CH->SLOT[SLOT1]); - OPL3_SLOT_CONNECT(chip, &CH->SLOT[SLOT2]); + // tests reveal that in compatibility mode, upper bit is masked + // except for register 0x105 + if (m_fm.regs().newflag() == 0 && m_address != 0x105) + m_address &= 0xff; break; - } - } - else - { - /* OPL2 mode - always 2 operators mode */ - CH->SLOT[SLOT1].conn_enum = CH->SLOT[SLOT1].CON ? CONN_CHAN0 + (r&0xf)+ch_offset : CONN_PHASEMOD; - CH->SLOT[SLOT2].conn_enum = CONN_CHAN0 + (r&0xf)+ch_offset; - OPL3_SLOT_CONNECT(chip, &CH->SLOT[SLOT1]); - OPL3_SLOT_CONNECT(chip, &CH->SLOT[SLOT2]); - } - break; - - case 0xe0: /* waveform select */ - slot = slot_array[r&0x1f]; - if(slot < 0) return; - - slot += ch_offset*2; - - CH = &chip->P_CH[slot/2]; - - - /* store 3-bit value written regardless of current OPL2 or OPL3 mode... (verified on real YMF262) */ - v &= 7; - CH->SLOT[slot&1].waveform_number = v; - - /* ... but select only waveforms 0-3 in OPL2 mode */ - if( !(chip->OPL3_mode & 1) ) - { - v &= 3; /* we're in OPL2 mode */ - } - CH->SLOT[slot&1].wavetable = v * SIN_LEN; - break; - } -} -/* lock/unlock for common table */ -static int OPL3_LockTable(device_t *device) -{ - num_lock++; - if(num_lock>1) return 0; + case 1: // data ports (A1 is ignored) - /* first time */ + // force an update + m_stream->update(); - if( !init_tables() ) - { - num_lock--; - return -1; - } - - return 0; -} - -static void OPL3_UnLockTable(void) -{ - if(num_lock) num_lock--; - if(num_lock) return; - - /* last time */ - OPLCloseTable(); -} - -static void OPL3ResetChip(OPL3 *chip) -{ - int c,s; - - chip->eg_timer = 0; - chip->eg_cnt = 0; - - chip->noise_rng = 1; /* noise shift register */ - chip->nts = 0; /* note split */ - OPL3_STATUS_RESET(chip,0x60); - - /* reset with register write */ - OPL3WriteReg(chip,0x01,0); /* test register */ - OPL3WriteReg(chip,0x02,0); /* Timer1 */ - OPL3WriteReg(chip,0x03,0); /* Timer2 */ - OPL3WriteReg(chip,0x04,0); /* IRQ mask clear */ - - -//FIX IT registers 101, 104 and 105 - - -//FIX IT (dont change CH.D, CH.C, CH.B and CH.A in C0-C8 registers) - for(c = 0xff ; c >= 0x20 ; c-- ) - OPL3WriteReg(chip,c,0); -//FIX IT (dont change CH.D, CH.C, CH.B and CH.A in C0-C8 registers) - for(c = 0x1ff ; c >= 0x120 ; c-- ) - OPL3WriteReg(chip,c,0); - - - - /* reset operator parameters */ - for( c = 0 ; c < 9*2 ; c++ ) - { - OPL3_CH *CH = &chip->P_CH[c]; - for(s = 0 ; s < 2 ; s++ ) - { - CH->SLOT[s].state = EG_OFF; - CH->SLOT[s].volume = MAX_ATT_INDEX; - } - } -} - -/* Create one of virtual YMF262 */ -/* 'clock' is chip clock in Hz */ -/* 'rate' is sampling rate */ -static OPL3 *OPL3Create(device_t *device, int clock, int rate, int type, int divider) -{ - OPL3 *chip; - - if (OPL3_LockTable(device) == -1) return nullptr; - - /* allocate memory block */ - chip = auto_alloc_clear(device->machine(), ()); - - chip->device = device; - chip->type = type; - chip->divider = divider; - OPL3_clock_changed(chip, clock, rate); - - /* reset chip */ - OPL3ResetChip(chip); - return chip; -} - -/* Destroy one of virtual YMF262 */ -static void OPL3Destroy(OPL3 *chip) -{ - OPL3_UnLockTable(); - auto_free(chip->device->machine(), chip); -} - - -/* YMF262 I/O interface */ -static int OPL3Write(OPL3 *chip, int a, int v) -{ - /* data bus is 8 bits */ - v &= 0xff; - - - switch(a&3) - { - case 0: /* address port 0 (register set #1) */ - chip->address = v; - break; - - case 1: /* data port - ignore A1 */ - case 3: /* data port - ignore A1 */ - if(chip->UpdateHandler) chip->UpdateHandler(chip->UpdateParam,0); - OPL3WriteReg(chip,chip->address,v); - break; - - case 2: /* address port 1 (register set #2) */ - - /* verified on real YMF262: - in OPL3 mode: - address line A1 is stored during *address* write and ignored during *data* write. - - in OPL2 mode: - register set#2 writes go to register set#1 (ignoring A1) - verified on registers from set#2: 0x01, 0x04, 0x20-0xef - The only exception is register 0x05. - */ - if( chip->OPL3_mode & 1 ) - { - /* OPL3 mode */ - chip->address = v | 0x100; - } - else - { - /* in OPL2 mode the only accessible in set #2 is register 0x05 */ - if( v==5 ) - chip->address = v | 0x100; - else - chip->address = v; /* verified range: 0x01, 0x04, 0x20-0xef(set #2 becomes set #1 in opl2 mode) */ - } - break; - } - - return chip->status>>7; -} - -static unsigned char OPL3Read(OPL3 *chip,int a) -{ - if( a==0 ) - { - /* status port */ - return chip->status; + // write to FM + m_fm.write(m_address, value); + break; } - - return 0x00; /* verified on real YMF262 */ } +//------------------------------------------------- +// device_start - start of emulation +//------------------------------------------------- -static int OPL3TimerOver(OPL3 *chip,int c) +void ymf262_device::device_start() { - if( c ) - { /* Timer B */ - OPL3_STATUS_SET(chip,0x20); - } - else - { /* Timer A */ - OPL3_STATUS_SET(chip,0x40); - } - /* reload timer */ - if (chip->timer_handler) (chip->timer_handler)(chip->TimerParam,c,chip->TimerBase * chip->T[c]); - return chip->status>>7; -} - -static void OPL3_save_state(OPL3 *chip, device_t *device) { - for (int ch=0; ch<18; ch++) { - OPL3_CH *channel = &chip->P_CH[ch]; - device->save_item(NAME(channel->block_fnum), ch); - device->save_item(NAME(channel->fc), ch); - device->save_item(NAME(channel->ksl_base), ch); - device->save_item(NAME(channel->kcode), ch); - device->save_item(NAME(channel->extended), ch); - - for (int sl=0; sl<2; sl++) { - OPL3_SLOT *slot = &channel->SLOT[sl]; - device->save_item(NAME(slot->ar), ch*2+sl); - device->save_item(NAME(slot->dr), ch*2+sl); - device->save_item(NAME(slot->rr), ch*2+sl); - device->save_item(NAME(slot->KSR), ch*2+sl); - device->save_item(NAME(slot->ksl), ch*2+sl); - device->save_item(NAME(slot->ksr), ch*2+sl); - device->save_item(NAME(slot->mul), ch*2+sl); - - device->save_item(NAME(slot->Cnt), ch*2+sl); - device->save_item(NAME(slot->Incr), ch*2+sl); - device->save_item(NAME(slot->FB), ch*2+sl); - device->save_item(NAME(slot->conn_enum), ch*2+sl); - device->save_item(NAME(slot->op1_out), ch*2+sl); - device->save_item(NAME(slot->CON), ch*2+sl); - - device->save_item(NAME(slot->eg_type), ch*2+sl); - device->save_item(NAME(slot->state), ch*2+sl); - device->save_item(NAME(slot->TL), ch*2+sl); - device->save_item(NAME(slot->TLL), ch*2+sl); - device->save_item(NAME(slot->volume), ch*2+sl); - device->save_item(NAME(slot->sl), ch*2+sl); - - device->save_item(NAME(slot->eg_m_ar), ch*2+sl); - device->save_item(NAME(slot->eg_sh_ar), ch*2+sl); - device->save_item(NAME(slot->eg_sel_ar), ch*2+sl); - device->save_item(NAME(slot->eg_m_dr), ch*2+sl); - device->save_item(NAME(slot->eg_sh_dr), ch*2+sl); - device->save_item(NAME(slot->eg_sel_dr), ch*2+sl); - device->save_item(NAME(slot->eg_m_rr), ch*2+sl); - device->save_item(NAME(slot->eg_sh_rr), ch*2+sl); - device->save_item(NAME(slot->eg_sel_rr), ch*2+sl); - - device->save_item(NAME(slot->key), ch*2+sl); - - device->save_item(NAME(slot->AMmask), ch*2+sl); - device->save_item(NAME(slot->vib), ch*2+sl); - - device->save_item(NAME(slot->waveform_number), ch*2+sl); - device->save_item(NAME(slot->wavetable), ch*2+sl); - } - } - - device->save_item(NAME(chip->pan)); - device->save_item(NAME(chip->pan_ctrl_value)); - - device->save_item(NAME(chip->lfo_am_depth)); - device->save_item(NAME(chip->lfo_pm_depth_range)); - - device->save_item(NAME(chip->OPL3_mode)); - device->save_item(NAME(chip->rhythm)); + // create our stream + m_stream = stream_alloc(0, fm_engine::OUTPUTS, m_fm.sample_rate(clock())); - device->save_item(NAME(chip->T)); - device->save_item(NAME(chip->st)); + // save our data + save_item(YMFM_NAME(m_address)); - device->save_item(NAME(chip->address)); - device->save_item(NAME(chip->status)); - device->save_item(NAME(chip->statusmask)); - - device->save_item(NAME(chip->nts)); + // save the engines + m_fm.save(*this); } -void * ymf262_init(device_t *device, int clock, int rate) -{ - void *chip = OPL3Create(device,clock,rate,OPL3_TYPE_YMF262,8*36); - OPL3_save_state((OPL3 *)chip, device); - return chip; -} +//------------------------------------------------- +// device_reset - start of emulation +//------------------------------------------------- -void * ymf278b_init(device_t *device, int clock, int rate) +void ymf262_device::device_reset() { - void *chip = OPL3Create(device,clock,rate,OPL3_TYPE_YMF262,19*36); - OPL3_save_state((OPL3 *)chip, device); - - return chip; + // reset the engines + m_fm.reset(); } -void ymf262_clock_changed(void *chip, int clock, int rate) -{ - OPL3_clock_changed((OPL3 *)chip, clock, rate); -} -void ymf262_post_load(void *chip) { - OPL3 *opl3 = (OPL3 *)chip; - for (int ch=0; ch<18; ch++) { - for (int sl=0; sl<2; sl++) { - OPL3_SLOT_CONNECT(opl3, &(opl3->P_CH[ch].SLOT[sl])); - } - } -} +//------------------------------------------------- +// device_clock_changed - update if clock changes +//------------------------------------------------- -void ymf262_shutdown(void *chip) +void ymf262_device::device_clock_changed() { - OPL3Destroy((OPL3 *)chip); -} -void ymf262_reset_chip(void *chip) -{ - OPL3ResetChip((OPL3 *)chip); + m_stream->set_sample_rate(m_fm.sample_rate(clock())); } -int ymf262_write(void *chip, int a, int v) -{ - return OPL3Write((OPL3 *)chip, a, v); -} - -unsigned char ymf262_read(void *chip, int a) -{ - /* Note on status register: */ - /* YM3526(OPL) and YM3812(OPL2) return bit2 and bit1 in HIGH state */ +//------------------------------------------------- +// sound_stream_update - update the sound stream +//------------------------------------------------- - /* YMF262(OPL3) always returns bit2 and bit1 in LOW state */ - /* which can be used to identify the chip */ - - /* YMF278(OPL4) returns bit2 in LOW and bit1 in HIGH state ??? info from manual - not verified */ - - return OPL3Read((OPL3 *)chip, a); -} -int ymf262_timer_over(void *chip, int c) -{ - return OPL3TimerOver((OPL3 *)chip, c); -} - -void ymf262_set_timer_handler(void *chip, OPL3_TIMERHANDLER timer_handler, device_t *device) -{ - reinterpret_cast(chip)->SetTimerHandler(timer_handler, device); -} -void ymf262_set_irq_handler(void *chip, OPL3_IRQHANDLER IRQHandler, device_t *device) +void ymf262_device::sound_stream_update(sound_stream &stream, std::vector const &inputs, std::vector &outputs) { - reinterpret_cast(chip)->SetIRQHandler(IRQHandler, device); -} -void ymf262_set_update_handler(void *chip, OPL3_UPDATEHANDLER UpdateHandler, device_t *device) -{ - reinterpret_cast(chip)->SetUpdateHandler(UpdateHandler, device); -} - - -/* -** Generate samples for one of the YMF262's -** -** 'which' is the virtual YMF262 number -** '**buffers' is table of 4 pointers to the buffers: CH.A, CH.B, CH.C and CH.D -** 'length' is the number of samples that should be generated -*/ -void ymf262_update_one(void *_chip, std::vector &buffers) -{ - int i; - OPL3 *chip = (OPL3 *)_chip; - signed int *chanout = chip->chanout; - uint8_t rhythm = chip->rhythm&0x20; - - auto &ch_a = buffers[0]; // DO2 (mixed) left output for OPL4 - auto &ch_b = buffers[1]; // DO2 (mixed) right output for OPL4 - auto &ch_c = buffers[2]; // DO0 (FM only) left output for OPL4 - auto &ch_d = buffers[3]; // DO0 (FM only) right output for OPL4 - - for( i=0; i < ch_a.samples() ; i++ ) + // iterate over all target samples + for (int sampindex = 0; sampindex < outputs[0].samples(); sampindex++) { - int a,b,c,d; - - advance_lfo(chip); + // clock the system + m_fm.clock(fm_engine::ALL_CHANNELS); - /* clear channel outputs */ - memset(chip->chanout, 0, sizeof(chip->chanout)); + // update the FM content; clipping is unknown + s32 sums[fm_engine::OUTPUTS] = { 0 }; + m_fm.output(sums, 0, 32767, fm_engine::ALL_CHANNELS); -#if 1 - /* register set #1 */ - chan_calc(chip, &chip->P_CH[0]); /* extended 4op ch#0 part 1 or 2op ch#0 */ - if (chip->P_CH[0].extended) - chan_calc_ext(chip, &chip->P_CH[3]); /* extended 4op ch#0 part 2 */ - else - chan_calc(chip, &chip->P_CH[3]); /* standard 2op ch#3 */ - - - chan_calc(chip, &chip->P_CH[1]); /* extended 4op ch#1 part 1 or 2op ch#1 */ - if (chip->P_CH[1].extended) - chan_calc_ext(chip, &chip->P_CH[4]); /* extended 4op ch#1 part 2 */ - else - chan_calc(chip, &chip->P_CH[4]); /* standard 2op ch#4 */ - - - chan_calc(chip, &chip->P_CH[2]); /* extended 4op ch#2 part 1 or 2op ch#2 */ - if (chip->P_CH[2].extended) - chan_calc_ext(chip, &chip->P_CH[5]); /* extended 4op ch#2 part 2 */ - else - chan_calc(chip, &chip->P_CH[5]); /* standard 2op ch#5 */ - - - if(!rhythm) - { - chan_calc(chip, &chip->P_CH[6]); - chan_calc(chip, &chip->P_CH[7]); - chan_calc(chip, &chip->P_CH[8]); - } - else /* Rhythm part */ - { - chan_calc_rhythm(chip, &chip->P_CH[0], (chip->noise_rng>>0)&1 ); - } - - /* register set #2 */ - chan_calc(chip, &chip->P_CH[ 9]); - if (chip->P_CH[9].extended) - chan_calc_ext(chip, &chip->P_CH[12]); - else - chan_calc(chip, &chip->P_CH[12]); - - - chan_calc(chip, &chip->P_CH[10]); - if (chip->P_CH[10].extended) - chan_calc_ext(chip, &chip->P_CH[13]); - else - chan_calc(chip, &chip->P_CH[13]); - - - chan_calc(chip, &chip->P_CH[11]); - if (chip->P_CH[11].extended) - chan_calc_ext(chip, &chip->P_CH[14]); - else - chan_calc(chip, &chip->P_CH[14]); - - - /* channels 15,16,17 are fixed 2-operator channels only */ - chan_calc(chip, &chip->P_CH[15]); - chan_calc(chip, &chip->P_CH[16]); - chan_calc(chip, &chip->P_CH[17]); -#endif - - /* accumulator register set #1 */ - a = chanout[0] & chip->pan[0]; - b = chanout[0] & chip->pan[1]; - c = chanout[0] & chip->pan[2]; - d = chanout[0] & chip->pan[3]; -#if 1 - a += chanout[1] & chip->pan[4]; - b += chanout[1] & chip->pan[5]; - c += chanout[1] & chip->pan[6]; - d += chanout[1] & chip->pan[7]; - a += chanout[2] & chip->pan[8]; - b += chanout[2] & chip->pan[9]; - c += chanout[2] & chip->pan[10]; - d += chanout[2] & chip->pan[11]; - - a += chanout[3] & chip->pan[12]; - b += chanout[3] & chip->pan[13]; - c += chanout[3] & chip->pan[14]; - d += chanout[3] & chip->pan[15]; - a += chanout[4] & chip->pan[16]; - b += chanout[4] & chip->pan[17]; - c += chanout[4] & chip->pan[18]; - d += chanout[4] & chip->pan[19]; - a += chanout[5] & chip->pan[20]; - b += chanout[5] & chip->pan[21]; - c += chanout[5] & chip->pan[22]; - d += chanout[5] & chip->pan[23]; - - a += chanout[6] & chip->pan[24]; - b += chanout[6] & chip->pan[25]; - c += chanout[6] & chip->pan[26]; - d += chanout[6] & chip->pan[27]; - a += chanout[7] & chip->pan[28]; - b += chanout[7] & chip->pan[29]; - c += chanout[7] & chip->pan[30]; - d += chanout[7] & chip->pan[31]; - a += chanout[8] & chip->pan[32]; - b += chanout[8] & chip->pan[33]; - c += chanout[8] & chip->pan[34]; - d += chanout[8] & chip->pan[35]; - - /* accumulator register set #2 */ - a += chanout[9] & chip->pan[36]; - b += chanout[9] & chip->pan[37]; - c += chanout[9] & chip->pan[38]; - d += chanout[9] & chip->pan[39]; - a += chanout[10] & chip->pan[40]; - b += chanout[10] & chip->pan[41]; - c += chanout[10] & chip->pan[42]; - d += chanout[10] & chip->pan[43]; - a += chanout[11] & chip->pan[44]; - b += chanout[11] & chip->pan[45]; - c += chanout[11] & chip->pan[46]; - d += chanout[11] & chip->pan[47]; - - a += chanout[12] & chip->pan[48]; - b += chanout[12] & chip->pan[49]; - c += chanout[12] & chip->pan[50]; - d += chanout[12] & chip->pan[51]; - a += chanout[13] & chip->pan[52]; - b += chanout[13] & chip->pan[53]; - c += chanout[13] & chip->pan[54]; - d += chanout[13] & chip->pan[55]; - a += chanout[14] & chip->pan[56]; - b += chanout[14] & chip->pan[57]; - c += chanout[14] & chip->pan[58]; - d += chanout[14] & chip->pan[59]; - - a += chanout[15] & chip->pan[60]; - b += chanout[15] & chip->pan[61]; - c += chanout[15] & chip->pan[62]; - d += chanout[15] & chip->pan[63]; - a += chanout[16] & chip->pan[64]; - b += chanout[16] & chip->pan[65]; - c += chanout[16] & chip->pan[66]; - d += chanout[16] & chip->pan[67]; - a += chanout[17] & chip->pan[68]; - b += chanout[17] & chip->pan[69]; - c += chanout[17] & chip->pan[70]; - d += chanout[17] & chip->pan[71]; -#endif - - #ifdef SAVE_SAMPLE - if (which==0) - { - SAVE_ALL_CHANNELS - } - #endif - - /* store to sound buffer */ - ch_a.put_int_clamp(i, a, 32768 << FINAL_SH); - ch_b.put_int_clamp(i, a, 32768 << FINAL_SH); - ch_c.put_int_clamp(i, a, 32768 << FINAL_SH); - ch_d.put_int_clamp(i, a, 32768 << FINAL_SH); - - advance(chip); + // YMF262 outputs straight 16-bit data in 4 channels + for (int index = 0; index < fm_engine::OUTPUTS; index++) + outputs[index].put_int(sampindex, sums[index], 32768); } - } diff -Nru mame-0.230+dfsg.1/src/devices/sound/ymf262.h mame-0.231+dfsg.1/src/devices/sound/ymf262.h --- mame-0.230+dfsg.1/src/devices/sound/ymf262.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/sound/ymf262.h 2021-04-27 15:32:05.000000000 +0000 @@ -1,43 +1,48 @@ -// license:GPL-2.0+ -// copyright-holders:Jarek Burczynski +// license:BSD-3-Clause +// copyright-holders:Aaron Giles + #ifndef MAME_SOUND_YMF262_H #define MAME_SOUND_YMF262_H #pragma once -/* select number of output bits: 8 or 16 */ -#define OPL3_SAMPLE_BITS 16 +#include "ymfm.h" + + +// ======================> ymf262_device + +DECLARE_DEVICE_TYPE(YMF262, ymf262_device); + +class ymf262_device : public device_t, public device_sound_interface +{ +public: + // YMF262 is OPL3 + using fm_engine = ymopl3_engine; + + // constructor + ymf262_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock, device_type type = YMF262); + + // configuration helpers + auto irq_handler() { return m_fm.irq_handler(); } + + // read/write access + u8 read(offs_t offset); + void write(offs_t offset, u8 data); + +protected: + // device-level overrides + virtual void device_start() override; + virtual void device_reset() override; + virtual void device_clock_changed() override; + + // sound overrides + virtual void sound_stream_update(sound_stream &stream, std::vector const &inputs, std::vector &outputs) override; -typedef s32 OPL3SAMPLE; -/* -#if (OPL3_SAMPLE_BITS==16) -typedef int16_t OPL3SAMPLE; -#endif -#if (OPL3_SAMPLE_BITS==8) -typedef int8_t OPL3SAMPLE; -#endif -*/ - -typedef void (*OPL3_TIMERHANDLER)(device_t *device,int timer,const attotime &period); -typedef void (*OPL3_IRQHANDLER)(device_t *device,int irq); -typedef void (*OPL3_UPDATEHANDLER)(device_t *device,int min_interval_us); - - -void *ymf262_init(device_t *device, int clock, int rate); -void *ymf278b_init(device_t *device, int clock, int rate); - -void ymf262_clock_changed(void *chip, int clock, int rate); -void ymf262_post_load(void *chip); -void ymf262_shutdown(void *chip); -void ymf262_reset_chip(void *chip); -int ymf262_write(void *chip, int a, int v); -unsigned char ymf262_read(void *chip, int a); -int ymf262_timer_over(void *chip, int c); -void ymf262_update_one(void *chip, std::vector &buffers); - -void ymf262_set_timer_handler(void *chip, OPL3_TIMERHANDLER TimerHandler, device_t *device); -void ymf262_set_irq_handler(void *chip, OPL3_IRQHANDLER IRQHandler, device_t *device); -void ymf262_set_update_handler(void *chip, OPL3_UPDATEHANDLER UpdateHandler, device_t *device); + // internal state + u16 m_address; // address register + sound_stream *m_stream; // sound stream + fm_engine m_fm; // core FM engine +}; #endif // MAME_SOUND_YMF262_H diff -Nru mame-0.230+dfsg.1/src/devices/sound/ymf278b.cpp mame-0.231+dfsg.1/src/devices/sound/ymf278b.cpp --- mame-0.230+dfsg.1/src/devices/sound/ymf278b.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/sound/ymf278b.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -50,7 +50,6 @@ #include "emu.h" #include "ymf278b.h" -#include "ymf262.h" #include @@ -58,6 +57,18 @@ #define LOG(x) do { if (VERBOSE) logerror x; } while (0) +// Using the nominal datasheet frequency of 33.868MHz, the output of +// the chip will be clock/768 = 44.1kHz. However, the FM engine is +// clocked internally at clock/(19*36), or 49.515kHz, so the FM output +// needs to be downsampled. The calculations below produce the fractional +// number of extra FM samples we need to consume for each output sample, +// as a 0.24 fixed point fraction. +static constexpr double NOMINAL_CLOCK = 33868800; +static constexpr double NOMINAL_FM_RATE = NOMINAL_CLOCK / double(ymopl4_registers::DEFAULT_PRESCALE * ymopl4_registers::OPERATORS); +static constexpr double NOMINAL_OUTPUT_RATE = NOMINAL_CLOCK / 768.0; +static constexpr uint32_t FM_STEP = uint32_t((NOMINAL_FM_RATE / NOMINAL_OUTPUT_RATE - 1.0) * double(1 << 24)); + + /**************************************************************************/ int ymf278b_device::compute_rate(YMF278BSlot *slot, int val) @@ -221,17 +232,6 @@ YMF278BSlot *slot; int16_t sample = 0; int32_t *mixp; - int32_t vl, vr; - - ymf262_update_one(m_ymf262, outputs); - stream_buffer::sample_t fvl = stream_buffer::sample_t(m_mix_level[m_fm_l]) * (1.0 / 65536.0); - stream_buffer::sample_t fvr = stream_buffer::sample_t(m_mix_level[m_fm_r]) * (1.0 / 65536.0); - for (i = 0; i < outputs[0].samples(); i++) - { - // DO2 mixing - outputs[0].put(i, outputs[0].get(i) * fvl); - outputs[1].put(i, outputs[1].get(i) * fvr); - } std::fill(m_mix_buffer.begin(), m_mix_buffer.end(), 0); @@ -314,29 +314,46 @@ } mixp = &m_mix_buffer[0]; - vl = m_mix_level[m_pcm_l]; - vr = m_mix_level[m_pcm_r]; + stream_buffer::sample_t wtl = stream_buffer::sample_t(m_mix_level[m_pcm_l]) / (65536.0f * 32768.0f); + stream_buffer::sample_t wtr = stream_buffer::sample_t(m_mix_level[m_pcm_r]) / (65536.0f * 32768.0f); + stream_buffer::sample_t fml = stream_buffer::sample_t(m_mix_level[m_fm_l]) / (65536.0f * 32768.0f); + stream_buffer::sample_t fmr = stream_buffer::sample_t(m_mix_level[m_fm_r]) / (65536.0f * 32768.0f); for (i = 0; i < outputs[0].samples(); i++) { - outputs[0].add_int(i, (*mixp++ * vl) >> 16, 32768); - outputs[1].add_int(i, (*mixp++ * vr) >> 16, 32768); + // the FM_STEP value is the fractional number of extra samples consumed per + // output sample; when this overflows, we need to clock the FM engine an + // extra time; since the PCM side of the chip doesn't do interpolation, I'm + // assuming this resampling stage doesn't either + m_fm_pos += FM_STEP; + if (BIT(m_fm_pos, 24)) + { + m_fm.clock(fm_engine::ALL_CHANNELS); + m_fm_pos &= 0xffffff; + } + + // clock the system + m_fm.clock(fm_engine::ALL_CHANNELS); + + // update the FM content; clipping is unknown + s32 sums[fm_engine::OUTPUTS] = { 0 }; + m_fm.output(sums, 1, 32767, fm_engine::ALL_CHANNELS); + + // DO2 output: mixed FM channels 0+1 and wavetable channels 0+1 + outputs[0].put(i, stream_buffer::sample_t(*mixp++) * wtl + stream_buffer::sample_t(sums[0]) * fml); + outputs[1].put(i, stream_buffer::sample_t(*mixp++) * wtr + stream_buffer::sample_t(sums[1]) * fmr); + + // DO0 output: FM channels 2+3 only + outputs[2].put_int(i, sums[2], 32768); + outputs[3].put_int(i, sums[3], 32768); + + // DO1 output: wavetable channels 2+3 only outputs[4].put_int(i, *mixp++, 32768); outputs[5].put_int(i, *mixp++, 32768); } } -void ymf278b_device::irq_check() -{ - int prev_line = m_irq_line; - m_irq_line = m_current_irq ? 1 : 0; - if (m_irq_line != prev_line && !m_irq_handler.isnull()) - m_irq_handler(m_irq_line); -} - enum { - TIMER_A = 0, - TIMER_B, TIMER_BUSY_CLEAR, TIMER_LD_CLEAR }; @@ -345,28 +362,12 @@ { switch(id) { - case TIMER_A: - if(!(m_enable & 0x40)) - { - m_current_irq |= 0x40; - irq_check(); - } - break; - - case TIMER_B: - if(!(m_enable & 0x20)) - { - m_current_irq |= 0x20; - irq_check(); - } - break; - case TIMER_BUSY_CLEAR: - m_status_busy = 0; + m_fm.set_reset_status(0, STATUS_BUSY); break; case TIMER_LD_CLEAR: - m_status_ld = 0; + m_fm.set_reset_status(0, STATUS_LD); break; } } @@ -374,92 +375,7 @@ /**************************************************************************/ -void ymf278b_device::A_w(uint8_t reg, uint8_t data) -{ - // FM register array 0 (compatible with YMF262) - switch(reg) - { - // LSI TEST - case 0x00: - case 0x01: - break; - - // timer a count - case 0x02: - if (data != m_timer_a_count) - { - m_timer_a_count = data; - - // change period, ~80.8us * t - if (m_enable & 1) - m_timer_a->adjust(m_timer_a->remaining(), 0, m_timer_base * (256-data) * 4); - } - break; - - // timer b count - case 0x03: - if (data != m_timer_b_count) - { - m_timer_b_count = data; - - // change period, ~323.1us * t - if (m_enable & 2) - m_timer_b->adjust(m_timer_b->remaining(), 0, m_timer_base * (256-data) * 16); - } - break; - - // timer control - case 0x04: - if(data & 0x80) - m_current_irq = 0; - else - { - // reset timers - if((m_enable ^ data) & 1) - { - attotime period = (data & 1) ? m_timer_base * (256-m_timer_a_count) * 4 : attotime::never; - m_timer_a->adjust(period, 0, period); - } - if((m_enable ^ data) & 2) - { - attotime period = (data & 2) ? m_timer_base * (256-m_timer_b_count) * 16 : attotime::never; - m_timer_b->adjust(period, 0, period); - } - - m_enable = data; - m_current_irq &= ~data; - } - irq_check(); - break; - - default: - logerror("YMF278B: Port A write %02x, %02x\n", reg, data); - break; - } -} - -void ymf278b_device::B_w(uint8_t reg, uint8_t data) -{ - // FM register array 1 (compatible with YMF262) - switch(reg) - { - // LSI TEST - case 0x00: - case 0x01: - break; - - // expansion register (NEW2/NEW) - case 0x05: - m_exp = data; - break; - - default: - logerror("YMF278B: Port B write %02x, %02x\n", reg, data); - break; - } -} - -void ymf278b_device::retrigger_note(YMF278BSlot *slot) +void ymf278b_device::retrigger_sample(YMF278BSlot *slot) { // activate channel if (slot->octave != 8) @@ -515,13 +431,13 @@ C_w(8 + snum + (i-2) * 24, p[i]); // status register LD bit is on for approx 300us - m_status_ld = 1; + m_fm.set_reset_status(STATUS_LD, 0); period = clocks_to_attotime(10); m_timer_ld->adjust(period); // retrigger if key is on if (slot->KEY_ON) - retrigger_note(slot); + retrigger_sample(slot); else if (slot->active) { // deactivate channel @@ -589,7 +505,7 @@ break; } - retrigger_note(slot); + retrigger_sample(slot); } else if (slot->active) { @@ -689,29 +605,32 @@ void ymf278b_device::timer_busy_start(int is_pcm) { // status register BUSY bit is on for 56(FM) or 88(PCM) cycles - m_status_busy = 1; + m_fm.set_reset_status(STATUS_BUSY, 0); m_timer_busy->adjust(attotime::from_hz(m_clock / (is_pcm ? 88 : 56))); } void ymf278b_device::write(offs_t offset, u8 data) { - switch (offset) + uint32_t old; + switch (offset & 7) { case 0: case 2: timer_busy_start(0); m_port_AB = data; - m_lastport = offset>>1 & 1; - ymf262_write(m_ymf262, offset, data); + m_lastport = BIT(offset, 1); break; case 1: case 3: timer_busy_start(0); - if (m_lastport) B_w(m_port_AB, data); - else A_w(m_port_AB, data); - m_last_fm_data = data; - ymf262_write(m_ymf262, offset, data); + old = m_fm.regs().new2flag(); + m_fm.write(m_port_AB | (m_lastport << 8), data); + + // if the new2 flag is turned on, the next status read will set bit 1 + // but only for the first status read after new2 is set + if (old == 0 && m_fm.regs().new2flag() != 0) + m_next_status_id = true; break; case 4: @@ -721,7 +640,7 @@ case 5: // PCM regs are only accessible if NEW2 is set - if (~m_exp & 2) + if (!m_fm.regs().new2flag()) break; m_stream->update(); @@ -741,32 +660,45 @@ { uint8_t ret = 0; - switch (offset) + switch (offset & 7) { // status register case 0: - { - // bits 0 and 1 are only valid if NEW2 is set - uint8_t newbits = 0; - if (m_exp & 2) - newbits = (m_status_ld << 1) | m_status_busy; - ret = newbits | m_current_irq | (m_irq_line ? 0x80 : 0x00); + // first status read after initialization returns a chip ID, which + // varies based on the "new" flags, indicating the mode + if (m_next_status_id) + { + if (m_fm.regs().new2flag()) + ret = 0x02; + else if (m_fm.regs().newflag()) + ret = 0x00; + else + ret = 0x06; + m_next_status_id = false; + } + else + { + ret = m_fm.status(); + + // if new2 flag is not set, we're in OPL2 or OPL3 mode + if (!m_fm.regs().new2flag()) + ret &= ~(STATUS_BUSY | STATUS_LD); + } break; - } // FM regs can be read too (on contrary to what the datasheet says) case 1: case 3: // but they're not implemented here yet // This may be incorrect, but it makes the mbwave moonsound detection in msx drivers pass. - ret = m_last_fm_data; + ret = m_fm.regs().read(m_port_AB | (m_lastport << 8)); break; // PCM regs case 5: // only accessible if NEW2 is set - if (~m_exp & 2) + if (!m_fm.regs().new2flag()) break; switch (m_port_C) @@ -798,15 +730,6 @@ /**************************************************************************/ //------------------------------------------------- -// device_post_load - device-specific post load -//------------------------------------------------- - -void ymf278b_device::device_post_load() -{ - ymf262_post_load(m_ymf262); -} - -//------------------------------------------------- // device_reset - device-specific reset //------------------------------------------------- @@ -815,9 +738,6 @@ int i; // clear registers - for (i = 0; i <= 4; i++) - A_w(i, 0); - B_w(5, 0); for (i = 0; i < 8; i++) C_w(i, 0); for (i = 0xff; i >= 8; i--) @@ -826,6 +746,7 @@ m_port_AB = m_port_C = 0; m_lastport = 0; + m_next_status_id = true; m_memadr = 0; // init/silence channels @@ -851,23 +772,10 @@ compute_envelope(slot); } - m_timer_a->reset(); - m_timer_b->reset(); - m_timer_busy->reset(); m_status_busy = 0; - m_timer_ld->reset(); m_status_ld = 0; - - m_irq_line = 0; - m_current_irq = 0; - if (!m_irq_handler.isnull()) - m_irq_handler(0); + m_timer_busy->reset(); + m_timer_ld->reset(); - ymf262_reset_chip(m_ymf262); -} - -void ymf278b_device::device_stop() -{ - ymf262_shutdown(m_ymf262); - m_ymf262 = nullptr; + m_fm.reset(); } void ymf278b_device::device_clock_changed() @@ -875,18 +783,13 @@ int old_rate = m_rate; m_clock = clock(); m_rate = m_clock/768; + m_fm_pos = 0; if (m_rate > old_rate) { m_mix_buffer.resize(m_rate*4,0); } m_stream->set_sample_rate(m_rate); - - m_timer_base = m_clock ? attotime::from_hz(m_clock) * (19 * 36) : attotime::zero; - - // YMF262 related - - ymf262_clock_changed(m_ymf262, clock(), m_rate); } void ymf278b_device::rom_bank_updated() @@ -929,22 +832,15 @@ save_item(NAME(m_wavetblhdr)); save_item(NAME(m_memmode)); save_item(NAME(m_memadr)); - save_item(NAME(m_status_busy)); - save_item(NAME(m_status_ld)); - save_item(NAME(m_exp)); save_item(NAME(m_fm_l)); save_item(NAME(m_fm_r)); + save_item(NAME(m_fm_pos)); save_item(NAME(m_pcm_l)); save_item(NAME(m_pcm_r)); - save_item(NAME(m_timer_a_count)); - save_item(NAME(m_timer_b_count)); - save_item(NAME(m_enable)); - save_item(NAME(m_current_irq)); - save_item(NAME(m_irq_line)); save_item(NAME(m_port_AB)); save_item(NAME(m_port_C)); save_item(NAME(m_lastport)); - save_item(NAME(m_last_fm_data)); + save_item(NAME(m_next_status_id)); for (i = 0; i < 24; ++i) { @@ -996,11 +892,8 @@ m_clock = clock(); m_rate = m_clock / 768; - m_irq_handler.resolve(); + m_fm_pos = 0; - m_timer_base = m_clock ? attotime::from_hz(m_clock) * (19*36) : attotime::zero; - m_timer_a = timer_alloc(TIMER_A); - m_timer_b = timer_alloc(TIMER_B); m_timer_busy = timer_alloc(TIMER_BUSY_CLEAR); m_timer_ld = timer_alloc(TIMER_LD_CLEAR); @@ -1037,16 +930,7 @@ register_save_state(); // YMF262 related - - /* stream system initialize */ - m_ymf262 = ymf278b_init(this, clock(), m_rate); - if (!m_ymf262) - throw emu_fatalerror("ymf278b_device(%s): Error creating YMF262 chip", tag()); - - /* YMF262 setup */ - ymf262_set_timer_handler (m_ymf262, ymf278b_device::static_timer_handler, this); - ymf262_set_irq_handler (m_ymf262, ymf278b_device::static_irq_handler, this); - ymf262_set_update_handler(m_ymf262, ymf278b_device::static_update_request, this); + m_fm.save(*this); } @@ -1056,7 +940,6 @@ : device_t(mconfig, YMF278B, tag, owner, clock) , device_sound_interface(mconfig, *this) , device_rom_interface(mconfig, *this) - , m_irq_handler(*this) - , m_last_fm_data(0) + , m_fm(*this) { } diff -Nru mame-0.230+dfsg.1/src/devices/sound/ymf278b.h mame-0.231+dfsg.1/src/devices/sound/ymf278b.h --- mame-0.230+dfsg.1/src/devices/sound/ymf278b.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/sound/ymf278b.h 2021-04-27 15:32:05.000000000 +0000 @@ -6,24 +6,31 @@ #pragma once #include "dirom.h" +#include "sound/ymfm.h" class ymf278b_device : public device_t, public device_sound_interface, public device_rom_interface<22> { public: + static constexpr u8 STATUS_BUSY = 0x01; + static constexpr u8 STATUS_LD = 0x02; + + // YMF278B is OPL4 + using fm_engine = ymopl4_engine; + + // constructor ymf278b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // configuration helpers - auto irq_handler() { return m_irq_handler.bind(); } + auto irq_handler() { return m_fm.irq_handler(); } + // read/write access u8 read(offs_t offset); void write(offs_t offset, u8 data); protected: // device-level overrides - virtual void device_post_load() override; virtual void device_start() override; virtual void device_reset() override; - virtual void device_stop() override; virtual void device_clock_changed() override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; @@ -81,20 +88,12 @@ void compute_freq_step(YMF278BSlot *slot); void compute_envelope(YMF278BSlot *slot); void irq_check(); - void A_w(uint8_t reg, uint8_t data); - void B_w(uint8_t reg, uint8_t data); - void retrigger_note(YMF278BSlot *slot); + void retrigger_sample(YMF278BSlot *slot); void C_w(uint8_t reg, uint8_t data); void timer_busy_start(int is_pcm); void precompute_rate_tables(); void register_save_state(); - void update_request() { m_stream->update(); } - - static void static_irq_handler(device_t *param, int irq) { } - static void static_timer_handler(device_t *param, int c, const attotime &period) { } - static void static_update_request(device_t *param, int interval) { downcast(param)->update_request(); } - // internal state uint8_t m_pcmregs[256]; YMF278BSlot m_slots[24]; @@ -102,20 +101,16 @@ int8_t m_memmode; int32_t m_memadr; - uint8_t m_status_busy, m_status_ld; emu_timer *m_timer_busy; emu_timer *m_timer_ld; - uint8_t m_exp; int32_t m_fm_l, m_fm_r; int32_t m_pcm_l, m_pcm_r; - attotime m_timer_base; - uint8_t m_timer_a_count, m_timer_b_count; - uint8_t m_enable, m_current_irq; - int m_irq_line; + uint32_t m_fm_pos; uint8_t m_port_C, m_port_AB, m_lastport; + bool m_next_status_id; // precomputed tables uint32_t m_lut_ar[64]; // attack rate @@ -124,17 +119,14 @@ int m_pan_left[16],m_pan_right[16]; // pan volume offsets int32_t m_mix_level[8]; - emu_timer *m_timer_a, *m_timer_b; int m_clock; int m_rate; sound_stream * m_stream; std::vector m_mix_buffer; - devcb_write_line m_irq_handler; - uint8_t m_last_fm_data; // ymf262 - void *m_ymf262; + fm_engine m_fm; }; DECLARE_DEVICE_TYPE(YMF278B, ymf278b_device) diff -Nru mame-0.230+dfsg.1/src/devices/sound/ymfm.cpp mame-0.231+dfsg.1/src/devices/sound/ymfm.cpp --- mame-0.230+dfsg.1/src/devices/sound/ymfm.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/sound/ymfm.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -8,96 +8,332 @@ #define LOG_OUTPUT_FUNC osd_printf_verbose #include "logmacro.h" + +//********************************************************* +// DEBUGGING +//********************************************************* + +// set this mask to only play certain channels +constexpr u32 global_chanmask = 0xffffffff; + + // -// This emulator is written from the ground-up based on analysis and deduction -// by Nemesis, particularly in this thread: +// ONE FM CORE TO RULE THEM ALL +// +// This emulator is written from the ground-up using the analysis and deduction +// by Nemesis as a starting point, particularly in this thread: // // https://gendev.spritesmind.net/forum/viewtopic.php?f=24&t=386 // -// The core assumption is that these details apply to all OPN variants unless +// The core assumption is that these details apply to all FM variants unless // otherwise proven incorrect. // // The fine details of this implementation have also been cross-checked against // Nemesis' implementation in his Exodus emulator, as well as Alexey Khokholov's -// "Nuked" implementation based off die shots. +// "Nuked" implementations based off die shots. // // Operator and channel summing/mixing code is largely based off of research // done by David Viens and Hubert Lamontagne. // // Search for QUESTION to find areas where I am unsure. // -// =================================================================================== // -// OPN pedigree: +// FAMILIES // -// +--------++-----------------++------------------++--------------------------+ -// broad catgeory: | OPN || OPNA || OPNB || OPN2 | -// +--------++--------+--------++--------+---------++--------+--------+--------+ -// chip ID: | YM2203 || YM2608 | YMF288 || YM2610 | YM2610B || YM2612 | YM3438 | YMF276 | -// +--------++--------+--------++--------+---------++--------+--------+--------+ -// aka: | OPN || OPNA | OPN3 || OPNB | OPNB2 || OPN2 | OPN2C | OPN2L | -// FM channels: | 3 || 6 | 6 || 4 | 6 || 6 | 6 | 6 | -//AY-3-8910 channels: | 3 || 3 | 3 || 3 | 3 || - | - | - | -// ADPCM-A channels: | - || 6 int | 6 int || 6 ext | 6 ext || - | - | - | -// ADPCM-B channels: | - || 1 ext | - || 1 ext | 1 ext || - | - | - | -// Channel 6 "DAC": | no || no | no || no | no || yes | yes | yes | -// Clock divider: | 6/3/2 || 6/3/2 | 6/3/2 || 6 | 6 || 6 | 6 | 6 | -// Stereo: | no || yes | yes || yes | yes || yes | yes | yes | -// DAC: | 10.3fp || 16-bit | 16-bit || 16-bit | 16-bit || 9-bit | 9-bit | 16-bit | -// Summing: | adder || adder | adder || adder | adder || muxer | muxer | adder | -// LFO: | no || yes | yes || yes | yes || yes | yes | yes | -// +--------++--------+--------++--------+---------++--------+--------+--------+ +// The Yamaha FM chips can be broadly categoried into families: // -// =================================================================================== +// OPM (YM2151) +// OPN (YM2203) +// OPNA/OPNB/OPN2 (YM2608, YM2610, YM2610B, YM2612, YM3438, YMF276, YMF288) +// OPL (YM3526) +// OPL2 (YM3812) +// OPLL (YM2413, YM2423, YMF281, DS1001, and others) +// OPL3 (YMF262, YMF278) +// +// All of these families are very closely related, and the ymfm engine +// implemented below is designed to be universal to work across all of +// these families. +// +// Of course, each variant has its own register maps, features, and +// implementation details which need to be sorted out. Thus, each +// significant variant listed above is represented by a register class. The +// register class contains: +// +// * constants describing core parameters and features +// * mappers between operators and channels +// * generic fetchers that return normalized values across families +// * family-specific helper functions +// +// +// FAMILY HISTORY +// +// OPM started it all off, featuring: +// - 8 FM channels, 4 operators each +// - LFO and noise support +// - Stereo output +// +// OPM -> OPN changes: +// - Reduced to 3 FM channels, 4 operators each +// - Removed LFO and noise support +// - Mono output +// - Integrated AY-8910 compatible PSG +// - Added SSG-EG envelope mode +// - Added multi-frequency mode: ch. 3 operators can have separate frequencies +// - Software controlled clock divider +// +// OPN -> OPNA changes: +// - Increased to 6 FM channels, 4 operators each +// - Added back (a cut-down) LFO +// - Stereo output again +// - Removed software controlled divider on later versions (OPNB/OPN2) +// - Removed PSG on OPN2 models +// +// OPNA -> OPL changes: +// - Increased to 9 FM channels, but only 2 operators each +// - Even more simplified LFO +// - Mono output +// - Removed PSG +// - Removed SSG-EG envelope modes +// - Removed multi-frequency modes +// - Fixed clock divider +// - Built-in ryhthm generation +// +// OPL -> OPL2 changes: +// - Added 4 selectable waveforms +// +// OPL2 -> OPLL changes: +// - Vastly simplified register map +// - 15 built-in instruments, plus built-in rhythm instruments +// - 1 user-controlled instrument +// +// OPL2 -> OPL3 changes: +// - Increased to 18 FM channels, 2 operators each +// - 4 output channels +// - Increased to 8 selectable waveforms +// - 6 channels can be configured to use 4 operators +// +// +// CHANNELS AND OPERATORS +// +// The polyphony of a given chip is determined by the number of channels +// it supports. This number ranges from as low as 3 to as high as 18. +// Each channel has either 2 or 4 operators that can be combined in a +// myriad of ways. On most chips the number of operators per channel is +// fixed; however, some later OPL chips allow this to be toggled between +// 2 and 4 at runtime. +// +// The base ymfm engine class maintains an array of channels and operators, +// while the relationship between the two is described by the register +// class. +// +// +// REGISTERS +// +// Registers on the Yamaha chips are generally write-only, and can be divided +// into three distinct categories: +// +// * system-wide registers +// * channel-specific registers +// * operator-specific registers +// +// For maximum flexibility, most parameters can be configured at the operator +// level, with channel-level registers controlling details such as how to +// combine the operators into the final output. System-wide registers are +// used to control chip-wide modes and manage onboard timer functions. +// +// Note that since registers are write-only, some implementations will use +// "holes" in the register space to store additional values that may be +// needed. +// +// +// STATUS AND TIMERS +// +// Generically, all chips (except OPLL) support two timers that can be +// programmed to fire and signal IRQs. These timers also set bits in the +// status register. The behavior of these bits is shared across all +// implementations, even if the exact bit positions shift (this is controlled +// by constants in the registers class). +// +// In addition, several chips incorporate ADPCM decoders which also may set +// bits in the same status register. For this reason, it is possible to +// control various bits in the status register via the set_reset_status() +// function directly. Any active bits that are set and which are not masked +// (mask is controlled by set_irq_mask()), lead to an IRQ being signalled. +// +// Thus, it is possible for the chip-specific implementations to set the +// mask and control the status register bits such that IRQs are signalled +// via the same mechanism as timer signals. +// +// In addition, the OPM and OPN families have a "busy" flag, which is set +// after each write, indicating that another write should not be performed. +// Historically, the duration of this flag was constant and had nothing to +// do with the internals of the chip. However, since the details can +// potentially vary chip-to-chip, it is the chip's responsibility after any +// operation to call set_busy_end() with the attotime of when the busy +// signal should be released. +// +// +// CLOCKING +// +// Each of the Yamaha chips works by cycling through all operators one at +// a time. Thus, the effective output rate of the chips is related to the +// input clock divided by the number of operators. In addition, the input +// clock is prescaled by an amount. Generally, this is a fixed value, though +// some early OPN chips allow this to be selected at runtime from a small +// number of values. +// +// +// CHANNEL FREQUENCIES +// +// One major difference between OPM and later families is in how frequencies +// are specified. OPM specifies frequency via a 3-bit 'block' (aka octave), +// combined with a 4-bit 'key code' (note number) and a 6-bit 'key fraction'. +// The key code and fraction are converted on the chip into an x.11 fixed- +// point value and then shifted by the block to produce the final step value +// for the phase. +// +// Later families, on the other hand, specify frequencies via a 3-bit 'block' +// just as on OPM, but combined with a 9, 10, or 11-bit 'frequency number' +// or 'fnum', which is directly shifted by the block to produce the step +// value. So essentially, later chips make the user do the conversion from +// note value to phase increment, while OPM is programmed in a more 'musical' +// way, specifying notes and cents. +// +// Interally, this is abstracted away into a 'block_freq' value, which is a +// 16-bit value containing the block and frequency info concatenated together +// as follows: +// +// OPM: [3-bit block]:[4-bit keycode]:[6-bit fraction] = 13 bits total +// +// OPN: [3-bit block]:[11-bit fnum] = 14 bits total +// OPL: [3-bit block]:[10-bit fnum]:0 = 14 bits total +// OPLL: [3-bit block]:[ 9-bit fnum]:00 = 14 bits total +// +// Template specialization in functions that interpret the 'block_freq' value +// is used to deconstruct it appropriately (specifically, see clock_phase). +// +// +// LOW FREQUENCY OSCILLATOR (LFO) +// +// The LFO engines are different in several key ways. The OPM LFO engine is +// fairly intricate. It has a 4.4 floating-point rate which allows for a huge +// range of frequencies, and can select between four different waveforms +// (sawtooth, square, triangle, or noise). Separate 7-bit depth controls for +// AM and PM control the amount of modulation applied in each case. This +// global LFO value is then further controlled at the channel level by a 2-bit +// AM sensitivity and a 3-bit PM sensitivity, and each operator has a 1-bit AM +// on/off switch. +// +// For OPN the LFO engine was removed entirely, but a limited version was put +// back in OPNA and later chips. This stripped-down version offered only a +// 3-bit rate setting (versus the 4.4 floating-point rate in OPN), and no +// depth control. It did bring back the channel-level sensitivity controls and +// the operator-level on/off control. +// +// For OPL, the LFO is simplified again, with AM and PM running at fixed +// frequencies, and simple enable flags at the operator level for each +// controlling their application. +// +// +// DIFFERENCES BETWEEN FAMILIES +// +// The table below provides some high level functional differences between the +// differnet families: +// +// +--------++-----------------++-----------------------------------+ +// family: | OPM || OPN || OPL | +// +--------++--------+--------++--------+--------+--------+--------+ +// subfamily: | OPM || OPN | OPNA || OPL | OPL2 | OPLL | OPL3 | +// +--------++--------+--------++--------+--------+--------+--------+ +// outputs: | 2 || 1 | 2 || 1 | 1 | 1 | 4 | +// channels: | 8 || 3 | 6 || 9 | 9 | 9 | 18 | +// operators: | 32 || 12 | 24 || 18 | 18 | 18 | 36 | +// waveforms: | 1 || 1 | 1 || 1 | 4 | 2 | 8 | +// instruments: | no || no | no || yes | yes | yes | yes | +// ryhthm: | no || no | no || no | no | yes | no | +// dynamic ops: | no || no | no || no | no | no | yes | +// prescale: | 2 || 2/3/6 | 2/3/6 || 4 | 4 | 4 | 8 | +// EG divider: | 3 || 3 | 3 || 1 | 1 | 1 | 1 | +// EG DP: | no || no | no || no | no | yes | no | +// EG SSG: | no || yes | yes || no | no | no | no | +// mod delay: | no || no | no || yes | yes | yes? | no | +// CSM: | yes || ch 2 | ch 2 || yes | yes | yes | no | +// LFO: | yes || no | yes || yes | yes | yes | yes | +// noise: | yes || no | no || no | no | no | no | +// +--------++--------+--------++--------+--------+--------+--------+ +// +// Outputs represents the number of output channels: 1=mono, 2=stereo, 4=stereo+. +// Channels represents the number of independent FM channels. +// Operators represents the number of operators, or "slots" which are assembled +// into the channels. +// Waveforms represents the number of different sine-derived waveforms available. +// Instruments indicates whether the family has built-in instruments. +// Rhythm indicates whether the family has a built-in rhythm +// Dynamic ops indicates whether it is possible to switch between 2-operator and +// 4-operator modes dynamically. +// Prescale specifies the default clock divider; some chips allow this to be +// controlled via register writes. +// EG divider represents the divider applied to the envelope generator clock. +// EG DP indicates whether the envelope generator includes a DP (depress?) phase +// at the beginning of each key on. +// SSG EG indicates whether the envelope generator has SSG-style support. +// Mod delay indicates whether the connection to the first modulator's input is +// delayed by 1 sample. +// CSM indicates whether CSM mode is supported, triggered by timer A. +// LFO indicates whether LFO is supported. +// Noise indicates whether one of the operators can be replaced with a noise source. +// +// +// CHIP SPECIFICS +// +// While OPM is its own thing, the OPN and OPL families have quite a few specific +// implementations, with many differing details beyond the core FM parts. Here are +// some details on the OPN family: +// +// +--------++--------+--------++--------+---------++--------+--------+--------+ +// chip ID: | YM2203 || YM2608 | YMF288 || YM2610 | YM2610B || YM2612 | YM3438 | YMF276 | +// +--------++--------+--------++--------+---------++--------+--------+--------+ +// aka: | OPN || OPNA | OPN3 || OPNB | OPNB2 || OPN2 | OPN2C | OPN2L | +// FM: | 3 || 6 | 6 || 4 | 6 || 6 | 6 | 6 | +// AY-8910: | 3 || 3 | 3 || 3 | 3 || - | - | - | +// ADPCM-A: | - || 6 int | 6 int || 6 ext | 6 ext || - | - | - | +// ADPCM-B: | - || 1 ext | - || 1 ext | 1 ext || - | - | - | +// DAC: | no || no | no || no | no || yes | yes | yes | +// output: | 10.3fp || 16-bit | 16-bit || 16-bit | 16-bit || 9-bit | 9-bit | 16-bit | +// summing: | adder || adder | adder || adder | adder || muxer | muxer | adder | +// +--------++--------+--------++--------+---------++--------+--------+--------+ +// +// FM represents the number of FM channels available. +// AY-8910 represents the number of AY-8910-compatible channels that are built in. +// ADPCM-A represents the number of internal/external ADPCM-A channels present. +// ADPCM-B represents the number of internal/external ADPCM-B channels present. +// DAC indicates if a directly-accessible DAC output exists, replacing one channel. +// Output indicates the output format to the final DAC. +// Summing indicates whether channels are added or time divided in the output. +// +// OPL has a similar trove of chip variants: // -// From OPM to OPN: -// - FM Channels reduced from 8 to 3 -// - Stereo removed, Hardware LFO removed, Channel 8 noise removed -// - Hardware pitch table removed, coarse detune removed, pitch calculation is different -// - 3 square wave channels added (GI AY-3–8910 compatible) -// - SSG-EG envelope mode added (lets you do AY style looping envelopes on FM ops) -// - Channel 3 can have different frequency for each op -// - CSM only applies to channel 3 -// - Register map is different -// - Operator timing is different. Channel 1 and 2 have very different timing. -// - OPN’s hardware FM clock divider can be changed from /6 (default) to /2 or /3 -// -// From OPN to OPNA: -// - Channels doubled from 3 to 6 -// - Added hardware LFO (different from OPM) -// - OPNA is stereo -// - OPNA uses a full 16bit dac instead of a 10:3bit dac. -// - 6 ADPCM-A drum channels added (play from built-in rom only) -// and 1 variable rate ADPCM-B channel (streaming from a small RAM). -// - Operator timing is different. All channels have the same timing on OPNA -// (roughly the same timing as Channel 3 on OPN), except for Channel 6 when -// set to algorithm 8. -// - Frequency calculation is 1 bit less precise and can wrap. -// - All carrier output values / 2 (this makes carrier output 13 bits instead -// of 14 bits) -// -// OPNB/OPNB2 is a OPNA that uses external ROM for the 6 ADPCM-A channels and the -// ADPCM-B channel. ADPCM-A and ADPCM-B use different buses and different ADPCM -// encodings. OPNB(2) doesn’t have a changeable divider (always /6). OPNB has 4 FM -// channels only (ch. 1 and 4 removed), OPNB2 has 6 channels. -// -// From OPNA to OPN2: -// - Removed GI AY-3–8910 channels and drums and streaming ADPCM -// - Operator timing is different. All channels have the same timing on OPN2. -// - Removed changeable divider (always /6) -// - Carrier output values / 32 instead of / 2 (carriers output 9 bits, down -// from 13 bits) -// - Built-in 9bit dac, uses analog mixing (time division multiplexing). The -// dac has a large gap between values 0 and -1 (resulting in the ladder effect). -// - Ch6 “DAC” mode. -// -// From OPN2 to OPN2C: -// - The DAC is more linear (no gap between 0 and -1). -// -// From OPN2C to OPN2L: -// - Carrier output is different (full 14 bits instead of 9 bits, narrowed to -// 13 on ch. mix) -// - Uses external DAC (16bit stereo), no analog mixing +// +--------+---------++--------++--------++--------++---------+ +// chip ID: | YM3526 | Y8950 || YM3812 || YM2413 || YMF262 || YMF278B | +// +--------+---------++--------++--------++--------++---------+ +// aka: | OPL |MSX-AUDIO|| OPL2 || OPLL || OPL3 || OPL4 | +// FM: | 9 | 9 || 9 || 9 || 18 || 18 | +// ADPCM-B: | - | 1 ext || - || - || - || - | +// wavetable: | - | - || - || - || - || 24 | +// instruments: | no | no || no || yes || no || no | +// output: | 10.3fp | 10.3fp || 10.3fp || 9-bit || 16-bit || 16-bit | +// summing: | adder | adder || adder || muxer || adder || adder | +// +--------+---------++--------++--------++--------++---------+ +// +// FM represents the number of FM channels available. +// ADPCM-B represents the number of external ADPCM-B channels present. +// Wavetable indicates the number of wavetable channels present. +// Instruments indicates that the chip has built-in instrument selection. +// Output indicates the output format to the final DAC. +// Summing indicates whether channels are added or time divided in the output. +// +// There are several close variants of the YM2413 with different sets of built- +// in instruments. These include the YM2423, YMF281, and DS1001 (aka Konami VRC7). // // =================================================================================== // @@ -137,7 +373,7 @@ // attenuation value, in 4.8 fixed point format //------------------------------------------------- -inline u16 abs_sin_attenuation(u16 input) +inline u32 abs_sin_attenuation(u32 input) { // the values here are stored as 4.8 logarithmic values for 1/4 phase // this matches the internal format of the OPN chip, extracted from the die @@ -177,32 +413,54 @@ // linear volume //------------------------------------------------- -inline u16 attenuation_to_volume(u16 input) +inline u32 attenuation_to_volume(u32 input) { // the values here are 10-bit mantissas with an implied leading bit // this matches the internal format of the OPN chip, extracted from the die + + // as a nod to performance, the implicit 0x400 bit is pre-incorporated, and + // the values are left-shifted by 2 so that a simple right shift is all that + // is needed; also the order is reversed to save a NOT on the input +#define X(a) ((a | 0x400) << 2) static u16 const s_power_table[256] = { - 0x000,0x003,0x006,0x008,0x00b,0x00e,0x011,0x014,0x016,0x019,0x01c,0x01f,0x022,0x025,0x028,0x02a, - 0x02d,0x030,0x033,0x036,0x039,0x03c,0x03f,0x042,0x045,0x048,0x04b,0x04e,0x051,0x054,0x057,0x05a, - 0x05d,0x060,0x063,0x066,0x069,0x06c,0x06f,0x072,0x075,0x078,0x07b,0x07e,0x082,0x085,0x088,0x08b, - 0x08e,0x091,0x094,0x098,0x09b,0x09e,0x0a1,0x0a4,0x0a8,0x0ab,0x0ae,0x0b1,0x0b5,0x0b8,0x0bb,0x0be, - 0x0c2,0x0c5,0x0c8,0x0cc,0x0cf,0x0d2,0x0d6,0x0d9,0x0dc,0x0e0,0x0e3,0x0e7,0x0ea,0x0ed,0x0f1,0x0f4, - 0x0f8,0x0fb,0x0ff,0x102,0x106,0x109,0x10c,0x110,0x114,0x117,0x11b,0x11e,0x122,0x125,0x129,0x12c, - 0x130,0x134,0x137,0x13b,0x13e,0x142,0x146,0x149,0x14d,0x151,0x154,0x158,0x15c,0x160,0x163,0x167, - 0x16b,0x16f,0x172,0x176,0x17a,0x17e,0x181,0x185,0x189,0x18d,0x191,0x195,0x199,0x19c,0x1a0,0x1a4, - 0x1a8,0x1ac,0x1b0,0x1b4,0x1b8,0x1bc,0x1c0,0x1c4,0x1c8,0x1cc,0x1d0,0x1d4,0x1d8,0x1dc,0x1e0,0x1e4, - 0x1e8,0x1ec,0x1f0,0x1f5,0x1f9,0x1fd,0x201,0x205,0x209,0x20e,0x212,0x216,0x21a,0x21e,0x223,0x227, - 0x22b,0x230,0x234,0x238,0x23c,0x241,0x245,0x249,0x24e,0x252,0x257,0x25b,0x25f,0x264,0x268,0x26d, - 0x271,0x276,0x27a,0x27f,0x283,0x288,0x28c,0x291,0x295,0x29a,0x29e,0x2a3,0x2a8,0x2ac,0x2b1,0x2b5, - 0x2ba,0x2bf,0x2c4,0x2c8,0x2cd,0x2d2,0x2d6,0x2db,0x2e0,0x2e5,0x2e9,0x2ee,0x2f3,0x2f8,0x2fd,0x302, - 0x306,0x30b,0x310,0x315,0x31a,0x31f,0x324,0x329,0x32e,0x333,0x338,0x33d,0x342,0x347,0x34c,0x351, - 0x356,0x35b,0x360,0x365,0x36a,0x370,0x375,0x37a,0x37f,0x384,0x38a,0x38f,0x394,0x399,0x39f,0x3a4, - 0x3a9,0x3ae,0x3b4,0x3b9,0x3bf,0x3c4,0x3c9,0x3cf,0x3d4,0x3da,0x3df,0x3e4,0x3ea,0x3ef,0x3f5,0x3fa + X(0x3fa),X(0x3f5),X(0x3ef),X(0x3ea),X(0x3e4),X(0x3df),X(0x3da),X(0x3d4), + X(0x3cf),X(0x3c9),X(0x3c4),X(0x3bf),X(0x3b9),X(0x3b4),X(0x3ae),X(0x3a9), + X(0x3a4),X(0x39f),X(0x399),X(0x394),X(0x38f),X(0x38a),X(0x384),X(0x37f), + X(0x37a),X(0x375),X(0x370),X(0x36a),X(0x365),X(0x360),X(0x35b),X(0x356), + X(0x351),X(0x34c),X(0x347),X(0x342),X(0x33d),X(0x338),X(0x333),X(0x32e), + X(0x329),X(0x324),X(0x31f),X(0x31a),X(0x315),X(0x310),X(0x30b),X(0x306), + X(0x302),X(0x2fd),X(0x2f8),X(0x2f3),X(0x2ee),X(0x2e9),X(0x2e5),X(0x2e0), + X(0x2db),X(0x2d6),X(0x2d2),X(0x2cd),X(0x2c8),X(0x2c4),X(0x2bf),X(0x2ba), + X(0x2b5),X(0x2b1),X(0x2ac),X(0x2a8),X(0x2a3),X(0x29e),X(0x29a),X(0x295), + X(0x291),X(0x28c),X(0x288),X(0x283),X(0x27f),X(0x27a),X(0x276),X(0x271), + X(0x26d),X(0x268),X(0x264),X(0x25f),X(0x25b),X(0x257),X(0x252),X(0x24e), + X(0x249),X(0x245),X(0x241),X(0x23c),X(0x238),X(0x234),X(0x230),X(0x22b), + X(0x227),X(0x223),X(0x21e),X(0x21a),X(0x216),X(0x212),X(0x20e),X(0x209), + X(0x205),X(0x201),X(0x1fd),X(0x1f9),X(0x1f5),X(0x1f0),X(0x1ec),X(0x1e8), + X(0x1e4),X(0x1e0),X(0x1dc),X(0x1d8),X(0x1d4),X(0x1d0),X(0x1cc),X(0x1c8), + X(0x1c4),X(0x1c0),X(0x1bc),X(0x1b8),X(0x1b4),X(0x1b0),X(0x1ac),X(0x1a8), + X(0x1a4),X(0x1a0),X(0x19c),X(0x199),X(0x195),X(0x191),X(0x18d),X(0x189), + X(0x185),X(0x181),X(0x17e),X(0x17a),X(0x176),X(0x172),X(0x16f),X(0x16b), + X(0x167),X(0x163),X(0x160),X(0x15c),X(0x158),X(0x154),X(0x151),X(0x14d), + X(0x149),X(0x146),X(0x142),X(0x13e),X(0x13b),X(0x137),X(0x134),X(0x130), + X(0x12c),X(0x129),X(0x125),X(0x122),X(0x11e),X(0x11b),X(0x117),X(0x114), + X(0x110),X(0x10c),X(0x109),X(0x106),X(0x102),X(0x0ff),X(0x0fb),X(0x0f8), + X(0x0f4),X(0x0f1),X(0x0ed),X(0x0ea),X(0x0e7),X(0x0e3),X(0x0e0),X(0x0dc), + X(0x0d9),X(0x0d6),X(0x0d2),X(0x0cf),X(0x0cc),X(0x0c8),X(0x0c5),X(0x0c2), + X(0x0be),X(0x0bb),X(0x0b8),X(0x0b5),X(0x0b1),X(0x0ae),X(0x0ab),X(0x0a8), + X(0x0a4),X(0x0a1),X(0x09e),X(0x09b),X(0x098),X(0x094),X(0x091),X(0x08e), + X(0x08b),X(0x088),X(0x085),X(0x082),X(0x07e),X(0x07b),X(0x078),X(0x075), + X(0x072),X(0x06f),X(0x06c),X(0x069),X(0x066),X(0x063),X(0x060),X(0x05d), + X(0x05a),X(0x057),X(0x054),X(0x051),X(0x04e),X(0x04b),X(0x048),X(0x045), + X(0x042),X(0x03f),X(0x03c),X(0x039),X(0x036),X(0x033),X(0x030),X(0x02d), + X(0x02a),X(0x028),X(0x025),X(0x022),X(0x01f),X(0x01c),X(0x019),X(0x016), + X(0x014),X(0x011),X(0x00e),X(0x00b),X(0x008),X(0x006),X(0x003),X(0x000) }; +#undef X // look up the fractional part, then shift by the whole - return ((s_power_table[~input & 0xff] | 0x400) << 2) >> (input >> 8); + return s_power_table[input & 0xff] >> (input >> 8); } @@ -214,7 +472,7 @@ // fractional scale factor to decrease by) //------------------------------------------------- -inline u8 attenuation_increment(u8 rate, u8 index) +inline u32 attenuation_increment(u32 rate, u32 index) { static u32 const s_increment_table[64] = { @@ -248,7 +506,7 @@ // we'll keep the simplicity of the table //------------------------------------------------- -inline s8 detune_adjustment(u8 detune, u8 keycode) +inline s32 detune_adjustment(u32 detune, u32 keycode) { static u8 const s_detune_adjustment[32][4] = { @@ -261,7 +519,7 @@ { 0, 5, 11, 16 }, { 0, 6, 12, 17 }, { 0, 6, 13, 19 }, { 0, 7, 14, 20 }, { 0, 8, 16, 22 }, { 0, 8, 16, 22 }, { 0, 8, 16, 22 }, { 0, 8, 16, 22 } }; - s8 result = s_detune_adjustment[keycode][detune & 3]; + s32 result = s_detune_adjustment[keycode][detune & 3]; return BIT(detune, 2) ? -result : result; } @@ -274,7 +532,7 @@ // algorithm written to match Nuked behavior //------------------------------------------------- -inline s16 opn_lfo_pm_phase_adjustment(u8 fnum_bits, u8 pm_sensitivity, s8 lfo_raw_pm) +inline s32 opn_lfo_pm_phase_adjustment(u32 fnum_bits, u32 pm_sensitivity, s32 lfo_raw_pm) { // this table encodes 2 shift values to apply to the top 7 bits // of fnum; it is effectively a cheap multiply by a constant @@ -292,11 +550,11 @@ }; // look up the relevant shifts - s8 abs_pm = (lfo_raw_pm < 0) ? -lfo_raw_pm : lfo_raw_pm; - u8 const shifts = s_lfo_pm_shifts[pm_sensitivity][BIT(abs_pm, 0, 3)]; + s32 abs_pm = (lfo_raw_pm < 0) ? -lfo_raw_pm : lfo_raw_pm; + u32 const shifts = s_lfo_pm_shifts[pm_sensitivity][BIT(abs_pm, 0, 3)]; // compute the adjustment - s16 adjust = (fnum_bits >> BIT(shifts, 0, 4)) + (fnum_bits >> BIT(shifts, 4, 4)); + s32 adjust = (fnum_bits >> BIT(shifts, 0, 4)) + (fnum_bits >> BIT(shifts, 4, 4)); if (pm_sensitivity > 5) adjust <<= pm_sensitivity - 5; adjust >>= 2; @@ -307,13 +565,13 @@ //------------------------------------------------- -// opm_keycode_to_phase_step - converts an +// opm_key_code_to_phase_step - converts an // OPM concatenated block (3 bits), keycode // (4 bits) and key fraction (6 bits) to a 0.10 // phase step, after applying the given delta //------------------------------------------------- -inline u32 opm_keycode_to_phase_step(u16 block_freq, s16 delta) +inline u32 opm_key_code_to_phase_step(u32 block_freq, s32 delta) { // The phase step is essentially the fnum in OPN-speak. To compute this table, // we used the standard formula for computing the frequency of a note, and @@ -323,11 +581,11 @@ // However, the YM2608 manual describes everything in terms of a nominal 8MHz // clock, which produces an FM clock of: // - // 8000000 / 6(channels) / 4(operators) / 6(prescale) = 55555Hz FM clock + // 8000000 / 24(operators) / 6(prescale) = 55555Hz FM clock // // Whereas the descriptions for the YM2151 use a nominal 3.579545MHz clock: // - // 3579545 / 8(channels) / 4(operators) / 2(prescale) = 55930Hz FM clock + // 3579545 / 32(operators) / 2(prescale) = 55930Hz FM clock // // To correct for this, the YM2608 formula was adjusted to use a clock of // 8053920Hz, giving this equation for the fnum: @@ -390,22 +648,22 @@ }; // extract the block (octave) first - u8 block = BIT(block_freq, 10, 3); + u32 block = BIT(block_freq, 10, 3); // the keycode (bits 6-9) is "gappy", mapping 12 values over 16 in each // octave; to correct for this, we multiply the 4-bit value by 3/4 (or // rather subtract 1/4); note that a (invalid) value of 15 will bleed into // the next octave -- this is confirmed - u8 adjusted_code = BIT(block_freq, 6, 4) - BIT(block_freq, 8, 2); + u32 adjusted_code = BIT(block_freq, 6, 4) - BIT(block_freq, 8, 2); // now re-insert the 6-bit fraction - s16 eff_freq = (adjusted_code << 6) | BIT(block_freq, 0, 6); + s32 eff_freq = (adjusted_code << 6) | BIT(block_freq, 0, 6); // now that the gaps are removed, add the delta eff_freq += delta; // handle over/underflow by adjusting the block: - if (u16(eff_freq) >= 768) + if (u32(eff_freq) >= 768) { // minimum delta is -512 (PM), so we can only underflow by 1 octave if (eff_freq < 0) @@ -431,26 +689,67 @@ } +//------------------------------------------------- +// opl_key_scale_atten - converts an +// OPL concatenated block (3 bits) and fnum +// (10 bits) into an attenuation offset; values +// here are for 6dB/octave, in 0.75dB units +// (matching total level LSB) +//------------------------------------------------- + +inline u32 opl_key_scale_atten(u32 block, u32 fnum_4msb) +{ + // this table uses the top 4 bits of FNUM and are the maximal values + // (for when block == 7). Values for other blocks can be computed by + // subtracting 8 for each block below 7. + static u8 const fnum_to_atten[16] = { 0,24,32,37,40,43,45,47,48,50,51,52,53,54,55,56 }; + s32 result = fnum_to_atten[fnum_4msb] - 8 * (block ^ 7); + return std::max(0, result); +} + + //********************************************************* -// YMFM OPERATOR +// OPM SPECIFICS //********************************************************* //------------------------------------------------- -// ymfm_operator - constructor +// ymopm_registers - constructor //------------------------------------------------- -template -ymfm_operator::ymfm_operator(RegisterType regs) : - m_phase(0), - m_env_attenuation(0x3ff), - m_env_state(ENV_RELEASE), - m_ssg_inverted(false), - m_key_state(0), - m_keyon(0), - m_csm_triggered(0), - m_regs(regs) +ymopm_registers::ymopm_registers() : + m_lfo_counter(0), + m_noise_lfsr(1), + m_noise_counter(0), + m_noise_state(0), + m_noise_lfo(0), + m_lfo_am(0) { + // create the waveforms + for (int index = 0; index < WAVEFORM_LENGTH; index++) + m_waveform[0][index] = abs_sin_attenuation(index) | (BIT(index, 9) << 15); + + // create the LFO waveforms; AM in the low 8 bits, PM in the upper 8 + // waveforms are adjusted to match the pictures in the application manual + for (int index = 0; index < LFO_WAVEFORM_LENGTH; index++) + { + // waveform 0 is a sawtooth + u8 am = index ^ 0xff; + s8 pm = s8(index); + m_lfo_waveform[0][index] = am | (pm << 8); + + // waveform 1 is a square wave + am = BIT(index, 7) ? 0 : 0xff; + pm = s8(am ^ 0x80); + m_lfo_waveform[1][index] = am | (pm << 8); + + // waveform 2 is a triangle wave + am = BIT(index, 7) ? (index << 1) : ((index ^ 0xff) << 1); + pm = s8(BIT(index, 6) ? am : ~am); + m_lfo_waveform[2][index] = am | (pm << 8); + + // waveform 3 is noise; it is filled in dynamically + } } @@ -458,277 +757,1600 @@ // save - register for save states //------------------------------------------------- -ALLOW_SAVE_TYPE(ymfm_operator::envelope_state); -ALLOW_SAVE_TYPE(ymfm_operator::envelope_state); -ALLOW_SAVE_TYPE(ymfm_operator::envelope_state); - -template -void ymfm_operator::save(device_t &device, u8 index) +void ymopm_registers::save(device_t &device) { - // save our data - device.save_item(YMFM_NAME(m_phase), index); - device.save_item(YMFM_NAME(m_env_attenuation), index); - device.save_item(YMFM_NAME(m_env_state), index); - device.save_item(YMFM_NAME(m_ssg_inverted), index); - device.save_item(YMFM_NAME(m_key_state), index); - device.save_item(YMFM_NAME(m_keyon), index); - device.save_item(YMFM_NAME(m_csm_triggered), index); + device.save_item(YMFM_NAME(m_lfo_counter)); + device.save_item(YMFM_NAME(m_lfo_am)); + device.save_item(YMFM_NAME(m_noise_lfsr)); + device.save_item(YMFM_NAME(m_noise_counter)); + device.save_item(YMFM_NAME(m_noise_state)); + device.save_item(YMFM_NAME(m_noise_lfo)); + device.save_item(YMFM_NAME(m_regdata)); } //------------------------------------------------- -// reset - reset the channel state +// reset - reset to initial state //------------------------------------------------- -template -void ymfm_operator::reset() +void ymopm_registers::reset() { - // reset our data - m_phase = 0; - m_env_attenuation = 0x3ff; - m_env_state = ENV_RELEASE; - m_ssg_inverted = 0; - m_key_state = 0; - m_keyon = 0; - m_csm_triggered = 0; + std::fill_n(&m_regdata[0], REGISTERS, 0); + + // enable output on both channels by default + m_regdata[0x20] = m_regdata[0x21] = m_regdata[0x22] = m_regdata[0x23] = 0xc0; + m_regdata[0x24] = m_regdata[0x25] = m_regdata[0x26] = m_regdata[0x27] = 0xc0; } //------------------------------------------------- -// clock - master clocking function +// operator_map - return an array of operator +// indices for each channel; for OPM this is fixed //------------------------------------------------- -template -void ymfm_operator::clock(u32 env_counter, s8 lfo_raw_pm, u16 block_freq) +void ymopm_registers::operator_map(operator_mapping &dest) const { - // clock the key state - u8 keycode = block_freq_to_keycode(block_freq); - clock_keystate(m_keyon | m_csm_triggered, keycode); - m_csm_triggered = 0; + // Note that the channel index order is 0,2,1,3, so we bitswap the index. + // + // This is because the order in the map is: + // carrier 1, carrier 2, modulator 1, modulator 2 + // + // But when wiring up the connections, the more natural order is: + // carrier 1, modulator 1, carrier 2, modulator 2 + static const operator_mapping s_fixed_map = + { { + operator_list( 0, 16, 8, 24 ), // Channel 0 operators + operator_list( 1, 17, 9, 25 ), // Channel 1 operators + operator_list( 2, 18, 10, 26 ), // Channel 2 operators + operator_list( 3, 19, 11, 27 ), // Channel 3 operators + operator_list( 4, 20, 12, 28 ), // Channel 4 operators + operator_list( 5, 21, 13, 29 ), // Channel 5 operators + operator_list( 6, 22, 14, 30 ), // Channel 6 operators + operator_list( 7, 23, 15, 31 ), // Channel 7 operators + } }; + dest = s_fixed_map; +} - // clock the SSG-EG state (OPN/OPNA) - if (m_regs.ssg_eg_enabled()) - clock_ssg_eg_state(keycode); - // clock the envelope if on an envelope cycle - if (BIT(env_counter, 0, 2) == 0) - clock_envelope(env_counter >> 2, keycode); +//------------------------------------------------- +// write - handle writes to the register array +//------------------------------------------------- - // clock the phase - clock_phase(lfo_raw_pm, block_freq); +bool ymopm_registers::write(u16 index, u8 data, u32 &channel, u32 &opmask) +{ + assert(index < REGISTERS); + + // LFO AM/PM depth are written to the same register (0x19); + // redirect the PM depth to an unused neighbor (0x1a) + if (index == 0x19) + m_regdata[index + BIT(data, 7)] = data; + else if (index != 0x1a) + m_regdata[index] = data; + + // handle writes to the key on index + if (index == 0x08) + { + channel = BIT(data, 0, 3); + opmask = BIT(data, 3, 4); + return true; + } + return false; } //------------------------------------------------- -// compute_volume - compute the 14-bit signed -// volume of this operator, given a phase -// modulation and an AM LFO offset +// clock_noise_and_lfo - clock the noise and LFO, +// handling clock division, depth, and waveform +// computations //------------------------------------------------- -template -s16 ymfm_operator::compute_volume(u16 modulation, u16 am_offset) const +s32 ymopm_registers::clock_noise_and_lfo() { - // early out if the envelope is effectively off - if (m_env_attenuation > ENV_QUIET) - return 0; + // base noise frequency is measured at 2x 1/2 FM frequency; this + // means each tick counts as two steps against the noise counter + u32 freq = noise_frequency(); + for (int rep = 0; rep < 2; rep++) + { + // evidence seems to suggest the LFSR is clocked continually and just + // sampled at the noise frequency for output purposes; note that the + // low 8 bits are the most recent 8 bits of history while bits 8-24 + // contain the 17 bit LFSR state + m_noise_lfsr <<= 1; + m_noise_lfsr |= BIT(m_noise_lfsr, 17) ^ BIT(m_noise_lfsr, 14) ^ 1; - // start with the upper 10 bits of the phase value plus modulation - // the low 10 bits of this result represents a full 2*PI period over - // the full sin wave - u16 phase = (m_phase >> 10) + modulation; + // compare against the frequency and latch when we exceed it + if (m_noise_counter++ >= freq) + { + m_noise_counter = 0; + m_noise_state = BIT(m_noise_lfsr, 17); + } + } - // get the absolute value of the sin, as attenuation, as a 4.8 fixed point value - u16 sin_attenuation = abs_sin_attenuation(phase); + // treat the rate as a 4.4 floating-point step value with implied + // leading 1; this matches exactly the frequencies in the application + // manual, though it might not be implemented exactly this way on chip + u32 rate = lfo_rate(); + m_lfo_counter += (0x10 | BIT(rate, 0, 4)) << BIT(rate, 4, 4); + u32 lfo = BIT(m_lfo_counter, 22, 8); - // get the attenuation from the evelope generator as a 4.6 value, shifted up to 4.8 - u16 env_attenuation = envelope_attenuation(am_offset) << 2; + // fill in the noise entry 1 ahead of our current position; this + // ensures the current value remains stable for a full LFO clock + // and effectively latches the running value when the LFO advances + u32 lfo_noise = BIT(m_noise_lfsr, 17, 8); + m_lfo_waveform[3][(lfo + 1) & 0xff] = lfo_noise | (lfo_noise << 8); + + // fetch the AM/PM values based on the waveform; AM is unsigned and + // encoded in the low 8 bits, while PM signed and encoded in the upper + // 8 bits + s32 ampm = m_lfo_waveform[lfo_waveform()][lfo]; - // combine into a 5.8 value, then convert from attenuation to 13-bit linear volume - s16 result = attenuation_to_volume(sin_attenuation + env_attenuation); + // apply depth to the AM value and store for later + m_lfo_am = ((ampm & 0xff) * lfo_am_depth()) >> 7; - // negate if in the negative part of the sin wave (sign bit gives 14 bits) - return BIT(phase, 9) ? -result : result; + // apply depth to the PM value and return it + return ((ampm >> 8) * s32(lfo_pm_depth())) >> 7; } //------------------------------------------------- -// compute_noise_volume - compute the 14-bit -// signed noise volume of this operator, given a -// noise input value and an AM offset +// lfo_am_offset - return the AM offset from LFO +// for the given channel //------------------------------------------------- -template -s16 ymfm_operator::compute_noise_volume(u8 noise_state, u16 am_offset) const +u32 ymopm_registers::lfo_am_offset(u32 choffs) const { - // application manual says the logarithmic transform is not applied here, so we - // just use the raw envelope attenuation, inverted (since 0 attenuation should be - // maximum), and shift it up from a 10-bit value to an 11-bit value - u16 result = (envelope_attenuation(am_offset) ^ 0x3ff) << 1; + // OPM maps AM quite differently from OPN - // QUESTION: is AM applied still? + // shift value for AM sensitivity is [*, 0, 1, 2], + // mapping to values of [0, 23.9, 47.8, and 95.6dB] + u32 am_sensitivity = ch_lfo_am_sens(choffs); + if (am_sensitivity == 0) + return 0; - // negate based on the noise state - return BIT(noise_state, 0) ? -result : result; + // QUESTION: see OPN note below for the dB range mapping; it applies + // here as well + + // raw LFO AM value on OPM is 0-FF, which is already a factor of 2 + // larger than the OPN below, putting our staring point at 2x theirs; + // this works out since our minimum is 2x their maximum + return m_lfo_am << (am_sensitivity - 1); } //------------------------------------------------- -// block_freq_to_keycode - given a concatenated -// block+frequency value, return the 5-bit keycode +// cache_operator_data - fill the operator cache +// with prefetched data //------------------------------------------------- -// OPM version -template<> -u8 ymfm_operator::block_freq_to_keycode(u16 block_freq) +void ymopm_registers::cache_operator_data(u32 choffs, u32 opoffs, ymfm_opdata_cache &cache) { - // block_freq is block(3b):keycode(4b):keyfrac(6b); the 5-bit keycode - // we want is just the top 5 bits here - return BIT(block_freq, 8, 5); -} + // set up the easy stuff + cache.waveform = &m_waveform[0][0]; -// OPN/OPNA version -template -u8 ymfm_operator::block_freq_to_keycode(u16 block_freq) -{ - // block_freq is block(3b):fnum(11b); the 5-bit keycode uses the top - // 4 bits plus a magic formula for the final bit - u8 keycode = BIT(block_freq, 10, 4) << 1; + // get frequency from the channel + u32 block_freq = cache.block_freq = ch_block_freq(choffs); - // lowest bit is determined by a mix of next lower FNUM bits - // according to this equation from the YM2608 manual: + // compute the keycode: block_freq is: // - // (F11 & (F10 | F9 | F8)) | (!F11 & F10 & F9 & F8) + // BBBCCCCFFFFFF + // ^^^^^ // - // for speed, we just look it up in a 16-bit constant - return keycode | BIT(0xfe80, BIT(block_freq, 7, 4)); -} + // the 5-bit keycode is just the top 5 bits (block + top 2 bits + // of the key code) + u32 keycode = BIT(block_freq, 8, 5); + + // detune adjustment + cache.detune = detune_adjustment(op_detune(opoffs), keycode); + + // multiple value, as an x.1 value (0 means 0.5) + cache.multiple = op_multiple(opoffs) * 2; + if (cache.multiple == 0) + cache.multiple = 1; + + // phase step, or PHASE_STEP_DYNAMIC if PM is active; this depends on + // block_freq, detune, and multiple, so compute it after we've done those + if (lfo_pm_depth() == 0 || ch_lfo_pm_sens(choffs) == 0) + cache.phase_step = compute_phase_step(choffs, opoffs, cache, 0); + else + cache.phase_step = ymfm_opdata_cache::PHASE_STEP_DYNAMIC; + // total level, scaled by 8 + cache.total_level = op_total_level(opoffs) << 3; -//------------------------------------------------- -// effective_rate - return the effective 6-bit -// ADSR rate value after adjusting for keycode -//------------------------------------------------- + // 4-bit sustain level, but 15 means 31 so effectively 5 bits + cache.eg_sustain = op_sustain_level(opoffs); + cache.eg_sustain |= (cache.eg_sustain + 1) & 0x10; + cache.eg_sustain <<= 5; -template -u8 ymfm_operator::effective_rate(u8 rawrate, u8 keycode) -{ - if (rawrate == 0) - return 0; - u8 rate = rawrate * 2 + (keycode >> (m_regs.ksr() ^ 3)); - return (rate < 64) ? rate : 63; + // determine KSR adjustment for enevlope rates + u32 ksrval = keycode >> (op_ksr(opoffs) ^ 3); + cache.eg_rate[YMFM_ENV_ATTACK] = effective_rate(op_attack_rate(opoffs) * 2, ksrval); + cache.eg_rate[YMFM_ENV_DECAY] = effective_rate(op_decay_rate(opoffs) * 2, ksrval); + cache.eg_rate[YMFM_ENV_SUSTAIN] = effective_rate(op_sustain_rate(opoffs) * 2, ksrval); + cache.eg_rate[YMFM_ENV_RELEASE] = effective_rate(op_release_rate(opoffs) * 4 + 2, ksrval); + cache.eg_rate[YMFM_ENV_DEPRESS] = 0x3f; } //------------------------------------------------- -// start_attack - start the attack phase; called -// when a keyon happens or when an SSG-EG cycle -// is complete and restarts +// compute_phase_step - compute the phase step //------------------------------------------------- -template -void ymfm_operator::start_attack(u8 keycode) +u32 ymopm_registers::compute_phase_step(u32 choffs, u32 opoffs, ymfm_opdata_cache const &cache, s32 lfo_raw_pm) { - // don't change anything if already in attack state - if (m_env_state == ENV_ATTACK) - return; - m_env_state = ENV_ATTACK; - - // generally not inverted at start, except if SSG-EG is - // enabled and one of the inverted modes is specified - m_ssg_inverted = m_regs.ssg_eg_enabled() & BIT(m_regs.ssg_eg_mode(), 2); + // OPM logic is rather unique here, due to extra detune + // and the use of key codes (not to be confused with keycode) - // reset the phase when we start an attack - m_phase = 0; - - // if the attack rate >= 62 then immediately go to max attenuation - if (effective_rate(m_regs.attack_rate(), keycode) >= 62) - m_env_attenuation = 0; + // start with coarse detune delta; table uses cents value from + // manual, converted into 1/64ths + static const s16 s_detune2_delta[4] = { 0, (600*64+50)/100, (781*64+50)/100, (950*64+50)/100 }; + s32 delta = s_detune2_delta[op_detune2(opoffs)]; - // log key on events under certain conditions - if (m_regs.lfo_waveform() == 3 && m_regs.lfo_enabled() && ((m_regs.lfo_am_enabled() && m_regs.lfo_am_sensitivity() != 0) || m_regs.lfo_pm_sensitivity() != 0)) + // add in the PM delta + u32 pm_sensitivity = ch_lfo_pm_sens(choffs); + if (pm_sensitivity != 0) { - LOG("KeyOn %d.%d: freq=%04X dt2=%d fb=%d alg=%d dt=%d mul=%X tl=%02X ksr=%d adsr=%02X/%02X/%02X/%X sl=%X pan=%c%c", - m_regs.chnum(), m_regs.opnum(), - m_regs.block_freq(), - m_regs.detune2(), - m_regs.feedback(), - m_regs.algorithm(), - m_regs.detune(), - m_regs.multiple(), - m_regs.total_level(), - m_regs.ksr(), - m_regs.attack_rate(), - m_regs.decay_rate(), - m_regs.sustain_rate(), - m_regs.release_rate(), - m_regs.sustain_level(), - m_regs.pan_left() ? 'L' : '-', - m_regs.pan_right() ? 'R' : '-'); - if (m_regs.ssg_eg_enabled()) - LOG(" ssg=%X", m_regs.ssg_eg_mode()); - if (m_regs.lfo_enabled() && ((m_regs.lfo_am_enabled() && m_regs.lfo_am_sensitivity() != 0) || m_regs.lfo_pm_sensitivity() != 0)) - LOG(" am=%d pm=%d w=%d", m_regs.lfo_am_enabled() ? m_regs.lfo_am_sensitivity() : 0, m_regs.lfo_pm_sensitivity(), m_regs.lfo_waveform()); - if (m_regs.noise_enabled() && m_regs.opnum() == 3 && m_regs.chnum() == 7) - LOG(" noise=1"); - LOG("\n"); + // raw PM value is -127..128 which is +/- 200 cents + // manual gives these magnitudes in cents: + // 0, +/-5, +/-10, +/-20, +/-50, +/-100, +/-400, +/-700 + // this roughly corresponds to shifting the 200-cent value: + // 0 >> 5, >> 4, >> 3, >> 2, >> 1, << 1, << 2 + if (pm_sensitivity < 6) + delta += lfo_raw_pm >> (6 - pm_sensitivity); + else + delta += lfo_raw_pm << (pm_sensitivity - 5); } + + // apply delta and convert to a frequency number + u32 phase_step = opm_key_code_to_phase_step(cache.block_freq, delta); + + // apply detune based on the keycode + phase_step += cache.detune; + + // apply frequency multiplier (which is cached as an x.1 value) + return (phase_step * cache.multiple) >> 1; } //------------------------------------------------- -// start_release - start the release phase; -// called when a keyoff happens +// log_keyon - log a key-on event //------------------------------------------------- -template -void ymfm_operator::start_release() +void ymopm_registers::log_keyon(u32 choffs, u32 opoffs) { - // don't change anything if already in release state - if (m_env_state == ENV_RELEASE) + u32 chnum = choffs; + u32 opnum = opoffs; + + // don't log masked channels + if (((global_chanmask >> chnum) & 1) == 0) return; - m_env_state = ENV_RELEASE; - // adjust attenuation if inverted due to SSG-EG - if (m_ssg_inverted) - m_env_attenuation = 0x200 - m_env_attenuation; + LOG("%d.%02d freq=%04X dt2=%d dt=%d fb=%d alg=%X mul=%X tl=%02X ksr=%d adsr=%02X/%02X/%02X/%X sl=%X out=%c%c", + chnum, opnum, + ch_block_freq(choffs), + op_detune2(opoffs), + op_detune(opoffs), + ch_feedback(choffs), + ch_algorithm(choffs), + op_multiple(opoffs), + op_total_level(opoffs), + op_ksr(opoffs), + op_attack_rate(opoffs), + op_decay_rate(opoffs), + op_sustain_rate(opoffs), + op_release_rate(opoffs), + op_sustain_level(opoffs), + ch_output_0(choffs) ? 'L' : '-', + ch_output_1(choffs) ? 'R' : '-'); + + bool am = (lfo_am_depth() != 0 && ch_lfo_am_sens(choffs) != 0 && op_lfo_am_enable(opoffs) != 0); + if (am) + LOG(" am=%d/%02X", ch_lfo_am_sens(choffs), lfo_am_depth()); + bool pm = (lfo_pm_depth() != 0 && ch_lfo_pm_sens(choffs) != 0); + if (pm) + LOG(" pm=%d/%02X", ch_lfo_pm_sens(choffs), lfo_pm_depth()); + if (am || pm) + LOG(" lfo=%02X/%c", lfo_rate(), "WQTN"[lfo_waveform()]); + if (noise_enable() && opoffs == 31) + LOG(" noise=1"); } +//********************************************************* +// OPN/OPNA SPECIFICS +//********************************************************* + //------------------------------------------------- -// clock_keystate - clock the keystate to match -// the incoming keystate +// ymopn_registers_base - constructor //------------------------------------------------- -template -void ymfm_operator::clock_keystate(u8 keystate, u8 keycode) +template +ymopn_registers_base::ymopn_registers_base() : + m_lfo_counter(0), + m_lfo_am(0) { - assert(keystate == 0 || keystate == 1); + // create the waveforms + for (int index = 0; index < WAVEFORM_LENGTH; index++) + m_waveform[0][index] = abs_sin_attenuation(index) | (BIT(index, 9) << 15); +} - // has the key changed? - if ((keystate ^ m_key_state) != 0) - { - m_key_state = keystate; - // if the key has turned on, start the attack - if (keystate != 0) - start_attack(keycode); +//------------------------------------------------- +// save - register for save states +//------------------------------------------------- - // otherwise, start the release - else - start_release(); +template +void ymopn_registers_base::save(device_t &device) +{ + if (IsOpnA) + { + device.save_item(YMFM_NAME(m_lfo_counter)); + device.save_item(YMFM_NAME(m_lfo_am)); } + device.save_item(YMFM_NAME(m_regdata)); } //------------------------------------------------- -// clock_ssg_eg_state - clock the SSG-EG state; -// should only be called if SSG-EG is enabled +// reset - reset to initial state //------------------------------------------------- -template -void ymfm_operator::clock_ssg_eg_state(u8 keycode) +template +void ymopn_registers_base::reset() { - // work only happens once the attenuation crosses above 0x200 + std::fill_n(&m_regdata[0], REGISTERS, 0); + if (IsOpnA) + { + // enable output on both channels by default + m_regdata[0xb4] = m_regdata[0xb5] = m_regdata[0xb6] = 0xc0; + m_regdata[0x1b4] = m_regdata[0x1b5] = m_regdata[0x1b6] = 0xc0; + } +} + + +//------------------------------------------------- +// operator_map - return an array of operator +// indices for each channel; for OPN this is fixed +//------------------------------------------------- + +template<> +void ymopn_registers_base::operator_map(operator_mapping &dest) const +{ + // Note that the channel index order is 0,2,1,3, so we bitswap the index. + // + // This is because the order in the map is: + // carrier 1, carrier 2, modulator 1, modulator 2 + // + // But when wiring up the connections, the more natural order is: + // carrier 1, modulator 1, carrier 2, modulator 2 + static const operator_mapping s_fixed_map = + { { + operator_list( 0, 6, 3, 9 ), // Channel 0 operators + operator_list( 1, 7, 4, 10 ), // Channel 1 operators + operator_list( 2, 8, 5, 11 ), // Channel 2 operators + } }; + dest = s_fixed_map; +} + +template<> +void ymopn_registers_base::operator_map(operator_mapping &dest) const +{ + // Note that the channel index order is 0,2,1,3, so we bitswap the index. + // + // This is because the order in the map is: + // carrier 1, carrier 2, modulator 1, modulator 2 + // + // But when wiring up the connections, the more natural order is: + // carrier 1, modulator 1, carrier 2, modulator 2 + static const operator_mapping s_fixed_map = + { { + operator_list( 0, 6, 3, 9 ), // Channel 0 operators + operator_list( 1, 7, 4, 10 ), // Channel 1 operators + operator_list( 2, 8, 5, 11 ), // Channel 2 operators + operator_list( 12, 18, 15, 21 ), // Channel 3 operators + operator_list( 13, 19, 16, 22 ), // Channel 4 operators + operator_list( 14, 20, 17, 23 ), // Channel 5 operators + } }; + dest = s_fixed_map; +} + + +//------------------------------------------------- +// write - handle writes to the register array +//------------------------------------------------- + +template +bool ymopn_registers_base::write(u16 index, u8 data, u32 &channel, u32 &opmask) +{ + assert(index < REGISTERS); + + // writes in the 0xa0-af/0x1a0-af region are handled as latched pairs + // borrow unused registers 0xb8-bf/0x1b8-bf as temporary holding locations + if ((index & 0xf0) == 0xa0) + { + u32 latchindex = 0xb8 | (BIT(index, 3) << 2) | BIT(index, 0, 2); + if (IsOpnA) + latchindex |= index & 0x100; + + // writes to the upper half just latch (only low 6 bits matter) + if (BIT(index, 2)) + m_regdata[latchindex] = data | 0x80; + + // writes to the lower half only commit if the latch is there + else if (BIT(m_regdata[latchindex], 7)) + { + m_regdata[index | 4] = m_regdata[latchindex] & 0x3f; + m_regdata[latchindex] = 0; + } + } + + // everything else is normal + m_regdata[index] = data; + + // handle writes to the key on index + if (index == 0x28) + { + channel = BIT(data, 0, 2); + if (channel == 3) + return false; + if (IsOpnA) + channel += BIT(data, 2, 1) * 3; + opmask = BIT(data, 4, 4); + return true; + } + return false; +} + + +//------------------------------------------------- +// clock_noise_and_lfo - clock the noise and LFO, +// handling clock division, depth, and waveform +// computations +//------------------------------------------------- + +template +s32 ymopn_registers_base::clock_noise_and_lfo() +{ + // OPN has no noise generation + + // if LFO not enabled (not present on OPN), quick exit with 0s + if (!IsOpnA || !lfo_enable()) + { + m_lfo_counter = 0; + m_lfo_am = 0; + return 0; + } + + // this table is based on converting the frequencies in the applications + // manual to clock dividers, based on the assumption of a 7-bit LFO value + static u8 const lfo_max_count[8] = { 109, 78, 72, 68, 63, 45, 9, 6 }; + u32 subcount = u8(m_lfo_counter++); + + // when we cross the divider count, add enough to zero it and cause an + // increment at bit 8; the 7-bit value lives from bits 8-14 + if (subcount >= lfo_max_count[lfo_rate()]) + m_lfo_counter += subcount ^ 0xff; + + // AM value is 7 bits, staring at bit 8; grab the low 6 directly + m_lfo_am = BIT(m_lfo_counter, 8, 6); + + // first half of the AM period (bit 6 == 0) is inverted + if (BIT(m_lfo_counter, 8+6) == 0) + m_lfo_am ^= 0x3f; + + // PM value is 5 bits, starting at bit 10; grab the low 3 directly + s32 pm = BIT(m_lfo_counter, 10, 3); + + // PM is reflected based on bit 3 + if (BIT(m_lfo_counter, 10+3)) + pm ^= 7; + + // PM is negated based on bit 4 + return BIT(m_lfo_counter, 10+4) ? -pm : pm; +} + + +//------------------------------------------------- +// lfo_am_offset - return the AM offset from LFO +// for the given channel +//------------------------------------------------- + +template +u32 ymopn_registers_base::lfo_am_offset(u32 choffs) const +{ + // shift value for AM sensitivity is [7, 3, 1, 0], + // mapping to values of [0, 1.4, 5.9, and 11.8dB] + u32 am_shift = (1 << (ch_lfo_am_sens(choffs) ^ 3)) - 1; + + // QUESTION: max sensitivity should give 11.8dB range, but this value + // is directly added to an x.8 attenuation value, which will only give + // 126/256 or ~4.9dB range -- what am I missing? The calculation below + // matches several other emulators, including the Nuked implemenation. + + // raw LFO AM value on OPN is 0-3F, scale that up by a factor of 2 + // (giving 7 bits) before applying the final shift + return (m_lfo_am << 1) >> am_shift; +} + + +//------------------------------------------------- +// cache_operator_data - fill the operator cache +// with prefetched data +//------------------------------------------------- + +template +void ymopn_registers_base::cache_operator_data(u32 choffs, u32 opoffs, ymfm_opdata_cache &cache) +{ + // set up the easy stuff + cache.waveform = &m_waveform[0][0]; + + // get frequency from the channel + u32 block_freq = cache.block_freq = ch_block_freq(choffs); + + // if multi-frequency mode is enabled and this is channel 2, + // fetch one of the special frequencies + if (multi_freq() && choffs == 2) + { + if (opoffs == 2) + block_freq = cache.block_freq = multi_block_freq(1); + else if (opoffs == 10) + block_freq = cache.block_freq = multi_block_freq(2); + else if (opoffs == 6) + block_freq = cache.block_freq = multi_block_freq(0); + } + + // compute the keycode: block_freq is: + // + // BBBFFFFFFFFFFF + // ^^^^??? + // + // the 5-bit keycode uses the top 4 bits plus a magic formula + // for the final bit + u32 keycode = BIT(block_freq, 10, 4) << 1; + + // lowest bit is determined by a mix of next lower FNUM bits + // according to this equation from the YM2608 manual: + // + // (F11 & (F10 | F9 | F8)) | (!F11 & F10 & F9 & F8) + // + // for speed, we just look it up in a 16-bit constant + keycode |= BIT(0xfe80, BIT(block_freq, 7, 4)); + + // detune adjustment + cache.detune = detune_adjustment(op_detune(opoffs), keycode); + + // multiple value, as an x.1 value (0 means 0.5) + cache.multiple = op_multiple(opoffs) * 2; + if (cache.multiple == 0) + cache.multiple = 1; + + // phase step, or PHASE_STEP_DYNAMIC if PM is active; this depends on + // block_freq, detune, and multiple, so compute it after we've done those + if (!IsOpnA || lfo_enable() == 0 || ch_lfo_pm_sens(choffs) == 0) + cache.phase_step = compute_phase_step(choffs, opoffs, cache, 0); + else + cache.phase_step = ymfm_opdata_cache::PHASE_STEP_DYNAMIC; + + // total level, scaled by 8 + cache.total_level = op_total_level(opoffs) << 3; + + // 4-bit sustain level, but 15 means 31 so effectively 5 bits + cache.eg_sustain = op_sustain_level(opoffs); + cache.eg_sustain |= (cache.eg_sustain + 1) & 0x10; + cache.eg_sustain <<= 5; + + // determine KSR adjustment for enevlope rates + u32 ksrval = keycode >> (op_ksr(opoffs) ^ 3); + cache.eg_rate[YMFM_ENV_ATTACK] = effective_rate(op_attack_rate(opoffs) * 2, ksrval); + cache.eg_rate[YMFM_ENV_DECAY] = effective_rate(op_decay_rate(opoffs) * 2, ksrval); + cache.eg_rate[YMFM_ENV_SUSTAIN] = effective_rate(op_sustain_rate(opoffs) * 2, ksrval); + cache.eg_rate[YMFM_ENV_RELEASE] = effective_rate(op_release_rate(opoffs) * 4 + 2, ksrval); + cache.eg_rate[YMFM_ENV_DEPRESS] = 0x3f; +} + + +//------------------------------------------------- +// compute_phase_step - compute the phase step +//------------------------------------------------- + +template +u32 ymopn_registers_base::compute_phase_step(u32 choffs, u32 opoffs, ymfm_opdata_cache const &cache, s32 lfo_raw_pm) +{ + // OPN phase calculation has only a single detune parameter + // and uses FNUMs instead of keycodes + + // extract frequency number (low 11 bits of block_freq) + u32 fnum = BIT(cache.block_freq, 0, 11) << 1; + + // if there's a non-zero PM sensitivity, compute the adjustment + u32 pm_sensitivity = ch_lfo_pm_sens(choffs); + if (pm_sensitivity != 0) + { + // apply the phase adjustment based on the upper 7 bits + // of FNUM and the PM depth parameters + fnum += opn_lfo_pm_phase_adjustment(BIT(cache.block_freq, 4, 7), pm_sensitivity, lfo_raw_pm); + + // keep fnum to 12 bits + fnum &= 0xfff; + } + + // apply block shift to compute phase step + u32 block = BIT(cache.block_freq, 11, 3); + u32 phase_step = (fnum << block) >> 2; + + // apply detune based on the keycode + phase_step += cache.detune; + + // clamp to 17 bits in case detune overflows + // QUESTION: is this specific to the YM2612/3438? + phase_step &= 0x1ffff; + + // apply frequency multiplier (which is cached as an x.1 value) + return (phase_step * cache.multiple) >> 1; +} + + +//------------------------------------------------- +// log_keyon - log a key-on event +//------------------------------------------------- + +template +void ymopn_registers_base::log_keyon(u32 choffs, u32 opoffs) +{ + u32 chnum = (choffs & 3) + 3 * BIT(choffs, 8); + u32 opnum = (opoffs & 15) - ((opoffs & 15) / 4) + 12 * BIT(opoffs, 8); + + u32 block_freq = ch_block_freq(choffs); + if (multi_freq() && choffs == 2) + { + if (opoffs == 2) + block_freq = multi_block_freq(1); + else if (opoffs == 10) + block_freq = multi_block_freq(2); + else if (opoffs == 6) + block_freq = multi_block_freq(0); + } + + LOG("%d.%02d freq=%04X dt=%d fb=%d alg=%X mul=%X tl=%02X ksr=%d adsr=%02X/%02X/%02X/%X sl=%X", + chnum, opnum, + block_freq, + op_detune(opoffs), + ch_feedback(choffs), + ch_algorithm(choffs), + op_multiple(opoffs), + op_total_level(opoffs), + op_ksr(opoffs), + op_attack_rate(opoffs), + op_decay_rate(opoffs), + op_sustain_rate(opoffs), + op_release_rate(opoffs), + op_sustain_level(opoffs)); + + if (OUTPUTS > 1) + LOG(" out=%c%c", + ch_output_0(choffs) ? 'L' : '-', + ch_output_1(choffs) ? 'R' : '-'); + if (op_ssg_eg_enable(opoffs)) + LOG(" ssg=%X", op_ssg_eg_mode(opoffs)); + bool am = (lfo_enable() && op_lfo_am_enable(opoffs) && ch_lfo_am_sens(choffs) != 0); + if (am) + LOG(" am=%d", ch_lfo_am_sens(choffs)); + bool pm = (lfo_enable() && ch_lfo_pm_sens(choffs) != 0); + if (pm) + LOG(" pm=%d", ch_lfo_pm_sens(choffs)); + if (am || pm) + LOG(" lfo=%02X", lfo_rate()); + if (multi_freq() && choffs == 2) + LOG(" multi=1"); +} + + +//********************************************************* +// OPL SPECIFICS +//********************************************************* + +//------------------------------------------------- +// ymopl_registers_base - constructor +//------------------------------------------------- + +template +ymopl_registers_base::ymopl_registers_base() : + m_lfo_am_counter(0), + m_lfo_pm_counter(0), + m_noise_lfsr(1), + m_lfo_am(0) +{ + // create the waveforms + for (int index = 0; index < WAVEFORM_LENGTH; index++) + m_waveform[0][index] = abs_sin_attenuation(index) | (BIT(index, 9) << 15); + + if (WAVEFORMS >= 4) + { + u16 zeroval = m_waveform[0][0]; + for (int index = 0; index < WAVEFORM_LENGTH; index++) + { + m_waveform[1][index] = BIT(index, 9) ? zeroval : m_waveform[0][index]; + m_waveform[2][index] = m_waveform[0][index] & 0x7fff; + m_waveform[3][index] = BIT(index, 8) ? zeroval : (m_waveform[0][index] & 0x7fff); + if (WAVEFORMS >= 8) + { + m_waveform[4][index] = BIT(index, 9) ? zeroval : m_waveform[0][index * 2]; + m_waveform[5][index] = BIT(index, 9) ? zeroval : m_waveform[0][(index * 2) & 0x1ff]; + m_waveform[6][index] = BIT(index, 9) << 15; + m_waveform[7][index] = (zeroval - m_waveform[0][(index / 2)]) | (BIT(index, 9) << 15); + } + } + } +} + + +//------------------------------------------------- +// save - register for save states +//------------------------------------------------- + +template +void ymopl_registers_base::save(device_t &device) +{ + device.save_item(YMFM_NAME(m_lfo_am_counter)); + device.save_item(YMFM_NAME(m_lfo_pm_counter)); + device.save_item(YMFM_NAME(m_lfo_am)); + device.save_item(YMFM_NAME(m_noise_lfsr)); + device.save_item(YMFM_NAME(m_regdata)); +} + + +//------------------------------------------------- +// reset - reset to initial state +//------------------------------------------------- + +template +void ymopl_registers_base::reset() +{ + std::fill_n(&m_regdata[0], REGISTERS, 0); +} + + +//------------------------------------------------- +// operator_map - return an array of operator +// indices for each channel; for OPL this is fixed +//------------------------------------------------- + +template +void ymopl_registers_base::operator_map(operator_mapping &dest) const +{ + if (Revision <= 2) + { + // OPL/OPL2 has a fixed map, all 2 operators + static const operator_mapping s_fixed_map = + { { + operator_list( 0, 3 ), // Channel 0 operators + operator_list( 1, 4 ), // Channel 1 operators + operator_list( 2, 5 ), // Channel 2 operators + operator_list( 6, 9 ), // Channel 3 operators + operator_list( 7, 10 ), // Channel 4 operators + operator_list( 8, 11 ), // Channel 5 operators + operator_list( 12, 15 ), // Channel 6 operators + operator_list( 13, 16 ), // Channel 7 operators + operator_list( 14, 17 ), // Channel 8 operators + } }; + dest = s_fixed_map; + } + else + { + // OPL3/OPL4 can be configured for 2 or 4 operators + u32 fourop = fourop_enable(); + + dest.chan[ 0] = BIT(fourop, 0) ? operator_list( 0, 3, 6, 9 ) : operator_list( 0, 3 ); + dest.chan[ 1] = BIT(fourop, 1) ? operator_list( 1, 4, 7, 10 ) : operator_list( 1, 4 ); + dest.chan[ 2] = BIT(fourop, 2) ? operator_list( 2, 5, 8, 11 ) : operator_list( 2, 5 ); + dest.chan[ 3] = BIT(fourop, 0) ? operator_list() : operator_list( 6, 9 ); + dest.chan[ 4] = BIT(fourop, 1) ? operator_list() : operator_list( 7, 10 ); + dest.chan[ 5] = BIT(fourop, 2) ? operator_list() : operator_list( 8, 11 ); + dest.chan[ 6] = operator_list( 12, 15 ); + dest.chan[ 7] = operator_list( 13, 16 ); + dest.chan[ 8] = operator_list( 14, 17 ); + + dest.chan[ 9] = BIT(fourop, 3) ? operator_list( 18, 21, 24, 27 ) : operator_list( 18, 21 ); + dest.chan[10] = BIT(fourop, 4) ? operator_list( 19, 22, 25, 28 ) : operator_list( 19, 22 ); + dest.chan[11] = BIT(fourop, 5) ? operator_list( 20, 23, 26, 29 ) : operator_list( 20, 23 ); + dest.chan[12] = BIT(fourop, 3) ? operator_list() : operator_list( 24, 27 ); + dest.chan[13] = BIT(fourop, 4) ? operator_list() : operator_list( 25, 28 ); + dest.chan[14] = BIT(fourop, 5) ? operator_list() : operator_list( 26, 29 ); + dest.chan[15] = operator_list( 30, 33 ); + dest.chan[16] = operator_list( 31, 34 ); + dest.chan[17] = operator_list( 32, 35 ); + } +} + + +//------------------------------------------------- +// write - handle writes to the register array +//------------------------------------------------- + +template +bool ymopl_registers_base::write(u16 index, u8 data, u32 &channel, u32 &opmask) +{ + assert(index < REGISTERS); + + // writes to the mode register with high bit set ignore the low bits + if (index == REG_MODE && BIT(data, 7) != 0) + m_regdata[index] |= 0x80; + else + m_regdata[index] = data; + + // handle writes to the rhythm keyons + if (index == 0xbd) + { + channel = YMFM_RHYTHM_CHANNEL; + opmask = BIT(data, 5) ? BIT(data, 0, 5) : 0; + return true; + } + + // handle writes to the channel keyons + if ((index & 0xf0) == 0xb0) + { + channel = index & 0x0f; + if (channel < 9) + { + if (IsOpl3Plus) + channel += 9 * BIT(index, 8); + opmask = BIT(data, 5) ? 15 : 0; + return true; + } + } + return false; +} + + +//------------------------------------------------- +// clock_noise_and_lfo - clock the noise and LFO, +// handling clock division, depth, and waveform +// computations +//------------------------------------------------- + +static s32 opl_clock_noise_and_lfo(u32 &noise_lfsr, u16 &lfo_am_counter, u16 &lfo_pm_counter, u8 &lfo_am, u32 am_depth, u32 pm_depth) +{ + // OPL has a 23-bit noise generator for the rhythm section, running at + // a constant rate, used only for percussion input + noise_lfsr <<= 1; + noise_lfsr |= BIT(noise_lfsr, 23) ^ BIT(noise_lfsr, 9) ^ BIT(noise_lfsr, 8) ^ BIT(noise_lfsr, 1); + + // OPL has two fixed-frequency LFOs, one for AM, one for PM + + // the AM LFO has 210*64 steps; at a nominal 50kHz output, + // this equates to a period of 50000/(210*64) = 3.72Hz + u32 am_counter = lfo_am_counter++; + if (am_counter >= 210*64 - 1) + lfo_am_counter = 0; + + // low 8 bits are fractional; depth 0 is divided by 2, while depth 1 is times 2 + int shift = 9 - 2 * am_depth; + + // AM value is the upper bits of the value, inverted across the midpoint + // to produce a triangle + lfo_am = ((am_counter < 105*64) ? am_counter : (210*64+63 - am_counter)) >> shift; + + // the PM LFO has 8192 steps, or a nominal period of 6.1Hz + u32 pm_counter = lfo_pm_counter++; + + // PM LFO is broken into 8 chunks, each lasting 1024 steps; the PM value + // depends on the upper bits of FNUM, so this value is a fraction and + // sign to apply to that value, as a 1.3 value + static s8 const pm_scale[8] = { 8, 4, 0, -4, -8, -4, 0, 4 }; + return pm_scale[BIT(pm_counter, 10, 3)] >> (pm_depth ^ 1); +} + +template +s32 ymopl_registers_base::clock_noise_and_lfo() +{ + return opl_clock_noise_and_lfo(m_noise_lfsr, m_lfo_am_counter, m_lfo_pm_counter, m_lfo_am, lfo_am_depth(), lfo_pm_depth()); +} + + +//------------------------------------------------- +// cache_operator_data - fill the operator cache +// with prefetched data; note that this code is +// also used by ymopna_registers, so it must +// handle upper channels cleanly +//------------------------------------------------- + +template +void ymopl_registers_base::cache_operator_data(u32 choffs, u32 opoffs, ymfm_opdata_cache &cache) +{ + // set up the easy stuff + cache.waveform = &m_waveform[op_waveform(opoffs) % WAVEFORMS][0]; + + // get frequency from the channel + u32 block_freq = cache.block_freq = ch_block_freq(choffs); + + // compute the keycode: block_freq is: + // + // 111 | + // 21098|76543210 + // BBBFF|FFFFFFFF + // ^^^?? + // + // the 4-bit keycode uses the top 3 bits plus one of the next two bits + u32 keycode = BIT(block_freq, 10, 3) << 1; + + // lowest bit is determined by note_select(); note that it is + // actually reversed from what the manual says, however + keycode |= BIT(block_freq, 9 - note_select(), 1); + + // no detune adjustment on OPL + cache.detune = 0; + + // multiple value, as an x.1 value (0 means 0.5) + // replace the low bit with a table lookup to give 0,1,2,3,4,5,6,7,8,9,10,10,12,12,15,15 + u32 multiple = op_multiple(opoffs); + cache.multiple = ((multiple & 0xe) | BIT(0xc2aa, multiple)) * 2; + if (cache.multiple == 0) + cache.multiple = 1; + + // phase step, or PHASE_STEP_DYNAMIC if PM is active; this depends on block_freq, detune, + // and multiple, so compute it after we've done those + if (op_lfo_pm_enable(opoffs) == 0) + cache.phase_step = compute_phase_step(choffs, opoffs, cache, 0); + else + cache.phase_step = ymfm_opdata_cache::PHASE_STEP_DYNAMIC; + + // total level, scaled by 8 + cache.total_level = op_total_level(opoffs) << 3; + + // pre-add key scale level + u32 ksl = op_ksl(opoffs); + if (ksl != 0) + cache.total_level += opl_key_scale_atten(BIT(block_freq, 10, 3), BIT(block_freq, 6, 4)) << ksl; + + // 4-bit sustain level, but 15 means 31 so effectively 5 bits + cache.eg_sustain = op_sustain_level(opoffs); + cache.eg_sustain |= (cache.eg_sustain + 1) & 0x10; + cache.eg_sustain <<= 5; + + // determine KSR adjustment for enevlope rates + u32 ksrval = keycode >> (2 * (op_ksr(opoffs) ^ 1)); + cache.eg_rate[YMFM_ENV_ATTACK] = effective_rate(op_attack_rate(opoffs) * 4, ksrval); + cache.eg_rate[YMFM_ENV_DECAY] = effective_rate(op_decay_rate(opoffs) * 4, ksrval); + cache.eg_rate[YMFM_ENV_SUSTAIN] = op_eg_sustain(opoffs) ? 0 : effective_rate(op_release_rate(opoffs) * 4, ksrval); + cache.eg_rate[YMFM_ENV_RELEASE] = effective_rate(op_release_rate(opoffs) * 4, ksrval); + cache.eg_rate[YMFM_ENV_DEPRESS] = 0x3f; +} + + +//------------------------------------------------- +// compute_phase_step - compute the phase step +//------------------------------------------------- + +static u32 opl_compute_phase_step(u32 block_freq, u32 multiple, s32 lfo_raw_pm) +{ + // OPL phase calculation has no detuning, but uses FNUMs like + // the OPN version, and computes PM a bit differently + + // extract frequency number as a 12-bit fraction + u32 fnum = BIT(block_freq, 0, 10) << 2; + + // apply the phase adjustment based on the upper 3 bits + // of FNUM and the PM depth parameters + fnum += (lfo_raw_pm * BIT(block_freq, 7, 3)) >> 1; + + // keep fnum to 12 bits + fnum &= 0xfff; + + // apply block shift to compute phase step + u32 block = BIT(block_freq, 10, 3); + u32 phase_step = (fnum << block) >> 2; + + // apply frequency multiplier (which is cached as an x.1 value) + return (phase_step * multiple) >> 1; +} + +template +u32 ymopl_registers_base::compute_phase_step(u32 choffs, u32 opoffs, ymfm_opdata_cache const &cache, s32 lfo_raw_pm) +{ + return opl_compute_phase_step(cache.block_freq, cache.multiple, op_lfo_pm_enable(opoffs) ? lfo_raw_pm : 0); +} + + +//------------------------------------------------- +// log_keyon - log a key-on event +//------------------------------------------------- + +template +void ymopl_registers_base::log_keyon(u32 choffs, u32 opoffs) +{ + u32 chnum = (choffs & 15) + 9 * BIT(choffs, 8); + u32 opnum = (opoffs & 31) - 2 * ((opoffs & 31) / 8) + 18 * BIT(opoffs, 8); + + LOG("%2d.%02d freq=%04X fb=%d alg=%X mul=%X tl=%02X ksr=%d ns=%d ksl=%d adr=%X/%X/%X sl=%X sus=%d", + chnum, opnum, + ch_block_freq(choffs), + ch_feedback(choffs), + ch_algorithm(choffs), + op_multiple(opoffs), + op_total_level(opoffs), + op_ksr(opoffs), + note_select(), + op_ksl(opoffs), + op_attack_rate(opoffs), + op_decay_rate(opoffs), + op_release_rate(opoffs), + op_sustain_level(opoffs), + op_eg_sustain(opoffs)); + + if (OUTPUTS > 1) + LOG(" out=%c%c%c%c", + ch_output_0(choffs) ? 'L' : '-', + ch_output_1(choffs) ? 'R' : '-', + ch_output_2(choffs) ? '0' : '-', + ch_output_3(choffs) ? '1' : '-'); + if (op_lfo_am_enable(opoffs) != 0) + LOG(" am=%d", lfo_am_depth()); + if (op_lfo_pm_enable(opoffs) != 0) + LOG(" pm=%d", lfo_pm_depth()); + if (waveform_enable() && op_waveform(opoffs) != 0) + LOG(" wf=%d", op_waveform(opoffs)); + if (is_rhythm(choffs)) + LOG(" rhy=1"); + if (DYNAMIC_OPS) + { + operator_mapping map; + operator_map(map); + if (BIT(map.chan[chnum], 16, 8) != 0xff) + LOG(" 4op"); + } +} + + +//********************************************************* +// OPLL SPECIFICS +//********************************************************* + +//------------------------------------------------- +// ymopll_registers - constructor +//------------------------------------------------- + +ymopll_registers::ymopll_registers() : + m_lfo_am_counter(0), + m_lfo_pm_counter(0), + m_noise_lfsr(1), + m_lfo_am(0) +{ + // create the waveforms + for (int index = 0; index < WAVEFORM_LENGTH; index++) + m_waveform[0][index] = abs_sin_attenuation(index) | (BIT(index, 9) << 15); + + u16 zeroval = m_waveform[0][0]; + for (int index = 0; index < WAVEFORM_LENGTH; index++) + m_waveform[1][index] = BIT(index, 9) ? zeroval : m_waveform[0][index]; + + // initialize the instruments to something sane + for (int choffs = 0; choffs < CHANNELS; choffs++) + m_chinst[choffs] = &m_regdata[0]; + for (int opoffs = 0; opoffs < OPERATORS; opoffs++) + m_opinst[opoffs] = &m_regdata[BIT(opoffs, 0)]; +} + + +//------------------------------------------------- +// save - register for save states +//------------------------------------------------- + +void ymopll_registers::save(device_t &device) +{ + device.save_item(YMFM_NAME(m_lfo_am_counter)); + device.save_item(YMFM_NAME(m_lfo_pm_counter)); + device.save_item(YMFM_NAME(m_lfo_am)); + device.save_item(YMFM_NAME(m_noise_lfsr)); + device.save_item(YMFM_NAME(m_regdata)); +} + + +//------------------------------------------------- +// reset - reset to initial state +//------------------------------------------------- + +void ymopll_registers::reset() +{ + std::fill_n(&m_regdata[0], REGISTERS, 0); +} + + +//------------------------------------------------- +// operator_map - return an array of operator +// indices for each channel; for OPLL this is fixed +//------------------------------------------------- + +void ymopll_registers::operator_map(operator_mapping &dest) const +{ + static const operator_mapping s_fixed_map = + { { + operator_list( 0, 1 ), // Channel 0 operators + operator_list( 2, 3 ), // Channel 1 operators + operator_list( 4, 5 ), // Channel 2 operators + operator_list( 6, 7 ), // Channel 3 operators + operator_list( 8, 9 ), // Channel 4 operators + operator_list( 10, 11 ), // Channel 5 operators + operator_list( 12, 13 ), // Channel 6 operators + operator_list( 14, 15 ), // Channel 7 operators + operator_list( 16, 17 ), // Channel 8 operators + } }; + dest = s_fixed_map; +} + + +//------------------------------------------------- +// write - handle writes to the register array; +// note that this code is also used by +// ymopl3_registers, so it must handle upper +// channels cleanly +//------------------------------------------------- + +bool ymopll_registers::write(u16 index, u8 data, u32 &channel, u32 &opmask) +{ + // unclear the address is masked down to 6 bits or if writes above + // the register top are ignored; assuming the latter for now + if (index >= REGISTERS) + { + LOG("ymopll write above register area; ignoring: %02X=%02X\n", index, data); + return false; + } + + // write the new data + m_regdata[index] = data; + + // handle writes to the rhythm keyons + if (index == 0x0e) + { + channel = YMFM_RHYTHM_CHANNEL; + opmask = BIT(data, 5) ? BIT(data, 0, 5) : 0; + return true; + } + + // handle writes to the channel keyons + if ((index & 0xf0) == 0x20) + { + channel = index & 0x0f; + if (channel < CHANNELS) + { + opmask = BIT(data, 4) ? 3 : 0; + return true; + } + } + return false; +} + + +//------------------------------------------------- +// clock_noise_and_lfo - clock the noise and LFO, +// handling clock division, depth, and waveform +// computations +//------------------------------------------------- + +s32 ymopll_registers::clock_noise_and_lfo() +{ + // implementation is the same as OPL with fixed depths + return opl_clock_noise_and_lfo(m_noise_lfsr, m_lfo_am_counter, m_lfo_pm_counter, m_lfo_am, 1, 1); +} + + +//------------------------------------------------- +// cache_operator_data - fill the operator cache +// with prefetched data; note that this code is +// also used by ymopna_registers, so it must +// handle upper channels cleanly +//------------------------------------------------- + +void ymopll_registers::cache_operator_data(u32 choffs, u32 opoffs, ymfm_opdata_cache &cache) +{ + // first set up the instrument data + u32 instrument = ch_instrument(choffs); + if (rhythm_enable() && choffs >= 6) + m_chinst[choffs] = &m_instdata[8 * (15 + (choffs - 6))]; + else + m_chinst[choffs] = (instrument == 0) ? &m_regdata[0] : &m_instdata[8 * (instrument - 1)]; + m_opinst[opoffs] = m_chinst[choffs] + BIT(opoffs, 0); + + // set up the easy stuff + cache.waveform = &m_waveform[op_waveform(opoffs) % WAVEFORMS][0]; + + // get frequency from the channel + u32 block_freq = cache.block_freq = ch_block_freq(choffs); + + // compute the keycode: block_freq is: + // + // 11 | + // 1098|76543210 + // BBBF|FFFFFFFF + // ^^^^ + // + // the 4-bit keycode uses the top 4 bits + u32 keycode = BIT(block_freq, 8, 4); + + // no detune adjustment on OPLL + cache.detune = 0; + + // multiple value, as an x.1 value (0 means 0.5) + // replace the low bit with a table lookup to give 0,1,2,3,4,5,6,7,8,9,10,10,12,12,15,15 + u32 multiple = op_multiple(opoffs); + cache.multiple = ((multiple & 0xe) | BIT(0xc2aa, multiple)) * 2; + if (cache.multiple == 0) + cache.multiple = 1; + + // phase step, or PHASE_STEP_DYNAMIC if PM is active; this depends on + // block_freq, detune, and multiple, so compute it after we've done those + if (op_lfo_pm_enable(opoffs) == 0) + cache.phase_step = compute_phase_step(choffs, opoffs, cache, 0); + else + cache.phase_step = ymfm_opdata_cache::PHASE_STEP_DYNAMIC; + + // total level, scaled by 8; for non-rhythm operator 0, this is the total + // level from the instrument data; for other operators it is 4*volume + if (BIT(opoffs, 0) == 1 || (rhythm_enable() && choffs >= 7)) + cache.total_level = op_volume(opoffs) * 4; + else + cache.total_level = ch_total_level(choffs); + cache.total_level <<= 3; + + // pre-add key scale level + u32 ksl = op_ksl(opoffs); + if (ksl != 0) + cache.total_level += opl_key_scale_atten(BIT(block_freq, 9, 3), BIT(block_freq, 5, 4)) << ksl; + + // 4-bit sustain level, but 15 means 31 so effectively 5 bits + cache.eg_sustain = op_sustain_level(opoffs); + cache.eg_sustain |= (cache.eg_sustain + 1) & 0x10; + cache.eg_sustain <<= 5; + + // The envelope diagram in the YM2413 datasheet gives values for these + // in ms from 0->48dB. The attack/decay tables give values in ms from + // 0->96dB, so to pick an equivalent decay rate, we want to find the + // closest match that is 2x the 0->48dB value: + // + // DP = 10ms (0->48db) -> 20ms (0->96db); decay of 12 gives 19.20ms + // RR = 310ms (0->48db) -> 620ms (0->96db); decay of 7 gives 613.76ms + // RS = 1200ms (0->48db) -> 2400ms (0->96db); decay of 5 gives 2455.04ms + // + // The envelope diagram for percussive sounds (eg_sustain() == 0) also uses + // "RR" to mean both the constant RR above and the Release Rate specified in + // the instrument data. In this case, Relief Pitcher's credit sound bears out + // that the Release Rate is used during sustain, and that the constant RR + // (or RS) is used during the release phase. + constexpr u8 DP = 12 * 4; + constexpr u8 RR = 7 * 4; + constexpr u8 RS = 5 * 4; + + // determine KSR adjustment for envelope rates + u32 ksrval = keycode >> (2 * (op_ksr(opoffs) ^ 1)); + cache.eg_rate[YMFM_ENV_DEPRESS] = DP; + cache.eg_rate[YMFM_ENV_ATTACK] = effective_rate(op_attack_rate(opoffs) * 4, ksrval); + cache.eg_rate[YMFM_ENV_DECAY] = effective_rate(op_decay_rate(opoffs) * 4, ksrval); + if (op_eg_sustain(opoffs)) + { + cache.eg_rate[YMFM_ENV_SUSTAIN] = 0; + cache.eg_rate[YMFM_ENV_RELEASE] = ch_sustain(choffs) ? RS : effective_rate(op_release_rate(opoffs) * 4, ksrval); + } + else + { + cache.eg_rate[YMFM_ENV_SUSTAIN] = effective_rate(op_release_rate(opoffs) * 4, ksrval); + cache.eg_rate[YMFM_ENV_RELEASE] = ch_sustain(choffs) ? RS : RR; + } +} + + +//------------------------------------------------- +// compute_phase_step - compute the phase step +//------------------------------------------------- + +u32 ymopll_registers::compute_phase_step(u32 choffs, u32 opoffs, ymfm_opdata_cache const &cache, s32 lfo_raw_pm) +{ + // phase step computation is the same as OPL but the block_freq has one + // more bit, which we shift in + return opl_compute_phase_step(cache.block_freq << 1, cache.multiple, op_lfo_pm_enable(opoffs) ? lfo_raw_pm : 0); +} + + +//------------------------------------------------- +// log_keyon - log a key-on event +//------------------------------------------------- + +void ymopll_registers::log_keyon(u32 choffs, u32 opoffs) +{ + u32 chnum = choffs; + u32 opnum = opoffs; + + LOG("%d.%02d freq=%04X inst=%X fb=%d mul=%X", + chnum, opnum, + ch_block_freq(choffs), + ch_instrument(choffs), + ch_feedback(choffs), + op_multiple(opoffs)); + + if (BIT(opoffs, 0) == 1 || (is_rhythm(choffs) && choffs >= 6)) + LOG(" vol=%X", op_volume(opoffs)); + else + LOG(" tl=%02X", ch_total_level(choffs)); + + LOG(" ksr=%d ksl=%d adr=%X/%X/%X sl=%X sus=%d/%d", + op_ksr(opoffs), + op_ksl(opoffs), + op_attack_rate(opoffs), + op_decay_rate(opoffs), + op_release_rate(opoffs), + op_sustain_level(opoffs), + op_eg_sustain(opoffs), + ch_sustain(choffs)); + + if (op_lfo_am_enable(opoffs)) + LOG(" am=1"); + if (op_lfo_pm_enable(opoffs)) + LOG(" pm=1"); + if (op_waveform(opoffs) != 0) + LOG(" wf=1"); + if (is_rhythm(choffs)) + LOG(" rhy=1"); +} + + +//********************************************************* +// YMFM OPERATOR +//********************************************************* + +//------------------------------------------------- +// ymfm_operator - constructor +//------------------------------------------------- + +template +ymfm_operator::ymfm_operator(ymfm_engine_base &owner, u32 opoffs) : + m_choffs(0), + m_opoffs(opoffs), + m_phase(0), + m_env_attenuation(0x3ff), + m_env_state(YMFM_ENV_RELEASE), + m_ssg_inverted(false), + m_key_state(0), + m_keyon_live(0), + m_regs(owner.regs()), + m_owner(owner) +{ +} + + +//------------------------------------------------- +// save - register for save states +//------------------------------------------------- + +ALLOW_SAVE_TYPE(ymfm_envelope_state); + +template +void ymfm_operator::save(device_t &device, u32 index) +{ + // save our data + device.save_item(YMFM_NAME(m_phase), index); + device.save_item(YMFM_NAME(m_env_attenuation), index); + device.save_item(YMFM_NAME(m_env_state), index); + device.save_item(YMFM_NAME(m_ssg_inverted), index); + device.save_item(YMFM_NAME(m_key_state), index); + device.save_item(YMFM_NAME(m_keyon_live), index); +} + + +//------------------------------------------------- +// reset - reset the channel state +//------------------------------------------------- + +template +void ymfm_operator::reset() +{ + // reset our data + m_phase = 0; + m_env_attenuation = 0x3ff; + m_env_state = YMFM_ENV_RELEASE; + m_ssg_inverted = 0; + m_key_state = 0; + m_keyon_live = 0; +} + + +//------------------------------------------------- +// prepare - prepare for clocking +//------------------------------------------------- + +template +bool ymfm_operator::prepare() +{ + // cache the data + m_regs.cache_operator_data(m_choffs, m_opoffs, m_cache); + + // clock the key state + clock_keystate(u32(m_keyon_live != 0)); + m_keyon_live &= ~(1 << YMFM_KEYON_CSM); + + // we're active until we're quiet after the release + return (m_env_state != YMFM_ENV_RELEASE || m_env_attenuation < ENV_QUIET); +} + + +//------------------------------------------------- +// clock - master clocking function +//------------------------------------------------- + +template +void ymfm_operator::clock(u32 env_counter, s32 lfo_raw_pm) +{ + // clock the SSG-EG state (OPN/OPNA) + if (m_regs.op_ssg_eg_enable(m_opoffs)) + clock_ssg_eg_state(); + + // clock the envelope if on an envelope cycle; env_counter is a x.2 value + if (BIT(env_counter, 0, 2) == 0) + clock_envelope(env_counter >> 2); + + // clock the phase + clock_phase(lfo_raw_pm); +} + + +//------------------------------------------------- +// compute_volume - compute the 14-bit signed +// volume of this operator, given a phase +// modulation and an AM LFO offset +//------------------------------------------------- + +template +s32 ymfm_operator::compute_volume(u32 phase, u32 am_offset) const +{ + // the low 10 bits of phase represents a full 2*PI period over + // the full sin wave + + // early out if the envelope is effectively off + if (m_env_attenuation > ENV_QUIET) + return 0; + + // get the absolute value of the sin, as attenuation, as a 4.8 fixed point value + u32 sin_attenuation = m_cache.waveform[phase & (RegisterType::WAVEFORM_LENGTH - 1)]; + + // get the attenuation from the evelope generator as a 4.6 value, shifted up to 4.8 + u32 env_attenuation = envelope_attenuation(am_offset) << 2; + + // combine into a 5.8 value, then convert from attenuation to 13-bit linear volume + s32 result = attenuation_to_volume((sin_attenuation & 0x7fff) + env_attenuation); + + // negate if in the negative part of the sin wave (sign bit gives 14 bits) + return BIT(sin_attenuation, 15) ? -result : result; +} + + +//------------------------------------------------- +// compute_noise_volume - compute the 14-bit +// signed noise volume of this operator, given a +// noise input value and an AM offset +//------------------------------------------------- + +template +s32 ymfm_operator::compute_noise_volume(u32 am_offset) const +{ + // application manual says the logarithmic transform is not applied here, so we + // just use the raw envelope attenuation, inverted (since 0 attenuation should be + // maximum), and shift it up from a 10-bit value to an 11-bit value + u32 result = (envelope_attenuation(am_offset) ^ 0x3ff) << 1; + + // QUESTION: is AM applied still? + + // negate based on the noise state + return BIT(m_regs.noise_state(), 0) ? -result : result; +} + + +//------------------------------------------------- +// keyonoff - signal a key on/off event +//------------------------------------------------- + +template +void ymfm_operator::keyonoff(u32 on, ymfm_keyon_type type) +{ + m_keyon_live = (m_keyon_live & ~(1 << int(type))) | (BIT(on, 0) << int(type)); +} + + +//------------------------------------------------- +// start_attack - start the attack phase; called +// when a keyon happens or when an SSG-EG cycle +// is complete and restarts +//------------------------------------------------- + +template +void ymfm_operator::start_attack() +{ + // don't change anything if already in attack state + if (m_env_state == YMFM_ENV_ATTACK) + return; + m_env_state = YMFM_ENV_ATTACK; + + // generally not inverted at start, except if SSG-EG is + // enabled and one of the inverted modes is specified + if (RegisterType::EG_HAS_SSG) + m_ssg_inverted = m_regs.op_ssg_eg_enable(m_opoffs) & BIT(m_regs.op_ssg_eg_mode(m_opoffs), 2); + + // reset the phase when we start an attack + m_phase = 0; + + // if the attack rate >= 62 then immediately go to max attenuation + if (m_cache.eg_rate[YMFM_ENV_ATTACK] >= 62) + m_env_attenuation = 0; +} + + +//------------------------------------------------- +// start_release - start the release phase; +// called when a keyoff happens +//------------------------------------------------- + +template +void ymfm_operator::start_release() +{ + // don't change anything if already in release state + if (m_env_state == YMFM_ENV_RELEASE) + return; + m_env_state = YMFM_ENV_RELEASE; + + // adjust attenuation if inverted due to SSG-EG + if (RegisterType::EG_HAS_SSG && m_ssg_inverted) + m_env_attenuation = 0x200 - m_env_attenuation; +} + + +//------------------------------------------------- +// clock_keystate - clock the keystate to match +// the incoming keystate +//------------------------------------------------- + +template +void ymfm_operator::clock_keystate(u32 keystate) +{ + assert(keystate == 0 || keystate == 1); + + // has the key changed? + if ((keystate ^ m_key_state) != 0) + { + m_key_state = keystate; + + // if the key has turned on, start the attack + if (keystate != 0) + { + // log key on events under certain conditions + // if (m_regs.lfo_waveform() == 3 && m_regs.lfo_enable() && ((m_regs.lfo_am_enable() && m_regs.lfo_am_sensitivity() != 0) || m_regs.lfo_pm_sensitivity() != 0)) + // if ((m_regs.rhythm_enable() && m_regs.chnum() >= 6) || + // (m_regs.waveform_enable() && m_regs.waveform() != 0)) + { + LOG("%s: ", m_owner.device().tag(), m_opoffs); + m_regs.log_keyon(m_choffs, m_opoffs); + LOG("\n"); + } + + // OPLL has a DP ("depress"?) state to bring the volume + // down before starting the attack + if (RegisterType::EG_HAS_DEPRESS && m_env_attenuation < 0x200) + m_env_state = YMFM_ENV_DEPRESS; + else + start_attack(); + } + + // otherwise, start the release + else + start_release(); + } +} + + +//------------------------------------------------- +// clock_ssg_eg_state - clock the SSG-EG state; +// should only be called if SSG-EG is enabled +//------------------------------------------------- + +template +void ymfm_operator::clock_ssg_eg_state() +{ + // work only happens once the attenuation crosses above 0x200 if (!BIT(m_env_attenuation, 9)) return; @@ -741,7 +2363,7 @@ // 101: inverted run once, hold low // 110: inverted repeat, alternating between inverted/non-inverted // 111: inverted run once, hold high - u8 mode = m_regs.ssg_eg_mode(); + u32 mode = m_regs.op_ssg_eg_mode(m_opoffs); // hold modes (1/3/5/7) if (BIT(mode, 0)) @@ -751,7 +2373,7 @@ // if holding low (modes 1/5), force the attenuation to maximum // once we're past the attack phase - if (m_env_state != ENV_ATTACK && BIT(mode, 1) == 0) + if (m_env_state != YMFM_ENV_ATTACK && BIT(mode, 1) == 0) m_env_attenuation = 0x3ff; } @@ -762,8 +2384,8 @@ m_ssg_inverted ^= BIT(mode, 1); // restart attack if in decay/sustain states - if (m_env_state == ENV_DECAY || m_env_state == ENV_SUSTAIN) - start_attack(keycode); + if (m_env_state == YMFM_ENV_DECAY || m_env_state == YMFM_ENV_SUSTAIN) + start_attack(); // phase is reset to 0 regardless in modes 0/4 if (BIT(mode, 1) == 0) @@ -771,7 +2393,7 @@ } // in all modes, once we hit release state, attenuation is forced to maximum - if (m_env_state == ENV_RELEASE) + if (m_env_state == YMFM_ENV_RELEASE) m_env_attenuation = 0x3ff; } @@ -782,31 +2404,27 @@ //------------------------------------------------- template -void ymfm_operator::clock_envelope(u16 env_counter, u8 keycode) +void ymfm_operator::clock_envelope(u32 env_counter) { - // if in attack state, see if we hit minimum attenuation - if (m_env_state == ENV_ATTACK && m_env_attenuation == 0) - m_env_state = ENV_DECAY; - - // if in decay state, see if we hit the sustain level - else if (m_env_state == ENV_DECAY) - { - // 4-bit sustain level, but 15 means 31 so effectively 5 bits - u8 target = m_regs.sustain_level(); - target |= (target + 1) & 0x10; - - // bring current attenuation down to 5 bits and compare - if ((m_env_attenuation >> 5) >= target) - m_env_state = ENV_SUSTAIN; - } + // handle attack->decay transitions + if (m_env_state == YMFM_ENV_ATTACK && m_env_attenuation == 0) + m_env_state = YMFM_ENV_DECAY; + + // handle decay->sustain transitions; it is important to do this immediately + // after the attack->decay transition above in the event that the sustain level + // is set to 0 (in which case we will skip right to sustain without doing any + // decay); as an example where this can be heard, check the cymbals sound + // in channel 0 of shinobi's test mode sound #5 + if (m_env_state == YMFM_ENV_DECAY && m_env_attenuation >= m_cache.eg_sustain) + m_env_state = YMFM_ENV_SUSTAIN; - // determine our raw 5-bit rate value - u8 rate = effective_rate(m_regs.adsr_rate(m_env_state), keycode); + // fetch the appropriate 6-bit rate value from the cache + u32 rate = m_cache.eg_rate[m_env_state]; // compute the rate shift value; this is the shift needed to // apply to the env_counter such that it becomes a 5.11 fixed // point number - u8 rate_shift = rate >> 2; + u32 rate_shift = rate >> 2; env_counter <<= rate_shift; // see if the fractional part is 0; if not, it's not time to clock @@ -814,10 +2432,10 @@ return; // determine the increment based on the non-fractional part of env_counter - u8 increment = attenuation_increment(rate, BIT(env_counter, 11, 3)); + u32 increment = attenuation_increment(rate, BIT(env_counter, 11, 3)); // attack is the only one that increases - if (m_env_state == ENV_ATTACK) + if (m_env_state == YMFM_ENV_ATTACK) { // glitch means that attack rates of 62/63 don't increment if // changed after the initial key on (where they are handled @@ -826,112 +2444,45 @@ // QUESTION: this check affects one of the operators on the gng credit sound // is it correct? // QUESTION: does this apply only to YM2612? - if (rate < 62) - m_env_attenuation += (~m_env_attenuation * increment) >> 4; - } - - // all other cases are similar - else - { - // non-SSG-EG cases just apply the increment - if (!m_regs.ssg_eg_enabled()) - m_env_attenuation += increment; - - // SSG-EG only applies if less than mid-point, and then at 4x - else if (m_env_attenuation < 0x200) - m_env_attenuation += 4 * increment; - - // clamp the final attenuation - if (m_env_attenuation >= 0x400) - m_env_attenuation = 0x3ff; - } -} - - -//------------------------------------------------- -// clock_phase - clock the 10.10 phase value; the -// OPN version of the logic has been verified -// against the Nuked phase generator -//------------------------------------------------- - -// OPM version -template<> -void ymfm_operator::clock_phase(s8 lfo_raw_pm, u16 block_freq) -{ - // start with coarse detune delta; table uses cents value from - // manual, converted into 1/64ths - static const s16 s_detune2_delta[4] = { 0, (600*64+50)/100, (781*64+50)/100, (950*64+50)/100 }; - s16 delta = s_detune2_delta[m_regs.detune2()]; - - // add in the PM delta - u8 pm_sensitivity = m_regs.lfo_pm_sensitivity(); - if (pm_sensitivity != 0) - { - // raw PM value is -127..128 which is +/- 200 cents - // manual gives these magnitudes in cents: - // 0, +/-5, +/-10, +/-20, +/-50, +/-100, +/-400, +/-700 - // this roughly corresponds to shifting the 200-cent value: - // 0 >> 5, >> 4, >> 3, >> 2, >> 1, << 1, << 2 - if (pm_sensitivity < 6) - delta += lfo_raw_pm >> (6 - pm_sensitivity); - else - delta += lfo_raw_pm << (pm_sensitivity - 5); - } - - // apply delta and convert to a frequency number - u32 phase_step = opm_keycode_to_phase_step(block_freq, delta); - - // apply detune based on the keycode - phase_step += detune_adjustment(m_regs.detune(), block_freq_to_keycode(block_freq)); - - // QUESTION: do we clamp to 17 bits like YM2612? - - // apply frequency multiplier (0 means 0.5, other values are as-is) - u8 multiple = m_regs.multiple(); - if (multiple == 0) - phase_step >>= 1; - else - phase_step *= multiple; - - // finally apply the step to the current phase value - m_phase += phase_step; -} - -template -void ymfm_operator::clock_phase(s8 lfo_raw_pm, u16 block_freq) -{ - // extract frequency number (low 11 bits of block_freq) - u16 fnum = BIT(block_freq, 0, 11) << 1; + if (rate < 62) + m_env_attenuation += (~m_env_attenuation * increment) >> 4; + } - // if there's a non-zero PM sensitivity, compute the adjustment - u8 pm_sensitivity = m_regs.lfo_pm_sensitivity(); - if (pm_sensitivity != 0) + // all other cases are similar + else { - // apply the phase adjustment based on the upper 7 bits - // of FNUM and the PM depth parameters - fnum += opn_lfo_pm_phase_adjustment(BIT(block_freq, 4, 7), pm_sensitivity, lfo_raw_pm); + // non-SSG-EG cases just apply the increment + if (!m_regs.op_ssg_eg_enable(m_opoffs)) + m_env_attenuation += increment; - // keep fnum to 12 bits - fnum &= 0xfff; - } + // SSG-EG only applies if less than mid-point, and then at 4x + else if (m_env_attenuation < 0x200) + m_env_attenuation += 4 * increment; - // apply block shift to compute phase step - u8 block = BIT(block_freq, 11, 3); - u32 phase_step = (fnum << block) >> 2; + // clamp the final attenuation + if (m_env_attenuation >= 0x400) + m_env_attenuation = 0x3ff; - // apply detune based on the keycode - phase_step += detune_adjustment(m_regs.detune(), block_freq_to_keycode(block_freq)); + // transition from depress to attack + if (RegisterType::EG_HAS_DEPRESS && m_env_state == YMFM_ENV_DEPRESS && m_env_attenuation >= 0x200) + start_attack(); + } +} - // clamp to 17 bits in case detune overflows - // QUESTION: is this specific to the YM2612/3438? - phase_step &= 0x1ffff; - // apply frequency multiplier (0 means 0.5, other values are as-is) - u8 multiple = m_regs.multiple(); - if (multiple == 0) - phase_step >>= 1; - else - phase_step *= multiple; +//------------------------------------------------- +// clock_phase - clock the 10.10 phase value; the +// OPN version of the logic has been verified +// against the Nuked phase generator +//------------------------------------------------- + +template +void ymfm_operator::clock_phase(s32 lfo_raw_pm) +{ + // read from the cache, or recalculate if PM active + u32 phase_step = m_cache.phase_step; + if (phase_step == ymfm_opdata_cache::PHASE_STEP_DYNAMIC) + phase_step = m_regs.compute_phase_step(m_choffs, m_opoffs, m_cache, lfo_raw_pm); // finally apply the step to the current phase value m_phase += phase_step; @@ -944,20 +2495,20 @@ //------------------------------------------------- template -u16 ymfm_operator::envelope_attenuation(u8 am_offset) const +u32 ymfm_operator::envelope_attenuation(u32 am_offset) const { - u16 result = m_env_attenuation; + u32 result = m_env_attenuation; // invert if necessary due to SSG-EG - if (m_ssg_inverted) + if (RegisterType::EG_HAS_SSG && m_ssg_inverted) result = (0x200 - result) & 0x3ff; // add in LFO AM modulation - if (m_regs.lfo_am_enabled()) + if (m_regs.op_lfo_am_enable(m_opoffs)) result += am_offset; - // add in total level - result += m_regs.total_level() << 3; + // add in total level and KSL from the cache + result += m_cache.total_level; // clamp to max and return return (result < 0x400) ? result : 0x3ff; @@ -974,14 +2525,13 @@ //------------------------------------------------- template -ymfm_channel::ymfm_channel(RegisterType regs) : +ymfm_channel::ymfm_channel(ymfm_engine_base &owner, u32 choffs) : + m_choffs(choffs), m_feedback{ 0, 0 }, m_feedback_in(0), - m_op1(regs.operator_registers(0)), - m_op2(regs.operator_registers(1)), - m_op3(regs.operator_registers(2)), - m_op4(regs.operator_registers(3)), - m_regs(regs) + m_op{ nullptr, nullptr, nullptr, nullptr }, + m_regs(owner.regs()), + m_owner(owner) { } @@ -991,17 +2541,11 @@ //------------------------------------------------- template -void ymfm_channel::save(device_t &device, u8 index) +void ymfm_channel::save(device_t &device, u32 index) { // save our data device.save_item(YMFM_NAME(m_feedback), index); device.save_item(YMFM_NAME(m_feedback_in), index); - - // save operator data - m_op1.save(device, index * 4 + 0); - m_op2.save(device, index * 4 + 1); - m_op3.save(device, index * 4 + 2); - m_op4.save(device, index * 4 + 3); } @@ -1015,12 +2559,6 @@ // reset our data m_feedback[0] = m_feedback[1] = 0; m_feedback_in = 0; - - // reset the operators - m_op1.reset(); - m_op2.reset(); - m_op3.reset(); - m_op4.reset(); } @@ -1029,26 +2567,30 @@ //------------------------------------------------- template -void ymfm_channel::keyonoff(u8 states) +void ymfm_channel::keyonoff(u32 states, ymfm_keyon_type type) { - m_op1.keyonoff(BIT(states, 0)); - m_op2.keyonoff(BIT(states, 1)); - m_op3.keyonoff(BIT(states, 2)); - m_op4.keyonoff(BIT(states, 3)); + for (int opnum = 0; opnum < std::size(m_op); opnum++) + if (m_op[opnum] != nullptr) + m_op[opnum]->keyonoff(BIT(states, opnum), type); } //------------------------------------------------- -// keyon_csm - signal CSM key on to our operators +// prepare - prepare for clocking //------------------------------------------------- template -void ymfm_channel::keyon_csm() +bool ymfm_channel::prepare() { - m_op1.keyon_csm(); - m_op2.keyon_csm(); - m_op3.keyon_csm(); - m_op4.keyon_csm(); + u32 active_mask = 0; + + // prepare all operators and determine if they are active + for (int opnum = 0; opnum < std::size(m_op); opnum++) + if (m_op[opnum] != nullptr) + if (m_op[opnum]->prepare()) + active_mask |= 1 << opnum; + + return (active_mask != 0); } @@ -1057,192 +2599,278 @@ //------------------------------------------------- template -void ymfm_channel::clock(u32 env_counter, s8 lfo_raw_pm, bool is_multi_freq) +void ymfm_channel::clock(u32 env_counter, s32 lfo_raw_pm) { - // grab common block/fnum values - u16 block_freq = m_regs.block_freq(); - // clock the feedback through m_feedback[0] = m_feedback[1]; m_feedback[1] = m_feedback_in; - // in multi-frequency mode, the first 3 channels use independent block/fnum values - if (is_multi_freq) - { - m_op1.clock(env_counter, lfo_raw_pm, m_regs.multi_block_freq1()); - m_op2.clock(env_counter, lfo_raw_pm, m_regs.multi_block_freq2()); - m_op3.clock(env_counter, lfo_raw_pm, m_regs.multi_block_freq0()); - } + for (int opnum = 0; opnum < std::size(m_op); opnum++) + if (m_op[opnum] != nullptr) + m_op[opnum]->clock(env_counter, lfo_raw_pm); +} + - // otherwise, all channels use the common block/fnum +//------------------------------------------------- +// output_2op - combine 4 operators according to +// the specified algorithm, returning a sum +// according to the rshift and clipmax parameters, +// which vary between different implementations +//------------------------------------------------- + +template +void ymfm_channel::output_2op(s32 outputs[RegisterType::OUTPUTS], u32 rshift, s32 clipmax) const +{ + // The first 2 operators should be populated + assert(m_op[0] != nullptr); + assert(m_op[1] != nullptr); + + // AM amount is the same across all operators; compute it once + u32 am_offset = m_regs.lfo_am_offset(m_choffs); + + // operator 1 has optional self-feedback + s32 opmod = 0; + u32 feedback = m_regs.ch_feedback(m_choffs); + if (feedback != 0) + opmod = (m_feedback[0] + m_feedback[1]) >> (10 - feedback); + + // compute the 14-bit volume/value of operator 1 and update the feedback + s32 op1value = m_feedback_in = m_op[0]->compute_volume(m_op[0]->phase() + opmod, am_offset); + + // now that the feedback has been computed, skip the rest if all volumes + // are clear; no need to do all this work for nothing + if (m_regs.ch_output_any(m_choffs) == 0) + return; + + // Algorithms for two-operator case: + // 0: O1 -> O2 -> out + // 1: (O1 + O2) -> out + s32 result; + if (BIT(m_regs.ch_algorithm(m_choffs), 0) == 0) + { + // some OPL chips use the previous sample for modulation instead of + // the current sample + opmod = (RegisterType::MODULATOR_DELAY ? m_feedback[1] : op1value) >> 1; + result = m_op[1]->compute_volume(m_op[1]->phase() + opmod, am_offset) >> rshift; + } else { - m_op1.clock(env_counter, lfo_raw_pm, block_freq); - m_op2.clock(env_counter, lfo_raw_pm, block_freq); - m_op3.clock(env_counter, lfo_raw_pm, block_freq); + result = op1value + (m_op[1]->compute_volume(m_op[1]->phase(), am_offset) >> rshift); + s32 clipmin = -clipmax - 1; + result = std::clamp(result, clipmin, clipmax); } - // operator 3 uses the common values in all cases - m_op4.clock(env_counter, lfo_raw_pm, block_freq); + // add to the output + add_to_output(m_choffs, outputs, result); } //------------------------------------------------- -// output - combine the operators according to the -// specified algorithm, returning a sum according -// to the rshift and clipmax parameters, which -// vary between different OPN implementations +// output_4op - combine 4 operators according to +// the specified algorithm, returning a sum +// according to the rshift and clipmax parameters, +// which vary between different implementations //------------------------------------------------- template -void ymfm_channel::output(u8 lfo_raw_am, u8 noise_state, s32 &lsum, s32 &rsum, u8 rshift, s16 clipmax) const +void ymfm_channel::output_4op(s32 outputs[RegisterType::OUTPUTS], u32 rshift, s32 clipmax) const { + // all 4 operators should be populated + assert(m_op[0] != nullptr); + assert(m_op[1] != nullptr); + assert(m_op[2] != nullptr); + assert(m_op[3] != nullptr); + // AM amount is the same across all operators; compute it once - u16 am_offset = lfo_am_offset(lfo_raw_am); + u32 am_offset = m_regs.lfo_am_offset(m_choffs); + + // operator 1 has optional self-feedback + s32 opmod = 0; + u32 feedback = m_regs.ch_feedback(m_choffs); + if (feedback != 0) + opmod = (m_feedback[0] + m_feedback[1]) >> (10 - feedback); + + // compute the 14-bit volume/value of operator 1 and update the feedback + s32 op1value = m_feedback_in = m_op[0]->compute_volume(m_op[0]->phase() + opmod, am_offset); - // Algorithms: - // 0: O1 -> O2 -> O3 -> O4 -> out - // 1: (O1 + O2) -> O3 -> O4 -> out - // 2: (O1 + (O2 -> O3)) -> O4 -> out - // 3: ((O1 -> O2) + O3) -> O4 -> out - // 4: ((O1 -> O2) + (O3 -> O4)) -> out - // 5: ((O1 -> O2) + (O1 -> O3) + (O1 -> O4)) -> out - // 6: ((O1 -> O2) + O3 + O4) -> out - // 7: (O1 + O2 + O3 + O4) -> out + // now that the feedback has been computed, skip the rest if all volumes + // are clear; no need to do all this work for nothing + if (m_regs.ch_output_any(m_choffs) == 0) + return; + + // OPM/OPN offer 8 different connection algorithms for 4 operators, + // and OPL3 offers 4 more, which we designate here as 8-11. // // The operators are computed in order, with the inputs pulled from - // an array of values that is populated as we go: + // an array of values (opout) that is populated as we go: // 0 = 0 // 1 = O1 // 2 = O2 // 3 = O3 - // 4 = O4 + // 4 = (O4) // 5 = O1+O2 // 6 = O1+O3 // 7 = O2+O3 // - // This table encodes for operators 2-4 which of the 8 input values - // above is used: 1 bit for O2 and 3 bits for O3 and O4 - static u8 const s_algorithm_inputs[8] = - { - // OP2 OP3 OP4 - 1 | (2 << 1) | (3 << 4), - 0 | (5 << 1) | (3 << 4), - 0 | (2 << 1) | (6 << 4), - 1 | (0 << 1) | (7 << 4), - 1 | (0 << 1) | (3 << 4), - 1 | (1 << 1) | (1 << 4), - 1 | (0 << 1) | (0 << 4), - 0 | (0 << 1) | (0 << 4) + // The s_algorithm_ops table describes the inputs and outputs of each + // algorithm as follows: + // + // ---------x use opout[x] as operator 2 input + // ------xxx- use opout[x] as operator 3 input + // ---xxx---- use opout[x] as operator 4 input + // --x------- include opout[1] in final sum + // -x-------- include opout[2] in final sum + // x--------- include opout[3] in final sum + #define ALGORITHM(op2in, op3in, op4in, op1out, op2out, op3out) \ + (op2in | (op3in << 1) | (op4in << 4) | (op1out << 7) | (op2out << 8) | (op3out << 9)) + static u16 const s_algorithm_ops[8+4] = + { + ALGORITHM(1,2,3, 0,0,0), // 0: O1 -> O2 -> O3 -> O4 -> out (O4) + ALGORITHM(0,5,3, 0,0,0), // 1: (O1 + O2) -> O3 -> O4 -> out (O4) + ALGORITHM(0,2,6, 0,0,0), // 2: (O1 + (O2 -> O3)) -> O4 -> out (O4) + ALGORITHM(1,0,7, 0,0,0), // 3: ((O1 -> O2) + O3) -> O4 -> out (O4) + ALGORITHM(1,0,3, 0,1,0), // 4: ((O1 -> O2) + (O3 -> O4)) -> out (O2+O4) + ALGORITHM(1,1,1, 0,1,1), // 5: ((O1 -> O2) + (O1 -> O3) + (O1 -> O4)) -> out (O2+O3+O4) + ALGORITHM(1,0,0, 0,1,1), // 6: ((O1 -> O2) + O3 + O4) -> out (O2+O3+O4) + ALGORITHM(0,0,0, 1,1,1), // 7: (O1 + O2 + O3 + O4) -> out (O1+O2+O3+O4) + ALGORITHM(1,2,3, 0,0,0), // 8: O1 -> O2 -> O3 -> O4 -> out (O4) [same as 0] + ALGORITHM(0,2,3, 1,0,0), // 9: (O1 + (O2 -> O3 -> O4)) -> out (O1+O4) [unique] + ALGORITHM(1,0,3, 0,1,0), // 10: ((O1 -> O2) + (O3 -> O4)) -> out (O2+O4) [same as 4] + ALGORITHM(0,2,0, 1,0,1) // 11: (O1 + (O2 -> O3) + O4) -> out (O1+O3+O4) [unique] }; - u8 algorithm = m_regs.algorithm(); - u8 algorithm_inputs = s_algorithm_inputs[algorithm]; + u32 algorithm_ops = s_algorithm_ops[m_regs.ch_algorithm(m_choffs)]; + + // populate the opout table s16 opout[8]; opout[0] = 0; - - // operator 1 has optional self-feedback - s16 modulation = 0; - u8 feedback = m_regs.feedback(); - if (feedback != 0) - modulation = (m_feedback[0] + m_feedback[1]) >> (10 - feedback); - - // compute the 14-bit volume/value of operator 1 and update the feedback - opout[1] = m_feedback_in = m_op1.compute_volume(modulation, am_offset); - - // no that the feedback has been computed, skip the rest if both pans are clear; - // no need to do all this work for nothing - if (m_regs.pan_left() == 0 && m_regs.pan_right() == 0) - return; + opout[1] = op1value; // compute the 14-bit volume/value of operator 2 - opout[2] = m_op2.compute_volume(opout[BIT(algorithm_inputs, 0, 1)] >> 1, am_offset); + opmod = opout[BIT(algorithm_ops, 0, 1)] >> 1; + opout[2] = m_op[1]->compute_volume(m_op[1]->phase() + opmod, am_offset); opout[5] = opout[1] + opout[2]; // compute the 14-bit volume/value of operator 3 - opout[3] = m_op3.compute_volume(opout[BIT(algorithm_inputs, 1, 3)] >> 1, am_offset); + opmod = opout[BIT(algorithm_ops, 1, 3)] >> 1; + opout[3] = m_op[2]->compute_volume(m_op[2]->phase() + opmod, am_offset); opout[6] = opout[1] + opout[3]; opout[7] = opout[2] + opout[3]; // compute the 14-bit volume/value of operator 4; this could be a noise - // value on the OPM - if (noise_state != 0) - opout[4] = m_op4.compute_noise_volume(noise_state, am_offset); + // value on the OPM; all algorithms consume OP4 output at a minimum + s32 result; + if (m_regs.noise_enable() && m_choffs == 7) + result = m_op[3]->compute_noise_volume(am_offset); else - opout[4] = m_op4.compute_volume(opout[BIT(algorithm_inputs, 4, 3)] >> 1, am_offset); + { + opmod = opout[BIT(algorithm_ops, 4, 3)] >> 1; + result = m_op[3]->compute_volume(m_op[3]->phase() + opmod, am_offset); + } + result >>= rshift; - // all algorithms consume OP4 output - s16 result = opout[4] >> rshift; + // optionally add OP1, OP2, OP3 + s32 clipmin = -clipmax - 1; + if (BIT(algorithm_ops, 7) != 0) + result = std::clamp(result + (opout[1] >> rshift), clipmin, clipmax); + if (BIT(algorithm_ops, 8) != 0) + result = std::clamp(result + (opout[2] >> rshift), clipmin, clipmax); + if (BIT(algorithm_ops, 9) != 0) + result = std::clamp(result + (opout[3] >> rshift), clipmin, clipmax); - // algorithms 4-7 add in OP2 output - if (algorithm >= 4) - { - s16 clipmin = -clipmax - 1; - result += opout[2] >> rshift; - result = std::clamp(result, clipmin, clipmax); + // add to the output + add_to_output(m_choffs, outputs, result); +} - // agorithms 5-7 add in OP3 output - if (algorithm >= 5) - { - result += opout[3] >> rshift; - result = std::clamp(result, clipmin, clipmax); - // algorithm 7 adds in OP1 output - if (algorithm == 7) - { - result += opout[1] >> rshift; - result = std::clamp(result, clipmin, clipmax); - } - } - } +//------------------------------------------------- +// output_rhythm_ch6 - special case output +// computation for OPL channel 6 in rhythm mode, +// which outputs a Bass Drum instrument +//------------------------------------------------- + +template +void ymfm_channel::output_rhythm_ch6(s32 outputs[RegisterType::OUTPUTS], u32 rshift, s32 clipmax) const +{ + // AM amount is the same across all operators; compute it once + u32 am_offset = m_regs.lfo_am_offset(m_choffs); + + // Bass Drum: this uses operators 12 and 15 (i.e., channel 6) + // in an almost-normal way, except that if the algorithm is 1, + // the first operator is ignored instead of added in + + // operator 1 has optional self-feedback + s32 opmod = 0; + u32 feedback = m_regs.ch_feedback(m_choffs); + if (feedback != 0) + opmod = (m_feedback[0] + m_feedback[1]) >> (10 - feedback); + + // compute the 14-bit volume/value of operator 1 and update the feedback + s32 opout1 = m_feedback_in = m_op[0]->compute_volume(m_op[0]->phase() + opmod, am_offset); + + // compute the 14-bit volume/value of operator 2, which is the result + opmod = BIT(m_regs.ch_algorithm(m_choffs), 0) ? 0 : (opout1 >> 1); + s32 result = m_op[1]->compute_volume(m_op[1]->phase() + opmod, am_offset) >> rshift; // add to the output - if (m_regs.pan_left()) - lsum += result; - if (m_regs.pan_right()) - rsum += result; + add_to_output(m_choffs, outputs, result * 2); } //------------------------------------------------- -// lfo_am_offset - convert a 6/8-bit raw AM value -// into an amplitude offset based on sensitivity +// output_rhythm_ch7 - special case output +// computation for OPL channel 7 in rhythm mode, +// which outputs High Hat and Snare Drum +// instruments //------------------------------------------------- -// OPM version -template<> -u16 ymfm_channel::lfo_am_offset(u8 lfo_raw_am) const +template +void ymfm_channel::output_rhythm_ch7(u32 phase_select, s32 outputs[RegisterType::OUTPUTS], u32 rshift, s32 clipmax) const { - // shift value for AM sensitivity is [*, 0, 1, 2], - // mapping to values of [0, 23.9, 47.8, and 95.6dB] - u8 am_sensitivity = m_regs.lfo_am_sensitivity(); - if (am_sensitivity == 0) - return 0; + // AM amount is the same across all operators; compute it once + u32 am_offset = m_regs.lfo_am_offset(m_choffs); + u32 noise_state = BIT(m_regs.noise_state(), 0); - // QUESTION: see OPN note below for the dB range mapping; it applies - // here as well + // High Hat: this uses the envelope from operator 13 (channel 7), + // and a combination of noise and the operator 13/17 phase select + // to compute the phase + u32 phase = (phase_select << 9) | (0xd0 >> (2 * (noise_state ^ phase_select))); + s32 result = m_op[0]->compute_volume(phase, am_offset) >> rshift; + + // Snare Drum: this uses the envelope from operator 16 (channel 7), + // and a combination of noise and operator 13 phase to pick a phase + u32 op13phase = m_op[0]->phase(); + phase = (0x100 << BIT(op13phase, 8)) ^ (noise_state << 8); + result += m_op[1]->compute_volume(phase, am_offset) >> rshift; + result = std::clamp(result, -clipmax - 1, clipmax); - // raw LFO AM value on OPM is 0-FF, which is already a factor of 2 - // larger than the OPN below, putting our staring point at 2x theirs; - // this works out since our minimum is 2x their maximum - return lfo_raw_am << (am_sensitivity - 1); + // add to the output + add_to_output(m_choffs, outputs, result * 2); } -// OPN/OPNA version + +//------------------------------------------------- +// output_rhythm_ch8 - special case output +// computation for OPL channel 8 in rhythm mode, +// which outputs Tom Tom and Top Cymbal instruments +//------------------------------------------------- + template -u16 ymfm_channel::lfo_am_offset(u8 lfo_raw_am) const +void ymfm_channel::output_rhythm_ch8(u32 phase_select, s32 outputs[RegisterType::OUTPUTS], u32 rshift, s32 clipmax) const { - // shift value for AM sensitivity is [7, 3, 1, 0], - // mapping to values of [0, 1.4, 5.9, and 11.8dB] - u8 am_shift = (1 << (m_regs.lfo_am_sensitivity() ^ 3)) - 1; + // AM amount is the same across all operators; compute it once + u32 am_offset = m_regs.lfo_am_offset(m_choffs); - // QUESTION: max sensitivity should give 11.8dB range, but this value - // is directly added to an x.8 attenuation value, which will only give - // 126/256 or ~4.9dB range -- what am I missing? The calculation below - // matches several other emulators, including the Nuked implemenation. + // Tom Tom: this is just a single operator processed normally + s32 result = m_op[0]->compute_volume(m_op[0]->phase(), am_offset) >> rshift; - // raw LFO AM value on OPN is 0-3F, scale that up by a factor of 2 - // (giving 7 bits) before applying the final shift - return (lfo_raw_am << 1) >> am_shift; + // Top Cymbal: this uses the envelope from operator 17 (channel 8), + // and the operator 13/17 phase select to compute the phase + u32 phase = 0x100 | (phase_select << 9); + result += m_op[1]->compute_volume(phase, am_offset) >> rshift; + result = std::clamp(result, -clipmax - 1, clipmax); + + // add to the output + add_to_output(m_choffs, outputs, result * 2); } @@ -1259,28 +2887,27 @@ ymfm_engine_base::ymfm_engine_base(device_t &device) : m_device(device), m_env_counter(0), - m_lfo_counter(0), - m_noise_lfsr(0), - m_noise_counter(0), - m_noise_state(0), - m_noise_lfo(0), - m_lfo_am(0), m_status(0), m_clock_prescale(RegisterType::DEFAULT_PRESCALE), m_irq_mask(STATUS_TIMERA | STATUS_TIMERB), m_irq_state(0), - m_active_channels(0xffffffff), - m_modified_channels(0xffffffff), + m_active_channels(ALL_CHANNELS), + m_modified_channels(ALL_CHANNELS), m_prepare_count(0), m_busy_end(attotime::zero), m_timer{ nullptr, nullptr }, - m_irq_handler(device), - m_regdata(RegisterType::REGISTERS), - m_regs(m_regdata) + m_irq_handler(device) { // create the channels - for (int chnum = 0; chnum < RegisterType::CHANNELS; chnum++) - m_channel[chnum] = std::make_unique>(m_regs.channel_registers(chnum)); + for (int chnum = 0; chnum < CHANNELS; chnum++) + m_channel[chnum] = std::make_unique>(*this, RegisterType::channel_offset(chnum)); + + // create the operators + for (int opnum = 0; opnum < OPERATORS; opnum++) + m_operator[opnum] = std::make_unique>(*this, RegisterType::operator_offset(opnum)); + + // do the initial operator assignment + assign_operators(); } @@ -1300,22 +2927,22 @@ // save our data device.save_item(YMFM_NAME(m_env_counter)); - device.save_item(YMFM_NAME(m_lfo_counter)); - device.save_item(YMFM_NAME(m_noise_lfsr)); - device.save_item(YMFM_NAME(m_noise_counter)); - device.save_item(YMFM_NAME(m_noise_state)); - device.save_item(YMFM_NAME(m_noise_lfo)); - device.save_item(YMFM_NAME(m_lfo_am)); device.save_item(YMFM_NAME(m_status)); device.save_item(YMFM_NAME(m_clock_prescale)); device.save_item(YMFM_NAME(m_irq_mask)); device.save_item(YMFM_NAME(m_irq_state)); device.save_item(YMFM_NAME(m_busy_end)); - device.save_item(YMFM_NAME(m_regdata)); + + // save the register/family data + m_regs.save(device); // save channel data - for (int chnum = 0; chnum < RegisterType::CHANNELS; chnum++) + for (int chnum = 0; chnum < CHANNELS; chnum++) m_channel[chnum]->save(device, chnum); + + // save operator data + for (int opnum = 0; opnum < OPERATORS; opnum++) + m_operator[opnum]->save(device, opnum); } @@ -1329,19 +2956,20 @@ // reset all status bits set_reset_status(0, 0xff); - // clear all registers - std::fill_n(&m_regdata[0], m_regdata.size(), 0); + // register type-specific initialization + m_regs.reset(); // explicitly write to the mode register since it has side-effects // QUESTION: old cores initialize this to 0x30 -- who is right? write(RegisterType::REG_MODE, 0); - // register type-specific initialization - m_regs.reset(); - // reset the channels for (auto &chan : m_channel) chan->reset(); + + // reset the operators + for (auto &op : m_operator) + op->reset(); } @@ -1351,39 +2979,41 @@ //------------------------------------------------- template -u32 ymfm_engine_base::clock(u8 chanmask) +u32 ymfm_engine_base::clock(u32 chanmask) { // if something was modified, prepare // also prepare every 4k samples to catch ending notes if (m_modified_channels != 0 || m_prepare_count++ >= 4096) { + // reassign operators to channels if dynamic + if (RegisterType::DYNAMIC_OPS) + assign_operators(); + // call each channel to prepare m_active_channels = 0; - for (int chnum = 0; chnum < RegisterType::CHANNELS; chnum++) + for (int chnum = 0; chnum < CHANNELS; chnum++) if (BIT(chanmask, chnum)) - if (m_channel[chnum]->active()) + if (m_channel[chnum]->prepare()) m_active_channels |= 1 << chnum; // reset the modified channels and prepare count m_modified_channels = m_prepare_count = 0; } - // increment the envelope count; low two bits are the subcount, which - // only counts to 3, so if it reaches 3, count one more time - m_env_counter++; - if (BIT(m_env_counter, 0, 2) == 3) - m_env_counter++; + // if the envelope clock divider is 1, just increment by 4; + // otherwise, increment by 1 and manually wrap when we reach the divide count + if (RegisterType::EG_CLOCK_DIVIDER == 1) + m_env_counter += 4; + else if (BIT(++m_env_counter, 0, 2) == RegisterType::EG_CLOCK_DIVIDER) + m_env_counter += 4 - RegisterType::EG_CLOCK_DIVIDER; // clock the noise generator - clock_noise(); - - // clock the LFO - s8 lfo_raw_pm = clock_lfo(); + s32 lfo_raw_pm = m_regs.clock_noise_and_lfo(); // now update the state of all the channels and operators - for (int chnum = 0; chnum < RegisterType::CHANNELS; chnum++) + for (int chnum = 0; chnum < CHANNELS; chnum++) if (BIT(chanmask, chnum)) - m_channel[chnum]->clock(m_env_counter, lfo_raw_pm, chnum == 2 && m_regs.multi_freq()); + m_channel[chnum]->clock(m_env_counter, lfo_raw_pm); // return the envelope counter as it is used to clock ADPCM-A return m_env_counter; @@ -1396,20 +3026,54 @@ //------------------------------------------------- template -void ymfm_engine_base::output(s32 &lsum, s32 &rsum, u8 rshift, s16 clipmax, u8 chanmask) const +void ymfm_engine_base::output(s32 outputs[RegisterType::OUTPUTS], u32 rshift, s32 clipmax, u32 chanmask) const { + // mask out some channels for debug purposes + chanmask &= global_chanmask; + // mask out inactive channels chanmask &= m_active_channels; - // sum over all the desired channels - for (int chnum = 0; chnum < RegisterType::CHANNELS; chnum++) - if (BIT(chanmask, chnum)) - { - // noise must be non-zero to use noise on OP4, so if it is enabled, - // OR with 2 (since only the LSB is actually checked for the noise state) - u8 noise = (chnum == 7 && m_regs.noise_enabled()) ? (m_noise_state | 2) : 0; - m_channel[chnum]->output(m_lfo_am, noise, lsum, rsum, rshift, clipmax); - } + // handle the rhythm case, where some of the operators are dedicated + // to percussion (this is an OPL-specific feature) + if (m_regs.rhythm_enable()) + { + // we don't support the OPM noise channel here; ensure it is off + assert(m_regs.noise_enable() == 0); + + // precompute the operator 13+17 phase selection value + u32 op13phase = m_operator[13]->phase(); + u32 op17phase = m_operator[17]->phase(); + u32 phase_select = (BIT(op13phase, 2) ^ BIT(op13phase, 7)) | BIT(op13phase, 3) | (BIT(op17phase, 5) ^ BIT(op17phase, 3)); + + // sum over all the desired channels + for (int chnum = 0; chnum < CHANNELS; chnum++) + if (BIT(chanmask, chnum)) + { + if (chnum == 6) + m_channel[chnum]->output_rhythm_ch6(outputs, rshift, clipmax); + else if (chnum == 7) + m_channel[chnum]->output_rhythm_ch7(phase_select, outputs, rshift, clipmax); + else if (chnum == 8) + m_channel[chnum]->output_rhythm_ch8(phase_select, outputs, rshift, clipmax); + else if (m_channel[chnum]->is4op()) + m_channel[chnum]->output_4op(outputs, rshift, clipmax); + else + m_channel[chnum]->output_2op(outputs, rshift, clipmax); + } + } + else + { + // sum over all the desired channels + for (int chnum = 0; chnum < CHANNELS; chnum++) + if (BIT(chanmask, chnum)) + { + if (m_channel[chnum]->is4op()) + m_channel[chnum]->output_4op(outputs, rshift, clipmax); + else + m_channel[chnum]->output_2op(outputs, rshift, clipmax); + } + } } @@ -1428,18 +3092,27 @@ return; } - // most writes are passive, consumed only when needed - m_regs.write(regnum, data); - // for now just mark all channels as modified - m_modified_channels = 0xffffffff; + m_modified_channels = ALL_CHANNELS; - // handle writes to the keyon registers - if (regnum == RegisterType::REG_KEYON) + // most writes are passive, consumed only when needed + u32 keyon_channel; + u32 keyon_opmask; + if (m_regs.write(regnum, data, keyon_channel, keyon_opmask)) { - u8 chnum = m_regs.keyon_channel(); - if (chnum < RegisterType::CHANNELS) - m_channel[chnum]->keyonoff(m_regs.keyon_states()); + // handle writes to the keyon register(s) + if (keyon_channel < CHANNELS) + { + // normal channel on/off + m_channel[keyon_channel]->keyonoff(keyon_opmask, YMFM_KEYON_NORMAL); + } + else if (CHANNELS >= 9 && keyon_channel == RegisterType::YMFM_RHYTHM_CHANNEL) + { + // special case for the OPL rhythm channels + m_channel[6]->keyonoff(BIT(keyon_opmask, 4) ? 3 : 0, YMFM_KEYON_RHYTHM); + m_channel[7]->keyonoff(BIT(keyon_opmask, 0) | (BIT(keyon_opmask, 3) << 1), YMFM_KEYON_RHYTHM); + m_channel[8]->keyonoff(BIT(keyon_opmask, 2) | (BIT(keyon_opmask, 1) << 1), YMFM_KEYON_RHYTHM); + } } } @@ -1452,9 +3125,7 @@ template u8 ymfm_engine_base::status() const { - u8 result = m_status & ~STATUS_BUSY; - - // synthesize the busy flag if we're still busy + u8 result = m_status & ~STATUS_BUSY & ~m_regs.status_mask(); if (m_device.machine().time() < m_busy_end) result |= STATUS_BUSY; return result; @@ -1462,142 +3133,22 @@ //------------------------------------------------- -// clock_lfo - clock the LFO, handling clock -// division, depth, and waveform computations +// assign_operators - get the current mapping of +// operators to channels and assign them all //------------------------------------------------- -// OPM implementation -template<> -s8 ymfm_engine_base::clock_lfo() -{ - // treat the rate as a 4.4 floating-point step value with implied - // leading 1; this matches exactly the frequencies in the application - // manual, though it might not be implemented exactly this way on chip - u8 rate = m_regs.lfo_rate(); - u32 prev_counter = m_lfo_counter; - m_lfo_counter += (0x10 | BIT(rate, 0, 4)) << BIT(rate, 4, 4); - u8 lfo = BIT(m_lfo_counter, 22, 8); - - // compute the AM and PM values based on the waveform - // AM is 8-bit unsigned; PM is 8-bit signed; waveforms are adjusted - // to match the pictures in the application manual - u8 am; - s8 pm; - switch (m_regs.lfo_waveform()) - { - // sawtooth - default: - case 0: - am = lfo ^ 0xff; - pm = lfo; - break; - - // square wave - case 1: - am = BIT(lfo, 7) ? 0 : 0xff; - pm = am ^ 0x80; - break; - - // triangle wave - case 2: - am = BIT(lfo, 7) ? (lfo << 1) : (~lfo << 1); - pm = BIT(lfo, 6) ? am : ~am; - break; - - // noise: - case 3: - // QUESTION: this behavior is surmised but not yet verified: - // LFO noise value is accumulated over 8 bits of LFSR and - // clocked as the LFO value transitions - if (BIT(m_lfo_counter ^ prev_counter, 22, 8) != 0) - m_noise_lfo = m_noise_lfsr & 0xff; - am = m_noise_lfo; - pm = am ^ 0x80; - break; - } - - // apply depth to the AM value and store for later - m_lfo_am = (am * m_regs.lfo_am_depth()) >> 7; - - // apply depth to the PM value and return it - return (pm * m_regs.lfo_pm_depth()) >> 7; -} - -// OPN/OPNA implementation template -s8 ymfm_engine_base::clock_lfo() -{ - // if not enabled, quick exit with 0s - if (!m_regs.lfo_enabled()) - { - m_lfo_counter = 0; - m_lfo_am = 0; - return 0; - } - - // this table is based on converting the frequencies in the applications - // manual to clock dividers, based on the assumption of a 7-bit LFO value - static u8 const lfo_max_count[8] = { 109, 78, 72, 68, 63, 45, 9, 6 }; - u8 subcount = u8(m_lfo_counter++); - - // when we cross the divider count, add enough to zero it and cause an - // increment at bit 8; the 7-bit value lives from bits 8-14 - if (subcount >= lfo_max_count[m_regs.lfo_rate()]) - m_lfo_counter += subcount ^ 0xff; - - // AM value is 7 bits, staring at bit 8; grab the low 6 directly - m_lfo_am = BIT(m_lfo_counter, 8, 6); - - // first half of the AM period (bit 6 == 0) is inverted - if (BIT(m_lfo_counter, 8+6) == 0) - m_lfo_am ^= 0x3f; - - // PM value is 5 bits, starting at bit 10; grab the low 3 directly - s8 pm = BIT(m_lfo_counter, 10, 3); - - // PM is reflected based on bit 3 - if (BIT(m_lfo_counter, 10+3)) - pm ^= 7; - - // PM is negated based on bit 4 - return BIT(m_lfo_counter, 10+4) ? -pm : pm; -} - - -//------------------------------------------------- -// clock_noise - clock the noise generator -//------------------------------------------------- - -// OPM implementation -template<> -void ymfm_engine_base::clock_noise() +void ymfm_engine_base::assign_operators() { - // base noise frequency is measured at 2x 1/2 FM frequency; this means - // each tick counts as two steps against the noise counter - u8 freq = m_regs.noise_frequency(); - for (int rep = 0; rep < 2; rep++) - { - // evidence seems to suggest the LFSR is clocked continually and just - // sampled at the noise frequency for output purposes; clock it here - // twice; note that the low 8 bits are the most recent 8 bits of history - // while bits 8-24 contain the 17 bit LFSR state - m_noise_lfsr >>= 1; - m_noise_lfsr |= (BIT(m_noise_lfsr, 7) ^ BIT(m_noise_lfsr, 10) ^ 1) << 24; + typename RegisterType::operator_mapping map; + m_regs.operator_map(map); - // compare against the frequency and latch when we exceed it - if (m_noise_counter++ >= freq) + for (int chnum = 0; chnum < CHANNELS; chnum++) + for (int index = 0; index < 4; index++) { - m_noise_counter = 0; - m_noise_state = BIT(m_noise_lfsr, 7); + u32 opnum = BIT(map.chan[chnum], 8 * index, 8); + m_channel[chnum]->assign(index, (opnum == 0xff) ? nullptr : m_operator[opnum].get()); } - } -} - -// OPN/OPNA implementation -template -void ymfm_engine_base::clock_noise() -{ - // OPN does not have a noise generator } @@ -1607,13 +3158,13 @@ //------------------------------------------------- template -void ymfm_engine_base::update_timer(u8 tnum, u8 enable) +void ymfm_engine_base::update_timer(u32 tnum, u32 enable) { // if the timer is live, but not currently enabled, set the timer - if (enable && !m_timer[tnum]->enabled()) + if (enable && !m_timer[tnum]->enable()) { - // each timer clock is n channels * 4 operators * prescale factor (2/3/6) - u32 clockscale = RegisterType::CHANNELS * 4 * m_clock_prescale; + // each timer clock is n operators * prescale factor (2/3/6) + u32 clockscale = OPERATORS * m_clock_prescale; // period comes from the registers, and is different for each u32 period = (tnum == 0) ? (1024 - m_regs.timer_a_value()) : 16 * (256 - m_regs.timer_b_value()); @@ -1644,9 +3195,9 @@ // if timer A fired in CSM mode, trigger CSM on all relevant channels if (param == 0 && m_regs.csm()) - for (int chnum = 0; chnum < RegisterType::CHANNELS; chnum++) + for (int chnum = 0; chnum < CHANNELS; chnum++) if (BIT(RegisterType::CSM_TRIGGER_MASK, chnum)) - m_channel[chnum]->keyon_csm(); + m_channel[chnum]->keyonoff(1, YMFM_KEYON_CSM); // reset update_timer(param, 1); @@ -1681,7 +3232,13 @@ { // update the state u8 old_state = m_irq_state; - m_irq_state = ((m_status & m_irq_mask) != 0); + m_irq_state = ((m_status & m_irq_mask & ~m_regs.status_mask()) != 0); + + // set the IRQ status bit + if (m_irq_state) + m_status |= STATUS_IRQ; + else + m_status &= ~STATUS_IRQ; // if changed, signal the new state if (old_state != m_irq_state && !m_irq_handler.isnull()) @@ -1697,22 +3254,45 @@ template TIMER_CALLBACK_MEMBER(ymfm_engine_base::synced_mode_w) { - // actually write the mode register now - m_regs.write(RegisterType::REG_MODE, param); + // mark all channels as modified + m_modified_channels = ALL_CHANNELS; - // reset timer status - if (m_regs.reset_timer_b()) - set_reset_status(0, STATUS_TIMERB); - if (m_regs.reset_timer_a()) - set_reset_status(0, STATUS_TIMERA); + // actually write the mode register now + u32 dummy1, dummy2; + m_regs.write(RegisterType::REG_MODE, param, dummy1, dummy2); - // load timers - update_timer(1, m_regs.load_timer_b()); - update_timer(0, m_regs.load_timer_a()); + // reset IRQ status -- when written, all other bits are ignored + // QUESTION: should this maybe just reset the IRQ bit and not all the bits? + // That is, check_interrupts would only set, this would only clear? + if (m_regs.irq_reset()) + set_reset_status(0, 0x78); + else + { + // reset timer status + u8 reset_mask = 0; + if (m_regs.reset_timer_b()) + reset_mask |= RegisterType::STATUS_TIMERB; + if (m_regs.reset_timer_a()) + reset_mask |= RegisterType::STATUS_TIMERA; + set_reset_status(0, reset_mask); + + // load timers + update_timer(1, m_regs.load_timer_b()); + update_timer(0, m_regs.load_timer_a()); + } } -// Explicit template instantiation + +//********************************************************* +// EXPLICIT TEMPLATE INSTANTIATION +//********************************************************* + template class ymfm_engine_base; template class ymfm_engine_base; template class ymfm_engine_base; +template class ymfm_engine_base; +template class ymfm_engine_base; +template class ymfm_engine_base; +template class ymfm_engine_base; +template class ymfm_engine_base; diff -Nru mame-0.230+dfsg.1/src/devices/sound/ymfm.h mame-0.231+dfsg.1/src/devices/sound/ymfm.h --- mame-0.230+dfsg.1/src/devices/sound/ymfm.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/sound/ymfm.h 2021-04-27 15:32:05.000000000 +0000 @@ -6,71 +6,6 @@ #pragma once -// -// Implementation notes: -// -// -// REGISTER CLASSES -// -// OPM and OPN are very closely related, and thus share a common engine -// and implementation. Differentiation is provided by the various registers -// classes, which are specified as template parameters to the shared -// implementation. -// -// There are currently three register classes: -// -// ymopm_registers: OPM (YM2151) -// ymopn_registers: OPN (YM2203) -// ymopna_registers: OPNA (YM2608) / OPNB (YM2610/B) / OPN2 (YM2612/YM3438) -// -// -// FREQUENCIES -// -// One major difference between OPM and OPN is in how frequencies are -// specified. OPM specifies frequency via a 3-bit 'block' (aka octave), -// combined with a 4-bit 'key code' (note number) and a 6-bit 'key -// fraction'. The key code and fraction are converted on the chip -// into an x.11 fixed-point value and then shifted by the block to -// produce the final step value for the phase. -// -// OPN, on the other hand, specifies frequencies via a 3-bit 'block' -// just as on OPM, but combined with an 11-bit 'frequency number' or -// 'fnum', which is directly shifted by the block to produce the step -// value. So essentially, OPN makes the user do the conversion from -// note value to phase increment, while OPM is programmed in a more -// 'musical' way, specifying notes and cents. -// -// Interally, this is abstracted away into a 'block_freq' value, -// which is a 16-bit value containing the block and frequency info -// concatenated together as follows: -// -// OPM: [3-bit block]:[4-bit keycode]:[6-bit fraction] = 13 bits total -// -// OPN: [3-bit block]:[11-bit fnum] = 14 bits total -// -// Template specialization in functions that interpret the 'block_freq' -// value is used to deconstruct it appropriately (specifically, see -// clock_phase). -// -// -// LOW FREQUENCY OSCILLATOR (LFO) -// -// The LFO engines are different in several key ways. The OPM LFO -// engine is fairly intricate. It has a 4.4 floating-point rate which -// allows for a huge range of frequencies, and can select between four -// different waveforms (sawtooth, square, triangle, or noise). Separate -// 7-bit depth controls for AM and PM control the amount of modulation -// applied in each case. This global LFO value is then further controlled -// at the channel level by a 2-bit AM sensitivity and a 3-bit PM -// sensitivity, and each operator has a 1-bit AM on/off switch. -// -// For OPN the LFO engine was removed entirely, but a limited version -// was put back in OPNA and later chips. This stripped-down version -// offered only a 3-bit rate setting (versus the 4.4 floating-point rate -// in OPN), and no depth control. It did bring back the channel-level -// sensitivity controls and the operator-level on/off control. -// - //********************************************************* // MACROS @@ -83,70 +18,210 @@ #define YMFM_NAME(x) x, "ymfm." #x +//********************************************************* +// GLOBAL ENUMERATORS +//********************************************************* + +enum ymfm_envelope_state : u32 +{ + YMFM_ENV_DEPRESS = 0, + YMFM_ENV_ATTACK = 1, + YMFM_ENV_DECAY = 2, + YMFM_ENV_SUSTAIN = 3, + YMFM_ENV_RELEASE = 4, + YMFM_ENV_STATES = 5 +}; + + +//********************************************************* +// GLOBAL HELPERS +//********************************************************* + +// Many of the Yamaha FM chips emit a floating-point value, which is sent to +// a DAC for processing. The exact format of this floating-point value is +// documented below. This description only makes sense if the "internal" +// format treats sign as 1=positive and 0=negative, so the helpers below +// presume that. +// +// Internal OPx data 16-bit signed data Exp Sign Mantissa +// ================= ================= === ==== ======== +// 1 1xxxxxxxx------ -> 0 1xxxxxxxx------ -> 111 1 1xxxxxxx +// 1 01xxxxxxxx----- -> 0 01xxxxxxxx----- -> 110 1 1xxxxxxx +// 1 001xxxxxxxx---- -> 0 001xxxxxxxx---- -> 101 1 1xxxxxxx +// 1 0001xxxxxxxx--- -> 0 0001xxxxxxxx--- -> 100 1 1xxxxxxx +// 1 00001xxxxxxxx-- -> 0 00001xxxxxxxx-- -> 011 1 1xxxxxxx +// 1 000001xxxxxxxx- -> 0 000001xxxxxxxx- -> 010 1 1xxxxxxx +// 1 000000xxxxxxxxx -> 0 000000xxxxxxxxx -> 001 1 xxxxxxxx +// 0 111111xxxxxxxxx -> 1 111111xxxxxxxxx -> 001 0 xxxxxxxx +// 0 111110xxxxxxxx- -> 1 111110xxxxxxxx- -> 010 0 0xxxxxxx +// 0 11110xxxxxxxx-- -> 1 11110xxxxxxxx-- -> 011 0 0xxxxxxx +// 0 1110xxxxxxxx--- -> 1 1110xxxxxxxx--- -> 100 0 0xxxxxxx +// 0 110xxxxxxxx---- -> 1 110xxxxxxxx---- -> 101 0 0xxxxxxx +// 0 10xxxxxxxx----- -> 1 10xxxxxxxx----- -> 110 0 0xxxxxxx +// 0 0xxxxxxxx------ -> 1 0xxxxxxxx------ -> 111 0 0xxxxxxx + +//------------------------------------------------- +// ymfm_encode_fp - given a 32-bit signed input +// value, convert it to a signed 3.10 floating- +// point value +//------------------------------------------------- + +inline s16 ymfm_encode_fp(s32 value) +{ + // handle overflows first + if (value < -32768) + return (7 << 10) | 0x000; + if (value > 32767) + return (7 << 10) | 0x3ff; + + // we need to count the number of leading sign bits after the sign + // we can use count_leading_zeros if we invert negative values + s32 scanvalue = value ^ (s32(value) >> 31); + + // exponent is related to the number of leading bits starting from bit 14 + int exponent = 7 - count_leading_zeros(scanvalue << 17); + + // smallest exponent value allowed is 1 + exponent = std::max(exponent, 1); + + // mantissa + s32 mantissa = value >> (exponent - 1); + + // assemble into final form, inverting the sign + return ((exponent << 10) | (mantissa & 0x3ff)) ^ 0x200; +} + + +//------------------------------------------------- +// ymfm_decode_fp - given a 3.10 floating-point +// value, convert it to a signed 16-bit value +//------------------------------------------------- + +inline s16 ymfm_decode_fp(s16 value) +{ + // invert the sign and the exponent + value ^= 0x1e00; + + // shift mantissa up to 16 bits then apply inverted exponent + return s16(value << 6) >> BIT(value, 10, 3); +} + + +//------------------------------------------------- +// ymfm_roundtrip_fp - compute the result of a +// round trip through the encode/decode process +// above +//------------------------------------------------- + +inline s16 ymfm_roundtrip_fp(s32 value) +{ + // handle overflows first + if (value < -32768) + return -32768; + if (value > 32767) + return 32767; + + // we need to count the number of leading sign bits after the sign + // we can use count_leading_zeros if we invert negative values + s32 scanvalue = value ^ (s32(value) >> 31); + + // exponent is related to the number of leading bits starting from bit 14 + int exponent = 7 - count_leading_zeros(scanvalue << 17); + + // smallest exponent value allowed is 1 + exponent = std::max(exponent, 1); + + // apply the shift back and forth to zero out bits that are lost + exponent -= 1; + return (value >> exponent) << exponent; +} + //********************************************************* // REGISTER CLASSES //********************************************************* +// ======================> ymfm_opdata_cache + +// this class holds data that is computed once at the start of clocking +// and remains static during subsequent sound generation +struct ymfm_opdata_cache +{ + // set phase_step to this value to recalculate it each sample; needed + // in the case of PM LFO changes + static constexpr u32 PHASE_STEP_DYNAMIC = 1; + + u16 const *waveform; // base of sine table + u32 phase_step; // phase step, or PHASE_STEP_DYNAMIC if PM is active + u32 total_level; // total level * 8 + KSL + u32 block_freq; // raw block frequency value (used to compute phase_step) + s32 detune; // detuning value (used to compute phase_step) + u32 multiple; // multiple value (x.1, used to compute phase_step) + u32 eg_sustain; // sustain level, shifted up to envelope values + u8 eg_rate[YMFM_ENV_STATES]; // envelope rate, including KSR +}; + + // ======================> ymfm_registers_base +// base class for family-specific register classes; this provides a few +// constants, common defaults, and helpers, but mostly each derived +// class is responsible for defining all commonly-called methods class ymfm_registers_base { -protected: - // constructor - ymfm_registers_base(std::vector ®data, u16 chbase = 0, u16 opbase = 0) : - m_chbase(chbase), - m_opbase(opbase), - m_regdata(regdata) - { - } - public: - // system-wide registers that aren't universally supported - u8 noise_frequency() const /* 5 bits */ { return 0; } // not on OPN,OPNA - u8 noise_enabled() const /* 1 bit */ { return 0; } // not on OPN,OPNA - u8 lfo_enabled() const /* 1 bit */ { return 0; } // not on OPM,OPN - u8 lfo_rate() const /*3-8 bits */ { return 0; } // not on OPN - u8 lfo_waveform() const /* 2 bits */ { return 0; } // not on OPN,OPNA - u8 lfo_pm_depth() const /* 7 bits */ { return 0; } // not on OPN,OPNA - u8 lfo_am_depth() const /* 7 bits */ { return 0; } // not on OPN,OPNA - u8 multi_freq() const /* 1 bit */ { return 0; } // not on OPM - u16 multi_block_freq0() const /* 14 bits */ { return 0; } // not on OPM - u16 multi_block_freq1() const /* 14 bits */ { return 0; } // not on OPM - u16 multi_block_freq2() const /* 14 bits */ { return 0; } // not on OPM - - // per-channel registers that aren't universally supported - u8 pan_right() const /* 1 bit */ { return 1; } // not on OPN - u8 pan_left() const /* 1 bit */ { return 1; } // not on OPN - u8 lfo_pm_sensitivity() const /* 3 bits */ { return 0; } // not on OPN - u8 lfo_am_sensitivity() const /* 2 bits */ { return 0; } // not on OPN - - // per-operator registers that aren't universally supported - u8 lfo_am_enabled() const /* 1 bit */ { return 0; } // not on OPN - u8 detune2() const /* 2 bits */ { return 0; } // not on OPN,OPN2 - u8 ssg_eg_enabled() const /* 1 bit */ { return 0; } // not on OPM - u8 ssg_eg_mode() const /* 1 bit */ { return 0; } // not on OPM + // this value is returned from the write() function for rhythm channels + static constexpr u32 YMFM_RHYTHM_CHANNEL = 0xff; + + // this is the size of a full sin waveform + static constexpr u32 WAVEFORM_LENGTH = 0x400; + + // + // the following constants need to be defined per family: + // u32 OUTPUTS: The number of outputs exposed (1-4) + // u32 CHANNELS: The number of channels on the chip + // u32 ALL_CHANNELS: A bitmask of all channels + // u32 OPERATORS: The number of operators on the chip + // bool DYNAMIC_OPS: True if ops/channel can be changed at runtime + // u32 WAVEFORMS: The number of waveforms offered + // u32 REGISTERS: The number of 8-bit registers allocated + // u32 REG_MODE: The address of the "mode" register controlling timers + // u32 DEFAULT_PRESCALE: The starting clock prescale + // u32 EG_CLOCK_DIVIDER: The clock divider of the envelope generator + // bool EG_HAS_DEPRESS: True if the chip has a DP ("depress"?) envelope stage + // bool EG_HAS_SSG: True if the chip has SSG envelope support + // bool MODULATOR_DELAY: True if the modulator is delayed by 1 sample (OPL pre-OPL3) + // u32 CSM_TRIGGER_MASK: Mask of channels to trigger in CSM mode + // u8 STATUS_TIMERA: Status bit to set when timer A fires + // u8 STATUS_TIMERB: Status bit to set when tiemr B fires + // u8 STATUS_BUSY: Status bit to set when the chip is busy + // u8 STATUS_IRQ: Status bit to set when an IRQ is signalled + // + + // system-wide register defaults + u32 status_mask() const { return 0; } // OPL only + u32 irq_reset() const { return 0; } // OPL only + u32 noise_enable() const { return 0; } // OPM only + u32 rhythm_enable() const { return 0; } // OPL only + + // per-operator register defaults + u32 op_ssg_eg_enable(u32 opoffs) const { return 0; } // OPN(A) only + u32 op_ssg_eg_mode(u32 opoffs) const { return 0; } // OPN(A) only protected: - // return a bitfield extracted from a byte - u8 sysbyte(u16 offset, u8 start, u8 count) const + // helper to encode four operator numbers into a 32-bit value in the + // operator maps for each register class + static constexpr u32 operator_list(u8 o1 = 0xff, u8 o2 = 0xff, u8 o3 = 0xff, u8 o4 = 0xff) { - return BIT(m_regdata[offset], start, count); + return o1 | (o2 << 8) | (o3 << 16) | (o4 << 24); } - u8 chbyte(u16 offset, u8 start, u8 count) const { return sysbyte(offset + m_chbase, start, count); } - u8 opbyte(u16 offset, u8 start, u8 count) const { return sysbyte(offset + m_opbase, start, count); } - // return a bitfield extracted from a pair of bytes, MSBs listed first - u16 sysword(u16 offset1, u8 start1, u8 count1, u16 offset2, u8 start2, u8 count2) const + // helper to apply KSR to the raw ADSR rate, ignoring ksr if the + // raw value is 0, and clamping to 63 + static constexpr u32 effective_rate(u32 rawrate, u32 ksr) { - return (sysbyte(offset1, start1, count1) << count2) | sysbyte(offset2, start2, count2); + return (rawrate == 0) ? 0 : std::min(rawrate + ksr, 63); } - u16 chword(u16 offset1, u8 start1, u8 count1, u16 offset2, u8 start2, u8 count2) const { return sysword(offset1 + m_chbase, start1, count1, offset2 + m_chbase, start2, count2); } - - // internal state - u16 m_chbase; // base offset for channel-specific data - u16 m_opbase; // base offset for operator-specific data - std::vector &m_regdata; // reference to the raw data }; @@ -180,7 +255,7 @@ // ------xx W // // Per-channel registers (channel in address bits 0-2) -// 20-27 xx------ Pan right +// 20-27 x------- Pan right // -x------ Pan left // --xxx--- Feedback level for operator 1 (0-7) // -----xxx Operator connection algorithm (0-7) @@ -202,124 +277,166 @@ // E0-FF xxxx---- Sustain level (0-15) // ----xxxx Release rate (0-15) // +// Internal (fake) registers: +// 19 -xxxxxxx AM depth +// 1A -xxxxxxx PM depth +// class ymopm_registers : public ymfm_registers_base { + // LFO waveforms are 256 entries long + static constexpr u32 LFO_WAVEFORM_LENGTH = 256; + public: // constants - static constexpr u8 DEFAULT_PRESCALE = 2; - static constexpr u8 CHANNELS = 8; - static constexpr u8 CSM_TRIGGER_MASK = 0xff; - static constexpr u16 REGISTERS = 0x100; - static constexpr u16 REG_MODE = 0x14; - static constexpr u16 REG_KEYON = 0x08; + static constexpr u32 OUTPUTS = 2; + static constexpr u32 CHANNELS = 8; + static constexpr u32 ALL_CHANNELS = (1 << CHANNELS) - 1; + static constexpr u32 OPERATORS = CHANNELS * 4; + static constexpr bool DYNAMIC_OPS = false; + static constexpr u32 WAVEFORMS = 1; + static constexpr u32 REGISTERS = 0x100; + static constexpr u32 REG_MODE = 0x14; + static constexpr u32 DEFAULT_PRESCALE = 2; + static constexpr u32 EG_CLOCK_DIVIDER = 3; + static constexpr bool EG_HAS_DEPRESS = false; + static constexpr bool EG_HAS_SSG = false; + static constexpr bool MODULATOR_DELAY = false; + static constexpr u32 CSM_TRIGGER_MASK = ALL_CHANNELS; + static constexpr u8 STATUS_TIMERA = 0x01; + static constexpr u8 STATUS_TIMERB = 0x02; + static constexpr u8 STATUS_BUSY = 0x80; + static constexpr u8 STATUS_IRQ = 0; // constructor - ymopm_registers(std::vector ®data, u16 chbase = 0, u16 opbase = 0) : - ymfm_registers_base(regdata, chbase, opbase) - { - } + ymopm_registers(); + + // register for save states + void save(device_t &device); - // return channel/operator number - u8 chnum() const { return BIT(m_chbase, 0, 3); } - u8 opnum() const { return BIT(m_opbase, 4) | (BIT(m_opbase, 3) << 1); } + // reset to initial state + void reset(); - // reset state to default values - void reset() + // map channel number to register offset + static constexpr u32 channel_offset(u32 chnum) { - // enable output on both channels by default - m_regdata[0x20] = m_regdata[0x21] = m_regdata[0x22] = m_regdata[0x23] = 0xc0; - m_regdata[0x24] = m_regdata[0x25] = m_regdata[0x26] = m_regdata[0x27] = 0xc0; + assert(chnum < CHANNELS); + return chnum; } - // write access - void write(u16 index, u8 data) + // map operator number to register offset + static constexpr u32 operator_offset(u32 opnum) { - // LFO AM/PM depth are written to the same register (0x19); - // redirect the PM depth to an unused neighbor (0x1a) - if (index == 0x19) - m_regdata[index + BIT(data, 7)] = data; - else if (index != 0x1a) - m_regdata[index] = data; + assert(opnum < OPERATORS); + return opnum; } - // create a new version of ourself with a different channel/operator base - ymopm_registers channel_registers(u8 chnum) { return ymopm_registers(m_regdata, channel_offset(chnum)); } - ymopm_registers operator_registers(u8 opnum) { return ymopm_registers(m_regdata, m_chbase, m_chbase + operator_offset(opnum)); } + // return an array of operator indices for each channel + struct operator_mapping { u32 chan[CHANNELS]; }; + void operator_map(operator_mapping &dest) const; + + // handle writes to the register array + bool write(u16 index, u8 data, u32 &chan, u32 &opmask); + + // clock the noise and LFO, if present, returning LFO PM value + s32 clock_noise_and_lfo(); + + // reset the LFO + void reset_lfo() { m_lfo_counter = 0; } + + // return the AM offset from LFO for the given channel + u32 lfo_am_offset(u32 choffs) const; + + // return the current noise state, gated by the noise clock + u32 noise_state() const { return m_noise_state; } + + // caching helpers + void cache_operator_data(u32 choffs, u32 opoffs, ymfm_opdata_cache &cache); + + // compute the phase step, given a PM value + u32 compute_phase_step(u32 choffs, u32 opoffs, ymfm_opdata_cache const &cache, s32 lfo_raw_pm); + + // log a key-on event + void log_keyon(u32 choffs, u32 opoffs); // system-wide registers - u8 test() const /* 8 bits */ { return sysbyte(0x01, 0, 8); } - u8 keyon_states() const /* 4 bits */ { return sysbyte(0x08, 3, 4); } - u8 keyon_channel() const /* 3 bits */ { return sysbyte(0x08, 0, 3); } - u8 noise_frequency() const /* 5 bits */ { return sysbyte(0x0f, 0, 5); } - u8 noise_enabled() const /* 1 bit */ { return sysbyte(0x0f, 7, 1); } - u16 timer_a_value() const /* 10 bits */ { return sysword(0x10, 0, 8, 0x11, 0, 2); } - u8 timer_b_value() const /* 8 bits */ { return sysbyte(0x12, 0, 8); } - u8 csm() const /* 1 bit */ { return sysbyte(0x14, 7, 1); } - u8 reset_timer_b() const /* 1 bit */ { return sysbyte(0x14, 5, 1); } - u8 reset_timer_a() const /* 1 bit */ { return sysbyte(0x14, 4, 1); } - u8 enable_timer_b() const /* 1 bit */ { return sysbyte(0x14, 3, 1); } - u8 enable_timer_a() const /* 1 bit */ { return sysbyte(0x14, 2, 1); } - u8 load_timer_b() const /* 1 bit */ { return sysbyte(0x14, 1, 1); } - u8 load_timer_a() const /* 1 bit */ { return sysbyte(0x14, 0, 1); } - u8 lfo_rate() const /* 8 bits */ { return sysbyte(0x18, 0, 8); } - u8 lfo_am_depth() const /* 7 bits */ { return sysbyte(0x19, 0, 7); } - u8 lfo_pm_depth() const /* 7 bits */ { return sysbyte(0x1a, 0, 7); } - u8 lfo_waveform() const /* 2 bits */ { return sysbyte(0x1b, 0, 2); } + u32 test() const { return byte(0x01, 0, 8); } + u32 noise_frequency() const { return byte(0x0f, 0, 5); } + u32 noise_enable() const { return byte(0x0f, 7, 1); } + u32 timer_a_value() const { return word(0x10, 0, 8, 0x11, 0, 2); } + u32 timer_b_value() const { return byte(0x12, 0, 8); } + u32 csm() const { return byte(0x14, 7, 1); } + u32 reset_timer_b() const { return byte(0x14, 5, 1); } + u32 reset_timer_a() const { return byte(0x14, 4, 1); } + u32 enable_timer_b() const { return byte(0x14, 3, 1); } + u32 enable_timer_a() const { return byte(0x14, 2, 1); } + u32 load_timer_b() const { return byte(0x14, 1, 1); } + u32 load_timer_a() const { return byte(0x14, 0, 1); } + u32 lfo_rate() const { return byte(0x18, 0, 8); } + u32 lfo_am_depth() const { return byte(0x19, 0, 7); } + u32 lfo_pm_depth() const { return byte(0x1a, 0, 7); } + u32 lfo_waveform() const { return byte(0x1b, 0, 2); } // per-channel registers - u8 pan_right() const /* 1 bit */ { return chbyte(0x20, 7, 1); } - u8 pan_left() const /* 1 bit */ { return chbyte(0x20, 6, 1); } - u8 feedback() const /* 3 bits */ { return chbyte(0x20, 3, 3); } - u8 algorithm() const /* 3 bits */ { return chbyte(0x20, 0, 3); } - u16 block_freq() const /* 13 bits */ { return chword(0x28, 0, 7, 0x30, 2, 6); } - u8 lfo_pm_sensitivity() const /* 3 bits */ { return chbyte(0x38, 4, 3); } - u8 lfo_am_sensitivity() const /* 2 bits */ { return chbyte(0x38, 0, 2); } + u32 ch_output_any(u32 choffs) const { return byte(0x20, 6, 2, choffs); } + u32 ch_output_0(u32 choffs) const { return byte(0x20, 6, 1, choffs); } + u32 ch_output_1(u32 choffs) const { return byte(0x20, 7, 1, choffs); } + u32 ch_output_2(u32 choffs) const { return 0; } + u32 ch_output_3(u32 choffs) const { return 0; } + u32 ch_feedback(u32 choffs) const { return byte(0x20, 3, 3, choffs); } + u32 ch_algorithm(u32 choffs) const { return byte(0x20, 0, 3, choffs); } + u32 ch_block_freq(u32 choffs) const { return word(0x28, 0, 7, 0x30, 2, 6, choffs); } + u32 ch_lfo_pm_sens(u32 choffs) const { return byte(0x38, 4, 3, choffs); } + u32 ch_lfo_am_sens(u32 choffs) const { return byte(0x38, 0, 2, choffs); } // per-operator registers - u8 detune() const /* 3 bits */ { return opbyte(0x40, 4, 3); } - u8 multiple() const /* 4 bits */ { return opbyte(0x40, 0, 4); } - u8 total_level() const /* 7 bits */ { return opbyte(0x60, 0, 7); } - u8 ksr() const /* 2 bits */ { return opbyte(0x80, 6, 2); } - u8 attack_rate() const /* 5 bits */ { return opbyte(0x80, 0, 5); } - u8 lfo_am_enabled() const /* 1 bit */ { return opbyte(0xa0, 7, 1); } - u8 decay_rate() const /* 5 bits */ { return opbyte(0xa0, 0, 5); } - u8 detune2() const /* 2 bits */ { return opbyte(0xc0, 6, 2); } - u8 sustain_rate() const /* 5 bits */ { return opbyte(0xc0, 0, 5); } - u8 sustain_level() const /* 4 bits */ { return opbyte(0xe0, 4, 4); } - u8 release_rate() const /* 4 bits */ { return opbyte(0xe0, 0, 4); } - - // LFO is always enabled - u8 lfo_enabled() const { return 1; } - - // special helper for generically getting the attack/decay/statain/release rates - u8 adsr_rate(u8 state) const - { - // attack/decay/sustain are identical - if (state < 3) - return opbyte(0x80 + (state << 5), 0, 5); + u32 op_detune(u32 opoffs) const { return byte(0x40, 4, 3, opoffs); } + u32 op_multiple(u32 opoffs) const { return byte(0x40, 0, 4, opoffs); } + u32 op_total_level(u32 opoffs) const { return byte(0x60, 0, 7, opoffs); } + u32 op_ksr(u32 opoffs) const { return byte(0x80, 6, 2, opoffs); } + u32 op_attack_rate(u32 opoffs) const { return byte(0x80, 0, 5, opoffs); } + u32 op_lfo_am_enable(u32 opoffs) const { return byte(0xa0, 7, 1, opoffs); } + u32 op_decay_rate(u32 opoffs) const { return byte(0xa0, 0, 5, opoffs); } + u32 op_detune2(u32 opoffs) const { return byte(0xc0, 6, 2, opoffs); } + u32 op_sustain_rate(u32 opoffs) const { return byte(0xc0, 0, 5, opoffs); } + u32 op_sustain_level(u32 opoffs) const { return byte(0xe0, 4, 4, opoffs); } + u32 op_release_rate(u32 opoffs) const { return byte(0xe0, 0, 4, opoffs); } - // release encodes 4 bits and expands them - else - return opbyte(0xe0, 0, 4) * 2 + 1; +protected: + // return a bitfield extracted from a byte + u32 byte(u32 offset, u32 start, u32 count, u32 extra_offset = 0) const + { + return BIT(m_regdata[offset + extra_offset], start, count); } -protected: - // convert a channel number into a register offset; channel goes into the low 3 bits - static constexpr u8 channel_offset(u8 chnum) { return BIT(chnum, 0, 3); } + // return a bitfield extracted from a pair of bytes, MSBs listed first + u32 word(u32 offset1, u32 start1, u32 count1, u32 offset2, u32 start2, u32 count2, u32 extra_offset = 0) const + { + return (byte(offset1, start1, count1, extra_offset) << count2) | byte(offset2, start2, count2, extra_offset); + } - // convert an operator number into a register offset; operator goes into bits 3-4 - static constexpr u8 operator_offset(u8 opnum) { return (BIT(opnum, 0) << 4) | (BIT(opnum, 1) << 3); } + // internal state + u32 m_lfo_counter; // LFO counter + u32 m_noise_lfsr; // noise LFSR state + u8 m_noise_counter; // noise counter + u8 m_noise_state; // latched noise state + u8 m_noise_lfo; // latched LFO noise value + u8 m_lfo_am; // current LFO AM value + u8 m_regdata[REGISTERS]; // register data + s16 m_lfo_waveform[4][LFO_WAVEFORM_LENGTH]; // LFO waveforms; AM in low 8, PM in upper 8 + u16 m_waveform[WAVEFORMS][WAVEFORM_LENGTH]; // waveforms }; -// ======================> ymopn_registers +// ======================> ymopn_registers_base // // OPN register map: // // System-wide registers: // 21 xxxxxxxx Test register +// 22 ----x--- LFO enable [OPNA+ only] +// -----xxx LFO rate [OPNA+ only] // 24 xxxxxxxx Timer A value (upper 8 bits) // 25 ------xx Timer A value (lower 2 bits) // 26 xxxxxxxx Timer B value @@ -336,403 +453,832 @@ // ---x---- Key on/off operator 1 // ------xx Channel select // +// Per-channel registers (channel in address bits 0-1) +// Note that all these apply to address+100 as well on OPNA+ +// A0-A3 xxxxxxxx Frequency number lower 8 bits +// A4-A7 --xxx--- Block (0-7) +// -----xxx Frequency number upper 3 bits +// B0-B3 --xxx--- Feedback level for operator 1 (0-7) +// -----xxx Operator connection algorithm (0-7) +// B4-B7 x------- Pan left [OPNA] +// -x------ Pan right [OPNA] +// --xx---- LFO AM shift (0-3) [OPNA+ only] +// -----xxx LFO PM depth (0-7) [OPNA+ only] +// // Per-operator registers (channel in address bits 0-1, operator in bits 2-3) +// Note that all these apply to address+100 as well on OPNA+ // 30-3F -xxx---- Detune value (0-7) // ----xxxx Multiple value (0-15) // 40-4F -xxxxxxx Total level (0-127) // 50-5F xx------ Key scale rate (0-3) // ---xxxxx Attack rate (0-31) -// 60-6F ---xxxxx Decay rate (0-31) +// 60-6F x------- LFO AM enable [OPNA] +// ---xxxxx Decay rate (0-31) // 70-7F ---xxxxx Sustain rate (0-31) // 80-8F xxxx---- Sustain level (0-15) // ----xxxx Release rate (0-15) // 90-9F ----x--- SSG-EG enable // -----xxx SSG-EG envelope (0-7) // -// Per-channel registers (channel in address bits 0-1) -// A0-A3 xxxxxxxx Frequency number lower 8 bits -// A4-A7 --xxx--- Block (0-7) -// -----xxx Frequency number upper 3 bits -// B0-B3 --xxx--- Feedback level for operator 1 (0-7) -// -----xxx Operator connection algorithm (0-7) -// // Special multi-frequency registers (channel implicitly #2; operator in address bits 0-1) // A8-AB xxxxxxxx Frequency number lower 8 bits // AC-AF --xxx--- Block (0-7) // -----xxx Frequency number upper 3 bits // +// Internal (fake) registers: +// B8-BB --xxxxxx Latched frequency number upper bits (from A4-A7) +// BC-BF --xxxxxx Latched frequency number upper bits (from AC-AF) +// -class ymopn_registers : public ymfm_registers_base +template +class ymopn_registers_base : public ymfm_registers_base { public: // constants - static constexpr u8 DEFAULT_PRESCALE = 6; - static constexpr u8 CHANNELS = 3; - static constexpr u8 CSM_TRIGGER_MASK = 1 << 2; - static constexpr u16 REGISTERS = 0x100; - static constexpr u16 REG_MODE = 0x27; - static constexpr u16 REG_KEYON = 0x28; + static constexpr u32 OUTPUTS = IsOpnA ? 2 : 1; + static constexpr u32 CHANNELS = IsOpnA ? 6 : 3; + static constexpr u32 ALL_CHANNELS = (1 << CHANNELS) - 1; + static constexpr u32 OPERATORS = CHANNELS * 4; + static constexpr bool DYNAMIC_OPS = false; + static constexpr u32 WAVEFORMS = 1; + static constexpr u32 REGISTERS = IsOpnA ? 0x200 : 0x100; + static constexpr u32 REG_MODE = 0x27; + static constexpr u32 DEFAULT_PRESCALE = 6; + static constexpr u32 EG_CLOCK_DIVIDER = 3; + static constexpr bool EG_HAS_DEPRESS = false; + static constexpr bool EG_HAS_SSG = true; + static constexpr bool MODULATOR_DELAY = false; + static constexpr u32 CSM_TRIGGER_MASK = 1 << 2; + static constexpr u8 STATUS_TIMERA = 0x01; + static constexpr u8 STATUS_TIMERB = 0x02; + static constexpr u8 STATUS_BUSY = 0x80; + static constexpr u8 STATUS_IRQ = 0; // constructor - ymopn_registers(std::vector ®data, u16 chbase = 0, u16 opbase = 0) : - ymfm_registers_base(regdata, chbase, opbase) - { - } + ymopn_registers_base(); + + // register for save states + void save(device_t &device); - // return channel/operator number - u8 chnum() const { return BIT(m_chbase, 0, 2); } - u8 opnum() const { return BIT(m_opbase, 3) | (BIT(m_opbase, 2) << 1); } + // reset to initial state + void reset(); - // reset state to default values - void reset() + // map channel number to register offset + static constexpr u32 channel_offset(u32 chnum) { + assert(chnum < CHANNELS); + if (!IsOpnA) + return chnum; + else + return (chnum % 3) + 0x100 * (chnum / 3); } - // write access - void write(u16 index, u8 data) + // map operator number to register offset + static constexpr u32 operator_offset(u32 opnum) { - // writes in the 0xa0-af/0x1a0-af region are handled as latched pairs - // borrow unused registers 0xb8-bf/0x1b8-bf as temporary holding locations - if ((index & 0xf0) == 0xa0) - { - u16 latchindex = (index & 0x100) | 0xb8 | (BIT(index, 3) << 2) | BIT(index, 0, 2); + assert(opnum < OPERATORS); + if (!IsOpnA) + return opnum + opnum / 3; + else + return (opnum % 12) + ((opnum % 12) / 3) + 0x100 * (opnum / 12); + } - // writes to the upper half just latch (only low 6 bits matter) - if (BIT(index, 2)) - m_regdata[latchindex] = data | 0x80; + // return an array of operator indices for each channel + struct operator_mapping { u32 chan[CHANNELS]; }; + void operator_map(operator_mapping &dest) const; - // writes to the lower half only commit if the latch is there - else if (BIT(m_regdata[latchindex], 7)) - { - m_regdata[index | 4] = m_regdata[latchindex] & 0x3f; - m_regdata[latchindex] = 0; - } - } + // handle writes to the register array + bool write(u16 index, u8 data, u32 &chan, u32 &opmask); - // everything else is normal - m_regdata[index] = data; - } + // clock the noise and LFO, if present, returning LFO PM value + s32 clock_noise_and_lfo(); + + // reset the LFO + void reset_lfo() { m_lfo_counter = 0; } + + // return the AM offset from LFO for the given channel + u32 lfo_am_offset(u32 choffs) const; - // create a new version of ourself with a different channel/operator base - ymopn_registers channel_registers(u8 chnum) { return ymopn_registers(m_regdata, channel_offset(chnum)); } - ymopn_registers operator_registers(u8 opnum) { return ymopn_registers(m_regdata, m_chbase, m_chbase + operator_offset(opnum)); } + // return LFO/noise states + u32 noise_state() const { return 0; } + + // caching helpers + void cache_operator_data(u32 choffs, u32 opoffs, ymfm_opdata_cache &cache); + + // compute the phase step, given a PM value + u32 compute_phase_step(u32 choffs, u32 opoffs, ymfm_opdata_cache const &cache, s32 lfo_raw_pm); + + // log a key-on event + void log_keyon(u32 choffs, u32 opoffs); // system-wide registers - u8 test() const /* 8 bits */ { return sysbyte(0x21, 0, 8); } - u16 timer_a_value() const /* 10 bits */ { return sysword(0x24, 0, 8, 0x25, 0, 2); } - u8 timer_b_value() const /* 8 bits */ { return sysbyte(0x26, 0, 8); } - u8 csm() const /* 2 bits */ { return (sysbyte(0x27, 6, 2) == 2); } - u8 multi_freq() const /* 2 bits */ { return (sysbyte(0x27, 6, 2) != 0); } - u8 reset_timer_b() const /* 1 bit */ { return sysbyte(0x27, 5, 1); } - u8 reset_timer_a() const /* 1 bit */ { return sysbyte(0x27, 4, 1); } - u8 enable_timer_b() const /* 1 bit */ { return sysbyte(0x27, 3, 1); } - u8 enable_timer_a() const /* 1 bit */ { return sysbyte(0x27, 2, 1); } - u8 load_timer_b() const /* 1 bit */ { return sysbyte(0x27, 1, 1); } - u8 load_timer_a() const /* 1 bit */ { return sysbyte(0x27, 0, 1); } - u8 keyon_states() const /* 4 bits */ { return sysbyte(0x28, 4, 4); } - u8 keyon_channel() const /* 2 bits */ { return sysbyte(0x28, 0, 2); } - u16 multi_block_freq0() const /* 14 bits */ { return sysword(0xac, 0, 6, 0xa8, 0, 8); } - u16 multi_block_freq1() const /* 14 bits */ { return sysword(0xad, 0, 6, 0xa9, 0, 8); } - u16 multi_block_freq2() const /* 14 bits */ { return sysword(0xae, 0, 6, 0xaa, 0, 8); } + u32 test() const { return byte(0x21, 0, 8); } + u32 lfo_enable() const { return IsOpnA ? byte(0x22, 3, 1) : 0; } + u32 lfo_rate() const { return IsOpnA ? byte(0x22, 0, 3) : 0; } + u32 timer_a_value() const { return word(0x24, 0, 8, 0x25, 0, 2); } + u32 timer_b_value() const { return byte(0x26, 0, 8); } + u32 csm() const { return (byte(0x27, 6, 2) == 2); } + u32 multi_freq() const { return (byte(0x27, 6, 2) != 0); } + u32 reset_timer_b() const { return byte(0x27, 5, 1); } + u32 reset_timer_a() const { return byte(0x27, 4, 1); } + u32 enable_timer_b() const { return byte(0x27, 3, 1); } + u32 enable_timer_a() const { return byte(0x27, 2, 1); } + u32 load_timer_b() const { return byte(0x27, 1, 1); } + u32 load_timer_a() const { return byte(0x27, 0, 1); } + u32 multi_block_freq(u32 num) const { return word(0xac, 0, 6, 0xa8, 0, 8, num); } // per-channel registers - u16 block_freq() const /* 14 bits */ { return chword(0xa4, 0, 6, 0xa0, 0, 8); } - u8 feedback() const /* 3 bits */ { return chbyte(0xb0, 3, 3); } - u8 algorithm() const /* 3 bits */ { return chbyte(0xb0, 0, 3); } + u32 ch_block_freq(u32 choffs) const { return word(0xa4, 0, 6, 0xa0, 0, 8, choffs); } + u32 ch_feedback(u32 choffs) const { return byte(0xb0, 3, 3, choffs); } + u32 ch_algorithm(u32 choffs) const { return byte(0xb0, 0, 3, choffs); } + u32 ch_output_any(u32 choffs) const { return IsOpnA ? byte(0xb4, 6, 2, choffs) : 1; } + u32 ch_output_0(u32 choffs) const { return IsOpnA ? byte(0xb4, 7, 1, choffs) : 1; } + u32 ch_output_1(u32 choffs) const { return IsOpnA ? byte(0xb4, 6, 1, choffs) : 0; } + u32 ch_output_2(u32 choffs) const { return 0; } + u32 ch_output_3(u32 choffs) const { return 0; } + u32 ch_lfo_am_sens(u32 choffs) const { return IsOpnA ? byte(0xb4, 4, 2, choffs) : 0; } + u32 ch_lfo_pm_sens(u32 choffs) const { return IsOpnA ? byte(0xb4, 0, 3, choffs) : 0; } // per-operator registers - u8 detune() const /* 3 bits */ { return opbyte(0x30, 4, 3); } - u8 multiple() const /* 4 bits */ { return opbyte(0x30, 0, 4); } - u8 total_level() const /* 8 bits */ { return opbyte(0x40, 0, 7); } - u8 ksr() const /* 2 bits */ { return opbyte(0x50, 6, 2); } - u8 attack_rate() const /* 5 bits */ { return opbyte(0x50, 0, 5); } - u8 decay_rate() const /* 5 bits */ { return opbyte(0x60, 0, 5); } - u8 sustain_rate() const /* 5 bits */ { return opbyte(0x70, 0, 5); } - u8 sustain_level() const /* 4 bits */ { return opbyte(0x80, 4, 4); } - u8 release_rate() const /* 4 bits */ { return opbyte(0x80, 0, 4); } - u8 ssg_eg_enabled() const /* 1 bit */ { return opbyte(0x90, 3, 1); } - u8 ssg_eg_mode() const /* 3 bits */ { return opbyte(0x90, 0, 3); } - - // special helper for generically getting the attack/decay/statain/release rates - u8 adsr_rate(u8 state) const - { - // attack/decay/sustain are identical - if (state < 3) - return opbyte(0x50 + (state << 4), 0, 5); + u32 op_detune(u32 opoffs) const { return byte(0x30, 4, 3, opoffs); } + u32 op_multiple(u32 opoffs) const { return byte(0x30, 0, 4, opoffs); } + u32 op_total_level(u32 opoffs) const { return byte(0x40, 0, 7, opoffs); } + u32 op_ksr(u32 opoffs) const { return byte(0x50, 6, 2, opoffs); } + u32 op_attack_rate(u32 opoffs) const { return byte(0x50, 0, 5, opoffs); } + u32 op_decay_rate(u32 opoffs) const { return byte(0x60, 0, 5, opoffs); } + u32 op_lfo_am_enable(u32 opoffs) const { return IsOpnA ? byte(0x60, 7, 1, opoffs) : 0; } + u32 op_sustain_rate(u32 opoffs) const { return byte(0x70, 0, 5, opoffs); } + u32 op_sustain_level(u32 opoffs) const { return byte(0x80, 4, 4, opoffs); } + u32 op_release_rate(u32 opoffs) const { return byte(0x80, 0, 4, opoffs); } + u32 op_ssg_eg_enable(u32 opoffs) const { return byte(0x90, 3, 1, opoffs); } + u32 op_ssg_eg_mode(u32 opoffs) const { return byte(0x90, 0, 3, opoffs); } - // release encodes 4 bits and expands them - else - return opbyte(0x80, 0, 4) * 2 + 1; +protected: + // return a bitfield extracted from a byte + u32 byte(u32 offset, u32 start, u32 count, u32 extra_offset = 0) const + { + return BIT(m_regdata[offset + extra_offset], start, count); } -protected: - // convert a channel number into a register offset; channel goes in low 2 bits - static constexpr u16 channel_offset(u8 chnum) { return BIT(chnum, 0, 2); } + // return a bitfield extracted from a pair of bytes, MSBs listed first + u32 word(u32 offset1, u32 start1, u32 count1, u32 offset2, u32 start2, u32 count2, u32 extra_offset = 0) const + { + return (byte(offset1, start1, count1, extra_offset) << count2) | byte(offset2, start2, count2, extra_offset); + } - // convert an operator number into a register offset; operator goes into bits 2-3 - static constexpr u8 operator_offset(u8 opnum) { return (BIT(opnum, 0) << 3) | (BIT(opnum, 1) << 2); } + // internal state + u32 m_lfo_counter; // LFO counter + u8 m_lfo_am; // current LFO AM value + u8 m_regdata[REGISTERS]; // register data + u16 m_waveform[WAVEFORMS][WAVEFORM_LENGTH]; // waveforms }; +using ymopn_registers = ymopn_registers_base; +using ymopna_registers = ymopn_registers_base; -// ======================> ymopna_registers + +// ======================> ymopl_registers_base // -// OPNA/OPNB/OPNB2/OPN2 register map: +// OPL/OPL2/OPL3/OPL4 register map: // // System-wide registers: -// 21 xxxxxxxx Test register -// 22 ----x--- LFO enable (new for OPNA) -// -----xxx LFO rate (new for OPNA) -// 24 xxxxxxxx Timer A value (upper 8 bits) -// 25 ------xx Timer A value (lower 2 bits) -// 26 xxxxxxxx Timer B value -// 27 xx------ CSM/Multi-frequency mode for channel #2 -// --x----- Reset timer B -// ---x---- Reset timer A -// ----x--- Enable timer B -// -----x-- Enable timer A +// 01 xxxxxxxx Test register +// --x----- Enable OPL compatibility mode [OPL2 only] (1 = enable) +// 02 xxxxxxxx Timer A value (4 * OPN) +// 03 xxxxxxxx Timer B value +// 04 x------- RST +// -x------ Mask timer A +// --x----- Mask timer B // ------x- Load timer B // -------x Load timer A -// 28 x------- Key on/off operator 4 -// -x------ Key on/off operator 3 -// --x----- Key on/off operator 2 -// ---x---- Key on/off operator 1 -// -----x-- Upper channel select (new for OPNA) -// ------xx Channel select -// -// Per-operator registers (channel in address bits 0-1, operator in bits 2-3) -// 30-3F -xxx---- Detune value (0-7) +// 08 x------- CSM mode [OPL/OPL2 only] +// -x------ Note select +// BD x------- AM depth +// -x------ PM depth +// --x----- Rhythm enable +// ---x---- Bass drum key on +// ----x--- Snare drum key on +// -----x-- Tom key on +// ------x- Top cymbal key on +// -------x High hat key on +// 101 --xxxxxx Test register 2 [OPL3 only] +// 104 --x----- Channel 6 4-operator mode [OPL3 only] +// ---x---- Channel 5 4-operator mode [OPL3 only] +// ----x--- Channel 4 4-operator mode [OPL3 only] +// -----x-- Channel 3 4-operator mode [OPL3 only] +// ------x- Channel 2 4-operator mode [OPL3 only] +// -------x Channel 1 4-operator mode [OPL3 only] +// 105 -------x New [OPL3 only] +// ------x- New2 [OPL4 only] +// +// Per-channel registers (channel in address bits 0-3) +// Note that all these apply to address+100 as well on OPL3+ +// A0-A8 xxxxxxxx F-number (low 8 bits) +// B0-B8 --x----- Key on +// ---xxx-- Block (octvate, 0-7) +// ------xx F-number (high two bits) +// C0-C8 x------- CHD output (to DO0 pin) [OPL3+ only] +// -x------ CHC output (to DO0 pin) [OPL3+ only] +// --x----- CHB output (mixed right, to DO2 pin) [OPL3+ only] +// ---x---- CHA output (mixed left, to DO2 pin) [OPL3+ only] +// ----xxx- Feedback level for operator 1 (0-7) +// -------x Operator connection algorithm +// +// Per-operator registers (operator in bits 0-5) +// Note that all these apply to address+100 as well on OPL3+ +// 20-35 x------- AM enable +// -x------ PM enable (VIB) +// --x----- EG type +// ---x---- Key scale rate // ----xxxx Multiple value (0-15) -// 40-4F -xxxxxxx Total level (0-127) -// 50-5F xx------ Key scale rate (0-3) -// ---xxxxx Attack rate (0-31) -// 60-6F x------- LFO AM enable (new for OPNA) -// ---xxxxx Decay rate (0-31) -// 70-7F ---xxxxx Sustain rate (0-31) -// 80-8F xxxx---- Sustain level (0-15) +// 40-55 xx------ Key scale level (0-3) +// --xxxxxx Total level (0-63) +// 60-75 xxxx---- Attack rate (0-15) +// ----xxxx Decay rate (0-15) +// 80-95 xxxx---- Sustain level (0-15) // ----xxxx Release rate (0-15) -// 90-9F ----x--- SSG-EG enable -// -----xxx SSG-EG envelope (0-7) +// E0-F5 ------xx Wave select (0-3) [OPL2 only] +// -----xxx Wave select (0-7) [OPL3+ only] // -// Per-channel registers (channel in address bits 0-1) -// A0-A3 xxxxxxxx Frequency number lower 8 bits -// A4-A7 --xxx--- Block (0-7) -// -----xxx Frequency number upper 3 bits -// B0-B3 --xxx--- Feedback level for operator 1 (0-7) -// -----xxx Operator connection algorithm (0-7) -// B4-B7 x------- Pan left (new for OPNA) -// -x------ Pan right (new for OPNA) -// --xx---- LFO AM shift (0-3) (new for OPNA) -// -----xxx LFO PM depth (0-7) (new for OPNA) + +template +class ymopl_registers_base : public ymfm_registers_base +{ + static constexpr bool IsOpl2 = (Revision == 2); + static constexpr bool IsOpl2Plus = (Revision >= 2); + static constexpr bool IsOpl3Plus = (Revision >= 3); + static constexpr bool IsOpl4Plus = (Revision >= 4); + +public: + // constants + static constexpr u32 OUTPUTS = IsOpl3Plus ? 4 : 1; + static constexpr u32 CHANNELS = IsOpl3Plus ? 18 : 9; + static constexpr u32 ALL_CHANNELS = (1 << CHANNELS) - 1; + static constexpr u32 OPERATORS = CHANNELS * 2; + static constexpr bool DYNAMIC_OPS = IsOpl3Plus; + static constexpr u32 WAVEFORMS = IsOpl3Plus ? 8 : (IsOpl2Plus ? 4 : 1); + static constexpr u32 REGISTERS = IsOpl3Plus ? 0x200 : 0x100; + static constexpr u32 REG_MODE = 0x04; + static constexpr u32 DEFAULT_PRESCALE = IsOpl4Plus ? 19 : (IsOpl3Plus ? 8 : 4); + static constexpr u32 EG_CLOCK_DIVIDER = 1; + static constexpr bool EG_HAS_DEPRESS = false; + static constexpr bool EG_HAS_SSG = false; + static constexpr bool MODULATOR_DELAY = !IsOpl3Plus; + static constexpr u32 CSM_TRIGGER_MASK = ALL_CHANNELS; + static constexpr u8 STATUS_TIMERA = 0x40; + static constexpr u8 STATUS_TIMERB = 0x20; + static constexpr u8 STATUS_BUSY = 0; + static constexpr u8 STATUS_IRQ = 0x80; + + // constructor + ymopl_registers_base(); + + // register for save states + void save(device_t &device); + + // reset to initial state + void reset(); + + // map channel number to register offset + static constexpr u32 channel_offset(u32 chnum) + { + assert(chnum < CHANNELS); + if (!IsOpl3Plus) + return chnum; + else + return (chnum % 9) + 0x100 * (chnum / 9); + } + + // map operator number to register offset + static constexpr u32 operator_offset(u32 opnum) + { + assert(opnum < OPERATORS); + if (!IsOpl3Plus) + return opnum + 2 * (opnum / 6); + else + return (opnum % 18) + 2 * ((opnum % 18) / 6) + 0x100 * (opnum / 18); + } + + // return an array of operator indices for each channel + struct operator_mapping { u32 chan[CHANNELS]; }; + void operator_map(operator_mapping &dest) const; + + // OPL4 apparently can read back FM registers? + u8 read(u16 index) { return m_regdata[index]; } + + // handle writes to the register array + bool write(u16 index, u8 data, u32 &chan, u32 &opmask); + + // clock the noise and LFO, if present, returning LFO PM value + s32 clock_noise_and_lfo(); + + // reset the LFO + void reset_lfo() { m_lfo_am_counter = m_lfo_pm_counter = 0; } + + // return the AM offset from LFO for the given channel + // on OPL this is just a fixed value + u32 lfo_am_offset(u32 choffs) const { return m_lfo_am; } + + // return LFO/noise states + u32 noise_state() const { return m_noise_lfsr >> 23; } + + // caching helpers + void cache_operator_data(u32 choffs, u32 opoffs, ymfm_opdata_cache &cache); + + // compute the phase step, given a PM value + u32 compute_phase_step(u32 choffs, u32 opoffs, ymfm_opdata_cache const &cache, s32 lfo_raw_pm); + + // log a key-on event + void log_keyon(u32 choffs, u32 opoffs); + + // system-wide registers + u32 test() const { return byte(0x01, 0, 8); } + u32 waveform_enable() const { return IsOpl2 ? byte(0x01, 5, 1) : (IsOpl3Plus ? 1 : 0); } + u32 timer_a_value() const { return byte(0x02, 0, 8) * 4; } // 8->10 bits + u32 timer_b_value() const { return byte(0x03, 0, 8); } + u32 status_mask() const { return byte(0x04, 0, 8) & 0x78; } + u32 irq_reset() const { return byte(0x04, 7, 1); } + u32 reset_timer_b() const { return byte(0x04, 7, 1) | byte(0x04, 5, 1); } + u32 reset_timer_a() const { return byte(0x04, 7, 1) | byte(0x04, 6, 1); } + u32 enable_timer_b() const { return 1; } + u32 enable_timer_a() const { return 1; } + u32 load_timer_b() const { return byte(0x04, 1, 1); } + u32 load_timer_a() const { return byte(0x04, 0, 1); } + u32 csm() const { return IsOpl3Plus ? 0 : byte(0x08, 7, 1); } + u32 note_select() const { return byte(0x08, 6, 1); } + u32 lfo_am_depth() const { return byte(0xbd, 7, 1); } + u32 lfo_pm_depth() const { return byte(0xbd, 6, 1); } + u32 rhythm_enable() const { return byte(0xbd, 5, 1); } + u32 rhythm_keyon() const { return byte(0xbd, 4, 0); } + u32 newflag() const { return IsOpl3Plus ? byte(0x105, 0, 1) : 0; } + u32 new2flag() const { return IsOpl4Plus ? byte(0x105, 1, 1) : 0; } + u32 fourop_enable() const { return IsOpl3Plus ? byte(0x104, 0, 6) : 0; } + + // per-channel registers + u32 ch_block_freq(u32 choffs) const { return word(0xb0, 0, 5, 0xa0, 0, 8, choffs); } + u32 ch_feedback(u32 choffs) const { return byte(0xc0, 1, 3, choffs); } + u32 ch_algorithm(u32 choffs) const { return byte(0xc0, 0, 1, choffs) | (IsOpl3Plus ? (8 | (byte(0xc3, 0, 1, choffs) << 1)) : 0); } + u32 ch_output_any(u32 choffs) const { return newflag() ? byte(0xc0 + choffs, 4, 4) : 1; } + u32 ch_output_0(u32 choffs) const { return newflag() ? byte(0xc0 + choffs, 4, 1) : 1; } + u32 ch_output_1(u32 choffs) const { return newflag() ? byte(0xc0 + choffs, 5, 1) : (IsOpl3Plus ? 1 : 0); } + u32 ch_output_2(u32 choffs) const { return newflag() ? byte(0xc0 + choffs, 6, 1) : 0; } + u32 ch_output_3(u32 choffs) const { return newflag() ? byte(0xc0 + choffs, 7, 1) : 0; } + + // per-operator registers + u32 op_lfo_am_enable(u32 opoffs) const { return byte(0x20, 7, 1, opoffs); } + u32 op_lfo_pm_enable(u32 opoffs) const { return byte(0x20, 6, 1, opoffs); } + u32 op_eg_sustain(u32 opoffs) const { return byte(0x20, 5, 1, opoffs); } + u32 op_ksr(u32 opoffs) const { return byte(0x20, 4, 1, opoffs); } + u32 op_multiple(u32 opoffs) const { return byte(0x20, 0, 4, opoffs); } + u32 op_ksl(u32 opoffs) const { return bitswap<2>(byte(0x40, 6, 2, opoffs), 0, 1); } + u32 op_total_level(u32 opoffs) const { return byte(0x40, 0, 6, opoffs); } + u32 op_attack_rate(u32 opoffs) const { return byte(0x60, 4, 4, opoffs); } + u32 op_decay_rate(u32 opoffs) const { return byte(0x60, 0, 4, opoffs); } + u32 op_sustain_level(u32 opoffs) const { return byte(0x80, 4, 4, opoffs); } + u32 op_release_rate(u32 opoffs) const { return byte(0x80, 0, 4, opoffs); } + u32 op_waveform(u32 opoffs) const { return IsOpl2Plus ? byte(0xe0, 0, newflag() ? 3 : 2, opoffs) : 0; } + +protected: + // return a bitfield extracted from a byte + u32 byte(u32 offset, u32 start, u32 count, u32 extra_offset = 0) const + { + return BIT(m_regdata[offset + extra_offset], start, count); + } + + // return a bitfield extracted from a pair of bytes, MSBs listed first + u32 word(u32 offset1, u32 start1, u32 count1, u32 offset2, u32 start2, u32 count2, u32 extra_offset = 0) const + { + return (byte(offset1, start1, count1, extra_offset) << count2) | byte(offset2, start2, count2, extra_offset); + } + + // helper to determine if the this channel is an active rhythm channel + bool is_rhythm(u32 choffs) const + { + return rhythm_enable() && (choffs >= 6 && choffs <= 8); + } + + // internal state + u16 m_lfo_am_counter; // LFO AM counter + u16 m_lfo_pm_counter; // LFO PM counter + u32 m_noise_lfsr; // noise LFSR state + u8 m_lfo_am; // current LFO AM value + u8 m_regdata[REGISTERS]; // register data + u16 m_waveform[WAVEFORMS][WAVEFORM_LENGTH]; // waveforms +}; + +using ymopl_registers = ymopl_registers_base<1>; +using ymopl2_registers = ymopl_registers_base<2>; +using ymopl3_registers = ymopl_registers_base<3>; +using ymopl4_registers = ymopl_registers_base<4>; + + +// ======================> ymopll_registers + // -// Special multi-frequency registers (channel implicitly #2; operator in address bits 0-1) -// A8-AB xxxxxxxx Frequency number lower 8 bits -// AC-AF --xxx--- Block (0-7) -// -----xxx Frequency number upper 3 bits +// OPLL register map: +// +// System-wide registers: +// 0E --x----- Rhythm enable +// ---x---- Bass drum key on +// ----x--- Snare drum key on +// -----x-- Tom key on +// ------x- Top cymbal key on +// -------x High hat key on +// 0F xxxxxxxx Test register +// +// Per-channel registers (channel in address bits 0-3) +// 10-18 xxxxxxxx F-number (low 8 bits) +// 20-28 --x----- Sustain on +// ---x---- Key on +// --- xxx- Block (octvate, 0-7) +// -------x F-number (high bit) +// 30-38 xxxx---- Instrument selection +// ----xxxx Volume +// +// User instrument registers (for carrier, modulator operators) +// 00-01 x------- AM enable +// -x------ PM enable (VIB) +// --x----- EG type +// ---x---- Key scale rate +// ----xxxx Multiple value (0-15) +// 02 xx------ Key scale level (carrier, 0-3) +// --xxxxxx Total level (modulator, 0-63) +// 03 xx------ Key scale level (modulator, 0-3) +// ---x---- Rectified wave (carrier) +// ----x--- Rectified wave (modulator) +// -----xxx Feedback level for operator 1 (0-7) +// 04-05 xxxx---- Attack rate (0-15) +// ----xxxx Decay rate (0-15) +// 06-07 xxxx---- Sustain level (0-15) +// ----xxxx Release rate (0-15) +// +// Internal (fake) registers: +// 40-48 xxxxxxxx Current instrument base address +// 4E-5F xxxxxxxx Current instrument base address + operator slot (0/1) +// 70-FF xxxxxxxx Data for instruments (1-16 plus 3 drums) // -class ymopna_registers : public ymopn_registers +class ymopll_registers : public ymfm_registers_base { public: - // constants - static constexpr u8 CHANNELS = 6; - static constexpr u16 REGISTERS = 0x200; + static constexpr u32 OUTPUTS = 2; + static constexpr u32 CHANNELS = 9; + static constexpr u32 ALL_CHANNELS = (1 << CHANNELS) - 1; + static constexpr u32 OPERATORS = CHANNELS * 2; + static constexpr bool DYNAMIC_OPS = false; + static constexpr u32 WAVEFORMS = 2; + static constexpr u32 REGISTERS = 0x40; + static constexpr u32 REG_MODE = 0x3f; + static constexpr u32 DEFAULT_PRESCALE = 4; + static constexpr u32 EG_CLOCK_DIVIDER = 1; + static constexpr bool EG_HAS_DEPRESS = true; + static constexpr bool EG_HAS_SSG = false; + static constexpr bool MODULATOR_DELAY = true; + static constexpr u32 CSM_TRIGGER_MASK = 0; + static constexpr u8 STATUS_TIMERA = 0; + static constexpr u8 STATUS_TIMERB = 0; + static constexpr u8 STATUS_BUSY = 0; + static constexpr u8 STATUS_IRQ = 0; + + // OPLL-specific constants + static constexpr u32 INSTDATA_SIZE = 0x90; // constructor - ymopna_registers(std::vector ®data, u16 chbase = 0, u16 opbase = 0) : - ymopn_registers(regdata, chbase, opbase) + ymopll_registers(); + + // register for save states + void save(device_t &device); + + // reset to initial state + void reset(); + + // map channel number to register offset + static constexpr u32 channel_offset(u32 chnum) + { + assert(chnum < CHANNELS); + return chnum; + } + + // map operator number to register offset + static constexpr u32 operator_offset(u32 opnum) { + assert(opnum < OPERATORS); + return opnum; } - // return channel/operator number - u8 chnum() const { return BIT(m_chbase, 0, 2) + 3 * BIT(m_chbase, 8); } + // return an array of operator indices for each channel + struct operator_mapping { u32 chan[CHANNELS]; }; + void operator_map(operator_mapping &dest) const; + + // handle writes to the register array + bool write(u16 index, u8 data, u32 &chan, u32 &opmask); + + // clock the noise and LFO, if present, returning LFO PM value + s32 clock_noise_and_lfo(); + + // reset the LFO + void reset_lfo() { m_lfo_am_counter = m_lfo_pm_counter = 0; } + + // return the AM offset from LFO for the given channel + // on OPL this is just a fixed value + u32 lfo_am_offset(u32 choffs) const { return m_lfo_am; } + + // return LFO/noise states + u32 noise_state() const { return m_noise_lfsr >> 23; } - // reset state to default values - void reset() + // caching helpers + void cache_operator_data(u32 choffs, u32 opoffs, ymfm_opdata_cache &cache); + + // compute the phase step, given a PM value + u32 compute_phase_step(u32 choffs, u32 opoffs, ymfm_opdata_cache const &cache, s32 lfo_raw_pm); + + // log a key-on event + void log_keyon(u32 choffs, u32 opoffs); + + // set the instrument data + void set_instrument_data(u8 const *data) { - // enable output on both channels by default - m_regdata[0xb4] = m_regdata[0xb5] = m_regdata[0xb6] = 0xc0; - m_regdata[0x1b4] = m_regdata[0x1b5] = m_regdata[0x1b6] = 0xc0; + memcpy(&m_instdata[0], data, INSTDATA_SIZE); } - // create a new version of ourself with a different channel/operator base - ymopna_registers channel_registers(u8 chnum) { return ymopna_registers(m_regdata, channel_offset(chnum)); } - ymopna_registers operator_registers(u8 opnum) { return ymopna_registers(m_regdata, m_chbase, m_chbase + operator_offset(opnum)); } + // system-wide registers + u32 rhythm_enable() const { return byte(0x0e, 5, 1); } + u32 rhythm_keyon() const { return byte(0x0e, 4, 0); } + u32 test() const { return byte(0x0f, 0, 8); } + u32 waveform_enable() const { return 1; } + u32 timer_a_value() const { return 0; } + u32 timer_b_value() const { return 0; } + u32 status_mask() const { return 0; } + u32 irq_reset() const { return 0; } + u32 reset_timer_b() const { return 0; } + u32 reset_timer_a() const { return 0; } + u32 enable_timer_b() const { return 0; } + u32 enable_timer_a() const { return 0; } + u32 load_timer_b() const { return 0; } + u32 load_timer_a() const { return 0; } + u32 csm() const { return 0; } - // OPNA-specific system-wide registers - u8 lfo_enabled() const /* 3 bits */ { return sysbyte(0x22, 3, 1); } - u8 lfo_rate() const /* 3 bits */ { return sysbyte(0x22, 0, 3); } - u8 keyon_channel() const /* 3 bits */ + // per-channel registers + u32 ch_block_freq(u32 choffs) const { return word(0x20, 0, 4, 0x10, 0, 8, choffs); } + u32 ch_sustain(u32 choffs) const { return byte(0x20, 5, 1, choffs); } + u32 ch_total_level(u32 choffs) const { return instchbyte(0x02, 0, 6, choffs); } + u32 ch_feedback(u32 choffs) const { return instchbyte(0x03, 0, 3, choffs); } + u32 ch_algorithm(u32 choffs) const { return 0; } + u32 ch_instrument(u32 choffs) const { return byte(0x30, 4, 4, choffs); } + u32 ch_output_any(u32 choffs) const { return 1; } + u32 ch_output_0(u32 choffs) const { return !is_rhythm(choffs); } + u32 ch_output_1(u32 choffs) const { return is_rhythm(choffs); } + u32 ch_output_2(u32 choffs) const { return 0; } + u32 ch_output_3(u32 choffs) const { return 0; } + + // per-operator registers + u32 op_lfo_am_enable(u32 opoffs) const { return instopbyte(0x00, 7, 1, opoffs); } + u32 op_lfo_pm_enable(u32 opoffs) const { return instopbyte(0x00, 6, 1, opoffs); } + u32 op_eg_sustain(u32 opoffs) const { return instopbyte(0x00, 5, 1, opoffs); } + u32 op_ksr(u32 opoffs) const { return instopbyte(0x00, 4, 1, opoffs); } + u32 op_multiple(u32 opoffs) const { return instopbyte(0x00, 0, 4, opoffs); } + u32 op_ksl(u32 opoffs) const { return instopbyte(0x02, 6, 2, opoffs); } + u32 op_waveform(u32 opoffs) const { return instchbyte(0x03, 3 + BIT(opoffs, 0), 1, opoffs >> 1); } + u32 op_attack_rate(u32 opoffs) const { return instopbyte(0x04, 4, 4, opoffs); } + u32 op_decay_rate(u32 opoffs) const { return instopbyte(0x04, 0, 4, opoffs); } + u32 op_sustain_level(u32 opoffs) const { return instopbyte(0x06, 4, 4, opoffs); } + u32 op_release_rate(u32 opoffs) const { return instopbyte(0x06, 0, 4, opoffs); } + u32 op_volume(u32 opoffs) const { return byte(0x30, 4 * BIT(~opoffs, 0), 4, opoffs >> 1); } + +private: + // return a bitfield extracted from a byte + u32 byte(u32 offset, u32 start, u32 count, u32 extra_offset = 0) const { - // ensure that both 3 and 7 return out-of-range values - u8 temp = sysbyte(0x28, 0, 3); - return (temp == 3) ? 6 : temp - BIT(temp, 2); + return BIT(m_regdata[offset + extra_offset], start, count); } - // OPNA-specific per-channel registers - u8 pan_left() const /* 1 bit */ { return chbyte(0xb4, 7, 1); } - u8 pan_right() const /* 1 bit */ { return chbyte(0xb4, 6, 1); } - u8 lfo_am_sensitivity() const /* 2 bits */ { return chbyte(0xb4, 4, 2); } - u8 lfo_pm_sensitivity() const /* 3 bits */ { return chbyte(0xb4, 0, 3); } + // return a bitfield extracted from a pair of bytes, MSBs listed first + u32 word(u32 offset1, u32 start1, u32 count1, u32 offset2, u32 start2, u32 count2, u32 extra_offset = 0) const + { + return (byte(offset1, start1, count1, extra_offset) << count2) | byte(offset2, start2, count2, extra_offset); + } - // OPNA-specific per-operator registers - u8 lfo_am_enabled() const /* 1 bit */ { return opbyte(0x60, 7, 1); } + // helpers to read from instrument channel/operator data + u32 instchbyte(u32 offset, u32 start, u32 count, u32 choffs) const { return BIT(m_chinst[choffs][offset], start, count); } + u32 instopbyte(u32 offset, u32 start, u32 count, u32 opoffs) const { return BIT(m_opinst[opoffs][offset], start, count); } -protected: - // convert a channel number into a register offset - static constexpr u16 channel_offset(u8 chnum) { return chnum % 3 + ((chnum / 3) << 8); } -}; + // helper to determine if the this channel is an active rhythm channel + bool is_rhythm(u32 choffs) const + { + return rhythm_enable() && choffs >= 6; + } + // internal state + u16 m_lfo_am_counter; // LFO AM counter + u16 m_lfo_pm_counter; // LFO PM counter + u32 m_noise_lfsr; // noise LFSR state + u8 m_lfo_am; // current LFO AM value + u8 const *m_chinst[CHANNELS]; // pointer to instrument data for each channel + u8 const *m_opinst[OPERATORS]; // pointer to instrument data for each operator + u8 m_regdata[REGISTERS]; // register data + u8 m_instdata[INSTDATA_SIZE]; // instrument data + u16 m_waveform[WAVEFORMS][WAVEFORM_LENGTH]; // waveforms +}; //********************************************************* // CORE ENGINE CLASSES //********************************************************* +// forward declarations +template class ymfm_engine_base; + +// three different keyon sources; actual keyon is an OR over all of these +enum ymfm_keyon_type : u32 +{ + YMFM_KEYON_NORMAL = 0, + YMFM_KEYON_RHYTHM = 1, + YMFM_KEYON_CSM = 2 +}; + + // ======================> ymfm_operator +// ymfm_operator represents an FM operator (or "slot" in FM parlance), which +// produces an output sine wave modulated by an envelope template class ymfm_operator { - enum envelope_state : u8 - { - ENV_ATTACK = 0, - ENV_DECAY = 1, - ENV_SUSTAIN = 2, - ENV_RELEASE = 3 - }; - static constexpr u16 ENV_QUIET = 0x200; + // "quiet" value, used to optimize when we can skip doing working + static constexpr u32 ENV_QUIET = 0x200; public: // constructor - ymfm_operator(RegisterType regs); + ymfm_operator(ymfm_engine_base &owner, u32 opoffs); // register for save states - void save(device_t &device, u8 index); + void save(device_t &device, u32 index); // reset the operator state void reset(); + // set the current channel + void set_choffs(u32 choffs) { m_choffs = choffs; } + + // prepare prior to clocking + bool prepare(); + // master clocking function - void clock(u32 env_counter, s8 lfo_raw_pm, u16 block_freq); + void clock(u32 env_counter, s32 lfo_raw_pm); + + // return the current phase value + u32 phase() const { return m_phase >> 10; } // compute operator volume - s16 compute_volume(u16 modulation, u16 am_offset) const; + s32 compute_volume(u32 phase, u32 am_offset) const; // compute volume for the OPM noise channel - s16 compute_noise_volume(u8 noise_state, u16 am_offset) const; + s32 compute_noise_volume(u32 am_offset) const; // key state control - void keyonoff(u8 on) { m_keyon = on; } - void keyon_csm() { m_csm_triggered = 1; } + void keyonoff(u32 on, ymfm_keyon_type type); - // are we active? - bool active() const { return (m_env_state != ENV_RELEASE || m_env_attenuation < ENV_QUIET); } + // return a reference to our registers + RegisterType ®s() { return m_regs; } private: - // convert the generic block_freq into a 5-bit keycode - u8 block_freq_to_keycode(u16 block_freq); - - // return the effective 6-bit ADSR rate after adjustments - u8 effective_rate(u8 rawrate, u8 keycode); - // start the attack phase - void start_attack(u8 keycode); + void start_attack(); // start the release phase void start_release(); // clock phases - void clock_keystate(u8 keystate, u8 keycode); - void clock_ssg_eg_state(u8 keycode); - void clock_envelope(u16 env_counter, u8 keycode); - void clock_phase(s8 lfo_raw_pm, u16 block_freq); + void clock_keystate(u32 keystate); + void clock_ssg_eg_state(); + void clock_envelope(u32 env_counter); + void clock_phase(s32 lfo_raw_pm); // return effective attenuation of the envelope - u16 envelope_attenuation(u8 am_offset) const; + u32 envelope_attenuation(u32 am_offset) const; // internal state + u32 m_choffs; // channel offset in registers + u32 m_opoffs; // operator offset in registers u32 m_phase; // current phase value (10.10 format) u16 m_env_attenuation; // computed envelope attenuation (4.6 format) - envelope_state m_env_state; // current envelope state + ymfm_envelope_state m_env_state; // current envelope state u8 m_ssg_inverted; // non-zero if the output should be inverted (bit 0) u8 m_key_state; // current key state: on or off (bit 0) - u8 m_keyon; // live key on state (bit 0) - u8 m_csm_triggered; // true if a CSM key on has been triggered (bit 0) - RegisterType m_regs; // operator-specific registers + u8 m_keyon_live; // live key on state (bit 0 = direct, bit 1 = rhythm, bit 2 = CSM) + ymfm_opdata_cache m_cache; // cached values for performance + RegisterType &m_regs; // direct reference to registers + ymfm_engine_base &m_owner; // reference to the owning engine }; -template<> -u8 ymfm_operator::block_freq_to_keycode(u16 block_freq); - -template<> -void ymfm_operator::clock_phase(s8 lfo_raw_pm, u16 block_freq); - // ======================> ymfm_channel +// ymfm_channel represents an FM channel which combines the output of 2 or 4 +// operators into a final result template class ymfm_channel { public: // constructor - ymfm_channel(RegisterType regs); + ymfm_channel(ymfm_engine_base &owner, u32 choffs); // register for save states - void save(device_t &device, u8 index); + void save(device_t &device, u32 index); // reset the channel state void reset(); + // assign operators + void assign(int index, ymfm_operator *op) + { + assert(index < std::size(m_op)); + m_op[index] = op; + if (op != nullptr) + op->set_choffs(m_choffs); + } + // signal key on/off to our operators - void keyonoff(u8 states); + void keyonoff(u32 states, ymfm_keyon_type type); - // signal CSM key on to our operators - void keyon_csm(); + // prepare prior to clocking + bool prepare(); // master clocking function - void clock(u32 env_counter, s8 lfo_raw_pm, bool is_multi_freq); + void clock(u32 env_counter, s32 lfo_raw_pm); + + // specific 2-operator and 4-operator output handlers + void output_2op(s32 outputs[RegisterType::OUTPUTS], u32 rshift, s32 clipmax) const; + void output_4op(s32 outputs[RegisterType::OUTPUTS], u32 rshift, s32 clipmax) const; + + // compute the special OPL rhythm channel outputs + void output_rhythm_ch6(s32 outputs[RegisterType::OUTPUTS], u32 rshift, s32 clipmax) const; + void output_rhythm_ch7(u32 phase_select, s32 outputs[RegisterType::OUTPUTS], u32 rshift, s32 clipmax) const; + void output_rhythm_ch8(u32 phase_select, s32 outputs[RegisterType::OUTPUTS], u32 rshift, s32 clipmax) const; - // compute the channel output and add to the left/right output sums - void output(u8 lfo_raw_am, u8 noise_state, s32 &lsum, s32 &rsum, u8 rshift, s16 clipmax) const; + // are we a 4-operator channel or a 2-operator one? + bool is4op() const + { + if (RegisterType::DYNAMIC_OPS) + return (m_op[2] != nullptr); + return (RegisterType::OPERATORS / RegisterType::CHANNELS == 4); + } - // is this channel active? - bool active() const { return m_op1.active() || m_op2.active() || m_op3.active() || m_op4.active(); } + // return a reference to our registers + RegisterType ®s() { return m_regs; } private: - // convert a 6/8-bit raw AM value into an amplitude offset based on sensitivity - u16 lfo_am_offset(u8 am_value) const; + // helper to add values to the outputs based on channel enables + void add_to_output(u32 choffs, s32 *outputs, s32 value) const + { + if (RegisterType::OUTPUTS == 1 || m_regs.ch_output_0(choffs)) + outputs[0] += value; + if (RegisterType::OUTPUTS >= 2 && m_regs.ch_output_1(choffs)) + outputs[1] += value; + if (RegisterType::OUTPUTS >= 3 && m_regs.ch_output_2(choffs)) + outputs[2] += value; + if (RegisterType::OUTPUTS >= 4 && m_regs.ch_output_3(choffs)) + outputs[3] += value; + } // internal state + u32 m_choffs; // channel offset in registers s16 m_feedback[2]; // feedback memory for operator 1 mutable s16 m_feedback_in; // next input value for op 1 feedback (set in output) - ymfm_operator m_op1; // operator 1 - ymfm_operator m_op2; // operator 2 - ymfm_operator m_op3; // operator 3 - ymfm_operator m_op4; // operator 4 - RegisterType m_regs; // channel-specific registers + ymfm_operator *m_op[4]; // up to 4 operators + RegisterType &m_regs; // direct reference to registers + ymfm_engine_base &m_owner; // reference to the owning engine }; -template<> -u16 ymfm_channel::lfo_am_offset(u8 lfo_raw_am) const; - // ======================> ymfm_engine_base +// ymfm_engine_base represents a set of operators and channels which together +// form a Yamaha FM core; chips that implement other engines (ADPCM, wavetable, +// etc) take this output and combine it with the others externally template class ymfm_engine_base { public: - enum : u8 - { - STATUS_TIMERA = 0x01, - STATUS_TIMERB = 0x02, - STATUS_BUSY = 0x80 - }; + // expose some constants from the registers + static constexpr u32 OUTPUTS = RegisterType::OUTPUTS; + static constexpr u32 CHANNELS = RegisterType::CHANNELS; + static constexpr u32 ALL_CHANNELS = RegisterType::ALL_CHANNELS; + static constexpr u32 OPERATORS = RegisterType::OPERATORS; + + // also expose status flags for consumers that inject additional bits + static constexpr u8 STATUS_TIMERA = RegisterType::STATUS_TIMERA; + static constexpr u8 STATUS_TIMERB = RegisterType::STATUS_TIMERB; + static constexpr u8 STATUS_BUSY = RegisterType::STATUS_BUSY; + static constexpr u8 STATUS_IRQ = RegisterType::STATUS_IRQ; // constructor ymfm_engine_base(device_t &device); + // configuration helpers + auto irq_handler() { return m_irq_handler.bind(); } + // register for save states void save(device_t &device); @@ -740,10 +1286,10 @@ void reset(); // master clocking function - u32 clock(u8 chanmask); + u32 clock(u32 chanmask); // compute sum of channel outputs - void output(s32 &lsum, s32 &rsum, u8 rshift, s16 clipmax, u8 chanmask) const; + void output(s32 outputs[RegisterType::OUTPUTS], u32 rshift, s32 clipmax, u32 chanmask) const; // write to the OPN registers void write(u16 regnum, u8 data); @@ -752,7 +1298,12 @@ u8 status() const; // set/reset bits in the status register, updating the IRQ status - void set_reset_status(u8 set, u8 reset) { m_status = (m_status | set) & ~reset; schedule_check_interrupts(); } + u8 set_reset_status(u8 set, u8 reset) + { + m_status = (m_status | set) & ~reset; + schedule_check_interrupts(); + return m_status; + } // set the IRQ mask void set_irq_mask(u8 mask) { m_irq_mask = mask; schedule_check_interrupts(); } @@ -767,26 +1318,29 @@ void set_busy_end(attotime end) { m_busy_end = end; } // return the current clock prescale - u8 clock_prescale() const { return m_clock_prescale; } + u32 clock_prescale() const { return m_clock_prescale; } // set prescale factor (2/3/6) - void set_clock_prescale(u8 prescale) { m_clock_prescale = prescale; } + void set_clock_prescale(u32 prescale) { m_clock_prescale = prescale; } - // configuration helpers - auto irq_handler() { return m_irq_handler.bind(); } + // compute sample rate + u32 sample_rate(u32 baseclock) const { return baseclock / (m_clock_prescale * OPERATORS); } // reset the LFO state - void reset_lfo() { m_lfo_counter = 0; } + void reset_lfo() { m_regs.reset_lfo(); } -private: - // clock the LFO, updating m_lfo_am and return the signed PM value - s8 clock_lfo(); + // return the owning device + device_t &device() const { return m_device; } - // clock the noise generator - void clock_noise(); + // return a reference to our registers + RegisterType ®s() { return m_regs; } + +protected: + // assign the current set of operators to channels + void assign_operators(); // update the state of the given timer - void update_timer(u8 which, u8 enable); + void update_timer(u32 which, u32 enable); // timer callback TIMER_CALLBACK_MEMBER(timer_handler); @@ -803,12 +1357,6 @@ // internal state device_t &m_device; // reference to the owning device u32 m_env_counter; // envelope counter; low 2 bits are sub-counter - u32 m_lfo_counter; // LFO counter - u32 m_noise_lfsr; // noise LFSR state - u8 m_noise_counter; // noise counter - u8 m_noise_state; // latched noise state - u8 m_noise_lfo; // latched LFO noise value - u8 m_lfo_am; // current LFO AM value u8 m_status; // current status register u8 m_clock_prescale; // prescale factor (2/3/6) u8 m_irq_mask; // mask of which bits signal IRQs @@ -819,26 +1367,49 @@ attotime m_busy_end; // end of the busy time emu_timer *m_timer[2]; // our two timers devcb_write_line m_irq_handler; // IRQ callback - std::unique_ptr> m_channel[RegisterType::CHANNELS]; // channel pointers - std::vector m_regdata; // raw register data RegisterType m_regs; // register accessor + std::unique_ptr> m_channel[CHANNELS]; // channel pointers + std::unique_ptr> m_operator[OPERATORS]; // operator pointers }; -template<> -s8 ymfm_engine_base::clock_lfo(); - -template<> -void ymfm_engine_base::clock_noise(); - // ======================> template instantiations extern template class ymfm_engine_base; extern template class ymfm_engine_base; extern template class ymfm_engine_base; +extern template class ymfm_engine_base; +extern template class ymfm_engine_base; +extern template class ymfm_engine_base; using ymopm_engine = ymfm_engine_base; using ymopn_engine = ymfm_engine_base; using ymopna_engine = ymfm_engine_base; +using ymopl_engine = ymfm_engine_base; +using ymopl2_engine = ymfm_engine_base; +using ymopl3_engine = ymfm_engine_base; +using ymopl4_engine = ymfm_engine_base; + + +// ======================> ymopll_engine + +// ymopll_engine is a special case because instrument data needs to be +// provided from an external source +class ymopll_engine : public ymfm_engine_base +{ +public: + // constructor + ymopll_engine(device_t &device) : + ymfm_engine_base(device) + { + } + + // set the instrument data + void set_instrument_data(u8 const *data) + { + m_regs.set_instrument_data(data); + } +}; + #endif // MAME_SOUND_YMFM_H diff -Nru mame-0.230+dfsg.1/src/devices/video/pwm.cpp mame-0.231+dfsg.1/src/devices/video/pwm.cpp --- mame-0.230+dfsg.1/src/devices/video/pwm.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/video/pwm.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -2,28 +2,28 @@ // copyright-holders:hap /* -This thing is a generic helper for PWM(strobed) display elements, to prevent flickering -and optionally handle perceived brightness levels. +This thing is a generic helper for PWM(strobed) display elements, to prevent +flickering and optionally handle perceived brightness levels. -Common usecase is to call matrix(selmask, datamask), a collision between the 2 masks -implies a powered-on display element (eg. a LED, or VFD sprite). The maximum matrix -size is 64 by 64, simply due to uint64_t constraints. If a larger size is needed, -create an array of pwm_display_device. - -If display elements are directly addressable, you can also use write_element or write_row -to set them. In this case it is required to call update() to apply the changes. - -Display element states are sent to output tags "y.x" where y is the matrix row number, -x is the row bit. It is also sent to "y.a" for all rows. The output state is 0 for off, -and >0 for on, depending on brightness level. If segmask is defined, it is also sent -to "digity", for use with multi-state elements, eg. 7seg leds. - -If you use this device in a slot, or use multiple of them (or just don't want to use -the default output tags), set a callback. - -Brightness tresholds (0.0 to 1.0) indicate how long an element was powered on in the last -frame, eg. 0.01 means a minimum on-time for 1%. Some games use two levels of brightness -by strobing elements longer. +Common usecase is to call matrix(selmask, datamask), a collision between the +2 masks implies a powered-on display element (eg. a LED, or VFD sprite). +The maximum matrix size is 64 by 64, simply due to uint64_t constraints. +If a larger size is needed, create an array of pwm_display_device. + +If display elements are directly addressable, you can also use write_element +or write_row to set them. + +Display element states are sent to output tags "y.x" where y is the matrix row +number, x is the row bit. It is also sent to "y.a" for all rows. The output state +is 0 for off, and >0 for on, depending on brightness level. If segmask is defined, +it is also sent to "digity", for use with multi-state elements, eg. 7seg leds. + +If you use this device in a slot, or use multiple of them (or just don't want +to use the default output tags), set a callback. + +Brightness tresholds (0.0 to 1.0) indicate how long an element was powered on +in the last frame, eg. 0.01 means a minimum on-time for 1%. Some games use two +levels of brightness by strobing elements longer. TODO: @@ -43,7 +43,7 @@ // constructor //------------------------------------------------- -pwm_display_device::pwm_display_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : +pwm_display_device::pwm_display_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, PWM_DISPLAY, tag, owner, clock), m_out_x(*this, "%u.%u", 0U, 0U), m_out_a(*this, "%u.a", 0U), @@ -63,7 +63,6 @@ } - //------------------------------------------------- // device_start/reset //------------------------------------------------- @@ -84,16 +83,14 @@ } // initialize + m_rowsel = 0; std::fill(std::begin(m_rowdata), std::end(m_rowdata), 0); - std::fill(std::begin(m_rowdata_prev), std::end(m_rowdata_prev), 0); + for (auto &bri : m_bri) std::fill(std::begin(bri), std::end(bri), 0.0); m_frame_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(pwm_display_device::frame_tick),this)); - m_update_time = machine().time(); - - m_rowsel = 0; - m_rowsel_prev = 0; + m_sync_time = machine().time(); // register for savestates save_item(NAME(m_width)); @@ -107,12 +104,10 @@ save_item(NAME(m_segmask)); save_item(NAME(m_rowsel)); - save_item(NAME(m_rowsel_prev)); save_item(NAME(m_rowdata)); - save_item(NAME(m_rowdata_prev)); save_item(NAME(m_bri)); - save_item(NAME(m_update_time)); + save_item(NAME(m_sync_time)); save_item(NAME(m_acc)); } @@ -122,11 +117,10 @@ fatalerror("%s: Invalid size %d*%d, maximum is 64*64!\n", tag(), m_height, m_width); schedule_frame(); - m_update_time = machine().time(); + m_sync_time = machine().time(); } - //------------------------------------------------- // public handlers (most of the interface is in the .h file) //------------------------------------------------- @@ -156,8 +150,10 @@ return *this; } -void pwm_display_device::matrix_partial(u8 start, u8 height, u64 rowsel, u64 rowdata, bool upd) +void pwm_display_device::matrix_partial(u8 start, u8 height, u64 rowsel, u64 rowdata) { + sync(); + u64 selmask = (u64(1) << height) - 1; rowsel &= selmask; selmask <<= start; @@ -170,45 +166,8 @@ m_rowdata[y] = (rowsel & 1) ? (rowdata & rowmask) : 0; rowsel >>= 1; } - - if (upd) - update(); } -void pwm_display_device::update() -{ - // call this every time after m_rowdata is changed (automatic with matrix) - const attotime now = machine().time(); - const attotime diff = (m_update_time >= now) ? attotime::zero : now - m_update_time; - - u64 sel = m_rowsel_prev; - m_rowsel_prev = m_rowsel; - - // accumulate active time - for (int y = 0; y < m_height; y++) - { - u64 row = m_rowdata_prev[y]; - m_rowdata_prev[y] = m_rowdata[y]; - - if (diff != attotime::zero) - { - if (sel & 1) - m_acc[y][m_width] += diff; - - for (int x = 0; x < m_width; x++) - { - if (row & 1) - m_acc[y][x] += diff; - row >>= 1; - } - } - sel >>= 1; - } - - m_update_time = now; -} - - //------------------------------------------------- // internal handlers @@ -239,7 +198,7 @@ if (cutoff > 1.0) cutoff = 1.0; - update(); // final timeslice + sync(); // final timeslice for (int y = 0; y < m_height; y++) { @@ -290,3 +249,33 @@ schedule_frame(); } + +void pwm_display_device::sync() +{ + const attotime now = machine().time(); + const attotime last = m_sync_time; + m_sync_time = now; + + if (last >= now) + return; + + const attotime diff = now - last; + u64 sel = m_rowsel; + + // accumulate active time + for (int y = 0; y < m_height; y++) + { + u64 row = m_rowdata[y]; + + if (sel & 1) + m_acc[y][m_width] += diff; + + for (int x = 0; x < m_width; x++) + { + if (row & 1) + m_acc[y][x] += diff; + row >>= 1; + } + sel >>= 1; + } +} diff -Nru mame-0.230+dfsg.1/src/devices/video/pwm.h mame-0.231+dfsg.1/src/devices/video/pwm.h --- mame-0.230+dfsg.1/src/devices/video/pwm.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/video/pwm.h 2021-04-27 15:32:05.000000000 +0000 @@ -35,19 +35,18 @@ void set_bri_one(u8 i, double level) { m_levels[i] = level; } void segmask_one(u8 y, u64 mask) { m_segmask[y] = mask; } - void matrix_partial(u8 start, u8 height, u64 rowsel, u64 rowdata, bool upd = true); - void matrix(u64 rowsel, u64 rowdata, bool upd = true) { matrix_partial(0, m_height, rowsel, rowdata, upd); } - void update(); // apply changes to m_rowdata + void matrix_partial(u8 start, u8 height, u64 rowsel, u64 rowdata); + void matrix(u64 rowsel, u64 rowdata) { matrix_partial(0, m_height, rowsel, rowdata); } void clear() { matrix(0, 0); } // directly handle individual element (does not affect m_rowsel), y = row num, x = row bit int read_element(u8 y, u8 x) { return BIT(m_rowdata[y], x); } - void write_element(u8 y, u8 x, int state) { m_rowdata[y] = (m_rowdata[y] & ~(u64(1) << x)) | (u64(state ? 1 : 0) << x); } + void write_element(u8 y, u8 x, int state) { sync(); m_rowdata[y] = (m_rowdata[y] & ~(u64(1) << x)) | (u64(state ? 1 : 0) << x); } // directly handle row data u64 read_row(offs_t offset) { return m_rowdata[offset]; } - void write_row(offs_t offset, u64 data) { m_rowdata[offset] = data; m_rowsel |= u64(1) << offset; } - void clear_row(offs_t offset, u64 data = 0) { m_rowdata[offset] = 0; m_rowsel &= ~(u64(1) << offset); } + void write_row(offs_t offset, u64 data) { sync(); m_rowdata[offset] = data; m_rowsel |= u64(1) << offset; } + void clear_row(offs_t offset, u64 data = 0) { sync(); m_rowdata[offset] = 0; m_rowsel &= ~(u64(1) << offset); } // directly handle element current brightness double read_element_bri(u8 y, u8 x) { return m_bri[y][x]; } @@ -81,17 +80,16 @@ u64 m_segmask[0x40]; u64 m_rowsel; - u64 m_rowsel_prev; u64 m_rowdata[0x40]; - u64 m_rowdata_prev[0x40]; double m_bri[0x40][0x41]; - attotime m_update_time; + attotime m_sync_time; attotime m_acc[0x40][0x41]; emu_timer *m_frame_timer; TIMER_CALLBACK_MEMBER(frame_tick); void schedule_frame(); + void sync(); }; diff -Nru mame-0.230+dfsg.1/src/devices/video/t6963c.cpp mame-0.231+dfsg.1/src/devices/video/t6963c.cpp --- mame-0.230+dfsg.1/src/devices/video/t6963c.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/video/t6963c.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -308,7 +308,7 @@ // MD0, MD1 m_number_lines = 8 - (data & 3) * 2; - if (BIT(data, 4)) // MDS + if (BIT(data, 4)) // MDS m_number_lines += 8; switch((data >> 2) & 3) // MD2, MD3 @@ -405,8 +405,8 @@ { save_item(NAME(m_fs)); - m_lcdc->set_md(4); // 8 lines x 40 columns - m_lcdc->set_fs(m_fs << 1); // font size 6x8 or 8x8 + m_lcdc->set_md(4); // 8 lines x 40 columns + m_lcdc->set_fs(m_fs << 1); // font size 6x8 or 8x8 } @@ -423,7 +423,7 @@ void lm24014h_device::lcd_palette(palette_device &palette) const { palette.set_pen_color(0, rgb_t(138, 146, 148)); - palette.set_pen_color(1, rgb_t(92, 83, 88)); + palette.set_pen_color(1, rgb_t(69, 62, 66)); } @@ -438,10 +438,10 @@ m_lcdc->set_addrmap(0, &lm24014h_device::ram_map); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD)); - screen.set_refresh_hz(50); + screen.set_refresh_hz(60); screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); screen.set_size(240, 64); - screen.set_visarea(0, 240-1, 0, 64-1); + screen.set_visarea_full(); screen.set_screen_update("lcdc", FUNC(t6963c_device::screen_update)); screen.set_palette("palette"); diff -Nru mame-0.230+dfsg.1/src/devices/video/upd7220.cpp mame-0.231+dfsg.1/src/devices/video/upd7220.cpp --- mame-0.230+dfsg.1/src/devices/video/upd7220.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/video/upd7220.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -11,9 +11,6 @@ TODO: - implement FIFO as ring buffer - - commands - - DMAR - - DMAW - incomplete / unimplemented FIGD / GCHRD draw modes - FIGD character - slanted character @@ -21,11 +18,12 @@ - read data - modify data - write data - - QX-10 diagnostic test has positioning bugs with the bitmap display test; - QX-10 diagnostic test misses the zooming factor (external pin); - compis2 SAD address for bitmap is 0x20000 for whatever reason (presumably missing banking); - A5105 has a FIFO bug with the RDAT, should be a lot larger when it scrolls up. - The problem is that DMA-ing with RDAT/WDAT shouldn't be instant; + Can be fixed with a DRDY mechanism for RDAT/WDAT; + - Some later SWs on PC-98 throws "Invalid command byte 05" (zettmj on Epson logo), + actual undocumented command to reset something? - honor visible area - wide mode (32-bit access) @@ -455,8 +453,16 @@ //------------------------------------------------- // read_vram - //------------------------------------------------- +inline uint16_t upd7220_device::read_vram() +{ + uint16_t const data = readword(m_ead*2); + m_ead += x_dir[m_figs.m_dir] + (y_dir[m_figs.m_dir] * m_pitch); + m_ead &= 0x3ffff; -inline void upd7220_device::read_vram(uint8_t type, uint8_t mod) + return data; +} + +inline void upd7220_device::rdat(uint8_t type, uint8_t mod) { if (type == 1) { @@ -469,47 +475,82 @@ while (m_figs.m_dc && m_fifo_ptr < (type ? 15 : 14)) { + uint16_t const data = read_vram(); switch(type) { case 0: - queue(readbyte(m_ead*2), 0); - queue(readbyte(m_ead*2+1), 0); + queue(data & 0xff, 0); + queue((data >> 8) & 0xff, 0); break; case 2: - queue(readbyte(m_ead*2), 0); + queue(data & 0xff, 0); break; case 3: - queue(readbyte(m_ead*2+1), 0); + queue((data >> 8) & 0xff, 0); break; } m_figs.m_dc--; - m_ead += x_dir[m_figs.m_dir] + (y_dir[m_figs.m_dir] * m_pitch); - m_ead &= 0x3ffff; } if (m_figs.m_dc == 0) reset_figs_param(); } - //------------------------------------------------- // write_vram - //------------------------------------------------- - -inline void upd7220_device::write_vram(uint8_t type, uint8_t mod) +inline void upd7220_device::write_vram(uint8_t type, uint8_t mod, uint16_t data) { - uint16_t result; + switch(mod & 3) + { + case 0x00: //replace + if(type == 0) + writeword(m_ead*2+0, data); + if(type == 2) + writebyte(m_ead*2+0, data & 0xff); + if(type == 3) + writebyte(m_ead*2+1, data >> 8); + break; + case 0x01: //complement + if(type == 0) + writeword(m_ead*2+0, readword(m_ead*2+0) ^ data); + if(type == 2) + writebyte(m_ead*2+0, readbyte(m_ead*2+0) ^ (data & 0xff)); + if(type == 3) + writebyte(m_ead*2+1, readbyte(m_ead*2+1) ^ (data >> 8)); + break; + case 0x02: //reset to zero + if(type == 0) + writeword(m_ead*2+0, readword(m_ead*2+0) & ~data); + if(type == 2) + writebyte(m_ead*2+0, readbyte(m_ead*2+0) & ~(data & 0xff)); + if(type == 3) + writebyte(m_ead*2+1, readbyte(m_ead*2+1) & ~(data >> 8)); + break; + case 0x03: //set to one + if(type == 0) + writeword(m_ead*2+0, readword(m_ead*2+0) | data); + if(type == 2) + writebyte(m_ead*2+0, readbyte(m_ead*2+0) | (data & 0xff)); + if(type == 3) + writebyte(m_ead*2+1, readbyte(m_ead*2+1) | (data >> 8)); + break; + } - if (type == 1) + m_ead += x_dir[m_figs.m_dir] + (y_dir[m_figs.m_dir] * m_pitch); + m_ead &= 0x3ffff; +} + +inline void upd7220_device::wdat(uint8_t type, uint8_t mod) +{ + if(type == 1) { logerror("uPD7220 invalid type 1 WDAT parameter\n"); return; } - result = 0; - - result = m_pr[1] | (m_pr[2] << 8); + uint16_t result = m_pr[1] | (m_pr[2] << 8); switch(type) { @@ -534,44 +575,7 @@ for(int i = 0; i < m_figs.m_dc + 1; i++) { - switch(mod & 3) - { - case 0x00: //replace - if(type == 0) - writeword(m_ead*2+0, result); - if(type == 2) - writebyte(m_ead*2+0, result & 0xff); - if(type == 3) - writebyte(m_ead*2+1, result >> 8); - break; - case 0x01: //complement - if(type == 0) - writeword(m_ead*2+0, readword(m_ead*2+0) ^ result); - if(type == 2) - writebyte(m_ead*2+0, readbyte(m_ead*2+0) ^ (result & 0xff)); - if(type == 3) - writebyte(m_ead*2+1, readbyte(m_ead*2+1) ^ (result >> 8)); - break; - case 0x02: //reset to zero - if(type == 0) - writeword(m_ead*2+0, readword(m_ead*2+0) & ~result); - if(type == 2) - writebyte(m_ead*2+0, readbyte(m_ead*2+0) & ~(result & 0xff)); - if(type == 3) - writebyte(m_ead*2+1, readbyte(m_ead*2+1) & ~(result >> 8)); - break; - case 0x03: //set to one - if(type == 0) - writeword(m_ead*2+0, readword(m_ead*2+0) | result); - if(type == 2) - writebyte(m_ead*2+0, readbyte(m_ead*2+0) | (result & 0xff)); - if(type == 3) - writebyte(m_ead*2+1, readbyte(m_ead*2+1) | (result >> 8)); - break; - } - - m_ead += x_dir[m_figs.m_dir] + (y_dir[m_figs.m_dir] * m_pitch); - m_ead &= 0x3ffff; + write_vram(type, mod, result); } } @@ -942,7 +946,6 @@ void upd7220_device::draw_rectangle(int x, int y) { - int i; const int rect_x_dir[8] = { 0, 1, 0,-1, 1, 1,-1,-1 }; const int rect_y_dir[8] = { 1, 0,-1, 0, 1,-1,-1, 1 }; uint8_t rect_type,rect_dir; @@ -953,7 +956,7 @@ rect_type = (m_figs.m_dir & 1) << 2; rect_dir = rect_type | (((m_figs.m_dir >> 1) + 0) & 3); - for(i = 0;i < m_figs.m_d;i++) + for(int i = 0; i < m_figs.m_d; i++) { draw_pixel(x,y,i,pattern); x+=rect_x_dir[rect_dir]; @@ -962,7 +965,7 @@ rect_dir = rect_type | (((m_figs.m_dir >> 1) + 1) & 3); - for(i = 0;i < m_figs.m_d2;i++) + for(int i = 0; i < m_figs.m_d2; i++) { draw_pixel(x,y,i,pattern); x+=rect_x_dir[rect_dir]; @@ -971,7 +974,7 @@ rect_dir = rect_type | (((m_figs.m_dir >> 1) + 2) & 3); - for(i = 0;i < m_figs.m_d;i++) + for(int i = 0; i < m_figs.m_d; i++) { draw_pixel(x,y,i,pattern); x+=rect_x_dir[rect_dir]; @@ -980,7 +983,7 @@ rect_dir = rect_type | (((m_figs.m_dir >> 1) + 3) & 3); - for(i = 0;i < m_figs.m_d2;i++) + for(int i = 0; i < m_figs.m_d2; i++) { draw_pixel(x,y,i,pattern); x+=rect_x_dir[rect_dir]; @@ -989,7 +992,6 @@ m_ead = (x >> 4) + (y * (m_pitch >> m_figs.m_gd)); m_dad = x & 0x0f; - } @@ -1333,7 +1335,7 @@ LOG("%02x = %02x %02x (%c) %06x %04x\n",m_cr,m_pr[2],m_pr[1],m_pr[1]?m_pr[1]:' ',m_ead,m_figs.m_dc); fifo_set_direction(FIFO_WRITE); - write_vram((m_cr & 0x18) >> 3,m_cr & 3); + wdat((m_cr & 0x18) >> 3,m_cr & 3); reset_figs_param(); m_param_ptr = 1; } @@ -1412,7 +1414,7 @@ case COMMAND_RDAT: /* read data from display memory */ fifo_set_direction(FIFO_READ); - read_vram((m_cr & 0x18) >> 3,m_cr & 3); + rdat((m_cr & 0x18) >> 3,m_cr & 3); m_sr |= UPD7220_SR_DATA_READY; break; @@ -1444,11 +1446,17 @@ break; case COMMAND_DMAR: /* DMA read request */ - logerror("uPD7220 Unimplemented command DMAR\n"); + m_dma_type = (m_cr >> 3) & 3; + m_dma_mod = m_cr & 3; + m_dma_transfer_length = (m_figs.m_dc + 1) * (m_figs.m_d + 2); + start_dma(); break; case COMMAND_DMAW: /* DMA write request */ - logerror("uPD7220 Unimplemented command DMAW\n"); + m_dma_type = (m_cr >> 3) & 3; + m_dma_mod = m_cr & 3; + m_dma_transfer_length = (m_figs.m_dc + 1) * (m_figs.m_d + 1); + start_dma(); break; } } @@ -1463,7 +1471,7 @@ // continue RDAT command when data to read are larger than the FIFO (a5105 and dmv text scrolling) if (m_figs.m_dc && translate_command(m_cr) == COMMAND_RDAT) { - read_vram((m_cr & 0x18) >> 3, m_cr & 3); + rdat((m_cr & 0x18) >> 3, m_cr & 3); m_sr |= UPD7220_SR_DATA_READY; } } @@ -1493,7 +1501,6 @@ /* TODO: timing of these */ m_sr &= ~UPD7220_SR_DRAWING_IN_PROGRESS; - m_sr &= ~UPD7220_SR_DMA_EXECUTE; } return data; @@ -1529,7 +1536,36 @@ uint8_t upd7220_device::dack_r() { - return 0; + uint8_t result = 0; + switch(m_dma_type) + { + case 0: + if (m_dma_transfer_length % 2 == 0) + { + m_dma_data = read_vram(); + result = m_dma_data & 0xff; + } + else + { + result = (m_dma_data >> 8) & 0xff; + } + break; + case 2: + m_dma_data = read_vram(); + result = m_dma_data & 0xff; + break; + case 3: + m_dma_data = read_vram(); + result = (m_dma_data >> 8) & 0xff; + break; + default: + logerror("uPD7220 Invalid DMA Transfer Type\n"); + } + if (--m_dma_transfer_length == 0) + { + stop_dma(); + } + return result; } @@ -1539,6 +1575,53 @@ void upd7220_device::dack_w(uint8_t data) { + switch(m_dma_type) + { + case 0: + if (m_dma_transfer_length % 2) + { + m_dma_data = ((m_dma_data & 0xff) | data << 8) & m_mask; + write_vram(m_dma_type, m_dma_mod, m_dma_data); + } + else + { + m_dma_data = (m_dma_data & 0xff00) | data; + } + break; + case 2: + m_dma_data = data & (m_mask & 0xff); + write_vram(m_dma_type, m_dma_mod, m_dma_data); + break; + case 3: + m_dma_data = (data << 8) & (m_mask & 0xff00); + write_vram(m_dma_type, m_dma_mod, m_dma_data); + break; + default: + logerror("uPD7220 Invalid DMA Transfer Type\n"); + } + if (--m_dma_transfer_length == 0) + { + stop_dma(); + } +} + +void upd7220_device::start_dma() +{ + if ((m_sr & UPD7220_SR_DMA_EXECUTE) == 0) + { + m_write_drq(ASSERT_LINE); + m_sr |= UPD7220_SR_DMA_EXECUTE; + } +} + +void upd7220_device::stop_dma() +{ + if ((m_sr & UPD7220_SR_DMA_EXECUTE) == UPD7220_SR_DMA_EXECUTE) + { + m_write_drq(CLEAR_LINE); + m_sr &= ~UPD7220_SR_DMA_EXECUTE; + reset_figs_param(); + } } @@ -1587,18 +1670,19 @@ void upd7220_device::update_text(bitmap_rgb32 &bitmap, const rectangle &cliprect) { - uint32_t addr, sad; + uint32_t sad; uint16_t len; int im, wd; - int y, sy = 0; + int sy = 0; for (int area = 0; area < 4; area++) { get_text_partition(area, &sad, &len, &im, &wd); + int y; for (y = sy; y < sy + len; y++) { - addr = sad + (y * m_pitch); + uint32_t const addr = sad + (y * m_pitch); if (!m_draw_text_cb.isnull()) m_draw_text_cb(bitmap, addr, (y * m_lr) + m_vbp, wd, m_pitch, m_lr, m_dc, m_ead); @@ -1615,9 +1699,9 @@ void upd7220_device::draw_graphics_line(bitmap_rgb32 &bitmap, uint32_t addr, int y, int wd, int pitch) { - int sx, al = bitmap.cliprect().height(); + int al = bitmap.cliprect().height(); - for (sx = 0; sx < pitch; sx++) + for (int sx = 0; sx < pitch; sx++) { if((sx << 4) < m_aw * 16 && y < al) m_display_cb(bitmap, y, sx << 4, addr); @@ -1633,34 +1717,32 @@ void upd7220_device::update_graphics(bitmap_rgb32 &bitmap, const rectangle &cliprect, int force_bitmap) { - uint32_t addr, sad; + uint32_t sad; uint16_t len; - int im, wd, area; + int im, wd; int y = 0, tsy = 0, bsy = 0; bool mixed = ((m_mode & UPD7220_MODE_DISPLAY_MASK) == UPD7220_MODE_DISPLAY_MIXED); uint8_t interlace = ((m_mode & UPD7220_MODE_INTERLACE_MASK) == UPD7220_MODE_INTERLACE_ON) ? 0 : 1; - for (area = 0; area < 4; area++) + for(int area = 0; area < 4; area++) { get_graphics_partition(area, &sad, &len, &im, &wd); - if (im || force_bitmap) + if(im || force_bitmap) { - //get_graphics_partition(area, &sad, &len, &im, &wd); - if(area >= 3) // TODO: most likely to be correct, Quarth (PC-98xx) definitely draws with area 2. We might see an area 3 someday ... break; if(!interlace) len <<= 1; - for (y = 0; y < len; y++) + for(y = 0; y < len; y++) { /* TODO: again correct? Quarth (PC-98xx) doesn't seem to use pitch here and it definitely wants bsy to be /2 to make scrolling to work. Xevious (PC-98xx) wants the pitch to be fixed at 80, and wants bsy to be /1 Dragon Buster (PC-98xx) contradicts with Xevious with regards of the pitch tho ... */ - addr = ((sad << 1) & 0x3ffff) + ((y / (mixed ? 1 : m_lr)) * (m_pitch << (im ? 0 : 1))); + uint32_t const addr = ((sad << 1) & 0x3ffff) + ((y / (mixed ? 1 : m_lr)) * (m_pitch << (im ? 0 : 1))); if (!m_display_cb.isnull()) draw_graphics_line(bitmap, addr, y + bsy + m_vbp, wd, (m_pitch << interlace)); @@ -1668,15 +1750,13 @@ } else { - get_text_partition(area, &sad, &len, &im, &wd); - if(m_lr) { - for (y = 0; y < len; y+=m_lr) + for(y = 0; y < len; y += m_lr) { - addr = (sad & 0x3ffff) + ((y / m_lr) * m_pitch); + uint32_t const addr = (sad & 0x3ffff) + ((y / m_lr) * m_pitch); - if (!m_draw_text_cb.isnull()) + if(!m_draw_text_cb.isnull()) m_draw_text_cb(bitmap, addr, y + tsy + m_vbp, wd, m_pitch, m_lr, m_dc, m_ead); } } diff -Nru mame-0.230+dfsg.1/src/devices/video/upd7220.h mame-0.231+dfsg.1/src/devices/video/upd7220.h --- mame-0.230+dfsg.1/src/devices/video/upd7220.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/devices/video/upd7220.h 2021-04-27 15:32:05.000000000 +0000 @@ -90,6 +90,8 @@ virtual const tiny_rom_entry *device_rom_region() const override; virtual space_config_vector memory_space_config() const override; + void start_dma(); + void stop_dma(); private: enum { @@ -112,8 +114,10 @@ inline void update_blank_timer(int state); inline void recompute_parameters(); inline void reset_figs_param(); - inline void read_vram(uint8_t type, uint8_t mod); - inline void write_vram(uint8_t type, uint8_t mod); + inline void rdat(uint8_t type, uint8_t mod); + inline uint16_t read_vram(); + inline void wdat(uint8_t type, uint8_t mod); + inline void write_vram(uint8_t type, uint8_t mod, uint16_t data); inline void get_text_partition(int index, uint32_t *sad, uint16_t *len, int *im, int *wd); inline void get_graphics_partition(int index, uint32_t *sad, uint16_t *len, int *im, int *wd); @@ -139,6 +143,11 @@ devcb_write_line m_write_vsync; devcb_write_line m_write_blank; + uint8_t m_dma_type; // DMA transfer type + uint8_t m_dma_mod; // DMA transfer mode + uint16_t m_dma_data; // current word transferred via DMA + uint32_t m_dma_transfer_length; // DMA transfer length in bytes + uint16_t m_mask; // mask register uint8_t m_pitch; // number of word addresses in display memory in the horizontal direction uint32_t m_ead; // execute word address diff -Nru mame-0.230+dfsg.1/src/emu/debug/debugcmd.cpp mame-0.231+dfsg.1/src/emu/debug/debugcmd.cpp --- mame-0.230+dfsg.1/src/emu/debug/debugcmd.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/emu/debug/debugcmd.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -767,6 +767,32 @@ params--; break; + case 'O': + case 'o': + if (params == 0) + { + m_console.printf("Not enough parameters for format!\n"); + return 0; + } + if (u32(*param >> 60) != 0) + { + p += sprintf(p, zerofill ? "%0*o" : "%*o", (width <= 20) ? 1 : width - 20, u32(*param >> 60)); + p += sprintf(p, "%0*o", 10, u32(BIT(*param, 30, 30))); + } + else + { + if (width > 20) + p += sprintf(p, zerofill ? "%0*o" : "%*o", width - 20, 0); + if (u32(BIT(*param, 30, 30)) != 0) + p += sprintf(p, zerofill ? "%0*o" : "%*o", (width <= 10) ? 1 : width - 10, u32(BIT(*param, 30, 30))); + else if (width > 10) + p += sprintf(p, zerofill ? "%0*o" : "%*o", width - 10, 0); + } + p += sprintf(p, zerofill ? "%0*o" : "%*o", (width < 10) ? width : 10, u32(BIT(*param, 0, 30))); + param++; + params--; + break; + case 'D': case 'd': if (params == 0) diff -Nru mame-0.230+dfsg.1/src/emu/diimage.cpp mame-0.231+dfsg.1/src/emu/diimage.cpp --- mame-0.230+dfsg.1/src/emu/diimage.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/emu/diimage.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -1293,10 +1293,12 @@ case SOFTWARE_IS_INCOMPATIBLE: swlist->popmessage("WARNING! the set %s might not work on this system due to incompatible filter(s) '%s'\n", m_software_part_ptr->info().shortname(), swlist->filter()); + osd_printf_warning("WARNING: the set %s might not work on this system due to incompatible filter(s) '%s'\n", m_software_part_ptr->info().shortname(), swlist->filter()); break; case SOFTWARE_NOT_COMPATIBLE: swlist->popmessage("WARNING! the set %s might not work on this system due to missing filter(s) '%s'\n", m_software_part_ptr->info().shortname(), swlist->filter()); + osd_printf_warning("WARNING! the set %s might not work on this system due to missing filter(s) '%s'\n", m_software_part_ptr->info().shortname(), swlist->filter()); break; } diff -Nru mame-0.230+dfsg.1/src/emu/emumem_mview.cpp mame-0.231+dfsg.1/src/emu/emumem_mview.cpp --- mame-0.230+dfsg.1/src/emu/emumem_mview.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/emu/emumem_mview.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -662,6 +662,9 @@ m_cur_id = -1; m_handler_read->select_a(-1); m_handler_write->select_a(-1); + + if(m_space) + m_space->invalidate_caches(read_or_write::READWRITE); } void memory_view::select(int slot) @@ -674,6 +677,9 @@ m_cur_id = i->second; m_handler_read->select_a(m_cur_id); m_handler_write->select_a(m_cur_id); + + if(m_space) + m_space->invalidate_caches(read_or_write::READWRITE); } int memory_view::id_to_slot(int id) const diff -Nru mame-0.230+dfsg.1/src/emu/layout/smartboard.lay mame-0.231+dfsg.1/src/emu/layout/smartboard.lay --- mame-0.230+dfsg.1/src/emu/layout/smartboard.lay 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/emu/layout/smartboard.lay 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,453 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru mame-0.230+dfsg.1/src/emu/machine.cpp mame-0.231+dfsg.1/src/emu/machine.cpp --- mame-0.230+dfsg.1/src/emu/machine.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/emu/machine.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -355,6 +355,8 @@ if (!quiet) sound().start_recording(); + m_hard_reset_pending = false; + // initialize ui lists // display the startup screens manager().ui_initialize(*this); @@ -368,8 +370,6 @@ export_http_api(); - m_hard_reset_pending = false; - #if defined(__EMSCRIPTEN__) // break out to our async javascript loop and halt emscripten_set_running_machine(this); @@ -534,21 +534,10 @@ int name_found = 0; // find length of the device name - int end1 = statename_str.find('/', pos + 3); - int end2 = statename_str.find('%', pos + 3); - int end; - - if ((end1 != -1) && (end2 != -1)) - end = std::min(end1, end2); - else if (end1 != -1) - end = end1; - else if (end2 != -1) - end = end2; - else + int end = statename_str.find_first_not_of("abcdefghijklmnopqrstuvwxyz1234567890", pos + 3); + if (end == -1) end = statename_str.length(); - if (end - pos < 3) - fatalerror("Something very wrong is going on!!!\n"); // copy the device name to an std::string std::string devname_str; diff -Nru mame-0.230+dfsg.1/src/emu/memarray.cpp mame-0.231+dfsg.1/src/emu/memarray.cpp --- mame-0.230+dfsg.1/src/emu/memarray.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/emu/memarray.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -123,7 +123,7 @@ //------------------------------------------------- // read8_from_*/write8_to_* - entry read/write -// heleprs for 1 byte-per-entry +// helpers for 1 byte-per-entry //------------------------------------------------- u32 memory_array::read8_from_8(int index) const { return reinterpret_cast(m_base)[index]; } @@ -147,7 +147,7 @@ //------------------------------------------------- // read16_from_*/write16_to_* - entry read/write -// heleprs for 2 bytes-per-entry +// helpers for 2 bytes-per-entry //------------------------------------------------- u32 memory_array::read16_from_8le(int index) const { return read8_from_8(index*2) | (read8_from_8(index*2+1) << 8); } @@ -171,7 +171,7 @@ //------------------------------------------------- // read32_from_*/write32_to_* - entry read/write -// heleprs for 4 bytes-per-entry +// helpers for 4 bytes-per-entry //------------------------------------------------- u32 memory_array::read32_from_8le(int index) const { return read16_from_8le(index*2) | (read16_from_8le(index*2+1) << 16); } diff -Nru mame-0.230+dfsg.1/src/emu/sound.cpp mame-0.231+dfsg.1/src/emu/sound.cpp --- mame-0.230+dfsg.1/src/emu/sound.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/emu/sound.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -1224,11 +1224,14 @@ void sound_manager::mute(bool mute, u8 reason) { + bool old_muted = m_muted; if (mute) m_muted |= reason; else m_muted &= ~reason; - set_attenuation(m_attenuation); + + if(old_muted != (m_muted != 0)) + set_attenuation(m_attenuation); } diff -Nru mame-0.230+dfsg.1/src/emu/sound.h mame-0.231+dfsg.1/src/emu/sound.h --- mame-0.230+dfsg.1/src/emu/sound.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/emu/sound.h 2021-04-27 15:32:05.000000000 +0000 @@ -371,13 +371,9 @@ } // safely write a sample to the buffer - void put(s32 index, sample_t sample) + void put(s32 start, sample_t sample) { - sound_assert(u32(index) < samples()); - index += m_start; - if (index >= m_buffer->size()) - index -= m_buffer->size(); - m_buffer->put(index, sample); + m_buffer->put(index_to_buffer_index(start), sample); } // write a sample to the buffer, clamping to +/- the clamp value @@ -401,12 +397,9 @@ } // safely add a sample to the buffer - void add(s32 index, sample_t sample) + void add(s32 start, sample_t sample) { - sound_assert(u32(index) < samples()); - index += m_start; - if (index >= m_buffer->size()) - index -= m_buffer->size(); + u32 index = index_to_buffer_index(start); m_buffer->put(index, m_buffer->get(index) + sample); } @@ -421,7 +414,7 @@ { if (start + count > samples()) count = samples() - start; - u32 index = start + m_start; + u32 index = index_to_buffer_index(start); for (s32 sampindex = 0; sampindex < count; sampindex++) { m_buffer->put(index, value); @@ -436,7 +429,7 @@ { if (start + count > samples()) count = samples() - start; - u32 index = start + m_start; + u32 index = index_to_buffer_index(start); for (s32 sampindex = 0; sampindex < count; sampindex++) { m_buffer->put(index, src.get(start + sampindex)); @@ -451,7 +444,7 @@ { if (start + count > samples()) count = samples() - start; - u32 index = start + m_start; + u32 index = index_to_buffer_index(start); for (s32 sampindex = 0; sampindex < count; sampindex++) { m_buffer->put(index, m_buffer->get(index) + src.get(start + sampindex)); @@ -460,6 +453,17 @@ } void add(read_stream_view const &src, s32 start) { add(src, start, samples() - start); } void add(read_stream_view const &src) { add(src, 0, samples()); } + +private: + // given a stream starting offset, return the buffer index + u32 index_to_buffer_index(s32 start) const + { + sound_assert(u32(start) < samples()); + u32 index = start + m_start; + if (index >= m_buffer->size()) + index -= m_buffer->size(); + return index; + } }; diff -Nru mame-0.230+dfsg.1/src/emu/video.cpp mame-0.231+dfsg.1/src/emu/video.cpp --- mame-0.230+dfsg.1/src/emu/video.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/emu/video.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -1127,22 +1127,10 @@ int name_found = 0; // find length of the device name - int end1 = snapstr.find('/', pos + 3); - int end2 = snapstr.find('%', pos + 3); - int end; - - if ((end1 != -1) && (end2 != -1)) - end = std::min(end1, end2); - else if (end1 != -1) - end = end1; - else if (end2 != -1) - end = end2; - else + int end = snapstr.find_first_not_of("abcdefghijklmnopqrstuvwxyz1234567890", pos + 3); + if (end == -1) end = snapstr.length(); - if (end - pos < 3) - fatalerror("Something very wrong is going on!!!\n"); - // copy the device name to an std::string std::string snapdevname; snapdevname.assign(snapstr.substr(pos + 3, end - pos - 3)); diff -Nru mame-0.230+dfsg.1/src/emu/xtal.cpp mame-0.231+dfsg.1/src/emu/xtal.cpp --- mame-0.230+dfsg.1/src/emu/xtal.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/emu/xtal.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -91,12 +91,14 @@ 3'276'800, /* 3.2768_MHz_XTAL SP0256 clock in Speech Synthesis for Dragon 32 */ 3'521'280, /* 3.52128_MHz_XTAL RCA COSMAC VIP */ 3'546'800, /* 3.5468_MHz_XTAL Atari 400 PAL */ + 3'546'894, /* 3.546894_MHz_XTAL Atari 2600 PAL */ 3'547'000, /* 3.547_MHz_XTAL Philips G7200, Philips C7240 */ 3'562'500, /* 3.5625_MHz_XTAL Jopac JO7400 */ 3'570'000, /* 3.57_MHz_XTAL Telmac TMC-600 */ 3'578'640, /* 3.57864_MHz_XTAL Atari Portfolio PCD3311T */ 3'579'000, /* 3.579_MHz_XTAL BeebOPL */ 3'579'545, /* 3.579545_MHz_XTAL NTSC color subcarrier, extremely common, used on 100's of PCBs (Keytronic custom part #48-300-010 is equivalent) */ + 3'579'575, /* 3.579575_MHz_XTAL Atari 2600 NTSC */ 3'686'400, /* 3.6864_MHz_XTAL Baud rate clock for MC68681 and similar UARTs */ 3'840'000, /* 3.84_MHz_XTAL Fairlight CMI Alphanumeric Keyboard */ 3'900'000, /* 3.9_MHz_XTAL Resonator - Used on some Fidelity boards */ diff -Nru mame-0.230+dfsg.1/src/frontend/mame/clifront.cpp mame-0.231+dfsg.1/src/frontend/mame/clifront.cpp --- mame-0.230+dfsg.1/src/frontend/mame/clifront.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/frontend/mame/clifront.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -1442,7 +1442,7 @@ // create our own copy of options for the purposes of ROM identification // so we are not "polluted" with driver-specific slot/image options emu_options options; - options.set_value(OPTION_MEDIAPATH, m_options.media_path(), OPTION_PRIORITY_DEFAULT); + options.set_value(OPTION_HASHPATH, m_options.hash_path(), OPTION_PRIORITY_DEFAULT); media_identifier ident(options); diff -Nru mame-0.230+dfsg.1/src/frontend/mame/media_ident.cpp mame-0.231+dfsg.1/src/frontend/mame/media_ident.cpp --- mame-0.230+dfsg.1/src/frontend/mame/media_ident.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/frontend/mame/media_ident.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -209,12 +209,12 @@ m_total++; if (err != CHDERR_NONE) { - osd_printf_info("%-20sNOT A CHD\n", core_filename_extract_base(path)); + osd_printf_info("%-20s NOT A CHD\n", core_filename_extract_base(path)); m_nonroms++; } else if (!chd.compressed()) { - osd_printf_info("%-20sis a writeable CHD\n", core_filename_extract_base(path)); + osd_printf_info("%-20s is a writeable CHD\n", core_filename_extract_base(path)); } else { @@ -404,7 +404,7 @@ { for (file_info const &file : info) { - osd_printf_info("%-20s", core_filename_extract_base(file.name())); + osd_printf_info("%-20s ", core_filename_extract_base(file.name())); if (file.matches().empty()) { osd_printf_info("NO MATCH\n"); @@ -416,10 +416,10 @@ for (match_data const &match : file.matches()) { if (!first) - osd_printf_info("%-20s", ""); + osd_printf_info("%-20s ", ""); first = false; osd_printf_info( - "= %s%-20s %-10s %s%s\n", + "= %s%-20s %-10s %s%s\n", match.bad() ? "(BAD) " : "", match.romname().c_str(), match.shortname().c_str(), diff -Nru mame-0.230+dfsg.1/src/frontend/mame/ui/analogipt.cpp mame-0.231+dfsg.1/src/frontend/mame/ui/analogipt.cpp --- mame-0.230+dfsg.1/src/frontend/mame/ui/analogipt.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/frontend/mame/ui/analogipt.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -251,6 +251,8 @@ item_append(std::move(text), std::move(subtext), flags, &data); } + item_append(menu_item_type::SEPARATOR); + // space for live display custombottom = (ui().get_line_height() * m_visible_fields) + (ui().box_tb_border() * 3.0f); } diff -Nru mame-0.230+dfsg.1/src/frontend/mame/ui/floppycntrl.cpp mame-0.231+dfsg.1/src/frontend/mame/ui/floppycntrl.cpp --- mame-0.230+dfsg.1/src/frontend/mame/ui/floppycntrl.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/frontend/mame/ui/floppycntrl.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -49,8 +49,12 @@ machine().popmessage("Error: %s", fd.error()); return; } - if (create_fs) - fd.init_fs(create_fs); + if (create_fs) { + // HACK: ensure the floppy_image structure is created since device_image_interface may not otherwise do so during "init phase" + err = fd.finish_load(); + if (err == image_init_result::PASS) + fd.init_fs(create_fs); + } } else { image_init_result err = fd.load(input_filename); if ((err == image_init_result::PASS) && (output_filename.compare("") != 0)) diff -Nru mame-0.230+dfsg.1/src/frontend/mame/ui/inputmap.cpp mame-0.231+dfsg.1/src/frontend/mame/ui/inputmap.cpp --- mame-0.230+dfsg.1/src/frontend/mame/ui/inputmap.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/frontend/mame/ui/inputmap.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -42,6 +42,7 @@ item_append(s, 0, (void *)uintptr_t(IPG_PLAYER1 + player + 1)); } item_append(_("Other Controls"), 0, (void *)uintptr_t(IPG_OTHER + 1)); + item_append(menu_item_type::SEPARATOR); } void menu_input_groups::handle() @@ -113,6 +114,7 @@ // populate the menu in a standard fashion populate_sorted(customtop, custombottom); + item_append(menu_item_type::SEPARATOR); } void menu_input_general::update_input(input_item_data &seqchangeditem) @@ -219,7 +221,12 @@ } // populate the menu in a standard fashion - populate_sorted(customtop, custombottom); + if (!data.empty()) + populate_sorted(customtop, custombottom); + else + item_append(_("This machine has no input map."), FLAG_DISABLE, nullptr); + + item_append(menu_item_type::SEPARATOR); } void menu_input_specific::update_input(input_item_data &seqchangeditem) diff -Nru mame-0.230+dfsg.1/src/frontend/mame/ui/mainmenu.cpp mame-0.231+dfsg.1/src/frontend/mame/ui/mainmenu.cpp --- mame-0.230+dfsg.1/src/frontend/mame/ui/mainmenu.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/frontend/mame/ui/mainmenu.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -122,7 +122,7 @@ if (machine().options().cheat()) item_append(_("Cheat"), 0, (void *)CHEAT); - if (machine().options().plugins()) + if (machine().options().plugins() && !mame_machine_manager::instance()->lua()->get_menu().empty()) item_append(_("Plugin Options"), 0, (void *)PLUGINS); if (mame_machine_manager::instance()->lua()->call_plugin_check("data_list", "", true)) diff -Nru mame-0.230+dfsg.1/src/frontend/mame/ui/menu.cpp mame-0.231+dfsg.1/src/frontend/mame/ui/menu.cpp --- mame-0.230+dfsg.1/src/frontend/mame/ui/menu.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/frontend/mame/ui/menu.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -1174,7 +1174,10 @@ // add an item to return - this is a really hacky way of doing this if (!m_parent) { - item_append(_("Return to Machine"), 0, nullptr); + if (machine().phase() == machine_phase::INIT) + item_append(_("Start Machine"), 0, nullptr); + else + item_append(_("Return to Machine"), 0, nullptr); } else if (m_parent->is_special_main_menu()) { diff -Nru mame-0.230+dfsg.1/src/frontend/mame/ui/miscmenu.cpp mame-0.231+dfsg.1/src/frontend/mame/ui/miscmenu.cpp --- mame-0.230+dfsg.1/src/frontend/mame/ui/miscmenu.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/frontend/mame/ui/miscmenu.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -147,6 +147,8 @@ item_append(network.device().tag(), (title) ? title : "------", FLAG_LEFT_ARROW | FLAG_RIGHT_ARROW, (void *)&network); } + + item_append(menu_item_type::SEPARATOR); } /*------------------------------------------------- @@ -506,6 +508,8 @@ break; } } + + item_append(menu_item_type::SEPARATOR); } menu_crosshair::~menu_crosshair() @@ -795,8 +799,8 @@ item_append(_("Remove From Favorites"), 0, (void *)DELFAV); item_append(menu_item_type::SEPARATOR); - item_append(_("Save machine configuration"), 0, (void *)(uintptr_t)SAVE); - item_append(menu_item_type::SEPARATOR); + item_append(_("Save Machine Configuration"), 0, (void *)(uintptr_t)SAVE); + customtop = 2.0f * ui().get_line_height() + 3.0f * ui().box_tb_border(); } @@ -806,7 +810,7 @@ void menu_machine_configure::custom_render(void *selectedref, float top, float bottom, float origx1, float origy1, float origx2, float origy2) { - char const *const text[] = { _("Configure machine:"), m_drv.type.fullname() }; + char const *const text[] = { _("Configure Machine:"), m_drv.type.fullname() }; draw_text_box( std::begin(text), std::end(text), origx1, origx2, origy1 - top, origy1 - ui().box_tb_border(), diff -Nru mame-0.230+dfsg.1/src/frontend/mame/ui/tapectrl.cpp mame-0.231+dfsg.1/src/frontend/mame/ui/tapectrl.cpp --- mame-0.230+dfsg.1/src/frontend/mame/ui/tapectrl.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/frontend/mame/ui/tapectrl.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -106,6 +106,8 @@ // fast forward item_append(_("Fast Forward"), 0, TAPECMD_FAST_FORWARD); } + + item_append(menu_item_type::SEPARATOR); } } diff -Nru mame-0.230+dfsg.1/src/frontend/mame/ui/ui.cpp mame-0.231+dfsg.1/src/frontend/mame/ui/ui.cpp --- mame-0.230+dfsg.1/src/frontend/mame/ui/ui.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/frontend/mame/ui/ui.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -424,8 +424,9 @@ switch_code_poller poller(machine().input()); std::string warning_text; rgb_t warning_color; + bool config_menu = false; auto handler_messagebox_anykey = - [this, &poller, &warning_text, &warning_color] (render_container &container) -> uint32_t + [this, &poller, &warning_text, &warning_color, &config_menu] (render_container &container) -> uint32_t { // draw a standard message window draw_text_box(container, warning_text, ui::text_layout::LEFT, 0.5f, 0.5f, warning_color); @@ -436,6 +437,11 @@ machine().schedule_exit(); return UI_HANDLER_CANCEL; } + else if (machine().ui_input().pressed(IPT_UI_CONFIGURE)) + { + config_menu = true; + return UI_HANDLER_CANCEL; + } else if (poller.poll() != INPUT_CODE_INVALID) { // if any key is pressed, just exit @@ -561,9 +567,14 @@ poller.reset(); while (poller.poll() != INPUT_CODE_INVALID) { } - // loop while we have a handler - while (m_handler_callback_type == ui_callback_type::MODAL && !machine().scheduled_event_pending() && !ui::menu::stack_has_special_main_menu(machine())) - machine().video().frame_update(); + if (m_handler_callback_type == ui_callback_type::MODAL) + { + config_menu = false; + + // loop while we have a handler + while (m_handler_callback_type == ui_callback_type::MODAL && !machine().scheduled_event_pending() && !ui::menu::stack_has_special_main_menu(machine())) + machine().video().frame_update(); + } // clear the handler and force an update set_handler(ui_callback_type::GENERAL, std::bind(&mame_ui_manager::handler_ingame, this, _1)); @@ -577,6 +588,14 @@ // if we're the empty driver, force the menus on if (ui::menu::stack_has_special_main_menu(machine())) show_menu(); + else if (config_menu) + { + show_menu(); + + // loop while we have a handler + while (m_handler_callback_type != ui_callback_type::GENERAL && !machine().scheduled_event_pending()) + machine().video().frame_update(); + } } diff -Nru mame-0.230+dfsg.1/src/frontend/mame/ui/videoopt.cpp mame-0.231+dfsg.1/src/frontend/mame/ui/videoopt.cpp --- mame-0.230+dfsg.1/src/frontend/mame/ui/videoopt.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/frontend/mame/ui/videoopt.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -59,6 +59,7 @@ // add option for snapshot target item_append("Snapshot", 0, &machine().video().snapshot_target()); + item_append(menu_item_type::SEPARATOR); } /*------------------------------------------------- @@ -212,6 +213,8 @@ // keep aspect item_append_on_off(_("Maintain Aspect Ratio"), m_target.keepaspect(), 0, reinterpret_cast(ITEM_KEEPASPECT)); } + + item_append(menu_item_type::SEPARATOR); } diff -Nru mame-0.230+dfsg.1/src/lib/formats/acorn_dsk.cpp mame-0.231+dfsg.1/src/lib/formats/acorn_dsk.cpp --- mame-0.230+dfsg.1/src/lib/formats/acorn_dsk.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/lib/formats/acorn_dsk.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -29,7 +29,7 @@ return "ssd,bbc,img"; } -int acorn_ssd_format::find_size(io_generic *io, uint32_t form_factor) +int acorn_ssd_format::find_size(io_generic *io, uint32_t form_factor, const std::vector &variants) { uint8_t cat[8]; uint32_t sectors0, sectors2; @@ -95,7 +95,7 @@ int acorn_ssd_format::identify(io_generic *io, uint32_t form_factor, const std::vector &variants) { - int type = find_size(io, form_factor); + int type = find_size(io, form_factor, variants); if(type != -1) return 90; @@ -171,7 +171,7 @@ return "dsd"; } -int acorn_dsd_format::find_size(io_generic *io, uint32_t form_factor) +int acorn_dsd_format::find_size(io_generic *io, uint32_t form_factor, const std::vector &variants) { uint8_t cat[8]; uint32_t sectors0, sectors2; @@ -218,7 +218,7 @@ int acorn_dsd_format::identify(io_generic *io, uint32_t form_factor, const std::vector &variants) { - int type = find_size(io, form_factor); + int type = find_size(io, form_factor, variants); if (type != -1) return 90; @@ -274,7 +274,7 @@ return "dds"; } -int opus_ddos_format::find_size(io_generic *io, uint32_t form_factor) +int opus_ddos_format::find_size(io_generic *io, uint32_t form_factor, const std::vector &variants) { uint8_t cat[8]; uint32_t sectors0, sectors2; @@ -313,7 +313,7 @@ int opus_ddos_format::identify(io_generic *io, uint32_t form_factor, const std::vector &variants) { - int type = find_size(io, form_factor); + int type = find_size(io, form_factor, variants); if (type != -1) return 90; @@ -369,7 +369,7 @@ return "adf,ads,adm,adl"; } -int acorn_adfs_old_format::find_size(io_generic *io, uint32_t form_factor) +int acorn_adfs_old_format::find_size(io_generic *io, uint32_t form_factor, const std::vector &variants) { uint8_t map[3]; uint32_t sectors; @@ -401,7 +401,7 @@ int acorn_adfs_old_format::identify(io_generic *io, uint32_t form_factor, const std::vector &variants) { - int type = find_size(io, form_factor); + int type = find_size(io, form_factor, variants); if(type != -1) return 100; @@ -465,7 +465,7 @@ return "adf"; } -int acorn_adfs_new_format::find_size(io_generic *io, uint32_t form_factor) +int acorn_adfs_new_format::find_size(io_generic *io, uint32_t form_factor, const std::vector &variants) { uint8_t dform[4]; uint8_t eform[4]; @@ -498,7 +498,7 @@ int acorn_adfs_new_format::identify(io_generic *io, uint32_t form_factor, const std::vector &variants) { - int type = find_size(io, form_factor); + int type = find_size(io, form_factor, variants); if (type != -1) return 100; @@ -546,7 +546,7 @@ return "img"; } -int acorn_dos_format::find_size(io_generic *io, uint32_t form_factor) +int acorn_dos_format::find_size(io_generic *io, uint32_t form_factor, const std::vector &variants) { uint8_t type; @@ -569,7 +569,7 @@ int acorn_dos_format::identify(io_generic *io, uint32_t form_factor, const std::vector &variants) { - int type = find_size(io, form_factor); + int type = find_size(io, form_factor, variants); if(type != -1) return 90; diff -Nru mame-0.230+dfsg.1/src/lib/formats/acorn_dsk.h mame-0.231+dfsg.1/src/lib/formats/acorn_dsk.h --- mame-0.230+dfsg.1/src/lib/formats/acorn_dsk.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/lib/formats/acorn_dsk.h 2021-04-27 15:32:05.000000000 +0000 @@ -20,7 +20,7 @@ public: acorn_ssd_format(); - virtual int find_size(io_generic *io, uint32_t form_factor) override; + virtual int find_size(io_generic *io, uint32_t form_factor, const std::vector &variants) override; virtual int identify(io_generic *io, uint32_t form_factor, const std::vector &variants) override; virtual int get_image_offset(const format &f, int head, int track) override; virtual const char *name() const override; @@ -36,7 +36,7 @@ public: acorn_dsd_format(); - virtual int find_size(io_generic *io, uint32_t form_factor) override; + virtual int find_size(io_generic *io, uint32_t form_factor, const std::vector &variants) override; virtual int identify(io_generic *io, uint32_t form_factor, const std::vector &variants) override; virtual int get_image_offset(const format &f, int head, int track) override; virtual const char *name() const override; @@ -52,7 +52,7 @@ public: opus_ddos_format(); - virtual int find_size(io_generic *io, uint32_t form_factor) override; + virtual int find_size(io_generic *io, uint32_t form_factor, const std::vector &variants) override; virtual int identify(io_generic *io, uint32_t form_factor, const std::vector &variants) override; virtual int get_image_offset(const format &f, int head, int track) override; virtual const char *name() const override; @@ -68,7 +68,7 @@ public: acorn_adfs_old_format(); - virtual int find_size(io_generic *io, uint32_t form_factor) override; + virtual int find_size(io_generic *io, uint32_t form_factor, const std::vector &variants) override; virtual int identify(io_generic *io, uint32_t form_factor, const std::vector &variants) override; virtual int get_image_offset(const format &f, int head, int track) override; virtual const char *name() const override; @@ -84,7 +84,7 @@ public: acorn_adfs_new_format(); - virtual int find_size(io_generic *io, uint32_t form_factor) override; + virtual int find_size(io_generic *io, uint32_t form_factor, const std::vector &variants) override; virtual int identify(io_generic *io, uint32_t form_factor, const std::vector &variants) override; virtual int get_image_offset(const format &f, int head, int track) override; virtual const char *name() const override; @@ -100,7 +100,7 @@ public: acorn_dos_format(); - virtual int find_size(io_generic *io, uint32_t form_factor) override; + virtual int find_size(io_generic *io, uint32_t form_factor, const std::vector &variants) override; virtual int identify(io_generic *io, uint32_t form_factor, const std::vector &variants) override; virtual int get_image_offset(const format &f, int head, int track) override; virtual const char *name() const override; diff -Nru mame-0.230+dfsg.1/src/lib/formats/afs_dsk.cpp mame-0.231+dfsg.1/src/lib/formats/afs_dsk.cpp --- mame-0.230+dfsg.1/src/lib/formats/afs_dsk.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/lib/formats/afs_dsk.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -32,7 +32,7 @@ int afs_format::identify(io_generic *io, uint32_t form_factor, const std::vector &variants) { - int type = find_size(io, form_factor); + int type = find_size(io, form_factor, variants); if (type != -1) return 50; diff -Nru mame-0.230+dfsg.1/src/lib/formats/all.cpp mame-0.231+dfsg.1/src/lib/formats/all.cpp --- mame-0.230+dfsg.1/src/lib/formats/all.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/lib/formats/all.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -589,6 +589,10 @@ #include "thom_cas.h" #endif +#ifdef HAS_FORMATS_THOM_DSK +#include "thom_dsk.h" +#endif + #ifdef HAS_FORMATS_TI99_DSK #include "ti99_dsk.h" #endif @@ -1053,7 +1057,8 @@ en.add(FLOPPY_SDF_FORMAT); // sdf_dsk.h #endif #ifdef HAS_FORMATS_TRS80_DSK - en.add(FLOPPY_TRS80_FORMAT); // trs80_dsk.h + en.add(FLOPPY_JV1_FORMAT); // trs80_dsk.h + en.add(FLOPPY_JV3_FORMAT); // trs80_dsk.h #endif en.category("Kaypro"); @@ -1189,6 +1194,7 @@ en.category("Tandy"); #ifdef HAS_FORMATS_TRS_CAS + en.add(trs80l1_cassette_formats); // trs_cas.h en.add(trs80l2_cassette_formats); // trs_cas.h #endif #ifdef HAS_FORMATS_TANDY2K_DSK @@ -1200,6 +1206,10 @@ en.add(to7_cassette_formats); // thom_cas.h en.add(mo5_cassette_formats); // thom_cas.h #endif +#ifdef HAS_FORMATS_THOM_DSK + en.add(FLOPPY_THOMSON_525_FORMAT); // thom_dsk.h + en.add(FLOPPY_THOMSON_35_FORMAT); // thom_dsk.h +#endif en.category("Texas Instruments"); #ifdef HAS_FORMATS_TI99_DSK diff -Nru mame-0.230+dfsg.1/src/lib/formats/ap_dsk35.cpp mame-0.231+dfsg.1/src/lib/formats/ap_dsk35.cpp --- mame-0.230+dfsg.1/src/lib/formats/ap_dsk35.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/lib/formats/ap_dsk35.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -1244,6 +1244,14 @@ uint32_t dsize = (h[0x40] << 24) | (h[0x41] << 16) | (h[0x42] << 8) | h[0x43]; uint32_t tsize = (h[0x44] << 24) | (h[0x45] << 16) | (h[0x46] << 8) | h[0x47]; + uint8_t encoding = h[0x50]; + uint8_t format = h[0x51]; + // if it's a 1.44MB DC42 image, reject it so the generic PC MFM handler picks it up + if ((encoding == 0x03) && (format == 0x02)) + { + return 0; + } + return size == 0x54+tsize+dsize && h[0] < 64 && h[0x52] == 1 && h[0x53] == 0 ? 100 : 0; } diff -Nru mame-0.230+dfsg.1/src/lib/formats/d64_dsk.cpp mame-0.231+dfsg.1/src/lib/formats/d64_dsk.cpp --- mame-0.230+dfsg.1/src/lib/formats/d64_dsk.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/lib/formats/d64_dsk.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -298,14 +298,15 @@ for(int i=0; i= sectors.size() || sectors[ds.sector_id].empty()) memset((void *)ds.data, 0, ds.size); - else if(data.size() < ds.size) { - memcpy((void *)ds.data, data.data(), data.size()); - memset((uint8_t *)ds.data + data.size(), 0, data.size() - ds.size); + + else if(sectors[ds.sector_id].size() < ds.size) { + memcpy((void *)ds.data, sectors[ds.sector_id].data(), sectors[ds.sector_id].size()); + memset((uint8_t *)ds.data + sectors[ds.sector_id].size(), 0, sectors[ds.sector_id].size() - ds.size); + } else - memcpy((void *)ds.data, data.data(), ds.size); + memcpy((void *)ds.data, sectors[ds.sector_id].data(), ds.size); } } diff -Nru mame-0.230+dfsg.1/src/lib/formats/flex_dsk.cpp mame-0.231+dfsg.1/src/lib/formats/flex_dsk.cpp --- mame-0.230+dfsg.1/src/lib/formats/flex_dsk.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/lib/formats/flex_dsk.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -73,14 +73,14 @@ int flex_format::identify(io_generic *io, uint32_t form_factor, const std::vector &variants) { - int type = find_size(io, form_factor); + int type = find_size(io, form_factor, variants); if (type != -1) return 75; return 0; } -int flex_format::find_size(io_generic *io, uint32_t form_factor) +int flex_format::find_size(io_generic *io, uint32_t form_factor, const std::vector &variants) { uint64_t size = io_generic_size(io); uint8_t boot0[256], boot1[256]; diff -Nru mame-0.230+dfsg.1/src/lib/formats/flex_dsk.h mame-0.231+dfsg.1/src/lib/formats/flex_dsk.h --- mame-0.230+dfsg.1/src/lib/formats/flex_dsk.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/lib/formats/flex_dsk.h 2021-04-27 15:32:05.000000000 +0000 @@ -22,7 +22,7 @@ virtual const char *description() const override; virtual const char *extensions() const override; virtual int identify(io_generic *io, uint32_t form_factor, const std::vector &variants) override; - virtual int find_size(io_generic *io, uint32_t form_factor) override; + virtual int find_size(io_generic *io, uint32_t form_factor, const std::vector &variants) override; virtual const wd177x_format::format &get_track_format(const format &f, int head, int track) override; private: diff -Nru mame-0.230+dfsg.1/src/lib/formats/ibmxdf_dsk.cpp mame-0.231+dfsg.1/src/lib/formats/ibmxdf_dsk.cpp --- mame-0.230+dfsg.1/src/lib/formats/ibmxdf_dsk.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/lib/formats/ibmxdf_dsk.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -54,14 +54,14 @@ int ibmxdf_format::identify(io_generic *io, uint32_t form_factor, const std::vector &variants) { - int type = find_size(io, form_factor); + int type = find_size(io, form_factor, variants); if (type != -1) return 75; return 0; } -int ibmxdf_format::find_size(io_generic *io, uint32_t form_factor) +int ibmxdf_format::find_size(io_generic *io, uint32_t form_factor, const std::vector &variants) { uint64_t size = io_generic_size(io); @@ -175,7 +175,7 @@ bool ibmxdf_format::load(io_generic *io, uint32_t form_factor, const std::vector &variants, floppy_image *image) { - int type = find_size(io, form_factor); + int type = find_size(io, form_factor, variants); if(type == -1) return false; diff -Nru mame-0.230+dfsg.1/src/lib/formats/ibmxdf_dsk.h mame-0.231+dfsg.1/src/lib/formats/ibmxdf_dsk.h --- mame-0.230+dfsg.1/src/lib/formats/ibmxdf_dsk.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/lib/formats/ibmxdf_dsk.h 2021-04-27 15:32:05.000000000 +0000 @@ -27,7 +27,7 @@ virtual bool load(io_generic *io, uint32_t form_factor, const std::vector &variants, floppy_image *image) override; virtual bool supports_save() const override { return false; } - virtual int find_size(io_generic *io, uint32_t form_factor) override; + virtual int find_size(io_generic *io, uint32_t form_factor, const std::vector &variants) override; virtual int get_image_offset(const format &f, int head, int track) override; virtual const wd177x_format::format &get_track_format(const format &f, int head, int track) override; diff -Nru mame-0.230+dfsg.1/src/lib/formats/imd_dsk.cpp mame-0.231+dfsg.1/src/lib/formats/imd_dsk.cpp --- mame-0.230+dfsg.1/src/lib/formats/imd_dsk.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/lib/formats/imd_dsk.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -493,14 +493,20 @@ } } - // Check if the drive is QD or HD but we're a 40 track image. - // If so, put the image on even tracks. - if ((has_variant(variants, floppy_image::DSQD)) || - (has_variant(variants, floppy_image::DSHD))) + if(form_factor == floppy_image::FF_525) { - if (maxtrack <= 39) + // On 5.25, check if the drive is QD or HD but we're a 40 track + // image. If so, put the image on even tracks. + if ((has_variant(variants, floppy_image::DSQD)) || + (has_variant(variants, floppy_image::DSHD))) { - m_trackmult = 2; + if (maxtrack <= 39) + m_trackmult = 2; + } + else + { + if (maxtrack > 42) + return false; } } diff -Nru mame-0.230+dfsg.1/src/lib/formats/kaypro_dsk.cpp mame-0.231+dfsg.1/src/lib/formats/kaypro_dsk.cpp --- mame-0.230+dfsg.1/src/lib/formats/kaypro_dsk.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/lib/formats/kaypro_dsk.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -36,7 +36,7 @@ const char *kayproii_format::extensions() const { - return "kay"; + return "kay,dsk"; } const kayproii_format::format kayproii_format::formats[] = { @@ -63,7 +63,7 @@ const char *kaypro2x_format::extensions() const { - return "kay"; + return "kay,dsk"; } const kaypro2x_format::format kaypro2x_format::formats[] = { diff -Nru mame-0.230+dfsg.1/src/lib/formats/mdos_dsk.cpp mame-0.231+dfsg.1/src/lib/formats/mdos_dsk.cpp --- mame-0.230+dfsg.1/src/lib/formats/mdos_dsk.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/lib/formats/mdos_dsk.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -74,7 +74,7 @@ int mdos_format::identify(io_generic *io, uint32_t form_factor, const std::vector &variants) { - int type = find_size(io, form_factor); + int type = find_size(io, form_factor, variants); if (type != -1) return 75; @@ -109,7 +109,7 @@ return (high - 0x30) * 10 + (low - 0x30); } -int mdos_format::find_size(io_generic *io, uint32_t form_factor) +int mdos_format::find_size(io_generic *io, uint32_t form_factor, const std::vector &variants) { uint64_t size = io_generic_size(io); diff -Nru mame-0.230+dfsg.1/src/lib/formats/mdos_dsk.h mame-0.231+dfsg.1/src/lib/formats/mdos_dsk.h --- mame-0.230+dfsg.1/src/lib/formats/mdos_dsk.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/lib/formats/mdos_dsk.h 2021-04-27 15:32:05.000000000 +0000 @@ -20,7 +20,7 @@ virtual const char *description() const override; virtual const char *extensions() const override; virtual int identify(io_generic *io, uint32_t form_factor, const std::vector &variants) override; - virtual int find_size(io_generic *io, uint32_t form_factor) override; + virtual int find_size(io_generic *io, uint32_t form_factor, const std::vector &variants) override; virtual const wd177x_format::format &get_track_format(const format &f, int head, int track) override; private: diff -Nru mame-0.230+dfsg.1/src/lib/formats/mm_dsk.cpp mame-0.231+dfsg.1/src/lib/formats/mm_dsk.cpp --- mame-0.230+dfsg.1/src/lib/formats/mm_dsk.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/lib/formats/mm_dsk.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -82,7 +82,8 @@ 512, {}, 1, {}, 80, 50, 22, 80 - } + }, + {} }; const floppy_format_type FLOPPY_MM1_FORMAT = &floppy_image_format_creator; diff -Nru mame-0.230+dfsg.1/src/lib/formats/opd_dsk.cpp mame-0.231+dfsg.1/src/lib/formats/opd_dsk.cpp --- mame-0.230+dfsg.1/src/lib/formats/opd_dsk.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/lib/formats/opd_dsk.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -32,7 +32,7 @@ int opd_format::identify(io_generic *io, uint32_t form_factor, const std::vector &variants) { - int type = find_size(io, form_factor); + int type = find_size(io, form_factor, variants); if (type != -1) return 90; diff -Nru mame-0.230+dfsg.1/src/lib/formats/os9_dsk.cpp mame-0.231+dfsg.1/src/lib/formats/os9_dsk.cpp --- mame-0.230+dfsg.1/src/lib/formats/os9_dsk.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/lib/formats/os9_dsk.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -71,14 +71,14 @@ int os9_format::identify(io_generic *io, uint32_t form_factor, const std::vector &variants) { - int type = find_size(io, form_factor); + int type = find_size(io, form_factor, variants); if (type != -1) return 75; return 0; } -int os9_format::find_size(io_generic *io, uint32_t form_factor) +int os9_format::find_size(io_generic *io, uint32_t form_factor, const std::vector &variants) { uint64_t size = io_generic_size(io); diff -Nru mame-0.230+dfsg.1/src/lib/formats/os9_dsk.h mame-0.231+dfsg.1/src/lib/formats/os9_dsk.h --- mame-0.230+dfsg.1/src/lib/formats/os9_dsk.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/lib/formats/os9_dsk.h 2021-04-27 15:32:05.000000000 +0000 @@ -22,7 +22,7 @@ virtual const char *description() const override; virtual const char *extensions() const override; virtual int identify(io_generic *io, uint32_t form_factor, const std::vector &variants) override; - virtual int find_size(io_generic *io, uint32_t form_factor) override; + virtual int find_size(io_generic *io, uint32_t form_factor, const std::vector &variants) override; virtual const wd177x_format::format &get_track_format(const format &f, int head, int track) override; private: diff -Nru mame-0.230+dfsg.1/src/lib/formats/thom_dsk.cpp mame-0.231+dfsg.1/src/lib/formats/thom_dsk.cpp --- mame-0.230+dfsg.1/src/lib/formats/thom_dsk.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/lib/formats/thom_dsk.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -1,444 +1,86 @@ // license:BSD-3-Clause -// copyright-holders:Antoine Mine -/********************************************************************* +// copyright-holders:Olivier Galibert - formats/thom_dsk.c - - Thomson disk images - - Based on work of Antoine Mine' - -*********************************************************************/ - -#include -#include #include "thom_dsk.h" -#include "basicdsk.h" - -static const int sap_magic_num = 0xB3; /* simple XOR crypt */ - - -static const char sap_header[] = - "\001SYSTEME D'ARCHIVAGE PUKALL S.A.P. " - "(c) Alexandre PUKALL Avril 1998"; - -static const uint16_t sap_crc[] = +thomson_525_format::thomson_525_format() : wd177x_format(formats) { - 0x0000, 0x1081, 0x2102, 0x3183, 0x4204, 0x5285, 0x6306, 0x7387, - 0x8408, 0x9489, 0xa50a, 0xb58b, 0xc60c, 0xd68d, 0xe70e, 0xf78f, -}; - -struct sap_dsk_tag -{ - int tracks; - int sector_size; - int sector_pos[80][16]; /* remember sector position in file */ -}; - -static uint16_t thom_sap_crc( uint8_t* data, int size ) -{ - int i; - uint16_t crc = 0xffff, crc2; - for ( i = 0; i < size; i++ ) - { - crc2 = ( crc >> 4 ) ^ sap_crc[ ( crc ^ data[i] ) & 15 ]; - crc = ( crc2 >> 4 ) ^ sap_crc[ ( crc2 ^ (data[i] >> 4) ) & 15 ]; - } - return crc; } -static struct sap_dsk_tag *get_tag(floppy_image_legacy *floppy) +const char *thomson_525_format::name() const { - struct sap_dsk_tag *tag; - tag = (sap_dsk_tag *)floppy_tag(floppy); - return tag; + return "thomson_525"; } - -static FLOPPY_IDENTIFY(sap_dsk_identify) +const char *thomson_525_format::description() const { - char header[0x100]; - floppy_image_read(floppy, header, 0, sizeof(sap_header)); - if (!memcmp( header, sap_header, sizeof(sap_header) ) ) - { - *vote= 100; - } else { - *vote = 0; - } - return FLOPPY_ERROR_SUCCESS; -} -static int sap_get_heads_per_disk(floppy_image_legacy *floppy) -{ - return 1; + return "Thomson 5.25 disk image"; } -static int sap_get_tracks_per_disk(floppy_image_legacy *floppy) +const char *thomson_525_format::extensions() const { - return get_tag(floppy)->tracks; + return "fd"; } - -static floperr_t get_offset(floppy_image_legacy *floppy, int head, int track, int sector, bool sector_is_index, uint64_t *offset) -{ - uint64_t offs; - struct sap_dsk_tag *tag = get_tag(floppy); - /* translate the sector to a raw sector */ - if (!sector_is_index) +const thomson_525_format::format thomson_525_format::formats[] = { { - sector -= 1; - } - /* check to see if we are out of range */ - if ((head < 0) || (head >= 1) || (track < 0) || (track >=tag->tracks) - || (sector < 0) || (sector >= 16)) - return FLOPPY_ERROR_SEEKERROR; - - offs = tag->sector_pos[track][sector]; - if (offs <= 0 ) - return FLOPPY_ERROR_SEEKERROR; - - if (offset) - *offset = offs; - return FLOPPY_ERROR_SUCCESS; -} - - - -static floperr_t internal_sap_read_sector(floppy_image_legacy *floppy, int head, int track, int sector, bool sector_is_index, void *buffer, size_t buflen) -{ - uint64_t offset; - floperr_t err; - int i; - uint8_t *buf; - err = get_offset(floppy, head, track, sector, sector_is_index, &offset); - if (err) - return err; - - floppy_image_read(floppy, buffer, offset+4, buflen); - buf = (uint8_t*)buffer; - for (i=0;i> 8; - buf[buflen+5] = crc & 0xff; - for (i=0;isector_size; - } - return FLOPPY_ERROR_SUCCESS; + return "thomson_35"; } - - -static floperr_t sap_get_indexed_sector_info(floppy_image_legacy *floppy, int head, int track, int sector_index, int *cylinder, int *side, int *sector, uint32_t *sector_length, unsigned long *flags) +const char *thomson_35_format::description() const { - floperr_t err; - uint8_t header[4]; - uint64_t offset = 0; - sector_index += 1; - err = get_offset(floppy, head, track, sector_index, false, &offset); - - floppy_image_read(floppy, header, offset, 4); - if (cylinder) - *cylinder = header[2]; - if (side) - *side = head; - if (sector) - *sector = header[3]; - if (sector_length) - *sector_length = get_tag(floppy)->sector_size; - if (flags) - /* TODO: read DAM or DDAM and determine flags */ - *flags = 0; - return err; + return "Thomson 3.5 disk image"; } -static floperr_t sap_post_format(floppy_image_legacy *floppy, util::option_resolution *params) +const char *thomson_35_format::extensions() const { - int track,sector; - int pos; - uint8_t buf[256], header[4]; - struct sap_dsk_tag *tag; - tag = (struct sap_dsk_tag *) floppy_create_tag(floppy, sizeof(struct sap_dsk_tag)); - - /* default options */ - if ( !tag->tracks ) - { - tag->tracks = 80; - tag->sector_size = 256; - } - - /* create SAP file header */ - floppy_image_write( floppy, sap_header, 0, 66 ); - - for ( track = 0; track < 80; track++ ) - for ( sector = 0; sector < 16; sector++ ) - tag->sector_pos[track][sector] = 0; - - /* create all sectors with valid header and CRC */ - memset(buf, 0xe5, 256); - pos = 0x42; - header[0] = (tag->sector_size==128) ? 1 : 0; - header[1] = 0; - for ( track = 0, pos = 0x42; track < tag->tracks; track++ ) - for ( sector = 0; sector < 16; sector++, pos += tag->sector_size + 6 ) { - tag->sector_pos[track][sector] = pos; - header[2] = track; - header[3] = sector + 1; - floppy_image_write(floppy, header, pos, 4); - sap_write_indexed_sector( floppy, 0, track, sector, buf, tag->sector_size, 0 ); - } - - return FLOPPY_ERROR_SUCCESS; + return "fd"; } - -static FLOPPY_CONSTRUCT(sap_dsk_construct) -{ - struct FloppyCallbacks *callbacks; - struct sap_dsk_tag *tag; - int j; - uint8_t fmt; - tag = (struct sap_dsk_tag *) floppy_create_tag(floppy, sizeof(struct sap_dsk_tag)); - if (!tag) - return FLOPPY_ERROR_OUTOFMEMORY; - - /* guess format */ - floppy_image_read(floppy, &fmt, 0x42, 1); - if ( fmt==1 ) tag->sector_size = 128; else tag->sector_size = 256; - - /* start with an empty offset table */ - tag->tracks = 0; - for ( int i = 0; i < 80; i++ ) - for ( j = 0; j < 16; j++ ) - tag->sector_pos[i][j] = 0; - - /* count tracks & fill sector offset table */ - for ( uint64_t i = 0x42; i+4 < floppy_image_size(floppy); i += tag->sector_size + 6 ) // CRC 2 bytes + 4 bytes sector header +const thomson_35_format::format thomson_35_format::formats[] = { { - uint8_t sector, track; - floppy_image_read(floppy, &track, i+2, 1); - floppy_image_read(floppy, §or, i+3, 1); - if ( track >= 80 || sector < 1 || sector > 16 ) continue; - if ( track > tag->tracks ) tag->tracks = track+1; - tag->sector_pos[track][sector-1] = i; - } - callbacks = floppy_callbacks(floppy); - callbacks->read_sector = sap_read_sector; - callbacks->write_sector = sap_write_sector; - callbacks->read_indexed_sector = sap_read_indexed_sector; - callbacks->write_indexed_sector = sap_write_indexed_sector; - callbacks->get_sector_length = sap_get_sector_length; - callbacks->get_heads_per_disk = sap_get_heads_per_disk; - callbacks->get_tracks_per_disk = sap_get_tracks_per_disk; - callbacks->get_indexed_sector_info = sap_get_indexed_sector_info; - callbacks->post_format = sap_post_format; - - return FLOPPY_ERROR_SUCCESS; -} - -static FLOPPY_IDENTIFY(qdd_dsk_identify) -{ - *vote = (floppy_image_size(floppy) == (51200)) ? 100 : 0; - return FLOPPY_ERROR_SUCCESS; -} - -/* fixed interlacing map for QDDs */ -static int thom_qdd_map[400]; - -static int qdd_translate_sector(floppy_image_legacy *floppy, int sector) -{ - return thom_qdd_map[sector-1]; -} - -static void thom_qdd_compute_map ( void ) -{ - /* this map is hardcoded in the QDD BIOS */ - static const int p[6][4] = - { - { 20, 2, 14, 8 }, { 21, 19, 13, 7 }, - { 22, 18, 12, 6 }, { 23, 17, 11, 5 }, - { 24, 16, 10, 4 }, { 1, 15, 9, 3 } - }; - static const int q[4] = { 0, 8, 4, 12 }; - int t, s; - for ( t = 0; t < 24; t++ ) + floppy_image::FF_35, floppy_image::SSDD, floppy_image::MFM, + 2000, + 16, 80, 1, + 256, {}, + 1, {}, + 31, 22, 44 + }, { - for ( s = 0; s < 16; s++ ) - { - thom_qdd_map[ t*16 + s ] = p[ t/4 ][ s%4 ] * 16 + (s/4) + 4*(t%4); - } - } - for ( s = 0; s < 16; s++ ) - { - thom_qdd_map[ 24*16 + s ] = q[ s%4 ] + (s/4); - } -} - -static FLOPPY_CONSTRUCT(qdd_dsk_construct) -{ - struct basicdsk_geometry geometry; - - thom_qdd_compute_map(); - - memset(&geometry, 0, sizeof(geometry)); - geometry.heads = 1; - geometry.first_sector_id = 1; - geometry.sector_length = 128; - geometry.tracks = 1; - geometry.sectors = 400; - geometry.translate_sector = qdd_translate_sector; - return basicdsk_construct(floppy, &geometry); -} - - -/* ----------------------------------------------------------------------- */ - - -static floperr_t fd_identify(floppy_image_legacy *floppy, int *vote, int tracks, int sector_size) -{ - uint64_t expected_size; - expected_size = sector_size; - expected_size *= tracks; - expected_size *= 16; /* secetors */ - *vote = (floppy_image_size(floppy) == expected_size) ? 100 : 50; - return FLOPPY_ERROR_SUCCESS; -} - -static floperr_t fd_construct(floppy_image_legacy *floppy, int tracks, int sector_size) -{ - struct basicdsk_geometry geometry; - memset(&geometry, 0, sizeof(geometry)); - geometry.heads = 1; - geometry.first_sector_id = 1; - geometry.sector_length = sector_size; - geometry.tracks = tracks; - geometry.sectors = 16; - return basicdsk_construct(floppy, &geometry); -} - - -static FLOPPY_IDENTIFY(fd_80_256_identify) -{ - return fd_identify(floppy, vote, 80, 256); -} - -static FLOPPY_CONSTRUCT(fd_80_256_construct) -{ - return fd_construct(floppy, 80, 256); -} - -static FLOPPY_IDENTIFY(fd_40_256_identify) -{ - return fd_identify(floppy, vote, 40, 256); -} - -static FLOPPY_CONSTRUCT(fd_40_256_construct) -{ - return fd_construct(floppy, 40, 256); -} - -static FLOPPY_IDENTIFY(fd_80_128_identify) -{ - return fd_identify(floppy, vote, 80, 128); -} - -static FLOPPY_CONSTRUCT(fd_80_128_construct) -{ - return fd_construct(floppy, 80, 128); -} - -static FLOPPY_IDENTIFY(fd_40_128_identify) -{ - return fd_identify(floppy, vote, 40, 128); -} - -static FLOPPY_CONSTRUCT(fd_40_128_construct) -{ - return fd_construct(floppy, 40, 128); -} - - -/* ----------------------------------------------------------------------- */ - -LEGACY_FLOPPY_OPTIONS_START(thomson) - -LEGACY_FLOPPY_OPTION(fdmfm2, "fd", "Thomson FD (MFM) 80 tracks disk image (3\"1/2 DD)", - fd_80_256_identify, fd_80_256_construct, nullptr, nullptr) - -// Note: no way to distinguish between FD files for 5"1/4 DD and 3"1/2 SD actually, as they have the same size -// however, we expect 3"1/2 SD to be rather rare, so, we simply put it after 5"1/4 DD - -LEGACY_FLOPPY_OPTION(fdmfm, "fd", "Thomson FD (MFM) 40 tracks disk image (5\"1/4 DD)", - fd_40_256_identify, fd_40_256_construct, nullptr, nullptr) - -LEGACY_FLOPPY_OPTION(fd2, "fd", "Thomson FD (FM) 80 tracks disk image (3\"1/2 SD)", - fd_80_128_identify, fd_80_128_construct, nullptr, nullptr) - -LEGACY_FLOPPY_OPTION(fd, "fd", "Thomson FD (FM) 40 tracks disk image (5\"1/4 SD)", - fd_40_128_identify, fd_40_128_construct, nullptr, nullptr) - -LEGACY_FLOPPY_OPTION(sap,"sap", "Thomson SAP floppy disk image", - sap_dsk_identify, sap_dsk_construct, nullptr, nullptr) - -LEGACY_FLOPPY_OPTION(qdd,"qd", "Thomson QDD floppy disk image (2\"8 SD)", - qdd_dsk_identify, qdd_dsk_construct, nullptr, nullptr) + floppy_image::FF_35, floppy_image::DSDD, floppy_image::MFM, + 2000, + 16, 80, 2, + 256, {}, + 1, {}, + 31, 22, 44 + }, + {} +}; -LEGACY_FLOPPY_OPTIONS_END +const floppy_format_type FLOPPY_THOMSON_525_FORMAT = &floppy_image_format_creator; +const floppy_format_type FLOPPY_THOMSON_35_FORMAT = &floppy_image_format_creator; diff -Nru mame-0.230+dfsg.1/src/lib/formats/thom_dsk.h mame-0.231+dfsg.1/src/lib/formats/thom_dsk.h --- mame-0.230+dfsg.1/src/lib/formats/thom_dsk.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/lib/formats/thom_dsk.h 2021-04-27 15:32:05.000000000 +0000 @@ -1,18 +1,40 @@ // license:BSD-3-Clause -// copyright-holders:Miodrag Milanovic +// copyright-holders:Olivier Galibert #ifndef MAME_FORMATS_THOM_DSK_H #define MAME_FORMATS_THOM_DSK_H #pragma once -#include "flopimg.h" +#include "wd177x_dsk.h" -/* recognized image formats: - - .fd one-side 5"1/4 (single and double density), 3"1/2 - - .qd one-side QDD - - .sap one-side double-density 5"1/4, 3"1/2 -*/ +class thomson_525_format : public wd177x_format +{ +public: + thomson_525_format(); -LEGACY_FLOPPY_OPTIONS_EXTERN(thomson); + virtual const char *name() const override; + virtual const char *description() const override; + virtual const char *extensions() const override; + +private: + static const format formats[]; +}; + +class thomson_35_format : public wd177x_format +{ +public: + thomson_35_format(); + + virtual const char *name() const override; + virtual const char *description() const override; + virtual const char *extensions() const override; + +private: + static const format formats[]; +}; + + +extern const floppy_format_type FLOPPY_THOMSON_525_FORMAT; +extern const floppy_format_type FLOPPY_THOMSON_35_FORMAT; #endif // MAME_FORMATS_THOM_DSK_H diff -Nru mame-0.230+dfsg.1/src/lib/formats/trd_dsk.cpp mame-0.231+dfsg.1/src/lib/formats/trd_dsk.cpp --- mame-0.230+dfsg.1/src/lib/formats/trd_dsk.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/lib/formats/trd_dsk.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -31,7 +31,7 @@ return "trd"; } -int trd_format::find_size(io_generic *io, uint32_t form_factor) +int trd_format::find_size(io_generic *io, uint32_t form_factor, const std::vector &variants) { int index = -1; uint64_t size = io_generic_size(io); diff -Nru mame-0.230+dfsg.1/src/lib/formats/trd_dsk.h mame-0.231+dfsg.1/src/lib/formats/trd_dsk.h --- mame-0.230+dfsg.1/src/lib/formats/trd_dsk.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/lib/formats/trd_dsk.h 2021-04-27 15:32:05.000000000 +0000 @@ -24,7 +24,7 @@ private: static const format formats[]; - virtual int find_size(io_generic *io, uint32_t form_factor) override; + virtual int find_size(io_generic *io, uint32_t form_factor, const std::vector &variants) override; }; extern const floppy_format_type FLOPPY_TRD_FORMAT; diff -Nru mame-0.230+dfsg.1/src/lib/formats/trs80_dsk.cpp mame-0.231+dfsg.1/src/lib/formats/trs80_dsk.cpp --- mame-0.230+dfsg.1/src/lib/formats/trs80_dsk.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/lib/formats/trs80_dsk.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -2,44 +2,95 @@ // copyright-holders:Dirk Best /*************************************************************************** - TRS-80 +TRS-80 - JV1 disk image format +JV1/3 disk image formats - Used by Jeff Vavasour's TRS-80 Emulators +Used by Jeff Vavasour's TRS-80 Emulators - TODO: - - Gap sizes unverified +Description of JV1: + This format has no header or identifying characteristics. It is + simply a string of sectors one after the other in order. There's + no DAM or inter-sector bytes. The expected format is 10 sectors + per track, 256 bytes per sector, single-sided, single-density. + There's no limit on the number of tracks. It's up to the emulation + to decide how to represent things. This format is intended only + for the TRS-80 Model 1 with Level 2 basic. As it happens, the + format is readable by the Model 3, but it's probably not a good + idea to attempt writing on it. + BUGS: If you try to create a JV1 disk, MAME will crash. + +Description of JV3: + There's no header, but the format is obvious to the practised eye. + Firstly there's a 3 byte descriptor per sector, occurs 2901 times. + This is followed by a byte to indicate if the disk is read-only. The + total size of this area is 0x2200 bytes. The sector descriptors can + be in any order. Unused descriptors are FF FF (FC | size). These + can be intermixed with valid descriptors. + Byte 1 - track number (0xFF indicates unused entry). + Byte 2 - sector number. + Byte 3 - flag byte. The bits are assigned as follows: + Bits 0,1 - size in multiples of 128 bytes xor 1 for used tracks, or + xor 2 for unused tracks. + 128 bytes: 1 (used), 2 (unused) + 256 bytes: 0 (used), 3 (unused) + 512 bytes: 3 (used), 0 (unused) + 1024 bytes: 2 (used), 1 (unused) + bit 2: non-ibm flag. Some FDCs, such as the 1771, can have sector + sizes from 16 to 1024 in any multiple of 16. MAME doesn't + support this, and the format itself gives no indication of the + size. So, it's impossible to support it. + bit 3: sector has a CRC error. + bit 4: side (0 = side 0, 1 = side 1) + bits 5,6: DAM code: + 0xF8 (deleted): 0x60 (single-density), 0x20 (double-density) + 0xF9 (undefined): 0x40 (single-density), invalid/unused (double-density) + 0xFA (undefined): 0x20 (single-density), invalid/unused (double-density) + 0xFB (normal) : 0x00 (single and double-density) + bit 7: density (1 = dden/MFM). MAME doesn't support different densities in + a track, so it's defaulted to single-density unless at least 1 sector is + marked as double-density. + After 0x2200 comes the data. There's no DAM bytes or inter-sector bytes + included. If the last part of the descriptors is all unused, there's no + need for those sectors to be in the image. If 2901 entries is not enough, + the format allows another set of descriptors and data. However no TRS-80 + disks need this extra area, so it's unsupported. This format is intended + only for the TRS-80 Models 3 and 4. Save/Create is currently unsupported. + + What we support: up to 2 sides, 96 tracks, 18 sectors per track. + We support all the flags except the non-ibm flag. + We do not support multiple sets of descriptors and data. + We do not support multiple densities per track. ***************************************************************************/ #include "trs80_dsk.h" -trs80_format::trs80_format() : wd177x_format(formats) +jv1_format::jv1_format() : wd177x_format(formats) { } -const char *trs80_format::name() const +const char *jv1_format::name() const { - return "trs80"; + return "jv1"; } -const char *trs80_format::description() const +const char *jv1_format::description() const { return "TRS-80 JV1 disk image"; } -const char *trs80_format::extensions() const +const char *jv1_format::extensions() const { - return "dsk"; + return "jv1,dsk"; } -int trs80_format::get_track_dam_fm(const format &f, int head, int track) +int jv1_format::get_track_dam_fm(const format &f, int head, int track) { return (track == 17 && head == 0) ? FM_DDAM : FM_DAM; } -const trs80_format::format trs80_format::formats[] = +const jv1_format::format jv1_format::formats[] = { { floppy_image::FF_525, floppy_image::SSSD, floppy_image::FM, @@ -50,10 +101,339 @@ 4000, 10, 40, 1, 256, {}, 0, {}, 14, 11, 12 }, { - floppy_image::FF_525, floppy_image::SSDD, floppy_image::FM, + floppy_image::FF_525, floppy_image::SSQD, floppy_image::FM, 4000, 10, 80, 1, 256, {}, 0, {}, 14, 11, 12 }, {} }; -const floppy_format_type FLOPPY_TRS80_FORMAT = &floppy_image_format_creator; +const floppy_format_type FLOPPY_JV1_FORMAT = &floppy_image_format_creator; + + +#define MAX_SECTORS 19 +#define MAX_TRACKS 96 + +jv3_format::jv3_format() +{ +} + +const char *jv3_format::name() const +{ + return "jv3"; +} + +const char *jv3_format::description() const +{ + return "TRS-80 JV3 disk image"; +} + +const char *jv3_format::extensions() const +{ + return "jv3,dsk"; +} + +int jv3_format::identify(io_generic *io, uint32_t form_factor, const std::vector &variants) +{ + uint32_t image_size = io_generic_size(io); + + if (image_size < 0x2200) + return 0; // too small, silent return + + std::vector data(image_size); + io_generic_read(io, data.data(), 0, image_size); + const uint32_t entries = 2901; + const uint32_t header_size = entries *3 +1; + + // check the readonly flag + if ((data[0x21ff] != 0) && (data[0x21ff] != 0xff)) + return 0; // flag is incorrect, silent return + + // Check for DMK + uint8_t testbyte = 0; + for (int i = 5; i < 16; i++) + testbyte |= data[i]; + if (!testbyte) + return 0; // DMK, silent return + + // Check for other disk formats + if (data[1] >= MAX_SECTORS) + return 0; // some other format, silent return + + // Full validation of the disk + bool sector_array[2][MAX_TRACKS][MAX_SECTORS]; + for (uint8_t side = 0; side < 2; side++) + for (uint8_t track = 0; track < MAX_TRACKS; track++) + for (uint8_t sector = 0; sector < MAX_SECTORS; sector++) + sector_array[side][track][sector] = false; // fill_n won't compile + + uint32_t data_ptr = header_size, last_data = header_size, size = 0; + + // printf errors may indicate it's another format, and so are ignorable. + for (uint32_t sect = 0; sect < entries; sect++) + { + uint8_t track = data[sect*3]; + uint8_t sector = data[sect*3+1]; + uint8_t flag_size = data[sect*3+2] & 3; + uint8_t flag_side = (data[sect*3+2] & 0x10) ? 1 : 0; + + if (track < 0xff) + { + // validate so we don't overrun the array + if (track >= MAX_TRACKS) + { + printf("jv3_format::identify - track %d exceeds maximum allowed (%d)\n",track,MAX_TRACKS-1); + return 0; + } + + if (sector >= MAX_SECTORS) + { + printf("jv3_format::identify - sector %d exceeds maximum allowed (%d)\n",sector,MAX_SECTORS-1); + return 0; + } + + // check if sector already exists + if (sector_array[flag_side][track][sector]) + { + printf("jv3_format::identify - side %d track %d sector %d is duplicated\n",flag_side,track,sector); + return 0; + } + + sector_array[flag_side][track][sector] = true; + + size = 128 << (flag_size ^1); + data_ptr += size; + last_data = data_ptr; + } + else + { + size = 128 << (flag_size ^2); + data_ptr += size; + } + } + + // Is all data in the image? (unused tracks at the end are optional) + if (last_data > image_size) + { + printf("jv3_format::identify - disk is missing some data. Expected 0x%X, Actual = 0x%X\n",last_data,image_size); + return 0; + } + + return 80; +} + +bool jv3_format::load(io_generic *io, uint32_t form_factor, const std::vector &variants, floppy_image *image) +{ + // disk has already been validated in every way except if it exceeds drive tracks, we do that below + printf("Disk detected as JV3\n");fflush(stdout); + int drive_tracks, drive_sides; + image->get_maximal_geometry(drive_tracks, drive_sides); + std::vector data(io_generic_size(io)); + io_generic_read(io, data.data(), 0, data.size()); + const uint32_t entries = 2901; + const uint32_t header_size = entries *3 +1; + bool is_dd = false, is_ds = false; + + for (uint8_t curr_side = 0; curr_side < 2; curr_side++) + { + for (uint8_t curr_track = 0; curr_track < MAX_TRACKS; curr_track++) + { + // Find out how many sectors are in this track + uint8_t max_sect = 0, min_sect = 0xff; + for (uint32_t sect = 0; sect < entries; sect++) + { + uint8_t track = data[sect*3]; + uint8_t sector = data[sect*3+1]; + uint8_t flags = data[sect*3+2]; + uint8_t side = (flags & 0x10) ? 1 : 0; + if ((track == curr_track) && (side == curr_side)) + { + if (sector > max_sect) + max_sect = sector; + if (sector < min_sect) + min_sect = sector; + } + } + + // If there's any data for this track process it + if (max_sect >= min_sect) + { + // Protect against oversized disk + if ((curr_track >= drive_tracks) || (curr_side >= drive_sides)) + { + osd_printf_error("Disk exceeds drive capabilities\n"); + return false; + } + + max_sect++; // now it is the max possible number of sectors on this track + + desc_pc_sector sectors[MAX_SECTORS]; + // set defaults in case some sectors are missing from the image + for (uint8_t i = 0; i < max_sect; i++) + { + sectors[i].track = curr_track; + sectors[i].head = curr_side; + sectors[i].sector = i; + sectors[i].actual_size = 256; + sectors[i].size = 1; + sectors[i].deleted = true; + sectors[i].bad_crc = false; + sectors[i].data = 0; + } + + uint32_t data_ptr = header_size; + bool ddensity = false; + // Search for sectors on this track & side + for (uint32_t sect = 0; sect < entries; sect++) + { + uint8_t track = data[sect*3]; + uint8_t sector = data[sect*3+1]; + uint8_t flags = data[sect*3+2]; + uint8_t side = (flags & 0x10) ? 1 : 0; + uint8_t size = (flags & 0x03); + if (track == 0xff) + size ^= 2; + else + size ^= 1; + uint16_t sector_size = 128 << size; + if ((track == curr_track) && (side == curr_side)) + { + // process the sector + sectors[sector].track = curr_track; + sectors[sector].head = curr_side; + sectors[sector].sector = sector; + sectors[sector].actual_size = sector_size; + sectors[sector].size = size; + uint8_t dam = flags & 0xe0; + sectors[sector].deleted = ((dam == 0x60) || (dam == 0xa0)) ? true : false; + sectors[sector].bad_crc = (flags & 0x08) ? true : false; + sectors[sector].data = &data[data_ptr]; + if (flags & 0x80) + ddensity = true; + } + data_ptr += sector_size; + } + + //printf("Side %d, Track %d, %s density\n",curr_side,curr_track,ddensity ? "Double" : "Single"); + if (ddensity) + { + is_dd = true; + build_wd_track_mfm(curr_track, curr_side, image, 100000, max_sect, sectors, 32, 31, 22); + } + else + build_wd_track_fm(curr_track, curr_side, image, 50000, max_sect, sectors, 14, 12, 11); + + if (curr_side) + is_ds = true; + } + } + } + if (is_dd) + { + if (is_ds) + image->set_variant(floppy_image::DSDD); + else + image->set_variant(floppy_image::SSDD); + } + else + { + if (is_ds) + image->set_variant(floppy_image::DSSD); + else + image->set_variant(floppy_image::SSSD); + } + return true; +} + +bool jv3_format::save(io_generic *io, const std::vector &variants, floppy_image *image) +{ + int track_count, head_count; + image->get_actual_geometry(track_count, head_count); + + if (track_count) + { + // If the disk already exists, find out if it's writable + std::vector data(io_generic_size(io)); + io_generic_read(io, data.data(), 0, data.size()); + if ((data.size() >= 0x2200) && (data[0x21ff] == 0)) + return false; // disk is readonly + } + + uint32_t data_ptr = 0x2200, sect_ptr = 0; + + + // prepare default header, which we will partially overwrite later + uint8_t header[0x2200]; + std::fill_n(header, std::size(header), 0xFF); + + if (!track_count) + { + track_count = 35; + head_count = 1; + } + + // write disk data + for (uint8_t head = 0; head < head_count; head++) + { + for (uint8_t track = 0; track < track_count; track++) + { + auto bitstream = generate_bitstream_from_track(track, head, 2000, image); + auto sectors = extract_sectors_from_bitstream_mfm_pc(bitstream); + bool ddensity = true; + if (sectors.empty()) + { + bitstream = generate_bitstream_from_track(track, head, 4000, image); + sectors = extract_sectors_from_bitstream_fm_pc(bitstream); + ddensity = false; + } + + if (sectors.empty()) + { + // write dummy data. If we write nothing at all, mame hangs + uint8_t dummy[256]; + std::fill_n(dummy, std::size(dummy), 0xE5); + for (uint8_t i = 0; i < 10; i++) + { + header[sect_ptr++] = track; + header[sect_ptr++] = i; + header[sect_ptr++] = head ? 0x10 : 0; + io_generic_write(io, &dummy[0], data_ptr, 256); + data_ptr += 256; + } + } + else + { + // How many sectors? + uint8_t count = 0; + for (const auto &s : sectors) + if (!s.empty()) + count++; + + // Save them + for (uint8_t i = 0; i < count; i++) + { + header[sect_ptr++] = track; + header[sect_ptr++] = i; + uint8_t flags = (ddensity) ? 0x80 : 0; + flags |= (sectors[i].size() >> 8) ^1; + flags |= head ? 0x10 : 0; + header[sect_ptr++] = flags; + io_generic_write(io, sectors[i].data(), data_ptr, sectors[i].size()); + data_ptr += sectors[i].size(); + } + } + } + } + // Save the header + io_generic_write(io, header, 0, 0x2200); + + return true; +} + + +bool jv3_format::supports_save() const +{ + return true; +} + +const floppy_format_type FLOPPY_JV3_FORMAT = &floppy_image_format_creator; + diff -Nru mame-0.230+dfsg.1/src/lib/formats/trs80_dsk.h mame-0.231+dfsg.1/src/lib/formats/trs80_dsk.h --- mame-0.230+dfsg.1/src/lib/formats/trs80_dsk.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/lib/formats/trs80_dsk.h 2021-04-27 15:32:05.000000000 +0000 @@ -14,10 +14,10 @@ #include "wd177x_dsk.h" -class trs80_format : public wd177x_format +class jv1_format : public wd177x_format { public: - trs80_format(); + jv1_format(); virtual const char *name() const override; virtual const char *description() const override; @@ -30,6 +30,22 @@ static const format formats[]; }; -extern const floppy_format_type FLOPPY_TRS80_FORMAT; +class jv3_format : public floppy_image_format_t +{ +public: + jv3_format(); + + virtual int identify(io_generic *io, uint32_t form_factor, const std::vector &variants) override; + virtual bool load(io_generic *io, uint32_t form_factor, const std::vector &variants, floppy_image *image) override; + virtual bool save(io_generic *io, const std::vector &variants, floppy_image *image) override; + + virtual const char *name() const override; + virtual const char *description() const override; + virtual const char *extensions() const override; + virtual bool supports_save() const override; +}; + +extern const floppy_format_type FLOPPY_JV1_FORMAT; +extern const floppy_format_type FLOPPY_JV3_FORMAT; #endif // MAME_FORMATS_TRS80_DSK_H diff -Nru mame-0.230+dfsg.1/src/lib/formats/trs_cas.cpp mame-0.231+dfsg.1/src/lib/formats/trs_cas.cpp --- mame-0.230+dfsg.1/src/lib/formats/trs_cas.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/lib/formats/trs_cas.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -3,6 +3,15 @@ /******************************************************************** Support for TRS80 .cas cassette images +Types handled: +- Model 1 Level I: 250 baud +- Model 1 Level II: 500 baud +- Model 3/4: 1500 baud. + +Level I and II tape format is completely identical, apart from the +baud rate. The contents are specific to each system though. +The Model 3 and 4 can load either Level II tapes (by answering L +to the Cass? prompt), or the fast format by hitting enter at Cass? ********************************************************************/ #include "formats/trs_cas.h" @@ -15,67 +24,150 @@ #define SMPHI 32767 -static int cas_size; // FIXME: global variable prevents mutliple instances +static int cas_size = 0; // FIXME: global variable prevents multiple instances /******************************************************************* Generate one high-low cycle of sample data ********************************************************************/ -static inline int trs80l2_cas_cycle(int16_t *buffer, int sample_pos, int silence, int high, int low) +static inline int trs80m1_cas_cycle(int16_t *buffer, int sample_pos, bool bit) { - int i = 0; + uint8_t i; if ( buffer ) { - while( i < silence ) - { - buffer[ sample_pos + i ] = SILENCE; - i++; - } - while( i < silence + high) + for (i = 0; i < 32; i++) + buffer[ sample_pos++ ] = SILENCE; + for (i = 0; i < 6; i++) + buffer[ sample_pos++ ] = bit ? SMPHI : SILENCE; + for (i = 0; i < 6; i++) + buffer[ sample_pos++ ] = bit ? SMPLO : SILENCE; + } + return 44; +} + + +static int trs80m1_handle_cas(int16_t *buffer, const uint8_t *casdata) +{ + int data_pos = 0, sample_count = 0; + bool sw = false; + + // Make sure this is a trs80 tape + // Should have some zero bytes then one 0xA5 + while ((cas_size > data_pos) && (casdata[data_pos] == 0x00)) + data_pos++; + if (casdata[data_pos] != 0xA5) + return 0; + + data_pos = 0; + while( data_pos < cas_size ) + { + uint8_t data = casdata[data_pos]; + + for (uint8_t i = 0; i < 8; i++ ) { - buffer[ sample_pos + i ] = SMPHI; - i++; + /* Signal code */ + sample_count += trs80m1_cas_cycle( buffer, sample_count, true ); + + /* Bit code */ + sample_count += trs80m1_cas_cycle( buffer, sample_count, data >> 7 ); + + data <<= 1; } - while( i < silence + high + low ) + if (!sw && (casdata[data_pos] == 0xA5)) { - buffer[ sample_pos + i ] = SMPLO; - i++; + sw = true; + // Need 1ms silence here while rom is busy + sample_count += trs80m1_cas_cycle( buffer, sample_count, false ); } + + data_pos++; } - return silence + high + low; + + // Specification requires a short silence to indicate EOF + sample_count += trs80m1_cas_cycle( buffer, sample_count, false ); + sample_count += trs80m1_cas_cycle( buffer, sample_count, false ); + return sample_count; } +static inline int trs80m3_cas_cycle(int16_t *buffer, int sample_pos, bool bit) +{ + uint8_t i, counts = bit ? 8 : 16; -static int trs80l2_handle_cas(int16_t *buffer, const uint8_t *casdata) + if ( buffer ) + { + for (i = 0; i < counts; i++) + buffer[ sample_pos++ ] = SMPHI; + for (i = 0; i < counts; i++) + buffer[ sample_pos++ ] = SMPLO; + } + return counts*2; +} + + +static int trs80m3_handle_cas(int16_t *buffer, const uint8_t *casdata) { - int data_pos, sample_count; + int data_pos = 0, sample_count = 0; + uint8_t sw = 0, bitout = 0, byteout = 0; - data_pos = 0; - sample_count = 0; + // Make sure this is a trs80m3 tape + // Should have ~256 0x55 then one 0x7f + // It's possible that 0x57 could be encountered instead, + // but no working tapes with it have been found. + // Other bit-shifted variants might exist too. + while ((cas_size > data_pos) && (casdata[data_pos] == 0x55)) + data_pos++; + if (casdata[data_pos] != 0x7f) + return 0; + data_pos = 0; while( data_pos < cas_size ) { - uint8_t data = casdata[data_pos]; - int i; + uint8_t data = casdata[data_pos]; - for ( i = 0; i < 8; i++ ) + for (uint8_t i = 0; i < 8; i++ ) { - /* Signal code */ - sample_count += trs80l2_cas_cycle( buffer, sample_count, 33, 6, 6 ); + sample_count += trs80m3_cas_cycle( buffer, sample_count, data >> 7 ); - /* Bit code */ - if ( data & 0x80 ) - sample_count += trs80l2_cas_cycle( buffer, sample_count, 33, 6, 6 ); - else - sample_count += trs80l2_cas_cycle( buffer, sample_count, 33 + 6 + 6, 0, 0 ); + // This paragraph unscrambles and prints the SYSTEM name. + // If the first character is U, type SYSTEM, then the next 6 characters; otherwise use CLOAD. + if ((sw == 1) && buffer) + { + if (bitout) + { + byteout = (byteout << 1) | (data >> 7); + if (bitout == 8) + { + if (byteout == 0) + sw = 2; + printf("%c",byteout); + byteout = 0; + bitout = 0; + } + else + bitout++; + } + else bitout++; + } data <<= 1; } + if (!sw && (casdata[data_pos] != 0x55)) + { + sw = 1; + // This 1ms of silence isn't absolutely necessary, but the system + // writes it, so we may as well emulate it. + sample_count += trs80m1_cas_cycle( buffer, sample_count, false ); + } + data_pos++; } + + // Specification requires a short silence to indicate EOF + sample_count += trs80m1_cas_cycle( buffer, sample_count, false ); + sample_count += trs80m1_cas_cycle( buffer, sample_count, false ); return sample_count; } @@ -83,28 +175,66 @@ /******************************************************************* Generate samples for the tape image ********************************************************************/ -static int trs80l2_cas_fill_wave(int16_t *buffer, int sample_count, uint8_t *bytes) +static int trs80_cas_fill_wave(int16_t *buffer, int sample_count, uint8_t *bytes) { - return trs80l2_handle_cas( buffer, bytes ); + if (cas_size && (bytes[0] == 0x55)) + return trs80m3_handle_cas( buffer, bytes ); + else + return trs80m1_handle_cas( buffer, bytes ); } /******************************************************************* Calculate the number of samples needed for this tape image ********************************************************************/ -static int trs80l2_cas_to_wav_size(const uint8_t *casdata, int caslen) +static int trs80_cas_to_wav_size(const uint8_t *casdata, int caslen) { cas_size = caslen; - return trs80l2_handle_cas( nullptr, casdata ); + if (cas_size && (casdata[0] == 0x55)) + return trs80m3_handle_cas( nullptr, casdata ); + else + return trs80m1_handle_cas( nullptr, casdata ); +} + +static const cassette_image::LegacyWaveFiller trs80l1_cas_legacy_fill_wave = +{ + trs80_cas_fill_wave, /* fill_wave */ + -1, /* chunk_size */ + 0, /* chunk_samples */ + trs80_cas_to_wav_size, /* chunk_sample_calc */ + 22050, /* sample_frequency */ + 0, /* header_samples */ + 0 /* trailer_samples */ +}; + + +static cassette_image::error trs80l1_cas_identify(cassette_image *cassette, cassette_image::Options *opts) +{ + return cassette->legacy_identify(opts, &trs80l1_cas_legacy_fill_wave); +} + + +static cassette_image::error trs80l1_cas_load(cassette_image *cassette) +{ + return cassette->legacy_construct(&trs80l1_cas_legacy_fill_wave); } + +static const cassette_image::Format trs80l1_cas_format = +{ + "cas", + trs80l1_cas_identify, + trs80l1_cas_load, + nullptr +}; + static const cassette_image::LegacyWaveFiller trs80l2_cas_legacy_fill_wave = { - trs80l2_cas_fill_wave, /* fill_wave */ + trs80_cas_fill_wave, /* fill_wave */ -1, /* chunk_size */ 0, /* chunk_samples */ - trs80l2_cas_to_wav_size, /* chunk_sample_calc */ + trs80_cas_to_wav_size, /* chunk_sample_calc */ 44100, /* sample_frequency */ 0, /* header_samples */ 0 /* trailer_samples */ @@ -132,6 +262,10 @@ }; +CASSETTE_FORMATLIST_START(trs80l1_cassette_formats) + CASSETTE_FORMAT(trs80l1_cas_format) +CASSETTE_FORMATLIST_END + CASSETTE_FORMATLIST_START(trs80l2_cassette_formats) CASSETTE_FORMAT(trs80l2_cas_format) CASSETTE_FORMATLIST_END diff -Nru mame-0.230+dfsg.1/src/lib/formats/trs_cas.h mame-0.231+dfsg.1/src/lib/formats/trs_cas.h --- mame-0.230+dfsg.1/src/lib/formats/trs_cas.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/lib/formats/trs_cas.h 2021-04-27 15:32:05.000000000 +0000 @@ -14,6 +14,7 @@ #include "cassimg.h" +CASSETTE_FORMATLIST_EXTERN(trs80l1_cassette_formats); CASSETTE_FORMATLIST_EXTERN(trs80l2_cassette_formats); #endif // MAME_FORMATS_TRS_CAS_H diff -Nru mame-0.230+dfsg.1/src/lib/formats/uniflex_dsk.cpp mame-0.231+dfsg.1/src/lib/formats/uniflex_dsk.cpp --- mame-0.230+dfsg.1/src/lib/formats/uniflex_dsk.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/lib/formats/uniflex_dsk.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -33,14 +33,14 @@ int uniflex_format::identify(io_generic *io, uint32_t form_factor, const std::vector &variants) { - int type = find_size(io, form_factor); + int type = find_size(io, form_factor, variants); if (type != -1) return 75; return 0; } -int uniflex_format::find_size(io_generic *io, uint32_t form_factor) +int uniflex_format::find_size(io_generic *io, uint32_t form_factor, const std::vector &variants) { uint64_t size = io_generic_size(io); uint8_t sir[192]; diff -Nru mame-0.230+dfsg.1/src/lib/formats/uniflex_dsk.h mame-0.231+dfsg.1/src/lib/formats/uniflex_dsk.h --- mame-0.230+dfsg.1/src/lib/formats/uniflex_dsk.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/lib/formats/uniflex_dsk.h 2021-04-27 15:32:05.000000000 +0000 @@ -20,7 +20,7 @@ virtual const char *description() const override; virtual const char *extensions() const override; virtual int identify(io_generic *io, uint32_t form_factor, const std::vector &variants) override; - virtual int find_size(io_generic *io, uint32_t form_factor) override; + virtual int find_size(io_generic *io, uint32_t form_factor, const std::vector &variants) override; void build_sector_description(const format &f, uint8_t *sectdata, desc_s *sectors, int track, int head) const override; private: diff -Nru mame-0.230+dfsg.1/src/lib/formats/upd765_dsk.cpp mame-0.231+dfsg.1/src/lib/formats/upd765_dsk.cpp --- mame-0.230+dfsg.1/src/lib/formats/upd765_dsk.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/lib/formats/upd765_dsk.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -15,13 +15,15 @@ { } -int upd765_format::find_size(io_generic *io, uint32_t form_factor) const +int upd765_format::find_size(io_generic *io, uint32_t form_factor, const std::vector &variants) const { uint64_t size = io_generic_size(io); for(int i=0; formats[i].form_factor; i++) { const format &f = formats[i]; if(form_factor != floppy_image::FF_UNKNOWN && form_factor != f.form_factor) continue; + if(!variants.empty() && !has_variant(variants, f.variant)) + continue; if(size == file_header_skip_bytes + (uint64_t) compute_track_size(f) * f.track_count * f.head_count + file_footer_skip_bytes) return i; @@ -31,7 +33,7 @@ int upd765_format::identify(io_generic *io, uint32_t form_factor, const std::vector &variants) { - int type = find_size(io, form_factor); + int type = find_size(io, form_factor, variants); if(type != -1) return 50; @@ -175,7 +177,7 @@ bool upd765_format::load(io_generic *io, uint32_t form_factor, const std::vector &variants, floppy_image *image) { - int type = find_size(io, form_factor); + int type = find_size(io, form_factor, variants); if(type == -1) return false; diff -Nru mame-0.230+dfsg.1/src/lib/formats/upd765_dsk.h mame-0.231+dfsg.1/src/lib/formats/upd765_dsk.h --- mame-0.230+dfsg.1/src/lib/formats/upd765_dsk.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/lib/formats/upd765_dsk.h 2021-04-27 15:32:05.000000000 +0000 @@ -50,7 +50,7 @@ floppy_image_format_t::desc_e* get_desc_fm(const format &f, int ¤t_size, int &end_gap_index); floppy_image_format_t::desc_e* get_desc_mfm(const format &f, int ¤t_size, int &end_gap_index); - int find_size(io_generic *io, uint32_t form_factor) const; + int find_size(io_generic *io, uint32_t form_factor, const std::vector &variants) const; int compute_track_size(const format &f) const; virtual void build_sector_description(const format &d, uint8_t *sectdata, desc_s *sectors, int track, int head) const; void check_compatibility(floppy_image *image, std::vector &candidates); diff -Nru mame-0.230+dfsg.1/src/lib/formats/wd177x_dsk.cpp mame-0.231+dfsg.1/src/lib/formats/wd177x_dsk.cpp --- mame-0.230+dfsg.1/src/lib/formats/wd177x_dsk.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/lib/formats/wd177x_dsk.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -29,14 +29,15 @@ /* Default implementation for find_size. May be overwritten by subclasses. */ -int wd177x_format::find_size(io_generic *io, uint32_t form_factor) +int wd177x_format::find_size(io_generic *io, uint32_t form_factor, const std::vector &variants) { uint64_t size = io_generic_size(io); for(int i=0; formats[i].form_factor; i++) { const format &f = formats[i]; if(form_factor != floppy_image::FF_UNKNOWN && form_factor != f.form_factor) continue; - + if(!variants.empty() && !has_variant(variants, f.variant)) + continue; uint64_t format_size = 0; for(int track=0; track < f.track_count; track++) { for(int head=0; head < f.head_count; head++) { @@ -53,7 +54,7 @@ int wd177x_format::identify(io_generic *io, uint32_t form_factor, const std::vector &variants) { - int type = find_size(io, form_factor); + int type = find_size(io, form_factor, variants); if(type != -1) return 50; @@ -198,7 +199,7 @@ bool wd177x_format::load(io_generic *io, uint32_t form_factor, const std::vector &variants, floppy_image *image) { - int type = find_size(io, form_factor); + int type = find_size(io, form_factor, variants); if(type == -1) return false; @@ -437,7 +438,7 @@ break; } int ns = 0; - for(int j=0; j<256; j++) + for(int j=0; j &variants); virtual int get_image_offset(const format &f, int head, int track); virtual int get_track_dam_fm(const format &f, int head, int track); virtual int get_track_dam_mfm(const format &f, int head, int track); diff -Nru mame-0.230+dfsg.1/src/lib/util/cdrom.cpp mame-0.231+dfsg.1/src/lib/util/cdrom.cpp --- mame-0.230+dfsg.1/src/lib/util/cdrom.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/lib/util/cdrom.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -16,13 +16,13 @@ ***************************************************************************/ -#include - #include "cdrom.h" -#include #include "chdcd.h" +#include +#include + /*************************************************************************** DEBUGGING @@ -180,17 +180,11 @@ uint32_t chdlba, physlba; int track; - /* loop until our current LBA is less than the start LBA of the next track */ + // loop until our current LBA is less than the start LBA of the next track for (track = 0; track < file->cdtoc.numtrks; track++) { if (loglba < file->cdtoc.tracks[track + 1].logframeofs) { - // is this a no-pregap-data track? compensate for the logical offset pointing to the "wrong" sector. - if ((file->cdtoc.tracks[track].pgdatasize == 0) && (loglba > file->cdtoc.tracks[track].pregap)) - { - loglba -= file->cdtoc.tracks[track].pregap; - } - // convert to physical and proceed physlba = file->cdtoc.tracks[track].physframeofs + (loglba - file->cdtoc.tracks[track].logframeofs); chdlba = physlba - file->cdtoc.tracks[track].physframeofs + file->cdtoc.tracks[track].chdframeofs; @@ -223,12 +217,12 @@ cdrom_file *file; uint32_t physofs, logofs; - /* allocate memory for the CD-ROM file */ + // allocate memory for the CD-ROM file file = new (std::nothrow) cdrom_file(); if (file == nullptr) return nullptr; - /* setup the CDROM module and get the disc info */ + // set up the CD-ROM module and get the disc info chd_error err = chdcd_parse_toc(inputfile, file->cdtoc, file->track_info); if (err != CHDERR_NONE) { @@ -237,7 +231,7 @@ return nullptr; } - /* fill in the data */ + // fill in the data file->chd = nullptr; LOG(("CD has %d tracks\n", file->cdtoc.numtrks)); @@ -258,15 +252,21 @@ physofs = logofs = 0; for (i = 0; i < file->cdtoc.numtrks; i++) { - file->cdtoc.tracks[i].physframeofs = physofs; - file->cdtoc.tracks[i].chdframeofs = 0; - file->cdtoc.tracks[i].logframeofs = logofs; + file->cdtoc.tracks[i].logframeofs = 0; - // if the pregap sectors aren't in the track, add them to the track's logical length if (file->cdtoc.tracks[i].pgdatasize == 0) { logofs += file->cdtoc.tracks[i].pregap; } + else + { + file->cdtoc.tracks[i].logframeofs = file->cdtoc.tracks[i].pregap; + } + + file->cdtoc.tracks[i].physframeofs = physofs; + file->cdtoc.tracks[i].chdframeofs = 0; + file->cdtoc.tracks[i].logframeofs += logofs; + file->cdtoc.tracks[i].logframes = file->cdtoc.tracks[i].frames - file->cdtoc.tracks[i].pregap; // postgap adds to the track length logofs += file->cdtoc.tracks[i].postgap; @@ -274,7 +274,7 @@ physofs += file->cdtoc.tracks[i].frames; logofs += file->cdtoc.tracks[i].frames; -/* printf("Track %02d is format %d subtype %d datasize %d subsize %d frames %d extraframes %d pregap %d pgmode %d presize %d postgap %d logofs %d physofs %d chdofs %d\n", i+1, +/* printf("Track %02d is format %d subtype %d datasize %d subsize %d frames %d extraframes %d pregap %d pgmode %d presize %d postgap %d logofs %d physofs %d chdofs %d logframes %d\n", i+1, file->cdtoc.tracks[i].trktype, file->cdtoc.tracks[i].subtype, file->cdtoc.tracks[i].datasize, @@ -287,13 +287,15 @@ file->cdtoc.tracks[i].postgap, file->cdtoc.tracks[i].logframeofs, file->cdtoc.tracks[i].physframeofs, - file->cdtoc.tracks[i].chdframeofs);*/ + file->cdtoc.tracks[i].chdframeofs, + file->cdtoc.tracks[i].logframes);*/ } - /* fill out dummy entries for the last track to help our search */ + // fill out dummy entries for the last track to help our search file->cdtoc.tracks[i].physframeofs = physofs; file->cdtoc.tracks[i].logframeofs = logofs; file->cdtoc.tracks[i].chdframeofs = 0; + file->cdtoc.tracks[i].logframes = 0; return file; } @@ -315,12 +317,7 @@ cdrom_file *cdrom_open(chd_file *chd) { - int i; - cdrom_file *file; - uint32_t physofs, chdofs, logofs; - chd_error err; - - /* punt if no CHD */ + // punt if no CHD if (!chd) return nullptr; @@ -331,15 +328,15 @@ return nullptr; /* allocate memory for the CD-ROM file */ - file = new (std::nothrow) cdrom_file(); - if (file == nullptr) + cdrom_file *file = new (std::nothrow) cdrom_file(); + if (!file) return nullptr; /* fill in the data */ file->chd = chd; /* read the CD-ROM metadata */ - err = cdrom_parse_metadata(chd, &file->cdtoc); + chd_error err = cdrom_parse_metadata(chd, &file->cdtoc); if (err != CHDERR_NONE) { delete file; @@ -351,18 +348,33 @@ /* calculate the starting frame for each track, keeping in mind that CHDMAN pads tracks out with extra frames to fit 4-frame size boundries */ - physofs = chdofs = logofs = 0; + uint32_t physofs = 0, chdofs = 0, logofs = 0; + int i; for (i = 0; i < file->cdtoc.numtrks; i++) { - file->cdtoc.tracks[i].physframeofs = physofs; - file->cdtoc.tracks[i].chdframeofs = chdofs; - file->cdtoc.tracks[i].logframeofs = logofs; + file->cdtoc.tracks[i].logframeofs = 0; - // if the pregap sectors aren't in the track, add them to the track's logical length if (file->cdtoc.tracks[i].pgdatasize == 0) { + // Anything that isn't cue. + // toc (cdrdao): Pregap data seems to be included at the end of previous track. + // START/PREGAP is only issued in special cases, for instance alongside ZERO commands. + // ZERO and SILENCE commands are supposed to generate additional data that's not included + // in the image directly, so the total logofs value must be offset to point to index 1. logofs += file->cdtoc.tracks[i].pregap; } + else + { + // cues: Pregap is the difference between index 0 and index 1 unless PREGAP is specified. + // The data is assumed to be in the bin and not generated separately, so the pregap should + // only be added to the current track's lba to offset it to index 1. + file->cdtoc.tracks[i].logframeofs = file->cdtoc.tracks[i].pregap; + } + + file->cdtoc.tracks[i].physframeofs = physofs; + file->cdtoc.tracks[i].chdframeofs = chdofs; + file->cdtoc.tracks[i].logframeofs += logofs; + file->cdtoc.tracks[i].logframes = file->cdtoc.tracks[i].frames - file->cdtoc.tracks[i].pregap; // postgap counts against the next track logofs += file->cdtoc.tracks[i].postgap; @@ -371,8 +383,8 @@ chdofs += file->cdtoc.tracks[i].frames; chdofs += file->cdtoc.tracks[i].extraframes; logofs += file->cdtoc.tracks[i].frames; -/* - printf("Track %02d is format %d subtype %d datasize %d subsize %d frames %d extraframes %d pregap %d pgmode %d presize %d postgap %d logofs %d physofs %d chdofs %d\n", i+1, + +/* printf("Track %02d is format %d subtype %d datasize %d subsize %d frames %d extraframes %d pregap %d pgmode %d presize %d postgap %d logofs %d physofs %d chdofs %d logframes %d\n", i+1, file->cdtoc.tracks[i].trktype, file->cdtoc.tracks[i].subtype, file->cdtoc.tracks[i].datasize, @@ -385,13 +397,15 @@ file->cdtoc.tracks[i].postgap, file->cdtoc.tracks[i].logframeofs, file->cdtoc.tracks[i].physframeofs, - file->cdtoc.tracks[i].chdframeofs);*/ + file->cdtoc.tracks[i].chdframeofs, + file->cdtoc.tracks[i].logframes);*/ } - /* fill out dummy entries for the last track to help our search */ + // fill out dummy entries for the last track to help our search file->cdtoc.tracks[i].physframeofs = physofs; file->cdtoc.tracks[i].logframeofs = logofs; file->cdtoc.tracks[i].chdframeofs = chdofs; + file->cdtoc.tracks[i].logframes = 0; return file; } @@ -455,7 +469,7 @@ // if this is pregap info that isn't actually in the file, just return blank data if (!phys) { - if ((file->cdtoc.tracks[tracknum].pgdatasize == 0) && (lbasector < (file->cdtoc.tracks[tracknum].logframeofs + file->cdtoc.tracks[tracknum].pregap))) + if ((file->cdtoc.tracks[tracknum].pgdatasize == 0) && (lbasector < file->cdtoc.tracks[tracknum].logframeofs)) { //printf("PG missing sector: LBA %d, trklog %d\n", lbasector, file->cdtoc.tracks[tracknum].logframeofs); memset(dest, 0, length); @@ -466,8 +480,16 @@ // if a CHD, just read if (file->chd != nullptr) { + if (!phys && file->cdtoc.tracks[tracknum].pgdatasize != 0) + { + // chdman (phys=true) relies on chdframeofs to point to index 0 instead of index 1 for extractcd. + // Actually playing CDs requires it to point to index 1 instead of index 0, so adjust the offset when phys=false. + chdsector += file->cdtoc.tracks[tracknum].pregap; + } + result = file->chd->read_bytes(uint64_t(chdsector) * uint64_t(CD_FRAME_SIZE) + startoffs, dest, length); - /* swap CDDA in the case of LE GDROMs */ + + // swap CDDA in the case of LE GDROMs if ((file->cdtoc.flags & CD_FLAG_GDROMLE) && (file->cdtoc.tracks[tracknum].trktype == CD_TRACK_AUDIO)) needswap = true; } @@ -476,12 +498,15 @@ // else read from the appropriate file util::core_file &srcfile = *file->fhandle[tracknum]; - uint64_t sourcefileoffset = file->track_info.track[tracknum].offset; int bytespersector = file->cdtoc.tracks[tracknum].datasize + file->cdtoc.tracks[tracknum].subsize; + uint64_t sourcefileoffset = file->track_info.track[tracknum].offset; + + if (file->cdtoc.tracks[tracknum].pgdatasize != 0) + chdsector += file->cdtoc.tracks[tracknum].pregap; sourcefileoffset += chdsector * bytespersector + startoffs; - // printf("Reading sector %d from track %d at offset %lld\n", chdsector, tracknum, sourcefileoffset); + // printf("Reading sector %d from track %d at offset %lu\n", chdsector, tracknum, sourcefileoffset); srcfile.seek(sourcefileoffset, SEEK_SET); srcfile.read(dest, length); @@ -540,7 +565,7 @@ chdsector = logical_to_chd_lba(file, lbasector, tracknum); } - /* copy out the requested sector */ + // copy out the requested sector uint32_t tracktype = file->cdtoc.tracks[tracknum].trktype; if ((datatype == tracktype) || (datatype == CD_TRACK_RAW_DONTCARE)) @@ -549,13 +574,13 @@ } else { - /* return 2048 bytes of mode 1 data from a 2352 byte mode 1 raw sector */ + // return 2048 bytes of mode 1 data from a 2352 byte mode 1 raw sector if ((datatype == CD_TRACK_MODE1) && (tracktype == CD_TRACK_MODE1_RAW)) { return (read_partial_sector(file, buffer, lbasector, chdsector, tracknum, 16, 2048, phys) == CHDERR_NONE); } - /* return 2352 byte mode 1 raw sector from 2048 bytes of mode 1 data */ + // return 2352 byte mode 1 raw sector from 2048 bytes of mode 1 data if ((datatype == CD_TRACK_MODE1_RAW) && (tracktype == CD_TRACK_MODE1)) { auto *bufptr = (uint8_t *)buffer; @@ -571,19 +596,19 @@ return (read_partial_sector(file, bufptr+16, lbasector, chdsector, tracknum, 0, 2048, phys) == CHDERR_NONE); } - /* return 2048 bytes of mode 1 data from a mode2 form1 or raw sector */ + // return 2048 bytes of mode 1 data from a mode2 form1 or raw sector if ((datatype == CD_TRACK_MODE1) && ((tracktype == CD_TRACK_MODE2_FORM1)||(tracktype == CD_TRACK_MODE2_RAW))) { return (read_partial_sector(file, buffer, lbasector, chdsector, tracknum, 24, 2048, phys) == CHDERR_NONE); } - /* return 2048 bytes of mode 1 data from a mode2 form2 or XA sector */ + // return 2048 bytes of mode 1 data from a mode2 form2 or XA sector if ((datatype == CD_TRACK_MODE1) && (tracktype == CD_TRACK_MODE2_FORM_MIX)) { return (read_partial_sector(file, buffer, lbasector, chdsector, tracknum, 8, 2048, phys) == CHDERR_NONE); } - /* return mode 2 2336 byte data from a 2352 byte mode 1 or 2 raw sector (skip the header) */ + // return mode 2 2336 byte data from a 2352 byte mode 1 or 2 raw sector (skip the header) if ((datatype == CD_TRACK_MODE2) && ((tracktype == CD_TRACK_MODE1_RAW) || (tracktype == CD_TRACK_MODE2_RAW))) { return (read_partial_sector(file, buffer, lbasector, chdsector, tracknum, 16, 2336, phys) == CHDERR_NONE); diff -Nru mame-0.230+dfsg.1/src/lib/util/cdrom.h mame-0.231+dfsg.1/src/lib/util/cdrom.h --- mame-0.230+dfsg.1/src/lib/util/cdrom.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/lib/util/cdrom.h 2021-04-27 15:32:05.000000000 +0000 @@ -88,6 +88,7 @@ uint32_t logframeofs; /* logical frame of actual track data - offset by pregap size if pregap not physically present */ uint32_t physframeofs; /* physical frame of actual track data in CHD data */ uint32_t chdframeofs; /* frame number this track starts at on the CHD */ + uint32_t logframes; /* number of frames from logframeofs until end of track data */ /* fields used in multi-cue GDI */ uint32_t multicuearea; diff -Nru mame-0.230+dfsg.1/src/mame/arcade.flt mame-0.231+dfsg.1/src/mame/arcade.flt --- mame-0.230+dfsg.1/src/mame/arcade.flt 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/arcade.flt 2021-04-27 15:32:05.000000000 +0000 @@ -751,6 +751,7 @@ mcr68.cpp meadows.cpp meadwttl.cpp +mechatt.cpp mediagx.cpp megadriv_acbl.cpp megaphx.cpp diff -Nru mame-0.230+dfsg.1/src/mame/audio/laserbat.cpp mame-0.231+dfsg.1/src/mame/audio/laserbat.cpp --- mame-0.230+dfsg.1/src/mame/audio/laserbat.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/audio/laserbat.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -130,7 +130,7 @@ void laserbat_state::csound2_w(uint8_t data) { // there are a bunch of edge-triggered things, so grab changes - unsigned const diff = data ^ m_csound2; + uint8_t const diff = data ^ m_csound2; // SN76477 and distortion control if (data & diff & 0x01) @@ -317,10 +317,10 @@ void catnmous_state::csound2_w(uint8_t data) { // the bottom bit is used for sprite banking, of all things - m_gfx2 = memregion("gfx2")->base() + ((data & 0x01) ? 0x0800 : 0x0000); + m_gfx2_base = uint16_t(BIT(data, 0)) << 11; // the top bit is called RESET on the wiring diagram - m_audiopcb->reset_w((data & 0x80) ? 1 : 0); + m_audiopcb->reset_w(BIT(data, 7)); m_csound2 = data; } diff -Nru mame-0.230+dfsg.1/src/mame/audio/nichisnd.h mame-0.231+dfsg.1/src/mame/audio/nichisnd.h --- mame-0.230+dfsg.1/src/mame/audio/nichisnd.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/audio/nichisnd.h 2021-04-27 15:32:05.000000000 +0000 @@ -12,8 +12,8 @@ #pragma once #include "cpu/z80/tmpz84c011.h" -#include "sound/3812intf.h" #include "sound/dac.h" +#include "sound/ym3812.h" #include "speaker.h" #include "machine/gen_latch.h" diff -Nru mame-0.230+dfsg.1/src/mame/audio/nl_kidniki.cpp mame-0.231+dfsg.1/src/mame/audio/nl_kidniki.cpp --- mame-0.230+dfsg.1/src/mame/audio/nl_kidniki.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/audio/nl_kidniki.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -29,7 +29,7 @@ * * You can observe sounds at XU1.14 by doing * - * NL_LOGS=XU1.14 ./mame64 kidniki + * NL_LOGS=XU1.14 ./mame kidniki * nlwav -o x.wav log_XU1.14.log * play x.wav * diff -Nru mame-0.230+dfsg.1/src/mame/audio/nl_segas16b.cpp mame-0.231+dfsg.1/src/mame/audio/nl_segas16b.cpp --- mame-0.230+dfsg.1/src/mame/audio/nl_segas16b.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/audio/nl_segas16b.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -73,7 +73,7 @@ CAP(C21, CAP_U(2.2)) CAP(C22, CAP_U(2.2)) // Needs verification - CAP(C27, CAP_P(1500)) + CAP(C29, CAP_P(1500)) CAP(C28, CAP_P(1500)) // ------------------------------------ @@ -81,14 +81,14 @@ // ------------------------------------ NET_C(CH1, RCOM1.1) - NET_C(RCOM1.2, C27.1, D20.5) + NET_C(RCOM1.2, C29.1, D20.5) NET_C(D20.7, D20.6, C22.1) NET_C(CH2, RCOM2.1) NET_C(RCOM2.2, C28.1, D20.10) NET_C(D20.8, D20.9, C21.1) - NET_C(GND, C27.2, C28.2) + NET_C(GND, C29.2, C28.2) // OPAMPS, no information on schematics, assume 12V since // TL084 with 5V would be outside specifications @@ -110,7 +110,7 @@ CAP(C25, CAP_U(0.0022)) CAP(C26, CAP_U(0.022)) CAP(C23, CAP_U(0.022)) - CAP(C29, CAP_U(0.01)) + CAP(C24, CAP_U(0.01)) CAP(C62, CAP_U(2.2)) NET_C(VP5, R11.1) @@ -120,10 +120,10 @@ NET_C(XC20.7, XC20.6, C26.2, R12.1) NET_C(R12.2, C23.1, R13.1) - NET_C(R13.2, C29.1, XC20.3) + NET_C(R13.2, C24.1, XC20.3) NET_C(XC20.1, XC20.2, C23.2, C62.1) - NET_C(GND, R16.2, C25.2, C29.2) + NET_C(GND, R16.2, C25.2, C24.2) // ------------------------------------ // Mixing and pre amplifier diff -Nru mame-0.230+dfsg.1/src/mame/drivers/a2600.cpp mame-0.231+dfsg.1/src/mame/drivers/a2600.cpp --- mame-0.230+dfsg.1/src/mame/drivers/a2600.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/a2600.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -11,7 +11,7 @@ ***************************************************************************/ // the new RIOT does not work with the SuperCharger -// for example "mame64 a2600 scharger -cass offifrog" fails to load after playing the tape +// for example "mame a2600 scharger -cass offifrog" fails to load after playing the tape #include "emu.h" @@ -23,9 +23,8 @@ #include "speaker.h" -#define MASTER_CLOCK_NTSC 3579545 -#define MASTER_CLOCK_PAL 3546894 -#define CATEGORY_SELECT 16 +static constexpr auto MASTER_CLOCK_NTSC = 3.579575_MHz_XTAL; +static constexpr auto MASTER_CLOCK_PAL = 3.546894_MHz_XTAL; static const uint16_t supported_screen_heights[4] = { 262, 312, 328, 342 }; @@ -123,7 +122,7 @@ /* Right controller port */ m_joy2->joy_w( data & 0x0f ); -// switch( ioport("CONTROLLERS")->read() % CATEGORY_SELECT ) +// switch( ioport("CONTROLLERS")->read() % 16 ) // { // case 0x0a: /* KidVid voice module */ // m_cassette->change_state(( data & 0x02 ) ? CASSETTE_MOTOR_DISABLED : (CASSETTE_MOTOR_ENABLED | CASSETTE_PLAY), CASSETTE_MOTOR_DISABLED ); @@ -353,94 +352,7 @@ m_maincpu->space(AS_PROGRAM).install_write_handler(0x1000, 0x1fff, write8m_delegate(*m_cart, FUNC(vcs_cart_slot_device::write_bank))); break; } - - // Banks may have changed, reset the cpu so it uses the correct reset vector - m_maincpu->reset(); -} - - -#ifdef UNUSED_FUNCTIONS -// try to detect 2600 controller setup. returns 32bits with left/right controller info -unsigned a2600_state::long detect_2600controllers() -{ - enum - { - JOYS = 0x001, - PADD = 0x002, - KEYP = 0x004, - LGUN = 0x008, - INDY = 0x010, - BOOS = 0x020, - KVID = 0x040, - CMTE = 0x080, - MLNK = 0x100, - AMSE = 0x200, - CX22 = 0x400, - CX80 = 0x800 - }; - - unsigned int left,right; - int i,j,foundkeypad = 0; - uint8_t *cart; - static const unsigned char signatures[][5] = { - { 0x55, 0xa5, 0x3c, 0x29, 0}, // star raiders - { 0xf9, 0xff, 0xa5, 0x80, 1}, // sentinel - { 0x81, 0x02, 0xe8, 0x86, 1}, // shooting arcade - { 0x02, 0xa9, 0xec, 0x8d, 1}, // guntest4 tester - { 0x85, 0x2c, 0x85, 0xa7, 2}, // INDY 500 - { 0xa1, 0x8d, 0x9d, 0x02, 2}, // omega race INDY - { 0x65, 0x72, 0x44, 0x43, 2}, // Sprintmaster INDY - { 0x89, 0x8a, 0x99, 0xaa, 3}, // omega race - { 0x9a, 0x8e, 0x81, 0x02, 4}, - { 0xdd, 0x8d, 0x80, 0x02, 4}, - { 0x85, 0x8e, 0x81, 0x02, 4}, - { 0x8d, 0x81, 0x02, 0xe6, 4}, - { 0xff, 0x8d, 0x81, 0x02, 4}, - { 0xa9, 0x03, 0x8d, 0x81, 5}, - { 0xa9, 0x73, 0x8d, 0x80, 6}, - // { 0x82, 0x02, 0x85, 0x8f, 7}, // Mind Maze (really Mind Link??) - { 0xa9, 0x30, 0x8d, 0x80, 7}, // Bionic Breakthrough - { 0x02, 0x8e, 0x81, 0x02, 7}, // Telepathy - { 0x41, 0x6d, 0x69, 0x67, 9}, // Missile Command Amiga Mouse - { 0x43, 0x58, 0x2d, 0x32, 10}, // Missile Command CX22 TrackBall - { 0x43, 0x58, 0x2d, 0x38, 11}, // Missile Command CX80 TrackBall - { 0x4e, 0xa8, 0xa4, 0xa2, 12}, // Omega Race for Joystick ONLY - { 0xa6, 0xef, 0xb5, 0x38, 8} // Warlords.. paddles ONLY - }; - // start with this.. if anyone finds a game that does NOT work with both controllers enabled - // it can be fixed here with a new signature (note that the Coleco Gemini has this setup also) - left = JOYS+PADD; right = JOYS+PADD; - // default for bad dumps and roms too large to have special controllers - if ((m_cart_size > 0x4000) || (m_cart_size & 0x7ff)) return (left << 16) + right; - - cart = CART; - for (i = 0; i < m_cart_size - (sizeof signatures/sizeof signatures[0]); i++) - { - for (j = 0; j < (sizeof signatures/sizeof signatures[0]); j++) - { - if (!memcmp(&cart[i], &signatures[j],sizeof signatures[0] - 1)) - { - int k = signatures[j][4]; - if (k == 0) return (JOYS << 16) + KEYP; - if (k == 1) return (LGUN << 16); - if (k == 2) return (INDY << 16) + INDY; - if (k == 3) return (BOOS << 16) + BOOS; - if (k == 5) return (JOYS << 16) + KVID; - if (k == 6) return (CMTE << 16) + CMTE; - if (k == 7) return (MLNK << 16) + MLNK; - if (k == 8) return (PADD << 16) + PADD; - if (k == 9) return (AMSE << 16) + AMSE; - if (k == 10) return (CX22 << 16) + CX22; - if (k == 11) return (CX80 << 16) + CX80; - if (k == 12) return (JOYS << 16) + JOYS; - if (k == 4) foundkeypad = 1; - } - } - } - if (foundkeypad) return (KEYP << 16) + KEYP; - return (left << 16) + right; } -#endif static INPUT_PORTS_START( a2600 ) @@ -464,31 +376,31 @@ static void a2600_cart(device_slot_interface &device) { - device.option_add_internal("a26_2k", A26_ROM_2K); - device.option_add_internal("a26_4k", A26_ROM_4K); - device.option_add_internal("a26_f4", A26_ROM_F4); - device.option_add_internal("a26_f6", A26_ROM_F6); - device.option_add_internal("a26_f8", A26_ROM_F8); - device.option_add_internal("a26_f8sw", A26_ROM_F8_SW); - device.option_add_internal("a26_fa", A26_ROM_FA); - device.option_add_internal("a26_fe", A26_ROM_FE); - device.option_add_internal("a26_3e", A26_ROM_3E); - device.option_add_internal("a26_3f", A26_ROM_3F); - device.option_add_internal("a26_e0", A26_ROM_E0); - device.option_add_internal("a26_e7", A26_ROM_E7); - device.option_add_internal("a26_ua", A26_ROM_UA); - device.option_add_internal("a26_cv", A26_ROM_CV); - device.option_add_internal("a26_dc", A26_ROM_DC); - device.option_add_internal("a26_fv", A26_ROM_FV); - device.option_add_internal("a26_jvp", A26_ROM_JVP); - device.option_add_internal("a26_cm", A26_ROM_COMPUMATE); - device.option_add_internal("a26_ss", A26_ROM_SUPERCHARGER); - device.option_add_internal("a26_dpc", A26_ROM_DPC); - device.option_add_internal("a26_4in1", A26_ROM_4IN1); - device.option_add_internal("a26_8in1", A26_ROM_8IN1); - device.option_add_internal("a26_32in1", A26_ROM_32IN1); - device.option_add_internal("a26_x07", A26_ROM_X07); - device.option_add_internal("a26_harmony", A26_ROM_HARMONY); + device.option_add("a26_2k", A26_ROM_2K); + device.option_add("a26_4k", A26_ROM_4K); + device.option_add("a26_f4", A26_ROM_F4); + device.option_add("a26_f6", A26_ROM_F6); + device.option_add("a26_f8", A26_ROM_F8); + device.option_add("a26_f8sw", A26_ROM_F8_SW); + device.option_add("a26_fa", A26_ROM_FA); + device.option_add("a26_fe", A26_ROM_FE); + device.option_add("a26_3e", A26_ROM_3E); + device.option_add("a26_3f", A26_ROM_3F); + device.option_add("a26_e0", A26_ROM_E0); + device.option_add("a26_e7", A26_ROM_E7); + device.option_add("a26_ua", A26_ROM_UA); + device.option_add("a26_cv", A26_ROM_CV); + device.option_add("a26_dc", A26_ROM_DC); + device.option_add("a26_fv", A26_ROM_FV); + device.option_add("a26_jvp", A26_ROM_JVP); + device.option_add("a26_cm", A26_ROM_COMPUMATE); + device.option_add("a26_ss", A26_ROM_SUPERCHARGER); + device.option_add("a26_dpc", A26_ROM_DPC); + device.option_add("a26_4in1", A26_ROM_4IN1); + device.option_add("a26_8in1", A26_ROM_8IN1); + device.option_add("a26_32in1", A26_ROM_32IN1); + device.option_add("a26_x07", A26_ROM_X07); + device.option_add("a26_harmony", A26_ROM_HARMONY); } void a2600_state::a2600_cartslot(machine_config &config) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/actfancr.cpp mame-0.231+dfsg.1/src/mame/drivers/actfancr.cpp --- mame-0.230+dfsg.1/src/mame/drivers/actfancr.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/actfancr.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -21,9 +21,9 @@ #include "includes/actfancr.h" #include "cpu/m6502/m6502.h" -#include "sound/3812intf.h" #include "sound/okim6295.h" #include "sound/ym2203.h" +#include "sound/ym3812.h" #include "emupal.h" #include "screen.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/aerofgt.cpp mame-0.231+dfsg.1/src/mame/drivers/aerofgt.cpp --- mame-0.230+dfsg.1/src/mame/drivers/aerofgt.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/aerofgt.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -67,9 +67,9 @@ #include "cpu/z80/z80.h" #include "machine/mb3773.h" #include "machine/vs9209.h" -#include "sound/3812intf.h" #include "sound/ym2151.h" #include "sound/ym2610.h" +#include "sound/ym3812.h" #include "video/vsystem_gga.h" #include "screen.h" #include "speaker.h" @@ -525,8 +525,8 @@ void aerofgt_state::karatblzbl_sound_portmap(address_map &map) { map.global_mask(0xff); - map(0x00, 0x00).rw("ymsnd", FUNC(ym3812_device::status_port_r), FUNC(ym3812_device::control_port_w)); - map(0x20, 0x20).w("ymsnd", FUNC(ym3812_device::write_port_w)); + map(0x00, 0x00).rw("ymsnd", FUNC(ym3812_device::status_r), FUNC(ym3812_device::address_w)); + map(0x20, 0x20).w("ymsnd", FUNC(ym3812_device::data_w)); map(0x40, 0x40).w(FUNC(aerofgt_state::karatblzbl_d7759_write_port_0_w)); map(0x80, 0x80).w(FUNC(aerofgt_state::karatblzbl_d7759_reset_w)); } @@ -541,8 +541,8 @@ void aerofgt_state::kickball_sound_portmap(address_map &map) { map.global_mask(0xff); - map(0x00, 0x00).rw("ymsnd", FUNC(ym3812_device::status_port_r), FUNC(ym3812_device::control_port_w)); - map(0x20, 0x20).w("ymsnd", FUNC(ym3812_device::write_port_w)); + map(0x00, 0x00).rw("ymsnd", FUNC(ym3812_device::status_r), FUNC(ym3812_device::address_w)); + map(0x20, 0x20).w("ymsnd", FUNC(ym3812_device::data_w)); map(0x40, 0x40).rw(m_oki, FUNC(okim6295_device::read), FUNC(okim6295_device::write)); map(0xc0, 0xc0).w(m_soundlatch, FUNC(generic_latch_8_device::acknowledge_w)); } diff -Nru mame-0.230+dfsg.1/src/mame/drivers/alpha68k_i.cpp mame-0.231+dfsg.1/src/mame/drivers/alpha68k_i.cpp --- mame-0.230+dfsg.1/src/mame/drivers/alpha68k_i.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/alpha68k_i.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -152,8 +152,8 @@ { map(0x0000, 0x9fff).rom(); map(0xe000, 0xe000).rw(m_soundlatch, FUNC(generic_latch_8_device::read), FUNC(generic_latch_8_device::clear_w)); - map(0xe800, 0xe800).rw("ymsnd", FUNC(ym3812_device::status_port_r), FUNC(ym3812_device::control_port_w)); - map(0xec00, 0xec00).w("ymsnd", FUNC(ym3812_device::write_port_w)); + map(0xe800, 0xe800).rw("ymsnd", FUNC(ym3812_device::status_r), FUNC(ym3812_device::address_w)); + map(0xec00, 0xec00).w("ymsnd", FUNC(ym3812_device::data_w)); map(0xf000, 0xf7ff).ram(); map(0xfc00, 0xfc00).ram(); // unknown port } @@ -168,8 +168,8 @@ void thenextspace_state::sound_iomap(address_map &map) { map.global_mask(0xff); - map(0x00, 0x00).rw("ymsnd", FUNC(ym3812_device::status_port_r), FUNC(ym3812_device::control_port_w)); - map(0x20, 0x20).w("ymsnd", FUNC(ym3812_device::write_port_w)); + map(0x00, 0x00).rw("ymsnd", FUNC(ym3812_device::status_r), FUNC(ym3812_device::address_w)); + map(0x20, 0x20).w("ymsnd", FUNC(ym3812_device::data_w)); map(0x3b, 0x3b).nopr(); // unknown read port map(0x3d, 0x3d).nopr(); // unknown read port map(0x7b, 0x7b).nopr(); // unknown read port diff -Nru mame-0.230+dfsg.1/src/mame/drivers/alphasma.cpp mame-0.231+dfsg.1/src/mame/drivers/alphasma.cpp --- mame-0.230+dfsg.1/src/mame/drivers/alphasma.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/alphasma.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -9,8 +9,6 @@ TODO: - ADB and PS/2 - charset ROM is wrong - - asma2k keyboard doesn't work - - asma2k accesses memory below 0x8000; is there more ROM there? - asma2k reads from nonexistent internal register at 0x0001 (probably a bug, since the same code exists in both BIOSes) @@ -82,11 +80,15 @@ asma2k_state(const machine_config &mconfig, device_type type, const char *tag) : alphasmart_state(mconfig, type, tag) , m_io_view(*this, "io") + , m_dictbank(*this, "dictbank") { } void asma2k(machine_config &config); +protected: + virtual void machine_start() override; + private: void lcd_ctrl_w(uint8_t data); virtual void port_a_w(uint8_t data) override; @@ -94,6 +96,7 @@ void asma2k_mem(address_map &map); memory_view m_io_view; + required_memory_bank m_dictbank; uint8_t m_lcd_ctrl; }; @@ -188,6 +191,7 @@ { uint8_t changed = (m_lcd_ctrl ^ data) & data; update_lcdc(changed & 0x01, changed & 0x02); + m_dictbank->set_entry((m_port_a & 0x30) >> 3 | (data & 0x80) >> 7); m_lcd_ctrl = data; } @@ -196,6 +200,7 @@ m_io_view.select(BIT(data, 6)); m_rambank->set_entry(((data>>4) & 0x03)); + m_dictbank->set_entry((data & 0x30) >> 3 | (m_lcd_ctrl & 0x80) >> 7); m_port_a = data; } @@ -206,8 +211,7 @@ map(0x0000, 0x7fff).view(m_io_view); m_io_view[0](0x2000, 0x2000).rw(FUNC(asma2k_state::kb_r), FUNC(asma2k_state::kb_matrixh_w)); m_io_view[0](0x4000, 0x4000).w(FUNC(asma2k_state::lcd_ctrl_w)); - m_io_view[0](0x7fd4, 0x7fd7).lr8(NAME([]() { return 0; })); // ? - m_io_view[0](0x7fe8, 0x7feb).lr8(NAME([]() { return 0; })); // ? + m_io_view[0](0x4000, 0x7fff).bankr("dictbank"); m_io_view[1](0x0000, 0x7fff).bankrw("rambank"); map(0x8000, 0xffff).rom().region("maincpu", 0); map(0x9000, 0x9000).w(FUNC(asma2k_state::kb_matrixl_w)); @@ -216,7 +220,7 @@ /* Input ports */ static INPUT_PORTS_START( alphasmart ) PORT_START("COL.0") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F8) PORT_CHAR(UCHAR_MAMEKEY(F1)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F8) PORT_CHAR(UCHAR_MAMEKEY(F8)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED) PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F7) PORT_CHAR(UCHAR_MAMEKEY(F7)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED) @@ -366,6 +370,158 @@ PORT_CONFSETTING (0x01, DEF_STR(Normal)) INPUT_PORTS_END +static INPUT_PORTS_START( asma2k ) + PORT_START("COL.0") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') PORT_CHAR('}') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F6) PORT_CHAR(UCHAR_MAMEKEY(F6)) PORT_NAME("F6 (File 6)") PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('k') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') PORT_CHAR('_') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('*') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_START("COL.1") + 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_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LALT) PORT_NAME("Left Alt/Option") PORT_CHAR(UCHAR_MAMEKEY(LALT)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_RCONTROL) PORT_NAME("Right Alt/Option") PORT_CHAR(UCHAR_MAMEKEY(RALT)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_START("COL.2") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F7) PORT_CHAR(UCHAR_MAMEKEY(F7)) PORT_NAME("F7 (File 7)") PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F8) PORT_CHAR(UCHAR_MAMEKEY(F8)) PORT_NAME("F8 (File 8)") PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR('(') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_START("COL.3") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[') PORT_CHAR('{') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('\'') PORT_CHAR('\"') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR(':') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('_') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR(')') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_START("COL.4") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LWIN) PORT_CODE(KEYCODE_PGUP) PORT_NAME("Command") PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_HOME) PORT_CHAR(UCHAR_MAMEKEY(HOME)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_DEL) PORT_CHAR(UCHAR_MAMEKEY(NUMLOCK)) PORT_NAME("Clear File") PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_RALT) PORT_CHAR(UCHAR_MAMEKEY(ESC)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_START("COL.5") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_END) PORT_CHAR(UCHAR_MAMEKEY(END)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_START("COL.6") + 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_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("Enter") PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_START("COL.7") + 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_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F11) PORT_CHAR(UCHAR_MAMEKEY(F11)) PORT_NAME("Find") PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_START("COL.8") + 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_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_START("COL.9") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSPACE) PORT_NAME("Delete") PORT_CHAR(UCHAR_MAMEKEY(BACKSPACE)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F5) PORT_CHAR(UCHAR_MAMEKEY(F5)) PORT_NAME("F5 (File 5)") PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\') PORT_CHAR('|') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F9) PORT_CHAR(UCHAR_MAMEKEY(F9)) PORT_NAME("Print") PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F10) PORT_CHAR(UCHAR_MAMEKEY(F10)) PORT_NAME("Spell Check") PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER) PORT_NAME("Return") PORT_CHAR(13) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_START("COL.10") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3)) PORT_NAME("F3 (File 3)") PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F4)) PORT_NAME("F4 (File 4)") PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2)) PORT_NAME("F2 (File 2)") PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_START("COL.11") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_CAPSLOCK) PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1)) PORT_NAME("F1 (File 1)") PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('@') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_START("COL.12") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_TAB) PORT_CHAR('\t') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_TILDE) PORT_CHAR('`') PORT_CHAR('~') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('z') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_MAMEKEY(LCONTROL)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_START("COL.13") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_START("COL.14") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + 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_UNUSED) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_MAMEKEY(RSHIFT)) PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) + PORT_START("COL.15") + PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('^') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('&') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N') PORT_CHANGED_MEMBER(DEVICE_SELF, alphasmart_state, kb_irq, 0) + + PORT_START("BATTERY") + PORT_CONFNAME(0x01, 0x01, "Battery status") + PORT_CONFSETTING (0x00, DEF_STR(Low)) + PORT_CONFSETTING (0x01, DEF_STR(Normal)) +INPUT_PORTS_END + void alphasmart_state::alphasmart_palette(palette_device &palette) const { palette.set_pen_color(0, rgb_t(138, 146, 148)); @@ -391,6 +547,14 @@ m_tmp_bitmap = std::make_unique(6 * 40, 9 * 4); } +void asma2k_state::machine_start() +{ + alphasmart_state::machine_start(); + + m_dictbank->configure_entries(0, 8, memregion("spellcheck")->base(), 0x4000); + m_dictbank->set_entry(0); +} + void alphasmart_state::machine_reset() { m_rambank->set_entry(0); @@ -402,7 +566,7 @@ void alphasmart_state::alphasmart(machine_config &config) { /* basic machine hardware */ - MC68HC11D0(config, m_maincpu, XTAL(8'000'000)); // XTAL is 8 Mhz + MC68HC11D0(config, m_maincpu, 8_MHz_XTAL); m_maincpu->set_addrmap(AS_PROGRAM, &alphasmart_state::alphasmart_mem); m_maincpu->in_pa_callback().set(FUNC(alphasmart_state::port_a_r)); m_maincpu->out_pa_callback().set(FUNC(alphasmart_state::port_a_w)); @@ -436,12 +600,20 @@ m_maincpu->set_addrmap(AS_PROGRAM, &asma2k_state::asma2k_mem); } -/* ROM definition */ +// MCU: MC68HC11D0P +// NVRAM: KM681000ALP-7L (or TC551001BPL-85L) + CR2032 battery +// XTAL: 8.000MHz +// LCD: 2x KS0066F05 + 8x HD44100H ROM_START( asmapro ) ROM_REGION( 0x8000, "maincpu", 0 ) ROM_LOAD( "alphasmartpro212.rom", 0x0000, 0x8000, CRC(896ddf1c) SHA1(c3c6a421c9ced92db97431d04b4a3f09a39de716) ) // Checksum 8D24 on label ROM_END +// MCU: MC68HC11D0FN +// NVRAM: NEC D431000ACW-70LL + battery +// XTAL: SB8.000 +// LCD: 2x KS0066F05 + 4x KS0063B +// Optional IrDA sub board ROM_START( asma2k ) ROM_REGION( 0x10000, "maincpu", 0 ) /* @@ -454,11 +626,11 @@ ROM_SYSTEM_BIOS( 1, "v308", "v3.08" ) ROMX_LOAD( "alphasmart__2000__v3.0.8.zpsd211r.plcc44.bin", 0x0000, 0x81e5, CRC(0b3b1a0c) SHA1(97878819188a1ec40052fbce9d5a5059728d5aec), ROM_BIOS(1) ) - ROM_REGION( 0x8000, "spellcheck", 0 ) - ROM_LOAD( "spellcheck.bin", 0x0000, 0x8000, NO_DUMP ) + ROM_REGION( 0x20000, "spellcheck", 0 ) + ROM_LOAD( "dictrom__v1.stm_m27c1001-1501.plcc32.bin", 0x00000, 0x20000, CRC(a143949c) SHA1(033094bb850c614008b4ecc2eefbcb01b8a2bcda) ) ROM_END // YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS COMP( 1995, asmapro, 0, 0, alphasmart, alphasmart, alphasmart_state, empty_init, "Intelligent Peripheral Devices", "AlphaSmart Pro" , MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) -COMP( 1997, asma2k, 0, 0, asma2k, alphasmart, asma2k_state, empty_init, "Intelligent Peripheral Devices", "AlphaSmart 2000", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) +COMP( 1997, asma2k, 0, 0, asma2k, asma2k, asma2k_state, empty_init, "Intelligent Peripheral Devices", "AlphaSmart 2000", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/amaticmg.cpp mame-0.231+dfsg.1/src/mame/drivers/amaticmg.cpp --- mame-0.230+dfsg.1/src/mame/drivers/amaticmg.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/amaticmg.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -414,7 +414,7 @@ #include "cpu/z80/z80.h" #include "machine/i8255.h" #include "machine/ds1994.h" -#include "sound/3812intf.h" +#include "sound/ym3812.h" #include "video/mc6845.h" //#include "sound/dac.h" #include "emupal.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/amstrad.cpp mame-0.231+dfsg.1/src/mame/drivers/amstrad.cpp --- mame-0.230+dfsg.1/src/mame/drivers/amstrad.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/amstrad.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -1005,8 +1005,8 @@ { amstrad_base(config); UPD765A(config, m_fdc, 16_MHz_XTAL / 4, true, true); - FLOPPY_CONNECTOR(config, "upd765:0", amstrad_floppies, "3ssdd", floppy_image_device::default_mfm_floppy_formats); - FLOPPY_CONNECTOR(config, "upd765:1", amstrad_floppies, "35ssdd", floppy_image_device::default_mfm_floppy_formats); + FLOPPY_CONNECTOR(config, "upd765:0", amstrad_floppies, "3ssdd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, "upd765:1", amstrad_floppies, "35ssdd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); SOFTWARE_LIST(config, "flop_list").set_original("cpc_flop"); cpc_expansion_slot_device &exp(CPC_EXPANSION_SLOT(config, "exp", 16_MHz_XTAL / 4, cpc_exp_cards, nullptr)); @@ -1024,8 +1024,8 @@ { amstrad_base(config); UPD765A(config, m_fdc, 16_MHz_XTAL / 4, true, true); - FLOPPY_CONNECTOR(config, "upd765:0", amstrad_floppies, "3ssdd", floppy_image_device::default_mfm_floppy_formats); - FLOPPY_CONNECTOR(config, "upd765:1", amstrad_floppies, "35ssdd", floppy_image_device::default_mfm_floppy_formats); + FLOPPY_CONNECTOR(config, "upd765:0", amstrad_floppies, "3ssdd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, "upd765:1", amstrad_floppies, "35ssdd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); SOFTWARE_LIST(config, "flop_list").set_original("cpc_flop"); cpc_expansion_slot_device &exp(CPC_EXPANSION_SLOT(config, "exp", 16_MHz_XTAL / 4, cpc_exp_cards, nullptr)); @@ -1111,8 +1111,8 @@ cpcplus_cartslot(config); - FLOPPY_CONNECTOR(config, "upd765:0", amstrad_floppies, "3ssdd", floppy_image_device::default_mfm_floppy_formats); - FLOPPY_CONNECTOR(config, "upd765:1", amstrad_floppies, "35ssdd", floppy_image_device::default_mfm_floppy_formats); + FLOPPY_CONNECTOR(config, "upd765:0", amstrad_floppies, "3ssdd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, "upd765:1", amstrad_floppies, "35ssdd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); SOFTWARE_LIST(config, "flop_list").set_original("cpc_flop"); cpc_expansion_slot_device &exp(CPC_EXPANSION_SLOT(config, "exp", 40_MHz_XTAL / 10, cpcplus_exp_cards, nullptr)); @@ -1201,8 +1201,8 @@ exp.romdis_callback().set(FUNC(amstrad_state::cpc_romdis)); // ROMDIS exp.rom_select_callback().set(FUNC(amstrad_state::rom_select)); - FLOPPY_CONNECTOR(config, "upd765:0", aleste_floppies, "35dd", amstrad_state::aleste_floppy_formats); - FLOPPY_CONNECTOR(config, "upd765:1", aleste_floppies, "35dd", amstrad_state::aleste_floppy_formats); + FLOPPY_CONNECTOR(config, "upd765:0", aleste_floppies, "35dd", amstrad_state::aleste_floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, "upd765:1", aleste_floppies, "35dd", amstrad_state::aleste_floppy_formats).enable_sound(true); SOFTWARE_LIST(config.replace(), "flop_list").set_original("aleste"); SOFTWARE_LIST(config, "cpc_list").set_compatible("cpc_flop"); diff -Nru mame-0.230+dfsg.1/src/mame/drivers/apple2.cpp mame-0.231+dfsg.1/src/mame/drivers/apple2.cpp --- mame-0.230+dfsg.1/src/mame/drivers/apple2.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/apple2.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -85,7 +85,7 @@ #include "bus/a2bus/computereyes2.h" #include "bus/a2bus/ccs7710.h" #include "bus/a2bus/ezcgi.h" -#include "bus/a2bus/grapplerplus.h" +#include "bus/a2bus/grappler.h" #include "bus/a2bus/laser128.h" #include "bus/a2bus/mouse.h" #include "bus/a2bus/ramcard128k.h" @@ -1314,7 +1314,10 @@ device.option_add("aevm80", A2BUS_AEVIEWMASTER80); /* Applied Engineering ViewMaster 80 */ device.option_add("parprn", A2BUS_PARPRN); /* Apple II Parallel Printer Interface Card */ device.option_add("parallel", A2BUS_PIC); /* Apple II Parallel Interface Card */ - device.option_add("grapplerplus", A2BUS_GRAPPLERPLUS); /* Orange Micro Grappler+ Printer Interface card */ + device.option_add("grappler", A2BUS_GRAPPLER); /* Orange Micro Grappler Printer Interface card */ + device.option_add("grapplus", A2BUS_GRAPPLERPLUS); /* Orange Micro Grappler+ Printer Interface card */ + device.option_add("bufgrapplus", A2BUS_BUFGRAPPLERPLUS); /* Orange Micro Buffered Grappler+ Printer Interface card */ + device.option_add("bufgrapplusa", A2BUS_BUFGRAPPLERPLUSA); /* Orange Micro Buffered Grappler+ (rev A) Printer Interface card */ device.option_add("corvus", A2BUS_CORVUS); /* Corvus flat-cable HDD interface (see notes in a2corvus.c) */ device.option_add("mcms1", A2BUS_MCMS1); /* Mountain Computer Music System, card 1 of 2 */ device.option_add("mcms2", A2BUS_MCMS2); /* Mountain Computer Music System, card 2 of 2. must be in card 1's slot + 1! */ @@ -1509,6 +1512,19 @@ ROM_LOAD ( "341-0020-00.f8", 0x3800, 0x0800, CRC(079589c4) SHA1(a28852ff997b4790e53d8d0352112c4b1a395098)) /* 341-0020-00: Autostart Monitor/Applesoft Basic $f800; Was sometimes mounted on Language card; Label(from Apple Language Card - Front.jpg): S 8115 // C68018 // 341-0020-00 */ ROM_END +ROM_START(ace1000) + ROM_REGION(0x1000,"gfx1",0) + ROM_LOAD ( "1331409.u7", 0x0000, 0x1000, CRC(744c06e1) SHA1(e1c11495ee538f658d2918bfece8c4629f60fa13)) + + ROM_REGION(0x4000, "maincpu", ROMREGION_LE) + ROM_LOAD ( "1331401.g2", 0x3800, 0x0800, CRC(047d6fed) SHA1(83d225dc3f1a7bd6901cc24cd02287402022469f)) + ROM_LOAD ( "1331402.g3", 0x3000, 0x0800, CRC(9a04eecf) SHA1(e6bf91ed28464f42b807f798fc6422e5948bf581)) + ROM_LOAD ( "1331403.g5", 0x2800, 0x0800, CRC(5719871a) SHA1(37501be96d36d041667c15d63e0c1eff2f7dd4e9)) + ROM_LOAD ( "1331404.g7", 0x2000, 0x0800, CRC(1bee5169) SHA1(0cd57b4a2a79e0fc7f35619edc1be00952947b82)) + ROM_LOAD ( "1331405.g8", 0x1800, 0x0800, CRC(2a63f50a) SHA1(7cf424e7adbc84a4aa6f11d0132bf494bbb6a247)) + ROM_LOAD ( "1331406.g10", 0x1000, 0x0800, CRC(bfdd3cc6) SHA1(20067d27eb3b5bb03e7b560e44383e0926e39cbb)) +ROM_END + ROM_START(elppa) ROM_REGION(0x0800,"gfx1",0) ROM_LOAD ( "elppa.chr", 0x0000, 0x0800, BAD_DUMP CRC(64f415c6) SHA1(f9d312f128c9557d9d6ac03bfad6c3ddf83e5659)) // Taken from 341-0036.chr used in apple2p @@ -1806,6 +1822,7 @@ COMP( 1982, maxxi, apple2, 0, apple2p, apple2p, apple2_state, empty_init, "Polymax", "Maxxi", MACHINE_SUPPORTS_SAVE ) COMP( 1982, prav82, apple2, 0, apple2p, apple2p, apple2_state, empty_init, "Pravetz", "Pravetz 82", MACHINE_SUPPORTS_SAVE ) COMP( 1982, ace100, apple2, 0, apple2, apple2p, apple2_state, empty_init, "Franklin Computer", "Franklin Ace 100", MACHINE_SUPPORTS_SAVE ) +COMP( 1982, ace1000, apple2, 0, apple2p, apple2p, apple2_state, empty_init, "Franklin Computer", "Franklin ACE 1000", MACHINE_SUPPORTS_SAVE ) COMP( 1982, uniap2en, apple2, 0, apple2p, apple2p, apple2_state, empty_init, "Unitron Eletronica", "Unitron AP II (in English)", MACHINE_SUPPORTS_SAVE ) COMP( 1982, uniap2pt, apple2, 0, apple2p, apple2p, apple2_state, empty_init, "Unitron Eletronica", "Unitron AP II (in Brazilian Portuguese)", MACHINE_SUPPORTS_SAVE ) COMP( 1984, uniap2ti, apple2, 0, apple2p, apple2p, apple2_state, empty_init, "Unitron Eletronica", "Unitron AP II+ (Teclado Inteligente)", MACHINE_SUPPORTS_SAVE ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/apple2e.cpp mame-0.231+dfsg.1/src/mame/drivers/apple2e.cpp --- mame-0.230+dfsg.1/src/mame/drivers/apple2e.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/apple2e.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -173,7 +173,7 @@ #include "bus/a2bus/computereyes2.h" #include "bus/a2bus/ccs7710.h" #include "bus/a2bus/ezcgi.h" -#include "bus/a2bus/grapplerplus.h" +#include "bus/a2bus/grappler.h" #include "bus/a2bus/laser128.h" #include "bus/a2bus/mouse.h" #include "bus/a2bus/pc_xporter.h" @@ -1291,6 +1291,17 @@ if ((m_kbspecial->read() & 0x88) == 0x88) { m_maincpu->reset(); + + // reset intcxrom to default + if (m_isiic) + { + m_intcxrom = true; + } + else + { + m_intcxrom = false; + } + update_slotrom_banks(); } } } @@ -4654,7 +4665,10 @@ device.option_add("aevm80", A2BUS_AEVIEWMASTER80); /* Applied Engineering ViewMaster 80 */ device.option_add("parprn", A2BUS_PARPRN); /* Apple II Parallel Printer Interface Card */ device.option_add("parallel", A2BUS_PIC); /* Apple II Parallel Interface Card */ - device.option_add("grapplerplus", A2BUS_GRAPPLERPLUS); /* Orange Micro Grappler+ Printer Interface card */ + device.option_add("grappler", A2BUS_GRAPPLER); /* Orange Micro Grappler Printer Interface card */ + device.option_add("grapplus", A2BUS_GRAPPLERPLUS); /* Orange Micro Grappler+ Printer Interface card */ + device.option_add("bufgrapplus", A2BUS_BUFGRAPPLERPLUS); /* Orange Micro Buffered Grappler+ Printer Interface card */ + device.option_add("bufgrapplusa", A2BUS_BUFGRAPPLERPLUSA); /* Orange Micro Buffered Grappler+ (rev A) Printer Interface card */ device.option_add("corvus", A2BUS_CORVUS); /* Corvus flat-cable HDD interface (see notes in a2corvus.c) */ device.option_add("mcms1", A2BUS_MCMS1); /* Mountain Computer Music System, card 1 of 2 */ device.option_add("mcms2", A2BUS_MCMS2); /* Mountain Computer Music System, card 2 of 2. must be in card 1's slot + 1! */ diff -Nru mame-0.230+dfsg.1/src/mame/drivers/apple2gs.cpp mame-0.231+dfsg.1/src/mame/drivers/apple2gs.cpp --- mame-0.230+dfsg.1/src/mame/drivers/apple2gs.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/apple2gs.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -113,7 +113,7 @@ #include "bus/a2bus/ccs7710.h" #include "bus/a2bus/cmsscsi.h" #include "bus/a2bus/ezcgi.h" -#include "bus/a2bus/grapplerplus.h" +#include "bus/a2bus/grappler.h" //#include "bus/a2bus/hostram.h" #include "bus/a2bus/laser128.h" #include "bus/a2bus/mouse.h" @@ -836,7 +836,7 @@ trans |= (special & 0x01) ? 0x0000 : 0x0200; // caps lock is bit 9 (active low) // hack in keypad equals because we can't find it in the IIe keymap (Sather doesn't show it in the matrix, but it's clearly on real platinum IIes) - if (m_lastchar == 0x146) + if (m_lastchar == 0x106) { m_transchar = '='; } @@ -2180,31 +2180,12 @@ } } -// apple2gs_get_vpos - return the correct vertical counter value for the current scanline, -// keeping borders in mind. - +// apple2gs_get_vpos - return the correct vertical counter value for the current scanline. int apple2gs_state::get_vpos() { - int result, scan; - static const u8 top_border_vert[BORDER_TOP] = - { - 0xfa, 0xfa, 0xfa, 0xfa, 0xfb, 0xfb, 0xfb, 0xfb, - 0xfc, 0xfc, 0xfc, 0xfd, 0xfd, 0xfe, 0xfe, 0xff, - - }; - - scan = m_screen->vpos(); - - if (scan < BORDER_TOP) - { - result = top_border_vert[scan]; - } - else - { - result = scan - BORDER_TOP + 0x100 + 1; - } - - return result; + // as per IIgs Tech Note #39, this is simply scanline + 250 on NTSC (262 lines), + // or scanline + 200 on PAL (312 lines) + return ((m_screen->vpos() + BORDER_TOP) % 262) + 250; } void apple2gs_state::process_clock() @@ -2457,7 +2438,7 @@ { ret |= 0x10; } - else if ((m_lastchar >= 0x109 && m_lastchar <= 0x10a) || (m_lastchar == 0x146)) + else if ((m_lastchar >= 0x109 && m_lastchar <= 0x10a) || (m_lastchar == 0x106)) { ret |= 0x10; } @@ -4763,7 +4744,10 @@ device.option_add("aevm80", A2BUS_AEVIEWMASTER80); /* Applied Engineering ViewMaster 80 */ device.option_add("parprn", A2BUS_PARPRN); /* Apple II Parallel Printer Interface Card */ device.option_add("parallel", A2BUS_PIC); /* Apple Parallel Interface Card */ - device.option_add("grapplerplus", A2BUS_GRAPPLERPLUS); /* Orange Micro Grappler+ Printer Interface card */ + device.option_add("grappler", A2BUS_GRAPPLER); /* Orange Micro Grappler Printer Interface card */ + device.option_add("grapplus", A2BUS_GRAPPLERPLUS); /* Orange Micro Grappler+ Printer Interface card */ + device.option_add("bufgrapplus", A2BUS_BUFGRAPPLERPLUS); /* Orange Micro Buffered Grappler+ Printer Interface card */ + device.option_add("bufgrapplusa", A2BUS_BUFGRAPPLERPLUSA); /* Orange Micro Buffered Grappler+ (rev A) Printer Interface card */ device.option_add("corvus", A2BUS_CORVUS); /* Corvus flat-cable HDD interface (see notes in a2corvus.c) */ device.option_add("mcms1", A2BUS_MCMS1); /* Mountain Computer Music System, card 1 of 2 */ device.option_add("mcms2", A2BUS_MCMS2); /* Mountain Computer Music System, card 2 of 2. must be in card 1's slot + 1! */ diff -Nru mame-0.230+dfsg.1/src/mame/drivers/applix.cpp mame-0.231+dfsg.1/src/mame/drivers/applix.cpp --- mame-0.230+dfsg.1/src/mame/drivers/applix.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/applix.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -787,6 +787,8 @@ void applix_state::machine_start() { + std::fill(std::begin(m_palette_latch), std::end(m_palette_latch), 0); + save_item(NAME(m_video_latch)); save_item(NAME(m_pa)); save_item(NAME(m_palette_latch)); diff -Nru mame-0.230+dfsg.1/src/mame/drivers/aristmk5.cpp mame-0.231+dfsg.1/src/mame/drivers/aristmk5.cpp --- mame-0.230+dfsg.1/src/mame/drivers/aristmk5.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/aristmk5.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -580,8 +580,11 @@ *****************************************************************************************************************/ #include "emu.h" -#include "includes/archimds.h" +#include "bus/rs232/rs232.h" #include "cpu/arm/arm.h" +#include "machine/acorn_ioc.h" +#include "machine/acorn_memc.h" +#include "machine/acorn_vidc.h" #include "machine/ds1302.h" #include "machine/watchdog.h" #include "machine/eepromser.h" @@ -674,16 +677,19 @@ #define MASTER_CLOCK 72_MHz_XTAL /* confirmed */ -class aristmk5_state : public archimedes_state +class aristmk5_state : public driver_device { public: aristmk5_state(const machine_config &mconfig, device_type type, const char *tag) - : archimedes_state(mconfig, type, tag) + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_ioc(*this, "ioc") + , m_memc(*this, "memc") + , m_vidc(*this, "vidc") , m_hopper(*this, "hopper") , m_eeprom(*this, "eeprom%d", 0) , m_rtc(*this, "rtc") , m_nvram(*this, "nvram") - , m_sram(*this, "sram") , m_p1(*this, "P1") , m_p2(*this, "P2") , m_extra_ports(*this, "EXTRA") @@ -727,28 +733,25 @@ uint8_t spi_int_ack_r(); void spi_int_ack_w(uint8_t data); uint8_t spi_data_r(); - DECLARE_WRITE_LINE_MEMBER(uart_irq_callback); virtual void machine_start() override; virtual void machine_reset() override; - TIMER_CALLBACK_MEMBER(mk5_VSYNC_callback); TIMER_CALLBACK_MEMBER(mk5_2KHz_callback); TIMER_CALLBACK_MEMBER(spi_timer); + void aristmk5_arm_map(address_map &map); void aristmk5_drame_map(address_map &map); void aristmk5_map(address_map &map); void aristmk5_usa_map(address_map &map); + required_device m_maincpu; + required_device m_ioc; + required_device m_memc; + required_device m_vidc; required_device m_hopper; - - uint8_t m_hopper_test; - uint64_t m_coin_start_cycles; - uint8_t m_coin_div; - required_device_array m_eeprom; required_device m_rtc; required_device m_nvram; - required_memory_region m_sram; required_ioport m_p1; required_ioport m_p2; required_ioport m_extra_ports; @@ -756,8 +759,11 @@ output_finder<64> m_lamps; emu_timer * m_mk5_2KHz_timer; - emu_timer * m_mk5_VSYNC_timer; emu_timer * m_spi_timer; + std::unique_ptr m_sram; + uint8_t m_hopper_test; + uint64_t m_coin_start_cycles; + uint8_t m_coin_div; uint8_t m_sram_bank; uint8_t m_ldor_shift_reg; uint8_t m_spi_mux; @@ -828,13 +834,13 @@ uint8_t aristmk5_state::spi_int_ack_r() { - archimedes_clear_irq_b(0x08); + m_ioc->il3_w(CLEAR_LINE); return 0; } void aristmk5_state::spi_int_ack_w(uint8_t data) { - archimedes_clear_irq_b(0x08); + m_ioc->il3_w(CLEAR_LINE); } TIMER_CALLBACK_MEMBER(aristmk5_state::spi_timer) @@ -859,32 +865,18 @@ if (++m_spi_bits == 8) { m_spi_timer->adjust(attotime::never); - archimedes_request_irq_b(0x08); + m_ioc->il3_w(ASSERT_LINE); } } -WRITE_LINE_MEMBER(aristmk5_state::uart_irq_callback) -{ - if (state) - archimedes_request_irq_b(0x20); - else - archimedes_clear_irq_b(0x20); -} - -TIMER_CALLBACK_MEMBER(aristmk5_state::mk5_VSYNC_callback) -{ - archimedes_request_irq_a(0x08); //turn vsync bit on - m_mk5_VSYNC_timer->adjust(attotime::never); -} - uint8_t aristmk5_state::sram_r(offs_t offset) { - return m_sram->base()[(m_sram_bank << 14) | (offset & 0x3fff)]; + return m_sram[(m_sram_bank << 14) | (offset & 0x3fff)]; } void aristmk5_state::sram_w(offs_t offset, uint8_t data) { - m_sram->base()[(m_sram_bank << 14) | (offset & 0x3fff)] = data; + m_sram[(m_sram_bank << 14) | (offset & 0x3fff)] = data; } void aristmk5_state::Ns5w48(uint32_t data) @@ -923,33 +915,18 @@ ROM:03400968 TST R1, #8 ; test vsync */ - - archimedes_clear_irq_a(0x08); - - /* bit 1 bit 0 */ - if((data &~(0x02)) && (data & (0x01))) // external video crystal is enabled. 25 mhz - { - m_mk5_VSYNC_timer->adjust(attotime::from_hz(50000)); // not sure but see above - } - if((data &~(0x02)) && (data &~(0x01))) // video clock is enabled. 24 mhz - { - m_mk5_VSYNC_timer->adjust(attotime::from_hz(50000)); // not sure - } - if((data & (0x02)) && (data &~(0x01))) // video clock is enabled. 36 mhz - { - m_mk5_VSYNC_timer->adjust(attotime::from_hz(50000)); // not sure - } - if((data &(0x02)) && (data &(0x01))) // video clock is enabled. 24 mhz + switch (data & 3) { - m_mk5_VSYNC_timer->adjust(attotime::from_hz(50000)); // not sure + case 0: m_vidc->set_unscaled_clock(MASTER_CLOCK / 3); break; // 24 MHz + case 1: m_vidc->set_unscaled_clock(25_MHz_XTAL); break; // 25 MHz (external video crystal) + case 2: m_vidc->set_unscaled_clock(MASTER_CLOCK / 2); break; // 36 MHz + case 3: m_vidc->set_unscaled_clock(MASTER_CLOCK / 3); break; // 24 MHz } } TIMER_CALLBACK_MEMBER(aristmk5_state::mk5_2KHz_callback) { - archimedes_request_irq_a(0x01); - m_mk5_2KHz_timer->adjust(attotime::never); - + m_ioc->il6_w(ASSERT_LINE); } uint32_t aristmk5_state::Ns5x58() @@ -975,7 +952,7 @@ // reset 2KHz timer m_mk5_2KHz_timer->adjust(attotime::from_hz(MASTER_CLOCK / 9 / 4096)); - archimedes_clear_irq_a(0x01); + m_ioc->il6_w(CLEAR_LINE); return 0xffffffff; } @@ -1126,11 +1103,18 @@ m_lamps[24 + i] = BIT(data, i); } +void aristmk5_state::aristmk5_arm_map(address_map &map) +{ + map(0x00000000, 0x01ffffff).rw(m_memc, FUNC(acorn_memc_device::logical_r), FUNC(acorn_memc_device::logical_w)); + map(0x02000000, 0x03ffffff).rw(m_memc, FUNC(acorn_memc_device::high_mem_r), FUNC(acorn_memc_device::high_mem_w)); +} + void aristmk5_state::aristmk5_map(address_map &map) { + map(0x00000000, 0x01ffffff).rw(m_memc, FUNC(acorn_memc_device::logical_r), FUNC(acorn_memc_device::logical_w)); map(0x02000000, 0x02ffffff).ram().share("physicalram"); /* physical RAM - 16 MB for now, should be 512k for the A310 */ - map(0x03000000, 0x0331ffff).rw(FUNC(aristmk5_state::archimedes_ioc_r), FUNC(aristmk5_state::archimedes_ioc_w)); + map(0x03000000, 0x033fffff).m(m_ioc, FUNC(acorn_ioc_device::map)); /* MK-5 overrides */ map(0x03010420, 0x03010420).w(FUNC(aristmk5_state::sram_banksel_w)); // SRAM bank select write @@ -1144,20 +1128,18 @@ map(0x03010700, 0x03010703).portr("P6"); map(0x03010800, 0x03010800).r(FUNC(aristmk5_state::eeprom_r)); map(0x03010810, 0x03010813).rw("watchdog", FUNC(watchdog_timer_device::reset32_r), FUNC(watchdog_timer_device::reset32_w)); //MK-5 specific, watchdog - map(0x03220000, 0x0323ffff).rw(FUNC(aristmk5_state::sram_r), FUNC(aristmk5_state::sram_w)).umask32(0x000000ff); // bank5 slow map(0x03250048, 0x0325004b).w(FUNC(aristmk5_state::Ns5w48)); //IOEB control register map(0x03250050, 0x03250053).r(FUNC(aristmk5_state::Ns5r50)); //IOEB ID register map(0x03250058, 0x0325005b).r(FUNC(aristmk5_state::Ns5x58)); //IOEB interrupt Latch - map(0x03320000, 0x0333ffff).rw(FUNC(aristmk5_state::sram_r), FUNC(aristmk5_state::sram_w)).umask32(0x000000ff); - map(0x03400000, 0x035fffff).w(m_vidc, FUNC(acorn_vidc10_device::write)); - map(0x03600000, 0x037fffff).w(FUNC(aristmk5_state::archimedes_memc_w)); - map(0x03800000, 0x039fffff).w(FUNC(aristmk5_state::archimedes_memc_page_w)); + map(0x03600000, 0x037fffff).w(m_memc, FUNC(acorn_memc_device::registers_w)); + map(0x03800000, 0x03ffffff).w(m_memc, FUNC(acorn_memc_device::page_w)); - map(0x03400000, 0x03bfffff).rom().region("maincpu", 0); + map(0x03400000, 0x037fffff).rom().region("game_prg", 0); + map(0x03800000, 0x03bfffff).rom().region("game_prg", 0); } /* U.S games have no dram emulator enabled */ @@ -1165,8 +1147,6 @@ { aristmk5_map(map); - map(0x00000000, 0x01ffffff).rw(FUNC(aristmk5_state::archimedes_memc_logical_r), FUNC(aristmk5_state::archimedes_memc_logical_w)); - map(0x03010440, 0x03010440).w(FUNC(aristmk5_state::rtc_usa_w)); map(0x03010450, 0x03010450).w(FUNC(aristmk5_state::eeprom_usa_w)); @@ -1195,7 +1175,18 @@ { aristmk5_map(map); - map(0x00000000, 0x01ffffff).rw(FUNC(aristmk5_state::aristmk5_drame_memc_logical_r), FUNC(aristmk5_state::archimedes_memc_logical_w)); + /******************* DRAM Emulator - gal20v - Aristocrat Mark 5 ************************ + A Dynamic RAM emulator is provided which avoids the need to execute code + in DRAM in those regulatory environments where it is not needed. + + When pin 5 of U36 ( gal20v ) is low, the pin 25 output is high and enables the + logic buffer inputs and provides a fixed jmp address to a plurality + of rom addresses ( 0xEAD0000A shown on logic buffer arrangement in schematics ) + + In this state, DRAM memory space is disabled. + + ****************************************************************************************/ + map(0x02000000, 0x02000fff).lr32([]() { return 0xead0000a; }, "dram_emu_r"); map(0x03010430, 0x03010430).w(FUNC(aristmk5_state::hopper_w)); map(0x03010440, 0x03010440).w(FUNC(aristmk5_state::rtc_w)); @@ -2101,8 +2092,6 @@ void aristmk5_state::init_aristmk5() { - archimedes_driver_init(); - int do_debug = 0; if (do_debug) { @@ -2232,13 +2221,12 @@ void aristmk5_state::machine_start() { - m_nvram->set_base(m_sram->base(), m_sram->bytes()); + m_sram = std::make_unique(0x20000 * 4); + m_nvram->set_base(m_sram.get(), 0x20000 * 4); - archimedes_init(); m_coin_start_cycles = 0ULL; m_mk5_2KHz_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(aristmk5_state::mk5_2KHz_callback),this)); - m_mk5_VSYNC_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(aristmk5_state::mk5_VSYNC_callback),this)); m_spi_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(aristmk5_state::spi_timer), this)); m_lamps.resolve(); @@ -2246,15 +2234,10 @@ void aristmk5_state::machine_reset() { - archimedes_reset(); m_mk5_2KHz_timer->adjust(attotime::from_hz(MASTER_CLOCK / 9 / 4096)); // 8MHz / 4096 - m_mk5_VSYNC_timer->adjust(attotime::from_hz(50000)); // default bit 1 & bit 2 == 0 - - m_ioc_regs[IRQ_STATUS_B] |= 0x40; //hack, set keyboard irq empty to be ON { /* for US sets, load the roms according to what the operator wants */ - uint8_t *ROM = memregion("maincpu")->base(); uint8_t *PRG; if (ioport("ROM_LOAD") != nullptr) @@ -2264,12 +2247,10 @@ uint8_t op_mode = ioport("ROM_LOAD")->read(); PRG = memregion(rom_region[op_mode & 7])->base(); - } - else // non-US sets don't have set chips - PRG = memregion("game_prg")->base(); - for(int i = 0; i < 0x400000; i++) - ROM[i] = PRG[i]; + m_memc->space(0).install_rom(0x03400000, 0x037fffff, PRG); + m_memc->space(0).install_rom(0x03800000, 0x03bfffff, PRG); + } } m_ldor_shift_reg = 0x55; @@ -2283,27 +2264,44 @@ memset(m_spi_data, 0, sizeof(m_spi_data)); } +static DEVICE_INPUT_DEFAULTS_START( aristmk5_rs232_defaults ) + DEVICE_INPUT_DEFAULTS( "RS232_TXBAUD", 0xff, RS232_BAUD_2400 ) + DEVICE_INPUT_DEFAULTS( "RS232_RXBAUD", 0xff, RS232_BAUD_2400 ) + DEVICE_INPUT_DEFAULTS( "RS232_DATABITS", 0xff, RS232_DATABITS_8 ) + DEVICE_INPUT_DEFAULTS( "RS232_PARITY", 0xff, RS232_PARITY_NONE ) + DEVICE_INPUT_DEFAULTS( "RS232_STOPBITS", 0xff, RS232_STOPBITS_2 ) +DEVICE_INPUT_DEFAULTS_END + void aristmk5_state::aristmk5(machine_config &config) { ARM(config, m_maincpu, MASTER_CLOCK/6); // 12000000 - m_maincpu->set_addrmap(AS_PROGRAM, &aristmk5_state::aristmk5_drame_map); + m_maincpu->set_addrmap(AS_PROGRAM, &aristmk5_state::aristmk5_arm_map); WATCHDOG_TIMER(config, "watchdog").set_time(attotime::from_seconds(2)); /* 1.6 - 2 seconds */ - /* TODO: this isn't supposed to access a keyboard ... */ - AAKART(config, m_kart, 12000000/128); // TODO: frequency + ACORN_MEMC(config, m_memc, MASTER_CLOCK / 9, m_vidc); + m_memc->set_addrmap(0, &aristmk5_state::aristmk5_drame_map); + m_memc->sirq_w().set(m_ioc, FUNC(acorn_ioc_device::il1_w)); + + ACORN_IOC(config, m_ioc, MASTER_CLOCK / 9); + m_ioc->fiq_w().set_inputline(m_maincpu, ARM_FIRQ_LINE); + m_ioc->irq_w().set_inputline(m_maincpu, ARM_IRQ_LINE); + m_ioc->peripheral_r<2>().set(FUNC(aristmk5_state::sram_r)); + m_ioc->peripheral_w<2>().set(FUNC(aristmk5_state::sram_w)); + m_ioc->kout_w().set("kart", FUNC(rs232_port_device::write_txd)); - SCREEN(config, "screen", SCREEN_TYPE_RASTER); + screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); + screen.screen_vblank().set(m_ioc, FUNC(acorn_ioc_device::ir_w)); ACORN_VIDC10(config, m_vidc, MASTER_CLOCK/3); m_vidc->set_screen("screen"); - m_vidc->vblank().set(FUNC(aristmk5_state::vblank_irq)); - m_vidc->sound_drq().set(FUNC(aristmk5_state::sound_drq)); + m_vidc->vblank().set(m_memc, FUNC(acorn_memc_device::vidrq_w)); + m_vidc->sound_drq().set(m_memc, FUNC(acorn_memc_device::sndrq_w)); EEPROM_93C56_16BIT(config, m_eeprom[0]); EEPROM_93C56_16BIT(config, m_eeprom[1]); - NVRAM(config, m_nvram, nvram_device::DEFAULT_NONE); + NVRAM(config, m_nvram, nvram_device::DEFAULT_ALL_0); // TL16C452FN U71 ns16450_device &uart0a(NS16450(config, "uart_0a", MASTER_CLOCK / 9)); @@ -2319,21 +2317,27 @@ // COMM port 4 - 5 NS16450(config, "uart_2a", MASTER_CLOCK / 9); -// MCFG_INS8250_OUT_INT_CB(WRITELINE(*this, FUNC(input_merger_device::in_w<4>)); +// uart2a.out_int_callback().set("uart_irq", FUNC(input_merger_device::in_w<4>)); NS16450(config, "uart_2b", MASTER_CLOCK / 9); -// MCFG_INS8250_OUT_INT_CB(WRITELINE(*this, FUNC(input_merger_device::in_w<5>)); +// uart2b.out_int_callback().set("uart_irq", FUNC(input_merger_device::in_w<5>)); // COMM port 6 - 7 NS16450(config, "uart_3a", MASTER_CLOCK / 9); -// MCFG_INS8250_OUT_INT_CB(WRITELINE(*this, FUNC(input_merger_device::in_w<6>)); +// uart3a.out_int_callback().set("uart_irq", FUNC(input_merger_device::in_w<6>)); NS16450(config, "uart_3b", MASTER_CLOCK / 9); -// MCFG_INS8250_OUT_INT_CB(WRITELINE(*this, FUNC(input_merger_device::in_w<7>)); +// uart3b.out_int_callback().set("uart_irq", FUNC(input_merger_device::in_w<7>)); - INPUT_MERGER_ANY_HIGH(config, "uart_irq").output_handler().set(FUNC(aristmk5_state::uart_irq_callback)); + INPUT_MERGER_ANY_HIGH(config, "uart_irq").output_handler().set(m_ioc, FUNC(acorn_ioc_device::il5_w)); DS1302(config, m_rtc, 32.768_kHz_XTAL); HOPPER(config, m_hopper, attotime::from_msec(100), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_LOW); + + // some games (jungjuic, penpir2) use the IOC KART interface for debug + rs232_port_device &rs232(RS232_PORT(config, "kart", default_rs232_devices, nullptr)); + rs232.rxd_handler().set(m_ioc, FUNC(acorn_ioc_device::kin_w)); + rs232.set_option_device_input_defaults("null_modem", DEVICE_INPUT_DEFAULTS_NAME(aristmk5_rs232_defaults)); + rs232.set_option_device_input_defaults("terminal" , DEVICE_INPUT_DEFAULTS_NAME(aristmk5_rs232_defaults)); } @@ -2349,7 +2353,7 @@ void aristmk5_state::aristmk5_usa(machine_config &config) { aristmk5(config); - m_maincpu->set_addrmap(AS_PROGRAM, &aristmk5_state::aristmk5_usa_map); + m_memc->set_addrmap(0, &aristmk5_state::aristmk5_usa_map); } void aristmk5_state::aristmk5_usa_touch(machine_config &config) @@ -2400,13 +2404,7 @@ ARISTOCRAT_MK5_GALS ARISTOCRAT_MK5_EEPROM - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) - - - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_END @@ -2423,15 +2421,11 @@ 0x05eb1c-0x10fa8b is the non-Checksummed range still containing data but NOT covered by Checksum 0x05eb1c-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0200751v.u7", 0x000000, 0x80000, CRC(ab386ab0) SHA1(56c5baea4272866a9fe18bdc371a49f155251f86) ) ROM_LOAD32_WORD( "0200751v.u11", 0x000002, 0x80000, CRC(ce8c8449) SHA1(9894f0286f27147dcc437e4406870fe695a6f61a) ) ROM_LOAD32_WORD( "0200751v.u8", 0x100000, 0x80000, CRC(99097a82) SHA1(a08214ab4781b06b46fc3be5c48288e373230ef4) ) ROM_LOAD32_WORD( "0200751v.u12", 0x100002, 0x80000, CRC(443a7b6d) SHA1(c19a1c50fb8774826a1e12adacba8bbfce320891) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -2448,15 +2442,11 @@ 0x05cdc4-0x11000b is the non-Checksummed range still containing data but NOT covered by Checksum 0x05cdc4-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100751v.u7", 0x000000, 0x80000, CRC(ca3e97db) SHA1(bd0a4402e57891899d92ea85a87fb8925a44f706) ) ROM_LOAD32_WORD( "0100751v.u11", 0x000002, 0x80000, CRC(cfe3f792) SHA1(aa1bf77101404c2018a5e5b808f1d683e29ae942) ) ROM_LOAD32_WORD( "0100751v.u8", 0x100000, 0x80000, CRC(d55204bd) SHA1(208c089d435ea4af25d0b9b3d5e79fea397bc885) ) ROM_LOAD32_WORD( "0100751v.u12", 0x100002, 0x80000, CRC(77090858) SHA1(76ebc15b26f378ac95276f0aa26d077e3646a6f1) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -2475,15 +2465,11 @@ 0x0e8a7c-0x1c5f47 is the non-Checksummed range still containing data but NOT covered by Checksum 0x0e8a7c-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "bhg1508.u7", 0x000000, 0x80000, CRC(09107577) SHA1(6cb525a96cdcb414ae7a45b5a5853d94059bc333) ) ROM_LOAD32_WORD( "bhg1508.u11", 0x000002, 0x80000, CRC(45630329) SHA1(a2c8e3ae786948135797a80ae12bf3ba2e6192a8) ) ROM_LOAD32_WORD( "bhg1508.u8", 0x100000, 0x80000, CRC(c572e39b) SHA1(e6ca864b620a17f8b963d4917cbdc894b9b275dc) ) ROM_LOAD32_WORD( "bhg1508.u12", 0x100002, 0x80000, CRC(b8995b25) SHA1(ad39ad11dc02dbbe8be99d81c96e9fc3191726ad) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -2494,7 +2480,7 @@ ARISTOCRAT_MK5_USA_SETCHIPS ARISTOCRAT_MK5_GALS ARISTOCRAT_MK5_EEPROM - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) /* Checksum code found at 0x000c44 0x000000-0x06ddab is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -2508,10 +2494,6 @@ ROM_LOAD32_WORD( "0201005v.u12", 0x100002, 0x80000, CRC(8b675dff) SHA1(275579d21be51e6ca01be7c57018e142d1d40875) ) ROM_LOAD32_WORD( "0201005v.u9", 0x200000, 0x80000, CRC(c2e973e7) SHA1(e89bdaa56b0c3c7bd77c8141421f76be9ff2e71b) ) ROM_LOAD32_WORD( "0201005v.u13", 0x200002, 0x80000, CRC(e005a7e8) SHA1(cbb313f5d1d04c5a441b3f92b7a90a281ddb4885) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -2531,17 +2513,13 @@ 0x08e938-0x2c839f is the non-Checksummed range still containing data but NOT covered by Checksum 0x08e938-0x2fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "01j02046.u7", 0x000000, 0x80000, CRC(1a315825) SHA1(d5390c13a6182fca6ca5eec7968a8be0af548468) ) ROM_LOAD32_WORD( "01j02046.u11", 0x000002, 0x80000, CRC(1f21adea) SHA1(88a24ea08c476b880c3c8a0547442f065703c6c8) ) ROM_LOAD32_WORD( "01j02046.u8", 0x100000, 0x80000, CRC(9fd79dc5) SHA1(510a45004cf760488977b7ac0ef79a04c3ec035f) ) ROM_LOAD32_WORD( "01j02046.u12", 0x100002, 0x80000, CRC(fcd695fb) SHA1(28a6891f1dbaf919e8454f412090660bb604938e) ) ROM_LOAD32_WORD( "01j02046.u9", 0x200000, 0x80000, CRC(3591eaf1) SHA1(e11c7ec630df69f7b7d507f3d28fc3530716f133) ) ROM_LOAD32_WORD( "01j02046.u13", 0x200002, 0x80000, CRC(6b791adf) SHA1(f00923101f926034603243a3c63e1010b044829e) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -2558,17 +2536,13 @@ 0x056f40-0x2fb607 is the non-Checksummed range still containing data but NOT covered by Checksum 0x056f40-0x2fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0200428v.u7", 0x000000, 0x80000, CRC(25aa8109) SHA1(cf4521b3d447812d2d9dbfdab9fe0cec71cdeb2e) ) ROM_LOAD32_WORD( "0200428v.u11", 0x000002, 0x80000, CRC(774ff977) SHA1(5ce1aa8b7598b4bc8e5fa44de1c03b5f2851f5de) ) ROM_LOAD32_WORD( "0200428v.u8", 0x100000, 0x80000, CRC(e52a279a) SHA1(4a3a080d840d8a894ec0ba0250a566831377f0f8) ) ROM_LOAD32_WORD( "0200428v.u12", 0x100002, 0x80000, CRC(562aa123) SHA1(825a2d23321b636a3ff2565b2b72df3b97bd0ec8) ) ROM_LOAD32_WORD( "0200428v.u9", 0x200000, 0x80000, CRC(66d5a7f7) SHA1(1a1f845a97677c43ff1090231434ae9d3d36ab4c) ) ROM_LOAD32_WORD( "0200428v.u13", 0x200002, 0x80000, CRC(883b2ec3) SHA1(5b431d8c9c8eabca65ab22dcf2bdb22d49445bb1) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -2585,16 +2559,12 @@ 0x056d8c-0x138557 is the non-Checksummed range still containing data but NOT covered by Checksum 0x056d8c-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) // the checksum only covers part of the first 2 roms, marked all as BAD_DUMP because it can't be trusted without a full redump. ROM_LOAD32_WORD( "0200818v.u7", 0x000000, 0x80000, BAD_DUMP CRC(eed76145) SHA1(6a40a6ba2ce320a37b086dc4916c92c8e38c065e) ) ROM_LOAD32_WORD( "0200818v.u11", 0x000002, 0x80000, BAD_DUMP CRC(de3358d3) SHA1(4f290940d8af9fe8d404802d5cecfd2d098eff12) ) ROM_LOAD32_WORD( "0200818v.u8", 0x100000, 0x80000, BAD_DUMP CRC(58ddfb50) SHA1(c2152e65fa119136b7944b69e650310db78e62a8) ) ROM_LOAD32_WORD( "0200818v.u12", 0x100002, 0x80000, BAD_DUMP CRC(bb2bf7bb) SHA1(f88208238a69fc79e33af17f39e25cd2857d7172) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -2610,7 +2580,7 @@ 0x06c178-0x384a9b is the non-Checksummed range still containing data but NOT covered by Checksum 0x06c178-0x3fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100812v.u7", 0x000000, 0x80000, CRC(f8e12462) SHA1(82a25757b2146204b86e557b8f1c45280e0668a8) ) ROM_LOAD32_WORD( "0100812v.u11", 0x000002, 0x80000, CRC(df066d27) SHA1(310422c78e93ce9f1f58b4a58a59bc2eba5c502a) ) ROM_LOAD32_WORD( "0100812v.u8", 0x100000, 0x80000, CRC(08e8de8d) SHA1(913d3e51821d8885affd2750c18d1000629b79d9) ) @@ -2619,10 +2589,6 @@ ROM_LOAD32_WORD( "0100812v.u13", 0x200002, 0x80000, CRC(fca82ee7) SHA1(bb70f2e04047a58b697dca536b95f9bbcc295a8a) ) ROM_LOAD32_WORD( "0100812v.u10", 0x300000, 0x80000, CRC(b574c12d) SHA1(3b1d1d00ef3eae23493e2b0381ab80490af510d4) ) ROM_LOAD32_WORD( "0100812v.u14", 0x300002, 0x80000, CRC(75b9b89e) SHA1(08d487b3722f2ea5d2d18c78f571a44c78616dbe) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -2643,7 +2609,7 @@ 0x0941ac-0x328187 is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "ghg101202.u7", 0x000000, 0x80000, CRC(ea389201) SHA1(a838a9115ca3101cb06ec86e955294d51f8d65e4) ) // 92.767% ROM_LOAD32_WORD( "ghg101202.u11", 0x000002, 0x80000, CRC(af6f2142) SHA1(200be993ad21643c46995d68a119fd8c1d2fedbe) ) // 92.767% ROM_LOAD32_WORD( "ghg101202.u8", 0x100000, 0x80000, CRC(7b9c153e) SHA1(2144a208d2fd2f993e113d809045e864d89df7ec) ) // base @@ -2652,10 +2618,6 @@ ROM_LOAD32_WORD( "ghg101202.u13", 0x200002, 0x80000, CRC(55ddba7b) SHA1(3a43e577e8bc72aa1c09b131ec8b2a87eaeccf9f) ) // base ROM_LOAD32_WORD( "ghg101202.u10", 0x300000, 0x80000, CRC(230725bc) SHA1(85320b1b72c7f83f57bc8cc861e5a6323750ff4f) ) // base ROM_LOAD32_WORD( "ghg101202.u14", 0x300002, 0x80000, CRC(18934c51) SHA1(f7c9c95c687dbfe89747e7877157fde37bc1119e) ) // base - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -2672,7 +2634,7 @@ Calculated Checksum 0xb79e9367 (OK) 0x0944c0-0x32849b is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "ghg100803.u7", 0x000000, 0x80000, CRC(56749bb5) SHA1(391e2cc4e17c56c9c3a40dba34970b606cf7e452) ) // 94.858% ROM_LOAD32_WORD( "ghg100803.u11", 0x000002, 0x80000, CRC(3a38fec2) SHA1(1a4171bf40368f38bf93323daa640da9220f23a4) ) // 94.858% ROM_LOAD32_WORD( "ghg100803.u8", 0x100000, 0x80000, CRC(85cf7289) SHA1(500d236bdf82a2ef37919c2756ec4695729e9d15) ) @@ -2681,10 +2643,6 @@ ROM_LOAD32_WORD( "ghg100803.u13", 0x200002, 0x80000, CRC(5ef50865) SHA1(07bd31fab356142e548f6aa27d15ed5646064f15) ) ROM_LOAD32_WORD( "ghg100803.u10", 0x300000, 0x80000, CRC(bebc7aaa) SHA1(3b63ba76a96677032776e17761ed281541f94513) ) ROM_LOAD32_WORD( "ghg100803.u14", 0x300002, 0x80000, CRC(9759692e) SHA1(7666027e21af27329720127367a780776973c515) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -2702,7 +2660,7 @@ Calculated Checksum 0xae44f291 (OK) 0x0f47a8-0x3a0b5b is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "ahg1547.u7", 0x000000, 0x80000, CRC(5ded48cb) SHA1(3335a9dc6758dd8b225258ab2cb01cf4e9c02dd2) ) ROM_LOAD32_WORD( "ahg1547.u11", 0x000002, 0x80000, CRC(764dfdb8) SHA1(e68493dfac2d64c59d7576d4b124210089edda62) ) ROM_LOAD32_WORD( "ahg1547.u8", 0x100000, 0x80000, CRC(7e26e7a9) SHA1(88dc5dbf6ada1b6f2218ef3b013bc91047401d21) ) @@ -2711,10 +2669,6 @@ ROM_LOAD32_WORD( "ahg1547.u13", 0x200002, 0x80000, CRC(a5382c96) SHA1(570479383d69dfc9e52ebd55b51989ca284d31e7) ) ROM_LOAD32_WORD( "ahg1547.u10", 0x300000, 0x80000, CRC(a31d8a45) SHA1(5e62d0d3523fd381e940b4dbc6f84d83434bf83a) ) ROM_LOAD32_WORD( "ahg1547.u14", 0x300002, 0x80000, CRC(de2888e2) SHA1(f614d68c0e09912e9126cb024f54ed32ee50b57e) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -2734,7 +2688,7 @@ Calculated Checksum 0x8eb73e23 (OK) 0x0a6940-0x39cda7 is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "bhg1248.u7", 0x000000, 0x80000, CRC(6e432a78) SHA1(3505cf255f63365e5cc7c1e8338509a2889b99be) ) ROM_LOAD32_WORD( "bhg1248.u11", 0x000002, 0x80000, CRC(c9244e66) SHA1(5ea15951c4e003378549c2a581c32564327bd3bf) ) ROM_LOAD32_WORD( "bhg1248.u8", 0x100000, 0x80000, CRC(344c4061) SHA1(6041a8198e82416af48131f2e1bb59341e99e365) ) @@ -2743,10 +2697,6 @@ ROM_LOAD32_WORD( "bhg1248.u13", 0x200002, 0x80000, CRC(dade5590) SHA1(e604a87aeb5284daec2a35c395ef52213b16da7d) ) ROM_LOAD32_WORD( "bhg1248.u10", 0x300000, 0x80000, CRC(fc6310db) SHA1(1a7f31f884c4b2838edaffd13c212b887d218592) ) ROM_LOAD32_WORD( "bhg1248.u14", 0x300002, 0x80000, CRC(b276d61a) SHA1(8bee7fa551caec3da03afa061612c153f7b48cdb) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -2758,7 +2708,7 @@ ARISTOCRAT_MK5_GALS ARISTOCRAT_MK5_EEPROM // checksum code not found due to ROMs being corrupted, all files are missing bytes consisting of 0x0D - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "bhg1579.u7", 0x000000, 0x7f01b, BAD_DUMP CRC(da30ade2) SHA1(0a19181ae3968134a5731aa9eadde8c7a12798c1) ) ROM_LOAD32_WORD( "bhg1579.u11", 0x000002, 0x7ff5b, BAD_DUMP CRC(f94c777f) SHA1(f3e516b9d8b0270f7935bf80f7fabfef055171f3) ) ROM_LOAD32_WORD( "bhg1579.u8", 0x100000, 0x7fe04, BAD_DUMP CRC(9f457ac5) SHA1(913b48a5d49c555dfa758aee619d32bf32daf761) ) @@ -2767,10 +2717,6 @@ ROM_LOAD32_WORD( "bhg1579.u13", 0x200002, 0x7fd9c, BAD_DUMP CRC(9f0f893d) SHA1(027048eef5f791a4e051692108288ee4b12152e6) ) ROM_LOAD32_WORD( "bhg1579.u10", 0x300000, 0x7ff63, BAD_DUMP CRC(b2682002) SHA1(378acb39ae504423506b3a01b1ba91d1e8ae0be0) ) ROM_LOAD32_WORD( "bhg1579.u14", 0x300002, 0x7ff94, BAD_DUMP CRC(34ffe312) SHA1(34432e57e2e3dd90c15dd3ff7cb16d8381343be8) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -2786,13 +2732,9 @@ Calculated Checksum 0xf5d418fe (OK) 0x05b94c-0x0fc69f is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0200510v.u7", 0x000000, 0x80000, CRC(d4cfce73) SHA1(735c385779afe55e521dbfe9ebfdc55fe3346349) ) ROM_LOAD32_WORD( "0200510v.u11", 0x000002, 0x80000, CRC(5d888245) SHA1(bbbe61e09bebd5fcb79f060d5caee15100c9a685) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -2809,15 +2751,11 @@ 0x05554c-0x1c4e2b is the non-Checksummed range still containing data but NOT covered by Checksum 0x05554c-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0200456v.u7", 0x000000, 0x80000, CRC(f04dd78b) SHA1(443057fc3e02406d46cf68f95e85e5a0fd8e7b1e) ) ROM_LOAD32_WORD( "0200456v.u11", 0x000002, 0x80000, CRC(3b50b21b) SHA1(7c20d1bfb82cdd19c046a545ae251e3560b8f00d) ) ROM_LOAD32_WORD( "0200456v.u8", 0x100000, 0x80000, CRC(da86d682) SHA1(b1aa739215f1f0967d6a03060d9a2f10115c0b03) ) ROM_LOAD32_WORD( "0200456v.u12", 0x100002, 0x80000, CRC(9f0d7615) SHA1(1453b1476510e1dd68bc14feba72dc59b9dfe676) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -2838,15 +2776,11 @@ 0x0b1f48-0x183c1f is the non-Checksummed range still containing data but NOT covered by Checksum 0x0b1f48-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "chg047903.u7", 0x000000, 0x80000, CRC(ae49d394) SHA1(fae7db8193915a3307e89a4623289fcbf9486283) ) // 92.691% ROM_LOAD32_WORD( "chg047903.u11", 0x000002, 0x80000, CRC(6da81e81) SHA1(a9e7aff23b24213ce2c68f672a9e22088cf53f3f) ) // 92.691% ROM_LOAD32_WORD( "chg047903.u8", 0x100000, 0x80000, CRC(e0c01d01) SHA1(9153129fd348a97da7cccf002e5d03e4b4db9264) ) // base ROM_LOAD32_WORD( "chg047903.u12", 0x100002, 0x80000, CRC(7dbb634b) SHA1(f7a752240989032af142f4cd6e4260a12a5b4c0a) ) // base - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -2868,15 +2802,11 @@ 0x0b1f48-0x183c1f is the non-Checksummed range still containing data but NOT covered by Checksum 0x0b1f48-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "chg047999.u7", 0x000000, 0x80000, CRC(7e9be2d0) SHA1(84293a391e9797afc904bb3be05367361ae8d4c7) ) // 87.006% ROM_LOAD32_WORD( "chg047999.u11", 0x000002, 0x80000, CRC(efd350ac) SHA1(19975b4d2b55b65542a7ff38fa035fd516bd6e2e) ) // 87.006% ROM_LOAD32_WORD( "chg047999.u8", 0x100000, 0x80000, CRC(e0c01d01) SHA1(9153129fd348a97da7cccf002e5d03e4b4db9264) ) // base ROM_LOAD32_WORD( "chg047999.u12", 0x100002, 0x80000, CRC(7dbb634b) SHA1(f7a752240989032af142f4cd6e4260a12a5b4c0a) ) // base - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -2893,15 +2823,11 @@ 0x044780-0x1c713b is the non-Checksummed range still containing data but NOT covered by Checksum 0x044780-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0200143v.u7", 0x000000, 0x80000, CRC(7f69cdfc) SHA1(1241741d21334df10d60080555824a87eae93db3) ) ROM_LOAD32_WORD( "0200143v.u11", 0x000002, 0x80000, CRC(1ddf8732) SHA1(dc09db14c251699fdd46068f18ad6214e8752939) ) ROM_LOAD32_WORD( "0200143v.u8", 0x100000, 0x80000, CRC(24d8135e) SHA1(1bc69e9927afe0300d15a49ca06ae527774b295a) ) ROM_LOAD32_WORD( "0200143v.u12", 0x100002, 0x80000, CRC(0d58cf28) SHA1(aa65b7ee88b5bc872008a46e60bd49d9e5eda153) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -2912,15 +2838,11 @@ ARISTOCRAT_MK5_GALS ARISTOCRAT_MK5_EEPROM // checksum code not found due to ROMs being corrupted, all files are missing bytes consisting of 0x0D - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "ahg1463.u7", 0x000000, 0x7f06d, CRC(d866097c) SHA1(2bd2c6200986b27a35329aa0c43e5afd22becbfc) ) ROM_LOAD32_WORD( "ahg1463.u11", 0x000002, 0x7ff68, CRC(710827f7) SHA1(26b9ab7f49dc94467a98635480cac0605c1de399) ) ROM_LOAD32_WORD( "ahg1463.u8", 0x100000, 0x7f499, CRC(17e4ff76) SHA1(e582c92478f139e55922ccf851e4922078498462) ) ROM_LOAD32_WORD( "ahg1463.u12", 0x100002, 0x7f4fc, CRC(5fe736c2) SHA1(d7c1a3f003085848e413aa499d9eaecca74773da) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -2929,7 +2851,7 @@ ROM_START( cashcat ) ARISTOCRAT_MK5_GALS ARISTOCRAT_MK5_EEPROM - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) /* Checksum code found at 0x000b68 0x000000-0x0615f7 is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -2942,10 +2864,6 @@ ROM_LOAD32_WORD( "0100676v.u11", 0x000002, 0x80000, CRC(7cdd3933) SHA1(db191eabde61345ecd9528790bb78484b243c5f3) ) ROM_LOAD32_WORD( "0100676v.u8", 0x100000, 0x80000, CRC(87a8d9a9) SHA1(93ad5a0f3579845e187c5a5a45e6bdc476cd4d89) ) ROM_LOAD32_WORD( "0100676v.u12", 0x100002, 0x80000, CRC(a7199f5f) SHA1(6a46935c095b1d89307921e3a53b48032e6f45fa) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -2954,7 +2872,7 @@ ROM_START( cashcata ) ARISTOCRAT_MK5_GALS ARISTOCRAT_MK5_EEPROM - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) /* Checksum code found at 0x000b68 0x000000-0x0612df is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -2967,10 +2885,6 @@ ROM_LOAD32_WORD( "0100557v.u11", 0x000002, 0x80000, CRC(a67962e4) SHA1(2436d8028b739bbccf757344ef67a60dca79e81b) ) ROM_LOAD32_WORD( "0100557v.u8", 0x100000, 0x80000, CRC(9e07de68) SHA1(455f912e10517867e938f0b3ce63ff1e3a14ca1d) ) ROM_LOAD32_WORD( "0100557v.u12", 0x100002, 0x80000, CRC(bdeeafd3) SHA1(a95a44ff8534bb030d696a37821f3e53072f2947) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -2979,16 +2893,12 @@ ROM_START( cashcatnz ) ARISTOCRAT_MK5_GALS ARISTOCRAT_MK5_EEPROM - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) // checksum code not found (uses different startup sequence) ROM_LOAD32_WORD( "0300863v.u7", 0x000000, 0x80000, CRC(de0f0202) SHA1(994f6c47b1e2e0e133853dc69b189752104486e4) ) ROM_LOAD32_WORD( "0300863v.u11", 0x000002, 0x80000, CRC(e60e8bd1) SHA1(ffaa7be8968047b9ee54a117d273a14cbca41028) ) ROM_LOAD32_WORD( "0300863v.u8", 0x100000, 0x80000, CRC(37d41d35) SHA1(c959b787383d6f91d20e18f37a38a965407a9ff0) ) ROM_LOAD32_WORD( "0300863v.u12", 0x100002, 0x80000, CRC(f930fc07) SHA1(cb3fdbd5b87af7b14067f7999740470d3cf434df) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -3005,15 +2915,11 @@ 0x055f84-0x1dbdd7 is the non-Checksummed range still containing data but NOT covered by Checksum 0x055f84-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100438v.u7", 0x000000, 0x80000, CRC(c942ef22) SHA1(4f56674f749602ae928832f98a641e680af8989b) ) ROM_LOAD32_WORD( "0100438v.u11", 0x000002, 0x80000, CRC(64921874) SHA1(5aa6a0d6e29f5e400e275f27b6adfbef595fe83a) ) ROM_LOAD32_WORD( "0100438v.u8", 0x100000, 0x80000, CRC(a8868277) SHA1(e199448a0a920219dc15443813061653b94d6d3a) ) ROM_LOAD32_WORD( "0100438v.u12", 0x100002, 0x80000, CRC(7ae3b5db) SHA1(238698b72f529ac4fb292d08267069d1da01b43b) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -3030,15 +2936,11 @@ 0x05ca1c-0x1dbdd7 is the non-Checksummed range still containing data but NOT covered by Checksum 0x05ca1c-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0200437v.u7", 0x000000, 0x80000, CRC(a287fd5a) SHA1(7d06f679e5ff38e0989819410856361962c93e42) ) ROM_LOAD32_WORD( "0200437v.u11", 0x000002, 0x80000, CRC(1875532b) SHA1(e410524b94b1c7860c1ef81ce5e0b4bf992f12ad) ) ROM_LOAD32_WORD( "0200437v.u8", 0x100000, 0x80000, CRC(edbfc684) SHA1(8849374e5df34359d228a4b447c409b76fe36b35) ) ROM_LOAD32_WORD( "0200437v.u12", 0x100002, 0x80000, CRC(571aab82) SHA1(03895d1a08d2dd868fd594db1aaeb29b295f0d98) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -3048,15 +2950,11 @@ ARISTOCRAT_MK5_GALS ARISTOCRAT_MK5_EEPROM // checksum code not found (uses different startup sequence) - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0300781v.u7", 0x000000, 0x80000, CRC(009e109e) SHA1(b912b474a226af17bef554f4db6fade7cd2e558f) ) ROM_LOAD32_WORD( "0300781v.u11", 0x000002, 0x80000, CRC(826da4ac) SHA1(6bf852b438f5257474c265ace2826b7bd0d9b087) ) ROM_LOAD32_WORD( "0300781v.u8", 0x100000, 0x80000, CRC(f798ab06) SHA1(0f51ffd0e7abee6af0c5a29ab9ad1c8bfcd567a0) ) ROM_LOAD32_WORD( "0300781v.u12", 0x100002, 0x80000, CRC(2aeb0265) SHA1(50e526ecccfdd35f7e156e1873cf4c81fb117069) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -3076,15 +2974,11 @@ 0x09b414-0x1b550b is the non-Checksummed range still containing data but NOT covered by Checksum 0x09b414-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "dhg407899.u7", 0x000000, 0x80000, CRC(9944fe04) SHA1(5f68b08e3480c0c8c1a29fe40e0221e9aeb969b7) ) ROM_LOAD32_WORD( "dhg407899.u11", 0x000002, 0x80000, CRC(1f7fa88a) SHA1(6ca40c5edba758084fd4d4cc0899584fd2d72ad3) ) ROM_LOAD32_WORD( "dhg407899.u8", 0x100000, 0x80000, CRC(6630b35b) SHA1(0126be7a73460fc70c7f1527a3eb0c9a0c58618e) ) ROM_LOAD32_WORD( "dhg407899.u12", 0x100002, 0x80000, CRC(2fd087f8) SHA1(f16414abf58e1a7a8ca08380993bdeca6f9c7317) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -3101,15 +2995,11 @@ 0x06076c-0x1a2ecf is the non-Checksummed range still containing data but NOT covered by Checksum 0x06076c-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0300467v.u7", 0x000000, 0x80000, CRC(b0ff2aae) SHA1(b05667ffe952cae7a6581398552db6e47921090e) ) ROM_LOAD32_WORD( "0300467v.u11", 0x000002, 0x80000, CRC(25a18efa) SHA1(0ee4f6cc66322397dbde53af2149f5fb35d788df) ) ROM_LOAD32_WORD( "0300467v.u8", 0x100000, 0x80000, CRC(d4e7b4ba) SHA1(147a1ed5cdcbb84466a8024ad7e0778f85374489) ) ROM_LOAD32_WORD( "0300467v.u12", 0x100002, 0x80000, CRC(570c7f8a) SHA1(7c9527e0b37970b7960c723727c3c650a48e8125) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -3119,15 +3009,11 @@ ARISTOCRAT_MK5_GALS ARISTOCRAT_MK5_EEPROM // checksum code not found due to ROMs being corrupted, all files are missing bytes consisting of 0x0D - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0300447v.u7", 0x000000, 0x7f992, BAD_DUMP CRC(421ac2af) SHA1(552e98a0d3f969d702dd0aafcb4cb8f697a56b47) ) ROM_LOAD32_WORD( "0300447v.u11", 0x000002, 0x7ffd3, BAD_DUMP CRC(36b57080) SHA1(6719df7cb0ae2535e125c965a2426efc00da29df) ) ROM_LOAD32_WORD( "0300447v.u8", 0x100000, 0x7fe3d, BAD_DUMP CRC(9cc0ea01) SHA1(92f89d3adf257eee9ffaa88c1119f0456cafba1d) ) ROM_LOAD32_WORD( "0300447v.u12", 0x100002, 0x7fe36, BAD_DUMP CRC(ef641efa) SHA1(52e54ed933352cde0f280ba2b3e9bae01c4aae7e) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -3144,15 +3030,11 @@ 0x0603fc-0x17a75b is the non-Checksummed range still containing data but NOT covered by Checksum 0x0603fc-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100787v.u7", 0x000000, 0x80000, CRC(845f9913) SHA1(df6121290b30ff4a9c2d0e690cf8e7797e9a8612) ) ROM_LOAD32_WORD( "0100787v.u11", 0x000002, 0x80000, CRC(bcbf9de9) SHA1(191ce749fe0d29b2783fb78d9338a00d65104daa) ) ROM_LOAD32_WORD( "0100787v.u8", 0x100000, 0x80000, CRC(a3a74ecb) SHA1(52b3a41573a9fa1de05ce01a858e400f80e595b8) ) ROM_LOAD32_WORD( "0100787v.u12", 0x100002, 0x80000, CRC(b44cf571) SHA1(04447820e015425493cade5611b3eb2f21e48c2e) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -3171,15 +3053,11 @@ 0x07dbb8-0x1b3787 is the non-Checksummed range still containing data but NOT covered by Checksum 0x07dbb8-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "04j00714.u7", 0x000000, 0x80000, CRC(2f3a1af7) SHA1(e1448116a81687cb79dd380dfbc8decf1f83e649) ) ROM_LOAD32_WORD( "04j00714.u11", 0x000002, 0x80000, CRC(ef4f49e8) SHA1(8ff21f679a55cdfebcf22c109dfd3b41773293bd) ) ROM_LOAD32_WORD( "04j00714.u8", 0x100000, 0x80000, CRC(fa24cfde) SHA1(1725c38a8a15915d8aa8e59afef9ce1d6e8d01c5) ) ROM_LOAD32_WORD( "04j00714.u12", 0x100002, 0x80000, CRC(b8d4a5ec) SHA1(097e44cdb30b9aafd7f5358c8f0cdd130ec0615e) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -3197,17 +3075,13 @@ 0x071848-0x25ff4b is the non-Checksummed range still containing data but NOT covered by Checksum 0x071848-0x2fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "01j00681.u7", 0x000000, 0x80000, CRC(059b940e) SHA1(f637508dafbd37169429c495a893addbc6d28834) ) ROM_LOAD32_WORD( "01j00681.u11", 0x000002, 0x80000, CRC(5fb7bfb3) SHA1(2ad8b3c4753d19f9e3254ef3f4059951d7a111b4) ) ROM_LOAD32_WORD( "01j00681.u8", 0x100000, 0x80000, CRC(6912cc4a) SHA1(9469a6a0d2fd39d85655a8c7bc0668752f5f11fa) ) ROM_LOAD32_WORD( "01j00681.u12", 0x100002, 0x80000, CRC(b538bcbc) SHA1(cda404f9b16e7e76a33c208f62a5ac9c5e02aac4) ) ROM_LOAD32_WORD( "01j00681.u9", 0x200000, 0x80000, CRC(53a573f0) SHA1(d51d698dcec273d157319200ad1c215e930b96ce) ) ROM_LOAD32_WORD( "01j00681.u13", 0x200002, 0x80000, CRC(ad12a718) SHA1(0c36729cb8da800668f533f65fcc870f5dfc0f6a) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -3223,17 +3097,13 @@ Calculated Checksum 0x8afbaabc (OK) 0x053fb8-0x2fda37 is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100351v.u7", 0x000000, 0x80000, CRC(be69c21c) SHA1(8b546727b5972f33d077db0a64aa41a7fde6d417) ) ROM_LOAD32_WORD( "0100351v.u11", 0x000002, 0x80000, CRC(65423867) SHA1(992bb4f717f79233d1300d248b145f95a627cff2) ) ROM_LOAD32_WORD( "0100351v.u8", 0x100000, 0x80000, CRC(3161c16f) SHA1(8f2b14ec8ba5c9da80a226d2ce5a7e5256c8cbb4) ) ROM_LOAD32_WORD( "0100351v.u12", 0x100002, 0x80000, CRC(77b5d777) SHA1(f03afeaff08c9216e714f1e4bcc50292ba87ace4) ) ROM_LOAD32_WORD( "0100351v.u9", 0x200000, 0x80000, CRC(5506777b) SHA1(42512577056e1caefbea0e74879780c56787af13) ) ROM_LOAD32_WORD( "0100351v.u13", 0x200002, 0x80000, CRC(88a1ccae) SHA1(e242f48f99044b4fdf1bf36d8e105df09f94aa50) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -3250,7 +3120,7 @@ 0x05f194-0x3a9a7f is the non-Checksummed range still containing data but NOT covered by Checksum 0x05f194-0x3fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0200530v.u7", 0x000000, 0x80000, CRC(2d53de96) SHA1(6f2ed8f68d0474021a302d7e06ba869c0f1f7262) ) ROM_LOAD32_WORD( "0200530v.u11", 0x000002, 0x80000, CRC(ed80acab) SHA1(d7ec3a063c45180e0b32935db9b8a01bcdaaa9a7) ) ROM_LOAD32_WORD( "0200530v.u8", 0x100000, 0x80000, CRC(fbe704d3) SHA1(fe06489ba9628307f54ab60ab6909b45491116ae) ) @@ -3259,10 +3129,6 @@ ROM_LOAD32_WORD( "0200530v.u13", 0x200002, 0x80000, CRC(7a5c1ca3) SHA1(d56103142392234298117d6b0d9163e0d3e52a7e) ) ROM_LOAD32_WORD( "0200530v.u10", 0x300000, 0x80000, CRC(6c9399c1) SHA1(066afebc8ffcdf9e6a176e18997db242aa84269b) ) ROM_LOAD32_WORD( "0200530v.u14", 0x300002, 0x80000, CRC(e87cf6c9) SHA1(a330644658da6100d7231b1c47260dc7f2e88448) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -3285,7 +3151,7 @@ Calculated Checksum 0x0d44c6b0 (OK) 0x0a6918-0x35040b is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "rhg073003.u7", 0x000000, 0x80000, CRC(06558129) SHA1(be726c0d35776faf1ecd20eb0a193e68a1fb1a84) ) ROM_LOAD32_WORD( "rhg073003.u11", 0x000002, 0x80000, CRC(0eadf5d4) SHA1(b783f6e1911fc098d1b4d1d8c75862e031078e5b) ) ROM_LOAD32_WORD( "rhg073003.u8", 0x100000, 0x80000, CRC(683e96bc) SHA1(bca8e87bea9f7044fa29dc4518e2ac5b429e3313) ) @@ -3294,10 +3160,6 @@ ROM_LOAD32_WORD( "rhg073003.u13", 0x200002, 0x80000, CRC(69fd4f89) SHA1(4e0469caecf9293197a4a5de960eb9dcfee39ca3) ) ROM_LOAD32_WORD( "rhg073003.u10", 0x300000, 0x80000, CRC(9aae49d7) SHA1(5cf87b747ea7561766fe0ffc15967fea657b252b) ) ROM_LOAD32_WORD( "rhg073003.u14", 0x300002, 0x80000, CRC(240f7759) SHA1(1fa5ba0185b027101dae207ec5d28b07d3d73fc2) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -3318,7 +3180,7 @@ Calculated Checksum 0x1a4ad4b2 (OK) 0x0a6918-0x35040b is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "rhg073099.u7", 0x000000, 0x80000, CRC(0a006791) SHA1(b1df734e316222590d11c33c220c2f980103b327) ) ROM_LOAD32_WORD( "rhg073099.u11", 0x000002, 0x80000, CRC(5b338809) SHA1(82e485504a6d5c3ad1840d4c22ddedbeb948f8f9) ) ROM_LOAD32_WORD( "rhg073099.u8", 0x100000, 0x80000, CRC(683e96bc) SHA1(bca8e87bea9f7044fa29dc4518e2ac5b429e3313) ) @@ -3327,10 +3189,6 @@ ROM_LOAD32_WORD( "rhg073099.u13", 0x200002, 0x80000, CRC(69fd4f89) SHA1(4e0469caecf9293197a4a5de960eb9dcfee39ca3) ) ROM_LOAD32_WORD( "rhg073099.u10", 0x300000, 0x80000, CRC(9aae49d7) SHA1(5cf87b747ea7561766fe0ffc15967fea657b252b) ) ROM_LOAD32_WORD( "rhg073099.u14", 0x300002, 0x80000, CRC(240f7759) SHA1(1fa5ba0185b027101dae207ec5d28b07d3d73fc2) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -3348,7 +3206,7 @@ Calculated Checksum 0x9e99a201 (OK) 0x07c3e8-0x2f5d37 is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) // the checksum only covers part of the first 2 roms, marked all as BAD_DUMP because it can't be trusted without a full redump. ROM_LOAD32_WORD( "01j01886.u7", 0x000000, 0x80000, BAD_DUMP CRC(6852bf73) SHA1(a53c8467f4a128da26707a1fe239f32330dffe0a) ) ROM_LOAD32_WORD( "01j01886.u11", 0x000002, 0x80000, BAD_DUMP CRC(c065aaa2) SHA1(875c2e9e432d4532e116dc197613327a06841fc2) ) @@ -3356,10 +3214,6 @@ ROM_LOAD32_WORD( "01j01886.u12", 0x100002, 0x80000, BAD_DUMP CRC(1f03e878) SHA1(b9beee74f5cfd942ba50f8d2955ff588dea32842) ) ROM_LOAD32_WORD( "01j01886.u9", 0x200000, 0x80000, BAD_DUMP CRC(2471f934) SHA1(486757b919f4c4af40b707175d38eca26cda1ea3) ) ROM_LOAD32_WORD( "01j01886.u13", 0x200002, 0x80000, BAD_DUMP CRC(231ca698) SHA1(eb237652974228994e793f0dc87de93095db3c9c) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -3376,15 +3230,11 @@ 0x05ba64-0x12b3e3 is the non-Checksummed range still containing data but NOT covered by Checksum 0x05ba64-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100919v.u7", 0x000000, 0x80000, CRC(02c430c3) SHA1(f4bae1aa5437af1df2a04f700da044bc4fb652b7) ) ROM_LOAD32_WORD( "0100919v.u11", 0x000002, 0x80000, CRC(8cd17e90) SHA1(c6d6a29e62ca6e1b278a2e1d1b358e10ca2de4ed) ) ROM_LOAD32_WORD( "0100919v.u8", 0x100000, 0x80000, CRC(1ee9557c) SHA1(3bee295509d4b0c11ce41a7a20ba91230b7cb4ca) ) ROM_LOAD32_WORD( "0100919v.u12", 0x100002, 0x80000, CRC(9ea140b5) SHA1(11f6b9ab60117f236b464c9dbc939dfb8f240359) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -3401,15 +3251,11 @@ 0x05f640-0x1b1deb is the non-Checksummed range still containing data but NOT covered by Checksum 0x05f640-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0200753v.u7", 0x000000, 0x80000, CRC(5c7ef84a) SHA1(59563a076ecf391ac1779e0dcd530a1ea158a4e3) ) ROM_LOAD32_WORD( "0200753v.u11", 0x000002, 0x80000, CRC(a69c1416) SHA1(7fe57a194bf29346c039dfac1326f3ee5080e630) ) ROM_LOAD32_WORD( "0200753v.u8", 0x100000, 0x80000, CRC(a7b4242c) SHA1(4e6961e9b3267d17b93075c41a691a8033a34d90) ) ROM_LOAD32_WORD( "0200753v.u12", 0x100002, 0x80000, CRC(cb706eb7) SHA1(cbd6235ca7a29c78ef2cb659d9c21466ed39b360) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -3429,16 +3275,12 @@ 0x0a588c-0x184b17 is the non-Checksummed range still containing data but NOT covered by Checksum 0x0a588c-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "chg1195.u7", 0x000000, 0x80000, CRC(0bd17338) SHA1(b8f467bdf8d76533a2b7d44fe93be414f25a3c31) ) ROM_LOAD32_WORD( "chg1195.u11", 0x000002, 0x80000, CRC(4c407deb) SHA1(57589e61a376ddff99cd420eb47bf8c902c6a249) ) ROM_LOAD32_WORD( "chg1195.u8", 0x100000, 0x80000, CRC(33f52052) SHA1(89cbfe588d91244adff4c520fa94962d69ff20bf) ) ROM_LOAD32_WORD( "chg1195.u12", 0x100002, 0x80000, CRC(00bb7597) SHA1(f4d6b21091e320a82d59477469340633b001ed0d) ) - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) - ROM_REGION16_BE( 0x100, "eeprom0", 0 ) ROM_LOAD16_WORD_SWAP( "eeprom0", 0x000000, 0x000100, CRC(fea8a821) SHA1(c744cac6af7621524fc3a2b0a9a135a32b33c81b) ) @@ -3466,15 +3308,11 @@ 0x044574-0x1cb32b is the non-Checksummed range still containing data but NOT covered by Checksum 0x044574-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0300111v.u7", 0x000000, 0x80000, CRC(70ba3771) SHA1(d03b23c27a80bab883f18ca3404f7a20989c1dd6) ) ROM_LOAD32_WORD( "0300111v.u11", 0x000002, 0x80000, CRC(9a656fb9) SHA1(219354ae79e95948963ab618ba2f45f8b614f9dc) ) ROM_LOAD32_WORD( "0300111v.u8", 0x100000, 0x80000, CRC(5e29eceb) SHA1(4c4b16412aedc521959446585d5aa7e67c19bae5) ) ROM_LOAD32_WORD( "0300111v.u12", 0x100002, 0x80000, CRC(10cf45b3) SHA1(3f47682ed95f65bdb267f911e113e329ad448167) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -3492,15 +3330,11 @@ 0x0431d4-0x1cb32b is the non-Checksummed range still containing data but NOT covered by Checksum 0x0431d4-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0200111v.u7", 0x000000, 0x80000, CRC(fbfaa3fe) SHA1(3f915261503fc97eb556422e9ccdac81372c04cc) ) ROM_LOAD32_WORD( "0200111v.u11", 0x000002, 0x80000, CRC(ed4e8dca) SHA1(1953033e570634cbcf8cd11194c14c57ffc6be53) ) ROM_LOAD32_WORD( "0200111v.u8", 0x100000, 0x80000, CRC(cc0d567c) SHA1(c4da3d0c0c4420a9f8fbb6403db983b3e27d4b50) ) ROM_LOAD32_WORD( "0200111v.u12", 0x100002, 0x80000, CRC(0ad41815) SHA1(131efc6ed45d8f44a667bd30380c9e37c64f2c42) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -3511,17 +3345,13 @@ ARISTOCRAT_MK5_GALS ARISTOCRAT_MK5_EEPROM // checksum code not found due to ROMs being corrupted, all files are missing bytes consisting of 0x0D - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "ahg1533.u7", 0x000000, 0x7efb1, BAD_DUMP CRC(b228ed66) SHA1(a92e403b4df2054693787f48e988613843731f9e) ) ROM_LOAD32_WORD( "ahg1533.u11", 0x000002, 0x7ff0f, BAD_DUMP CRC(a1c66732) SHA1(2b3fa6c86a2f43f3b857c3bff55343859dd52943) ) ROM_LOAD32_WORD( "ahg1533.u8", 0x100000, 0x7faf6, BAD_DUMP CRC(66b7e33b) SHA1(5e337aeda6f99de16a655bd635ea65f1d2145a67) ) ROM_LOAD32_WORD( "ahg1533.u12", 0x100002, 0x7faef, BAD_DUMP CRC(615c2343) SHA1(9bb85f97ca8345d80e088fbb7ac5caea360af529) ) ROM_LOAD32_WORD( "ahg1533.u9", 0x200000, 0x7fff6, BAD_DUMP CRC(be004ff5) SHA1(2827e5be3c21acf2002647729f163659195a461a) ) ROM_LOAD32_WORD( "ahg1533.u13", 0x200002, 0x7ffeb, BAD_DUMP CRC(612a6bf2) SHA1(01ee8854204da0610aa4ab3a36c3e517906d2ab4) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -3539,17 +3369,13 @@ 0x063aa0-0x273ea3 is the non-Checksummed range still containing data but NOT covered by Checksum 0x063aa0-0x2fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0101018v.u7", 0x000000, 0x80000, CRC(2ebb3704) SHA1(42567d873d6ab9221d09e5449fa57b557677d2ab) ) ROM_LOAD32_WORD( "0101018v.u11", 0x000002, 0x80000, CRC(ff4c684a) SHA1(6598c24a8717b8e624e387f000c584ec3b10a8cd) ) ROM_LOAD32_WORD( "0101018v.u8", 0x100000, 0x80000, CRC(daa55b3b) SHA1(7aa96a51a3ea9f96c38d08e486eccc54ca4396a3) ) ROM_LOAD32_WORD( "0101018v.u12", 0x100002, 0x80000, CRC(62209e81) SHA1(68383068de2e030467c3f3ac16459ae2f3b2cce6) ) ROM_LOAD32_WORD( "0101018v.u9", 0x200000, 0x80000, CRC(2254f0e9) SHA1(5bccd65e7e616e1f6ed08a0c84862cb13f9f7098) ) ROM_LOAD32_WORD( "0101018v.u13", 0x200002, 0x80000, CRC(952a850f) SHA1(66da391af532f9ef531d10995c96a90eb71cd09a) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -3565,13 +3391,9 @@ Calculated Checksum 0x87d3b331 (OK) 0x054f40-0x0ef137 is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0200302v.u7", 0x000000, 0x80000, CRC(d90032f9) SHA1(9c34e626168bdfa3ff2722d9ff1970d826135cf7) ) ROM_LOAD32_WORD( "0200302v.u11", 0x000002, 0x80000, CRC(29620f05) SHA1(172b6226c443931f0c4ddc44a63c8fc0e6be3824) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASEFF ) ROM_END @@ -3582,15 +3404,11 @@ ARISTOCRAT_MK5_GALS ARISTOCRAT_MK5_EEPROM // checksum code not found (uses different startup sequence) - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0400433v.u7", 0x000000, 0x80000, CRC(71b19365) SHA1(5a8ba1806af544d33e9acbcbbc0555805b4074e6) ) ROM_LOAD32_WORD( "0400433v.u11", 0x000002, 0x80000, CRC(3d836342) SHA1(b015a4ba998b39ed86cdb6247c9c7f1365641b59) ) ROM_LOAD32_WORD( "0400433v.u8", 0x100000, 0x80000, CRC(971bbf63) SHA1(082f81115209c7089c76fb207248da3c347a080b) ) ROM_LOAD32_WORD( "0400433v.u12", 0x100002, 0x80000, CRC(9e0d08e2) SHA1(38b10f7c37f1cefe9271549073dc0a4fed409aec) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASEFF ) ROM_END @@ -3606,13 +3424,9 @@ Calculated Checksum 0x14ccd8a1 (OK) 0x05c368-0x0fe787 is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0200424v.u7", 0x000000, 0x80000, CRC(5dd88306) SHA1(ee8ec7d123d057e8df9be0e8dadecea7dab7aafd) ) ROM_LOAD32_WORD( "0200424v.u11", 0x000002, 0x80000, CRC(bcb732ea) SHA1(838300914846c6e740780e5a24b9db7304a8a88d) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -3630,15 +3444,11 @@ 0x053898-0x1cac2f is the non-Checksummed range still containing data but NOT covered by Checksum 0x053898-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100424v.u7", 0x000000, 0x80000, CRC(657faef7) SHA1(09e1f9d461e855c10cf8b825ef83dd3e7db65b43) ) ROM_LOAD32_WORD( "0100424v.u11", 0x000002, 0x80000, CRC(65aa46ec) SHA1(3ad4270efbc2e947097d94a3258a544d79a1d599) ) ROM_LOAD32_WORD( "0100424v.u8", 0x100000, 0x80000, CRC(e77868ad) SHA1(3345da120075bc0da47bac0a4840790693382620) ) ROM_LOAD32_WORD( "0100424v.u12", 0x100002, 0x80000, CRC(6abd9309) SHA1(c405a13f5bfe447c1ab20d92e140e4fb145920d4) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -3655,15 +3465,11 @@ 0x0536c4-0x1ce293 is the non-Checksummed range still containing data but NOT covered by Checksum 0x0536c4-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100388v.u7", 0x000000, 0x80000, CRC(7463b5f6) SHA1(89e5cf8143d0b4ed54aa2c9bd8840f0aba19322e) ) ROM_LOAD32_WORD( "0100388v.u11", 0x000002, 0x80000, CRC(8e391b67) SHA1(4b7a7295d3a96e26bf1958eb30af0b6582a5e5a6) ) ROM_LOAD32_WORD( "0100388v.u8", 0x100000, 0x80000, CRC(195bec0f) SHA1(86bdc53e682476c2d90c5e51d4bccdc048d22e7f) ) ROM_LOAD32_WORD( "0100388v.u12", 0x100002, 0x80000, CRC(1a1fbbcf) SHA1(6e3772dcccd9b5958bec3bfac9af22b2eabca32e) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -3683,7 +3489,7 @@ Calculated Checksum 0x06f7ea7e (OK) 0x0f24a4-0x356213 is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "ahg1607.u7", 0x000000, 0x80000, CRC(60a4643f) SHA1(e72de7218ee57d5fc0b316252366437592ef6000) ) ROM_LOAD32_WORD( "ahg1607.u11", 0x000002, 0x80000, CRC(55d65ff6) SHA1(e36dd58fbaf1fb5fbcc6586535acff6af5f23067) ) ROM_LOAD32_WORD( "ahg1607.u8", 0x100000, 0x80000, CRC(b2b403e7) SHA1(00ea248773a2acc4c5d71a24ce22f206df1888b2) ) @@ -3692,10 +3498,6 @@ ROM_LOAD32_WORD( "ahg1607.u13", 0x200002, 0x80000, CRC(cb057b1e) SHA1(7853305fa618bfd34b418cd1c3519b3bb8a7d8f0) ) ROM_LOAD32_WORD( "ahg1607.u10", 0x300000, 0x80000, CRC(84d056b3) SHA1(eb3c496fae1e35cc334ff3bb92d444d9fd00efee) ) ROM_LOAD32_WORD( "ahg1607.u14", 0x300002, 0x80000, CRC(6f522ffb) SHA1(0fbba6b8df15631e4361daf505469f2214ad8695) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -3715,7 +3517,7 @@ Calculated Checksum 0x60cc71fc (OK) 0x0f2308-0x356077 is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "ahg1606.u7", 0x000000, 0x80000, CRC(d468edf7) SHA1(100672d09184e06130ce253749bd9e20ee0a06d4) ) ROM_LOAD32_WORD( "ahg1606.u11", 0x000002, 0x80000, CRC(0fe64635) SHA1(b504216e59984951b46701019f87cad759ab60f2) ) ROM_LOAD32_WORD( "ahg1606.u8", 0x100000, 0x80000, CRC(a53a2de4) SHA1(1741af795f88e867021f3c08d8990611d893a8e8) ) @@ -3724,10 +3526,6 @@ ROM_LOAD32_WORD( "ahg1606.u13", 0x200002, 0x80000, CRC(d6aa89fe) SHA1(eccb49d49f533aeed9fefb14018bcc06d3fdaf23) ) ROM_LOAD32_WORD( "ahg1606.u10", 0x300000, 0x80000, CRC(0be76189) SHA1(a458f620f48b9f4a73f59d31ba98864c5a64e1d7) ) ROM_LOAD32_WORD( "ahg1606.u14", 0x300002, 0x80000, CRC(c6c59ed6) SHA1(0ce8e5824c5937ffe2eeb34320db9dc568bca7cb) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -3747,7 +3545,7 @@ Calculated Checksum 0x18884f4e (OK) 0x0eeb04-0x35287b is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "ahg1519.u7", 0x000000, 0x80000, CRC(7246836c) SHA1(95e6230bf49bb9099b497ee6ff11cd69279ecc6d) ) ROM_LOAD32_WORD( "ahg1519.u11", 0x000002, 0x80000, CRC(e7ea2c1f) SHA1(85f462aa5fdc9528081e81151d8fad2fe9fbda3d) ) ROM_LOAD32_WORD( "ahg1519.u8", 0x100000, 0x80000, CRC(0110edaf) SHA1(84367fd01daff36c25aff591ab3eecfc841b4d19) ) @@ -3756,10 +3554,6 @@ ROM_LOAD32_WORD( "ahg1519.u13", 0x200002, 0x80000, CRC(82e7be90) SHA1(b513a75eb6514f10493534e46f69ed7f5a470cd3) ) ROM_LOAD32_WORD( "ahg1519.u10", 0x300000, 0x80000, CRC(bf226a58) SHA1(2d726c7b53652f0782a942aeaa15295454378ce3) ) ROM_LOAD32_WORD( "ahg1519.u14", 0x300002, 0x80000, CRC(f2da081c) SHA1(5202741719d72a9290bda2c646d37e8c8ad41c04) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -3776,15 +3570,11 @@ 0x0806ac-0x1ad0c7 is the non-Checksummed range still containing data but NOT covered by Checksum 0x0806ac-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0101250v.u7", 0x000000, 0x80000, CRC(4d38af9a) SHA1(4f0bc990b33b8421bde4473d22ad8ca55fc407c9) ) ROM_LOAD32_WORD( "0101250v.u11", 0x000002, 0x80000, CRC(f9750215) SHA1(8e44be5c83a1f75a95c856729cfc84c270649caf) ) ROM_LOAD32_WORD( "0101250v.u8", 0x100000, 0x80000, CRC(7d82a406) SHA1(c3757597fe9c484de71d81cb02046f6cca27ff44) ) ROM_LOAD32_WORD( "0101250v.u12", 0x100002, 0x80000, CRC(35236e6f) SHA1(f196f12a1761a235ad66f4e181ca249b1df7e245) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -3803,16 +3593,12 @@ 0x08ec8c-0x13d99f is the non-Checksummed range still containing data but NOT covered by Checksum 0x08ec8c-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "fhg407702.u7", 0x000000, 0x80000, CRC(97e3e4d0) SHA1(211b9b9e0f25dfaf9d1dfe1d3d88592522aa6f07) ) ROM_LOAD32_WORD( "fhg407702.u11", 0x000002, 0x80000, CRC(de221eb5) SHA1(0e550e90b7fd5670f3f3a8589239c342ed70dc3d) ) ROM_LOAD32_WORD( "fhg407702.u8", 0x100000, 0x80000, CRC(cb3ca8b6) SHA1(dba8bdaa406c07870f95241466359e39a012a70b) ) ROM_LOAD32_WORD( "fhg407702.u12", 0x100002, 0x80000, CRC(8ee1c2d3) SHA1(e6ecaaac0cb4518ecc0d36532ab532f46e3e628b) ) - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) - ROM_REGION16_BE( 0x100, "eeprom0", 0 ) ROM_LOAD16_WORD_SWAP( "eeprom0", 0x000000, 0x000100, CRC(fea8a821) SHA1(c744cac6af7621524fc3a2b0a9a135a32b33c81b) ) @@ -3840,13 +3626,9 @@ Calculated Checksum 0x2b2fe66e (OK) 0x05891c-0x0e689f is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100521v.u7", 0x000000, 0x80000, CRC(db9c952d) SHA1(4cbe3ffe6cf0bb112cb9a2d7a4ff0b28154d32c1) ) ROM_LOAD32_WORD( "0100521v.u11", 0x000002, 0x80000, CRC(2bb47749) SHA1(796f610e5202b5eb26a6e901d43ee5d9e3f95332) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -3857,15 +3639,11 @@ ARISTOCRAT_MK5_GALS ARISTOCRAT_MK5_EEPROM // checksum code not found (uses different startup sequence) - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0200586v.u7", 0x000000, 0x80000, CRC(6d52fcd1) SHA1(136cb89037a96bf6824ed5754fc67167f0287684) ) ROM_LOAD32_WORD( "0200586v.u11", 0x000002, 0x80000, CRC(6b0d58b8) SHA1(3c70d294673deb38d737099880fdbd04e2dc20e6) ) ROM_LOAD32_WORD( "0200586v.u8", 0x100000, 0x80000, CRC(d0a2fb07) SHA1(a05468f36ee1024399780e92825803908f416d80) ) ROM_LOAD32_WORD( "0200586v.u12", 0x100002, 0x80000, CRC(0b3e03d3) SHA1(966ec84aff686ad360d440995b81ae469539a5b5) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -3882,17 +3660,13 @@ 0x07031c-0x227a4b is the non-Checksummed range still containing data but NOT covered by Checksum 0x07031c-0x2fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "01j00081.u7", 0x000000, 0x80000, CRC(73783ecf) SHA1(280b4da540b405959f31c2eebbf87ab635d21c06) ) ROM_LOAD32_WORD( "01j00081.u11", 0x000002, 0x80000, CRC(5a0147ae) SHA1(f2135b2525eb50a03a8f6360e7edb92bf0b88740) ) ROM_LOAD32_WORD( "01j00081.u8", 0x100000, 0x80000, CRC(e686eab2) SHA1(6eb18adda82357ff84f77e9334733094430dfdc6) ) ROM_LOAD32_WORD( "01j00081.u12", 0x100002, 0x80000, CRC(beee94ff) SHA1(fad0d3506d10330840d3e5fcdfd7f0aa20041969) ) ROM_LOAD32_WORD( "01j00081.u9", 0x200000, 0x80000, CRC(28a45170) SHA1(d7bb8e4dd24e3a3acf44e7fc40e49ebee5c15ec9) ) ROM_LOAD32_WORD( "01j00081.u13", 0x200002, 0x80000, CRC(d204ff9c) SHA1(8ac5533928fb3ca247dc85cea67da45a6743f732) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -3903,17 +3677,13 @@ ARISTOCRAT_MK5_GALS ARISTOCRAT_MK5_EEPROM // checksum code not found due to ROMs being corrupted, first 4 files are missing bytes consisting of 0x0D - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "chg1562.u7", 0x000000, 0x7f023, BAD_DUMP CRC(c69c989c) SHA1(6eeadf185a38944c6c0c32777c006f27505eaa73) ) ROM_LOAD32_WORD( "chg1562.u11", 0x000002, 0x7ff1e, BAD_DUMP CRC(693b28cf) SHA1(06ca74d5f7a1e0cd315f4b0dc5182db1f3cfa5a7) ) ROM_LOAD32_WORD( "chg1562.u8", 0x100000, 0x7fe83, BAD_DUMP CRC(5b585157) SHA1(e7d11b959f02f4cf35413ea59220c751653cb0c7) ) ROM_LOAD32_WORD( "chg1562.u12", 0x100002, 0x7fe8c, BAD_DUMP CRC(39e6017d) SHA1(5f5dd611b51ad91b6de8bce7de5efc4e48fd02a3) ) ROM_LOAD32_WORD( "chg1562.u9", 0x200000, 0x80000, CRC(5311546c) SHA1(83eff3a0382a19b315be4612bcdc5280049b10f1) ) ROM_LOAD32_WORD( "chg1562.u13", 0x200002, 0x80000, CRC(5a2220d7) SHA1(aca5fefb60af93ba776cc695e9a7ea406f527937) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -3929,13 +3699,9 @@ Calculated Checksum 0xed424efa (OK) 0x06328c-0x0d4b57 is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100652v.u7", 0x000000, 0x80000, CRC(d9afe87c) SHA1(577ea5da9c4e93a393711a0c7361365301f4241e) ) ROM_LOAD32_WORD( "0100652v.u11", 0x000002, 0x80000, CRC(35233cf8) SHA1(e02477526f2f9e2663c1876f543d138b2caf28df) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -3951,13 +3717,9 @@ Calculated Checksum 0x2c99855f (OK) 0x045da4-0x0ebd43 is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0400122v.u7", 0x000000, 0x80000, CRC(b5829b27) SHA1(f6f84c8dc524dcee95e37b93ead9090903bdca4f) ) ROM_LOAD32_WORD( "0400122v.u11", 0x000002, 0x80000, CRC(7a97adc8) SHA1(b52f7fdc7edf9ad92351154c01b8003c0576ed94) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -3969,7 +3731,7 @@ ARISTOCRAT_MK5_GALS ARISTOCRAT_MK5_EEPROM // checksum code not found due to ROMs being corrupted, first 6 files are missing bytes consisting of 0x0D - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "chg1536.u7", 0x000000, 0x7efd4, BAD_DUMP CRC(d29185cc) SHA1(26154f3d99907461cff4a44fe02929fae66e6963) ) ROM_LOAD32_WORD( "chg1536.u11", 0x000002, 0x7feab, BAD_DUMP CRC(4ea1bd5d) SHA1(86ffabb11550a932006549496772bdd0d27aa384) ) ROM_LOAD32_WORD( "chg1536.u8", 0x100000, 0x7f753, BAD_DUMP CRC(d439857a) SHA1(8d8d85f36253c89a8e5fb825761284ddd44890c4) ) @@ -3978,10 +3740,6 @@ ROM_LOAD32_WORD( "chg1536.u13", 0x200002, 0x7eab3, BAD_DUMP CRC(653240e4) SHA1(20a196a2b77416d1490f3d7d4d66dd69ef8c59b2) ) ROM_LOAD32_WORD( "chg1536.u10", 0x300000, 0x80000, CRC(e1301711) SHA1(b7778b9d3faba0e807b7806f2837d57b0c6a3338) ) ROM_LOAD32_WORD( "chg1536.u14", 0x300002, 0x80000, CRC(113238a6) SHA1(145467e1f015543d23bb4a377d71949693f21c34) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -4002,7 +3760,7 @@ Calculated Checksum 0xdb27a86b (OK) 0x0f29e8-0x31ee8f is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "ahg1615.u7", 0x000000, 0x80000, CRC(a08e6be6) SHA1(ab7aa0a333fbf1c4bbea82a55651b2c32b0c9fb8) ) ROM_LOAD32_WORD( "ahg1615.u11", 0x000002, 0x80000, CRC(4cbbeb31) SHA1(76d6283627be2e4e7e9e097aa9e4590348a018e7) ) ROM_LOAD32_WORD( "ahg1615.u8", 0x100000, 0x80000, CRC(cf79a2b7) SHA1(fb2c5ef26c81fc5d8f572f1e97d2cbadfd9a6f70) ) @@ -4011,10 +3769,6 @@ ROM_LOAD32_WORD( "ahg1615.u13", 0x200002, 0x80000, CRC(68a732f0) SHA1(f98ba7f1d6def1783e819291ff8a58f6a7f72350) ) ROM_LOAD32_WORD( "ahg1615.u10", 0x300000, 0x80000, CRC(cb131b54) SHA1(8075be3f0251e696254336277703f9b956097a50) ) ROM_LOAD32_WORD( "ahg1615.u14", 0x300002, 0x80000, CRC(961fd1b3) SHA1(59c2280258b98bc0153b6dc08d1af026de5b3ed3) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -4035,15 +3789,11 @@ 0x0a5234-0x15dbdf is the non-Checksummed range still containing data but NOT covered by Checksum 0x0a5234-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "jhg041503.u7", 0x000000, 0x80000, CRC(48a87915) SHA1(103f79f482b4e1ba3653280cdcf1ac6718981faf) ) // 94.97% ROM_LOAD32_WORD( "jhg041503.u11", 0x000002, 0x80000, CRC(beb31b6d) SHA1(454fe5b04789e6f45d82d92f808fde5770435a80) ) // 94.97% ROM_LOAD32_WORD( "jhg041503.u8", 0x100000, 0x80000, CRC(002dec6c) SHA1(fb3f4ce9cd8cd9e0e3133376ed014db83db041c5) ) // base ROM_LOAD32_WORD( "jhg041503.u12", 0x100002, 0x80000, CRC(c968471f) SHA1(9d54a5c396e6f83690db2fcb7ddcc8a47a7dd777) ) // base - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -4064,15 +3814,11 @@ 0x0a5234-0x15dbdf is the non-Checksummed range still containing data but NOT covered by Checksum 0x0a5234-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "jhg041599.u7", 0x000000, 0x80000, CRC(394d93a0) SHA1(5dd91ef55da4b6c8f0866c21d8d4ae9e18ab1bb0) ) // 88,26% ROM_LOAD32_WORD( "jhg041599.u11", 0x000002, 0x80000, CRC(3f542a64) SHA1(36de7fc85f2424a62f322de2ef82e061d2335526) ) // 88,26% ROM_LOAD32_WORD( "jhg041599.u8", 0x100000, 0x80000, CRC(002dec6c) SHA1(fb3f4ce9cd8cd9e0e3133376ed014db83db041c5) ) // base ROM_LOAD32_WORD( "jhg041599.u12", 0x100002, 0x80000, CRC(c968471f) SHA1(9d54a5c396e6f83690db2fcb7ddcc8a47a7dd777) ) // base - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -4089,15 +3835,11 @@ 0x05c0e8-0x1e5b5b is the non-Checksummed range still containing data but NOT covered by Checksum 0x05c0e8-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100651v.u7", 0x000000, 0x80000, CRC(a68d21ff) SHA1(082d2985d9037465d998d9176b7e5447189fae01) ) ROM_LOAD32_WORD( "0100651v.u11", 0x000002, 0x80000, CRC(2945baed) SHA1(bcafb84e3935912e47b4396c488ecfd3c1b19124) ) ROM_LOAD32_WORD( "0100651v.u8", 0x100000, 0x80000, CRC(fbad0352) SHA1(d202d46f117095ac19347b9cd31e7252b5f76d6e) ) ROM_LOAD32_WORD( "0100651v.u12", 0x100002, 0x80000, CRC(d591dfb6) SHA1(9a1c1070b7e8774928d684c45481d72ce5108bf1) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -4114,7 +3856,7 @@ 0x07038c-0x3616a7 is the non-Checksummed range still containing data but NOT covered by Checksum 0x07038c-0x3fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "01j00131.u7", 0x000000, 0x80000, CRC(78394106) SHA1(aedfb98d7aa515eebabf378edb9c43e01bcba010) ) ROM_LOAD32_WORD( "01j00131.u11", 0x000002, 0x80000, CRC(faab1283) SHA1(6200fc2047c4052e4fc3c2d28b26cd9ff67a08be) ) ROM_LOAD32_WORD( "01j00131.u8", 0x100000, 0x80000, CRC(7ce4ba38) SHA1(43b57e4dc96851f58d95e4f1b99d08f559e27f6a) ) @@ -4123,10 +3865,6 @@ ROM_LOAD32_WORD( "01j00131.u13", 0x200002, 0x80000, CRC(d0dd6627) SHA1(ea855da1759a27936615400993b381609071d66c) ) ROM_LOAD32_WORD( "01j00131.u10", 0x300000, 0x80000, CRC(f2790419) SHA1(8720c37cc678e7c5666c67b9998fbb460a8aad90) ) ROM_LOAD32_WORD( "01j00131.u14", 0x300002, 0x80000, CRC(507bbe10) SHA1(01b1982c02a00b60aa39ee1b408d653365f728d4) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -4137,7 +3875,7 @@ ARISTOCRAT_MK5_GALS ARISTOCRAT_MK5_EEPROM // checksum code not found due to ROMs being corrupted, 7 out of 8 files are missing bytes consisting of 0x0D - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "bhg1566.u7", 0x000000, 0x7f050, BAD_DUMP CRC(07c896ae) SHA1(5d275f3759253d2aa3eeef4d6ce973e9a3b5e421) ) ROM_LOAD32_WORD( "bhg1566.u11", 0x000002, 0x7ff76, BAD_DUMP CRC(e6459275) SHA1(7329204db5d8b9f378918936e46d1b61e6cd2191) ) ROM_LOAD32_WORD( "bhg1566.u8", 0x100000, 0x7e211, BAD_DUMP CRC(6f26925f) SHA1(8656fe440a123a2fb5e1a801295163bd1244a0c6) ) @@ -4146,10 +3884,6 @@ ROM_LOAD32_WORD( "bhg1566.u13", 0x200002, 0x7fb29, BAD_DUMP CRC(ed5d7c4a) SHA1(f8288581364bca9ceb96ab9359803c90c520b3ab) ) ROM_LOAD32_WORD( "bhg1566.u10", 0x300000, 0x80000, CRC(627109ba) SHA1(6689e8cfa7d31fa9471bbde75a5ea97f16ddc00a) ) ROM_LOAD32_WORD( "bhg1566.u14", 0x300002, 0x7ffff, BAD_DUMP CRC(4fba6570) SHA1(46bb22ba10dc69c70241dfbb00e86ffa5b28fd1c) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -4170,15 +3904,11 @@ 0x08f46c-0x1354cb is the non-Checksummed range still containing data but NOT covered by Checksum 0x08f46c-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "ehg091602.u7", 0x000000, 0x80000, CRC(084167e3) SHA1(ec10a3f1a52ec4a2e2b4e1f303c1cbc048d1331b) ) // 92.268% ROM_LOAD32_WORD( "ehg091602.u11", 0x000002, 0x80000, CRC(049b027c) SHA1(8212708c63003e6fd95ce2ee32d46dc4a26ab3c3) ) // 92.268% ROM_LOAD32_WORD( "ehg091602.u8", 0x100000, 0x80000, CRC(e2221fdf) SHA1(8a7b2d5de68ae66fe1915a6faac6277249e3fb53) ) // base ROM_LOAD32_WORD( "ehg091602.u12", 0x100002, 0x80000, CRC(ebe957f9) SHA1(539945ec9beafe2c83051208370588fce2334f16) ) // base - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -4189,17 +3919,13 @@ ARISTOCRAT_MK5_GALS ARISTOCRAT_MK5_EEPROM // checksum code not found (uses different startup sequence) - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0101408v.u7", 0x000000, 0x80000, CRC(ebdde248) SHA1(83f4f4deb5c6f5b33ae066d50e043a24cb0cbfe0) ) ROM_LOAD32_WORD( "0101408v.u11", 0x000002, 0x80000, CRC(2f9e7cd4) SHA1(e9498879c9ca66740856c00fda0416f5d9f7c823) ) ROM_LOAD32_WORD( "0101408v.u8", 0x100000, 0x80000, CRC(87e41b1b) SHA1(029687aeaed701e0f4b8da9d1d60a5a0a9445518) ) ROM_LOAD32_WORD( "0101408v.u12", 0x100002, 0x80000, CRC(255f2368) SHA1(eb955452e1ed8d9d4f30f3372d7321f01d3654d3) ) ROM_LOAD32_WORD( "0101408v.u9", 0x200000, 0x80000, CRC(5f161953) SHA1(d07353d006811813b94cb022857f49c4906fd87b) ) ROM_LOAD32_WORD( "0101408v.u13", 0x200002, 0x80000, CRC(5ef6323e) SHA1(82a720d814ca06c6d286c59bbf325d9a1034375a) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -4210,7 +3936,7 @@ ARISTOCRAT_MK5_GALS ARISTOCRAT_MK5_EEPROM // checksum code not found (uses different startup sequence) - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0200894v.u7", 0x000000, 0x80000, CRC(20ec3b50) SHA1(400ad7f86077184fee63690060fe2a51ba888e1b) ) ROM_LOAD32_WORD( "0200894v.u11", 0x000002, 0x80000, CRC(88c304a3) SHA1(013d5d1d62b356ce5cdf0c9b036c4ca09f191668) ) ROM_LOAD32_WORD( "0200894v.u8", 0x100000, 0x80000, CRC(341bac7b) SHA1(67df39b8070f6d9afd183b04239d9e2844d588c5) ) @@ -4219,10 +3945,6 @@ ROM_LOAD32_WORD( "0200894v.u13", 0x200002, 0x80000, CRC(26f51647) SHA1(e980c021d8e2d295ba2d50446b36b85f42d3f318) ) ROM_LOAD32_WORD( "0200894v.u10", 0x300000, 0x80000, CRC(ea460e72) SHA1(4546e04cc04239528c93e22532db08fccebda8a8) ) ROM_LOAD32_WORD( "0200894v.u14", 0x300002, 0x80000, CRC(52092ffb) SHA1(6ed591a510e9186588470ec745caf8001712012e) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -4241,7 +3963,7 @@ Calculated Checksum 0x36907c47 (OK) 0x0f19c0-0x3b1443 is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "ahg1623.u7", 0x000000, 0x80000, CRC(bee526f8) SHA1(32227a6655393a966af3ab698388146f0b752c67) ) // game ROM_LOAD32_WORD( "ahg1623.u11", 0x000002, 0x80000, CRC(177ffc12) SHA1(4cedadcf8ddfb95aff7aa0ece96411646677ff96) ) // game ROM_LOAD32_WORD( "ahg1623.u8", 0x100000, 0x80000, CRC(22657930) SHA1(8a6db02ce1c45a19d6e6f222788f607224b8af43) ) // base @@ -4250,10 +3972,6 @@ ROM_LOAD32_WORD( "ahg1623.u13", 0x200002, 0x80000, CRC(5c658f42) SHA1(0f1b2d79c0c15562f14e59bb424a9c62df6bd959) ) // base ROM_LOAD32_WORD( "ahg1623.u10", 0x300000, 0x80000, CRC(613cb7d8) SHA1(bfd6606f809f5eb2c81802539b5ab7e2a63046a1) ) // base ROM_LOAD32_WORD( "ahg1623.u14", 0x300002, 0x80000, CRC(5ceb871c) SHA1(42b8a087fa39261818dd333ea3d8c1ef269671bf) ) // base - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -4270,15 +3988,11 @@ 0x05ebcc-0x1bf9db is the non-Checksummed range still containing data but NOT covered by Checksum 0x05ebcc-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100767v.u7", 0x000000, 0x80000, CRC(a5d3825e) SHA1(4ce7466eff770a2c6c3c5de620a14e05bb9fb406) ) ROM_LOAD32_WORD( "0100767v.u11", 0x000002, 0x80000, CRC(737d7178) SHA1(df788eea23b15415adc94543476b6ad982c4d79b) ) ROM_LOAD32_WORD( "0100767v.u8", 0x100000, 0x80000, CRC(fe59ec8b) SHA1(b43778b51a0d695c179fa63ce45a47b9f550fb97) ) ROM_LOAD32_WORD( "0100767v.u12", 0x100002, 0x80000, CRC(49eb3869) SHA1(d98fe385c667872f26d656a3240f557a70ba924f) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -4299,15 +4013,11 @@ 0x08ec84-0x1aca63 is the non-Checksummed range still containing data but NOT covered by Checksum 0x08ec84-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "ahg120503.u7", 0x000000, 0x80000, CRC(2fbed80c) SHA1(fb0d97cb2be96da37c487fc3aef06c6120efdb46) ) ROM_LOAD32_WORD( "ahg120503.u11", 0x000002, 0x80000, CRC(ec9c183c) SHA1(e405082ee779c4fee103fb7384469c9d6afbc95b) ) ROM_LOAD32_WORD( "ahg120503.u8", 0x100000, 0x80000, CRC(3cd7d8e5) SHA1(ae83a7c335564c398330d43295997b8ca547c92d) ) ROM_LOAD32_WORD( "ahg120503.u12", 0x100002, 0x80000, CRC(8bbf45d0) SHA1(f58f28e7cc4ac225197959566d81973b5aa0e836) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -4328,15 +4038,11 @@ 0x08ef14-0x1aca3b is the non-Checksummed range still containing data but NOT covered by Checksum 0x08ef14-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "ahg120699.u7", 0x000000, 0x80000, CRC(19d21119) SHA1(de809e098a676f3d5f2c2750c5f7c97ee4c836a7) ) ROM_LOAD32_WORD( "ahg120699.u11", 0x000002, 0x80000, CRC(0f585009) SHA1(2e93caba45d5a79db2d7fd3a15da432afe05e59c) ) ROM_LOAD32_WORD( "ahg120699.u8", 0x100000, 0x80000, CRC(df1ffb31) SHA1(1cf9d008b1f8fdb06ba050c97dae79f272c8063c) ) ROM_LOAD32_WORD( "ahg120699.u12", 0x100002, 0x80000, CRC(13021157) SHA1(6beb8dea66659b5ec9cbb8dcd921c30a621049a9) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -4356,7 +4062,7 @@ Calculated Checksum 0x5ad8a58b (OK) 0x089a30-0x1b4043 is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) // these are the 'bios' for Casino games (could be moved to a different base set) ROM_LOAD32_WORD( "0700474v.u7", 0x000000, 0x80000, CRC(04b7dcbf) SHA1(eded1223336181bb08f9593247f1f79d96278b75) ) ROM_LOAD32_WORD( "0700474v.u11", 0x000002, 0x80000, CRC(a89ce1b5) SHA1(411b474a111f23ebd834bea5af0bf0cf3926d590) ) @@ -4365,10 +4071,6 @@ ROM_LOAD32_WORD( "0100878v.u12", 0x100002, 0x80000, CRC(acb3de77) SHA1(e0e337d6efbd6ee8e0c0ec2653c3dc0bd5741ff4) ) ROM_LOAD32_WORD( "0100878v.u9", 0x200000, 0x80000, CRC(0a2f6903) SHA1(11fd913f8c3a677ae07c7ec50548a82c1eaf63ee) ) ROM_LOAD32_WORD( "0100878v.u13", 0x200002, 0x80000, CRC(0df660be) SHA1(73d370d90655dada34f2b5b2209652632c34a22e) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -4385,17 +4087,13 @@ 0x068298-0x285abf is the non-Checksummed range still containing data but NOT covered by Checksum 0x068298-0x2fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0101164v.u7", 0x000000, 0x80000, CRC(2f75d5f7) SHA1(d7f6ecff7cf759d80733b6d3f224caa5128be0b7) ) ROM_LOAD32_WORD( "0101164v.u11", 0x000002, 0x80000, CRC(06a871c7) SHA1(95464d74c2295196e367e34efb816acedcd71265) ) ROM_LOAD32_WORD( "0101164v.u8", 0x100000, 0x80000, CRC(940eabd7) SHA1(8d41b3fa27c827a7671b095618ac53750e6017f6) ) ROM_LOAD32_WORD( "0101164v.u12", 0x100002, 0x80000, CRC(21c4a2d2) SHA1(77a24a5f98aad090223d301919645b5011667c28) ) ROM_LOAD32_WORD( "0101164v.u9", 0x200000, 0x80000, CRC(b1cac0e7) SHA1(87f393a75c09e96a7fb893a767edcc81044e4fe3) ) ROM_LOAD32_WORD( "0101164v.u13", 0x200002, 0x80000, CRC(8f62ccc5) SHA1(5105313192ab8dfd522b921c70b8b03a8a61ac63) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -4412,17 +4110,13 @@ 0x06f02c-0x281a27 is the non-Checksummed range still containing data but NOT covered by Checksum 0x06f02c-0x2fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "03j00241.u7", 0x000000, 0x80000, CRC(9c0c3a68) SHA1(39e8be61ea8e47fcb8006868518d9de464dc63da) ) ROM_LOAD32_WORD( "03j00241.u11", 0x000002, 0x80000, CRC(c91bc9e7) SHA1(c8293afa113213e5bd9210b4c3fb0aae11019c4d) ) ROM_LOAD32_WORD( "03j00241.u8", 0x100000, 0x80000, CRC(cc3701fd) SHA1(61419691b91c79aec3bde660895b520b9634237e) ) ROM_LOAD32_WORD( "03j00241.u12", 0x100002, 0x80000, CRC(1f2e3714) SHA1(c4e5809a54c5a10479cbdfbaa7a51c5e36bd8655) ) ROM_LOAD32_WORD( "03j00241.u9", 0x200000, 0x80000, CRC(906b275f) SHA1(71e32cfb97a1063cb363795dd03be0327f6ec3f0) ) ROM_LOAD32_WORD( "03j00241.u13", 0x200002, 0x80000, CRC(d98e20eb) SHA1(6274ceee7ad49a9052b354d9dfc7e3cfa4e61017) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -4443,17 +4137,13 @@ Calculated Checksum 0x576a26b7 (OK) 0x0ed500-0x2f2d0b is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "bhg1455.u7", 0x000000, 0x80000, CRC(ef25e5a1) SHA1(00d7dcb852cc2ccb61c5af15108f8c374419527f) ) ROM_LOAD32_WORD( "bhg1455.u11", 0x000002, 0x80000, CRC(737bd8c8) SHA1(0863ed66ca28ab47945d1c6012740bc559c79b0d) ) ROM_LOAD32_WORD( "bhg1455.u8", 0x100000, 0x80000, CRC(822f408e) SHA1(c31d046a48f28de9d8b90676851c4ea5f30cc732) ) ROM_LOAD32_WORD( "bhg1455.u12", 0x100002, 0x80000, CRC(520f051e) SHA1(c3d5058f753e72852e37dcd94c34a4caabdff161) ) ROM_LOAD32_WORD( "bhg1455.u9", 0x200000, 0x80000, CRC(9c928891) SHA1(7fc4f38b9c06d4d5b27d246fffee3a1fd527d6ad) ) ROM_LOAD32_WORD( "bhg1455.u13", 0x200002, 0x80000, CRC(18dd37fe) SHA1(432a4959886fad4f4a55de31b7cc42c51d7f2792) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -4469,17 +4159,13 @@ Calculated Checksum 0x86b74381 (OK) 0x05f56c-0x23586f is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100872v.u7", 0x000000, 0x80000, CRC(180e098b) SHA1(48782c46a344dba0aaad407d0d4a432da091b0f5) ) ROM_LOAD32_WORD( "0100872v.u11", 0x000002, 0x80000, CRC(f51b411d) SHA1(fbbd587c90cd49bb36653cbd1948bc52f8396a41) ) ROM_LOAD32_WORD( "0100872v.u8", 0x100000, 0x80000, CRC(0c19f5ec) SHA1(95d7c9308b30b5193816e95c4276829612040298) ) ROM_LOAD32_WORD( "0100872v.u12", 0x100002, 0x80000, CRC(0fa00c41) SHA1(79139834d5437b37346322bf632904c473e3463a) ) ROM_LOAD32_WORD( "0100872v.u9", 0x200000, 0x80000, CRC(c82da820) SHA1(98a2710b1f793a7ee1070f89c66d49ce55e4156e) ) ROM_LOAD32_WORD( "0100872v.u13", 0x200002, 0x80000, CRC(00407593) SHA1(4c759fe3267b1782ae84d8ed9134295dfaa0faaf) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -4489,7 +4175,7 @@ ROM_START( incasunsp ) ARISTOCRAT_MK5_GALS ARISTOCRAT_MK5_EEPROM - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) /* Checksum code found at 0x000bf8 0x000000-0x05f70f is the Checksummed Range (excluding 0x000020-0x000027 where Checksum is stored) @@ -4503,10 +4189,6 @@ ROM_LOAD32_WORD( "sp__0100872v.u12", 0x100002, 0x80000, CRC(6633e701) SHA1(02e691c7d18901e70bf8c4e4aa6f856e153f05d4) ) ROM_LOAD32_WORD( "sp__0100872v.u9", 0x200000, 0x80000, CRC(b6035aa7) SHA1(e96e802cda6f20caf523203f2032a88488bdfb65) ) ROM_LOAD32_WORD( "sp__0100872v.u13", 0x200002, 0x80000, CRC(6d66c6b4) SHA1(2106f2ede58bd4d09334e32a1553f02a154bb767) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -4516,17 +4198,13 @@ ARISTOCRAT_MK5_GALS ARISTOCRAT_MK5_EEPROM // checksum code not found (uses different startup sequence) - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0101108v.u7", 0x000000, 0x80000, CRC(1e7be5ca) SHA1(333b7665fab8f60fb60e9d3b44de96725763ca17) ) ROM_LOAD32_WORD( "0101108v.u11", 0x000002, 0x80000, CRC(2ff86b76) SHA1(c491ca19320bd3e15199b3ca1fcf36a70e386daa) ) ROM_LOAD32_WORD( "0101108v.u8", 0x100000, 0x80000, CRC(3eb64fc9) SHA1(31f7d56443091da211c45dddb97375305c3cfeae) ) ROM_LOAD32_WORD( "0101108v.u12", 0x100002, 0x80000, CRC(d91114c5) SHA1(fa88c70d81ff5e4df539b873803376e79eb6a479) ) ROM_LOAD32_WORD( "0101108v.u9", 0x200000, 0x80000, CRC(6da340db) SHA1(4d7528aa27561185a7d53a0c44a4e95e40aadc26) ) ROM_LOAD32_WORD( "0101108v.u13", 0x200002, 0x80000, CRC(472f4097) SHA1(5ebe72b138cdc67989db17c82979eeddc60a081e) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -4543,7 +4221,7 @@ Calculated Checksum 0xef64419b (OK) 0x0e8480-0x2e9023 is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "chg1458.u7", 0x000000, 0x80000, CRC(20c78b79) SHA1(d7402ff89160f25c9f4f67bbf688621d4ce22205) ) ROM_LOAD32_WORD( "chg1458.u11", 0x000002, 0x80000, CRC(12304203) SHA1(eea44382a2711ceb6661949692e5b5a742dd0761) ) ROM_LOAD32_WORD( "chg1458.u8", 0x100000, 0x80000, CRC(4618ecd4) SHA1(0ac6bfd6ec2bda5f4d474769f35bc81431f25c2a) ) @@ -4551,10 +4229,6 @@ ROM_LOAD32_WORD( "chg1458.u9", 0x200000, 0x80000, CRC(2f909651) SHA1(b4beaebbb20e879a1e23683a9001cbbd2ebf70c4) ) ROM_LOAD32_WORD( "chg1458.u13", 0x200002, 0x80000, CRC(2e573a8d) SHA1(aa8ac4f4a427829f0a5929273c618edb4ecf7b36) ) - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) - ROM_REGION16_BE( 0x100, "eeprom0", 0 ) ROM_LOAD16_WORD_SWAP( "eeprom0", 0x000000, 0x000100, CRC(fea8a821) SHA1(c744cac6af7621524fc3a2b0a9a135a32b33c81b) ) @@ -4584,17 +4258,13 @@ Calculated Checksum 0x24e1ed00 (OK) 0x0ec3a8-0x2ecf4b is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "dhg1577.u7", 0x000000, 0x80000, CRC(e31e3c81) SHA1(56b00aae1b9385686530e089cad05308e0c0751d) ) ROM_LOAD32_WORD( "dhg1577.u11", 0x000002, 0x80000, CRC(68d58ad3) SHA1(c521da10b719250e3f115357c6e4ff51377d4335) ) ROM_LOAD32_WORD( "dhg1577.u8", 0x100000, 0x80000, CRC(475db842) SHA1(3c49fbf45a256222e6a5a0343a7dc96386bb8897) ) ROM_LOAD32_WORD( "dhg1577.u12", 0x100002, 0x80000, CRC(f1be432e) SHA1(ed4a064e4e8200126bda3f1c25ac5075014c9f94) ) ROM_LOAD32_WORD( "dhg1577.u9", 0x200000, 0x80000, CRC(a8956bf5) SHA1(d444a3a64968a6275b38babf23089c7d186f30e6) ) ROM_LOAD32_WORD( "dhg1577.u13", 0x200002, 0x80000, CRC(f7c30ef9) SHA1(44d7213e1220d6b89715408d009ef1484de2696f) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -4611,17 +4281,13 @@ Calculated Checksum 0xd9d82a51 (OK) 0x082164-0x258447 is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "01j01946.u7", 0x000000, 0x80000, CRC(c6bdbc96) SHA1(ee83b6b4aaa9538ca04f136a4523fd520a24a878) ) ROM_LOAD32_WORD( "01j01946.u11", 0x000002, 0x80000, CRC(15be6a5d) SHA1(000218c13e1e3fccdc0565e496a1fd13cb32f6b1) ) ROM_LOAD32_WORD( "01j01946.u8", 0x100000, 0x80000, CRC(e26bd9c7) SHA1(e5facaa85c4c72d070b1d5000b80a333122c4fbc) ) ROM_LOAD32_WORD( "01j01946.u12", 0x100002, 0x80000, CRC(a9941a3b) SHA1(14868686aa0aa3d966ffbaef2593a11a57a43b05) ) ROM_LOAD32_WORD( "01j01946.u9", 0x200000, 0x80000, CRC(90e5a52b) SHA1(b2c334126128f9569846655d78f1641a36aec739) ) ROM_LOAD32_WORD( "01j01946.u13", 0x200002, 0x80000, CRC(0efdd830) SHA1(de0be1cd3f691299f48d7a184df6bb59fef22de2) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -4638,15 +4304,11 @@ 0x063240-0x1cd2d3 is the non-Checksummed range still containing data but NOT covered by Checksum 0x063240-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100845v.u7", 0x000000, 0x80000, CRC(0c924a3e) SHA1(499b4ae601e53173e3ba5f400a40e5ae7bbaa043) ) ROM_LOAD32_WORD( "0100845v.u11", 0x000002, 0x80000, CRC(e371dc0f) SHA1(a01ab7fb63a19c144f2c465ecdfc042695124bdf) ) ROM_LOAD32_WORD( "0100845v.u8", 0x100000, 0x80000, CRC(1c6bfb47) SHA1(7f751cb499a6185a0ab64eeec511583ceeee6ee8) ) ROM_LOAD32_WORD( "0100845v.u12", 0x100002, 0x80000, CRC(4bbe67f6) SHA1(928f88387da66697f1de54f086531f600f80a15e) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -4662,17 +4324,13 @@ Calculated Checksum 0xa70d8e67 (OK) 0x081824-0x20612b is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0101340v.u7", 0x000000, 0x80000, CRC(60b93091) SHA1(6d4953b8312866f952b9658a680e8827bf2b5e57) ) ROM_LOAD32_WORD( "0101340v.u11", 0x000002, 0x80000, CRC(34125c7d) SHA1(c6e57346f2c53a04e858b01132abcb4d91403822) ) ROM_LOAD32_WORD( "0101340v.u8", 0x100000, 0x80000, CRC(de715129) SHA1(30c15bdfc9ee5c45e04b9f9eb614be89a911260b) ) ROM_LOAD32_WORD( "0101340v.u12", 0x100002, 0x80000, CRC(48d7b043) SHA1(835d148db1e2ce7747a4410e3ceea4468355a164) ) ROM_LOAD32_WORD( "0101340v.u9", 0x200000, 0x80000, CRC(77c94665) SHA1(48d786a323603d1315f94fef97de6f9d1311c688) ) ROM_LOAD32_WORD( "0101340v.u13", 0x200002, 0x80000, CRC(7ec9557e) SHA1(8f143c1ee1c82d822ff66ec5b3dac03b0c911223) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -4682,15 +4340,11 @@ ARISTOCRAT_MK5_GALS ARISTOCRAT_MK5_EEPROM // checksum code not found due to ROMs being corrupted, all files are missing bytes consisting of 0x0D - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100161v.u7", 0x000000, 0x7fa4c, BAD_DUMP CRC(6994c968) SHA1(7896a93aeec9c2d815c49d203ca594644e5df8a6) ) ROM_LOAD32_WORD( "0100161v.u11", 0x000002, 0x7ffda, BAD_DUMP CRC(7776e753) SHA1(3d4753513b63f48500cb289bd0fcc28d0f4ad9d8) ) ROM_LOAD32_WORD( "0100161v.u8", 0x100000, 0x7fa52, BAD_DUMP CRC(7e69c6ba) SHA1(105bad21c78737b78f0f740a224b3f3e8b44c751) ) ROM_LOAD32_WORD( "0100161v.u12", 0x100002, 0x7fa54, BAD_DUMP CRC(d1d6cfba) SHA1(8c8ee5a97bc3c8cd21cd291701cebf214ca388f3) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -4707,15 +4361,11 @@ 0x0562cc-0x1cb767 is the non-Checksummed range still containing data but NOT covered by Checksum 0x0562cc-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100383v.u7", 0x000000, 0x80000, CRC(9ce4ce4a) SHA1(cde42dc82432baba4c6471cb57be89c0f27ed520) ) ROM_LOAD32_WORD( "0100383v.u11", 0x000002, 0x80000, CRC(b67419d0) SHA1(3107d3fd852fab15e8a72850c984b74e522d91cc) ) ROM_LOAD32_WORD( "0100383v.u8", 0x100000, 0x80000, CRC(94b94149) SHA1(239b510c3ebe9114c27cd7b85fb8f0f5b7b55009) ) ROM_LOAD32_WORD( "0100383v.u12", 0x100002, 0x80000, CRC(defce2e9) SHA1(95f88f8647c52f99dceb4920780696d7f7c1c24b) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -4734,17 +4384,13 @@ Calculated Checksum 0x5ad8a58b (OK) 0x089a30-0x1b4043 is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) // these are the 'bios' for Casino games (could be moved to a different base set) ROM_LOAD32_WORD( "0700474v.u7", 0x000000, 0x80000, CRC(04b7dcbf) SHA1(eded1223336181bb08f9593247f1f79d96278b75) ) ROM_LOAD32_WORD( "0700474v.u11", 0x000002, 0x80000, CRC(a89ce1b5) SHA1(411b474a111f23ebd834bea5af0bf0cf3926d590) ) ROM_LOAD32_WORD( "0200240v.u8", 0x100000, 0x80000, CRC(10c61ff7) SHA1(86d17cf2492612c3a6284a1c8e41a67a5199c0eb) ) ROM_LOAD32_WORD( "0200240v.u12", 0x100002, 0x80000, CRC(ffa3d0ba) SHA1(e60e01d4d425aea483387fa2f9ae5bb69b80f829) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -4762,15 +4408,11 @@ 0x05af28-0x1b3e9f is the non-Checksummed range still containing data but NOT covered by Checksum 0x05af28-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0200536v.u7", 0x000000, 0x80000, CRC(9333543a) SHA1(dbbd59de046c35e70e71836b342eb5ecf4799575) ) ROM_LOAD32_WORD( "0200536v.u11", 0x000002, 0x80000, CRC(2b52a5e2) SHA1(0c852c6672a46f269f1407db0dd1825a51f242cc) ) ROM_LOAD32_WORD( "0200536v.u8", 0x100000, 0x80000, CRC(08bea3b7) SHA1(9a5d8cf60c9643061dede926a04006a9a674fd8f) ) ROM_LOAD32_WORD( "0200536v.u12", 0x100002, 0x80000, CRC(15d5bfb4) SHA1(7c48dabfd83cc30fe2ffd0b4de63fbc9dc56ee2f) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -4788,15 +4430,11 @@ 0x058864-0x1b0b4f is the non-Checksummed range still containing data but NOT covered by Checksum 0x058864-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100536v.u7", 0x000000, 0x80000, CRC(0969274b) SHA1(fc9d667d963d70a563ba7acdeaa6d728f3bee9d9) ) ROM_LOAD32_WORD( "0100536v.u11", 0x000002, 0x80000, CRC(aa7d345d) SHA1(b451ad64d5c33f4ed0fdb693e9c3be6b61093bd8) ) ROM_LOAD32_WORD( "0100536v.u8", 0x100000, 0x80000, CRC(2f397873) SHA1(7679b324fd6c944e31a255f0c65a94a2e78fb57e) ) ROM_LOAD32_WORD( "0100536v.u12", 0x100002, 0x80000, CRC(ddde1739) SHA1(d2dec30baef8b43b2f3bc1d572353b5afe01be4b) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -4816,7 +4454,7 @@ Calculated Checksum 0x6f1ff98e (OK) 0x0f19b4-0x3b1437 is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "ahg1625.u7", 0x000000, 0x80000, CRC(2adcfd60) SHA1(bf819be7665df421435b997259dee0668482a837) ) ROM_LOAD32_WORD( "ahg1625.u11", 0x000002, 0x80000, CRC(4820a290) SHA1(8d073694365f4b0a85e3abe18cc70fd738db6e2c) ) ROM_LOAD32_WORD( "ahg1625.u8", 0x100000, 0x80000, CRC(0e067eab) SHA1(b258b62ca637ee1bc14ccf19b2d337324c0f1b8f) ) @@ -4825,10 +4463,6 @@ ROM_LOAD32_WORD( "ahg1625.u13", 0x200002, 0x80000, CRC(a35444cc) SHA1(faa0b3edc2acb313d1ce78c7b7dd14b8de465231) ) ROM_LOAD32_WORD( "ahg1625.u10", 0x300000, 0x80000, CRC(f9dde22f) SHA1(b321c927a958d0e20e29cf4e12cea1c8bd06a893) ) ROM_LOAD32_WORD( "ahg1625.u14", 0x300002, 0x80000, CRC(499419db) SHA1(6df8c7a9a69d60e746eb266127647327d4b88919) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -4845,15 +4479,11 @@ 0x0435b0-0x1df8a7 is the non-Checksummed range still containing data but NOT covered by Checksum 0x0435b0-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0200024v.u7", 0x000000, 0x80000, CRC(90aefddc) SHA1(610b850c1d3e882c4df9e0a09a056b0c97341a19) ) ROM_LOAD32_WORD( "0200024v.u11", 0x000002, 0x80000, CRC(52791ad8) SHA1(6e4cf553b355f03ef69ef3c4e2816bbd0cbe6599) ) ROM_LOAD32_WORD( "0200024v.u8", 0x100000, 0x80000, CRC(c0477ae3) SHA1(5005944b8b28553dd959192d614be7f1b6228a30) ) ROM_LOAD32_WORD( "0200024v.u12", 0x100002, 0x80000, CRC(df176c5a) SHA1(dcaecdefb7c880b9425a6445dbed969968fe3d1c) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -4871,7 +4501,7 @@ Calculated Checksum 0x5e570341 (OK) 0x0ec32c-0x34ebdf is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "chg1573.u7", 0x000000, 0x80000, CRC(6e3ec3ae) SHA1(057650b8d89e93bcbaacf06e6487264fe19a1aa0) ) ROM_LOAD32_WORD( "chg1573.u11", 0x000002, 0x80000, CRC(1ce786ca) SHA1(70539191d97d04838a706dd0bdd7969b1d3a0002) ) ROM_LOAD32_WORD( "chg1573.u8", 0x100000, 0x80000, CRC(070920b4) SHA1(568db78a6eae1e2c7dd9b6629117bce791cce681) ) // base @@ -4880,10 +4510,6 @@ ROM_LOAD32_WORD( "chg1573.u13", 0x200002, 0x80000, CRC(7d9041cd) SHA1(ce022b0499b5ad585875a94a78aa018f3493dfb9) ) // base ROM_LOAD32_WORD( "chg1573.u10", 0x300000, 0x80000, CRC(a0fb61fe) SHA1(2a77ed082bc6829905f83a3cb3c4c120fa4ba0f9) ) // base ROM_LOAD32_WORD( "chg1573.u14", 0x300002, 0x80000, CRC(5e4776e9) SHA1(d44851cbfaa054cd5675a841a3089a8f4fdc8421) ) // base - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -4900,15 +4526,11 @@ 0x061858-0x1a2757 is the non-Checksummed range still containing data but NOT covered by Checksum 0x061858-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100677v.u7", 0x000000, 0x80000, CRC(b2fdf0e8) SHA1(0dd002cfad2fa4f217a0c67066d098f4cd3ba319) ) ROM_LOAD32_WORD( "0100677v.u11", 0x000002, 0x80000, CRC(e8ab9afc) SHA1(4c3beefeafc6ac9d4538254bb5e01c12b35db922) ) ROM_LOAD32_WORD( "0100677v.u8", 0x100000, 0x80000, CRC(f5a45c57) SHA1(a452a7359af6d5fde2c37946ee68807152f07d39) ) ROM_LOAD32_WORD( "0100677v.u12", 0x100002, 0x80000, CRC(b2f2fd15) SHA1(9614f3ae6e82a40ecf44090d0b8d7bd8b6b1f830) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -4928,7 +4550,7 @@ Calculated Checksum 0x57cc5e5a (OK) 0x0a6928-0x39cd8f is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "bhg1204.u7", 0x000000, 0x80000, CRC(bc365ca9) SHA1(f5bb4fc0b2eaed1274b21bc4762b6914ce621d8a) ) ROM_LOAD32_WORD( "bhg1204.u11", 0x000002, 0x80000, CRC(14376c1e) SHA1(616549215f35c4f5a8c4243f84290dd8b3fae5df) ) ROM_LOAD32_WORD( "bhg1204.u8", 0x100000, 0x80000, CRC(29081b50) SHA1(0c3990b11c9e249829babc0631840e982a387709) ) @@ -4937,10 +4559,6 @@ ROM_LOAD32_WORD( "bhg1204.u13", 0x200002, 0x80000, CRC(fd4b24c4) SHA1(97db7899c61050c7580af67177c7fe2c8b6116aa) ) ROM_LOAD32_WORD( "bhg1204.u10", 0x300000, 0x80000, CRC(164ac0dd) SHA1(f6168ab76455ad29df6a4a43eea65d8c644d295a) ) ROM_LOAD32_WORD( "bhg1204.u14", 0x300002, 0x80000, CRC(490a9eb5) SHA1(30df13960614f82deac5426ff754885ffb429603) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -4956,13 +4574,9 @@ Calculated Checksum 0x02238afa (OK) 0x05633c-0x0bfbef is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100473v.u7", 0x000000, 0x80000, CRC(fd9685ed) SHA1(c5e60cdc0a42c63f18ba33e7d8ea15a545031eb6) ) ROM_LOAD32_WORD( "0100473v.u11", 0x000002, 0x80000, CRC(0c0c2697) SHA1(0fc1dec8fba488a4b59c81b5bab7a11d62be2599) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -4978,13 +4592,9 @@ Calculated Checksum 0xafd2e94d (OK) 0x055e94-0x0bbf23 is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100472v.u7", 0x000000, 0x80000, CRC(4f02763c) SHA1(302cea5fb157f65fc907f123ef42a0a38cc707ac) ) ROM_LOAD32_WORD( "0100472v.u11", 0x000002, 0x80000, CRC(21332a1a) SHA1(76a4c30d1c9624984175e9bd117c68c9204f01df) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -4994,15 +4604,11 @@ ARISTOCRAT_MK5_GALS ARISTOCRAT_MK5_EEPROM // checksum code not found (uses different startup sequence) - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0600725v.u7", 0x000000, 0x80000, CRC(164dd049) SHA1(c99c56af72cb1eb69591cb8f7bacbd06bdb6494d) ) ROM_LOAD32_WORD( "0600725v.u11", 0x000002, 0x80000, CRC(93b0bde3) SHA1(06cb79482f8a94e1a504eead9cdf6da41cba1fb9) ) ROM_LOAD32_WORD( "0600725v.u8", 0x100000, 0x80000, CRC(8cb449ce) SHA1(2372cf126c2c95d9637b0a761dfc7ea223f0aa54) ) ROM_LOAD32_WORD( "0600725v.u12", 0x100002, 0x80000, CRC(29f03505) SHA1(c173167f43cc2eef0e063118e03bc37a87188391) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -5021,15 +4627,11 @@ 0x0e94fc-0x170993 is the non-Checksummed range still containing data but NOT covered by Checksum 0x0e94fc-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "ahg1513.u7", 0x000000, 0x80000, CRC(16854250) SHA1(a3b6e112dcce38310ca13eb9e9851901ee213fcf) ) ROM_LOAD32_WORD( "ahg1513.u11", 0x000002, 0x80000, CRC(0abe509a) SHA1(a5d0b870390e7f4b38d7685c09c079acb198dd42) ) ROM_LOAD32_WORD( "ahg1513.u8", 0x100000, 0x80000, CRC(bd9d2ad7) SHA1(5e5eaf2521473246fb54175f88521b43b9b86f9f) ) ROM_LOAD32_WORD( "ahg1513.u12", 0x100002, 0x80000, CRC(5bf7b4b1) SHA1(2282ec8d0ddd1aea715005fba2171468831513f4) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -5045,13 +4647,9 @@ Calculated Checksum 0x424e42b6 (OK) 0x0580f4-0x0df6b7 is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100587v.u7", 0x000000, 0x80000, CRC(15024eae) SHA1(7101125aa8531c75f9d80fe357013d09dbb0fec9) ) ROM_LOAD32_WORD( "0100587v.u11", 0x000002, 0x80000, CRC(0ed6fb6b) SHA1(a2baa4154fe762e2c1b40a97b2d27265df8b5dab) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -5067,13 +4665,9 @@ Calculated Checksum 0xd747f16a (OK) 0x055e08-0x0f9a0f is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0300109v.u7", 0x000000, 0x80000, CRC(175db8bb) SHA1(7c1e60c41c8b1cc73cd3476c742d7ce16837fa1b) ) ROM_LOAD32_WORD( "0300109v.u11", 0x000002, 0x80000, CRC(4be1cdef) SHA1(8633077a6ddde80b2e7a3c4439ccb5a3f2b83695) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -5093,15 +4687,11 @@ 0x0a522c-0x15dbd7 is the non-Checksummed range still containing data but NOT covered by Checksum 0x0a522c-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "ahg121199.u7", 0x000000, 0x80000, CRC(12b9aaf2) SHA1(1cc86a0c8daefc1e5b5a4ff710319a85f573f526) ) ROM_LOAD32_WORD( "ahg121199.u11", 0x000002, 0x80000, CRC(b6095f2c) SHA1(d36ceaa0e6545f594f6a50ddfa71d84ca7128f3b) ) ROM_LOAD32_WORD( "ahg121199.u8", 0x100000, 0x80000, CRC(a315ca28) SHA1(0309789362a945d592ee2eda912e4fc2e6ea5be6) ) ROM_LOAD32_WORD( "ahg121199.u12", 0x100002, 0x80000, CRC(4b252c2c) SHA1(8be41fb2b8f8d2829c18ea123a02f3e61c136206) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -5121,15 +4711,11 @@ 0x0e95fc-0x1e5983 is the non-Checksummed range still containing data but NOT covered by Checksum 0x0e95fc-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "ahg1549.u7", 0x000000, 0x80000, CRC(a77fe800) SHA1(0e8fb392d5213c7512900c1f0fd34e795ba73e9f) ) ROM_LOAD32_WORD( "ahg1549.u11", 0x000002, 0x80000, CRC(321ed7c0) SHA1(4a7913c0edfeb0f3ad6b292919ad1a8b427e936f) ) ROM_LOAD32_WORD( "ahg1549.u8", 0x100000, 0x80000, CRC(b4a0334e) SHA1(7dbe781a20a9a40149658f9df35c8d39039ac70c) ) ROM_LOAD32_WORD( "ahg1549.u12", 0x100002, 0x80000, CRC(d008deab) SHA1(fd544767356bfdf44ec4af7218c9f2990581e620) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -5148,16 +4734,12 @@ 0x0e9598-0x1e591f is the non-Checksummed range still containing data but NOT covered by Checksum 0x0e9598-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "ahg1548.u7", 0x000000, 0x80000, CRC(452a19c9) SHA1(aab1f4ccfc6cdb382f7a0e85491614cc58811a08) ) ROM_LOAD32_WORD( "ahg1548.u11", 0x000002, 0x80000, CRC(c57601f3) SHA1(1616a424b41ad6fea6383a08d5352e8240433374) ) ROM_LOAD32_WORD( "ahg1548.u8", 0x100000, 0x80000, CRC(607d7447) SHA1(064dbfe8b52eebe1be7a41735da3fa01eacd1686) ) ROM_LOAD32_WORD( "ahg1548.u12", 0x100002, 0x80000, CRC(cf4cd569) SHA1(408edcd746587d249c4286f7a99f33ad94214f7c) ) - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) - ROM_REGION16_BE( 0x100, "eeprom0", 0 ) ROM_LOAD16_WORD_SWAP( "eeprom0", 0x000000, 0x000100, CRC(fea8a821) SHA1(c744cac6af7621524fc3a2b0a9a135a32b33c81b) ) @@ -5189,16 +4771,12 @@ 0x0e8528-0x1e4887 is the non-Checksummed range still containing data but NOT covered by Checksum 0x0e8528-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "dhg1309.u7", 0x000000, 0x80000, CRC(17317eb9) SHA1(3ddb8d61f23461c3194af534928164550208bbee) ) ROM_LOAD32_WORD( "dhg1309.u11", 0x000002, 0x80000, CRC(42af4b3f) SHA1(5d88951f77782ff3861b6550ace076662a0b45aa) ) ROM_LOAD32_WORD( "dhg1309.u8", 0x100000, 0x80000, CRC(23aefb5a) SHA1(ba4488754794f75f53b9c81b74b6ccd992c64acc) ) ROM_LOAD32_WORD( "dhg1309.u12", 0x100002, 0x80000, CRC(6829a7bf) SHA1(97eed83763d0ec5e753d6ad194e906b1307c4940) ) - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) - ROM_REGION16_BE( 0x100, "eeprom0", 0 ) ROM_LOAD16_WORD_SWAP( "eeprom0", 0x000000, 0x000100, CRC(fea8a821) SHA1(c744cac6af7621524fc3a2b0a9a135a32b33c81b) ) @@ -5220,17 +4798,13 @@ ARISTOCRAT_MK5_GALS ARISTOCRAT_MK5_EEPROM // checksum code not found (uses different startup sequence) - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0300455v.u7", 0x000000, 0x80000, CRC(a1568e3b) SHA1(842c1aa3f9765f7ba9f2587cb94b6ef03c74e8b9) ) ROM_LOAD32_WORD( "0300455v.u11", 0x000002, 0x80000, CRC(9449b7cb) SHA1(213e642f494892b0f24502eb896fd945e0267bba) ) ROM_LOAD32_WORD( "0300455v.u8", 0x100000, 0x80000, CRC(a7d7b121) SHA1(fca49075463e4f21f5138e86889239fd20eabcac) ) ROM_LOAD32_WORD( "0300455v.u12", 0x100002, 0x80000, CRC(0e23ac25) SHA1(fa6601b998bbc9cb4cea9ea2db73afa5f7937bf9) ) ROM_LOAD32_WORD( "0300455v.u9", 0x200000, 0x80000, CRC(de502bba) SHA1(d40b71518ff15405c787a58643468a202fae97bd) ) ROM_LOAD32_WORD( "0300455v.u13", 0x200002, 0x80000, CRC(5e54ed88) SHA1(5fe9a74e210bc2c1b158e7a3bb01fdcc96ea0075) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -5242,17 +4816,13 @@ ARISTOCRAT_MK5_GALS ARISTOCRAT_MK5_EEPROM // checksum code not found (uses different startup sequence) - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0200455v.u7", 0x000000, 0x80000, CRC(9fa3ee86) SHA1(ce7546b8d1dbf90eb8f4f8d3255dc1c215c966a7) ) ROM_LOAD32_WORD( "0200455v.u11", 0x000002, 0x80000, CRC(614984e4) SHA1(e95d576993e8d9c0964899a7d5556c8e62d79242) ) ROM_LOAD32_WORD( "0200455v.u8", 0x100000, 0x80000, CRC(d7faf84d) SHA1(d2e49787d177767671fab64a723e1af619ce9ad2) ) ROM_LOAD32_WORD( "0200455v.u12", 0x100002, 0x80000, CRC(f54c18db) SHA1(85bcc202f7425b3b7ef456c1c2db5a22648068a8) ) ROM_LOAD32_WORD( "0200455v.u9", 0x200000, 0x80000, CRC(0e140453) SHA1(8b516fe598c7e754a471246effa1185845495640) ) ROM_LOAD32_WORD( "0200455v.u13", 0x200002, 0x80000, CRC(cfd2a86e) SHA1(66891a1b0e85ad7146b733f4b5d806db789d8821) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -5269,15 +4839,11 @@ 0x053624-0x1b52eb is the non-Checksummed range still containing data but NOT covered by Checksum 0x053624-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100425v.u7", 0x000000, 0x80000, CRC(43ef012a) SHA1(e80d15852cb3a8826cc8cee11e3036ff65d733ad) ) ROM_LOAD32_WORD( "0100425v.u11", 0x000002, 0x80000, CRC(37b5a672) SHA1(44cc648c27476c401f7f90569b9fc0c7e6d4bf51) ) ROM_LOAD32_WORD( "0100425v.u8", 0x100000, 0x80000, CRC(a6516f86) SHA1(2224b94b3b5c9d86163ff1d2bb439729092826ac) ) ROM_LOAD32_WORD( "0100425v.u12", 0x100002, 0x80000, CRC(58171e9b) SHA1(7f375aeb8cabe22fcc6f61cac5ef6f72f0c99899) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -5294,17 +4860,13 @@ 0x06d93c-0x2deae3 is the non-Checksummed range still containing data but NOT covered by Checksum 0x06d93c-0x2fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "01j00101.u7", 0x000000, 0x80000, CRC(eee7ebaf) SHA1(bad0c08578877f84325c07d51c6ed76c40b70720) ) ROM_LOAD32_WORD( "01j00101.u11", 0x000002, 0x80000, CRC(4901a166) SHA1(8afe6f08b4ac5c17744dff73939c4bc93124fdf1) ) ROM_LOAD32_WORD( "01j00101.u8", 0x100000, 0x80000, CRC(b0d78efe) SHA1(bc8b345290f4d31c6553f1e2700bc8324b4eeeac) ) ROM_LOAD32_WORD( "01j00101.u12", 0x100002, 0x80000, CRC(90ff59a8) SHA1(c9e342db2b5e8c3f45efa8496bc369385046e920) ) ROM_LOAD32_WORD( "01j00101.u9", 0x200000, 0x80000, CRC(1f0ca910) SHA1(be7a2f395eae09a29faf99ba34551fbc38f20fdb) ) ROM_LOAD32_WORD( "01j00101.u13", 0x200002, 0x80000, CRC(3f702945) SHA1(a6c9a848d059c1e564fdc5a65bf8c9600853edfa) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -5323,7 +4885,7 @@ Calculated Checksum 0xe8864023 (OK) 0x0ed9f4-0x319ef3 is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "ehg1558.u7", 0x000000, 0x80000, CRC(7c2602ae) SHA1(f5a13154448041575e4bea1399ed0a5a0888d493) ) ROM_LOAD32_WORD( "ehg1558.u11", 0x000002, 0x80000, CRC(4fe3b18a) SHA1(cc36eddd264de1a088c16e1b741168130d895bd7) ) ROM_LOAD32_WORD( "ehg1558.u8", 0x100000, 0x80000, CRC(c9ff4bd8) SHA1(5766d7c39e753fb2a2412a41338dcfd4e31b642b) ) @@ -5332,10 +4894,6 @@ ROM_LOAD32_WORD( "ehg1558.u13", 0x200002, 0x80000, CRC(770872a1) SHA1(cd430385a3dfc080decfa2402d7dbad0db912e15) ) ROM_LOAD32_WORD( "ehg1558.u10", 0x300000, 0x80000, CRC(4301eb40) SHA1(1a32c61df2ab04c365135378d97d18bbb0b50179) ) ROM_LOAD32_WORD( "ehg1558.u14", 0x300002, 0x80000, CRC(a2096cb3) SHA1(c2bba35396f9c83b17d692a384b6406f3441c8f5) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -5355,7 +4913,7 @@ 0x0eda54-0x2fffef is the non-Checksummed range still containing data but NOT covered by Checksum 0x0eda54-0x2fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "ehg1559.u7", 0x000000, 0x80000, CRC(dd4e4aa2) SHA1(c061a2d4a5814d62ac655f594dbfe4b96c2f68c4) ) ROM_LOAD32_WORD( "ehg1559.u11", 0x000002, 0x80000, CRC(f1fd2079) SHA1(9dcd73eb46300dcf682b6165638c2d22e773a117) ) ROM_LOAD32_WORD( "ehg1559.u8", 0x100000, 0x80000, CRC(db05591e) SHA1(8af241bbd4f744c66fb78fdaf739d9c8bc2580c0) ) @@ -5364,10 +4922,6 @@ ROM_LOAD32_WORD( "ehg1559.u13", 0x200002, 0x80000, CRC(8c111896) SHA1(60d2ffe82a39ef98d2cf0141773be95381538ace) ) ROM_LOAD32_WORD( "ehg1559.u10", 0x300000, 0x80000, CRC(3db4e373) SHA1(7150242253ae4a1c4f3211e3068f00e8b1ed51b1) ) ROM_LOAD32_WORD( "ehg1559.u14", 0x300002, 0x80000, CRC(bdfdc0e4) SHA1(0e56f08abc0cdd9dfa5d8e51bb6fe06fa356b3b3) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -5384,15 +4938,11 @@ 0x0446e4-0x1465a7 is the non-Checksummed range still containing data but NOT covered by Checksum 0x0446e4-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0400115v.u7", 0x000000, 0x80000, CRC(e3160af4) SHA1(e0b212aba1b39acb324ff8c2850b0f2b6999d8ae) ) ROM_LOAD32_WORD( "0400115v.u11", 0x000002, 0x80000, CRC(3544d77f) SHA1(76a6cb7e7b9500e046d2b169a224f3e99088dcb2) ) ROM_LOAD32_WORD( "0400115v.u8", 0x100000, 0x80000, CRC(e43f6c8c) SHA1(53f35f430a328e7b4cb86ce3227c48eebc8b4c30) ) ROM_LOAD32_WORD( "0400115v.u12", 0x100002, 0x80000, CRC(b0607ccf) SHA1(f7b35d02170620060c8cdf90b9cb6aac86e26a52) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -5411,16 +4961,12 @@ 0x0a7204-0x1a0edf is the non-Checksummed range still containing data but NOT covered by Checksum 0x0a7204-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "vhg041699.u7", 0x000000, 0x80000, CRC(41bc3714) SHA1(5a8f7d24a6a697524af7997dcedd214fcaf48768) ) ROM_LOAD32_WORD( "vhg041699.u11", 0x000002, 0x80000, CRC(75803b10) SHA1(2ff3d966da2992ddcc7e229d979cc1ee623b4900) ) ROM_LOAD32_WORD( "vhg041699.u8", 0x100000, 0x80000, CRC(0a3e2baf) SHA1(b9ab989cf383cd6ea0aa1ead137558a1a6f5901d) ) ROM_LOAD32_WORD( "vhg041699.u12", 0x100002, 0x80000, CRC(26c01532) SHA1(ec68ad44b703609c7bc27275f8d9250a16d9067c) ) - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) - ROM_REGION16_BE( 0x100, "eeprom0", 0 ) ROM_LOAD16_WORD_SWAP( "eeprom0", 0x000000, 0x000100, CRC(fea8a821) SHA1(c744cac6af7621524fc3a2b0a9a135a32b33c81b) ) @@ -5452,15 +4998,11 @@ 0x0a7184-0x1a0e5f is the non-Checksummed range still containing data but NOT covered by Checksum 0x0a7184-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "nhg0416.u7", 0x000000, 0x80000, CRC(7258afb3) SHA1(238b883075a5e3cdd2c675190b269c55d08b7b13) ) ROM_LOAD32_WORD( "nhg0416.u11", 0x000002, 0x80000, CRC(c65978b0) SHA1(e16b6a57b21b4570687676f4c6b65c463ad6e559) ) ROM_LOAD32_WORD( "nhg0416.u8", 0x100000, 0x80000, CRC(50c4d4d8) SHA1(920e62933ffa29622d941b469dcd6c5dfc2ab438) ) ROM_LOAD32_WORD( "nhg0416.u12", 0x100002, 0x80000, CRC(fc3f18ff) SHA1(f2afc6bdd7a702e4ac4037749613ac4a40446511) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -5477,15 +5019,11 @@ 0x066078-0x1faf7b is the non-Checksummed range still containing data but NOT covered by Checksum 0x066078-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0400469v.u7", 0x000000, 0x80000, CRC(7f7972b6) SHA1(25991f476f55cd1eddc8e63af9c472c1d7e83481) ) ROM_LOAD32_WORD( "0400469v.u11", 0x000002, 0x80000, CRC(ac2243ea) SHA1(27c31e5102defa4f3982875b30a67e89af40d4ff) ) ROM_LOAD32_WORD( "0400469v.u8", 0x100000, 0x80000, CRC(a10a4bff) SHA1(e6b36542dab8a3405579b333a125a6d3fd801b50) ) ROM_LOAD32_WORD( "0400469v.u12", 0x100002, 0x80000, CRC(72d992ed) SHA1(94560305dacbe776ddc95114ad5e5ffaa234937c) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -5503,15 +5041,11 @@ 0x05dc0c-0x1faf7b is the non-Checksummed range still containing data but NOT covered by Checksum 0x05dc0c-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0300469v.u7", 0x000000, 0x80000, CRC(ae3ece9e) SHA1(d0124a6e9dc3770c0c8b086cd208a6baf7194d3d) ) ROM_LOAD32_WORD( "0300469v.u11", 0x000002, 0x80000, CRC(c53acb75) SHA1(70b67e15ef04eacc7cea0077aceeb6737e753d6c) ) ROM_LOAD32_WORD( "0300469v.u8", 0x100000, 0x80000, CRC(7643ca29) SHA1(9aa2d3cb2ddc7f47af4279679cacfaf6b55a56a1) ) ROM_LOAD32_WORD( "0300469v.u12", 0x100002, 0x80000, CRC(2be9bce0) SHA1(3768e616e4f03f253074e1f06aa628181db9dce8) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -5521,17 +5055,13 @@ ARISTOCRAT_MK5_GALS ARISTOCRAT_MK5_EEPROM // checksum code not found (uses different startup sequence) - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0201397v.u7", 0x000000, 0x80000, CRC(982a0078) SHA1(163c15aebd2be623c0f2c7641360336399bc1f4f) ) ROM_LOAD32_WORD( "0201397v.u11", 0x000002, 0x80000, CRC(7a03e436) SHA1(016e6e36f7ca6f4c3b427cf98a1415ef6aa57225) ) ROM_LOAD32_WORD( "0201397v.u8", 0x100000, 0x80000, CRC(878b6419) SHA1(572d6a10cbf2b96e9afee4b3f32e9ad1ce7eabbb) ) ROM_LOAD32_WORD( "0201397v.u12", 0x100002, 0x80000, CRC(b11f51d0) SHA1(1579a24d470f418713334259368c7a4e35e8b5d3) ) ROM_LOAD32_WORD( "0201397v.u9", 0x200000, 0x80000, CRC(816fda3f) SHA1(d5eb7572a93e2a4681a2b1db7f302c5528f1c1c3) ) ROM_LOAD32_WORD( "0201397v.u13", 0x200002, 0x80000, CRC(e1f23c3f) SHA1(fe74c219c738625257fb62806e271a60075aaa07) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -5547,13 +5077,9 @@ Calculated Checksum 0x4bb1139e (OK) 0x04ee9c-0x0e3a1f is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100294v.u7", 0x000000, 0x80000, CRC(b84342af) SHA1(e27e65730ddc897b01e8875a4da3ea2d6db2b858) ) ROM_LOAD32_WORD( "0100294v.u11", 0x000002, 0x80000, CRC(4fb2a4dc) SHA1(23895b701387f7442a31969989d21cefe2a25efd) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -5569,13 +5095,9 @@ Calculated Checksum 0xd2ec718d (OK) 0x04eea4-0x0e3a27 is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100289v.u7", 0x000000, 0x80000, CRC(35582166) SHA1(26bf4cd6939afe15a5c2ae940d6da921491fb401) ) ROM_LOAD32_WORD( "0100289v.u11", 0x000002, 0x80000, CRC(565b76ff) SHA1(559d4ec4f1a727cd293d842b7f777c99dcf488bc) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -5587,7 +5109,7 @@ ARISTOCRAT_MK5_GALS ARISTOCRAT_MK5_EEPROM // checksum code not found due to ROMs being corrupted, all files except U10 are missing bytes consisting of 0x0D - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "ahg1629.u7", 0x000000, 0x7efa7, BAD_DUMP CRC(8e5b5354) SHA1(519c5af995d75c3035c0a3832956d94a989163de) ) ROM_LOAD32_WORD( "ahg1629.u11", 0x000002, 0x7ff5b, BAD_DUMP CRC(9ccf8088) SHA1(cc0e2a2e50041e412d9fd4dea8e50b5aa3b94122) ) ROM_LOAD32_WORD( "ahg1629.u8", 0x100000, 0x7d02f, BAD_DUMP CRC(32bd1b30) SHA1(3caf8b69a9f5fdf5f472a4ce83bf9f2e9c9af75c) ) @@ -5596,10 +5118,6 @@ ROM_LOAD32_WORD( "ahg1629.u13", 0x200002, 0x7f739, BAD_DUMP CRC(783d8aad) SHA1(41b4d4e4d02aa8ee4a81550160750f4f36aaca09) ) ROM_LOAD32_WORD( "ahg1629.u10", 0x300000, 0x80000, CRC(503b9a4e) SHA1(867cdecf6a721803500b1b66192ea4f61eb459da) ) ROM_LOAD32_WORD( "ahg1629.u14", 0x300002, 0x7ffff, BAD_DUMP CRC(57f31de5) SHA1(aceb1d700c3b41e29e0abd613d59008d7dc259c9) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -5610,7 +5128,7 @@ ARISTOCRAT_MK5_GALS ARISTOCRAT_MK5_EEPROM // checksum code not found due to ROMs being corrupted, first 6 files are missing bytes consisting of 0x0D - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "bhg1465.u7", 0x000000, 0x7f026, BAD_DUMP CRC(9a176a6b) SHA1(a86213020f6cf0c99271ae4e5768453578ade4c3) ) ROM_LOAD32_WORD( "bhg1465.u11", 0x000002, 0x7ff32, BAD_DUMP CRC(cfdc676a) SHA1(21179519913a1257f19a726bbfaf913018f31a9a) ) ROM_LOAD32_WORD( "bhg1465.u8", 0x100000, 0x7d046, BAD_DUMP CRC(65950ec8) SHA1(22e558910d1ca62c36fa3c7376515268473f944f) ) @@ -5619,10 +5137,6 @@ ROM_LOAD32_WORD( "bhg1465.u13", 0x200002, 0x7fc71, BAD_DUMP CRC(2ce1748e) SHA1(10c78c55d76eb270db16a42b6ae43293301d70ec) ) ROM_LOAD32_WORD( "bhg1465.u10", 0x300000, 0x80000, CRC(05e2c0e2) SHA1(c604ca86d39d337b43c32ada5fbe30f57bae47aa) ) ROM_LOAD32_WORD( "bhg1465.u14", 0x300002, 0x80000, CRC(62f9b2af) SHA1(bddf24c7a412e911cf75316723f3139be99acbdd) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -5641,7 +5155,7 @@ Calculated Checksum 0x0916f8a2 (OK) 0x0e8e58-0x3769bb is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "bhg1464.u7", 0x000000, 0x80000, CRC(92e49c10) SHA1(f4723d7ea5f3454e649e0004c6010d0ba836e5ba) ) ROM_LOAD32_WORD( "bhg1464.u11", 0x000002, 0x80000, CRC(44b813d9) SHA1(0e62c4eb4bd8e914f419aa2e2875a5419b5bafc5) ) ROM_LOAD32_WORD( "bhg1464.u8", 0x100000, 0x80000, CRC(01207fd3) SHA1(9e7fb7a14d41b175d8a201b5c52d08fae024571f) ) @@ -5650,10 +5164,6 @@ ROM_LOAD32_WORD( "bhg1464.u13", 0x200002, 0x80000, CRC(fa139977) SHA1(55bbdcc0c62cc7fe7cc73aa45e45f92f41ae1f24) ) ROM_LOAD32_WORD( "bhg1464.u10", 0x300000, 0x80000, CRC(0d225449) SHA1(4b70c2e91877b7d314e4f4616df4ef9fd49303a0) ) ROM_LOAD32_WORD( "bhg1464.u14", 0x300002, 0x80000, CRC(5b1e5888) SHA1(4cfb0a7af2553037fed650085bbe11e3d043797b) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -5670,17 +5180,13 @@ 0x074780-0x2c5abb is the non-Checksummed range still containing data but NOT covered by Checksum 0x074780-0x2fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0200956v.u7", 0x000000, 0x80000, CRC(7570eb03) SHA1(0fded55ee2d12cfae96e2910c68a131cd89147a0) ) ROM_LOAD32_WORD( "0200956v.u11", 0x000002, 0x80000, CRC(ac8503fa) SHA1(30640a9c01239173c7430a46dcd2e2b28024c0cf) ) ROM_LOAD32_WORD( "0200956v.u8", 0x100000, 0x80000, CRC(8c54bd65) SHA1(5870558f8b96fca2c355ccc6ffc09fc4684d141c) ) ROM_LOAD32_WORD( "0200956v.u12", 0x100002, 0x80000, CRC(cd0dfdf5) SHA1(7bcf77c1bcd023b4ab08cef329dcf39dc2ca09d6) ) ROM_LOAD32_WORD( "0200956v.u9", 0x200000, 0x80000, CRC(10b96156) SHA1(1f89e0d8d210d2fd7e0b78b0205eb626d7c39542) ) ROM_LOAD32_WORD( "0200956v.u13", 0x200002, 0x80000, CRC(0d6f7ec5) SHA1(0a80257eb464e50292554f45583f3d7b85de2bc3) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -5696,13 +5202,9 @@ Calculated Checksum 0x37310f71 (OK) 0x04eea8-0x0dce17 is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100275v.u7", 0x000000, 0x80000, CRC(28d15442) SHA1(ee33017f3efcf688a43ea1d7f2b74b4b9a6d2cae) ) ROM_LOAD32_WORD( "0100275v.u11", 0x000002, 0x80000, CRC(6e618fc5) SHA1(a02e7ca2433cf8128d74792833d9708a3ba5df4b) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -5712,17 +5214,13 @@ ARISTOCRAT_MK5_GALS ARISTOCRAT_MK5_EEPROM // checksum code not found (uses different startup sequence) - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0101503v.u7", 0x000000, 0x80000, CRC(edf50554) SHA1(302737220c4b7d60db77074429d6f360c55494a6) ) ROM_LOAD32_WORD( "0101503v.u11", 0x000002, 0x80000, CRC(e2fa31a8) SHA1(595286573a4bfc6f3ee2fe57c44ae129077f3dd0) ) ROM_LOAD32_WORD( "0101503v.u8", 0x100000, 0x80000, CRC(46aa8912) SHA1(dd874b203e4dacb868d73e5c621e0bf95c267783) ) ROM_LOAD32_WORD( "0101503v.u12", 0x100002, 0x80000, CRC(0d02a4af) SHA1(e16d4450d5273522caf3267947ed4a54047b0894) ) ROM_LOAD32_WORD( "0101503v.u9", 0x200000, 0x80000, CRC(c999f9a6) SHA1(49752d37259affdd74bba3c04a9e8f7f15c0ccfd) ) ROM_LOAD32_WORD( "0101503v.u13", 0x200002, 0x80000, CRC(3b116e0d) SHA1(5df873c00c1103304c2cb77cedf05a5db83ece29) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -5740,15 +5238,11 @@ 0x0677c8-0x13adcb is the non-Checksummed range still containing data but NOT covered by Checksum 0x0677c8-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0200849v.u7", 0x000000, 0x80000, CRC(5d18ae22) SHA1(c10f7a83f51cfe75653ace8066b7dedf07e91b28) ) ROM_LOAD32_WORD( "0200849v.u11", 0x000002, 0x80000, CRC(fe79410b) SHA1(c91a0ce0cf87db518f910e9f47cabdcb91dc5496) ) ROM_LOAD32_WORD( "0200849v.u8", 0x100000, 0x80000, CRC(09ec43e3) SHA1(947ed0982a148e6906666378e8c82315d40237d7) ) ROM_LOAD32_WORD( "0200849v.u12", 0x100002, 0x80000, CRC(165a762d) SHA1(8487d2e32bd2fab5a9114380ba2be6d34b097b11) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -5767,15 +5261,11 @@ 0x05f754-0x132d57 is the non-Checksummed range still containing data but NOT covered by Checksum 0x05f754-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100849v.u7", 0x000000, 0x80000, CRC(a0fe870c) SHA1(9283019b2615232ed5e4d72843047d27ef06c728) ) ROM_LOAD32_WORD( "0100849v.u11", 0x000002, 0x80000, CRC(b0856963) SHA1(30ea3ddbb9d5ee403039f3d9a7cb84fb4ff0aa54) ) ROM_LOAD32_WORD( "0100849v.u8", 0x100000, 0x80000, CRC(cfd2b025) SHA1(77d2ac9f7d7ae3c705401879d6e077fb3a03c00f) ) ROM_LOAD32_WORD( "0100849v.u12", 0x100002, 0x80000, CRC(4b5baf9d) SHA1(2fd13cbb22aff14936cbe2da582a0aa3984ab4a2) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -5785,15 +5275,11 @@ ARISTOCRAT_MK5_GALS ARISTOCRAT_MK5_EEPROM // checksum code not found (uses different startup sequence) - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0101241v.u7", 0x000000, 0x80000, CRC(e4183d54) SHA1(c5829448450dff212e76b5571fc1bf0ba681afdf) ) ROM_LOAD32_WORD( "0101241v.u11", 0x000002, 0x80000, CRC(2623c7b7) SHA1(3601364afe75355641405c4695ef3194eeac1245) ) ROM_LOAD32_WORD( "0101241v.u8", 0x100000, 0x80000, CRC(3ec83f06) SHA1(1a89901a5c9126646aa5425801ec4b1570072d20) ) ROM_LOAD32_WORD( "0101241v.u12", 0x100002, 0x80000, CRC(141e2b47) SHA1(e311693d730bfff99ad75995e47606e9822ba722) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -5809,13 +5295,9 @@ Calculated Checksum 0xd11b30fc (OK) 0x05d188-0x0e1d73 is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0200348v.u7", 0x000000, 0x80000, CRC(930bdc00) SHA1(36b1a289abebc7cce64e767e201d8f8f7fe80cf2) ) ROM_LOAD32_WORD( "0200348v.u11", 0x000002, 0x80000, CRC(11394e80) SHA1(1c6e7e954a6118e04da9d761fef8ec00c46d2af8) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -5833,15 +5315,11 @@ 0x054094-0x1d0ecf is the non-Checksummed range still containing data but NOT covered by Checksum 0x054094-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100348v.u7", 0x000000, 0x80000, CRC(734924f1) SHA1(33d2eecd046b40f90e54c5bbaed3779ebaebbc19) ) ROM_LOAD32_WORD( "0100348v.u11", 0x000002, 0x80000, CRC(c03b2120) SHA1(2fead5d70b58edd0f7c325d8495c61c93589a781) ) ROM_LOAD32_WORD( "0100348v.u8", 0x100000, 0x80000, CRC(d03eb2aa) SHA1(7e6345922fc9b86c8ccbff4a452747cd09a4d28c) ) ROM_LOAD32_WORD( "0100348v.u12", 0x100002, 0x80000, CRC(fd1c5c7b) SHA1(61b29459e39912ea3c2bf290e1f3061ce13ea648) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -5858,15 +5336,11 @@ 0x06d200-0x195d7b is the non-Checksummed range still containing data but NOT covered by Checksum 0x06d200-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0101046v.u7", 0x000000, 0x80000, CRC(6383899d) SHA1(df96af7cb580565715da6e78b83e7ba6832028e7) ) ROM_LOAD32_WORD( "0101046v.u11", 0x000002, 0x80000, CRC(0914594c) SHA1(b1bc1302847e3ea3c4ed96ae17047da031e5ca1a) ) ROM_LOAD32_WORD( "0101046v.u8", 0x100000, 0x80000, CRC(db840d1b) SHA1(26ff790cd21f2005ae3a3e879ef07b87c8ae0020) ) ROM_LOAD32_WORD( "0101046v.u12", 0x100002, 0x80000, CRC(eae75fa9) SHA1(576c8cf98ad4032bbdde12162e2c1bdd10056762) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -5883,15 +5357,11 @@ 0x0583f8-0x1e8b5b is the non-Checksummed range still containing data but NOT covered by Checksum 0x0583f8-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100716v.u7", 0x000000, 0x80000, CRC(8646a4a6) SHA1(1449ba497e4ccebf5de9630bfaf31ad3c583fc44) ) ROM_LOAD32_WORD( "0100716v.u11", 0x000002, 0x80000, CRC(61ae2a5a) SHA1(3b11c0f1c6e1464211e6dea958f08d7212ee5756) ) ROM_LOAD32_WORD( "0100716v.u8", 0x100000, 0x80000, CRC(91997f98) SHA1(2353abdc0b160cf087230f0c290f37f045a4d07b) ) ROM_LOAD32_WORD( "0100716v.u12", 0x100002, 0x80000, CRC(6adfd0ab) SHA1(3b6479bcd95812f5678a27adc7decbc881cd6caa) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -5912,16 +5382,12 @@ 0x0e9b48-0x1fd2ab is the non-Checksummed range still containing data but NOT covered by Checksum 0x0e9b48-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "ahg1567.u7", 0x000000, 0x80000, CRC(53047385) SHA1(efe50e8785047986513f2de63d2425ba80417481) ) ROM_LOAD32_WORD( "ahg1567.u11", 0x000002, 0x80000, CRC(f8bd9f7f) SHA1(a8c67a644f9090890e8f33e620fe0bb4633bd6e8) ) ROM_LOAD32_WORD( "ahg1567.u8", 0x100000, 0x80000, CRC(0b98a0fa) SHA1(c9ada21e39472f28cd9b8ec19be7235410ad3e7a) ) ROM_LOAD32_WORD( "ahg1567.u12", 0x100002, 0x80000, CRC(00d1395c) SHA1(d9a66d6cdb5aa4f583d8c23306b1416646cbde93) ) - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) - ROM_REGION16_BE( 0x100, "eeprom0", 0 ) ROM_LOAD16_WORD_SWAP( "eeprom0", 0x000000, 0x000100, CRC(fea8a821) SHA1(c744cac6af7621524fc3a2b0a9a135a32b33c81b) ) @@ -5952,15 +5418,11 @@ 0x0a69d4-0x1b953f is the non-Checksummed range still containing data but NOT covered by Checksum 0x0a69d4-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "bhg1284.u7", 0x000000, 0x80000, CRC(e9d2248a) SHA1(a010c722129cd78d14043356a24218d20d127a84) ) ROM_LOAD32_WORD( "bhg1284.u11", 0x000002, 0x80000, CRC(d5da519b) SHA1(44b44b3839c63cde8fd6dee333b8fd70d89a5213) ) ROM_LOAD32_WORD( "bhg1284.u8", 0x100000, 0x80000, CRC(3f72c99b) SHA1(df3a21d8c644ffa87d6c3ab091df03fa3e0ca4a4) ) ROM_LOAD32_WORD( "bhg1284.u12", 0x100002, 0x80000, CRC(090ce72f) SHA1(a4783ca84aabd365613357a53a19a3dd48f4df0c) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -5972,15 +5434,11 @@ ARISTOCRAT_MK5_GALS ARISTOCRAT_MK5_EEPROM // checksum code not found due to ROMs being corrupted, all files are missing bytes consisting of 0x0D - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "ahg1568.u7", 0x000000, 0x7efb7, BAD_DUMP CRC(69ab6487) SHA1(d7147f78dc098d142e857687e6cbdb8a8762371a) ) ROM_LOAD32_WORD( "ahg1568.u11", 0x000002, 0x7ff26, BAD_DUMP CRC(966bb4f8) SHA1(3fe5238acfab27c3fa6de9c00f0edf803a939df5) ) ROM_LOAD32_WORD( "ahg1568.u8", 0x100000, 0x7f7df, BAD_DUMP CRC(175c37cb) SHA1(6047ba1ec40ad4691bd05cf12680705f841086b3) ) ROM_LOAD32_WORD( "ahg1568.u12", 0x100002, 0x7f7da, BAD_DUMP CRC(43764888) SHA1(cfd59692f17e9ca70dc882423238f6de59dafbed) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -5997,15 +5455,11 @@ 0x0638d4-0x1dbf8b is the non-Checksummed range still containing data but NOT covered by Checksum 0x0638d4-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "02j00011.u7", 0x000000, 0x80000, CRC(e4497f35) SHA1(7030aba6c17fc391564385f5669e07edc94dca61) ) ROM_LOAD32_WORD( "02j00011.u11", 0x000002, 0x80000, CRC(3134818c) SHA1(6fe158608b5da648fafd20cbcd213e6f2dc2104c) ) ROM_LOAD32_WORD( "02j00011.u8", 0x100000, 0x80000, CRC(f239ca62) SHA1(53e3e2a4d62ceb9e921606e3670470c09e82118f) ) ROM_LOAD32_WORD( "02j00011.u12", 0x100002, 0x80000, CRC(2d96c449) SHA1(af98a864b9ed3f95227fd0d6edc6a38c0544c93f) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -6022,15 +5476,11 @@ 0x05c720-0x1aefcf is the non-Checksummed range still containing data but NOT covered by Checksum 0x05c720-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0200460v.u7", 0x000000, 0x80000, CRC(47145744) SHA1(74a186a15537d8b05ce23f37c53f351e8058b0b2) ) ROM_LOAD32_WORD( "0200460v.u11", 0x000002, 0x80000, CRC(82fc4e23) SHA1(54e7698c4deed7202da8f178698ecdcf85f3f640) ) ROM_LOAD32_WORD( "0200460v.u8", 0x100000, 0x80000, CRC(8d37d7bf) SHA1(9c9b86cce9492f9de346e5a6944e2f0c5da6b9b1) ) ROM_LOAD32_WORD( "0200460v.u12", 0x100002, 0x80000, CRC(90864742) SHA1(f6491e4fbce5d642b9d0224118923b56625338b1) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -6047,15 +5497,11 @@ 0x056450-0x1c19f3 is the non-Checksummed range still containing data but NOT covered by Checksum 0x056450-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0200357v.u7", 0x000000, 0x80000, CRC(cb21de26) SHA1(5a730f08db4d91b18f0b5a1f489f1d982b08edcc) ) ROM_LOAD32_WORD( "0200357v.u11", 0x000002, 0x80000, CRC(7dd73770) SHA1(14a2edf8cd33280464f979976486e1a9ae73cef5) ) ROM_LOAD32_WORD( "0200357v.u8", 0x100000, 0x80000, CRC(aa95406b) SHA1(fbec024dd210757a79a5ea4def79f88fed971e71) ) ROM_LOAD32_WORD( "0200357v.u12", 0x100002, 0x80000, CRC(123cbe90) SHA1(b51b84f79e0822a1be71485bbad514ab9fa55622) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -6073,15 +5519,11 @@ 0x05d7b8-0x1c9acf is the non-Checksummed range still containing data but NOT covered by Checksum 0x05d7b8-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0200359v.u7", 0x000000, 0x80000, CRC(f51c4e02) SHA1(fca30b3ce0d063966df1e878338596d050664695) ) ROM_LOAD32_WORD( "0200359v.u11", 0x000002, 0x80000, CRC(c0f20ef7) SHA1(4df3aa337a2d4dd8ef29f4839b003c96fe1df526) ) ROM_LOAD32_WORD( "0200359v.u8" , 0x100000, 0x80000, CRC(23ea514d) SHA1(bcb83a8d768b078a03260a00fa09a4e2350c568c) ) ROM_LOAD32_WORD( "0200359v.u12", 0x100002, 0x80000, CRC(d2882682) SHA1(dd42edca8ef9d28dd5b16fe8132f8e0fb3c85979) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -6098,15 +5540,11 @@ 0x0537d8-0x1e2167 is the non-Checksummed range still containing data but NOT covered by Checksum 0x0537d8-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0200113v.u7", 0x000000, 0x80000, CRC(1b96bee2) SHA1(7e7ecd708236ab0765476d1dcf3aae302a676e73) ) ROM_LOAD32_WORD( "0200113v.u11", 0x000002, 0x80000, CRC(879ddd2e) SHA1(9fc7fd18266d5b47349e6f36b6097b9f67f1da84) ) ROM_LOAD32_WORD( "0200113v.u8", 0x100000, 0x80000, CRC(bb113f55) SHA1(48d3bb426a5a76966bc14bd5909cdc5946203f5d) ) ROM_LOAD32_WORD( "0200113v.u12", 0x100002, 0x80000, CRC(a1865467) SHA1(572558bab639145c8260884a95646fc424687b47) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -6116,15 +5554,11 @@ ARISTOCRAT_MK5_GALS ARISTOCRAT_MK5_EEPROM // checksum code not found due to ROMs being corrupted, all files are missing bytes consisting of 0x0D - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0300113v.u7", 0x000000, 0x7f909, BAD_DUMP CRC(30c6c635) SHA1(9a31f99c8a7fb0a909b101b2c5767f39930934e9) ) ROM_LOAD32_WORD( "0300113v.u11", 0x000002, 0x7ff9b, BAD_DUMP CRC(7290c743) SHA1(5f7fa8d8a0fd0bb18f2d4c81f21f39fabc34681f) ) ROM_LOAD32_WORD( "0300113v.u8", 0x100000, 0x7faf6, BAD_DUMP CRC(1f983881) SHA1(9cefafa6074fc0f5817df226fbf01a8fb7cbbadb) ) ROM_LOAD32_WORD( "0300113v.u12", 0x100002, 0x7fb27, BAD_DUMP CRC(7206dc37) SHA1(4d2f8551daeb4be13e73e3123e158dc1e1e4e067) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -6144,16 +5578,12 @@ 0x0cd21c-0x192ed7 is the non-Checksummed range still containing data but NOT covered by Checksum 0x0cd21c-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "bhi041703.u7", 0x000000, 0x80000, CRC(19d75260) SHA1(798472b1b5d8f5ca99d8bfe57e99a76686f0aa3f) ) ROM_LOAD32_WORD( "bhi041703.u11", 0x000002, 0x80000, CRC(2b010813) SHA1(a383997308881a3ac35de56fe10e3852fa89fdf6) ) ROM_LOAD32_WORD( "bhi041703.u8", 0x100000, 0x80000, CRC(6aeaebc8) SHA1(6f70b14e9f4e9940512bd6e89bc9ccbfe1f4a81f) ) ROM_LOAD32_WORD( "bhi041703.u12", 0x100002, 0x80000, CRC(d959a048) SHA1(92f69090d599f95b48e79213e5b7d486e083d8f4) ) - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) - ROM_REGION16_BE( 0x100, "eeprom0", 0 ) ROM_LOAD16_WORD_SWAP( "eeprom0", 0x000000, 0x000100, CRC(fea8a821) SHA1(c744cac6af7621524fc3a2b0a9a135a32b33c81b) ) @@ -6184,15 +5614,11 @@ 0x0a8990-0x1674cf is the non-Checksummed range still containing data but NOT covered by Checksum 0x0a8990-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "ohg041703.u7", 0x000000, 0x80000, CRC(48689db1) SHA1(6aa07a0e6dbf98a34cca31d5983ae9429f2254aa) ) ROM_LOAD32_WORD( "ohg041703.u11", 0x000002, 0x80000, CRC(50e00a35) SHA1(e8f104621c8fc21d8ba33157729f394554c776e2) ) ROM_LOAD32_WORD( "ohg041703.u8", 0x100000, 0x80000, CRC(a08acbb3) SHA1(8a7cc927a81521b069873a720d1a083f164dc2ef) ) ROM_LOAD32_WORD( "ohg041703.u12", 0x100002, 0x80000, CRC(9eae7f7b) SHA1(23bd952de1d6d5d69e5565cc2bc241c2cd775453) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -6212,15 +5638,11 @@ 0x0a8990-0x1674cf is the non-Checksummed range still containing data but NOT covered by Checksum 0x0a8990-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "ohg041702.u7", 0x000000, 0x80000, CRC(76b7641f) SHA1(8df2c46ec8e5ec5574f12878619593e7157df517) ) ROM_LOAD32_WORD( "ohg041702.u11", 0x000002, 0x80000, CRC(6d731b81) SHA1(06ea80e1003ceba8a790a035c520aaca99db4d54) ) ROM_LOAD32_WORD( "ohg041702.u8", 0x100000, 0x80000, CRC(a08acbb3) SHA1(8a7cc927a81521b069873a720d1a083f164dc2ef) ) ROM_LOAD32_WORD( "ohg041702.u12", 0x100002, 0x80000, CRC(9eae7f7b) SHA1(23bd952de1d6d5d69e5565cc2bc241c2cd775453) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -6241,7 +5663,7 @@ Calculated Checksum 0x029d0237 (OK) 0x0f3690-0x39746f is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "ahg1544.u7", 0x000000, 0x80000, CRC(c899afcf) SHA1(85b3b9f94965c2bf10b5d5b265aef28bda01a3cb) ) // game ROM_LOAD32_WORD( "ahg1544.u11", 0x000002, 0x80000, CRC(c44eb9bd) SHA1(6eca6459806aa7d0ab0d53e8e3e6f3c0c71f7220) ) // game ROM_LOAD32_WORD( "ahg1544.u8", 0x100000, 0x80000, CRC(c9ebdf24) SHA1(cf29c42d4f15edfe5ba24be6282b3a6d01a29a13) ) // base @@ -6250,10 +5672,6 @@ ROM_LOAD32_WORD( "ahg1544.u13", 0x200002, 0x80000, CRC(5ebd90a7) SHA1(766291b62ed4a65ba6fb2d64e52022dd4831957d) ) // base ROM_LOAD32_WORD( "ahg1544.u10", 0x300000, 0x80000, CRC(cbbbb21f) SHA1(c9c213ac720cb7a95179db592dcadbb466ffd572) ) // base ROM_LOAD32_WORD( "ahg1544.u14", 0x300002, 0x80000, CRC(4ef4f063) SHA1(d6e9928f80f19d3fdd0e7acb0bfb6f9b2ae5724b) ) // base - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -6272,7 +5690,7 @@ Calculated Checksum 0x6845d74f (OK) 0x0f29f0-0x3c1373 is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "ehg1257.u7", 0x000000, 0x80000, CRC(06872381) SHA1(09727389ed05819a9aefaeba7d12ec86399f0008) ) ROM_LOAD32_WORD( "ehg1257.u11", 0x000002, 0x80000, CRC(39edca69) SHA1(03410f5f392404cd5ad72a45995ccd9bfbc2fee3) ) ROM_LOAD32_WORD( "ehg1257.u8", 0x100000, 0x80000, CRC(06f6430f) SHA1(ea9dd4d12e573182d48d1be76110b1df12167d83) ) @@ -6281,10 +5699,6 @@ ROM_LOAD32_WORD( "ehg1257.u13", 0x200002, 0x80000, CRC(b35e690a) SHA1(90616892169cbb24abad35f22000ab10ae94331a) ) ROM_LOAD32_WORD( "ehg1257.u10", 0x300000, 0x80000, CRC(8afb5df5) SHA1(2654034776160abe7fb0169c3e773204ea90acf6) ) ROM_LOAD32_WORD( "ehg1257.u14", 0x300002, 0x80000, CRC(b6cb5809) SHA1(84288a41d2a3980bf68e9a32b9402652ac6a16d6) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -6301,15 +5715,11 @@ 0x05d27c-0x1ce66f is the non-Checksummed range still containing data but NOT covered by Checksum 0x05d27c-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100674v.u7", 0x000000, 0x80000, CRC(219113d9) SHA1(76aaa3aff0ecb86b749271e0aa4670738c6f263d) ) ROM_LOAD32_WORD( "0100674v.u11", 0x000002, 0x80000, CRC(91c57c7b) SHA1(95128ba87d35be2a489b33e381dee3be573b4a53) ) ROM_LOAD32_WORD( "0100674v.u8", 0x100000, 0x80000, CRC(8c738184) SHA1(46385dc6e848f065f0b840bb13709bae90ab9b9f) ) ROM_LOAD32_WORD( "0100674v.u12", 0x100002, 0x80000, CRC(acdbbbe6) SHA1(5909135163af18c3ecd84934612e3751ca62ae74) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -6326,15 +5736,11 @@ 0x05feec-0x1cdcc7 is the non-Checksummed range still containing data but NOT covered by Checksum 0x05feec-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0200578v.u7", 0x000000, 0x80000, CRC(4bdb20a2) SHA1(f7121a65556b13b58eca7a8816c7d49a10233171) ) ROM_LOAD32_WORD( "0200578v.u11", 0x000002, 0x80000, CRC(45a4c6ff) SHA1(7692d4bdeca75bb5c7cc89ada267bd58c620d774) ) ROM_LOAD32_WORD( "0200578v.u8", 0x100000, 0x80000, CRC(8b105815) SHA1(b77134d73bc61c2c3995f18991cbf1473a9f6293) ) ROM_LOAD32_WORD( "0200578v.u12", 0x100002, 0x80000, CRC(7ea30a52) SHA1(70d7640ea237197be4b2b8c64c2a97ad7b608cc0) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -6355,7 +5761,7 @@ 0x089a30-0x2a8ecf is the non-Checksummed range still containing data but NOT covered by Checksum 0x089a30-0x2fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) // these are the 'bios' for Casino games (could be moved to a different base set) ROM_LOAD32_WORD( "0700474v.u7", 0x000000, 0x80000, CRC(04b7dcbf) SHA1(eded1223336181bb08f9593247f1f79d96278b75) ) ROM_LOAD32_WORD( "0700474v.u11", 0x000002, 0x80000, CRC(a89ce1b5) SHA1(411b474a111f23ebd834bea5af0bf0cf3926d590) ) @@ -6364,10 +5770,6 @@ ROM_LOAD32_WORD( "0100869v.u12", 0x100002, 0x80000, CRC(2aef04c1) SHA1(7415f436960c7b4a43634161ca317b2ae34ee745) ) ROM_LOAD32_WORD( "0100869v.u9", 0x200000, 0x80000, CRC(05de2653) SHA1(7d3f9d50013d8137cef285940b04209cfdae4a1d) ) ROM_LOAD32_WORD( "0100869v.u13", 0x200002, 0x80000, CRC(e1dbfd58) SHA1(687b7254279734e1835e1713d032b5aa2cf70812) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -6384,15 +5786,11 @@ 0x05f128-0x195c0b is the non-Checksummed range still containing data but NOT covered by Checksum 0x05f128-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100731v.u7", 0x000000, 0x80000, CRC(01cffccc) SHA1(a39d943e700fff34d82bcff8c61f2586ee65e673) ) ROM_LOAD32_WORD( "0100731v.u11", 0x000002, 0x80000, CRC(a8e906c5) SHA1(f6dd7bcf5fa90933c9741699f0c1e07b685ccb40) ) ROM_LOAD32_WORD( "0100731v.u8", 0x100000, 0x80000, CRC(757e1296) SHA1(e14508bbaa3439a93c8b716267a2198ed3c54728) ) ROM_LOAD32_WORD( "0100731v.u12", 0x100002, 0x80000, CRC(6e74cd57) SHA1(9092e656cbd8627b208b81ca0d737483a779bce1) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END // 0100679V / 618 / 10 Credit Multiplier / 9 Line Multiline @@ -6401,15 +5799,11 @@ ARISTOCRAT_MK5_GALS ARISTOCRAT_MK5_EEPROM // checksum code not found due to bad ROMs, all 4 ROMs have stuck bits (0x20) - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100679v.u7", 0x000000, 0x80000, BAD_DUMP CRC(cf4a24fa) SHA1(b510de9199d16ba7319e1b692d7c6c09fcb735dc) ) ROM_LOAD32_WORD( "0100679v.u11", 0x000002, 0x7fffd, BAD_DUMP CRC(bfaa9216) SHA1(19f1c7de05ff7f5f9f370be00cf8f0635e966809) ) // wrong size! ROM_LOAD32_WORD( "0100679v.u8", 0x100000, 0x80000, BAD_DUMP CRC(bb9f7519) SHA1(fa311f1ec74c3b52e2feed36d7b7dc6a12336abe) ) ROM_LOAD32_WORD( "0100679v.u12", 0x100002, 0x80000, BAD_DUMP CRC(2cd12986) SHA1(b6b0bd6dd8c964498edc3763cb5c450795042a8d) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -6426,15 +5820,11 @@ 0x044714-0x1d8f87 is the non-Checksummed range still containing data but NOT covered by Checksum 0x044714-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0500005v.u7", 0x000000, 0x80000, CRC(2cfc44a7) SHA1(a2a93047311d7a1f45e2915478ba2a11d5179194) ) ROM_LOAD32_WORD( "0500005v.u11", 0x000002, 0x80000, CRC(3e91ed2a) SHA1(92d49bd78d329ad53cb2063af2d324eada3f53d1) ) ROM_LOAD32_WORD( "0500005v.u8", 0x100000, 0x80000, CRC(ab1e77e9) SHA1(5a8da1210214ccc89dfde2e28f5142036a743172) ) ROM_LOAD32_WORD( "0500005v.u12", 0x100002, 0x80000, CRC(d43a092a) SHA1(5f851bd179b14ef3983b460ed932810f3713d3e5) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -6451,17 +5841,13 @@ 0x053df0-0x2a9f7f is the non-Checksummed range still containing data but NOT covered by Checksum 0x053df0-0x2fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100299v.u7", 0x000000, 0x80000, CRC(2b1a9678) SHA1(c75de4c76cd934df746040d0515694d92e2fc145) ) ROM_LOAD32_WORD( "0100299v.u11", 0x000002, 0x80000, CRC(e1bf20d7) SHA1(bcc308b884433b3ebd890fafa667235a9fb7876c) ) ROM_LOAD32_WORD( "0100299v.u8", 0x100000, 0x80000, CRC(92b68d43) SHA1(74ba55d6c7016de26692138d194f57f016feb938) ) ROM_LOAD32_WORD( "0100299v.u12", 0x100002, 0x80000, CRC(b4797555) SHA1(695aa6c40145fd9856821288680a24d316b7d4cd) ) ROM_LOAD32_WORD( "0100299v.u9", 0x200000, 0x80000, CRC(b3163b0c) SHA1(e9aac4acb31a9af194626b25517aa7c169fe40bf) ) ROM_LOAD32_WORD( "0100299v.u13", 0x200002, 0x80000, CRC(c16197d5) SHA1(716c4afdf2acde10ff09ad90b03bc5e689f0a737) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -6478,15 +5864,11 @@ 0x05d55c-0x1a669f is the non-Checksummed range still containing data but NOT covered by Checksum 0x05d55c-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100706v.u7", 0x000000, 0x80000, CRC(591c96eb) SHA1(acd6f02206086d710a92401c618f715b3646d78a) ) ROM_LOAD32_WORD( "0100706v.u11", 0x000002, 0x80000, CRC(5001567e) SHA1(eadde9750856a7920e06955adc0db46082da655a) ) ROM_LOAD32_WORD( "0100706v.u8", 0x100000, 0x80000, CRC(31ed5795) SHA1(8238da7c87195339d34cf24b3e0a7f3bf53d2b8a) ) ROM_LOAD32_WORD( "0100706v.u12", 0x100002, 0x80000, CRC(bfedb3fc) SHA1(e115db94b8ee7babb29e31e64b96d181f5c6491b) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -6504,15 +5886,11 @@ 0x062914-0x1740eb is the non-Checksummed range still containing data but NOT covered by Checksum 0x062914-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0300439v.u7", 0x000000, 0x80000, CRC(63f9129e) SHA1(a513fd47d3ca4fe007730a06e5f6ffc2891dc74f) ) ROM_LOAD32_WORD( "0300439v.u11", 0x000002, 0x80000, CRC(7217c3af) SHA1(518c3d79758e3253f937cf73da9398fa812bf4bc) ) ROM_LOAD32_WORD( "0300439v.u8", 0x100000, 0x80000, CRC(90c92bf8) SHA1(bbc558ffb5a883c9f4ff9dc3362c4081990c970d) ) ROM_LOAD32_WORD( "0300439v.u12", 0x100002, 0x80000, CRC(eec01bb4) SHA1(146fdce6b32a21659dc775e4a5f3bb027bd09825) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -6530,15 +5908,11 @@ 0x059e00-0x16b5d7 is the non-Checksummed range still containing data but NOT covered by Checksum 0x059e00-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0200439v.u7", 0x000000, 0x80000, CRC(d476a893) SHA1(186d6fb1830c33976f2d3c96e4f045ece885dc63) ) ROM_LOAD32_WORD( "0200439v.u11", 0x000002, 0x80000, CRC(8b0d7205) SHA1(ffa03f1c9332a1a7443eb91b0ded56e7cd9e3cee) ) ROM_LOAD32_WORD( "0200439v.u8", 0x100000, 0x80000, CRC(9b996ef1) SHA1(72489e9a0ee5c34f7cad3d121bcd08e09ef72360) ) ROM_LOAD32_WORD( "0200439v.u12", 0x100002, 0x80000, CRC(2a0f7feb) SHA1(27c89dadf759e6c892121650758c44ec50990cb6) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -6556,15 +5930,11 @@ 0x055c84-0x16745b is the non-Checksummed range still containing data but NOT covered by Checksum 0x055c84-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100439v.u7", 0x000000, 0x80000, CRC(f359afcf) SHA1(a8cbaea899f0108a179c58ec97241a57227afa79) ) ROM_LOAD32_WORD( "0100439v.u11", 0x000002, 0x80000, CRC(ca4fe491) SHA1(2bd799f95c9a5afb7c96305bf56413ba864a26dd) ) ROM_LOAD32_WORD( "0100439v.u8", 0x100000, 0x80000, CRC(80efde3a) SHA1(1fac1b150c5c8c52a4caaa01c4571a0e7033278d) ) ROM_LOAD32_WORD( "0100439v.u12", 0x100002, 0x80000, CRC(bdcec4eb) SHA1(ef3658460263cd2e68e10015efdc016ad705213e) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -6586,7 +5956,7 @@ 0x0d1c94-0x23692f is the non-Checksummed range still containing data but NOT covered by Checksum 0x0d1c94-0x2fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) // these are the 'bios' for Casino games (could be moved to a different base set) ROM_LOAD32_WORD( "0301718v.u7", 0x000000, 0x80000, CRC(e0bf299d) SHA1(9015c912b8dd652f07a80baa4c0776b44dc60f65) ) ROM_LOAD32_WORD( "0301718v.u11", 0x000002, 0x80000, CRC(7696ab70) SHA1(65ae908ff7cc67334d866afe6fcc1e81fac1d962) ) @@ -6595,10 +5965,6 @@ ROM_LOAD32_WORD( "0101707v.u12", 0x100002, 0x80000, CRC(f80d4b86) SHA1(b798d93266d93cde5299abd30689812df52f03ab) ) ROM_LOAD32_WORD( "0101707v.u9", 0x200000, 0x80000, CRC(0d688398) SHA1(f1f8c269f52d196dda0946406d85f8c63c990c64) ) ROM_LOAD32_WORD( "0101707v.u13", 0x200002, 0x80000, CRC(1b5da8ca) SHA1(9a6cfbadba24677a0d82a61ffdc25772ecbac287) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -6615,15 +5981,11 @@ 0x064c4c-0x172a17 is the non-Checksummed range still containing data but NOT covered by Checksum 0x064c4c-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0300440v.u7", 0x000000, 0x80000, CRC(0076da68) SHA1(ed301c102e88d5b637144ed32042da46780e5b34) ) ROM_LOAD32_WORD( "0300440v.u11", 0x000002, 0x80000, CRC(b5b76fb0) SHA1(40cb57e168f7884d64f6779e4e3b532c69df63b8) ) ROM_LOAD32_WORD( "0300440v.u8", 0x100000, 0x80000, CRC(a6b856a2) SHA1(2a9ea01f64fa56dea86b0cd25e19dace34c17d0f) ) ROM_LOAD32_WORD( "0300440v.u12", 0x100002, 0x80000, CRC(52bd3694) SHA1(bcfa3054c7577f7a1653b756828d048a5f1776e7) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -6642,7 +6004,7 @@ Calculated Checksum 0xb51d7d67 (OK) 0x0f2454-0x3bcd33 is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "ahg1609.u7", 0x000000, 0x80000, CRC(4596f2dc) SHA1(62ca6ec2c22a79feaeddc43697589e3ed2672367) ) ROM_LOAD32_WORD( "ahg1609.u11", 0x000002, 0x80000, CRC(75ec9cfb) SHA1(5a8dfed93774fbf255b060b7b212e699348b364d) ) ROM_LOAD32_WORD( "ahg1609.u8", 0x100000, 0x80000, CRC(e7ee132e) SHA1(9360ca77e1a2ffa7c0fecf74b949032f887a21e7) ) @@ -6651,10 +6013,6 @@ ROM_LOAD32_WORD( "ahg1609.u13", 0x200002, 0x80000, CRC(79e4fc75) SHA1(621f78e4c65acd49643b9fd955f070061ff38050) ) ROM_LOAD32_WORD( "ahg1609.u10", 0x300000, 0x80000, CRC(d565f21c) SHA1(0dd858c61338f9d6a99d787f813a4b4a4e553fb2) ) ROM_LOAD32_WORD( "ahg1609.u14", 0x300002, 0x80000, CRC(fe7817f3) SHA1(a3579ed7ce6d999b0f71482f2a2e3ade693668fb) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -6674,7 +6032,7 @@ Calculated Checksum 0x34434fc2 (OK) 0x0ee850-0x3b9137 is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "ahg1525.u7", 0x000000, 0x80000, CRC(0c7f5a0d) SHA1(71e5f0b0dfd8a9176d18ab0144161e0b32aa4d0e) ) ROM_LOAD32_WORD( "ahg1525.u11", 0x000002, 0x80000, CRC(24b1e4f6) SHA1(0c6532b296cfa44f94b893483042cb669b023829) ) ROM_LOAD32_WORD( "ahg1525.u8", 0x100000, 0x80000, CRC(3c5e5edd) SHA1(46cd9609ace5dedf6bda1892b7d7926c4c1abc21) ) @@ -6683,10 +6041,6 @@ ROM_LOAD32_WORD( "ahg1525.u13", 0x200002, 0x80000, CRC(73138015) SHA1(86202a24f3ebcecb3265f625fe83150d197781aa) ) ROM_LOAD32_WORD( "ahg1525.u10", 0x300000, 0x80000, CRC(2005e638) SHA1(69b56885294d84cbc12e4a98f9818aa3efc44ab5) ) ROM_LOAD32_WORD( "ahg1525.u14", 0x300002, 0x80000, CRC(520452d4) SHA1(6d501b82a7b35a6e53a0991cbc384b752a295edf) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -6707,7 +6061,7 @@ Calculated Checksum 0xad17f6d5 (OK) 0x0f2380-0x3bcc5f is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "ahg1608.u7", 0x000000, 0x80000, CRC(220d4dbc) SHA1(89dc37c6774b7e066868130ce2985a0d86953ec4) ) ROM_LOAD32_WORD( "ahg1608.u11", 0x000002, 0x80000, CRC(f11e9f7b) SHA1(3d282dd779f48bca98c4d4ebca4e7206e0f2dff6) ) ROM_LOAD32_WORD( "ahg1608.u8", 0x100000, 0x80000, CRC(7101c670) SHA1(51cca228ca219c778761e500ac37953e874e76f5) ) @@ -6716,10 +6070,6 @@ ROM_LOAD32_WORD( "ahg1608.u13", 0x200002, 0x80000, CRC(221c24af) SHA1(218bc944a9ba2d89c9b9b8d29e61a37048e70adc) ) ROM_LOAD32_WORD( "ahg1608.u10", 0x300000, 0x80000, CRC(49e35226) SHA1(6d3396ff74dd892a009edf32dc3a7677979a9854) ) ROM_LOAD32_WORD( "ahg1608.u14", 0x300002, 0x80000, CRC(4d0f1d12) SHA1(980775e628e9508398cb5227af10ed9ff0555b8a) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -6736,17 +6086,13 @@ 0x068184-0x251633 is the non-Checksummed range still containing data but NOT covered by Checksum 0x068184-0x2fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0101139v.u7", 0x000000, 0x80000, CRC(07ee2925) SHA1(b73e5124986020202e06dd907fbdbfb5f9ad2141) ) ROM_LOAD32_WORD( "0101139v.u11", 0x000002, 0x80000, CRC(bcbdd3f8) SHA1(f8429a4077f9ae6f7e7b4f9a0feed6f5ec9b8126) ) ROM_LOAD32_WORD( "0101139v.u8", 0x100000, 0x80000, CRC(02e06b31) SHA1(23316ae3d0f5907c4e32796c45519089ec5c1622) ) ROM_LOAD32_WORD( "0101139v.u12", 0x100002, 0x80000, CRC(f2d6238f) SHA1(0aa847b664d7a322a845ce8d941b0afab6765d7d) ) ROM_LOAD32_WORD( "0101139v.u9", 0x200000, 0x80000, CRC(37a0534c) SHA1(8db2184ee93e8879234c865b4464b5994e96a10a) ) ROM_LOAD32_WORD( "0101139v.u13", 0x200002, 0x80000, CRC(160fbbb5) SHA1(fe2ce9b915b0dfcbc60deed30a95550a21a18127) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -6763,17 +6109,13 @@ Calculated Checksum 0x3297c26b (OK) 0x086cbc-0x2aecd3 is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0101670v.u7", 0x000000, 0x80000, CRC(71817007) SHA1(90cd928894044b629e03aa2c1d533eb6aed4c7af) ) ROM_LOAD32_WORD( "0101670v.u11", 0x000002, 0x80000, CRC(53006d14) SHA1(00d99e74433023d007f6a401d0081decb36a32dc) ) ROM_LOAD32_WORD( "0101670v.u8", 0x100000, 0x80000, CRC(ffd13e39) SHA1(d0fd0efc968fc4c8c81b0824eb9773462b88acb4) ) ROM_LOAD32_WORD( "0101670v.u12", 0x100002, 0x80000, CRC(d918d776) SHA1(aa3729d712a43b777d648c840b3e3de21d76ab50) ) ROM_LOAD32_WORD( "0101670v.u9", 0x200000, 0x80000, CRC(d8c46bd8) SHA1(ae9427f668fe109573915ca0408450137f75ade0) ) ROM_LOAD32_WORD( "0101670v.u13", 0x200002, 0x80000, CRC(715e7789) SHA1(b734aa88e7e65fba988e7fffd711039c4f554b2c) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -6790,7 +6132,7 @@ Calculated Checksum 0xcd901653 (OK) 0x06fd70-0x3864c7 is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0401072v.u7", 0x000000, 0x80000, CRC(4ac2a82e) SHA1(3fc50e97ad48c57e21a37fbb6142152c72055ad4) ) ROM_LOAD32_WORD( "0401072v.u11", 0x000002, 0x80000, CRC(6ae3872f) SHA1(f8c1b31e4ebd4833dcc2b7cfff25f6473ad78f4e) ) ROM_LOAD32_WORD( "0401072v.u8", 0x100000, 0x80000, CRC(abbbf1de) SHA1(5efd88213180846ad8347e017e5ccee5b80b95d0) ) @@ -6799,10 +6141,6 @@ ROM_LOAD32_WORD( "0401072v.u13", 0x200002, 0x80000, CRC(1b77bbd0) SHA1(c93d2f844032631d9594d02fa6ac41e21025a8ea) ) ROM_LOAD32_WORD( "0401072v.u10", 0x300000, 0x80000, CRC(8491dbc4) SHA1(f0d4e470f0774a6aac168334390c116fd3d1075e) ) ROM_LOAD32_WORD( "0401072v.u14", 0x300002, 0x80000, CRC(4fbccf72) SHA1(97d6bb400caf78cb673a324d48d2580f1bbb1acd) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -6819,15 +6157,11 @@ 0x05d1cc-0x16add3 is the non-Checksummed range still containing data but NOT covered by Checksum 0x05d1cc-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0301059v.u7", 0x000000, 0x80000, CRC(99aa5674) SHA1(54d710b7c70c82a34c07bc699bf9c2ace7f660c3) ) ROM_LOAD32_WORD( "0301059v.u11", 0x000002, 0x80000, CRC(c9726930) SHA1(50915edbde3672d94236b2f416c490466b5ac1c6) ) ROM_LOAD32_WORD( "0301059v.u8", 0x100000, 0x80000, CRC(d3cd3939) SHA1(0448722e44ee5ef191c9f2abab3faf2596284822) ) ROM_LOAD32_WORD( "0301059v.u12", 0x100002, 0x80000, CRC(e505912a) SHA1(ae71aa6d56d424383add3b9cbc17473ab0a13bdc) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -6838,17 +6172,13 @@ ARISTOCRAT_MK5_GALS ARISTOCRAT_MK5_EEPROM // checksum code not found (uses different startup sequence) - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0300785v.u7", 0x000000, 0x80000, CRC(c327d801) SHA1(4721d87a7a759bd437d0d93dc6c415e7a8e60ea5) ) ROM_LOAD32_WORD( "0300785v.u11", 0x000002, 0x80000, CRC(6bf94b80) SHA1(82d5fa551818bd23eecceaa992ec0d9992c53786) ) ROM_LOAD32_WORD( "0300785v.u8", 0x100000, 0x80000, CRC(23e5aa25) SHA1(1b77f5ad1cd990e5b21ee9fa018e7ea584cc871e) ) ROM_LOAD32_WORD( "0300785v.u12", 0x100002, 0x80000, CRC(b938825c) SHA1(137abb5573fe120ca9cb1fa181bd8591889420d0) ) ROM_LOAD32_WORD( "0300785v.u9", 0x200000, 0x80000, CRC(35244a36) SHA1(2529ee5d2d8419d050dc1af501adba24f8e1fbcb) ) ROM_LOAD32_WORD( "0300785v.u13", 0x200002, 0x80000, CRC(b267d25a) SHA1(8065601190540e5f0b4a91fed1deffcdb2606f94) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -6865,15 +6195,11 @@ 0x080800-0x1aa743 is the non-Checksummed range still containing data but NOT covered by Checksum 0x080800-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0201200v.u7", 0x000000, 0x80000, CRC(093b575c) SHA1(3139e1f1e94f752e2162af8064ab7d62f0b15b07) ) ROM_LOAD32_WORD( "0201200v.u11", 0x000002, 0x80000, CRC(2a356826) SHA1(4c9ae643570fceff7138e1a7bb780de9eaa272b0) ) ROM_LOAD32_WORD( "0201200v.u8", 0x100000, 0x80000, CRC(8b3dd4cb) SHA1(b57494001bfd6a7b933214b62f5c93cb8c21fdca) ) ROM_LOAD32_WORD( "0201200v.u12", 0x100002, 0x80000, CRC(38332f4e) SHA1(53c90103df06e5a28bbaf32504a0984b7c65bec7) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -6893,16 +6219,12 @@ 0x08ec88-0x1aca67 is the non-Checksummed range still containing data but NOT covered by Checksum 0x08ec88-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "ghg409102.u7", 0x000000, 0x80000, CRC(a00ab2cf) SHA1(eb3120fe4b1d0554c224c7646e727e86fd35975e) ) ROM_LOAD32_WORD( "ghg409102.u11", 0x000002, 0x80000, CRC(c4a35337) SHA1(d469ed154caed1f0a4cf89e67d852924c95172ed) ) ROM_LOAD32_WORD( "ghg409102.u8", 0x100000, 0x80000, CRC(16a629e1) SHA1(0dee11a2f1b2068a86b3e0b6c01d115555a657c9) ) ROM_LOAD32_WORD( "ghg409102.u12", 0x100002, 0x80000, CRC(7871a846) SHA1(ac1d741092afda842e1864f1a7a14137a9ee46d9) ) - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) - ROM_REGION16_BE( 0x100, "eeprom0", 0 ) ROM_LOAD16_WORD_SWAP( "eeprom0", 0x000000, 0x000100, CRC(fea8a821) SHA1(c744cac6af7621524fc3a2b0a9a135a32b33c81b) ) @@ -6936,15 +6258,11 @@ 0x08ec88-0x1aca67 is the non-Checksummed range still containing data but NOT covered by Checksum 0x08ec88-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "ghg409103.u7", 0x000000, 0x80000, CRC(63c5e917) SHA1(9b1735999d66e4cf879803980c8ac03513445589) ) // 94.941% ROM_LOAD32_WORD( "ghg409103.u11", 0x000002, 0x80000, CRC(0b9256a1) SHA1(711484463bfaa6c6b038a2c8cabd4dc009e55ad3) ) // 94.941% ROM_LOAD32_WORD( "ghg4091.u8", 0x100000, 0x80000, CRC(16a629e1) SHA1(0dee11a2f1b2068a86b3e0b6c01d115555a657c9) ) // base ROM_LOAD32_WORD( "ghg4091.u12", 0x100002, 0x80000, CRC(7871a846) SHA1(ac1d741092afda842e1864f1a7a14137a9ee46d9) ) // base - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -6963,15 +6281,11 @@ 0x081a0c-0x18f7d7 is the non-Checksummed range still containing data but NOT covered by Checksum 0x081a0c-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "04j00784.u7", 0x000000, 0x80000, CRC(e42c82a2) SHA1(1f6f9a349210ed859f47ce43958c84d59e169854) ) ROM_LOAD32_WORD( "04j00784.u11", 0x000002, 0x80000, CRC(25923a01) SHA1(f958b2dc0155077ea5c7bd87dfd16b42fc2d8d17) ) ROM_LOAD32_WORD( "04j00784.u8", 0x100000, 0x80000, CRC(5b2e6830) SHA1(9b21abae77d20a3be28dc5c1b0ecbb2ae9197db9) ) ROM_LOAD32_WORD( "04j00784.u12", 0x100002, 0x80000, CRC(621adc77) SHA1(2fecef64139c502b0baee5c945fe5671532aacab) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -6988,15 +6302,11 @@ 0x0454b0-0x1b2f8b is the non-Checksummed range still containing data but NOT covered by Checksum 0x0454b0-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0500009v.u7", 0x000000, 0x80000, CRC(f294fc0a) SHA1(f3d60ca6008445f535fce027f5ec3fe82ae552c3) ) ROM_LOAD32_WORD( "0500009v.u11", 0x000002, 0x80000, CRC(328b7e04) SHA1(5c49f60b7c88d6e94e7ab464fad4eee6806f327a) ) ROM_LOAD32_WORD( "0500009v.u8", 0x100000, 0x80000, CRC(764b5568) SHA1(a097992499044b7ca017a8c85387dc1ea94ff27a) ) ROM_LOAD32_WORD( "0500009v.u12", 0x100002, 0x80000, CRC(bb8344a9) SHA1(8b0e904b937c7f34470ad946076240b0c54bf434) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -7014,7 +6324,7 @@ 0x06bb14-0x367863 is the non-Checksummed range still containing data but NOT covered by Checksum 0x06bb14-0x3fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0101332v.u7", 0x000000, 0x80000, CRC(68d9bf78) SHA1(6170ea26ebc732abbc26ba1da35a081c8aa8d154) ) ROM_LOAD32_WORD( "0101332v.u11", 0x000002, 0x80000, CRC(4170c68d) SHA1(bc00af27bcc176f8d9c9fd0ec1a7139e28f85113) ) ROM_LOAD32_WORD( "0101332v.u8", 0x100000, 0x80000, CRC(98ebea6f) SHA1(2d78cec777581a87bb4b84e7acd183b237c83e52) ) @@ -7023,10 +6333,6 @@ ROM_LOAD32_WORD( "0101332v.u13", 0x200002, 0x80000, CRC(36debb0e) SHA1(4aaa495f74dfb13aa1dc47f3a8af8e54496c1ab8) ) ROM_LOAD32_WORD( "0101332v.u10", 0x300000, 0x80000, CRC(39f5861f) SHA1(c614ebe2c324d5c3fff32379300f2869fba49d39) ) ROM_LOAD32_WORD( "0101332v.u14", 0x300002, 0x80000, CRC(92274626) SHA1(fae8d89efba9bf3d171bfe484015d009786ce40d) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -7043,15 +6349,11 @@ 0x059d1c-0x1bb697 is the non-Checksummed range still containing data but NOT covered by Checksum 0x059d1c-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100400v.u7", 0x000000, 0x80000, CRC(ab7eab54) SHA1(ca2e70b20b2e55e44356a00cbfc5cf5bc681b57e) ) ROM_LOAD32_WORD( "0100400v.u11", 0x000002, 0x80000, CRC(6b2f608f) SHA1(6e0f713ca0f514d407928b84493e1fead0184513) ) ROM_LOAD32_WORD( "0100400v.u8", 0x100000, 0x80000, CRC(b727f192) SHA1(eb38d7f4b6b6d210ab0c514adf3b792686ba5fb8) ) ROM_LOAD32_WORD( "0100400v.u12", 0x100002, 0x80000, CRC(e6033756) SHA1(82603f02fcec2b01f5a1cfc13d50129669e84dc7) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -7069,15 +6371,11 @@ 0x062f70-0x1a752b is the non-Checksummed range still containing data but NOT covered by Checksum 0x062f70-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100779v.u7", 0x000000, 0x80000, CRC(b60af34f) SHA1(1143380b765db234b3871c0fe04736472fde7de4) ) ROM_LOAD32_WORD( "0100779v.u11", 0x000002, 0x80000, CRC(57e341d0) SHA1(9b0d50763bb74ca5fe404c9cd526633721cf6677) ) ROM_LOAD32_WORD( "0100779v.u8", 0x100000, 0x80000, CRC(57eec667) SHA1(5f3888d75f48b6148f451d7ebb7f99e1a0939f3c) ) ROM_LOAD32_WORD( "0100779v.u12", 0x100002, 0x80000, CRC(4ac20679) SHA1(0ac732ffe6a33806e4a06e87ec875a3e1314e06b) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -7094,17 +6392,13 @@ Calculated Checksum 0x962948fb (OK) 0x08737c-0x2b2beb is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0101460v.u7", 0x000000, 0x80000, CRC(6781085a) SHA1(8fbd8cddada944ca3fd633bdc3b5dc3c0a14736d) ) ROM_LOAD32_WORD( "0101460v.u11", 0x000002, 0x80000, CRC(43525988) SHA1(705c0114300ea099c7eb96c5035233753534d28d) ) ROM_LOAD32_WORD( "0101460v.u8", 0x100000, 0x80000, CRC(21767926) SHA1(cbfc3304aab6ef4988652071b263a814804f5f6b) ) ROM_LOAD32_WORD( "0101460v.u12", 0x100002, 0x80000, NO_DUMP ) ROM_LOAD32_WORD( "0101460v.u9", 0x200000, 0x80000, CRC(324f6fd8) SHA1(c6d689447eb15a57046bcdecc5dbd67b716112f5) ) ROM_LOAD32_WORD( "0101460v.u13", 0x200002, 0x80000, NO_DUMP ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -7121,15 +6415,11 @@ 0x06445c-0x10203b is the non-Checksummed range still containing data but NOT covered by Checksum 0x06445c-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0400549v.u7", 0x000000, 0x80000, CRC(129be82c) SHA1(487639b7d42d6d35a9c48b44d26667c269b5b633) ) ROM_LOAD32_WORD( "0400549v.u11", 0x000002, 0x80000, CRC(b91f5d4c) SHA1(8116166a759405b97797b4acb2cc3e139bd12de7) ) ROM_LOAD32_WORD( "0400549v.u8", 0x100000, 0x80000, CRC(8d0e61a8) SHA1(254b106e71a0888b0456afd8d63006d72c0ba292) ) ROM_LOAD32_WORD( "0400549v.u12", 0x100002, 0x80000, CRC(fdf22d5b) SHA1(664fa003a350c0a3b515b7c384d32176158c2d3e) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -7146,13 +6436,9 @@ Calculated Checksum 0xa4b725ab (OK) 0x0590b8-0x0ef623 is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0200549v.u7", 0x000000, 0x80000, CRC(acb913c1) SHA1(eb008b2b3d06f769f1ea1c75b52334e468c5f13c) ) ROM_LOAD32_WORD( "0200549v.u11", 0x000002, 0x80000, CRC(99f61822) SHA1(88a726a5c9cae3a7d3120cb9013ca4d38ef8c560) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -7168,13 +6454,9 @@ Calculated Checksum 0xd80cf106 (OK) 0x05889c-0x0f313b is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0200506v.u7", 0x000000, 0x80000, CRC(e60859a1) SHA1(0be0114a87a21b955dfe24d01547e2d93dcb4f2c) ) ROM_LOAD32_WORD( "0200506v.u11", 0x000002, 0x80000, CRC(e662404b) SHA1(f0da3384c81d01ec17d24b2191d3a0b0eaf48d12) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -7191,17 +6473,13 @@ Calculated Checksum 0x390046da (OK) 0x05a0c4-0x2fa1ab is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0200534v.u7", 0x000000, 0x80000, CRC(7e36e609) SHA1(1c08a895c2b3182923d2d637867614aca993f277) ) ROM_LOAD32_WORD( "0200534v.u11", 0x000002, 0x80000, CRC(f9366606) SHA1(433089dd87fbda68922e5413d2dcfcd3939b626c) ) ROM_LOAD32_WORD( "0200534v.u8", 0x100000, 0x80000, CRC(6125e6b6) SHA1(018514fc72c379d56a6b1335573b074e03fc7620) ) ROM_LOAD32_WORD( "0200534v.u12", 0x100002, 0x80000, CRC(bdb1ffe7) SHA1(3ba58ad2e7efc2a6bb060ae82370d6e2ac4fa8ad) ) ROM_LOAD32_WORD( "0200534v.u9", 0x200000, 0x80000, CRC(d72749be) SHA1(7625bc6776a63b850254295cc8942d4ca08837ef) ) ROM_LOAD32_WORD( "0200534v.u13", 0x200002, 0x80000, CRC(dfe02424) SHA1(798ce31ef23cf5bd7d5b04dc21ffd99b2f6243b3) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -7219,15 +6497,11 @@ 0x06ab80-0x1fffef is the non-Checksummed range still containing data but NOT covered by Checksum 0x06ab80-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0400501v.u7", 0x000000, 0x80000, CRC(f025775d) SHA1(71a94f6f17fa7cdcd997b0117b8f4afe21606a69) ) ROM_LOAD32_WORD( "0400501v.u11", 0x000002, 0x80000, CRC(f1b51a61) SHA1(8e9fcb071f704122e13333094828a41974646792) ) ROM_LOAD32_WORD( "0400501v.u8", 0x100000, 0x80000, BAD_DUMP CRC(03912f4e) SHA1(48bdcd2160e05261b7d834c53e1d483acaad098f) ) // bit 0x20 is stuck on for most of the ROM ROM_LOAD32_WORD( "0400501v.u12", 0x100002, 0x80000, CRC(f9b65d2b) SHA1(f519fc284aaa08d3619e4d88e92e690320cf5432) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -7238,15 +6512,11 @@ ARISTOCRAT_MK5_GALS ARISTOCRAT_MK5_EEPROM // checksum code not found due to missing ROMs - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0300006v.u7", 0x000000, 0x80000, CRC(d1833c73) SHA1(1576a7877877569438571a16c51fdd56a172c60d) ) ROM_LOAD32_WORD( "0300006v.u11", 0x000002, 0x80000, NO_DUMP ) ROM_LOAD32_WORD( "0300006v.u8", 0x100000, 0x80000, CRC(c79a2624) SHA1(ae3cec2fe8bdcd9053ab097b5f1354fb480b4777) ) ROM_LOAD32_WORD( "0300006v.u12", 0x100002, 0x80000, NO_DUMP ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -7263,15 +6533,11 @@ 0x05ead4-0x114e33 is the non-Checksummed range still containing data but NOT covered by Checksum 0x05ead4-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0200711v.u7", 0x000000, 0x80000, CRC(e056c7db) SHA1(7a555583f750d8275b2ffd25a0efbe370a5ac43c) ) ROM_LOAD32_WORD( "0200711v.u11", 0x000002, 0x80000, CRC(a810782c) SHA1(5d59b464c44ec32b2b977f8326c8bf3424a61e07) ) ROM_LOAD32_WORD( "0200711v.u8", 0x100000, 0x80000, CRC(2ff83479) SHA1(2f0c6c12e115a5592c29e806a946817a4f1b89a3) ) ROM_LOAD32_WORD( "0200711v.u12", 0x100002, 0x80000, CRC(a585172d) SHA1(3c74efb11285ff78ce76a7e8af2f936d3dc31290) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -7289,15 +6555,11 @@ 0x05eb00-0x114e5f is the non-Checksummed range still containing data but NOT covered by Checksum 0x05eb00-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100711v.u7", 0x000000, 0x80000, CRC(2bc355bd) SHA1(754f48ee9929e8d65a2f6cc954e8cdcdcf4a5268) ) ROM_LOAD32_WORD( "0100711v.u11", 0x000002, 0x80000, CRC(eeb47ed4) SHA1(81c878d2942d0d872311718e8f1b91d65f502cbe) ) ROM_LOAD32_WORD( "0100711v.u8", 0x100000, 0x80000, CRC(1683ac16) SHA1(5ddba570f6c14ae729acf76705ac7878419fa517) ) ROM_LOAD32_WORD( "0100711v.u12", 0x100002, 0x80000, CRC(0ce0ba8d) SHA1(7fc6ee6281bb3c474fa0cf4d879e735ae03bb1ed) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -7315,7 +6577,7 @@ Calculated Checksum 0xa86cc13c (OK) 0x0ec208-0x31d6b3 is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "ahg1575.u7", 0x000000, 0x80000, CRC(5962d463) SHA1(d78c3be7a2aa6d03888e928a5498a65b00ad4135) ) ROM_LOAD32_WORD( "ahg1575.u11", 0x000002, 0x80000, CRC(93bfa5d9) SHA1(ed7dc7c558bd9889e5b49d81c62a62fd178cdceb) ) ROM_LOAD32_WORD( "ahg1575.u8", 0x100000, 0x80000, CRC(856797d5) SHA1(f37254ff866fbc3f46c4ba12f7bc7c637ef53123) ) @@ -7324,10 +6586,6 @@ ROM_LOAD32_WORD( "ahg1575.u13", 0x200002, 0x80000, CRC(b4d22493) SHA1(f9d1e974b35f39eedaee34ea4775b86192a11e41) ) ROM_LOAD32_WORD( "ahg1575.u10", 0x300000, 0x80000, CRC(39f0f9f8) SHA1(51361ab74f1e6ae47acfddbccb220cc5da4725dd) ) ROM_LOAD32_WORD( "ahg1575.u14", 0x300002, 0x80000, CRC(bd890100) SHA1(c82b2891287429a3e77ccaf9b66139f0548f1902) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -7344,15 +6602,11 @@ 0x05bd48-0x1875c3 is the non-Checksummed range still containing data but NOT covered by Checksum 0x05bd48-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100673v.u7", 0x000000, 0x80000, CRC(2f7a41d9) SHA1(931c4c1322c64ab89d6b53b681d39bb181b8e6af) ) ROM_LOAD32_WORD( "0100673v.u11", 0x000002, 0x80000, CRC(44afdf1f) SHA1(9cc4b0ac21ceeeb47af56ee0e05a7e1feb8e67d7) ) ROM_LOAD32_WORD( "0100673v.u8", 0x100000, 0x80000, CRC(b4e3d198) SHA1(d01767643bdf7829e0d9f1e9663f12413cc1829c) ) ROM_LOAD32_WORD( "0100673v.u12", 0x100002, 0x80000, CRC(122816dd) SHA1(5c37b29179262a79d8c68c92035ff14fc2885150) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -7368,13 +6622,9 @@ Calculated Checksum 0xf2744b11 (OK) 0x0553dc-0x0ea4a3 is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100405v.u7", 0x000000, 0x80000, CRC(e52c01c2) SHA1(98acf33bbe0e4525a02b581eae7b7caf910f2b96) ) ROM_LOAD32_WORD( "0100405v.u11", 0x000002, 0x80000, CRC(9f9e2637) SHA1(3d4992cec760360931bc5de400c7a27329f8b953) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -7391,15 +6641,11 @@ 0x05d92c-0x18f637 is the non-Checksummed range still containing data but NOT covered by Checksum 0x05d92c-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0200606v.u7", 0x000000, 0x80000, CRC(c3ec9f97) SHA1(62c886cc794de4b915533729c5ea5a71a4b59108) ) ROM_LOAD32_WORD( "0200606v.u11", 0x000002, 0x80000, CRC(919999fe) SHA1(3d800df5e0abed04c76928b04973ea7c7b02e5d1) ) ROM_LOAD32_WORD( "0200606v.u8", 0x100000, 0x80000, CRC(eb47f317) SHA1(43ead31e788cce1aa03011f634e939489d965144) ) ROM_LOAD32_WORD( "0200606v.u12", 0x100002, 0x80000, CRC(ba3eede2) SHA1(708a25af0908a1aa874b3ca4897816c65b0c9178) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -7415,13 +6661,9 @@ Calculated Checksum 0x757b4b7c (OK) 0x05b508-0x0c43af is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0200465v.u7", 0x000000, 0x80000, CRC(23350042) SHA1(fd839a4835358057a5ee1fcaf716f2443461352d) ) ROM_LOAD32_WORD( "0200465v.u11", 0x000002, 0x80000, CRC(dcf51719) SHA1(1ea07091ce22245f77b6de5dcd994efb94c4ba58) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -7438,13 +6680,9 @@ Calculated Checksum 0x4449ca76 (OK) 0x041804-0x0ecbb3 is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0200004v.u7", 0x000000, 0x80000, CRC(de4d6d77) SHA1(959ffb7d06359870e07cb9d761f0bc0480c45e0c) ) ROM_LOAD32_WORD( "0200004v.u11", 0x000002, 0x80000, CRC(bde067d7) SHA1(cbf2cbd0644f1daeb5c3cd08d72f3d7aafe521ec) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -7465,15 +6703,11 @@ 0x0b31cc-0x155097 is the non-Checksummed range still containing data but NOT covered by Checksum 0x0b31cc-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "phg074202.u7", 0x000000, 0x80000, CRC(2cb692f6) SHA1(d0f9952d01f95dd50078e98652b650b70e1cbb70) ) ROM_LOAD32_WORD( "phg074202.u11", 0x000002, 0x80000, CRC(287c6a10) SHA1(023e8bd7364ec61fcd113527fa6be47c46faee02) ) ROM_LOAD32_WORD( "phg074202.u8", 0x100000, 0x80000, CRC(57af1295) SHA1(2fb1a0ab8ea159ea891925a8720d0e88184db6fe) ) ROM_LOAD32_WORD( "phg074202.u12", 0x100002, 0x80000, CRC(885cde6c) SHA1(a6ccf94ecdae2092a703075c9917d0b4004efa52) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -7490,13 +6724,9 @@ Calculated Checksum 0x014df7a2 (OK) 0x07a764-0x0e360b is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "01j01986.u7", 0x000000, 0x80000, CRC(f51b2faa) SHA1(dbcfdbee92af5f89a8a2611bbc687ee0cc907642) ) ROM_LOAD32_WORD( "01j01986.u11", 0x000002, 0x80000, CRC(bd7ead91) SHA1(9f775428a4aa0b0a8ee17aed9be620edc2020c5e) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -7513,15 +6743,11 @@ 0x052b08-0x1f7ed7 is the non-Checksummed range still containing data but NOT covered by Checksum 0x052b08-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0200319v.u7", 0x000000, 0x80000, CRC(2ebc349e) SHA1(be7485b400eef5bf62aa6c0ff79133575d4d5987) ) ROM_LOAD32_WORD( "0200319v.u11", 0x000002, 0x80000, CRC(5316d04f) SHA1(6b5e829e54da1debda40f13189a21c5c1b0496e2) ) ROM_LOAD32_WORD( "0200319v.u8", 0x100000, 0x80000, CRC(7f6eedad) SHA1(391b57639d69ba7822e4749ee25027efd99f08a8) ) ROM_LOAD32_WORD( "0200319v.u12", 0x100002, 0x80000, CRC(a4b27820) SHA1(75bb554300372c8bccea79ab55aa60688b7597fa) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -7538,15 +6764,11 @@ 0x054c70-0x1c0ec7 is the non-Checksummed range still containing data but NOT covered by Checksum 0x054c70-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0200333v.u7", 0x000000, 0x80000, CRC(ab24e060) SHA1(c25a86de23a364c8b8249402ce9b867539fda65e) ) ROM_LOAD32_WORD( "0200333v.u11", 0x000002, 0x80000, CRC(d983aaf2) SHA1(9828f6042834976bf594adbcfe9f15f14c48518c) ) ROM_LOAD32_WORD( "0200333v.u8", 0x100000, 0x80000, CRC(5c484283) SHA1(292393482ab4903d820cb28a889340cafa075844) ) ROM_LOAD32_WORD( "0200333v.u12", 0x100002, 0x80000, CRC(522b0459) SHA1(d9f0e94223897ef8935558593b1d261ad953a3ec) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -7563,15 +6785,11 @@ 0x053c2c-0x1c0ec7 is the non-Checksummed range still containing data but NOT covered by Checksum 0x053c2c-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0200334v.u7", 0x000000, 0x80000, CRC(01a05a1b) SHA1(1baeb8e9280d5210117c84727eac8841b151430a) ) ROM_LOAD32_WORD( "0200334v.u11", 0x000002, 0x80000, CRC(cd927b1e) SHA1(17ac7b95fbdf61cebd2013131477d4672d403401) ) ROM_LOAD32_WORD( "0200334v.u8", 0x100000, 0x80000, CRC(3fad9c98) SHA1(361e13c2711458120353152b3a60dff865c2b74c) ) ROM_LOAD32_WORD( "0200334v.u12", 0x100002, 0x80000, CRC(77c0d46d) SHA1(a183eca1ebdc305dce75caa311635ec98477909d) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -7587,13 +6805,9 @@ Calculated Checksum 0xf76f11d1 (OK) 0x058520-0x0c0843 is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100550v.u7", 0x000000, 0x80000, CRC(9c5e2d66) SHA1(658143706c0e1f3b43b3ec301da1052363fe5244) ) ROM_LOAD32_WORD( "0100550v.u11", 0x000002, 0x80000, CRC(1c64b3b6) SHA1(80bbc6e3f47ab932e9c07e0c6063197a2d8e81f7) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -7610,7 +6824,7 @@ 0x06766c-0x3e0083 is the non-Checksummed range still containing data but NOT covered by Checksum 0x06766c-0x3fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100782v.u7", 0x000000, 0x80000, CRC(4c70120f) SHA1(e43b39c31c14d16ebf962d8dd201a882df74f595) ) ROM_LOAD32_WORD( "0100782v.u11", 0x000002, 0x80000, CRC(18519789) SHA1(95385207be6e44746b5e78aa5622afb5258419b2) ) ROM_LOAD32_WORD( "0100782v.u8", 0x100000, 0x80000, CRC(bf358a6f) SHA1(3ae3bcd486f9c6f5f2a799ed3e4f7b177a59465b) ) @@ -7619,10 +6833,6 @@ ROM_LOAD32_WORD( "0100782v.u13", 0x200002, 0x80000, CRC(f8a67a69) SHA1(b1a28047cb4572ae15359c30f71cafa4bd70658c) ) ROM_LOAD32_WORD( "0100782v.u10", 0x300000, 0x80000, CRC(e6528de7) SHA1(b3aa1937f0b673ba2cfa68acc7cb540ebefc66d4) ) ROM_LOAD32_WORD( "0100782v.u14", 0x300002, 0x80000, CRC(69f2acde) SHA1(cda52548e675a06677a2d9fee89b33f9abb96f64) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -7638,7 +6848,7 @@ Calculated Checksum 0xa9e7ac03 (OK) 0x060dc0-0x33d693 is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0301388v.u7", 0x000000, 0x80000, CRC(56fa9535) SHA1(660cb91302420dddce3ffeb51f0fcc3bb235acbe) ) ROM_LOAD32_WORD( "0301388v.u11", 0x000002, 0x80000, CRC(35ee6272) SHA1(8ba9b41f2c614ff0814730cac57456d8a5dabbcb) ) ROM_LOAD32_WORD( "0301388v.u8", 0x100000, 0x80000, CRC(96110e37) SHA1(43a54721bdfa2be10698ee79fd9a2a4498eae6fa) ) @@ -7647,10 +6857,6 @@ ROM_LOAD32_WORD( "0301388v.u13", 0x200002, 0x80000, CRC(dbba3cfb) SHA1(c836ee3ba8f7cfeb8a099a08407cb6e52880ed32) ) ROM_LOAD32_WORD( "0301388v.u10", 0x300000, 0x80000, CRC(29c39bb8) SHA1(9c2c16b8a71bac493490bcc0d177c7a762f526b4) ) ROM_LOAD32_WORD( "0301388v.u14", 0x300002, 0x80000, CRC(fbb37975) SHA1(648b56df5047b8ae60b41bdf29f35f8bf8fe2d29) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -7667,15 +6873,11 @@ 0x0638d8-0x158933 is the non-Checksummed range still containing data but NOT covered by Checksum 0x0638d8-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "01j00161.u7", 0x000000, 0x80000, CRC(07a8b338) SHA1(7508d7d0e3494d355cb773165b240ba876a60eec) ) ROM_LOAD32_WORD( "01j00161.u11", 0x000002, 0x80000, CRC(020a588d) SHA1(4759bef22017fb4c47c87adb6ca7253fdb6bca6b) ) ROM_LOAD32_WORD( "01j00161.u8", 0x100000, 0x80000, CRC(89a042e7) SHA1(0f95cfd42ce7130176d42c6bbdf8ff22a6662894) ) ROM_LOAD32_WORD( "01j00161.u12", 0x100002, 0x80000, CRC(715f53cb) SHA1(364c35fc2d36180c13127c8004a8729126f68db1) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -7692,17 +6894,13 @@ 0x07089c-0x2903cf is the non-Checksummed range still containing data but NOT covered by Checksum 0x07089c-0x2fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0201692v.u7", 0x000000, 0x80000, CRC(7bc25bba) SHA1(d5f7c3a4bc3c652f57ee4cdbc883ec82069365d1) ) ROM_LOAD32_WORD( "0201692v.u11", 0x000002, 0x80000, CRC(fbc125b8) SHA1(55dbc3a236804f4a8d26be8e49c29fa5943c5bd6) ) ROM_LOAD32_WORD( "0201692v.u8", 0x100000, 0x80000, CRC(ef976f78) SHA1(d2c89e8d3bf6af112a99354133f308a5aabad46e) ) ROM_LOAD32_WORD( "0201692v.u12", 0x100002, 0x80000, CRC(5df3854a) SHA1(2b5175835c587caccafb73a1a5c8abf8f8463cf4) ) ROM_LOAD32_WORD( "0201692v.u9", 0x200000, 0x80000, CRC(776fbfd2) SHA1(27820dbc6ee1424706aea9c4574da117636fef17) ) ROM_LOAD32_WORD( "0201692v.u13", 0x200002, 0x80000, CRC(0a0b0ce1) SHA1(41a4d613cf1828df1832c087f0bc18d31076f056) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -7719,17 +6917,13 @@ 0x06e9f8-0x2df4f7 is the non-Checksummed range still containing data but NOT covered by Checksum 0x06e9f8-0x2fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "01j00851.u7", 0x000000, 0x80000, CRC(7be0caf5) SHA1(b83fba7eb4624b3dc56f763b48b7c45fe31f3396) ) ROM_LOAD32_WORD( "01j00851.u11", 0x000002, 0x80000, CRC(8c04ed89) SHA1(6727da3a457841e893e27bc8f10d4bb58a61f338) ) ROM_LOAD32_WORD( "01j00851.u8", 0x100000, 0x80000, CRC(246d3693) SHA1(8c8b893c21e9a486fd36677d7157787bf5d6237b) ) ROM_LOAD32_WORD( "01j00851.u12", 0x100002, 0x80000, CRC(1eb021a4) SHA1(3195eb5923da018b6c2dac10b70c47aef54dca35) ) ROM_LOAD32_WORD( "01j00851.u9", 0x200000, 0x80000, CRC(15dee624) SHA1(d678ef7c25419342a1512fab84394e99309009ec) ) ROM_LOAD32_WORD( "01j00851.u13", 0x200002, 0x80000, CRC(b6d1ceb6) SHA1(b41200620aaa905697ac73b4c86496a53f070ed3) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -7746,15 +6940,11 @@ 0x04ea88-0x1aac5f is the non-Checksummed range still containing data but NOT covered by Checksum 0x04ea88-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100269v.u7", 0x000000, 0x80000, CRC(b9fc60b4) SHA1(78b6e442209a283c89f7d9da089c9c6adc34a9c2) ) ROM_LOAD32_WORD( "0100269v.u11", 0x000002, 0x80000, CRC(d9f4e7ec) SHA1(968f51c57451315423284e08a6550d4d77d9a922) ) ROM_LOAD32_WORD( "0100269v.u8", 0x100000, 0x80000, CRC(a3bf2052) SHA1(2ab6163c6214af49227a1ac560e60332af0c7e84) ) ROM_LOAD32_WORD( "0100269v.u12", 0x100002, 0x80000, CRC(88978d4e) SHA1(cd2b747fd858f7d84b889bf87865c4fbb349e1b7) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -7775,15 +6965,11 @@ 0x0b2d20-0x15384f is the non-Checksummed range still containing data but NOT covered by Checksum 0x0b2d20-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "phg062502.u7", 0x000000, 0x80000, CRC(fe556566) SHA1(fe8c6d699d08577691c766477530abf5cddccf6c) ) // 92.25% ROM_LOAD32_WORD( "phg062502.u11", 0x000002, 0x80000, CRC(67e77c32) SHA1(178e6bbe2bb8b55afbe97177920b5f3c4a989adf) ) // 92.25% ROM_LOAD32_WORD( "phg062502.u8", 0x100000, 0x80000, CRC(d4858407) SHA1(acf6776f19448648a26aaf53fcb4bc227c546033) ) // base ROM_LOAD32_WORD( "phg062502.u12", 0x100002, 0x80000, CRC(0190804b) SHA1(7acb29fb7f77e78bb2afeb74d341475cd089dafb) ) // base - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -7800,15 +6986,11 @@ 0x05f370-0x1d0a3f is the non-Checksummed range still containing data but NOT covered by Checksum 0x05f370-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100791v.u7", 0x000000, 0x80000, CRC(d785d1b3) SHA1(4aa7c61036dd5fe1cdbc6c39a89881f88f3dd148) ) ROM_LOAD32_WORD( "0100791v.u11", 0x000002, 0x80000, CRC(b45885f1) SHA1(e32d4afce4e3e62a324173252f559909ea97fe3a) ) ROM_LOAD32_WORD( "0100791v.u8", 0x100000, 0x80000, CRC(6ba8f7eb) SHA1(bd5b15e22e713095f580b4c371d39af4af9e3289) ) ROM_LOAD32_WORD( "0100791v.u12", 0x100002, 0x80000, CRC(14afdeda) SHA1(1eb2a297e903dc1a0683425b37669e0af4ae4218) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -7825,15 +7007,11 @@ 0x05f088-0x1cd29f is the non-Checksummed range still containing data but NOT covered by Checksum 0x05f088-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100813v.u7", 0x000000, 0x80000, CRC(caf69b86) SHA1(7a3bf5dfb687b9452e6f54926656167079fa3ea4) ) ROM_LOAD32_WORD( "0100813v.u11", 0x000002, 0x80000, CRC(11f7c6f9) SHA1(fa5be6affb543deb9ee37deb4073438f050b240c) ) ROM_LOAD32_WORD( "0100813v.u8", 0x100000, 0x80000, CRC(a42e0703) SHA1(5ab946d420a92eafd6869e5996b97757d86097e5) ) ROM_LOAD32_WORD( "0100813v.u12", 0x100002, 0x80000, CRC(b712dcd1) SHA1(f4080185f909d385e93edc73954d05de1dc6aa65) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -7843,15 +7021,11 @@ ARISTOCRAT_MK5_GALS ARISTOCRAT_MK5_EEPROM // checksum code not found (uses different startup sequence) - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0101228v.u7", 0x000000, 0x80000, CRC(54d55ecb) SHA1(0afb2d6489f01ae55563030e228e1d5443738af1) ) ROM_LOAD32_WORD( "0101228v.u11", 0x000002, 0x80000, CRC(2be7933c) SHA1(7691d755714bf0801f9ca8510f82a80a4c231178) ) ROM_LOAD32_WORD( "0101228v.u8", 0x100000, 0x80000, CRC(9c4a6e7f) SHA1(6ac470ec777c68521ef74c66263c8229f8d21176) ) ROM_LOAD32_WORD( "0101228v.u12", 0x100002, 0x80000, CRC(00d4cd6e) SHA1(eb941164cf421f22bcc9864f198348c4f30d904c) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -7870,15 +7044,11 @@ 0x0ec548-0x1ee2cb is the non-Checksummed range still containing data but NOT covered by Checksum 0x0ec548-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "bhg1584.u7", 0x000000, 0x80000, CRC(1490354e) SHA1(9327f01067e4a7f7ce5b6db9373b9ad59533babf) ) ROM_LOAD32_WORD( "bhg1584.u11", 0x000002, 0x80000, CRC(d2b6745b) SHA1(04b5586e802ce0bd5891b23222bc1db8e7c67f8a) ) ROM_LOAD32_WORD( "bhg1584.u8", 0x100000, 0x80000, CRC(e604d399) SHA1(9aab86aa6e8590921de9b7234713be72a7c4faa1) ) ROM_LOAD32_WORD( "bhg1584.u12", 0x100002, 0x80000, CRC(c1e878b5) SHA1(4e4e9dee4d85fbb77dc6f7d39c2dc5b0bf438aef) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -7893,7 +7063,7 @@ /* Checksum code needs to be done */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "02j02056.u7", 0x000000, 0x80000, CRC(2a64d797) SHA1(a23322c38462052f4a892451e68a8c762bf157aa) ) ROM_LOAD32_WORD( "02j02056.u11", 0x000002, 0x80000, CRC(022bd37b) SHA1(7f64240f3bff1539d787f65f9dc27c6f491d27d3) ) ROM_LOAD32_WORD( "02j02056.u8", 0x100000, 0x80000, CRC(93ebe05c) SHA1(f7d866687bec14e79d2df63c1ccc6949d3558ba6) ) @@ -7902,10 +7072,6 @@ ROM_LOAD32_WORD( "02j02056.u13", 0x200002, 0x80000, CRC(5e593f9e) SHA1(9a60aea08c19c613f81dbccecb847fcd4ab93e0f) ) ROM_LOAD32_WORD( "02j02056.u10", 0x300000, 0x80000, CRC(9bc86c69) SHA1(6aa3ae7e6cdd753efcd8fd6f866c6b83626d0120) ) ROM_LOAD32_WORD( "02j02056.u14", 0x300002, 0x80000, CRC(7b695bf3) SHA1(89ea3252c9915aab81a85c6c028b21911bf8b4c4) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -7925,15 +7091,11 @@ 0x0e77e8-0x18d8ab is the non-Checksummed range still containing data but NOT covered by Checksum 0x0e77e8-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "ahg1535.u7", 0x000000, 0x80000, CRC(57c04faa) SHA1(aa86747b21718f9dfa75b41f7280a00f531e13fe) ) ROM_LOAD32_WORD( "ahg1535.u11", 0x000002, 0x80000, CRC(066917c5) SHA1(a821635edc0199427b43eb324922af99679def21) ) ROM_LOAD32_WORD( "ahg1535.u8", 0x100000, 0x80000, CRC(64c8c12f) SHA1(3a6e54205c28ae3dfb51ef1895e147e6a9f446a9) ) ROM_LOAD32_WORD( "ahg1535.u12", 0x100002, 0x80000, CRC(f569843c) SHA1(ccf1b727ad1dc49bca609ee0887b36a29223cace) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -7949,13 +7111,9 @@ Calculated Checksum 0x2c7f1cbb (OK) 0x05c044-0x0f60cb is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0200507v.u7", 0x000000, 0x80000, CRC(44576def) SHA1(3396460444ceb394c9c88e5fc37ccedcfc4b179c) ) ROM_LOAD32_WORD( "0200507v.u11", 0x000002, 0x80000, CRC(2e24756a) SHA1(247db8316e7815be7524aefc43a5756fad84779a) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -7972,15 +7130,11 @@ 0x052b8c-0x1fffef is the non-Checksummed range still containing data but NOT covered by Checksum (unusual) 0x052b8c-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0200285v.u7", 0x000000, 0x80000, CRC(bfa21358) SHA1(6b76656401b3dbbace8d4335951468b9885fc7f0) ) ROM_LOAD32_WORD( "0200285v.u11", 0x000002, 0x80000, CRC(54b2a375) SHA1(635fde5c678b908fa58c0e04ba9b7a84fac1f7fe) ) ROM_LOAD32_WORD( "0200285v.u8", 0x100000, 0x80000, CRC(4e39f128) SHA1(91d3c6a9e5c30275c3f8967dde55214df097f2ba) ) ROM_LOAD32_WORD( "0200285v.u12", 0x100002, 0x80000, CRC(fdb10dd3) SHA1(cbf4fe97c75652f83b8ddb929b06941a70b36388) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -7998,15 +7152,11 @@ 0x07b2f4-0x11537b is the non-Checksummed range still containing data but NOT covered by Checksum 0x07b2f4-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "01j01996.u7", 0x000000, 0x80000, CRC(c14d5f8a) SHA1(66059549f94048fe55ec52a098548e04c2ccece0) ) ROM_LOAD32_WORD( "01j01996.u11", 0x000002, 0x80000, CRC(6dde9ae6) SHA1(ae18d3fc2269549e60893a3cb828c2993f7f0bfa) ) ROM_LOAD32_WORD( "01j01996.u8", 0x100000, 0x80000, CRC(00aebc93) SHA1(6829f4d0fc13cb731138c7c54fac90d75f56588b) ) ROM_LOAD32_WORD( "01j01996.u12", 0x100002, 0x80000, CRC(945e0a05) SHA1(db7580b39c537a7b50898ee99cfceb5eb71be19a) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -8023,15 +7173,11 @@ 0x072380-0x1d1aab is the non-Checksummed range still containing data but NOT covered by Checksum 0x072380-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100553v.u7", 0x000000, 0x80000, CRC(f329aa28) SHA1(545cdfe5cc912a2e391c6ba5fb88da4a26336637) ) ROM_LOAD32_WORD( "0100553v.u11", 0x000002, 0x80000, CRC(55a2583d) SHA1(6455fb8ee21d40d54f32f6bae3e35766f6d4d910) ) ROM_LOAD32_WORD( "0100553v.u8", 0x100000, 0x80000, CRC(9ad560bd) SHA1(dff9006d27c7bd9b8fe6367133c9897c28a4f3ef) ) ROM_LOAD32_WORD( "0100553v.u12", 0x100002, 0x80000, CRC(06cf5d68) SHA1(5469e8087371f8b59fd9b2b413682efe2ea0f279) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -8047,13 +7193,9 @@ Calculated Checksum 0xd6b20386 (OK) 0x054e6c-0x0ec99f is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100297v.u7", 0x000000, 0x80000, CRC(e3117ab7) SHA1(c13912f524f1c1d373adb6382ceddd1bc18f7f02) ) ROM_LOAD32_WORD( "0100297v.u11", 0x000002, 0x80000, CRC(57b3c340) SHA1(4f95ed7fed697cf2bfbde8215f6e35768cf20334) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -8070,15 +7212,11 @@ 0x043574-0x1061fb is the non-Checksummed range still containing data but NOT covered by Checksum 0x043574-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100167v.u7", 0x000000, 0x80000, CRC(47154679) SHA1(21749fbaa60f9bf1db43bdd272e6628ae73bf759) ) ROM_LOAD32_WORD( "0100167v.u11", 0x000002, 0x80000, CRC(6a5f2c41) SHA1(1365e083d44a373c2d4f17e8e61ec716ffb6d2d5) ) ROM_LOAD32_WORD( "0100167v.u8", 0x100000, 0x80000, CRC(c262d098) SHA1(87940bd0aef6cb0f5ff21ccda4b209eef8e97eb1) ) ROM_LOAD32_WORD( "0100167v.u12", 0x100002, 0x80000, CRC(85bb41a7) SHA1(335f29f10f216e202b93b46a376958c3f5271461) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -8097,16 +7235,12 @@ 0x0b0d5c-0x153803 is the non-Checksummed range still containing data but NOT covered by Checksum 0x0b0d5c-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "nhg029604.u7", 0x000000, 0x80000, CRC(7ada053f) SHA1(5102b0b9db505454624750a3fd6db455682538f3) ) ROM_LOAD32_WORD( "nhg029604.u11", 0x000002, 0x80000, CRC(69a78695) SHA1(1ed89cf38dc85f752449a858cd9558bed235af58) ) ROM_LOAD32_WORD( "nhg029604.u8", 0x100000, 0x80000, CRC(496b0295) SHA1(237183a192ad9b4bc133014cc83149d4a7062785) ) ROM_LOAD32_WORD( "nhg029604.u12", 0x100002, 0x80000, CRC(fe2bafdc) SHA1(e8b454db44a532d75b3aff323855340695688f0f) ) - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) - ROM_REGION16_BE( 0x100, "eeprom0", 0 ) ROM_LOAD16_WORD_SWAP( "eeprom0", 0x000000, 0x000100, CRC(fea8a821) SHA1(c744cac6af7621524fc3a2b0a9a135a32b33c81b) ) @@ -8138,15 +7272,11 @@ 0x0b0d5c-0x153803 is the non-Checksummed range still containing data but NOT covered by Checksum 0x0b0d5c-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "nhg029607.u7", 0x000000, 0x80000, CRC(5037aefc) SHA1(afd7e4cf5b53d5ad44dec359cd24a698188c9d35) ) // 94.982% ROM_LOAD32_WORD( "nhg029607.u11", 0x000002, 0x80000, CRC(a9c121a7) SHA1(b8133b00f8b42dd7a3be94753ce7482a58aba8f1) ) // 94.982% ROM_LOAD32_WORD( "nhg029607.u8", 0x100000, 0x80000, CRC(496b0295) SHA1(237183a192ad9b4bc133014cc83149d4a7062785) ) // base ROM_LOAD32_WORD( "nhg029607.u12", 0x100002, 0x80000, CRC(fe2bafdc) SHA1(e8b454db44a532d75b3aff323855340695688f0f) ) // base - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -8166,15 +7296,11 @@ 0x0b0d5c-0x153803 is the non-Checksummed range still containing data but NOT covered by Checksum 0x0b0d5c-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "nhg029699.u7", 0x000000, 0x80000, CRC(cf6465f4) SHA1(ea12ecff7ac4846d09b42480d54bf8cf03ff4c44) ) // 87,836% ROM_LOAD32_WORD( "nhg029699.u11", 0x000002, 0x80000, CRC(fd7aa4a1) SHA1(06e02df1b7ee33dff22ba6fcd46657d84fe8a519) ) // 87,836% ROM_LOAD32_WORD( "nhg029699.u8", 0x100000, 0x80000, CRC(496b0295) SHA1(237183a192ad9b4bc133014cc83149d4a7062785) ) // base ROM_LOAD32_WORD( "nhg029699.u12", 0x100002, 0x80000, CRC(fe2bafdc) SHA1(e8b454db44a532d75b3aff323855340695688f0f) ) // base - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -8195,15 +7321,11 @@ 0x0e783c-0x19287f is the non-Checksummed range still containing data but NOT covered by Checksum 0x0e783c-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "ahg1531.u7", 0x000000, 0x80000, CRC(53889e2d) SHA1(f204426aaf07a668878769c12d51f9a721b7bdee) ) // game ROM_LOAD32_WORD( "ahg1531.u11", 0x000002, 0x80000, CRC(c138fece) SHA1(4653e4518bdf73da7380da931af85fd41d359a53) ) // game ROM_LOAD32_WORD( "ahg1531.u8", 0x100000, 0x80000, CRC(8e2226c5) SHA1(1dc7fff8c56af8102f3de9bbb9d0085546ec877c) ) // base ROM_LOAD32_WORD( "ahg1531.u12", 0x100002, 0x80000, CRC(5aac8336) SHA1(d1bfd21579bdcf5b46e0f4db1181d10159f0b643) ) // base - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -8214,15 +7336,11 @@ ARISTOCRAT_MK5_GALS ARISTOCRAT_MK5_EEPROM // checksum code not found due to ROMs being corrupted, all files are missing bytes consisting of 0x0D - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "ahg1515.u7", 0x000000, 0x7f070, BAD_DUMP CRC(045858cd) SHA1(232a9631bcdbbd2e60970eca62bdc540e537e1f2) ) ROM_LOAD32_WORD( "ahg1515.u11", 0x000002, 0x7ff6c, BAD_DUMP CRC(609f181b) SHA1(4cb7c47f0167c0487db419ad7a3c4b4e10a054f3) ) ROM_LOAD32_WORD( "ahg1515.u8", 0x100000, 0x7fede, BAD_DUMP CRC(25f47c9b) SHA1(cf44f32626107424c8473f275dd6736302763e79) ) ROM_LOAD32_WORD( "ahg1515.u12", 0x100002, 0x7ff14, BAD_DUMP CRC(0068bce4) SHA1(37517f6bd53660deab471f41a4d63c4b03bf22b3) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -8240,15 +7358,11 @@ 0x05ee9c-0x17afb3 is the non-Checksummed range still containing data but NOT covered by Checksum 0x05ee9c-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0200396v.u7", 0x000000, 0x80000, CRC(85fca945) SHA1(ca48a907b4f6c1b665ae053e2992681f02166cb1) ) ROM_LOAD32_WORD( "0200396v.u11", 0x000002, 0x80000, CRC(677c855f) SHA1(a4ec8e6151271af292379ead28214ef9163bfdc3) ) ROM_LOAD32_WORD( "0200396v.u8", 0x100000, 0x80000, CRC(4b1192ae) SHA1(2537249ccfc8c507762ac2c46d05ef13fa3d0bf9) ) ROM_LOAD32_WORD( "0200396v.u12", 0x100002, 0x80000, CRC(934d7286) SHA1(205f72b62d83667e9068141346bda3bcb9742a83) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -8265,15 +7379,11 @@ 0x0525a0-0x1cc0bf is the non-Checksummed range still containing data but NOT covered by Checksum 0x0525a0-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0100337v.u7", 0x000000, 0x80000, CRC(46b76cce) SHA1(6188a96c20aa9f7ded8dc7088ac5dc6dfc0afaa7) ) ROM_LOAD32_WORD( "0100337v.u11", 0x000002, 0x80000, CRC(396fcc02) SHA1(cd19db425a664a49379cbb640215f258a8137902) ) ROM_LOAD32_WORD( "0100337v.u8", 0x100000, 0x80000, CRC(239d19e4) SHA1(c17f8e3c16d0280a291490f69a51f3f6e2177ac7) ) ROM_LOAD32_WORD( "0100337v.u12", 0x100002, 0x80000, CRC(81f0d1c8) SHA1(1e91c9457593f592c0ca4a186a49b00b2cfe256f) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -8292,15 +7402,11 @@ 0x0c3698-0x1e00fb is the non-Checksummed range still containing data but NOT covered by Checksum 0x0c3698-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "rhg041804.u7", 0x000000, 0x80000, CRC(73274802) SHA1(9838a63d5f4e1bf31675ac15c34a17e709f2f647) ) ROM_LOAD32_WORD( "rhg041804.u11", 0x000002, 0x80000, CRC(4f076a94) SHA1(2962429c930ffc17e2f37a006215ee6f1c649953) ) ROM_LOAD32_WORD( "rhg041804.u8", 0x100000, 0x80000, CRC(b1830ffa) SHA1(c23a97bfdfe9e408f0ec8053646d6c8c8e06a263) ) ROM_LOAD32_WORD( "rhg041804.u12", 0x100002, 0x80000, CRC(ff70b305) SHA1(3c832ed20b1d00318fd3d2428bb469735f68965b) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -8317,15 +7423,11 @@ 0x0673cc-0x1b367b is the non-Checksummed range still containing data but NOT covered by Checksum 0x0673cc-0x1fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0101158v.u7", 0x000000, 0x80000, CRC(eb402ffb) SHA1(49ef6ca2503a6e785f62cb29e505e5c2ba019e37) ) ROM_LOAD32_WORD( "0101158v.u11", 0x000002, 0x80000, CRC(61d22f2e) SHA1(b836e5afbd5bb14ae68e100a6042f1953ed57a21) ) ROM_LOAD32_WORD( "0101158v.u8", 0x100000, 0x80000, CRC(f21153b8) SHA1(24830b3939a8568b0d5b59d4fdbd2d9e7b46a6d7) ) ROM_LOAD32_WORD( "0101158v.u12", 0x100002, 0x80000, CRC(450a4f4f) SHA1(e59fb3260755a125c47ff6c1a042a48b0eace72d) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -8335,17 +7437,13 @@ ARISTOCRAT_MK5_GALS ARISTOCRAT_MK5_EEPROM // checksum code not found due to ROMs being corrupted, all files are missing bytes consisting of 0x0D - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0201176v.u7", 0x000000, 0x7f44a, BAD_DUMP CRC(e2632da7) SHA1(ff53d87d8f45c3bcece358d0ecfa89e6912e1ccf) ) ROM_LOAD32_WORD( "0201176v.u11", 0x000002, 0x7faa7, BAD_DUMP CRC(aa8252ee) SHA1(f60d36269d26b9eee4b9f0bcd8eab028c58b81c8) ) ROM_LOAD32_WORD( "0201176v.u8", 0x100000, 0x7f5eb, BAD_DUMP CRC(0c5768aa) SHA1(0048e73bb6274b8586f31fe2e23209bb1910ae96) ) ROM_LOAD32_WORD( "0201176v.u12", 0x100002, 0x7f63c, BAD_DUMP CRC(9fe934e4) SHA1(0178226594fcc9c140f00c8272cca9e3be19dda2) ) ROM_LOAD32_WORD( "0201176v.u9", 0x200000, 0x7ffd6, BAD_DUMP CRC(633eff32) SHA1(12314db898f8e553cf5ae099cd8b2b9f0c4da3c6) ) ROM_LOAD32_WORD( "0201176v.u13", 0x200002, 0x7ffdb, BAD_DUMP CRC(026317bc) SHA1(94a48b33ddc60d6271ac0a89fc86b9f1be68f9a6) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -8361,13 +7459,9 @@ Calculated Checksum 0x61da8e77 (OK) 0x060228-0x0d61cf is the non-Checksummed range (unusual endpoint) */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "0200954v.u7", 0x000000, 0x80000, CRC(752e54c5) SHA1(9317544a7cf2d9bf29347d31fe72331fc3d018ef) ) ROM_LOAD32_WORD( "0200954v.u11", 0x000002, 0x80000, CRC(38e888b1) SHA1(acc857eb2be19140bbb58d70583e08f24807b9f2) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END @@ -8384,17 +7478,13 @@ 0x06dbc4-0x2cb767 is the non-Checksummed range still containing data but NOT covered by Checksum 0x06dbc4-0x2fffff is the non-Checksummed range if the additional vectors? at the end are included */ - ROM_REGION( 0x400000, "game_prg", ROMREGION_ERASEFF ) + ROM_REGION32_LE( 0x400000, "game_prg", ROMREGION_ERASEFF ) ROM_LOAD32_WORD( "03j00191.u7", 0x000000, 0x80000, CRC(b3c34f04) SHA1(ee8e1c9d04f35420f9e4e97520e9aef07c6b73da) ) ROM_LOAD32_WORD( "03j00191.u11", 0x000002, 0x80000, CRC(2b9d4a60) SHA1(22afc2e5fed784ba335d83fcc31b2490fc5d0663) ) ROM_LOAD32_WORD( "03j00191.u8", 0x100000, 0x80000, CRC(0e732007) SHA1(d5c7dcee6a3e99522c7612a88b5b242f31f296be) ) ROM_LOAD32_WORD( "03j00191.u12", 0x100002, 0x80000, CRC(6b857ea5) SHA1(908584918f756107e8545fbb52abce7ea1b82b34) ) ROM_LOAD32_WORD( "03j00191.u9", 0x200000, 0x80000, CRC(8ccbbec3) SHA1(cd0a3d2c3437f1a00cee5b992e7365e7df10b8b7) ) ROM_LOAD32_WORD( "03j00191.u13", 0x200002, 0x80000, CRC(e514b87f) SHA1(5423215bc03ab8468d5ebec0dba6ba7820cdcd50) ) - - ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) /* ARM Code */ - - ROM_REGION( 0x20000*4, "sram", ROMREGION_ERASE00 ) ROM_END diff -Nru mame-0.230+dfsg.1/src/mame/drivers/armedf.cpp mame-0.231+dfsg.1/src/mame/drivers/armedf.cpp --- mame-0.230+dfsg.1/src/mame/drivers/armedf.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/armedf.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -320,9 +320,9 @@ #include "cpu/m68000/m68000.h" #include "cpu/z80/z80.h" #include "cpu/mcs51/mcs51.h" -#include "sound/3526intf.h" -#include "sound/3812intf.h" #include "sound/dac.h" +#include "sound/ym3526.h" +#include "sound/ym3812.h" #include "speaker.h" #define LEGION_HACK 0 diff -Nru mame-0.230+dfsg.1/src/mame/drivers/asteroid.cpp mame-0.231+dfsg.1/src/mame/drivers/asteroid.cpp --- mame-0.230+dfsg.1/src/mame/drivers/asteroid.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/asteroid.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -903,7 +903,7 @@ ROM_REGION( 0x8000, "maincpu", 0 ) ROM_LOAD( "p88.bin", 0x6800, 0x0800, CRC(e9bfda64) SHA1(291dc567ebb31b35df83d9fb87f4080f251ff9c8) ) ROM_LOAD( "p37.bin", 0x7000, 0x0800, CRC(e53c28a9) SHA1(d9f081e73511ec43377f0c6457747f15a470d4dc) ) - ROM_LOAD( "p86,bin", 0x7800, 0x0800, CRC(7d4e3d05) SHA1(d88000e904e158efde50e453e2889ecd2cb95f24) ) + ROM_LOAD( "p86.bin", 0x7800, 0x0800, CRC(7d4e3d05) SHA1(d88000e904e158efde50e453e2889ecd2cb95f24) ) // Vector ROM ROM_LOAD( "p35.bin", 0x5000, 0x0800, CRC(7b0260df) SHA1(5781c15adfcb3c8e182ea87041b1055d3e62aa7f) ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/basf7100.cpp mame-0.231+dfsg.1/src/mame/drivers/basf7100.cpp --- mame-0.230+dfsg.1/src/mame/drivers/basf7100.cpp 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/basf7100.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,736 @@ +// license: BSD-3-Clause +// copyright-holders: Dirk Best +/*************************************************************************** + + BASF 7100 + + This system is based on (or even identical to) the DigiLog Microterm II + + Models: + - 7120: 24k disk controller memory, 3x 5.25" single sided + - 7125: 32k disk controller memory, 3x 5.25" double sided + - 7130: 32k disk controller memory, 1x 5.25" double sided, 1x Winchester + + Hardware: + - Z-80A + - I8259A + - I8251 + - COM8116 + - 3x 8255A + - 64k memory + - 5.0688 MHz XTAL + - 4x DSW8 + - External ports: Printer, Dialer, Data Comm I/O, Aux I/O + + Video board: + - Motorola 160A002-B (?) + - 2x 8255A + - 18.720 MHz XTAL + + Floppy controller: + - Z-80A + - 24k/32k memory + - FD1791B-02 + + Aux I/O board: + - I8251 + - COM8116 + - 5.0688 MHz XTAL + + TODO: + - Dump real character ROM + - Improve video emulation + - Find documentation for switches S2, S3, S4 (might be app. specific) + - Serial interrupts, flags, control + + Notes: + - Runs the BOS operating system, possibly also CP/M? + +***************************************************************************/ + +#include "emu.h" +#include "cpu/z80/z80.h" +#include "machine/com8116.h" +#include "machine/i8251.h" +#include "machine/i8255.h" +#include "machine/pic8259.h" +#include "machine/wd_fdc.h" +#include "bus/centronics/ctronics.h" +#include "bus/rs232/rs232.h" +#include "imagedev/floppy.h" +#include "machine/basf7100_kbd.h" +#include "emupal.h" +#include "screen.h" + + +namespace { + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +class basf7100_state : public driver_device +{ +public: + basf7100_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag), + m_maincpu(*this, "maincpu"), + m_fdccpu(*this, "fdccpu"), + m_pic(*this, "pic"), + m_ppi(*this, "ppi%u", 0U), + m_usart(*this, "usart%u", 0U), + m_centronics(*this, "centronics"), + m_fdc(*this, "fdc"), + m_floppy(*this, "fdc:%u", 0), + m_screen(*this, "screen"), + m_palette(*this, "palette"), + m_shared_ram(*this, "shared_ram"), + m_chargen(*this, "chargen"), + m_bootview(*this, "bootview"), + m_cursor_col(0x00), m_cursor_row(0x00), + m_highlight(0x00), + m_roll_offset(0x00), + m_sod(0x0000), + m_fdc_intrq_vector(0), + m_fdc_drq(false), + m_int_flags(0x00) + { } + + void basf7100(machine_config &config); + +protected: + virtual void machine_start() override; + virtual void machine_reset() override; + +private: + required_device m_maincpu; + required_device m_fdccpu; + required_device m_pic; + required_device_array m_ppi; + required_device_array m_usart; + required_device m_centronics; + required_device m_fdc; + required_device_array m_floppy; + required_device m_screen; + required_device m_palette; + required_shared_ptr m_shared_ram; + required_region_ptr m_chargen; + memory_view m_bootview; + + enum : uint8_t + { + INT_KEYBOARD = 0x08, + INT_VBLANK = 0x10, + INT_CENTRONICS = 0x40 + }; + + void mem_map(address_map &map); + void io_map(address_map &map); + + void fdc_mem_map(address_map &map); + void fdc_io_map(address_map &map); + + uint8_t mmio_r(offs_t offset); + void mmio_w(offs_t offset, uint8_t data); + + void keyboard_w(uint8_t data); + + void cursor_col_w(uint8_t data); + void cursor_row_w(uint8_t data); + void highlight_w(uint8_t data); + void roll_offset_w(uint8_t data); + void sod_high_w(uint8_t data); + void sod_low_w(uint8_t data); + void vblank_w(int state); + uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + + void centronics_ctrl_w(uint8_t data); + void centronics_busy_w(int state); + + void fdc_drq_w(int state); + uint8_t fdc_ctrl_r(); + void fdc_ctrl_w(uint8_t data); + void fdc_intrq_vector_w(uint8_t data); + void unk_cc_w(uint8_t data); + + IRQ_CALLBACK_MEMBER(maincpu_irq_callback); + IRQ_CALLBACK_MEMBER(fdccpu_irq_callback); + + uint8_t m_cursor_col; + uint8_t m_cursor_row; + uint8_t m_highlight; + uint8_t m_roll_offset; + uint16_t m_sod; + uint8_t m_fdc_intrq_vector; + bool m_fdc_drq; + uint8_t m_int_flags; +}; + + +//************************************************************************** +// ADDRESS MAPS +//************************************************************************** + +void basf7100_state::mem_map(address_map &map) +{ + map(0x0000, 0x9fff).ram().share("shared_ram"); + map(0xa000, 0xffff).ram(); + map(0xff00, 0xffff).rw(FUNC(basf7100_state::mmio_r), FUNC(basf7100_state::mmio_w)); + map(0x0000, 0xffff).view(m_bootview); + m_bootview[0](0x0000, 0x001f).mirror(0xffe0).rom().region("maincpu", 0); +} + +void basf7100_state::io_map(address_map &map) +{ + map.global_mask(0xff); + map(0x00, 0x03).rw(m_ppi[0], FUNC(i8255_device::read), FUNC(i8255_device::write)); + map(0x04, 0x07).rw(m_ppi[1], FUNC(i8255_device::read), FUNC(i8255_device::write)); + map(0x08, 0x09).mirror(0x02).rw(m_pic, FUNC(pic8259_device::read), FUNC(pic8259_device::write)); + map(0x0c, 0x0f).rw(m_ppi[2], FUNC(i8255_device::read), FUNC(i8255_device::write)); + map(0x10, 0x11).rw(m_usart[0], FUNC(i8251_device::read), FUNC(i8251_device::write)); + map(0x12, 0x12).w("brg0", FUNC(com8116_device::stt_str_w)); // or str_stt_w + map(0x14, 0x15).rw(m_usart[1], FUNC(i8251_device::read), FUNC(i8251_device::write)); + map(0x16, 0x16).w("brg1", FUNC(com8116_device::stt_str_w)); // or str_stt_w +// map(0x17, 0x17) rs232 flags/control + map(0x18, 0x18).lr8(NAME([this] () -> uint8_t { return m_int_flags; })); + map(0x1c, 0x1c).portr("S1"); + map(0x1d, 0x1d).portr("S2"); + map(0x1e, 0x1e).portr("S3"); + map(0x1f, 0x1f).portr("S4"); +// map(0xb0, 0xb3) display hardware clear + map(0xb8, 0xbb).rw(m_ppi[3], FUNC(i8255_device::read), FUNC(i8255_device::write)); + map(0xbc, 0xbf).lr8(NAME([this] (offs_t offset) -> uint8_t { return m_ppi[4]->read(offset ^ 3); })); + map(0xbc, 0xbf).lw8(NAME([this] (offs_t offset, uint8_t data) { m_ppi[4]->write(offset ^ 3, data); })); + map(0xc0, 0xc3).rw(m_fdc, FUNC(fd1791_device::read), FUNC(fd1791_device::write)); + map(0xc4, 0xc4).rw(FUNC(basf7100_state::fdc_ctrl_r), FUNC(basf7100_state::fdc_ctrl_w)); + map(0xca, 0xca).w(FUNC(basf7100_state::fdc_intrq_vector_w)); + map(0xcc, 0xcc).w(FUNC(basf7100_state::unk_cc_w)); +} + +void basf7100_state::fdc_mem_map(address_map &map) +{ + map(0x0000, 0x9fff).ram().share("shared_ram"); + map(0xa000, 0xfbff).ram(); + map(0xfc00, 0xffff).rom().region("fdccpu", 0); + map(0xff00, 0xffff).rw(FUNC(basf7100_state::mmio_r), FUNC(basf7100_state::mmio_w)); +} + +void basf7100_state::fdc_io_map(address_map &map) +{ + map.global_mask(0xff); + map(0x00, 0xff).rw(FUNC(basf7100_state::mmio_r), FUNC(basf7100_state::mmio_w)); +} + + +//************************************************************************** +// INPUT DEFINITIONS +//************************************************************************** + +static INPUT_PORTS_START( basf7100 ) + PORT_START("S1") + PORT_DIPNAME(0x0f, 0x0e, "Baud Rate") PORT_DIPLOCATION("S1:1,2,3,4") + PORT_DIPSETTING( 0x00, "50") + PORT_DIPSETTING( 0x01, "75") + PORT_DIPSETTING( 0x02, "110") + PORT_DIPSETTING( 0x03, "135") + PORT_DIPSETTING( 0x04, "150") + PORT_DIPSETTING( 0x05, "300") + PORT_DIPSETTING( 0x06, "600") + PORT_DIPSETTING( 0x07, "1200") + PORT_DIPSETTING( 0x08, "1800") + PORT_DIPSETTING( 0x09, "2005") + PORT_DIPSETTING( 0x0a, "2400") + PORT_DIPSETTING( 0x0b, "3600") + PORT_DIPSETTING( 0x0c, "4800") + PORT_DIPSETTING( 0x0d, "7200") + PORT_DIPSETTING( 0x0e, "9600") + PORT_DIPSETTING( 0x0f, "19800") + PORT_DIPNAME(0x30, 0x30, "Data Bits") PORT_DIPLOCATION("S1:5,6") + PORT_DIPSETTING( 0x00, "5") + PORT_DIPSETTING( 0x10, "6") + PORT_DIPSETTING( 0x20, "7") + PORT_DIPSETTING( 0x30, "8") + PORT_DIPNAME(0x40, 0x00, "Parity Enabled") PORT_DIPLOCATION("S1:7") + PORT_DIPSETTING( 0x00, DEF_STR(No)) + PORT_DIPSETTING( 0x40, DEF_STR(Yes)) + PORT_DIPNAME(0x80, 0x80, "Parity") PORT_DIPLOCATION("S1:8") + PORT_DIPSETTING( 0x00, "Odd") + PORT_DIPSETTING( 0x80, "Even") + + PORT_START("S2") + PORT_DIPUNKNOWN_DIPLOC(0x01, 0x01, "S2:1") + PORT_DIPUNKNOWN_DIPLOC(0x02, 0x02, "S2:2") + PORT_DIPUNKNOWN_DIPLOC(0x04, 0x04, "S2:3") + PORT_DIPUNKNOWN_DIPLOC(0x08, 0x08, "S2:4") + PORT_DIPUNKNOWN_DIPLOC(0x10, 0x10, "S2:5") + PORT_DIPUNKNOWN_DIPLOC(0x20, 0x20, "S2:6") + PORT_DIPUNKNOWN_DIPLOC(0x40, 0x40, "S2:7") + PORT_DIPUNKNOWN_DIPLOC(0x80, 0x80, "S2:8") + + PORT_START("S3") + PORT_DIPUNKNOWN_DIPLOC(0x01, 0x01, "S3:1") + PORT_DIPUNKNOWN_DIPLOC(0x02, 0x02, "S3:2") + PORT_DIPUNKNOWN_DIPLOC(0x04, 0x04, "S3:3") + PORT_DIPUNKNOWN_DIPLOC(0x08, 0x08, "S3:4") + PORT_DIPUNKNOWN_DIPLOC(0x10, 0x10, "S3:5") + PORT_DIPUNKNOWN_DIPLOC(0x20, 0x20, "S3:6") + PORT_DIPUNKNOWN_DIPLOC(0x40, 0x40, "S3:7") + PORT_DIPUNKNOWN_DIPLOC(0x80, 0x80, "S3:8") + + PORT_START("S4") + PORT_DIPUNKNOWN_DIPLOC(0x01, 0x01, "S4:1") + PORT_DIPUNKNOWN_DIPLOC(0x02, 0x02, "S4:2") + PORT_DIPUNKNOWN_DIPLOC(0x04, 0x04, "S4:3") + PORT_DIPUNKNOWN_DIPLOC(0x08, 0x08, "S4:4") + PORT_DIPUNKNOWN_DIPLOC(0x10, 0x10, "S4:5") + PORT_DIPUNKNOWN_DIPLOC(0x20, 0x20, "S4:6") + PORT_DIPUNKNOWN_DIPLOC(0x40, 0x40, "S4:7") + PORT_DIPUNKNOWN_DIPLOC(0x80, 0x80, "S4:8") +INPUT_PORTS_END + +void basf7100_state::keyboard_w(uint8_t data) +{ + // PPI OBF + m_int_flags &= ~INT_KEYBOARD; + m_int_flags |= BIT(data, 1) ? INT_KEYBOARD : 0x00; + + m_pic->ir3_w(BIT(data, 1)); + + // TODO: keyboard bell +} + + +//************************************************************************** +// VIDEO EMULATION +//************************************************************************** + +static const gfx_layout crt8002_charlayout = +{ + 8, 12, + 128, + 1, + { 0 }, + { 0, 1, 2, 3, 4, 5, 6, 7 }, + { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, 8*8, 9*8, 10*8, 11*8 }, + 8*16 +}; + +static GFXDECODE_START( gfx_crt8002 ) + GFXDECODE_ENTRY( "chargen", 0, crt8002_charlayout, 0, 1 ) +GFXDECODE_END + +void basf7100_state::cursor_col_w(uint8_t data) +{ + m_cursor_col = data; +} + +void basf7100_state::cursor_row_w(uint8_t data) +{ + // 7------- graphics enable? + // -65----- unknown + // ---43210 cursor row + + m_cursor_row = data & 0x1f; +} + +void basf7100_state::highlight_w(uint8_t data) +{ + logerror("highlight = %02x\n", data); + m_highlight = data; +} + +void basf7100_state::roll_offset_w(uint8_t data) +{ + m_roll_offset = data; +} + +void basf7100_state::sod_high_w(uint8_t data) +{ + m_sod = (data << 8) | (m_sod & 0x00ff); +} + +void basf7100_state::sod_low_w(uint8_t data) +{ + // 7654---- sod low byte + // ----3210 set to input (clear in progress flag?) + + m_sod = (m_sod & 0xff00) | ((data & 0xf0) << 0); +} + +void basf7100_state::vblank_w(int state) +{ + m_int_flags &= ~INT_VBLANK; + m_int_flags |= state ? INT_VBLANK : 0x00; + + m_pic->ir4_w(state); +} + +uint32_t basf7100_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) +{ + const rgb_t *palette = m_palette->palette()->entry_list_raw(); + uint16_t addr = m_sod + (m_roll_offset * 16); + + for (int y = 0; y < 24; y++) + { + uint8_t line_attr = 0x00; + + for (int x = 0; x < 80; x++) + { + if (addr >= (m_sod + 0x780)) + addr = m_sod; + + uint8_t code = m_shared_ram[addr]; + + // draw 12 lines + for (int i = 0; i < 12; i++) + { + uint8_t data = m_chargen[(((code & 0x7f) << 4) + i)]; + + // character attributes + bool inverse = false; + bool half = false; + bool underline = false; + bool blink = false; + + // global attributes + if (BIT(m_highlight, 3) && BIT(code, 7)) + { + inverse = bool(BIT(m_highlight, 4)); + half = bool(BIT(m_highlight, 5)); + underline = bool(BIT(m_highlight, 6)); + blink = bool(BIT(m_highlight, 7)); + } + + // line attribute + if (BIT(m_highlight, 1)) + { + // control characters + if ((code & 0xf0) == 0x90) // only 0x90-0x9f, not 0x10-0x1f? + line_attr = code & 0x0f; + + inverse = bool(BIT(line_attr, 0)); + half = bool(BIT(line_attr, 1)); + underline = bool(BIT(line_attr, 2)); + blink = bool(BIT(line_attr, 3)); + } + + // correct some issues because of the wrong charrom + if ((code & 0x7f) == 0 || ((code & 0x7f) >= 0x10 && (code & 0x7f) <= 0x14)) + data = 0x00; + + // display of control characters + if (BIT(m_highlight, 0) == 0 && (code & 0x60) == 0) + data = 0x00; + + if (underline && i == 10) + data = 0xff; + + if (blink && m_screen->frame_number() & 0x08) // timing? + data = 0x00; + + if (inverse) + data ^= 0xff; + + if (y == m_cursor_row && x == m_cursor_col && m_screen->frame_number() & 0x08) + data = 0xff; + + // 8 pixels of the character + bitmap.pix(y * 12 + i, x * 8 + 0) = palette[BIT(data, 7) ? 2 - (half ? 1 : 0) : 0]; + bitmap.pix(y * 12 + i, x * 8 + 1) = palette[BIT(data, 6) ? 2 - (half ? 1 : 0) : 0]; + bitmap.pix(y * 12 + i, x * 8 + 2) = palette[BIT(data, 5) ? 2 - (half ? 1 : 0) : 0]; + bitmap.pix(y * 12 + i, x * 8 + 3) = palette[BIT(data, 4) ? 2 - (half ? 1 : 0) : 0]; + bitmap.pix(y * 12 + i, x * 8 + 4) = palette[BIT(data, 3) ? 2 - (half ? 1 : 0) : 0]; + bitmap.pix(y * 12 + i, x * 8 + 5) = palette[BIT(data, 2) ? 2 - (half ? 1 : 0) : 0]; + bitmap.pix(y * 12 + i, x * 8 + 6) = palette[BIT(data, 1) ? 2 - (half ? 1 : 0) : 0]; + bitmap.pix(y * 12 + i, x * 8 + 7) = palette[BIT(data, 0) ? 2 - (half ? 1 : 0) : 0]; + } + + // next char + addr++; + } + } + + return 0; +} + + +//************************************************************************** +// CENTRONICS +//************************************************************************** + +void basf7100_state::centronics_ctrl_w(uint8_t data) +{ + // ppi configured in mode1 (strobed output) + m_centronics->write_strobe(BIT(data, 7)); +} + +void basf7100_state::centronics_busy_w(int state) +{ + m_int_flags &= ~INT_CENTRONICS; + m_int_flags |= state ? 0x00 : INT_CENTRONICS; + + m_pic->ir6_w(state); +} + + +//************************************************************************** +// FLOPPY +//************************************************************************** + +static void basf7100_floppies(device_slot_interface &device) +{ + device.option_add("basf6106", FLOPPY_525_SSSD); +} + +void basf7100_state::fdc_drq_w(int state) +{ + m_fdc_drq = bool(state); +} + +uint8_t basf7100_state::fdc_ctrl_r() +{ + // 7------- unknown, checked after seek cmd + // -654321- unknown + // -------0 fdc drq + + uint8_t data = 0x00; + + data |= 1 << 7; + data |= (m_fdc_drq ? 0x01 : 0x00); + + return data; +} + +void basf7100_state::fdc_ctrl_w(uint8_t data) +{ + // 7654---- unknown + // ----3--- motor on? + // -----2-- unknown + // ------10 drive select + + if (data != 0x08) + logerror("fdc_ctrl_w: %04x\n", data); + + floppy_image_device *floppy = nullptr; + + if ((data & 0x03) < 3) + floppy = m_floppy[data & 0x03]->get_device(); + + m_fdc->set_floppy(floppy); + + // motor runs all the time for now + if (floppy) + floppy->mon_w(0); + + // set to mfm + m_fdc->dden_w(0); +} + +void basf7100_state::fdc_intrq_vector_w(uint8_t data) +{ + m_fdc_intrq_vector = data; +} + +void basf7100_state::unk_cc_w(uint8_t data) +{ + logerror("unk_cc_w: %02x\n", data); + + m_bootview.disable(); + m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); + m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); +} + + +//************************************************************************** +// MACHINE EMULATION +//************************************************************************** + +uint8_t basf7100_state::mmio_r(offs_t offset) +{ + return m_maincpu->space(AS_IO).read_byte(offset); +} + +void basf7100_state::mmio_w(offs_t offset, uint8_t data) +{ + m_maincpu->space(AS_IO).write_byte(offset, data); +} + +IRQ_CALLBACK_MEMBER( basf7100_state::maincpu_irq_callback ) +{ + uint32_t vector = 0; + + vector |= m_pic->acknowledge() << 16; + vector |= m_pic->acknowledge(); + vector |= m_pic->acknowledge() << 8; + + return vector; +} + +IRQ_CALLBACK_MEMBER( basf7100_state::fdccpu_irq_callback ) +{ + return m_fdc_intrq_vector; +} + +void basf7100_state::machine_start() +{ + // register for save states + save_item(NAME(m_cursor_col)); + save_item(NAME(m_cursor_row)); + save_item(NAME(m_highlight)); + save_item(NAME(m_roll_offset)); + save_item(NAME(m_sod)); + save_item(NAME(m_fdc_intrq_vector)); + save_item(NAME(m_fdc_drq)); + save_item(NAME(m_int_flags)); +} + +void basf7100_state::machine_reset() +{ + m_bootview.select(0); + m_fdccpu->set_pc(0xfc00); +} + + +//************************************************************************** +// MACHINE DEFINTIONS +//************************************************************************** + +void basf7100_state::basf7100(machine_config &config) +{ + Z80(config, m_maincpu, 4000000); + m_maincpu->set_addrmap(AS_PROGRAM, &basf7100_state::mem_map); + m_maincpu->set_addrmap(AS_IO, &basf7100_state::io_map); + m_maincpu->set_irq_acknowledge_callback(FUNC(basf7100_state::maincpu_irq_callback)); + + Z80(config, m_fdccpu, 4000000); + m_fdccpu->set_addrmap(AS_PROGRAM, &basf7100_state::fdc_mem_map); + m_fdccpu->set_addrmap(AS_IO, &basf7100_state::fdc_io_map); + m_fdccpu->set_irq_acknowledge_callback(FUNC(basf7100_state::fdccpu_irq_callback)); + + PIC8259(config, m_pic, 0); + m_pic->out_int_callback().set_inputline(m_maincpu, INPUT_LINE_IRQ0); + + I8251(config, m_usart[0], 0); // unknown clock + m_usart[0]->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); + m_usart[0]->rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); + m_usart[0]->dtr_handler().set("rs232", FUNC(rs232_port_device::write_dtr)); + + com8116_device &brg0(COM8116(config, "brg0", 5.0688_MHz_XTAL)); + brg0.fr_handler().set(m_usart[0], FUNC(i8251_device::write_rxc)); + brg0.ft_handler().set(m_usart[0], FUNC(i8251_device::write_txc)); + + rs232_port_device &rs232(RS232_PORT(config, "rs232", default_rs232_devices, nullptr)); + rs232.rxd_handler().set(m_usart[0], FUNC(i8251_device::write_rxd)); + rs232.cts_handler().set(m_usart[0], FUNC(i8251_device::write_cts)); + rs232.dsr_handler().set(m_usart[0], FUNC(i8251_device::write_dsr)); + + I8251(config, m_usart[1], 0); // unknown clock + m_usart[1]->txd_handler().set("auxrs232", FUNC(rs232_port_device::write_txd)); + m_usart[1]->rts_handler().set("auxrs232", FUNC(rs232_port_device::write_rts)); + m_usart[1]->dtr_handler().set("auxrs232", FUNC(rs232_port_device::write_dtr)); + + com8116_device &brg1(COM8116(config, "brg1", 5.0688_MHz_XTAL)); + brg1.fr_handler().set(m_usart[1], FUNC(i8251_device::write_rxc)); + brg1.ft_handler().set(m_usart[1], FUNC(i8251_device::write_txc)); + + rs232_port_device &auxrs232(RS232_PORT(config, "auxrs232", default_rs232_devices, nullptr)); + auxrs232.rxd_handler().set(m_usart[1], FUNC(i8251_device::write_rxd)); + auxrs232.cts_handler().set(m_usart[1], FUNC(i8251_device::write_cts)); + auxrs232.dsr_handler().set(m_usart[1], FUNC(i8251_device::write_dsr)); + + I8255(config, m_ppi[0]); + // port a: input (switches?) + m_ppi[0]->in_pb_callback().set("keyboard", FUNC(basf7100_kbd_device::read)); + m_ppi[0]->out_pc_callback().set(FUNC(basf7100_state::keyboard_w)); + + I8255(config, m_ppi[1]); + m_ppi[1]->out_pa_callback().set("centronics_latch", FUNC(output_latch_device::write)); + // port b: output (leds?) + m_ppi[1]->out_pc_callback().set(FUNC(basf7100_state::centronics_ctrl_w)); + + I8255(config, m_ppi[2]); + // port a: input (rs232 flags, auto dial) + // port b: output (auto dialer digits) + // port c: input (auto dialer status), output (rs232 and auto dialer control) + + I8255(config, m_ppi[3]); + m_ppi[3]->out_pa_callback().set(FUNC(basf7100_state::cursor_col_w)); + m_ppi[3]->out_pb_callback().set(FUNC(basf7100_state::cursor_row_w)); + m_ppi[3]->out_pc_callback().set(FUNC(basf7100_state::highlight_w)); + + I8255(config, m_ppi[4]); + m_ppi[4]->out_pa_callback().set(FUNC(basf7100_state::roll_offset_w)); + m_ppi[4]->out_pb_callback().set(FUNC(basf7100_state::sod_high_w)); + m_ppi[4]->out_pc_callback().set(FUNC(basf7100_state::sod_low_w)); + + // video + SCREEN(config, m_screen, SCREEN_TYPE_RASTER); + m_screen->set_color(rgb_t::green()); + m_screen->set_size(640, 288); // wrong because of wrong charrom + m_screen->set_visarea_full(); + m_screen->set_refresh_hz(60); + m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500)); // not accurate + m_screen->set_screen_update(FUNC(basf7100_state::screen_update)); + m_screen->screen_vblank().set(FUNC(basf7100_state::vblank_w)); + + GFXDECODE(config, "gfxdecode", "palette", gfx_crt8002); + + PALETTE(config, m_palette, palette_device::MONOCHROME_HIGHLIGHT); + + // centronics + output_latch_device ¢ronics_latch(OUTPUT_LATCH(config, "centronics_latch")); + + CENTRONICS(config, m_centronics, centronics_devices, "printer"); + m_centronics->set_output_latch(centronics_latch); + m_centronics->ack_handler().set(m_ppi[1], FUNC(i8255_device::pc6_w)); + m_centronics->busy_handler().set(FUNC(basf7100_state::centronics_busy_w)); + + // floppy + FD1791(config, m_fdc, 1000000); + m_fdc->intrq_wr_callback().set_inputline(m_fdccpu, INPUT_LINE_IRQ0); + m_fdc->drq_wr_callback().set(FUNC(basf7100_state::fdc_drq_w)); + FLOPPY_CONNECTOR(config, "fdc:0", basf7100_floppies, "basf6106", floppy_image_device::default_mfm_floppy_formats); + FLOPPY_CONNECTOR(config, "fdc:1", basf7100_floppies, "basf6106", floppy_image_device::default_mfm_floppy_formats); + FLOPPY_CONNECTOR(config, "fdc:2", basf7100_floppies, "basf6106", floppy_image_device::default_mfm_floppy_formats); + + SOFTWARE_LIST(config, "floppy_list").set_original("basf7100"); + + // keyboard + basf7100_kbd_device &keyboard(BASF7100_KBD(config, "keyboard")); + keyboard.int_handler().set(m_ppi[0], FUNC(i8255_device::pc2_w)); +} + + +//************************************************************************** +// ROM DEFINITIONS +//************************************************************************** + +ROM_START( basf7120 ) + ROM_REGION(0x20, "maincpu", 0) + ROM_LOAD("19-2113-2.u21", 0x00, 0x20, CRC(4405e26f) SHA1(0f93c47e9f546b42a85e5eced58337e0add443c4)) // IM5610CJE + + ROM_REGION(0x400, "fdccpu", 0) + ROM_LOAD("19-2130-2h.u45", 0x000, 0x400, CRC(cb077c69) SHA1(dfa16082b88275442c48082aeb5f62fe1238ae3e)) // 2708 + + ROM_REGION(0x50, "floppy_pal", 0) + ROM_LOAD("19-2131-1.u23", 0x00, 0x28, CRC(f37ed4bc) SHA1(824b4405f396c262cf8116f85eb0b548eabb4c04)) // PAL10L8MJ + ROM_LOAD("19-2132-1.u24", 0x28, 0x28, CRC(b918ff18) SHA1(c6d7cd9642ed32e56b5c1df1ddf3afe09d744ebc)) // PAL10L8MJ + + ROM_REGION(0x100, "prom", 0) + ROM_LOAD("video.30", 0x000, 0x100, CRC(89175ac9) SHA1(69b2055bee87e11cc74c70cef2f2bebcbd0004c9)) // N82S129N (label missing) + + ROM_REGION(0x800, "chargen", 0) + ROM_LOAD("160a002-b.bin", 0x000, 0x800, BAD_DUMP CRC(8787145c) SHA1(91d8c79f901a41117e99325a53b677f06baf1074)) // handcrafted, wrong +ROM_END + + +} // anonymous namespace + + +//************************************************************************** +// SYSTEM DRIVERS +//************************************************************************** + +// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS +COMP( 1982, basf7120, 0, 0, basf7100, basf7100, basf7100_state, empty_init, "BASF", "7120", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/battlane.cpp mame-0.231+dfsg.1/src/mame/drivers/battlane.cpp --- mame-0.230+dfsg.1/src/mame/drivers/battlane.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/battlane.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -16,7 +16,7 @@ #include "includes/battlane.h" #include "cpu/m6809/m6809.h" -#include "sound/3526intf.h" +#include "sound/ym3526.h" #include "screen.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/battlnts.cpp mame-0.231+dfsg.1/src/mame/drivers/battlnts.cpp --- mame-0.230+dfsg.1/src/mame/drivers/battlnts.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/battlnts.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -20,7 +20,7 @@ #include "cpu/z80/z80.h" #include "machine/gen_latch.h" #include "machine/watchdog.h" -#include "sound/3812intf.h" +#include "sound/ym3812.h" #include "screen.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/bbusters.cpp mame-0.231+dfsg.1/src/mame/drivers/bbusters.cpp --- mame-0.230+dfsg.1/src/mame/drivers/bbusters.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/bbusters.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -3,25 +3,19 @@ /*************************************************************************** Beast Busters A9003 (c) 1989 SNK Corporation - Mechanized Attack A8002 (c) 1989 SNK Corporation Beast Busters is a large dedicated (non-jamma) triple machine gun game, the gun positions values are read in an interrupt routine that must be called for each position (X and Y for 3 guns, so at least 6 times a frame). - Mechanized Attack (A8002) is an earlier design, it only has one sprite - chip, no eeprom, and only 2 machine guns, but the tilemaps are twice - the size. + ---------------------------------------------------------------------------------------- - Emulation by Bryan McPhail, mish@tendril.co.uk + Stephh's notes (based on the games M68000 code and some tests) : + 1) 'bbusters' -Stephh's notes (based on the games M68000 code and some tests) : - -1) 'bbusters' - - - Country/version is stored at 0x003954.w and the possible values are + - Country/version is stored at 0x003954.w and the possible values are 0x0000, 0x0004 and 0x0008 (0x000c being the same as 0x0008), 0x0008 being the value stored in ROM in the current set. I haven't noticed any major effect (copyright/logo, language, coinage), @@ -32,155 +26,52 @@ Anyway, here is my guess to determine the versions (by using some infos from 'mechatt' : - Value Country - 0x0000 Japan - 0x0004 US? - 0x0008 World? (value stored in the current set) - 0x000c World? (same as 0x0008 - impossible choice ?) - - - Coin buttons act differently depending on the "Coin Slots" Dip Switch : - - * "Coin Slots" Dip Switch set to "Common" : - - . COIN1 : adds coin(s)/credit(s) depending on "Coin A" Dip Switch - . COIN2 : adds coin(s)/credit(s) depending on "Coin B" Dip Switch - . COIN3 : NO EFFECT ! - . COIN4 : NO EFFECT ! - . COIN5 : NO EFFECT ! - . COIN6 : NO EFFECT ! - . SERVICE1 : adds coin(s)/credit(s) depending on "Coin A" Dip Switch - - * "Coin Slots" Dip Switch set to "Individual" : - - . COIN1 : adds coin(s)/credit(s) for player 1 depending on "Coin A" Dip Switch - . COIN2 : adds coin(s)/credit(s) for player 1 depending on "Coin B" Dip Switch - . COIN3 : adds coin(s)/credit(s) for player 2 depending on "Coin A" Dip Switch - . COIN4 : adds coin(s)/credit(s) for player 2 depending on "Coin B" Dip Switch - . COIN5 : adds coin(s)/credit(s) for player 3 depending on "Coin A" Dip Switch - . COIN6 : adds coin(s)/credit(s) for player 3 depending on "Coin B" Dip Switch - . SERVICE1 : adds coin(s)/credit(s) for all players depending on "Coin A" Dip Switch + Value Country + 0x0000 Japan + 0x0004 US? + 0x0008 World? (value stored in the current set) + 0x000c World? (same as 0x0008 - impossible choice ?) + + - Coin buttons act differently depending on the "Coin Slots" Dip Switch : + + * "Coin Slots" Dip Switch set to "Common" : + + . COIN1 : adds coin(s)/credit(s) depending on "Coin A" Dip Switch + . COIN2 : adds coin(s)/credit(s) depending on "Coin B" Dip Switch + . COIN3 : NO EFFECT ! + . COIN4 : NO EFFECT ! + . COIN5 : NO EFFECT ! + . COIN6 : NO EFFECT ! + . SERVICE1 : adds coin(s)/credit(s) depending on "Coin A" Dip Switch + + * "Coin Slots" Dip Switch set to "Individual" : + + . COIN1 : adds coin(s)/credit(s) for player 1 depending on "Coin A" Dip Switch + . COIN2 : adds coin(s)/credit(s) for player 1 depending on "Coin B" Dip Switch + . COIN3 : adds coin(s)/credit(s) for player 2 depending on "Coin A" Dip Switch + . COIN4 : adds coin(s)/credit(s) for player 2 depending on "Coin B" Dip Switch + . COIN5 : adds coin(s)/credit(s) for player 3 depending on "Coin A" Dip Switch + . COIN6 : adds coin(s)/credit(s) for player 3 depending on "Coin B" Dip Switch + . SERVICE1 : adds coin(s)/credit(s) for all players depending on "Coin A" Dip Switch Note that I had to map COIN5 and COIN6 to SERVICE2 and SERVICE3 to be able to use the default parametrable keys. Let me know if there is a another (better ?) way to do so. + ---------------------------------------------------------------------------------------- -2) 'mechatt' - - - Country/version is stored at 0x06a000.w and the possible values are : - - Value Country - 0x0000 Japan - 0x1111 World (value stored in the current set) - 0x2222 US - 0x3333 Asia? (it looks like Japanese text but some "symbols" are missing) - -2a) Japan version - - - All texts are in Japanese. - - "(c) 1989 (Corp) S-N-K". - - "Coin Slots" Dip Switch has no effect. - - "Coin A" and "Coin B" Dip Switches are the same as in the World version. - - Coin buttons effect : - - * "Coin Slots" are ALWAYS considered as "Common" : - - . COIN1 : adds coin(s)/credit(s) depending on "Coin A" Dip Switch - . COIN2 : adds coin(s)/credit(s) depending on "Coin B" Dip Switch - . COIN3 : NO EFFECT ! - . COIN4 : NO EFFECT ! - . SERVICE1 : adds coin(s)/credit(s) depending on "Coin A" Dip Switch - -2b) World version - - - All texts are in English. - - "(c) 1989 SNK Corporation". - - Coin buttons effect : - - * "Coin Slots" Dip Switch set to "Common" : - - . COIN1 : adds coin(s)/credit(s) depending on "Coin A" Dip Switch - . COIN2 : adds coin(s)/credit(s) depending on "Coin B" Dip Switch - . COIN3 : NO EFFECT ! - . COIN4 : NO EFFECT ! - . SERVICE1 : adds coin(s)/credit(s) depending on "Coin A" Dip Switch - - * "Coin Slots" Dip Switch set to "Individual" : - - . COIN1 : adds coin(s)/credit(s) for player 1 depending on "Coin A" Dip Switch - . COIN2 : adds coin(s)/credit(s) for player 1 depending on "Coin B" Dip Switch - . COIN3 : adds coin(s)/credit(s) for player 2 depending on "Coin A" Dip Switch - . COIN4 : adds coin(s)/credit(s) for player 2 depending on "Coin B" Dip Switch - . SERVICE1 : adds coin(s)/credit(s) for all players depending on "Coin A" Dip Switch - -2c) US version - - - All texts are in English. - - "(c) 1989 SNK Corp. of America". - - Additional FBI logo as first screen as well as small FBI notice at the bottom left - of the screens until a coin is inserted. - - "Coin Slots" Dip Switch has no effect. - - "Coin A" Dip Switch is different from the World version : - - World US - 4C_1C "Free Play" - 3C_1C special (see below) - 2C_1C "2 Coins to Start, 1 to Continue" - 1C_1C 1C_1C - - It's a bit hard to explain the "special" coinage, so here are some infos : - - * when you insert a coin before starting a game, you are awarded 2 credits - if credits == 0, else you are awarded 1 credit - * when you insert a coin to continue, you are ALWAYS awarded 1 credit - - - "Coin B" Dip Switch has no effect. - - - Coin buttons effect : - - * "Coin Slots" are ALWAYS considered as "Individual" : - - . COIN1 : adds coin(s)/credit(s) for player 1 depending on "Coin A" Dip Switch - . COIN2 : adds coin(s)/credit(s) for player 2 depending on "Coin A" Dip Switch - . COIN3 : NO EFFECT ! - . COIN4 : NO EFFECT ! - . SERVICE1 : adds coin(s)/credit(s) for all players depending on "Coin A" Dip Switch - -2d) Asia? version + RansAckeR's notes: - - All texts are in Japanese ? (to be confirmed) - - "(c) 1989 SNK Corporation". - - "Coin Slots" Dip Switch has no effect. - - "Coin A" and "Coin B" Dip Switches are the same as in the World version. - - Coin buttons effect : + bbusters: - * "Coin Slots" are ALWAYS considered as "Common" : + If you only calibrate the P1 gun or do not hit the correct spots for all guns + you will get either garbage or a black screen when rebooting. + According to the manual this happens when the eprom contains invalid gun aim data. - . COIN1 : adds coin(s)/credit(s) depending on "Coin A" Dip Switch - . COIN2 : adds coin(s)/credit(s) depending on "Coin B" Dip Switch - . COIN3 : NO EFFECT ! - . COIN4 : NO EFFECT ! - . SERVICE1 : adds coin(s)/credit(s) depending on "Coin A" Dip Switch - - - -HIGHWAYMAN's notes: - -after adding the mechanized attack u.s. roms I suspect that there is more than just a few bytes changed ;-) - - -RansAckeR's notes: - -bbusters: - -If you only calibrate the P1 gun or do not hit the correct spots for all guns -you will get either garbage or a black screen when rebooting. -According to the manual this happens when the eprom contains invalid gun aim data. - -If you calibrate the guns correctly the game runs as expected: -1) Using P1 controls fire at the indicated spots. -2) Using P2 controls fire at the indicated spots. -3) Using P3 controls fire at the indicated spots. + If you calibrate the guns correctly the game runs as expected: + 1) Using P1 controls fire at the indicated spots. + 2) Using P2 controls fire at the indicated spots. + 3) Using P3 controls fire at the indicated spots. The locations of the shots fired in attract mode are defined by a table starting at $65000. The value taken from there is combined with data from @@ -192,73 +83,125 @@ in the order: Minimum axis 0, middle axis 0, maximum axis 0 (repeat for the other 5 axes). + ---------------------------------------------------------------------------------------- + + Beast Busters Region code works as follows + + ROM[0x003954/2] = data * 4; + + Country/Version : + + - 0x0000 : Japan? + - 0x0004 : US? + - 0x0008 : World? (default) + - 0x000c : World? (same as 0x0008) + ***************************************************************************/ #include "emu.h" -#include "includes/bbusters.h" -#include "cpu/z80/z80.h" +// src/mame +#include "video/snk_bbusters_spr.h" +// src/devices #include "cpu/m68000/m68000.h" +#include "cpu/z80/z80.h" +#include "machine/gen_latch.h" #include "machine/nvram.h" #include "machine/upd7004.h" -#include "sound/ym2608.h" #include "sound/ym2610.h" +#include "video/bufsprite.h" +// src/emu #include "emupal.h" #include "screen.h" #include "speaker.h" +#include "tilemap.h" +namespace { -/******************************************************************************/ - - -/* Beast Busters Region code works as follows - -ROM[0x003954/2] = data * 4; - -Country/Version : - - - 0x0000 : Japan? - - 0x0004 : US? - - 0x0008 : World? (default) - - 0x000c : World? (same as 0x0008) - -*/ - -/* Mech Attack Region code works as follows - -ROM[0x06a000/2] = (data << 12) | (data << 8) | (data << 4) | (data << 0); - -Country : -- 0x0000 : Japan -- 0x1111 : World (default) -- 0x2222 : US -- 0x3333 : Asia? - -*/ +class bbusters_state : public driver_device +{ +public: + bbusters_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_screen(*this, "screen"), + m_gfxdecode(*this, "gfxdecode"), + m_sprites(*this, "sprites%u", 1U), + m_spriteram(*this, "spriteram%u", 1U), + m_soundlatch(*this, "soundlatch%u", 1U), + m_tx_videoram(*this, "tx_videoram"), + m_pf_data(*this, "pf%u_data", 1U), + m_pf_scroll_data(*this, "pf%u_scroll_data", 1U), + m_gun_recoil(*this, "Player%u_Gun_Recoil", 1U), + m_eprom_data(*this, "eeprom") + { } + + void bbusters(machine_config &config); + +protected: + virtual void machine_start() override; + virtual void video_start() override; + +private: + required_device m_maincpu; + required_device m_audiocpu; + required_device m_screen; + required_device m_gfxdecode; + required_device_array m_sprites; + required_device_array m_spriteram; + required_device_array m_soundlatch; + + required_shared_ptr m_tx_videoram; + required_shared_ptr_array m_pf_data; + required_shared_ptr_array m_pf_scroll_data; + + output_finder<3> m_gun_recoil; + required_shared_ptr m_eprom_data; + + tilemap_t *m_fix_tilemap; + tilemap_t *m_pf_tilemap[2]; + + TILE_GET_INFO_MEMBER(get_tile_info); + template TILE_GET_INFO_MEMBER(get_pf_tile_info); + + void sound_cpu_w(uint8_t data); + void video_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + template void pf_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + void coin_counter_w(uint8_t data); + + void bbusters_map(address_map &map); + void sound_map(address_map &map); + void sound_portmap(address_map &map); + + uint16_t eprom_r(offs_t offset); + void three_gun_output_w(uint16_t data); + void mixlow(bitmap_ind16 &bitmap, bitmap_ind16 &srcbitmap, const rectangle &cliprect); + void mix(bitmap_ind16 &bitmap, bitmap_ind16 &srcbitmap, const rectangle &cliprect); -/******************************************************************************/ + template + void mix_sprites(bitmap_ind16 &bitmap, bitmap_ind16 &srcbitmap, const rectangle &cliprect, Proc MIX); -void bbusters_state_base::machine_start() -{ - m_gun_recoil.resolve(); -} + bitmap_ind16 m_bitmap_sprites[2]; + uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); +}; void bbusters_state::machine_start() { - bbusters_state_base::machine_start(); + m_gun_recoil.resolve(); } -void bbusters_state_base::sound_cpu_w(uint8_t data) +void bbusters_state::sound_cpu_w(uint8_t data) { - m_soundlatch[0]->write(data&0xff); + m_soundlatch[0]->write(data); m_audiocpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero); } -/* Eprom is byte wide, top half of word _must_ be 0xff */ +// EPROM is byte wide, top half of word _must_ be 0xff uint16_t bbusters_state::eprom_r(offs_t offset) { - return (m_eprom_data[offset]&0xff) | 0xff00; + return (m_eprom_data[offset] & 0xff) | 0xff00; } void bbusters_state::three_gun_output_w(uint16_t data) @@ -267,26 +210,114 @@ m_gun_recoil[i] = BIT(data, i); } -template -void bbusters_state_base::pf_w(offs_t offset, uint16_t data, uint16_t mem_mask) +template +void bbusters_state::pf_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_pf_data[Layer][offset]); m_pf_tilemap[Layer]->mark_tile_dirty(offset); } -void bbusters_state_base::coin_counter_w(uint8_t data) +void bbusters_state::coin_counter_w(uint8_t data) { machine().bookkeeping().coin_counter_w(0, BIT(data, 0)); machine().bookkeeping().coin_counter_w(1, BIT(data, 1)); } + +TILE_GET_INFO_MEMBER(bbusters_state::get_tile_info) +{ + uint16_t tile = m_tx_videoram[tile_index]; + + tileinfo.set(0, tile&0xfff, tile>>12, 0); +} + +template +TILE_GET_INFO_MEMBER(bbusters_state::get_pf_tile_info) +{ + uint16_t tile = m_pf_data[Layer][tile_index]; + + tileinfo.set(Gfx, tile&0xfff, tile>>12, 0); +} + +void bbusters_state::video_w(offs_t offset, uint16_t data, uint16_t mem_mask) +{ + COMBINE_DATA(&m_tx_videoram[offset]); + m_fix_tilemap->mark_tile_dirty(offset); +} + +/******************************************************************************/ + + +void bbusters_state::video_start() +{ + m_fix_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(bbusters_state::get_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); + m_fix_tilemap->set_transparent_pen(15); + + m_pf_tilemap[0] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, NAME((&bbusters_state::get_pf_tile_info<0, 1>))), TILEMAP_SCAN_COLS, 16, 16, 128, 32); + m_pf_tilemap[1] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, NAME((&bbusters_state::get_pf_tile_info<1, 2>))), TILEMAP_SCAN_COLS, 16, 16, 128, 32); + + m_pf_tilemap[0]->set_transparent_pen(15); + + for (int i = 0; i < 2; i++) + { + m_screen->register_screen_bitmap(m_bitmap_sprites[i]); + m_bitmap_sprites[i].fill(0xffff); + } + +} + +/******************************************************************************/ + +/******************************************************************************/ + +template +void bbusters_state::mix_sprites(bitmap_ind16 &bitmap, bitmap_ind16 &srcbitmap, const rectangle &cliprect, Proc MIX) +{ + for (int y = cliprect.min_y; y <= cliprect.max_y; y++) + { + uint16_t *srcbuf = &srcbitmap.pix(y); + uint16_t *dstbuf = &bitmap.pix(y); + for (int x = cliprect.min_x; x <= cliprect.max_x; x++) + { + uint16_t srcdat = srcbuf[x]; + if ((srcdat & 0xf) != 0xf) + MIX(srcdat, x, dstbuf); + } + } +} + +uint32_t bbusters_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +{ + m_bitmap_sprites[0].fill(0xffff); + m_bitmap_sprites[1].fill(0xffff); + m_sprites[1]->draw_sprites(m_bitmap_sprites[1], cliprect); + m_sprites[0]->draw_sprites(m_bitmap_sprites[0], cliprect); + + m_pf_tilemap[0]->set_scrollx(0, m_pf_scroll_data[0][0]); + m_pf_tilemap[0]->set_scrolly(0, m_pf_scroll_data[0][1]); + m_pf_tilemap[1]->set_scrollx(0, m_pf_scroll_data[1][0]); + m_pf_tilemap[1]->set_scrolly(0, m_pf_scroll_data[1][1]); + + m_pf_tilemap[1]->draw(screen, bitmap, cliprect, 0, 0); + + // Palettes 0xc-0xf confirmed to be behind tilemap on Beast Busters for 2nd sprite chip (elevator stage) + mix_sprites(bitmap, m_bitmap_sprites[1], cliprect, [](uint16_t srcdat, uint16_t x, uint16_t *dstbuf) { if ((srcdat & 0xc0) == 0xc0) dstbuf[x] = srcdat + 512; } ); + m_pf_tilemap[0]->draw(screen, bitmap, cliprect, 0, 2); + mix_sprites(bitmap, m_bitmap_sprites[1], cliprect, [](uint16_t srcdat, uint16_t x, uint16_t *dstbuf) { if ((srcdat & 0xc0) != 0xc0) dstbuf[x] = srcdat + 512; } ); + mix_sprites(bitmap, m_bitmap_sprites[0], cliprect, [](uint16_t srcdat, uint16_t x, uint16_t *dstbuf) { dstbuf[x] = srcdat + 256; } ); + + m_fix_tilemap->draw(screen, bitmap, cliprect, 0, 0); + + return 0; +} + /*******************************************************************************/ void bbusters_state::bbusters_map(address_map &map) { map(0x000000, 0x07ffff).rom(); map(0x080000, 0x08ffff).ram().share("ram"); - map(0x090000, 0x090fff).ram().w(FUNC(bbusters_state::video_w)).share("videoram"); + map(0x090000, 0x090fff).ram().w(FUNC(bbusters_state::video_w)).share("tx_videoram"); map(0x0a0000, 0x0a0fff).ram().share("spriteram1"); map(0x0a1000, 0x0a7fff).ram(); /* service mode */ map(0x0a8000, 0x0a8fff).ram().share("spriteram2"); @@ -312,50 +343,7 @@ /*******************************************************************************/ -void mechatt_state::two_gun_output_w(uint16_t data) -{ - for (int i = 0; i < 2; i++) - m_gun_recoil[i] = BIT(data, i); -} - -uint16_t mechatt_state::mechatt_gun_r(offs_t offset) -{ - int x, y; - - x = m_gun_io[offset ? 2 : 0]->read(); - y = m_gun_io[offset ? 3 : 1]->read(); - - /* Todo - does the hardware really clamp like this? */ - x += 0x18; - if (x > 0xff) x = 0xff; - if (y > 0xef) y = 0xef; - - return x | (y<<8); -} - -void mechatt_state::mechatt_map(address_map &map) -{ - map(0x000000, 0x06ffff).rom(); - map(0x070000, 0x07ffff).ram().share("ram"); - map(0x090000, 0x090fff).ram().w(FUNC(mechatt_state::video_w)).share("videoram"); - map(0x0a0000, 0x0a0fff).ram().share("spriteram1"); - map(0x0a1000, 0x0a7fff).nopw(); - map(0x0b0000, 0x0b3fff).ram().w(FUNC(mechatt_state::pf_w<0>)).share("pf1_data"); - map(0x0b8000, 0x0b8003).writeonly().share("pf1_scroll_data"); - map(0x0c0000, 0x0c3fff).ram().w(FUNC(mechatt_state::pf_w<1>)).share("pf2_data"); - map(0x0c8000, 0x0c8003).writeonly().share("pf2_scroll_data"); - map(0x0d0000, 0x0d07ff).ram().w("palette", FUNC(palette_device::write16)).share("palette"); - map(0x0e0000, 0x0e0001).portr("IN0"); - map(0x0e0002, 0x0e0003).portr("DSW1"); - map(0x0e0004, 0x0e0007).r(FUNC(mechatt_state::mechatt_gun_r)); - map(0x0e4000, 0x0e4001).w(FUNC(mechatt_state::coin_counter_w)); - map(0x0e4002, 0x0e4003).w(FUNC(mechatt_state::two_gun_output_w)); - map(0x0e8001, 0x0e8001).r(m_soundlatch[1], FUNC(generic_latch_8_device::read)).w(FUNC(mechatt_state::sound_cpu_w)); -} - -/******************************************************************************/ - -void bbusters_state_base::sound_map(address_map &map) +void bbusters_state::sound_map(address_map &map) { map(0x0000, 0xefff).rom(); map(0xf000, 0xf7ff).ram(); @@ -369,13 +357,6 @@ map(0xc0, 0xc1).nopw(); /* -> Main CPU */ } -void mechatt_state::sounda_portmap(address_map &map) -{ - map.global_mask(0xff); - map(0x00, 0x03).rw("ymsnd", FUNC(ym2608_device::read), FUNC(ym2608_device::write)); - map(0xc0, 0xc1).nopw(); /* -> Main CPU */ -} - /******************************************************************************/ static INPUT_PORTS_START( bbusters ) @@ -480,94 +461,6 @@ PORT_BIT(0x3ff, 0x212, IPT_LIGHTGUN_X) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_MINMAX(0x14e, 0x33e) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_PLAYER(3) INPUT_PORTS_END -static INPUT_PORTS_START( mechatt ) - PORT_START("IN0") - PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) - PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) - PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) // See notes - PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_COIN3 ) - PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_COIN4 ) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) - PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("P1 Fire") // "Fire" - PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("P1 Grenade") // "Grenade" - PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_START2 ) - PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("P2 Fire") // "Fire" - PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("P2 Grenade") // "Grenade" - PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED ) - - PORT_START("DSW1") - PORT_DIPNAME( 0x0001, 0x0001, "Coin Slots" ) PORT_DIPLOCATION("SW1:1") // Listed as "Unused" (manual from different revision/region?), See notes - PORT_DIPSETTING( 0x0001, "Common" ) - PORT_DIPSETTING( 0x0000, "Individual" ) - PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW1:2") - PORT_DIPSETTING( 0x0000, DEF_STR( No ) ) - PORT_DIPSETTING( 0x0002, DEF_STR( Yes ) ) - PORT_DIPNAME( 0x000c, 0x000c, "Magazine / Grenade" ) PORT_DIPLOCATION("SW1:3,4") - PORT_DIPSETTING( 0x0008, "5 / 2" ) - PORT_DIPSETTING( 0x000c, "6 / 3" ) - PORT_DIPSETTING( 0x0004, "7 / 4" ) - PORT_DIPSETTING( 0x0000, "8 / 5" ) - PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:5,6") // See notes - PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) ) - PORT_DIPSETTING( 0x0010, DEF_STR( 3C_1C ) ) - PORT_DIPSETTING( 0x0020, DEF_STR( 2C_1C ) ) - PORT_DIPSETTING( 0x0030, DEF_STR( 1C_1C ) ) - PORT_DIPNAME( 0x00c0, 0x00c0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:7,8") // Listed as "Unused" (manual from different revision/region?), See notes - PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_1C ) ) - PORT_DIPSETTING( 0x0080, DEF_STR( 1C_2C ) ) - PORT_DIPSETTING( 0x0040, DEF_STR( 1C_3C ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( 1C_4C ) ) - PORT_DIPNAME( 0x0300, 0x0300, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:1,2") - PORT_DIPSETTING( 0x0200, DEF_STR( Easy ) ) - PORT_DIPSETTING( 0x0300, DEF_STR( Normal ) ) - PORT_DIPSETTING( 0x0100, DEF_STR( Hard ) ) - PORT_DIPSETTING( 0x0000, DEF_STR( Hardest ) ) - PORT_DIPNAME( 0x0c00, 0x0c00, "Game Mode" ) PORT_DIPLOCATION("SW2:3,4") - PORT_DIPSETTING( 0x0800, "Demo Sounds Off" ) - PORT_DIPSETTING( 0x0c00, "Demo Sounds On" ) - PORT_DIPSETTING( 0x0400, "Infinite Energy (Cheat)") - PORT_DIPSETTING( 0x0000, "Freeze" ) - PORT_DIPUNUSED_DIPLOC(0x1000, 0x1000, "SW2:5" ) /* Listed as "Unused" */ - PORT_DIPUNUSED_DIPLOC(0x2000, 0x2000, "SW2:6" ) /* Listed as "Unused" */ - PORT_DIPUNUSED_DIPLOC(0x4000, 0x4000, "SW2:7" ) /* Listed as "Unused" */ - PORT_SERVICE_DIPLOC( 0x8000, IP_ACTIVE_LOW, "SW2:8" ) - - PORT_START("GUNX1") - PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(10) PORT_PLAYER(1) - PORT_START("GUNY1") - PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(10) PORT_PLAYER(1) - - PORT_START("GUNX2") - PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(10) PORT_PLAYER(2) - PORT_START("GUNY2") - PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(10) PORT_PLAYER(2) -INPUT_PORTS_END - -static INPUT_PORTS_START( mechattj ) - PORT_INCLUDE( mechatt ) - - PORT_MODIFY("DSW1") - PORT_DIPUNUSED_DIPLOC( 0x0001, 0x0001, "SW1:1" ) -INPUT_PORTS_END - -static INPUT_PORTS_START( mechattu ) - PORT_INCLUDE( mechatt ) - - PORT_MODIFY("DSW1") - PORT_DIPUNUSED_DIPLOC( 0x0001, 0x0001, "SW1:1" ) - PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:5,6") - PORT_DIPSETTING( 0x0000, DEF_STR( Free_Play ) ) - PORT_DIPSETTING( 0x0010, "1 Coin/2 Credits first, then 1 Coin/1 Credit" ) - PORT_DIPSETTING( 0x0020, "2 Coins/1 Credit first, then 1 Coin/1 Credit" ) - PORT_DIPSETTING( 0x0030, DEF_STR( 1C_1C ) ) - PORT_DIPUNUSED_DIPLOC( 0x00c0, 0x00c0, "SW1:7,8" ) -INPUT_PORTS_END - - /******************************************************************************/ static const gfx_layout charlayout = @@ -581,19 +474,6 @@ 32*8 }; -static const gfx_layout spritelayout = -{ - 16,16, - RGN_FRAC(1,1), - 4, - { STEP4(0,4) }, - { - STEP4(0,1), STEP4(4*4,1), - STEP4(4*4*2*8,1), STEP4(4*4+4*4*2*8,1) - }, - { STEP8(0,4*4*2), STEP8(16*32,4*8) }, - 128*8 -}; static const gfx_layout tilelayout = { @@ -607,21 +487,11 @@ }; static GFXDECODE_START( gfx_bbusters ) - GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 16 ) - GFXDECODE_ENTRY( "gfx2", 0, spritelayout, 256, 16 ) - GFXDECODE_ENTRY( "gfx3", 0, spritelayout, 512, 16 ) + GFXDECODE_ENTRY( "tx_tiles", 0, charlayout, 0, 16 ) GFXDECODE_ENTRY( "gfx4", 0, tilelayout, 768, 16 ) GFXDECODE_ENTRY( "gfx5", 0, tilelayout, 1024+256, 16 ) GFXDECODE_END -static GFXDECODE_START( gfx_mechatt ) - GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 16 ) - GFXDECODE_ENTRY( "gfx2", 0, spritelayout, 256, 16 ) - GFXDECODE_ENTRY( "gfx3", 0, tilelayout, 512, 16 ) - GFXDECODE_ENTRY( "gfx4", 0, tilelayout, 768, 16 ) -GFXDECODE_END - - /******************************************************************************/ void bbusters_state::bbusters(machine_config &config) @@ -631,7 +501,7 @@ m_maincpu->set_addrmap(AS_PROGRAM, &bbusters_state::bbusters_map); m_maincpu->set_vblank_int("screen", FUNC(bbusters_state::irq6_line_hold)); - Z80(config, m_audiocpu, 4000000); /* Accurate */ + Z80(config, m_audiocpu, 4000000); // Accurate m_audiocpu->set_addrmap(AS_PROGRAM, &bbusters_state::sound_map); m_audiocpu->set_addrmap(AS_IO, &bbusters_state::sound_portmap); @@ -659,6 +529,16 @@ GFXDECODE(config, m_gfxdecode, "palette", gfx_bbusters); PALETTE(config, "palette").set_format(palette_device::RGBx_444, 2048); + SNK_BBUSTERS_SPR(config, m_sprites[0], 0); + m_sprites[0]->set_scaletable_tag("sprites1:scale_table"); + m_sprites[0]->set_palette("palette"); + m_sprites[0]->set_spriteram_tag("spriteram1"); + + SNK_BBUSTERS_SPR(config, m_sprites[1], 0); + m_sprites[1]->set_scaletable_tag("sprites2:scale_table"); + m_sprites[1]->set_palette("palette"); + m_sprites[1]->set_spriteram_tag("spriteram2"); + BUFFERED_SPRITERAM16(config, m_spriteram[0]); BUFFERED_SPRITERAM16(config, m_spriteram[1]); @@ -677,46 +557,6 @@ ymsnd.add_route(2, "rspeaker", 1.0); } -void mechatt_state::mechatt(machine_config &config) -{ - /* basic machine hardware */ - M68000(config, m_maincpu, 12000000); - m_maincpu->set_addrmap(AS_PROGRAM, &mechatt_state::mechatt_map); - m_maincpu->set_vblank_int("screen", FUNC(mechatt_state::irq4_line_hold)); - - Z80(config, m_audiocpu, 4000000); /* Accurate */ - m_audiocpu->set_addrmap(AS_PROGRAM, &mechatt_state::sound_map); - m_audiocpu->set_addrmap(AS_IO, &mechatt_state::sounda_portmap); - - /* video hardware */ - screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_refresh_hz(60); - screen.set_size(64*8, 32*8); - screen.set_visarea(0*8, 32*8-1, 2*8, 30*8-1); - screen.set_screen_update(FUNC(mechatt_state::screen_update)); - screen.screen_vblank().set(m_spriteram[0], FUNC(buffered_spriteram16_device::vblank_copy_rising)); - screen.set_palette("palette"); - - GFXDECODE(config, m_gfxdecode, "palette", gfx_mechatt); - PALETTE(config, "palette").set_format(palette_device::RGBx_444, 1024); - - BUFFERED_SPRITERAM16(config, m_spriteram[0]); - - /* sound hardware */ - SPEAKER(config, "lspeaker").front_left(); - SPEAKER(config, "rspeaker").front_right(); - - GENERIC_LATCH_8(config, m_soundlatch[0]); - GENERIC_LATCH_8(config, m_soundlatch[1]); - - ym2608_device &ymsnd(YM2608(config, "ymsnd", 8000000)); - ymsnd.irq_handler().set_inputline("audiocpu", 0); - ymsnd.add_route(0, "lspeaker", 0.50); - ymsnd.add_route(0, "rspeaker", 0.50); - ymsnd.add_route(1, "lspeaker", 1.0); - ymsnd.add_route(2, "rspeaker", 1.0); -} - /******************************************************************************/ ROM_START( bbusters ) @@ -729,16 +569,16 @@ ROM_REGION( 0x10000, "audiocpu", 0 ) ROM_LOAD( "bb-1.e6", 0x000000, 0x10000, CRC(4360f2ee) SHA1(4c6b212f59389bdf4388893d2030493b110ac087) ) - ROM_REGION( 0x020000, "gfx1", 0 ) + ROM_REGION( 0x020000, "tx_tiles", 0 ) ROM_LOAD( "bb-10.l9", 0x000000, 0x20000, CRC(490c0d9b) SHA1(567c25a6d96407259c64061d674305e4117d9fa4) ) - ROM_REGION( 0x200000, "gfx2", 0 ) + ROM_REGION( 0x200000, "sprites1", 0 ) ROM_LOAD16_WORD_SWAP( "bb-f11.m16", 0x000000, 0x80000, CRC(39fdf9c0) SHA1(80392947e3a1831c3ee80139f6f3bdc3bafa4f0d) ) ROM_LOAD16_WORD_SWAP( "bb-f12.m13", 0x080000, 0x80000, CRC(69ee046b) SHA1(5c0435f1ce76b584fa8d154d7617d73c7ab5f62f) ) ROM_LOAD16_WORD_SWAP( "bb-f13.m12", 0x100000, 0x80000, CRC(f5ef840e) SHA1(dd0f630c52076e0d330f47931e68a3ae9a401078) ) ROM_LOAD16_WORD_SWAP( "bb-f14.m11", 0x180000, 0x80000, CRC(1a7df3bb) SHA1(1f27a528e6f89fe56a7342c4f1ff733da0a09327) ) - ROM_REGION( 0x200000, "gfx3", 0 ) + ROM_REGION( 0x200000, "sprites2", 0 ) ROM_LOAD16_WORD_SWAP( "bb-f21.l10", 0x000000, 0x80000, CRC(530f595b) SHA1(820898693b878c4423de9c244f943d39ea69515e) ) ROM_LOAD16_WORD_SWAP( "bb-f22.l12", 0x080000, 0x80000, CRC(889c562e) SHA1(d19172d6515ab9793c98de75d6e41687e61a408d) ) ROM_LOAD16_WORD_SWAP( "bb-f23.l13", 0x100000, 0x80000, CRC(c89fe0da) SHA1(92be860a7191e7473c42aa2da981eda873219d3d) ) @@ -750,10 +590,11 @@ ROM_REGION( 0x80000, "gfx5", 0 ) ROM_LOAD( "bb-back2.m6", 0x000000, 0x80000, CRC(8be996f6) SHA1(1e2c56f4c24793f806d7b366b92edc03145ae94c) ) - ROM_REGION( 0x10000, "scale_table", 0 ) /* Zoom table */ - /* same rom exists in 4 different locations on the board */ + ROM_REGION( 0x10000, "sprites1:scale_table", 0 ) /* Zoom table - same rom exists in 4 different locations on the board */ ROM_LOAD( "bb-6.e7", 0x000000, 0x10000, CRC(61f3de03) SHA1(736f9634fe054ea68a2aa90a743bd0dc320f23c9) ) ROM_LOAD( "bb-7.h7", 0x000000, 0x10000, CRC(61f3de03) SHA1(736f9634fe054ea68a2aa90a743bd0dc320f23c9) ) + + ROM_REGION( 0x10000, "sprites2:scale_table", 0 ) /* Zoom table - same rom exists in 4 different locations on the board */ ROM_LOAD( "bb-8.a14", 0x000000, 0x10000, CRC(61f3de03) SHA1(736f9634fe054ea68a2aa90a743bd0dc320f23c9) ) ROM_LOAD( "bb-9.c14", 0x000000, 0x10000, CRC(61f3de03) SHA1(736f9634fe054ea68a2aa90a743bd0dc320f23c9) ) @@ -774,16 +615,16 @@ ROM_REGION( 0x10000, "audiocpu", 0 ) ROM_LOAD( "bb-1.e6", 0x000000, 0x10000, CRC(4360f2ee) SHA1(4c6b212f59389bdf4388893d2030493b110ac087) ) - ROM_REGION( 0x020000, "gfx1", 0 ) + ROM_REGION( 0x020000, "tx_tiles", 0 ) ROM_LOAD( "bb-10.l9", 0x000000, 0x20000, CRC(490c0d9b) SHA1(567c25a6d96407259c64061d674305e4117d9fa4) ) - ROM_REGION( 0x200000, "gfx2", 0 ) + ROM_REGION( 0x200000, "sprites1", 0 ) ROM_LOAD16_WORD_SWAP( "bb-f11.m16", 0x000000, 0x80000, CRC(39fdf9c0) SHA1(80392947e3a1831c3ee80139f6f3bdc3bafa4f0d) ) ROM_LOAD16_WORD_SWAP( "bb-f12.m13", 0x080000, 0x80000, CRC(69ee046b) SHA1(5c0435f1ce76b584fa8d154d7617d73c7ab5f62f) ) ROM_LOAD16_WORD_SWAP( "bb-f13.m12", 0x100000, 0x80000, CRC(f5ef840e) SHA1(dd0f630c52076e0d330f47931e68a3ae9a401078) ) ROM_LOAD16_WORD_SWAP( "bb-f14.m11", 0x180000, 0x80000, CRC(1a7df3bb) SHA1(1f27a528e6f89fe56a7342c4f1ff733da0a09327) ) - ROM_REGION( 0x200000, "gfx3", 0 ) + ROM_REGION( 0x200000, "sprites2", 0 ) ROM_LOAD16_WORD_SWAP( "bb-f21.l10", 0x000000, 0x80000, CRC(530f595b) SHA1(820898693b878c4423de9c244f943d39ea69515e) ) ROM_LOAD16_WORD_SWAP( "bb-f22.l12", 0x080000, 0x80000, CRC(889c562e) SHA1(d19172d6515ab9793c98de75d6e41687e61a408d) ) ROM_LOAD16_WORD_SWAP( "bb-f23.l13", 0x100000, 0x80000, CRC(c89fe0da) SHA1(92be860a7191e7473c42aa2da981eda873219d3d) ) @@ -795,10 +636,11 @@ ROM_REGION( 0x80000, "gfx5", 0 ) ROM_LOAD( "bb-back2.m6", 0x000000, 0x80000, CRC(8be996f6) SHA1(1e2c56f4c24793f806d7b366b92edc03145ae94c) ) - ROM_REGION( 0x10000, "scale_table", 0 ) /* Zoom table */ - /* same rom exists in 4 different locations on the board */ + ROM_REGION( 0x10000, "sprites1:scale_table", 0 ) /* Zoom table - same rom exists in 4 different locations on the board */ ROM_LOAD( "bb-6.e7", 0x000000, 0x10000, CRC(61f3de03) SHA1(736f9634fe054ea68a2aa90a743bd0dc320f23c9) ) ROM_LOAD( "bb-7.h7", 0x000000, 0x10000, CRC(61f3de03) SHA1(736f9634fe054ea68a2aa90a743bd0dc320f23c9) ) + + ROM_REGION( 0x10000, "sprites2:scale_table", 0 ) /* Zoom table - same rom exists in 4 different locations on the board */ ROM_LOAD( "bb-8.a14", 0x000000, 0x10000, CRC(61f3de03) SHA1(736f9634fe054ea68a2aa90a743bd0dc320f23c9) ) ROM_LOAD( "bb-9.c14", 0x000000, 0x10000, CRC(61f3de03) SHA1(736f9634fe054ea68a2aa90a743bd0dc320f23c9) ) @@ -819,16 +661,16 @@ ROM_REGION( 0x10000, "audiocpu", 0 ) ROM_LOAD( "bb-1.e6", 0x000000, 0x10000, CRC(4360f2ee) SHA1(4c6b212f59389bdf4388893d2030493b110ac087) ) - ROM_REGION( 0x020000, "gfx1", 0 ) + ROM_REGION( 0x020000, "tx_tiles", 0 ) ROM_LOAD( "bb-10.l9", 0x000000, 0x20000, CRC(490c0d9b) SHA1(567c25a6d96407259c64061d674305e4117d9fa4) ) - ROM_REGION( 0x200000, "gfx2", 0 ) + ROM_REGION( 0x200000, "sprites1", 0 ) ROM_LOAD16_WORD_SWAP( "bb-f11.m16", 0x000000, 0x80000, CRC(39fdf9c0) SHA1(80392947e3a1831c3ee80139f6f3bdc3bafa4f0d) ) ROM_LOAD16_WORD_SWAP( "bb-f12.m13", 0x080000, 0x80000, CRC(69ee046b) SHA1(5c0435f1ce76b584fa8d154d7617d73c7ab5f62f) ) ROM_LOAD16_WORD_SWAP( "bb-f13.m12", 0x100000, 0x80000, CRC(f5ef840e) SHA1(dd0f630c52076e0d330f47931e68a3ae9a401078) ) ROM_LOAD16_WORD_SWAP( "bb-f14.m11", 0x180000, 0x80000, CRC(1a7df3bb) SHA1(1f27a528e6f89fe56a7342c4f1ff733da0a09327) ) - ROM_REGION( 0x200000, "gfx3", 0 ) + ROM_REGION( 0x200000, "sprites2", 0 ) ROM_LOAD16_WORD_SWAP( "bb-f21.l10", 0x000000, 0x80000, CRC(530f595b) SHA1(820898693b878c4423de9c244f943d39ea69515e) ) ROM_LOAD16_WORD_SWAP( "bb-f22.l12", 0x080000, 0x80000, CRC(889c562e) SHA1(d19172d6515ab9793c98de75d6e41687e61a408d) ) ROM_LOAD16_WORD_SWAP( "bb-f23.l13", 0x100000, 0x80000, CRC(c89fe0da) SHA1(92be860a7191e7473c42aa2da981eda873219d3d) ) @@ -840,10 +682,11 @@ ROM_REGION( 0x80000, "gfx5", 0 ) ROM_LOAD( "bb-back2.m6", 0x000000, 0x80000, CRC(8be996f6) SHA1(1e2c56f4c24793f806d7b366b92edc03145ae94c) ) - ROM_REGION( 0x10000, "scale_table", 0 ) /* Zoom table */ - /* same rom exists in 4 different locations on the board */ + ROM_REGION( 0x10000, "sprites1:scale_table", 0 ) /* Zoom table - same rom exists in 4 different locations on the board */ ROM_LOAD( "bb-6.e7", 0x000000, 0x10000, CRC(61f3de03) SHA1(736f9634fe054ea68a2aa90a743bd0dc320f23c9) ) ROM_LOAD( "bb-7.h7", 0x000000, 0x10000, CRC(61f3de03) SHA1(736f9634fe054ea68a2aa90a743bd0dc320f23c9) ) + + ROM_REGION( 0x10000, "sprites2:scale_table", 0 ) /* Zoom table - same rom exists in 4 different locations on the board */ ROM_LOAD( "bb-8.a14", 0x000000, 0x10000, CRC(61f3de03) SHA1(736f9634fe054ea68a2aa90a743bd0dc320f23c9) ) ROM_LOAD( "bb-9.c14", 0x000000, 0x10000, CRC(61f3de03) SHA1(736f9634fe054ea68a2aa90a743bd0dc320f23c9) ) @@ -864,16 +707,16 @@ ROM_REGION( 0x10000, "audiocpu", 0 ) ROM_LOAD( "bb-1.e6", 0x000000, 0x10000, CRC(4360f2ee) SHA1(4c6b212f59389bdf4388893d2030493b110ac087) ) - ROM_REGION( 0x020000, "gfx1", 0 ) + ROM_REGION( 0x020000, "tx_tiles", 0 ) ROM_LOAD( "bb-10.l9", 0x000000, 0x20000, CRC(490c0d9b) SHA1(567c25a6d96407259c64061d674305e4117d9fa4) ) - ROM_REGION( 0x200000, "gfx2", 0 ) + ROM_REGION( 0x200000, "sprites1", 0 ) ROM_LOAD16_WORD_SWAP( "bb-f11.m16", 0x000000, 0x80000, CRC(39fdf9c0) SHA1(80392947e3a1831c3ee80139f6f3bdc3bafa4f0d) ) ROM_LOAD16_WORD_SWAP( "bb-f12.m13", 0x080000, 0x80000, CRC(69ee046b) SHA1(5c0435f1ce76b584fa8d154d7617d73c7ab5f62f) ) ROM_LOAD16_WORD_SWAP( "bb-f13.m12", 0x100000, 0x80000, CRC(f5ef840e) SHA1(dd0f630c52076e0d330f47931e68a3ae9a401078) ) ROM_LOAD16_WORD_SWAP( "bb-f14.m11", 0x180000, 0x80000, CRC(1a7df3bb) SHA1(1f27a528e6f89fe56a7342c4f1ff733da0a09327) ) - ROM_REGION( 0x200000, "gfx3", 0 ) + ROM_REGION( 0x200000, "sprites2", 0 ) ROM_LOAD16_WORD_SWAP( "bb-f21.l10", 0x000000, 0x80000, CRC(530f595b) SHA1(820898693b878c4423de9c244f943d39ea69515e) ) ROM_LOAD16_WORD_SWAP( "bb-f22.l12", 0x080000, 0x80000, CRC(889c562e) SHA1(d19172d6515ab9793c98de75d6e41687e61a408d) ) ROM_LOAD16_WORD_SWAP( "bb-f23.l13", 0x100000, 0x80000, CRC(c89fe0da) SHA1(92be860a7191e7473c42aa2da981eda873219d3d) ) @@ -885,10 +728,11 @@ ROM_REGION( 0x80000, "gfx5", 0 ) ROM_LOAD( "bb-back2.m6", 0x000000, 0x80000, CRC(8be996f6) SHA1(1e2c56f4c24793f806d7b366b92edc03145ae94c) ) - ROM_REGION( 0x10000, "scale_table", 0 ) /* Zoom table */ - /* same rom exists in 4 different locations on the board */ + ROM_REGION( 0x10000, "sprites1:scale_table", 0 ) /* Zoom table - same rom exists in 4 different locations on the board */ ROM_LOAD( "bb-6.e7", 0x000000, 0x10000, CRC(61f3de03) SHA1(736f9634fe054ea68a2aa90a743bd0dc320f23c9) ) ROM_LOAD( "bb-7.h7", 0x000000, 0x10000, CRC(61f3de03) SHA1(736f9634fe054ea68a2aa90a743bd0dc320f23c9) ) + + ROM_REGION( 0x10000, "sprites2:scale_table", 0 ) /* Zoom table - same rom exists in 4 different locations on the board */ ROM_LOAD( "bb-8.a14", 0x000000, 0x10000, CRC(61f3de03) SHA1(736f9634fe054ea68a2aa90a743bd0dc320f23c9) ) ROM_LOAD( "bb-9.c14", 0x000000, 0x10000, CRC(61f3de03) SHA1(736f9634fe054ea68a2aa90a743bd0dc320f23c9) ) @@ -909,16 +753,16 @@ ROM_REGION( 0x10000, "audiocpu", 0 ) ROM_LOAD( "bb-1.e6", 0x000000, 0x10000, CRC(4360f2ee) SHA1(4c6b212f59389bdf4388893d2030493b110ac087) ) - ROM_REGION( 0x020000, "gfx1", 0 ) + ROM_REGION( 0x020000, "tx_tiles", 0 ) ROM_LOAD( "bb-10.l9", 0x000000, 0x20000, CRC(490c0d9b) SHA1(567c25a6d96407259c64061d674305e4117d9fa4) ) - ROM_REGION( 0x200000, "gfx2", 0 ) + ROM_REGION( 0x200000, "sprites1", 0 ) ROM_LOAD16_WORD_SWAP( "bb-f11.m16", 0x000000, 0x80000, CRC(39fdf9c0) SHA1(80392947e3a1831c3ee80139f6f3bdc3bafa4f0d) ) ROM_LOAD16_WORD_SWAP( "bb-f12.m13", 0x080000, 0x80000, CRC(69ee046b) SHA1(5c0435f1ce76b584fa8d154d7617d73c7ab5f62f) ) ROM_LOAD16_WORD_SWAP( "bb-f13.m12", 0x100000, 0x80000, CRC(f5ef840e) SHA1(dd0f630c52076e0d330f47931e68a3ae9a401078) ) ROM_LOAD16_WORD_SWAP( "bb-f14.m11", 0x180000, 0x80000, CRC(1a7df3bb) SHA1(1f27a528e6f89fe56a7342c4f1ff733da0a09327) ) - ROM_REGION( 0x200000, "gfx3", 0 ) + ROM_REGION( 0x200000, "sprites2", 0 ) ROM_LOAD16_WORD_SWAP( "bb-f21.l10", 0x000000, 0x80000, CRC(530f595b) SHA1(820898693b878c4423de9c244f943d39ea69515e) ) ROM_LOAD16_WORD_SWAP( "bb-f22.l12", 0x080000, 0x80000, CRC(889c562e) SHA1(d19172d6515ab9793c98de75d6e41687e61a408d) ) ROM_LOAD16_WORD_SWAP( "bb-f23.l13", 0x100000, 0x80000, CRC(c89fe0da) SHA1(92be860a7191e7473c42aa2da981eda873219d3d) ) @@ -930,10 +774,11 @@ ROM_REGION( 0x80000, "gfx5", 0 ) ROM_LOAD( "bb-back2.m6", 0x000000, 0x80000, CRC(8be996f6) SHA1(1e2c56f4c24793f806d7b366b92edc03145ae94c) ) - ROM_REGION( 0x10000, "scale_table", 0 ) /* Zoom table */ - /* same rom exists in 4 different locations on the board */ + ROM_REGION( 0x10000, "sprites1:scale_table", 0 ) /* Zoom table - same rom exists in 4 different locations on the board */ ROM_LOAD( "bb-6.e7", 0x000000, 0x10000, CRC(61f3de03) SHA1(736f9634fe054ea68a2aa90a743bd0dc320f23c9) ) ROM_LOAD( "bb-7.h7", 0x000000, 0x10000, CRC(61f3de03) SHA1(736f9634fe054ea68a2aa90a743bd0dc320f23c9) ) + + ROM_REGION( 0x10000, "sprites2:scale_table", 0 ) /* Zoom table - same rom exists in 4 different locations on the board */ ROM_LOAD( "bb-8.a14", 0x000000, 0x10000, CRC(61f3de03) SHA1(736f9634fe054ea68a2aa90a743bd0dc320f23c9) ) ROM_LOAD( "bb-9.c14", 0x000000, 0x10000, CRC(61f3de03) SHA1(736f9634fe054ea68a2aa90a743bd0dc320f23c9) ) @@ -944,176 +789,7 @@ ROM_LOAD( "bb-pcmb.l3", 0x000000, 0x80000, CRC(c8d5dd53) SHA1(0f7e94532cc14852ca12c1b792e5479667af899e) ) ROM_END - -ROM_START( mechatt ) - ROM_REGION( 0x80000, "maincpu", 0 ) // Located on the A8002-1 main board - ROM_LOAD16_BYTE( "ma5-e.n12", 0x000000, 0x20000, CRC(9bbb852a) SHA1(34b696bf79cf53cac1c384a3143c0f3f243a71f3) ) - ROM_LOAD16_BYTE( "ma4.l12", 0x000001, 0x20000, CRC(0d414918) SHA1(0d51b893d37ba124b983beebb691e65bdc52d300) ) - ROM_LOAD16_BYTE( "ma7.n13", 0x040000, 0x20000, CRC(61d85e1b) SHA1(46234d48ac21c481a5e70c6a654a341ebdd4cd3a) ) - ROM_LOAD16_BYTE( "ma6-f.l13", 0x040001, 0x20000, CRC(4055fe8d) SHA1(b4d8bd5f73805ce1c332eff657dddbb88ff45b37) ) - - ROM_REGION( 0x10000, "audiocpu", 0 ) // Located on the A8002-1 main board - ROM_LOAD( "ma_3.e13", 0x000000, 0x10000, CRC(c06cc8e1) SHA1(65f5f1901120d633f7c3ba07432a188fd7fd7272) ) - - ROM_REGION( 0x020000, "gfx1", 0 ) // Located on the A8002-2 board - ROM_LOAD( "ma_1.l2", 0x000000, 0x10000, CRC(24766917) SHA1(9082a8ae849605ce65b5a0493ae69cfe282f7e7b) ) - - ROM_REGION( 0x200000, "gfx2", 0 ) // Located on the A8002-2 board - ROM_LOAD16_WORD_SWAP( "mao89p13.bin", 0x000000, 0x80000, CRC(8bcb16cf) SHA1(409ee1944188d9ce39adce29b1df029b560dd5b0) ) - ROM_LOAD16_WORD_SWAP( "ma189p15.bin", 0x080000, 0x80000, CRC(b84d9658) SHA1(448adecb0067d8f5b219ec2f94a8dec84187a554) ) - ROM_LOAD16_WORD_SWAP( "ma289p17.bin", 0x100000, 0x80000, CRC(6cbe08ac) SHA1(8f81f6e92b84ab6867452011d52f3e7689c62a1a) ) - ROM_LOAD16_WORD_SWAP( "ma389m15.bin", 0x180000, 0x80000, CRC(34d4585e) SHA1(38d9fd5d775e4b3c8b8b487a6ba9b8bdcb3274b0) ) - - ROM_REGION( 0x80000, "gfx3", 0 ) // Located on the A8002-2 board - ROM_LOAD( "mab189a2.bin", 0x000000, 0x80000, CRC(e1c8b4d0) SHA1(2f8a1839cca892f8380c7cffe7a12e615d38fd55) ) - - ROM_REGION( 0x80000, "gfx4", 0 ) // Located on the A8002-2 board - ROM_LOAD( "mab289c2.bin", 0x000000, 0x80000, CRC(14f97ceb) SHA1(a22033532ea616dc3a3db8b66ad6ccc6172ed7cc) ) - - ROM_REGION( 0x20000, "ymsnd", 0 ) // Located on the A8002-1 main board - ROM_LOAD( "ma_2.d10", 0x000000, 0x20000, CRC(ea4cc30d) SHA1(d8f089fc0ce76309411706a8110ad907f93dc97e) ) - - ROM_REGION( 0x20000, "scale_table", 0 ) // Zoom table - Located on the A8002-2 board - ROM_LOAD( "ma_8.f10", 0x000000, 0x10000, CRC(61f3de03) SHA1(736f9634fe054ea68a2aa90a743bd0dc320f23c9) ) - ROM_LOAD( "ma_9.f12", 0x000000, 0x10000, CRC(61f3de03) SHA1(736f9634fe054ea68a2aa90a743bd0dc320f23c9) ) // identical to ma_8.f10 -ROM_END - -ROM_START( mechattj ) // Uses EPROMs on official SNK A8002-5 & A8002-6 sub boards instead of MaskROMs - ROM_REGION( 0x80000, "maincpu", 0 ) // Located on the A8002-1 main board - ROM_LOAD16_BYTE( "ma5j.n12", 0x000000, 0x20000, CRC(e6bb5952) SHA1(3b01eccc20d99fd33ff8e303afa902abb66e1036) ) - ROM_LOAD16_BYTE( "ma4j.l12", 0x000001, 0x20000, CRC(c78baa62) SHA1(c3554698fbc94e3625269c5cb1fc664364f3fb3f) ) - ROM_LOAD16_BYTE( "ma7j.n13", 0x040000, 0x20000, CRC(12a68fc2) SHA1(c935788723d8ea3bfe99244b8c7b2aff85579912) ) - ROM_LOAD16_BYTE( "ma6j.l13", 0x040001, 0x20000, CRC(332b2f54) SHA1(c768f5437a20ea406523d3de9e1ea807b39e1622) ) - - ROM_REGION( 0x10000, "audiocpu", 0 ) // Located on the A8002-1 main board - ROM_LOAD( "ma_3.e13", 0x000000, 0x10000, CRC(c06cc8e1) SHA1(65f5f1901120d633f7c3ba07432a188fd7fd7272) ) - - ROM_REGION( 0x020000, "gfx1", 0 ) // Located on the A8002-2 board - ROM_LOAD( "ma_1.l2", 0x000000, 0x10000, CRC(24766917) SHA1(9082a8ae849605ce65b5a0493ae69cfe282f7e7b) ) - - ROM_REGION( 0x200000, "gfx2", 0 ) // Located on the A8002-6 sub board - ROM_LOAD16_BYTE( "s_9.a1", 0x000001, 0x20000, CRC(6e8e194c) SHA1(02bbd573a322a3f7f8e92ccceebffdd598b5489e) ) // these 4 == mao89p13.bin - ROM_LOAD16_BYTE( "s_1.b1", 0x000000, 0x20000, CRC(fd9161ed) SHA1(b3e2434dd9cb1cafe1022774b863b5f1a008a9d2) ) - ROM_LOAD16_BYTE( "s_10.a2", 0x040001, 0x20000, CRC(fad6a1ab) SHA1(5347b4493c8004dc8cedc0b37aba494f203142b8) ) - ROM_LOAD16_BYTE( "s_2.b2", 0x040000, 0x20000, CRC(549056f0) SHA1(f515aa98ab25f3735dbfdefcb8d55ba3b2075b70) ) - ROM_LOAD16_BYTE( "s_11.a3", 0x080001, 0x20000, CRC(3887a382) SHA1(b40861fc1414b2fa299772e76a78cb8dc00b71b7) ) // these 4 == ma189p15.bin - ROM_LOAD16_BYTE( "s_3.b3", 0x080000, 0x20000, CRC(cb99f565) SHA1(9ed1b21f4a33b9a614bca38610378857560cdaba) ) - ROM_LOAD16_BYTE( "s_12.a4", 0x0c0001, 0x20000, CRC(63417b49) SHA1(786249fa7e8770de5b5882debdc2913d58e9170e) ) - ROM_LOAD16_BYTE( "s_4.b4", 0x0c0000, 0x20000, CRC(d739d48a) SHA1(04d2ecea72b6e651b815865946c9c9cfae4e5c4d) ) - ROM_LOAD16_BYTE( "s_13.a5", 0x100001, 0x20000, CRC(eccd47b6) SHA1(6b9c63fee97a7568114f227a89a1effd6b04806a) ) // these 4 == ma289p17.bin - ROM_LOAD16_BYTE( "s_5.b5", 0x100000, 0x20000, CRC(e15244da) SHA1(ebf3072565c53d0098d373b5093ba6918c4eddae) ) - ROM_LOAD16_BYTE( "s_14.a6", 0x140001, 0x20000, CRC(bbbf0461) SHA1(c5299ab1d45f685a5d160492247cf1303ef6937a) ) - ROM_LOAD16_BYTE( "s_6.b6", 0x140000, 0x20000, CRC(4ee89f75) SHA1(bda0e9095da2d424faac341fd934000a621796eb) ) - ROM_LOAD16_BYTE( "s_15.a7", 0x180001, 0x20000, CRC(cde29bad) SHA1(24c1b43c6d717eaaf7c01ec7de89837947334224) ) // these 4 == ma389m15.bin - ROM_LOAD16_BYTE( "s_7.b7", 0x180000, 0x20000, CRC(065ed221) SHA1(c03ca5b4d1198939a57b5fccf6a79d70afe1faaf) ) - ROM_LOAD16_BYTE( "s_16.a8", 0x1c0001, 0x20000, CRC(70f28040) SHA1(91012728953563fcc576725337e6ba7e1b49d1ba) ) - ROM_LOAD16_BYTE( "s_8.b8", 0x1c0000, 0x20000, CRC(a6f8574f) SHA1(87c041669b2eaec495ae10a6f45b6668accb92bf) ) - - ROM_REGION( 0x80000, "gfx3", 0 ) // these 4 == mab189a2.bin - Located on the A8002-5 sub board - ROM_LOAD( "s_21.b3", 0x000000, 0x20000, CRC(701a0072) SHA1(b03b6fa18e0cfcd5c7c541025fa2d3632d2f8387) ) - ROM_LOAD( "s_22.b4", 0x020000, 0x20000, CRC(34e6225c) SHA1(f6335084f4f4c7a4b6528e6ad74962b88f81e3bc) ) - ROM_LOAD( "s_23.b5", 0x040000, 0x20000, CRC(9a7399d3) SHA1(04e0327b0da75f621b51e1831cbdc4537082e32b) ) - ROM_LOAD( "s_24.b6", 0x060000, 0x20000, CRC(f097459d) SHA1(466364677f048519eb2894ddecf76f5c52f6afe9) ) - - ROM_REGION( 0x80000, "gfx4", 0 ) // these 4 == mab289c2.bin - Located on the A8002-5 sub board - ROM_LOAD( "s_17.a3", 0x000000, 0x20000, CRC(cc47c4a3) SHA1(140f53b671b4eaed6fcc516c4018f07a6d7c2290) ) - ROM_LOAD( "s_18.a4", 0x020000, 0x20000, CRC(a04377e8) SHA1(841c6c3073b137f6a5c875db32039186c014f785) ) - ROM_LOAD( "s_19.a5", 0x040000, 0x20000, CRC(b07f5289) SHA1(8817bd225edf9b0fa439b220617f925365e39253) ) - ROM_LOAD( "s_20.a6", 0x060000, 0x20000, CRC(a9bb4fa9) SHA1(ccede784671a864667b92a8101d686c26c78d76f) ) - - ROM_REGION( 0x20000, "ymsnd", 0 ) // Located on the A8002-1 main board - ROM_LOAD( "ma_2.d10", 0x000000, 0x20000, CRC(ea4cc30d) SHA1(d8f089fc0ce76309411706a8110ad907f93dc97e) ) - - ROM_REGION( 0x20000, "scale_table", 0 ) // Zoom table - Located on the A8002-2 board - ROM_LOAD( "ma_8.f10", 0x000000, 0x10000, CRC(61f3de03) SHA1(736f9634fe054ea68a2aa90a743bd0dc320f23c9) ) - ROM_LOAD( "ma_9.f12", 0x000000, 0x10000, CRC(61f3de03) SHA1(736f9634fe054ea68a2aa90a743bd0dc320f23c9) ) // identical to ma_8.f10 -ROM_END - -ROM_START( mechattu ) - ROM_REGION( 0x80000, "maincpu", 0 ) // Located on the A8002-1 main board - ROM_LOAD16_BYTE( "ma5u.n12", 0x000000, 0x20000, CRC(485ea606) SHA1(0c499f08d7c6d861ba7c50a8f577823613a7923c) ) - ROM_LOAD16_BYTE( "ma4u.l12", 0x000001, 0x20000, CRC(09fa31ec) SHA1(008abb2e09f83614c277471e534f20cba3e354d7) ) - ROM_LOAD16_BYTE( "ma7u.n13", 0x040000, 0x20000, CRC(f45b2c70) SHA1(65523d202d378bab890f1f7bffdde152dd246d4a) ) - ROM_LOAD16_BYTE( "ma6u.l13", 0x040001, 0x20000, CRC(d5d68ce6) SHA1(16057d882781015f6d1c7bb659e0812a8459c3f0) ) - - ROM_REGION( 0x10000, "audiocpu", 0 ) // Located on the A8002-1 main board - ROM_LOAD( "ma_3.e13", 0x000000, 0x10000, CRC(c06cc8e1) SHA1(65f5f1901120d633f7c3ba07432a188fd7fd7272) ) - - ROM_REGION( 0x020000, "gfx1", 0 ) // Located on the A8002-2 board - ROM_LOAD( "ma_1.l2", 0x000000, 0x10000, CRC(24766917) SHA1(9082a8ae849605ce65b5a0493ae69cfe282f7e7b) ) - - ROM_REGION( 0x200000, "gfx2", 0 ) // Located on the A8002-2 board - ROM_LOAD16_WORD_SWAP( "mao89p13.bin", 0x000000, 0x80000, CRC(8bcb16cf) SHA1(409ee1944188d9ce39adce29b1df029b560dd5b0) ) - ROM_LOAD16_WORD_SWAP( "ma189p15.bin", 0x080000, 0x80000, CRC(b84d9658) SHA1(448adecb0067d8f5b219ec2f94a8dec84187a554) ) - ROM_LOAD16_WORD_SWAP( "ma289p17.bin", 0x100000, 0x80000, CRC(6cbe08ac) SHA1(8f81f6e92b84ab6867452011d52f3e7689c62a1a) ) - ROM_LOAD16_WORD_SWAP( "ma389m15.bin", 0x180000, 0x80000, CRC(34d4585e) SHA1(38d9fd5d775e4b3c8b8b487a6ba9b8bdcb3274b0) ) - - ROM_REGION( 0x80000, "gfx3", 0 ) // Located on the A8002-2 board - ROM_LOAD( "mab189a2.bin", 0x000000, 0x80000, CRC(e1c8b4d0) SHA1(2f8a1839cca892f8380c7cffe7a12e615d38fd55) ) - - ROM_REGION( 0x80000, "gfx4", 0 ) // Located on the A8002-2 board - ROM_LOAD( "mab289c2.bin", 0x000000, 0x80000, CRC(14f97ceb) SHA1(a22033532ea616dc3a3db8b66ad6ccc6172ed7cc) ) - - ROM_REGION( 0x20000, "ymsnd", 0 ) // Located on the A8002-1 main board - ROM_LOAD( "ma_2.d10", 0x000000, 0x20000, CRC(ea4cc30d) SHA1(d8f089fc0ce76309411706a8110ad907f93dc97e) ) - - ROM_REGION( 0x20000, "scale_table", 0 ) // Zoom table - Located on the A8002-2 board - ROM_LOAD( "ma_8.f10", 0x000000, 0x10000, CRC(61f3de03) SHA1(736f9634fe054ea68a2aa90a743bd0dc320f23c9) ) - ROM_LOAD( "ma_9.f12", 0x000000, 0x10000, CRC(61f3de03) SHA1(736f9634fe054ea68a2aa90a743bd0dc320f23c9) ) // identical to ma_8.f10 -ROM_END - -/* does Ver1 on the roms mean it's a revision, the first version, or used because it's the single player version? */ -ROM_START( mechattu1 ) // Uses EPROMs on official SNK A8002-5 & A8002-6 sub boards instead of MaskROMs - ROM_REGION( 0x80000, "maincpu", 0 ) // Located on the A8002-1 main board - ROM_LOAD16_BYTE( "ma_ver1_5u.n12", 0x000000, 0x20000, CRC(dcd2e971) SHA1(e292b251c429b6990e97233e86360e5d43f573f2) ) - ROM_LOAD16_BYTE( "ma_ver1_4u.l12", 0x000001, 0x20000, CRC(69c8a85b) SHA1(07c6d395772a5e096e3ac42c5248eadccc146ad1) ) - ROM_LOAD16_BYTE( "ma7u.n13", 0x040000, 0x20000, CRC(f45b2c70) SHA1(65523d202d378bab890f1f7bffdde152dd246d4a) ) - ROM_LOAD16_BYTE( "ma6u.l13", 0x040001, 0x20000, CRC(d5d68ce6) SHA1(16057d882781015f6d1c7bb659e0812a8459c3f0) ) - - ROM_REGION( 0x10000, "audiocpu", 0 ) // Located on the A8002-1 main board - ROM_LOAD( "ma_3.e13", 0x000000, 0x10000, CRC(c06cc8e1) SHA1(65f5f1901120d633f7c3ba07432a188fd7fd7272) ) - - ROM_REGION( 0x020000, "gfx1", 0 ) // Located on the A8002-2 board - ROM_LOAD( "ma_1.l2", 0x000000, 0x10000, CRC(24766917) SHA1(9082a8ae849605ce65b5a0493ae69cfe282f7e7b) ) - - ROM_REGION( 0x200000, "gfx2", 0 ) // Located on the A8002-6 sub board - ROM_LOAD16_BYTE( "s_9.a1", 0x000001, 0x20000, CRC(6e8e194c) SHA1(02bbd573a322a3f7f8e92ccceebffdd598b5489e) ) // these 4 == mao89p13.bin - ROM_LOAD16_BYTE( "s_1.b1", 0x000000, 0x20000, CRC(fd9161ed) SHA1(b3e2434dd9cb1cafe1022774b863b5f1a008a9d2) ) - ROM_LOAD16_BYTE( "s_10.a2", 0x040001, 0x20000, CRC(fad6a1ab) SHA1(5347b4493c8004dc8cedc0b37aba494f203142b8) ) - ROM_LOAD16_BYTE( "s_2.b2", 0x040000, 0x20000, CRC(549056f0) SHA1(f515aa98ab25f3735dbfdefcb8d55ba3b2075b70) ) - ROM_LOAD16_BYTE( "s_11.a3", 0x080001, 0x20000, CRC(3887a382) SHA1(b40861fc1414b2fa299772e76a78cb8dc00b71b7) ) // these 4 == ma189p15.bin - ROM_LOAD16_BYTE( "s_3.b3", 0x080000, 0x20000, CRC(cb99f565) SHA1(9ed1b21f4a33b9a614bca38610378857560cdaba) ) - ROM_LOAD16_BYTE( "s_12.a4", 0x0c0001, 0x20000, CRC(63417b49) SHA1(786249fa7e8770de5b5882debdc2913d58e9170e) ) - ROM_LOAD16_BYTE( "s_4.b4", 0x0c0000, 0x20000, CRC(d739d48a) SHA1(04d2ecea72b6e651b815865946c9c9cfae4e5c4d) ) - ROM_LOAD16_BYTE( "s_13.a5", 0x100001, 0x20000, CRC(eccd47b6) SHA1(6b9c63fee97a7568114f227a89a1effd6b04806a) ) // these 4 == ma289p17.bin - ROM_LOAD16_BYTE( "s_5.b5", 0x100000, 0x20000, CRC(e15244da) SHA1(ebf3072565c53d0098d373b5093ba6918c4eddae) ) - ROM_LOAD16_BYTE( "s_14.a6", 0x140001, 0x20000, CRC(bbbf0461) SHA1(c5299ab1d45f685a5d160492247cf1303ef6937a) ) - ROM_LOAD16_BYTE( "s_6.b6", 0x140000, 0x20000, CRC(4ee89f75) SHA1(bda0e9095da2d424faac341fd934000a621796eb) ) - ROM_LOAD16_BYTE( "s_15.a7", 0x180001, 0x20000, CRC(cde29bad) SHA1(24c1b43c6d717eaaf7c01ec7de89837947334224) ) // these 4 == ma389m15.bin - ROM_LOAD16_BYTE( "s_7.b7", 0x180000, 0x20000, CRC(065ed221) SHA1(c03ca5b4d1198939a57b5fccf6a79d70afe1faaf) ) - ROM_LOAD16_BYTE( "s_16.a8", 0x1c0001, 0x20000, CRC(70f28040) SHA1(91012728953563fcc576725337e6ba7e1b49d1ba) ) - ROM_LOAD16_BYTE( "s_8.b8", 0x1c0000, 0x20000, CRC(a6f8574f) SHA1(87c041669b2eaec495ae10a6f45b6668accb92bf) ) - - ROM_REGION( 0x80000, "gfx3", 0 ) // these 4 == mab189a2.bin - Located on the A8002-5 sub board - ROM_LOAD( "s_21.b3", 0x000000, 0x20000, CRC(701a0072) SHA1(b03b6fa18e0cfcd5c7c541025fa2d3632d2f8387) ) - ROM_LOAD( "s_22.b4", 0x020000, 0x20000, CRC(34e6225c) SHA1(f6335084f4f4c7a4b6528e6ad74962b88f81e3bc) ) - ROM_LOAD( "s_23.b5", 0x040000, 0x20000, CRC(9a7399d3) SHA1(04e0327b0da75f621b51e1831cbdc4537082e32b) ) - ROM_LOAD( "s_24.b6", 0x060000, 0x20000, CRC(f097459d) SHA1(466364677f048519eb2894ddecf76f5c52f6afe9) ) - - ROM_REGION( 0x80000, "gfx4", 0 ) // these 4 == mab289c2.bin - Located on the A8002-5 sub board - ROM_LOAD( "s_17.a3", 0x000000, 0x20000, CRC(cc47c4a3) SHA1(140f53b671b4eaed6fcc516c4018f07a6d7c2290) ) - ROM_LOAD( "s_18.a4", 0x020000, 0x20000, CRC(a04377e8) SHA1(841c6c3073b137f6a5c875db32039186c014f785) ) - ROM_LOAD( "s_19.a5", 0x040000, 0x20000, CRC(b07f5289) SHA1(8817bd225edf9b0fa439b220617f925365e39253) ) - ROM_LOAD( "s_20.a6", 0x060000, 0x20000, CRC(a9bb4fa9) SHA1(ccede784671a864667b92a8101d686c26c78d76f) ) - - ROM_REGION( 0x20000, "ymsnd", 0 ) // Located on the A8002-1 main board - ROM_LOAD( "ma_2.d10", 0x000000, 0x20000, CRC(ea4cc30d) SHA1(d8f089fc0ce76309411706a8110ad907f93dc97e) ) - - ROM_REGION( 0x20000, "scale_table", 0 ) // Zoom table - Located on the A8002-2 board - ROM_LOAD( "ma_8.f10", 0x000000, 0x10000, CRC(61f3de03) SHA1(736f9634fe054ea68a2aa90a743bd0dc320f23c9) ) - ROM_LOAD( "ma_9.f12", 0x000000, 0x10000, CRC(61f3de03) SHA1(736f9634fe054ea68a2aa90a743bd0dc320f23c9) ) // identical to ma_8.f10 -ROM_END - +} // anonymous namespace /******************************************************************************/ @@ -1122,8 +798,3 @@ GAME( 1989, bbustersua, bbusters, bbusters, bbusters, bbusters_state, empty_init, ROT0, "SNK", "Beast Busters (US, Version 2)", MACHINE_SUPPORTS_SAVE ) GAME( 1989, bbustersj, bbusters, bbusters, bbusters, bbusters_state, empty_init, ROT0, "SNK", "Beast Busters (Japan, Version 2, 3 Player)", MACHINE_SUPPORTS_SAVE ) GAME( 1989, bbustersja, bbusters, bbusters, bbusters, bbusters_state, empty_init, ROT0, "SNK", "Beast Busters (Japan, Version 2, 2 Player)", MACHINE_SUPPORTS_SAVE ) - -GAME( 1989, mechatt, 0, mechatt, mechatt, mechatt_state, empty_init, ROT0, "SNK", "Mechanized Attack (World)", MACHINE_SUPPORTS_SAVE ) -GAME( 1989, mechattj, mechatt, mechatt, mechattj, mechatt_state, empty_init, ROT0, "SNK", "Mechanized Attack (Japan)", MACHINE_SUPPORTS_SAVE ) -GAME( 1989, mechattu, mechatt, mechatt, mechattu, mechatt_state, empty_init, ROT0, "SNK", "Mechanized Attack (US)", MACHINE_SUPPORTS_SAVE ) -GAME( 1989, mechattu1, mechatt, mechatt, mechattu, mechatt_state, empty_init, ROT0, "SNK", "Mechanized Attack (US, Version 1, Single Player)", MACHINE_SUPPORTS_SAVE ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/bebox.cpp mame-0.231+dfsg.1/src/mame/drivers/bebox.cpp --- mame-0.230+dfsg.1/src/mame/drivers/bebox.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/bebox.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -15,7 +15,7 @@ /* Components */ #include "video/clgd542x.h" #include "bus/lpci/cirrus.h" -#include "sound/3812intf.h" +#include "sound/ym3812.h" #include "machine/mc146818.h" #include "machine/pckeybrd.h" #include "bus/lpci/mpc105.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/bigkarnk_ms.cpp mame-0.231+dfsg.1/src/mame/drivers/bigkarnk_ms.cpp --- mame-0.230+dfsg.1/src/mame/drivers/bigkarnk_ms.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/bigkarnk_ms.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -289,7 +289,7 @@ #include "speaker.h" #include "tilemap.h" #include "sound/msm5205.h" -#include "sound/3812intf.h" +#include "sound/ym3812.h" #include "machine/gen_latch.h" #include "machine/bankdev.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/brkthru.cpp mame-0.231+dfsg.1/src/mame/drivers/brkthru.cpp --- mame-0.230+dfsg.1/src/mame/drivers/brkthru.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/brkthru.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -145,8 +145,8 @@ #include "includes/brkthru.h" #include "cpu/m6809/m6809.h" -#include "sound/3526intf.h" #include "sound/ym2203.h" +#include "sound/ym3526.h" #include "screen.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/bublbobl.cpp mame-0.231+dfsg.1/src/mame/drivers/bublbobl.cpp --- mame-0.230+dfsg.1/src/mame/drivers/bublbobl.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/bublbobl.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -273,8 +273,8 @@ #include "cpu/m6800/m6801.h" #include "cpu/z80/z80.h" #include "machine/watchdog.h" -#include "sound/3526intf.h" #include "sound/ym2203.h" +#include "sound/ym3526.h" #include "screen.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/calomega.cpp mame-0.231+dfsg.1/src/mame/drivers/calomega.cpp --- mame-0.230+dfsg.1/src/mame/drivers/calomega.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/calomega.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -1,21 +1,22 @@ // license:BSD-3-Clause -// copyright-holders:Roberto Fresca +// copyright-holders: Roberto Fresca /********************************************************************************** - .----------------------------------------. - | | - | CAL OMEGA - SYSTEMS 903/904/905/906III | - | | - | Driver by Roberto Fresca. | - | | - '----------------------------------------' + .-----------------------------------------------. + | | + | CAL OMEGA / CEI / UCMC | + | SYSTEMS 903 / 904 / 905 / 906-III | + | | + | Driver by Roberto Fresca. | + | | + '-----------------------------------------------' --- Technical Notes --- - Name: System 903, System 904, System 905 & System 906 III. - Company: Cal Omega / Omega Products / Casino Electronics Inc. - Year: 1981-1989 + Name: System 903, System 904, System 905 & System 906-III. + Company: Cal Omega / Casino Electronics Inc. (CEI) / United Coin Machine Co. (UCMC). + Year: 1981-1991 *********************************************************************************** @@ -75,7 +76,7 @@ - System 906 III: + System 906-III: --------------- PCB silkscreened "CEI 906 III GAMEBOARD" "ASSY 4029063 REV" @@ -130,137 +131,137 @@ *********************************************************************************** - ++++ System 903/904/906III official list of games (not complete) ++++ + ++++ System 903/904/906-III official list of games (not complete) ++++ - -----+--------------------------+--------+---------+----------+---------+----------+---------+---------------+------+------+------- - VER | NAME | SYSTEM | PROGRAM | CHAR GEN | CG P/N | CLR PROM | CP P/N | GAME TYPE | DUMP | STAT | ADDED - -----+--------------------------+--------+---------+----------+---------+----------+---------+---------------+------+------+------- - * 7.4 | Gaming Poker (w. export) | 903 | AUG/81 | PKCG | 6300010 | unknown | 6600020 | Gaming | Yes | OK | Yes - 7.6 | Poker | 903 | AUG/81 | PKCG | 6300010 | POKCLR | 6600020 | Amusement | Yes | OK | Yes - * 7.9 | Arcade Poker | 903 | AUG/81 | PKCG | 6300010 | POKCLR | 6600020 | Amusement | Yes | BD | Yes - * 8.0 | Arcade Black Jack | 903 | SEP/81 | CPKCG | 6300010 | POKCLR | 6600020 | Amusement | Yes | BD | Yes - * 9.4 | Keno | 903 | DEC/81 | KCG | 6300060 | POKCLR | 6600020 | Amusement | Yes | OK | Yes - * 10.7 | Big Game | 903 | MAR/82 | LOTCG | unknown | BCLR | unknown | Amusement? | Yes | OK | Yes - * 11.3 | Black Jack | 903 | | CPKCG? | 6300010 | POKCLR | 6600020 | Amusement? | No | | No - * 12.3 | Ticket Poker | 903 | JUN/82 | PKCG | 6300010 | POKCLR | 6600020 | Amusement | Yes | BD | Yes - * 12.5 | Bingo | 903 | JUN/82 | NBCG | unknown | BCLR | unknown | Amusement | Yes | OK | Yes - * 12.7 | Keno | 903/4? | JUL/82 | KCG | 6300060 | POKCLR | 6600020 | Amusement | Yes | OK | Yes - * 12.8 | Arcade Game (Draw Poker) | 903 | JUL/82 | PKCG | 6300010 | POKCLR | 6600020 | Amusement | Yes | OK | Yes - 13.4 | Nudge Bingo | 903 | SEP/82 | NBCG | 6300040 | BCLR | 6600040 | Amusement | Yes | OK | Yes - 14.5 | Pixels | 903 | DEC/82 | PIXCG | 6300070 | PIXCLR | 6600050 | Amusement | Yes | OK | Yes - 14.7 | Nudge Bingo | 903 | | NBCG | 6300040 | BCLR | 6600040 | Amusement | No | | No - 15.0 | Punchboard | 903 | | PBCG | 6300190 | PBCLR | 6600130 | Gaming Wash | No | | No - 15.7 | Double-Draw Poker | 903 | JAN/83 | CPKCG | 6300010 | POKCLR | 6600020 | Amusement | Yes | OK | Yes - 15.8 | Poker Montana | ? | | CPKCG | 6300010 | POKCLR | 6600020 | Gaming | No | | No - 15.9 | Wild Double-Up | 905 | JAN/83 | JKR2CG | 6300100 | WLDCLR | 6600010 | Amusement | Yes | OK | Yes - 16.2 | Gaming Lottery | ? | | LCG | 6300050 | LOTCLR | 6600030 | Gaming | No | | No - 16.3 | Black Jack | ? | | CPKCG | 6300010 | POKCLR | 6600020 | Amusement | No | | No - 16.4 | K.I.S.S. Keno | 904 | MAY/83 | KCG | 6300060 | PCLR | 6600020 | Amusement | Yes | IC | Yes - 16.5 | K.I.S.S. Poker | ? | | POKER | 6300010 | POKCLR | 6600020 | Amusement | No | | No - 16.6 | Nudge Bingo | ? | | NBCG | 6300040 | BCOLOR | 6600040 | Amusement | No | | No - 16.7 | Poker | ? | | PCG | 6300010 | POKCLR | 6600020 | Amusement | No | | No - 16.8 | Keno | 903 | MAR/83 | KCG | 6300060 | POKCLR | 6600020 | Amusement | Yes | OK | Yes - 17.0 | Poker | 905 | | POKERCGs | 6300010 | PKRCLR | 6600020 | Amusement | No | | No - 17.1 | Nudge Bingo | ? | | NBCG | 6300040 | BCOLOR | 6600040 | Amusement | No | | No - 17.2 | Double/Double Poker | 905 | MAY/83 | JKRPKR | 6300100 | WLDCLR | 6600010 | Amusement | Yes | OK | Yes - 17.3 | Casino Poker | ? | | PKCG | 6300010 | POKCLR | 6600020 | Nevada Gaming | No | | No - 17.4 | Gin Gaming | ? | | GCG0.2 | 6300080 | GINCLR | 6600060 | Nevada Gaming | No | | No - 17.5 | Gaming Draw Poker | 903 | DEC/84 | PKCG | 6300010 | POKCLR | 6600020 | Nevada Gaming | Yes | OK | Yes - 17.6 | Nudge | 903 | SEP/82 | NBCG | 6300040 | BCLR | 6600040 | Amusement | Yes | OK | Yes - 17.7 | Keno | ? | | KCG | 6300060 | POKCLR | 6600020 | Gaming | No | | No - 17.9 | AWP Poker | ? | | PKCG | 6300010 | POKCLR | 6600020 | Gaming | No | | No - * 18.0 | Gin | 905 | | GCG2 | 6300110 | MLTCLR | 6600070 | Amusement | No | | No - 18.1 | Nudge | ? | JUL/83 | NBCG | 6300040 | BCLR | 6600040 | Amusement | Yes | OK | Yes - 18.2 | Amusement Poker | 905 | | JKRCG02 | 6300100 | WLDCLR | 6600010 | Amusement | No | | No - 18.3 | Pixels | 905 | AUG/83 | PXCG | 6300070 | PIXCLR | 6600050 | Amusement | Yes | OK | Yes - 18.4 | Double Draw-Lebanon | ? | | PKCG | 6300010 | POKCLR | 6600020 | Amusement | No | | No - 18.5 | Pixels | 905 | AUG/83 | PXCG | 6300070 | PIXCLR | 6600050 | Amusement | Yes | OK | Yes - 18.6 | Pixels | 905 | AUG/83 | PXCG | 6300070 | PIXCLR | 6600050 | Amusement | Yes | OK | Yes - 18.7 | Amusement Poker (skill) | 905 | AUG/83 | JKRTWO | 6300100 | MLTCLR | 6600070 | Amusement | Yes | BD | Yes - 18.8 | Poker-Lebanon | ? | | PKCG | 6300010 | POKCLR | 6600020 | Amusement | No | | No - 18.9 | Pixels (french) | ? | | PIXCG | 6300070 | PIXCLR | 6600050 | Amusement | No | | No - 19.0 | Hi-Score Poker | ? | | JKRTWO | 6300100 | WLDCLR | 6600070 | Amusement | No | | No - * 19.1 | Super Blackjack | 905 | AUG/83 | JKRTWO? | 6300100 | MLTCLR | 6600070 | Amusement | No | | No - 19.2 | AWP Poker | ? | | PKCG | 6300010 | POKCLR | 6600020 | Gaming | No | | No - 19.3 | Gin | 905 | | GCG2 | 6300110 | MLTCLR | 6600070 | Amusement | No | | No - 19.4 | Pixels (french) | ? | | PIXCG | 6300070 | PIXCLR | 6600050 | Amusement | No | | No - 19.7 | Ind. Wild Double-Up | ? | | JKRCG | 6300100 | WLDCLR | 6600070 | Amusement | No | | No - 19.9 | Double-Up Nudge | ? | | NUDGE | 6300040 | BCOLOR | 6600040 | Amusement | No | | No - 20.1 | Poker | ? | | GPKCG | 6300010 | POKCLR | 6600020 | Amusement | No | | No - 20.4 | Super Blackjack | 905 | FEB/84 | JKRTWO | 6300100 | MLTCLR | 6600070 | Amusement | Yes | OK | Yes - * 20.5 | Blackjack? | 905 | FEB/84 | JKRTWO? | 6300100 | MLTCLR | 6600070 | Amusement | No | | No - 20.7 | Double-Up Nudge | ? | | NUDGECG | 6300040 | BCOLOR | 6600040 | Amusement | No | | No - 20.8 | Winner's Choice | ? | FEB/84 | MLT2CG | 6300130 | MLTCLR | 6600070 | Amusement | Yes | OK | Yes - 20.9 | Gaming Poker-Europe | ? | | PKCG | 6300010 | POKCLR | 6600020 | Gaming | No | | No - 21.1 | AWP Poker | ? | | POKCG | 6300010 | POKCLR | 6600020 | Gaming | No | | No - 21.2 | Video Slot | ? | | SL1CG | 6300180 | SLC1 | 6600120 | Gaming | No | | No - 21.4 | Wild Double-Up Poker | ? | | WLDCG | 6300100 | WLDCLR | 6600010 | Amusement | No | | No - 21.5 | Double/Double Poker | ? | | JKRTWO | 6300100 | WLDCLR | 6600010 | Amusement | No | | No - * 21.6 | Wild Double-Up? | 905 | JUN/84 | WLDCG | 6300100 | WLDCLR | 6600010 | Amusement | No | | No - * 21.7 | Poker? | 905 | MAY/84 | GPKCG? | 6300010 | POKCLR | 6600020 | Amusement | No | | No - 21.9 | Amusement Poker | ? | | JKRCG | 6300100 | WLDCLR | 6600010 | Amusement | No | | No - 22.1 | Poker | ? | | PKCG | 6300010 | POKCLR | 6600020 | Nevada Gaming | No | | No - 22.7 | Amusement Poker (dbl/dbl)| 905 | JUL/84 | JKRPKR | 6300100 | WLDCLR | 6600010 | Amusement | Yes | OK | Yes - 22.8 | Tennesee Wild Poker | 905 | | JKR2CG | 6300100 | MLTCLR | 6600070 | Amusement | No | | No - 22.9 | Double/Double Poker | 905 | | JKRTWO | 6300100 | MLTCLR | 6600010 | Amusement | No | | No - 23.0 | FC Bingo (4-card) | 905 | JUN/84 | FCBCG | 6300150 | FCBCLR | 6600100 | Amusement | Yes | BD | Yes - 23.2 | Pixels | ? | | PIXCG | 6300070 | PIXCLR | 6600050 | Amusement | No | | No - * 23.6 | Hotline | 905 | OCT/84 | HLCG | 6300160 | HLCLR | 6600110 | Amusement | Yes | OK | Yes - 23.7 | AWP Blackjack | ? | | POKER | 6300010 | POKCLR | 6600020 | Gaming | No | | No - 23.9 | G.Draw Poker (discard) | 904 | JAN/85 | POKCG | 6300010 | POKCLR | 6600020 | Nevada Gaming | Yes | OK | Yes - 24.0 | Gaming Draw Poker (hold) | 904 | MAY/85 | POKCG | 6300010 | POKCLR | 6600020 | Nevada Gaming | Yes | OK | Yes - 24.2 | Export Poker | ? | | GPKCG | 6300010 | POKCLR | 6600020 | Gaming | No | | No - 24.3 | Gaming Blackjack | ? | | GPKCG | 6300010 | POKCLR | 6600020 | Nevada Gaming | No | | No - 24.5 | Wild Double-Up | ? | | JKPKCG | 6300100 | WLDCLR | 6600010 | Amusement | No | | No - 24.6 | Hotline | 905 | JAN/85 | HLCG | 6300160 | HLCLR | 6600110 | Amusement | Yes | OK | Yes - 24.8 | Poker (discard) | ? | | PKCG | 6300010 | POKCLR | 6600020 | Nevada Gaming | No | | No - 24.9 | Poker (hold) | ? | | PKCG | 6300010 | POKCLR | 6600020 | Nevada Gaming | No | | No - 25.3 | 4-Card Bingo-Gaming | ? | | FCB1CG | 6300150 | FCB1CLR | 6600100 | Gaming | No | | No - 25.4 | Indian 4-Card Bingo | ? | | FCBCG | 6300150 | FCB1CLR | 6600100 | Amer-Indian | No | | No - 25.5 | Wild Double-Up Poker | ? | | JKRCG | 6300100 | WILD | 6600010 | Amusement | No | | No - 25.6 | Mr. Domino | ? | | DOMCG | 6300140 | DOMCLR | 6600080 | Amusement | No | | No - 25.7 | Mr. Domino | ? | | DOMCG | 6300140 | DOMCLR | 6600080 | Amusement | No | | No - 25.8 | Poker | ? | | PKCG | 6300010 | POKCLR | 6600020 | Gaming | No | | No - 26.3 | Wild Double-Up Poker | ? | | JKRCG | 6300100 | WILD | 6600010 | Amusement | No | | No - 26.5 | 4-Reel Slot | ? | | SLOT4CG | 6300220 | SL4CLR | 6600140 | Gaming | No | | No - 26.6 | Poker | ? | | GPKCG | 6300250 | POKCLR | 6600020 | Nevada Gaming | No | | No - 26.8 | Wild Double-Up Poker | ? | | JKRCG | 6300260 | WILD | 6600010 | Nevada Gaming | No | | No - 27.1 | Tourney Gaming Poker | ? | | POKCG | 6300010 | POKCLR | 6600020 | Nevada Gaming | No | | No - 27.2 | Arcade Keno | ? | AUG/85 | KJCG | 6300060 | POKCLR | 6600020 | Montana | Yes | OK | Yes - * 27.2 | Arcade Keno | ? | AUG/85 | KJCG | 6300060 | POKCLR | 6600020 | Gaming | Yes | OK | Yes - 27.3 | Export Poker | ? | | PKCG | 6300010 | POKCLR | 6600020 | Gaming | No | | No - 27.4 | Keno II | ? | | KJCG | 6300060 | POKCLR | 6600020 | Montana | No | | No - 27.5 | Keno (Austria) | ? | | KENOCG | 6300060 | POKCLR | 6600020 | Gaming | No | | No - 27.6 | Slot 8 | ? | | SL8CG | 6300290 | SLOT4CLR | 6600140 | Gaming | No | | No - 27.9 | 3-Reel Slot, Gaming | ? | | SL2CG | 6300280 | SL2CLR | 6600120 | Nevada Gaming | No | | No - 28.0 | 3-Reel Slot | ? | | SL2CG | 6300180 | SL2CLR | 6600120 | Gaming | No | | No - 28.2 | Hotline | ? | | HLCG | 6300160 | HLCLR | 6600110 | Amusement | No | | No - 28.5 | Hotline | ? | | HLCG | 6300130 | HLCLR | 6600110 | Amusement | No | | No - 29.0x| Stand or Draw Poker | ? | | ST2CG | 6300270 | ST2CLR | 6600150 | Nevada Gaming | No | | No - 30.0x| Casino 21 | ? | | GPKCG | 6300250 | WILD | 6600010 | Nevada Gaming | No | | No - 31.0x| Poker (discard) | ? | | POKCG | 6300010 | POKCLR | 6600020 | Nevada Gaming | No | | No - 32.0x| Poker (hold) | ? | | POKCG | 6300010 | POKCLR | 6600020 | Nevada Gaming | No | | No - 33.0x| Keno | ? | | KJCG | 6300060 | POKCLR | 6600020 | Nevada Gaming | No | | No - 34.0x| Keno (Austria) | ? | | KJCG | 6300060 | POKCLR | 6600020 | Gaming | No | | No - 35.0x| 1-3 Sign Poker (discard) | ? | | POKCG | 6300010 | POKCLR | 6600020 | Nevada Gaming | No | | No - 36.0x| 1-3 Sign Poker (hold) | ? | | POKCG | 6300010 | POKCLR | 6600020 | Nevada Gaming | No | | No - 37.0x| Amusement Keno | ? | | KJCG | 6300060 | POKCLR | 6600020 | Montana | No | | No - 39.0x| 3-Reel Slot | ? | | SBARCG | 6300305 | JKRSLOT | 6600170 | Nevada Gaming | No | | No - 39.0x| 3-Reel Slot | ? | | PLAIN7CG | 6300309 | JKRSLOT | 6600170 | Nevada Gaming | No | | No - 39.0x| 3-Reel Slot | ? | | JWCG | 6300313 | JKRSLOT | 6600170 | Nevada Gaming | No | | No - 40.0x| Poker w/Wild Card | 903 | | JKRCG | 6300260 | WLDCLR | 6600010 | Nevada Gaming | No | | No - 41.0x| Do-it-yourself Bingo | ? | | KCG | 6300060 | PKRCLR | 6600020 | Amer-Indian | No | | No - 42.0x| Mr. Domino | ? | | NDMCG | 6300300 | DOMCLR | 6600080 | Amusement | No | | No - 43.0x| Export Poker | ? | | GPKCG | 6300170 | POKCLR | 6600020 | Gaming | No | | No - 44.0x| Tourney Poker (discard) | ? | | POKCG | 6300010 | POKCLR | 6600020 | Nevada Gaming | No | | No - 45.0x| Tourney Poker (hold) | ? | | POKCG | 6300010 | POKCLR | 6600020 | Nevada Gaming | No | | No - 46.0x| Gaming Poker | ? | | GPKCG | 6300010 | POKCLR | 6600020 | Nevada Gaming | No | | No - 47.0x| 4-Card Indian Bingo | ? | | FCB7CG | 6300150 | FCB7CLR | 6600100 | Amer-Indian | No | | No - 48.0x| Keno | ? | | KJCG | 6300060 | POKCLR | 6600020 | Montana | No | | No - 51.08| Poker (906-III) | 906 | | GP2CG | unknown | WILD | unknown | Nevada Gaming | Yes | OK | Yes - | | | | | | | | | | | - * 903d | System 903 Diag.PROM | 903 | unknown | any | unknown | any | unknown | Testing H/W | Yes | OK | Yes - * 905d | System 905 Diag.PROM | 905 | unknown | any | unknown | any | unknown | Testing H/W | Yes | OK | Yes + -----+--------------------------+---------+---------+----------+---------+----------+---------+---------------+------+------+------- + VER | NAME | SYSTEM | PROGRAM | CHAR GEN | CG P/N | CLR PROM | CP P/N | GAME TYPE | DUMP | STAT | ADDED + -----+--------------------------+---------+---------+----------+---------+----------+---------+---------------+------+------+------- + * 7.4 | Gaming Poker (w. export) | 903 | AUG/81 | PKCG | 6300010 | unknown | 6600020 | Gaming | Yes | OK | Yes + 7.6 | Poker | 903 | AUG/81 | PKCG | 6300010 | POKCLR | 6600020 | Amusement | Yes | OK | Yes + * 7.9 | Arcade Poker | 903 | AUG/81 | PKCG | 6300010 | POKCLR | 6600020 | Amusement | Yes | BD | Yes + * 8.0 | Arcade Black Jack | 903 | SEP/81 | CPKCG | 6300010 | POKCLR | 6600020 | Amusement | Yes | BD | Yes + * 9.4 | Keno | 903 | DEC/81 | KCG | 6300060 | POKCLR | 6600020 | Amusement | Yes | OK | Yes + * 10.7 | Big Game | 903 | MAR/82 | LOTCG | unknown | BCLR | unknown | Amusement? | Yes | OK | Yes + * 11.3 | Black Jack | 903 | | CPKCG? | 6300010 | POKCLR | 6600020 | Amusement? | No | | No + * 12.3 | Ticket Poker | 903 | JUN/82 | PKCG | 6300010 | POKCLR | 6600020 | Amusement | Yes | BD | Yes + * 12.5 | Bingo | 903 | JUN/82 | NBCG | unknown | BCLR | unknown | Amusement | Yes | OK | Yes + * 12.7 | Keno | 903/4? | JUL/82 | KCG | 6300060 | POKCLR | 6600020 | Amusement | Yes | OK | Yes + * 12.8 | Arcade Game (Draw Poker) | 903 | JUL/82 | PKCG | 6300010 | POKCLR | 6600020 | Amusement | Yes | OK | Yes + 13.4 | Nudge Bingo | 903 | SEP/82 | NBCG | 6300040 | BCLR | 6600040 | Amusement | Yes | OK | Yes + 14.5 | Pixels | 903 | DEC/82 | PIXCG | 6300070 | PIXCLR | 6600050 | Amusement | Yes | OK | Yes + 14.7 | Nudge Bingo | 903 | | NBCG | 6300040 | BCLR | 6600040 | Amusement | No | | No + 15.0 | Punchboard | 903 | | PBCG | 6300190 | PBCLR | 6600130 | Gaming Wash | No | | No + 15.7 | Double-Draw Poker | 903 | JAN/83 | CPKCG | 6300010 | POKCLR | 6600020 | Amusement | Yes | OK | Yes + 15.8 | Poker Montana | ? | | CPKCG | 6300010 | POKCLR | 6600020 | Gaming | No | | No + 15.9 | Wild Double-Up | 905 | JAN/83 | JKR2CG | 6300100 | WLDCLR | 6600010 | Amusement | Yes | OK | Yes + 16.2 | Gaming Lottery | ? | | LCG | 6300050 | LOTCLR | 6600030 | Gaming | No | | No + 16.3 | Black Jack | ? | | CPKCG | 6300010 | POKCLR | 6600020 | Amusement | No | | No + 16.4 | K.I.S.S. Keno | 904 | MAY/83 | KCG | 6300060 | PCLR | 6600020 | Amusement | Yes | IC | Yes + 16.5 | K.I.S.S. Poker | ? | | POKER | 6300010 | POKCLR | 6600020 | Amusement | No | | No + 16.6 | Nudge Bingo | ? | | NBCG | 6300040 | BCOLOR | 6600040 | Amusement | No | | No + 16.7 | Poker | ? | | PCG | 6300010 | POKCLR | 6600020 | Amusement | No | | No + 16.8 | Keno | 903 | MAR/83 | KCG | 6300060 | POKCLR | 6600020 | Amusement | Yes | OK | Yes + 17.0 | Poker | 905 | | POKERCGs | 6300010 | PKRCLR | 6600020 | Amusement | No | | No + 17.1 | Nudge Bingo | ? | | NBCG | 6300040 | BCOLOR | 6600040 | Amusement | No | | No + 17.2 | Double/Double Poker | 905 | MAY/83 | JKRPKR | 6300100 | WLDCLR | 6600010 | Amusement | Yes | OK | Yes + 17.3 | Casino Poker | ? | | PKCG | 6300010 | POKCLR | 6600020 | Nevada Gaming | No | | No + 17.4 | Gin Gaming | ? | | GCG0.2 | 6300080 | GINCLR | 6600060 | Nevada Gaming | No | | No + 17.5 | Gaming Draw Poker | 903 | DEC/84 | PKCG | 6300010 | POKCLR | 6600020 | Nevada Gaming | Yes | OK | Yes + 17.6 | Nudge | 903 | SEP/82 | NBCG | 6300040 | BCLR | 6600040 | Amusement | Yes | OK | Yes + 17.7 | Keno | ? | | KCG | 6300060 | POKCLR | 6600020 | Gaming | No | | No + 17.9 | AWP Poker | ? | | PKCG | 6300010 | POKCLR | 6600020 | Gaming | No | | No + * 18.0 | Gin | 905 | | GCG2 | 6300110 | MLTCLR | 6600070 | Amusement | No | | No + 18.1 | Nudge | ? | JUL/83 | NBCG | 6300040 | BCLR | 6600040 | Amusement | Yes | OK | Yes + 18.2 | Amusement Poker | 905 | | JKRCG02 | 6300100 | WLDCLR | 6600010 | Amusement | No | | No + 18.3 | Pixels | 905 | AUG/83 | PXCG | 6300070 | PIXCLR | 6600050 | Amusement | Yes | OK | Yes + 18.4 | Double Draw-Lebanon | ? | | PKCG | 6300010 | POKCLR | 6600020 | Amusement | No | | No + 18.5 | Pixels | 905 | AUG/83 | PXCG | 6300070 | PIXCLR | 6600050 | Amusement | Yes | OK | Yes + 18.6 | Pixels | 905 | AUG/83 | PXCG | 6300070 | PIXCLR | 6600050 | Amusement | Yes | OK | Yes + 18.7 | Amusement Poker (skill) | 905 | AUG/83 | JKRTWO | 6300100 | MLTCLR | 6600070 | Amusement | Yes | BD | Yes + 18.8 | Poker-Lebanon | ? | | PKCG | 6300010 | POKCLR | 6600020 | Amusement | No | | No + 18.9 | Pixels (french) | ? | | PIXCG | 6300070 | PIXCLR | 6600050 | Amusement | No | | No + 19.0 | Hi-Score Poker | ? | | JKRTWO | 6300100 | WLDCLR | 6600070 | Amusement | No | | No + * 19.1 | Super Blackjack | 905 | AUG/83 | JKRTWO? | 6300100 | MLTCLR | 6600070 | Amusement | No | | No + 19.2 | AWP Poker | ? | | PKCG | 6300010 | POKCLR | 6600020 | Gaming | No | | No + 19.3 | Gin | 905 | | GCG2 | 6300110 | MLTCLR | 6600070 | Amusement | No | | No + 19.4 | Pixels (french) | ? | | PIXCG | 6300070 | PIXCLR | 6600050 | Amusement | No | | No + 19.7 | Ind. Wild Double-Up | ? | | JKRCG | 6300100 | WLDCLR | 6600070 | Amusement | No | | No + 19.9 | Double-Up Nudge | ? | | NUDGE | 6300040 | BCOLOR | 6600040 | Amusement | No | | No + 20.1 | Poker | ? | | GPKCG | 6300010 | POKCLR | 6600020 | Amusement | No | | No + 20.4 | Super Blackjack | 905 | FEB/84 | JKRTWO | 6300100 | MLTCLR | 6600070 | Amusement | Yes | OK | Yes + * 20.5 | Blackjack? | 905 | FEB/84 | JKRTWO? | 6300100 | MLTCLR | 6600070 | Amusement | No | | No + 20.7 | Double-Up Nudge | ? | | NUDGECG | 6300040 | BCOLOR | 6600040 | Amusement | No | | No + 20.8 | Winner's Choice | ? | FEB/84 | MLT2CG | 6300130 | MLTCLR | 6600070 | Amusement | Yes | OK | Yes + 20.9 | Gaming Poker-Europe | ? | | PKCG | 6300010 | POKCLR | 6600020 | Gaming | No | | No + 21.1 | AWP Poker | ? | | POKCG | 6300010 | POKCLR | 6600020 | Gaming | No | | No + 21.2 | Video Slot | ? | | SL1CG | 6300180 | SLC1 | 6600120 | Gaming | No | | No + 21.4 | Wild Double-Up Poker | ? | | WLDCG | 6300100 | WLDCLR | 6600010 | Amusement | No | | No + 21.5 | Double/Double Poker | ? | | JKRTWO | 6300100 | WLDCLR | 6600010 | Amusement | No | | No + * 21.6 | Wild Double-Up? | 905 | JUN/84 | WLDCG | 6300100 | WLDCLR | 6600010 | Amusement | No | | No + * 21.7 | Poker? | 905 | MAY/84 | GPKCG? | 6300010 | POKCLR | 6600020 | Amusement | No | | No + 21.9 | Amusement Poker | ? | | JKRCG | 6300100 | WLDCLR | 6600010 | Amusement | No | | No + 22.1 | Poker | ? | | PKCG | 6300010 | POKCLR | 6600020 | Nevada Gaming | No | | No + 22.7 | Amusement Poker (dbl/dbl)| 905 | JUL/84 | JKRPKR | 6300100 | WLDCLR | 6600010 | Amusement | Yes | OK | Yes + 22.8 | Tennesee Wild Poker | 905 | | JKR2CG | 6300100 | MLTCLR | 6600070 | Amusement | No | | No + 22.9 | Double/Double Poker | 905 | | JKRTWO | 6300100 | MLTCLR | 6600010 | Amusement | No | | No + 23.0 | FC Bingo (4-card) | 905 | JUN/84 | FCBCG | 6300150 | FCBCLR | 6600100 | Amusement | Yes | BD | Yes + 23.2 | Pixels | ? | | PIXCG | 6300070 | PIXCLR | 6600050 | Amusement | No | | No + * 23.6 | Hotline | 905 | OCT/84 | HLCG | 6300160 | HLCLR | 6600110 | Amusement | Yes | OK | Yes + 23.7 | AWP Blackjack | ? | | POKER | 6300010 | POKCLR | 6600020 | Gaming | No | | No + 23.9 | G.Draw Poker (discard) | 904 | JAN/85 | POKCG | 6300010 | POKCLR | 6600020 | Nevada Gaming | Yes | OK | Yes + 24.0 | Gaming Draw Poker (hold) | 904 | MAY/85 | POKCG | 6300010 | POKCLR | 6600020 | Nevada Gaming | Yes | OK | Yes + 24.2 | Export Poker | ? | | GPKCG | 6300010 | POKCLR | 6600020 | Gaming | No | | No + 24.3 | Gaming Blackjack | ? | | GPKCG | 6300010 | POKCLR | 6600020 | Nevada Gaming | No | | No + 24.5 | Wild Double-Up | ? | | JKPKCG | 6300100 | WLDCLR | 6600010 | Amusement | No | | No + 24.6 | Hotline | 905 | JAN/85 | HLCG | 6300160 | HLCLR | 6600110 | Amusement | Yes | OK | Yes + 24.8 | Poker (discard) | ? | | PKCG | 6300010 | POKCLR | 6600020 | Nevada Gaming | No | | No + 24.9 | Poker (hold) | ? | | PKCG | 6300010 | POKCLR | 6600020 | Nevada Gaming | No | | No + 25.3 | 4-Card Bingo-Gaming | ? | | FCB1CG | 6300150 | FCB1CLR | 6600100 | Gaming | No | | No + 25.4 | Indian 4-Card Bingo | ? | | FCBCG | 6300150 | FCB1CLR | 6600100 | Amer-Indian | No | | No + 25.5 | Wild Double-Up Poker | ? | | JKRCG | 6300100 | WILD | 6600010 | Amusement | No | | No + 25.6 | Mr. Domino | ? | | DOMCG | 6300140 | DOMCLR | 6600080 | Amusement | No | | No + 25.7 | Mr. Domino | ? | | DOMCG | 6300140 | DOMCLR | 6600080 | Amusement | No | | No + 25.8 | Poker | ? | | PKCG | 6300010 | POKCLR | 6600020 | Gaming | No | | No + 26.3 | Wild Double-Up Poker | ? | | JKRCG | 6300100 | WILD | 6600010 | Amusement | No | | No + 26.5 | 4-Reel Slot | ? | | SLOT4CG | 6300220 | SL4CLR | 6600140 | Gaming | No | | No + 26.6 | Poker | ? | | GPKCG | 6300250 | POKCLR | 6600020 | Nevada Gaming | No | | No + 26.8 | Wild Double-Up Poker | ? | | JKRCG | 6300260 | WILD | 6600010 | Nevada Gaming | No | | No + 27.1 | Tourney Gaming Poker | ? | | POKCG | 6300010 | POKCLR | 6600020 | Nevada Gaming | No | | No + 27.2 | Arcade Keno | ? | AUG/85 | KJCG | 6300060 | POKCLR | 6600020 | Montana | Yes | OK | Yes + * 27.2 | Arcade Keno | ? | AUG/85 | KJCG | 6300060 | POKCLR | 6600020 | Gaming | Yes | OK | Yes + 27.3 | Export Poker | ? | | PKCG | 6300010 | POKCLR | 6600020 | Gaming | No | | No + 27.4 | Keno II | ? | | KJCG | 6300060 | POKCLR | 6600020 | Montana | No | | No + 27.5 | Keno (Austria) | ? | | KENOCG | 6300060 | POKCLR | 6600020 | Gaming | No | | No + 27.6 | Slot 8 | ? | | SL8CG | 6300290 | SLOT4CLR | 6600140 | Gaming | No | | No + 27.9 | 3-Reel Slot, Gaming | ? | | SL2CG | 6300280 | SL2CLR | 6600120 | Nevada Gaming | No | | No + 28.0 | 3-Reel Slot | ? | | SL2CG | 6300180 | SL2CLR | 6600120 | Gaming | No | | No + 28.2 | Hotline | ? | | HLCG | 6300160 | HLCLR | 6600110 | Amusement | No | | No + 28.5 | Hotline | ? | | HLCG | 6300130 | HLCLR | 6600110 | Amusement | No | | No + 29.0x| Stand or Draw Poker | ? | | ST2CG | 6300270 | ST2CLR | 6600150 | Nevada Gaming | No | | No + 30.0x| Casino 21 | ? | | GPKCG | 6300250 | WILD | 6600010 | Nevada Gaming | No | | No + 31.0x| Poker (discard) | ? | | POKCG | 6300010 | POKCLR | 6600020 | Nevada Gaming | No | | No + 32.0x| Poker (hold) | ? | | POKCG | 6300010 | POKCLR | 6600020 | Nevada Gaming | No | | No + 33.0x| Keno | ? | | KJCG | 6300060 | POKCLR | 6600020 | Nevada Gaming | No | | No + 34.0x| Keno (Austria) | ? | | KJCG | 6300060 | POKCLR | 6600020 | Gaming | No | | No + 35.0x| 1-3 Sign Poker (discard) | ? | | POKCG | 6300010 | POKCLR | 6600020 | Nevada Gaming | No | | No + 36.0x| 1-3 Sign Poker (hold) | ? | | POKCG | 6300010 | POKCLR | 6600020 | Nevada Gaming | No | | No + 37.0x| Amusement Keno | ? | | KJCG | 6300060 | POKCLR | 6600020 | Montana | No | | No + 39.0x| 3-Reel Slot | ? | | SBARCG | 6300305 | JKRSLOT | 6600170 | Nevada Gaming | No | | No + 39.0x| 3-Reel Slot | ? | | PLAIN7CG | 6300309 | JKRSLOT | 6600170 | Nevada Gaming | No | | No + 39.0x| 3-Reel Slot | ? | | JWCG | 6300313 | JKRSLOT | 6600170 | Nevada Gaming | No | | No + 40.0x| Poker w/Wild Card | 903 | | JKRCG | 6300260 | WLDCLR | 6600010 | Nevada Gaming | No | | No + 41.0x| Do-it-yourself Bingo | ? | | KCG | 6300060 | PKRCLR | 6600020 | Amer-Indian | No | | No + 42.0x| Mr. Domino | ? | | NDMCG | 6300300 | DOMCLR | 6600080 | Amusement | No | | No + 43.0x| Export Poker | ? | | GPKCG | 6300170 | POKCLR | 6600020 | Gaming | No | | No + 44.0x| Tourney Poker (discard) | ? | | POKCG | 6300010 | POKCLR | 6600020 | Nevada Gaming | No | | No + 45.0x| Tourney Poker (hold) | ? | | POKCG | 6300010 | POKCLR | 6600020 | Nevada Gaming | No | | No + 46.0x| Gaming Poker | ? | | GPKCG | 6300010 | POKCLR | 6600020 | Nevada Gaming | No | | No + 47.0x| 4-Card Indian Bingo | ? | | FCB7CG | 6300150 | FCB7CLR | 6600100 | Amer-Indian | No | | No + 48.0x| Keno | ? | | KJCG | 6300060 | POKCLR | 6600020 | Montana | No | | No + 51.08| Poker (906-III) | 906-III | | GP2CG | unknown | WILD | unknown | Nevada Gaming | Yes | OK | Yes + | | | | | | | | | | | + * 903d | System 903 Diag.PROM | 903 | unknown | any | unknown | any | unknown | Testing H/W | Yes | OK | Yes + * 905d | System 905 Diag.PROM | 905 | unknown | any | unknown | any | unknown | Testing H/W | Yes | OK | Yes (*) Not in the original list. @@ -269,15 +270,18 @@ ++++ Unofficial games ++++ - -------------------------------+----------------------+------+-----------+-----------+------+------+------- - NAME | COMPANY | YEAR | GAME TYPE | SYSTEM | DUMP | STAT | ADDED - -------------------------------+----------------------+------+-----------+-----------+------+------+------- - El Grande - 5 Card Draw (New) | Tuni Electro Service | 1982 | Amusement | 903 based | Yes | BR | Yes - Jackpot Joker Poker (set 1) | Enter-Tech (ETL) | 1983 | Amusement | 903 based | Yes | OK | Yes - Jackpot Joker Poker (set 2) | Enter-Tech (ETL) | 1983 | Amusement | 903 based | Yes | OK | Yes - SSI Poker (v2.4) | SSI | 1988 | Amusement | 903 based | Yes | IC | Yes - SSI Poker (v3.0) | SSI | 1988 | Amusement | 903 based | Yes | IC | Yes - SSI Poker (v4.0) | SSI | 1990 | Amusement | 903 based | Yes | IC | Yes + -------------------------------------+----------------------+------+-----------+-----------+------+------+------- + NAME | COMPANY | YEAR | GAME TYPE | SYSTEM | DUMP | STAT | ADDED + -------------------------------------+----------------------+------+-----------+-----------+------+------+------- + El Grande - 5 Card Draw (New) | Tuni Electro Service | 1982 | Amusement | 903 based | Yes | BR | Yes + Jackpot Joker Poker (set 1) | Enter-Tech (ETL) | 1983 | Amusement | 903 based | Yes | OK | Yes + Jackpot Joker Poker (set 2) | Enter-Tech (ETL) | 1983 | Amusement | 903 based | Yes | OK | Yes + SSI Poker (v2.4) | SSI | 1988 | Amusement | 903 based | Yes | IC | Yes + SSI Poker (v3.0) | SSI | 1988 | Amusement | 903 based | Yes | IC | Yes + SSI Poker (v4.0) | SSI | 1990 | Amusement | 903 based | Yes | IC | Yes + Casino 21 UCMC/IWC (ver 30.08) | UCMC/IWC | 1990 | Gambling | 906-III | Yes | OK | Yes + Poker UCMC/IWC (ver 162.03) | UCMC/IWC | 1991 | Gambling | 906-III | Yes | OK | Yes + Poker UCMC/IWC (ver 162.03 20-6-91) | UCMC/IWC | 1991 | Gambling | 906-III | Yes | OK | Yes STAT: OK = Good dump. @@ -338,7 +342,7 @@ This game was created by Tuni Electro Service and was licensed to E.T. Marketing,Inc. This is the new version. The old one is still undumped, but looks like Golden Poker D-Up. - Flyer: http://www.arcadeflyers.com/?page=thumbs&db=videodb&id=4542 + Flyer: https://flyers.arcade-museum.com/?page=flyer&db=videodb&id=4542&image=1 The AY8912 is mapped to 0x840/0x841 but the game lacks of credits and bet sounds. The rest of sounds are ok. Maybe the missing ones are generated by discrete circuitry. @@ -394,20 +398,22 @@ The whole map is mirrored to $8000-$FFFF. - --- System 906 III --- + --- System 906-III --- - $0000 - $07FF NVRAM ; All registers and settings. - $2C08 - $2C08 AY-8912 ; Read/Control. - $2C09 - $2C09 AY-8912 ; Write. - $280C - $280F PIAT0 ; I/O unknown. - $2824 - $2827 PIAT1 ; I/O unknown. + $0000 - $1FFF NVRAM ; All registers and settings. + $280C - $280F PIAT0 ; I/O functions. + $2810 - $2810 ACIA6850 ; ACIA read. + $2811 - $2811 ACIA6850 ; ACIA write. + $2824 - $2827 PIAT1 ; I/O functions. $2C04 - $2C04 CRTC6845 ; MC6845 addressing. - $2C05 - $2C05 CRTC6845 ; MC6845 Read/Write. + $2C05 - $2C05 CRTC6845 ; MC6845 read/write. + $2C08 - $2C08 AY-8912 ; Read/control. + $2C09 - $2C09 AY-8912 ; Write. $2000 - $23FF VideoRAM $2400 - $27FF ColorRAM - $6000 - $FFFF ROM space. ; System 906. + $6000 - $FFFF ROM space. ; System 906-III. No mirrors... Using the whole CPU addressing. @@ -437,6 +443,44 @@ -------------- + [2021-04-24] + + General improvements... + - The PIAs set for each MACHINE_CONFIG were made independent. + - All the PIAs lines were adapted according to the needs of each platform. + - All the interrupts were set/placed as indicated in the schematics (903/905). + - A global hopper was added, currently assigned to platform 906-III, + but it can be used by other platforms. + - Worked proper inputs for system 903: Cal Omega - Game 15.7 (Double-Draw Poker). + The game was promoted to WORKING. + - Worked proper inputs for system 905: Cal Omega - Game 15.9 (Wild Double-Up). + The game was promoted to WORKING. + - Worked proper inputs for system 905: Cal Omega - Game 17.2 (Double Double Poker). + The game was promoted to WORKING. + + + [2021-04-21] + + 906-III improvements... + - Proper inputs for the IWC poker games. + - Fixed/Improved the interrupts system. + - Preliminary button-lamps support. + - Simplified and partially cleaned the code. + - Added technical notes. + + + [2021-04-20] + + - Reworked a lot of things to get the 906-III platform playable. + - Switched to Rockwell R65C02 CPU. + - Added missing 906-III inputs, timers, clocks and connections. + - Renamed Game 51.08 to CEI 51.08 (CEI 906-III Poker). + The game is promoted to WORKING. + - Added Casino 21 UCMC/IWC (ver 30.08). The game is working. + - Added Poker UCMC/IWC (ver 162.03). The game is working. + - Added Poker UCMC/IWC (ver 162.03 20-6-91). The game is working. + + [2010-08-20] - Added Game 24.0 (Gaming Draw Poker, hold). The game is playable. @@ -451,14 +495,14 @@ - Updated games list and technical notes. - Promoted comg080 (Arcade Black Jack) to working state. - - Added support for system 906III: + - Added support for system 906-III: - Accurate memory map, CRTC, and PIAs mapped. - Preliminary PIAs support (no multiplexion yet). - Added proper machine driver, with correct R65C02 CPU. - Documented the hardware specs. - Added Game 51.08 (CEI Video Poker, Jacks or Better), - running in CEI 906III hardware. The game is not working. - - Corrected docs about the 906III memory map. + running in CEI 906-III hardware. The game is not working. + - Corrected docs about the 906-III memory map. - Mapped the AY8912. - Added AY8912 proper interfase. Tied SW2 to AY8912 port. - PIA0, portA is polled constantly. Tied some debug handlers @@ -632,7 +676,10 @@ - Improve 903/905 inputs. - Interrupts for System 903/904 UART. - Complete the PIAs connection. - - 906III: PIAs & AY8912 ports, inputs, etc... + - 906-III: Proper PIATs 65C24 devices. + - 906-III: GFX banks, proper banks selector. + - 906-III: EX and Turbo+ platforms support. + - Hopper support. - Parent/clone relationship. - Fix lamps. @@ -642,20 +689,10 @@ #include "emu.h" #include "includes/calomega.h" -#include "cpu/m6502/m6502.h" -#include "cpu/m6502/m65c02.h" -#include "machine/nvram.h" -#include "sound/ay8910.h" -#include "video/mc6845.h" - -#include "screen.h" -#include "speaker.h" - - -#define MASTER_CLOCK XTAL(10'000'000) -#define CPU_CLOCK (MASTER_CLOCK/16) -#define UART_CLOCK (MASTER_CLOCK/16) -#define SND_CLOCK (MASTER_CLOCK/8) +#define MASTER_CLOCK XTAL(10'000'000) +#define CPU_CLOCK (MASTER_CLOCK/16) +#define UART_CLOCK (MASTER_CLOCK/16) +#define SND_CLOCK (MASTER_CLOCK/8) /************************************************** @@ -671,7 +708,7 @@ uint8_t calomega_state::s903_mux_port_r() { - switch( m_s903_mux_data & 0xf0 ) /* bits 4-7 */ + switch( m_s903_mux_data & 0xf0 ) // bits 4-7 { case 0x10: return m_in0_0->read(); case 0x20: return m_in0_1->read(); @@ -679,19 +716,23 @@ case 0x80: return m_in0_3->read(); } - return m_frq->read(); /* bit7 used for 50/60 Hz selector */ + return 0xff; } void calomega_state::s903_mux_w(uint8_t data) { - m_s903_mux_data = data ^ 0xff; /* inverted */ -} + // bit 7 - bit 6 -bit 5 -bit 4 -> Mux. Scan Lines + m_s903_mux_data = data ^ 0xf0; // inverted + // bit 0 - bit 1 -> Hopper + m_hopper->motor_w(BIT(~data, 0) && BIT(~data, 1)); + // bit2 - bit3 -> No connected +} uint8_t calomega_state::s905_mux_port_r() { - switch( m_s905_mux_data & 0x0f ) /* bits 0-3 */ + switch( m_s905_mux_data & 0x0f ) // bits 0-3 { case 0x01: return m_in0_0->read(); case 0x02: return m_in0_1->read(); @@ -699,70 +740,189 @@ case 0x08: return m_in0_3->read(); } - return m_frq->read(); /* bit6 used for 50/60 Hz selector */ + return 0xff; } void calomega_state::s905_mux_w(uint8_t data) { - m_s905_mux_data = data ^ 0xff; /* inverted */ +// Lower nibble + m_s905_mux_data = data ^ 0x0f; // inverted + +/* Upper nibble + PIA_1_PB_4 - N.C. + PIA_1_PB_5 - Hopper1. + PIA_1_PB_6 - Hopper2. + PIA_1_PB_7 - Lockout. +*/ + m_hopper->motor_w(BIT(~data, 5) && BIT(~data, 6)); + m_lockout = BIT(data, 7); } -/********* 906III PIAs debug *********/ - -uint8_t calomega_state::pia0_ain_r() -{ - /* Valid input port. Each polled value is stored at $0538 */ - logerror("PIA0: Port A in\n"); - return m_in0->read(); -} +/********* 906-III PIAs debug *********/ uint8_t calomega_state::pia0_bin_r() { - logerror("PIA0: Port B in\n"); + //logerror("PIA0: Port B in\n"); return 0xff; } void calomega_state::pia0_aout_w(uint8_t data) { - logerror("PIA0: Port A out: %02X\n", data); + //logerror("PIA0: Port A out: %02X\n", data); } void calomega_state::pia0_bout_w(uint8_t data) { - logerror("PIA0: Port B out: %02X\n", data); -} - -WRITE_LINE_MEMBER(calomega_state::pia0_ca2_w) -{ - /* Seems a kind of "heartbit" watchdog, switching 1's and 0's */ - logerror("PIA0: CA2: %02X\n", state); + // Meters???...M1-M5 + m_diverter = BIT(data, 3); + m_lockout = BIT(data, 5); + m_hopper->motor_w(BIT(~data, 6) && BIT(~data, 7)); + // if(m_hopper) popmessage("HOPPER : %x", data); } - - uint8_t calomega_state::pia1_ain_r() { - logerror("PIA1: Port A in\n"); + //popmessage("hopper out: %x", m_in0_1->read() & 0x80); + switch( m_s905_mux_data & 0x03 ) // bits 0-3 + { + case 0x00: return m_in0_0->read(); + case 0x01: return m_in0_1->read(); + case 0x02: return m_in0_2->read(); + case 0x03: return m_in0_3->read(); + } + return 0xff; } uint8_t calomega_state::pia1_bin_r() { - logerror("PIA1: Port B in\n"); + // logerror("PIA1: Port B in\n"); return 0xff; } void calomega_state::pia1_aout_w(uint8_t data) { - logerror("PIA1: Port A out: %02X\n", data); + m_s905_mux_data = data >> 6; + // logerror("PIA1: Port A out (906-III mux): %02X\n", m_s905_mux_data); } void calomega_state::pia1_bout_w(uint8_t data) { - logerror("PIA1: Port B out: %02X\n", data); +/* System 906-III Lamps... + + 7654 3210 + ---- ---x Hold 1 lamp. + ---- --x- Hold 2 lamp. + ---- -x-- Hold 3 lamp. + ---- x--- Hold 4 lamp. + ---x ---- Hold 5 lamp. + --x- ---- (unknown) + -x-- ---- (unknown) + x--- ---- (unknown) + +*/ + m_lamps[0] = BIT(~data, 0); // L1 (Hold 1) + m_lamps[1] = BIT(~data, 1); // L2 (Hold 2) + m_lamps[2] = BIT(~data, 2); // L3 (Hold 3) + m_lamps[3] = BIT(~data, 3); // L4 (Hold 4) + m_lamps[4] = BIT(~data, 4); // L5 (Hold 5) + m_lamps[5] = BIT(~data, 5); // L6 (unknown) + m_lamps[6] = BIT(~data, 6); // L7 (unknown) + m_lamps[7] = BIT(~data, 7); // L8 (unknown) + + // logerror("PIA1: Port B out: %02X\n", data); } +TIMER_DEVICE_CALLBACK_MEMBER( calomega_state::timer_0 ) +{ + m_timer = !m_timer; + m_pia[0]->ca1_w(m_timer); + m_pia[0]->read(1); //CRA + // logerror("Timer_0 event : state=%d\n", m_timer); +} + +TIMER_DEVICE_CALLBACK_MEMBER( calomega_state::timer_1 ) +{ + m_timer = !m_timer; + m_pia[1]->cb1_w(m_timer); + // logerror("Timer_1 event (TIMER) : state=%d\n", m_timer); +} + +TIMER_DEVICE_CALLBACK_MEMBER( calomega_state::timer_2 ) +{ + m_timer =! m_timer; + m_pia[1]->ca1_w(m_timer); + m_pia[1]->read(1); // CRA + // logerror("Timer_2 event : state=%d\n", m_timer); +} + +READ_LINE_MEMBER(calomega_state::timer_r) +{ + // logerror("timer_1 read : state=%d\n", m_timer); + return m_timer; +} + +WRITE_LINE_MEMBER(calomega_state::vblank0_w) +{ + m_vblank = state; + m_pia[0]->read(0); + m_pia[0]->read(0); + m_pia[1]->cb1_w(state); + // m_pia[1]->read(3); // CRB + // logerror("V_BLANK_0 event : state=%d\n", m_vblank); +} + +WRITE_LINE_MEMBER(calomega_state::vblank1_w) +{ + m_vblank = state; + m_pia[0]->read(2); + m_pia[0]->cb1_w(state); + // logerror("V_BLANK_1 event (sale ): state=%d\n", m_vblank); +} + +WRITE_LINE_MEMBER(calomega_state::vblank2_w) +{ + m_vblank = state; + m_pia[1]->read(0); + m_pia[1]->read(0); + m_pia[1]->cb1_w(state); + // logerror("V_BLANK_2 event : state=%d\n", m_vblank); +} + +READ_LINE_MEMBER(calomega_state::vblank_r) +{ + // logerror("V_BLANK read : state=%d\n", m_vblank); + return m_vblank; +} + +WRITE_LINE_MEMBER(calomega_state::pia1_cb2_w) +{ + // Output to L9 + m_lamps[8] = ~state; // L9 (Door?) + // logerror("PIA1: CB2: %02X\n", state); +} + +// Dummy callbacks +uint8_t calomega_state::dummy_pia_r() +{ + return 0xff; +} + +void calomega_state::dummy_pia_w(uint8_t data) +{ + m_pia_data = data; +} + +READ_LINE_MEMBER(calomega_state::dummy_pia_line_r) +{ + return false; +} +WRITE_LINE_MEMBER(calomega_state::dummy_pia_line_w) +{ +} + + /******** Lamps debug ******** @@ -786,34 +946,34 @@ */ void calomega_state::lamps_903a_w(uint8_t data) { - /* First 5 bits of PIA0 port B */ - m_lamps[0] = BIT(~data, 0); /* L1 (Hold 1) */ - m_lamps[1] = BIT(~data, 1); /* L2 (Hold 2) */ - m_lamps[2] = BIT(~data, 2); /* L3 (Hold 3) */ - m_lamps[3] = BIT(~data, 3); /* L4 (Hold 4) */ - m_lamps[4] = BIT(~data, 4); /* L5 (Hold 5) */ + // First 5 bits of PIA0 port B + m_lamps[0] = BIT(~data, 0); // L1 (Hold 1) + m_lamps[1] = BIT(~data, 1); // L2 (Hold 2) + m_lamps[2] = BIT(~data, 2); // L3 (Hold 3) + m_lamps[3] = BIT(~data, 3); // L4 (Hold 4) + m_lamps[4] = BIT(~data, 4); // L5 (Hold 5) } void calomega_state::lamps_903b_w(uint8_t data) { - /* First 4 bits of PIA1 port A */ - m_lamps[5] = BIT(~data, 0); /* L6 (Cancel) */ - m_lamps[6] = BIT(~data, 1); /* L7 (Bet) */ - m_lamps[7] = BIT(~data, 2); /* L8 (Take) */ - m_lamps[8] = BIT(~data, 3); /* L9 (Door?) */ + // First 4 bits of PIA1 port A + m_lamps[5] = BIT(~data, 0); // L6 (Cancel) + m_lamps[6] = BIT(~data, 1); // L7 (Bet) + m_lamps[7] = BIT(~data, 2); // L8 (Take) + m_lamps[8] = BIT(~data, 3); // L9 (Door?) } void calomega_state::lamps_905_w(uint8_t data) { - /* Whole 8 bits of PIA0 port B */ - m_lamps[0] = BIT(~data, 0); /* L1 (Hold 1) */ - m_lamps[1] = BIT(~data, 1); /* L2 (Hold 2) */ - m_lamps[2] = BIT(~data, 2); /* L3 (Hold 3) */ - m_lamps[3] = BIT(~data, 3); /* L4 (Hold 4) */ - m_lamps[4] = BIT(~data, 4); /* L5 (Hold 5) */ - m_lamps[5] = BIT(~data, 5); /* L6 (unknown) */ - m_lamps[6] = BIT(~data, 6); /* L7 (unknown) */ - m_lamps[7] = BIT(~data, 7); /* L8 (unknown) */ + // Whole 8 bits of PIA0 port B + m_lamps[0] = BIT(~data, 0); // L1 (Hold 1) + m_lamps[1] = BIT(~data, 1); // L2 (Hold 2) + m_lamps[2] = BIT(~data, 2); // L3 (Hold 3) + m_lamps[3] = BIT(~data, 3); // L4 (Hold 4) + m_lamps[4] = BIT(~data, 4); // L5 (Hold 5) + m_lamps[5] = BIT(~data, 5); // L6 (unknown) + m_lamps[6] = BIT(~data, 6); // L7 (unknown) + m_lamps[7] = BIT(~data, 7); // L8 (unknown) } @@ -866,8 +1026,9 @@ void calomega_state::sys906_map(address_map &map) { - map(0x0000, 0x07ff).ram().share("nvram"); + map(0x0000, 0x1fff).ram().share("nvram"); map(0x280c, 0x280f).rw("pia0", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); + map(0x2810, 0x2811).rw(m_acia6850_0, FUNC(acia6850_device::read), FUNC(acia6850_device::write)); map(0x2824, 0x2827).rw("pia1", FUNC(pia6821_device::read), FUNC(pia6821_device::write)); map(0x2c04, 0x2c04).w("crtc", FUNC(mc6845_device::address_w)); map(0x2c05, 0x2c05).rw("crtc", FUNC(mc6845_device::register_r), FUNC(mc6845_device::register_w)); @@ -890,7 +1051,7 @@ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("0-4") PORT_CODE(KEYCODE_4) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("0-5") PORT_CODE(KEYCODE_5) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("0-6") PORT_CODE(KEYCODE_6) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) /* connected to SW2-5 */ + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // connected to SW2-5 PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("IN0-1") @@ -900,7 +1061,7 @@ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("1-4") PORT_CODE(KEYCODE_R) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("1-5") PORT_CODE(KEYCODE_T) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("1-6") PORT_CODE(KEYCODE_Y) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) /* connected to SW2-5 */ + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // connected to SW2-5 PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("IN0-2") @@ -910,7 +1071,7 @@ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("2-4") PORT_CODE(KEYCODE_F) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("2-5") PORT_CODE(KEYCODE_G) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("2-6") PORT_CODE(KEYCODE_H) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) /* connected to SW2-5 */ + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // connected to SW2-5 PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("IN0-3") @@ -920,18 +1081,18 @@ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("3-4") PORT_CODE(KEYCODE_V) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("3-5") PORT_CODE(KEYCODE_B) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("3-6") PORT_CODE(KEYCODE_N) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) /* connected to SW2-5 */ + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // connected to SW2-5 PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) /* SW1-5 should be wired to PIA0 portA, bit 6. SW1-6 should be wired to H-POL. SW1-7 should be wired to V-POL. */ - PORT_START("SW1") /* settings (PIA1), SW2 in schematics */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* L6 */ - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* L7 */ - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* L8 */ - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* L9 */ + PORT_START("SW1") // settings (PIA1), SW2 in schematics + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) // L6 + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // L7 + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) // L8 + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) // L9 PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:1") PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -945,7 +1106,7 @@ PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("SW2") /* baud (serial 6850-4024), SW1 in schematics */ + PORT_START("SW2") // baud (serial 6850-4024), SW1 in schematics... PORT_DIPNAME( 0x3f, 0x08, "Baud Rate" ) PORT_DIPLOCATION("SW1:1,2,3,4,5,6") PORT_DIPSETTING( 0x01, "300" ) PORT_DIPSETTING( 0x02, "600" ) @@ -960,7 +1121,7 @@ PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("SW3") /* unknown (ay8912), SW3 in schematics */ + PORT_START("SW3") // unknown (ay8912), SW3 in schematics PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:1") PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -986,7 +1147,7 @@ PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("FRQ") /* settings (PIA0) */ + PORT_START("FRQ") // settings (PIA0) PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -1022,7 +1183,7 @@ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("0-4") PORT_CODE(KEYCODE_4) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("0-5") PORT_CODE(KEYCODE_5) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("0-6") PORT_CODE(KEYCODE_6) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) /* connected to SW2-5 */ + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // connected to SW2-5 PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("IN0-1") @@ -1032,7 +1193,7 @@ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("1-4") PORT_CODE(KEYCODE_R) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("1-5") PORT_CODE(KEYCODE_T) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("1-6") PORT_CODE(KEYCODE_Y) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) /* connected to SW2-5 */ + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // connected to SW2-5 PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("IN0-2") @@ -1042,7 +1203,7 @@ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("2-4") PORT_CODE(KEYCODE_F) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("2-5") PORT_CODE(KEYCODE_G) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("2-6") PORT_CODE(KEYCODE_H) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) /* connected to SW2-5 */ + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // connected to SW2-5 PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("IN0-3") @@ -1052,18 +1213,18 @@ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("3-4") PORT_CODE(KEYCODE_V) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("3-5") PORT_CODE(KEYCODE_B) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("3-6") PORT_CODE(KEYCODE_N) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) /* connected to SW2-5 */ + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // connected to SW2-5 PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) /* SW1-5 should be wired to PIA0 portA, bit 6. SW1-6 should be wired to H-POL. SW1-7 should be wired to V-POL. */ - PORT_START("SW1") /* settings (PIA1), SW2 in schematics */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* L6 */ - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* L7 */ - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* L8 */ - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* L9 */ + PORT_START("SW1") // settings (PIA1), SW2 in schematics + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) // L6 + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // L7 + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) // L8 + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) // L9 PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:1") PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -1077,7 +1238,7 @@ PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("SW2") /* baud (serial 6850-4024), SW1 in schematics */ + PORT_START("SW2") // baud (serial 6850-4024), SW1 in schematics PORT_DIPNAME( 0x3f, 0x08, "Baud Rate" ) PORT_DIPLOCATION("SW1:1,2,3,4,5,6") PORT_DIPSETTING( 0x01, "300" ) PORT_DIPSETTING( 0x02, "600" ) @@ -1092,7 +1253,7 @@ PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("FRQ") /* settings (PIA0) */ + PORT_START("FRQ") // settings (PIA0) PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -1161,9 +1322,9 @@ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) - /* For System 905, SW1 uses the whole PIA1 portA */ + // For System 905, SW1 uses the whole PIA1 portA. - PORT_START("SW1") /* settings (PIA1) */ + PORT_START("SW1") // settings (PIA1) PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:1") PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -1189,7 +1350,7 @@ PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("FRQ") /* settings (PIA0) */ + PORT_START("FRQ") // settings (PIA0) PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -1218,23 +1379,24 @@ static INPUT_PORTS_START( gdrwpkrd ) PORT_START("IN0-0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) /* credits */ - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Collect") PORT_CODE(KEYCODE_Q) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) // credits + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Collect") PORT_CODE(KEYCODE_Q) 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_NAME("Cancel Discards") PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_STAND ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) /* connected to SW2-5 */ + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // connected to SW2-5. PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("IN0-1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) + //PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", ticket_dispenser_device, line_r) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_DOOR ) PORT_NAME("Door Open") - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Test Mode") /* in some games you need to open the door first */ + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_DOOR ) PORT_NAME("Door Open") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Test Mode") // in some games you need to open the door first PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Hand Pay") PORT_CODE(KEYCODE_W) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Dispute") PORT_CODE(KEYCODE_0) /* in some games you need to open the door first */ - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) /* connected to SW2-5 */ + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Dispute") PORT_CODE(KEYCODE_0) // in some games you need to open the door first + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // connected to SW2-5 PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("IN0-2") @@ -1244,7 +1406,7 @@ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) PORT_NAME("Discard 4") PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) PORT_NAME("Discard 5") PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Small") - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) /* connected to SW2-5 */ + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // connected to SW2-5 PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("IN0-3") @@ -1254,18 +1416,18 @@ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Big") PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("WT.Switch") PORT_CODE(KEYCODE_8) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) /* connected to SW2-5 */ + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // connected to SW2-5 PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) /* SW1-5 should be wired to PIA0 portA, bit 6. SW1-6 should be wired to H-POL. SW1-7 should be wired to V-POL. */ - PORT_START("SW1") /* settings (PIA1), SW2 in schematics */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* L6 */ - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* L7 */ - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* L8 */ - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* L9 */ + PORT_START("SW1") // settings (PIA1), SW2 in schematics + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) // L6 + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // L7 + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) // L8 + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) // L9 PORT_DIPNAME( 0x30, 0x20, "Maximum Credits") PORT_DIPLOCATION("SW2:1,2") PORT_DIPSETTING( 0x00, "100" ) PORT_DIPSETTING( 0x10, "400" ) @@ -1277,7 +1439,7 @@ PORT_DIPSETTING( 0x80, "40" ) PORT_DIPSETTING( 0xC0, "80" ) - PORT_START("SW2") /* baud (serial 6850-4024), SW1 in schematics */ + PORT_START("SW2") // baud (serial 6850-4024), SW1 in schematics PORT_DIPNAME( 0x3f, 0x08, "Baud Rate" ) PORT_DIPLOCATION("SW1:1,2,3,4,5,6") PORT_DIPSETTING( 0x01, "300" ) PORT_DIPSETTING( 0x02, "600" ) @@ -1292,7 +1454,7 @@ PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("SW3") /* unknown (ay8912), SW3 in schematics */ + PORT_START("SW3") // unknown (ay8912), SW3 in schematics PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:1") PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -1318,7 +1480,7 @@ PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("FRQ") /* settings (PIA0) */ + PORT_START("FRQ") // settings (PIA0) PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -1347,23 +1509,23 @@ static INPUT_PORTS_START( gdrwpkrh ) PORT_START("IN0-0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) /* credits */ - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Collect") PORT_CODE(KEYCODE_Q) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Collect") PORT_CODE(KEYCODE_Q) 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_NAME("Cancel Holds") PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_STAND ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) /* connected to SW2-5 */ + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // connected to SW2-5 PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("IN0-1") PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_DOOR ) PORT_NAME("Door Open") - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Test Mode") /* in some games you need to open the door first */ - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Hand Pay") PORT_CODE(KEYCODE_W) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Dispute") PORT_CODE(KEYCODE_0) /* in some games you need to open the door first */ - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) /* connected to SW2-5 */ + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_DOOR ) PORT_NAME("Door Open") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Test Mode") // in some games you need to open the door first + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Hand Pay") PORT_CODE(KEYCODE_W) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Dispute") PORT_CODE(KEYCODE_0) // in some games you need to open the door first + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // connected to SW2-5 PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("IN0-2") @@ -1373,7 +1535,7 @@ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) PORT_NAME("Hold 4") PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) PORT_NAME("Hold 5") PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Small") - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) /* connected to SW2-5 */ + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // connected to SW2-5 PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("IN0-3") @@ -1383,18 +1545,18 @@ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Big") PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("WT.Switch") PORT_CODE(KEYCODE_8) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) /* connected to SW2-5 */ + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // connected to SW2-5 PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) /* SW1-5 should be wired to PIA0 portA, bit 6. SW1-6 should be wired to H-POL. SW1-7 should be wired to V-POL. */ - PORT_START("SW1") /* settings (PIA1), SW2 in schematics */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* L6 */ - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* L7 */ - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* L8 */ - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* L9 */ + PORT_START("SW1") // settings (PIA1), SW2 in schematics + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) // L6 + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // L7 + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) // L8 + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) // L9 PORT_DIPNAME( 0x30, 0x20, "Maximum Credits") PORT_DIPLOCATION("SW2:1,2") PORT_DIPSETTING( 0x00, "100" ) PORT_DIPSETTING( 0x10, "400" ) @@ -1406,7 +1568,7 @@ PORT_DIPSETTING( 0x80, "40" ) PORT_DIPSETTING( 0xC0, "80" ) - PORT_START("SW2") /* baud (serial 6850-4024), SW1 in schematics */ + PORT_START("SW2") // baud (serial 6850-4024), SW1 in schematics PORT_DIPNAME( 0x3f, 0x08, "Baud Rate" ) PORT_DIPLOCATION("SW1:1,2,3,4,5,6") PORT_DIPSETTING( 0x01, "300" ) PORT_DIPSETTING( 0x02, "600" ) @@ -1421,7 +1583,7 @@ PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("SW3") /* unknown (ay8912), SW3 in schematics */ + PORT_START("SW3") // unknown (ay8912), SW3 in schematics PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:1") PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -1447,7 +1609,7 @@ PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("FRQ") /* settings (PIA0) */ + PORT_START("FRQ") // settings (PIA0) PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -1476,23 +1638,23 @@ static INPUT_PORTS_START( arcadebj ) PORT_START("IN0-0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) /* credits */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) 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_UNUSED ) /* connected to SW2-5 */ + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // connected to SW2-5 PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("IN0-1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) /* credits */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) 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_SERVICE ) PORT_NAME("Door Open") PORT_CODE(KEYCODE_O) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) /* connected to SW2-5 */ + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // connected to SW2-5 PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("IN0-2") @@ -1502,7 +1664,7 @@ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Hit") PORT_CODE(KEYCODE_V) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("Stand") PORT_CODE(KEYCODE_B) PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) /* connected to SW2-5 */ + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // connected to SW2-5 PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("IN0-3") @@ -1512,18 +1674,18 @@ 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_UNUSED ) /* connected to SW2-5 */ + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // connected to SW2-5 PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) /* SW1-5 should be wired to PIA0 portA, bit 6. SW1-6 should be wired to H-POL. SW1-7 should be wired to V-POL. */ - PORT_START("SW1") /* settings (PIA1), SW2 in schematics */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* L6 */ - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* L7 */ - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* L8 */ - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* L9 */ + PORT_START("SW1") // settings (PIA1), SW2 in schematics + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) // L6 + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // L7 + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) // L8 + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) // L9 PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:1") PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -1536,7 +1698,7 @@ PORT_DIPSETTING( 0x80, "20" ) PORT_DIPSETTING( 0xC0, "50" ) - PORT_START("SW2") /* baud (serial 6850-4024), SW1 in schematics */ + PORT_START("SW2") // baud (serial 6850-4024), SW1 in schematics PORT_DIPNAME( 0x3f, 0x08, "Baud Rate" ) PORT_DIPLOCATION("SW1:1,2,3,4,5,6") PORT_DIPSETTING( 0x01, "300" ) PORT_DIPSETTING( 0x02, "600" ) @@ -1551,7 +1713,7 @@ PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("SW3") /* unknown (ay8912), SW3 in schematics */ + PORT_START("SW3") // unknown (ay8912), SW3 in schematics PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:1") PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -1577,7 +1739,7 @@ PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("FRQ") /* settings (PIA0) */ + PORT_START("FRQ") // settings (PIA0) PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -1606,22 +1768,22 @@ static INPUT_PORTS_START( comg074 ) PORT_START("IN0-0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) /* credits */ - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Collect") PORT_CODE(KEYCODE_Q) + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) // credits + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Collect") PORT_CODE(KEYCODE_Q) 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( 0x10, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) PORT_NAME("Cancel Discards") - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("IN0-0-6") + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("IN0-0-6") PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("IN0-1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Hand Pay") PORT_CODE(KEYCODE_W) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("IN0-1-2") - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_DOOR ) PORT_NAME("Door Open") - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Test Mode") /* in some games you need to open the door first */ - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("IN0-1-5") - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("IN0-1-6") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Hand Pay") PORT_CODE(KEYCODE_W) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("IN0-1-2") PORT_CODE(KEYCODE_2_PAD) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_DOOR ) PORT_NAME("Door Open") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Test Mode") // in some games you need to open the door first + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("IN0-1-5") + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("IN0-1-6") PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -1649,11 +1811,11 @@ SW1-6 should be wired to H-POL. SW1-7 should be wired to V-POL. */ - PORT_START("SW1") /* settings (PIA1), SW2 in schematics */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* L6 */ - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* L7 */ - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* L8 */ - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* L9 */ + PORT_START("SW1") // settings (PIA1), SW2 in schematics + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) // L6 + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // L7 + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) // L8 + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) // L9 PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:1") PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -1666,7 +1828,7 @@ PORT_DIPSETTING( 0x80, "40" ) PORT_DIPSETTING( 0xC0, "80" ) - PORT_START("SW2") /* baud (serial 6850-4024), SW1 in schematics */ + PORT_START("SW2") // baud (serial 6850-4024), SW1 in schematics PORT_DIPNAME( 0x3f, 0x08, "Baud Rate" ) PORT_DIPLOCATION("SW1:1,2,3,4,5,6") PORT_DIPSETTING( 0x01, "300" ) PORT_DIPSETTING( 0x02, "600" ) @@ -1681,7 +1843,7 @@ PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("SW3") /* unknown (ay8912), SW3 in schematics */ + PORT_START("SW3") // unknown (ay8912), SW3 in schematics PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:1") PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -1707,7 +1869,7 @@ PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("FRQ") /* settings (PIA0) */ + PORT_START("FRQ") // settings (PIA0) PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -1736,22 +1898,22 @@ static INPUT_PORTS_START( comg076 ) PORT_START("IN0-0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) /* credits */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) // credits PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) 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_NAME("Cancel Discards") PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("IN0-1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) /* credits */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) 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_SERVICE ) PORT_NAME("Test Mode") + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Test Mode") PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -1761,7 +1923,7 @@ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) PORT_NAME("Discard 3") PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) PORT_NAME("Discard 4") PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) PORT_NAME("Discard 5") - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Small") + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Small") PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -1779,11 +1941,11 @@ SW1-6 should be wired to H-POL. SW1-7 should be wired to V-POL. */ - PORT_START("SW1") /* settings (PIA1), SW2 in schematics */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* L6 */ - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* L7 */ - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* L8 */ - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* L9 */ + PORT_START("SW1") // settings (PIA1), SW2 in schematics + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) // L6 + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // L7 + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) // L8 + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) // L9 PORT_DIPNAME( 0x30, 0x00, "Minimum Winning Hand") PORT_DIPLOCATION("SW2:1,2") PORT_DIPSETTING( 0x00, "Jacks or Better" ) PORT_DIPSETTING( 0x20, "Queens or Better" ) @@ -1795,7 +1957,7 @@ PORT_DIPSETTING( 0xC0, "20" ) PORT_DIPSETTING( 0x40, "50" ) - PORT_START("SW2") /* baud (serial 6850-4024), SW1 in schematics */ + PORT_START("SW2") // baud (serial 6850-4024), SW1 in schematics PORT_DIPNAME( 0x3f, 0x08, "Baud Rate" ) PORT_DIPLOCATION("SW1:1,2,3,4,5,6") PORT_DIPSETTING( 0x01, "300" ) PORT_DIPSETTING( 0x02, "600" ) @@ -1810,7 +1972,7 @@ PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("SW3") /* unknown (ay8912), SW3 in schematics */ + PORT_START("SW3") // unknown (ay8912), SW3 in schematics PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:1") PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -1836,7 +1998,7 @@ PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("FRQ") /* settings (PIA0) */ + PORT_START("FRQ") // settings (PIA0) PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -1865,10 +2027,10 @@ static INPUT_PORTS_START( comg128 ) PORT_START("IN0-0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) /* credits */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) // credits PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) 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_NAME("Cancel Discards") PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -1880,7 +2042,7 @@ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_DOOR ) PORT_NAME("Door Open") PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Test Mode") + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Test Mode") PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -1899,7 +2061,7 @@ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) 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( 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_UNUSED ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -1908,11 +2070,11 @@ SW1-6 should be wired to H-POL. SW1-7 should be wired to V-POL. */ - PORT_START("SW1") /* settings (PIA1), SW2 in schematics */ - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* L6 */ - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* L7 */ - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* L8 */ - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* L9 */ + PORT_START("SW1") // settings (PIA1), SW2 in schematics + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) // L6 + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // L7 + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) // L8 + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) // L9 PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:1") PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -1925,7 +2087,7 @@ PORT_DIPSETTING( 0x80, "4" ) PORT_DIPSETTING( 0xC0, "5" ) - PORT_START("SW2") /* baud (serial 6850-4024), SW1 in schematics */ + PORT_START("SW2") // baud (serial 6850-4024), SW1 in schematics PORT_DIPNAME( 0x3f, 0x08, "Baud Rate" ) PORT_DIPLOCATION("SW1:1,2,3,4,5,6") PORT_DIPSETTING( 0x01, "300" ) PORT_DIPSETTING( 0x02, "600" ) @@ -1940,7 +2102,7 @@ PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("SW3") /* unknown (ay8912), SW3 in schematics */ + PORT_START("SW3") // unknown (ay8912), SW3 in schematics PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:1") PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -1966,7 +2128,7 @@ PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_START("FRQ") /* settings (PIA0) */ + PORT_START("FRQ") // settings (PIA0) PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -1993,19 +2155,259 @@ PORT_DIPSETTING( 0x00, "50Hz." ) INPUT_PORTS_END +static INPUT_PORTS_START( comg157 ) + PORT_START("IN0-0") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) PORT_NAME("Coin-In A") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) PORT_NAME("Double") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_NAME("Deal / Draw") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) PORT_NAME("Cancel") + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("IN0-1") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) PORT_NAME("Coin-In B") + 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_SERVICE ) PORT_CODE(KEYCODE_9) PORT_NAME("Data / Audit") + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Test Mode") + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("IN0-2") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("Discard 1") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) PORT_NAME("Discard 2") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) PORT_NAME("Discard 3") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) PORT_NAME("Discard 4") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) PORT_NAME("Discard 5") + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("IN0-3") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_T) PORT_NAME("Tilt") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_NAME("Play (Bet)") + 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( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + +/* SW1-5 should be wired to PIA0 portA, bit 6. + SW1-6 should be wired to H-POL. + SW1-7 should be wired to V-POL. +*/ + PORT_START("SW1") // settings (PIA1), SW2 in schematics + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) // L6 + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) // L7 + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) // L8 + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) // L9 + PORT_DIPNAME( 0x30, 0x00, "Minimum Winning Hand") PORT_DIPLOCATION("SW2:1,2") + PORT_DIPSETTING( 0x00, "Jacks or Better" ) + PORT_DIPSETTING( 0x20, "Queens or Better" ) + PORT_DIPSETTING( 0x30, "Kings or Better" ) + PORT_DIPSETTING( 0x10, "Pair of Aces" ) + PORT_DIPNAME( 0xC0, 0x80, "Maximum Bet") PORT_DIPLOCATION("SW2:3,4") + PORT_DIPSETTING( 0x00, "1" ) + PORT_DIPSETTING( 0x80, "10" ) + PORT_DIPSETTING( 0xC0, "20" ) + PORT_DIPSETTING( 0x40, "50" ) + + PORT_START("SW2") // baud (serial 6850-4024), SW1 in schematics + PORT_DIPNAME( 0x3f, 0x08, "Baud Rate" ) PORT_DIPLOCATION("SW1:1,2,3,4,5,6") + PORT_DIPSETTING( 0x01, "300" ) + PORT_DIPSETTING( 0x02, "600" ) + PORT_DIPSETTING( 0x04, "1200" ) + PORT_DIPSETTING( 0x08, "2400" ) + PORT_DIPSETTING( 0x10, "4800" ) + PORT_DIPSETTING( 0x20, "9600" ) + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:7") + PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:8") + PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + + PORT_START("SW3") // unknown (ay8912), SW3 in schematics + PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:1") + PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:2") + PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:3") + PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:4") + PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:5") + PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:6") + PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:7") + PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW3:8") + PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) +INPUT_PORTS_END + +static INPUT_PORTS_START( comg159 ) + PORT_START("IN0-0") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("Discard 1") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) PORT_NAME("Discard 2") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) PORT_NAME("Discard 3") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) PORT_NAME("Discard 4") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) PORT_NAME("Discard 5") + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("IN0-1") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_NAME("Play (Bet)") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_NAME("Deal / Draw") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Settings (%)") PORT_CODE(KEYCODE_8) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Clr Data") PORT_CODE(KEYCODE_0) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Audit") PORT_CODE(KEYCODE_9) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Test") + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("IN0-2") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) PORT_NAME("Cancel") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_STAND ) PORT_NAME("Stand") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_NAME("Coin-In A") PORT_IMPULSE(2) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_NAME("Coin-In B") PORT_IMPULSE(2) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("IN0-3") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Tilt") PORT_CODE(KEYCODE_T) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) PORT_NAME("Double") + 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_UNUSED ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + + // For System 905, SW1 uses the whole PIA1 portA. + + PORT_START("SW1") // settings (PIA1) + PORT_DIPNAME( 0x01, 0x01, "Game Type" ) PORT_DIPLOCATION("SW1:1") + PORT_DIPSETTING( 0x01, "Hold" ) + PORT_DIPSETTING( 0x00, "Discard" ) + PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:2") + PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:3") + PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:4") + PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x30, 0x30, "Pay Table" ) PORT_DIPLOCATION("SW1:5,6") + PORT_DIPSETTING( 0x30, "250/100/25/10/8/5/4/3/2/1" ) + PORT_DIPSETTING( 0x20, "500/200/40/10/8/5/4/3/2/1" ) + PORT_DIPSETTING( 0x00, "500/250/50/20/8/6/4/3/2/1" ) + PORT_DIPSETTING( 0x10, "500/250/50/25/10/8/5/3/2/1" ) + PORT_DIPNAME( 0xc0, 0xc0, "Low Winning Pair" ) PORT_DIPLOCATION("SW1:7,8") + PORT_DIPSETTING( 0x00, "Jacks" ) + PORT_DIPSETTING( 0x80, "Queens" ) + PORT_DIPSETTING( 0xc0, "Kings" ) + PORT_DIPSETTING( 0x40, "Aces" ) +INPUT_PORTS_END + +static INPUT_PORTS_START( comg172 ) + PORT_START("IN0-0") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("Discard 1") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) PORT_NAME("Discard 2") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) PORT_NAME("Discard 3") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) PORT_NAME("Discard 4") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) PORT_NAME("Discard 5") + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("IN0-1") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_NAME("Play (Bet)") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_NAME("Deal / Draw") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Learn") PORT_CODE(KEYCODE_8) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Clr Data") PORT_CODE(KEYCODE_0) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Audit") PORT_CODE(KEYCODE_9) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Test") + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("IN0-2") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) PORT_NAME("Cancel") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_STAND ) PORT_NAME("Stand") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_NAME("Coin-In A") PORT_IMPULSE(2) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_NAME("Coin-In B") PORT_IMPULSE(2) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("IN0-3") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Tilt") PORT_CODE(KEYCODE_T) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) PORT_NAME("Double") + 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_UNUSED ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + + // For System 905, SW1 uses the whole PIA1 portA. + + PORT_START("SW1") // settings (PIA1) + PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:1") + PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:2") + PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x04, 0x00, "Double Deal" ) PORT_DIPLOCATION("SW1:3") + PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:4") + PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x30, 0x00, "Lower Pair to Win + Pay Table" ) PORT_DIPLOCATION("SW1:5,6") + PORT_DIPSETTING( 0x00, "Jacks, 250/50/20/8/6/4/3/2/1" ) + PORT_DIPSETTING( 0x20, "Queens, 200/40/10/8/5/4/3/2/1" ) + PORT_DIPSETTING( 0x30, "Kings, 200/40/10/8/5/4/3/2/1" ) + PORT_DIPSETTING( 0x10, "Aces, 250/50/25/10/8/5/3/2/1" ) + PORT_DIPNAME( 0xc0, 0xc0, "Coin Lockout" ) PORT_DIPLOCATION("SW1:7,8") + PORT_DIPSETTING( 0xc0, "No Lockout" ) + PORT_DIPSETTING( 0x40, "No Lockout" ) + PORT_DIPSETTING( 0x80, "1-Coin Lockout" ) + PORT_DIPSETTING( 0x00, "2-Coin Lockout" ) +INPUT_PORTS_END + + static INPUT_PORTS_START( elgrande ) PORT_START("IN0-0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) /* credits */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) 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_NAME("Cancel Holds") PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("IN0-1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) /* credits */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Service") PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -2025,11 +2427,11 @@ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("IN0-3") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Test Mode") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Test Mode") PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Odd") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Even") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Odd") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Even") PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -2045,10 +2447,10 @@ PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x08, 0x08, DEF_STR( Coin_B ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) PORT_CONDITION("FRQ",0x40,EQUALS,0x00) - PORT_DIPSETTING( 0x08, "1 Coin/10 Credits" ) PORT_CONDITION("FRQ",0x40,EQUALS,0x00) - PORT_DIPSETTING( 0x00, "1 Coin/25 Credits" ) PORT_CONDITION("FRQ",0x40,EQUALS,0x40) - PORT_DIPSETTING( 0x08, "1 Coin/50 Credits" ) PORT_CONDITION("FRQ",0x40,EQUALS,0x40) + PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) PORT_CONDITION("FRQ", 0x40, EQUALS, 0x00) + PORT_DIPSETTING( 0x08, "1 Coin/10 Credits" ) PORT_CONDITION("FRQ", 0x40, EQUALS, 0x00) + PORT_DIPSETTING( 0x00, "1 Coin/25 Credits" ) PORT_CONDITION("FRQ", 0x40, EQUALS, 0x40) + PORT_DIPSETTING( 0x08, "1 Coin/50 Credits" ) PORT_CONDITION("FRQ", 0x40, EQUALS, 0x40) PORT_DIPNAME( 0x30, 0x20, "Minimum Winning Hand") PORT_DIPSETTING( 0x20, "Jacks or Better" ) PORT_DIPSETTING( 0x30, "Queens or Better" ) @@ -2060,7 +2462,7 @@ PORT_DIPSETTING( 0x80, "20" ) PORT_DIPSETTING( 0xC0, "50" ) - PORT_START("FRQ") /* settings (PIA0) */ + PORT_START("FRQ") // settings (PIA0) PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -2089,17 +2491,17 @@ static INPUT_PORTS_START( jjpoker ) PORT_START("IN0-0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) /* credits */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) 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_NAME("Cancel Discards") PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("IN0-1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) /* credits */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Service") PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -2109,21 +2511,21 @@ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("IN0-2") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("Discard 1") - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) PORT_NAME("Discard 2") - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) PORT_NAME("Discard 3") - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) PORT_NAME("Discard 4") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) PORT_NAME("Discard 5") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("Discard 1") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) PORT_NAME("Discard 2") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) PORT_NAME("Discard 3") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) PORT_NAME("Discard 4") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) PORT_NAME("Discard 5") PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("IN0-3") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Test Mode") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Test Mode") PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Odd") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Even") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Odd") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Even") PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -2139,10 +2541,10 @@ PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x08, 0x08, DEF_STR( Coinage ) ) - PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) PORT_CONDITION("FRQ",0x40,EQUALS,0x00) - PORT_DIPSETTING( 0x08, "1 Coin/10 Credits" ) PORT_CONDITION("FRQ",0x40,EQUALS,0x00) - PORT_DIPSETTING( 0x00, "1 Coin/25 Credits" ) PORT_CONDITION("FRQ",0x40,EQUALS,0x40) - PORT_DIPSETTING( 0x08, "1 Coin/50 Credits" ) PORT_CONDITION("FRQ",0x40,EQUALS,0x40) + PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) ) PORT_CONDITION("FRQ", 0x40, EQUALS, 0x00) + PORT_DIPSETTING( 0x08, "1 Coin/10 Credits" ) PORT_CONDITION("FRQ", 0x40, EQUALS, 0x00) + PORT_DIPSETTING( 0x00, "1 Coin/25 Credits" ) PORT_CONDITION("FRQ", 0x40, EQUALS, 0x40) + PORT_DIPSETTING( 0x08, "1 Coin/50 Credits" ) PORT_CONDITION("FRQ", 0x40, EQUALS, 0x40) PORT_DIPNAME( 0x30, 0x20, "Minimum Winning Hand") PORT_DIPSETTING( 0x20, "Jacks or Better" ) PORT_DIPSETTING( 0x30, "Queens or Better" ) @@ -2154,7 +2556,7 @@ PORT_DIPSETTING( 0x80, "20" ) PORT_DIPSETTING( 0xC0, "50" ) - PORT_START("FRQ") /* settings (PIA0) */ + PORT_START("FRQ") // settings (PIA0) PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -2183,7 +2585,7 @@ static INPUT_PORTS_START( ssipkr ) PORT_START("IN0-0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) /* credits */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_IMPULSE(2) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_NAME("Deal / Draw") @@ -2193,7 +2595,7 @@ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("IN0-1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) /* credits */ + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_SERVICE ) PORT_NAME("Service") PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) @@ -2213,11 +2615,11 @@ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("IN0-3") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Test Mode") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Test Mode") PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_HIGH ) PORT_NAME("Odd") - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Even") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_LOW ) PORT_NAME("Even") PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -2233,10 +2635,10 @@ PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x08, 0x08, DEF_STR( Coinage ) ) - PORT_DIPSETTING( 0x08, "1 Coin/1 Point" ) PORT_CONDITION("FRQ",0x40,EQUALS,0x40) - PORT_DIPSETTING( 0x08, "1 Coin/5 Points" ) PORT_CONDITION("FRQ",0x40,EQUALS,0x00) - PORT_DIPSETTING( 0x00, "1 Coin/10 Points" ) PORT_CONDITION("FRQ",0x40,EQUALS,0x40) - PORT_DIPSETTING( 0x00, "1 Coin/25 Points" ) PORT_CONDITION("FRQ",0x40,EQUALS,0x00) + PORT_DIPSETTING( 0x08, "1 Coin/1 Point" ) PORT_CONDITION("FRQ", 0x40, EQUALS, 0x40) + PORT_DIPSETTING( 0x08, "1 Coin/5 Points" ) PORT_CONDITION("FRQ", 0x40, EQUALS, 0x00) + PORT_DIPSETTING( 0x00, "1 Coin/10 Points" ) PORT_CONDITION("FRQ", 0x40, EQUALS, 0x40) + PORT_DIPSETTING( 0x00, "1 Coin/25 Points" ) PORT_CONDITION("FRQ", 0x40, EQUALS, 0x00) PORT_DIPNAME( 0x30, 0x20, "Minimum Winning Hand") PORT_DIPSETTING( 0x20, "Jacks or Better" ) PORT_DIPSETTING( 0x30, "Queens or Better" ) @@ -2248,7 +2650,7 @@ PORT_DIPSETTING( 0x80, "20" ) PORT_DIPSETTING( 0xc0, "50" ) - PORT_START("FRQ") /* settings (PIA0) */ + PORT_START("FRQ") // settings (PIA0) PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) @@ -2275,41 +2677,292 @@ PORT_DIPSETTING( 0x00, "50Hz." ) INPUT_PORTS_END + static INPUT_PORTS_START( stand906 ) - PORT_START("IN0") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("0-1") PORT_CODE(KEYCODE_1) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("0-2") PORT_CODE(KEYCODE_2) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("0-3") PORT_CODE(KEYCODE_3) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("0-4") PORT_CODE(KEYCODE_4) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("0-5") PORT_CODE(KEYCODE_5) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("0-6") PORT_CODE(KEYCODE_6) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("0-7") PORT_CODE(KEYCODE_7) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("0-8") PORT_CODE(KEYCODE_8) + PORT_START("IN0-0") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_NAME("Deal / LKOUT") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) PORT_NAME("Cancel Discards") + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_STAND ) PORT_NAME("Stand / DVTR") + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) - PORT_START("SW2") /* Tied to AY8912 port. Covered with tape except SW2-8 */ - PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:1") + PORT_START("IN0-1") + //PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_IMPULSE(10) PORT_NAME("Coin Out") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", ticket_dispenser_device, line_r) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_H) PORT_NAME("Hopper Weight") PORT_TOGGLE + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_DOOR ) PORT_NAME("Door") PORT_TOGGLE + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_9) PORT_NAME("Menu") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Hand Pay") + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE) PORT_CODE(KEYCODE_R) PORT_NAME("Error Reset") + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + + + PORT_START("IN0-2") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("Discard 1") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) PORT_NAME("Discard 2") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) PORT_NAME("Discard 3") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) PORT_NAME("Discard 4") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) PORT_NAME("Discard 5") + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("IN0-3") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_D) PORT_NAME("Drop Door") PORT_TOGGLE + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_8) PORT_NAME("Change") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_0) PORT_NAME("Prog Hit") + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("SW1") // settings (PIAT1) + PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:1") PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:2") + PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:2") PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:3") + PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:3") PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:4") + PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:4") PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:5") + PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:5") PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:6") + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:6") PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:7") + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:7") PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:8") + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:8") + PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + + PORT_START("SW2") // Tied to AY8912 port. Covered with tape except SW2-8 + PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:8") + PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:7") + PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:6") + PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:5") + PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:4") + PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:3") + PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:2") + PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:1") + PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) +INPUT_PORTS_END + + +static INPUT_PORTS_START( cas21iwc ) + + PORT_START("IN0-0") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_IMPULSE(2) PORT_NAME("Coin In (Fichas Entrada)") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) PORT_NAME("Take (Cobrar)") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("IN0-1") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_IMPULSE(2) PORT_NAME("Coin Out (Fichas Salida)") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_H) PORT_NAME("Hopper Height (Peso Tolva)") PORT_TOGGLE + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_DOOR ) PORT_NAME("Door (Puerta)") PORT_TOGGLE + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_9) PORT_NAME("Menu") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Hand Pay (Pago Manual)") + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE) PORT_CODE(KEYCODE_R) PORT_NAME("Error Reset (Correccion Error)") + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("IN0-2") // TODO: BJ predef inputs... + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_CODE(KEYCODE_X) PORT_NAME("Deal (Dar) / Cierre") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) PORT_CODE(KEYCODE_C) PORT_NAME("Double-Up (Doblar)") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_CODE(KEYCODE_V) PORT_NAME("Hit (Pedir)") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_STAND ) PORT_CODE(KEYCODE_B) PORT_NAME("Stand (Plantar) / Desv") + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("IN0-3") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_D) PORT_NAME("Drop Door (Cajon Abierto)") PORT_TOGGLE + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_NAME("Bet (Apostar)") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_8) PORT_NAME("Attendant (Asistente)") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("SW1") // settings (PIAT1) + PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:1") + PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:2") + PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:3") + PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:4") + PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:5") + PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:6") + PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:7") + PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:8") + PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + + PORT_START("SW2") // Tied to AY8912 port. Covered with tape except SW2-8 + PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:8") + PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:7") + PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:6") + PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:5") + PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:4") + PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:3") + PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:2") + PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:1") + PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) +INPUT_PORTS_END + + +static INPUT_PORTS_START( pokeriwc ) + + PORT_START("IN0-0") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_NAME("Coin In (Fichas Entrada)") PORT_IMPULSE(2) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) PORT_NAME("Take (Cobrar)") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_NAME("Deal (Dar) / Lockout (Cierre)") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) PORT_NAME("Cancel (Cancelar)") + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_STAND ) PORT_NAME("Stand (Plantar)/ DVTR (Desviar)") + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("IN0-1") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_IMPULSE(2) PORT_NAME("Coin Out (Fichas Salida)") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_H) PORT_NAME("Hopper Weight (Peso Tolva)") PORT_TOGGLE + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_GAMBLE_DOOR ) PORT_NAME("Door (Puerta Abierta)") PORT_TOGGLE + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_9) PORT_NAME("Menu") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Hand Pay (Pago Manual)") + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE) PORT_CODE(KEYCODE_R) PORT_NAME("Error Reset (Correccion de Errores)") + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("IN0-2") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("Discard (Descartar) 1") + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD2 ) PORT_NAME("Discard (Descartar) 2") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_HOLD3 ) PORT_NAME("Discard (Descartar) 3") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_POKER_HOLD4 ) PORT_NAME("Discard (Descartar) 4") + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_POKER_HOLD5 ) PORT_NAME("Discard (Descartar) 5") + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("IN0-3") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_D) PORT_NAME("Drop Door (Cajon Abierto)") PORT_TOGGLE + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_GAMBLE_BET ) PORT_NAME("Bet (Apostar)") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_8) PORT_NAME("Attendant (Asistente)") + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_0) PORT_NAME("Prog Hit (Pozo Acumulado)") + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("SW1") // settings (PIAT1) + PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:1") + PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:2") + PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:3") + PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:4") + PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:5") + PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:6") + PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:7") + PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:8") + PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + + PORT_START("SW2") // Tied to AY8912 port. Covered with tape except SW2-8 + PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:8") + PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:7") + PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:6") + PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:5") + PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:4") + PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:3") + PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:2") + PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW2:1") PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) INPUT_PORTS_END @@ -2335,7 +2988,7 @@ 8, 8, RGN_FRAC(1,3), 3, - { 0, RGN_FRAC(1,3), RGN_FRAC(2,3) }, /* bitplanes are separated */ + { 0, RGN_FRAC(1,3), RGN_FRAC(2,3) }, // bitplanes are separated { 0, 1, 2, 3, 4, 5, 6, 7 }, { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 }, 8*8 @@ -2549,6 +3202,7 @@ */ + /************************************************* * ACIA Interface * *************************************************/ @@ -2566,56 +3220,71 @@ update_aciabaud_scale(0); } + /************************************************* * Machine Drivers * *************************************************/ void calomega_state::sys903(machine_config &config) { - /* basic machine hardware */ - M6502(config, m_maincpu, CPU_CLOCK); /* confirmed */ + // basic machine hardware + M6502(config, m_maincpu, CPU_CLOCK); // confirmed m_maincpu->set_addrmap(AS_PROGRAM, &calomega_state::sys903_map); - m_maincpu->set_vblank_int("screen", FUNC(calomega_state::irq0_line_hold)); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); PIA6821(config, m_pia[0], 0); m_pia[0]->readpa_handler().set(FUNC(calomega_state::s903_mux_port_r)); + m_pia[0]->readpb_handler().set(FUNC(calomega_state::dummy_pia_r)); // Debug: some dipsw maybe??? + m_pia[0]->writepa_handler().set(FUNC(calomega_state::dummy_pia_w)); // Debug: to assign lamps/counters/solenids/hopper???? m_pia[0]->writepb_handler().set(FUNC(calomega_state::lamps_903a_w)); + m_pia[0]->readca1_handler().set(FUNC(calomega_state::timer_r)); // Timer Interrupt Ack. (CPU -> PIA) + m_pia[0]->irqa_handler().set_inputline("maincpu", M6502_IRQ_LINE); // Timer Interrupt Event. (PIA -> CPU) PIA6821(config, m_pia[1], 0); m_pia[1]->readpa_handler().set_ioport("SW1"); + m_pia[1]->readpb_handler().set(FUNC(calomega_state::dummy_pia_r)); // Debug: so much need to read????? :) m_pia[1]->writepa_handler().set(FUNC(calomega_state::lamps_903b_w)); - m_pia[1]->writepb_handler().set(FUNC(calomega_state::s903_mux_w)); + m_pia[1]->writepb_handler().set(FUNC(calomega_state::s903_mux_w)); // Mux. Scan Lines.(Upper nibble) - Hopper b0-b1 (Lower Nibble). + m_pia[1]->ca2_handler().set(FUNC(calomega_state::dummy_pia_line_w)); // + m_pia[1]->cb2_handler().set(FUNC(calomega_state::dummy_pia_line_w)); // + m_pia[1]->readcb1_handler().set(FUNC(calomega_state::vblank_r)); // V_BLANK Interrupt Ack. (CPU -> PIA) + m_pia[1]->irqb_handler().set_inputline("maincpu", M6502_IRQ_LINE); // V_BLANK Interrupt Event. (PIA -> CPU) - /* video hardware */ + // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(60); - screen.set_vblank_time(ATTOSECONDS_IN_USEC(0)); - screen.set_size((39+1)*8, (31+1)*8); /* Taken from MC6845 init, registers 00 & 04. Normally programmed with (value-1) */ - screen.set_visarea(0*8, 32*8-1, 0*8, 31*8-1); /* Taken from MC6845 init, registers 01 & 06 */ + screen.set_vblank_time(ATTOSECONDS_IN_USEC(100)); + screen.set_size((39+1)*8, (31+1)*8); // Taken from MC6845 init, registers 00 & 04. Normally programmed with (value-1). + screen.set_visarea(0*8, 32*8-1, 0*8, 31*8-1); // Taken from MC6845 init, registers 01 & 06. screen.set_screen_update(FUNC(calomega_state::screen_update_calomega)); + screen.screen_vblank().set(FUNC(calomega_state::vblank0_w)); + GFXDECODE(config, m_gfxdecode, m_palette, gfx_calomega); - PALETTE(config, m_palette, FUNC(calomega_state::calomega_palette), 256); // or 128? is the upper half of the PROMs really valid colors? + PALETTE(config, m_palette, FUNC(calomega_state::calomega_palette), 256); - mc6845_device &crtc(MC6845(config, "crtc", CPU_CLOCK)); /* 6845 @ CPU clock */ + mc6845_device &crtc(MC6845(config, "crtc", CPU_CLOCK)); // 6845 @ CPU clock crtc.set_screen("screen"); crtc.set_show_border_area(false); crtc.set_char_width(8); - /* sound hardware */ + // sound hardware SPEAKER(config, "mono").front_center(); - ay8912_device &ay8912(AY8912(config, "ay8912", SND_CLOCK)); /* confirmed */ - ay8912.port_a_read_callback().set_ioport("SW3"); /* from schematics */ + ay8912_device &ay8912(AY8912(config, "ay8912", SND_CLOCK)); // confirmed + ay8912.port_a_read_callback().set_ioport("SW3"); // from schematics ay8912.add_route(ALL_OUTPUTS, "mono", 0.75); - /* acia */ + // acia ACIA6850(config, m_acia6850_0, 0); m_acia6850_0->txd_handler().set(FUNC(calomega_state::write_acia_tx)); clock_device &aciabaud(CLOCK(config, "aciabaud", UART_CLOCK)); aciabaud.signal_handler().set(FUNC(calomega_state::write_acia_clock)); + + TIMER(config, "timer_0").configure_periodic(FUNC(calomega_state::timer_0), attotime::from_hz(550*2)); // (time*2) - Each timer pulse -> half period + + HOPPER(config, m_hopper, attotime::from_msec(50), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH ); } @@ -2623,15 +3292,14 @@ { sys903(config); - /* basic machine hardware */ + // basic machine hardware m_maincpu->set_addrmap(AS_PROGRAM, &calomega_state::s903mod_map); - /* sound hardware */ + // sound hardware subdevice("ay8912")->port_a_read_callback().set_constant(0); config.device_remove("acia6850_0"); - config.device_remove("aciabaud"); } @@ -2640,51 +3308,89 @@ { sys903(config); - /* basic machine hardware */ + // basic machine hardware m_maincpu->set_addrmap(AS_PROGRAM, &calomega_state::sys905_map); - m_pia[0]->readpa_handler().set(FUNC(calomega_state::s905_mux_port_r)); - m_pia[0]->writepb_handler().set(FUNC(calomega_state::lamps_905_w)); + // video hardware + screen_device &screen(SCREEN(config.replace(), "screen", SCREEN_TYPE_RASTER)); + screen.set_refresh_hz(60); + screen.set_vblank_time(ATTOSECONDS_IN_USEC(100)); + screen.set_size((39+1)*8, (31+1)*8); // Taken from MC6845 init, registers 00 & 04. Normally programmed with (value-1). + screen.set_visarea(0*8, 32*8-1, 0*8, 31*8-1); // Taken from MC6845 init, registers 01 & 06. + screen.set_screen_update(FUNC(calomega_state::screen_update_calomega)); + + screen.screen_vblank().set(FUNC(calomega_state::vblank1_w)); - m_pia[1]->writepb_handler().set(FUNC(calomega_state::s905_mux_w)); + PIA6821(config.replace(), m_pia[0], 0); + m_pia[0]->readpa_handler().set(FUNC(calomega_state::s905_mux_port_r)); // Mux. Button read. + m_pia[0]->writepa_handler().set(FUNC(calomega_state::dummy_pia_w)); // Bit 7 & 6 as output. (Watchdog & Bat. Test control) - Ignored + m_pia[0]->writepb_handler().set(FUNC(calomega_state::lamps_905_w)); // Full Lamps - OK. + m_pia[0]->readcb1_handler().set(FUNC(calomega_state::vblank_r)); // V_BLANK Interrupt Ack. (CPU -> PIA) + m_pia[0]->cb2_handler().set(FUNC(calomega_state::dummy_pia_line_w)); // No connected (from schematics). + m_pia[0]->irqb_handler().set_inputline("maincpu", M6502_IRQ_LINE); // V_BLANK Interrupt Event. (PIA -> CPU) + + PIA6821(config.replace(), m_pia[1], 0); + m_pia[1]->readpa_handler().set_ioport("SW1"); // Full port. + //m_pia[1]->readpb_handler().set(FUNC(calomega_state::dummy_pia_r)); // Debug: so much need to read????? :) + //m_pia[1]->writepa_handler().set(FUNC(calomega_state::dummy_pia_w)); // Debug: to assign lamps/counters/solenids/hopper???? + m_pia[1]->writepb_handler().set(FUNC(calomega_state::s905_mux_w)); // Mux. Scan Lines.(Lower Nibble). Hopper & Coin Lockout (Upper nibble). + m_pia[1]->readcb1_handler().set(FUNC(calomega_state::timer_r)); // Timer Interrupt Ack. (CPU -> PIA) + m_pia[1]->cb2_handler().set(FUNC(calomega_state::dummy_pia_line_w)); // No connected (from schematics). + m_pia[1]->irqb_handler().set_inputline("maincpu", M6502_IRQ_LINE); // Timer Interrupt Event. (PIA -> CPU) - /* sound hardware */ + // sound hardware subdevice("ay8912")->port_a_read_callback().set_constant(0); - config.device_remove("acia6850_0"); + TIMER(config.replace(), "timer_0").configure_periodic(FUNC(calomega_state::timer_1), attotime::from_hz(520*2)); // (time*2) - Each timer pulse -> half period + config.device_remove("acia6850_0"); config.device_remove("aciabaud"); } - void calomega_state::sys906(machine_config &config) { sys903(config); - /* basic machine hardware */ - - M65C02(config.replace(), m_maincpu, CPU_CLOCK); /* guess */ + // basic machine hardware + R65C02(config.replace(), m_maincpu, CPU_CLOCK); // confirmed m_maincpu->set_addrmap(AS_PROGRAM, &calomega_state::sys906_map); - m_pia[0]->readpa_handler().set(FUNC(calomega_state::pia0_ain_r)); - m_pia[0]->readpb_handler().set(FUNC(calomega_state::pia0_bin_r)); - m_pia[0]->writepa_handler().set(FUNC(calomega_state::pia0_aout_w)); - m_pia[0]->writepb_handler().set(FUNC(calomega_state::pia0_bout_w)); - m_pia[0]->ca2_handler().set(FUNC(calomega_state::pia0_ca2_w)); + screen_device &screen(SCREEN(config.replace(), "screen", SCREEN_TYPE_RASTER)); + screen.set_refresh_hz(60); + screen.set_vblank_time(ATTOSECONDS_IN_USEC(100)); + screen.set_size((39+1)*8, (31+1)*8); // Taken from MC6845 init, registers 00 & 04. Normally programmed with (value-1). + screen.set_visarea(0*8, 32*8-1, 0*8, 31*8-1); // Taken from MC6845 init, registers 01 & 06. + screen.set_screen_update(FUNC(calomega_state::screen_update_calomega)); + + screen.screen_vblank().set(FUNC(calomega_state::vblank2_w)); + PIA6821(config.replace(), m_pia[0], 0); + m_pia[0]->readpa_handler().set_ioport("SW1"); // Bit 7 - CGBANK ???? input?-output? + //m_pia[0]->readpb_handler().set(FUNC(calomega_state::pia0_bin_r)); // No inputs on port_B + m_pia[0]->ca2_handler().set(FUNC(calomega_state::dummy_pia_line_w)); // Ignored + m_pia[0]->cb2_handler().set(FUNC(calomega_state::dummy_pia_line_w)); // Diverter + m_pia[0]->writepa_handler().set(FUNC(calomega_state::pia0_aout_w)); // Bit 7 - CGBANK ???? input?-output? + m_pia[0]->writepb_handler().set(FUNC(calomega_state::pia0_bout_w)); // Meters ??? (M1-M5), coils, hopper - m_pia[1]->readpa_handler().set(FUNC(calomega_state::pia1_ain_r)); + PIA6821(config.replace(), m_pia[1], 0); + m_pia[1]->readpa_handler().set(FUNC(calomega_state::pia1_ain_r)); // Mux. Button read. m_pia[1]->readpb_handler().set(FUNC(calomega_state::pia1_bin_r)); - m_pia[1]->writepa_handler().set(FUNC(calomega_state::pia1_aout_w)); - m_pia[1]->writepb_handler().set(FUNC(calomega_state::pia1_bout_w)); + m_pia[1]->readca1_handler().set(FUNC(calomega_state::timer_r)); // Timer Interrupt Ack. (CPU -> PIA) + m_pia[1]->readcb1_handler().set(FUNC(calomega_state::vblank_r)); // V_BLANK Interrupt Ack. (CPU -> PIA) + m_pia[1]->writepa_handler().set(FUNC(calomega_state::pia1_aout_w)); // Mux. Scan lines + m_pia[1]->writepb_handler().set(FUNC(calomega_state::pia1_bout_w)); // Lamps 1 to 8 + m_pia[1]->cb2_handler().set(FUNC(calomega_state::pia1_cb2_w)); // V_BLANK interrupt line input (from Vertical Synch) + m_pia[1]->irqa_handler().set_inputline("maincpu", M6502_IRQ_LINE); // Timer Interrupt Event. (PIA -> CPU) + m_pia[1]->irqb_handler().set_inputline("maincpu", M6502_IRQ_LINE); // V_BLANK Interrupt Event. (PIA -> CPU) m_gfxdecode->set_info(gfx_sys906); - /* sound hardware */ - subdevice("ay8912")->port_a_read_callback().set_ioport("SW2"); /* From PCB pic. Value is stored at $0539 */ + // sound hardware + ay8912_device &ay8912(AY8912(config.replace(), "ay8912", SND_CLOCK)); // confirmed + ay8912.port_a_read_callback().set_ioport("SW2"); // from schematics + ay8912.add_route(ALL_OUTPUTS, "mono", 0.75); - config.device_remove("acia6850_0"); - config.device_remove("aciabaud"); + TIMER(config.replace(), "timer_0").configure_periodic(FUNC(calomega_state::timer_2), attotime::from_hz(380*2)); // (time*2) - Each timer pulse -> half period } @@ -2699,9 +3405,9 @@ * *************************************************/ -ROM_START( comg074 ) /* Cal Omega v7.4 (Gaming Poker) */ +ROM_START( comg074 ) // Cal Omega v7.4 (Gaming Poker) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "1800.u5", 0x1800, 0x0800, CRC(69759432) SHA1(d64646476b4f67088bf5996ffc272d2571e62c53) ) /* Seems to be from v6.5. Unused. */ + ROM_LOAD( "1800.u5", 0x1800, 0x0800, CRC(69759432) SHA1(d64646476b4f67088bf5996ffc272d2571e62c53) ) // Seems to be from v6.5. Unused. ROM_LOAD( "2000.u6", 0x2000, 0x0800, CRC(bd9044f6) SHA1(9ebfc8379fe79a84982a0176a6b26267580272de) ) ROM_LOAD( "2800.u7", 0x2800, 0x0800, CRC(d1d2e111) SHA1(2e5b6fbaf04539851d0f0674f0fd86e9be90c0fd) ) ROM_LOAD( "3000.u8", 0x3000, 0x0800, CRC(cac4af01) SHA1(aed2986575b8d5539581515d818cb5bb9054c7c9) ) @@ -2715,13 +3421,13 @@ ROM_LOAD( "poker_cg2b.u69", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) ROM_LOAD( "poker_cg2a.u68", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) - ROM_REGION( 0x100, "proms", 0 ) /* from other set */ + ROM_REGION( 0x100, "proms", 0 ) // from other set ROM_LOAD( "pokclr.u28", 0x0000, 0x0100, BAD_DUMP CRC(a8191ef7) SHA1(d6f777980179ab091e2713ee815d46bf9c0ac486) ) ROM_END -ROM_START( comg076 ) /* Cal Omega v7.6 (Arcade Poker) */ +ROM_START( comg076 ) // Cal Omega v7.6 (Arcade Poker) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_FILL( 0x1800, 0x0800, 0xff ) /* empty socket */ + ROM_FILL( 0x1800, 0x0800, 0xff ) // empty socket ROM_LOAD( "07-62.u6", 0x2000, 0x0800, CRC(99ffa2a4) SHA1(07fd182ff86f9ab09bbf09f51d655811a09ffa03) ) ROM_LOAD( "07-63.u7", 0x2800, 0x0800, CRC(9ed58bc5) SHA1(c545053847ec7585e4ac97c70cf33529ed0f1111) ) ROM_LOAD( "07-64.u8", 0x3000, 0x0800, CRC(95714680) SHA1(26938903600bd0920b1dd1c6900c56c6b749976a) ) @@ -2739,7 +3445,7 @@ ROM_LOAD( "pokclr.u28", 0x0000, 0x0100, CRC(a8191ef7) SHA1(d6f777980179ab091e2713ee815d46bf9c0ac486) ) ROM_END -ROM_START( comg079 ) /* Cal Omega v7.9 (Arcade Poker) */ +ROM_START( comg079 ) // Cal Omega v7.9 (Arcade Poker) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "07-91.u5", 0x1800, 0x0800, CRC(da415c27) SHA1(be42f1d36579ff8fafd6df4e30a64a6141a7a2ae) ) ROM_LOAD( "07-92.u6", 0x2000, 0x0800, CRC(31211ed3) SHA1(799bc4ca77ee01a4d45320263e4cc2d066ec26e5) ) @@ -2763,13 +3469,13 @@ ROM_LOAD( "pokclr.u28", 0x0000, 0x0100, CRC(a8191ef7) SHA1(d6f777980179ab091e2713ee815d46bf9c0ac486) ) ROM_END -ROM_START( comg080 ) /* Cal Omega v8.0 (Arcade Black Jack) */ +ROM_START( comg080 ) // Cal Omega v8.0 (Arcade Black Jack) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_FILL( 0x1800, 0x0800, 0xff ) /* empty socket */ + ROM_FILL( 0x1800, 0x0800, 0xff ) // empty socket ROM_LOAD( "08-02.u6", 0x2000, 0x0800, CRC(abf8c48e) SHA1(fea059af900fd6d17725ccf7a5ff2eb0af5c8e0a) ) ROM_LOAD( "08-03.u7", 0x2800, 0x0800, CRC(e9ccb5af) SHA1(68a45d839afba3c6eafb7c75e5660de3a6be4eb5) ) ROM_LOAD( "08-04.u8", 0x3000, 0x0800, CRC(325bdae8) SHA1(5a94c96ec3980361570da58fb407a1dba38064b8) ) - ROM_LOAD( "08-05.u9", 0x3800, 0x0800, BAD_DUMP CRC(71bd14d2) SHA1(00b3e2d965ac7ae1fc994b81246ad2c29ef4834c) ) /* bad dump. 2nd half is blank */ + ROM_LOAD( "08-05.u9", 0x3800, 0x0800, BAD_DUMP CRC(71bd14d2) SHA1(00b3e2d965ac7ae1fc994b81246ad2c29ef4834c) ) // bad dump. 2nd half is blank ROM_REGION( 0x0800, "gfx1", 0 ) ROM_LOAD( "gpkcg0.u67", 0x0000, 0x0800, CRC(b626ad89) SHA1(551b75f4559d11a4f8f56e38982114a21c77d4e7) ) @@ -2783,16 +3489,16 @@ ROM_LOAD( "pokclr.u28", 0x0000, 0x0100, CRC(a8191ef7) SHA1(d6f777980179ab091e2713ee815d46bf9c0ac486) ) ROM_END -ROM_START( comg094 ) /* Cal Omega v9.4 (Keno) */ +ROM_START( comg094 ) // Cal Omega v9.4 (Keno) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_FILL( 0x1800, 0x0800, 0xff ) /* empty socket */ + ROM_FILL( 0x1800, 0x0800, 0xff ) // empty socket ROM_LOAD( "09-42.u6", 0x2000, 0x0800, CRC(1cff1319) SHA1(97b7ed54d398f36dc476028471784fc4e50bc378) ) ROM_LOAD( "09-43.u7", 0x2800, 0x0800, CRC(e6b123be) SHA1(f89df2dc6deeecff41be83d7a9040cfe5d872bad) ) ROM_LOAD( "09-44.u8", 0x3000, 0x0800, CRC(13939de9) SHA1(b2f97828808f6001846049cbf9af40e32908a58f) ) ROM_LOAD( "09-45.u9", 0x3800, 0x0800, CRC(7508de2e) SHA1(62faf65a1b815e11158cfb807090923ab368784d) ) ROM_REGION( 0x0800, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x0800, 0xff ) /* empty socket (requested by the manual) */ + ROM_FILL( 0x0000, 0x0800, 0xff ) // empty socket (requested by the manual) ROM_REGION( 0x1800, "gfx2", 0 ) ROM_LOAD( "kcgc.u70", 0x0000, 0x0800, CRC(fb721236) SHA1(33ef355913b8acb5017a24ca1c46dec1c391a528) ) @@ -2803,9 +3509,9 @@ ROM_LOAD( "pokclr.u28", 0x0000, 0x0100, CRC(a8191ef7) SHA1(d6f777980179ab091e2713ee815d46bf9c0ac486) ) ROM_END -ROM_START( comg107 ) /* Cal Omega v10.7c (Big Game) */ +ROM_START( comg107 ) // Cal Omega v10.7c (Big Game) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_FILL( 0x1800, 0x0800, 0xff ) /* empty socket */ + ROM_FILL( 0x1800, 0x0800, 0xff ) // empty socket ROM_LOAD( "10-72.u6", 0x2000, 0x0800, CRC(dd0fbefb) SHA1(caed286ba1adb4d5c5c874c56339b9d71dd41bc6) ) ROM_LOAD( "10-73.u7", 0x2800, 0x0800, CRC(fcb7774d) SHA1(d3c89e0df0005e4bc4894156622b3d1e4cd09f2a) ) ROM_LOAD( "10-74.u8", 0x3000, 0x0800, CRC(d19ed885) SHA1(c41e59e87ce88a5b229e334b6a563a3b21d12b15) ) @@ -2819,14 +3525,14 @@ ROM_LOAD( "lotcgb.u69", 0x1000, 0x1000, CRC(5bda0f42) SHA1(d4b3340e9c8ca49483fa846103f0bd81d57a5ab3) ) ROM_LOAD( "lotcga.u68", 0x2000, 0x1000, CRC(0975e360) SHA1(7b9dbbae50c43ad99ee11798ada0a44e71c611f9) ) - ROM_REGION( 0x0800, "user1", 0 ) /* keyboard interfase ROM */ + ROM_REGION( 0x0800, "user1", 0 ) // keyboard interfase ROM ROM_LOAD( "lotkbd.sub", 0x0000, 0x0800, CRC(c1636ab5) SHA1(5a3ad24918751ca6a6640807e421e80f6b4cc844) ) ROM_REGION( 0x100, "proms", 0 ) ROM_LOAD( "bclr.u28", 0x0000, 0x0100, CRC(0ec45d01) SHA1(da73ae7e1c74913921dc378a97795c6da47dcbfb) ) ROM_END -ROM_START( comg123 ) /* Cal Omega v12.3 (Ticket Poker) */ +ROM_START( comg123 ) // Cal Omega v12.3 (Ticket Poker) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "12-31.u5", 0x1800, 0x0800, BAD_DUMP CRC(8a1e9b03) SHA1(d57548226a695eb43d491dd953ad0b9b8ff8eb82) ) ROM_LOAD( "12-32.u6", 0x2000, 0x0800, CRC(c30eb9c4) SHA1(bf3c2e069ecb9763028738c29054802b605cfa92) ) @@ -2846,9 +3552,9 @@ ROM_LOAD( "pokclr.u28", 0x0000, 0x0100, CRC(a8191ef7) SHA1(d6f777980179ab091e2713ee815d46bf9c0ac486) ) ROM_END -ROM_START( comg125 ) /* Cal Omega v12.5 (Bingo) */ +ROM_START( comg125 ) // Cal Omega v12.5 (Bingo) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_FILL( 0x1800, 0x0800, 0xff ) /* empty socket */ + ROM_FILL( 0x1800, 0x0800, 0xff ) // empty socket ROM_LOAD( "12-52.u6", 0x2000, 0x0800, CRC(ea0a6bd6) SHA1(f138d2f29252d95dea93a1e936725de99c714b35) ) ROM_LOAD( "12-53.u7", 0x2800, 0x0800, CRC(c888ee34) SHA1(2796c6ae196b046f12b75b1c095a430fa4be0da2) ) ROM_LOAD( "12-54.u8", 0x3000, 0x0800, CRC(4c7d11a6) SHA1(0131f077e204250d594c9baadc0596efeb7639cc) ) @@ -2866,16 +3572,16 @@ ROM_LOAD( "bclr.u28", 0x0000, 0x0100, CRC(0ec45d01) SHA1(da73ae7e1c74913921dc378a97795c6da47dcbfb) ) ROM_END -ROM_START( comg127 ) /* Cal Omega v12.7 (Keno) */ +ROM_START( comg127 ) // Cal Omega v12.7 (Keno) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_FILL( 0x1800, 0x0800, 0xff ) /* empty socket */ + ROM_FILL( 0x1800, 0x0800, 0xff ) // empty socket ROM_LOAD( "12-72.u6", 0x2000, 0x0800, CRC(091a4b32) SHA1(3600854152482bf18d2377aa635a9fd7f3d4b2f7) ) ROM_LOAD( "12-73.u7", 0x2800, 0x0800, CRC(c1fb5293) SHA1(f20cdddb4c89cb2fc647ddfcff6bd6f5095a0a28) ) ROM_LOAD( "12-74.u8", 0x3000, 0x0800, CRC(de277137) SHA1(127b95616824dfb1025f3346c1335a8bf4835e68) ) ROM_LOAD( "12-75.u9", 0x3800, 0x0800, CRC(04485ba3) SHA1(ee22396fc23508635e43ca8b17fc1f23e670fe85) ) ROM_REGION( 0x0800, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x0800, 0xff ) /* empty socket (requested by the manual) */ + ROM_FILL( 0x0000, 0x0800, 0xff ) // empty socket (requested by the manual) ROM_REGION( 0x1800, "gfx2", 0 ) ROM_LOAD( "kcgc.u70", 0x0000, 0x0800, CRC(fb721236) SHA1(33ef355913b8acb5017a24ca1c46dec1c391a528) ) @@ -2886,9 +3592,9 @@ ROM_LOAD( "pokclr.u28", 0x0000, 0x0100, CRC(a8191ef7) SHA1(d6f777980179ab091e2713ee815d46bf9c0ac486) ) ROM_END -ROM_START( comg128 ) /* Cal Omega v12.8 (Arcade Game) */ +ROM_START( comg128 ) // Cal Omega v12.8 (Arcade Game) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_FILL( 0x1800, 0x0800, 0xff ) /* empty socket */ + ROM_FILL( 0x1800, 0x0800, 0xff ) // empty socket ROM_LOAD( "12-82.u6", 0x2000, 0x0800, CRC(85f0c548) SHA1(f08e26a7acb883a92e73e564fb2b58422d1784c6) ) ROM_LOAD( "12-83.u7", 0x2800, 0x0800, CRC(57212e46) SHA1(d0bac63e0efcdb8ef4a1b6c4d53776447557e4d0) ) ROM_LOAD( "12-84.u8", 0x3000, 0x0800, CRC(00ab3cd8) SHA1(da00457c49d3a101dc31578d07b2e986f0d73919) ) @@ -2906,9 +3612,9 @@ ROM_LOAD( "pokclr.u28", 0x0000, 0x0100, CRC(a8191ef7) SHA1(d6f777980179ab091e2713ee815d46bf9c0ac486) ) ROM_END -ROM_START( comg134 ) /* Cal Omega 13.4 (Nudge Keno) */ +ROM_START( comg134 ) // Cal Omega 13.4 (Nudge Keno) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_FILL( 0x1800, 0x0800, 0xff ) /* empty socket */ + ROM_FILL( 0x1800, 0x0800, 0xff ) // empty socket ROM_LOAD( "13-42.u6", 0x2000, 0x0800, CRC(3ff1e83d) SHA1(0c2d2faed1148909dd7d50e9eda76c6403181435) ) ROM_LOAD( "13-43.u7", 0x2800, 0x0800, CRC(cf2125f4) SHA1(32678f3ac82c76fb8116de77ce332fe098d5e8c0) ) ROM_LOAD( "13-44.u8", 0x3000, 0x0800, CRC(09a8d3c4) SHA1(60937b386a7fa8c30bd509633b5e98e79a1189d4) ) @@ -2926,7 +3632,7 @@ ROM_LOAD( "bclr.u28", 0x0000, 0x0100, CRC(0ec45d01) SHA1(da73ae7e1c74913921dc378a97795c6da47dcbfb) ) ROM_END -ROM_START( comg145 ) /* Cal Omega v14.5 (Pixels) */ +ROM_START( comg145 ) // Cal Omega v14.5 (Pixels) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "14-51.u5", 0x1800, 0x0800, CRC(b173af4b) SHA1(2fd7d391c765e8e5bf148d92223ffc2a2619dcfd) ) ROM_LOAD( "14-52.u6", 0x2000, 0x0800, CRC(f12434c5) SHA1(f957831867cc8c98fb479cd2d859790d19883d26) ) @@ -2946,7 +3652,7 @@ ROM_LOAD( "pixclr.u28", 0x0000, 0x0100, CRC(67d23e76) SHA1(826cf77ca5a4d492d66e45ee96a7780a94fbe634) ) ROM_END -ROM_START( comg157 ) /* Cal Omega v15.7 (Double-Draw Poker) */ +ROM_START( comg157 ) // Cal Omega v15.7 (Double-Draw Poker) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "15-71.u5", 0x1800, 0x0800, CRC(e0c89569) SHA1(68f32b00dd8ceb08e9677438c2bfec86e1a7fe6a) ) ROM_LOAD( "15-72.u6", 0x2000, 0x0800, CRC(a3ebd1af) SHA1(a31eff7fe205efeb5b6fe1adaed66d2f23f91844) ) @@ -2966,10 +3672,10 @@ ROM_LOAD( "pokclr.u28", 0x0000, 0x0100, CRC(a8191ef7) SHA1(d6f777980179ab091e2713ee815d46bf9c0ac486) ) ROM_END -ROM_START( comg159 ) /* Cal Omega v15.9 (Wild Double-Up) */ +ROM_START( comg159 ) // Cal Omega v15.9 (Wild Double-Up) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_FILL( 0x3000, 0x1000, 0xff ) /* empty socket */ - ROM_FILL( 0x4000, 0x1000, 0xff ) /* empty socket */ + ROM_FILL( 0x3000, 0x1000, 0xff ) // empty socket + ROM_FILL( 0x4000, 0x1000, 0xff ) // empty socket ROM_LOAD( "15-93.u7", 0x5000, 0x1000, CRC(a1ca1fc0) SHA1(a751dba148c818a25237c2ac95328b6a5643f4e0) ) ROM_LOAD( "15-94.u8", 0x6000, 0x1000, CRC(849595ea) SHA1(c28629de84b0c0d389c52490677ecb9139fd738d) ) ROM_LOAD( "15-95.u9", 0x7000, 0x1000, CRC(c858ea24) SHA1(c7ecaddd4064b352c061b9164f2f347c310fab39) ) @@ -2986,16 +3692,16 @@ ROM_LOAD( "wldclr.u28", 0x0000, 0x0100, CRC(a26a8fae) SHA1(d570fe9443a0912bd34b81ac4c3e4c5f8901f523) ) ROM_END -ROM_START( comg164 ) /* Cal Omega v16.4 (Keno) */ +ROM_START( comg164 ) // Cal Omega v16.4 (Keno) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "16-41.u5", 0x1800, 0x0800, CRC(fae6b065) SHA1(a123f98e4b4815a06d62d0429697cdce71756b94) ) - ROM_LOAD( "16-42.u6", 0x2000, 0x0800, NO_DUMP ) /* missing ROM??? */ + ROM_LOAD( "16-42.u6", 0x2000, 0x0800, NO_DUMP ) // missing ROM??? ROM_LOAD( "16-43.u7", 0x2800, 0x0800, CRC(15974dbc) SHA1(fe2979861b8021949c127b182b9b50975b77bdd1) ) ROM_LOAD( "16-44.u8", 0x3000, 0x0800, CRC(64f06a75) SHA1(1cf4d89d2ee60200f84d47a3a637471e0af9239c) ) ROM_LOAD( "16-45.u9", 0x3800, 0x0800, CRC(3a8bc80e) SHA1(a1fb58b30850b1fe2bf976b8b99c8c540d67534a) ) ROM_REGION( 0x0800, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x0800, 0xff ) /* empty socket (requested by the manual) */ + ROM_FILL( 0x0000, 0x0800, 0xff ) // empty socket (requested by the manual) ROM_REGION( 0x1800, "gfx2", 0 ) ROM_LOAD( "kcgc.u70", 0x0000, 0x0800, CRC(fb721236) SHA1(33ef355913b8acb5017a24ca1c46dec1c391a528) ) @@ -3006,16 +3712,16 @@ ROM_LOAD( "pokclr.u28", 0x0000, 0x0100, CRC(a8191ef7) SHA1(d6f777980179ab091e2713ee815d46bf9c0ac486) ) ROM_END -ROM_START( comg168 ) /* Cal Omega v16.8 (Keno) */ +ROM_START( comg168 ) // Cal Omega v16.8 (Keno) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_FILL( 0x1800, 0x0800, 0xff ) /* empty socket */ + ROM_FILL( 0x1800, 0x0800, 0xff ) // empty socket ROM_LOAD( "16-82.u6", 0x2000, 0x0800, CRC(ba044cd6) SHA1(659ec979e61baf4e871af857b722bb6fd789ff75) ) ROM_LOAD( "16-83.u7", 0x2800, 0x0800, CRC(e3326b68) SHA1(7326f87319c363161ba8571dd983b070ef4f8694) ) ROM_LOAD( "16-84.u8", 0x3000, 0x0800, CRC(1f72acea) SHA1(26d0e5a36f14ccae22d216a13d0459f0389ea6c0) ) ROM_LOAD( "16-85.u9", 0x3800, 0x0800, CRC(4f38e3b3) SHA1(4d034959f665f0fdb5a4df85bae67dbd3d38077f) ) ROM_REGION( 0x0800, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x0800, 0xff ) /* empty socket (requested by the manual) */ + ROM_FILL( 0x0000, 0x0800, 0xff ) // empty socket (requested by the manual) ROM_REGION( 0x1800, "gfx2", 0 ) ROM_LOAD( "kcgc.u70", 0x0000, 0x0800, CRC(fb721236) SHA1(33ef355913b8acb5017a24ca1c46dec1c391a528) ) @@ -3026,10 +3732,10 @@ ROM_LOAD( "pokclr.u28", 0x0000, 0x0100, CRC(a8191ef7) SHA1(d6f777980179ab091e2713ee815d46bf9c0ac486) ) ROM_END -ROM_START( comg172 ) /* Cal Omega v17.2 (Double Double Poker) */ +ROM_START( comg172 ) // Cal Omega v17.2 (Double Double Poker) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_FILL( 0x3000, 0x1000, 0xff ) /* empty socket */ - ROM_FILL( 0x4000, 0x1000, 0xff ) /* empty socket */ + ROM_FILL( 0x3000, 0x1000, 0xff ) // empty socket + ROM_FILL( 0x4000, 0x1000, 0xff ) // empty socket ROM_LOAD( "17-23.u7", 0x5000, 0x1000, CRC(96efc8d1) SHA1(96836ca7188dc53e3a8af64f1fed9fe1c0c4e056) ) ROM_LOAD( "17-24.u8", 0x6000, 0x1000, CRC(08d31a98) SHA1(85e23ffeb8fa82ec0155f54d2193511517e6ec8c) ) ROM_LOAD( "17-25.u9", 0x7000, 0x1000, CRC(82508c71) SHA1(dd44e949f36e04ceaf1e527615c7003d0a9c0073) ) @@ -3046,7 +3752,7 @@ ROM_LOAD( "wldclr.u28", 0x0000, 0x0100, CRC(a26a8fae) SHA1(d570fe9443a0912bd34b81ac4c3e4c5f8901f523) ) ROM_END -ROM_START( comg175 ) /* Cal Omega v17.5 (Gaming Draw Poker) */ +ROM_START( comg175 ) // Cal Omega v17.5 (Gaming Draw Poker) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "17-51.u5", 0x1800, 0x0800, CRC(5450b90a) SHA1(4e67a17b2353bbe89fb6be4951efd09a948a987e) ) ROM_LOAD( "17-52.u6", 0x2000, 0x0800, CRC(29d787fd) SHA1(3f8c46f928c7fc3e68fe47efe23505f393bdb577) ) @@ -3066,7 +3772,7 @@ ROM_LOAD( "pokclr.u28", 0x0000, 0x0100, CRC(a8191ef7) SHA1(d6f777980179ab091e2713ee815d46bf9c0ac486) ) ROM_END -ROM_START( comg176 ) /* Cal Omega 17.6 (Nudge Keno) */ +ROM_START( comg176 ) // Cal Omega 17.6 (Nudge Keno) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "17-61.u5", 0x1800, 0x0800, CRC(7b201d27) SHA1(142d25c424e6bfd4327bb796f8dc9d0e6cb21797) ) ROM_LOAD( "17-62.u6", 0x2000, 0x0800, CRC(0ce87971) SHA1(ad1fecf4ed34eccd2a5b09e8847cb4a011875b73) ) @@ -3086,9 +3792,9 @@ ROM_LOAD( "bclr.u28", 0x0000, 0x0100, CRC(0ec45d01) SHA1(da73ae7e1c74913921dc378a97795c6da47dcbfb) ) ROM_END -ROM_START( comg181 ) /* Cal Omega 18.1 (Nudge Keno) */ +ROM_START( comg181 ) // Cal Omega 18.1 (Nudge Keno) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_FILL( 0x1800, 0x0800, 0xff ) /* empty socket */ + ROM_FILL( 0x1800, 0x0800, 0xff ) // empty socket ROM_LOAD( "18-12.u6", 0x2000, 0x0800, CRC(dd867180) SHA1(caf703f45dea980e84fc29d2ea0d3f4e211aaa3f) ) ROM_LOAD( "18-13.u7", 0x2800, 0x0800, CRC(39ccbddd) SHA1(1c027957ad6a3346dd3bcc0b422d2e854c6f5439) ) ROM_LOAD( "18-14.u8", 0x3000, 0x0800, CRC(ddf23ef1) SHA1(8340a2b0125e42602045fea2a248f1ec9e9915c0) ) @@ -3106,9 +3812,9 @@ ROM_LOAD( "bclr.u28", 0x0000, 0x0100, CRC(0ec45d01) SHA1(da73ae7e1c74913921dc378a97795c6da47dcbfb) ) ROM_END -ROM_START( comg183 ) /* Cal Omega v18.3 (Pixels) */ +ROM_START( comg183 ) // Cal Omega v18.3 (Pixels) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_FILL( 0x3000, 0x1000, 0xff ) /* empty socket */ + ROM_FILL( 0x3000, 0x1000, 0xff ) // empty socket ROM_LOAD( "18-32.u6", 0x4000, 0x1000, CRC(c793ffc1) SHA1(f2ef82f92a9e18128d28973bcf050d0c3e1819f3) ) ROM_LOAD( "18-33.u7", 0x5000, 0x1000, CRC(415a6599) SHA1(648986310a3864652897e5d18b8be06819cce7a8) ) ROM_LOAD( "18-34.u8", 0x6000, 0x1000, CRC(fc5d3b89) SHA1(3601401d00d7a0621eac4254da238e9c8929cac4) ) @@ -3126,9 +3832,9 @@ ROM_LOAD( "pixclr.u28", 0x0000, 0x0100, CRC(67d23e76) SHA1(826cf77ca5a4d492d66e45ee96a7780a94fbe634) ) ROM_END -ROM_START( comg185 ) /* Cal Omega v18.5 (Pixels) */ +ROM_START( comg185 ) // Cal Omega v18.5 (Pixels) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_FILL( 0x3000, 0x1000, 0xff ) /* empty socket */ + ROM_FILL( 0x3000, 0x1000, 0xff ) // empty socket ROM_LOAD( "18-52.u6", 0x4000, 0x1000, CRC(19225f7d) SHA1(73d713ee86886f935d9b2c2ca670d8e00d466b7f) ) ROM_LOAD( "18-53.u7", 0x5000, 0x1000, CRC(797e2b70) SHA1(83f974c6c1886eab5c90782766b72900c73045e1) ) ROM_LOAD( "18-54.u8", 0x6000, 0x1000, CRC(6becc802) SHA1(e72783db52bffd3fa2f7d35cd8a004415e37b004) ) @@ -3146,9 +3852,9 @@ ROM_LOAD( "pixclr.u28", 0x0000, 0x0100, CRC(67d23e76) SHA1(826cf77ca5a4d492d66e45ee96a7780a94fbe634) ) ROM_END -ROM_START( comg186 ) /* Cal Omega v18.6 (Pixels) */ +ROM_START( comg186 ) // Cal Omega v18.6 (Pixels) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_FILL( 0x3000, 0x1000, 0xff ) /* empty socket */ + ROM_FILL( 0x3000, 0x1000, 0xff ) // empty socket ROM_LOAD( "18-62.u6", 0x4000, 0x1000, CRC(025f4268) SHA1(750a5417fe2b077893d8252dd5eafc42fafd965e) ) ROM_LOAD( "18-63.u7", 0x5000, 0x1000, CRC(948a6ef1) SHA1(6aeb244209f3376042a32d9accb38e3f09cb192a) ) ROM_LOAD( "18-64.u8", 0x6000, 0x1000, CRC(9fb6e82b) SHA1(db38564e8060f1c67183f3f412a24439b2253e13) ) @@ -3166,10 +3872,10 @@ ROM_LOAD( "pixclr.u28", 0x0000, 0x0100, CRC(67d23e76) SHA1(826cf77ca5a4d492d66e45ee96a7780a94fbe634) ) ROM_END -ROM_START( comg187 ) /* Cal Omega v18.7 (Amusement Poker) */ +ROM_START( comg187 ) // Cal Omega v18.7 (Amusement Poker) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_FILL( 0x3000, 0x1000, 0xff ) /* empty socket */ - ROM_LOAD( "18-72.u6", 0x4000, 0x1000, BAD_DUMP CRC(1a4bd46a) SHA1(76101271ff9b98c3310e1666dfba34a01a0f0bcd) ) /* 1st half seems to be the 2nd one, and 2nd half is filled of 0xff */ + ROM_FILL( 0x3000, 0x1000, 0xff ) // empty socket + ROM_LOAD( "18-72.u6", 0x4000, 0x1000, BAD_DUMP CRC(1a4bd46a) SHA1(76101271ff9b98c3310e1666dfba34a01a0f0bcd) ) // 1st half seems to be the 2nd one, and 2nd half is filled of 0xff ROM_LOAD( "18-73.u7", 0x5000, 0x1000, CRC(ca374ecb) SHA1(113495afa88da97cb7239f645fabba7125ce2b4b) ) ROM_LOAD( "18-74.u8", 0x6000, 0x1000, CRC(5bb57ca8) SHA1(22dc6f0e2fee5408fa70e4bc60f1833534ee038f) ) ROM_LOAD( "18-75.u9", 0x7000, 0x1000, CRC(70a8ccb3) SHA1(b5b7d6a8262ab6e47a1400681c414fd3edd0d7a8) ) @@ -3186,7 +3892,7 @@ ROM_LOAD( "mltclr.u28", 0x0000, 0x0100, CRC(fefb0fa8) SHA1(66d86aa19d9d37ffd2840d6653fcec667bc716d4) ) ROM_END -ROM_START( comg204 ) /* Cal Omega v20.4 (Super Blackjack) */ +ROM_START( comg204 ) // Cal Omega v20.4 (Super Blackjack) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "20-41.u5", 0x3000, 0x1000, CRC(9c2203f7) SHA1(fd566683e887cf80cd0e6c82a413aebc378397f8) ) ROM_LOAD( "20-42.u6", 0x4000, 0x1000, CRC(31b37010) SHA1(c35ef77725c6c6dd9f369d50d9a8e55c2e3644af) ) @@ -3206,7 +3912,7 @@ ROM_LOAD( "mltclr.u28", 0x0000, 0x0100, CRC(fefb0fa8) SHA1(66d86aa19d9d37ffd2840d6653fcec667bc716d4) ) ROM_END -ROM_START( comg208 ) /* Cal Omega v20.8 (Winner's Choice) */ +ROM_START( comg208 ) // Cal Omega v20.8 (Winner's Choice) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "20-81.u5", 0x3000, 0x1000, CRC(938be03a) SHA1(606252b5160a7af340faa3d4ed6af9dff849c9ac) ) ROM_LOAD( "20-82.u6", 0x4000, 0x1000, CRC(7d42257c) SHA1(f1487bcc2475d1bcdfbc9bf866adcb0d510acef5) ) @@ -3226,10 +3932,10 @@ ROM_LOAD( "mltclr.u28", 0x0000, 0x0100, CRC(fefb0fa8) SHA1(66d86aa19d9d37ffd2840d6653fcec667bc716d4) ) ROM_END -ROM_START( comg227 ) /* Cal Omega v22.7 (Amusement Poker (Double Double)) */ +ROM_START( comg227 ) // Cal Omega v22.7 (Amusement Poker (Double Double)) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_FILL( 0x3000, 0x1000, 0xff ) /* empty socket */ - ROM_FILL( 0x4000, 0x1000, 0xff ) /* empty socket */ + ROM_FILL( 0x3000, 0x1000, 0xff ) // empty socket + ROM_FILL( 0x4000, 0x1000, 0xff ) // empty socket ROM_LOAD( "22-73.u7", 0x5000, 0x1000, CRC(152d1ff9) SHA1(8bbfea1bae9e4fe2a2ac52507dc8dd0e33fbbd06) ) ROM_LOAD( "22-74.u8", 0x6000, 0x1000, CRC(3af0f69d) SHA1(c34a0eab3ad4e4db310727805ba1ddc73533bfa6) ) ROM_LOAD( "22-75.u9", 0x7000, 0x1000, CRC(d1f3fe24) SHA1(8b43b521fb1be8ef4286b4bfee99b654c49cf9de) ) @@ -3246,9 +3952,9 @@ ROM_LOAD( "wldclr.u28", 0x0000, 0x0100, CRC(a26a8fae) SHA1(d570fe9443a0912bd34b81ac4c3e4c5f8901f523) ) ROM_END -ROM_START( comg230 ) /* Cal Omega v23.0 (FC Bingo (4-card)) */ +ROM_START( comg230 ) // Cal Omega v23.0 (FC Bingo (4-card)) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_FILL( 0x3000, 0x1000, 0xff ) /* empty socket */ + ROM_FILL( 0x3000, 0x1000, 0xff ) // empty socket ROM_LOAD( "23-02.u6", 0x4000, 0x1000, BAD_DUMP CRC(f154670a) SHA1(e0c66649d1434eca3435033a32634cb90cef0f31) ) ROM_LOAD( "23-03.u7", 0x5000, 0x1000, BAD_DUMP CRC(daf93757) SHA1(27d57007a24a5f892f7ee201072fcd5817373cad) ) ROM_LOAD( "23-04.u8", 0x6000, 0x1000, CRC(ebb5531a) SHA1(9fd003fcba5a5120332bcbd3c845d555c60875e9) ) @@ -3266,9 +3972,9 @@ ROM_LOAD( "fcbclr.u28", 0x0000, 0x0100, BAD_DUMP CRC(6db5a344) SHA1(5f1a81ac02a2a74252decd3bb95a5436cc943930) ) ROM_END -ROM_START( comg236 ) /* Cal Omega v23.6 (Hotline) */ +ROM_START( comg236 ) // Cal Omega v23.6 (Hotline) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_FILL( 0x3000, 0x1000, 0xff ) /* empty socket */ + ROM_FILL( 0x3000, 0x1000, 0xff ) // empty socket ROM_LOAD( "23-62.u6", 0x4000, 0x1000, CRC(6f3dd409) SHA1(8112c3114609317fe5543bf26fa426d36d60c5e1) ) ROM_LOAD( "23-63.u7", 0x5000, 0x1000, CRC(76e96865) SHA1(03055751efa143cff0501aaa9b2beb9d533e13e7) ) ROM_LOAD( "23-64.u8", 0x6000, 0x1000, CRC(26a18d82) SHA1(1ca036c014f180fb1720150642be3986c053c1c9) ) @@ -3319,7 +4025,7 @@ */ -ROM_START( comg239 ) /* Cal Omega v23.9 (Gaming Draw Poker) */ +ROM_START( comg239 ) // Cal Omega v23.9 (Gaming Draw Poker) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "23-91.u5", 0x1800, 0x0800, CRC(b49035e2) SHA1(b94a0245ca64d15b1496d1b272ffc0ce80f85526) ) ROM_LOAD( "23-92.u6", 0x2000, 0x0800, CRC(d9ffaa73) SHA1(e39d10121e16f89cd8d30a5391a14dc3d4b13a46) ) @@ -3339,7 +4045,7 @@ ROM_LOAD( "82s129n.u28", 0x0000, 0x0100, CRC(6db5a344) SHA1(5f1a81ac02a2a74252decd3bb95a5436cc943930) ) ROM_END -ROM_START( comg240 ) /* Cal Omega v24.0 (Gaming Draw Poker) */ +ROM_START( comg240 ) // Cal Omega v24.0 (Gaming Draw Poker) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "24-01.u5", 0x1800, 0x0800, CRC(445e4e1e) SHA1(11f1b2652fce0e507bde66296f57d689a8460df5) ) ROM_LOAD( "24-02.u6", 0x2000, 0x0800, CRC(53ef572d) SHA1(14c99f94a22d93de998f6418ea9dc3eab5119a82) ) @@ -3355,13 +4061,13 @@ ROM_LOAD( "cgb.u69", 0x0800, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) ROM_LOAD( "cga.u68", 0x1000, 0x0800, CRC(6e3e9b1d) SHA1(14eb8d14ce16719a6ad7d13db01e47c8f05955f0) ) - ROM_REGION( 0x100, "proms", 0 ) /* is this prom ok? */ + ROM_REGION( 0x100, "proms", 0 ) // is this prom ok? ROM_LOAD( "pok-6301.u28", 0x0000, 0x0100, CRC(56c2577b) SHA1(cb75882067e1e0d9f9369a37b5a829dd091d473e) ) ROM_END -ROM_START( comg246 ) /* Cal Omega v24.6 (Hotline) */ +ROM_START( comg246 ) // Cal Omega v24.6 (Hotline) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_FILL( 0x3000, 0x1000, 0xff ) /* empty socket */ + ROM_FILL( 0x3000, 0x1000, 0xff ) // empty socket ROM_LOAD( "24-62.u6", 0x4000, 0x1000, CRC(41f7b882) SHA1(4b532d70d5a7101952085a8fcdc0568c4266a72a) ) ROM_LOAD( "24-63.u7", 0x5000, 0x1000, CRC(226580b7) SHA1(07e6332ace45e0ced57aed6e348ab12c1f07ff34) ) ROM_LOAD( "24-64.u8", 0x6000, 0x1000, CRC(bf402e32) SHA1(436670b8f37caac14bb578a31dddbc0e2b0fd1ae) ) @@ -3379,16 +4085,16 @@ ROM_LOAD( "hlclr.u28", 0x0000, 0x0100, CRC(1c994cda) SHA1(5c8698b4c5e43146106c9da8a306e3099b26ca2d) ) ROM_END -ROM_START( comg272a ) /* Cal Omega v27.2 (Keno (amusement)) */ +ROM_START( comg272a ) // Cal Omega v27.2 (Keno (amusement)) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_FILL( 0x1800, 0x0800, 0xff ) /* empty socket */ + ROM_FILL( 0x1800, 0x0800, 0xff ) // empty socket ROM_LOAD( "27-22.u6", 0x2000, 0x0800, CRC(db3e1918) SHA1(4b8f33103f093ddbe750b536abc4545cf262d2e5) ) ROM_LOAD( "27-23.u7", 0x2800, 0x0800, CRC(c9e9cfd8) SHA1(dd0615ac579331330bda070f9ed68d7972436781) ) ROM_LOAD( "27-24.u8", 0x3000, 0x0800, CRC(d3fbab7f) SHA1(805510356bd52cf698a838daeaf16096eedcfd37) ) ROM_LOAD( "27-25.u9", 0x3800, 0x0800, CRC(22dc5b5e) SHA1(4442b7ac0516fdad8c81687fa9683eeace5b6c2d) ) ROM_REGION( 0x0800, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x0800, 0xff ) /* empty socket (requested by the manual) */ + ROM_FILL( 0x0000, 0x0800, 0xff ) // empty socket (requested by the manual) ROM_REGION( 0x1800, "gfx2", 0 ) ROM_LOAD( "kcgc.u70", 0x0000, 0x0800, CRC(fb721236) SHA1(33ef355913b8acb5017a24ca1c46dec1c391a528) ) @@ -3399,16 +4105,16 @@ ROM_LOAD( "pokclr.u28", 0x0000, 0x0100, CRC(a8191ef7) SHA1(d6f777980179ab091e2713ee815d46bf9c0ac486) ) ROM_END -ROM_START( comg272b ) /* Cal Omega v27.2 (Keno (gaming)) */ +ROM_START( comg272b ) // Cal Omega v27.2 (Keno (gaming)) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_FILL( 0x1800, 0x0800, 0xff ) /* empty socket */ + ROM_FILL( 0x1800, 0x0800, 0xff ) // empty socket ROM_LOAD( "27-22m.u6", 0x2000, 0x0800, CRC(6dc6ec9c) SHA1(dd80d0e544ad51d1b950970e735d7ce1e05062e3) ) ROM_LOAD( "27-23m.u7", 0x2800, 0x0800, CRC(242ce2ed) SHA1(e114cec7eb7554de14561e7c0e6aed01d7e72ca6) ) ROM_LOAD( "27-24m.u8", 0x3000, 0x0800, CRC(e191b0e1) SHA1(cc476efa194c1b2cd0035e9b4725e81d3a6f381c) ) ROM_LOAD( "27-25m.u9", 0x3800, 0x0800, CRC(4152b53d) SHA1(6fe577045d03362b8b988c7a9cd0542c9a20d7a7) ) ROM_REGION( 0x0800, "gfx1", 0 ) - ROM_FILL( 0x0000, 0x0800, 0xff ) /* empty socket (requested by the manual) */ + ROM_FILL( 0x0000, 0x0800, 0xff ) // empty socket (requested by the manual) ROM_REGION( 0x1800, "gfx2", 0 ) ROM_LOAD( "kcgc.u70", 0x0000, 0x0800, CRC(fb721236) SHA1(33ef355913b8acb5017a24ca1c46dec1c391a528) ) @@ -3425,14 +4131,14 @@ Jacks or Better V 51.08 Pay Schedule 05F Controled by EPR1- 50.081 - 906 board + 906-III board PROMS 2764 */ -ROM_START( comg5108 ) /* Cal Omega v51.08 (Gaming Poker) */ +ROM_START( comg5108 ) // Cal Omega v51.08 (Poker) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD( "epr1.u28", 0x6000, 0x2000, CRC(3d6abca9) SHA1(54a802f89bd64380abf269a2b507513c8db5319b) ) /* checked in offset $8034 */ + ROM_LOAD( "epr1.u28", 0x6000, 0x2000, CRC(3d6abca9) SHA1(54a802f89bd64380abf269a2b507513c8db5319b) ) // checked in offset $8034 ROM_LOAD( "epr2.u29", 0x8000, 0x2000, CRC(72cf8376) SHA1(fa1682244402e1b36164c670241f585bf4017ad9) ) ROM_LOAD( "epr3.u30", 0xa000, 0x2000, CRC(c79957e5) SHA1(64afdedf5369d56790e9ae7a8d3be5f52125ca1f) ) ROM_LOAD( "epr4.u31", 0xc000, 0x2000, CRC(eb0b0a86) SHA1(4fd29700db8fe183392cc66a54a128657c7e05e0) ) @@ -3443,7 +4149,7 @@ ROM_LOAD( "cg2b.u5", 0x2000, 0x2000, CRC(1f79f76d) SHA1(b2bce60e24dd61977f7bf6ee4705ca7d104ab388) ) ROM_LOAD( "cg2a.u6", 0x4000, 0x2000, CRC(d5fd9fc2) SHA1(68472e7271f835656197109620bb3988fc52308a) ) - ROM_REGION( 0x200, "proms", 0 ) /* from other set, upper half is empty */ + ROM_REGION( 0x200, "proms", 0 ) // from other set, second half is empty ROM_LOAD( "bprom.u16", 0x0000, 0x0200, CRC(a6d43709) SHA1(cbff2cb60137462dc0b7c7719a64574218d96c62) ) ROM_END @@ -3451,37 +4157,37 @@ /*********************** Diagnostic PROMs ***********************/ -ROM_START( comg903d ) /* Cal Omega 903d (System 903 diag.PROM) */ +ROM_START( comg903d ) // Cal Omega 903d (System 903 diag.PROM) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_FILL( 0x1800, 0x0800, 0xff ) /* empty socket (requested by the manual) */ - ROM_FILL( 0x2000, 0x0800, 0xff ) /* empty socket (requested by the manual) */ - ROM_FILL( 0x2800, 0x0800, 0xff ) /* empty socket (requested by the manual) */ - ROM_FILL( 0x3000, 0x0800, 0xff ) /* empty socket (requested by the manual) */ + ROM_FILL( 0x1800, 0x0800, 0xff ) // empty socket (requested by the manual) + ROM_FILL( 0x2000, 0x0800, 0xff ) // empty socket (requested by the manual) + ROM_FILL( 0x2800, 0x0800, 0xff ) // empty socket (requested by the manual) + ROM_FILL( 0x3000, 0x0800, 0xff ) // empty socket (requested by the manual) ROM_LOAD( "903diag.u9", 0x3800, 0x0800, CRC(f8092cea) SHA1(0c864419a4e1956c030b185739eca59313f20e8a) ) ROM_REGION( 0x0800, "gfx1", 0 ) ROM_LOAD( "testcg0.u67", 0x0000, 0x0800, CRC(b626ad89) SHA1(551b75f4559d11a4f8f56e38982114a21c77d4e7) ) ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_FILL( 0x0000, 0x1800, 0xff ) /* removed all ROMs (requested by the manual) */ + ROM_FILL( 0x0000, 0x1800, 0xff ) // removed all ROMs (requested by the manual) ROM_REGION( 0x100, "proms", 0 ) ROM_LOAD( "testclr.u28", 0x0000, 0x0100, CRC(a8191ef7) SHA1(d6f777980179ab091e2713ee815d46bf9c0ac486) ) ROM_END -ROM_START( comg905d ) /* Cal Omega 905d (System 905 diag.PROM) */ +ROM_START( comg905d ) // Cal Omega 905d (System 905 diag.PROM) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_FILL( 0x3000, 0x1000, 0xff ) /* empty socket (requested by the manual) */ - ROM_FILL( 0x4000, 0x1000, 0xff ) /* empty socket (requested by the manual) */ - ROM_FILL( 0x5000, 0x1000, 0xff ) /* empty socket (requested by the manual) */ - ROM_FILL( 0x6000, 0x1000, 0xff ) /* empty socket (requested by the manual) */ + ROM_FILL( 0x3000, 0x1000, 0xff ) // empty socket (requested by the manual) + ROM_FILL( 0x4000, 0x1000, 0xff ) // empty socket (requested by the manual) + ROM_FILL( 0x5000, 0x1000, 0xff ) // empty socket (requested by the manual) + ROM_FILL( 0x6000, 0x1000, 0xff ) // empty socket (requested by the manual) ROM_LOAD( "905diag.u9", 0x7000, 0x1000, CRC(6c20dbc7) SHA1(dbab0d2cf07bade2e3619bd5f29d406f3498a278) ) ROM_REGION( 0x0800, "gfx1", 0 ) ROM_LOAD( "testcg0.u67", 0x0000, 0x0800, CRC(b626ad89) SHA1(551b75f4559d11a4f8f56e38982114a21c77d4e7) ) ROM_REGION( 0x1800, "gfx2", 0 ) - ROM_FILL( 0x0000, 0x1800, 0xff ) /* removed all ROMs (requested by the manual) */ + ROM_FILL( 0x0000, 0x1800, 0xff ) // removed all ROMs (requested by the manual) ROM_REGION( 0x100, "proms", 0 ) ROM_LOAD( "testclr.u28", 0x0000, 0x0100, CRC(a8191ef7) SHA1(d6f777980179ab091e2713ee815d46bf9c0ac486) ) @@ -3520,7 +4226,7 @@ ROM_START( elgrande ) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_FILL( 0x1800, 0x0800, 0xff ) /* empty socket */ + ROM_FILL( 0x1800, 0x0800, 0xff ) // empty socket ROM_LOAD( "d1.u6", 0x2000, 0x0800, CRC(8b6b505c) SHA1(5f89bb1b50b9dfacf23c50e3016b9258b0e15084) ) ROM_LOAD( "d1.u7", 0x2800, 0x0800, CRC(d803a978) SHA1(682b73c968ef57007397d3e5eb0e78a97722da5e) ) ROM_LOAD( "d1.u8", 0x3000, 0x0800, CRC(291fa93b) SHA1(1d57f736b11ddc916effde78e2cd08c313a62901) ) @@ -3538,7 +4244,7 @@ ROM_LOAD( "d1.u28", 0x0000, 0x0100, CRC(a26a8fae) SHA1(d570fe9443a0912bd34b81ac4c3e4c5f8901f523) ) ROM_END -ROM_START( jjpoker ) /* tuni-83 */ +ROM_START( jjpoker ) // tuni-83 ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "tuni-83.u5", 0x1800, 0x0800, CRC(46c542ee) SHA1(0b3832d8ab69427298de03d18984a220a9a35c30) ) ROM_LOAD( "tuni-83.u6", 0x2000, 0x0800, CRC(e24b392a) SHA1(3b705b5cc60d2b33375f52958b72e70ce36fa216) ) @@ -3558,7 +4264,7 @@ ROM_LOAD( "tunipoker.u28", 0x0000, 0x0100, CRC(5101a33b) SHA1(a36bc421064d0ed96beb27b549f69adce0a553c2) ) ROM_END -ROM_START( jjpokerb ) /* pokr_j */ +ROM_START( jjpokerb ) // pokr_j ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "pokr_j.01.u5", 0x1800, 0x0800, CRC(d0004eda) SHA1(2fd39213e3028066fd4f9b8db206f036b566e2f7) ) ROM_LOAD( "pokr_j.02.u6", 0x2000, 0x0800, CRC(6809ccd9) SHA1(2573194a13ddf0270bccd456bda84b822036c660) ) @@ -3578,7 +4284,7 @@ ROM_LOAD( "tunipoker.u28", 0x0000, 0x0100, CRC(5101a33b) SHA1(a36bc421064d0ed96beb27b549f69adce0a553c2) ) ROM_END -ROM_START( ssipkr24 ) /* pokr02_4 (gfx and prom from jjpoker) */ +ROM_START( ssipkr24 ) // pokr02_4 (gfx and prom from jjpoker) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "pokr02_4.01.u5", 0x1800, 0x0800, CRC(8adf1d6d) SHA1(d83677eed9426841767d947919f6da671b5fbed4) ) ROM_LOAD( "pokr02_4.02.u6", 0x2000, 0x0800, CRC(5298a01c) SHA1(a0085498699bc15cc6ada9e4e9541bd84b97eeae) ) @@ -3598,7 +4304,7 @@ ROM_LOAD( "tunipoker.u28", 0x0000, 0x0100, BAD_DUMP CRC(5101a33b) SHA1(a36bc421064d0ed96beb27b549f69adce0a553c2) ) ROM_END -ROM_START( ssipkr30 ) /* pokr03_0 (gfx and prom from jjpoker) */ +ROM_START( ssipkr30 ) // pokr03_0 (gfx and prom from jjpoker) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "pokr03_0.01.u5", 0x1800, 0x0800, CRC(db9581fe) SHA1(605b254e0ebb96423eb522ce75242083d70f01ca) ) ROM_LOAD( "pokr03_0.02.u6", 0x2000, 0x0800, CRC(861243ad) SHA1(290eba5c820177669e5adeac1e2f172b73789542) ) @@ -3618,7 +4324,7 @@ ROM_LOAD( "tunipoker.u28", 0x0000, 0x0100, BAD_DUMP CRC(5101a33b) SHA1(a36bc421064d0ed96beb27b549f69adce0a553c2) ) ROM_END -ROM_START( ssipkr40 ) /* (gfx and prom from jjpoker) */ +ROM_START( ssipkr40 ) // (gfx and prom from jjpoker) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "40-1.903.u5", 0x1800, 0x0800, CRC(461eb68c) SHA1(54781670930c723c993ca9ad80e06e38ddd2f035) ) ROM_LOAD( "40-2.903.u6", 0x2000, 0x0800, CRC(099094a9) SHA1(c5a6ccb5ec0bebc79ef0b9c98595ef87c65ce361) ) @@ -3638,6 +4344,84 @@ ROM_LOAD( "tunipoker.u28", 0x0000, 0x0100, BAD_DUMP CRC(5101a33b) SHA1(a36bc421064d0ed96beb27b549f69adce0a553c2) ) ROM_END +/* + Casino 21 + UMCM / IWC + Ver 30.08 + + Black Jack game. Spanish language. + It seems to run in 906-III hardware + +*/ +ROM_START( cas21iwc ) // UCMC Casino 21 + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "1.bin", 0x6000, 0x2000, CRC(c6c60700) SHA1(8c613211a22f5c23a9971092b996d29a4e0ae83d) ) // just tables and data to be checked. + ROM_LOAD( "2.bin", 0x8000, 0x2000, CRC(c7bc884e) SHA1(e3a610362dc04d977b8bbd8549b9ce26a716867f) ) + ROM_LOAD( "3.bin", 0xa000, 0x2000, CRC(2be52026) SHA1(8318b340e2a5b6127c459d140078d105f16d8f32) ) + ROM_LOAD( "4.bin", 0xc000, 0x2000, CRC(0289aeac) SHA1(44bbbf4703c5dee460915e44839a53b97797f09d) ) + ROM_LOAD( "5.bin", 0xe000, 0x2000, CRC(e53b0112) SHA1(cff4d2467a6e3d322cdf5ddd9034099c8a0b7a8c) ) + + ROM_REGION( 0x6000, "gfx1", 0 ) + ROM_LOAD( "cgc.bin", 0x0000, 0x2000, CRC(c69ab916) SHA1(316fabf35184007b29da91b3fec0a5c4ce8cded3) ) + ROM_LOAD( "cgb.bin", 0x2000, 0x2000, CRC(62630d24) SHA1(88e89b41cae02b34767fac0a75506ee44f033422) ) + ROM_LOAD( "cga.bin", 0x4000, 0x2000, CRC(ce444eb6) SHA1(3d8c6f047c141931e55ff9101832fa5cae73576d) ) + + ROM_REGION( 0x200, "proms", 0 ) + ROM_LOAD( "n82s129n.u16", 0x0000, 0x0100, CRC(a26a8fae) SHA1(d570fe9443a0912bd34b81ac4c3e4c5f8901f523) ) +ROM_END + +/* + Poker + UCMC / IWC + Ver 162.03 + + Poker game. Spanish language. + It seems to run in 906-III hardware + +*/ +ROM_START( pokeriwc ) // UCMC Poker (ver 162.03) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "numeral_1.bin", 0x6000, 0x2000, CRC(c099dc4c) SHA1(4eec1fb0d8f1d2b31ac397991594e02bd9156348) ) // just tables and data to be checked. + ROM_LOAD( "numeral_2.bin", 0x8000, 0x2000, CRC(20d42fb2) SHA1(aae6704719b80f3c8c994d91ceebaae070d1153f) ) + ROM_LOAD( "numeral_3.bin", 0xa000, 0x2000, CRC(2cea3ba1) SHA1(c0edc7e9102744362bdca63a75c7ba344cbb0e6c) ) + ROM_LOAD( "numeral_4.bin", 0xc000, 0x2000, CRC(742676b0) SHA1(28f565fe75120000e049fb099bced4297a0bab1f) ) + ROM_LOAD( "numeral_5.bin", 0xe000, 0x2000, CRC(d9b7c85c) SHA1(bec03c0cef38d0d4a93a8ef4c4ddbed0b67ebaf3) ) + + ROM_REGION( 0x6000, "gfx1", 0 ) + ROM_LOAD( "cgc.bin", 0x0000, 0x2000, CRC(c69ab916) SHA1(316fabf35184007b29da91b3fec0a5c4ce8cded3) ) + ROM_LOAD( "cgb.bin", 0x2000, 0x2000, CRC(62630d24) SHA1(88e89b41cae02b34767fac0a75506ee44f033422) ) + ROM_LOAD( "cga.bin", 0x4000, 0x2000, CRC(ce444eb6) SHA1(3d8c6f047c141931e55ff9101832fa5cae73576d) ) + + ROM_REGION( 0x200, "proms", 0 ) // borrowed from other set, upper half is empty + ROM_LOAD( "n82s129n.u16", 0x0000, 0x0100, CRC(a26a8fae) SHA1(d570fe9443a0912bd34b81ac4c3e4c5f8901f523) ) +ROM_END + +/* + Poker + UCMC / IWC + Ver 162 20-6-91 + + Poker game. Spanish language. + It seems to run in 906-III hardware + +*/ +ROM_START( pokiwc162 ) // UCMC Poker (ver 162.03) alt. Joker Wild?... + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "j_k.u28", 0x6000, 0x2000, CRC(8a6e93b0) SHA1(a411cb4cd3980934cbc9b170b118348a9a4ac896) ) // just tables and data to be checked. + ROM_LOAD( "v162_n2_spanish_pok_20-6-91_iwc.u29", 0x8000, 0x2000, CRC(20d42fb2) SHA1(aae6704719b80f3c8c994d91ceebaae070d1153f) ) + ROM_LOAD( "v162_n3_spanish_pok_20-6-91_iwc.u30", 0xa000, 0x2000, CRC(2cea3ba1) SHA1(c0edc7e9102744362bdca63a75c7ba344cbb0e6c) ) + ROM_LOAD( "v162_n4_spanish_pok_20-6-91_iwc.u31", 0xc000, 0x2000, CRC(742676b0) SHA1(28f565fe75120000e049fb099bced4297a0bab1f) ) + ROM_LOAD( "v162_n5_spanish_pok_20-6-91_iwc.u32", 0xe000, 0x2000, CRC(d9b7c85c) SHA1(bec03c0cef38d0d4a93a8ef4c4ddbed0b67ebaf3) ) + + ROM_REGION( 0x6000, "gfx1", 0 ) + ROM_LOAD( "v162_cgc_iwc_argentina.u4", 0x0000, 0x2000, CRC(c69ab916) SHA1(316fabf35184007b29da91b3fec0a5c4ce8cded3) ) + ROM_LOAD( "v162_cgb_iwc_argentina.u5", 0x2000, 0x2000, CRC(62630d24) SHA1(88e89b41cae02b34767fac0a75506ee44f033422) ) + ROM_LOAD( "v162_cga_iwc_argentina.u6", 0x4000, 0x2000, CRC(ce444eb6) SHA1(3d8c6f047c141931e55ff9101832fa5cae73576d) ) + + ROM_REGION( 0x100, "proms", 0 ) + ROM_LOAD( "n82s129n.u16", 0x0000, 0x0100, CRC(a26a8fae) SHA1(d570fe9443a0912bd34b81ac4c3e4c5f8901f523) ) +ROM_END + /************************************************* * Driver Init * @@ -3669,65 +4453,131 @@ */ uint8_t *PRGROM = memregion( "maincpu" )->base(); - PRGROM[0x3ff8] = 0x8e; /* checked by code */ - PRGROM[0x3ff9] = 0x97; /* checked by code */ + PRGROM[0x3ff8] = 0x8e; // checked by code + PRGROM[0x3ff9] = 0x97; // checked by code - PRGROM[0x3ffc] = 0x42; /* Start vector */ + PRGROM[0x3ffc] = 0x42; // start vector PRGROM[0x3ffd] = 0x20; - PRGROM[0x3ffe] = 0xf8; /* NMI vector */ + PRGROM[0x3ffe] = 0xf8; // NMI vector PRGROM[0x3fff] = 0x26; } +void calomega_state::init_comg5108() +{ + uint8_t *PRGROM = memregion( "maincpu" )->base(); + PRGROM[0xc080] = 0xff; // CHECKSUM ERROR FLAG - No changes for now. + // Debug + // PRGROM[0xc080] = 0x00; // CHECKSUM ERROR FLAG (at start) + // PRGROM[0xbf0e] = 0x00; // CHECKSUM ERROR FLAG (on the fly) + // PRGROM[0xbfb4] = 0x00; // RAM ERROR FLAG + // PRGROM[0xb6A0] = 0x00; // ERROR LOW BATTERY FLAG + // PRGROM[0xb6AA] = 0x00; // ERROR LOW BATTERY FLAG +} + +void calomega_state::init_cas21iwc() +{ + uint8_t *PRGROM = memregion( "maincpu" )->base(); + + PRGROM[0xB603] = 0xff; // Checksum flag. No changes for now. +} + +void calomega_state::init_pokeriwc() +{ + uint8_t *PRGROM = memregion( "maincpu" )->base(); + + PRGROM[0x8000] = 0xa2; // Checksum flag. No changes for now. +} + +void calomega_state::init_any() +{ + uint8_t *PRGROM = memregion( "maincpu" )->base(); + + PRGROM[0x2e30] = 0xe0; //fix bad dump + PRGROM[0x2e31] = 0x12; + PRGROM[0x2e32] = 0x90; + PRGROM[0x2e33] = 0xf2; + PRGROM[0x2e34] = 0xad; + PRGROM[0x2e35] = 0xc4; + PRGROM[0x2e36] = 0x08; + PRGROM[0x2e37] = 0x29; + PRGROM[0x2e38] = 0x80; + PRGROM[0x2e39] = 0xd0; + PRGROM[0x2e3a] = 0x13; + PRGROM[0x2e3b] = 0xa0; + PRGROM[0x2e3c] = 0x00; + PRGROM[0x2e3d] = 0xa2; + PRGROM[0x2e3e] = 0x04; + PRGROM[0x2e3f] = 0xb9; + PRGROM[0x2e40] = 0x61; + + PRGROM[0x2dd6] = 0x10; + PRGROM[0x2dd7] = 0x99; + PRGROM[0x2dd8] = 0x60; + PRGROM[0x2dd9] = 0x11; + PRGROM[0x2ddd] = 0x99; + + + + +} + /************************************************* * Game Drivers * *************************************************/ -/* YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS */ -GAME( 1981, comg074, 0, sys903, comg074, calomega_state, init_sys903, ROT0, "Cal Omega Inc.", "Cal Omega - Game 7.4 (Gaming Poker, W.Export)", MACHINE_SUPPORTS_SAVE ) -GAME( 1981, comg076, 0, sys903, comg076, calomega_state, init_sys903, ROT0, "Cal Omega Inc.", "Cal Omega - Game 7.6 (Arcade Poker)", MACHINE_SUPPORTS_SAVE ) -GAME( 1981, comg079, 0, sys903, comg076, calomega_state, init_sys903, ROT0, "Cal Omega Inc.", "Cal Omega - Game 7.9 (Arcade Poker)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) /* bad dump */ -GAME( 1981, comg080, 0, sys903, arcadebj, calomega_state, init_comg080, ROT0, "Cal Omega Inc.", "Cal Omega - Game 8.0 (Arcade Black Jack)", MACHINE_SUPPORTS_SAVE ) /* bad dump */ -GAME( 1981, comg094, 0, sys903, stand903, calomega_state, init_sys903, ROT0, "Cal Omega Inc.", "Cal Omega - Game 9.4 (Keno)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) -GAME( 1982, comg107, 0, sys903, stand903, calomega_state, init_sys903, ROT0, "Cal Omega Inc.", "Cal Omega - Game 10.7c (Big Game)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) -GAME( 1982, comg123, 0, sys903, stand903, calomega_state, init_sys903, ROT0, "Cal Omega Inc.", "Cal Omega - Game 12.3 (Ticket Poker)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) /* bad dump */ -GAME( 1982, comg125, 0, sys903, stand903, calomega_state, init_sys903, ROT0, "Cal Omega Inc.", "Cal Omega - Game 12.5 (Bingo)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) -GAME( 1982, comg127, 0, sys903, stand903, calomega_state, init_sys903, ROT0, "Cal Omega Inc.", "Cal Omega - Game 12.7 (Keno)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) -GAME( 1982, comg128, 0, sys903, comg128, calomega_state, init_sys903, ROT0, "Cal Omega Inc.", "Cal Omega - Game 12.8 (Arcade Game)", MACHINE_SUPPORTS_SAVE ) -GAME( 1982, comg134, 0, sys903, stand903, calomega_state, init_sys903, ROT0, "Cal Omega Inc.", "Cal Omega - Game 13.4 (Nudge Bingo)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) -GAME( 1982, comg145, 0, sys903, stand903, calomega_state, init_sys903, ROT0, "Cal Omega Inc.", "Cal Omega - Game 14.5 (Pixels)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) -GAME( 1983, comg157, 0, sys903, stand903, calomega_state, init_sys903, ROT0, "Cal Omega Inc.", "Cal Omega - Game 15.7 (Double-Draw Poker)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) -GAME( 1983, comg159, 0, sys905, stand905, calomega_state, init_sys905, ROT0, "Cal Omega Inc.", "Cal Omega - Game 15.9 (Wild Double-Up)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) -GAME( 1983, comg164, 0, sys903, stand903, calomega_state, init_sys903, ROT0, "Cal Omega Inc.", "Cal Omega - Game 16.4 (Keno)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) /* incomplete dump */ -GAME( 1983, comg168, 0, sys903, stand903, calomega_state, init_sys903, ROT0, "Cal Omega Inc.", "Cal Omega - Game 16.8 (Keno)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) -GAME( 1983, comg172, 0, sys905, stand905, calomega_state, init_sys905, ROT0, "Cal Omega Inc.", "Cal Omega - Game 17.2 (Double Double Poker)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) -GAME( 1984, comg175, 0, sys903, gdrwpkrd, calomega_state, init_sys903, ROT0, "Cal Omega / Casino Electronics Inc.", "Cal Omega - Game 17.51 (Gaming Draw Poker)", MACHINE_SUPPORTS_SAVE ) -GAME( 1982, comg176, 0, sys903, stand903, calomega_state, init_sys903, ROT0, "Cal Omega Inc.", "Cal Omega - Game 17.6 (Nudge Bingo)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) -GAME( 1982, comg181, 0, sys903, stand903, calomega_state, init_sys903, ROT0, "Cal Omega Inc.", "Cal Omega - Game 18.1 (Nudge Bingo)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) -GAME( 1983, comg183, 0, sys905, stand905, calomega_state, init_sys905, ROT0, "Cal Omega Inc.", "Cal Omega - Game 18.3 (Pixels)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) -GAME( 1983, comg185, 0, sys905, stand905, calomega_state, init_sys905, ROT0, "Cal Omega Inc.", "Cal Omega - Game 18.5 (Pixels)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) -GAME( 1983, comg186, 0, sys905, stand905, calomega_state, init_sys905, ROT0, "Cal Omega Inc.", "Cal Omega - Game 18.6 (Pixels)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) -GAME( 1983, comg187, 0, sys905, stand905, calomega_state, init_sys905, ROT0, "Cal Omega Inc.", "Cal Omega - Game 18.7 (Amusement Poker)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) /* bad dump */ -GAME( 1984, comg204, 0, sys905, stand905, calomega_state, init_sys905, ROT0, "Cal Omega Inc.", "Cal Omega - Game 20.4 (Super Blackjack)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) -GAME( 1984, comg208, 0, sys905, stand905, calomega_state, init_sys905, ROT0, "Cal Omega Inc.", "Cal Omega - Game 20.8 (Winner's Choice)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) -GAME( 1984, comg227, 0, sys905, stand905, calomega_state, init_sys905, ROT0, "Cal Omega Inc.", "Cal Omega - Game 22.7 (Amusement Poker, d/d)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) -GAME( 1984, comg230, 0, sys905, stand905, calomega_state, init_sys905, ROT0, "Cal Omega Inc.", "Cal Omega - Game 23.0 (FC Bingo (4-card))", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) /* bad dump */ -GAME( 1984, comg236, 0, sys905, stand905, calomega_state, init_sys905, ROT0, "Cal Omega Inc.", "Cal Omega - Game 23.6 (Hotline)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) -GAME( 1985, comg239, 0, sys903, gdrwpkrd, calomega_state, init_sys903, ROT0, "Cal Omega / Casino Electronics Inc.", "Cal Omega - Game 23.9 (Gaming Draw Poker)", MACHINE_SUPPORTS_SAVE ) -GAME( 1985, comg240, 0, sys903, gdrwpkrh, calomega_state, init_sys903, ROT0, "Cal Omega / Casino Electronics Inc.", "Cal Omega - Game 24.0 (Gaming Draw Poker, hold)", MACHINE_SUPPORTS_SAVE ) -GAME( 1985, comg246, 0, sys905, stand905, calomega_state, init_sys905, ROT0, "Cal Omega Inc.", "Cal Omega - Game 24.6 (Hotline)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) -GAME( 1985, comg272a, 0, sys903, stand903, calomega_state, init_sys903, ROT0, "Cal Omega Inc.", "Cal Omega - Game 27.2 (Keno, amusement)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) -GAME( 1985, comg272b, 0, sys903, stand903, calomega_state, init_sys903, ROT0, "Cal Omega Inc.", "Cal Omega - Game 27.2 (Keno, gaming)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) -GAME( 198?, comg5108, 0, sys906, stand906, calomega_state, empty_init, ROT0, "Cal Omega / Casino Electronics Inc.", "Cal Omega - Game 51.08 (CEI Video Poker, Jacks or Better)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) - -/************ Diagnostic PROMs ************/ -GAME( 198?, comg903d, 0, sys903, stand903, calomega_state, init_sys903, ROT0, "Cal Omega Inc.", "Cal Omega - System 903 Diag.PROM", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) -GAME( 198?, comg905d, 0, sys905, stand905, calomega_state, init_sys905, ROT0, "Cal Omega Inc.", "Cal Omega - System 905 Diag.PROM", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) - -/****** Unofficial / 3rd part games *******/ -GAME( 1982, elgrande, 0, s903mod, elgrande, calomega_state, init_s903mod, ROT0, "Enter-Tech, Ltd. / Tuni Electro Service", "El Grande - 5 Card Draw (New)", MACHINE_SUPPORTS_SAVE ) -GAME( 1983, jjpoker, 0, s903mod, jjpoker, calomega_state, init_s903mod, ROT0, "Enter-Tech, Ltd.", "Jackpot Joker Poker (set 1)", MACHINE_SUPPORTS_SAVE ) -GAME( 1983, jjpokerb, jjpoker, s903mod, jjpoker, calomega_state, init_s903mod, ROT0, "Enter-Tech, Ltd.", "Jackpot Joker Poker (set 2)", MACHINE_SUPPORTS_SAVE ) -GAME( 1988, ssipkr24, 0, s903mod, ssipkr, calomega_state, init_s903mod, ROT0, "SSI", "SSI Poker (v2.4)", MACHINE_SUPPORTS_SAVE ) -GAME( 1988, ssipkr30, ssipkr24, s903mod, ssipkr, calomega_state, init_s903mod, ROT0, "SSI", "SSI Poker (v3.0)", MACHINE_SUPPORTS_SAVE ) -GAME( 1990, ssipkr40, ssipkr24, s903mod, ssipkr, calomega_state, init_s903mod, ROT0, "SSI", "SSI Poker (v4.0)", MACHINE_SUPPORTS_SAVE ) +// YEAR NAME PARENT MACHINE INPUT STATE INIT ROT COMPANY FULLNAME FLAGS */ +GAME( 1981, comg074, 0, sys903, comg074, calomega_state, init_sys903, ROT0, "Cal Omega Inc.", "Cal Omega - Game 7.4 (Gaming Poker, W.Export)", MACHINE_SUPPORTS_SAVE ) +GAME( 1981, comg076, 0, sys903, comg076, calomega_state, init_sys903, ROT0, "Cal Omega Inc.", "Cal Omega - Game 7.6 (Arcade Poker)", MACHINE_SUPPORTS_SAVE ) +GAME( 1981, comg079, 0, sys903, comg076, calomega_state, init_any , ROT0, "Cal Omega Inc.", "Cal Omega - Game 7.9 (Arcade Poker)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) /* bad dump */ +GAME( 1981, comg080, 0, sys903, arcadebj, calomega_state, init_comg080, ROT0, "Cal Omega Inc.", "Cal Omega - Game 8.0 (Arcade Black Jack)", MACHINE_SUPPORTS_SAVE ) /* bad dump */ +GAME( 1981, comg094, 0, sys903, stand903, calomega_state, init_sys903, ROT0, "Cal Omega Inc.", "Cal Omega - Game 9.4 (Keno)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) +GAME( 1982, comg107, 0, sys903, stand903, calomega_state, init_sys903, ROT0, "Cal Omega Inc.", "Cal Omega - Game 10.7c (Big Game)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) +GAME( 1982, comg123, 0, sys903, stand903, calomega_state, init_sys903, ROT0, "Cal Omega Inc.", "Cal Omega - Game 12.3 (Ticket Poker)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) /* bad dump */ +GAME( 1982, comg125, 0, sys903, stand903, calomega_state, init_sys903, ROT0, "Cal Omega Inc.", "Cal Omega - Game 12.5 (Bingo)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) +GAME( 1982, comg127, 0, sys903, stand903, calomega_state, init_sys903, ROT0, "Cal Omega Inc.", "Cal Omega - Game 12.7 (Keno)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) +GAME( 1982, comg128, 0, sys903, comg128, calomega_state, init_sys903, ROT0, "Cal Omega Inc.", "Cal Omega - Game 12.8 (Arcade Game)", MACHINE_SUPPORTS_SAVE ) +GAME( 1982, comg134, 0, sys903, stand903, calomega_state, init_sys903, ROT0, "Cal Omega Inc.", "Cal Omega - Game 13.4 (Nudge Bingo)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) +GAME( 1982, comg145, 0, sys903, stand903, calomega_state, init_sys903, ROT0, "Cal Omega Inc.", "Cal Omega - Game 14.5 (Pixels)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) +GAME( 1983, comg157, 0, sys903, comg157, calomega_state, init_sys903, ROT0, "Cal Omega Inc.", "Cal Omega - Game 15.7 (Double-Draw Poker)", MACHINE_SUPPORTS_SAVE ) +GAME( 1983, comg159, 0, sys905, comg159, calomega_state, init_sys905, ROT0, "Cal Omega Inc.", "Cal Omega - Game 15.9 (Wild Double-Up)", MACHINE_SUPPORTS_SAVE ) +GAME( 1983, comg164, 0, sys903, stand903, calomega_state, init_sys903, ROT0, "Cal Omega Inc.", "Cal Omega - Game 16.4 (Keno)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) /* incomplete dump */ +GAME( 1983, comg168, 0, sys903, stand903, calomega_state, init_sys903, ROT0, "Cal Omega Inc.", "Cal Omega - Game 16.8 (Keno)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) +GAME( 1983, comg172, 0, sys905, comg172, calomega_state, init_sys905, ROT0, "Cal Omega Inc.", "Cal Omega - Game 17.2 (Double Double Poker)", MACHINE_SUPPORTS_SAVE ) +GAME( 1984, comg175, 0, sys903, gdrwpkrd, calomega_state, init_sys903, ROT0, "Cal Omega / Casino Electronics Inc.", "Cal Omega - Game 17.51 (Gaming Draw Poker)", MACHINE_SUPPORTS_SAVE ) +GAME( 1982, comg176, 0, sys903, stand903, calomega_state, init_sys903, ROT0, "Cal Omega Inc.", "Cal Omega - Game 17.6 (Nudge Bingo)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) +GAME( 1982, comg181, 0, sys903, stand903, calomega_state, init_sys903, ROT0, "Cal Omega Inc.", "Cal Omega - Game 18.1 (Nudge Bingo)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) +GAME( 1983, comg183, 0, sys905, stand905, calomega_state, init_sys905, ROT0, "Cal Omega Inc.", "Cal Omega - Game 18.3 (Pixels)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) +GAME( 1983, comg185, 0, sys905, stand905, calomega_state, init_sys905, ROT0, "Cal Omega Inc.", "Cal Omega - Game 18.5 (Pixels)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) +GAME( 1983, comg186, 0, sys905, stand905, calomega_state, init_sys905, ROT0, "Cal Omega Inc.", "Cal Omega - Game 18.6 (Pixels)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) +GAME( 1983, comg187, 0, sys905, stand905, calomega_state, init_sys905, ROT0, "Cal Omega Inc.", "Cal Omega - Game 18.7 (Amusement Poker)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) /* bad dump */ +GAME( 1984, comg204, 0, sys905, stand905, calomega_state, init_sys905, ROT0, "Cal Omega Inc.", "Cal Omega - Game 20.4 (Super Blackjack)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) +GAME( 1984, comg208, 0, sys905, stand905, calomega_state, init_sys905, ROT0, "Cal Omega Inc.", "Cal Omega - Game 20.8 (Winner's Choice)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) +GAME( 1984, comg227, 0, sys905, stand905, calomega_state, init_sys905, ROT0, "Cal Omega Inc.", "Cal Omega - Game 22.7 (Amusement Poker, d/d)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) +GAME( 1984, comg230, 0, sys905, stand905, calomega_state, init_sys905, ROT0, "Cal Omega Inc.", "Cal Omega - Game 23.0 (FC Bingo (4-card))", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) /* bad dump */ +GAME( 1984, comg236, 0, sys905, stand905, calomega_state, init_sys905, ROT0, "Cal Omega Inc.", "Cal Omega - Game 23.6 (Hotline)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) +GAME( 1985, comg239, 0, sys903, gdrwpkrd, calomega_state, init_sys903, ROT0, "Cal Omega / Casino Electronics Inc.", "Cal Omega - Game 23.9 (Gaming Draw Poker)", MACHINE_SUPPORTS_SAVE ) +GAME( 1985, comg240, 0, sys903, gdrwpkrh, calomega_state, init_sys903, ROT0, "Cal Omega / Casino Electronics Inc.", "Cal Omega - Game 24.0 (Gaming Draw Poker, hold)", MACHINE_SUPPORTS_SAVE ) +GAME( 1985, comg246, 0, sys905, stand905, calomega_state, init_sys905, ROT0, "Cal Omega Inc.", "Cal Omega - Game 24.6 (Hotline)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) +GAME( 1985, comg272a, 0, sys903, stand903, calomega_state, init_sys903, ROT0, "Cal Omega Inc.", "Cal Omega - Game 27.2 (Keno, amusement)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) +GAME( 1985, comg272b, 0, sys903, stand903, calomega_state, init_sys903, ROT0, "Cal Omega Inc.", "Cal Omega - Game 27.2 (Keno, gaming)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) + +//************ Diagnostic Sets ************ +GAME( 198?, comg903d, 0, sys903, stand903, calomega_state, init_sys903, ROT0, "Cal Omega Inc.", "Cal Omega - System 903 Diag.PROM", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) +GAME( 198?, comg905d, 0, sys905, stand905, calomega_state, init_sys905, ROT0, "Cal Omega Inc.", "Cal Omega - System 905 Diag.PROM", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) + +//************* 906-III games ************** +GAME( 198?, comg5108, 0, sys906, stand906, calomega_state, init_comg5108, ROT0, "Casino Electronics Inc.", "CEI 51.08 (CEI 906-III Poker)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) + +//****** Unofficial 903/904/905 3rd part games ******* +GAME( 1982, elgrande, 0, s903mod, elgrande, calomega_state, init_s903mod, ROT0, "Enter-Tech, Ltd. / Tuni Electro Service", "El Grande - 5 Card Draw (New)", MACHINE_SUPPORTS_SAVE ) +GAME( 1983, jjpoker, 0, s903mod, jjpoker, calomega_state, init_s903mod, ROT0, "Enter-Tech, Ltd.", "Jackpot Joker Poker (set 1)", MACHINE_SUPPORTS_SAVE ) +GAME( 1983, jjpokerb, jjpoker, s903mod, jjpoker, calomega_state, init_s903mod, ROT0, "Enter-Tech, Ltd.", "Jackpot Joker Poker (set 2)", MACHINE_SUPPORTS_SAVE ) +GAME( 1988, ssipkr24, 0, s903mod, ssipkr, calomega_state, init_s903mod, ROT0, "SSI", "SSI Poker (v2.4)", MACHINE_SUPPORTS_SAVE ) +GAME( 1988, ssipkr30, ssipkr24, s903mod, ssipkr, calomega_state, init_s903mod, ROT0, "SSI", "SSI Poker (v3.0)", MACHINE_SUPPORTS_SAVE ) +GAME( 1990, ssipkr40, ssipkr24, s903mod, ssipkr, calomega_state, init_s903mod, ROT0, "SSI", "SSI Poker (v4.0)", MACHINE_SUPPORTS_SAVE ) + +//****** Unofficial 906-III family 3rd part games ******* +GAME( 1990, cas21iwc, 0, sys906, cas21iwc, calomega_state, init_cas21iwc, ROT0, "UCMC/IWC", "Casino 21 UCMC/IWC (ver 30.08)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) +GAME( 1991, pokeriwc, 0, sys906, pokeriwc, calomega_state, init_pokeriwc, ROT0, "UCMC/IWC", "Poker UCMC/IWC (ver 162.03)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) +GAME( 1991, pokiwc162, pokeriwc, sys906, pokeriwc, calomega_state, init_pokeriwc, ROT0, "UCMC/IWC", "Poker UCMC/IWC (ver 162.03 20-6-91)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/cc40.cpp mame-0.231+dfsg.1/src/mame/drivers/cc40.cpp --- mame-0.230+dfsg.1/src/mame/drivers/cc40.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/cc40.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -1,5 +1,6 @@ // license:BSD-3-Clause // copyright-holders:hap +// thanks-to:Jon Guidry /*************************************************************************** Texas Instruments Compact Computer 40 (aka CC-40) @@ -38,7 +39,7 @@ --------- HM6116LP-4 - Hitachi 2KB SRAM (newer 18KB version has two HM6264 8KB chips) - HN61256PC09 - Hitachi DIP-28 32KB CMOS Mask PROM + HN61256PC09 - Hitachi DIP-28 32KB CMOS Mask PROM (also seen with HN61256PB02, earlier version?) TMX70C20N2L - Texas Instruments TMS70C20 CPU (128 bytes RAM, 2KB ROM) @ 2.5MHz, 40 pins - "X" implies prototype AMI 1041036-1 - 68-pin QFP AMI Gate Array HD44100H - 60-pin QFP Hitachi HD44100 LCD Driver @@ -59,6 +60,15 @@ can be loaded. Load a program by pressing the [RUN] key while viewing the list, or manually with the command RUN "" + As for the CC-40+, the product was finalized, but in the end it wasn't released. + The hardware is very similar to CC-40. The main differences are the CPU: + a TMS70C40 (twice larger internal ROM), and a cassette port separate from Hexbus. + The controller chip is a TI TP0373 this time, it appears that the basic functionality + is the same as the one by AMI. Like the CC-40, it had either 6KB or 18KB RAM. + + The CC-40+ cassette device number is 1, eg. SAVE"1.FILENAME" to save, and + OLD"1.FILENAME" to load. + TODO: - external RAM cartridge (bus_control_w cartridge memory addressing) @@ -73,9 +83,11 @@ ***************************************************************************/ #include "emu.h" + #include "bus/generic/slot.h" #include "bus/generic/carts.h" #include "cpu/tms7000/tms7000.h" +#include "imagedev/cassette.h" #include "machine/nvram.h" #include "sound/dac.h" #include "video/hd44780.h" @@ -88,17 +100,21 @@ #include "cc40.lh" +namespace { + class cc40_state : public driver_device { public: cc40_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), + m_nvram(*this, "sysram.%u", 1U), + m_sysbank(*this, "sysbank"), + m_cartbank(*this, "cartbank"), m_cart(*this, "cartslot"), + m_cass(*this, "cassette"), m_key_matrix(*this, "IN.%u", 0), - m_battery_inp(*this, "BATTERY"), - m_nvram(*this, "sysram.%u", 1U), - m_lamps(*this, "lamp%u", 0U) + m_segs(*this, "seg%u", 0U) { m_sysram[0] = nullptr; m_sysram[1] = nullptr; @@ -107,13 +123,14 @@ DECLARE_INPUT_CHANGED_MEMBER(sysram_size_changed); void cc40(machine_config &config); + void cc40p(machine_config &config); protected: virtual void machine_reset() override; virtual void machine_start() override; + virtual void device_post_load() override; private: - void postload(); void init_sysram(int chip, u16 size); void update_lcd_indicator(u8 y, u8 x, int state); void update_clock_divider(); @@ -122,41 +139,46 @@ void sysram_w(offs_t offset, u8 data); u8 bus_control_r(); void bus_control_w(u8 data); + u8 power_r(); void power_w(u8 data); - u8 battery_r(); u8 bankswitch_r(); void bankswitch_w(u8 data); u8 clock_control_r(); void clock_control_w(u8 data); u8 keyboard_r(); void keyboard_w(u8 data); + u8 cass_r(); + void cass_w(u8 data); void cc40_palette(palette_device &palette) const; DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load); HD44780_PIXEL_UPDATE(cc40_pixel_update); - void main_map(address_map &map); + void cc40_map(address_map &map); + void cc40p_map(address_map &map); - required_device m_maincpu; + required_device m_maincpu; + required_device_array m_nvram; + required_memory_bank m_sysbank; + required_memory_bank m_cartbank; required_device m_cart; + optional_device m_cass; required_ioport_array<8> m_key_matrix; - required_ioport m_battery_inp; - required_device_array m_nvram; + output_finder<80> m_segs; memory_region *m_cart_rom; - u8 m_bus_control; - u8 m_power; - u8 m_banks; - u8 m_clock_control; - u8 m_clock_divider; - u8 m_key_select; + u8 m_bus_control = 0; + u8 m_power = 0; + u8 m_banks = 0; + u8 m_clock_control = 0; + u8 m_clock_divider = 0; + u8 m_key_select = 0; std::unique_ptr m_sysram[2]; u16 m_sysram_size[2]; u16 m_sysram_end[2]; u16 m_sysram_mask[2]; - output_finder<80> m_lamps; }; @@ -195,7 +217,7 @@ void cc40_state::cc40_palette(palette_device &palette) const { palette.set_pen_color(0, rgb_t(138, 146, 148)); // background - palette.set_pen_color(1, rgb_t(92, 83, 88)); // lcd pixel on + palette.set_pen_color(1, rgb_t(50, 45, 60)); // lcd pixel on palette.set_pen_color(2, rgb_t(131, 136, 139)); // lcd pixel off } @@ -207,7 +229,7 @@ // ---- raw lcd screen here ---- // under | ERROR v v v v v v _LOW // output# | 60 61 62 63 50 51 52 53 - m_lamps[y * 10 + x] = state ? 1 : 0; + m_segs[y * 10 + x] = state ? 1 : 0; } HD44780_PIXEL_UPDATE(cc40_state::cc40_pixel_update) @@ -290,6 +312,11 @@ m_bus_control = data; } +u8 cc40_state::power_r() +{ + return m_power; +} + void cc40_state::power_w(u8 data) { // d0: power-on hold latch @@ -300,12 +327,6 @@ m_maincpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); } -u8 cc40_state::battery_r() -{ - // d0: low battery sense line (0 = low power) - return m_battery_inp->read(); -} - u8 cc40_state::bankswitch_r() { return m_banks; @@ -316,11 +337,11 @@ data &= 0x0f; // d0-d1: system rom bankswitch - membank("sysbank")->set_entry(data & 3); + m_sysbank->set_entry(data & 3); // d2-d3: cartridge 32KB page bankswitch if (m_cart_rom) - membank("cartbank")->set_entry(data >> 2 & 3); + m_cartbank->set_entry(data >> 2 & 3); m_banks = data; } @@ -353,35 +374,50 @@ u8 cc40_state::keyboard_r() { - u8 ret = 0; + u8 data = 0; // read selected keyboard rows for (int i = 0; i < 8; i++) { if (m_key_select >> i & 1) - ret |= m_key_matrix[i]->read(); + data |= m_key_matrix[i]->read(); } - return ret; + return data; } void cc40_state::keyboard_w(u8 data) { - // d(0-7): select keyboard column + // d0-d7: select keyboard column m_key_select = data; } -void cc40_state::main_map(address_map &map) +u8 cc40_state::cass_r() +{ + // d3: cass data in + return (m_cass->input() > 0.04) ? 8 : 0; +} + +void cc40_state::cass_w(u8 data) +{ + // d4: cass motor + m_cass->set_motor((data & 0x10) ? 1 : 0); + + // d3: cass data out + m_cass->output((data & 8) ? +1.0 : -1.0); +} + +void cc40_state::cc40_map(address_map &map) { map.unmap_value_high(); map(0x0110, 0x0110).rw(FUNC(cc40_state::bus_control_r), FUNC(cc40_state::bus_control_w)); - map(0x0111, 0x0111).w(FUNC(cc40_state::power_w)); + map(0x0111, 0x0111).rw(FUNC(cc40_state::power_r), FUNC(cc40_state::power_w)); map(0x0112, 0x0112).noprw(); // d0-d3: Hexbus data map(0x0113, 0x0113).noprw(); // d0: Hexbus available map(0x0114, 0x0114).noprw(); // d0,d1: Hexbus handshake - map(0x0115, 0x0115).w("dac", FUNC(dac_bit_interface::data_w)); // d0: piezo control - map(0x0116, 0x0116).r(FUNC(cc40_state::battery_r)); + map(0x0115, 0x0115).w("dac", FUNC(dac_bit_interface::data_w)); + map(0x0116, 0x0116).portr("BATTERY"); map(0x0119, 0x0119).rw(FUNC(cc40_state::bankswitch_r), FUNC(cc40_state::bankswitch_w)); map(0x011a, 0x011a).rw(FUNC(cc40_state::clock_control_r), FUNC(cc40_state::clock_control_w)); map(0x011e, 0x011f).rw("hd44780", FUNC(hd44780_device::read), FUNC(hd44780_device::write)); @@ -392,6 +428,12 @@ map(0xd000, 0xefff).bankr("sysbank"); } +void cc40_state::cc40p_map(address_map &map) +{ + cc40_map(map); + map(0x0121, 0x0121).rw(FUNC(cc40_state::cass_r), FUNC(cc40_state::cass_w)); +} + /*************************************************************************** @@ -518,7 +560,6 @@ m_power = 1; update_clock_divider(); - bankswitch_w(0); } @@ -539,7 +580,7 @@ m_sysram_size[chip] = size; } -void cc40_state::postload() +void cc40_state::device_post_load() { init_sysram(0, m_sysram_size[0]); init_sysram(1, m_sysram_size[1]); @@ -550,15 +591,15 @@ void cc40_state::machine_start() { // init - m_lamps.resolve(); + m_segs.resolve(); std::string region_tag; m_cart_rom = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str()); - membank("sysbank")->configure_entries(0, 4, memregion("system")->base(), 0x2000); + m_sysbank->configure_entries(0, 4, memregion("system")->base(), 0x2000); if (m_cart_rom) - membank("cartbank")->configure_entries(0, 4, m_cart_rom->base(), 0x8000); + m_cartbank->configure_entries(0, 4, m_cart_rom->base(), 0x8000); else - membank("cartbank")->set_base(memregion("maincpu")->base() + 0x5000); + m_cartbank->set_base(memregion("maincpu")->base() + 0x5000); init_sysram(0, 0x800); // default to 6KB init_sysram(1, 0x800); // " @@ -566,11 +607,6 @@ bus_control_w(0); bankswitch_w(0); - // zerofill other - m_power = 0; - m_clock_control = 0; - m_key_select = 0; - // register for savestates save_item(NAME(m_bus_control)); save_item(NAME(m_power)); @@ -578,15 +614,13 @@ save_item(NAME(m_clock_control)); save_item(NAME(m_clock_divider)); save_item(NAME(m_key_select)); - - machine().save().register_postload(save_prepost_delegate(FUNC(cc40_state::postload), this)); } void cc40_state::cc40(machine_config &config) { - /* basic machine hardware */ - TMS70C20(config, m_maincpu, XTAL(5'000'000) / 2); - m_maincpu->set_addrmap(AS_PROGRAM, &cc40_state::main_map); + // basic machine hardware + TMS70C20(config, m_maincpu, 5_MHz_XTAL / 2); + m_maincpu->set_addrmap(AS_PROGRAM, &cc40_state::cc40_map); m_maincpu->in_porta().set(FUNC(cc40_state::keyboard_r)); m_maincpu->out_portb().set(FUNC(cc40_state::keyboard_w)); @@ -594,7 +628,7 @@ NVRAM(config, "sysram.1", nvram_device::DEFAULT_ALL_0); NVRAM(config, "sysram.2", nvram_device::DEFAULT_ALL_0); - /* video hardware */ + // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD)); screen.set_refresh_hz(60); // arbitrary screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); @@ -610,15 +644,32 @@ hd44780.set_lcd_size(2, 16); // 2*16 internal hd44780.set_pixel_update_cb(FUNC(cc40_state::cc40_pixel_update)); - /* sound hardware */ + // sound hardware SPEAKER(config, "speaker").front_center(); DAC_1BIT(config, "dac").add_route(ALL_OUTPUTS, "speaker", 0.25); - /* cartridge */ + // cartridge GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "cc40_cart", "bin,rom,256").set_device_load(FUNC(cc40_state::cart_load)); SOFTWARE_LIST(config, "cart_list").set_original("cc40_cart"); } +void cc40_state::cc40p(machine_config &config) +{ + cc40(config); + + // basic machine hardware + TMS70C40(config.replace(), m_maincpu, 5_MHz_XTAL / 2); + m_maincpu->set_addrmap(AS_PROGRAM, &cc40_state::cc40p_map); + m_maincpu->in_porta().set(FUNC(cc40_state::keyboard_r)); + m_maincpu->out_portb().set(FUNC(cc40_state::keyboard_w)); + + // cassette + CASSETTE(config, m_cass); + m_cass->set_default_state(CASSETTE_STOPPED | CASSETTE_SPEAKER_MUTED | CASSETTE_MOTOR_DISABLED); + SPEAKER(config, "cass_output").front_center(); // on data recorder + m_cass->add_route(ALL_OUTPUTS, "cass_output", 0.05); +} + /*************************************************************************** @@ -628,13 +679,24 @@ ***************************************************************************/ ROM_START( cc40 ) - ROM_REGION( 0x800, "maincpu", 0 ) - ROM_LOAD( "tms70c20.bin", 0x000, 0x800, CRC(a21bf6ab) SHA1(3da8435ecbee143e7fa149ee8e1c92949bade1d8) ) // internal cpu rom + ROM_REGION( 0x0800, "maincpu", 0 ) + ROM_LOAD( "c11002", 0x0000, 0x0800, CRC(a21bf6ab) SHA1(3da8435ecbee143e7fa149ee8e1c92949bade1d8) ) // internal cpu rom ROM_REGION( 0x8000, "system", 0 ) - ROM_LOAD( "hn61256pc09.bin", 0x0000, 0x8000, CRC(f5322fab) SHA1(1b5c4052a53654363c458f75eac7a27f0752def6) ) // system rom, banked + ROM_LOAD( "hn61256pc09", 0x0000, 0x8000, CRC(f5322fab) SHA1(1b5c4052a53654363c458f75eac7a27f0752def6) ) // system rom, banked ROM_END +ROM_START( cc40p ) + ROM_REGION( 0x1000, "maincpu", 0 ) + ROM_LOAD( "75305.u200", 0x0000, 0x1000, CRC(42bb6af2) SHA1(642dede16cb4ef2c5b9eaae79e28054f1111eef8) ) // internal cpu rom + + ROM_REGION( 0x8000, "system", 0 ) + ROM_LOAD( "hn61256pc09.u205", 0x0000, 0x8000, CRC(f5322fab) SHA1(1b5c4052a53654363c458f75eac7a27f0752def6) ) // system rom, banked +ROM_END + +} // anonymous namespace + // YEAR NAME PARENT CMP MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS -COMP( 1983, cc40, 0, 0, cc40, cc40, cc40_state, empty_init, "Texas Instruments", "Compact Computer 40", MACHINE_SUPPORTS_SAVE ) +COMP( 1983, cc40, 0, 0, cc40, cc40, cc40_state, empty_init, "Texas Instruments", "Compact Computer 40", MACHINE_SUPPORTS_SAVE ) +COMP( 1984, cc40p, cc40, 0, cc40p, cc40, cc40_state, empty_init, "Texas Instruments", "Compact Computer 40 Plus (prototype)", MACHINE_SUPPORTS_SAVE ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/chihiro.cpp mame-0.231+dfsg.1/src/mame/drivers/chihiro.cpp --- mame-0.230+dfsg.1/src/mame/drivers/chihiro.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/chihiro.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -37,6 +37,7 @@ | | 2004 | Wangan Midnight Maximum Tune (Export, Rev A) | Namco | GDROM | GDX-0009A | 317-5101-COM | |*| 20040610 | Wangan Midnight Maximum Tune (Export, Rev B) | Namco | GDROM | GDX-0009B | 317-5101-COM | | | 2004 | Sega Golf Club Network Pro Tour 2005 | Sega | GDROM | GDX-0010 | ??? | +|*| 2004 | Sega Golf Club Network Pro Tour 2005 (Rev B) | Sega | GDROM | GDX-0010B | ??? | |*| 2004 | Sega Golf Club Network Pro Tour 2005 (Rev C) | Sega | GDROM | GDX-0010C | ??? | |*| 20040909 | OutRun 2 Special Tours (Japan) | Sega | GDROM | GDX-0011 | 317-0396-COM | |*| 20041229 | OutRun 2 Special Tours (Japan, Rev A) | Sega | GDROM | GDX-0011A | 317-0396-COM | @@ -2165,6 +2166,16 @@ ROM_LOAD("crp1231lr10_ver0110.ic2", 0, 0x20000, CRC(0d30707c) SHA1(425e25c6203d0b400d12391916db3f7cdad00f7a) ) // H8/3003 code ROM_END +ROM_START( scg05ntb ) + CHIHIRO_BIOS + + DISK_REGION( "gdrom" ) + DISK_IMAGE_READONLY( "gdx-0010b", 0, SHA1(8da05ff36679f45b2b43d9c5ca3177b8a9e76af5) ) + + ROM_REGION( 0x4000, "pic", ROMREGION_ERASEFF) + ROM_LOAD( "317-unknown.pic", 0x000000, 0x004000, CRC(36858860) SHA1(b36a0c10b614fdeb7dcd94f4898efc24e5db896a) ) +ROM_END + ROM_START( scg05nt ) CHIHIRO_BIOS @@ -2591,6 +2602,7 @@ // 0009A GAME( 2004, wangmida, wangmid, chihirogd, chihiro, chihiro_state, empty_init, ROT0, "Namco", "Wangan Midnight Maximum Tune (Export, Rev A) (GDX-0009A)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING ) /* 0009B */ GAME( 2004, wangmid, chihiro, chihirogd, chihiro, chihiro_state, empty_init, ROT0, "Namco", "Wangan Midnight Maximum Tune (Export, Rev B) (GDX-0009B)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING ) // 0010 Sega Golf Club Network Pro Tour 2005 +/* 0010B */ GAME( 2004, scg05ntb, scg05nt, chihirogd, chihiro, chihiro_state, empty_init, ROT0, "Sega", "Sega Golf Club Network Pro Tour 2005 (Rev B) (GDX-0010B)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING ) /* 0010C */ GAME( 2004, scg05nt, chihiro, chihirogd, chihiro, chihiro_state, empty_init, ROT0, "Sega", "Sega Golf Club Network Pro Tour 2005 (Rev C) (GDX-0010C)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING ) /* 0011 */ GAME( 2004, outr2stjo,outr2st, chihirogd, chihiro, chihiro_state, empty_init, ROT0, "Sega", "OutRun 2 Special Tours (Japan) (GDX-0011)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING|MACHINE_SUPPORTS_SAVE ) /* 0011A */ GAME( 2004, outr2stj, outr2st, chihirogd, chihiro, chihiro_state, empty_init, ROT0, "Sega", "OutRun 2 Special Tours (Japan, Rev A) (GDX-0011A)", MACHINE_NO_SOUND|MACHINE_NOT_WORKING|MACHINE_SUPPORTS_SAVE ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/cking_master.cpp mame-0.231+dfsg.1/src/mame/drivers/cking_master.cpp --- mame-0.230+dfsg.1/src/mame/drivers/cking_master.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/cking_master.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -20,12 +20,14 @@ ******************************************************************************/ #include "emu.h" + #include "cpu/z80/z80.h" #include "machine/sensorboard.h" #include "machine/bankdev.h" #include "machine/timer.h" #include "sound/dac.h" #include "video/pwm.h" + #include "speaker.h" // internal artwork diff -Nru mame-0.230+dfsg.1/src/mame/drivers/coco3.cpp mame-0.231+dfsg.1/src/mame/drivers/coco3.cpp --- mame-0.230+dfsg.1/src/mame/drivers/coco3.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/coco3.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -267,6 +267,7 @@ pia6821_device &pia0(PIA6821(config, PIA0_TAG, 0)); pia0.writepa_handler().set(FUNC(coco_state::pia0_pa_w)); pia0.writepb_handler().set(FUNC(coco_state::pia0_pb_w)); + pia0.tspb_handler().set_constant(0xff); pia0.ca2_handler().set(FUNC(coco_state::pia0_ca2_w)); pia0.cb2_handler().set(FUNC(coco_state::pia0_cb2_w)); pia0.irqa_handler().set(m_irqs, FUNC(input_merger_device::in_w<0>)); diff -Nru mame-0.230+dfsg.1/src/mame/drivers/combatsc.cpp mame-0.231+dfsg.1/src/mame/drivers/combatsc.cpp --- mame-0.230+dfsg.1/src/mame/drivers/combatsc.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/combatsc.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -292,21 +292,6 @@ } -/* the protection is a simple multiply */ -void combatsc_state::protection_w(offs_t offset, uint8_t data) -{ - m_prot[offset] = data; -} -uint8_t combatsc_state::protection_r(offs_t offset) -{ - return ((m_prot[0] * m_prot[1]) >> (offset * 8)) & 0xff; -} -void combatsc_state::protection_clock_w(uint8_t data) -{ - /* 0x3f is written here every time before accessing the other registers */ -} - - /****************************************************************************/ void combatsc_state::combatsc_sh_irqtrigger_w(uint8_t data) @@ -353,8 +338,7 @@ map(0x0020, 0x005f).rw(FUNC(combatsc_state::combatsc_scrollram_r), FUNC(combatsc_state::combatsc_scrollram_w)); // map(0x0060, 0x00ff).writeonly(); /* RAM */ - map(0x0200, 0x0201).rw(FUNC(combatsc_state::protection_r), FUNC(combatsc_state::protection_w)); - map(0x0206, 0x0206).w(FUNC(combatsc_state::protection_clock_w)); + map(0x0200, 0x0207).rw("k007452", FUNC(k007452_device::read), FUNC(k007452_device::write)); map(0x0400, 0x0400).portr("IN0"); map(0x0401, 0x0401).portr("DSW3"); /* DSW #3 */ @@ -660,7 +644,6 @@ save_item(NAME(m_bank_select)); save_item(NAME(m_video_circuit)); save_item(NAME(m_boost)); - save_item(NAME(m_prot)); save_item(NAME(m_pos)); save_item(NAME(m_sign)); save_pointer(NAME(m_page[0]),0x2000); @@ -684,8 +667,6 @@ m_vreg = -1; m_boost = 1; m_bank_select = -1; - m_prot[0] = 0; - m_prot[1] = 0; for (int i = 0; i < 4; i++) { @@ -713,6 +694,8 @@ WATCHDOG_TIMER(config, "watchdog"); + KONAMI_007452_MATH(config, "k007452"); + /* video hardware */ SCREEN(config, m_screen, SCREEN_TYPE_RASTER); // m_screen->set_refresh_hz(60); diff -Nru mame-0.230+dfsg.1/src/mame/drivers/contra.cpp mame-0.231+dfsg.1/src/mame/drivers/contra.cpp --- mame-0.230+dfsg.1/src/mame/drivers/contra.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/contra.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -25,6 +25,7 @@ #include "cpu/m6809/hd6309.h" #include "cpu/m6809/m6809.h" #include "machine/gen_latch.h" +#include "machine/k007452.h" #include "sound/ym2151.h" #include "speaker.h" @@ -59,10 +60,10 @@ machine().bookkeeping().coin_counter_w(1, (data & 0x02) >> 1); } - void contra_state::contra_map(address_map &map) { map(0x0000, 0x0007).w(FUNC(contra_state::contra_K007121_ctrl_0_w)); + map(0x0008, 0x000f).rw("k007452", FUNC(k007452_device::read), FUNC(k007452_device::write)); map(0x0010, 0x0010).portr("SYSTEM"); map(0x0011, 0x0011).portr("P1"); map(0x0012, 0x0012).portr("P2"); @@ -217,6 +218,7 @@ config.set_maximum_quantum(attotime::from_hz(6000)); /* enough for the sound CPU to read all commands */ + KONAMI_007452_MATH(config, "k007452"); /* video hardware */ SCREEN(config, m_screen, SCREEN_TYPE_RASTER); diff -Nru mame-0.230+dfsg.1/src/mame/drivers/cop01.cpp mame-0.231+dfsg.1/src/mame/drivers/cop01.cpp --- mame-0.230+dfsg.1/src/mame/drivers/cop01.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/cop01.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -59,7 +59,7 @@ #include "cpu/z80/z80.h" #include "sound/ay8910.h" -#include "sound/3526intf.h" +#include "sound/ym3526.h" #include "screen.h" #include "speaker.h" #include "sound/dac.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/cps2.cpp mame-0.231+dfsg.1/src/mame/drivers/cps2.cpp --- mame-0.230+dfsg.1/src/mame/drivers/cps2.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/cps2.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -4318,6 +4318,34 @@ ROM_LOAD( "mmatrix.key", 0x000000, 0x000014, CRC(8ed66bc4) SHA1(324d7bf9d95220ecab140b1385eba7087f1a9669) ) ROM_END +ROM_START( mmatrixa ) + ROM_REGION( CODE_SIZE, "maincpu", 0 ) // 68000 code + ROM_LOAD16_WORD_SWAP( "mmxa.03", 0x000000, 0x80000, CRC(1d670ed7) SHA1(10d1ae8f9586c658f73b2b27344c3c868fa2cb89) ) + ROM_LOAD16_WORD_SWAP( "mmxa.04", 0x080000, 0x80000, CRC(43be66d2) SHA1(e5b772c15320c7f8804d6fc6f8f2edc53012fce2) ) + ROM_LOAD16_WORD_SWAP( "mmxa.05", 0x100000, 0x80000, CRC(9bfe3082) SHA1(6119dee8e84e80243659ce43e90675a7a4409615) ) + + ROM_REGION( 0x2000000, "gfx", 0 ) + ROM_LOAD64_WORD( "mmx.13m", 0x0000000, 0x400000, CRC(04748718) SHA1(d2e84d9dcc779c08469d815ccd709f30705954b8) ) + ROM_LOAD64_WORD( "mmx.15m", 0x0000002, 0x400000, CRC(38074f44) SHA1(2002c4862c156b314bc4f3372b713c48e0667ec3) ) + ROM_LOAD64_WORD( "mmx.17m", 0x0000004, 0x400000, CRC(e4635e35) SHA1(48ef7a82df83b981ddd6138c241ca129ab770e8e) ) + ROM_LOAD64_WORD( "mmx.19m", 0x0000006, 0x400000, CRC(4400a3f2) SHA1(d0aa805ccbb153896e5983da1c398d1df4f40371) ) + ROM_LOAD64_WORD( "mmx.14m", 0x1000000, 0x400000, CRC(d52bf491) SHA1(2398895cfdcf86fc485472e33df2cc446539e977) ) + ROM_LOAD64_WORD( "mmx.16m", 0x1000002, 0x400000, CRC(23f70780) SHA1(691ee8964815b0ce54704e7feb59ca79b634f26d) ) + ROM_LOAD64_WORD( "mmx.18m", 0x1000004, 0x400000, CRC(2562c9d5) SHA1(e7defc3d33db632c4035ae069f2f2332c58afaf5) ) + ROM_LOAD64_WORD( "mmx.20m", 0x1000006, 0x400000, CRC(583a9687) SHA1(1d0b08b1e88509245db3c2090f0201938fd750b4) ) + + ROM_REGION( QSOUND_SIZE, "audiocpu", 0 ) // 64k for the audio CPU (+banks) + ROM_LOAD( "mmx.01", 0x00000, 0x08000, CRC(c57e8171) SHA1(dedb92af1910d38727f816e6f507d25148f31b74) ) + ROM_CONTINUE( 0x10000, 0x18000 ) + + ROM_REGION( 0x800000, "qsound", 0 ) // QSound samples + ROM_LOAD16_WORD_SWAP( "mmx.11m", 0x000000, 0x400000, CRC(4180b39f) SHA1(cabb1c358eae1bb6cfed07f5b92e4acd38650667) ) + ROM_LOAD16_WORD_SWAP( "mmx.12m", 0x400000, 0x400000, CRC(95e22a59) SHA1(b3431d170c0a1a0d826ad0af21300b9180e3f114) ) + + ROM_REGION( 0x20, "key", 0 ) + ROM_LOAD( "mmatrixa.key", 0x000000, 0x000014, CRC(f6a944b4) SHA1(f76aa23c0c19a1a220be9cf3c55a8617b3c3dce5) ) +ROM_END + ROM_START( mmatrixj ) ROM_REGION( CODE_SIZE, "maincpu", 0 ) // 68000 code ROM_LOAD16_WORD_SWAP( "mmxj.03", 0x000000, 0x80000, CRC(1d5de213) SHA1(2d7ad9cb50540a14aa0ac564d4ab84a3779d595c) ) @@ -5463,10 +5491,10 @@ ROM_CONTINUE( 0x10000, 0x18000 ) ROM_REGION( 0x400000, "qsound", 0 ) // QSound samples - ROM_LOAD16_WORD_SWAP( "mpn.q1", 0x000000, 0x100000, CRC(d21c1f5a) SHA1(94cfcf01e656c0fb690e6204964ac70fbc89064d) ) /* This version uses roms chips */ - ROM_LOAD16_WORD_SWAP( "mpn.q2", 0x100000, 0x100000, CRC(d22090b1) SHA1(0ba65c0efb46af3cfb8ea3fe5087186248c57420) ) - ROM_LOAD16_WORD_SWAP( "mpn.q3", 0x200000, 0x100000, CRC(60aa5ef2) SHA1(03fa994d7f5b43e05e8417a8769e07c22548a27a) ) - ROM_LOAD16_WORD_SWAP( "mpn.q4", 0x300000, 0x100000, CRC(3a67d203) SHA1(7213364745d0c4c7fe11573afb9678483e24acb4) ) + ROM_LOAD( "mpn.q1", 0x000000, 0x100000, CRC(d21c1f5a) SHA1(94cfcf01e656c0fb690e6204964ac70fbc89064d) ) /* This version uses roms chips */ + ROM_LOAD( "mpn.q2", 0x100000, 0x100000, CRC(d22090b1) SHA1(0ba65c0efb46af3cfb8ea3fe5087186248c57420) ) + ROM_LOAD( "mpn.q3", 0x200000, 0x100000, CRC(60aa5ef2) SHA1(03fa994d7f5b43e05e8417a8769e07c22548a27a) ) + ROM_LOAD( "mpn.q4", 0x300000, 0x100000, CRC(3a67d203) SHA1(7213364745d0c4c7fe11573afb9678483e24acb4) ) ROM_REGION( 0x20, "key", 0 ) ROM_LOAD( "mpang.key", 0x000000, 0x000014, CRC(95354b0f) SHA1(6e015eda29ac94aa420d7c70cdebffee52fde032) ) @@ -10483,6 +10511,7 @@ GAME( 1999, gigawingh, gigawing, cps2, cps2_2p2b, cps2_state, init_cps2, ROT0, "Takumi (Capcom license)", "Giga Wing (Hispanic 990222)", MACHINE_SUPPORTS_SAVE ) GAME( 1999, gigawingb, gigawing, cps2, cps2_2p2b, cps2_state, init_cps2, ROT0, "Takumi (Capcom license)", "Giga Wing (Brazil 990222)", MACHINE_SUPPORTS_SAVE ) GAME( 2000, mmatrix, 0, cps2, cps2_2p1b, cps2_state, init_cps2, ROT0, "Takumi (Capcom license)", "Mars Matrix: Hyper Solid Shooting (USA 000412)", MACHINE_SUPPORTS_SAVE ) +GAME( 2000, mmatrixa, mmatrix, cps2, cps2_2p1b, cps2_state, init_cps2, ROT0, "Takumi (Capcom license)", "Mars Matrix: Hyper Solid Shooting (Asia 000412)", MACHINE_SUPPORTS_SAVE ) GAME( 2000, mmatrixj, mmatrix, cps2, cps2_2p1b, cps2_state, init_cps2, ROT0, "Takumi (Capcom license)", "Mars Matrix: Hyper Solid Shooting (Japan 000412)", MACHINE_SUPPORTS_SAVE ) // Games released on CPS-2 hardware by Mitchell @@ -12070,5 +12099,5 @@ GAME( 2001, progearud, progear, dead_cps2, cps2_2p3b, cps2_state, init_cps2, ROT0, "bootleg", "Progear (USA 010117 Phoenix Edition) (bootleg)", MACHINE_SUPPORTS_SAVE ) GAME( 2001, progearjd, progear, dead_cps2, cps2_2p3b, cps2_state, init_cps2, ROT0, "bootleg", "Progear no Arashi (Japan 010117 Phoenix Edition) (bootleg)", MACHINE_SUPPORTS_SAVE ) GAME( 2001, progearjbl, progear, dead_cps2, cps2_2p3b, cps2_state, init_cps2, ROT0, "bootleg", "Progear no Arashi (Japan 010117) (decrypted bootleg)", MACHINE_SUPPORTS_SAVE ) // Not an actual phoenix set, but works as one -GAME( 2001, pzloop2jd, pzloop2, dead_cps2, pzloop2, cps2_state, init_pzloop2, ROT0, "Mitchell (Capcom license)", "Puzz Loop 2 (Japan 010226 Phoenix Edition) (bootleg)", MACHINE_SUPPORTS_SAVE ) +GAME( 2001, pzloop2jd, pzloop2, dead_cps2, pzloop2, cps2_state, init_pzloop2, ROT0, "bootleg", "Puzz Loop 2 (Japan 010226 Phoenix Edition) (bootleg)", MACHINE_SUPPORTS_SAVE ) GAME( 2004, hsf2d, hsf2, dead_cps2, cps2_2p6b, cps2_state, init_cps2, ROT0, "bootleg", "Hyper Street Fighter II: The Anniversary Edition (Asia 040202 Phoenix Edition) (bootleg)", MACHINE_SUPPORTS_SAVE ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/cps3.cpp mame-0.231+dfsg.1/src/mame/drivers/cps3.cpp --- mame-0.230+dfsg.1/src/mame/drivers/cps3.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/cps3.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -98,6 +98,9 @@ JoJo's Venture JJK98cA0F CP3000C0G ASIA X 981202 JoJo's Venture JJK98cA0F CP3000C0G ASIA X 990108 JoJo's Venture JJK98cA0F CP3000C0G ASIA X 990128 +JoJo's Venture JJK98cA0F CP3000C0G ASIA X CAP-JJK0A0 CAP-JJK000 CAP-JJK-140 981202 +JoJo's Venture JJK98cA0F CP3000C0G ASIA X CAP-JJK0A0 CAP-JJK-2 CAP-JJK-160 990108 +JoJo's Venture JJK98cA0F CP3000C0G ASIA X CAP-JJK0A0 CAP-JJK-3 CAP-JJK-161 990128 JoJo's Venture JJK98cA0F CP3000U0G USA X CAP-JJK0A0 CAP-JJK000 CAP-JJK-140 981202 JoJo's Venture JJK98cA0F CP3000U0G USA X CAP-JJK0A0 CAP-JJK-2 CAP-JJK-160 990108 JoJo's Venture JJK98cA0F CP3000U0G USA X CAP-JJK0A0 CAP-JJK-3 CAP-JJK-161 990128 @@ -2772,6 +2775,30 @@ DISK_IMAGE_READONLY( "cap-jjk000", 0, SHA1(a24e174aaaf47f98312a38129645026a613cd344) ) ROM_END +ROM_START( jojoa ) + ROM_REGION32_BE( 0x080000, "bios", 0 ) /* bios region */ + ROM_LOAD( "jojo_asia.29f400.u2", 0x000000, 0x080000, CRC(789aa72a) SHA1(afcefb963d7c103514585f4a6738b2deb5b7d27a) ) + + DISK_REGION( "scsi:1:cdrom" ) + DISK_IMAGE_READONLY( "cap-jjk-3", 0, SHA1(dc6e74b5e02e13f62cb8c4e234dd6061501e49c1) ) +ROM_END + +ROM_START( jojoar1 ) + ROM_REGION32_BE( 0x080000, "bios", 0 ) /* bios region */ + ROM_LOAD( "jojo_asia.29f400.u2", 0x000000, 0x080000, CRC(789aa72a) SHA1(afcefb963d7c103514585f4a6738b2deb5b7d27a) ) + + DISK_REGION( "scsi:1:cdrom" ) + DISK_IMAGE_READONLY( "cap-jjk-2", 0, SHA1(ce22d10f2b35a0e00f8d83642b97842c9b2327fa) ) +ROM_END + +ROM_START( jojoar2 ) + ROM_REGION32_BE( 0x080000, "bios", 0 ) /* bios region */ + ROM_LOAD( "jojo_asia.29f400.u2", 0x000000, 0x080000, CRC(789aa72a) SHA1(afcefb963d7c103514585f4a6738b2deb5b7d27a) ) + + DISK_REGION( "scsi:1:cdrom" ) + DISK_IMAGE_READONLY( "cap-jjk000", 0, SHA1(a24e174aaaf47f98312a38129645026a613cd344) ) +ROM_END + ROM_START( sfiii3 ) ROM_REGION32_BE( 0x080000, "bios", 0 ) /* bios region */ @@ -3954,18 +3981,21 @@ // 990128 GAME( 1998, jojo, 0, jojo, cps3_jojo, cps3_state, init_jojo, ROT0, "Capcom", "JoJo's Venture (Euro 990128)", MACHINE_SUPPORTS_SAVE ) GAME( 1998, jojou, jojo, jojo, cps3_jojo, cps3_state, init_jojo, ROT0, "Capcom", "JoJo's Venture (USA 990128)", MACHINE_SUPPORTS_SAVE ) +GAME( 1998, jojoa, jojo, jojo, cps3_jojo, cps3_state, init_jojo, ROT0, "Capcom", "JoJo's Venture (Asia 990128)", MACHINE_SUPPORTS_SAVE ) GAME( 1998, jojoj, jojo, jojo, cps3_jojo, cps3_state, init_jojo, ROT0, "Capcom", "JoJo no Kimyou na Bouken (Japan 990128)", MACHINE_SUPPORTS_SAVE ) GAME( 1998, jojon, jojo, jojo, cps3_jojo, cps3_state, init_jojo, ROT0, "Capcom", "JoJo's Venture (Asia 990128, NO CD)", MACHINE_SUPPORTS_SAVE ) // 990108 GAME( 1998, jojor1, jojo, jojo, cps3_jojo, cps3_state, init_jojo, ROT0, "Capcom", "JoJo's Venture (Euro 990108)", MACHINE_SUPPORTS_SAVE ) GAME( 1998, jojour1, jojo, jojo, cps3_jojo, cps3_state, init_jojo, ROT0, "Capcom", "JoJo's Venture (USA 990108)", MACHINE_SUPPORTS_SAVE ) +GAME( 1998, jojoar1, jojo, jojo, cps3_jojo, cps3_state, init_jojo, ROT0, "Capcom", "JoJo's Venture (Asia 990108)", MACHINE_SUPPORTS_SAVE ) GAME( 1998, jojojr1, jojo, jojo, cps3_jojo, cps3_state, init_jojo, ROT0, "Capcom", "JoJo no Kimyou na Bouken (Japan 990108)", MACHINE_SUPPORTS_SAVE ) GAME( 1998, jojonr1, jojo, jojo, cps3_jojo, cps3_state, init_jojo, ROT0, "Capcom", "JoJo's Venture (Asia 990108, NO CD)", MACHINE_SUPPORTS_SAVE ) // 981202 GAME( 1998, jojor2, jojo, jojo, cps3_jojo, cps3_state, init_jojo, ROT0, "Capcom", "JoJo's Venture (Euro 981202)", MACHINE_SUPPORTS_SAVE ) GAME( 1998, jojour2, jojo, jojo, cps3_jojo, cps3_state, init_jojo, ROT0, "Capcom", "JoJo's Venture (USA 981202)", MACHINE_SUPPORTS_SAVE ) +GAME( 1998, jojoar2, jojo, jojo, cps3_jojo, cps3_state, init_jojo, ROT0, "Capcom", "JoJo's Venture (Asia 981202)", MACHINE_SUPPORTS_SAVE ) GAME( 1998, jojojr2, jojo, jojo, cps3_jojo, cps3_state, init_jojo, ROT0, "Capcom", "JoJo no Kimyou na Bouken (Japan 981202)", MACHINE_SUPPORTS_SAVE ) GAME( 1998, jojonr2, jojo, jojo, cps3_jojo, cps3_state, init_jojo, ROT0, "Capcom", "JoJo's Venture (Asia 981202, NO CD)", MACHINE_SUPPORTS_SAVE ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/crospang.cpp mame-0.231+dfsg.1/src/mame/drivers/crospang.cpp --- mame-0.230+dfsg.1/src/mame/drivers/crospang.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/crospang.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -32,7 +32,7 @@ #include "cpu/z80/z80.h" #include "cpu/m68000/m68000.h" #include "sound/okim6295.h" -#include "sound/3812intf.h" +#include "sound/ym3812.h" #include "emupal.h" #include "screen.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/cybertnk.cpp mame-0.231+dfsg.1/src/mame/drivers/cybertnk.cpp --- mame-0.230+dfsg.1/src/mame/drivers/cybertnk.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/cybertnk.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -173,7 +173,7 @@ #include "cpu/m68000/m68000.h" #include "cpu/z80/z80.h" #include "machine/gen_latch.h" -#include "sound/8950intf.h" +#include "sound/y8950.h" #include "emupal.h" #include "layout/generic.h" #include "screen.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/cyclemb.cpp mame-0.231+dfsg.1/src/mame/drivers/cyclemb.cpp --- mame-0.230+dfsg.1/src/mame/drivers/cyclemb.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/cyclemb.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -2,20 +2,21 @@ // copyright-holders:Angelo Salese /*************************************************************************************************** - Cycle Maabou (c) 1984 Taito Corporation / Seta - Sky Destroyer (c) 1985 Taito Corporation +Cycle Maabou (c) 1984 Taito Corporation / Seta +Sky Destroyer (c) 1985 Taito Corporation - appears to be in the exact middle between the gsword / josvolly HW and the ppking / gladiator HW +appears to be in the exact middle between the gsword / josvolly HW and the ppking / gladiator HW - driver by Angelo Salese +driver by Angelo Salese - TODO: - - inputs in Cycle Maabou (weird dial/positional input); - - sound (controlled by three i8741); - - add flipscreen; - - color prom resistor network is guessed, cyclemb yellows are more reddish on pcb video and photos; +TODO: +- separate driver into 2 classes +- reduce tagmap lookups +- sound (controlled by three i8741); +- coinage (controlled by i8741, like Gladiator / Ougon no Shiro); +- color prom resistor network is guessed, cyclemb yellows are more reddish on pcb video and photos; - BTANB verified on pcb: cyclemb standing cones are reddish-yellow/black instead of red/white +BTANB verified on pcb: cyclemb standing cones are reddish-yellow/black instead of red/white ===================================================================================================== @@ -63,7 +64,6 @@ P0_4.11U [4886d832] / - --- Team Japump!!! --- Dumped by Chack'n 27/Nov/2009 @@ -96,7 +96,7 @@ m_obj1_ram(*this, "obj1_ram"), m_obj2_ram(*this, "obj2_ram"), m_obj3_ram(*this, "obj3_ram"), - m_pad(*this, "PAD_P%u", 1U) + m_dial(*this, "DIAL_P%u", 1U) { } required_device m_maincpu; @@ -111,7 +111,12 @@ required_shared_ptr m_obj2_ram; required_shared_ptr m_obj3_ram; - optional_ioport_array<2> m_pad; + optional_ioport_array<2> m_dial; + struct + { + uint8_t current_value; + bool reverse; + } m_dial_status[2]; struct { @@ -123,8 +128,13 @@ } m_mcu[2]; uint16_t m_dsw_pc_hack; + bool m_use_dial; + bool m_screen_display; + int m_sprite_page; void cyclemb_bankswitch_w(uint8_t data); + void skydest_bankswitch_w(uint8_t data); + void cyclemb_screen_display_w(uint8_t data); // uint8_t mcu_status_r(); // void sound_cmd_w(uint8_t data); void cyclemb_flip_w(uint8_t data); @@ -134,7 +144,8 @@ void skydest_i8741_1_w(offs_t offset, uint8_t data); // DECLARE_WRITE_LINE_MEMBER(ym_irq); - template DECLARE_CUSTOM_INPUT_MEMBER(pad_r); + void update_dial(int P); + template DECLARE_CUSTOM_INPUT_MEMBER(dial_r); void init_skydest(); void init_cyclemb(); @@ -149,6 +160,7 @@ void skydest_draw_tilemap(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void skydest_draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void skydest_i8741_reset(); + void cyclemb_dial_reset(); void cyclemb(machine_config &config); void skydest(machine_config &config); void cyclemb_io(address_map &map); @@ -211,9 +223,9 @@ if(flip_screen()) { - gfx->opaque(bitmap,cliprect,tile,color,1,1,512-(x*8)-scrollx,256-(y*8)); + gfx->opaque(bitmap,cliprect,tile,color,1,1,504-(x*8)-scrollx,248-(y*8)); /* wrap-around */ - gfx->opaque(bitmap,cliprect,tile,color,1,1,512-(x*8)-scrollx+512,256-(y*8)); + gfx->opaque(bitmap,cliprect,tile,color,1,1,504-(x*8)-scrollx+512,248-(y*8)); } else { @@ -228,16 +240,6 @@ } - /* - bank 1 - xxxx xxxx [0] sprite offset - ---x xxxx [1] color offset - bank 2 - xxxx xxxx [0] y offs - xxxx xxxx [1] x offs - bank 3 - ---- ---x [1] sprite enable flag? - */ void cyclemb_state::cyclemb_draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { uint8_t col,fx,fy,region; @@ -253,8 +255,24 @@ 0x27 cone (0x13 0x00) */ - for(i=0;i<0x80;i+=2) + int page_start = m_sprite_page * 0x80; + + for(i=0+page_start;i<0x80+page_start;i+=2) { + /*** sprite format: *** + + bank 1 + xxxx xxxx [0] sprite offset + ---x xxxx [1] color offset + + bank 2 + xxxx xxxx [0] y offs + xxxx xxxx [1] x offs + + bank 3 + ---- ---x [1] sprite enable flag? + */ + y = 0xf1 - m_obj2_ram[i]; x = m_obj2_ram[i+1] - 56; spr_offs = (m_obj1_ram[i+0]); @@ -290,7 +308,6 @@ gfx_element *gfx = m_gfxdecode->gfx(0); int x,y; - for (y=0;y<32;y++) { for (x=2;x<62;x++) @@ -317,27 +334,22 @@ else scrolly = m_vram[(x-32)*64+1]; - - gfx->opaque(bitmap,cliprect,tile,color,0,0,x*8+scrollx,((y*8)-scrolly)&0xff); - gfx->opaque(bitmap,cliprect,tile,color,0,0,x*8+scrollx-480,((y*8)-scrolly)&0xff); - gfx->opaque(bitmap,cliprect,tile,color,0,0,x*8+scrollx+480,((y*8)-scrolly)&0xff); - - + if (flip_screen()) + { + gfx->opaque(bitmap,cliprect,tile,color,1,1,504-x*8+scrollx, 248-(((y*8)-scrolly)&0xff)); + gfx->opaque(bitmap,cliprect,tile,color,1,1,504-x*8+scrollx-480, 248-(((y*8)-scrolly)&0xff)); + gfx->opaque(bitmap,cliprect,tile,color,1,1,504-x*8+scrollx+480, 248-(((y*8)-scrolly)&0xff)); + } + else + { + gfx->opaque(bitmap,cliprect,tile,color,0,0,x*8+scrollx,((y*8)-scrolly)&0xff); + gfx->opaque(bitmap,cliprect,tile,color,0,0,x*8+scrollx-480,((y*8)-scrolly)&0xff); + gfx->opaque(bitmap,cliprect,tile,color,0,0,x*8+scrollx+480,((y*8)-scrolly)&0xff); + } } } } -/* - bank 1 - xxxx xxxx [0] sprite offset - ---x xxxx [1] color offset - bank 2 - xxxx xxxx [0] y offs - xxxx xxxx [1] x offs - bank 3 - ---- ---x [1] sprite enable flag? -*/ - void cyclemb_state::skydest_draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { uint8_t col,fx,fy,region; @@ -346,8 +358,24 @@ // popmessage("%d %d",m_obj2_ram[0x0d], 0xf1 - m_obj2_ram[0x0c+1] + 68); - for(i=0;i<0x80;i+=2) + int page_start = m_sprite_page * 0x80; + + for(i=0+page_start;i<0x80+page_start;i+=2) { + /*** sprite format *** + + bank 1 + xxxx xxxx [0] sprite offset + ---x xxxx [1] color offset + + bank 2 + xxxx xxxx [0] y offs + xxxx xxxx [1] x offs + + bank 3 + ---- ---x [1] sprite enable flag? + */ + y = m_obj2_ram[i] - 1; x = m_obj2_ram[i+1]; @@ -367,7 +395,6 @@ x-=16; } - fx = (m_obj3_ram[i+0] & 4) >> 2; fy = (m_obj3_ram[i+0] & 8) >> 3; @@ -382,8 +409,13 @@ uint32_t cyclemb_state::screen_update_cyclemb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - cyclemb_draw_tilemap(screen,bitmap,cliprect); - cyclemb_draw_sprites(screen,bitmap,cliprect); + bitmap.fill(0, cliprect); + + if (m_screen_display) + { + cyclemb_draw_tilemap(screen,bitmap,cliprect); + cyclemb_draw_sprites(screen,bitmap,cliprect); + } return 0; } @@ -391,14 +423,30 @@ { bitmap.fill(0, cliprect); - skydest_draw_tilemap(screen,bitmap,cliprect); - skydest_draw_sprites(screen,bitmap,cliprect); + if (m_screen_display) + { + skydest_draw_tilemap(screen,bitmap,cliprect); + skydest_draw_sprites(screen,bitmap,cliprect); + } return 0; } void cyclemb_state::cyclemb_bankswitch_w(uint8_t data) { - membank("bank1")->set_entry(data & 3); + membank("bank1")->set_entry(data & 0x03); + m_sprite_page = (data & 0x04) >> 2; +} + +void cyclemb_state::skydest_bankswitch_w(uint8_t data) +{ + membank("bank1")->set_entry(data & 0x03); + m_sprite_page = (data & 0x04) >> 2; + flip_screen_set((data & 0x40) == 0); +} + +void cyclemb_state::cyclemb_screen_display_w(uint8_t data) +{ + m_screen_display = (data & 0x01) != 0; } #if 0 @@ -439,6 +487,15 @@ m_mcu[0].packet_type = 0; } +void cyclemb_state::cyclemb_dial_reset() +{ + for (int i = 0; i < 2; i++) + { + m_dial_status[i].current_value = 0; + m_dial_status[i].reverse = false; + } +} + uint8_t cyclemb_state::skydest_i8741_0_r(offs_t offset) { if(offset == 1) //status port @@ -476,6 +533,7 @@ m_mcu[0].packet_type^=0x20; if(m_mcu[0].packet_type & 0x20) { + update_dial(0); m_mcu[0].rxd = ((ioport("P1_1")->read()) & 0x9f) | (m_mcu[0].packet_type); } else @@ -489,7 +547,10 @@ { m_mcu[0].packet_type^=0x20; if(m_mcu[0].packet_type & 0x20) + { + update_dial(1); m_mcu[0].rxd = ((ioport("P2_1")->read()) & 0x9f) | (m_mcu[0].packet_type); + } else { m_mcu[0].rxd = ((ioport("P2_0")->read()) & 0x1f) | (m_mcu[0].packet_type); @@ -561,7 +622,6 @@ m_mcu[0].txd = data; m_mcu[1].rst = 0; - m_soundlatch->write(data & 0xff); if(m_mcu[0].txd == 0x41) m_mcu[0].state = 1; @@ -571,6 +631,7 @@ m_mcu[0].state = 3; else { + m_soundlatch->write(data & 0xff); //m_audiocpu->set_input_line(0, HOLD_LINE); } @@ -594,7 +655,7 @@ { // map.global_mask(0xff); map(0xc000, 0xc000).w(FUNC(cyclemb_state::cyclemb_bankswitch_w)); - //map(0xc020, 0xc020).nopw(); // ? + map(0xc020, 0xc020).w(FUNC(cyclemb_state::cyclemb_screen_display_w)); map(0xc09e, 0xc09f).rw(FUNC(cyclemb_state::skydest_i8741_0_r), FUNC(cyclemb_state::skydest_i8741_0_w)); map(0xc0bf, 0xc0bf).w(FUNC(cyclemb_state::cyclemb_flip_w)); //flip screen } @@ -603,11 +664,11 @@ void cyclemb_state::skydest_io(address_map &map) { // map.global_mask(0xff); - map(0xc000, 0xc000).w(FUNC(cyclemb_state::cyclemb_bankswitch_w)); - //map(0xc020, 0xc020).nopw(); // ? + map(0xc000, 0xc000).w(FUNC(cyclemb_state::skydest_bankswitch_w)); + map(0xc020, 0xc020).w(FUNC(cyclemb_state::cyclemb_screen_display_w)); map(0xc080, 0xc081).rw(FUNC(cyclemb_state::skydest_i8741_0_r), FUNC(cyclemb_state::skydest_i8741_0_w)); //map(0xc0a0, 0xc0a0).nopw(); // ? - map(0xc0bf, 0xc0bf).w(FUNC(cyclemb_state::cyclemb_flip_w)); //flip screen + //map(0xc0bf, 0xc0bf).w(FUNC(cyclemb_state::cyclemb_flip_w)); //flip screen } @@ -627,7 +688,10 @@ if(m_mcu[1].rst == 1) return 0x40; - return m_soundlatch->read(); + uint8_t ret = m_soundlatch->read(); + m_soundlatch->clear_w(); + + return ret; } void cyclemb_state::skydest_i8741_1_w(offs_t offset, uint8_t data) @@ -661,17 +725,48 @@ save_item(NAME(m_mcu[i].state), i); save_item(NAME(m_mcu[i].packet_type), i); } + + for (int i = 0; i < 2; i++) + { + save_item(NAME(m_dial_status[i].current_value), i); + save_item(NAME(m_dial_status[i].reverse), i); + } + + save_item(NAME(m_screen_display)); + save_item(NAME(m_sprite_page)); + + cyclemb_dial_reset(); + m_screen_display = true; + m_sprite_page = 0; } void cyclemb_state::machine_reset() { skydest_i8741_reset(); + cyclemb_dial_reset(); +} + +void cyclemb_state::update_dial(int P) +{ + if (!m_use_dial) + { + return; + } + + int8_t input_value = m_dial[P]->read(); + int delta = std::clamp((int)input_value, -0x1f, 0x1f); + + if (delta != 0) + { + m_dial_status[P].reverse = (delta < 0); + m_dial_status[P].current_value = (m_dial_status[P].current_value + (uint8_t)abs(delta)) & 0x1f; + } } template -CUSTOM_INPUT_MEMBER(cyclemb_state::pad_r) +CUSTOM_INPUT_MEMBER(cyclemb_state::dial_r) { - return m_pad[P]->read(); + return m_dial_status[P].current_value | (m_dial_status[P].reverse ? 0x80 : 0x00); } @@ -679,95 +774,59 @@ PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) - PORT_DIPNAME( 0x04, 0x00, "SYSTEM" ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x04, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x08, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x10, DEF_STR( On ) ) - PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x7c, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(2) PORT_START("P1_0") - PORT_DIPNAME( 0x01, 0x00, "IN1" ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x01, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x02, DEF_STR( On ) ) - PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x04, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x08, DEF_STR( On ) ) + PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_START("P1_1") - PORT_BIT( 0x9f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(cyclemb_state, pad_r<0>) - PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(cyclemb_state, dial_r<0>) - PORT_START("PAD_P1") - PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_MINMAX(0x00,0xff) PORT_SENSITIVITY(30) PORT_KEYDELTA(16) PORT_PLAYER(1) + PORT_START("DIAL_P1") + PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(20) PORT_KEYDELTA(16) PORT_PLAYER(1) PORT_RESET PORT_REVERSE PORT_START("P2_0") - PORT_DIPNAME( 0x01, 0x00, "IN1" ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x01, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x02, DEF_STR( On ) ) - PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x04, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x08, DEF_STR( On ) ) + PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_START("P2_1") - PORT_BIT( 0x9f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(cyclemb_state, pad_r<1>) + PORT_BIT( 0x9f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(cyclemb_state, dial_r<1>) PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_START("PAD_P2") - PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_MINMAX(0x00,0xff) PORT_SENSITIVITY(15) PORT_KEYDELTA(8) PORT_PLAYER(2) + PORT_START("DIAL_P2") + PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(20) PORT_KEYDELTA(16) PORT_PLAYER(2) PORT_RESET PORT_REVERSE PORT_COCKTAIL PORT_START("DSW1") - PORT_DIPNAME( 0x01, 0x00, "DSW1" ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x01, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x02, DEF_STR( On ) ) - PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x04, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x08, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x10, DEF_STR( On ) ) + PORT_DIPNAME( 0x03, 0x02, "Difficulty (Stage 1-3)" ) + PORT_DIPSETTING( 0x03, DEF_STR( Easy ) ) + PORT_DIPSETTING( 0x02, DEF_STR( Medium ) ) + PORT_DIPSETTING( 0x01, DEF_STR( Hard ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) + PORT_DIPNAME( 0x0c, 0x08, "Difficulty (Stage 4-5)" ) + PORT_DIPSETTING( 0x0c, DEF_STR( Easy ) ) + PORT_DIPSETTING( 0x08, DEF_STR( Medium ) ) + PORT_DIPSETTING( 0x04, DEF_STR( Hard ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) + PORT_DIPNAME( 0x10, 0x00, DEF_STR( Demo_Sounds ) ) + PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_START("DSW2") - PORT_DIPNAME( 0x01, 0x00, "DSW2" ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x01, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x02, DEF_STR( On ) ) - PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x04, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x08, DEF_STR( On ) ) + 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_4C ) ) + PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) + PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) ) + PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ) ) + PORT_DIPSETTING( 0x04, DEF_STR( 4C_1C ) ) + PORT_DIPSETTING( 0x08, DEF_STR( 3C_1C ) ) + PORT_DIPSETTING( 0x0c, DEF_STR( 2C_1C ) ) PORT_DIPNAME( 0x10, 0x00, DEF_STR( Cabinet ) ) PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_DIPSETTING( 0x10, DEF_STR( Cocktail ) ) @@ -775,16 +834,16 @@ PORT_START("DSW3") PORT_DIPNAME( 0x01, 0x00, DEF_STR( Free_Play ) ) - PORT_DIPSETTING( 0x01, DEF_STR( Yes ) ) PORT_DIPSETTING( 0x00, DEF_STR( No ) ) + PORT_DIPSETTING( 0x01, DEF_STR( Yes ) ) PORT_DIPNAME( 0x02, 0x00, "Disallow Game Over (Cheat)" ) - PORT_DIPSETTING( 0x02, DEF_STR( Yes ) ) PORT_DIPSETTING( 0x00, DEF_STR( No ) ) - PORT_DIPNAME( 0x0c, 0x00, "Stage Start" ) - PORT_DIPSETTING( 0x00, "Tutorial" ) - PORT_DIPSETTING( 0x04, "1" ) - PORT_DIPSETTING( 0x08, "2" ) - PORT_DIPSETTING( 0x0c, "Bonus Game" ) + PORT_DIPSETTING( 0x02, DEF_STR( Yes ) ) + PORT_DIPNAME( 0x0c, 0x00, "Starting Stage" ) + PORT_DIPSETTING( 0x00, "Stage 1" ) + PORT_DIPSETTING( 0x04, "Stage 3" ) + PORT_DIPSETTING( 0x08, "Stage 4" ) + PORT_DIPSETTING( 0x0c, "Bonus Game Only" ) PORT_DIPNAME( 0x10, 0x00, DEF_STR( Flip_Screen ) ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x10, DEF_STR( On ) ) @@ -798,135 +857,90 @@ PORT_START("SYSTEM") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 ) - PORT_DIPNAME( 0x04, 0x00, "SYSTEM" ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x04, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x08, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x10, DEF_STR( On ) ) - PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_UNUSED ) + PORT_BIT( 0x7c, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(2) PORT_START("P1_0") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) - PORT_DIPNAME( 0x04, 0x00, "P1_0" ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x04, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x08, DEF_STR( On ) ) + PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) - PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x80, DEF_STR( On ) ) + PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_START("P1_1") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1) - PORT_DIPNAME( 0x04, 0x00, "P1_1" ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x04, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x08, DEF_STR( On ) ) + PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1) - PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x80, DEF_STR( On ) ) + PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_START("P2_0") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) - PORT_DIPNAME( 0x04, 0x00, "P1_0" ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x04, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x08, DEF_STR( On ) ) + PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) - PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x80, DEF_STR( On ) ) + PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_START("P2_1") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(2) - PORT_DIPNAME( 0x04, 0x00, "P1_1" ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x04, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x08, DEF_STR( On ) ) + PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(2) - PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_UNUSED ) - PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x80, DEF_STR( On ) ) + PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_START("DSW1") - PORT_DIPNAME( 0x01, 0x01, "DSW1" ) - 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( 0x07, 0x07, DEF_STR( Difficulty ) ) + PORT_DIPSETTING( 0x07, "1 (Easiest)" ) + PORT_DIPSETTING( 0x06, "2" ) + PORT_DIPSETTING( 0x05, "3" ) + PORT_DIPSETTING( 0x04, "4" ) + PORT_DIPSETTING( 0x03, "5" ) + PORT_DIPSETTING( 0x02, "6" ) + PORT_DIPSETTING( 0x01, "7" ) + PORT_DIPSETTING( 0x00, "8 (Hardest)" ) PORT_DIPNAME( 0x18, 0x10, DEF_STR( Lives ) ) - PORT_DIPSETTING( 0x00, "4" ) - PORT_DIPSETTING( 0x08, "3" ) - PORT_DIPSETTING( 0x10, "2" ) - PORT_DIPSETTING( 0x18, "1" ) + PORT_DIPSETTING( 0x18, "2" ) + PORT_DIPSETTING( 0x10, "3" ) + PORT_DIPSETTING( 0x08, "4" ) + PORT_DIPSETTING( 0x00, "5" ) PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_UNUSED ) 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_DIPSETTING( 0x10, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + 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_4C ) ) + PORT_DIPSETTING( 0x00, DEF_STR( 1C_5C ) ) + PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Coin_B ) ) + PORT_DIPSETTING( 0x00, DEF_STR( 5C_1C ) ) + PORT_DIPSETTING( 0x04, DEF_STR( 4C_1C ) ) + PORT_DIPSETTING( 0x08, DEF_STR( 3C_1C ) ) + PORT_DIPSETTING( 0x0c, DEF_STR( 2C_1C ) ) + PORT_DIPNAME( 0x10, 0x10, DEF_STR( Cabinet ) ) + PORT_DIPSETTING( 0x10, DEF_STR( Cocktail ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_START("DSW3") - PORT_DIPNAME( 0x01, 0x01, DEF_STR( Demo_Sounds ) ) + PORT_DIPNAME( 0x01, 0x00, DEF_STR( Demo_Sounds ) ) PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPNAME( 0x02, 0x00, DEF_STR( Free_Play ) ) - PORT_DIPSETTING( 0x02, DEF_STR( Yes ) ) PORT_DIPSETTING( 0x00, DEF_STR( No ) ) - 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( 0x02, DEF_STR( Yes ) ) + PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x04, DEF_STR( On ) ) + PORT_DIPNAME( 0x08, 0x08, DEF_STR( Flip_Screen ) ) 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( 0x10, 0x00, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x10, DEF_STR( On ) ) PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_DIPNAME( 0x80, 0x00, "Invincibility (Cheat)" ) - PORT_DIPSETTING( 0x80, DEF_STR( Yes ) ) PORT_DIPSETTING( 0x00, DEF_STR( No ) ) - - + PORT_DIPSETTING( 0x80, DEF_STR( Yes ) ) INPUT_PORTS_END static const gfx_layout charlayout = @@ -1045,6 +1059,12 @@ ROM_LOAD( "p0_15.10c", 0x0000, 0x2000, CRC(9cc52c32) SHA1(05d4e7c8ce8fdfc995013c0ed693b4d4778acc25) ) ROM_LOAD( "p0_16.10d", 0x2000, 0x2000, CRC(8d03227e) SHA1(7e90437cbe5e854025e799348bb2cbca98368bd9) ) + ROM_REGION( 0x0400, "mcu1", 0 ) + ROM_LOAD( "ap_002.7b", 0x00000, 0x0400, NO_DUMP ) + + ROM_REGION( 0x0400, "mcu2", 0 ) + ROM_LOAD( "ap-003.7c", 0x00000, 0x0400, NO_DUMP ) + ROM_REGION( 0x4000, "tilemap_data", 0 ) ROM_LOAD( "p0_21.3e", 0x0000, 0x2000, CRC(a7dab6d8) SHA1(c5802e76abd394a2ce1526815bfbfc12e5e57587) ) ROM_LOAD( "p0_20.3d", 0x2000, 0x2000, CRC(53e3a36e) SHA1(d95c1dfe216bb8b1f3e14c72a480eb2befa9d1dd) ) @@ -1116,6 +1136,8 @@ rom[0xa36] = 0x00; rom[0xa37] = 0x00; rom[0xa38] = 0x00; + + m_use_dial = true; } void cyclemb_state::init_skydest() @@ -1132,7 +1154,11 @@ rom[0xa36] = 0x00; rom[0xa37] = 0x00; rom[0xa38] = 0x00; + + m_use_dial = false; } -GAME( 1984, cyclemb, 0, cyclemb, cyclemb, cyclemb_state, init_cyclemb, ROT0, "Taito Corporation", "Cycle Maabou (Japan)", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) -GAME( 1985, skydest, 0, skydest, skydest, cyclemb_state, init_skydest, ROT0, "Taito Corporation", "Sky Destroyer (Japan)", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) + +// year name parent machine input class init rot company fullname flags +GAME( 1984, cyclemb, 0, cyclemb, cyclemb, cyclemb_state, init_cyclemb, ROT0, "Taito Corporation", "Cycle Maabou (Japan)", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1985, skydest, 0, skydest, skydest, cyclemb_state, init_skydest, ROT0, "Taito Corporation", "Sky Destroyer (Japan)", MACHINE_NO_COCKTAIL | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/dai3wksi.cpp mame-0.231+dfsg.1/src/mame/drivers/dai3wksi.cpp --- mame-0.230+dfsg.1/src/mame/drivers/dai3wksi.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/dai3wksi.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -1,39 +1,43 @@ // license:BSD-3-Clause -// copyright-holders:Hau,Derrick Renaud +// copyright-holders:Hau, Derrick Renaud /* --Galaxy Force --Run Away -------------------------- Dai 3 Wakusei (c)1979 Sun Electronics -SIV-01-B +PCB: SIV-01-B TVG_13.6 [8e8b40b1] TVG_14.7 [d48cbabe] TVG_15.8 [cf44bd60] TVG_16.9 [ae723f56] -------------------------- --Warp 1 +Warp 1 +PCB: SIV-01-C, Taito logo -Dumped by Chack'n -01/04/2009 - -Written by Hau -02/18/2009 -12/14/2010 - -Discrete by Andy -11/11/2009 - +Z80 @ 2.5MHz +1KB SRAM (2*MB8114) +16KB(nibbles) DRAM (4*UPD416C) +5*SN76477, dai3wksi has 6 +-------------------------- -Driver Notes: +Galaxy Force? +Run Away? +-------------------------- +TODO: +- Get rid of those big lookup tables, I see no proms on the PCB so it's hardcoded + logic somehow? it's 3bpp colors, not b&w + color overlay + Note: warp1 colors match the ones of dai3wksi according to flyer and game photos - Two player games are automatically displayed in cocktail mode. Is this by design (a cocktail only romset)? - - Discrete audio needs adding to replace hardcoded samples +- Is warp1 sound same as dai3wksi? +- Dips need identifying +- warp1 service mode is started by booting with coin1 held down, + the service switch can still be tested there but otherwise has no function? + In warp1bl, it is a service coin input. */ @@ -43,10 +47,15 @@ #include "machine/rescap.h" #include "sound/samples.h" #include "sound/sn76477.h" + #include "emupal.h" #include "screen.h" #include "speaker.h" +#include "warp1bl.lh" + + +namespace { #define USE_SAMPLES (1) @@ -64,47 +73,60 @@ m_ic80(*this, "ic80"), m_ic81(*this, "ic81"), m_palette(*this, "palette"), - m_dai3wksi_videoram(*this, "videoram"), - m_in2(*this, "IN2") + m_videoram(*this, "videoram"), + m_inputs(*this, "IN%u", 0) { } void dai3wksi(machine_config &config); + void warp1bl(machine_config &config); + + int warp1_protection_r() { return m_audio_data[0] & 1; } + +protected: + virtual void machine_start() override; private: - /* devices */ + // devices/pointers required_device m_maincpu; - required_device m_samples; + optional_device m_samples; optional_device m_ic77; optional_device m_ic78; optional_device m_ic79; optional_device m_ic80; optional_device m_ic81; required_device m_palette; + required_shared_ptr m_videoram; + required_ioport_array<3> m_inputs; - /* video */ - required_shared_ptr m_dai3wksi_videoram; - int m_dai3wksi_flipscreen; - int m_dai3wksi_redscreen; - int m_dai3wksi_redterop; - uint32_t screen_update_dai3wksi(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - - /* sound */ - uint8_t m_port_last1; - uint8_t m_port_last2; - int m_enabled_sound; - int m_sound3_counter; - void dai3wksi_audio_1_w(uint8_t data); - void dai3wksi_audio_2_w(uint8_t data); - void dai3wksi_audio_3_w(uint8_t data); - - /* i/o ports */ - required_ioport m_in2; - - virtual void machine_start() override; - virtual void machine_reset() override; void main_map(address_map &map); + + // video + u8 m_flipscreen = 0; + u8 m_redscreen = 0; + u8 m_redterop = 0; + u32 screen_update_color(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + u32 screen_update_bw(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); + + // sound + u8 m_audio_data[3] = { 0, 0, 0 }; + u8 m_enabled_sound = 0; + u8 m_sound3_counter = 0; + void audio_1_w(u8 data); + void audio_2_w(u8 data); + void audio_3_w(u8 data); }; +void dai3wksi_state::machine_start() +{ + // Set up save state + save_item(NAME(m_flipscreen)); + save_item(NAME(m_redscreen)); + save_item(NAME(m_redterop)); + save_item(NAME(m_audio_data)); + save_item(NAME(m_enabled_sound)); + save_item(NAME(m_sound3_counter)); +} + /************************************* * @@ -112,7 +134,7 @@ * *************************************/ -static const uint8_t vr_prom1[64*8*2]={ +static const u8 vr_prom1[64*8*2]={ 6, 6,6,6,6,6,6,6,6, 6,6,6,6,6,6,6,6, 3,3,3,3,3,3,3,3, 5,5,5,5,5,5,5,5, 3,3,3,3,3,3,3,3, 2,2,2,2,2,2,2,2, 6,6,6,6,6,6,6,6, 4,4,4,4,4,4,4, 6, 6,6,6,6,6,6,6,6, 6,6,6,6,6,6,6,6, 3,3,3,3,3,3,3,3, 5,5,5,5,5,5,5,5, 3,3,3,3,3,3,3,3, 2,2,2,2,2,2,2,2, 6,6,6,6,6,6,6,6, 4,4,4,4,4,4,4, 6, 6,6,6,6,6,6,6,6, 6,6,6,6,6,6,6,6, 3,3,3,3,3,3,3,3, 5,5,5,5,5,5,5,5, 3,3,3,3,3,3,3,3, 2,2,2,2,2,2,2,2, 6,6,6,6,6,6,6,6, 4,4,4,4,4,4,4, @@ -132,7 +154,7 @@ 3, 3,3,2,2,6,6,6,6, 6,6,6,6,6,6,6,6, 3,3,3,3,3,3,3,3, 5,5,5,5,5,5,5,5, 3,3,3,3,3,3,3,3, 2,2,2,2,2,2,2,2, 6,6,6,6,6,6,6,6, 4,4,4,4,4,4,4, }; -static const uint8_t vr_prom2[64*8*2]={ +static const u8 vr_prom2[64*8*2]={ 6, 6,6,6,6,6,6,6,6, 6,6,6,6,6,6,6,6, 3,3,3,3,3,3,3,3, 7,7,7,7,7,7,7,7, 3,3,3,3,3,3,3,3, 2,2,2,2,2,2,2,2, 6,6,6,6,6,6,6,6, 4,4,4,4,4,4,4, 6, 6,6,6,6,6,6,6,6, 6,6,6,6,6,6,6,6, 3,3,3,3,3,3,3,3, 7,7,7,7,7,7,7,7, 3,3,3,3,3,3,3,3, 2,2,2,2,2,2,2,2, 6,6,6,6,6,6,6,6, 4,4,4,4,4,4,4, 6, 6,6,6,6,6,6,6,6, 6,6,6,6,6,6,6,6, 3,3,3,3,3,3,3,3, 7,7,7,7,7,7,7,7, 3,3,3,3,3,3,3,3, 2,2,2,2,2,2,2,2, 6,6,6,6,6,6,6,6, 4,4,4,4,4,4,4, @@ -152,33 +174,33 @@ 3, 3,3,2,2,6,6,6,6, 6,6,6,6,6,6,6,6, 3,3,3,3,3,3,3,3, 7,7,7,7,7,7,7,7, 3,3,3,3,3,3,3,3, 2,2,2,2,2,2,2,2, 6,6,6,6,6,6,6,6, 4,4,4,4,4,4,4, }; -uint32_t dai3wksi_state::screen_update_dai3wksi(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) +u32 dai3wksi_state::screen_update_color(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) { - for (offs_t offs = 0; offs < m_dai3wksi_videoram.bytes(); offs++) + for (offs_t offs = 0; offs < m_videoram.bytes(); offs++) { - uint8_t x = offs << 2; - uint8_t y = offs >> 6; - uint8_t data = m_dai3wksi_videoram[offs]; - uint8_t color; - int value = (x >> 2) + ((y >> 5) << 6) + 64 * 8 * (m_dai3wksi_redterop ? 1 : 0); + u8 x = offs << 2; + u8 y = offs >> 6; + u8 data = m_videoram[offs]; + u8 color; + int value = (x >> 2) + ((y >> 5) << 6) + 64 * 8 * (m_redterop ? 1 : 0); - if (m_dai3wksi_redscreen) + if (m_redscreen) { color = 0x02; } else { - if (m_in2->read() & 0x03) + if (m_inputs[2]->read() & 0x03) color = vr_prom2[value]; else color = vr_prom1[value]; } - for (int i = 0; i <= 3; i++) + for (int i = 0; i < 4; i++) { rgb_t pen = (data & (1 << i)) ? m_palette->pen_color(color) : rgb_t::black(); - if (m_dai3wksi_flipscreen) + if (m_flipscreen) bitmap.pix(255-y, 255-x) = pen; else bitmap.pix(y, x) = pen; @@ -190,6 +212,29 @@ return 0; } +u32 dai3wksi_state::screen_update_bw(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) +{ + for (offs_t offs = 0; offs < m_videoram.bytes(); offs++) + { + u8 x = offs << 2; + u8 y = offs >> 6; + u8 data = m_videoram[offs]; + + for (int i = 0; i < 4; i++) + { + rgb_t pen = (data & (1 << i)) ? rgb_t::white() : rgb_t::black(); + + if (m_flipscreen) + bitmap.pix(255-y, 255-x) = pen; + else + bitmap.pix(y, x) = pen; + + x++; + } + } + + return 0; +} /************************************* * @@ -197,6 +242,8 @@ * *************************************/ +#if (USE_SAMPLES) + #define SAMPLE_SOUND1 0 #define SAMPLE_SOUND2 1 #define SAMPLE_SOUND3_1 2 @@ -213,11 +260,9 @@ #define CHANNEL_SOUND5 4 #define CHANNEL_SOUND6 5 - -#if (USE_SAMPLES) -void dai3wksi_state::dai3wksi_audio_1_w(uint8_t data) +void dai3wksi_state::audio_1_w(u8 data) { - uint8_t rising_bits = data & ~m_port_last1; + u8 rising_bits = data & ~m_audio_data[0]; m_enabled_sound = data & 0x80; @@ -228,19 +273,19 @@ else m_samples->start(CHANNEL_SOUND5, SAMPLE_SOUND5, true); } - if (!(data & 0x20) && (m_port_last1 & 0x20)) + if (!(data & 0x20) && (m_audio_data[0] & 0x20)) m_samples->stop(CHANNEL_SOUND5); - m_port_last1 = data; + m_audio_data[0] = data; } -void dai3wksi_state::dai3wksi_audio_2_w(uint8_t data) +void dai3wksi_state::audio_2_w(u8 data) { - uint8_t rising_bits = data & ~m_port_last2; + u8 rising_bits = data & ~m_audio_data[1]; - m_dai3wksi_flipscreen = data & 0x10; - m_dai3wksi_redscreen = ~data & 0x20; - m_dai3wksi_redterop = data & 0x40; + m_flipscreen = data & 0x10; + m_redscreen = ~data & 0x20; + m_redterop = data & 0x40; if (m_enabled_sound) { @@ -258,10 +303,10 @@ } } - m_port_last2 = data; + m_audio_data[1] = data; } -void dai3wksi_state::dai3wksi_audio_3_w(uint8_t data) +void dai3wksi_state::audio_3_w(u8 data) { if (m_enabled_sound) { @@ -270,6 +315,8 @@ else if (data & 0x80) m_samples->start(CHANNEL_SOUND6, SAMPLE_SOUND6_2); } + + m_audio_data[2] = data; } @@ -290,30 +337,36 @@ #else -void dai3wksi_state::dai3wksi_audio_1_w(uint8_t data) +void dai3wksi_state::audio_1_w(u8 data) { - machine().sound().system_enable(data & 0x80); + machine().sound().system_mute(!BIT(data, 7)); - m_ic79->enable_w((~data >> 5) & 0x01); /* invader movement enable */ - m_ic79->envelope_1_w((~data >> 2) & 0x01); /* invader movement envelope control*/ + m_ic79->enable_w((~data >> 5) & 0x01); // invader movement enable + m_ic79->envelope_1_w((~data >> 2) & 0x01); // invader movement envelope control + + m_audio_data[0] = data; } -void dai3wksi_state::dai3wksi_audio_2_w(uint8_t data) +void dai3wksi_state::audio_2_w(u8 data) { - m_dai3wksi_flipscreen = data & 0x10; - m_dai3wksi_redscreen = ~data & 0x20; - m_dai3wksi_redterop = data & 0x40; + m_flipscreen = data & 0x10; + m_redscreen = ~data & 0x20; + m_redterop = data & 0x40; + + m_ic77->enable_w((~data >> 0) & 0x01); // ship movement + m_ic78->enable_w((~data >> 1) & 0x01); // danger text + // ic76 - invader hit (~data >> 2) & 0x01 + m_ic80->enable_w((~data >> 3) & 0x01); // planet explosion - m_ic77->enable_w((~data >> 0) & 0x01); /* ship movement */ - m_ic78->enable_w((~data >> 1) & 0x01); /* danger text */ - /* ic76 - invader hit (~data >> 2) & 0x01 */ - m_ic80->enable_w((~data >> 3) & 0x01); /* planet explosion */ + m_audio_data[1] = data; } -void dai3wksi_state::dai3wksi_audio_3_w(uint8_t data) +void dai3wksi_state::audio_3_w(u8 data) { - m_ic81->enable_w((~data >> 2) & 0x01); /* player shoot enable */ - m_ic81->vco_w((~data >> 3) & 0x01); /* player shoot vco control */ + m_ic81->enable_w((~data >> 2) & 0x01); // player shoot enable + m_ic81->vco_w((~data >> 3) & 0x01); // player shoot vco control + + m_audio_data[2] = data; } #endif @@ -329,12 +382,12 @@ { map(0x0000, 0x1bff).rom(); map(0x2000, 0x23ff).ram(); - map(0x2400, 0x24ff).mirror(0x100).portr("IN0"); - map(0x2800, 0x28ff).mirror(0x100).portr("IN1"); - map(0x3000, 0x3000).w(FUNC(dai3wksi_state::dai3wksi_audio_1_w)); - map(0x3400, 0x3400).w(FUNC(dai3wksi_state::dai3wksi_audio_2_w)); - map(0x3800, 0x3800).w(FUNC(dai3wksi_state::dai3wksi_audio_3_w)); - map(0x8000, 0xbfff).ram().share("videoram"); + map(0x2400, 0x2400).mirror(0x1ff).portr("IN0"); + map(0x2800, 0x2800).mirror(0x1ff).portr("IN1"); + map(0x3000, 0x3000).w(FUNC(dai3wksi_state::audio_1_w)); + map(0x3400, 0x3400).w(FUNC(dai3wksi_state::audio_2_w)); + map(0x3800, 0x3800).w(FUNC(dai3wksi_state::audio_3_w)); + map(0x8000, 0xbfff).ram().share(m_videoram); } @@ -348,7 +401,7 @@ PORT_START("IN0") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_PLAYER(1) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(1) - PORT_SERVICE( 0x04, IP_ACTIVE_HIGH ) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SERVICE1 ) // hold down at boot for service mode PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_PLAYER(2) PORT_DIPNAME( 0x10, 0x00, "DIPSW #7" ) PORT_DIPLOCATION("SW1:7") PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) @@ -379,6 +432,44 @@ PORT_BIT( 0xfc, IP_ACTIVE_HIGH, IPT_UNKNOWN ) INPUT_PORTS_END +static INPUT_PORTS_START( warp1 ) + PORT_INCLUDE( dai3wksi ) + + PORT_MODIFY("IN0") + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(dai3wksi_state, warp1_protection_r) + PORT_DIPNAME( 0x20, 0x20, "High Score Table" ) PORT_DIPLOCATION("SW1:8") + PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + + PORT_MODIFY("IN1") // active-low + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(2) + PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(1) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY PORT_PLAYER(1) + + PORT_MODIFY("IN2") + PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNKNOWN ) +INPUT_PORTS_END + +static INPUT_PORTS_START( warp1bl ) // the bootleg seems to expect active low + PORT_INCLUDE( warp1 ) + + PORT_MODIFY("IN0") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_PLAYER(1) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(1) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_PLAYER(2) + PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_PLAYER(2) + PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) + + PORT_MODIFY("IN1") + PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START2 ) + PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 ) + PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) + PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_PLAYER(2) +INPUT_PORTS_END + /************************************* * @@ -386,40 +477,19 @@ * *************************************/ -void dai3wksi_state::machine_start() -{ - /* Set up save state */ - save_item(NAME(m_dai3wksi_flipscreen)); - save_item(NAME(m_dai3wksi_redscreen)); - save_item(NAME(m_dai3wksi_redterop)); - save_item(NAME(m_port_last1)); - save_item(NAME(m_port_last2)); - save_item(NAME(m_enabled_sound)); - save_item(NAME(m_sound3_counter)); -} - -void dai3wksi_state::machine_reset() -{ - m_port_last1 = 0; - m_port_last2 = 0; - m_enabled_sound = 0; - m_sound3_counter = 0; -} - - void dai3wksi_state::dai3wksi(machine_config &config) { - /* basic machine hardware */ + // basic machine hardware Z80(config, m_maincpu, XTAL(10'000'000)/4); m_maincpu->set_addrmap(AS_PROGRAM, &dai3wksi_state::main_map); m_maincpu->set_vblank_int("screen", FUNC(dai3wksi_state::irq0_line_hold)); - /* video hardware */ + // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_size(256, 256); - screen.set_visarea(4, 251, 8, 247); + screen.set_visarea(0, 255, 8, 247); screen.set_refresh_hz(60); - screen.set_screen_update(FUNC(dai3wksi_state::screen_update_dai3wksi)); + screen.set_screen_update(FUNC(dai3wksi_state::screen_update_color)); PALETTE(config, m_palette, palette_device::BRG_3BIT); @@ -535,6 +605,15 @@ #endif } +void dai3wksi_state::warp1bl(machine_config &config) +{ + dai3wksi(config); + + // the bootleg is in b&w + subdevice("screen")->set_screen_update(FUNC(dai3wksi_state::screen_update_bw)); + PALETTE(config.replace(), m_palette, palette_device::MONOCHROME); +} + /************************************* * @@ -550,6 +629,27 @@ ROM_LOAD( "tvg_16.9", 0x1800, 0x0400, CRC(ae723f56) SHA1(c25c27d6144533b2b2a888bfa8dbf48ed8d8b09a) ) ROM_END +ROM_START( warp1 ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "tvg_23.6", 0x0000, 0x0800, CRC(2025a316) SHA1(704798ec1d0039cb977396330801a625c8b02cff) ) + ROM_LOAD( "tvg_24.7", 0x0800, 0x0800, CRC(6cca323d) SHA1(e5dc4f09990c3f9e408e25e189a9355d7c021128) ) + ROM_LOAD( "tvg_25.8", 0x1000, 0x0800, CRC(5aa6eb1e) SHA1(ccf18d9618635c38747a57dad2214e6ca14c835d) ) + ROM_LOAD( "tvg_26.9", 0x1800, 0x0400, CRC(6bf25327) SHA1(ee9f635d70a97628ab82efa12efdb39349b52e2b) ) +ROM_END + +ROM_START( warp1bl ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "0", 0x0000, 0x0400, CRC(d4383a9a) SHA1(eda0b388bd0adf22059f0848ce91fee889700f0c) ) + ROM_LOAD( "1", 0x0400, 0x0400, CRC(6005eddc) SHA1(a06dbdbe3356eb011dbce756e6c76adef4c50beb) ) + ROM_LOAD( "2", 0x0800, 0x0400, CRC(76ea7ebc) SHA1(60eb870f30aaf95589c7326ca6664974e39f3e27) ) + ROM_LOAD( "3", 0x0c00, 0x0400, CRC(0c34ef33) SHA1(513fe5a875746d94d2ea0b7eed81ca0cf869c457) ) + ROM_LOAD( "4", 0x1000, 0x0400, CRC(41ffad36) SHA1(479af4506f3637a95d2d41d04e1d66debb28da03) ) + ROM_LOAD( "5", 0x1400, 0x0400, CRC(f67a1e1d) SHA1(aeb7b018889de4bd32ee8f65d8c0c32bbee07440) ) + ROM_LOAD( "6", 0x1800, 0x0400, CRC(44e9327f) SHA1(aa217b0fbbef6a408231dc0dfedd94167c351c28) ) +ROM_END + +} // Anonymous namespace + /************************************* * @@ -557,4 +657,7 @@ * *************************************/ -GAME( 1979, dai3wksi, 0, dai3wksi, dai3wksi, dai3wksi_state, empty_init, ROT270, "Sun Electronics", "Dai 3 Wakusei (Japan)", MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1979, dai3wksi, 0, dai3wksi, dai3wksi, dai3wksi_state, empty_init, ROT270, "Sun Electronics", "Dai 3 Wakusei (Japan)", MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) + +GAME( 1979, warp1, 0, dai3wksi, warp1, dai3wksi_state, empty_init, ROT90, "Sun Electronics (Taito license)", "Warp-1", MACHINE_IMPERFECT_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAMEL(1979, warp1bl, warp1, warp1bl, warp1bl, dai3wksi_state, empty_init, ROT270, "bootleg (Igleck)", "Warp-1 (Japan, bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE, layout_warp1bl ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/dcon.cpp mame-0.231+dfsg.1/src/mame/drivers/dcon.cpp --- mame-0.230+dfsg.1/src/mame/drivers/dcon.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/dcon.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -19,9 +19,9 @@ #include "cpu/m68000/m68000.h" #include "cpu/z80/z80.h" -#include "sound/3812intf.h" #include "sound/okim6295.h" #include "sound/ym2151.h" +#include "sound/ym3812.h" #include "video/seibu_crtc.h" #include "screen.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/dec0.cpp mame-0.231+dfsg.1/src/mame/drivers/dec0.cpp --- mame-0.230+dfsg.1/src/mame/drivers/dec0.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/dec0.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -397,9 +397,9 @@ #include "cpu/z80/z80.h" #include "cpu/m6805/m68705.h" #include "machine/upd4701.h" -#include "sound/3812intf.h" #include "sound/okim6295.h" #include "sound/ym2203.h" +#include "sound/ym3812.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/dec8.cpp mame-0.231+dfsg.1/src/mame/drivers/dec8.cpp --- mame-0.230+dfsg.1/src/mame/drivers/dec8.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/dec8.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -48,10 +48,10 @@ #include "cpu/m6809/hd6309.h" #include "cpu/m6809/m6809.h" #include "machine/deco222.h" -#include "sound/3526intf.h" -#include "sound/3812intf.h" #include "sound/msm5205.h" #include "sound/ym2203.h" +#include "sound/ym3526.h" +#include "sound/ym3812.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/deniam.cpp mame-0.231+dfsg.1/src/mame/drivers/deniam.cpp --- mame-0.230+dfsg.1/src/mame/drivers/deniam.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/deniam.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -49,7 +49,7 @@ #include "cpu/m68000/m68000.h" #include "cpu/z80/z80.h" #include "sound/okim6295.h" -#include "sound/3812intf.h" +#include "sound/ym3812.h" #include "screen.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/discoboy.cpp mame-0.231+dfsg.1/src/mame/drivers/discoboy.cpp --- mame-0.230+dfsg.1/src/mame/drivers/discoboy.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/discoboy.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -47,7 +47,7 @@ #include "machine/bankdev.h" #include "machine/gen_latch.h" #include "sound/msm5205.h" -#include "sound/3812intf.h" +#include "sound/ym3812.h" #include "emupal.h" #include "screen.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/dogfgt.cpp mame-0.231+dfsg.1/src/mame/drivers/dogfgt.cpp --- mame-0.230+dfsg.1/src/mame/drivers/dogfgt.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/dogfgt.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -2,7 +2,7 @@ // copyright-holders:Nicola Salmoria /*************************************************************************** -Acrobatic Dog-Fight / Batten O'hara no Sucha-Raka Kuuchuu Sen +Acrobatic Dog-Fight / 『バッテン・オハラのスチャラカ空中戦』 (c) 1984 Technos Japan driver by Nicola Salmoria @@ -366,4 +366,4 @@ GAME( 1984, dogfgt, 0, dogfgt, dogfgt, dogfgt_state, empty_init, ROT0, "Technos Japan", "Acrobatic Dog-Fight", MACHINE_SUPPORTS_SAVE ) GAME( 1985, dogfgtu, dogfgt, dogfgt, dogfgt, dogfgt_state, empty_init, ROT0, "Technos Japan (Data East USA, Inc. license)", "Acrobatic Dog-Fight (USA)", MACHINE_SUPPORTS_SAVE ) -GAME( 1984, dogfgtj, dogfgt, dogfgt, dogfgt, dogfgt_state, empty_init, ROT0, "Technos Japan", "Dog-Fight (Japan)", MACHINE_SUPPORTS_SAVE ) +GAME( 1984, dogfgtj, dogfgt, dogfgt, dogfgt, dogfgt_state, empty_init, ROT0, "Technos Japan", "But-ten Ohara's Suit-Cha Luck-a Dog-Fight (Japan)", MACHINE_SUPPORTS_SAVE ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/dragon.cpp mame-0.231+dfsg.1/src/mame/drivers/dragon.cpp --- mame-0.230+dfsg.1/src/mame/drivers/dragon.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/dragon.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -274,6 +274,7 @@ pia6821_device &pia0(PIA6821(config, PIA0_TAG, 0)); pia0.writepa_handler().set(FUNC(coco_state::pia0_pa_w)); pia0.writepb_handler().set(FUNC(coco_state::pia0_pb_w)); + pia0.tspb_handler().set_constant(0xff); pia0.ca2_handler().set(FUNC(coco_state::pia0_ca2_w)); pia0.cb2_handler().set(FUNC(coco_state::pia0_cb2_w)); pia0.irqa_handler().set(m_irqs, FUNC(input_merger_device::in_w<0>)); diff -Nru mame-0.230+dfsg.1/src/mame/drivers/dunhuang.cpp mame-0.231+dfsg.1/src/mame/drivers/dunhuang.cpp --- mame-0.230+dfsg.1/src/mame/drivers/dunhuang.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/dunhuang.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -511,8 +511,8 @@ map(0x001b, 0x001b).w(FUNC(dunhuang_state::block_dest_w)); - map(0x0081, 0x0081).w("ymsnd", FUNC(ym2413_device::register_port_w)); - map(0x0089, 0x0089).w("ymsnd", FUNC(ym2413_device::data_port_w)); + map(0x0081, 0x0081).w("ymsnd", FUNC(ym2413_device::address_w)); + map(0x0089, 0x0089).w("ymsnd", FUNC(ym2413_device::data_w)); map(0x0082, 0x0082).w("oki", FUNC(okim6295_device::write)); diff -Nru mame-0.230+dfsg.1/src/mame/drivers/dynax.cpp mame-0.231+dfsg.1/src/mame/drivers/dynax.cpp --- mame-0.230+dfsg.1/src/mame/drivers/dynax.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/dynax.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -85,10 +85,10 @@ #include "cpu/z80/tmpz84c015.h" #include "machine/msm6242.h" #include "machine/nvram.h" -#include "sound/3812intf.h" #include "sound/ay8910.h" #include "sound/ym2203.h" #include "sound/ym2413.h" +#include "sound/ym3812.h" #include "layout/generic.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/dynduke.cpp mame-0.231+dfsg.1/src/mame/drivers/dynduke.cpp --- mame-0.230+dfsg.1/src/mame/drivers/dynduke.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/dynduke.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -72,8 +72,8 @@ #include "cpu/nec/nec.h" #include "cpu/z80/z80.h" -#include "sound/3812intf.h" #include "sound/okim6295.h" +#include "sound/ym3812.h" #include "screen.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/elzet80.cpp mame-0.231+dfsg.1/src/mame/drivers/elzet80.cpp --- mame-0.230+dfsg.1/src/mame/drivers/elzet80.cpp 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/elzet80.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,181 @@ +// license:BSD-3-Clause +// copyright-holders:Robbbert +/*************************************************************************** + +ELZET/K +ELZET/P +BCS + +All documentation is in German. + +The ELZET/P is a luggable CP/M computer that from the outside looks very +much like a Kaypro II. The floppy drives could be one under the other like +the Kaypro, or could be vertically-orientated side-by-side. The drives are +80 track quad-density with 800KB capacity. +Behind the drives is a cage that can hold up to 8 slots that plug into a +small motherboard. +CARDS: (some are optional) +- Floppy Disk Controller: choice of FDC 2: (basic) or FDC3 (also has 128K RAM) + (main chips are PIO, DMA, MB8877A) +- Dynamic RAM: choice of 64k or 256k +- Centronics (contains PIO, CTC) +- EIC (contains PIO, DART, Z80B) +- Experimenter board (contains PIO, CTC) +- Video (contains MC6845, 2k vram, 2k attr-ram, chargen roms, 15MHz xtal) +- CPU (contains Z80, SIO, PIO, 4MHz xtal) + +The keyboard plugs into the front by using a stereo audio plug, like you +have on a modern computer's line-out jack. There's no internal information +for it. + + +The ELZET/K is a similar computer but is a slightly smaller form factor. + +The BCS is a box that can be used to convert over 300 floppy-disk formats. + +*************************************************************************** + + +To Do: Everything. +Status: Just a closet skeleton + + +***************************************************************************/ + +#include "emu.h" +#include "cpu/z80/z80.h" +#include "imagedev/floppy.h" +#include "machine/z80ctc.h" +#include "machine/z80dma.h" +#include "machine/z80sio.h" +#include "machine/z80pio.h" +#include "machine/wd_fdc.h" + +class elzet80_state : public driver_device +{ +public: + elzet80_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_ctc(*this, "ctc") + , m_dma(*this, "dma") + , m_pio(*this, "pio") + , m_uart(*this, "uart") + , m_fdc(*this, "fdc") + , m_floppy0(*this, "fdc:0") + , m_floppy1(*this, "fdc:1") + //, m_io_keyboard(*this, "LINE%u", 0) + { } + + void elzet80(machine_config &config); + +protected: + virtual void machine_start() override; + virtual void machine_reset() override; + +private: + + void mem_map(address_map &map); + void io_map(address_map &map); + + floppy_image_device *m_floppy; + required_device m_maincpu; + required_device m_ctc; + required_device m_dma; + required_device m_pio; + required_device m_uart; + required_device m_fdc; + required_device m_floppy0; + required_device m_floppy1; + //required_ioport_array<8> m_io_keyboard; +}; + + +void elzet80_state::mem_map(address_map &map) +{ +} + +void elzet80_state::io_map(address_map &map) +{ + map.global_mask(0xff); + map.unmap_value_high(); +} + +static INPUT_PORTS_START( elzet80 ) +INPUT_PORTS_END + + +void elzet80_state::machine_start() +{ +} + +void elzet80_state::machine_reset() +{ + m_floppy = nullptr; +} + +static void elzet80_floppies(device_slot_interface &device) +{ + device.option_add("fdd", FLOPPY_525_QD); +} + + +void elzet80_state::elzet80(machine_config &config) +{ + /* basic machine hardware */ + Z80(config, m_maincpu, 4_MHz_XTAL); + m_maincpu->set_addrmap(AS_PROGRAM, &elzet80_state::mem_map); + m_maincpu->set_addrmap(AS_IO, &elzet80_state::io_map); + + // devices + FD1793(config, m_fdc, 1000000); // unknown where this is derived + FLOPPY_CONNECTOR(config, "fdc:0", elzet80_floppies, "fdd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, "fdc:1", elzet80_floppies, "fdd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); + + Z80PIO(config, m_pio, 0); + Z80SIO(config, m_uart, 0); + Z80CTC(config, m_ctc, 0); + Z80DMA(config, m_dma, 0); +} + + +/*************************************************************************** + + Game driver(s) + +***************************************************************************/ + + +ROM_START(elzet80k) + ROM_REGION(0x1000, "maincpu", 0) + ROM_LOAD( "elzet80-k_cpu.bin", 0x0000, 0x1000, CRC(e5300137) SHA1(5a9fcb52756a2e9008d53b734b874d33b069efb5) ) + + ROM_REGION(0x2000, "chargen", 0) // same roms as P? + ROM_LOAD( "elzet80-p_video80_ic1_prom3.bin", 0x0000, 0x1000, CRC(70008d71) SHA1(048efed186861050f0e6b47fec57149319de22b6) ) + ROM_LOAD( "elzet80-p_video80_ic2_prom4.bin", 0x1000, 0x1000, CRC(8db78b54) SHA1(7d0ce2811ee1f6c179295411fd8c3c2e67ea2842) ) + + ROM_REGION(0x1000, "kbd", 0) + ROM_LOAD( "elzet80-k_tastatur_d8748.bin", 0x0000, 0x0400, CRC(78bf6f1a) SHA1(95919363e73779899cbd7c143d10c245c35ca789) ) + + ROM_REGION(0x1000, "bcs", 0) + ROM_LOAD( "elzet80-bcs_cpuiec.bin", 0x0000, 0x1000, CRC(724fe45a) SHA1(b4b01c9bf11b35c48b0a4839d7530a18259b1ae9) ) +ROM_END + +ROM_START(elzet80p) + ROM_REGION(0x1000, "maincpu", 0) + ROM_LOAD( "elzet80-p_cpu.bin", 0x0000, 0x1000, CRC(8b876e12) SHA1(0fb4dfe267a3fbc033fbce430d13fb22a4ad16ed) ) + + ROM_REGION(0x2000, "chargen", 0) + ROM_LOAD( "elzet80-p_video80_ic1_prom3.bin", 0x0000, 0x1000, CRC(70008d71) SHA1(048efed186861050f0e6b47fec57149319de22b6) ) + ROM_LOAD( "elzet80-p_video80_ic2_prom4.bin", 0x1000, 0x1000, CRC(8db78b54) SHA1(7d0ce2811ee1f6c179295411fd8c3c2e67ea2842) ) + + ROM_REGION(0x1000, "kbd", 0) + ROM_LOAD( "elzet80-p_tastatur_jk_ti2732.bin", 0x0000, 0x1000, CRC(88be9b29) SHA1(b83603dadce9d7e7367d1782ee78189156fe9a60) ) + + ROM_REGION(0x1000, "bcs", 0) + ROM_LOAD( "elzet80-bcs_cpuiec.bin", 0x0000, 0x1000, CRC(724fe45a) SHA1(b4b01c9bf11b35c48b0a4839d7530a18259b1ae9) ) +ROM_END + +// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS +COMP( 1982, elzet80k, elzet80p, 0, elzet80, elzet80, elzet80_state, empty_init, "Giesler & Danne GmbH & Co. KG", "Elzet/K 80", MACHINE_IS_SKELETON ) +COMP( 1982, elzet80p, 0, 0, elzet80, elzet80, elzet80_state, empty_init, "Giesler & Danne GmbH & Co. KG", "Elzet/P 80", MACHINE_IS_SKELETON ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/esd16.cpp mame-0.231+dfsg.1/src/mame/drivers/esd16.cpp --- mame-0.230+dfsg.1/src/mame/drivers/esd16.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/esd16.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -70,8 +70,8 @@ #include "cpu/m68000/m68000.h" #include "cpu/z80/z80.h" -#include "sound/3812intf.h" #include "sound/okim6295.h" +#include "sound/ym3812.h" #include "emupal.h" #include "screen.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/exprraid.cpp mame-0.231+dfsg.1/src/mame/drivers/exprraid.cpp --- mame-0.230+dfsg.1/src/mame/drivers/exprraid.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/exprraid.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -211,8 +211,8 @@ #include "cpu/m6502/deco16.h" #include "cpu/m6502/m6502.h" #include "cpu/m6809/m6809.h" -#include "sound/3526intf.h" #include "sound/ym2203.h" +#include "sound/ym3526.h" #include "screen.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/fantland.cpp mame-0.231+dfsg.1/src/mame/drivers/fantland.cpp --- mame-0.230+dfsg.1/src/mame/drivers/fantland.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/fantland.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -46,10 +46,10 @@ #include "cpu/i86/i86.h" #include "cpu/nec/nec.h" #include "cpu/z80/z80.h" -#include "sound/3526intf.h" #include "sound/dac.h" #include "sound/sn76496.h" #include "sound/ym2151.h" +#include "sound/ym3526.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/fidel_as12.cpp mame-0.231+dfsg.1/src/mame/drivers/fidel_as12.cpp --- mame-0.230+dfsg.1/src/mame/drivers/fidel_as12.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/fidel_as12.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -18,13 +18,13 @@ #include "emu.h" #include "machine/fidel_clockdiv.h" +#include "bus/generic/slot.h" +#include "bus/generic/carts.h" #include "cpu/m6502/r65c02.h" #include "machine/sensorboard.h" #include "machine/timer.h" #include "sound/dac.h" #include "video/pwm.h" -#include "bus/generic/slot.h" -#include "bus/generic/carts.h" #include "softlist.h" #include "speaker.h" @@ -76,18 +76,14 @@ void led_w(offs_t offset, u8 data); u8 input_r(offs_t offset); - u16 m_inp_mux; - u8 m_led_data; + u16 m_inp_mux = 0; + u8 m_led_data = 0; }; void as12_state::machine_start() { fidel_clockdiv_state::machine_start(); - // zerofill - m_inp_mux = 0; - m_led_data = 0; - // register for savestates save_item(NAME(m_inp_mux)); save_item(NAME(m_led_data)); diff -Nru mame-0.230+dfsg.1/src/mame/drivers/fidel_csc.cpp mame-0.231+dfsg.1/src/mame/drivers/fidel_csc.cpp --- mame-0.230+dfsg.1/src/mame/drivers/fidel_csc.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/fidel_csc.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -823,7 +823,7 @@ // YEAR NAME PARENT CMP MACHINE INPUT STATE INIT COMPANY, FULLNAME, FLAGS CONS( 1981, csc, 0, 0, csc, csc, csc_state, empty_init, "Fidelity Electronics", "Champion Sensory Chess Challenger", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1981, csce, 0, 0, csce, csc, csc_state, empty_init, "Fidelity Electronics", u8"Elite Champion Challenger (Travemünde version)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1981, csce, 0, 0, csce, csc, csc_state, empty_init, "Fidelity Electronics", u8"Elite Champion Challenger (Travemünde TM version)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) CONS( 1983, super9cc, 0, 0, su9, su9, su9_state, empty_init, "Fidelity Electronics", "Super \"9\" Sensory Chess Challenger", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/fidel_desdis.cpp mame-0.231+dfsg.1/src/mame/drivers/fidel_desdis.cpp --- mame-0.230+dfsg.1/src/mame/drivers/fidel_desdis.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/fidel_desdis.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -169,8 +169,6 @@ u8 mask = (m_select & 8) ? 0 : 0xff; for (int i = 0; i < 4; i++) m_display->write_row(i+2, (m_lcd_data >> (8*i) & 0xff) ^ mask); - - m_display->update(); } void desdis_state::control_w(offs_t offset, u8 data) @@ -188,7 +186,7 @@ m_dac->write(BIT(sel, 9)); // 74259 Q0,Q1: led select (active low) - m_display->matrix_partial(0, 2, ~m_select & 3, led_data, false); + m_display->matrix_partial(0, 2, ~m_select & 3, led_data); // 74259 Q2: book rom A14 if (m_rombank != nullptr) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/fidel_eag68k.cpp mame-0.231+dfsg.1/src/mame/drivers/fidel_eag68k.cpp --- mame-0.230+dfsg.1/src/mame/drivers/fidel_eag68k.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/fidel_eag68k.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -161,6 +161,9 @@ ******************************************************************************/ #include "emu.h" + +#include "bus/generic/slot.h" +#include "bus/generic/carts.h" #include "cpu/m68000/m68000.h" #include "machine/gen_latch.h" #include "machine/ram.h" @@ -169,8 +172,6 @@ #include "machine/sensorboard.h" #include "sound/dac.h" #include "video/pwm.h" -#include "bus/generic/slot.h" -#include "bus/generic/carts.h" #include "softlist.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/fidel_excel.cpp mame-0.231+dfsg.1/src/mame/drivers/fidel_excel.cpp --- mame-0.230+dfsg.1/src/mame/drivers/fidel_excel.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/fidel_excel.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -205,20 +205,14 @@ void ttl_w(offs_t offset, u8 data); u8 ttl_r(offs_t offset); - u8 m_select; - u8 m_7seg_data; - u8 m_speech_data; - u8 m_speech_bank; + u8 m_select = 0; + u8 m_7seg_data = 0; + u8 m_speech_data = 0; + u8 m_speech_bank = 0; }; void excel_state::machine_start() { - // zerofill - m_select = 0; - m_7seg_data = 0; - m_speech_data = 0; - m_speech_bank = 0; - // register for savestates save_item(NAME(m_select)); save_item(NAME(m_7seg_data)); @@ -273,7 +267,7 @@ u8 seg_data = bitswap<8>(m_7seg_data,0,1,3,2,7,5,6,4); // update display: 4 7seg leds, 2*8 chessboard leds - m_display->matrix_partial(0, 2, led_sel, led_data, false); + m_display->matrix_partial(0, 2, led_sel, led_data); m_display->matrix_partial(2, 4, led_sel >> 2, seg_data); // 6093 // speech (model 6092) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/fidel_phantom.cpp mame-0.231+dfsg.1/src/mame/drivers/fidel_phantom.cpp --- mame-0.230+dfsg.1/src/mame/drivers/fidel_phantom.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/fidel_phantom.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -142,6 +142,7 @@ } + /****************************************************************************** Motor Sim ******************************************************************************/ @@ -206,6 +207,7 @@ } + /****************************************************************************** I/O ******************************************************************************/ @@ -215,8 +217,6 @@ u8 mask = (m_select & 0x80) ? 0xff : 0; for (int i = 0; i < 4; i++) m_display->write_row(i+1, (m_lcd_data >> (8*i) & 0xff) ^ mask); - - m_display->update(); } void phantom_state::control_w(offs_t offset, u8 data) @@ -228,7 +228,7 @@ // 74259 Q0-Q3: 7442 a0-a3 // 7442 0-8: led data, input mux // 74259 Q4: led select - m_display->matrix_partial(0, 1, BIT(~m_select, 4), 1 << (m_select & 0xf), false); + m_display->matrix_partial(0, 1, BIT(~m_select, 4), 1 << (m_select & 0xf)); // 74259 Q6: bookrom bank m_rombank->set_entry(BIT(m_select, 6)); @@ -336,6 +336,7 @@ } + /****************************************************************************** Address Maps ******************************************************************************/ diff -Nru mame-0.230+dfsg.1/src/mame/drivers/fidel_sc9.cpp mame-0.231+dfsg.1/src/mame/drivers/fidel_sc9.cpp --- mame-0.230+dfsg.1/src/mame/drivers/fidel_sc9.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/fidel_sc9.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -35,20 +35,21 @@ ******************************************************************************/ #include "emu.h" + +#include "bus/generic/slot.h" +#include "bus/generic/carts.h" #include "cpu/m6502/m6502.h" #include "machine/sensorboard.h" #include "machine/timer.h" #include "sound/dac.h" #include "video/pwm.h" -#include "bus/generic/slot.h" -#include "bus/generic/carts.h" #include "softlist.h" #include "speaker.h" // internal artwork -#include "fidel_playmatic.lh" // clickable -#include "fidel_sc9.lh" // clickable +#include "fidel_playmatic.lh" +#include "fidel_sc9.lh" namespace { @@ -100,16 +101,12 @@ u8 input_r(); u8 input_d7_r(offs_t offset); - u8 m_inp_mux; - u8 m_led_data; + u8 m_inp_mux = 0; + u8 m_led_data = 0; }; void sc9_state::machine_start() { - // zerofill - m_inp_mux = 0; - m_led_data = 0; - // register for savestates save_item(NAME(m_inp_mux)); save_item(NAME(m_led_data)); diff -Nru mame-0.230+dfsg.1/src/mame/drivers/firebeat.cpp mame-0.231+dfsg.1/src/mame/drivers/firebeat.cpp --- mame-0.230+dfsg.1/src/mame/drivers/firebeat.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/firebeat.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -2581,7 +2581,7 @@ DISK_IMAGE_READONLY( "a05jca01", 0, SHA1(b89eced8a1325b087e3f875d1a643bebe9bad5c0) ) DISK_REGION( "spu_ata:0:hdd:image" ) // HDD - DISK_IMAGE_READONLY( "a05jca02", 0, NO_DUMP ) + DISK_IMAGE_READONLY( "a05jca02", 0, SHA1(1de7db35d20bbf728732f6a24c19315f9f4ad469) ) ROM_END ROM_START( bm36th ) @@ -2598,7 +2598,7 @@ DISK_IMAGE_READONLY( "a21jca01", 0, SHA1(d1b888379cc0b2c2ab58fa2c5be49258043c3ea1) ) DISK_REGION( "spu_ata:0:hdd:image" ) // HDD - DISK_IMAGE_READONLY( "a21jca02", 0, NO_DUMP ) + DISK_IMAGE_READONLY( "a21jca02", 0, SHA1(8fa11848af40966e42b6304e37de92be5c1fe3dc) ) ROM_END ROM_START( bm37th ) @@ -2665,7 +2665,7 @@ // Requires ST-224 emulation for optional toggleable external effects, but otherwise is fully playable // Core Remix and 6th Mix are marked as MACHINE_NOT_WORKING because of missing HDD dumps GAME( 2000, bm3, 0, firebeat_bm3, bm3, firebeat_bm3_state, init_bm3, ROT0, "Konami", "Beatmania III", MACHINE_IMPERFECT_SOUND ) -GAME( 2000, bm3core, 0, firebeat_bm3, bm3, firebeat_bm3_state, init_bm3, ROT0, "Konami", "Beatmania III Append Core Remix", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) -GAME( 2001, bm36th, 0, firebeat_bm3, bm3, firebeat_bm3_state, init_bm3, ROT0, "Konami", "Beatmania III Append 6th Mix", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND ) +GAME( 2000, bm3core, 0, firebeat_bm3, bm3, firebeat_bm3_state, init_bm3, ROT0, "Konami", "Beatmania III Append Core Remix", MACHINE_IMPERFECT_SOUND ) +GAME( 2001, bm36th, 0, firebeat_bm3, bm3, firebeat_bm3_state, init_bm3, ROT0, "Konami", "Beatmania III Append 6th Mix", MACHINE_IMPERFECT_SOUND ) GAME( 2002, bm37th, 0, firebeat_bm3, bm3, firebeat_bm3_state, init_bm3, ROT0, "Konami", "Beatmania III Append 7th Mix", MACHINE_IMPERFECT_SOUND ) GAME( 2003, bm3final, 0, firebeat_bm3, bm3, firebeat_bm3_state, init_bm3, ROT0, "Konami", "Beatmania III The Final", MACHINE_IMPERFECT_SOUND ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/firetrap.cpp mame-0.231+dfsg.1/src/mame/drivers/firetrap.cpp --- mame-0.230+dfsg.1/src/mame/drivers/firetrap.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/firetrap.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -176,7 +176,7 @@ #include "cpu/z80/z80.h" #include "cpu/m6502/m6502.h" -#include "sound/3526intf.h" +#include "sound/ym3526.h" #include "screen.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/flkatck.cpp mame-0.231+dfsg.1/src/mame/drivers/flkatck.cpp --- mame-0.230+dfsg.1/src/mame/drivers/flkatck.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/flkatck.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -7,9 +7,6 @@ Driver by: Manuel Abadia - TO DO: - -What does 0x900X do? (Z80) - NOTE: There is known to exist a USA version of Flak Attack - currently not dumped 24MHz & 3.579545MHz OSCs @@ -22,6 +19,7 @@ #include "cpu/z80/z80.h" #include "cpu/m6809/hd6309.h" +#include "machine/k007452.h" #include "sound/ym2151.h" #include "screen.h" #include "speaker.h" @@ -84,18 +82,6 @@ } } -/* Protection - an external multiplier connected to the sound CPU */ -uint8_t flkatck_state::multiply_r() -{ - return (m_multiply_reg[0] * m_multiply_reg[1]) & 0xff; -} - -void flkatck_state::multiply_w(offs_t offset, uint8_t data) -{ - m_multiply_reg[offset] = data; -} - - void flkatck_state::flkatck_map(address_map &map) { map(0x0000, 0x0007).ram().w(FUNC(flkatck_state::flkatck_k007121_regs_w)); /* 007121 registers */ @@ -113,11 +99,7 @@ { map(0x0000, 0x7fff).rom(); /* ROM */ map(0x8000, 0x87ff).ram(); /* RAM */ - map(0x9000, 0x9000).r(FUNC(flkatck_state::multiply_r)); // 007452: Protection (see wecleman, but unused here?) - map(0x9001, 0x9001).nopr(); // 007452: ? - map(0x9000, 0x9001).w(FUNC(flkatck_state::multiply_w)); // 007452: Protection (see wecleman, but unused here?) - map(0x9004, 0x9004).nopr(); // 007452: ? - map(0x9006, 0x9006).nopw(); // 007452: ? + map(0x9000, 0x9007).rw("k007452", FUNC(k007452_device::read), FUNC(k007452_device::write)); // Protection (see wecleman, but unused here?) map(0xa000, 0xa000).r(m_soundlatch, FUNC(generic_latch_8_device::read)); map(0xb000, 0xb00d).rw(m_k007232, FUNC(k007232_device::read), FUNC(k007232_device::write)); /* 007232 registers */ map(0xc000, 0xc001).rw("ymsnd", FUNC(ym2151_device::read), FUNC(ym2151_device::write)); /* YM2151 */ @@ -201,7 +183,6 @@ membank("bank1")->configure_entries(0, 3, &ROM[0x10000], 0x2000); save_item(NAME(m_irq_enabled)); - save_item(NAME(m_multiply_reg)); save_item(NAME(m_flipscreen)); } @@ -210,8 +191,6 @@ m_k007232->set_bank(0, 1); m_irq_enabled = 0; - m_multiply_reg[0] = 0; - m_multiply_reg[1] = 0; m_flipscreen = 0; } @@ -229,6 +208,8 @@ WATCHDOG_TIMER(config, m_watchdog); + KONAMI_007452_MATH(config, "k007452"); + /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_refresh_hz(60); diff -Nru mame-0.230+dfsg.1/src/mame/drivers/fmtowns.cpp mame-0.231+dfsg.1/src/mame/drivers/fmtowns.cpp --- mame-0.230+dfsg.1/src/mame/drivers/fmtowns.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/fmtowns.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -1614,7 +1614,7 @@ lba2 += m_towns_cd.parameter[3] << 8; lba2 += m_towns_cd.parameter[2]; m_towns_cd.cdda_current = msf_to_lbafm(lba1); - m_towns_cd.cdda_length = msf_to_lbafm(lba2) - m_towns_cd.cdda_current; + m_towns_cd.cdda_length = msf_to_lbafm(lba2) - m_towns_cd.cdda_current + 1; m_cdda->set_cdrom(device->get_cdrom_file()); m_cdda->start_audio(m_towns_cd.cdda_current,m_towns_cd.cdda_length); @@ -1837,7 +1837,6 @@ { int track = (m_towns_cd.extra_status/2)-4; addr = cdrom_get_track_start(m_cdrom->get_cdrom_file(),track); - addr += cdrom_get_toc(m_cdrom->get_cdrom_file())->tracks[track].pregap; addr = lba_to_msf(addr + 150); towns_cd_set_status(0x17, (addr & 0xff0000) >> 16,(addr & 0x00ff00) >> 8,addr & 0x0000ff); diff -Nru mame-0.230+dfsg.1/src/mame/drivers/fresh.cpp mame-0.231+dfsg.1/src/mame/drivers/fresh.cpp --- mame-0.230+dfsg.1/src/mame/drivers/fresh.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/fresh.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -200,8 +200,8 @@ map(0xc40000, 0xc417ff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); map(0xc50000, 0xc517ff).ram().w(m_palette, FUNC(palette_device::write16_ext)).share("palette_ext"); - map(0xd00001, 0xd00001).w("ymsnd", FUNC(ym2413_device::register_port_w)); - map(0xd10001, 0xd10001).w("ymsnd", FUNC(ym2413_device::data_port_w)); + map(0xd00001, 0xd00001).w("ymsnd", FUNC(ym2413_device::address_w)); + map(0xd10001, 0xd10001).w("ymsnd", FUNC(ym2413_device::data_w)); map(0xd30000, 0xd30001).w(FUNC(fresh_state::d30000_write)); map(0xd40000, 0xd40001).portr("IN0"); //.nopw(); // checks for 0x10 diff -Nru mame-0.230+dfsg.1/src/mame/drivers/funkyjet.cpp mame-0.231+dfsg.1/src/mame/drivers/funkyjet.cpp --- mame-0.230+dfsg.1/src/mame/drivers/funkyjet.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/funkyjet.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -2,6 +2,8 @@ // copyright-holders:Bryan McPhail /*************************************************************************** + All game use a DE-0372-0 PCB (see below for layout) + Funky Jet (c) 1992 Data East / Mitchell Corporation Sotsugyo Shousho (c) 1995 Mitchell Corporation @@ -98,7 +100,6 @@ #include "sound/okim6295.h" #include "sound/ym2151.h" #include "emupal.h" -#include "screen.h" #include "speaker.h" /******************************************************************************/ @@ -244,6 +245,17 @@ PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) INPUT_PORTS_END +static INPUT_PORTS_START( funkyjeta2 ) + PORT_INCLUDE(funkyjetj) + + PORT_MODIFY("DSW") + PORT_DIPNAME( 0xc000, 0xc000, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:2,1") + PORT_DIPSETTING( 0x0000, "0" ) + PORT_DIPSETTING( 0x8000, "1" ) + PORT_DIPSETTING( 0xc000, "2" ) + PORT_DIPSETTING( 0x4000, "3" ) +INPUT_PORTS_END + static INPUT_PORTS_START( sotsugyo ) PORT_INCLUDE(funkyjet) @@ -305,7 +317,7 @@ void funkyjet_state::funkyjet(machine_config &config) { /* basic machine hardware */ - M68000(config, m_maincpu, XTAL(28'000'000)/2); /* 28 MHz crystal */ + M68000(config, m_maincpu, XTAL(28'322'000)/2); /* 28 MHz crystal - 28.322000 on funkyjeta2 PCB at least*/ m_maincpu->set_addrmap(AS_PROGRAM, &funkyjet_state::funkyjet_map); m_maincpu->set_vblank_int("screen", FUNC(funkyjet_state::irq6_line_hold)); @@ -315,13 +327,13 @@ m_audiocpu->add_route(ALL_OUTPUTS, "rspeaker", 0); /* video hardware */ - screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_refresh_hz(58); - screen.set_vblank_time(ATTOSECONDS_IN_USEC(529)); - screen.set_size(40*8, 32*8); - screen.set_visarea(0*8, 40*8-1, 1*8, 31*8-1); - screen.set_screen_update(FUNC(funkyjet_state::screen_update)); - screen.set_palette("palette"); + SCREEN(config, m_screen, SCREEN_TYPE_RASTER); + m_screen->set_refresh_hz(58); + m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(529)); + m_screen->set_size(40*8, 32*8); + m_screen->set_visarea(0*8, 40*8-1, 1*8, 31*8-1); + m_screen->set_screen_update(FUNC(funkyjet_state::screen_update)); + m_screen->set_palette("palette"); DECO146PROT(config, m_deco146, 0); m_deco146->port_a_cb().set_ioport("INPUTS"); @@ -380,7 +392,9 @@ ROM_LOAD( "mat00", 0x080000, 0x80000, CRC(fbda0228) SHA1(815d49898d02e699393e370209181f2ca8301949) ) ROM_REGION( 0x40000, "oki", 0 ) /* ADPCM samples */ - ROM_LOAD( "jk03.15h", 0x00000, 0x20000, CRC(69a0eaf7) SHA1(05038e82ee03106625f05082fe9912e16be181ee) ) + // needs verifying, looks like a bad dump compared to the ROM in funkyjeta2 + // 0x20 bytes at 0x79e0 are blanked out and 0x20 bytes at 0xa6a0 are replaced with different (bad?) data + ROM_LOAD( "jk03.15h", 0x00000, 0x20000, BAD_DUMP CRC(69a0eaf7) SHA1(05038e82ee03106625f05082fe9912e16be181ee) ) ROM_END ROM_START( funkyjeta ) @@ -399,7 +413,27 @@ ROM_LOAD( "mat00", 0x080000, 0x80000, CRC(fbda0228) SHA1(815d49898d02e699393e370209181f2ca8301949) ) ROM_REGION( 0x40000, "oki", 0 ) /* ADPCM samples */ - ROM_LOAD( "jk03.15h", 0x00000, 0x20000, CRC(69a0eaf7) SHA1(05038e82ee03106625f05082fe9912e16be181ee) ) + // see comment in funkyjet set + ROM_LOAD( "jk03.15h", 0x00000, 0x20000, BAD_DUMP CRC(69a0eaf7) SHA1(05038e82ee03106625f05082fe9912e16be181ee) ) +ROM_END + +ROM_START( funkyjeta2 ) + ROM_REGION( 0x80000, "maincpu", 0 ) /* 68000 code */ + ROM_LOAD16_BYTE( "12f", 0x00000, 0x40000, CRC(a18de697) SHA1(063f7f4c31c80b8fd807699e0412abb9271ddc59) ) // labels were blank + ROM_LOAD16_BYTE( "13f", 0x00001, 0x40000, CRC(695a27cd) SHA1(79b4e61e7c6bdab439d70993c296443f97339351) ) + + ROM_REGION( 0x10000, "audiocpu", 0 ) /* Sound CPU */ + ROM_LOAD( "16f", 0x00000, 0x10000, CRC(748c0bd8) SHA1(35910e6a4c4f198fb76bde0f5b053e2c66cfa0ff) ) + + ROM_REGION( 0x080000, "gfx1", 0 ) + ROM_LOAD( "mat02", 0x000000, 0x80000, CRC(e4b94c7e) SHA1(7b6ddd0bd388c8d32277fce4b3abb102724bc7d1) ) /* Encrypted chars */ + + ROM_REGION( 0x100000, "gfx2", 0 ) + ROM_LOAD( "mat01", 0x000000, 0x80000, CRC(24093a8d) SHA1(71f76ddd8a4b6e05ceb2fff4e20b6edb5e011e79) ) /* sprites */ + ROM_LOAD( "mat00", 0x080000, 0x80000, CRC(fbda0228) SHA1(815d49898d02e699393e370209181f2ca8301949) ) + + ROM_REGION( 0x40000, "oki", 0 ) /* ADPCM samples */ + ROM_LOAD( "15h", 0x00000, 0x20000, CRC(d7c0f0fe) SHA1(7a4a21bbf0da27767de099fba66011732b2c835a) ) ROM_END ROM_START( funkyjetj ) @@ -418,7 +452,8 @@ ROM_LOAD( "mat00", 0x080000, 0x80000, CRC(fbda0228) SHA1(815d49898d02e699393e370209181f2ca8301949) ) ROM_REGION( 0x40000, "oki", 0 ) /* ADPCM samples */ - ROM_LOAD( "jh03.15h", 0x00000, 0x20000, CRC(69a0eaf7) SHA1(05038e82ee03106625f05082fe9912e16be181ee) ) /* same as jk03.15h from world set */ + // see comment in funkyjet set, was this verified as label is different? + ROM_LOAD( "jh03.15h", 0x00000, 0x20000, BAD_DUMP CRC(69a0eaf7) SHA1(05038e82ee03106625f05082fe9912e16be181ee) ) /* same as jk03.15h from world set */ ROM_END ROM_START( sotsugyo ) @@ -449,5 +484,9 @@ GAME( 1992, funkyjet, 0, funkyjet, funkyjet, funkyjet_state, init_funkyjet, ROT0, "Mitchell", "Funky Jet (World, rev 1)", MACHINE_SUPPORTS_SAVE ) GAME( 1992, funkyjeta, funkyjet, funkyjet, funkyjet, funkyjet_state, init_funkyjet, ROT0, "Mitchell", "Funky Jet (World)", MACHINE_SUPPORTS_SAVE ) +// This set, from a Korean PCB, has numerous changes, including a different 'how to play' demo, modified stage layouts +// It also has you collecting smiley faces rather than fuel cells to charge your super +GAME( 1992, funkyjeta2,funkyjet, funkyjet, funkyjeta2,funkyjet_state, init_funkyjet, ROT0, "Mitchell", "Funky Jet (Korea, prototype?)", MACHINE_SUPPORTS_SAVE ) GAME( 1992, funkyjetj, funkyjet, funkyjet, funkyjetj, funkyjet_state, init_funkyjet, ROT0, "Mitchell (Data East Corporation license)", "Funky Jet (Japan, rev 2)", MACHINE_SUPPORTS_SAVE ) + GAME( 1995, sotsugyo, 0, funkyjet, sotsugyo, funkyjet_state, init_funkyjet, ROT0, "Mitchell (Atlus license)", "Sotsugyo Shousho", MACHINE_SUPPORTS_SAVE ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/fuukifg2.cpp mame-0.231+dfsg.1/src/mame/drivers/fuukifg2.cpp --- mame-0.230+dfsg.1/src/mame/drivers/fuukifg2.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/fuukifg2.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -50,8 +50,8 @@ #include "cpu/z80/z80.h" #include "cpu/m68000/m68000.h" -#include "sound/3812intf.h" #include "sound/ym2203.h" +#include "sound/ym3812.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/gaelco.cpp mame-0.231+dfsg.1/src/mame/drivers/gaelco.cpp --- mame-0.230+dfsg.1/src/mame/drivers/gaelco.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/gaelco.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -26,7 +26,7 @@ #include "cpu/m6809/m6809.h" #include "cpu/m68000/m68000.h" #include "sound/okim6295.h" -#include "sound/3812intf.h" +#include "sound/ym3812.h" #include "emupal.h" #include "screen.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/galivan.cpp mame-0.231+dfsg.1/src/mame/drivers/galivan.cpp --- mame-0.230+dfsg.1/src/mame/drivers/galivan.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/galivan.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -30,8 +30,8 @@ #include "includes/galivan.h" #include "cpu/z80/z80.h" -#include "sound/3526intf.h" #include "sound/dac.h" +#include "sound/ym3526.h" #include "speaker.h" @@ -481,7 +481,7 @@ galivan(config); m_maincpu->set_addrmap(AS_IO, &dangarj_state::dangarj_io_map); - NB1412M2(config, m_prot, XTAL(8'000'000)); // divided by 2 maybe + NB1412M2(config, m_prot, XTAL(8'000'000)/2); // divided by 2 maybe } void galivan_state::ninjemak(machine_config &config) @@ -868,10 +868,10 @@ ROM_LOAD( "ninjemak.pr1", 0x0000, 0x0100, CRC(8a62d4e4) SHA1(99ca4da01ea1b5585f6e3ebf162c3f988ab317e5) ) /* red */ ROM_LOAD( "ninjemak.pr2", 0x0100, 0x0100, CRC(2ccf976f) SHA1(b804ee761793697087fbe3372352f301a22feeab) ) /* green */ ROM_LOAD( "ninjemak.pr3", 0x0200, 0x0100, CRC(16b2a7a4) SHA1(53c410b439c8a835447f15f2ab250b363b3f7888) ) /* blue */ - ROM_LOAD( "yncp-2d.bin", 0x0300, 0x0100, BAD_DUMP CRC(23bade78) SHA1(7e2de5eb08d888f97830807b6dbe85d09bb3b7f8) ) /* sprite lookup table */ + ROM_LOAD( "yncp-2d.bin", 0x0300, 0x0100, CRC(23bade78) SHA1(7e2de5eb08d888f97830807b6dbe85d09bb3b7f8) ) /* sprite lookup table */ ROM_REGION( 0x0100, "user1", 0 ) - ROM_LOAD( "yncp-7f.bin", 0x0000, 0x0100, BAD_DUMP CRC(262d0809) SHA1(a67281af02cef082023c0d7d57e3824aeef67450) ) /* sprite palette bank */ + ROM_LOAD( "yncp-7f.bin", 0x0000, 0x0100, CRC(262d0809) SHA1(a67281af02cef082023c0d7d57e3824aeef67450) ) /* sprite palette bank */ ROM_END ROM_START( youma ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/galspnbl.cpp mame-0.231+dfsg.1/src/mame/drivers/galspnbl.cpp --- mame-0.230+dfsg.1/src/mame/drivers/galspnbl.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/galspnbl.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -43,7 +43,7 @@ #include "cpu/m68000/m68000.h" #include "cpu/z80/z80.h" #include "sound/okim6295.h" -#include "sound/3812intf.h" +#include "sound/ym3812.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/gba.cpp mame-0.231+dfsg.1/src/mame/drivers/gba.cpp --- mame-0.230+dfsg.1/src/mame/drivers/gba.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/gba.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -1156,7 +1156,7 @@ } } -uint32_t gba_state::gba_bios_r(offs_t offset, uint32_t mem_mask) +uint32_t gba_cons_state::gba_bios_r(offs_t offset, uint32_t mem_mask) { uint32_t *rom = m_region_maincpu; if (m_bios_hack->read()) @@ -1239,7 +1239,6 @@ void gba_state::gba_map(address_map &map) { map.unmap_value_high(); // for "Fruit Mura no Doubutsu Tachi" and "Classic NES Series" - map(0x00000000, 0x00003fff).rom().mirror(0x01ffc000).r(FUNC(gba_state::gba_bios_r)); map(0x02000000, 0x0203ffff).ram().mirror(0xfc0000); map(0x03000000, 0x03007fff).ram().mirror(0xff8000); map(0x04000000, 0x0400005f).rw("lcd", FUNC(gba_lcd_device::video_r), FUNC(gba_lcd_device::video_w)); @@ -1249,10 +1248,26 @@ map(0x06000000, 0x06017fff).mirror(0x00fe0000).rw("lcd", FUNC(gba_lcd_device::gba_vram_r), FUNC(gba_lcd_device::gba_vram_w)); // VRAM map(0x06018000, 0x0601ffff).mirror(0x00fe0000).rw("lcd", FUNC(gba_lcd_device::gba_vram_r), FUNC(gba_lcd_device::gba_vram_w)); // VRAM map(0x07000000, 0x070003ff).mirror(0x00fffc00).rw("lcd", FUNC(gba_lcd_device::gba_oam_r), FUNC(gba_lcd_device::gba_oam_w)); // OAM - //map(0x08000000, 0x0cffffff) // cart ROM + mirrors, mapped here at machine_start if a cart is present + map(0x10000000, 0xffffffff).r(FUNC(gba_state::gba_10000000_r)); // for "Justice League Chronicles" (game bug) } +void gba_cons_state::gba_cons_map(address_map &map) +{ + gba_map(map); + + map(0x00000000, 0x00003fff).rom().mirror(0x01ffc000).r(FUNC(gba_cons_state::gba_bios_r)); + //map(0x08000000, 0x0cffffff) // cart ROM + mirrors, mapped here at machine_start if a cart is present +} + +void gba_robotech_state::gba_robotech_map(address_map &map) +{ + gba_map(map); + + map(0x00000000, 0x007fffff).rom().region("maincpu", 0x00000000); // first part of the ROM is a BIOS replacement? + map(0x08000000, 0x087fffff).rom().region("maincpu", 0x00800000); // second part is the game? +} + static INPUT_PORTS_START( gbadv ) PORT_START("INPUTS") PORT_BIT( 0xfc00, IP_ACTIVE_HIGH, IPT_UNUSED) @@ -1266,6 +1281,10 @@ PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SELECT ) PORT_PLAYER(1) // SELECT PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("B") PORT_PLAYER(1) // B PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("A") PORT_PLAYER(1) // A +INPUT_PORTS_END + +static INPUT_PORTS_START( gbadv_cons ) + PORT_INCLUDE( gbadv ) PORT_START("SKIP_CHECK") PORT_CONFNAME( 0x01, 0x00, "[HACK] Skip BIOS Logo check" ) @@ -1328,6 +1347,26 @@ m_irq_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gba_state::handle_irq),this)); m_irq_timer->adjust(attotime::never); + save_item(NAME(m_regs)); + save_item(NAME(m_dma_src)); + save_item(NAME(m_dma_dst)); + save_item(NAME(m_dma_cnt)); + save_item(NAME(m_timer_regs)); + save_item(NAME(m_timer_reload)); + save_item(NAME(m_timer_recalc)); + save_item(NAME(m_timer_hz)); + save_item(NAME(m_fifo_a_ptr)); + save_item(NAME(m_fifo_b_ptr)); + save_item(NAME(m_fifo_a_in)); + save_item(NAME(m_fifo_b_in)); + save_item(NAME(m_fifo_a)); + save_item(NAME(m_fifo_b)); +} + +void gba_cons_state::machine_start() +{ + gba_state::machine_start(); + // install the cart ROM & SRAM into the address map, if present if (m_cart->exists()) { @@ -1388,24 +1427,8 @@ } } - - save_item(NAME(m_regs)); - save_item(NAME(m_dma_src)); - save_item(NAME(m_dma_dst)); - save_item(NAME(m_dma_cnt)); - save_item(NAME(m_timer_regs)); - save_item(NAME(m_timer_reload)); - save_item(NAME(m_timer_recalc)); - save_item(NAME(m_timer_hz)); - save_item(NAME(m_fifo_a_ptr)); - save_item(NAME(m_fifo_b_ptr)); - save_item(NAME(m_fifo_a_in)); - save_item(NAME(m_fifo_b_in)); - save_item(NAME(m_fifo_a)); - save_item(NAME(m_fifo_b)); } - static void gba_cart(device_slot_interface &device) { device.option_add_internal("gba_rom", GBA_ROM_STD); @@ -1449,16 +1472,39 @@ DAC_8BIT_R2R_TWOS_COMPLEMENT(config, m_ldacb, 0).add_route(ALL_OUTPUTS, "lspeaker", 0.5); // unknown DAC DAC_8BIT_R2R_TWOS_COMPLEMENT(config, m_rdacb, 0).add_route(ALL_OUTPUTS, "rspeaker", 0.5); // unknown DAC +} + +void gba_cons_state::gbadv_cons(machine_config &config) +{ + gbadv(config); + + m_maincpu->set_addrmap(AS_PROGRAM, &gba_cons_state::gba_cons_map); + GBA_CART_SLOT(config, m_cart, gba_cart, nullptr); SOFTWARE_LIST(config, "cart_list").set_original("gba"); } +void gba_robotech_state::gbadv_robotech(machine_config &config) +{ + gbadv(config); + + m_maincpu->set_addrmap(AS_PROGRAM, &gba_robotech_state::gba_robotech_map); +} ROM_START( gba ) ROM_REGION( 0x4000, "maincpu", 0 ) ROM_LOAD( "gba.bin", 0x000000, 0x004000, CRC(81977335) SHA1(300c20df6731a33952ded8c436f7f186d25d3492) ) ROM_END +ROM_START( robotech ) + ROM_REGION( 0x1000100, "maincpu", 0 ) + ROM_LOAD( "coleco_robotech_mx29gl128elt21_00c22273.bin", 0x0000000, 0x1000100, CRC(04beee9c) SHA1(acf07d51c525b055679186cc07c6ac2cd8f45eac) ) +ROM_END + +// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS +CONS(2001, gba, 0, 0, gbadv_cons, gbadv_cons, gba_cons_state, empty_init, "Nintendo", "Game Boy Advance", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND) -// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS -CONS(2001, gba, 0, 0, gbadv, gbadv, gba_state, empty_init, "Nintendo", "Game Boy Advance", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND) +// this is a single game reissue of "Robotech - The Macross Saga (Euro, USA)" on the GBA but with double +// sized ROM (BIOS replacement in first half?) and other mods. It is unclear how compatible this is with +// standard hardware. +CONS(2018, robotech, 0, 0, gbadv_robotech, gbadv, gba_robotech_state, empty_init, "Coleco", "Robotech", MACHINE_NOT_WORKING) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/generalplus_gpl16250_nand.cpp mame-0.231+dfsg.1/src/mame/drivers/generalplus_gpl16250_nand.cpp --- mame-0.230+dfsg.1/src/mame/drivers/generalplus_gpl16250_nand.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/generalplus_gpl16250_nand.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -562,6 +562,13 @@ ROM_LOAD( "camprockguitar1_sandisk11352-256b_45da.bin", 0x0000, 0x10800000, CRC(f52a4289) SHA1(d027ae274cd4ac97924d2344df1a96456e8e7c55) ) ROM_END +ROM_START( jak_hmpt ) + ROM_REGION16_BE( 0x40000, "maincpu:internal", ROMREGION_ERASE00 ) + ROM_LOAD16_WORD_SWAP( "internal.rom", 0x00000, 0x40000, NO_DUMP ) // used as bootstrap only + + ROM_REGION( 0x10800000, "nandrom", ROMREGION_ERASE00 ) + ROM_LOAD( "hmsecretstar_sandisk11270_9876.bin", 0x0000, 0x10800000, CRC(fbe09633) SHA1(169a1546072f53c2da19ce97396cacd25412c5f2) ) +ROM_END ROM_START( jak_hsmg2 ) ROM_REGION16_BE( 0x40000, "maincpu:internal", ROMREGION_ERASE00 ) @@ -916,7 +923,11 @@ CONS(2008, jak_hmhsm, 0, 0, generalplus_gpac800, jak_hsm, generalplus_gpac800_game_state, nand_init210_32mb, "JAKKS Pacific Inc / HotGen Ltd", "Hannah Montana G2 Deluxe / High School Musical G2 Deluxe - Two in One (JAKKS Pacific TV Game)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING) // Sep 12 2008 18:48:14 (Menu/HM) / Sep 12 2008 18:50:45 (HSM) CONS(2008, jak_umdf, 0, 0, generalplus_gpac800, jak_hsm, generalplus_gpac800_game_state, nand_init210_32mb, "JAKKS Pacific Inc / Handheld Games", "Ultimotion - Disney Fairies Sleeping Beauty & TinkerBell (JAKKS Pacific TV Game)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING) // Ultimotion Swing Zone is SPG29xx instead -CONS(2008, jak_camp, 0, 0, generalplus_gpac800, jak_hsm, generalplus_gpac800_game_state, nand_init210_32mb, "JAKKS Pacific Inc / HotGen Ltd", "Camp Rock Guitar Video Game (JAKKS Pacific TV Game)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING) +CONS(2008, jak_camp, 0, 0, generalplus_gpac800, jak_hsm, generalplus_gpac800_game_state, nand_init210_32mb, "JAKKS Pacific Inc / HotGen Ltd", "Camp Rock - Guitar Video Game (JAKKS Pacific TV Game)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING) + +// 2 blocks fail the hidden ROM test in jak_hmpt set below, however this seems to be an error in the test mode, not the dump +// a different set, https://www.youtube.com/watch?v=XiEMtLzcTFw showing a date of May 14 2008 10:05:22 shows exactly the same failures +CONS(2008, jak_hmpt, 0, 0, generalplus_gpac800, jak_hsm, generalplus_gpac800_game_state, nand_init210_32mb, "JAKKS Pacific Inc / HotGen Ltd", "Hannah Montana Pop Tour - Guitar Video Game (JAKKS Pacific TV Game) (May 16 2008)", MACHINE_NO_SOUND | MACHINE_NOT_WORKING) // May 16 2008 10:36:59 // There were 1 player and 2 player versions for several of the JAKKS guns. The 2nd gun appears to be simply a controller (no AV connectors) but as they were separate products with the 2 player versions being released up to a year after the original, the code could differ. // If they differ, it is currently uncertain which versions these ROMs are from diff -Nru mame-0.230+dfsg.1/src/mame/drivers/ginganin.cpp mame-0.231+dfsg.1/src/mame/drivers/ginganin.cpp --- mame-0.230+dfsg.1/src/mame/drivers/ginganin.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/ginganin.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -63,7 +63,7 @@ #include "cpu/m6809/m6809.h" #include "machine/6840ptm.h" #include "sound/ay8910.h" -#include "sound/8950intf.h" +#include "sound/y8950.h" #include "screen.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/goodejan.cpp mame-0.231+dfsg.1/src/mame/drivers/goodejan.cpp --- mame-0.230+dfsg.1/src/mame/drivers/goodejan.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/goodejan.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -74,8 +74,8 @@ #include "audio/seibu.h" #include "cpu/nec/nec.h" -#include "sound/3812intf.h" #include "sound/okim6295.h" +#include "sound/ym3812.h" #include "video/seibu_crtc.h" #include "emupal.h" #include "screen.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/hcastle.cpp mame-0.231+dfsg.1/src/mame/drivers/hcastle.cpp --- mame-0.230+dfsg.1/src/mame/drivers/hcastle.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/hcastle.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -16,8 +16,8 @@ #include "cpu/z80/z80.h" #include "machine/gen_latch.h" #include "machine/watchdog.h" -#include "sound/3812intf.h" #include "sound/k051649.h" +#include "sound/ym3812.h" #include "screen.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/hh_cops1.cpp mame-0.231+dfsg.1/src/mame/drivers/hh_cops1.cpp --- mame-0.230+dfsg.1/src/mame/drivers/hh_cops1.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/hh_cops1.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -220,7 +220,7 @@ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_16WAY PORT_START("IN.1") // INB - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) // both buttons PORT_START("IN.2") // F1 PORT_CONFNAME( 0x01, 0x00, DEF_STR( Difficulty ) ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/hh_pic16.cpp mame-0.231+dfsg.1/src/mame/drivers/hh_pic16.cpp --- mame-0.230+dfsg.1/src/mame/drivers/hh_pic16.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/hh_pic16.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -582,7 +582,6 @@ { m_display->write_row(0, ~m_b & 0x7f); m_display->write_row(1, ~m_c & 0x7f); - m_display->update(); } void maniac_state::update_speaker() @@ -1281,7 +1280,7 @@ void rockpin_state::update_display() { // 3 7seg leds from ports A and B - m_display->matrix_partial(0, 3, m_a, m_b, false); + m_display->matrix_partial(0, 3, m_a, m_b); // 44 leds from ports C and D m_display->matrix_partial(3, 6, m_d, m_c); diff -Nru mame-0.230+dfsg.1/src/mame/drivers/hh_tms1k.cpp mame-0.231+dfsg.1/src/mame/drivers/hh_tms1k.cpp --- mame-0.230+dfsg.1/src/mame/drivers/hh_tms1k.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/hh_tms1k.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -3230,7 +3230,6 @@ // R3,R4,R6-R8: leds (direct) m_display->write_row(2, (data >> 3 & 3) | (data >> 4 & 0x1c)); - m_display->update(); // R9: speaker out m_speaker->level_w(data >> 9 & 1); @@ -3242,7 +3241,6 @@ // O1-O7: 2nd digit segments m_display->write_row(0, (data & 1) ? 6 : 0); m_display->write_row(1, data >> 1 & 0x7f); - m_display->update(); } u8 qfire_state::read_k() @@ -3784,13 +3782,12 @@ void ebball3_state::update_display() { - m_display->matrix_partial(0, 10, m_r, m_o, false); + m_display->matrix_partial(0, 10, m_r, m_o); // R0,R1 are normal 7segs // R4,R7 contain segments(only F and B) for the two other digits m_display->write_row(10, (m_display->read_row(4) & 0x20) | (m_display->read_row(7) & 0x02)); m_display->write_row(11, ((m_display->read_row(4) & 0x10) | (m_display->read_row(7) & 0x01)) << 1); - m_display->update(); } void ebball3_state::write_r(u16 data) @@ -5591,7 +5588,6 @@ // leds from R4-R10 m_display->write_row(1, m_r >> 4 & 0x7f); - m_display->update(); } void fxmcr165_state::write_r(u16 data) @@ -6177,7 +6173,7 @@ void elecbowl_state::update_display() { // standard 7segs - m_display->matrix_partial(0, 4, m_r >> 4, m_o, false); + m_display->matrix_partial(0, 4, m_r >> 4, m_o); // lamp muxes u8 sel = m_o & 7; @@ -6189,7 +6185,6 @@ // digit 4 is from mux2 Q7 m_display->write_row(4, m_display->read_element(6, 7) ? 6 : 0); - m_display->update(); } void elecbowl_state::write_r(u16 data) @@ -6339,13 +6334,11 @@ return; // update lcd segments - m_display->matrix_partial(0, 3, 1 << offset, data, false); + m_display->matrix_partial(0, 3, 1 << offset, data); // col5-11 and col13-19 are 7segs for (int i = 0; i < 2; i++) m_display->write_row(3 + (offset << 1 | i), bitswap<8>(data >> (4+8*i),7,3,5,2,0,1,4,6) & 0x7f); - - m_display->update(); } void horseran_state::write_r(u16 data) @@ -7704,8 +7697,6 @@ m_display->write_row(2, (m_o & 0x80) ? o : 0); m_display->write_row(1, (m_o & 0x80) ? 0 : o); m_display->write_row(0, (m_r >> 8 & 1) | (m_r >> 4 & 0xe)); - - m_display->update(); } else { @@ -9760,13 +9751,12 @@ void tisr16_state::update_display() { - m_display->matrix(m_r, m_o, false); + m_display->matrix(m_r, m_o); // exponent sign is from R10 O1, and R10 itself only uses segment G u8 r10 = m_display->read_row(10); m_display->write_row(11, r10 << 5 & 0x40); m_display->write_row(10, r10 & 0x40); - m_display->update(); } void tisr16_state::write_r(u16 data) @@ -10957,14 +10947,13 @@ // update leds state u8 seg = bitswap<8>(m_o,7,4,3,2,1,0,6,5) & 0x7f; u16 r = (data & 7) | (data << 1 & 0x1f0); - m_display->matrix(r, seg, false); + m_display->matrix(r, seg); // 3rd digit A/G(equals sign) is from O7 m_display->write_row(3, (r != 0 && m_o & 0x80) ? 0x41 : 0); // 6th digit is a custom 7seg for math symbols (see wizatron_state write_r) m_display->write_row(6, bitswap<8>(m_display->read_row(6),7,6,1,4,2,3,5,0)); - m_display->update(); } void lilprof78_state::write_o(u16 data) @@ -12123,16 +12112,14 @@ void tbreakup_state::update_display() { // 7seg leds from R0,R1 and O0-O6 - m_display->matrix_partial(0, 2, m_r, m_o & 0x7f, false); + m_display->matrix_partial(0, 2, m_r, m_o & 0x7f); // 22 round leds from O2-O7 and expander port 7 - m_display->matrix_partial(2, 6, m_o >> 2, m_exp_port[6], false); + m_display->matrix_partial(2, 6, m_o >> 2, m_exp_port[6]); // 24 rectangular leds from expander ports 1-6 (not strobed) for (int y = 0; y < 6; y++) m_display->write_row(y+8, m_exp_port[y]); - - m_display->update(); } void tbreakup_state::expander_w(offs_t offset, u8 data) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/hornet.cpp mame-0.231+dfsg.1/src/mame/drivers/hornet.cpp --- mame-0.230+dfsg.1/src/mame/drivers/hornet.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/hornet.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -1561,8 +1561,8 @@ ROM_LOAD32_WORD_SWAP("931a04.bin", 0x000000, 0x200000, CRC(4f5917e6) SHA1(a63a107f1d6d9756e4ab0965d72ea446f0692814) ) ROM_REGION32_BE(0x800000, "user3", 0) /* Comm board roms */ - ROM_LOAD("931a19.bin", 0x000000, 0x400000, BAD_DUMP CRC(8b25a6f1) SHA1(41f9c2046a6aae1e9f5f3ffa3e0ffb15eba46211) ) - ROM_LOAD("931a20.bin", 0x400000, 0x400000, BAD_DUMP CRC(ecf665f6) SHA1(5a73e87435560a7bb2d0f9be7fba12254b18708d) ) + ROM_LOAD("931a19.bin", 0x000000, 0x400000, CRC(0417b528) SHA1(ebd7f06b83256b94784de164f9d0642bfb2c94d4) ) + ROM_LOAD("931a20.bin", 0x400000, 0x400000, CRC(d367a4c9) SHA1(8bf029841d9d3be20dea0423240bfec825477a1d) ) ROM_REGION(0x800000, "user5", ROMREGION_ERASE00) /* CG Board texture roms */ @@ -1578,10 +1578,10 @@ ROM_LOAD( "m48t58y-70pc1", 0x000000, 0x002000, CRC(d4e69d7a) SHA1(1e29eecf4886e5e098a388dedd5f3901c2bb65e5) ) ROM_REGION(0x8, "lan_serial_id", 0) /* LAN Board DS2401 */ - ROM_LOAD( "ds2401.8b", 0x000000, 0x000008, BAD_DUMP CRC(bae36d0b) SHA1(4dd5915888d5718356b40bbe897f2470e410176a) ) // hand built + ROM_LOAD( "ds2401.16g", 0x000000, 0x000008, BAD_DUMP CRC(bae36d0b) SHA1(4dd5915888d5718356b40bbe897f2470e410176a) ) // hand built ROM_REGION16_BE(0x80, "lan_eeprom", 0) /* LAN Board AT93C46 */ - ROM_LOAD( "at93c46.16g", 0x000000, 0x000080, BAD_DUMP CRC(cc63c213) SHA1(fb20e56fb73a887dc7b6db49efd1f8a18b959152) ) // hand built + ROM_LOAD( "at93c46.8g", 0x000000, 0x000080, BAD_DUMP CRC(cc63c213) SHA1(fb20e56fb73a887dc7b6db49efd1f8a18b959152) ) // hand built ROM_END ROM_START(gradius4) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/igs011.cpp mame-0.231+dfsg.1/src/mame/drivers/igs011.cpp --- mame-0.230+dfsg.1/src/mame/drivers/igs011.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/igs011.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -66,10 +66,10 @@ #include "emu.h" #include "cpu/m68000/m68000.h" -#include "sound/okim6295.h" -#include "sound/3812intf.h" #include "sound/ics2115.h" +#include "sound/okim6295.h" #include "sound/ym2413.h" +#include "sound/ym3812.h" #include "machine/nvram.h" #include "machine/timer.h" #include "emupal.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/indigo.cpp mame-0.231+dfsg.1/src/mame/drivers/indigo.cpp --- mame-0.230+dfsg.1/src/mame/drivers/indigo.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/indigo.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -214,7 +214,7 @@ { indigo_base(config); - R4000(config, m_maincpu, 50000000*2); + R4000(config, m_maincpu, 50000000); //m_maincpu->set_icache_size(32768); //m_maincpu->set_dcache_size(32768); m_maincpu->set_addrmap(AS_PROGRAM, &indigo4k_state::mem_map); diff -Nru mame-0.230+dfsg.1/src/mame/drivers/indy_indigo2.cpp mame-0.231+dfsg.1/src/mame/drivers/indy_indigo2.cpp --- mame-0.230+dfsg.1/src/mame/drivers/indy_indigo2.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/indy_indigo2.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -407,7 +407,7 @@ { ip24(config); - R5000(config, m_maincpu, 50000000*3); + R5000(config, m_maincpu, 75'000'000); m_maincpu->set_addrmap(AS_PROGRAM, &ip24_state::ip24_map); } @@ -415,7 +415,7 @@ { ip24(config); - R4600(config, m_maincpu, 33333333*4); + R4600(config, m_maincpu, 66'666'666); m_maincpu->set_addrmap(AS_PROGRAM, &ip24_state::ip24_map); } @@ -423,7 +423,7 @@ { ip24(config); - R4600(config, m_maincpu, 33333333*3); + R4600(config, m_maincpu, 50'000'000); m_maincpu->set_addrmap(AS_PROGRAM, &ip24_state::ip24_map); } @@ -436,7 +436,7 @@ void ip22_state::indigo2_4415(machine_config &config) { - R4400(config, m_maincpu, 50000000*3); + R4400(config, m_maincpu, 75'000'000); m_maincpu->set_addrmap(AS_PROGRAM, &ip22_state::ip22_map); ip24_base(config); diff -Nru mame-0.230+dfsg.1/src/mame/drivers/intellec8.cpp mame-0.231+dfsg.1/src/mame/drivers/intellec8.cpp --- mame-0.230+dfsg.1/src/mame/drivers/intellec8.cpp 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/intellec8.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,83 @@ +// license:BSD-3-Clause +// copyright-holders:Robbbert +/*************************************************************************** + +Intellec 8 MCS + +A development machine from Intel for the 8008 CPU, with Front Panel. +It has the usual array of switches, lights and buttons. + +****************************************************************************/ + +#include "emu.h" +#include "cpu/i8008/i8008.h" + + +class intlc8_state : public driver_device +{ +public: + intlc8_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + { } + + void intlc8(machine_config &config); + +private: + virtual void machine_start() override; + virtual void machine_reset() override; + void io_map(address_map &map); + void mem_map(address_map &map); + + required_device m_maincpu; +}; + +void intlc8_state::mem_map(address_map &map) +{ + map.unmap_value_high(); + map(0x000, 0x7ff).rom(); + map(0x800, 0xfff).ram(); // no idea how much ram or where +} + +void intlc8_state::io_map(address_map &map) +{ + map.unmap_value_high(); +} + +/* Input ports */ +static INPUT_PORTS_START( intlc8 ) +INPUT_PORTS_END + +void intlc8_state::machine_reset() +{ +} + +void intlc8_state::machine_start() +{ +} + +void intlc8_state::intlc8(machine_config &config) +{ + /* basic machine hardware */ + I8008(config, m_maincpu, 800000); // no idea of clock + m_maincpu->set_addrmap(AS_PROGRAM, &intlc8_state::mem_map); + m_maincpu->set_addrmap(AS_IO, &intlc8_state::io_map); +} + +/* ROM definition */ +ROM_START( intlc8 ) + ROM_REGION( 0x0800, "maincpu", ROMREGION_ERASEFF ) // order of roms is a guess and imo some are missing? + ROM_LOAD( "miss0.bin", 0x0000, 0x0100, NO_DUMP ) + ROM_LOAD( "miss1.bin", 0x0100, 0x0100, NO_DUMP ) + ROM_LOAD( "rom1.bin", 0x0200, 0x0100, CRC(0ae76bc7) SHA1(374a545cad8406ad862a5f2f1f03c6b6434fd3d8) ) + ROM_LOAD( "rom4.bin", 0x0300, 0x0100, CRC(4340fdfe) SHA1(d37f3bd65c2970736ac075c7e6d3d87d018c3ea4) ) + ROM_LOAD( "rom2.bin", 0x0400, 0x0100, CRC(dd1a71f4) SHA1(e33a2b64bea18c0aa58230167eb23bae464431be) ) + ROM_LOAD( "rom5.bin", 0x0500, 0x0100, CRC(d631224c) SHA1(812d37ac98daf1252bc8d087da679f3ad1f9d961) ) + ROM_LOAD( "rom3.bin", 0x0600, 0x0100, CRC(97c7ab95) SHA1(650316b820b84393bb73c4c56c11e177d658ce4a) ) + ROM_LOAD( "miss7.bin", 0x0700, 0x0100, NO_DUMP ) +ROM_END + +/* Driver */ + +// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS +COMP( 1973, intlc8, 0, 0, intlc8, intlc8, intlc8_state, empty_init, "Intel", "Intellec 8 MCS", MACHINE_IS_SKELETON ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/itech32.cpp mame-0.231+dfsg.1/src/mame/drivers/itech32.cpp --- mame-0.230+dfsg.1/src/mame/drivers/itech32.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/itech32.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -3233,8 +3233,8 @@ ROM_LOAD32_BYTE( "shot_prom3_v1.40.prom3", 0x00003, 0x20000, CRC(4b28f28b) SHA1(602e230cc69ae872e40d72c85ec66f111826c15e) ) ROM_REGION( 0x28000, "soundcpu", 0 ) - ROM_LOAD( "shotsnd.u88", 0x10000, 0x18000, CRC(e37d599d) SHA1(105f91e968ecf553d910a97726ddc536289bbb2b) ) - ROM_CONTINUE( 0x08000, 0x08000 ) + ROM_LOAD( "shotsnd_u88_v1.1.u88", 0x10000, 0x18000, CRC(e37d599d) SHA1(105f91e968ecf553d910a97726ddc536289bbb2b) ) /* labeled SHOTSND U88 V1.1, also known to be labeled SHOTSND U88 */ + ROM_CONTINUE( 0x08000, 0x08000 ) ROM_REGION( 0x800000, "gfx1", 0 ) ROM_LOAD32_BYTE( "shf_grom0_0.grm0_0", 0x000000, 0x80000, CRC(832a3d6a) SHA1(443328fa61b79c93ec6c9d24893b2ec38358a905) ) @@ -3268,10 +3268,10 @@ ROM_LOAD32_BYTE( "shot_prom3_v1.39.prom3", 0x00003, 0x20000, CRC(108a69be) SHA1(1b2ebe4767be084707522a90f009d3a70e03d578) ) ROM_REGION( 0x28000, "soundcpu", 0 ) - ROM_LOAD( "shotsnd.u88", 0x10000, 0x18000, CRC(e37d599d) SHA1(105f91e968ecf553d910a97726ddc536289bbb2b) ) - ROM_CONTINUE( 0x08000, 0x08000 ) + ROM_LOAD( "shotsnd_u88_v1.1.u88", 0x10000, 0x18000, CRC(e37d599d) SHA1(105f91e968ecf553d910a97726ddc536289bbb2b) ) /* labeled SHOTSND U88 V1.1, also known to be labeled SHOTSND U88 */ + ROM_CONTINUE( 0x08000, 0x08000 ) - ROM_REGION( 0x800000, "gfx1", 0 ) + ROM_REGION( 0x800000, "gfx1", 0 ) /* some Shuffleshot v1.39 PCBs are known to use the older GROM3_0 through GROM3_3 data */ ROM_LOAD32_BYTE( "shf_grom0_0.grm0_0", 0x000000, 0x80000, CRC(832a3d6a) SHA1(443328fa61b79c93ec6c9d24893b2ec38358a905) ) ROM_LOAD32_BYTE( "shf_grom0_1.grm0_1", 0x000001, 0x80000, CRC(155e48a2) SHA1(187d65423ff9a3d6b6c34c885a1b2397fa5371cf) ) ROM_LOAD32_BYTE( "shf_grom0_2.grm0_2", 0x000002, 0x80000, CRC(9f2b470d) SHA1(012e917856042cbe00d476e3220a7f9c841bd199) ) @@ -3303,8 +3303,8 @@ ROM_LOAD32_BYTE( "shot_prom3_v1.38.prom3", 0x00003, 0x20000, CRC(723cb9a5) SHA1(2ac209053bce245130b6056fe0ebe048596ae3b4) ) ROM_REGION( 0x28000, "soundcpu", 0 ) - ROM_LOAD( "shotsnd.u88", 0x10000, 0x18000, CRC(e37d599d) SHA1(105f91e968ecf553d910a97726ddc536289bbb2b) ) - ROM_CONTINUE( 0x08000, 0x08000 ) + ROM_LOAD( "shotsnd_u88_v1.1.u88", 0x10000, 0x18000, CRC(e37d599d) SHA1(105f91e968ecf553d910a97726ddc536289bbb2b) ) /* labeled SHOTSND U88 V1.1, also known to be labeled SHOTSND U88 */ + ROM_CONTINUE( 0x08000, 0x08000 ) ROM_REGION( 0x800000, "gfx1", 0 ) ROM_LOAD32_BYTE( "shf_grom0_0.grm0_0", 0x000000, 0x80000, CRC(832a3d6a) SHA1(443328fa61b79c93ec6c9d24893b2ec38358a905) ) @@ -3338,8 +3338,8 @@ ROM_LOAD32_BYTE( "shot_prom3_v1.37.prom3", 0x00003, 0x20000, CRC(efa66ad8) SHA1(d8dc754529284e6c06b912e226c8a4520aab49fc) ) ROM_REGION( 0x28000, "soundcpu", 0 ) - ROM_LOAD( "shotsnd.u88", 0x10000, 0x18000, CRC(e37d599d) SHA1(105f91e968ecf553d910a97726ddc536289bbb2b) ) - ROM_CONTINUE( 0x08000, 0x08000 ) + ROM_LOAD( "shotsnd_u88_v1.1.u88", 0x10000, 0x18000, CRC(e37d599d) SHA1(105f91e968ecf553d910a97726ddc536289bbb2b) ) /* labeled SHOTSND U88 V1.1, also known to be labeled SHOTSND U88 */ + ROM_CONTINUE( 0x08000, 0x08000 ) ROM_REGION( 0x800000, "gfx1", 0 ) ROM_LOAD32_BYTE( "shf_grom0_0.grm0_0", 0x000000, 0x80000, CRC(832a3d6a) SHA1(443328fa61b79c93ec6c9d24893b2ec38358a905) ) @@ -3373,8 +3373,8 @@ ROM_LOAD32_BYTE( "shot_prom3_v1.35.prom3", 0x00003, 0x20000, CRC(bf6fabbb) SHA1(3f52791b974a6170fad492c0270270f5712c8506) ) ROM_REGION( 0x28000, "soundcpu", 0 ) - ROM_LOAD( "shotsnd.u88", 0x10000, 0x18000, CRC(e37d599d) SHA1(105f91e968ecf553d910a97726ddc536289bbb2b) ) - ROM_CONTINUE( 0x08000, 0x08000 ) + ROM_LOAD( "shotsnd_u88_v1.1.u88", 0x10000, 0x18000, CRC(e37d599d) SHA1(105f91e968ecf553d910a97726ddc536289bbb2b) ) /* labeled SHOTSND U88 V1.1, also known to be labeled SHOTSND U88 */ + ROM_CONTINUE( 0x08000, 0x08000 ) ROM_REGION( 0x800000, "gfx1", 0 ) ROM_LOAD32_BYTE( "shf_grom0_0.grm0_0", 0x000000, 0x80000, CRC(832a3d6a) SHA1(443328fa61b79c93ec6c9d24893b2ec38358a905) ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/itech8.cpp mame-0.231+dfsg.1/src/mame/drivers/itech8.cpp --- mame-0.230+dfsg.1/src/mame/drivers/itech8.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/itech8.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -505,10 +505,10 @@ #include "cpu/z80/z80.h" #include "machine/6522via.h" #include "machine/6821pia.h" -#include "sound/3812intf.h" #include "sound/okim6295.h" #include "sound/ym2203.h" #include "sound/ym2608.h" +#include "sound/ym3812.h" #include "speaker.h" @@ -2203,20 +2203,20 @@ ROM_LOAD( "poolpgm-20.u5", 0x00000, 0x10000, CRC(370a00eb) SHA1(b2878f161f4931d9fc3979a84b29660941e2608f) ) ROM_REGION( 0x10000, "soundcpu", 0 ) - ROM_LOAD( "u27.bin", 0x08000, 0x8000, CRC(a96ce0f7) SHA1(c1fec3aeef97c846fd1a20b91af54f6bf9723a71) ) + ROM_LOAD( "pool_snd-u27.u27", 0x08000, 0x8000, CRC(a96ce0f7) SHA1(c1fec3aeef97c846fd1a20b91af54f6bf9723a71) ) ROM_REGION( 0x10000, "sub", 0 ) - ROM_LOAD( "u53.bin", 0x00000, 0x0800, CRC(04b85918) SHA1(409aef2e71937c7654334999df9313909d757966) ) - ROM_CONTINUE( 0x00000, 0x0800 ) - ROM_CONTINUE( 0x00000, 0x0800 ) - ROM_CONTINUE( 0x00000, 0x0800 ) + ROM_LOAD( "z80_pgm_u53.u53", 0x00000, 0x0800, CRC(04b85918) SHA1(409aef2e71937c7654334999df9313909d757966) ) /* labeled Z80 PGM (U53) */ + ROM_CONTINUE( 0x00000, 0x0800 ) + ROM_CONTINUE( 0x00000, 0x0800 ) + ROM_CONTINUE( 0x00000, 0x0800 ) ROM_REGION( 0xc0000, "grom", 0 ) - ROM_LOAD( "grom0.bin", 0x00000, 0x20000, CRC(e60c2804) SHA1(e62d11b6c4439a70a2f32df72c8c64e2f110351e) ) - ROM_LOAD( "grom1.bin", 0x20000, 0x20000, CRC(d764d542) SHA1(43fc0c9b627484a670d87da91e212741b137e995) ) + ROM_LOAD( "pool-grom0.grom0", 0x00000, 0x20000, CRC(e60c2804) SHA1(e62d11b6c4439a70a2f32df72c8c64e2f110351e) ) + ROM_LOAD( "pool-grom1.grom1", 0x20000, 0x20000, CRC(d764d542) SHA1(43fc0c9b627484a670d87da91e212741b137e995) ) ROM_REGION( 0x40000, "oki", 0 ) - ROM_LOAD( "srom0.bin", 0x00000, 0x10000, CRC(4b075f5e) SHA1(d1ac2c06352a5b96486a7e8cf8baae0c0e5b1883) ) + ROM_LOAD( "pool_vr-srom0.srom0", 0x00000, 0x10000, CRC(4b075f5e) SHA1(d1ac2c06352a5b96486a7e8cf8baae0c0e5b1883) ) ROM_END @@ -2225,20 +2225,20 @@ ROM_LOAD( "poolpgm-17.u5", 0x00000, 0x10000, CRC(09d70554) SHA1(a009cd3b22261c60f1028694baef51f61713154f) ) ROM_REGION( 0x10000, "soundcpu", 0 ) - ROM_LOAD( "u27.bin", 0x08000, 0x8000, CRC(a96ce0f7) SHA1(c1fec3aeef97c846fd1a20b91af54f6bf9723a71) ) + ROM_LOAD( "pool_snd-u27.u27", 0x08000, 0x8000, CRC(a96ce0f7) SHA1(c1fec3aeef97c846fd1a20b91af54f6bf9723a71) ) ROM_REGION( 0x10000, "sub", 0 ) - ROM_LOAD( "u53.bin", 0x00000, 0x0800, CRC(04b85918) SHA1(409aef2e71937c7654334999df9313909d757966) ) - ROM_CONTINUE( 0x00000, 0x0800 ) - ROM_CONTINUE( 0x00000, 0x0800 ) - ROM_CONTINUE( 0x00000, 0x0800 ) + ROM_LOAD( "z80_pgm_u53.u53", 0x00000, 0x0800, CRC(04b85918) SHA1(409aef2e71937c7654334999df9313909d757966) ) /* labeled Z80 PGM (U53) */ + ROM_CONTINUE( 0x00000, 0x0800 ) + ROM_CONTINUE( 0x00000, 0x0800 ) + ROM_CONTINUE( 0x00000, 0x0800 ) ROM_REGION( 0xc0000, "grom", 0 ) - ROM_LOAD( "grom0.bin", 0x00000, 0x20000, CRC(e60c2804) SHA1(e62d11b6c4439a70a2f32df72c8c64e2f110351e) ) - ROM_LOAD( "grom1.bin", 0x20000, 0x20000, CRC(d764d542) SHA1(43fc0c9b627484a670d87da91e212741b137e995) ) + ROM_LOAD( "pool-grom0.grom0", 0x00000, 0x20000, CRC(e60c2804) SHA1(e62d11b6c4439a70a2f32df72c8c64e2f110351e) ) + ROM_LOAD( "pool-grom1.grom1", 0x20000, 0x20000, CRC(d764d542) SHA1(43fc0c9b627484a670d87da91e212741b137e995) ) ROM_REGION( 0x40000, "oki", 0 ) - ROM_LOAD( "srom0.bin", 0x00000, 0x10000, CRC(4b075f5e) SHA1(d1ac2c06352a5b96486a7e8cf8baae0c0e5b1883) ) + ROM_LOAD( "pool_vr-srom0.srom0", 0x00000, 0x10000, CRC(4b075f5e) SHA1(d1ac2c06352a5b96486a7e8cf8baae0c0e5b1883) ) ROM_END @@ -2247,26 +2247,26 @@ ROM_LOAD( "poolpgm-16.u5", 0x00000, 0x10000, CRC(c0f17012) SHA1(5d466e058daf91b4f52e634498df9d2a03627aaa) ) ROM_REGION( 0x10000, "soundcpu", 0 ) - ROM_LOAD( "u27.bin", 0x08000, 0x8000, CRC(a96ce0f7) SHA1(c1fec3aeef97c846fd1a20b91af54f6bf9723a71) ) + ROM_LOAD( "pool_snd-u27.u27", 0x08000, 0x8000, CRC(a96ce0f7) SHA1(c1fec3aeef97c846fd1a20b91af54f6bf9723a71) ) ROM_REGION( 0x10000, "sub", 0 ) - ROM_LOAD( "u53.bin", 0x00000, 0x0800, CRC(04b85918) SHA1(409aef2e71937c7654334999df9313909d757966) ) - ROM_CONTINUE( 0x00000, 0x0800 ) - ROM_CONTINUE( 0x00000, 0x0800 ) - ROM_CONTINUE( 0x00000, 0x0800 ) + ROM_LOAD( "z80_pgm_u53.u53", 0x00000, 0x0800, CRC(04b85918) SHA1(409aef2e71937c7654334999df9313909d757966) ) /* labeled Z80 PGM (U53) */ + ROM_CONTINUE( 0x00000, 0x0800 ) + ROM_CONTINUE( 0x00000, 0x0800 ) + ROM_CONTINUE( 0x00000, 0x0800 ) ROM_REGION( 0xc0000, "grom", 0 ) - ROM_LOAD( "pool-grom.0", 0x00000, 0x10000, CRC(e6d0edc6) SHA1(5287a31bbdde1e4291d8e9e6b99d3aa12bfb6e18) ) - ROM_LOAD( "pool-grom.1", 0x10000, 0x10000, CRC(5a071aa2) SHA1(9c5506e37625d213429b1231d457d7ce8a7a81ff) ) - ROM_LOAD( "pool-grom.2", 0x20000, 0x10000, CRC(c0bdf4e0) SHA1(3b7c635375c5e5fddcbc1bd1b186c960081ec37e) ) - ROM_LOAD( "pool-grom.3", 0x30000, 0x10000, CRC(cb0bd9a3) SHA1(107ff127f9adad84a5f92077851423249fce8e30) ) + ROM_LOAD( "grom0-pool.grom0", 0x00000, 0x10000, CRC(e6d0edc6) SHA1(5287a31bbdde1e4291d8e9e6b99d3aa12bfb6e18) ) + ROM_LOAD( "grom1-pool.grom1", 0x10000, 0x10000, CRC(5a071aa2) SHA1(9c5506e37625d213429b1231d457d7ce8a7a81ff) ) + ROM_LOAD( "grom2-pool.grom2", 0x20000, 0x10000, CRC(c0bdf4e0) SHA1(3b7c635375c5e5fddcbc1bd1b186c960081ec37e) ) + ROM_LOAD( "grom3-pool.grom3", 0x30000, 0x10000, CRC(cb0bd9a3) SHA1(107ff127f9adad84a5f92077851423249fce8e30) ) ROM_REGION( 0x40000, "oki", 0 ) - ROM_LOAD( "srom0.bin", 0x00000, 0x10000, CRC(4b075f5e) SHA1(d1ac2c06352a5b96486a7e8cf8baae0c0e5b1883) ) + ROM_LOAD( "pool_vr-srom0.srom0", 0x00000, 0x10000, CRC(4b075f5e) SHA1(d1ac2c06352a5b96486a7e8cf8baae0c0e5b1883) ) ROM_END -ROM_START( dynobop ) +ROM_START( dynobop ) /* known to be labeled as DYNO PGM 1.0 U5, but same data - a "true" v1.0 most likely labeled as DYNO BIM U5 */ ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "dyno_pgm_1.1_u5.u5", 0x00000, 0x10000, CRC(98452c40) SHA1(9b9316fc258792e0d825f16e0fadf8e0c35a864e) ) @@ -2274,10 +2274,10 @@ ROM_LOAD( "dyno_snd-u27.u27", 0x08000, 0x8000, CRC(a37d862b) SHA1(922eeae184df2c5c28040da27699dd55744f8dca) ) ROM_REGION( 0x10000, "sub", 0 ) - ROM_LOAD( "dynobop.u53", 0x00000, 0x0800, CRC(04b85918) SHA1(409aef2e71937c7654334999df9313909d757966) ) - ROM_CONTINUE( 0x00000, 0x0800 ) - ROM_CONTINUE( 0x00000, 0x0800 ) - ROM_CONTINUE( 0x00000, 0x0800 ) + ROM_LOAD( "z80_pgm_u53.u53", 0x00000, 0x0800, CRC(04b85918) SHA1(409aef2e71937c7654334999df9313909d757966) ) /* labeled Z80 PGM (U53) */ + ROM_CONTINUE( 0x00000, 0x0800 ) + ROM_CONTINUE( 0x00000, 0x0800 ) + ROM_CONTINUE( 0x00000, 0x0800 ) ROM_REGION( 0xc0000, "grom", 0 ) ROM_LOAD( "grom00-dyno.grom0", 0x00000, 0x20000, CRC(3525a7a3) SHA1(fe0b08203c135d55507506936dc34e1503e4906b) ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/jackal.cpp mame-0.231+dfsg.1/src/mame/drivers/jackal.cpp --- mame-0.230+dfsg.1/src/mame/drivers/jackal.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/jackal.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -349,7 +349,7 @@ // HACK: running at the nominal clock rate, music stops working // at the beginning of the game. This fixes it. - m_slavecpu->set_clock_scale(1.2f); + m_slavecpu->set_clock_scale(1.5); m_rambank = rgn; m_spritebank = rgn; diff -Nru mame-0.230+dfsg.1/src/mame/drivers/jack.cpp mame-0.231+dfsg.1/src/mame/drivers/jack.cpp --- mame-0.230+dfsg.1/src/mame/drivers/jack.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/jack.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -912,22 +912,21 @@ void jack_state::jack(machine_config &config) { + constexpr XTAL MASTER_XTAL = 18_MHz_XTAL; // labeled "18MHz" in the schematics, but might this really be 18.432 (like Galaxian, etc.)? + /* basic machine hardware */ - Z80(config, m_maincpu, XTAL(18'000'000)/6); + Z80(config, m_maincpu, MASTER_XTAL / 6); m_maincpu->set_addrmap(AS_PROGRAM, &jack_state::jack_map); m_maincpu->set_vblank_int("screen", FUNC(jack_state::irq0_line_hold)); - Z80(config, m_audiocpu, XTAL(18'000'000)/6); + Z80(config, m_audiocpu, MASTER_XTAL / 6); m_audiocpu->set_addrmap(AS_PROGRAM, &jack_state::sound_map); m_audiocpu->set_addrmap(AS_IO, &jack_state::sound_io_map); m_audiocpu->set_irq_acknowledge_callback(FUNC(jack_state::jack_sh_irq_ack)); /* video hardware */ 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(32*8, 32*8); - screen.set_visarea(0*8, 32*8-1, 2*8, 30*8-1); + screen.set_raw(MASTER_XTAL / 3, 384, 0, 256, 264, 16, 240); screen.set_screen_update(FUNC(jack_state::screen_update_jack)); screen.set_palette(m_palette); @@ -940,7 +939,7 @@ GENERIC_LATCH_8(config, m_soundlatch); m_soundlatch->data_pending_callback().set_inputline(m_audiocpu, 0, ASSERT_LINE); - ay8910_device &aysnd(AY8910(config, "aysnd", XTAL(18'000'000)/12)); + ay8910_device &aysnd(AY8910(config, "aysnd", MASTER_XTAL / 12)); aysnd.port_a_read_callback().set(m_soundlatch, FUNC(generic_latch_8_device::read)); aysnd.port_b_read_callback().set(FUNC(jack_state::timer_r)); aysnd.add_route(ALL_OUTPUTS, "mono", 1.0); diff -Nru mame-0.230+dfsg.1/src/mame/drivers/jackpot.cpp mame-0.231+dfsg.1/src/mame/drivers/jackpot.cpp --- mame-0.230+dfsg.1/src/mame/drivers/jackpot.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/jackpot.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -39,8 +39,8 @@ #include "speaker.h" #include "cpu/z80/z80.h" #include "machine/eepromser.h" -#include "sound/3526intf.h" #include "sound/ay8910.h" +#include "sound/ym3526.h" #include "video/mc6845.h" class jackpot_state : public driver_device diff -Nru mame-0.230+dfsg.1/src/mame/drivers/jazz.cpp mame-0.231+dfsg.1/src/mame/drivers/jazz.cpp --- mame-0.230+dfsg.1/src/mame/drivers/jazz.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/jazz.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -282,8 +282,7 @@ void jazz_state::jazz(machine_config &config) { - // FIXME: slow the cpu clock to get past session manager bugcheck - R4000(config, m_cpu, 50_MHz_XTAL / 5); + R4000(config, m_cpu, 50_MHz_XTAL); m_cpu->set_addrmap(0, &jazz_state::cpu_map); RAM(config, m_ram); diff -Nru mame-0.230+dfsg.1/src/mame/drivers/jpmimpctsw.cpp mame-0.231+dfsg.1/src/mame/drivers/jpmimpctsw.cpp --- mame-0.230+dfsg.1/src/mame/drivers/jpmimpctsw.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/jpmimpctsw.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -57,13 +57,17 @@ #include "j6gogold.lh" #include "j6goldgla.lh" #include "j6hapyhrb.lh" -#include "j6impulsc.lh" +#include "j6impuls.lh" +#include "j6impuls15.lh" #include "j6indyi.lh" -#include "j6kungfud.lh" +#include "j6kungfu.lh" #include "j6kfc.lh" #include "j6megbck.lh" -#include "j6montlkb.lh" +#include "j6montlk.lh" +#include "j6montlk6.lh" #include "j6mono60.lh" +#include "j6mono608.lh" +#include "j6mono6010.lh" #include "j6monst.lh" #include "j6oxobin.lh" #include "j6quick.lh" @@ -11587,8 +11591,6 @@ #define GAME_FLAGS_WORKING MACHINE_MECHANICAL|MACHINE_CLICKABLE_ARTWORK -#define GAME_FLAGS_WORKING_NO_SOUND MACHINE_MECHANICAL|MACHINE_CLICKABLE_ARTWORK|MACHINE_NO_SOUND - // ************************************************************************************************************* // JPM + others games with old 'error log' style codes for errors // ************************************************************************************************************* @@ -11759,8 +11761,8 @@ GAMEL( 199?, j6guabe, j6guab, impact_nonvideo, j6guab, jpmimpct_state, empty_init, ROT0, "JPM", "Give Us A Break (JPM) (IMPACT) (GB 6 C 9) (set 6)", GAME_FLAGS_WORKING, layout_j6guabc ) GAMEL( 199?, j6guabf, j6guab, impact_nonvideo, j6guab, jpmimpct_state, empty_init, ROT0, "JPM", "Give Us A Break (JPM) (IMPACT) (GB 6 C 9) (set 7, Whitbread)", GAME_FLAGS_WORKING, layout_j6guabc ) -GAMEL( 199?, j6guabcl, 0, impact_nonvideo, j6guabcl, jpmimpct_state, empty_init, ROT0, "JPM", "Give Us A Break Club (JPM) (IMPACT) (set 1)", GAME_FLAGS, layout_j6guabcl ) -GAMEL( 199?, j6guabcla, j6guabcl, impact_nonvideo, j6guabcl, jpmimpct_state, empty_init, ROT0, "JPM", "Give Us A Break Club (JPM) (IMPACT) (set 2)", GAME_FLAGS, layout_j6guabcl ) +GAMEL( 199?, j6guabcl, 0, impact_nonvideo, j6guabcl, jpmimpct_state, empty_init, ROT0, "JPM", "Give Us A Break Club (JPM) (IMPACT) (GB 8 GB12) (set 1)", GAME_FLAGS_WORKING, layout_j6guabcl ) +GAMEL( 199?, j6guabcla, j6guabcl, impact_nonvideo, j6guabcl, jpmimpct_state, empty_init, ROT0, "JPM", "Give Us A Break Club (JPM) (IMPACT) (GB 8 GB12P) (set 2, Protocol)", GAME_FLAGS_WORKING, layout_j6guabcl ) // was in a set marked Reel Bingo Classic Club, still contains VFD attract strings for Give Us A Break Club, but has different lamping, so likely // a different game built off the same base code with no VFD showing @@ -11783,18 +11785,18 @@ GAME( 199?, j6hilosvd, j6hilosv, impact_nonvideo, j6hilosv, jpmimpct_state, empty_init, ROT0, "JPM", "Hi Lo Silver (JPM) (IMPACT) (set 5)", GAME_FLAGS ) // incomplete pair GAME( 199?, j6hilosve, j6hilosv, impact_nonvideo, j6hilosv, jpmimpct_state, empty_init, ROT0, "JPM", "Hi Lo Silver (JPM) (IMPACT) (set 6)", GAME_FLAGS ) // incomplete pair -GAMEL( 199?, j6impuls, 0, impact_nonvideo, j6impuls, jpmimpct_state, empty_init, ROT0, "JPM", "Impulse (JPM) (IMPACT) (set 1)", GAME_FLAGS, layout_j6impulsc ) -GAMEL( 199?, j6impulsa, j6impuls, impact_nonvideo, j6impulsa,jpmimpct_state, empty_init, ROT0, "JPM", "Impulse (JPM) (IMPACT) (set 2)", GAME_FLAGS, layout_j6impulsc ) -GAMEL( 199?, j6impulsb, j6impuls, impact_nonvideo, j6impulsa,jpmimpct_state, empty_init, ROT0, "JPM", "Impulse (JPM) (IMPACT) (set 3)", GAME_FLAGS, layout_j6impulsc ) -GAMEL( 199?, j6impulsc, j6impuls, impact_nonvideo, j6impulsa,jpmimpct_state, empty_init, ROT0, "JPM", "Impulse (JPM) (IMPACT) (set 4)", GAME_FLAGS, layout_j6impulsc ) -GAMEL( 199?, j6impulsd, j6impuls, impact_nonvideo, j6impulsa,jpmimpct_state, empty_init, ROT0, "JPM", "Impulse (JPM) (IMPACT) (set 5)", GAME_FLAGS, layout_j6impulsc ) -GAMEL( 199?, j6impulse, j6impuls, impact_nonvideo, j6impulsa,jpmimpct_state, empty_init, ROT0, "JPM", "Impulse (JPM) (IMPACT) (set 6)", GAME_FLAGS, layout_j6impulsc ) -GAMEL( 199?, j6impulsf, j6impuls, impact_nonvideo, j6impulsa,jpmimpct_state, empty_init, ROT0, "JPM", "Impulse (JPM) (IMPACT) (set 7, Whitbread)", GAME_FLAGS, layout_j6impulsc ) +GAMEL( 199?, j6impuls, 0, impact_nonvideo, j6impuls, jpmimpct_state, empty_init, ROT0, "JPM", "Impulse (JPM) (IMPACT) (IP 5 C13) (set 1)", GAME_FLAGS_WORKING, layout_j6impuls15 ) +GAMEL( 199?, j6impulsa, j6impuls, impact_nonvideo, j6impulsa,jpmimpct_state, empty_init, ROT0, "JPM", "Impulse (JPM) (IMPACT) (IP 6 C14) (set 2)", GAME_FLAGS_WORKING, layout_j6impuls ) +GAMEL( 199?, j6impulsb, j6impuls, impact_nonvideo, j6impulsa,jpmimpct_state, empty_init, ROT0, "JPM", "Impulse (JPM) (IMPACT) (IP 6 AC14) (set 3)", GAME_FLAGS_WORKING, layout_j6impuls ) +GAMEL( 199?, j6impulsc, j6impuls, impact_nonvideo, j6impulsa,jpmimpct_state, empty_init, ROT0, "JPM", "Impulse (JPM) (IMPACT) (IP 7 C15) (set 4)", GAME_FLAGS_WORKING, layout_j6impuls ) +GAMEL( 199?, j6impulsd, j6impuls, impact_nonvideo, j6impulsa,jpmimpct_state, empty_init, ROT0, "JPM", "Impulse (JPM) (IMPACT) (IP 7 AC13) (set 5)", GAME_FLAGS_WORKING, layout_j6impuls ) +GAMEL( 199?, j6impulse, j6impuls, impact_nonvideo, j6impulsa,jpmimpct_state, empty_init, ROT0, "JPM", "Impulse (JPM) (IMPACT) (IP 7P C15) (set 6)", GAME_FLAGS_WORKING, layout_j6impuls ) +GAMEL( 199?, j6impulsf, j6impuls, impact_nonvideo, j6impulsa,jpmimpct_state, empty_init, ROT0, "JPM", "Impulse (JPM) (IMPACT) (IP 7P C15) (set 7, Whitbread)", GAME_FLAGS_WORKING, layout_j6impuls ) // not the same layout or button mapping as the above, but same attract strings? GAME( 199?, j6impls, 0, impact_nonvideo, j6impls, jpmimpct_state, empty_init, ROT0, "Crystal", "Impulse (Crystal) (IMPACT)", GAME_FLAGS ) -GAMEL( 199?, j6indy, 0, impact_nonvideo, j6indy, jpmimpct_state, empty_init, ROT0, "JPM", "Indiana Jones (JPM) (IMPACT) (set 1)", GAME_FLAGS, layout_j6indyi ) +GAMEL( 199?, j6indy, 0, impact_nonvideo, j6indy, jpmimpct_state, empty_init, ROT0, "JPM", "Indiana Jones (JPM) (IMPACT) (set 1)", GAME_FLAGS, layout_j6indyi )//requires dual lamping components GAMEL( 199?, j6indya, j6indy, impact_nonvideo, j6indy, jpmimpct_state, empty_init, ROT0, "JPM", "Indiana Jones (JPM) (IMPACT) (set 2)", GAME_FLAGS, layout_j6indyi ) GAMEL( 199?, j6indyb, j6indy, impact_nonvideo, j6indy, jpmimpct_state, empty_init, ROT0, "JPM", "Indiana Jones (JPM) (IMPACT) (set 3)", GAME_FLAGS, layout_j6indyi ) GAMEL( 199?, j6indyc, j6indy, impact_nonvideo, j6indy, jpmimpct_state, empty_init, ROT0, "JPM", "Indiana Jones (JPM) (IMPACT) (set 4)", GAME_FLAGS, layout_j6indyi ) @@ -11809,11 +11811,11 @@ GAME( 199?, j6jungfv, 0, impact_nonvideo, j6jungfv, jpmimpct_state, empty_init, ROT0, "Ace", "Jungle Fever (Ace) (IMPACT)", GAME_FLAGS ) -GAMEL( 199?, j6kungfu, 0, impact_nonvideo_altreels, j6kungfu, jpmimpct_state, empty_init, ROT0, "Ace", "Kung Fu (Ace) (IMPACT) (set 1)", GAME_FLAGS, layout_j6kungfud ) -GAMEL( 199?, j6kungfua, j6kungfu, impact_nonvideo_altreels, j6kungfu, jpmimpct_state, empty_init, ROT0, "Ace", "Kung Fu (Ace) (IMPACT) (set 2)", GAME_FLAGS, layout_j6kungfud ) -GAMEL( 199?, j6kungfub, j6kungfu, impact_nonvideo_altreels, j6kungfu, jpmimpct_state, empty_init, ROT0, "Ace", "Kung Fu (Ace) (IMPACT) (set 3)", GAME_FLAGS, layout_j6kungfud ) -GAMEL( 199?, j6kungfuc, j6kungfu, impact_nonvideo_altreels, j6kungfu, jpmimpct_state, empty_init, ROT0, "Ace", "Kung Fu (Ace) (IMPACT) (set 4)", GAME_FLAGS, layout_j6kungfud ) -GAMEL( 199?, j6kungfud, j6kungfu, impact_nonvideo_altreels, j6kungfu, jpmimpct_state, empty_init, ROT0, "Ace", "Kung Fu (Ace) (IMPACT) (set 5, Whitbread)", GAME_FLAGS, layout_j6kungfud ) +GAMEL( 199?, j6kungfu, 0, impact_nonvideo_altreels, j6kungfu, jpmimpct_state, empty_init, ROT0, "Ace", "Kung Fu (Ace) (IMPACT) (set 1)", GAME_FLAGS_WORKING, layout_j6kungfu ) +GAMEL( 199?, j6kungfua, j6kungfu, impact_nonvideo_altreels, j6kungfu, jpmimpct_state, empty_init, ROT0, "Ace", "Kung Fu (Ace) (IMPACT) (set 2)", GAME_FLAGS_WORKING, layout_j6kungfu ) +GAMEL( 199?, j6kungfub, j6kungfu, impact_nonvideo_altreels, j6kungfu, jpmimpct_state, empty_init, ROT0, "Ace", "Kung Fu (Ace) (IMPACT) (set 3)", GAME_FLAGS_WORKING, layout_j6kungfu ) +GAMEL( 199?, j6kungfuc, j6kungfu, impact_nonvideo_altreels, j6kungfu, jpmimpct_state, empty_init, ROT0, "Ace", "Kung Fu (Ace) (IMPACT) (set 4)", GAME_FLAGS_WORKING, layout_j6kungfu ) +GAMEL( 199?, j6kungfud, j6kungfu, impact_nonvideo_altreels, j6kungfu, jpmimpct_state, empty_init, ROT0, "Ace", "Kung Fu (Ace) (IMPACT) (set 5, Whitbread)", GAME_FLAGS_WORKING, layout_j6kungfu ) GAME( 199?, j6luckla, 0, impact_nonvideo, j6luckla, jpmimpct_state, empty_init, ROT0, "Crystal", "Lucky Las Vegas (Crystal) (IMPACT) (set 1)", GAME_FLAGS ) GAME( 199?, j6lucklaa, j6luckla, impact_nonvideo, j6luckla, jpmimpct_state, empty_init, ROT0, "Crystal", "Lucky Las Vegas (Crystal) (IMPACT) (set 2)", GAME_FLAGS ) @@ -11827,29 +11829,29 @@ GAME( 199?, j6monmad, 0, impact_nonvideo, j6monmad, jpmimpct_state, empty_init, ROT0, "Ace", "Money Madness (Ace) (IMPACT)", GAME_FLAGS ) -GAMEL( 199?, j6montlk, 0, impact_nonvideo, j6montlk, jpmimpct_state, empty_init, ROT0, "JPM", "Money Talks (JPM) (IMPACT) (set 1)", GAME_FLAGS, layout_j6montlkb ) -GAMEL( 199?, j6montlka, j6montlk, impact_nonvideo, j6montlk, jpmimpct_state, empty_init, ROT0, "JPM", "Money Talks (JPM) (IMPACT) (set 2)", GAME_FLAGS, layout_j6montlkb ) -GAMEL( 199?, j6montlkb, j6montlk, impact_nonvideo, j6montlk, jpmimpct_state, empty_init, ROT0, "JPM", "Money Talks (JPM) (IMPACT) (set 3)", GAME_FLAGS, layout_j6montlkb ) -GAMEL( 199?, j6montlkc, j6montlk, impact_nonvideo, j6montlk, jpmimpct_state, empty_init, ROT0, "JPM", "Money Talks (JPM) (IMPACT) (set 4)", GAME_FLAGS, layout_j6montlkb ) -GAMEL( 199?, j6montlkd, j6montlk, impact_nonvideo, j6montlk, jpmimpct_state, empty_init, ROT0, "JPM", "Money Talks (JPM) (IMPACT) (set 5)", GAME_FLAGS, layout_j6montlkb ) -GAMEL( 199?, j6montlke, j6montlk, impact_nonvideo, j6montlk, jpmimpct_state, empty_init, ROT0, "JPM", "Money Talks (JPM) (IMPACT) (set 6)", GAME_FLAGS, layout_j6montlkb ) -GAMEL( 199?, j6montlkf, j6montlk, impact_nonvideo, j6montlk, jpmimpct_state, empty_init, ROT0, "JPM", "Money Talks (JPM) (IMPACT) (set 7)", GAME_FLAGS, layout_j6montlkb ) -GAMEL( 199?, j6montlkg, j6montlk, impact_nonvideo, j6montlk, jpmimpct_state, empty_init, ROT0, "JPM", "Money Talks (JPM) (IMPACT) (set 8)", GAME_FLAGS, layout_j6montlkb ) -GAMEL( 199?, j6montlkh, j6montlk, impact_nonvideo, j6montlk, jpmimpct_state, empty_init, ROT0, "JPM", "Money Talks (JPM) (IMPACT) (set 9)", GAME_FLAGS, layout_j6montlkb ) - -GAMEL( 199?, j6mono60, 0, impact_nonvideo, j6mono60, jpmimpct_state, empty_init, ROT0, "JPM", "Monopoly 60th Anniversary Edition (JPM) (IMPACT) (set 1)", GAME_FLAGS, layout_j6mono60 ) -GAMEL( 199?, j6mono60a, j6mono60, impact_nonvideo, j6mono60, jpmimpct_state, empty_init, ROT0, "JPM", "Monopoly 60th Anniversary Edition (JPM) (IMPACT) (set 2)", GAME_FLAGS, layout_j6mono60 ) -GAMEL( 199?, j6mono60b, j6mono60, impact_nonvideo, j6mono60, jpmimpct_state, empty_init, ROT0, "JPM", "Monopoly 60th Anniversary Edition (JPM) (IMPACT) (set 3)", GAME_FLAGS, layout_j6mono60 ) -GAMEL( 199?, j6mono60c, j6mono60, impact_nonvideo, j6mono60, jpmimpct_state, empty_init, ROT0, "JPM", "Monopoly 60th Anniversary Edition (JPM) (IMPACT) (set 4, Whitbread)", GAME_FLAGS, layout_j6mono60 ) -GAMEL( 199?, j6mono60d, j6mono60, impact_nonvideo, j6mono60, jpmimpct_state, empty_init, ROT0, "JPM", "Monopoly 60th Anniversary Edition (JPM) (IMPACT) (set 5)", GAME_FLAGS, layout_j6mono60 ) -GAMEL( 199?, j6mono60e, j6mono60, impact_nonvideo, j6mono60, jpmimpct_state, empty_init, ROT0, "JPM", "Monopoly 60th Anniversary Edition (JPM) (IMPACT) (set 6)", GAME_FLAGS, layout_j6mono60 ) -GAMEL( 199?, j6mono60f, j6mono60, impact_nonvideo, j6mono60, jpmimpct_state, empty_init, ROT0, "JPM", "Monopoly 60th Anniversary Edition (JPM) (IMPACT) (set 7)", GAME_FLAGS, layout_j6mono60 ) -GAMEL( 199?, j6mono60g, j6mono60, impact_nonvideo, j6mono60, jpmimpct_state, empty_init, ROT0, "JPM", "Monopoly 60th Anniversary Edition (JPM) (IMPACT) (set 8, Whitbread)", GAME_FLAGS, layout_j6mono60 ) -GAMEL( 199?, j6mono60h, j6mono60, impact_nonvideo, j6mono60, jpmimpct_state, empty_init, ROT0, "JPM", "Monopoly 60th Anniversary Edition (JPM) (IMPACT) (set 9)", GAME_FLAGS, layout_j6mono60 ) -GAMEL( 199?, j6mono60i, j6mono60, impact_nonvideo, j6mono60, jpmimpct_state, empty_init, ROT0, "JPM", "Monopoly 60th Anniversary Edition (JPM) (IMPACT) (set 10)", GAME_FLAGS, layout_j6mono60 ) -GAMEL( 199?, j6mono60j, j6mono60, impact_nonvideo, j6mono60, jpmimpct_state, empty_init, ROT0, "JPM", "Monopoly 60th Anniversary Edition (JPM) (IMPACT) (set 11)", GAME_FLAGS, layout_j6mono60 ) +GAMEL( 199?, j6montlk, 0, impact_nonvideo, j6montlk, jpmimpct_state, empty_init, ROT0, "JPM", "Money Talks (JPM) (IMPACT) (MT5 L17) (set 1)", GAME_FLAGS_WORKING, layout_j6montlk ) +GAMEL( 199?, j6montlka, j6montlk, impact_nonvideo, j6montlk, jpmimpct_state, empty_init, ROT0, "JPM", "Money Talks (JPM) (IMPACT) (MT5 I L17) (set 2)", GAME_FLAGS_WORKING, layout_j6montlk ) +GAMEL( 199?, j6montlkb, j6montlk, impact_nonvideo, j6montlk, jpmimpct_state, empty_init, ROT0, "JPM", "Money Talks (JPM) (IMPACT) (MT3 L12) (set 3)", GAME_FLAGS_WORKING, layout_j6montlk6 ) +GAMEL( 199?, j6montlkc, j6montlk, impact_nonvideo, j6montlk, jpmimpct_state, empty_init, ROT0, "JPM", "Money Talks (JPM) (IMPACT) (MT3 P L12) (set 4, Protocol)", GAME_FLAGS_WORKING, layout_j6montlk6 ) +GAMEL( 199?, j6montlkd, j6montlk, impact_nonvideo, j6montlk, jpmimpct_state, empty_init, ROT0, "JPM", "Money Talks (JPM) (IMPACT) (MT3 A L12) (set 5)", GAME_FLAGS_WORKING, layout_j6montlk6 ) +GAMEL( 199?, j6montlke, j6montlk, impact_nonvideo, j6montlk, jpmimpct_state, empty_init, ROT0, "JPM", "Money Talks (JPM) (IMPACT) (MT3 P GL12) (set 6, Protocol)", GAME_FLAGS_WORKING, layout_j6montlk ) +GAMEL( 199?, j6montlkf, j6montlk, impact_nonvideo, j6montlk, jpmimpct_state, empty_init, ROT0, "JPM", "Money Talks (JPM) (IMPACT) (MT7 L19) (set 7)", GAME_FLAGS_WORKING, layout_j6montlk ) +GAMEL( 199?, j6montlkg, j6montlk, impact_nonvideo, j6montlk, jpmimpct_state, empty_init, ROT0, "JPM", "Money Talks (JPM) (IMPACT) (MT7 P L19) (set 8, Protocol)", GAME_FLAGS_WORKING, layout_j6montlk ) +GAMEL( 199?, j6montlkh, j6montlk, impact_nonvideo, j6montlk, jpmimpct_state, empty_init, ROT0, "JPM", "Money Talks (JPM) (IMPACT) (MT7 A L19) (set 9)", GAME_FLAGS_WORKING, layout_j6montlk ) + +GAMEL( 199?, j6mono60, 0, impact_nonvideo, j6mono60, jpmimpct_state, empty_init, ROT0, "JPM", "Monopoly 60th Anniversary Edition (JPM) (IMPACT) (MO13 C24) (set 1)", GAME_FLAGS_WORKING, layout_j6mono60 ) +GAMEL( 199?, j6mono60a, j6mono60, impact_nonvideo, j6mono60, jpmimpct_state, empty_init, ROT0, "JPM", "Monopoly 60th Anniversary Edition (JPM) (IMPACT) (MO13 C24) (set 2)", GAME_FLAGS_WORKING, layout_j6mono60 ) +GAMEL( 199?, j6mono60b, j6mono60, impact_nonvideo, j6mono60, jpmimpct_state, empty_init, ROT0, "JPM", "Monopoly 60th Anniversary Edition (JPM) (IMPACT) (MO13 C24) (set 3)", GAME_FLAGS_WORKING, layout_j6mono60 ) +GAMEL( 199?, j6mono60c, j6mono60, impact_nonvideo, j6mono60, jpmimpct_state, empty_init, ROT0, "JPM", "Monopoly 60th Anniversary Edition (JPM) (IMPACT) (MO13 C24) (set 4, Whitbread)", GAME_FLAGS_WORKING, layout_j6mono60 ) +GAMEL( 199?, j6mono60d, j6mono60, impact_nonvideo, j6mono60, jpmimpct_state, empty_init, ROT0, "JPM", "Monopoly 60th Anniversary Edition (JPM) (IMPACT) (MO11 L22) (set 5)", GAME_FLAGS_WORKING, layout_j6mono608 ) +GAMEL( 199?, j6mono60e, j6mono60, impact_nonvideo, j6mono60, jpmimpct_state, empty_init, ROT0, "JPM", "Monopoly 60th Anniversary Edition (JPM) (IMPACT) (MO11P L22)(set 6, Protocol)", GAME_FLAGS_WORKING, layout_j6mono608 ) +GAMEL( 199?, j6mono60f, j6mono60, impact_nonvideo, j6mono60, jpmimpct_state, empty_init, ROT0, "JPM", "Monopoly 60th Anniversary Edition (JPM) (IMPACT) (MO11 AL22 (set 7)", GAME_FLAGS_WORKING, layout_j6mono608 ) +GAMEL( 199?, j6mono60g, j6mono60, impact_nonvideo, j6mono60, jpmimpct_state, empty_init, ROT0, "JPM", "Monopoly 60th Anniversary Edition (JPM) (IMPACT) (MO11 L22) (set 8, Whitbread)", GAME_FLAGS_WORKING, layout_j6mono6010 ) +GAMEL( 199?, j6mono60h, j6mono60, impact_nonvideo, j6mono60, jpmimpct_state, empty_init, ROT0, "JPM", "Monopoly 60th Anniversary Edition (JPM) (IMPACT) (MO11 IL22) (set 9)", GAME_FLAGS_WORKING, layout_j6mono608 ) +GAMEL( 199?, j6mono60i, j6mono60, impact_nonvideo, j6mono60, jpmimpct_state, empty_init, ROT0, "JPM", "Monopoly 60th Anniversary Edition (JPM) (IMPACT) (MO11 IL22) (set 10)", GAME_FLAGS_WORKING, layout_j6mono608 ) +GAMEL( 199?, j6mono60j, j6mono60, impact_nonvideo, j6mono60, jpmimpct_state, empty_init, ROT0, "JPM", "Monopoly 60th Anniversary Edition (JPM) (IMPACT) (MO8 L16) (set 11)", GAME_FLAGS_WORKING, layout_j6mono608 ) GAMEL( 199?, j6mono60k, j6mono60, impact_nonvideo, j6mono60, jpmimpct_state, empty_init, ROT0, "JPM", "Monopoly 60th Anniversary Edition (JPM) (IMPACT) (set 12)", GAME_FLAGS, layout_j6mono60 ) // incomplete pair -GAMEL( 199?, j6mono60l, j6mono60, impact_nonvideo, j6mono60, jpmimpct_state, empty_init, ROT0, "JPM", "Monopoly 60th Anniversary Edition (JPM) (IMPACT) (set 13)", GAME_FLAGS, layout_j6mono60 ) +GAMEL( 199?, j6mono60l, j6mono60, impact_nonvideo, j6mono60, jpmimpct_state, empty_init, ROT0, "JPM", "Monopoly 60th Anniversary Edition (JPM) (IMPACT) (MO3 L11) (set 13)", GAME_FLAGS_WORKING, layout_j6mono608 ) GAME( 199?, j6outlaw, 0, impact_nonvideo, j6outlaw, jpmimpct_state, empty_init, ROT0, "JPM", "Outlaw (JPM) (IMPACT, v3)", GAME_FLAGS ) GAME( 199?, j6outlawd, j6outlaw, impact_nonvideo, j6outlaw, jpmimpct_state, empty_init, ROT0, "JPM", "Outlaw (JPM) (IMPACT, v3) (Protocol)", GAME_FLAGS ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/junior80.cpp mame-0.231+dfsg.1/src/mame/drivers/junior80.cpp --- mame-0.230+dfsg.1/src/mame/drivers/junior80.cpp 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/junior80.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,300 @@ +// license:BSD-3-Clause +// copyright-holders:Robbbert +/*************************************************************************** + +Not much is known about this Hungarian Z80-based machine, not even the name +of the manufacturer. It comes with 64K of RAM, and 2x 5.25 floppy drives. +Video is a CGA card. + +Notes found at vcfed: + +1988, hungarian unknown, junior80 +2x 5.25 FDD DSDD 80T, 64K ram, CGA graphics card, Serial card with 2 ports + which is in addition to those ports on the main board. +So this are the main chips on the logic board: +Address / Chip +00H-03H I8255 +00H - input port for keyboard scan codes +01H - input port for system jumpers and parallel interface extra lines +PB6-7 - extra line parallel port B +PB4-5 - extra line parallel port A +PB3 - 0 - parallel keyboard / 1-serial keyboard +PB2 - 0 - internal console / 1 - serial console +PB1 - disk drive 2,3 - 0=5.25", 1=8" +PB0 - disk drive 0,1 - 0=5.25", 1=8" +02H +PC7 - second channel I8253 - 0 deactivated, 1 activated +PC6 - speaker modulation +PC4-5 - extra lines parallel port B +PC2-3 - extra lines parallel port A +PC1 - activate / deactivate serial keyboard +PC0 - comutation 0-RAM / 1 -ROM +03H command port for I8255 + +10H-13H Z80A SIO +10H - dataport A +11H - dataport B +12H - command port A +13H - command port B +THE code in ROM programms z80SIO: port A unprogrammed, port B: 8 bits, 2 stop-bits, no parity, + clockx16 - when the OS is loaded from disk, both channels are programmed identical. + +20-23H Z80A CTC +20H - data port - interrupt vector for channel 0 (in 8mhz, out 250khz) +21H - command port data channel 1 +22H - command port data channel 2 +23H - command port data channel 3 +both ROM and OS(from disk) programm the z80A ctc like this: +channel 0: counter with no interrupt +channel 1: counter with interrupt on falling edge of the page signal of the display unit +channel 2: counter with interrupt on falling edge of the keyboard interrupt +channel 3: counter with interrupt on rising edge ot the fdd controller interrupt + +30H-38H i8257 DMA +30H - DMA channel 0 - memory address for DMA transfer start +31H - DMA channel 0 - number of bytes to transfer +32H - DMA channel 1 - memory address for DMA transfer start +33H - DMA channel 1 - number of bytes to transfer +34H - DMA channel 2 - memory address for DMA transfer start +35H - DMA channel 2 - number of bytes to transfer +36H - DMA channel 3 - memory address for DMA transfer start +37H - DMA channel 4 - number of bytes to transfer +38H - state command of DMA chip +the only programmed channel is channel 1, used for data transfer between ram and fdd controller + +40H-41H - I8272 floppy drive controller +40H - command and state of I8272 +41H - dataport +48H - commands for fdd controller +D6,D7 - x +D5 - reset I8272 (0 active) +D4 - type of disk drive (0 - 8", 1- 5.25") +D0-3 - start stop drive motor (drive 0-3) +49H - load the scan address into the hardware in graphics mode +4AH - command port of display controller (discrete logic!) +D6,7 - x +D5 - blinking activated (1 active) +D4 - mode selection 0 = 320x200 1=640x200 +D3 - display 0=off 1 = on +D2 - validate acces display ram (16k display ram on board) - 1 active +D1 - 0 - graphics mode / 1 - text mode +D0 - 0 = 40x25, 1= 80x25 +4BH - color selection and text page selection for display controller +D6-7 - selection of working text page +D5 - select color palette +D4 - backgroung +D3 - bright +D2 - red +D1 - green +D0 - blue + +4CH - address port - row - select the first row displayed in text mode +4DH - selection port of clock for transmit and receive for Z80 SIO +D1-7 - x +D0 - 0= internal clock, 1= external clock +4FH - reset port for serial keyboard - keyboard interrupt is deactivated by writing or reading of 4FH + +50H-53H - z80A PIO +50H - data port A +51H - data port B +52H - interrupt vector A +53H - interrupt vector B +programmed in rom and from os like this: port A input with interrupt, port B - output with interrupt + +60H-6FH ramdisk + +70H-73H - i8253 +70H - dataport channel 0 +71H - dataport channel 1 +72H - dataport channel 2 +73H - command port I8253 +- i8253 programmed in rom and from os like: channel 0 unprogrammed, +channel 1: clock divider for 9600 bps clock +channel 2: clock divider for sound generator +when the os loads, channel 0 is programmed like channel 1 + +*************************************************************************** + + +To Do: Almost everything. +Status: Just a closet skeleton + + +***************************************************************************/ + +#include "emu.h" +#include "cpu/z80/z80.h" +#include "imagedev/floppy.h" +#include "machine/pit8253.h" +#include "machine/i8255.h" +#include "machine/i8257.h" +#include "machine/upd765.h" +#include "machine/z80ctc.h" +#include "machine/z80sio.h" +#include "machine/z80pio.h" +//#include "bus/rs232/rs232.h" + +class junior80_state : public driver_device +{ +public: + junior80_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_ctc(*this, "ctc") + , m_dma(*this, "dma") + , m_pio(*this, "pio") + , m_pit(*this, "pit") + , m_ppi(*this, "ppi") + , m_uart(*this, "uart") + , m_fdc(*this, "fdc") + , m_floppy0(*this, "fdc:0") + , m_floppy1(*this, "fdc:1") + //, m_io_keyboard(*this, "LINE%u", 0) + { } + + void junior80(machine_config &config); + +protected: + virtual void machine_start() override; + virtual void machine_reset() override; + +private: + + void mem_map(address_map &map); + void io_map(address_map &map); + + void drive_w(offs_t offset, u8 data); + + floppy_image_device *m_floppy; + required_device m_maincpu; + required_device m_ctc; + required_device m_dma; + required_device m_pio; + required_device m_pit; + required_device m_ppi; + required_device m_uart; + required_device m_fdc; + required_device m_floppy0; + required_device m_floppy1; + //required_ioport_array<8> m_io_keyboard; +}; + + +void junior80_state::mem_map(address_map &map) +{ + map(0x0000, 0xffff).ram(); + map(0x0000, 0x07ff).rom(); +} + +void junior80_state::io_map(address_map &map) +{ + map.global_mask(0xff); + map.unmap_value_high(); + map(0x00, 0x03).mirror(0x0c).rw(m_ppi, FUNC(i8255_device::read), FUNC(i8255_device::write)); + map(0x10, 0x13).mirror(0x0c).rw(m_uart, FUNC(z80sio_device::ba_cd_r), FUNC(z80sio_device::ba_cd_w)); + map(0x20, 0x23).mirror(0x0c).rw(m_ctc, FUNC(z80ctc_device::read), FUNC(z80ctc_device::write)); + map(0x30, 0x38).rw(m_dma, FUNC(i8257_device::read), FUNC(i8257_device::write)); + map(0x40, 0x41).mirror(0x06).m(m_fdc, FUNC(i8272a_device::map)); + map(0x48, 0x48).w(FUNC(junior80_state::drive_w)); + //map(0x49, 0x4d) video/graphics control + //map(0x4f, 0x4f) kbd ack + map(0x50, 0x53).mirror(0x0c).rw(m_pio, FUNC(z80pio_device::read), FUNC(z80pio_device::write)); + //map(0x60, 0x6f) ramdisk + map(0x70, 0x73).mirror(0x0c).rw("pit", FUNC(pit8253_device::read), FUNC(pit8253_device::write)); +} + +static INPUT_PORTS_START( junior80 ) +INPUT_PORTS_END + + +/************************************* + * + * Port handlers. + * + *************************************/ + + +void junior80_state::drive_w(offs_t offset, u8 data) +{ + m_floppy = nullptr; + + if (BIT(data, 0)) m_floppy = m_floppy0->get_device(); + if (BIT(data, 1)) m_floppy = m_floppy1->get_device(); + //if (BIT(data, 2)) m_floppy = m_floppy2->get_device(); + //if (BIT(data, 3)) m_floppy = m_floppy3->get_device(); + + m_fdc->set_floppy(m_floppy); + + if (m_floppy) + { + m_floppy->mon_w(0); + //m_floppy->ss_w(BIT(data, 4)); + } + + //m_fdc->dden_w(!BIT(data, 6)); + m_fdc->set_unscaled_clock(BIT(data, 4) ? 4000000 : 8000000); + if (!BIT(data, 5)) + m_fdc->reset(); +} + + +/************************************* + * Machine * + *************************************/ + +void junior80_state::machine_start() +{ +} + +void junior80_state::machine_reset() +{ + m_floppy = nullptr; +} + +static void junior80_floppies(device_slot_interface &device) +{ + device.option_add("fdd", FLOPPY_525_QD); +} + + +void junior80_state::junior80(machine_config &config) +{ + /* basic machine hardware */ + Z80(config, m_maincpu, 2'500'000); // 2.5 or 4MHz selectable by jumpers + m_maincpu->set_addrmap(AS_PROGRAM, &junior80_state::mem_map); + m_maincpu->set_addrmap(AS_IO, &junior80_state::io_map); + + // devices + I8272A(config, m_fdc, 8_MHz_XTAL / 2); + FLOPPY_CONNECTOR(config, "fdc:0", junior80_floppies, "fdd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, "fdc:1", junior80_floppies, "fdd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); + + Z80PIO(config, m_pio, 0); + Z80SIO(config, m_uart, 0); + Z80CTC(config, m_ctc, 0); + PIT8253(config, m_pit, 0); + I8255(config, m_ppi, 0); + + I8257(config, m_dma, 0); + //m_dma->out_hrq_cb().set(FUNC(junior80_state::hrq_w)); + //m_dma->in_memr_cb().set(FUNC(junior80_state::memory_r)); + //m_dma->out_memw_cb().set(FUNC(junior80_state::memory_w)); + //m_dma->in_ior_cb<1>().set(m_fdc, FUNC(upd765_device::data_r)); + //m_dma->out_iow_cb<1>().set(m_fdc, FUNC(upd765_device::data_w)); +} + + +/*************************************************************************** + + Game driver(s) + +***************************************************************************/ + + +ROM_START(junior80) + ROM_REGION(0x0800, "maincpu",0) + ROM_LOAD( "junior80_seria_321-ok.ic46", 0x0000, 0x0800, CRC(07f09842) SHA1(c7591a1006ae59d6353859ca401c57ff6eb1d4ff) ) +ROM_END + +// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS +COMP( 1988, junior80, 0, 0, junior80, junior80, junior80_state, empty_init, "unknown", "Junior 80", MACHINE_IS_SKELETON ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/karnov.cpp mame-0.231+dfsg.1/src/mame/drivers/karnov.cpp --- mame-0.230+dfsg.1/src/mame/drivers/karnov.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/karnov.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -83,9 +83,9 @@ #include "cpu/m68000/m68000.h" #include "cpu/m6502/m6502.h" #include "machine/input_merger.h" -#include "sound/3526intf.h" -#include "sound/3812intf.h" #include "sound/ym2203.h" +#include "sound/ym3526.h" +#include "sound/ym3812.h" #include "screen.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/kaypro.cpp mame-0.231+dfsg.1/src/mame/drivers/kaypro.cpp --- mame-0.230+dfsg.1/src/mame/drivers/kaypro.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/kaypro.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -46,6 +46,7 @@ #include "emu.h" #include "includes/kaypro.h" #include "machine/kay_kbd.h" +#include "formats/kaypro_dsk.h" #include "bus/rs232/rs232.h" #include "machine/clock.h" @@ -194,6 +195,12 @@ device.option_add("525qd", FLOPPY_525_QD); } +void kaypro_state::floppy_formats(format_registration &fr) +{ + fr.add_mfm_containers(); + fr.add(FLOPPY_KAYPROII_FORMAT); + fr.add(FLOPPY_KAYPRO2X_FORMAT); +} void kaypro_state::kayproii(machine_config &config) { @@ -265,8 +272,8 @@ m_fdc->intrq_wr_callback().set(FUNC(kaypro_state::fdc_intrq_w)); m_fdc->drq_wr_callback().set(FUNC(kaypro_state::fdc_drq_w)); m_fdc->set_force_ready(true); - FLOPPY_CONNECTOR(config, "fdc:0", kaypro_floppies, "525ssdd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); - FLOPPY_CONNECTOR(config, "fdc:1", kaypro_floppies, "525ssdd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, "fdc:0", kaypro_floppies, "525ssdd", kaypro_state::floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, "fdc:1", kaypro_floppies, "525ssdd", kaypro_state::floppy_formats).enable_sound(true); SOFTWARE_LIST(config, "flop_list").set_original("kaypro").set_filter("A"); } @@ -276,8 +283,8 @@ m_pio_s->out_pa_callback().set(FUNC(kaypro_state::kayproiv_pio_system_w)); config.device_remove("fdc:0"); config.device_remove("fdc:1"); - FLOPPY_CONNECTOR(config, "fdc:0", kaypro_floppies, "525dd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); - FLOPPY_CONNECTOR(config, "fdc:1", kaypro_floppies, "525dd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, "fdc:0", kaypro_floppies, "525dd", kaypro_state::floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, "fdc:1", kaypro_floppies, "525dd", kaypro_state::floppy_formats).enable_sound(true); SOFTWARE_LIST(config.replace(), "flop_list").set_original("kaypro").set_filter("D"); } @@ -365,8 +372,8 @@ m_fdc->intrq_wr_callback().set(FUNC(kaypro_state::fdc_intrq_w)); m_fdc->drq_wr_callback().set(FUNC(kaypro_state::fdc_drq_w)); m_fdc->set_force_ready(true); - FLOPPY_CONNECTOR(config, "fdc:0", kaypro_floppies, "525dd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); - FLOPPY_CONNECTOR(config, "fdc:1", kaypro_floppies, "525dd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, "fdc:0", kaypro_floppies, "525dd", kaypro_state::floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, "fdc:1", kaypro_floppies, "525dd", kaypro_state::floppy_formats).enable_sound(true); SOFTWARE_LIST(config, "flop_list").set_original("kaypro").set_filter("C"); } @@ -402,8 +409,8 @@ kaypro484(config); config.device_remove("fdc:0"); config.device_remove("fdc:1"); - FLOPPY_CONNECTOR(config, "fdc:0", kaypro_floppies, "525ssdd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); - FLOPPY_CONNECTOR(config, "fdc:1", kaypro_floppies, "525ssdd", floppy_image_device::default_mfm_floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, "fdc:0", kaypro_floppies, "525ssdd", kaypro_state::floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, "fdc:1", kaypro_floppies, "525ssdd", kaypro_state::floppy_formats).enable_sound(true); SOFTWARE_LIST(config.replace(), "flop_list").set_original("kaypro").set_filter("B"); } diff -Nru mame-0.230+dfsg.1/src/mame/drivers/ksys573.cpp mame-0.231+dfsg.1/src/mame/drivers/ksys573.cpp --- mame-0.230+dfsg.1/src/mame/drivers/ksys573.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/ksys573.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -4052,6 +4052,24 @@ ROM_LOAD( "gq881ja.22h", 0x000000, 0x002000, CRC(e834d5ec) SHA1(1c845811e43d7dfec657da288b5a38b8bc9c8366) ) DISK_REGION( "cdrom0" ) + DISK_IMAGE_READONLY( "881xxb02", 0, BAD_DUMP SHA1(9252ff1841584c06506f58c9a9cefbc82b32187d) ) +ROM_END + +ROM_START( drmna ) + SYS573_BIOS_A + + ROM_REGION( 0x0000224, "cassette:game:eeprom", 0 ) + ROM_LOAD( "gq881ja.u1", 0x000000, 0x000224, BAD_DUMP CRC(7dca0b3f) SHA1(db6d5c527e2a99133b516e01433024d3173848c6) ) + + ROM_REGION( 0x200000, "29f016a.31h", 0 ) /* onboard flash */ + ROM_LOAD( "gq881ja.31h", 0x000000, 0x200000, CRC(a5b86ece) SHA1(9696f0c512501574bae6e436306675894bb2352e) ) + ROM_REGION( 0x200000, "29f016a.27h", 0 ) /* onboard flash */ + ROM_LOAD( "gq881ja.27h", 0x000000, 0x200000, CRC(fc0b94c1) SHA1(967d374288db757d161d0e9e8e396a1176071c5f) ) + + ROM_REGION( 0x002000, "m48t58", 0 ) + ROM_LOAD( "gq881ja.22h", 0x000000, 0x002000, CRC(e834d5ec) SHA1(1c845811e43d7dfec657da288b5a38b8bc9c8366) ) + + DISK_REGION( "cdrom0" ) DISK_IMAGE_READONLY( "881jad01", 0, BAD_DUMP SHA1(7d9d47bef636dbaa8d578f34ea9489e349d3d6df) ) // upgrade or bootleg? DISK_REGION( "cdrom1" ) @@ -5076,6 +5094,31 @@ ROM_START( hndlchmp ) SYS573_BIOS_A + ROM_DEFAULT_BIOS("gchgchmp") + + ROM_REGION( 0x200000, "29f016a.31m", 0 ) /* onboard flash */ + ROM_LOAD( "710saa.31m", 0x000000, 0x200000, CRC(0eec3edf) SHA1(9624bbf207e81cdbc2754cce81aeb57d4042ddce) ) + ROM_REGION( 0x200000, "29f016a.27m", 0 ) /* onboard flash */ + ROM_LOAD( "710saa.27m", 0x000000, 0x200000, CRC(7571daa8) SHA1(5f07b894a954d1eb13c4da1533a634d8185f4e54) ) + ROM_REGION( 0x200000, "29f016a.31l", 0 ) /* onboard flash */ + ROM_LOAD( "710saa.31l", 0x000000, 0x200000, CRC(1dc20303) SHA1(46cc531977865e718ed2049651baef2eccbc233e) ) + ROM_REGION( 0x200000, "29f016a.27l", 0 ) /* onboard flash */ + ROM_LOAD( "710saa.27l", 0x000000, 0x200000, CRC(5109ca33) SHA1(11c0ec8773240a002083205dceff21dac2fb7a1a) ) + ROM_REGION( 0x200000, "29f016a.31j", 0 ) /* onboard flash */ + ROM_LOAD( "710saa.31j", 0x000000, 0x200000, CRC(bdc05d16) SHA1(ee397950f7e7e910fdc05737f99604e43d288719) ) + ROM_REGION( 0x200000, "29f016a.27j", 0 ) /* onboard flash */ + ROM_LOAD( "710saa.27j", 0x000000, 0x200000, CRC(ad925ed3) SHA1(e3222308961851cccee2de9da804f74854907451) ) + ROM_REGION( 0x200000, "29f016a.31h", 0 ) /* onboard flash */ + ROM_LOAD( "710saa.31h", 0x000000, 0x200000, CRC(dfcef2cd) SHA1(5b5025ae5d64767a17523d7e1559cf03c0609b85) ) + ROM_REGION( 0x200000, "29f016a.27h", 0 ) /* onboard flash */ + ROM_LOAD( "710saa.27h", 0x000000, 0x200000, CRC(eda05636) SHA1(d63ccb52946b1f70874d81ba53e09ca08b0d7f71) ) + + ROM_REGION( 0x002000, "m48t58", 0 ) + ROM_LOAD( "710saa.22h", 0x000000, 0x002000, CRC(6a8b13b6) SHA1(10218242ea14cd355c139d47598a195d71db6352) ) +ROM_END + +ROM_START( hndlchmpj ) + SYS573_BIOS_A ROM_REGION( 0x200000, "29f016a.31m", 0 ) /* onboard flash */ ROM_LOAD( "710jab.31m", 0x000000, 0x200000, CRC(f5f71b1d) SHA1(7d518e5333f44e6ec921a1e882df970953814b6e) ) @@ -5299,6 +5342,78 @@ DISK_IMAGE_READONLY( "802jab02", 0, SHA1(460cc9f0b2514ec1da06b0a1d7b52fe43220d181) ) ROM_END +ROM_START( pcnfrk ) + SYS573_BIOS_A + + ROM_REGION( 0x0000224, "cassette:game:eeprom", 0 ) + ROM_LOAD( "gq881ea.u1", 0x000000, 0x000224, BAD_DUMP CRC(6a88b34d) SHA1(2cc454ae099e948d5c5728c821484ddab195ad94) ) + + ROM_REGION( 0x200000, "29f016a.31h", 0 ) /* onboard flash */ + ROM_LOAD( "gq881ea.31h", 0x000000, 0x200000, CRC(a5b86ece) SHA1(9696f0c512501574bae6e436306675894bb2352e) ) + ROM_REGION( 0x200000, "29f016a.27h", 0 ) /* onboard flash */ + ROM_LOAD( "gq881ea.27h", 0x000000, 0x200000, CRC(fc0b94c1) SHA1(967d374288db757d161d0e9e8e396a1176071c5f) ) + + ROM_REGION( 0x002000, "m48t58", 0 ) + ROM_LOAD( "gq881ea.22h", 0x000000, 0x002000, CRC(e834d5ec) SHA1(1c845811e43d7dfec657da288b5a38b8bc9c8366) ) + + DISK_REGION( "cdrom0" ) + DISK_IMAGE_READONLY("881xxb02", 0, BAD_DUMP SHA1(9252ff1841584c06506f58c9a9cefbc82b32187d)) +ROM_END + +ROM_START( pcnfrka ) + SYS573_BIOS_A + + ROM_REGION( 0x0000224, "cassette:game:eeprom", 0 ) + ROM_LOAD( "gq881aa.u1", 0x000000, 0x000224, BAD_DUMP CRC(8390c1eb) SHA1(9ad0385c319aae318bc6efdd705a459957c669da) ) + + ROM_REGION( 0x200000, "29f016a.31h", 0 ) /* onboard flash */ + ROM_LOAD( "gq881aa.31h", 0x000000, 0x200000, CRC(a5b86ece) SHA1(9696f0c512501574bae6e436306675894bb2352e) ) + ROM_REGION( 0x200000, "29f016a.27h", 0 ) /* onboard flash */ + ROM_LOAD( "gq881aa.27h", 0x000000, 0x200000, CRC(fc0b94c1) SHA1(967d374288db757d161d0e9e8e396a1176071c5f) ) + + ROM_REGION( 0x002000, "m48t58", 0 ) + ROM_LOAD( "gq881aa.22h", 0x000000, 0x002000, CRC(e834d5ec) SHA1(1c845811e43d7dfec657da288b5a38b8bc9c8366) ) + + DISK_REGION( "cdrom0" ) + DISK_IMAGE_READONLY("881xxb02", 0, BAD_DUMP SHA1(9252ff1841584c06506f58c9a9cefbc82b32187d)) +ROM_END + +ROM_START( pcnfrkk ) + SYS573_BIOS_A + + ROM_REGION( 0x0000224, "cassette:game:eeprom", 0 ) + ROM_LOAD( "gq881ka.u1", 0x000000, 0x000224, BAD_DUMP CRC(568e05b3) SHA1(37fdf0ca45b9303bdd4e38990f9e91ff7de2a82c) ) + + ROM_REGION( 0x200000, "29f016a.31h", 0 ) /* onboard flash */ + ROM_LOAD( "gq881ka.31h", 0x000000, 0x200000, CRC(a5b86ece) SHA1(9696f0c512501574bae6e436306675894bb2352e) ) + ROM_REGION( 0x200000, "29f016a.27h", 0 ) /* onboard flash */ + ROM_LOAD( "gq881ka.27h", 0x000000, 0x200000, CRC(fc0b94c1) SHA1(967d374288db757d161d0e9e8e396a1176071c5f) ) + + ROM_REGION( 0x002000, "m48t58", 0 ) + ROM_LOAD( "gq881ka.22h", 0x000000, 0x002000, CRC(e834d5ec) SHA1(1c845811e43d7dfec657da288b5a38b8bc9c8366) ) + + DISK_REGION( "cdrom0" ) + DISK_IMAGE_READONLY("881xxb02", 0, BAD_DUMP SHA1(9252ff1841584c06506f58c9a9cefbc82b32187d)) +ROM_END + +ROM_START( pcnfrku ) + SYS573_BIOS_A + + ROM_REGION( 0x0000224, "cassette:game:eeprom", 0 ) + ROM_LOAD( "gq881ua.u1", 0x000000, 0x000224, BAD_DUMP CRC(780b7557) SHA1(37f10437cf42310caf9ed8ea03e3ea342d59e59f) ) + + ROM_REGION( 0x200000, "29f016a.31h", 0 ) /* onboard flash */ + ROM_LOAD( "gq881ua.31h", 0x000000, 0x200000, CRC(a5b86ece) SHA1(9696f0c512501574bae6e436306675894bb2352e) ) + ROM_REGION( 0x200000, "29f016a.27h", 0 ) /* onboard flash */ + ROM_LOAD( "gq881ua.27h", 0x000000, 0x200000, CRC(fc0b94c1) SHA1(967d374288db757d161d0e9e8e396a1176071c5f) ) + + ROM_REGION( 0x002000, "m48t58", 0 ) + ROM_LOAD( "gq881ua.22h", 0x000000, 0x002000, CRC(e834d5ec) SHA1(1c845811e43d7dfec657da288b5a38b8bc9c8366) ) + + DISK_REGION( "cdrom0" ) + DISK_IMAGE_READONLY("881xxb02", 0, BAD_DUMP SHA1(9252ff1841584c06506f58c9a9cefbc82b32187d)) +ROM_END + ROM_START( pcnfrk2m ) SYS573_BIOS_A @@ -5505,8 +5620,9 @@ GAME( 1997, sys573, 0, konami573, konami573, ksys573_state, empty_init, ROT0, "Konami", "System 573 BIOS", MACHINE_IS_BIOS_ROOT ) -GAME( 1997, strgchmp, sys573, konami573, hndlchmp, ksys573_state, empty_init, ROT0, "Konami", "Steering Champ (GQ710 VER. UAA)", MACHINE_IMPERFECT_SOUND ) -GAME( 1997, hndlchmp, strgchmp, konami573, hndlchmp, ksys573_state, empty_init, ROT0, "Konami", "Handle Champ (GQ710 VER. JAB)", MACHINE_IMPERFECT_SOUND ) +GAME( 1997, strgchmp, sys573, konami573, hndlchmp, ksys573_state, empty_init, ROT0, "Konami", "Steering Champ (GQ710 97/12/18 VER. UAA)", MACHINE_IMPERFECT_SOUND ) +GAME( 1997, hndlchmp, strgchmp, konami573, hndlchmp, ksys573_state, empty_init, ROT0, "Konami", "Handle Champ (GQ710 97/12/18 VER. SAA)", MACHINE_IMPERFECT_SOUND ) +GAME( 1997, hndlchmpj, strgchmp, konami573, hndlchmp, ksys573_state, empty_init, ROT0, "Konami", "Handle Champ (GQ710 1997/12/08 VER. JAB)", MACHINE_IMPERFECT_SOUND ) GAME( 1998, darkhleg, sys573, konami573x, konami573, ksys573_state, empty_init, ROT0, "Konami", "Dark Horse Legend (GX706 VER. JAA)", MACHINE_IMPERFECT_SOUND ) GAME( 1998, fbaitbc, sys573, fbaitbc, fbaitbc, ksys573_state, empty_init, ROT0, "Konami", "Fisherman's Bait - A Bass Challenge (GE765 VER. UAB)", MACHINE_IMPERFECT_SOUND ) GAME( 1998, bassangl, fbaitbc, fbaitbc, fbaitbc, ksys573_state, empty_init, ROT0, "Konami", "Bass Angler (GE765 VER. JAA)", MACHINE_IMPERFECT_SOUND ) @@ -5530,7 +5646,6 @@ GAME( 1998, hyperbbca, hyperbbc, hyperbbc, hyperbbc, ksys573_state, init_hyperbbc, ROT0, "Konami", "Hyper Bishi Bashi Champ (GQ876 VER. AAA)", MACHINE_IMPERFECT_SOUND ) GAME( 1998, hyperbbck, hyperbbc, hyperbbc, hyperbbc, ksys573_state, init_hyperbbc, ROT0, "Konami", "Hyper Bishi Bashi Champ (GE876 VER. KAA)", MACHINE_IMPERFECT_SOUND ) GAME( 1999, gchgchmp, sys573, gchgchmp, gchgchmp, ksys573_state, empty_init, ROT0, "Konami", "Gachaga Champ (GE877 VER. JAB)", MACHINE_IMPERFECT_SOUND ) -GAME( 1999, drmn, sys573, drmn, drmn, ksys573_state, init_drmn, ROT0, "Konami", "DrumMania (GQ881 VER. JAD)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) GAME( 1999, gtrfrks, sys573, gtrfrks, gtrfrks, ksys573_state, empty_init, ROT0, "Konami", "Guitar Freaks (GQ886 VER. EAC)", MACHINE_IMPERFECT_SOUND ) GAME( 1999, gtrfrksu, gtrfrks, gtrfrks, gtrfrks, ksys573_state, empty_init, ROT0, "Konami", "Guitar Freaks (GQ886 VER. UAC)", MACHINE_IMPERFECT_SOUND ) GAME( 1999, gtrfrksj, gtrfrks, gtrfrks, gtrfrks, ksys573_state, empty_init, ROT0, "Konami", "Guitar Freaks (GQ886 VER. JAC)", MACHINE_IMPERFECT_SOUND ) @@ -5545,6 +5660,12 @@ GAME( 1999, ddrbocd, ddr2m, ddrbocd, ddr, ksys573_state, init_ddr, ROT0, "Konami", "Dance Dance Revolution Best of Cool Dancers (GE892 VER. JAA)", MACHINE_IMPERFECT_SOUND ) GAME( 1999, ddr2mc, ddr2m, ddr, ddr, ksys573_state, init_ddr, ROT0, "Konami", "Dance Dance Revolution 2nd Mix with beatmaniaIIDX CLUB VERSiON (GE896 VER. JAA)", MACHINE_IMPERFECT_SOUND ) GAME( 1999, ddr2mc2, ddr2m, ddr2mc2, ddr, ksys573_state, init_ddr, ROT0, "Konami", "Dance Dance Revolution 2nd Mix with beatmaniaIIDX substream CLUB VERSiON 2 (GE984 VER. JAA)", MACHINE_IMPERFECT_SOUND ) +GAME( 1999, pcnfrk, sys573, drmn, drmn, ksys573_state, init_drmn, ROT0, "Konami", "Percussion Freaks (GQ881 VER. EAB)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) +GAME( 1999, pcnfrka, pcnfrk, drmn, drmn, ksys573_state, init_drmn, ROT0, "Konami", "Percussion Freaks (GQ881 VER. AAB)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) +GAME( 1999, pcnfrkk, pcnfrk, drmn, drmn, ksys573_state, init_drmn, ROT0, "Konami", "Percussion Freaks (GQ881 VER. KAB)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) +GAME( 1999, pcnfrku, pcnfrk, drmn, drmn, ksys573_state, init_drmn, ROT0, "Konami", "Percussion Freaks (GQ881 VER. UAB)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) +GAME( 1999, drmn, pcnfrk, drmn, drmn, ksys573_state, init_drmn, ROT0, "Konami", "DrumMania (GQ881 VER. JAD)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) +GAME( 1999, drmna, pcnfrk, drmn, drmn, ksys573_state, init_drmn, ROT0, "Konami", "DrumMania (GQ881 VER. JAD ALT CD)", MACHINE_IMPERFECT_SOUND | MACHINE_NOT_WORKING ) GAME( 1999, gtrfrk2m, sys573, gtrfrk2m, gtrfrks, ksys573_state, empty_init, ROT0, "Konami", "Guitar Freaks 2nd Mix Ver 1.01 (GQ883 VER. JAD)", MACHINE_IMPERFECT_SOUND ) GAME( 1999, dsftkd, sys573, dsftkd, ddr, ksys573_state, init_ddr, ROT0, "Konami", "Dancing Stage featuring TRUE KiSS DESTiNATiON (G*884 VER. JAA)", MACHINE_IMPERFECT_SOUND ) GAME( 1999, cr589fw, sys573, konami573, konami573, ksys573_state, empty_init, ROT0, "Konami", "CD-ROM Drive Updater 2.0 (700B04)", MACHINE_IMPERFECT_SOUND ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/laserbat.cpp mame-0.231+dfsg.1/src/mame/drivers/laserbat.cpp --- mame-0.230+dfsg.1/src/mame/drivers/laserbat.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/laserbat.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -65,6 +65,11 @@ * The sprite ROM is twice the size as Laser Battle with the bank selected using bit 9 of the 16-bit sound interface (there's a wire making this connection visible on the component side of the PCB) + * At least some boards have IC13I pins 8, 9, 10 and 11 bent out of + the socket, tied together, and pulled high via a 4k7 resistor, + which quantises the shell/area effect 2 to four-pixel boundaries + (implemented as m_eff2_mask) - would be good to see whether this + mod is present on all boards * If demo sounds are enabled (using DIP switches), background music is played every sixth time through the attract loop * Sound board emulation is based on tracing the program and guessing @@ -412,9 +417,14 @@ m_maincpu->set_input_line(0, ASSERT_LINE); } -void laserbat_state_base::init_laserbat() +void laserbat_state_base::machine_start() { + // start rendering scanlines + m_screen->register_screen_bitmap(m_bitmap); m_scanline_timer = timer_alloc(TIMER_SCANLINE); + m_scanline_timer->adjust(m_screen->time_until_pos(1, 0)); + + save_item(NAME(m_gfx2_base)); save_item(NAME(m_input_mux)); save_item(NAME(m_mpx_p_1_2)); @@ -436,10 +446,10 @@ save_item(NAME(m_neg1)); save_item(NAME(m_neg2)); - save_item(NAME(m_csound1)); - save_item(NAME(m_csound2)); save_item(NAME(m_rhsc)); save_item(NAME(m_whsc)); + save_item(NAME(m_csound1)); + save_item(NAME(m_csound2)); } void laserbat_state::machine_start() @@ -732,7 +742,7 @@ ROM_END -GAME( 1981, laserbat, 0, laserbat, laserbat, laserbat_state, init_laserbat, ROT0, "Zaccaria", "Laser Battle", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) -GAME( 1981, lazarian, laserbat, laserbat, lazarian, laserbat_state, init_laserbat, ROT0, "Zaccaria (Bally Midway license)", "Lazarian", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) -GAME( 1982, catnmous, 0, catnmous, catnmous, catnmous_state, init_laserbat, ROT90, "Zaccaria", "Cat and Mouse (type 02 program)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) -GAME( 1982, catnmousa, catnmous, catnmous, catnmous, catnmous_state, init_laserbat, ROT90, "Zaccaria", "Cat and Mouse (type 01 program)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1981, laserbat, 0, laserbat, laserbat, laserbat_state, empty_init, ROT0, "Zaccaria", "Laser Battle", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1981, lazarian, laserbat, laserbat, lazarian, laserbat_state, empty_init, ROT0, "Zaccaria (Bally Midway license)", "Lazarian", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1982, catnmous, 0, catnmous, catnmous, catnmous_state, empty_init, ROT90, "Zaccaria", "Cat and Mouse (type 02 program)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1982, catnmousa, catnmous, catnmous, catnmous, catnmous_state, empty_init, ROT90, "Zaccaria", "Cat and Mouse (type 01 program)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/legionna.cpp mame-0.231+dfsg.1/src/mame/drivers/legionna.cpp --- mame-0.230+dfsg.1/src/mame/drivers/legionna.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/legionna.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -87,8 +87,8 @@ #include "cpu/m68000/m68000.h" #include "cpu/z80/z80.h" -#include "sound/3812intf.h" #include "sound/ym2151.h" +#include "sound/ym3812.h" #include "screen.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/lnw80.cpp mame-0.231+dfsg.1/src/mame/drivers/lnw80.cpp --- mame-0.230+dfsg.1/src/mame/drivers/lnw80.cpp 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/lnw80.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,676 @@ +// license:BSD-3-Clause +// copyright-holders:Robbbert +/*************************************************************************** +Memory map + +0000-37ff ROM R D0-D7 +37de UART status R/W D0-D7 +37df UART data R/W D0-D7 +37e0 for the realtime clock +37e1 select disk drive 0 W +37e2 cassette drive latch address W +37e3 select disk drive 1 W +37e4 select which cassette unit W D0-D1 (D0 selects unit 1, D1 selects unit 2) +37e5 select disk drive 2 W +37e7 select disk drive 3 W +37e0-37e3 floppy motor W D0-D3 + or floppy head select W D3 +37e8 send a byte to printer W D0-D7 +37e8 read printer status R D7 +37ec-37ef FDC WD179x R/W D0-D7 +37ec command W D0-D7 +37ec status R D0-D7 +37ed track R/W D0-D7 +37ee sector R/W D0-D7 +37ef data R/W D0-D7 +3800-38ff keyboard matrix R D0-D7 +3900-3bff unused - kbd mirrored +3c00-3fff video RAM R/W D0-D5,D7 (or D0-D7) +4000-ffff RAM + +Interrupts: +- IRQ mode 1 +- NMI + +Has non-addressable links to set the baud rate. Receive and Transmit clocks are tied together. + +Cassette baud rates: +- 500 baud @1.77MHz and 1000 baud @4MHz. + +I/O ports +FF: +- bits 0 and 1 are for writing a cassette +- bit 2 must be high to turn the cassette motor on +- bit 3 switches the display between 64 or 32 characters per line +- bit 6 remembers the 32/64 screen mode (inverted) +- bit 7 is for reading from a cassette + +FE: +- bit 0 is for selecting inverse video of the whole screen +- bit 1 chooses text or graphics screen +- bit 2 enables colour +- bit 3 is for selecting roms (low) or 16k hires area (high) + +Shift and Right-arrow will enable 32 cpl. + +SYSTEM commands: + - Press Break (End key) to quit + - Press Enter to exit with error + - xxxx to load program xxxx from tape. + - / to execute last program loaded + - /nnnnn to execute program at nnnnn (decimal) + +About the RTC - The hardware side exists, but special software is needed to get the clock to work. + By default, nothing happens. + +******************************************************************************************************** + +To Do / Status: +-------------- + +- basically works +- hi-res and colour are coded and pass the test suite, but need some real programs to check with. +- investigate expansion-box +- none of my collection of lnw80-specific floppies will work; some crash MAME + +*******************************************************************************************************/ +#include "emu.h" +#include "includes/trs80.h" +#include "machine/bankdev.h" +#include "formats/td0_dsk.h" + +class lnw80_state : public trs80_state +{ +public: + lnw80_state(const machine_config &mconfig, device_type type, const char *tag) + : trs80_state(mconfig, type, tag) + , m_p_gfxram(*this, "gfxram") + , m_lnw_bank(*this, "lnw_banked_mem") + { } + + void lnw80(machine_config &config); + +protected: + virtual void machine_start() override; + virtual void machine_reset() override; + +private: + static void floppy_formats(format_registration &fr); + void lnw80_fe_w(u8 data); + u8 lnw80_fe_r(); + void lnw80_palette(palette_device &palette) const; + u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + + void lnw80_io(address_map &map); + void lnw80_mem(address_map &map); + void lnw_banked_mem(address_map &map); + + u8 m_lnw_mode = 0; + required_shared_ptr m_p_gfxram; + required_device m_lnw_bank; +}; + + +void lnw80_state::lnw80_mem(address_map &map) +{ + map(0x0000, 0x3fff).m(m_lnw_bank, FUNC(address_map_bank_device::amap8)); + map(0x4000, 0xffff).ram(); +} + +void lnw80_state::lnw_banked_mem(address_map &map) +{ + map(0x0000, 0x2fff).rom().region("maincpu", 0); + map(0x37de, 0x37de).rw(FUNC(lnw80_state::sys80_f9_r), FUNC(lnw80_state::sys80_f8_w)); + map(0x37e0, 0x37e3).rw(FUNC(lnw80_state::irq_status_r), FUNC(lnw80_state::motor_w)); + map(0x37e4, 0x37e7).w(FUNC(lnw80_state::cassunit_w)); + map(0x37e8, 0x37eb).rw(FUNC(lnw80_state::printer_r), FUNC(lnw80_state::printer_w)); + map(0x37ec, 0x37ef).rw(FUNC(lnw80_state::fdc_r), FUNC(lnw80_state::fdc_w)); + map(0x3800, 0x3bff).r(FUNC(lnw80_state::keyboard_r)); + map(0x3c00, 0x3fff).ram().share(m_p_videoram); + map(0x4000, 0x7fff).ram().share(m_p_gfxram); +} + +void lnw80_state::lnw80_io(address_map &map) +{ + map.global_mask(0xff); + map.unmap_value_high(); + map(0xe8, 0xe8).rw(FUNC(lnw80_state::port_e8_r), FUNC(lnw80_state::port_e8_w)); + map(0xe9, 0xe9).portr("E9"); + map(0xea, 0xea).rw(FUNC(lnw80_state::port_ea_r), FUNC(lnw80_state::port_ea_w)); + map(0xeb, 0xeb).rw(m_uart, FUNC(ay31015_device::receive), FUNC(ay31015_device::transmit)); + map(0xfe, 0xfe).rw(FUNC(lnw80_state::lnw80_fe_r), FUNC(lnw80_state::lnw80_fe_w)); + map(0xff, 0xff).rw(FUNC(lnw80_state::port_ff_r), FUNC(lnw80_state::port_ff_w)); +} + +/************************************************************************** + w/o SHIFT with SHIFT + +-------------------------------+ +-------------------------------+ + | 0 1 2 3 4 5 6 7 | | 0 1 2 3 4 5 6 7 | ++--+---+---+---+---+---+---+---+---+ +--+---+---+---+---+---+---+---+---+ +|0 | @ | A | B | C | D | E | F | G | |0 | ` | a | b | c | d | e | f | g | +| +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ +|1 | H | I | J | K | L | M | N | O | |1 | h | i | j | k | l | m | n | o | +| +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ +|2 | P | Q | R | S | T | U | V | W | |2 | p | q | r | s | t | u | v | w | +| +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ +|3 | X | Y | Z | [ | \ | ] | ^ | _ | |3 | x | y | z | { | | | } | ~ | | +| +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ +|4 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | |4 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | +| +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ +|5 | 8 | 9 | : | ; | , | - | . | / | |5 | 8 | 9 | * | + | < | = | > | ? | +| +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ +|6 |ENT|CLR|BRK|UP |DN |LFT|RGT|SPC| |6 |ENT|CLR|BRK|UP |DN |LFT|RGT|SPC| +| +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ +|7 |SHF| | | | | | | | |7 |SHF| | | | | | | | ++--+---+---+---+---+---+---+---+---+ +--+---+---+---+---+---+---+---+---+ + +***************************************************************************/ + +static INPUT_PORTS_START( lnw80 ) + PORT_START("LINE0") + PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_NAME("@") PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('@') + PORT_BIT(0x02, 0x00, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) PORT_CHAR('A') PORT_CHAR('a') + PORT_BIT(0x04, 0x00, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) PORT_CHAR('B') PORT_CHAR('b') + PORT_BIT(0x08, 0x00, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) PORT_CHAR('C') PORT_CHAR('c') + PORT_BIT(0x10, 0x00, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) PORT_CHAR('D') PORT_CHAR('d') + PORT_BIT(0x20, 0x00, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) PORT_CHAR('E') PORT_CHAR('e') + PORT_BIT(0x40, 0x00, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) PORT_CHAR('F') PORT_CHAR('f') + PORT_BIT(0x80, 0x00, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G) PORT_CHAR('G') PORT_CHAR('g') + + PORT_START("LINE1") + PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H) PORT_CHAR('H') PORT_CHAR('h') + PORT_BIT(0x02, 0x00, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I) PORT_CHAR('I') PORT_CHAR('i') + PORT_BIT(0x04, 0x00, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J) PORT_CHAR('J') PORT_CHAR('j') + PORT_BIT(0x08, 0x00, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K) PORT_CHAR('K') PORT_CHAR('k') + PORT_BIT(0x10, 0x00, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L) PORT_CHAR('L') PORT_CHAR('l') + PORT_BIT(0x20, 0x00, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) PORT_CHAR('M') PORT_CHAR('m') + PORT_BIT(0x40, 0x00, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N) PORT_CHAR('N') PORT_CHAR('n') + PORT_BIT(0x80, 0x00, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O) PORT_CHAR('O') PORT_CHAR('o') + + PORT_START("LINE2") + PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P) PORT_CHAR('P') PORT_CHAR('p') + PORT_BIT(0x02, 0x00, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) PORT_CHAR('Q') PORT_CHAR('q') + PORT_BIT(0x04, 0x00, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R) PORT_CHAR('R') PORT_CHAR('r') + PORT_BIT(0x08, 0x00, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S) PORT_CHAR('S') PORT_CHAR('s') + PORT_BIT(0x10, 0x00, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T) PORT_CHAR('T') PORT_CHAR('t') + PORT_BIT(0x20, 0x00, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U) PORT_CHAR('U') PORT_CHAR('u') + PORT_BIT(0x40, 0x00, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V) PORT_CHAR('V') PORT_CHAR('v') + PORT_BIT(0x80, 0x00, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W) PORT_CHAR('W') PORT_CHAR('w') + + PORT_START("LINE3") + PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X) PORT_CHAR('X') PORT_CHAR('x') + PORT_BIT(0x02, 0x00, IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y) PORT_CHAR('Y') PORT_CHAR('y') + PORT_BIT(0x04, 0x00, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) PORT_CHAR('Z') PORT_CHAR('z') + PORT_BIT(0x10, 0x00, IPT_KEYBOARD) PORT_NAME("F1") PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1)) + PORT_BIT(0x40, 0x00, IPT_KEYBOARD) PORT_NAME("F2") PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2)) + PORT_BIT(0x80, 0x00, IPT_KEYBOARD) PORT_NAME("_") PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('_') + PORT_BIT(0x28, 0x00, IPT_UNUSED) + + PORT_START("LINE4") + PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) PORT_CHAR('0') + PORT_BIT(0x02, 0x00, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') + PORT_BIT(0x04, 0x00, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('"') + PORT_BIT(0x08, 0x00, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') + PORT_BIT(0x10, 0x00, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') + PORT_BIT(0x20, 0x00, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') + PORT_BIT(0x40, 0x00, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&') + PORT_BIT(0x80, 0x00, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('\'') + + PORT_START("LINE5") + PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('(') + PORT_BIT(0x02, 0x00, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')') + PORT_BIT(0x04, 0x00, IPT_KEYBOARD) PORT_NAME(": *") PORT_CODE(KEYCODE_MINUS) PORT_CHAR(':') PORT_CHAR('*') + PORT_BIT(0x08, 0x00, IPT_KEYBOARD) PORT_NAME("; +") PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR('+') + PORT_BIT(0x10, 0x00, IPT_KEYBOARD) PORT_NAME(", <") PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') + PORT_BIT(0x20, 0x00, IPT_KEYBOARD) PORT_NAME("- =") PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('-') PORT_CHAR('=') + PORT_BIT(0x40, 0x00, IPT_KEYBOARD) PORT_NAME(". >") PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') + PORT_BIT(0x80, 0x00, IPT_KEYBOARD) PORT_NAME("/ ?") PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') + + PORT_START("LINE6") + PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_NAME("Enter") PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_CHAR(13) + PORT_BIT(0x02, 0x00, IPT_KEYBOARD) PORT_NAME("Clear") PORT_CODE(KEYCODE_HOME) PORT_CHAR(UCHAR_MAMEKEY(F8)) + PORT_BIT(0x04, 0x00, IPT_KEYBOARD) PORT_NAME("Break") PORT_CODE(KEYCODE_END) PORT_CHAR(UCHAR_MAMEKEY(F9)) + PORT_BIT(0x08, 0x00, IPT_KEYBOARD) PORT_NAME(UTF8_UP) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) + PORT_BIT(0x10, 0x00, IPT_KEYBOARD) PORT_NAME("Down") PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) + /* backspace do the same as cursor left */ + PORT_BIT(0x20, 0x00, IPT_KEYBOARD) PORT_NAME("Left") PORT_CODE(KEYCODE_LEFT) PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) + PORT_BIT(0x40, 0x00, IPT_KEYBOARD) PORT_NAME("Right") PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) + PORT_BIT(0x80, 0x00, IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') + + PORT_START("LINE7") + PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) + PORT_BIT(0x10, 0x00, IPT_KEYBOARD) PORT_NAME("Control") PORT_CODE(KEYCODE_LCONTROL) + PORT_BIT(0xee, 0x00, IPT_UNUSED) + + PORT_START("CONFIG") + PORT_CONFNAME( 0x80, 0x00, "Floppy Disc Drives") + PORT_CONFSETTING( 0x00, DEF_STR( Off ) ) + PORT_CONFSETTING( 0x80, DEF_STR( On ) ) + PORT_CONFNAME( 0x40, 0x00, "CPU Speed") + PORT_CONFSETTING( 0x00, "1.77 MHz" ) + PORT_CONFSETTING( 0x40, "4 MHz" ) + + PORT_START("E9") // these are the power-on uart settings + PORT_BIT(0x07, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_DIPNAME( 0x88, 0x08, "Parity") + PORT_DIPSETTING( 0x08, DEF_STR(None)) + PORT_DIPSETTING( 0x00, "Odd") + PORT_DIPSETTING( 0x80, "Even") + PORT_DIPNAME( 0x10, 0x10, "Stop Bits") + PORT_DIPSETTING( 0x10, "2") + PORT_DIPSETTING( 0x00, "1") + PORT_DIPNAME( 0x60, 0x60, "Bits") + PORT_DIPSETTING( 0x00, "5") + PORT_DIPSETTING( 0x20, "6") + PORT_DIPSETTING( 0x40, "7") + PORT_DIPSETTING( 0x60, "8") + + PORT_START("BAUD") + PORT_DIPNAME( 0xff, 0x06, "Baud Rate") + PORT_DIPSETTING( 0x00, "110") + PORT_DIPSETTING( 0x01, "300") + PORT_DIPSETTING( 0x02, "600") + PORT_DIPSETTING( 0x03, "1200") + PORT_DIPSETTING( 0x04, "2400") + PORT_DIPSETTING( 0x05, "4800") + PORT_DIPSETTING( 0x06, "9600") + PORT_DIPSETTING( 0x07, "19200") +INPUT_PORTS_END + + +/************************************* + * + * Port handlers. + * + *************************************/ + + +u8 lnw80_state::lnw80_fe_r() +{ + return m_lnw_mode; +} + + +/* lnw80 can switch out all the devices, roms and video ram to be replaced by graphics ram. */ +void lnw80_state::lnw80_fe_w(u8 data) +{ +/* lnw80 video options + d3 bankswitch lower 16k between roms and hires ram (1=hires) + d2 enable colour \ + d1 hres / these 2 are the bits from the MODE command of LNWBASIC + d0 inverse video (entire screen) */ + + m_lnw_mode = data; + + m_lnw_bank->set_bank(BIT(data, 3)); +} + + +/************************************* + * Machine * + *************************************/ + +void lnw80_state::machine_start() +{ + save_item(NAME(m_mode)); + save_item(NAME(m_irq)); + save_item(NAME(m_mask)); + save_item(NAME(m_reg_load)); + save_item(NAME(m_lnw_mode)); + save_item(NAME(m_cassette_data)); + save_item(NAME(m_old_cassette_val)); + save_item(NAME(m_size_store)); + save_item(NAME(m_timeout)); + + m_size_store = 0xff; + m_reg_load=1; + + m_cassette_data_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(lnw80_state::cassette_data_callback),this)); + m_cassette_data_timer->adjust( attotime::zero, 0, attotime::from_hz(11025) ); +} + +void lnw80_state::machine_reset() +{ + m_mode = 0; + m_cassette_data = false; + const u16 s_bauds[8]={ 110, 300, 600, 1200, 2400, 4800, 9600, 19200 }; + u16 s_clock = s_bauds[m_io_baud->read()] << 4; + m_uart_clock->set_unscaled_clock(s_clock); + + m_maincpu->set_unscaled_clock(BIT(m_io_config->read(), 6) ? (16_MHz_XTAL / 4) : (16_MHz_XTAL / 9)); // HI-LO switch + m_reg_load = 1; + lnw80_fe_w(0); +} + +/* 8-bit video, 64/80 characters per line = lnw80 */ +u32 lnw80_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +{ + static const u16 rows[] = { 0, 0x200, 0x100, 0x300, 1, 0x201, 0x101, 0x301 }; + u16 sy=0,ma=0; + bool inv = BIT(m_lnw_mode, 0); + u8 mode = BIT(m_lnw_mode, 1, 2); + u8 cols = BIT(mode, 0) ? 80 : 64; + u8 skip = 1; + if (mode == 0) + { + skip = BIT(m_mode, 0) ? 2 : 1; + if (skip == 2) + cols >>= 1; + } + + if (cols != m_size_store) + { + m_size_store = cols; + screen.set_visible_area(0, cols*6-1, 0, 16*12-1); + } + + u8 bg=7,fg=0; + if (inv) + { + bg = 0; + fg = 7; + } + + switch (mode) + { + case 0: // MODE 0 + for (u16 y = 0; y < 16; y++) + { + for (u16 ra = 0; ra < 12; ra++) + { + u16 *p = &bitmap.pix(sy++); + + for (u16 x = ma; x < ma + 64; x+=skip) + { + u8 chr = m_p_videoram[x]; + + if (chr & 0x80) + { + u8 gfxbit = (ra & 0x0c)>>1; + /* Display one line of a lores character (6 pixels) */ + *p++ = BIT(chr, gfxbit) ? fg : bg; + *p++ = BIT(chr, gfxbit) ? fg : bg; + *p++ = BIT(chr, gfxbit) ? fg : bg; + gfxbit++; + *p++ = BIT(chr, gfxbit) ? fg : bg; + *p++ = BIT(chr, gfxbit) ? fg : bg; + *p++ = BIT(chr, gfxbit) ? fg : bg; + } + else + { + /* get pattern of pixels for that character scanline */ + u8 gfx; + if (ra < 8) + gfx = m_p_chargen[(chr<<1) | rows[ra] ]; + else + gfx = 0; + + /* Display a scanline of a character (6 pixels) */ + *p++ = BIT(gfx, 2) ? fg : bg; + *p++ = BIT(gfx, 1) ? fg : bg; + *p++ = BIT(gfx, 6) ? fg : bg; + *p++ = BIT(gfx, 7) ? fg : bg; + *p++ = BIT(gfx, 5) ? fg : bg; + *p++ = BIT(gfx, 3) ? fg : bg; + } + } + } + ma+=64; + } + break; + + case 1: // MODE 1 + for (u16 y = 0; y < 0x400; y+=0x40) + { + for (u16 ra = 0; ra < 0x3000; ra+=0x400) + { + u16 *p = &bitmap.pix(sy++); + + for (u16 x = 0; x < 0x40; x++) + { + u8 gfx = m_p_gfxram[ y | x | ra]; + /* Display 6 pixels in normal region */ + *p++ = BIT(gfx, 0) ? fg : bg; + *p++ = BIT(gfx, 1) ? fg : bg; + *p++ = BIT(gfx, 2) ? fg : bg; + *p++ = BIT(gfx, 3) ? fg : bg; + *p++ = BIT(gfx, 4) ? fg : bg; + *p++ = BIT(gfx, 5) ? fg : bg; + } + + for (u16 x = 0; x < 0x10; x++) + { + u8 gfx = m_p_gfxram[ 0x3000 | x | (ra & 0xc00) | ((ra & 0x3000) >> 8)]; + /* Display 6 pixels in extended region */ + *p++ = BIT(gfx, 0) ? fg : bg; + *p++ = BIT(gfx, 1) ? fg : bg; + *p++ = BIT(gfx, 2) ? fg : bg; + *p++ = BIT(gfx, 3) ? fg : bg; + *p++ = BIT(gfx, 4) ? fg : bg; + *p++ = BIT(gfx, 5) ? fg : bg; + } + } + } + break; + + case 2: // MODE 2 + /* it seems the text video ram can have an effect in this mode, + not explained clearly, so not emulated */ + for (u16 y = 0; y < 0x400; y+=0x40) + { + for (u16 ra = 0; ra < 0x3000; ra+=0x400) + { + u16 *p = &bitmap.pix(sy++); + + for (u16 x = 0; x < 0x40; x++) + { + u8 gfx = m_p_gfxram[ y | x | ra]; + /* Display 6 pixels in normal region */ + fg = BIT(gfx, 3, 3); + *p++ = fg; + *p++ = fg; + *p++ = fg; + fg = BIT(gfx, 0, 3); + *p++ = fg; + *p++ = fg; + *p++ = fg; + } + } + } + break; + + case 3: // MODE 3 + /* the manual does not explain at all how colour is determined + for the extended area. Further, the background colour + is not mentioned anywhere. Black is assumed. */ + for (u16 y = 0; y < 0x400; y+=0x40) + { + for (u16 ra = 0; ra < 0x3000; ra+=0x400) + { + u16 *p = &bitmap.pix(sy++); + + for (u16 x = 0; x < 0x40; x++) + { + u8 gfx = m_p_gfxram[ y | x | ra]; + fg = BIT(m_p_videoram[ x | y ], 3, 3); + /* Display 6 pixels in normal region */ + *p++ = BIT(gfx, 0) ? fg : bg; + *p++ = BIT(gfx, 1) ? fg : bg; + *p++ = BIT(gfx, 2) ? fg : bg; + fg = BIT(m_p_videoram[ 0x3c00 | x | y ], 0, 3); + *p++ = BIT(gfx, 3) ? fg : bg; + *p++ = BIT(gfx, 4) ? fg : bg; + *p++ = BIT(gfx, 5) ? fg : bg; + } + + for (u16 x = 0; x < 0x10; x++) + { + u8 gfx = m_p_gfxram[ 0x3000 | x | (ra & 0xc00) | ((ra & 0x3000) >> 8)]; + fg = BIT(m_p_gfxram[ 0x3c00 | x | y ], 3, 3); + /* Display 6 pixels in extended region */ + *p++ = BIT(gfx, 0) ? fg : bg; + *p++ = BIT(gfx, 1) ? fg : bg; + *p++ = BIT(gfx, 2) ? fg : bg; + fg = BIT(m_p_gfxram[ 0x3c00 | x | y ], 0, 3); + *p++ = BIT(gfx, 3) ? fg : bg; + *p++ = BIT(gfx, 4) ? fg : bg; + *p++ = BIT(gfx, 5) ? fg : bg; + } + } + } + break; + } + return 0; +} + +/*************************************************************************** + Palettes +***************************************************************************/ + +/* Levels are unknown - guessing */ +static constexpr rgb_t lnw80_pens[] = +{ + { 220, 220, 220 }, // white + { 0, 175, 0 }, // green + { 200, 200, 0 }, // yellow + { 255, 0, 0 }, // red + { 255, 0, 255 }, // magenta + { 0, 0, 175 }, // blue + { 0, 255, 255 }, // cyan + { 0, 0, 0 } // black +}; + +void lnw80_state::lnw80_palette(palette_device &palette) const +{ + palette.set_pen_colors(0, lnw80_pens); +} + +/**************************** F4 CHARACTER DISPLAYER ***********************************************************/ +static const gfx_layout lnw80_charlayout = +{ + 8, 8, /* 8 x 8 characters */ + 128, /* 128 characters */ + 1, /* 1 bits per pixel */ + { 0 }, /* no bitplanes */ + /* x offsets */ + { 7, 5, 6, 1, 0, 2, 4, 3 }, + /* y offsets */ + { 0*8, 512*8, 256*8, 768*8, 1*8, 513*8, 257*8, 769*8 }, + 8*2 /* every char takes 8 bytes */ +}; + +static GFXDECODE_START(gfx_lnw80) + GFXDECODE_ENTRY( "chargen", 0, lnw80_charlayout, 0, 4 ) +GFXDECODE_END + + +void lnw80_state::floppy_formats(format_registration &fr) +{ + fr.add(FLOPPY_JV1_FORMAT); + fr.add(FLOPPY_TD0_FORMAT); +} + +static void lnw80_floppies(device_slot_interface &device) +{ + device.option_add("sssd", FLOPPY_525_QD); // QD allows the 80-track boot disks to work. +} + + +void lnw80_state::lnw80(machine_config &config) +{ + /* basic machine hardware */ + Z80(config, m_maincpu, 16_MHz_XTAL / 9); + m_maincpu->set_addrmap(AS_PROGRAM, &lnw80_state::lnw80_mem); + m_maincpu->set_addrmap(AS_IO, &lnw80_state::lnw80_io); + + /* video hardware */ + screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); + // LNW80 Theory of Operations gives H and V periods as 15.750kHz and 59.66Hz, probably due to rounding the calculated ~15.7468kHz to 4 figures + screen.set_raw(3.579545_MHz_XTAL * 3, 682, 0, 480, 264, 0, 192); // 10.738MHz generated by tank circuit (top left of page 2 of schematics) + screen.set_screen_update(FUNC(lnw80_state::screen_update)); + screen.set_palette("palette"); + PALETTE(config, "palette", FUNC(lnw80_state::lnw80_palette), 8); + GFXDECODE(config, "gfxdecode", "palette", gfx_lnw80); + + /* sound hardware */ + SPEAKER(config, "mono").front_center(); + SPEAKER_SOUND(config, "speaker").add_route(ALL_OUTPUTS, "mono", 0.50); + + /* devices */ + CASSETTE(config, m_cassette); + m_cassette->set_formats(trs80l2_cassette_formats); + m_cassette->set_default_state(CASSETTE_PLAY); + m_cassette->add_route(ALL_OUTPUTS, "mono", 0.05); + m_cassette->set_interface("trs80_cass"); + + quickload_image_device &quickload(QUICKLOAD(config, "quickload", "cmd", attotime::from_seconds(1))); + quickload.set_load_callback(FUNC(lnw80_state::quickload_cb)); + quickload.set_interface("trs80_quik"); + + FD1771(config, m_fdc, 4_MHz_XTAL / 4); + m_fdc->intrq_wr_callback().set(FUNC(lnw80_state::intrq_w)); + + FLOPPY_CONNECTOR(config, m_floppy[0], lnw80_floppies, "sssd", lnw80_state::floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, m_floppy[1], lnw80_floppies, "sssd", lnw80_state::floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, m_floppy[2], lnw80_floppies, nullptr, lnw80_state::floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, m_floppy[3], lnw80_floppies, nullptr, lnw80_state::floppy_formats).enable_sound(true); + + CENTRONICS(config, m_centronics, centronics_devices, "printer"); + m_centronics->busy_handler().set(m_cent_status_in, FUNC(input_buffer_device::write_bit7)); + m_centronics->perror_handler().set(m_cent_status_in, FUNC(input_buffer_device::write_bit6)); + m_centronics->select_handler().set(m_cent_status_in, FUNC(input_buffer_device::write_bit5)); + m_centronics->fault_handler().set(m_cent_status_in, FUNC(input_buffer_device::write_bit4)); + + INPUT_BUFFER(config, m_cent_status_in); + + OUTPUT_LATCH(config, m_cent_data_out); + m_centronics->set_output_latch(*m_cent_data_out); + + CLOCK(config, m_uart_clock, 19200 * 16); + m_uart_clock->signal_handler().set(m_uart, FUNC(ay31015_device::write_rcp)); + m_uart_clock->signal_handler().append(m_uart, FUNC(ay31015_device::write_tcp)); + + AY31015(config, m_uart); + m_uart->read_si_callback().set("rs232", FUNC(rs232_port_device::rxd_r)); + m_uart->write_so_callback().set("rs232", FUNC(rs232_port_device::write_txd)); + //MCFG_AY31015_WRITE_DAV_CB(WRITELINE( , , )) + m_uart->set_auto_rdav(true); + RS232_PORT(config, "rs232", default_rs232_devices, nullptr); + + ADDRESS_MAP_BANK(config, m_lnw_bank, 0); + m_lnw_bank->set_addrmap(0, &lnw80_state::lnw_banked_mem); + m_lnw_bank->set_data_width(8); + m_lnw_bank->set_addr_width(16); + m_lnw_bank->set_stride(0x4000); + + SOFTWARE_LIST(config, "cass_list").set_original("trs80_cass").set_filter("1"); // L + SOFTWARE_LIST(config, "quik_list").set_original("trs80_quik").set_filter("1"); // L + SOFTWARE_LIST(config, "flop_list").set_original("trs80_flop").set_filter("1"); // L +} + + +/*************************************************************************** + + Game driver(s) + +***************************************************************************/ + +ROM_START(lnw80) + ROM_REGION(0x3000, "maincpu", 0) + ROM_LOAD("lnw_a.u78", 0x0000, 0x0800, CRC(e09f7e91) SHA1(cd28e72efcfebde6cf1c7dbec4a4880a69e683da) ) + ROM_LOAD("lnw_a1.u75", 0x0800, 0x0800, CRC(ac297d99) SHA1(ccf31d3f9d02c3b68a0ee3be4984424df0e83ab0) ) + ROM_LOAD("lnw_b.u79", 0x1000, 0x0800, CRC(c4303568) SHA1(13e3d81c6f0de0e93956fa58c465b5368ea51682) ) + ROM_LOAD("lnw_b1.u76", 0x1800, 0x0800, CRC(3a5ea239) SHA1(8c489670977892d7f2bfb098f5df0b4dfa8fbba6) ) + ROM_LOAD("lnw_c.u80", 0x2000, 0x0800, CRC(2ba025d7) SHA1(232efbe23c3f5c2c6655466ebc0a51cf3697be9b) ) + ROM_LOAD("lnw_c1.u77", 0x2800, 0x0800, CRC(ed547445) SHA1(20102de89a3ee4a65366bc2d62be94da984a156b) ) + + ROM_REGION(0x0800, "chargen", 0) + ROM_LOAD("lnw_chr.u100", 0x0000, 0x0800, CRC(c89b27df) SHA1(be2a009a07e4378d070002a558705e9a0de59389) ) + + ROM_REGION(0x0020, "proms", 0) + ROM_LOAD_OPTIONAL("lnw_ntsc.u130", 0x0000, 0x0020, CRC(b990a207) SHA1(1a1cc3150cbfed76b1c88c0d561f9bee954f3234) ) +ROM_END + + +// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS +COMP( 1981, lnw80, 0, trs80l2, lnw80, lnw80, lnw80_state, empty_init, "LNW Research", "LNW-80", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/lordgun.cpp mame-0.231+dfsg.1/src/mame/drivers/lordgun.cpp --- mame-0.230+dfsg.1/src/mame/drivers/lordgun.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/lordgun.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -45,7 +45,7 @@ #include "cpu/m68000/m68000.h" #include "cpu/z80/z80.h" #include "machine/i8255.h" -#include "sound/3812intf.h" +#include "sound/ym3812.h" #include "sound/ymf278b.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/mac128.cpp mame-0.231+dfsg.1/src/mame/drivers/mac128.cpp --- mame-0.230+dfsg.1/src/mame/drivers/mac128.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/mac128.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -74,6 +74,12 @@ part number 338-6523 (later Macs use a PLCC version which Apple numbered 338S6523), but VLSI Technology's VL65C22V-02PC is not so disguised. +Raster timings from the BBU ERS: +There are 512 visible pixels (32.68 microseconds) per scanline plus 192 pixels +(12.25 microseconds) of hblank. Sound/PWM are fetched at the end of hblank. +Vertically there are 28 lines of vblank followed by 342 displayed lines. +Scanline 0 is the start of vblank. + ****************************************************************************/ #include "emu.h" @@ -91,6 +97,7 @@ #include "machine/swim1.h" #include "machine/ncr5380n.h" #include "machine/nscsi_bus.h" +#include "machine/rescap.h" #include "bus/nscsi/hd.h" #include "bus/nscsi/cd.h" #include "machine/ncr5380.h" @@ -100,6 +107,7 @@ #include "machine/z80scc.h" #include "machine/macadb.h" #include "sound/dac.h" +#include "sound/flt_biquad.h" #include "bus/macpds/pds_tpdfpd.h" #include "formats/ap_dsk35.h" @@ -119,8 +127,8 @@ static constexpr int MAC_V_TOTAL = 370; // (342+28) // sound buffer locations -static constexpr int MAC_MAIN_SND_BUF_OFFSET = (0x0300>>1); -static constexpr int MAC_ALT_SND_BUF_OFFSET = (0x5F00>>1); +static constexpr int MAC_MAIN_SND_BUF_OFFSET = (0x0300>>1); // (end of memory minus 0x0300; for the typical macplus case, this is 0x3ffd00-0x3fffe3 in 16 bit blocks) +static constexpr int MAC_ALT_SND_BUF_OFFSET = (0x5F00>>1); // (end of memory minus 0x5F00) class mac128_state : public driver_device { @@ -140,6 +148,8 @@ m_rtc(*this,"rtc"), m_screen(*this, "screen"), m_dac(*this, "macdac"), + m_filter(*this, "dacfilter"), + m_volfilter(*this, "volfilter"), m_scc(*this, "scc"), m_mouse0(*this, "MOUSE0"), m_mouse1(*this, "MOUSE1"), @@ -173,7 +183,9 @@ optional_device m_mackbd; optional_device m_rtc; required_device m_screen; - required_device m_dac; + required_device m_dac; // actually 1-bit pwm w/8-bit counters + required_device m_filter; + required_device m_volfilter; required_device m_scc; optional_ioport m_mouse0, m_mouse1, m_mouse2; @@ -237,6 +249,7 @@ void phases_w(uint8_t phases); void devsel_w(uint8_t devsel); void devsel_se_w(uint8_t devsel); + void snd_push(uint8_t data); void pwm_push(uint8_t data); uint32_t m_overlay; @@ -422,19 +435,31 @@ void mac128_state::update_volume() { - if (!m_snd_enable) - { - // ls161 clear input - m_dac->set_output_gain(ALL_OUTPUTS, 0); - } - else - { - // sound -> r13 (470k) - // sound -> r12 (470k) -> 4016 (pa0 != 0) - // sound -> r17 (150k) -> 4016 (pa1 != 0) - // sound -> r16 (68k) -> 4016 (pa2 != 0) - m_dac->set_output_gain(ALL_OUTPUTS, 8.0 / (m_snd_vol + 1)); - } + /* LS161 audio PWM counters TC (SND) -> LS04 inverter (/SND) -> + * -> CD4016 gate A pulling a 5.1V zener-regulated signal to ground if input is high -> + * -> Sallen-key low-pass filter (R1 = 47K, R2 = 47K, C1 = 0.001uF, C2 = 470pF + * FC of 4939.3903Hz, Q of 0.7293, Gain of 1.0) -> + * ->\-> r13 (470k) ------------------------>| + * |-> r12 (470k) -> CD4016 D (pa0 != 0) ->| + * |-> r17 (150k) -> CD4016 C (pa1 != 0) ->| + * |-> r16 (68k) -> CD4016 B (pa2 != 0) ->\-> DC blocking caps -> + * -> Push-Pull +12v/-12vb amplifier w/feedback (technically a 1st order multifeedback lowpass filter?) -> + * -> Audio Jack -> Speaker + */ + const double res_ohm_tbl[8] = + { + // R13 R16 R17 R12 + (1.0 / ( (1.0 / RES_K(470)) ) ), + (1.0 / ( (1.0 / RES_K(470)) + (1.0 / RES_K(470)) ) ), + (1.0 / ( (1.0 / RES_K(470)) + (1.0 / RES_K(150)) ) ), + (1.0 / ( (1.0 / RES_K(470)) + (1.0 / RES_K(150)) + (1.0 / RES_K(470)) ) ), + (1.0 / ( (1.0 / RES_K(470)) + (1.0 / RES_K(68)) ) ), + (1.0 / ( (1.0 / RES_K(470)) + (1.0 / RES_K(68)) + (1.0 / RES_K(470)) ) ), + (1.0 / ( (1.0 / RES_K(470)) + (1.0 / RES_K(68)) + (1.0 / RES_K(150)) ) ), + (1.0 / ( (1.0 / RES_K(470)) + (1.0 / RES_K(68)) + (1.0 / RES_K(150)) + (1.0 / RES_K(470)) ) ) + }; + + m_volfilter->opamp_mfb_lowpass_modify(res_ohm_tbl[m_snd_vol&7], RES_K(0), RES_K(200), CAP_U(0), CAP_P(220)); // variable based on cd4016, short, R15, absent, C10 } WRITE_LINE_MEMBER(mac128_state::vblank_w) @@ -444,26 +469,34 @@ TIMER_CALLBACK_MEMBER(mac128_state::mac_scanline) { - int scanline = param; - uint16_t *mac_snd_buf_ptr; + const int scanline = param; - if (scanline == MAC_V_VIS) + if (scanline == 0) { vblank_irq(); } /* video beam in display (! VBLANK && ! HBLANK basically) */ - if (scanline < MAC_V_VIS) + if (scanline >= 28) { m_via->write_pb6(1); - m_hblank_timer->adjust(m_screen->time_until_pos(scanline, MAC_H_VIS)); } + m_hblank_timer->adjust(m_screen->time_until_pos(scanline, MAC_H_TOTAL)); + if ((!(scanline % 10)) && (!m_macadb)) { mouse_callback(); } + m_scan_timer->adjust(m_screen->time_until_pos(scanline+1), (scanline+1) % m_screen->height()); +} + +TIMER_CALLBACK_MEMBER(mac128_state::mac_hblank) +{ + const int scanline = m_screen->vpos(); + uint16_t *mac_snd_buf_ptr; + if (m_main_buffer) { mac_snd_buf_ptr = (uint16_t *)(m_ram_ptr + m_ram_size - MAC_MAIN_SND_BUF_OFFSET); @@ -473,14 +506,38 @@ mac_snd_buf_ptr = (uint16_t *)(m_ram_ptr + m_ram_size - MAC_ALT_SND_BUF_OFFSET); } - m_dac->write(mac_snd_buf_ptr[scanline] >> 8); + // The sound "DAC" is a 1-bit PWM output driven by two 4-bit LS161 counters + // chained together. These counters are reset at the end of HBLANK, and + // count up once every C7M clock (2 pixels per clock), with the TC (SND) + // output connected (through two inverters) to the speaker filter. The + // counters count a max of 256 C7M clocks before reaching terminal count + // and halting themselves, and there are 704 / 2 = 352 C7M clocks per + // scanline, so this means the TC (SND) output over time is an asymmetric + // PWM squarewave, low from between 0 (if the load value is 0xff) and + // 255 (if the load value is 0x00) of the 352 C7M clocks per scanline, + // and high the remainder of the time. This has a significant DC offset + // due to the remaining clocks where the TC signal remains high. + // The counters can be forced to reset and be held at a value of 0x00 if + // the VIA PB7(/SNDRES) pin is held active(low), and this conversely will + // cause the TC (SND) counter pin to output a constant low level for as + // long as /SNDRES is held active. + // Some games such as Lode Runner use the sound manager "swMode" function, + // which uses the /SNDRES pin to alternately force the sound output low + // vs running normally in a square wave. During this time, the software is + // leaving the actual sound buffer FIFO values at a constant 0x80. + // So unless we force the 1-bit PWM to have a value of "always low" while + // PB7 is low, we get almost no sound in Lode Runner, and probably other + // games/software as well. + snd_push(mac_snd_buf_ptr[scanline] >> 8); pwm_push(mac_snd_buf_ptr[scanline] & 0xff); - m_scan_timer->adjust(m_screen->time_until_pos(scanline+1), (scanline+1) % m_screen->height()); + + m_via->write_pb6(0); } -TIMER_CALLBACK_MEMBER(mac128_state::mac_hblank) +void mac128_state::snd_push(uint8_t data) { - m_via->write_pb6(0); + double frac = (m_snd_enable ? (((double)(~data)) / (MAC_H_TOTAL / 2.0)) : 1.0); + m_dac->write((uint16_t)(frac * 4095.0)); // using a fraction of a 12 bit value, so we can handle inputs ranging between 0/352 and 352/352 without losing resolution. } void mac128_state::pwm_push(uint8_t data) @@ -1097,7 +1154,11 @@ /* sound hardware */ SPEAKER(config, "speaker").front_center(); - DAC_8BIT_PWM(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.25); // 2 x ls161 + FILTER_BIQUAD(config, m_volfilter).opamp_mfb_lowpass_setup(RES_K(39.020), RES_K(0), RES_K(200), CAP_U(0), CAP_P(220)); // variable based on cd4016, short, R15, absent, C10 + m_volfilter->add_route(ALL_OUTPUTS, "speaker", 0.195); // this filter has a max gain of ~5.126, so we diminish it by the inverse of that (0.195) + FILTER_BIQUAD(config, m_filter).opamp_sk_lowpass_setup(RES_K(47), RES_K(47), RES_M(999.99), RES_R(0.001), CAP_U(0.001), CAP_P(470)); // R18, R14, absent, short, C18, C19 + m_filter->add_route(ALL_OUTPUTS, m_volfilter, 1.0); + DAC_12BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, m_filter, 1.0); // 2 x ls161; this is a 1-bit PWM value selecting an 8-bit fraction from 0/352nds to 255/352nds of a scanline, with /SNDRES forcing it active for 352/352nds. /* devices */ RTC3430042(config, m_rtc, 32.768_kHz_XTAL); @@ -1172,7 +1233,7 @@ NSCSI_CONNECTOR(config, "scsibus:4", mac_scsi_devices, nullptr); NSCSI_CONNECTOR(config, "scsibus:5", mac_scsi_devices, nullptr); NSCSI_CONNECTOR(config, "scsibus:6", mac_scsi_devices, "harddisk"); - NSCSI_CONNECTOR(config, "scsibus:7").option_set("ncr5380n", NCR5380N).clock(24_MHz_XTAL).machine_config([this](device_t *device) { + NSCSI_CONNECTOR(config, "scsibus:7").option_set("ncr5380n", NCR5380N).machine_config([this](device_t *device) { ncr5380n_device &adapter = downcast(*device); adapter.irq_handler().set(*this, FUNC(mac128_state::scsi_irq_w)); adapter.drq_handler().set(*this, FUNC(mac128_state::scsi_drq_w)); @@ -1278,6 +1339,28 @@ ROM_REGION16_BE(0x100000, "bootrom", 0) ROM_LOAD( "rom4.3t_07-04-83.bin", 0x0000, 0x10000, CRC(d2c42f18) SHA1(f868c09ca70383a69751c37a5a3110a9597462a4) ) ROM_END + + // one twiggy mac (SN 1042) has the following sum16s on the 4x 16k eproms on the "512 EPROM ADAPTER" daughterboard: + // U3 EPROM // 1 HI: "H1 // A04A" + // U4 EPROM // 0 HI: "H0 // B6ED" + // U5 EPROM // 1 LOW: "Lo1 // 6C8C" + // U6 EPROM // 0 LOW: "Lo0 // F332" + // This version (Rom Version 4.4T?) was publicly dumped by Adam Goolevitch, but one of the SUM16s (B5ED) does not match the ROM label (B6ED). + // The ROM has been marked as bad pending a redump or other verification of correctness. + ROMX_LOAD("h0__b6ed.u4", 0x00000, 0x04000, BAD_DUMP CRC(87136a61) SHA1(a33fc3b7908783a5742f06884fe44260447e5d55), ROM_SKIP(1) ) // SUM16: B5ED does not match written label + ROMX_LOAD("lo0__f332.u6", 0x00001, 0x04000, CRC(3d04b1c5) SHA1(11fe22e8ce415edf4133d7cee559dce4ab0f7974), ROM_SKIP(1) ) // SUM16: F332 + ROMX_LOAD("h1__a04a.u3", 0x08000, 0x04000, CRC(fa9ae0d1) SHA1(e89826325caf053aad2c09d134c8c7483d442821), ROM_SKIP(1) ) // SUM16: A04A + ROMX_LOAD("lo1__6c8c.u5", 0x08001, 0x04000, CRC(ca78a04e) SHA1(724d7d7b585c375cd5797e4334d6ab6267e798dc), ROM_SKIP(1) ) // SUM16: 6C8C + + + // one twiggy mac (SN 1072, upc MA1M830241240) has the following sum16s on the 4x 16k EPROMs on the "512 EPROM ADAPTER" daughterboard: + // U3 EPROM // 1 HI: "Rom 2.45 // H 1 // 1D79" + // U4 EPROM // 0 HI: "ROM 2.45 // High0 // D4DF" + // U5 EPROM // 1 LOW: "ROM 2.45 // LOW1 // 977F" + // U6 EPROM // 0 LOW: "ROM 2.45 // LOW0 // C813" + // This Twiggy mac has a prototype IWM labeled " 8248 // XXX-X299 (C) // APPLE 82" + // The ROM of this twiggy mac has been tentatively dated between March and April 1983, possibly March 11, 1983. + // See https://macgui.com/news/article.php?t=517 */ ROM_START( mac128k ) @@ -1303,6 +1386,15 @@ https://68kmla.org/forums/uploads/monthly_12_2014/post-2597-0-46269000-1419299800.jpg http://cdn.cultofmac.com/wp-content/uploads/2014/01/12A-128k-Motherboard.jpg */ + + //ROM_REGION(0x3000, "pals", 0) + // @U14E 342-0186-A PAL16R8 ASG + // @U2D 342-0187-A PAL16L8 BMU1 + // @U3D 342-0189-A PAL16R6 TSG + // @U2E 342-0191-A PAL16R4 BMU0 + // @U1E 342-0251-A PAL16R8 LAG + // @U1D 342-0254-A PAL16R4A TSM + ROM_END ROM_START( mac512k ) @@ -1310,11 +1402,20 @@ ROMX_LOAD("342-0220-b.u6d", 0x00000, 0x08000, CRC(0dce9a3f) SHA1(101ca6570f5a273e400d1a8bc63e15ee0e94153e), ROM_SKIP(1) ) // " 512 VH 6434 // 23256-1104 // 342-0220-B // (C) APPLE 84 // KOREA-A" ROMX_LOAD("342-0221-b.u8d", 0x00001, 0x08000, CRC(d51f376e) SHA1(575586109e876cffa4a4d472cb38771aa21b70cb), ROM_SKIP(1) ) // " 512 VH 6709 // 23256-1105 // 342-0221-B // (C) APPLE 84 // KOREA-A" // reference: http://i.ebayimg.com/images/g/Uj8AAOSwvzRXy2tW/s-l1600.jpg + + //ROM_REGION(0x3000, "pals", 0) + // @U14E 342-0186-A PAL16R8 ASG + // @U2D 342-0187-A PAL16L8 BMU1 + // @U3D 342-0189-A PAL16R6 TSG + // @U2E 342-0191-A PAL16R4 BMU0 + // @U1E 342-0251-A PAL16R8 LAG + // @U1D 342-0254-A PAL16R4A TSM ROM_END ROM_START( unitron ) ROM_REGION16_BE(0x100000, "bootrom", 0) ROM_LOAD16_WORD( "unitron_512.rom", 0x00000, 0x10000, CRC(1eabd37f) SHA1(a3d3696c08feac6805effb7ee07b68c2bf1a8dd7) ) + // pals are different from mac 128/512/512ke ROM_END ROM_START( utrn1024 ) @@ -1322,6 +1423,7 @@ // CRCs match the original "Lonely Hearts" version 1 Mac Plus ROM: 4d1eeee1 ROMX_LOAD( "342-0341-a.u6d", 0x000000, 0x010000, CRC(5095fe39) SHA1(be780580033d914b5035d60b5ebbd66bd1d28a9b), ROM_SKIP(1) ) // not correct label ROMX_LOAD( "342-0342-a.u8d", 0x000001, 0x010000, CRC(fb766270) SHA1(679f529fbfc05f9cc98924c53457d2996dfcb1a7), ROM_SKIP(1) ) // not correct label + // unknown pals ROM_END ROM_START( mac512ke ) // 512ke has been observed with any of the v3, v2 or v1 macplus romsets installed, and v1 romsets are more common here than in the plus, since the 512ke lacks scsi, which is the cause of the major bug fixed between v1 and v2, hence 512ke is unaffected and was a good way for apple to use up the buggy roms rather than destroying them. @@ -1372,6 +1474,14 @@ GUESSED, since this ROM is very rare: "VTI // 62? V0 86?? // 23512-1008 // 342-0341-A // (C)APPLE '83-'85 // KOREA A" 'ROM-LO' @ U8D is same as v2/4d1eeae1 'ROM-LO' @ U8D */ + + //ROM_REGION(0x3000, "pals", 0) + // @U14E 342-0186-A PAL16R8 ASG + // @U2D 342-0187-A PAL16L8 BMU1 + // @U3D 342-0189-A PAL16R6 TSG + // @U2E 342-0191-A PAL16R4 BMU0 + // @U1E 342-0251-A PAL16R8 LAG + // @U1D 342-0254-A PAL16R4A TSM ROM_END ROM_START( macplus ) // same notes as above apply here as well @@ -1396,16 +1506,27 @@ ROM_SYSTEM_BIOS(4, "romdisk2", "bigmessofwires.com ROMinator (2/25/2015)") ROMX_LOAD( "rominator-20150225-lo.bin", 0x000001, 0x080000, CRC(62cf2a0b) SHA1(f78ebb0919dd9e094bef7952b853b70e66d05e01), ROM_SKIP(1) | ROM_BIOS(4) ) ROMX_LOAD( "rominator-20150225-hi.bin", 0x000000, 0x080000, CRC(a28ba8ec) SHA1(9ddcf500727955c60db0ff24b5ca2458f53fd89a), ROM_SKIP(1) | ROM_BIOS(4) ) + + //ROM_REGION(0x3000, "pals", 0) + // @U11E 342-0517-A PAL16?? ASG + // @U2D 341-0514-A PAL16L8 BMU1 + // @U3D 342-0516-A PAL16R6 TSG + // @U3E 342-0519-A PAL20?? CAS + // @U2E 342-0520-A PAL20R4A BMU2 + // @U1E 342-0515-A PAL16R8 LAG + // @U1D 342-0522-A VP16RP8MPC (PAL16R4A on schem) TSM ROM_END ROM_START( macse ) ROM_REGION16_BE(0x100000, "bootrom", 0) ROM_LOAD16_WORD( "macse.rom", 0x00000, 0x40000, CRC(0f7ff80c) SHA1(58532b7d0d49659fd5228ac334a1b094f0241968)) + // GLU HAL (mask PAL) ROM_END ROM_START( macsefd ) ROM_REGION16_BE(0x100000, "bootrom", 0) ROM_LOAD( "be06e171.rom", 0x000000, 0x040000, CRC(f530cb10) SHA1(d3670a90273d12e53d86d1228c068cb660b8c9d1) ) + // GLU HAL (mask PAL) ROM_END ROM_START( macclasc ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/mac.cpp mame-0.231+dfsg.1/src/mame/drivers/mac.cpp --- mame-0.230+dfsg.1/src/mame/drivers/mac.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/mac.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -15,7 +15,6 @@ #include "includes/mac.h" #include "cpu/m68000/m68000.h" -#include "cpu/powerpc/ppc.h" #include "cpu/m6805/m6805.h" #include "formats/ap_dsk35.h" #include "machine/iwm.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/macpdm.cpp mame-0.231+dfsg.1/src/mame/drivers/macpdm.cpp --- mame-0.230+dfsg.1/src/mame/drivers/macpdm.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/macpdm.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -1023,7 +1023,7 @@ // 50f08000 = ethernet ID PROM // 50f0a000 = MACE ethernet controller map(0x50f10000, 0x50f10000).rw(FUNC(macpdm_state::scsi_r), FUNC(macpdm_state::scsi_w)).select(0xf0); - map(0x50f10100, 0x50f10101).r(m_ncr53c94, FUNC(ncr53c94_device::dma16_r)); + map(0x50f10100, 0x50f10101).rw(m_ncr53c94, FUNC(ncr53c94_device::dma16_r), FUNC(ncr53c94_device::dma16_w)); map(0x50f14000, 0x50f1401f).rw(m_awacs, FUNC(awacs_device::read), FUNC(awacs_device::write)); map(0x50f16000, 0x50f16000).rw(FUNC(macpdm_state::fdc_r), FUNC(macpdm_state::fdc_w)).select(0x1e00); @@ -1094,7 +1094,7 @@ 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", default_scsi_devices, nullptr); + NSCSI_CONNECTOR(config, "scsibus:3", default_scsi_devices, "cdrom"); 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"); diff -Nru mame-0.230+dfsg.1/src/mame/drivers/magreel.cpp mame-0.231+dfsg.1/src/mame/drivers/magreel.cpp --- mame-0.230+dfsg.1/src/mame/drivers/magreel.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/magreel.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -147,7 +147,7 @@ // screen.set_screen_update(FUNC(magreel_state::screen_update)); // screen.set_size(32*8, 32*8); // screen.set_visarea(0*8, 32*8-1, 0*8, 32*8-1); -// screen.set_raw(58_MHz_XTAL / 2, 442, 0, 320, 264, 0, 240); /* generic NTSC video timing at 320x240 */ +// screen.set_raw(58_MHz_XTAL / 2, 442, 0, 320, 264, 0, 240); // generic NTSC video timing at 320x240 // screen.set_palette("palette"); // GFXDECODE(config, "gfxdecode", "palette", gfx_magreel); @@ -167,7 +167,7 @@ ROM_START( magreel ) ROM_REGION( 0x100000, "maincpu", 0 ) - ROM_LOAD( "m27c800ic18", 0x000000, 0x100000, CRC(2af3d8e7) SHA1(729cd2c1011d8018cf8d77c2d118d1815e30f475) ) // TODO: figure out the line swapping + ROM_LOAD( "m27c800.ic18", 0x000000, 0x100000, CRC(2af3d8e7) SHA1(729cd2c1011d8018cf8d77c2d118d1815e30f475) ) // TODO: figure out the line swapping ROM_REGION( 0x4000, "pic", ROMREGION_ERASEFF ) ROM_LOAD( "pic16c621", 0x0000, 0x4000, NO_DUMP ) // read protected @@ -179,7 +179,7 @@ ROM_LOAD( "m27c160.ic6", 0x600000, 0x200000, CRC(0f3274d0) SHA1(1abb45ebc74a09f1832cf80775a35966e8d5cd84) ) ROM_REGION( 0x200000, "flash", 0 ) - ROM_LOAD( "mx29f161.ic24",0x000000, 0x200000, CRC(61accab0) SHA1(0fee6bf6071849d1b00fbfc248ab654a8abc3b99) ) // FIXED BITS (xxxxxxxxxxxxxxx0) + ROM_LOAD( "mx29f161.ic24",0x000000, 0x200000, CRC(b479c2db) SHA1(cac4c38ef26d307bfd3ffff77859ea90cf554418) ) ROM_REGION( 0x4000, "eeproms", 0 ) ROM_LOAD( "m28c64.ic19", 0x000000, 0x002000, CRC(d0238e5c) SHA1(513bb97487d33c3b844877104bb2af3220851583) ) @@ -189,7 +189,21 @@ void magreel_state::init_magreel() { - // TODO: decryption + uint8_t *rom = memregion("maincpu")->base(); + + std::vector buffer(0x100000); + + memcpy(&buffer[0], rom, 0x100000); + + // descramble address. TODO: gives M68000-looking code structure, but probably isn't correct + for (int i = 0; i < 0x100000; i++) + rom[i] = buffer[bitswap<24>(i, 23, 22, 21, 20, 19, 16, 17, 18, 1, 3, 2, 4, 7, 5, 6, 8, 9, 10, 11, 14, 12, 13, 15, 0)]; + + uint16_t *rom16 = (uint16_t *)memregion("maincpu")->base(); + + // descramble data. TODO: everything + for (int i = 0; i < 0x100000 / 2; i++) + rom16[i] = bitswap<16>(rom16[i] ^ 0x0000, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); } } // Anonymous namespace diff -Nru mame-0.230+dfsg.1/src/mame/drivers/matmania.cpp mame-0.231+dfsg.1/src/mame/drivers/matmania.cpp --- mame-0.230+dfsg.1/src/mame/drivers/matmania.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/matmania.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -36,9 +36,9 @@ #include "cpu/m6502/m6502.h" #include "cpu/m6809/m6809.h" -#include "sound/3526intf.h" #include "sound/ay8910.h" #include "sound/dac.h" +#include "sound/ym3526.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/max80.cpp mame-0.231+dfsg.1/src/mame/drivers/max80.cpp --- mame-0.230+dfsg.1/src/mame/drivers/max80.cpp 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/max80.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,506 @@ +// license:BSD-3-Clause +// copyright-holders:Robbbert +/*************************************************************************** + +A business-only clone of the TRS-80 Model III. + +All controllers are built-in. Disk drives are required. It can +boot from any size floppy or from a hard disk. All the drives are +in external enclosures. External connections are: +- 5.25 floppy connector (up to 4 drives) +- 8 floppy connector (up to 4 drives) +- HD connector (1 only, gives total of 9 drives) +- Serial A +- Serial B +- Expansion I/O + +All configuration comes from the floppy image. This includes setting up +the CRTC, the character generator, the SIO and the keyboard. + +There was a Technical Manual, but I was unable to find a copy, and so +everything in here is based upon what could be gleaned from the schematic. + +There's IMD floppy images available, but it's unknown what kind of drive +is needed. I was not able to boot anything. + +Organisation of memory: +- There's 128K of RAM, split into 32k sections. Bits 6,7 of 7FC control the + banking. According to the disassembly, 0x80 selects A1 and B1, while 0x40 + selects A1 and A2. I presume that the 64K banks are A and B, and their 32K + halves are 1 and 2. It's unknown what combinations 0x00 and 0xC0 select. + +- Overlaid on this is a special 4K-sized bank which holds the ROM, the video + RAM and all the devices. This bank can be anywhere in memory on a 4K boundary + chosen by writing to x7DC. Further, the 4K bank has some unassigned areas, + allowing the underlying main ram to shine through. It's unknown what happens + if you attempt to write to ROM. The bank is initially at address 0-FFF. + +NOTE on character generation: +- There's no character generator ROM. All definitions are in a 6116 RAM at + an unknown address within the 4K bank. Therefore nothing can be seen until + a successful boot from disk, which contains the font data, and also does + initialisation of the CRTC. Video RAM resides in another 6116, which is + also in the 4K bank. + +Booting: +- A sector is read into main RAM starting at 0x400. Then it is executed and + the process of booting can begin. In TRS-80 compatible-mode (a disk program), + the 4K bank is moved to 0x3000. + +*************************************************************************** + + +To Do: Almost everything. +Status: Beeps every so often. Unable to read the disk. + + +***************************************************************************/ + +#include "emu.h" +#include "cpu/z80/z80.h" +//#include "machine/ram.h" +#include "imagedev/floppy.h" +#include "imagedev/snapquik.h" +#include "machine/z80sio.h" +#include "machine/z80pio.h" +#include "machine/com8116.h" +#include "machine/msm5832.h" +//#include "bus/rs232/rs232.h" +#include "machine/wd_fdc.h" +#include "sound/beep.h" +#include "machine/timer.h" +#include "video/mc6845.h" +#include "emupal.h" +#include "screen.h" +#include "speaker.h" +#include "formats/imd_dsk.h" +//#include "formats/trs80_dsk.h" +//#include "formats/dmk_dsk.h" + +class max80_state : public driver_device +{ +public: + max80_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") +// , m_p_chargen(*this, "chargen") +// , m_vram(*this, "videoram") + , m_palette(*this, "palette") + , m_pio(*this, "pio") + , m_crtc(*this, "crtc") + , m_uart(*this, "uart") + , m_brg(*this, "brg") + , m_beep(*this, "beeper") + , m_beep_timer(*this, "beep_timer") + , m_rtc(*this, "rtc") + , m_fdc(*this, "fdc") + , m_floppy0(*this, "fdc:0") + , m_floppy1(*this, "fdc:1") + , m_floppy2(*this, "fdc:2") + , m_floppy3(*this, "fdc:3") + , m_io_keyboard(*this, "LINE%u", 0) +// , m_mainram(*this, RAM_TAG) + { } + + void max80(machine_config &config); + +protected: + virtual void machine_start() override; + virtual void machine_reset() override; + +private: + static void floppy_formats(format_registration &fr); + u8 keyboard_r(offs_t offset); + void beep_w(offs_t offset, u8 data); + void mode_w(offs_t offset, u8 data); + void drive_w(offs_t offset, u8 data); + u8 fdc_status_r(offs_t offset); + u8 pio_pa_r(offs_t offset); + void pio_pa_w(offs_t offset, u8 data); + void pio_pb_w(offs_t offset, u8 data); + + DECLARE_WRITE_LINE_MEMBER(intrq_w); + DECLARE_WRITE_LINE_MEMBER(drq_w); + MC6845_UPDATE_ROW(crtc_update_row); + TIMER_DEVICE_CALLBACK_MEMBER(beep_timer); + + void mem_map(address_map &map); + + u8 m_size_store = 0; + bool m_fdc_drq = 0; + bool m_fdc_int = 0; + bool m_allow_nmi = 0; + u8 m_mode = 0; + floppy_image_device *m_floppy; + required_device m_maincpu; + //required_region_ptr m_p_chargen; + //required_shared_ptr m_p_vram; + required_device m_palette; + required_device m_pio; + required_device m_crtc; + required_device m_uart; + required_device m_brg; + required_device m_beep; + required_device m_beep_timer; + required_device m_rtc; + required_device m_fdc; + required_device m_floppy0; + required_device m_floppy1; + required_device m_floppy2; + required_device m_floppy3; + required_ioport_array<8> m_io_keyboard; +// optional_device m_mainram; +}; + + +void max80_state::mem_map(address_map &map) +{ + map(0x0000, 0xffff).ram(); + map(0x0000, 0x01ff).rom(); + //map(0x3800, 0x3bff).r(FUNC(max80_state::keyboard_r)); + //map(0x3c00, 0x3fff).ram().share(m_p_videoram); + map(0x07d0, 0x07d3).w(m_brg, FUNC(com8116_device::str_w)); // W0 + map(0x07d4, 0x07d7).w(m_brg, FUNC(com8116_device::stt_w)); // W1 + map(0x07d8, 0x07db).w(FUNC(max80_state::drive_w)); // W2 + map(0x07dc, 0x07df).w(FUNC(max80_state::mode_w)); // 0x30 to move 4k area to 3000-3FFF //W3 + map(0x07e0, 0x07e0).mirror(2).w(m_crtc, FUNC(mc6845_device::address_w)); // OUT 0 + map(0x07e1, 0x07e1).mirror(2).w(m_crtc, FUNC(mc6845_device::register_w)); // OUT 0 + map(0x07e4, 0x07e7).rw(m_uart, FUNC(z80sio_device::ba_cd_r), FUNC(z80sio_device::ba_cd_w)); // IN1,OUT1 + map(0x07ec, 0x07ef).rw(m_fdc, FUNC(mb8876_device::read), FUNC(mb8876_device::write)); // IN3,OUT3 + //map(0x07f0, 0x07f3).r // udata + map(0x07f4, 0x07f7).r(FUNC(max80_state::fdc_status_r)); + map(0x07f8, 0x07fb).portr("BOOT"); // IN6 + map(0x07f8, 0x07fb).w(FUNC(max80_state::beep_w)); + map(0x07fc, 0x07ff).rw(m_pio, FUNC(z80pio_device::read_alt), FUNC(z80pio_device::write_alt)); // IN7,OUT7 +} + +static INPUT_PORTS_START( max80 ) + PORT_START("LINE0") + PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_NAME("@") PORT_CODE(KEYCODE_INSERT) PORT_CHAR('@') + PORT_BIT(0x02, 0x00, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') + PORT_BIT(0x04, 0x00, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') + PORT_BIT(0x08, 0x00, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C') + PORT_BIT(0x10, 0x00, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D') + PORT_BIT(0x20, 0x00, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') + PORT_BIT(0x40, 0x00, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F') + PORT_BIT(0x80, 0x00, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') + + PORT_START("LINE1") + PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') + PORT_BIT(0x02, 0x00, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') + PORT_BIT(0x04, 0x00, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J') + PORT_BIT(0x08, 0x00, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K') + PORT_BIT(0x10, 0x00, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') + PORT_BIT(0x20, 0x00, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M') + PORT_BIT(0x40, 0x00, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N') + PORT_BIT(0x80, 0x00, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') + + PORT_START("LINE2") + PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') + PORT_BIT(0x02, 0x00, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') + PORT_BIT(0x04, 0x00, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') + PORT_BIT(0x08, 0x00, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S') + PORT_BIT(0x10, 0x00, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T') + PORT_BIT(0x20, 0x00, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U') + PORT_BIT(0x40, 0x00, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V') + PORT_BIT(0x80, 0x00, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') + + PORT_START("LINE3") + PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') + PORT_BIT(0x02, 0x00, IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') + PORT_BIT(0x04, 0x00, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') + PORT_BIT(0x08, 0x00, IPT_KEYBOARD) PORT_NAME("[") PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[') PORT_CHAR('{') + PORT_BIT(0x10, 0x00, IPT_KEYBOARD) PORT_NAME("\\") PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\') PORT_CHAR('|') + PORT_BIT(0x20, 0x00, IPT_KEYBOARD) PORT_NAME("]") PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR(']') PORT_CHAR('}') + PORT_BIT(0x40, 0x00, IPT_KEYBOARD) PORT_NAME("^") PORT_CODE(KEYCODE_TILDE) PORT_CHAR('^') PORT_CHAR('~') + PORT_BIT(0x80, 0x00, IPT_KEYBOARD) PORT_NAME("_") PORT_CODE(KEYCODE_DEL) PORT_CHAR('_') PORT_CHAR(127) + + PORT_START("LINE4") + PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_CHAR('0') + PORT_BIT(0x02, 0x00, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_CHAR('1') PORT_CHAR('!') + PORT_BIT(0x04, 0x00, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_CHAR('2') PORT_CHAR('"') + PORT_BIT(0x08, 0x00, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_CHAR('3') PORT_CHAR('#') + PORT_BIT(0x10, 0x00, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_CHAR('4') PORT_CHAR('$') + PORT_BIT(0x20, 0x00, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_CHAR('5') PORT_CHAR('%') + PORT_BIT(0x40, 0x00, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_CHAR('6') PORT_CHAR('&') + PORT_BIT(0x80, 0x00, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_CHAR('7') PORT_CHAR('\'') + + PORT_START("LINE5") + PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_CHAR('8') PORT_CHAR('(') + PORT_BIT(0x02, 0x00, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_CHAR('9') PORT_CHAR(')') + PORT_BIT(0x04, 0x00, IPT_KEYBOARD) PORT_NAME(": *") PORT_CODE(KEYCODE_MINUS) PORT_CHAR(':') PORT_CHAR('*') + PORT_BIT(0x08, 0x00, IPT_KEYBOARD) PORT_NAME("; +") PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR('+') + PORT_BIT(0x10, 0x00, IPT_KEYBOARD) PORT_NAME(", <") PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') + PORT_BIT(0x20, 0x00, IPT_KEYBOARD) PORT_NAME("- =") PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('-') PORT_CHAR('=') + PORT_BIT(0x40, 0x00, IPT_KEYBOARD) PORT_NAME(". >") PORT_CODE(KEYCODE_STOP) PORT_CODE(KEYCODE_DEL_PAD) PORT_CHAR('.') PORT_CHAR('>') + PORT_BIT(0x80, 0x00, IPT_KEYBOARD) PORT_NAME("/ ?") PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') + + PORT_START("LINE6") + PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_NAME("Enter") PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_CHAR(13) + PORT_BIT(0x02, 0x00, IPT_KEYBOARD) PORT_NAME("Clear") PORT_CODE(KEYCODE_HOME) PORT_CHAR(UCHAR_MAMEKEY(F8)) + PORT_BIT(0x04, 0x00, IPT_KEYBOARD) PORT_NAME("Break") PORT_CODE(KEYCODE_END) PORT_CHAR(UCHAR_MAMEKEY(F9)) + PORT_BIT(0x08, 0x00, IPT_KEYBOARD) PORT_NAME(UTF8_UP) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) + PORT_BIT(0x10, 0x00, IPT_KEYBOARD) PORT_NAME("Down") PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) + PORT_BIT(0x20, 0x00, IPT_KEYBOARD) PORT_NAME("Left") PORT_CODE(KEYCODE_LEFT) PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) + PORT_BIT(0x40, 0x00, IPT_KEYBOARD) PORT_NAME("Right") PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) + PORT_BIT(0x80, 0x00, IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') + + PORT_START("LINE7") + PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_NAME("Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) + PORT_BIT(0x02, 0x00, IPT_KEYBOARD) PORT_NAME("F1") PORT_CODE(KEYCODE_F1) + PORT_BIT(0x04, 0x00, IPT_KEYBOARD) PORT_NAME("F2") PORT_CODE(KEYCODE_F2) + PORT_BIT(0x08, 0x00, IPT_KEYBOARD) PORT_NAME("F3") PORT_CODE(KEYCODE_F3) + PORT_BIT(0x10, 0x00, IPT_KEYBOARD) PORT_NAME("F4") PORT_CODE(KEYCODE_F4) + PORT_BIT(0x20, 0x00, IPT_KEYBOARD) PORT_NAME("ESC") PORT_CODE(KEYCODE_ESC) + PORT_BIT(0x40, 0x00, IPT_UNUSED) + PORT_BIT(0x80, 0x00, IPT_KEYBOARD) PORT_NAME("CTL") PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL) PORT_CHAR(UCHAR_SHIFT_2) + + PORT_START("BOOT") // lower 3 dips decide the boot device. Other 5 dips are unknown. Manual shows them all set low. + PORT_DIPNAME( 0x07, 0x02, "Boot device") + PORT_DIPSETTING( 0x00, "None") + PORT_DIPSETTING( 0x01, "Floppy 5") + PORT_DIPSETTING( 0x02, "Floppy 8") + PORT_DIPSETTING( 0x03, "HD 5 UVC") + PORT_DIPSETTING( 0x04, "HD 8 UVC") + PORT_DIPSETTING( 0x05, "FD 5 UVC") + PORT_DIPSETTING( 0x06, "FD 8 UVC") + PORT_DIPSETTING( 0x07, "HD SASI") + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN ) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN ) +INPUT_PORTS_END + + +/************************************* + * + * Port handlers. + * + *************************************/ + + +TIMER_DEVICE_CALLBACK_MEMBER(max80_state::beep_timer) +{ + m_beep->set_state(0); +} + +void max80_state::drive_w(offs_t offset, u8 data) +{ + m_floppy = nullptr; + + if (BIT(data, 0)) m_floppy = m_floppy0->get_device(); + if (BIT(data, 1)) m_floppy = m_floppy1->get_device(); + if (BIT(data, 2)) m_floppy = m_floppy2->get_device(); + if (BIT(data, 3)) m_floppy = m_floppy3->get_device(); + + m_fdc->set_floppy(m_floppy); + + if (m_floppy) + { + m_floppy->mon_w(0); + m_floppy->ss_w(BIT(data, 4)); + } + + m_fdc->dden_w(!BIT(data, 6)); + m_fdc->set_unscaled_clock(BIT(data, 5) ? 2000000 : 1000000); + m_allow_nmi = BIT(data, 7); +} + + +WRITE_LINE_MEMBER(max80_state::intrq_w) +{ + m_fdc_int = state; +} + +WRITE_LINE_MEMBER(max80_state::drq_w) +{ + m_fdc_drq = state; + m_maincpu->set_input_line(INPUT_LINE_NMI, (state && m_allow_nmi) ? ASSERT_LINE : CLEAR_LINE); +} + +u8 max80_state::keyboard_r(offs_t offset) +{ + u8 i, result = 0; + + for (i = 0; i < 8; i++) + if (BIT(offset, i)) + result |= m_io_keyboard[i]->read(); + + return result; +} + +u8 max80_state::fdc_status_r(offs_t offset) +{ + u8 data = 0xfc | m_fdc_drq | (m_fdc_int << 1); + return data; +} + +void max80_state::beep_w(offs_t offset, u8 data) +{ + m_beep->set_state(1); + m_beep_timer->adjust(attotime::from_msec(150)); +} + +void max80_state::mode_w(offs_t offset, u8 data) +{ + // bit 0, disable rom + // bit 1, disable i/o + // bit 2, enable video access from cpu + // bit 3, enable wide characters + // bits 4-7, move rom and i/o to the block starting with x000, where x = BIT(data,4,4) + m_mode = data; +} + +u8 max80_state::pio_pa_r(offs_t offset) +{ + return m_rtc->data_r(); +} + +void max80_state::pio_pa_w(offs_t offset, u8 data) +{ + m_rtc->data_w(data & 15); + // Memory banking of the 64k rams + // if subsequent memory address of >=0x8000, bits 6/7 are used, else bits 4/5. + // High bit switches 64k banks. Low bit does something with 32k, but not sure what. +} + +void max80_state::pio_pb_w(offs_t offset, u8 data) +{ + m_rtc->address_w(data & 15); + m_rtc->write_w(BIT(data, 4)); + m_rtc->read_w(BIT(data, 5)); + m_rtc->hold_w(BIT(data, 6)); +} + +/************************************* + * Machine * + *************************************/ + +void max80_state::machine_start() +{ +// save_item(NAME(m_irq)); +// save_item(NAME(m_size_store)); +// save_item(NAME(m_drq_off)); +// save_item(NAME(m_intrq_off)); + +} + +void max80_state::machine_reset() +{ + m_size_store = 0xff; + m_fdc_drq = false; + m_fdc_int = false; + m_floppy = nullptr; +} + +MC6845_UPDATE_ROW( max80_state::crtc_update_row ) +{ +#if 0 + rgb_t const *const palette = m_palette->palette()->entry_list_raw(); + u32 *p = &bitmap.pix(y); + + for (u16 x = 0; x < x_count; x++) + { + u16 mem = (ma + x) & 0x7ff; + u8 chr = m_vram[mem]; + u8 gfx = m_p_chargen[(chr<<4) | ra] ^ ((x == cursor_x) ? 0xff : 0); + + /* Display a scanline of a character (8 pixels) */ + *p++ = palette[BIT(gfx, 7)]; + *p++ = palette[BIT(gfx, 6)]; + *p++ = palette[BIT(gfx, 5)]; + *p++ = palette[BIT(gfx, 4)]; + *p++ = palette[BIT(gfx, 3)]; + *p++ = palette[BIT(gfx, 2)]; + *p++ = palette[BIT(gfx, 1)]; + *p++ = palette[BIT(gfx, 0)]; + } +#endif +} + + +void max80_state::floppy_formats(format_registration &fr) +{ + fr.add(FLOPPY_IMD_FORMAT); + //fr.add(FLOPPY_JV3_FORMAT); + //fr.add(FLOPPY_DMK_FORMAT); + //fr.add(FLOPPY_JV1_FORMAT); +} + +static void max80_floppies(device_slot_interface &device) +{ + // Available images get rejected with 40-track drives + //device.option_add("40t_sd", FLOPPY_525_SSSD); + //device.option_add("40t_dd", FLOPPY_525_DD); + device.option_add("80t_qd", FLOPPY_525_QD); + device.option_add("8ssdd", FLOPPY_8_SSDD); + device.option_add("8dsdd", FLOPPY_8_DSDD); +} + + +void max80_state::max80(machine_config &config) +{ + /* basic machine hardware */ + Z80(config, m_maincpu, 15'200'000 / 3); + m_maincpu->set_addrmap(AS_PROGRAM, &max80_state::mem_map); + + /* video hardware */ + screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER, rgb_t::green())); + screen.set_refresh_hz(60); + screen.set_vblank_time(ATTOSECONDS_IN_USEC(2000)); // not accurate + screen.set_screen_update("crtc", FUNC(mc6845_device::screen_update)); + screen.set_size(640, 480); + screen.set_visarea(0, 639, 0, 479); + + PALETTE(config, m_palette, palette_device::MONOCHROME); + + HD6845S(config, m_crtc, 15'200'000 / 8); // HD46505 + m_crtc->set_screen("screen"); + m_crtc->set_show_border_area(false); + m_crtc->set_char_width(8); + m_crtc->set_update_row_callback(FUNC(max80_state::crtc_update_row)); + + // devices + MB8876(config, m_fdc, 8_MHz_XTAL / 4); + m_fdc->intrq_wr_callback().set(FUNC(max80_state::intrq_w)); + m_fdc->drq_wr_callback().set(FUNC(max80_state::drq_w)); + FLOPPY_CONNECTOR(config, "fdc:0", max80_floppies, "8ssdd", max80_state::floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, "fdc:1", max80_floppies, nullptr, max80_state::floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, "fdc:2", max80_floppies, nullptr, max80_state::floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, "fdc:3", max80_floppies, nullptr, max80_state::floppy_formats).enable_sound(true); + + Z80PIO(config, m_pio, 15'200'000 / 3); + m_pio->in_pa_callback().set(FUNC(max80_state::pio_pa_r)); + m_pio->out_pa_callback().set(FUNC(max80_state::pio_pa_w)); + m_pio->out_pb_callback().set(FUNC(max80_state::pio_pb_w)); + + COM8116(config, m_brg, 5'068'800); // A few gates wired up as an oscillator. Frequency guessed. + m_brg->fr_handler().set(m_uart, FUNC(z80sio_device::rxca_w)); + m_brg->ft_handler().set(m_uart, FUNC(z80sio_device::rxcb_w)); + + MSM5832(config, m_rtc, 32.768_kHz_XTAL); + + Z80SIO(config, m_uart, 15'200'000 / 3); + + /* sound hardware */ + SPEAKER(config, "mono").front_center(); + BEEP(config, m_beep, 800).add_route(ALL_OUTPUTS, "mono", 0.50); + TIMER(config, m_beep_timer).configure_generic(FUNC(max80_state::beep_timer)); +} + + +/*************************************************************************** + + Game driver(s) + +***************************************************************************/ + + +ROM_START(max80) + ROM_REGION(0x0200, "maincpu",0) + ROM_LOAD("max80.e12", 0x0000, 0x0200, CRC(cf316f25) SHA1(78663711c6100a67ef18382284565feda2bbbf77) ) +ROM_END + +// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS +COMP( 1982, max80, 0, trs80l2, max80, max80, max80_state, empty_init, "Lobo Systems", "MAX-80", MACHINE_NOT_WORKING ) //| MACHINE_SUPPORTS_SAVE ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/mechatt.cpp mame-0.231+dfsg.1/src/mame/drivers/mechatt.cpp --- mame-0.230+dfsg.1/src/mame/drivers/mechatt.cpp 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/mechatt.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,733 @@ +// license:BSD-3-Clause +// copyright-holders:Bryan McPhail +/*************************************************************************** + + Mechanized Attack A8002 (c) 1989 SNK Corporation + + Compared to Beast Busters (A9003), Mechanized Attack (A8002) is an + earlier design, it only has one sprite chip, no eeprom, and only 2 + machine guns, but the tilemaps are twice the size. + + ---------------------------------------------------------------------------------------- + + Stephh's notes (based on the games M68000 code and some tests) : + + 2) 'mechatt' + + - Country/version is stored at 0x06a000.w and the possible values are : + + Value Country + 0x0000 Japan + 0x1111 World (value stored in the current set) + 0x2222 US + 0x3333 Asia? (it looks like Japanese text but some "symbols" are missing) + + 2a) Japan version + + - All texts are in Japanese. + - "(c) 1989 (Corp) S-N-K". + - "Coin Slots" Dip Switch has no effect. + - "Coin A" and "Coin B" Dip Switches are the same as in the World version. + - Coin buttons effect : + + * "Coin Slots" are ALWAYS considered as "Common" : + + . COIN1 : adds coin(s)/credit(s) depending on "Coin A" Dip Switch + . COIN2 : adds coin(s)/credit(s) depending on "Coin B" Dip Switch + . COIN3 : NO EFFECT ! + . COIN4 : NO EFFECT ! + . SERVICE1 : adds coin(s)/credit(s) depending on "Coin A" Dip Switch + + 2b) World version + + - All texts are in English. + - "(c) 1989 SNK Corporation". + - Coin buttons effect : + + * "Coin Slots" Dip Switch set to "Common" : + + . COIN1 : adds coin(s)/credit(s) depending on "Coin A" Dip Switch + . COIN2 : adds coin(s)/credit(s) depending on "Coin B" Dip Switch + . COIN3 : NO EFFECT ! + . COIN4 : NO EFFECT ! + . SERVICE1 : adds coin(s)/credit(s) depending on "Coin A" Dip Switch + + * "Coin Slots" Dip Switch set to "Individual" : + + . COIN1 : adds coin(s)/credit(s) for player 1 depending on "Coin A" Dip Switch + . COIN2 : adds coin(s)/credit(s) for player 1 depending on "Coin B" Dip Switch + . COIN3 : adds coin(s)/credit(s) for player 2 depending on "Coin A" Dip Switch + . COIN4 : adds coin(s)/credit(s) for player 2 depending on "Coin B" Dip Switch + . SERVICE1 : adds coin(s)/credit(s) for all players depending on "Coin A" Dip Switch + + 2c) US version + + - All texts are in English. + - "(c) 1989 SNK Corp. of America". + - Additional FBI logo as first screen as well as small FBI notice at the bottom left + of the screens until a coin is inserted. + - "Coin Slots" Dip Switch has no effect. + - "Coin A" Dip Switch is different from the World version : + + World US + 4C_1C "Free Play" + 3C_1C special (see below) + 2C_1C "2 Coins to Start, 1 to Continue" + 1C_1C 1C_1C + + It's a bit hard to explain the "special" coinage, so here are some infos : + + * when you insert a coin before starting a game, you are awarded 2 credits + if credits == 0, else you are awarded 1 credit + * when you insert a coin to continue, you are ALWAYS awarded 1 credit + + - "Coin B" Dip Switch has no effect. + + - Coin buttons effect : + + * "Coin Slots" are ALWAYS considered as "Individual" : + + . COIN1 : adds coin(s)/credit(s) for player 1 depending on "Coin A" Dip Switch + . COIN2 : adds coin(s)/credit(s) for player 2 depending on "Coin A" Dip Switch + . COIN3 : NO EFFECT ! + . COIN4 : NO EFFECT ! + . SERVICE1 : adds coin(s)/credit(s) for all players depending on "Coin A" Dip Switch + + 2d) Asia? version + + - All texts are in Japanese ? (to be confirmed) + - "(c) 1989 SNK Corporation". + - "Coin Slots" Dip Switch has no effect. + - "Coin A" and "Coin B" Dip Switches are the same as in the World version. + - Coin buttons effect : + + * "Coin Slots" are ALWAYS considered as "Common" : + + . COIN1 : adds coin(s)/credit(s) depending on "Coin A" Dip Switch + . COIN2 : adds coin(s)/credit(s) depending on "Coin B" Dip Switch + . COIN3 : NO EFFECT ! + . COIN4 : NO EFFECT ! + . SERVICE1 : adds coin(s)/credit(s) depending on "Coin A" Dip Switch + + ---------------------------------------------------------------------------------------- + + HIGHWAYMAN's notes: + + after adding the mechanized attack u.s. roms I suspect that there is more than just a few bytes changed ;-) + + ---------------------------------------------------------------------------------------- + + Mech Attack Region code works as follows + + ROM[0x06a000/2] = (data << 12) | (data << 8) | (data << 4) | (data << 0); + + Country : + - 0x0000 : Japan + - 0x1111 : World (default) + - 0x2222 : US + - 0x3333 : Asia? + +***************************************************************************/ + +#include "emu.h" + +// src/mame +#include "video/snk_bbusters_spr.h" +// src/devices +#include "cpu/z80/z80.h" +#include "cpu/m68000/m68000.h" +#include "machine/gen_latch.h" +#include "sound/ym2608.h" +#include "video/bufsprite.h" +// src/emu +#include "emupal.h" +#include "screen.h" +#include "speaker.h" +#include "tilemap.h" + +namespace { + +class mechatt_state : public driver_device +{ +public: + mechatt_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_screen(*this, "screen"), + m_gfxdecode(*this, "gfxdecode"), + m_sprites(*this, "sprites1"), + m_spriteram(*this, "spriteram1"), + m_soundlatch(*this, "soundlatch%u", 1U), + m_tx_videoram(*this, "tx_videoram"), + m_pf_data(*this, "pf%u_data", 1U), + m_pf_scroll_data(*this, "pf%u_scroll_data", 1U), + m_gun_io(*this, { "GUNX1", "GUNY1", "GUNX2", "GUNY2" }), + m_gun_recoil(*this, "Player%u_Gun_Recoil", 1U) + { } + + void mechatt(machine_config &config); + +protected: + virtual void machine_start() override; + virtual void video_start() override; + +private: + required_device m_maincpu; + required_device m_audiocpu; + required_device m_screen; + required_device m_gfxdecode; + required_device m_sprites; + required_device m_spriteram; + required_device_array m_soundlatch; + required_shared_ptr m_tx_videoram; + required_shared_ptr_array m_pf_data; + required_shared_ptr_array m_pf_scroll_data; + required_ioport_array<4> m_gun_io; + output_finder<2> m_gun_recoil; + + tilemap_t *m_fix_tilemap; + tilemap_t *m_pf_tilemap[2]; + + TILE_GET_INFO_MEMBER(get_tile_info); + template TILE_GET_INFO_MEMBER(get_pf_tile_info); + + void sound_cpu_w(uint8_t data); + void video_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + template void pf_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + void coin_counter_w(uint8_t data); + + void mechatt_map(address_map &map); + void sound_map(address_map &map); + void sounda_portmap(address_map &map); + + void two_gun_output_w(uint16_t data); + uint16_t mechatt_gun_r(offs_t offset); + + template + void mix_sprites(bitmap_ind16 &bitmap, bitmap_ind16 &srcbitmap, const rectangle &cliprect, Proc MIX); + + bitmap_ind16 m_bitmap_sprites; + uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); +}; + +/******************************************************************************/ + +void mechatt_state::machine_start() +{ + m_gun_recoil.resolve(); +} + +void mechatt_state::sound_cpu_w(uint8_t data) +{ + m_soundlatch[0]->write(data); + m_audiocpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero); +} + +template +void mechatt_state::pf_w(offs_t offset, uint16_t data, uint16_t mem_mask) +{ + COMBINE_DATA(&m_pf_data[Layer][offset]); + m_pf_tilemap[Layer]->mark_tile_dirty(offset); +} + +void mechatt_state::coin_counter_w(uint8_t data) +{ + machine().bookkeeping().coin_counter_w(0, BIT(data, 0)); + machine().bookkeeping().coin_counter_w(1, BIT(data, 1)); +} + + +TILE_GET_INFO_MEMBER(mechatt_state::get_tile_info) +{ + uint16_t tile = m_tx_videoram[tile_index]; + tileinfo.set(0, tile&0xfff, tile>>12, 0); +} + +template +TILE_GET_INFO_MEMBER(mechatt_state::get_pf_tile_info) +{ + uint16_t tile = m_pf_data[Layer][tile_index]; + tileinfo.set(Gfx, tile&0xfff, tile>>12, 0); +} + +void mechatt_state::video_w(offs_t offset, uint16_t data, uint16_t mem_mask) +{ + COMBINE_DATA(&m_tx_videoram[offset]); + m_fix_tilemap->mark_tile_dirty(offset); +} + +/******************************************************************************/ + +void mechatt_state::video_start() +{ + m_fix_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(mechatt_state::get_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); + m_fix_tilemap->set_transparent_pen(15); + + m_pf_tilemap[0] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, NAME((&mechatt_state::get_pf_tile_info<0, 1>))), TILEMAP_SCAN_COLS, 16, 16, 256, 32); + m_pf_tilemap[1] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, NAME((&mechatt_state::get_pf_tile_info<1, 2>))), TILEMAP_SCAN_COLS, 16, 16, 256, 32); + + m_pf_tilemap[0]->set_transparent_pen(15); + + m_screen->register_screen_bitmap(m_bitmap_sprites); + m_bitmap_sprites.fill(0xffff); +} + +template +void mechatt_state::mix_sprites(bitmap_ind16 &bitmap, bitmap_ind16 &srcbitmap, const rectangle &cliprect, Proc MIX) +{ + for (int y = cliprect.min_y; y <= cliprect.max_y; y++) + { + uint16_t *srcbuf = &srcbitmap.pix(y); + uint16_t *dstbuf = &bitmap.pix(y); + for (int x = cliprect.min_x; x <= cliprect.max_x; x++) + { + uint16_t srcdat = srcbuf[x]; + if ((srcdat & 0xf) != 0xf) + MIX(srcdat, x, dstbuf); + } + } +} + +uint32_t mechatt_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +{ + m_bitmap_sprites.fill(0xffff); + m_sprites->draw_sprites(m_bitmap_sprites, cliprect); + + m_pf_tilemap[0]->set_scrollx(0, m_pf_scroll_data[0][0]); + m_pf_tilemap[0]->set_scrolly(0, m_pf_scroll_data[0][1]); + m_pf_tilemap[1]->set_scrollx(0, m_pf_scroll_data[1][0]); + m_pf_tilemap[1]->set_scrolly(0, m_pf_scroll_data[1][1]); + + m_pf_tilemap[1]->draw(screen, bitmap, cliprect, 0, 0); + + // during level 3, plane sprites must rise from the underground, obscured by the fg tilemap + mix_sprites(bitmap, m_bitmap_sprites, cliprect, [](uint16_t srcdat, uint16_t x, uint16_t* dstbuf) { if ((srcdat & 0xc0) == 0xc0) dstbuf[x] = srcdat + 256; } ); + m_pf_tilemap[0]->draw(screen, bitmap, cliprect, 0, 0); + mix_sprites(bitmap, m_bitmap_sprites, cliprect, [](uint16_t srcdat, uint16_t x, uint16_t* dstbuf) { if ((srcdat & 0xc0) != 0xc0) dstbuf[x] = srcdat + 256; } ); + + m_fix_tilemap->draw(screen, bitmap, cliprect, 0, 0); + return 0; +} + +/*******************************************************************************/ + +void mechatt_state::two_gun_output_w(uint16_t data) +{ + for (int i = 0; i < 2; i++) + m_gun_recoil[i] = BIT(data, i); +} + +uint16_t mechatt_state::mechatt_gun_r(offs_t offset) +{ + int x = m_gun_io[offset ? 2 : 0]->read(); + int y = m_gun_io[offset ? 3 : 1]->read(); + + // TODO - does the hardware really clamp like this? + x += 0x18; + if (x > 0xff) x = 0xff; + if (y > 0xef) y = 0xef; + + return x | (y << 8); +} + +void mechatt_state::mechatt_map(address_map &map) +{ + map(0x000000, 0x06ffff).rom(); + map(0x070000, 0x07ffff).ram().share("ram"); + map(0x090000, 0x090fff).ram().w(FUNC(mechatt_state::video_w)).share("tx_videoram"); + map(0x0a0000, 0x0a0fff).ram().share("spriteram1"); + map(0x0a1000, 0x0a7fff).nopw(); + map(0x0b0000, 0x0b3fff).ram().w(FUNC(mechatt_state::pf_w<0>)).share("pf1_data"); + map(0x0b8000, 0x0b8003).writeonly().share("pf1_scroll_data"); + map(0x0c0000, 0x0c3fff).ram().w(FUNC(mechatt_state::pf_w<1>)).share("pf2_data"); + map(0x0c8000, 0x0c8003).writeonly().share("pf2_scroll_data"); + map(0x0d0000, 0x0d07ff).ram().w("palette", FUNC(palette_device::write16)).share("palette"); + map(0x0e0000, 0x0e0001).portr("IN0"); + map(0x0e0002, 0x0e0003).portr("DSW1"); + map(0x0e0004, 0x0e0007).r(FUNC(mechatt_state::mechatt_gun_r)); + map(0x0e4000, 0x0e4001).w(FUNC(mechatt_state::coin_counter_w)); + map(0x0e4002, 0x0e4003).w(FUNC(mechatt_state::two_gun_output_w)); + map(0x0e8001, 0x0e8001).r(m_soundlatch[1], FUNC(generic_latch_8_device::read)).w(FUNC(mechatt_state::sound_cpu_w)); +} + +/******************************************************************************/ + +void mechatt_state::sound_map(address_map &map) +{ + map(0x0000, 0xefff).rom(); + map(0xf000, 0xf7ff).ram(); + map(0xf800, 0xf800).r(m_soundlatch[0], FUNC(generic_latch_8_device::read)).w(m_soundlatch[1], FUNC(generic_latch_8_device::write)); +} + +void mechatt_state::sounda_portmap(address_map &map) +{ + map.global_mask(0xff); + map(0x00, 0x03).rw("ymsnd", FUNC(ym2608_device::read), FUNC(ym2608_device::write)); + map(0xc0, 0xc1).nopw(); // -> Main CPU +} + +/******************************************************************************/ + +static INPUT_PORTS_START( mechatt ) + PORT_START("IN0") + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) + PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 ) // See notes + PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_COIN3 ) + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_COIN4 ) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) + PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("P1 Fire") // "Fire" + PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("P1 Grenade") // "Grenade" + PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_START2 ) + PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("P2 Fire") // "Fire" + PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("P2 Grenade") // "Grenade" + PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_START("DSW1") + PORT_DIPNAME( 0x0001, 0x0001, "Coin Slots" ) PORT_DIPLOCATION("SW1:1") // Listed as "Unused" (manual from different revision/region?), See notes + PORT_DIPSETTING( 0x0001, "Common" ) + PORT_DIPSETTING( 0x0000, "Individual" ) + PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW1:2") + PORT_DIPSETTING( 0x0000, DEF_STR( No ) ) + PORT_DIPSETTING( 0x0002, DEF_STR( Yes ) ) + PORT_DIPNAME( 0x000c, 0x000c, "Magazine / Grenade" ) PORT_DIPLOCATION("SW1:3,4") + PORT_DIPSETTING( 0x0008, "5 / 2" ) + PORT_DIPSETTING( 0x000c, "6 / 3" ) + PORT_DIPSETTING( 0x0004, "7 / 4" ) + PORT_DIPSETTING( 0x0000, "8 / 5" ) + PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW1:5,6") // See notes + PORT_DIPSETTING( 0x0000, DEF_STR( 4C_1C ) ) + PORT_DIPSETTING( 0x0010, DEF_STR( 3C_1C ) ) + PORT_DIPSETTING( 0x0020, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x0030, DEF_STR( 1C_1C ) ) + PORT_DIPNAME( 0x00c0, 0x00c0, DEF_STR( Coin_B ) ) PORT_DIPLOCATION("SW1:7,8") // Listed as "Unused" (manual from different revision/region?), See notes + PORT_DIPSETTING( 0x00c0, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x0080, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0x0040, DEF_STR( 1C_3C ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( 1C_4C ) ) + PORT_DIPNAME( 0x0300, 0x0300, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW2:1,2") + PORT_DIPSETTING( 0x0200, DEF_STR( Easy ) ) + PORT_DIPSETTING( 0x0300, DEF_STR( Normal ) ) + PORT_DIPSETTING( 0x0100, DEF_STR( Hard ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( Hardest ) ) + PORT_DIPNAME( 0x0c00, 0x0c00, "Game Mode" ) PORT_DIPLOCATION("SW2:3,4") + PORT_DIPSETTING( 0x0800, "Demo Sounds Off" ) + PORT_DIPSETTING( 0x0c00, "Demo Sounds On" ) + PORT_DIPSETTING( 0x0400, "Infinite Energy (Cheat)") + PORT_DIPSETTING( 0x0000, "Freeze" ) + PORT_DIPUNUSED_DIPLOC(0x1000, 0x1000, "SW2:5" ) /* Listed as "Unused" */ + PORT_DIPUNUSED_DIPLOC(0x2000, 0x2000, "SW2:6" ) /* Listed as "Unused" */ + PORT_DIPUNUSED_DIPLOC(0x4000, 0x4000, "SW2:7" ) /* Listed as "Unused" */ + PORT_SERVICE_DIPLOC( 0x8000, IP_ACTIVE_LOW, "SW2:8" ) + + PORT_START("GUNX1") + PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(10) PORT_PLAYER(1) + PORT_START("GUNY1") + PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(10) PORT_PLAYER(1) + + PORT_START("GUNX2") + PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(10) PORT_PLAYER(2) + PORT_START("GUNY2") + PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(10) PORT_PLAYER(2) +INPUT_PORTS_END + +static INPUT_PORTS_START( mechattj ) + PORT_INCLUDE( mechatt ) + + PORT_MODIFY("DSW1") + PORT_DIPUNUSED_DIPLOC( 0x0001, 0x0001, "SW1:1" ) +INPUT_PORTS_END + +static INPUT_PORTS_START( mechattu ) + PORT_INCLUDE( mechatt ) + + PORT_MODIFY("DSW1") + PORT_DIPUNUSED_DIPLOC( 0x0001, 0x0001, "SW1:1" ) + PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:5,6") + PORT_DIPSETTING( 0x0000, DEF_STR( Free_Play ) ) + PORT_DIPSETTING( 0x0010, "1 Coin/2 Credits first, then 1 Coin/1 Credit" ) + PORT_DIPSETTING( 0x0020, "2 Coins/1 Credit first, then 1 Coin/1 Credit" ) + PORT_DIPSETTING( 0x0030, DEF_STR( 1C_1C ) ) + PORT_DIPUNUSED_DIPLOC( 0x00c0, 0x00c0, "SW1:7,8" ) +INPUT_PORTS_END + +static INPUT_PORTS_START( mechattu1 ) + PORT_INCLUDE( mechattu ) + + PORT_MODIFY("IN0") + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNUSED ) + + PORT_MODIFY("GUNX2") + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) + PORT_MODIFY("GUNY2") + PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED ) +INPUT_PORTS_END + +/******************************************************************************/ + +static const gfx_layout charlayout = +{ + 8,8, + RGN_FRAC(1,1), + 4, + { STEP4(0,1) }, + { STEP8(0,4) }, + { STEP8(0,4*8) }, + 32*8 +}; + +static const gfx_layout tilelayout = +{ + 16,16, /* 16*16 sprites */ + RGN_FRAC(1,1), + 4, /* 4 bits per pixel */ + { STEP4(0,1) }, + { STEP8(0,4), STEP8(4*8*16,4) }, + { STEP16(0,4*8) }, + 128*8 +}; + +static GFXDECODE_START( gfx_mechatt ) + GFXDECODE_ENTRY( "tx_tiles", 0, charlayout, 0, 16 ) + GFXDECODE_ENTRY( "gfx3", 0, tilelayout, 512, 16 ) + GFXDECODE_ENTRY( "gfx4", 0, tilelayout, 768, 16 ) +GFXDECODE_END + + +/******************************************************************************/ + +void mechatt_state::mechatt(machine_config &config) +{ + /* basic machine hardware */ + M68000(config, m_maincpu, 12000000); + m_maincpu->set_addrmap(AS_PROGRAM, &mechatt_state::mechatt_map); + m_maincpu->set_vblank_int("screen", FUNC(mechatt_state::irq4_line_hold)); + + Z80(config, m_audiocpu, 4000000); /* Accurate */ + m_audiocpu->set_addrmap(AS_PROGRAM, &mechatt_state::sound_map); + m_audiocpu->set_addrmap(AS_IO, &mechatt_state::sounda_portmap); + + /* video hardware */ + screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); + screen.set_refresh_hz(60); + screen.set_size(64*8, 32*8); + screen.set_visarea(0*8, 32*8-1, 2*8, 30*8-1); + screen.set_screen_update(FUNC(mechatt_state::screen_update)); + screen.screen_vblank().set(m_spriteram, FUNC(buffered_spriteram16_device::vblank_copy_rising)); + screen.set_palette("palette"); + + GFXDECODE(config, m_gfxdecode, "palette", gfx_mechatt); + PALETTE(config, "palette").set_format(palette_device::RGBx_444, 1024); + + BUFFERED_SPRITERAM16(config, m_spriteram); + + SNK_BBUSTERS_SPR(config, m_sprites, 0); + m_sprites->set_scaletable_tag("sprites1:scale_table"); + m_sprites->set_palette("palette"); + m_sprites->set_spriteram_tag("spriteram1"); + + /* sound hardware */ + SPEAKER(config, "lspeaker").front_left(); + SPEAKER(config, "rspeaker").front_right(); + + GENERIC_LATCH_8(config, m_soundlatch[0]); + GENERIC_LATCH_8(config, m_soundlatch[1]); + + ym2608_device &ymsnd(YM2608(config, "ymsnd", 8000000)); + ymsnd.irq_handler().set_inputline("audiocpu", 0); + ymsnd.add_route(0, "lspeaker", 0.15); + ymsnd.add_route(0, "rspeaker", 0.15); + ymsnd.add_route(1, "lspeaker", 0.80); + ymsnd.add_route(2, "rspeaker", 0.80); +} + +/******************************************************************************/ + +ROM_START( mechatt ) + ROM_REGION( 0x80000, "maincpu", 0 ) // Located on the A8002-1 main board + ROM_LOAD16_BYTE( "ma5-e.n12", 0x000000, 0x20000, CRC(9bbb852a) SHA1(34b696bf79cf53cac1c384a3143c0f3f243a71f3) ) + ROM_LOAD16_BYTE( "ma4.l12", 0x000001, 0x20000, CRC(0d414918) SHA1(0d51b893d37ba124b983beebb691e65bdc52d300) ) + ROM_LOAD16_BYTE( "ma7.n13", 0x040000, 0x20000, CRC(61d85e1b) SHA1(46234d48ac21c481a5e70c6a654a341ebdd4cd3a) ) + ROM_LOAD16_BYTE( "ma6-f.l13", 0x040001, 0x20000, CRC(4055fe8d) SHA1(b4d8bd5f73805ce1c332eff657dddbb88ff45b37) ) + + ROM_REGION( 0x10000, "audiocpu", 0 ) // Located on the A8002-1 main board + ROM_LOAD( "ma_3.e13", 0x000000, 0x10000, CRC(c06cc8e1) SHA1(65f5f1901120d633f7c3ba07432a188fd7fd7272) ) + + ROM_REGION( 0x020000, "tx_tiles", 0 ) // Located on the A8002-2 board + ROM_LOAD( "ma_1.l2", 0x000000, 0x10000, CRC(24766917) SHA1(9082a8ae849605ce65b5a0493ae69cfe282f7e7b) ) + + ROM_REGION( 0x200000, "sprites1", 0 ) // Located on the A8002-2 board + ROM_LOAD16_WORD_SWAP( "mao89p13.bin", 0x000000, 0x80000, CRC(8bcb16cf) SHA1(409ee1944188d9ce39adce29b1df029b560dd5b0) ) + ROM_LOAD16_WORD_SWAP( "ma189p15.bin", 0x080000, 0x80000, CRC(b84d9658) SHA1(448adecb0067d8f5b219ec2f94a8dec84187a554) ) + ROM_LOAD16_WORD_SWAP( "ma289p17.bin", 0x100000, 0x80000, CRC(6cbe08ac) SHA1(8f81f6e92b84ab6867452011d52f3e7689c62a1a) ) + ROM_LOAD16_WORD_SWAP( "ma389m15.bin", 0x180000, 0x80000, CRC(34d4585e) SHA1(38d9fd5d775e4b3c8b8b487a6ba9b8bdcb3274b0) ) + + ROM_REGION( 0x80000, "gfx3", 0 ) // Located on the A8002-2 board + ROM_LOAD( "mab189a2.bin", 0x000000, 0x80000, CRC(e1c8b4d0) SHA1(2f8a1839cca892f8380c7cffe7a12e615d38fd55) ) + + ROM_REGION( 0x80000, "gfx4", 0 ) // Located on the A8002-2 board + ROM_LOAD( "mab289c2.bin", 0x000000, 0x80000, CRC(14f97ceb) SHA1(a22033532ea616dc3a3db8b66ad6ccc6172ed7cc) ) + + ROM_REGION( 0x20000, "ymsnd", 0 ) // Located on the A8002-1 main board + ROM_LOAD( "ma_2.d10", 0x000000, 0x20000, CRC(ea4cc30d) SHA1(d8f089fc0ce76309411706a8110ad907f93dc97e) ) + + ROM_REGION( 0x20000, "sprites1:scale_table", 0 ) // Zoom table - Located on the A8002-2 board + ROM_LOAD( "ma_8.f10", 0x000000, 0x10000, CRC(61f3de03) SHA1(736f9634fe054ea68a2aa90a743bd0dc320f23c9) ) + ROM_LOAD( "ma_9.f12", 0x000000, 0x10000, CRC(61f3de03) SHA1(736f9634fe054ea68a2aa90a743bd0dc320f23c9) ) // identical to ma_8.f10 +ROM_END + +ROM_START( mechattj ) // Uses EPROMs on official SNK A8002-5 & A8002-6 sub boards instead of MaskROMs + ROM_REGION( 0x80000, "maincpu", 0 ) // Located on the A8002-1 main board + ROM_LOAD16_BYTE( "ma5j.n12", 0x000000, 0x20000, CRC(e6bb5952) SHA1(3b01eccc20d99fd33ff8e303afa902abb66e1036) ) + ROM_LOAD16_BYTE( "ma4j.l12", 0x000001, 0x20000, CRC(c78baa62) SHA1(c3554698fbc94e3625269c5cb1fc664364f3fb3f) ) + ROM_LOAD16_BYTE( "ma7j.n13", 0x040000, 0x20000, CRC(12a68fc2) SHA1(c935788723d8ea3bfe99244b8c7b2aff85579912) ) + ROM_LOAD16_BYTE( "ma6j.l13", 0x040001, 0x20000, CRC(332b2f54) SHA1(c768f5437a20ea406523d3de9e1ea807b39e1622) ) + + ROM_REGION( 0x10000, "audiocpu", 0 ) // Located on the A8002-1 main board + ROM_LOAD( "ma_3.e13", 0x000000, 0x10000, CRC(c06cc8e1) SHA1(65f5f1901120d633f7c3ba07432a188fd7fd7272) ) + + ROM_REGION( 0x020000, "tx_tiles", 0 ) // Located on the A8002-2 board + ROM_LOAD( "ma_1.l2", 0x000000, 0x10000, CRC(24766917) SHA1(9082a8ae849605ce65b5a0493ae69cfe282f7e7b) ) + + ROM_REGION( 0x200000, "sprites1", 0 ) // Located on the A8002-6 sub board + ROM_LOAD16_BYTE( "s_9.a1", 0x000001, 0x20000, CRC(6e8e194c) SHA1(02bbd573a322a3f7f8e92ccceebffdd598b5489e) ) // these 4 == mao89p13.bin + ROM_LOAD16_BYTE( "s_1.b1", 0x000000, 0x20000, CRC(fd9161ed) SHA1(b3e2434dd9cb1cafe1022774b863b5f1a008a9d2) ) + ROM_LOAD16_BYTE( "s_10.a2", 0x040001, 0x20000, CRC(fad6a1ab) SHA1(5347b4493c8004dc8cedc0b37aba494f203142b8) ) + ROM_LOAD16_BYTE( "s_2.b2", 0x040000, 0x20000, CRC(549056f0) SHA1(f515aa98ab25f3735dbfdefcb8d55ba3b2075b70) ) + ROM_LOAD16_BYTE( "s_11.a3", 0x080001, 0x20000, CRC(3887a382) SHA1(b40861fc1414b2fa299772e76a78cb8dc00b71b7) ) // these 4 == ma189p15.bin + ROM_LOAD16_BYTE( "s_3.b3", 0x080000, 0x20000, CRC(cb99f565) SHA1(9ed1b21f4a33b9a614bca38610378857560cdaba) ) + ROM_LOAD16_BYTE( "s_12.a4", 0x0c0001, 0x20000, CRC(63417b49) SHA1(786249fa7e8770de5b5882debdc2913d58e9170e) ) + ROM_LOAD16_BYTE( "s_4.b4", 0x0c0000, 0x20000, CRC(d739d48a) SHA1(04d2ecea72b6e651b815865946c9c9cfae4e5c4d) ) + ROM_LOAD16_BYTE( "s_13.a5", 0x100001, 0x20000, CRC(eccd47b6) SHA1(6b9c63fee97a7568114f227a89a1effd6b04806a) ) // these 4 == ma289p17.bin + ROM_LOAD16_BYTE( "s_5.b5", 0x100000, 0x20000, CRC(e15244da) SHA1(ebf3072565c53d0098d373b5093ba6918c4eddae) ) + ROM_LOAD16_BYTE( "s_14.a6", 0x140001, 0x20000, CRC(bbbf0461) SHA1(c5299ab1d45f685a5d160492247cf1303ef6937a) ) + ROM_LOAD16_BYTE( "s_6.b6", 0x140000, 0x20000, CRC(4ee89f75) SHA1(bda0e9095da2d424faac341fd934000a621796eb) ) + ROM_LOAD16_BYTE( "s_15.a7", 0x180001, 0x20000, CRC(cde29bad) SHA1(24c1b43c6d717eaaf7c01ec7de89837947334224) ) // these 4 == ma389m15.bin + ROM_LOAD16_BYTE( "s_7.b7", 0x180000, 0x20000, CRC(065ed221) SHA1(c03ca5b4d1198939a57b5fccf6a79d70afe1faaf) ) + ROM_LOAD16_BYTE( "s_16.a8", 0x1c0001, 0x20000, CRC(70f28040) SHA1(91012728953563fcc576725337e6ba7e1b49d1ba) ) + ROM_LOAD16_BYTE( "s_8.b8", 0x1c0000, 0x20000, CRC(a6f8574f) SHA1(87c041669b2eaec495ae10a6f45b6668accb92bf) ) + + ROM_REGION( 0x80000, "gfx3", 0 ) // these 4 == mab189a2.bin - Located on the A8002-5 sub board + ROM_LOAD( "s_21.b3", 0x000000, 0x20000, CRC(701a0072) SHA1(b03b6fa18e0cfcd5c7c541025fa2d3632d2f8387) ) + ROM_LOAD( "s_22.b4", 0x020000, 0x20000, CRC(34e6225c) SHA1(f6335084f4f4c7a4b6528e6ad74962b88f81e3bc) ) + ROM_LOAD( "s_23.b5", 0x040000, 0x20000, CRC(9a7399d3) SHA1(04e0327b0da75f621b51e1831cbdc4537082e32b) ) + ROM_LOAD( "s_24.b6", 0x060000, 0x20000, CRC(f097459d) SHA1(466364677f048519eb2894ddecf76f5c52f6afe9) ) + + ROM_REGION( 0x80000, "gfx4", 0 ) // these 4 == mab289c2.bin - Located on the A8002-5 sub board + ROM_LOAD( "s_17.a3", 0x000000, 0x20000, CRC(cc47c4a3) SHA1(140f53b671b4eaed6fcc516c4018f07a6d7c2290) ) + ROM_LOAD( "s_18.a4", 0x020000, 0x20000, CRC(a04377e8) SHA1(841c6c3073b137f6a5c875db32039186c014f785) ) + ROM_LOAD( "s_19.a5", 0x040000, 0x20000, CRC(b07f5289) SHA1(8817bd225edf9b0fa439b220617f925365e39253) ) + ROM_LOAD( "s_20.a6", 0x060000, 0x20000, CRC(a9bb4fa9) SHA1(ccede784671a864667b92a8101d686c26c78d76f) ) + + ROM_REGION( 0x20000, "ymsnd", 0 ) // Located on the A8002-1 main board + ROM_LOAD( "ma_2.d10", 0x000000, 0x20000, CRC(ea4cc30d) SHA1(d8f089fc0ce76309411706a8110ad907f93dc97e) ) + + ROM_REGION( 0x20000, "sprites1:scale_table", 0 ) // Zoom table - Located on the A8002-2 board + ROM_LOAD( "ma_8.f10", 0x000000, 0x10000, CRC(61f3de03) SHA1(736f9634fe054ea68a2aa90a743bd0dc320f23c9) ) + ROM_LOAD( "ma_9.f12", 0x000000, 0x10000, CRC(61f3de03) SHA1(736f9634fe054ea68a2aa90a743bd0dc320f23c9) ) // identical to ma_8.f10 +ROM_END + +ROM_START( mechattu ) + ROM_REGION( 0x80000, "maincpu", 0 ) // Located on the A8002-1 main board + ROM_LOAD16_BYTE( "ma5u.n12", 0x000000, 0x20000, CRC(485ea606) SHA1(0c499f08d7c6d861ba7c50a8f577823613a7923c) ) + ROM_LOAD16_BYTE( "ma4u.l12", 0x000001, 0x20000, CRC(09fa31ec) SHA1(008abb2e09f83614c277471e534f20cba3e354d7) ) + ROM_LOAD16_BYTE( "ma7u.n13", 0x040000, 0x20000, CRC(f45b2c70) SHA1(65523d202d378bab890f1f7bffdde152dd246d4a) ) + ROM_LOAD16_BYTE( "ma6u.l13", 0x040001, 0x20000, CRC(d5d68ce6) SHA1(16057d882781015f6d1c7bb659e0812a8459c3f0) ) + + ROM_REGION( 0x10000, "audiocpu", 0 ) // Located on the A8002-1 main board + ROM_LOAD( "ma_3.e13", 0x000000, 0x10000, CRC(c06cc8e1) SHA1(65f5f1901120d633f7c3ba07432a188fd7fd7272) ) + + ROM_REGION( 0x020000, "tx_tiles", 0 ) // Located on the A8002-2 board + ROM_LOAD( "ma_1.l2", 0x000000, 0x10000, CRC(24766917) SHA1(9082a8ae849605ce65b5a0493ae69cfe282f7e7b) ) + + ROM_REGION( 0x200000, "sprites1", 0 ) // Located on the A8002-2 board + ROM_LOAD16_WORD_SWAP( "mao89p13.bin", 0x000000, 0x80000, CRC(8bcb16cf) SHA1(409ee1944188d9ce39adce29b1df029b560dd5b0) ) + ROM_LOAD16_WORD_SWAP( "ma189p15.bin", 0x080000, 0x80000, CRC(b84d9658) SHA1(448adecb0067d8f5b219ec2f94a8dec84187a554) ) + ROM_LOAD16_WORD_SWAP( "ma289p17.bin", 0x100000, 0x80000, CRC(6cbe08ac) SHA1(8f81f6e92b84ab6867452011d52f3e7689c62a1a) ) + ROM_LOAD16_WORD_SWAP( "ma389m15.bin", 0x180000, 0x80000, CRC(34d4585e) SHA1(38d9fd5d775e4b3c8b8b487a6ba9b8bdcb3274b0) ) + + ROM_REGION( 0x80000, "gfx3", 0 ) // Located on the A8002-2 board + ROM_LOAD( "mab189a2.bin", 0x000000, 0x80000, CRC(e1c8b4d0) SHA1(2f8a1839cca892f8380c7cffe7a12e615d38fd55) ) + + ROM_REGION( 0x80000, "gfx4", 0 ) // Located on the A8002-2 board + ROM_LOAD( "mab289c2.bin", 0x000000, 0x80000, CRC(14f97ceb) SHA1(a22033532ea616dc3a3db8b66ad6ccc6172ed7cc) ) + + ROM_REGION( 0x20000, "ymsnd", 0 ) // Located on the A8002-1 main board + ROM_LOAD( "ma_2.d10", 0x000000, 0x20000, CRC(ea4cc30d) SHA1(d8f089fc0ce76309411706a8110ad907f93dc97e) ) + + ROM_REGION( 0x20000, "sprites1:scale_table", 0 ) // Zoom table - Located on the A8002-2 board + ROM_LOAD( "ma_8.f10", 0x000000, 0x10000, CRC(61f3de03) SHA1(736f9634fe054ea68a2aa90a743bd0dc320f23c9) ) + ROM_LOAD( "ma_9.f12", 0x000000, 0x10000, CRC(61f3de03) SHA1(736f9634fe054ea68a2aa90a743bd0dc320f23c9) ) // identical to ma_8.f10 +ROM_END + +/* does Ver1 on the roms mean it's a revision, the first version, or used because it's the single player version? */ +ROM_START( mechattu1 ) // Uses EPROMs on official SNK A8002-5 & A8002-6 sub boards instead of MaskROMs + ROM_REGION( 0x80000, "maincpu", 0 ) // Located on the A8002-1 main board + ROM_LOAD16_BYTE( "ma_ver1_5u.n12", 0x000000, 0x20000, CRC(dcd2e971) SHA1(e292b251c429b6990e97233e86360e5d43f573f2) ) + ROM_LOAD16_BYTE( "ma_ver1_4u.l12", 0x000001, 0x20000, CRC(69c8a85b) SHA1(07c6d395772a5e096e3ac42c5248eadccc146ad1) ) + ROM_LOAD16_BYTE( "ma7u.n13", 0x040000, 0x20000, CRC(f45b2c70) SHA1(65523d202d378bab890f1f7bffdde152dd246d4a) ) + ROM_LOAD16_BYTE( "ma6u.l13", 0x040001, 0x20000, CRC(d5d68ce6) SHA1(16057d882781015f6d1c7bb659e0812a8459c3f0) ) + + ROM_REGION( 0x10000, "audiocpu", 0 ) // Located on the A8002-1 main board + ROM_LOAD( "ma_3.e13", 0x000000, 0x10000, CRC(c06cc8e1) SHA1(65f5f1901120d633f7c3ba07432a188fd7fd7272) ) + + ROM_REGION( 0x020000, "tx_tiles", 0 ) // Located on the A8002-2 board + ROM_LOAD( "ma_1.l2", 0x000000, 0x10000, CRC(24766917) SHA1(9082a8ae849605ce65b5a0493ae69cfe282f7e7b) ) + + ROM_REGION( 0x200000, "sprites1", 0 ) // Located on the A8002-6 sub board + ROM_LOAD16_BYTE( "s_9.a1", 0x000001, 0x20000, CRC(6e8e194c) SHA1(02bbd573a322a3f7f8e92ccceebffdd598b5489e) ) // these 4 == mao89p13.bin + ROM_LOAD16_BYTE( "s_1.b1", 0x000000, 0x20000, CRC(fd9161ed) SHA1(b3e2434dd9cb1cafe1022774b863b5f1a008a9d2) ) + ROM_LOAD16_BYTE( "s_10.a2", 0x040001, 0x20000, CRC(fad6a1ab) SHA1(5347b4493c8004dc8cedc0b37aba494f203142b8) ) + ROM_LOAD16_BYTE( "s_2.b2", 0x040000, 0x20000, CRC(549056f0) SHA1(f515aa98ab25f3735dbfdefcb8d55ba3b2075b70) ) + ROM_LOAD16_BYTE( "s_11.a3", 0x080001, 0x20000, CRC(3887a382) SHA1(b40861fc1414b2fa299772e76a78cb8dc00b71b7) ) // these 4 == ma189p15.bin + ROM_LOAD16_BYTE( "s_3.b3", 0x080000, 0x20000, CRC(cb99f565) SHA1(9ed1b21f4a33b9a614bca38610378857560cdaba) ) + ROM_LOAD16_BYTE( "s_12.a4", 0x0c0001, 0x20000, CRC(63417b49) SHA1(786249fa7e8770de5b5882debdc2913d58e9170e) ) + ROM_LOAD16_BYTE( "s_4.b4", 0x0c0000, 0x20000, CRC(d739d48a) SHA1(04d2ecea72b6e651b815865946c9c9cfae4e5c4d) ) + ROM_LOAD16_BYTE( "s_13.a5", 0x100001, 0x20000, CRC(eccd47b6) SHA1(6b9c63fee97a7568114f227a89a1effd6b04806a) ) // these 4 == ma289p17.bin + ROM_LOAD16_BYTE( "s_5.b5", 0x100000, 0x20000, CRC(e15244da) SHA1(ebf3072565c53d0098d373b5093ba6918c4eddae) ) + ROM_LOAD16_BYTE( "s_14.a6", 0x140001, 0x20000, CRC(bbbf0461) SHA1(c5299ab1d45f685a5d160492247cf1303ef6937a) ) + ROM_LOAD16_BYTE( "s_6.b6", 0x140000, 0x20000, CRC(4ee89f75) SHA1(bda0e9095da2d424faac341fd934000a621796eb) ) + ROM_LOAD16_BYTE( "s_15.a7", 0x180001, 0x20000, CRC(cde29bad) SHA1(24c1b43c6d717eaaf7c01ec7de89837947334224) ) // these 4 == ma389m15.bin + ROM_LOAD16_BYTE( "s_7.b7", 0x180000, 0x20000, CRC(065ed221) SHA1(c03ca5b4d1198939a57b5fccf6a79d70afe1faaf) ) + ROM_LOAD16_BYTE( "s_16.a8", 0x1c0001, 0x20000, CRC(70f28040) SHA1(91012728953563fcc576725337e6ba7e1b49d1ba) ) + ROM_LOAD16_BYTE( "s_8.b8", 0x1c0000, 0x20000, CRC(a6f8574f) SHA1(87c041669b2eaec495ae10a6f45b6668accb92bf) ) + + ROM_REGION( 0x80000, "gfx3", 0 ) // these 4 == mab189a2.bin - Located on the A8002-5 sub board + ROM_LOAD( "s_21.b3", 0x000000, 0x20000, CRC(701a0072) SHA1(b03b6fa18e0cfcd5c7c541025fa2d3632d2f8387) ) + ROM_LOAD( "s_22.b4", 0x020000, 0x20000, CRC(34e6225c) SHA1(f6335084f4f4c7a4b6528e6ad74962b88f81e3bc) ) + ROM_LOAD( "s_23.b5", 0x040000, 0x20000, CRC(9a7399d3) SHA1(04e0327b0da75f621b51e1831cbdc4537082e32b) ) + ROM_LOAD( "s_24.b6", 0x060000, 0x20000, CRC(f097459d) SHA1(466364677f048519eb2894ddecf76f5c52f6afe9) ) + + ROM_REGION( 0x80000, "gfx4", 0 ) // these 4 == mab289c2.bin - Located on the A8002-5 sub board + ROM_LOAD( "s_17.a3", 0x000000, 0x20000, CRC(cc47c4a3) SHA1(140f53b671b4eaed6fcc516c4018f07a6d7c2290) ) + ROM_LOAD( "s_18.a4", 0x020000, 0x20000, CRC(a04377e8) SHA1(841c6c3073b137f6a5c875db32039186c014f785) ) + ROM_LOAD( "s_19.a5", 0x040000, 0x20000, CRC(b07f5289) SHA1(8817bd225edf9b0fa439b220617f925365e39253) ) + ROM_LOAD( "s_20.a6", 0x060000, 0x20000, CRC(a9bb4fa9) SHA1(ccede784671a864667b92a8101d686c26c78d76f) ) + + ROM_REGION( 0x20000, "ymsnd", 0 ) // Located on the A8002-1 main board + ROM_LOAD( "ma_2.d10", 0x000000, 0x20000, CRC(ea4cc30d) SHA1(d8f089fc0ce76309411706a8110ad907f93dc97e) ) + + ROM_REGION( 0x20000, "sprites1:scale_table", 0 ) // Zoom table - Located on the A8002-2 board + ROM_LOAD( "ma_8.f10", 0x000000, 0x10000, CRC(61f3de03) SHA1(736f9634fe054ea68a2aa90a743bd0dc320f23c9) ) + ROM_LOAD( "ma_9.f12", 0x000000, 0x10000, CRC(61f3de03) SHA1(736f9634fe054ea68a2aa90a743bd0dc320f23c9) ) // identical to ma_8.f10 +ROM_END + +} // anonymous namespace + + +/******************************************************************************/ + +GAME( 1989, mechatt, 0, mechatt, mechatt, mechatt_state, empty_init, ROT0, "SNK", "Mechanized Attack (World)", MACHINE_SUPPORTS_SAVE ) +GAME( 1989, mechattj, mechatt, mechatt, mechattj, mechatt_state, empty_init, ROT0, "SNK", "Mechanized Attack (Japan)", MACHINE_SUPPORTS_SAVE ) +GAME( 1989, mechattu, mechatt, mechatt, mechattu, mechatt_state, empty_init, ROT0, "SNK", "Mechanized Attack (US)", MACHINE_SUPPORTS_SAVE ) +GAME( 1989, mechattu1, mechatt, mechatt, mechattu1,mechatt_state, empty_init, ROT0, "SNK", "Mechanized Attack (US, Version 1, Single Player)", MACHINE_SUPPORTS_SAVE ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/megadriv_acbl.cpp mame-0.231+dfsg.1/src/mame/drivers/megadriv_acbl.cpp --- mame-0.230+dfsg.1/src/mame/drivers/megadriv_acbl.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/megadriv_acbl.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -834,6 +834,125 @@ // no service mode here? INPUT_PORTS_END +INPUT_PORTS_START( barekch ) // TODO: identify dips. PCB has 3 x 8-dip banks, but probably most unused + PORT_INCLUDE( md_common ) + + PORT_MODIFY("PAD1") + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) + + PORT_MODIFY("PAD2") + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 ) + + PORT_START("IN0") + PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 ) + + PORT_START("DSWA") + PORT_DIPUNKNOWN_DIPLOC(0x01, 0x01, "SW1:1") + PORT_DIPUNKNOWN_DIPLOC(0x02, 0x02, "SW1:2") + PORT_DIPUNKNOWN_DIPLOC(0x04, 0x04, "SW1:3") + PORT_DIPUNKNOWN_DIPLOC(0x08, 0x08, "SW1:4") + PORT_DIPUNKNOWN_DIPLOC(0x10, 0x10, "SW1:5") + PORT_DIPUNKNOWN_DIPLOC(0x20, 0x20, "SW1:6") + PORT_DIPUNKNOWN_DIPLOC(0x40, 0x40, "SW1:7") + PORT_DIPUNKNOWN_DIPLOC(0x80, 0x80, "SW1:8") + + PORT_START("DSWB") + PORT_DIPUNKNOWN_DIPLOC(0x01, 0x01, "SW2:1") + PORT_DIPUNKNOWN_DIPLOC(0x02, 0x02, "SW2:2") + PORT_DIPUNKNOWN_DIPLOC(0x04, 0x04, "SW2:3") + PORT_DIPUNKNOWN_DIPLOC(0x08, 0x08, "SW2:4") + PORT_DIPUNKNOWN_DIPLOC(0x10, 0x10, "SW2:5") + PORT_DIPUNKNOWN_DIPLOC(0x20, 0x20, "SW2:6") + PORT_DIPUNKNOWN_DIPLOC(0x40, 0x40, "SW2:7") + PORT_DIPUNKNOWN_DIPLOC(0x80, 0x80, "SW2:8") + + PORT_START("DSWC") + PORT_DIPUNKNOWN_DIPLOC(0x01, 0x01, "SW3:1") + PORT_DIPUNKNOWN_DIPLOC(0x02, 0x02, "SW3:2") + PORT_DIPUNKNOWN_DIPLOC(0x04, 0x04, "SW3:3") + PORT_DIPUNKNOWN_DIPLOC(0x08, 0x08, "SW3:4") + PORT_DIPUNKNOWN_DIPLOC(0x10, 0x10, "SW3:5") + PORT_DIPUNKNOWN_DIPLOC(0x20, 0x20, "SW3:6") + PORT_DIPNAME( 0xc0, 0xc0, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW3:7,8") + PORT_DIPSETTING( 0xc0, "3" ) + PORT_DIPSETTING( 0x40, "4" ) + PORT_DIPSETTING( 0x80, "5" ) + PORT_DIPSETTING( 0x00, "6" ) +INPUT_PORTS_END + +INPUT_PORTS_START( barek2ch ) + PORT_INCLUDE( md_common ) + + PORT_MODIFY("PAD1") + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 ) // also change character during gameplay + + PORT_MODIFY("PAD2") + PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) + PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 ) // also change character during gameplay + + PORT_START("IN0") + PORT_BIT( 0x003f, IP_ACTIVE_LOW, IPT_UNUSED ) // apparently no use for these + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_COIN1 ) + PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN2 ) + + PORT_START("DSWA") + PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:1,2,3") + PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) ) + PORT_DIPSETTING( 0x01, DEF_STR( 3C_1C ) ) + PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) ) + PORT_DIPSETTING( 0x07, DEF_STR( 1C_1C ) ) + PORT_DIPSETTING( 0x06, DEF_STR( 1C_2C ) ) + PORT_DIPSETTING( 0x05, DEF_STR( 1C_3C ) ) + PORT_DIPSETTING( 0x04, DEF_STR( 1C_4C ) ) + PORT_DIPSETTING( 0x03, DEF_STR( 1C_5C ) ) + PORT_DIPUNKNOWN_DIPLOC(0x08, 0x08, "SW1:4") + PORT_DIPUNKNOWN_DIPLOC(0x10, 0x10, "SW1:5") + PORT_DIPUNKNOWN_DIPLOC(0x20, 0x20, "SW1:6") + PORT_DIPUNKNOWN_DIPLOC(0x40, 0x40, "SW1:7") + PORT_DIPUNKNOWN_DIPLOC(0x80, 0x80, "SW1:8") + + PORT_START("DSWB") + PORT_DIPUNKNOWN_DIPLOC(0x01, 0x01, "SW2:1") // at least some of the first 3 seem to control difficulty (enemies attack later / less frequently by switching these) + PORT_DIPUNKNOWN_DIPLOC(0x02, 0x02, "SW2:2") + PORT_DIPUNKNOWN_DIPLOC(0x04, 0x04, "SW2:3") + PORT_DIPNAME( 0x18, 0x18, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:4,5") + PORT_DIPSETTING( 0x18, "1" ) + PORT_DIPSETTING( 0x10, "2" ) + PORT_DIPSETTING( 0x08, "3" ) + PORT_DIPSETTING( 0x00, "4" ) + PORT_DIPNAME( 0xe0, 0xe0, "Starting Level" ) PORT_DIPLOCATION("SW2:6,7,8") + PORT_DIPSETTING( 0xe0, "1" ) + PORT_DIPSETTING( 0xc0, "2" ) + PORT_DIPSETTING( 0xa0, "3" ) + PORT_DIPSETTING( 0x80, "4" ) + PORT_DIPSETTING( 0x60, "5" ) + PORT_DIPSETTING( 0x40, "6" ) + PORT_DIPSETTING( 0x20, "7" ) + PORT_DIPSETTING( 0x00, "8" ) + + PORT_START("DSWC") // present on PCB but there doesn't seem to be any read for them + PORT_DIPUNKNOWN_DIPLOC(0x01, 0x01, "SW3:1") + PORT_DIPUNKNOWN_DIPLOC(0x02, 0x02, "SW3:2") + PORT_DIPUNKNOWN_DIPLOC(0x04, 0x04, "SW3:3") + PORT_DIPUNKNOWN_DIPLOC(0x08, 0x08, "SW3:4") + PORT_DIPUNKNOWN_DIPLOC(0x10, 0x10, "SW3:5") + PORT_DIPUNKNOWN_DIPLOC(0x20, 0x20, "SW3:6") + PORT_DIPUNKNOWN_DIPLOC(0x40, 0x40, "SW3:7") + PORT_DIPUNKNOWN_DIPLOC(0x80, 0x80, "SW3:8") +INPUT_PORTS_END + INPUT_PORTS_START( barek2 ) PORT_INCLUDE( aladmdb ) // TODO! @@ -1120,6 +1239,34 @@ init_megadrij(); } +void md_boot_state::init_barekch() +{ + uint16_t *src = (uint16_t *)memregion("maincpu")->base(); + + for (int i = 0x000000; i < 0x80000 / 2; i++) + src[i] = bitswap<16>(src[i] ^ 0xff00, 15, 9, 12, 8, 14, 13, 11, 10, 7, 6, 5, 4, 3, 2, 1, 0); + + m_maincpu->space(AS_PROGRAM).install_read_handler(0x770070, 0x770075, read16sm_delegate(*this, FUNC(md_boot_state::dsw_r))); + + init_megadrij(); +} + +void md_boot_state::init_barek2ch() +{ + uint16_t *src = (uint16_t *)memregion("maincpu")->base(); + + for (int i = 0x000000; i < 0x200000 / 2; i++) + src[i] = bitswap<16>(src[i], 8, 11, 10, 13, 12, 14, 15, 9, 7, 6, 5, 4, 3, 2, 1, 0); + + src[0x06 / 2] = 0x0210; // TODO: why is this needed? + + m_maincpu->space(AS_PROGRAM).install_read_port(0x380070, 0x380071, "IN0"); + m_maincpu->space(AS_PROGRAM).install_read_port(0x380078, 0x380079, "DSWA"); + m_maincpu->space(AS_PROGRAM).install_read_port(0x38007a, 0x38007b, "DSWB"); + + init_megadrij(); +} + void md_boot_state::init_barek3() { uint8_t* rom = memregion("maincpu")->base(); @@ -1335,6 +1482,22 @@ ROM_LOAD( "pic16c57xtp", 0x0000, 0x1000, NO_DUMP ) ROM_END +ROM_START( barekch ) // all 27c010 + ROM_REGION( 0x400000, "maincpu", 0 ) + ROM_LOAD16_BYTE( "1.u1", 0x000001, 0x020000, CRC(a119b5ef) SHA1(710ef6dc340a2c3741af69cd9a3d16e5fdd73be6) ) + ROM_LOAD16_BYTE( "2.u2", 0x000000, 0x020000, CRC(7d4ad276) SHA1(9ab2a28356cc5c36eee8dba40c04a64cf5d2cfde) ) + ROM_LOAD16_BYTE( "3.u3", 0x040001, 0x020000, CRC(af6a9122) SHA1(0f2bac1ad20f5918b04dd5a503121445029e4c84) ) + ROM_LOAD16_BYTE( "4.u4", 0x040000, 0x020000, CRC(98245384) SHA1(f4f96f369764a7d204ec414f053b25da662ff401) ) +ROM_END + +ROM_START( barek2ch ) // all 27c4001 + ROM_REGION( 0x400000, "maincpu", 0 ) + ROM_LOAD16_BYTE( "u14", 0x000001, 0x080000, CRC(b0ee177f) SHA1(d63e6ee30fe7f4aaab098d3920eabc456730b2c5) ) + ROM_LOAD16_BYTE( "u15", 0x000000, 0x080000, CRC(09264195) SHA1(c5439731d932c90a57d68c4d82c9ebed8a01bd53) ) + ROM_LOAD16_BYTE( "u16", 0x100001, 0x080000, CRC(6c814fc4) SHA1(edaf5117b19d3fb40218c5f7c4b5099c9189f1be) ) + ROM_LOAD16_BYTE( "u17", 0x100000, 0x080000, CRC(cae1922e) SHA1(811c2164b6c467a49af4b0d22f151cd13c9efbc9) ) +ROM_END + /************************************* * @@ -1354,3 +1517,7 @@ GAME( 1994, bk3ssrmb, 0, megadrvb_6b, bk3ssrmb, md_boot_6button_state, init_bk3ssrmb, ROT0, "bootleg / Sega", "Bare Knuckle III / Sunset Riders (bootleg of Megadrive versions)", MACHINE_NOT_WORKING ) // Currently boots as Bare Knuckle III, mechanism to switch game not found yet GAME( 1993, twinktmb, 0, md_bootleg, twinktmb, md_boot_state, init_twinktmb, ROT0, "bootleg / Sega", "Twinkle Tale (bootleg of Megadrive version)", MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING ) // Needs PIC decap or simulation GAME( 1993, jparkmb, 0, md_bootleg, twinktmb, md_boot_state, init_jparkmb, ROT0, "bootleg / Sega", "Jurassic Park (bootleg of Megadrive version)", MACHINE_UNEMULATED_PROTECTION | MACHINE_NOT_WORKING ) // Needs PIC decap or simulation + +// Chinese bootlegs. Very clean looking with custom chips marked TA-04, TA-05 and TA-06. +GAME( 1994, barekch, 0, megadrvb_6b, barekch, md_boot_6button_state, init_barekch, ROT0, "bootleg", "Bare Knuckle (Chinese bootleg of Megadrive version)", 0 ) +GAME( 1994, barek2ch, 0, md_bootleg, barek2ch, md_boot_state, init_barek2ch, ROT0, "bootleg", "Bare Knuckle II (Chinese bootleg of Megadrive version)", 0 ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/megaplay.cpp mame-0.231+dfsg.1/src/mame/drivers/megaplay.cpp --- mame-0.230+dfsg.1/src/mame/drivers/megaplay.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/megaplay.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -196,15 +196,15 @@ PORT_MODIFY("DSW1") // DSW C (per game settings) PORT_DIPNAME( 0x03, 0x01, "Initial Players" ) PORT_DIPLOCATION("SW3:1,2") - PORT_DIPSETTING( 0x00, "4" ) - PORT_DIPSETTING( 0x01, "3" ) - PORT_DIPSETTING( 0x02, "2" ) PORT_DIPSETTING( 0x03, "1" ) + PORT_DIPSETTING( 0x02, "2" ) + PORT_DIPSETTING( 0x01, "3" ) + PORT_DIPSETTING( 0x00, "4" ) PORT_DIPNAME( 0x0c, 0x0c, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW3:3,4") - PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) - PORT_DIPSETTING( 0x04, DEF_STR( Hard ) ) PORT_DIPSETTING( 0x08, DEF_STR( Easy ) ) PORT_DIPSETTING( 0x0c, DEF_STR( Normal ) ) + PORT_DIPSETTING( 0x04, DEF_STR( Hard ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Hardest ) ) // Who knows... // PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_NAME("0x6201 bit 4") PORT_CODE(KEYCODE_G) // PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_NAME("0x6201 bit 5") PORT_CODE(KEYCODE_H) @@ -262,17 +262,17 @@ PORT_MODIFY("DSW1") // DSW C (per game settings) PORT_DIPNAME( 0x01, 0x01, "Time" ) PORT_DIPLOCATION("SW3:1") - PORT_DIPSETTING( 0x01, DEF_STR( Normal ) ) PORT_DIPSETTING( 0x00, "Short" ) + PORT_DIPSETTING( 0x01, DEF_STR( Normal ) ) PORT_DIPNAME( 0x0e, 0x08, "Level" ) PORT_DIPLOCATION("SW3:2,3,4") - PORT_DIPSETTING( 0x00, "0" ) - PORT_DIPSETTING( 0x02, "0" ) - PORT_DIPSETTING( 0x04, "5" ) - PORT_DIPSETTING( 0x06, "4" ) - PORT_DIPSETTING( 0x08, "3" ) - PORT_DIPSETTING( 0x0a, "2" ) - PORT_DIPSETTING( 0x0c, "1" ) + PORT_DIPSETTING( 0x00, "0 (duplicate 1)" ) + PORT_DIPSETTING( 0x02, "0 (duplicate 2)" ) PORT_DIPSETTING( 0x0e, "0" ) + PORT_DIPSETTING( 0x0c, "1" ) + PORT_DIPSETTING( 0x0a, "2" ) + PORT_DIPSETTING( 0x08, "3" ) + PORT_DIPSETTING( 0x06, "4" ) + PORT_DIPSETTING( 0x04, "5" ) INPUT_PORTS_END static INPUT_PORTS_START ( mp_sor2 ) @@ -280,15 +280,15 @@ PORT_MODIFY("DSW1") // DSW C (per game settings) PORT_DIPNAME( 0x03, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW3:1,2") - PORT_DIPSETTING( 0x00, "4" ) - PORT_DIPSETTING( 0x01, "3" ) - PORT_DIPSETTING( 0x02, "2" ) PORT_DIPSETTING( 0x03, "1" ) + PORT_DIPSETTING( 0x02, "2" ) + PORT_DIPSETTING( 0x01, "3" ) + PORT_DIPSETTING( 0x00, "4" ) PORT_DIPNAME( 0xc, 0x0c, DEF_STR ( Difficulty ) ) PORT_DIPLOCATION("SW3:3,4") - PORT_DIPSETTING( 0x00, DEF_STR ( Hardest ) ) - PORT_DIPSETTING( 0x04, DEF_STR ( Hard ) ) PORT_DIPSETTING( 0x08, DEF_STR ( Easy ) ) PORT_DIPSETTING( 0x0c, DEF_STR ( Normal ) ) + PORT_DIPSETTING( 0x04, DEF_STR ( Hard ) ) + PORT_DIPSETTING( 0x00, DEF_STR ( Hardest ) ) INPUT_PORTS_END static INPUT_PORTS_START ( mp_bio ) @@ -296,15 +296,15 @@ PORT_MODIFY("DSW1") // DSW C (per game settings) PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW3:1,2") - PORT_DIPSETTING( 0x00, "5" ) - PORT_DIPSETTING( 0x01, "4" ) PORT_DIPSETTING( 0x02, "2" ) PORT_DIPSETTING( 0x03, "3" ) + PORT_DIPSETTING( 0x01, "4" ) + PORT_DIPSETTING( 0x00, "5" ) PORT_DIPNAME( 0xc, 0x0c, DEF_STR ( Difficulty ) ) PORT_DIPLOCATION("SW3:3,4") - PORT_DIPSETTING( 0x00, DEF_STR ( Hardest ) ) - PORT_DIPSETTING( 0x04, DEF_STR ( Hard ) ) PORT_DIPSETTING( 0x08, DEF_STR ( Easy ) ) PORT_DIPSETTING( 0x0c, DEF_STR ( Normal ) ) + PORT_DIPSETTING( 0x04, DEF_STR ( Hard ) ) + PORT_DIPSETTING( 0x00, DEF_STR ( Hardest ) ) INPUT_PORTS_END static INPUT_PORTS_START ( mp_gslam ) @@ -312,14 +312,14 @@ PORT_MODIFY("DSW1") // DSW C (per game settings) PORT_DIPNAME( 0x07, 0x04, DEF_STR ( Game_Time ) ) PORT_DIPLOCATION("SW3:1,2,3") - PORT_DIPSETTING( 0x00, "5:00" ) - PORT_DIPSETTING( 0x01, "4:30" ) - PORT_DIPSETTING( 0x02, "4:00" ) - PORT_DIPSETTING( 0x03, "3:30" ) - PORT_DIPSETTING( 0x04, "3:00" ) - PORT_DIPSETTING( 0x05, "2:30" ) - PORT_DIPSETTING( 0x06, "2:00" ) PORT_DIPSETTING( 0x07, "1:30" ) + PORT_DIPSETTING( 0x06, "2:00" ) + PORT_DIPSETTING( 0x05, "2:30" ) + PORT_DIPSETTING( 0x04, "3:00" ) + PORT_DIPSETTING( 0x03, "3:30" ) + PORT_DIPSETTING( 0x02, "4:00" ) + PORT_DIPSETTING( 0x01, "4:30" ) + PORT_DIPSETTING( 0x00, "5:00" ) PORT_DIPNAME( 0x08, 0x08, "2P-Play Continue" ) PORT_DIPLOCATION("SW3:4") PORT_DIPSETTING( 0x00, "1 Credit" ) PORT_DIPSETTING( 0x08, "2 Credits" ) @@ -329,14 +329,14 @@ PORT_INCLUDE( megaplay ) PORT_MODIFY("DSW1") // DSW C (per game settings) - PORT_DIPNAME( 0x03, 0x02, "Initial Player" ) PORT_DIPLOCATION("SW3:1,2") - PORT_DIPSETTING( 0x00, "2" ) - PORT_DIPSETTING( 0x01, "1" ) - PORT_DIPSETTING( 0x02, "3" ) - PORT_DIPSETTING( 0x03, "4" ) + PORT_DIPNAME( 0x03, 0x01, "Initial Player" ) PORT_DIPLOCATION("SW3:1,2") + PORT_DIPSETTING( 0x02, "1" ) + PORT_DIPSETTING( 0x03, "2" ) + PORT_DIPSETTING( 0x01, "3" ) + PORT_DIPSETTING( 0x00, "4" ) PORT_DIPNAME( 0x04, 0x04, DEF_STR ( Difficulty ) ) PORT_DIPLOCATION("SW3:3") - PORT_DIPSETTING( 0x04, DEF_STR ( Hard ) ) - PORT_DIPSETTING( 0x00, DEF_STR ( Normal ) ) + PORT_DIPSETTING( 0x04, DEF_STR ( Normal ) ) + PORT_DIPSETTING( 0x00, DEF_STR ( Hard ) ) PORT_DIPNAME( 0x08, 0x08, "Title" ) PORT_DIPLOCATION("SW3:4") PORT_DIPSETTING( 0x08, "EUROPE" ) PORT_DIPSETTING( 0x00, "U.S.A" ) @@ -347,15 +347,15 @@ PORT_MODIFY("DSW1") // DSW C (per game settings) PORT_DIPNAME( 0x03, 0x01, "Initial Players (Normal mode)" ) PORT_DIPLOCATION("SW3:1,2") - PORT_DIPSETTING( 0x00, "4" ) - PORT_DIPSETTING( 0x01, "3" ) - PORT_DIPSETTING( 0x02, "2" ) PORT_DIPSETTING( 0x03, "1" ) - PORT_DIPNAME( 0x0c, 0x0c, "Initial Players (Dual mode)" ) PORT_DIPLOCATION("SW3:3,4") + PORT_DIPSETTING( 0x02, "2" ) + PORT_DIPSETTING( 0x01, "3" ) PORT_DIPSETTING( 0x00, "4" ) - PORT_DIPSETTING( 0x04, "2" ) + PORT_DIPNAME( 0x0c, 0x0c, "Initial Players (Dual mode)" ) PORT_DIPLOCATION("SW3:3,4") PORT_DIPSETTING( 0x08, "1" ) + PORT_DIPSETTING( 0x04, "2" ) PORT_DIPSETTING( 0x0c, "3" ) + PORT_DIPSETTING( 0x00, "4" ) INPUT_PORTS_END static INPUT_PORTS_START ( mp_shnb3 ) @@ -363,15 +363,15 @@ PORT_MODIFY("DSW1") // DSW C (per game settings) PORT_DIPNAME( 0x03, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW3:1,2") - PORT_DIPSETTING( 0x00, "4" ) - PORT_DIPSETTING( 0x01, "3" ) - PORT_DIPSETTING( 0x02, "2" ) PORT_DIPSETTING( 0x03, "1" ) + PORT_DIPSETTING( 0x02, "2" ) + PORT_DIPSETTING( 0x01, "3" ) + PORT_DIPSETTING( 0x00, "4" ) PORT_DIPNAME( 0xc, 0x0c, DEF_STR ( Difficulty ) ) PORT_DIPLOCATION("SW3:3,4") - PORT_DIPSETTING( 0x00, "Expert" ) - PORT_DIPSETTING( 0x04, DEF_STR ( Hard ) ) PORT_DIPSETTING( 0x08, DEF_STR ( Easy ) ) PORT_DIPSETTING( 0x0c, DEF_STR ( Normal ) ) + PORT_DIPSETTING( 0x04, DEF_STR ( Hard ) ) + PORT_DIPSETTING( 0x00, "Expert" ) INPUT_PORTS_END static INPUT_PORTS_START ( mp_gunhe ) @@ -379,15 +379,15 @@ PORT_MODIFY("DSW1") // DSW C (per game settings) PORT_DIPNAME( 0x03, 0x01, "Initial Players" ) PORT_DIPLOCATION("SW3:1,2") - PORT_DIPSETTING( 0x00, "4" ) - PORT_DIPSETTING( 0x01, "3" ) - PORT_DIPSETTING( 0x02, "2" ) PORT_DIPSETTING( 0x03, "1" ) + PORT_DIPSETTING( 0x02, "2" ) + PORT_DIPSETTING( 0x01, "3" ) + PORT_DIPSETTING( 0x00, "4" ) PORT_DIPNAME( 0x0c, 0x0c, DEF_STR ( Difficulty ) ) PORT_DIPLOCATION("SW3:3,4") - PORT_DIPSETTING( 0x00, "Expert" ) - PORT_DIPSETTING( 0x04, DEF_STR ( Hard ) ) PORT_DIPSETTING( 0x08, DEF_STR ( Easy ) ) PORT_DIPSETTING( 0x0c, DEF_STR ( Normal ) ) + PORT_DIPSETTING( 0x04, DEF_STR ( Hard ) ) + PORT_DIPSETTING( 0x00, "Expert" ) INPUT_PORTS_END // MEGAPLAY specific diff -Nru mame-0.230+dfsg.1/src/mame/drivers/mephisto_academy.cpp mame-0.231+dfsg.1/src/mame/drivers/mephisto_academy.cpp --- mame-0.230+dfsg.1/src/mame/drivers/mephisto_academy.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/mephisto_academy.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -1,24 +1,24 @@ // license:BSD-3-Clause // copyright-holders:Sandro Ronco, hap // thanks-to:yoyo_chessboard -/*************************************************************************** +/****************************************************************************** Mephisto Academy Hardware notes: - PCB label HGS 10 130 01 -- VL65NC02-04PC, 4.91MHz XTAL +- VL65NC02-04PC @ 4.91MHz - 2*32KB ROM(TC57256AD-12), 1st ROM half-empty - 8KB battery-backed RAM(TC5564APL-15) - HD44100H, HD44780, 2*16 chars LCD screen - 8 tri-color leds (not fully used: always outputs 6 red, 2 green) -- magnets chessboard with leds, beeper +- magnets chessboard with leds, piezo Since the program is on an external module, it appears it was meant to be a modular chesscomputer. However, no extra modules were sold separately. Module PCB is the same as Super Mondial II College, label HGS 10 116 05. -***************************************************************************/ +******************************************************************************/ #include "emu.h" @@ -29,6 +29,7 @@ #include "video/mmdisplay2.h" #include "video/pwm.h" +// internal artwork #include "mephisto_academy.lh" @@ -107,14 +108,14 @@ static INPUT_PORTS_START( academy ) PORT_START("KEY") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("TRAIN") PORT_CODE(KEYCODE_T) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("INFO") PORT_CODE(KEYCODE_I) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("MEM") PORT_CODE(KEYCODE_M) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("POS") PORT_CODE(KEYCODE_O) - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("LEV") PORT_CODE(KEYCODE_L) - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("FCT") PORT_CODE(KEYCODE_F) - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("ENT") PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_F1) // combine for NEW GAME - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("CL") PORT_CODE(KEYCODE_BACKSPACE) PORT_CODE(KEYCODE_DEL) PORT_CODE(KEYCODE_F1) // " + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("TRAIN") PORT_CODE(KEYCODE_T) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("INFO") PORT_CODE(KEYCODE_I) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("MEM") PORT_CODE(KEYCODE_M) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("POS") PORT_CODE(KEYCODE_O) + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("LEV") PORT_CODE(KEYCODE_L) + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("FCT") PORT_CODE(KEYCODE_F) + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("ENT") PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_F1) // combine for NEW GAME + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("CL") PORT_CODE(KEYCODE_BACKSPACE) PORT_CODE(KEYCODE_DEL) PORT_CODE(KEYCODE_F1) // " INPUT_PORTS_END @@ -129,7 +130,7 @@ M65C02(config, m_maincpu, 4.9152_MHz_XTAL); m_maincpu->set_addrmap(AS_PROGRAM, &academy_state::main_map); - const attotime nmi_period = attotime::from_hz(4.9152_MHz_XTAL / (1 << 13)); + const attotime nmi_period = attotime::from_hz(4.9152_MHz_XTAL / 0x2000); m_maincpu->set_periodic_int(FUNC(academy_state::nmi_line_pulse), nmi_period); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); @@ -137,9 +138,10 @@ HC259(config, m_outlatch); // SN74HC259N m_outlatch->parallel_out_cb().set("display:dac", FUNC(dac_byte_interface::write)).rshift(2).mask(0x03); - MEPHISTO_SENSORS_BOARD(config, "board"); + MEPHISTO_SENSORS_BOARD(config, "board"); // internal MEPHISTO_DISPLAY_MODULE2(config, "display"); // internal + /* video hardware */ PWM_DISPLAY(config, m_led_pwm).set_size(4, 4); config.set_default_layout(layout_mephisto_academy); } @@ -173,10 +175,10 @@ /*************************************************************************** - Game Drivers + Drivers ***************************************************************************/ -/* YEAR, NAME, PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS */ +/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ CONS( 1989, academy, 0, 0, academy, academy, academy_state, empty_init, "Hegener + Glaser", "Mephisto Academy (English)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) CONS( 1989, academyg, academy, 0, academy, academy, academy_state, empty_init, "Hegener + Glaser", "Mephisto Academy (German, 06-03-89)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) CONS( 1989, academyga, academy, 0, academy, academy, academy_state, empty_init, "Hegener + Glaser", "Mephisto Academy (German, 04-10-88)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/mephisto_amsterdam.cpp mame-0.231+dfsg.1/src/mame/drivers/mephisto_amsterdam.cpp --- mame-0.230+dfsg.1/src/mame/drivers/mephisto_amsterdam.cpp 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/mephisto_amsterdam.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,263 @@ +// license:BSD-3-Clause +// copyright-holders:Dirk Verwiebe, Cowering, hap +/****************************************************************************** + +Mephisto Amsterdam (2-ROM hardware version) + +The base hardware components are the same as Glasgow, but the 32-bit versions +have more RAM and a faster CPU. + +TODO: +- waitstates, same as mephisto_glasgow.cpp + +******************************************************************************/ + +#include "emu.h" + +#include "cpu/m68000/m68000.h" +#include "machine/mmboard.h" +#include "sound/dac.h" +#include "video/mmdisplay1.h" + +#include "speaker.h" + +// internal artwork +#include "mephisto_amsterdam.lh" + + +namespace { + +class amsterdam_state : public driver_device +{ +public: + amsterdam_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_board(*this, "board") + , m_display(*this, "display") + , m_dac(*this, "dac") + , m_keys(*this, "KEY.%u", 0) + { } + + DECLARE_INPUT_CHANGED_MEMBER(reset_button); + + void amsterdam(machine_config &config); + void dallas32(machine_config &config); + +protected: + virtual void machine_start() override; + virtual void machine_reset() override; + +private: + required_device m_maincpu; + required_device m_board; + required_device m_display; + required_device m_dac; + required_ioport_array<2> m_keys; + + void amsterd_mem(address_map &map); + void dallas32_mem(address_map &map); + + void led_w(offs_t offset, u8 data); + void dac_w(u8 data); + u8 keys_r(); + + u8 m_kp_select = 0; +}; + +void amsterdam_state::machine_start() +{ + save_item(NAME(m_kp_select)); +} + +void amsterdam_state::machine_reset() +{ + m_display->reset(); +} + +INPUT_CHANGED_MEMBER(amsterdam_state::reset_button) +{ + // RES buttons in serial tied to CPU RESET + if (ioport("RESET")->read() == 3) + { + m_maincpu->pulse_input_line(INPUT_LINE_RESET, attotime::zero); + machine_reset(); + } +} + + + +/****************************************************************************** + I/O +******************************************************************************/ + +void amsterdam_state::led_w(offs_t offset, u8 data) +{ + m_board->led_w(data); + + // lcd strobe is shared with keypad select + m_kp_select = offset >> 7; + m_display->strobe_w(m_kp_select); +} + +void amsterdam_state::dac_w(u8 data) +{ + // d0: speaker out + m_dac->write(BIT(data, 0)); +} + +u8 amsterdam_state::keys_r() +{ + return m_keys[m_kp_select & 1]->read(); +} + + + +/****************************************************************************** + Address Maps +******************************************************************************/ + +void amsterdam_state::amsterd_mem(address_map &map) +{ + map(0x000000, 0x00ffff).rom(); + map(0x800002, 0x800002).w(m_display, FUNC(mephisto_display1_device::data_w)); + map(0x800004, 0x800004).w(FUNC(amsterdam_state::dac_w)); + map(0x800008, 0x800009).nopr(); // clr.b + map(0x800008, 0x800008).select(0x80).w(FUNC(amsterdam_state::led_w)); + map(0x800010, 0x800010).w(m_board, FUNC(mephisto_board_device::mux_w)); + map(0x800020, 0x800020).r(m_board, FUNC(mephisto_board_device::input_r)); + map(0x800040, 0x800040).r(FUNC(amsterdam_state::keys_r)); + map(0xffc000, 0xffffff).ram(); // 16KB +} + +void amsterdam_state::dallas32_mem(address_map &map) +{ + map(0x000000, 0x00ffff).rom(); + map(0x010000, 0x01ffff).ram(); // 64KB + map(0x800002, 0x800002).w(m_display, FUNC(mephisto_display1_device::data_w)); + map(0x800004, 0x800004).w(FUNC(amsterdam_state::dac_w)); + map(0x800008, 0x800008).select(0x80).w(FUNC(amsterdam_state::led_w)); + map(0x800010, 0x800010).w(m_board, FUNC(mephisto_board_device::mux_w)); + map(0x800020, 0x800020).r(m_board, FUNC(mephisto_board_device::input_r)); + map(0x800040, 0x800040).r(FUNC(amsterdam_state::keys_r)); +} + + + +/****************************************************************************** + Input Ports +******************************************************************************/ + +static INPUT_PORTS_START( amsterdam ) + PORT_START("KEY.0") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("A / 1") PORT_CODE(KEYCODE_A) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("B / 2 / Pawn") PORT_CODE(KEYCODE_B) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("C / 3 / Knight") PORT_CODE(KEYCODE_C) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("D / 4 / Bishop") PORT_CODE(KEYCODE_D) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("E / 5 / Rook") PORT_CODE(KEYCODE_E) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("F / 6 / Queen") PORT_CODE(KEYCODE_F) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Left / Black / 9") PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_CODE(KEYCODE_LEFT) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Right / White / 0") PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(KEYCODE_RIGHT) + + PORT_START("KEY.1") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("INFO") PORT_CODE(KEYCODE_I) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("POS") PORT_CODE(KEYCODE_O) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("LEV") PORT_CODE(KEYCODE_L) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("MEM") PORT_CODE(KEYCODE_M) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("CL") PORT_CODE(KEYCODE_BACKSPACE) PORT_CODE(KEYCODE_DEL) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("ENT") PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("G / 7 / King") PORT_CODE(KEYCODE_G) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("H / 8") PORT_CODE(KEYCODE_H) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) + + PORT_START("RESET") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("RES 1") PORT_CODE(KEYCODE_Z) PORT_CODE(KEYCODE_F1) PORT_CHANGED_MEMBER(DEVICE_SELF, amsterdam_state, reset_button, 0) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("RES 2") PORT_CODE(KEYCODE_X) PORT_CODE(KEYCODE_F1) PORT_CHANGED_MEMBER(DEVICE_SELF, amsterdam_state, reset_button, 0) +INPUT_PORTS_END + + + +/****************************************************************************** + Machine Configs +******************************************************************************/ + +void amsterdam_state::amsterdam(machine_config &config) +{ + /* basic machine hardware */ + M68000(config, m_maincpu, 12_MHz_XTAL); + m_maincpu->set_periodic_int(FUNC(amsterdam_state::irq5_line_hold), attotime::from_hz(50)); + m_maincpu->set_addrmap(AS_PROGRAM, &amsterdam_state::amsterd_mem); + + MEPHISTO_SENSORS_BOARD(config, m_board); + m_board->set_delay(attotime::from_msec(200)); + + /* video hardware */ + MEPHISTO_DISPLAY_MODULE1(config, m_display); + config.set_default_layout(layout_mephisto_amsterdam); + + /* sound hardware */ + SPEAKER(config, "speaker").front_center(); + DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.25); +} + +void amsterdam_state::dallas32(machine_config &config) +{ + amsterdam(config); + + /* basic machine hardware */ + M68020(config.replace(), m_maincpu, 14_MHz_XTAL); + m_maincpu->set_periodic_int(FUNC(amsterdam_state::irq5_line_hold), attotime::from_hz(50)); + m_maincpu->set_addrmap(AS_PROGRAM, &amsterdam_state::dallas32_mem); +} + + + +/****************************************************************************** + ROM Definitions +******************************************************************************/ + +ROM_START( amsterd ) + ROM_REGION16_BE( 0x1000000, "maincpu", 0 ) + ROM_LOAD16_BYTE("amsterda-u.bin", 0x00000, 0x08000, CRC(0a75514e) SHA1(27daf78b0aba4d7a293b96b3c1fa92f6ee9bcb59) ) + ROM_LOAD16_BYTE("amsterda-l.bin", 0x00001, 0x08000, CRC(6e17d8fa) SHA1(e0f9e57aaa445f6ff7cbe868658ed7bcfa7e31fb) ) +ROM_END + + +ROM_START( dallas32 ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD("dallas32.epr", 0x000000, 0x10000, CRC(83b9ff3f) SHA1(97bf4cb3c61f8ec328735b3c98281bba44b30a28) ) +ROM_END + +ROM_START( dallas16 ) + ROM_REGION16_BE( 0x1000000, "maincpu", 0 ) + ROM_LOAD16_BYTE("dallas-u.bin", 0x00000, 0x08000, CRC(70b741f7) SHA1(23d55ed0fea127b727d725c367ee1932ff5af39f) ) + ROM_LOAD16_BYTE("dallas-l.bin", 0x00001, 0x08000, CRC(69300ad3) SHA1(57ec1b955b1ddfe722011ff5da68a0cd71af9251) ) +ROM_END + + +ROM_START( roma32 ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD("roma32.bin", 0x000000, 0x10000, CRC(587d03bf) SHA1(504e9ff958084700076d633f9c306fc7baf64ffd) ) +ROM_END + +ROM_START( roma16 ) + ROM_REGION16_BE( 0x1000000, "maincpu", 0 ) + ROM_LOAD16_BYTE("roma16-u.bin", 0x00000, 0x08000, CRC(111d030f) SHA1(e027f7e7018d28ab794e7730392506056809db6b) ) + ROM_LOAD16_BYTE("roma16-l.bin", 0x00001, 0x08000, CRC(8245ddd2) SHA1(ab048b60fdc4358913a5d07b6fee863b66dd6734) ) +ROM_END + +} // anonymous namespace + + + +/****************************************************************************** + Drivers +******************************************************************************/ + +/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ +CONS( 1985, amsterd, 0, 0, amsterdam, amsterdam, amsterdam_state, empty_init, "Hegener + Glaser", "Mephisto Amsterdam", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) + +CONS( 1986, dallas32, 0, 0, dallas32, amsterdam, amsterdam_state, empty_init, "Hegener + Glaser", "Mephisto Dallas 68020", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1986, dallas16, dallas32, 0, amsterdam, amsterdam, amsterdam_state, empty_init, "Hegener + Glaser", "Mephisto Dallas 68000", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) + +CONS( 1987, roma32, 0, 0, dallas32, amsterdam, amsterdam_state, empty_init, "Hegener + Glaser", "Mephisto Roma 68020", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1987, roma16, roma32, 0, amsterdam, amsterdam, amsterdam_state, empty_init, "Hegener + Glaser", "Mephisto Roma 68000", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/mephisto_berlin.cpp mame-0.231+dfsg.1/src/mame/drivers/mephisto_berlin.cpp --- mame-0.230+dfsg.1/src/mame/drivers/mephisto_berlin.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/mephisto_berlin.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -1,17 +1,17 @@ // license:BSD-3-Clause -// copyright-holders:Sandro Ronco +// copyright-holders:Sandro Ronco, hap /****************************************************************************** Mephisto Berlin 68000 / Berlin Professional 68020 Berlin Professional has the same engine as Mephisto Genius. -TODO: -- does it have ROM waitstates like mephisto_modular? - Undocumented buttons: - holding ENTER and LEFT cursor on boot runs diagnostics - holding CLEAR on boot clears battery backed RAM +TODO: +- does it have ROM waitstates like mephisto_modular? + ******************************************************************************/ #include "emu.h" @@ -33,6 +33,7 @@ : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") , m_board(*this, "board") + , m_display(*this, "display") , m_keys(*this, "KEY") { } @@ -40,15 +41,16 @@ void berlinp(machine_config &config); private: - u8 input_r(); + required_device m_maincpu; + required_device m_board; + required_device m_display; + required_ioport m_keys; void berlin_mem(address_map &map); void berlinp_mem(address_map &map); void nvram_map(address_map &map); - required_device m_maincpu; - required_device m_board; - required_ioport m_keys; + u8 input_r(); }; @@ -59,10 +61,9 @@ u8 berlin_state::input_r() { - if (m_board->mux_r() == 0xff) - return m_keys->read(); - else - return m_board->input_r() ^ 0xff; + // display i/o d7 selects keypad + u8 data = (m_display->io_r() & 0x80) ? 0 : m_keys->read(); + return ~m_board->input_r() | data; } @@ -84,8 +85,8 @@ map(0x900000, 0x903fff).m("nvram_map", FUNC(address_map_bank_device::amap8)).umask16(0xff00); map(0xa00000, 0xa00000).r(FUNC(berlin_state::input_r)); map(0xb00000, 0xb00000).w(m_board, FUNC(mephisto_board_device::mux_w)); - map(0xc00000, 0xc00000).w("display", FUNC(mephisto_display_module2_device::latch_w)); - map(0xd00008, 0xd00008).w("display", FUNC(mephisto_display_module2_device::io_w)); + map(0xc00000, 0xc00000).w(m_display, FUNC(mephisto_display2_device::latch_w)); + map(0xd00008, 0xd00008).w(m_display, FUNC(mephisto_display2_device::io_w)); map(0xe00000, 0xe00000).w(m_board, FUNC(mephisto_board_device::led_w)); } @@ -96,8 +97,8 @@ map(0x800000, 0x800000).r(FUNC(berlin_state::input_r)); map(0x900000, 0x900000).w(m_board, FUNC(mephisto_board_device::mux_w)); map(0xa00000, 0xa00000).w(m_board, FUNC(mephisto_board_device::led_w)); - map(0xb00000, 0xb00000).w("display", FUNC(mephisto_display_module2_device::io_w)); - map(0xc00000, 0xc00000).w("display", FUNC(mephisto_display_module2_device::latch_w)); + map(0xb00000, 0xb00000).w(m_display, FUNC(mephisto_display2_device::io_w)); + map(0xc00000, 0xc00000).w(m_display, FUNC(mephisto_display2_device::latch_w)); map(0xd00000, 0xd07fff).m("nvram_map", FUNC(address_map_bank_device::amap8)).umask32(0xff000000); } @@ -109,14 +110,14 @@ static INPUT_PORTS_START( berlin ) PORT_START("KEY") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("ENTER") PORT_CODE(KEYCODE_ENTER) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("CLEAR") PORT_CODE(KEYCODE_BACKSPACE) PORT_CODE(KEYCODE_DEL) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("UP") PORT_CODE(KEYCODE_UP) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("DOWN") PORT_CODE(KEYCODE_DOWN) - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("LEFT") PORT_CODE(KEYCODE_LEFT) - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("RIGHT") PORT_CODE(KEYCODE_RIGHT) - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("NEW GAME (1/2)") PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_F1) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("NEW GAME (2/2)") PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_F1) + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Enter") PORT_CODE(KEYCODE_ENTER) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Clear") PORT_CODE(KEYCODE_BACKSPACE) PORT_CODE(KEYCODE_DEL) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Up") PORT_CODE(KEYCODE_UP) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Down") PORT_CODE(KEYCODE_DOWN) + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Left") PORT_CODE(KEYCODE_LEFT) + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Right") PORT_CODE(KEYCODE_RIGHT) + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("New Game (1/2)") PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_F1) // combine for NEW GAME + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("New Game (2/2)") PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_F1) // " INPUT_PORTS_END @@ -137,10 +138,10 @@ NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); ADDRESS_MAP_BANK(config, "nvram_map").set_map(&berlin_state::nvram_map).set_options(ENDIANNESS_BIG, 8, 13); - MEPHISTO_BUTTONS_BOARD(config, m_board); + MEPHISTO_BUTTONS_BOARD(config, m_board); // internal subdevice("board:board")->set_nvram_enable(true); - MEPHISTO_DISPLAY_MODULE2(config, "display"); + MEPHISTO_DISPLAY_MODULE2(config, m_display); // internal config.set_default_layout(layout_mephisto_berlin); } diff -Nru mame-0.230+dfsg.1/src/mame/drivers/mephisto_brikett.cpp mame-0.231+dfsg.1/src/mame/drivers/mephisto_brikett.cpp --- mame-0.230+dfsg.1/src/mame/drivers/mephisto_brikett.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/mephisto_brikett.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -69,12 +69,15 @@ ******************************************************************************/ #include "emu.h" + #include "cpu/cosmac/cosmac.h" #include "machine/cdp1852.h" #include "machine/sensorboard.h" #include "machine/timer.h" #include "sound/dac.h" +#include "video/mmdisplay1.h" #include "video/pwm.h" + #include "speaker.h" // internal artwork @@ -95,6 +98,7 @@ m_extport(*this, "extport"), m_board(*this, "board"), m_display(*this, "display"), + m_led_pwm(*this, "led_pwm"), m_dac(*this, "dac"), m_speaker_off(*this, "speaker_off"), m_inputs(*this, "IN.%u", 0) @@ -119,7 +123,8 @@ required_device m_maincpu; optional_device m_extport; optional_device m_board; - required_device m_display; + required_device m_display; + optional_device m_led_pwm; required_device m_dac; required_device m_speaker_off; optional_ioport_array<4+2> m_inputs; @@ -138,8 +143,6 @@ // I/O handlers INTERRUPT_GEN_MEMBER(interrupt); DECLARE_READ_LINE_MEMBER(clear_r); - DECLARE_WRITE_LINE_MEMBER(q_w); - void lcd_w(u8 data); u8 input_r(offs_t offset); u8 sound_r(); @@ -148,34 +151,16 @@ TIMER_DEVICE_CALLBACK_MEMBER(speaker_off) { m_dac->write(0); } - bool m_reset; - u8 m_lcd_mask; - u8 m_digit_idx; - u8 m_digit_data[4]; - - u8 m_esb_led; - u8 m_esb_row; - u8 m_esb_select; + bool m_reset = false; + u8 m_esb_led = 0; + u8 m_esb_row = 0; + u8 m_esb_select = 0; }; void brikett_state::machine_start() { - // zerofill - m_reset = false; - m_lcd_mask = 0; - m_digit_idx = 0; - memset(m_digit_data, 0, sizeof(m_digit_data)); - - m_esb_led = 0; - m_esb_row = 0; - m_esb_select = 0; - // register for savestates save_item(NAME(m_reset)); - save_item(NAME(m_lcd_mask)); - save_item(NAME(m_digit_idx)); - save_item(NAME(m_digit_data)); - save_item(NAME(m_esb_led)); save_item(NAME(m_esb_row)); save_item(NAME(m_esb_select)); @@ -184,8 +169,6 @@ void brikett_state::machine_reset() { m_reset = true; - m_digit_idx = 0; - set_cpu_freq(); } @@ -222,28 +205,6 @@ return ret; } -WRITE_LINE_MEMBER(brikett_state::q_w) -{ - // Q: LCD digit data mask - // also assume LCD update on rising edge - if (state && !m_lcd_mask) - { - for (int i = 0; i < 4; i++) - m_display->write_row(i, m_digit_data[i]); - m_display->update(); - } - - m_lcd_mask = state ? 0xff : 0; -} - -void brikett_state::lcd_w(u8 data) -{ - // d0-d7: write/shift LCD digit (4*CD4015) - // note: last digit "dp" is the colon in the middle - m_digit_data[m_digit_idx] = data ^ m_lcd_mask; - m_digit_idx = (m_digit_idx + 1) & 3; -} - u8 brikett_state::sound_r() { // port 1 read enables the speaker @@ -274,7 +235,7 @@ if (!m_inputs[5].read_safe(0)) { // chessboard disabled - m_display->matrix_partial(4, 8, 0, 0); + m_led_pwm->clear(); return; } @@ -296,7 +257,7 @@ m_esb_row = data; // update chessboard leds - m_display->matrix_partial(4, 8, ~m_esb_row, m_esb_led); + m_led_pwm->matrix(~m_esb_row, m_esb_led); } READ_LINE_MEMBER(brikett_state::esb_r) @@ -318,7 +279,7 @@ { map(0x0000, 0x17ff).rom(); map(0xf400, 0xf7ff).ram(); - map(0xfb00, 0xfb00).mirror(0x00ff).w(FUNC(brikett_state::lcd_w)); + map(0xfb00, 0xfb00).mirror(0x00ff).w(m_display, FUNC(mephisto_display1_device::data_w)); map(0xfff0, 0xffff).r(FUNC(brikett_state::input_r)); } @@ -459,14 +420,13 @@ m_maincpu->set_addrmap(AS_PROGRAM, &brikett_state::mephistoj_map); m_maincpu->set_addrmap(AS_IO, &brikett_state::mephistoj_io); m_maincpu->clear_cb().set(FUNC(brikett_state::clear_r)); - m_maincpu->q_cb().set(FUNC(brikett_state::q_w)).invert(); + m_maincpu->q_cb().set(m_display, FUNC(mephisto_display1_device::strobe_w)).invert(); const attotime irq_period = attotime::from_hz(4.194304_MHz_XTAL / 0x10000); // through SAJ300T m_maincpu->set_periodic_int(FUNC(brikett_state::interrupt), irq_period); /* video hardware */ - PWM_DISPLAY(config, m_display).set_size(4, 8); - m_display->set_segmask(0xf, 0x7f); + MEPHISTO_DISPLAY_MODULE1(config, m_display); // internal config.set_default_layout(layout_mephisto_junior); /* sound hardware */ @@ -519,7 +479,7 @@ m_board->init_cb().set(m_board, FUNC(sensorboard_device::preset_chess)); m_board->set_delay(attotime::from_msec(250)); - m_display->set_size(4+8, 8); + PWM_DISPLAY(config, m_led_pwm).set_size(8, 8); config.set_default_layout(layout_mephisto_esb2); } @@ -530,7 +490,7 @@ /* basic machine hardware */ m_maincpu->set_clock(6.144_MHz_XTAL); m_maincpu->set_addrmap(AS_PROGRAM, &brikett_state::mephisto3_map); - m_maincpu->q_cb().set(FUNC(brikett_state::q_w)); + m_maincpu->q_cb().set(m_display, FUNC(mephisto_display1_device::strobe_w)); config.set_default_layout(layout_mephisto_3); } diff -Nru mame-0.230+dfsg.1/src/mame/drivers/mephisto_glasgow.cpp mame-0.231+dfsg.1/src/mame/drivers/mephisto_glasgow.cpp --- mame-0.230+dfsg.1/src/mame/drivers/mephisto_glasgow.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/mephisto_glasgow.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -1,14 +1,23 @@ // license:BSD-3-Clause -// copyright-holders:Dirk Verwiebe, Cowering -/*************************************************************************** +// copyright-holders:Dirk Verwiebe, Cowering, hap +// thanks-to:Berger +/****************************************************************************** + Mephisto Glasgow 3 S chess computer Dirk V. sp_rinter@gmx.de -68000 CPU -64 KB ROM -16 KB RAM -4 Digit LCD +TODO: +- add waitstates, CPU is 12MHz but with DTACK waitstates for slow EPROMs, + effective speed is less than 10MHz + +=============================================================================== + +Hardware notes: +- 68000 CPU +- 64 KB ROM +- 16 KB RAM +- 4 Digit LCD 3*74LS138 Decoder/Multiplexer 1*74LS74 Dual positive edge triggered D Flip Flop @@ -22,279 +31,161 @@ 1*74LS367 3 State Hex Buffers 1*SG-10 Seiko 4-pin plastic XTAL chip "50H", to IPL0+2 - -How to play (quick guide) -1. You are the white player. -2. Click on the piece to move (LED starts flashing), then click where it goes -3. Computer plays black, it will work out its move and beep. -4. Read the move in the display, or look for the flashing LEDs. -5. Move the computer's piece in the same way you moved yours. -6. You'll need to read the official user manual for advanced features, or if - you get messages such as "Err1". - -TODO: -- add waitstates(applies to glasgow, amsterd, others?), CPU is 12MHz but with DTACK - waitstates for slow EPROMs, effective speed is less than 10MHz -- LCD module is 8.8.:8.8 like mephisto_brikett/mm1 (so, add ":" in the middle) - -***************************************************************************/ +******************************************************************************/ #include "emu.h" + #include "cpu/m68000/m68000.h" #include "machine/mmboard.h" #include "sound/dac.h" +#include "video/mmdisplay1.h" + #include "speaker.h" // internal artwork -#include "mephisto_amsterdam.lh" #include "mephisto_glasgow.lh" +namespace { + class glasgow_state : public driver_device { public: glasgow_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") - , m_dac(*this, "dac") , m_board(*this, "board") - , m_keyboard(*this, "LINE%u", 0) - , m_digits(*this, "digit%u", 0U) + , m_display(*this, "display") + , m_dac(*this, "dac") + , m_keys(*this, "KEY.%u", 0) { } void glasgow(machine_config &config); protected: - void glasgow_lcd_w(uint8_t data); - void glasgow_lcd_flag_w(uint8_t data); - uint8_t glasgow_keys_r(); - void glasgow_keys_w(uint8_t data); - virtual void machine_start() override; - virtual void machine_reset() override; - - void glasgow_mem(address_map &map); +private: required_device m_maincpu; - required_device m_dac; required_device m_board; - required_ioport_array<2> m_keyboard; - output_finder<4> m_digits; - - uint8_t m_lcd_shift_counter; - uint8_t m_led7; - uint8_t m_key_select; -}; - - -class amsterd_state : public glasgow_state -{ -public: - using glasgow_state::glasgow_state; + required_device m_display; + required_device m_dac; + required_ioport_array<2> m_keys; - void amsterd(machine_config &config); - void dallas32(machine_config &config); + void glasgow_mem(address_map &map); -protected: - void write_lcd(uint8_t data); - void write_lcd_flag(uint8_t data); - void write_beeper(uint8_t data); - void write_board(uint8_t data); - uint8_t read_newkeys(); + void control_w(u8 data); + u8 keys_r(); + void keys_w(u8 data); - void amsterd_mem(address_map &map); - void dallas32_mem(address_map &map); + u8 m_kp_mux = 0; }; - - -void glasgow_state::glasgow_lcd_w(uint8_t data) +void glasgow_state::machine_start() { - if (m_led7 == 0) - m_digits[m_lcd_shift_counter] = data; - - m_lcd_shift_counter--; - m_lcd_shift_counter &= 3; + save_item(NAME(m_kp_mux)); } -void glasgow_state::glasgow_lcd_flag_w(uint8_t data) -{ - uint8_t const lcd_flag = data & 0x81; - m_dac->write(BIT(lcd_flag, 0)); - if (lcd_flag) - m_led7 = 255; - else - m_led7 = 0; -} +/****************************************************************************** + I/O +******************************************************************************/ -uint8_t glasgow_state::glasgow_keys_r() +void glasgow_state::control_w(u8 data) { - // See if any keys pressed - uint8_t data = 3; - - if (m_key_select == m_keyboard[0]->read()) - data &= 1; - - if (m_key_select == m_keyboard[1]->read()) - data &= 2; - - return data; -} + // d0: speaker out + m_dac->write(BIT(data, 0)); -void glasgow_state::glasgow_keys_w(uint8_t data) -{ - m_key_select = data; + // d7: lcd strobe + m_display->strobe_w(BIT(data, 7)); } -void amsterd_state::write_lcd(uint8_t data) +u8 glasgow_state::keys_r() { - if (m_lcd_shift_counter & 4) - m_digits[m_lcd_shift_counter & 3] = data; + u8 data = 0; - m_lcd_shift_counter--; - m_lcd_shift_counter &= 7; -} + // d0,d1: multiplexed inputs + for (int i = 0; i < 2; i++) + if (m_kp_mux & m_keys[i]->read()) + data |= 1 << i; -void amsterd_state::write_lcd_flag(uint8_t data) -{ - // The key function in the rom expects a value from the - // second key row after writing to here - m_key_select = 1; + // reading keypad also clears irq + if (!machine().side_effects_disabled()) + m_maincpu->set_input_line(M68K_IRQ_5, CLEAR_LINE); - m_led7 = data ? 255 : 0; + return ~data; } -void amsterd_state::write_board(uint8_t data) +void glasgow_state::keys_w(u8 data) { - m_key_select = 0; - m_board->led_w(0); - m_board->mux_w(data); + m_kp_mux = ~data; } -void amsterd_state::write_beeper(uint8_t data) -{ - m_dac->write(BIT(data, 0)); -} -uint8_t amsterd_state::read_newkeys() -{ - return m_keyboard[m_key_select & 1]->read(); -} - -void glasgow_state::machine_start() -{ - m_digits.resolve(); - - save_item(NAME(m_lcd_shift_counter)); - save_item(NAME(m_led7)); - save_item(NAME(m_key_select)); -} - - -void glasgow_state::machine_reset() -{ - m_lcd_shift_counter = 3; - m_key_select = 0; - m_led7 = 0; -} +/****************************************************************************** + Address Maps +******************************************************************************/ void glasgow_state::glasgow_mem(address_map &map) { map.global_mask(0x1ffff); map(0x000000, 0x00ffff).rom(); - map(0x010000, 0x010000).w(FUNC(glasgow_state::glasgow_lcd_w)); - map(0x010002, 0x010002).rw(FUNC(glasgow_state::glasgow_keys_r), FUNC(glasgow_state::glasgow_keys_w)); - map(0x010004, 0x010004).w(FUNC(glasgow_state::glasgow_lcd_flag_w)); - map(0x010006, 0x010006).rw("board", FUNC(mephisto_board_device::input_r), FUNC(mephisto_board_device::led_w)); - map(0x010008, 0x010008).w("board", FUNC(mephisto_board_device::mux_w)); - map(0x01c000, 0x01ffff).ram(); // 16KB + map(0x010000, 0x010000).w(m_display, FUNC(mephisto_display1_device::data_w)); + map(0x010002, 0x010002).rw(FUNC(glasgow_state::keys_r), FUNC(glasgow_state::keys_w)); + map(0x010004, 0x010004).w(FUNC(glasgow_state::control_w)); + map(0x010006, 0x010006).rw(m_board, FUNC(mephisto_board_device::input_r), FUNC(mephisto_board_device::led_w)); + map(0x010008, 0x010008).w(m_board, FUNC(mephisto_board_device::mux_w)); + map(0x01c000, 0x01ffff).ram(); } -void amsterd_state::amsterd_mem(address_map &map) -{ - map(0x000000, 0x00ffff).rom(); - map(0x800002, 0x800002).w(FUNC(amsterd_state::write_lcd)); - map(0x800008, 0x800008).w(FUNC(amsterd_state::write_lcd_flag)); - map(0x800004, 0x800004).w(FUNC(amsterd_state::write_beeper)); - map(0x800010, 0x800010).w(FUNC(amsterd_state::write_board)); - map(0x800020, 0x800020).r("board", FUNC(mephisto_board_device::input_r)); - map(0x800040, 0x800040).r(FUNC(amsterd_state::read_newkeys)); - map(0x800088, 0x800088).w("board", FUNC(mephisto_board_device::led_w)); - map(0xffc000, 0xffffff).ram(); // 16KB -} -void amsterd_state::dallas32_mem(address_map &map) -{ - map(0x000000, 0x00ffff).rom(); - map(0x010000, 0x01ffff).ram(); // 64KB - map(0x800002, 0x800002).w(FUNC(amsterd_state::write_lcd)); - map(0x800004, 0x800004).w(FUNC(amsterd_state::write_beeper)); - map(0x800008, 0x800008).w(FUNC(amsterd_state::write_lcd_flag)); - map(0x800010, 0x800010).w(FUNC(amsterd_state::write_board)); - map(0x800020, 0x800020).r("board", FUNC(mephisto_board_device::input_r)); - map(0x800040, 0x800040).r(FUNC(amsterd_state::read_newkeys)); - map(0x800088, 0x800088).w("board", FUNC(mephisto_board_device::led_w)); -} -static INPUT_PORTS_START( new_keyboard ) - PORT_START("LINE0") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("A / 1") PORT_CODE(KEYCODE_A) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("B / 2 / Pawn") PORT_CODE(KEYCODE_B) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) +/****************************************************************************** + Input Ports +******************************************************************************/ + +static INPUT_PORTS_START( glasgow ) + PORT_START("KEY.0") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Left / Black / 9") PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_CODE(KEYCODE_LEFT) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("CL") PORT_CODE(KEYCODE_BACKSPACE) PORT_CODE(KEYCODE_DEL) PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("C / 3 / Knight") PORT_CODE(KEYCODE_C) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("D / 4 / Bishop") PORT_CODE(KEYCODE_D) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("E / 5 / Rook") PORT_CODE(KEYCODE_E) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("F / 6 / Queen") PORT_CODE(KEYCODE_F) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) - PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Left / Black / 9") PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_CODE(KEYCODE_LEFT) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Right / White / 0") PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(KEYCODE_RIGHT) - - PORT_START("LINE1") - PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("INFO") PORT_CODE(KEYCODE_I) - PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("POS") PORT_CODE(KEYCODE_O) - PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("LEV") PORT_CODE(KEYCODE_L) - PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("MEM") PORT_CODE(KEYCODE_M) - PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("CL") PORT_CODE(KEYCODE_BACKSPACE) PORT_CODE(KEYCODE_DEL) - PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("ENT") PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("ENT") PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("D / 4 / Bishop") PORT_CODE(KEYCODE_D) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("A / 1") PORT_CODE(KEYCODE_A) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("F / 6 / Queen") PORT_CODE(KEYCODE_F) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("B / 2 / Pawn") PORT_CODE(KEYCODE_B) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) + + PORT_START("KEY.1") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("E / 5 / Rook") PORT_CODE(KEYCODE_E) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("INFO") PORT_CODE(KEYCODE_I) + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Right / White / 0") PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(KEYCODE_RIGHT) + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("POS") PORT_CODE(KEYCODE_O) + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("H / 8") PORT_CODE(KEYCODE_H) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("LEV") PORT_CODE(KEYCODE_L) PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("G / 7 / King") PORT_CODE(KEYCODE_G) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) - PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("H / 8") PORT_CODE(KEYCODE_H) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("MEM") PORT_CODE(KEYCODE_M) INPUT_PORTS_END -static INPUT_PORTS_START( old_keyboard ) - PORT_START("LINE0") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Left / Black / 9") PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_CODE(KEYCODE_LEFT) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("CL") PORT_CODE(KEYCODE_BACKSPACE) PORT_CODE(KEYCODE_DEL) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("C / 3 / Knight") PORT_CODE(KEYCODE_C) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("ENT") PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("D / 4 / Bishop") PORT_CODE(KEYCODE_D) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("A / 1") PORT_CODE(KEYCODE_A) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("F / 6 / Queen") PORT_CODE(KEYCODE_F) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("B / 2 / Pawn") PORT_CODE(KEYCODE_B) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) - - PORT_START("LINE1") - PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("E / 5 / Rook") PORT_CODE(KEYCODE_E) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) - PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("INFO") PORT_CODE(KEYCODE_I) - PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Right / White / 0") PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(KEYCODE_RIGHT) - PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("POS") PORT_CODE(KEYCODE_O) - PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("H / 8") PORT_CODE(KEYCODE_H) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) - PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("LEV") PORT_CODE(KEYCODE_L) - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("G / 7 / King") PORT_CODE(KEYCODE_G) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) - PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("MEM") PORT_CODE(KEYCODE_M) -INPUT_PORTS_END +/****************************************************************************** + Machine Configs +******************************************************************************/ + void glasgow_state::glasgow(machine_config &config) { /* basic machine hardware */ M68000(config, m_maincpu, 12_MHz_XTAL); - m_maincpu->set_periodic_int(FUNC(glasgow_state::irq5_line_hold), attotime::from_hz(50)); + m_maincpu->set_periodic_int(FUNC(glasgow_state::irq5_line_assert), attotime::from_hz(50)); m_maincpu->set_addrmap(AS_PROGRAM, &glasgow_state::glasgow_mem); MEPHISTO_SENSORS_BOARD(config, m_board); m_board->set_delay(attotime::from_msec(200)); /* video hardware */ + MEPHISTO_DISPLAY_MODULE1(config, m_display); config.set_default_layout(layout_mephisto_glasgow); /* sound hardware */ @@ -302,30 +193,11 @@ DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.25); } -void amsterd_state::amsterd(machine_config &config) -{ - glasgow(config); - /* basic machine hardware */ - m_maincpu->set_addrmap(AS_PROGRAM, &amsterd_state::amsterd_mem); - config.set_default_layout(layout_mephisto_amsterdam); -} - -void amsterd_state::dallas32(machine_config &config) -{ - amsterd(config); - - /* basic machine hardware */ - M68020(config.replace(), m_maincpu, 14_MHz_XTAL); - m_maincpu->set_periodic_int(FUNC(amsterd_state::irq5_line_hold), attotime::from_hz(50)); - m_maincpu->set_addrmap(AS_PROGRAM, &amsterd_state::dallas32_mem); -} - - -/*************************************************************************** - ROM definitions -***************************************************************************/ +/****************************************************************************** + ROM Definitions +******************************************************************************/ ROM_START( glasgow ) ROM_REGION( 0x10000, "maincpu", 0 ) @@ -335,11 +207,6 @@ ROM_LOAD16_BYTE("me3_2_2l.410", 0x08001, 0x04000, CRC(b3f27827) SHA1(864ba897d24024592d08c4ae090aa70a2cc5f213) ) ROM_END -ROM_START( amsterd ) - ROM_REGION16_BE( 0x1000000, "maincpu", 0 ) - ROM_LOAD16_BYTE("amsterda-u.bin", 0x00000, 0x08000, CRC(0a75514e) SHA1(27daf78b0aba4d7a293b96b3c1fa92f6ee9bcb59) ) - ROM_LOAD16_BYTE("amsterda-l.bin", 0x00001, 0x08000, CRC(6e17d8fa) SHA1(e0f9e57aaa445f6ff7cbe868658ed7bcfa7e31fb) ) -ROM_END ROM_START( amsterda ) ROM_REGION( 0x10000, "maincpu", 0 ) @@ -349,17 +216,6 @@ ROM_LOAD16_BYTE("bl_4_1", 0x08001, 0x04000, CRC(533e584a) SHA1(0e4510977dc627125c278920492bc137793a9554) ) ROM_END -ROM_START( dallas32 ) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD("dallas32.epr", 0x000000, 0x10000, CRC(83b9ff3f) SHA1(97bf4cb3c61f8ec328735b3c98281bba44b30a28) ) -ROM_END - -ROM_START( dallas16 ) - ROM_REGION16_BE( 0x1000000, "maincpu", 0 ) - ROM_LOAD16_BYTE("dallas-u.bin", 0x00000, 0x08000, CRC(70b741f7) SHA1(23d55ed0fea127b727d725c367ee1932ff5af39f) ) - ROM_LOAD16_BYTE("dallas-l.bin", 0x00001, 0x08000, CRC(69300ad3) SHA1(57ec1b955b1ddfe722011ff5da68a0cd71af9251) ) -ROM_END - ROM_START( dallas16a ) ROM_REGION16_BE( 0x1000000, "maincpu", 0 ) ROM_LOAD16_BYTE("dal_g_pr", 0x00000, 0x04000, CRC(66deade9) SHA1(07ec6b923f2f053172737f1fc94aec84f3ea8da1) ) @@ -368,17 +224,6 @@ ROM_LOAD16_BYTE("dal_g_bl", 0x08001, 0x04000, CRC(144a15e2) SHA1(c4fcc23d55fa5262f5e01dbd000644a7feb78f32) ) ROM_END -ROM_START( roma32 ) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD("roma32.bin", 0x000000, 0x10000, CRC(587d03bf) SHA1(504e9ff958084700076d633f9c306fc7baf64ffd) ) -ROM_END - -ROM_START( roma16 ) - ROM_REGION16_BE( 0x1000000, "maincpu", 0 ) - ROM_LOAD16_BYTE("roma16-u.bin", 0x00000, 0x08000, CRC(111d030f) SHA1(e027f7e7018d28ab794e7730392506056809db6b) ) - ROM_LOAD16_BYTE("roma16-l.bin", 0x00001, 0x08000, CRC(8245ddd2) SHA1(ab048b60fdc4358913a5d07b6fee863b66dd6734) ) -ROM_END - ROM_START( roma16a ) ROM_REGION16_BE( 0x1000000, "maincpu", 0 ) ROM_LOAD16_BYTE("roma_r_low", 0x00000, 0x04000, CRC(f2312170) SHA1(82a50ba59f74365aa77478adaadbbace6693dcc1) ) @@ -387,21 +232,18 @@ ROM_LOAD16_BYTE("roma_l_high", 0x08001, 0x04000, CRC(0b20617b) SHA1(f0296c486ce9009a69de1e50b90b0e1b7555f468) ) ROM_END +} // anonymous namespace + + + +/****************************************************************************** + Drivers +******************************************************************************/ + +/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ +CONS( 1984, glasgow, 0, 0, glasgow, glasgow, glasgow_state, empty_init, "Hegener + Glaser", "Mephisto III-S Glasgow", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -/*************************************************************************** - Game drivers -***************************************************************************/ - -/* YEAR, NAME, PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ -CONS( 1984, glasgow, 0, 0, glasgow, old_keyboard, glasgow_state, empty_init, "Hegener + Glaser", "Mephisto III-S Glasgow", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) - -CONS( 1985, amsterd, 0, 0, amsterd, new_keyboard, amsterd_state, empty_init, "Hegener + Glaser", "Mephisto Amsterdam", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1985, amsterda, amsterd, 0, glasgow, old_keyboard, glasgow_state, empty_init, "Hegener + Glaser", "Mephisto Amsterdam (Glasgow hardware)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) - -CONS( 1986, dallas32, 0, 0, dallas32, new_keyboard, amsterd_state, empty_init, "Hegener + Glaser", "Mephisto Dallas 68020", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1986, dallas16, dallas32, 0, amsterd, new_keyboard, amsterd_state, empty_init, "Hegener + Glaser", "Mephisto Dallas 68000", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1986, dallas16a, dallas32, 0, glasgow, old_keyboard, glasgow_state, empty_init, "Hegener + Glaser", "Mephisto Dallas 68000 (Glasgow hardware)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) - -CONS( 1987, roma32, 0, 0, dallas32, new_keyboard, amsterd_state, empty_init, "Hegener + Glaser", "Mephisto Roma 68020", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1987, roma16, roma32, 0, amsterd, new_keyboard, amsterd_state, empty_init, "Hegener + Glaser", "Mephisto Roma 68000", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1987, roma16a, roma32, 0, glasgow, old_keyboard, glasgow_state, empty_init, "Hegener + Glaser", "Mephisto Roma 68000 (Glasgow hardware)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +// newer chesscomputers on 4-ROM hardware (see mephisto_amsterdam.cpp for parent sets) +CONS( 1985, amsterda, amsterd, 0, glasgow, glasgow, glasgow_state, empty_init, "Hegener + Glaser", "Mephisto Amsterdam (Glasgow hardware)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1986, dallas16a, dallas32, 0, glasgow, glasgow, glasgow_state, empty_init, "Hegener + Glaser", "Mephisto Dallas 68000 (Glasgow hardware)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1987, roma16a, roma32, 0, glasgow, glasgow, glasgow_state, empty_init, "Hegener + Glaser", "Mephisto Roma 68000 (Glasgow hardware)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/mephisto_milano.cpp mame-0.231+dfsg.1/src/mame/drivers/mephisto_milano.cpp --- mame-0.230+dfsg.1/src/mame/drivers/mephisto_milano.cpp 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/mephisto_milano.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,224 @@ +// license:BSD-3-Clause +// copyright-holders:Sandro Ronco, hap +// thanks-to:Berger +/****************************************************************************** + +Mephisto Milano + +Hardware notes: +- RP65C02G or W65C02P-8 @ 4.91MHz +- 8KB RAM(battery-backed), 64KB ROM +- HD44100H, HD44780, 2*16 chars LCD screen +- 8*8 chessboard buttons, 16 leds, piezo + +Nigel Short is basically a Milano 2.00 + +******************************************************************************/ + +#include "emu.h" + +#include "cpu/m6502/r65c02.h" +#include "machine/74259.h" +#include "machine/nvram.h" +#include "machine/sensorboard.h" +#include "video/mmdisplay2.h" +#include "video/pwm.h" + +// internal artwork +#include "mephisto_milano.lh" + + +namespace { + +class milano_state : public driver_device +{ +public: + milano_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_board(*this, "board") + , m_display(*this, "display") + , m_led_pwm(*this, "led_pwm") + , m_keys(*this, "KEY") + { } + + void milano(machine_config &config); + +protected: + virtual void machine_start() override; + +private: + required_device m_maincpu; + required_device m_board; + required_device m_display; + required_device m_led_pwm; + required_ioport m_keys; + + void milano_mem(address_map &map); + + void update_leds(); + void io_w(u8 data); + void board_w(u8 data); + u8 board_r(); + u8 keys_r(offs_t offset); + + u8 m_board_mux = 0; + u8 m_led_data = 0; +}; + +void milano_state::machine_start() +{ + save_item(NAME(m_board_mux)); + save_item(NAME(m_led_data)); +} + + + +/****************************************************************************** + I/O +******************************************************************************/ + +void milano_state::update_leds() +{ + m_led_pwm->matrix(m_board_mux, m_led_data); +} + +void milano_state::io_w(u8 data) +{ + // default display module + m_display->io_w(data & 0x0f); + + // high bits go to board leds + m_led_data = data >> 4; + update_leds(); +} + +void milano_state::board_w(u8 data) +{ + m_board_mux = ~data; + update_leds(); +} + +u8 milano_state::board_r() +{ + u8 data = 0; + + // read chessboard sensors + for (int i = 0; i < 8; i++) + if (BIT(m_board_mux, i)) + data |= m_board->read_rank(i); + + return data; +} + +u8 milano_state::keys_r(offs_t offset) +{ + return ~(BIT(m_keys->read(), offset) << 7); +} + + + +/****************************************************************************** + Address Maps +******************************************************************************/ + +void milano_state::milano_mem(address_map &map) +{ + map(0x0000, 0x1fbf).ram().share("nvram"); + map(0x1fc0, 0x1fc0).w(m_display, FUNC(mephisto_display2_device::latch_w)); + map(0x1fd0, 0x1fd0).w(FUNC(milano_state::board_w)); + map(0x1fe0, 0x1fe0).r(FUNC(milano_state::board_r)); + map(0x1fe8, 0x1fef).w("outlatch", FUNC(hc259_device::write_d7)).nopr(); + map(0x1fd8, 0x1fdf).r(FUNC(milano_state::keys_r)); + map(0x1ff0, 0x1ff0).w(FUNC(milano_state::io_w)); + map(0x2000, 0xffff).rom(); +} + + + +/****************************************************************************** + Input Ports +******************************************************************************/ + +static INPUT_PORTS_START( milano ) + PORT_START("KEY") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Training / Pawn") PORT_CODE(KEYCODE_T) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Info / Knight") PORT_CODE(KEYCODE_I) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Memory / Bishop") PORT_CODE(KEYCODE_M) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Position / Rook") PORT_CODE(KEYCODE_O) + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Level / Queen") PORT_CODE(KEYCODE_L) + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Function / King") PORT_CODE(KEYCODE_F) + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Enter / New Game") PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_F1) // combine for NEW GAME + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Clear / New Game") PORT_CODE(KEYCODE_BACKSPACE) PORT_CODE(KEYCODE_DEL) PORT_CODE(KEYCODE_F1) // " +INPUT_PORTS_END + + + +/****************************************************************************** + Machine Configs +******************************************************************************/ + +void milano_state::milano(machine_config &config) +{ + /* basic machine hardware */ + R65C02(config, m_maincpu, 4.9152_MHz_XTAL); + m_maincpu->set_addrmap(AS_PROGRAM, &milano_state::milano_mem); + + const attotime nmi_period = attotime::from_hz(4.9152_MHz_XTAL / 0x2000); + m_maincpu->set_periodic_int(FUNC(milano_state::nmi_line_pulse), nmi_period); + + NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); + + hc259_device &outlatch(HC259(config, "outlatch")); + outlatch.q_out_cb<0>().set_output("led100"); + outlatch.q_out_cb<1>().set_output("led101"); + outlatch.q_out_cb<2>().set_output("led102"); + outlatch.q_out_cb<3>().set_output("led103"); + outlatch.q_out_cb<4>().set_output("led104"); + outlatch.q_out_cb<5>().set_output("led105"); + + SENSORBOARD(config, m_board).set_type(sensorboard_device::BUTTONS); + m_board->init_cb().set(m_board, FUNC(sensorboard_device::preset_chess)); + m_board->set_delay(attotime::from_msec(150)); + + /* video hardware */ + PWM_DISPLAY(config, m_led_pwm).set_size(8, 2); + + MEPHISTO_DISPLAY_MODULE2(config, m_display); // internal + config.set_default_layout(layout_mephisto_milano); +} + + + +/****************************************************************************** + ROM Definitions +******************************************************************************/ + +ROM_START( milano ) // 1.02 + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD("milano_b958", 0x0000, 0x10000, CRC(0e9c8fe1) SHA1(e9176f42d86fe57e382185c703c7eff7e63ca711) ) +ROM_END + +ROM_START( milanoa ) // 1.01 + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD("milano_4af8", 0x0000, 0x10000, CRC(22efc0be) SHA1(921607d6dacf72c0686b8970261c43e2e244dc9f) ) +ROM_END + +ROM_START( nshort ) // 2.00 + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD("nshort.bin", 0x00000, 0x10000, CRC(4bd51e23) SHA1(3f55cc1c55dae8818b7e9384b6b8d43dc4f0a1af) ) +ROM_END + +} // anonymous namespace + + + +/*************************************************************************** + Drivers +***************************************************************************/ + +/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ +CONS( 1991, milano, 0, 0, milano, milano, milano_state, empty_init, "Hegener + Glaser", "Mephisto Milano (v1.02)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1991, milanoa, milano, 0, milano, milano, milano_state, empty_init, "Hegener + Glaser", "Mephisto Milano (v1.01)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) + +CONS( 1993, nshort, 0, 0, milano, milano, milano_state, empty_init, "Hegener + Glaser", "Mephisto Nigel Short", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/mephisto_mm1.cpp mame-0.231+dfsg.1/src/mame/drivers/mephisto_mm1.cpp --- mame-0.230+dfsg.1/src/mame/drivers/mephisto_mm1.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/mephisto_mm1.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -16,7 +16,9 @@ - 32KB ROM (2*D27128, or HN613256P) - 4KB RAM (2*HM6116LP-3) - CDP1853CE, CD4011BE, 3*40373BP, 4556BE -- modular slot, 18-button keypad, beeper +- Mephisto modular display module +- Mephisto modular chessboard +- 18-button keypad, beeper It supports the HG 170 opening book module. LCD module is assumed to be same as MM II and others. @@ -38,12 +40,12 @@ #include "emu.h" -#include "cpu/cosmac/cosmac.h" -#include "machine/sensorboard.h" -#include "sound/dac.h" -#include "video/pwm.h" #include "bus/generic/slot.h" #include "bus/generic/carts.h" +#include "cpu/cosmac/cosmac.h" +#include "machine/mmboard.h" +#include "sound/dac.h" +#include "video/mmdisplay1.h" #include "softlist.h" #include "speaker.h" @@ -62,7 +64,6 @@ driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), m_board(*this, "board"), - m_display(*this, "display"), m_dac(*this, "dac"), m_inputs(*this, "IN.%u", 0) { } @@ -80,10 +81,9 @@ private: // devices/pointers required_device m_maincpu; - required_device m_board; - required_device m_display; + required_device m_board; required_device m_dac; - required_ioport_array<8> m_inputs; + required_ioport_array<2> m_inputs; // address maps void mirage_map(address_map &map); @@ -94,53 +94,25 @@ INTERRUPT_GEN_MEMBER(interrupt); void update_display(); DECLARE_READ_LINE_MEMBER(clear_r); - DECLARE_WRITE_LINE_MEMBER(q_w); void sound_w(u8 data); void unknown_w(u8 data); - void lcd_w(u8 data); - void board_w(u8 data); - void led_w(u8 data); void keypad_w(u8 data); - u8 board_r(); - template DECLARE_READ_LINE_MEMBER(keypad_r); + template DECLARE_READ_LINE_MEMBER(keypad_r); - bool m_reset; - u8 m_lcd_mask; - u8 m_digit_idx; - u8 m_digit_data[4]; - - u8 m_kp_mux; - u8 m_cb_mux; - u8 m_led_data; + bool m_reset = false; + u8 m_kp_mux = 0; }; void mm1_state::machine_start() { - // zerofill - m_reset = false; - m_lcd_mask = 0; - m_digit_idx = 0; - memset(m_digit_data, 0, sizeof(m_digit_data)); - - m_kp_mux = 0; - m_cb_mux = 0; - m_led_data = 0; - // register for savestates save_item(NAME(m_reset)); - save_item(NAME(m_lcd_mask)); - save_item(NAME(m_digit_idx)); - save_item(NAME(m_digit_data)); - save_item(NAME(m_kp_mux)); - save_item(NAME(m_cb_mux)); - save_item(NAME(m_led_data)); } void mm1_state::machine_reset() { m_reset = true; - m_digit_idx = 0; } @@ -162,28 +134,6 @@ return ret; } -WRITE_LINE_MEMBER(mm1_state::q_w) -{ - // Q: LCD digit data mask - // also assume LCD update on rising edge - if (state && !m_lcd_mask) - { - for (int i = 0; i < 4; i++) - m_display->write_row(i, m_digit_data[i]); - m_display->update(); - } - - m_lcd_mask = state ? 0xff : 0; -} - -void mm1_state::lcd_w(u8 data) -{ - // d0-d7: write/shift LCD digit (4*CD4015) - // note: last digit "dp" is the colon in the middle - m_digit_data[m_digit_idx] = data ^ m_lcd_mask; - m_digit_idx = (m_digit_idx + 1) & 3; -} - void mm1_state::sound_w(u8 data) { // d0: speaker out @@ -195,55 +145,17 @@ // mmirage: unused serial device? } -void mm1_state::update_display() -{ - // 64 chessboard leds - m_display->matrix_partial(4, 8, m_cb_mux, m_led_data); -} - -void mm1_state::led_w(u8 data) -{ - // d0-d7: chessboard led data - m_led_data = data; - update_display(); -} - -void mm1_state::board_w(u8 data) -{ - // d0-d7: chessboard input/led mux - m_cb_mux = ~data; - update_display(); -} - -u8 mm1_state::board_r() -{ - u8 data = 0; - - // d0-d7: multiplexed inputs (chessboard) - for (int i = 0; i < 8; i++) - if (BIT(m_cb_mux, i)) - data |= m_board->read_rank(i); - - return ~data; -} - void mm1_state::keypad_w(u8 data) { // d0-d7: keypad input mux m_kp_mux = ~data; } -template +template READ_LINE_MEMBER(mm1_state::keypad_r) { - u8 data = 0; - // EF3,EF4: multiplexed inputs (keypad) - for (int i = 0; i < 8; i++) - if (BIT(m_kp_mux, i)) - data |= m_inputs[i]->read(); - - return data >> P & 1; + return (m_inputs[N]->read() & m_kp_mux) ? 1 : 0; } @@ -269,10 +181,10 @@ { map(0x01, 0x01).w(FUNC(mm1_state::sound_w)); map(0x02, 0x02).w(FUNC(mm1_state::keypad_w)); - map(0x03, 0x03).r(FUNC(mm1_state::board_r)); - map(0x04, 0x04).w(FUNC(mm1_state::board_w)); - map(0x05, 0x05).w(FUNC(mm1_state::led_w)); - map(0x06, 0x06).w(FUNC(mm1_state::lcd_w)); + map(0x03, 0x03).r(m_board, FUNC(mephisto_board_device::input_r)); + map(0x04, 0x04).w(m_board, FUNC(mephisto_board_device::mux_w)); + map(0x05, 0x05).w(m_board, FUNC(mephisto_board_device::led_w)); + map(0x06, 0x06).w("display", FUNC(mephisto_display1_device::data_w)); map(0x07, 0x07).w(FUNC(mm1_state::unknown_w)); } @@ -285,69 +197,45 @@ static INPUT_PORTS_START( mm1 ) PORT_START("IN.0") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("E / 5 / Rook") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_CODE(KEYCODE_LEFT) PORT_NAME("Left / Black / 9") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_I) PORT_NAME("INFO") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(KEYCODE_RIGHT) PORT_NAME("Right / White / 0") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_O) PORT_NAME("POS") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_H) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("H / 8") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_L) PORT_NAME("LEV") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_G) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("G / 7 / King") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_M) PORT_NAME("MEM") PORT_START("IN.1") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_I) PORT_NAME("INFO") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_CODE(KEYCODE_LEFT) PORT_NAME("Left / Black / 9") PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_BACKSPACE) PORT_CODE(KEYCODE_DEL) PORT_NAME("CL") - - PORT_START("IN.2") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(KEYCODE_RIGHT) PORT_NAME("Right / White / 0") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_C) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("C / 3 / Knight") - - PORT_START("IN.3") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_O) PORT_NAME("POS") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("ENT") - - PORT_START("IN.4") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_H) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("H / 8") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_D) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("D / 4 / Bishop") - - PORT_START("IN.5") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_L) PORT_NAME("LEV") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_A) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("A / 1") - - PORT_START("IN.6") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_G) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("G / 7 / King") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_F) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("F / 6 / Queen") - - PORT_START("IN.7") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_M) PORT_NAME("MEM") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_B) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("B / 2 / Pawn") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_C) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("C / 3 / Knight") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("ENT") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_D) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("D / 4 / Bishop") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_A) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("A / 1") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_F) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("F / 6 / Queen") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_B) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("B / 2 / Pawn") INPUT_PORTS_END static INPUT_PORTS_START( mirage ) PORT_START("IN.0") PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_BACKSPACE) PORT_CODE(KEYCODE_DEL) PORT_NAME("CL") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_I) PORT_NAME("LIST") + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_A) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("A / 1") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("ENT") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_B) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("B / 2 / Pawn") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_SPACE) PORT_CODE(KEYCODE_PLUS_PAD) PORT_NAME("STA") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_C) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("C / 3 / Knight") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_L) PORT_NAME("LEV") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_D) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("D / 4 / Bishop") PORT_START("IN.1") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_A) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("A / 1") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_I) PORT_NAME("LIST") PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_E) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("E / 5 / Rook") - - PORT_START("IN.2") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("ENT") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("Black / 9") - - PORT_START("IN.3") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_B) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("B / 2 / Pawn") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_F) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("F / 6 / Queen") - - PORT_START("IN.4") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_SPACE) PORT_CODE(KEYCODE_PLUS_PAD) PORT_NAME("STA") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("White / 0") - - PORT_START("IN.5") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_C) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("C / 3 / Knight") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_G) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("G / 7 / King") - - PORT_START("IN.6") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_L) PORT_NAME("LEV") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_V) PORT_NAME("REV") - - PORT_START("IN.7") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_D) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("D / 4 / Bishop") - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_H) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("H / 8") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_NAME("Black / 9") + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_F) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("F / 6 / Queen") + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_NAME("White / 0") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_G) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_NAME("G / 7 / King") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_V) PORT_NAME("REV") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_H) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_NAME("H / 8") PORT_START("FAKE") // module came with buttons sensorboard by default PORT_CONFNAME( 0x01, 0x00, "Board Sensors" ) PORT_CHANGED_MEMBER(DEVICE_SELF, mm1_state, mirage_switch_sensor_type, 0) @@ -357,7 +245,7 @@ INPUT_CHANGED_MEMBER(mm1_state::mirage_switch_sensor_type) { - m_board->set_type(newval ? sensorboard_device::MAGNETS : sensorboard_device::BUTTONS); + m_board->get()->set_type(newval ? sensorboard_device::MAGNETS : sensorboard_device::BUTTONS); } @@ -373,7 +261,7 @@ m_maincpu->set_addrmap(AS_PROGRAM, &mm1_state::mirage_map); m_maincpu->set_addrmap(AS_IO, &mm1_state::mm1_io); m_maincpu->clear_cb().set(FUNC(mm1_state::clear_r)); - m_maincpu->q_cb().set(FUNC(mm1_state::q_w)).invert(); + m_maincpu->q_cb().set("display", FUNC(mephisto_display1_device::strobe_w)).invert(); m_maincpu->ef3_cb().set(FUNC(mm1_state::keypad_r<0>)); m_maincpu->ef4_cb().set(FUNC(mm1_state::keypad_r<1>)); @@ -381,13 +269,11 @@ const attotime irq_period = attotime::from_ticks(8 * 32 * 0x71, 8_MHz_XTAL); // LDC = 0x71 m_maincpu->set_periodic_int(FUNC(mm1_state::interrupt), irq_period); - SENSORBOARD(config, m_board).set_type(sensorboard_device::BUTTONS); - m_board->init_cb().set(m_board, FUNC(sensorboard_device::preset_chess)); + MEPHISTO_BUTTONS_BOARD(config, m_board); // see mirage_switch_sensor_type m_board->set_delay(attotime::from_msec(200)); /* video hardware */ - PWM_DISPLAY(config, m_display).set_size(4+8, 8); - m_display->set_segmask(0xf, 0x7f); + MEPHISTO_DISPLAY_MODULE1(config, "display"); config.set_default_layout(layout_mephisto_mirage); /* sound hardware */ @@ -401,13 +287,14 @@ /* basic machine hardware */ m_maincpu->set_addrmap(AS_PROGRAM, &mm1_state::mm1_map); - m_maincpu->q_cb().set(FUNC(mm1_state::q_w)); + m_maincpu->q_cb().set("display", FUNC(mephisto_display1_device::strobe_w)); // wrong! uses internal timer interrupt const attotime irq_period = attotime::from_ticks(8 * 32 * 0xfa, 8_MHz_XTAL); // LDC = 0xFA m_maincpu->set_periodic_int(FUNC(mm1_state::interrupt), irq_period); - m_board->set_type(sensorboard_device::MAGNETS); + MEPHISTO_SENSORS_BOARD(config.replace(), m_board); + m_board->set_delay(attotime::from_msec(200)); config.set_default_layout(layout_mephisto_mm1); diff -Nru mame-0.230+dfsg.1/src/mame/drivers/mephisto_mm2.cpp mame-0.231+dfsg.1/src/mame/drivers/mephisto_mm2.cpp --- mame-0.230+dfsg.1/src/mame/drivers/mephisto_mm2.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/mephisto_mm2.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -1,16 +1,25 @@ // license:BSD-3-Clause -// copyright-holders:Dirk Verwiebe, Cowering +// copyright-holders:Dirk Verwiebe, Cowering, hap /****************************************************************************** - Mephisto 4 + 5 Chess Computer - 2007 Dirk V. -CPU 65C02 P4 (also seen: R65C02P3, G65SC02P-4) -Clock 4.9152 MHz -NMI CLK 600 Hz -IRQ Line is set to VSS -8 KByte SRAM Sony CXK5864-15l +Mephisto 4 + 5 Chess Computer +2007 Dirk V. -1-CD74HC4060E 14 Bit Counter +TODO: +- rebel5 unknown read from 0x4002, looks like leftover bookrom check +- need to emulate TurboKit properly, also for mm5p (it's not as simple as a CPU + overclock plus ROM patch) + +=============================================================================== + +Hardware notes: +- CPU: R65C02P3/R65C02P4 or G65SC02P-4 +- Clock: 4.9152 MHz +- NMI CLK: 600 Hz +- IRQ Line is set to VSS +- 8 KByte SRAM Sony CXK5864-15L + +1-CD74HC4060E: 14 Bit Counter 1-CD74HC166E 1-CD74HC251E 1-SN74HC138N TI @@ -25,7 +34,7 @@ 1-CD4011 4-CD4015 -$0000-$1fff S-RAM +$0000-$1fff S-RAM $2000 LCD 4 Byte Shift Register writeonly right to left every 2nd char xor'd by $FF @@ -51,6 +60,8 @@ $4000-7FFF Opening Modul HG550 $8000-$FFF ROM +=============================================================================== + Mephisto 4 Turbo Kit 18mhz - (mm4tk) This is a replacement rom combining the turbo kit initial rom with the original MM IV. The Turbo Kit powers up to it's tiny rom, copies itself to ram, banks in normal rom, @@ -65,27 +76,21 @@ The MM V prototype was the program that Ed Schroeder participated with as "Rebel" at the 1989 WMCCC in Portorose. It was used with the TK20 TurboKit. -http://chesseval.com/ChessEvalJournal/PrototypeMMV.htm +For more information, see: http://chesseval.com/ChessEvalJournal/PrototypeMMV.htm MM VI (Saitek, 1994) is on different hardware, H8 CPU. - -TODO: -- need to emulate TurboKit properly, also for mm5p (it's not as simple as a CPU - overclock plus ROM patch) -- LCD module is 8.8.:8.8 like mephisto_brikett/mm1 (so, add ":" in the middle) - ******************************************************************************/ #include "emu.h" -#include "cpu/m6502/m65c02.h" +#include "bus/generic/slot.h" +#include "bus/generic/carts.h" +#include "cpu/m6502/r65c02.h" #include "machine/74259.h" #include "machine/mmboard.h" -#include "machine/timer.h" #include "sound/dac.h" -#include "bus/generic/slot.h" -#include "bus/generic/carts.h" +#include "video/mmdisplay1.h" #include "softlist.h" #include "speaker.h" @@ -95,17 +100,18 @@ #include "mephisto_bup.lh" -class mephisto_state : public driver_device +namespace { + +class mm2_state : public driver_device { public: - mephisto_state(const machine_config &mconfig, device_type type, const char *tag) + mm2_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") , m_outlatch(*this, "outlatch") + , m_display(*this, "display") , m_dac(*this, "dac") - , m_key1(*this, "KEY1_%u", 0U) - , m_key2(*this, "KEY2_%u", 0U) - , m_digits(*this, "digit%u", 0U) + , m_keys(*this, "KEY.%u", 0) { } DECLARE_INPUT_CHANGED_MEMBER(reset_button); @@ -118,47 +124,40 @@ void mm2(machine_config &config); void bup(machine_config &config); +protected: + virtual void machine_reset() override; + private: - required_device m_maincpu; + required_device m_maincpu; required_device m_outlatch; + required_device m_display; required_device m_dac; - required_ioport_array<8> m_key1; - required_ioport_array<8> m_key2; - output_finder<4> m_digits; - - void write_lcd(uint8_t data); - void mephisto_nmi_w(uint8_t data); - uint8_t read_keys(offs_t offset); - DECLARE_WRITE_LINE_MEMBER(write_led7); - uint8_t m_lcd_shift_counter; - uint8_t m_led7; - uint8_t m_allowNMI; - virtual void machine_start() override; - virtual void machine_reset() override; - TIMER_DEVICE_CALLBACK_MEMBER(update_nmi); - TIMER_DEVICE_CALLBACK_MEMBER(update_nmi_r5); + required_ioport_array<2> m_keys; void bup_mem(address_map &map); void mm2_mem(address_map &map); void mm4_mem(address_map &map); void mm5p_mem(address_map &map); void rebel5_mem(address_map &map); + + void lcd_irqack_w(u8 data); + u8 keys_r(offs_t offset); }; -void mephisto_state::machine_start() +void mm2_state::machine_reset() { - m_digits.resolve(); - - save_item(NAME(m_lcd_shift_counter)); - save_item(NAME(m_led7)); - save_item(NAME(m_allowNMI)); + m_display->reset(); + m_maincpu->set_input_line(0, CLEAR_LINE); } -void mephisto_state::machine_reset() +INPUT_CHANGED_MEMBER(mm2_state::reset_button) { - m_lcd_shift_counter = 3; - m_allowNMI = 1; - m_led7 = 0xff; + // RES buttons in serial tied to CPU RESET + if (ioport("RESET")->read() == 3) + { + m_maincpu->pulse_input_line(INPUT_LINE_RESET, attotime::zero); + machine_reset(); + } } @@ -167,55 +166,17 @@ I/O ******************************************************************************/ -TIMER_DEVICE_CALLBACK_MEMBER(mephisto_state::update_nmi) -{ - if (m_allowNMI) - { - m_allowNMI = 0; - m_maincpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero); - } -} - -TIMER_DEVICE_CALLBACK_MEMBER(mephisto_state::update_nmi_r5) +void mm2_state::lcd_irqack_w(u8 data) { - m_maincpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero); -} - -void mephisto_state::write_lcd(uint8_t data) -{ - if (m_led7 == 0) - m_digits[m_lcd_shift_counter] = data; // 0x109 MM IV // 0x040 MM V - - m_lcd_shift_counter--; - m_lcd_shift_counter &= 3; + m_display->data_w(data); + // accessing 0x2800 also clears irq m_maincpu->set_input_line(0, CLEAR_LINE); } -void mephisto_state::mephisto_nmi_w(uint8_t data) -{ - m_allowNMI = 1; -} - -uint8_t mephisto_state::read_keys(offs_t offset) -{ - uint8_t data = 0; - - if (!m_outlatch->q7_r()) - { - data = m_key1[offset]->read(); - } - else - { - data = m_key2[offset]->read(); - } - - return data | 0x7f; -} - -WRITE_LINE_MEMBER(mephisto_state::write_led7) +u8 mm2_state::keys_r(offs_t offset) { - m_led7 = state ? 0x00 : 0xff; + return ~(BIT(m_keys[m_outlatch->q7_r()]->read(), offset) << 7); } @@ -224,50 +185,50 @@ Address Maps ******************************************************************************/ -void mephisto_state::bup_mem(address_map &map) +void mm2_state::bup_mem(address_map &map) { map(0x0000, 0x0fff).ram(); map(0x1000, 0x1007).w("outlatch", FUNC(hc259_device::write_d7)); - map(0x1800, 0x1807).r(FUNC(mephisto_state::read_keys)); + map(0x1800, 0x1807).r(FUNC(mm2_state::keys_r)); map(0x2000, 0x2000).r("board", FUNC(mephisto_board_device::input_r)); - map(0x2800, 0x2800).w(FUNC(mephisto_state::write_lcd)); + map(0x2800, 0x2800).w(FUNC(mm2_state::lcd_irqack_w)); map(0x3000, 0x3000).w("board", FUNC(mephisto_board_device::led_w)); map(0x3800, 0x3800).w("board", FUNC(mephisto_board_device::mux_w)); map(0x8000, 0xffff).rom(); } -void mephisto_state::mm2_mem(address_map &map) +void mm2_state::mm2_mem(address_map &map) { bup_mem(map); map(0x4000, 0x7fff).r("cartslot", FUNC(generic_slot_device::read_rom)); // opening library } -void mephisto_state::rebel5_mem(address_map &map) +void mm2_state::rebel5_mem(address_map &map) { map(0x0000, 0x1fff).ram(); - map(0x2000, 0x2007).w("outlatch", FUNC(hc259_device::write_d7)); - map(0x3000, 0x4000).r("board", FUNC(mephisto_board_device::input_r)); - map(0x3000, 0x3007).r(FUNC(mephisto_state::read_keys)); - map(0x5000, 0x5000).w(FUNC(mephisto_state::write_lcd)); + map(0x2000, 0x2007).w("outlatch", FUNC(hc259_device::write_d7)).nopr(); + map(0x3000, 0x3007).r(FUNC(mm2_state::keys_r)); + map(0x4000, 0x4000).r("board", FUNC(mephisto_board_device::input_r)); + map(0x5000, 0x5000).w(m_display, FUNC(mephisto_display1_device::data_w)); map(0x6000, 0x6000).w("board", FUNC(mephisto_board_device::led_w)); map(0x7000, 0x7000).w("board", FUNC(mephisto_board_device::mux_w)); map(0x8000, 0xffff).rom(); } -void mephisto_state::mm5p_mem(address_map &map) +void mm2_state::mm5p_mem(address_map &map) { map(0x0000, 0x1fff).ram(); - map(0x2000, 0x2000).w(FUNC(mephisto_state::write_lcd)); - map(0x2400, 0x2407).w("board", FUNC(mephisto_board_device::led_w)).nopr(); + map(0x2000, 0x2000).w(m_display, FUNC(mephisto_display1_device::data_w)); + map(0x2400, 0x2400).w("board", FUNC(mephisto_board_device::led_w)); map(0x2800, 0x2800).w("board", FUNC(mephisto_board_device::mux_w)); - map(0x2c00, 0x2c07).r(FUNC(mephisto_state::read_keys)); + map(0x2c00, 0x2c07).r(FUNC(mm2_state::keys_r)); map(0x3000, 0x3000).r("board", FUNC(mephisto_board_device::input_r)); map(0x3400, 0x3407).w("outlatch", FUNC(hc259_device::write_d7)).nopr(); - map(0x3800, 0x3800).w(FUNC(mephisto_state::mephisto_nmi_w)); + map(0x3800, 0x3800).nopw(); // N/C map(0x4000, 0xffff).rom(); } -void mephisto_state::mm4_mem(address_map &map) +void mm2_state::mm4_mem(address_map &map) { mm5p_mem(map); map(0x4000, 0x7fff).r("cartslot", FUNC(generic_slot_device::read_rom)); @@ -279,109 +240,72 @@ Input Ports ******************************************************************************/ -static INPUT_PORTS_START( mephisto ) - PORT_START("KEY1_0") //Port $2c00 - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("CL") PORT_CODE(KEYCODE_DEL) PORT_CODE(KEYCODE_BACKSPACE) - PORT_START("KEY1_1") //Port $2c01 - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("POS") PORT_CODE(KEYCODE_O) - PORT_START("KEY1_2") //Port $2c02 - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("MEM") PORT_CODE(KEYCODE_M) - PORT_START("KEY1_3") //Port $2c03 - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("INFO") PORT_CODE(KEYCODE_I) - PORT_START("KEY1_4") //Port $2c04 - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("LEV") PORT_CODE(KEYCODE_L) - PORT_START("KEY1_5") //Port $2c05 - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("ENT") PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) - PORT_START("KEY1_6") //Port $2c06 - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Right / White / 0") PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(KEYCODE_RIGHT) - PORT_START("KEY1_7") //Port $2c07 - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Left / Black / 9") PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_CODE(KEYCODE_LEFT) - - PORT_START("KEY2_0") //Port $2c08 - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("E / 5 / Queen") PORT_CODE(KEYCODE_E) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) - PORT_START("KEY2_1") //Port $2c09 - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("F / 6 / King") PORT_CODE(KEYCODE_F) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) - PORT_START("KEY2_2") //Port $2c0a - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("G / 7") PORT_CODE(KEYCODE_G) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) - PORT_START("KEY2_3") //Port $2c0b - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("A / 1 / Pawn") PORT_CODE(KEYCODE_A) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) - PORT_START("KEY2_4") //Port $2c0c - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("H / 8") PORT_CODE(KEYCODE_H) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) - PORT_START("KEY2_5") //Port $2c0d - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("B / 2 / Knight") PORT_CODE(KEYCODE_B) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) - PORT_START("KEY2_6") //Port $2c0e - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("C / 3 / Bishop") PORT_CODE(KEYCODE_C) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) - PORT_START("KEY2_7") //Port $2c0f - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("D / 4 / Rook") PORT_CODE(KEYCODE_D) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) +static INPUT_PORTS_START( mm2 ) + PORT_START("KEY.0") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("CL") PORT_CODE(KEYCODE_DEL) PORT_CODE(KEYCODE_BACKSPACE) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("POS") PORT_CODE(KEYCODE_O) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("MEM") PORT_CODE(KEYCODE_M) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("INFO") PORT_CODE(KEYCODE_I) + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("LEV") PORT_CODE(KEYCODE_L) + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("ENT") PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Right / White / 0") PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(KEYCODE_RIGHT) + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Left / Black / 9") PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_CODE(KEYCODE_LEFT) + + PORT_START("KEY.1") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("E / 5 / Queen") PORT_CODE(KEYCODE_E) PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("F / 6 / King") PORT_CODE(KEYCODE_F) PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("G / 7") PORT_CODE(KEYCODE_G) PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("A / 1 / Pawn") PORT_CODE(KEYCODE_A) PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("H / 8") PORT_CODE(KEYCODE_H) PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("B / 2 / Knight") PORT_CODE(KEYCODE_B) PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("C / 3 / Bishop") PORT_CODE(KEYCODE_C) PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("D / 4 / Rook") PORT_CODE(KEYCODE_D) PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_START("RESET") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("RES 1") PORT_CODE(KEYCODE_Z) PORT_CODE(KEYCODE_F1) PORT_CHANGED_MEMBER(DEVICE_SELF, mephisto_state, reset_button, 0) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("RES 2") PORT_CODE(KEYCODE_X) PORT_CODE(KEYCODE_F1) PORT_CHANGED_MEMBER(DEVICE_SELF, mephisto_state, reset_button, 0) + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("RES 1") PORT_CODE(KEYCODE_Z) PORT_CODE(KEYCODE_F1) PORT_CHANGED_MEMBER(DEVICE_SELF, mm2_state, reset_button, 0) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("RES 2") PORT_CODE(KEYCODE_X) PORT_CODE(KEYCODE_F1) PORT_CHANGED_MEMBER(DEVICE_SELF, mm2_state, reset_button, 0) INPUT_PORTS_END static INPUT_PORTS_START( bup ) - PORT_START("KEY1_0") - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("1 / Pawn") PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) - PORT_START("KEY1_1") - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("2 / Knight") PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) - PORT_START("KEY1_2") - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("3 / Bishop") PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) - PORT_START("KEY1_3") - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("4 / Rook") PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) - PORT_START("KEY1_4") - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("5 / Queen") PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) - PORT_START("KEY1_5") - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("6 / King") PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) - PORT_START("KEY1_6") - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("White") PORT_CODE(KEYCODE_W) - PORT_START("KEY1_7") - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Black") PORT_CODE(KEYCODE_B) - - PORT_START("KEY2_0") - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("CL") PORT_CODE(KEYCODE_DEL) PORT_CODE(KEYCODE_BACKSPACE) - PORT_START("KEY2_1") - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("ENT") PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) - PORT_START("KEY2_2") - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("BEST") PORT_CODE(KEYCODE_S) - PORT_START("KEY2_3") - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("INFO") PORT_CODE(KEYCODE_I) - PORT_START("KEY2_4") - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("MON") PORT_CODE(KEYCODE_N) - PORT_START("KEY2_5") - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("POS") PORT_CODE(KEYCODE_O) - PORT_START("KEY2_6") - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("LEV") PORT_CODE(KEYCODE_L) - PORT_START("KEY2_7") - PORT_BIT(0x080, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("MEM") PORT_CODE(KEYCODE_M) + PORT_START("KEY.0") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("1 / Pawn") PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("2 / Knight") PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("3 / Bishop") PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("4 / Rook") PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("5 / Queen") PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("6 / King") PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("White") PORT_CODE(KEYCODE_W) + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Black") PORT_CODE(KEYCODE_B) + + PORT_START("KEY.1") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("CL") PORT_CODE(KEYCODE_DEL) PORT_CODE(KEYCODE_BACKSPACE) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("ENT") PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("BEST") PORT_CODE(KEYCODE_S) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("INFO") PORT_CODE(KEYCODE_I) + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("MON") PORT_CODE(KEYCODE_N) + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("POS") PORT_CODE(KEYCODE_O) + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("LEV") PORT_CODE(KEYCODE_L) + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("MEM") PORT_CODE(KEYCODE_M) PORT_START("RESET") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("RES 1") PORT_CODE(KEYCODE_Z) PORT_CODE(KEYCODE_F1) PORT_CHANGED_MEMBER(DEVICE_SELF, mephisto_state, reset_button, 0) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("RES 2") PORT_CODE(KEYCODE_X) PORT_CODE(KEYCODE_F1) PORT_CHANGED_MEMBER(DEVICE_SELF, mephisto_state, reset_button, 0) + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("RES 1") PORT_CODE(KEYCODE_Z) PORT_CODE(KEYCODE_F1) PORT_CHANGED_MEMBER(DEVICE_SELF, mm2_state, reset_button, 0) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("RES 2") PORT_CODE(KEYCODE_X) PORT_CODE(KEYCODE_F1) PORT_CHANGED_MEMBER(DEVICE_SELF, mm2_state, reset_button, 0) INPUT_PORTS_END -INPUT_CHANGED_MEMBER(mephisto_state::reset_button) -{ - // RES buttons in serial tied to CPU RESET - if (ioport("RESET")->read() == 3) - { - m_maincpu->pulse_input_line(INPUT_LINE_RESET, attotime::zero); - machine_reset(); - } -} - /****************************************************************************** Machine Configs ******************************************************************************/ -void mephisto_state::rebel5(machine_config &config) +void mm2_state::rebel5(machine_config &config) { /* basic machine hardware */ - M65C02(config, m_maincpu, 9.8304_MHz_XTAL / 2); - m_maincpu->set_addrmap(AS_PROGRAM, &mephisto_state::rebel5_mem); + R65C02(config, m_maincpu, 9.8304_MHz_XTAL / 2); + m_maincpu->set_addrmap(AS_PROGRAM, &mm2_state::rebel5_mem); - TIMER(config, "nmi_timer").configure_periodic(FUNC(mephisto_state::update_nmi_r5), attotime::from_hz(600)); + const attotime nmi_period = attotime::from_hz(9.8304_MHz_XTAL / 2 / 0x2000); // 600Hz + m_maincpu->set_periodic_int(FUNC(mm2_state::nmi_line_pulse), nmi_period); HC259(config, m_outlatch); m_outlatch->q_out_cb<0>().set_output("led100"); @@ -391,9 +315,10 @@ m_outlatch->q_out_cb<4>().set_output("led104"); m_outlatch->q_out_cb<5>().set_output("led105"); m_outlatch->q_out_cb<6>().set(m_dac, FUNC(dac_bit_interface::write)); - m_outlatch->q_out_cb<7>().set(FUNC(mephisto_state::write_led7)); + m_outlatch->q_out_cb<7>().set(m_display, FUNC(mephisto_display1_device::strobe_w)).invert(); MEPHISTO_SENSORS_BOARD(config, "board"); + MEPHISTO_DISPLAY_MODULE1(config, m_display); config.set_default_layout(layout_mephisto_mm2); /* sound hardware */ @@ -401,63 +326,63 @@ DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.25); } -void mephisto_state::mm5p(machine_config &config) +void mm2_state::mm5p(machine_config &config) { rebel5(config); /* basic machine hardware */ m_maincpu->set_clock(4.9152_MHz_XTAL); - m_maincpu->set_addrmap(AS_PROGRAM, &mephisto_state::mm5p_mem); + m_maincpu->set_addrmap(AS_PROGRAM, &mm2_state::mm5p_mem); - TIMER(config.replace(), "nmi_timer").configure_periodic(FUNC(mephisto_state::update_nmi), attotime::from_hz(600)); + const attotime nmi_period = attotime::from_hz(4.9152_MHz_XTAL / 0x2000); // 600Hz + m_maincpu->set_periodic_int(FUNC(mm2_state::nmi_line_pulse), nmi_period); } -void mephisto_state::mm4(machine_config &config) +void mm2_state::mm4(machine_config &config) { mm5p(config); /* basic machine hardware */ - m_maincpu->set_addrmap(AS_PROGRAM, &mephisto_state::mm4_mem); + m_maincpu->set_addrmap(AS_PROGRAM, &mm2_state::mm4_mem); GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "mephisto_cart"); SOFTWARE_LIST(config, "cart_list").set_original("mephisto_mm4"); } -void mephisto_state::mm4tk(machine_config &config) +void mm2_state::mm4tk(machine_config &config) { mm4(config); m_maincpu->set_clock(18000000); } -void mephisto_state::mm5(machine_config &config) +void mm2_state::mm5(machine_config &config) { mm4(config); SOFTWARE_LIST(config.replace(), "cart_list").set_original("mephisto_mm5"); } -void mephisto_state::bup(machine_config &config) +void mm2_state::bup(machine_config &config) { rebel5(config); /* basic machine hardware */ m_maincpu->set_clock(7.3728_MHz_XTAL / 2); - m_maincpu->set_addrmap(AS_PROGRAM, &mephisto_state::bup_mem); + m_maincpu->set_addrmap(AS_PROGRAM, &mm2_state::bup_mem); - config.device_remove("nmi_timer"); const attotime irq_period = attotime::from_hz(7.3728_MHz_XTAL / 2 / 0x2000); // 450Hz from 4020 Q13 - m_maincpu->set_periodic_int(FUNC(mephisto_state::irq0_line_assert), irq_period); + m_maincpu->set_periodic_int(FUNC(mm2_state::irq0_line_assert), irq_period); - m_outlatch->q_out_cb<7>().set(FUNC(mephisto_state::write_led7)).invert(); + m_outlatch->q_out_cb<7>().set(m_display, FUNC(mephisto_display1_device::strobe_w)); config.set_default_layout(layout_mephisto_bup); } -void mephisto_state::mm2(machine_config &config) +void mm2_state::mm2(machine_config &config) { bup(config); /* basic machine hardware */ - m_maincpu->set_addrmap(AS_PROGRAM, &mephisto_state::mm2_mem); + m_maincpu->set_addrmap(AS_PROGRAM, &mm2_state::mm2_mem); config.set_default_layout(layout_mephisto_mm2); @@ -561,30 +486,32 @@ ROM_LOAD("programm.bin", 0x8000, 0x8000, CRC(ee22b974) SHA1(37267507be30ee84051bc94c3a63fb1298a00261) ) ROM_END +} // anonymous namespace + /****************************************************************************** Drivers ******************************************************************************/ -/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS */ -CONS( 1984, mm2, 0, 0, mm2, mephisto, mephisto_state, empty_init, "Hegener + Glaser", "Mephisto MM II (set 1, v4.00 1 EPROM)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1984, mm2a, mm2, 0, mm2, mephisto, mephisto_state, empty_init, "Hegener + Glaser", "Mephisto MM II (set 2, v4.00 2 EPROMs)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1984, mm2b, mm2, 0, mm2, mephisto, mephisto_state, empty_init, "Hegener + Glaser", "Mephisto MM II (set 3, v3.00)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1984, mm2c, mm2, 0, mm2, mephisto, mephisto_state, empty_init, "Hegener + Glaser", "Mephisto MM II (set 4)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1984, mm2d, mm2, 0, mm2, mephisto, mephisto_state, empty_init, "Hegener + Glaser", "Mephisto MM II (set 5)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) - -CONS( 1985, bup, 0, 0, bup, bup, mephisto_state, empty_init, "Hegener + Glaser", u8"Mephisto Blitz- und Problemlösungs-Modul (set 1)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1985, bupa, bup, 0, bup, bup, mephisto_state, empty_init, "Hegener + Glaser", u8"Mephisto Blitz- und Problemlösungs-Modul (set 2)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) - -CONS( 1986, rebel5, 0, 0, rebel5, mephisto, mephisto_state, empty_init, "Hegener + Glaser", "Mephisto Rebell 5,0 (set 1)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) // aka MM III -CONS( 1986, rebel5a, rebel5, 0, rebel5, mephisto, mephisto_state, empty_init, "Hegener + Glaser", "Mephisto Rebell 5,0 (set 2)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) - -CONS( 1987, mm4, 0, 0, mm4, mephisto, mephisto_state, empty_init, "Hegener + Glaser", "Mephisto MM IV (v7.10)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1987, mm4a, mm4, 0, mm4, mephisto, mephisto_state, empty_init, "Hegener + Glaser", "Mephisto MM IV (v7.00)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1987, mm4b, mm4, 0, mm4, mephisto, mephisto_state, empty_init, "Hegener + Glaser", "Mephisto MM IV (v6.00)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1987, mm4tk, mm4, 0, mm4tk, mephisto, mephisto_state, empty_init, "hack", "Mephisto MM IV (TurboKit)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_TIMING ) - -CONS( 1990, mm5, 0, 0, mm5, mephisto, mephisto_state, empty_init, "Hegener + Glaser", "Mephisto MM V (set 1)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1990, mm5a, mm5, 0, mm5, mephisto, mephisto_state, empty_init, "Hegener + Glaser", "Mephisto MM V (set 2)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1989, mm5p, mm5, 0, mm5p, mephisto, mephisto_state, empty_init, "Hegener + Glaser", "Mephisto MM V (prototype)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_TIMING ) +/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS */ +CONS( 1984, mm2, 0, 0, mm2, mm2, mm2_state, empty_init, "Hegener + Glaser", "Mephisto MM II (set 1, v4.00 1 EPROM)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1984, mm2a, mm2, 0, mm2, mm2, mm2_state, empty_init, "Hegener + Glaser", "Mephisto MM II (set 2, v4.00 2 EPROMs)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1984, mm2b, mm2, 0, mm2, mm2, mm2_state, empty_init, "Hegener + Glaser", "Mephisto MM II (set 3, v3.00)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1984, mm2c, mm2, 0, mm2, mm2, mm2_state, empty_init, "Hegener + Glaser", "Mephisto MM II (set 4)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1984, mm2d, mm2, 0, mm2, mm2, mm2_state, empty_init, "Hegener + Glaser", "Mephisto MM II (set 5)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) + +CONS( 1985, bup, 0, 0, bup, bup, mm2_state, empty_init, "Hegener + Glaser", u8"Mephisto Blitz- und Problemlösungs-Modul (set 1)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1985, bupa, bup, 0, bup, bup, mm2_state, empty_init, "Hegener + Glaser", u8"Mephisto Blitz- und Problemlösungs-Modul (set 2)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) + +CONS( 1986, rebel5, 0, 0, rebel5, mm2, mm2_state, empty_init, "Hegener + Glaser", "Mephisto Rebell 5,0 (set 1)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) // aka MM III +CONS( 1986, rebel5a, rebel5, 0, rebel5, mm2, mm2_state, empty_init, "Hegener + Glaser", "Mephisto Rebell 5,0 (set 2)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) // " + +CONS( 1987, mm4, 0, 0, mm4, mm2, mm2_state, empty_init, "Hegener + Glaser", "Mephisto MM IV (v7.10)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1987, mm4a, mm4, 0, mm4, mm2, mm2_state, empty_init, "Hegener + Glaser", "Mephisto MM IV (v7.00)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1987, mm4b, mm4, 0, mm4, mm2, mm2_state, empty_init, "Hegener + Glaser", "Mephisto MM IV (v6.00)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1987, mm4tk, mm4, 0, mm4tk, mm2, mm2_state, empty_init, "hack", "Mephisto MM IV (TurboKit)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_TIMING ) + +CONS( 1990, mm5, 0, 0, mm5, mm2, mm2_state, empty_init, "Hegener + Glaser", "Mephisto MM V (set 1)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1990, mm5a, mm5, 0, mm5, mm2, mm2_state, empty_init, "Hegener + Glaser", "Mephisto MM V (set 2)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1989, mm5p, mm5, 0, mm5p, mm2, mm2_state, empty_init, "Hegener + Glaser", "Mephisto MM V (Portorose TM version)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_TIMING ) // aka Rebel diff -Nru mame-0.230+dfsg.1/src/mame/drivers/mephisto_modena.cpp mame-0.231+dfsg.1/src/mame/drivers/mephisto_modena.cpp --- mame-0.230+dfsg.1/src/mame/drivers/mephisto_modena.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/mephisto_modena.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -8,6 +8,12 @@ The chess engine is by Frans Morsch, same one as Sphinx Dominator 2.05. Hold Pawn + Knight buttons at boot for test mode. +Hardware notes: +- PCB label: MODENA-A-2 +- W65C02SP or RP65C02G @ 4.19MHz +- 8KB RAM (battery-backed), 32KB ROM +- 8*8 chessboard buttons, 16+6 leds, 7seg lcd, piezo + **************************************************************************************************/ #include "emu.h" @@ -18,10 +24,12 @@ #include "machine/sensorboard.h" #include "machine/timer.h" #include "sound/dac.h" +#include "video/mmdisplay1.h" #include "video/pwm.h" #include "speaker.h" +// internal artwork #include "mephisto_modena.lh" @@ -35,9 +43,9 @@ , m_maincpu(*this, "maincpu") , m_board(*this, "board") , m_display(*this, "display") + , m_led_pwm(*this, "led_pwm") , m_dac(*this, "dac") , m_keys(*this, "KEY") - , m_digits(*this, "digit%u", 0U) { } void modena(machine_config &config); @@ -48,29 +56,25 @@ private: required_device m_maincpu; required_device m_board; - required_device m_display; + required_device m_display; + required_device m_led_pwm; required_device m_dac; required_ioport m_keys; - output_finder<4> m_digits; void modena_mem(address_map &map); u8 input_r(); - void digits_w(u8 data); void io_w(u8 data); void led_w(u8 data); void update_display(); - u8 m_board_mux = 0xff; - u8 m_digits_idx = 0; + u8 m_board_mux = 0; u8 m_io_ctrl = 0; }; void modena_state::machine_start() { - m_digits.resolve(); - - save_item(NAME(m_digits_idx)); + save_item(NAME(m_board_mux)); save_item(NAME(m_io_ctrl)); } @@ -82,7 +86,7 @@ void modena_state::update_display() { - m_display->matrix(m_io_ctrl >> 1 & 7, ~m_board_mux); + m_led_pwm->matrix(m_io_ctrl >> 1 & 7, m_board_mux); } u8 modena_state::input_r() @@ -94,8 +98,8 @@ data |= m_keys->read(); // read chessboard sensors - for (int i=0; i<8; i++) - if (!BIT(m_board_mux, i)) + for (int i = 0; i < 8; i++) + if (BIT(m_board_mux, i)) data |= m_board->read_rank(i); return data; @@ -104,7 +108,7 @@ void modena_state::led_w(u8 data) { // d0-d7: chessboard mux, led data - m_board_mux = data; + m_board_mux = ~data; update_display(); } @@ -112,17 +116,14 @@ { // d0: button select // d1-d3: led select - // d4: lcd polarity - // d6: speaker out m_io_ctrl = data; update_display(); - m_dac->write(BIT(data, 6)); -} -void modena_state::digits_w(u8 data) -{ - m_digits[m_digits_idx] = data ^ ((m_io_ctrl & 0x10) ? 0xff : 0x00); - m_digits_idx = (m_digits_idx + 1) & 3; + // d4: lcd strobe + m_display->strobe_w(BIT(data, 4)); + + // d6: speaker out + m_dac->write(BIT(data, 6)); } @@ -134,7 +135,7 @@ void modena_state::modena_mem(address_map &map) { map(0x0000, 0x1fff).ram().share("nvram"); - map(0x4000, 0x4000).w(FUNC(modena_state::digits_w)); + map(0x4000, 0x4000).w(m_display, FUNC(mephisto_display1_device::data_w)); map(0x5000, 0x5000).w(FUNC(modena_state::led_w)); map(0x6000, 0x6000).w(FUNC(modena_state::io_w)); map(0x7000, 0x7000).r(FUNC(modena_state::input_r)); @@ -150,14 +151,14 @@ static INPUT_PORTS_START( modena ) PORT_START("KEY") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("BOOK") PORT_CODE(KEYCODE_B) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("INFO") PORT_CODE(KEYCODE_I) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("MEMORY") PORT_CODE(KEYCODE_M) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("POSITION") PORT_CODE(KEYCODE_O) - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("LEVEL") PORT_CODE(KEYCODE_L) - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("FUNCTION") PORT_CODE(KEYCODE_F) - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("ENTER") PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_F1) // combine for NEW GAME - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("CLEAR") PORT_CODE(KEYCODE_BACKSPACE) PORT_CODE(KEYCODE_DEL) PORT_CODE(KEYCODE_F1) // " + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Book / Pawn") PORT_CODE(KEYCODE_B) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Info / Knight") PORT_CODE(KEYCODE_I) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Memory / Bishop") PORT_CODE(KEYCODE_M) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Position / Rook") PORT_CODE(KEYCODE_O) + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Level / Queen") PORT_CODE(KEYCODE_L) + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Function / King") PORT_CODE(KEYCODE_F) + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Enter / New Game") PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_F1) // combine for NEW GAME + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Clear / New Game") PORT_CODE(KEYCODE_BACKSPACE) PORT_CODE(KEYCODE_DEL) PORT_CODE(KEYCODE_F1) // " INPUT_PORTS_END @@ -169,10 +170,10 @@ void modena_state::modena(machine_config &config) { /* basic machine hardware */ - M65C02(config, m_maincpu, 4.194304_MHz_XTAL); // W65C02SP or RP65C02G + M65C02(config, m_maincpu, 4.194304_MHz_XTAL); m_maincpu->set_addrmap(AS_PROGRAM, &modena_state::modena_mem); - clock_device &nmi_clock(CLOCK(config, "nmi_clock", 4.194304_MHz_XTAL / (1 << 13))); // active for 975us + clock_device &nmi_clock(CLOCK(config, "nmi_clock", 4.194304_MHz_XTAL / 0x2000)); // active for 975us nmi_clock.signal_handler().set_inputline(m_maincpu, INPUT_LINE_NMI); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); @@ -183,7 +184,8 @@ m_board->set_nvram_enable(true); /* video hardware */ - PWM_DISPLAY(config, m_display).set_size(3, 8); + MEPHISTO_DISPLAY_MODULE1(config, m_display); // internal + PWM_DISPLAY(config, m_led_pwm).set_size(3, 8); config.set_default_layout(layout_mephisto_modena); /* sound hardware */ diff -Nru mame-0.230+dfsg.1/src/mame/drivers/mephisto_modular.cpp mame-0.231+dfsg.1/src/mame/drivers/mephisto_modular.cpp --- mame-0.230+dfsg.1/src/mame/drivers/mephisto_modular.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/mephisto_modular.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -252,8 +252,8 @@ map(0xf00000, 0xf00003).portr("KEY1"); map(0xf00004, 0xf00007).portr("KEY2"); map(0xf00008, 0xf0000b).portr("KEY3"); - map(0xd80000, 0xd80000).w("display", FUNC(mephisto_display_module2_device::latch_w)); - map(0xd80008, 0xd80008).w("display", FUNC(mephisto_display_module2_device::io_w)); + map(0xd80000, 0xd80000).w("display", FUNC(mephisto_display2_device::latch_w)); + map(0xd80008, 0xd80008).w("display", FUNC(mephisto_display2_device::io_w)); } void mmodular_state::port16_mem(address_map &map) @@ -283,8 +283,8 @@ map(0x800000fc, 0x800000fc).r("board", FUNC(mephisto_board_device::input_r)); map(0x88000000, 0x88000007).w("board", FUNC(mephisto_board_device::mux_w)).umask32(0xff000000); map(0x90000000, 0x90000007).w("board", FUNC(mephisto_board_device::led_w)).umask32(0xff000000); - map(0xa0000000, 0xa0000000).w("display", FUNC(mephisto_display_module2_device::latch_w)); - map(0xa0000010, 0xa0000010).w("display", FUNC(mephisto_display_module2_device::io_w)); + map(0xa0000000, 0xa0000000).w("display", FUNC(mephisto_display2_device::latch_w)); + map(0xa0000010, 0xa0000010).w("display", FUNC(mephisto_display2_device::io_w)); map(0xa8000000, 0xa8007fff).m("nvram_map", FUNC(address_map_bank_device::amap8)).umask32(0xff000000); } @@ -318,8 +318,8 @@ map(0xd8000004, 0xd8000004).r(FUNC(mmodular_state::bavaria1_r)); map(0xd8000008, 0xd8000008).w(FUNC(mmodular_state::bavaria_w)); map(0xd800000c, 0xd800000c).r(FUNC(mmodular_state::bavaria2_r)); - map(0xe0000000, 0xe0000000).w("display", FUNC(mephisto_display_module2_device::latch_w)); - map(0xe0000010, 0xe0000010).w("display", FUNC(mephisto_display_module2_device::io_w)); + map(0xe0000000, 0xe0000000).w("display", FUNC(mephisto_display2_device::latch_w)); + map(0xe0000010, 0xe0000010).w("display", FUNC(mephisto_display2_device::io_w)); map(0xe8000000, 0xe8007fff).m("nvram_map", FUNC(address_map_bank_device::amap8)).umask32(0xff000000); map(0xf0000004, 0xf0000007).portr("KEY1"); map(0xf0000008, 0xf000000b).portr("KEY2"); diff -Nru mame-0.230+dfsg.1/src/mame/drivers/mephisto_modular_tm.cpp mame-0.231+dfsg.1/src/mame/drivers/mephisto_modular_tm.cpp --- mame-0.230+dfsg.1/src/mame/drivers/mephisto_modular_tm.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/mephisto_modular_tm.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -76,6 +76,7 @@ protected: virtual void machine_start() override; virtual void machine_reset() override; + virtual void device_post_load() override { install_bootrom(m_bootrom_enabled); } private: // devices/pointers @@ -90,9 +91,9 @@ void mmtm_8m_map(address_map &map); void nvram_map(address_map &map); - bool m_bootrom_enabled; - TIMER_DEVICE_CALLBACK_MEMBER(disable_bootrom) { m_bootrom_enabled = false; } - u32 bootrom_r(offs_t offset) { return (m_bootrom_enabled) ? m_rom[offset] : m_mainram[offset]; } + void install_bootrom(bool enable); + TIMER_DEVICE_CALLBACK_MEMBER(disable_bootrom) { install_bootrom(false); } + bool m_bootrom_enabled = false; void set_cpu_freq(); }; @@ -107,10 +108,23 @@ set_cpu_freq(); // disable bootrom after reset - m_bootrom_enabled = true; + install_bootrom(true); m_disable_bootrom->adjust(m_maincpu->cycles_to_attotime(50)); } +void mmtm_state::install_bootrom(bool enable) +{ + address_space &program = m_maincpu->space(AS_PROGRAM); + program.unmap_readwrite(0, std::max(m_rom.bytes(), m_mainram.bytes()) - 1); + + if (enable) + program.install_rom(0, m_rom.bytes() - 1, m_rom); + else + program.install_ram(0, m_mainram.bytes() - 1, m_mainram); + + m_bootrom_enabled = enable; +} + void mmtm_state::set_cpu_freq() { // "Mephisto X" were usually overclocked at tournaments @@ -140,15 +154,14 @@ void mmtm_state::mmtm_2m_map(address_map &map) { map(0x00000000, 0x0003ffff).ram().share("mainram"); - map(0x00000000, 0x0000000b).r(FUNC(mmtm_state::bootrom_r)); map(0x80000000, 0x801fffff).ram(); map(0xf0000000, 0xf003ffff).rom().region("maincpu", 0); map(0xfc000000, 0xfc001fff).m("nvram_map", FUNC(address_map_bank_device::amap8)); map(0xfc020004, 0xfc020007).portr("KEY1"); map(0xfc020008, 0xfc02000b).portr("KEY2"); map(0xfc020010, 0xfc020013).portr("KEY3"); - map(0xfc040000, 0xfc040000).w("display", FUNC(mephisto_display_module2_device::latch_w)); - map(0xfc060000, 0xfc060000).w("display", FUNC(mephisto_display_module2_device::io_w)); + map(0xfc040000, 0xfc040000).w("display", FUNC(mephisto_display2_device::latch_w)); + map(0xfc060000, 0xfc060000).w("display", FUNC(mephisto_display2_device::io_w)); map(0xfc080000, 0xfc080000).w("board", FUNC(mephisto_board_device::mux_w)); map(0xfc0a0000, 0xfc0a0000).w("board", FUNC(mephisto_board_device::led_w)); map(0xfc0c0000, 0xfc0c0000).r("board", FUNC(mephisto_board_device::input_r)); diff -Nru mame-0.230+dfsg.1/src/mame/drivers/mephisto_mondial2.cpp mame-0.231+dfsg.1/src/mame/drivers/mephisto_mondial2.cpp --- mame-0.230+dfsg.1/src/mame/drivers/mephisto_mondial2.cpp 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/mephisto_mondial2.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,218 @@ +// license:BSD-3-Clause +// copyright-holders:Sandro Ronco, hap +// thanks-to:yoyo_chessboard +/****************************************************************************** + +Mephisto Mondial II + +Hardware notes: +- G65SC02 @ 2MHz (unsure about rating) +- 2KB RAM, 32KB ROM +- expansion slot at underside (not used) +- 8*8 chessboard buttons, 24 leds, piezo + +******************************************************************************/ + +#include "emu.h" + +#include "cpu/m6502/m65sc02.h" +#include "machine/sensorboard.h" +#include "sound/dac.h" +#include "video/pwm.h" + +#include "speaker.h" + +// internal artwork +#include "mephisto_mondial2.lh" + + +namespace { + +class mondial2_state : public driver_device +{ +public: + mondial2_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_board(*this, "board") + , m_led_pwm(*this, "led_pwm") + , m_dac(*this, "dac") + , m_keys(*this, "KEY.%u", 0) + { } + + void mondial2(machine_config &config); + +protected: + virtual void machine_start() override; + +private: + required_device m_maincpu; + required_device m_board; + required_device m_led_pwm; + required_device m_dac; + required_ioport_array<4> m_keys; + + void mondial2_mem(address_map &map); + + void update_leds(); + void control_w(u8 data); + void board_w(u8 data); + u8 input_r(offs_t offset); + + u8 m_keypad_mux = 0; + u8 m_board_mux = 0; + u8 m_led_data = 0; +}; + + +void mondial2_state::machine_start() +{ + save_item(NAME(m_keypad_mux)); + save_item(NAME(m_board_mux)); + save_item(NAME(m_led_data)); +} + + + +/****************************************************************************** + I/O +******************************************************************************/ + +void mondial2_state::update_leds() +{ + m_led_pwm->matrix(m_board_mux, m_led_data); +} + +void mondial2_state::control_w(u8 data) +{ + // d0-d3: keypad mux + m_keypad_mux = ~data & 0xf; + + // d4-d7: led data + m_led_data = data >> 4 & 7; + update_leds(); + + // d7: speaker out + m_dac->write(BIT(data, 7)); +} + +void mondial2_state::board_w(u8 data) +{ + // d0-d7: chessboard mux, led select + m_board_mux = ~data; + update_leds(); +} + +u8 mondial2_state::input_r(offs_t offset) +{ + u8 data = 0; + + // read chessboard sensors + for (int i = 0; i < 8; i++) + if (BIT(m_board_mux, i)) + data |= BIT(m_board->read_rank(i), offset); + + // read keypad + for (int i = 0; i < 4; i++) + if (BIT(m_keypad_mux, i)) + data |= BIT(m_keys[i]->read(), offset & 3); + + return ~(data << 7); +} + + + +/****************************************************************************** + Address Maps +******************************************************************************/ + +void mondial2_state::mondial2_mem(address_map &map) +{ + map(0x0000, 0x07ff).ram(); + map(0x2000, 0x2000).w(FUNC(mondial2_state::control_w)); + map(0x2800, 0x2800).w(FUNC(mondial2_state::board_w)); + map(0x3000, 0x3007).r(FUNC(mondial2_state::input_r)); + map(0x8000, 0xffff).rom(); +} + + + +/****************************************************************************** + Input Ports +******************************************************************************/ + +static INPUT_PORTS_START( mondial2 ) + PORT_START("KEY.0") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Pawn / 1") PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Knight / 2") PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Bishop / 3") PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Rook / 4") PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) + + PORT_START("KEY.1") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Queen / 5") PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("King / 6") PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Black / 7") PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("White / 8") PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) + + PORT_START("KEY.2") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("PLAY") PORT_CODE(KEYCODE_Y) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("POS") PORT_CODE(KEYCODE_O) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("MEM") PORT_CODE(KEYCODE_M) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("INFO") PORT_CODE(KEYCODE_I) + + PORT_START("KEY.3") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("CL") PORT_CODE(KEYCODE_DEL) PORT_CODE(KEYCODE_BACKSPACE) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("LEV") PORT_CODE(KEYCODE_L) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("ENT") PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("RES") PORT_CODE(KEYCODE_F1) +INPUT_PORTS_END + + + +/****************************************************************************** + Machine Configs +******************************************************************************/ + +void mondial2_state::mondial2(machine_config &config) +{ + /* basic machine hardware */ + M65SC02(config, m_maincpu, 2_MHz_XTAL); + m_maincpu->set_addrmap(AS_PROGRAM, &mondial2_state::mondial2_mem); + + const attotime nmi_period = attotime::from_hz(2_MHz_XTAL / 0x1000); + m_maincpu->set_periodic_int(FUNC(mondial2_state::nmi_line_pulse), nmi_period); + + SENSORBOARD(config, m_board).set_type(sensorboard_device::BUTTONS); + m_board->init_cb().set(m_board, FUNC(sensorboard_device::preset_chess)); + m_board->set_delay(attotime::from_msec(250)); + + /* video hardware */ + PWM_DISPLAY(config, m_led_pwm).set_size(8, 3); + config.set_default_layout(layout_mephisto_mondial2); + + /* sound hardware */ + SPEAKER(config, "speaker").front_center(); + DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.25); +} + + + +/****************************************************************************** + ROM Definitions +******************************************************************************/ + +ROM_START( mondial2 ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD("mondial_ii_01.08.87", 0x8000, 0x8000, CRC(e5945ce6) SHA1(e75bbf9d54087271d9d46fb1de7634eb957f8db0) ) +ROM_END + +} // anonymous namespace + + + +/*************************************************************************** + Drivers +***************************************************************************/ + +/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ +CONS( 1987, mondial2, 0, 0, mondial2, mondial2, mondial2_state, empty_init, "Hegener + Glaser", "Mephisto Mondial II", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/mephisto_mondial68k.cpp mame-0.231+dfsg.1/src/mame/drivers/mephisto_mondial68k.cpp --- mame-0.230+dfsg.1/src/mame/drivers/mephisto_mondial68k.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/mephisto_mondial68k.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -6,7 +6,7 @@ Mephisto Mondial 68000XL The chess engine is actually the one from Mephisto Dallas. -Hardware: +Hardware notes: - TS68000CP12 @ 12MHz - 64KB ROM - 16KB RAM @@ -38,7 +38,8 @@ : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") , m_board(*this, "board") - , m_display(*this, "display") + , m_lcd_latch(*this, "lcd_latch") + , m_led_pwm(*this, "led_pwm") , m_lcd(*this, "lcd") , m_inputs(*this, "IN.%u", 0) , m_digits(*this, "digit%u", 0U) @@ -51,15 +52,16 @@ void mondial68k_mem(address_map &map); - void lcd_s_w(u32 data); + void update_leds(); + void lcd_output_w(u32 data); void input_mux_w(u8 data); void board_mux_w(u8 data); u8 inputs_r(); - void update_display(); required_device m_maincpu; required_device m_board; - required_device m_display; + required_device m_lcd_latch; + required_device m_led_pwm; required_device m_lcd; required_ioport_array<4> m_inputs; output_finder<4> m_digits; @@ -83,15 +85,15 @@ I/O ******************************************************************************/ -void mondial68k_state::update_display() +void mondial68k_state::update_leds() { - m_display->matrix(m_input_mux >> 6, ~m_board_mux); + m_led_pwm->matrix(m_input_mux >> 6, ~m_board_mux); } -void mondial68k_state::lcd_s_w(u32 data) +void mondial68k_state::lcd_output_w(u32 data) { // output LCD digits (note: last digit DP segment is unused) - for (int i=0; i<4; i++) + for (int i = 0; i < 4; i++) m_digits[i] = bitswap<8>((data & 0x7fffffff) >> (8 * i), 7,4,5,0,1,2,3,6); } @@ -99,7 +101,7 @@ { // d0-d7: chessboard mux, led data m_board_mux = data; - update_display(); + update_leds(); } void mondial68k_state::input_mux_w(u8 data) @@ -107,20 +109,20 @@ // d0-d3: button mux // d6,d7: led select m_input_mux = data; - update_display(); + update_leds(); } u8 mondial68k_state::inputs_r() { - u8 data = 0x00; + u8 data = 0; // read buttons - for (int i=0; i<4; i++) + for (int i = 0; i < 4; i++) if (!BIT(m_input_mux, i)) data |= m_inputs[i]->read(); // read chessboard sensors - for (int i=0; i<8; i++) + for (int i = 0; i < 8; i++) if (!BIT(m_board_mux, i)) data |= m_board->read_rank(i); @@ -137,7 +139,7 @@ { map(0x000000, 0x00ffff).rom(); map(0x800000, 0x800000).r(FUNC(mondial68k_state::inputs_r)); - map(0x820000, 0x82000f).nopr().w("outlatch", FUNC(hc259_device::write_d0)).umask16(0xff00); + map(0x820000, 0x82000f).nopr().w(m_lcd_latch, FUNC(hc259_device::write_d0)).umask16(0xff00); map(0x840000, 0x840000).w(FUNC(mondial68k_state::input_mux_w)); map(0x860000, 0x860000).w(FUNC(mondial68k_state::board_mux_w)); map(0xc00000, 0xc03fff).ram(); @@ -188,12 +190,12 @@ m_maincpu->set_addrmap(AS_PROGRAM, &mondial68k_state::mondial68k_mem); m_maincpu->set_periodic_int(FUNC(mondial68k_state::irq5_line_hold), attotime::from_hz(128)); - hc259_device &outlatch(HC259(config, "outlatch")); - outlatch.q_out_cb<0>().set(m_lcd, FUNC(pcf2112_device::clb_w)); - outlatch.q_out_cb<1>().set(m_lcd, FUNC(pcf2112_device::data_w)); - outlatch.q_out_cb<2>().set(m_lcd, FUNC(pcf2112_device::dlen_w)); - outlatch.q_out_cb<6>().set_nop(); // another DAC input? - outlatch.q_out_cb<7>().set("dac", FUNC(dac_1bit_device::write)); + HC259(config, m_lcd_latch); + m_lcd_latch->q_out_cb<0>().set(m_lcd, FUNC(pcf2112_device::clb_w)); + m_lcd_latch->q_out_cb<1>().set(m_lcd, FUNC(pcf2112_device::data_w)); + m_lcd_latch->q_out_cb<2>().set(m_lcd, FUNC(pcf2112_device::dlen_w)); + m_lcd_latch->q_out_cb<6>().set_nop(); // another DAC input? + m_lcd_latch->q_out_cb<7>().set("dac", FUNC(dac_1bit_device::write)); SENSORBOARD(config, m_board).set_type(sensorboard_device::BUTTONS); m_board->init_cb().set(m_board, FUNC(sensorboard_device::preset_chess)); @@ -201,9 +203,9 @@ /* video hardware */ PCF2112(config, m_lcd, 50); // frequency guessed - m_lcd->write_segs().set(FUNC(mondial68k_state::lcd_s_w)); + m_lcd->write_segs().set(FUNC(mondial68k_state::lcd_output_w)); - PWM_DISPLAY(config, m_display).set_size(2, 8); + PWM_DISPLAY(config, m_led_pwm).set_size(2, 8); config.set_default_layout(layout_mephisto_mondial68k); /* sound hardware */ @@ -228,8 +230,8 @@ /*************************************************************************** - Game Drivers + Drivers ***************************************************************************/ -/* YEAR, NAME, PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ -CONS( 1988, mondl68k, 0, 0, mondial68k, mondial68k, mondial68k_state, empty_init, "Hegener + Glaser", "Mephisto Mondial 68000XL", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ +CONS( 1988, mondl68k, 0, 0, mondial68k, mondial68k, mondial68k_state, empty_init, "Hegener + Glaser", "Mephisto Mondial 68000XL", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/mephisto_mondial.cpp mame-0.231+dfsg.1/src/mame/drivers/mephisto_mondial.cpp --- mame-0.230+dfsg.1/src/mame/drivers/mephisto_mondial.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/mephisto_mondial.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -1,238 +1,209 @@ // license:BSD-3-Clause -// copyright-holders:Sandro Ronco -// thanks-to:yoyo_chessboard -/************************************************************************************************** - - Mephisto Mondial - Mephisto Mondial II - - TODO: - - split driver into 2? they're not on the same hardware - - add mondial MM 1000 module +// copyright-holders:Sandro Ronco, hap +/****************************************************************************** -**************************************************************************************************/ +Mephisto Mondial + +Hardware notes: +- G65SC02-1 @ 2MHz +- 2KB RAM(TC5517AP), 16KB ROM +- expansion slot at underside +- 8*8 chessboard buttons, 24 leds, active buzzer + +TODO: +- verify XTAL (or maybe RC or LC circuit), 2MHz is correct +- dump/add MM 1000 module + +******************************************************************************/ #include "emu.h" -#include "cpu/m6502/m65c02.h" -#include "machine/nvram.h" -#include "machine/mmboard.h" -#include "machine/timer.h" +#include "bus/generic/slot.h" +#include "bus/generic/carts.h" +#include "cpu/m6502/m65sc02.h" +#include "machine/sensorboard.h" #include "sound/beep.h" -#include "sound/dac.h" +#include "video/pwm.h" + #include "speaker.h" -#include "mephisto_mondial2.lh" +// internal artwork +#include "mephisto_mondial.lh" -class mephisto_mondial_state : public driver_device +namespace { + +class mondial_state : public driver_device { public: - mephisto_mondial_state(const machine_config &mconfig, device_type type, const char *tag) + mondial_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") , m_board(*this, "board") - , m_dac(*this, "dac") + , m_led_pwm(*this, "led_pwm") , m_beeper(*this, "beeper") , m_keys(*this, "KEY.%u", 0) - , m_low_leds(*this, "led%u", 0U) - , m_high_leds(*this, "led%u", 100U) { } void mondial(machine_config &config); - void mondial2(machine_config &config); - -private: - uint8_t mondial2_input_r(offs_t offset); - void mondial_input_mux_w(uint8_t data); - uint8_t mondial_input_r(offs_t offset); - void mondial2_input_mux_w(uint8_t data); - TIMER_DEVICE_CALLBACK_MEMBER(refresh_leds); - - void mondial_mem(address_map &map); - void mondial2_mem(address_map &map); +protected: virtual void machine_start() override; - virtual void machine_reset() override; +private: required_device m_maincpu; - required_device m_board; - optional_device m_dac; - optional_device m_beeper; + required_device m_board; + required_device m_led_pwm; + required_device m_beeper; required_ioport_array<2> m_keys; - output_finder<16> m_low_leds, m_high_leds; - - uint8_t m_input_mux; -}; + void mondial_mem(address_map &map); -void mephisto_mondial_state::machine_start() -{ - m_low_leds.resolve(); - m_high_leds.resolve(); + void control_w(u8 data); + u8 irq_ack_r(); + u8 input_r(offs_t offset); - save_item(NAME(m_input_mux)); -} + u8 m_inp_mux = 0; +}; -void mephisto_mondial_state::machine_reset() +void mondial_state::machine_start() { - m_input_mux = 0x00; + save_item(NAME(m_inp_mux)); } -uint8_t mephisto_mondial_state::mondial2_input_r(offs_t offset) -{ - if (m_input_mux & 0x01) return BIT(m_keys[1]->read(), 0 + offset) << 7; - else if (m_input_mux & 0x02) return BIT(m_keys[1]->read(), 4 + offset) << 7; - else if (m_input_mux & 0x04) return BIT(m_keys[0]->read(), 0 + offset) << 7; - else if (m_input_mux & 0x08) return BIT(m_keys[0]->read(), 4 + offset) << 7; - return BIT(m_board->input_r(), offset) << 7; -} -void mephisto_mondial_state::mondial2_input_mux_w(uint8_t data) +/****************************************************************************** + I/O +******************************************************************************/ + +void mondial_state::control_w(u8 data) { - uint8_t leds_data = m_board->mux_r(); - for (int i=0; i<8; i++) - { - if (!BIT(leds_data, i)) - { - if (data & 0x10) m_high_leds[i] = 1; - if (data & 0x20) m_low_leds[8 + i] = 1; - if (data & 0x40) m_low_leds[0 + i] = 1; - } - } + // d0-d3: input mux, led select + // d4-d6: led data + m_inp_mux = data & 0xf; + m_led_pwm->matrix(1 << m_inp_mux, ~data >> 4 & 7); - m_input_mux = data ^ 0xff; - m_dac->write(BIT(data, 7)); - m_maincpu->set_input_line(M65C02_NMI_LINE, CLEAR_LINE); + // d7: enable beeper + m_beeper->set_state(BIT(data, 7)); } - -void mephisto_mondial_state::mondial2_mem(address_map &map) +u8 mondial_state::irq_ack_r() { - map(0x0000, 0x07ff).ram().share("nvram"); - map(0x2000, 0x2000).w(FUNC(mephisto_mondial_state::mondial2_input_mux_w)); - map(0x2800, 0x2800).w(m_board, FUNC(mephisto_board_device::mux_w)); - map(0x3000, 0x3007).r(FUNC(mephisto_mondial_state::mondial2_input_r)); - map(0x8000, 0xffff).rom(); + if (!machine().side_effects_disabled()) + m_maincpu->set_input_line(0, CLEAR_LINE); + + return 0; } -uint8_t mephisto_mondial_state::mondial_input_r(offs_t offset) +u8 mondial_state::input_r(offs_t offset) { - uint8_t data; - if (m_input_mux & 0x08) - data = m_keys[BIT(~m_input_mux, 0)]->read(); + u8 data = 0; + + // read chessboard sensors + if (m_inp_mux < 8) + data = m_board->read_rank(m_inp_mux); + + // read keypad else - data = m_board->input_r(); + data = m_keys[m_inp_mux & 1]->read(); - return BIT(data, offset) << 7; + return ~(BIT(data, offset) << 7); } -void mephisto_mondial_state::mondial_input_mux_w(uint8_t data) -{ - uint8_t leds_data = ~(1 << (data & 0x07)); - m_board->mux_w(leds_data); - - for (int i=0; i<8; i++) - { - if (!BIT(leds_data, i)) - { - if (!(data & 0x10)) m_high_leds[i] = 1; - if (!(data & 0x20)) m_low_leds[8 + i] = 1; - if (!(data & 0x40)) m_low_leds[0 + i] = 1; - } - } - m_input_mux = data; - m_beeper->set_state(BIT(data, 7)); - m_maincpu->set_input_line(M65C02_IRQ_LINE, CLEAR_LINE); -} +/****************************************************************************** + Address Maps +******************************************************************************/ -void mephisto_mondial_state::mondial_mem(address_map &map) +void mondial_state::mondial_mem(address_map &map) { - map(0x0000, 0x07ff).ram().share("nvram"); - map(0x1000, 0x1000).w(FUNC(mephisto_mondial_state::mondial_input_mux_w)); - map(0x2000, 0x2000).r(m_board, FUNC(mephisto_board_device::input_r)); - map(0x1800, 0x1807).r(FUNC(mephisto_mondial_state::mondial_input_r)); + map(0x0000, 0x07ff).ram(); + map(0x1000, 0x1000).w(FUNC(mondial_state::control_w)); + map(0x1800, 0x1807).r(FUNC(mondial_state::input_r)); + map(0x2000, 0x2000).r(FUNC(mondial_state::irq_ack_r)); map(0xc000, 0xffff).rom(); } -TIMER_DEVICE_CALLBACK_MEMBER(mephisto_mondial_state::refresh_leds) -{ - for (int i=0; i<8; i++) - { - m_low_leds[0 + i] = 0; - m_low_leds[8 + i] = 0; - m_high_leds[i] = 0; - } -} +/****************************************************************************** + Input Ports +******************************************************************************/ + static INPUT_PORTS_START( mondial ) PORT_START("KEY.0") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Play") PORT_CODE(KEYCODE_Y) - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Pos") PORT_CODE(KEYCODE_O) - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Mem") PORT_CODE(KEYCODE_M) - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Info") PORT_CODE(KEYCODE_I) - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Clear") PORT_CODE(KEYCODE_BACKSPACE) - PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Level") PORT_CODE(KEYCODE_L) - PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Enter") PORT_CODE(KEYCODE_ENTER) - PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Reset") PORT_CODE(KEYCODE_DEL) + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Pawn / 1") PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Knight / 2") PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Bishop / 3") PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Rook / 4") PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Queen / 5") PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("King / 6") PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Black / 7") PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("White / 8") PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_START("KEY.1") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("1 Pawn") PORT_CODE(KEYCODE_1) - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("2 Knight") PORT_CODE(KEYCODE_2) - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("3 Bishop") PORT_CODE(KEYCODE_3) - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("4 Rook") PORT_CODE(KEYCODE_4) - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("5 Queen") PORT_CODE(KEYCODE_5) - PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("6 King") PORT_CODE(KEYCODE_6) - PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("7 Black") PORT_CODE(KEYCODE_7) - PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("8 White") PORT_CODE(KEYCODE_8) + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("PLAY") PORT_CODE(KEYCODE_Y) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("POS") PORT_CODE(KEYCODE_O) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("MEM") PORT_CODE(KEYCODE_M) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("INFO") PORT_CODE(KEYCODE_I) + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("CL") PORT_CODE(KEYCODE_DEL) PORT_CODE(KEYCODE_BACKSPACE) + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("LEV") PORT_CODE(KEYCODE_L) + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("ENT") PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("RES") PORT_CODE(KEYCODE_F1) INPUT_PORTS_END -void mephisto_mondial_state::mondial2(machine_config &config) -{ - M65C02(config, m_maincpu, XTAL(2'000'000)); - m_maincpu->set_addrmap(AS_PROGRAM, &mephisto_mondial_state::mondial2_mem); - m_maincpu->set_periodic_int(FUNC(mephisto_mondial_state::nmi_line_assert), attotime::from_hz(XTAL(2'000'000) / (1 << 12))); - NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); +/****************************************************************************** + Machine Configs +******************************************************************************/ - SPEAKER(config, "speaker").front_center(); - DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.25); +void mondial_state::mondial(machine_config &config) +{ + /* basic machine hardware */ + M65SC02(config, m_maincpu, 2000000); + m_maincpu->set_addrmap(AS_PROGRAM, &mondial_state::mondial_mem); - MEPHISTO_BUTTONS_BOARD(config, m_board); + const attotime irq_period = attotime::from_hz(2000000 / 0x1000); + m_maincpu->set_periodic_int(FUNC(mondial_state::irq0_line_assert), irq_period); + + SENSORBOARD(config, m_board).set_type(sensorboard_device::BUTTONS); + m_board->init_cb().set(m_board, FUNC(sensorboard_device::preset_chess)); m_board->set_delay(attotime::from_msec(250)); - m_board->set_disable_leds(true); - TIMER(config, "refresh_leds").configure_periodic(FUNC(mephisto_mondial_state::refresh_leds), attotime::from_hz(2)); - config.set_default_layout(layout_mephisto_mondial2); -} + //GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "mondial_cart"); + //SOFTWARE_LIST(config, "cart_list").set_original("mephisto_mondial"); -void mephisto_mondial_state::mondial(machine_config &config) -{ - mondial2(config); - m_maincpu->set_addrmap(AS_PROGRAM, &mephisto_mondial_state::mondial_mem); - m_maincpu->set_periodic_int(FUNC(mephisto_mondial_state::irq0_line_assert), attotime::from_hz(XTAL(2'000'000) / (1 << 12))); + /* video hardware */ + PWM_DISPLAY(config, m_led_pwm).set_size(8, 3); + config.set_default_layout(layout_mephisto_mondial); - config.device_remove("dac"); - BEEP(config, m_beeper, 2048).add_route(ALL_OUTPUTS, "speaker", 0.25); // measured C7(2093Hz) + /* sound hardware */ + SPEAKER(config, "speaker").front_center(); + BEEP(config, m_beeper, 2150); // approximation + m_beeper->add_route(ALL_OUTPUTS, "speaker", 0.25); } + +/****************************************************************************** + ROM Definitions +******************************************************************************/ + ROM_START( mondial ) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD("mondial_1.bin", 0xc000, 0x4000, CRC(5cde2e26) SHA1(337be35d5120ca12143ca17f8aa0642b313b3851) ) + ROM_LOAD("cn61057n_hgs_10_470_00", 0xc000, 0x4000, CRC(5cde2e26) SHA1(337be35d5120ca12143ca17f8aa0642b313b3851) ) ROM_END -ROM_START( mondial2 ) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD("mondial_ii_01.08.87", 0x8000, 0x8000, CRC(e5945ce6) SHA1(e75bbf9d54087271d9d46fb1de7634eb957f8db0) ) -ROM_END +} // anonymous namespace + + +/*************************************************************************** + Drivers +***************************************************************************/ -/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ -CONS( 1985, mondial, 0, 0, mondial, mondial, mephisto_mondial_state, empty_init, "Hegener + Glaser", "Mephisto Mondial", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1987, mondial2, 0, 0, mondial2, mondial, mephisto_mondial_state, empty_init, "Hegener + Glaser", "Mephisto Mondial II", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ +CONS( 1985, mondial, 0, 0, mondial, mondial, mondial_state, empty_init, "Hegener + Glaser", "Mephisto Mondial", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/mephisto_montec.cpp mame-0.231+dfsg.1/src/mame/drivers/mephisto_montec.cpp --- mame-0.230+dfsg.1/src/mame/drivers/mephisto_montec.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/mephisto_montec.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -1,432 +1,240 @@ // license:BSD-3-Clause -// copyright-holders:Sandro Ronco -// thanks-to:yoyo_chessboard -/************************************************************************************************** - - Mephisto Monte Carlo - Mephisto Mega IV - Mephisto Monte Carlo IV LE - Mephisto Super Mondial - Mephisto Super Mondial II - - smondialb notes: - - holding CL+INFO+BOOK on boot load the test mode - - TODO: - - split driver into several files? - - megaiv/smondial leds are tri-color - - why are megaiv/smondial2 beeps noisy? - - what is montec 0x2000? (it can't be nmi ack) - - add Monte Carlo IV (non-LE) +// copyright-holders:Sandro Ronco, hap +/****************************************************************************** -**************************************************************************************************/ +Mephisto Monte Carlo +Mephisto Monte Carlo IV +Mephisto Monte Carlo IV - Limited Edition + +The chess engine is by Frans Morsch, but for the IV version it's by Ed Schroeder. +Limited Edition has a twice faster CPU. + +Hardware notes: +- R65C02P4 @ 4MHz +- 8KB RAM(battery-backed), 32KB ROM +- expansion slot at underside (not used) +- 2*PCF2112, 2 7seg LCD screens +- 8 tri-color leds (like academy, always 6 red and 2 green?) +- magnetic chessboard with 64 leds, piezo +TODO: +- dump/add the standard Monte Carlo IV + +******************************************************************************/ #include "emu.h" -#include "bus/generic/slot.h" -#include "bus/generic/carts.h" #include "cpu/m6502/m65c02.h" +#include "cpu/m6502/r65c02.h" #include "machine/74259.h" #include "machine/nvram.h" #include "machine/mmboard.h" #include "sound/dac.h" #include "video/pcf2100.h" +#include "video/pwm.h" -#include "screen.h" #include "speaker.h" -#include "softlist.h" +// internal artwork #include "mephisto_montec.lh" -#include "mephisto_megaiv.lh" -#include "mephisto_smondial2.lh" -class mephisto_montec_state : public driver_device +namespace { + +class montec_state : public driver_device { public: - mephisto_montec_state(const machine_config &mconfig, device_type type, const char *tag) + montec_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") , m_board(*this, "board") - , m_muxlatch(*this, "muxlatch") + , m_lcd_latch(*this, "lcd_latch") + , m_led_pwm(*this, "led_pwm") , m_lcd(*this, "lcd%u", 0) , m_dac(*this, "dac") , m_keys(*this, "KEY.%u", 0) , m_digits(*this, "digit%u", 0U) - , m_low_leds(*this, "led%u", 0U) - , m_high_leds(*this, "led%u", 100U) { } - void smondial2(machine_config &config); void montec(machine_config &config); - void monteciv(machine_config &config); - void megaiv(machine_config &config); + void montec4le(machine_config &config); protected: - uint8_t montec_input_r(); - void montec_led_w(uint8_t data); - template void montec_lcd_s_w(uint32_t data); - - uint8_t megaiv_input_r(offs_t offset); - void megaiv_led_w(uint8_t data); - - void megaiv_mem(address_map &map); - void montec_mem(address_map &map); - void smondial2_mem(address_map &map); - virtual void machine_start() override; - virtual void machine_reset() override; +private: required_device m_maincpu; required_device m_board; - required_device m_muxlatch; + required_device m_lcd_latch; + required_device m_led_pwm; required_device_array m_lcd; required_device m_dac; required_ioport_array<2> m_keys; output_finder<8> m_digits; - output_finder<16> m_low_leds, m_high_leds; - - uint8_t m_leds_mux; -}; - -class mephisto_smondial_state : public mephisto_montec_state -{ -public: - mephisto_smondial_state(const machine_config &mconfig, device_type type, const char *tag) - : mephisto_montec_state(mconfig, type, tag) - , m_ledlatch(*this, "ledlatch") - , m_boardlatch(*this, "boardlatch") - { } - void smondial(machine_config &config); - -private: - template DECLARE_WRITE_LINE_MEMBER(led_mux_w); - DECLARE_WRITE_LINE_MEMBER(leds_a_w); - DECLARE_WRITE_LINE_MEMBER(leds_b_w); - DECLARE_WRITE_LINE_MEMBER(leds_c_w); - - void smondial_mem(address_map &map); + void montec_mem(address_map &map); - required_device m_ledlatch; - required_device m_boardlatch; + template void lcd_output_w(u32 data); + void led_w(u8 data); + void irq_ack_w(u8 data) { irq_ack_r(); } + u8 irq_ack_r(); + u8 input_r(); }; - -void mephisto_montec_state::machine_start() +void montec_state::machine_start() { m_digits.resolve(); - m_low_leds.resolve(); - m_high_leds.resolve(); - - save_item(NAME(m_leds_mux)); } -void mephisto_montec_state::machine_reset() -{ - m_leds_mux = 0x00; -} -void mephisto_montec_state::montec_led_w(uint8_t data) -{ - for(int i=0; i<4; i++) - for(int j=0; j<4; j++) - if (BIT(data, i)) - m_high_leds[(i << 2) | j] = BIT(~data, 4 + j); -} + +/****************************************************************************** + I/O +******************************************************************************/ template -void mephisto_montec_state::montec_lcd_s_w(uint32_t data) +void montec_state::lcd_output_w(u32 data) { - for (int i=0; i<4; i++) + // lcd segment outputs + for (int i = 0; i < 4; i++) m_digits[i + N*4] = bitswap<8>(data >> (8 * i), 7,4,5,0,1,2,3,6); } - -uint8_t mephisto_montec_state::montec_input_r() +void montec_state::led_w(u8 data) { - if (!m_muxlatch->q0_r()) return m_keys[1]->read(); - else if (!m_muxlatch->q1_r()) return m_keys[0]->read(); - - return m_board->input_r() ^ 0xff; + // d0-d3: keypad led select + // d4-d7: keypad led data + m_led_pwm->matrix(data & 0xf, ~data >> 4 & 0xf); } -void mephisto_montec_state::megaiv_led_w(uint8_t data) +u8 montec_state::irq_ack_r() { - if (m_leds_mux != m_board->mux_r()) - { - m_leds_mux = m_board->mux_r(); - for (int i=0; i<8; i++) - { - if (!BIT(m_leds_mux, i)) - { - m_high_leds[i] = BIT(data, 0) | BIT(data, 1); - m_low_leds[0 + i] = BIT(data, 2) | BIT(data, 3); - m_low_leds[8 + i] = BIT(data, 4) | BIT(data, 5); - } - } - } + if (!machine().side_effects_disabled()) + m_maincpu->set_input_line(0, CLEAR_LINE); - m_dac->write(BIT(data, 7)); + return 0; } -uint8_t mephisto_montec_state::megaiv_input_r(offs_t offset) +u8 montec_state::input_r() { - if (!m_muxlatch->q0_r()) return BIT(m_keys[1]->read(), 0 + offset) << 7; - else if (!m_muxlatch->q1_r()) return BIT(m_keys[1]->read(), 4 + offset) << 7; - else if (!m_muxlatch->q2_r()) return BIT(m_keys[0]->read(), 0 + offset) << 7; - else if (!m_muxlatch->q3_r()) return BIT(m_keys[0]->read(), 4 + offset) << 7; + u8 data = 0; + + // 74259 q0/q1 selects keypad + for (int i = 0; i < 2; i++) + if (!BIT(m_lcd_latch->output_state(), i)) + data |= m_keys[i]->read(); - return BIT(m_board->input_r(), offset) << 7; + return ~m_board->input_r() | data; } -void mephisto_montec_state::montec_mem(address_map &map) -{ - map(0x0000, 0x1fff).ram().share("nvram"); - map(0x2000, 0x2000).noprw(); // ? - map(0x2400, 0x2400).r(FUNC(mephisto_montec_state::montec_input_r)); - map(0x2800, 0x2800).w(m_board, FUNC(mephisto_board_device::mux_w)); - map(0x2c00, 0x2c00).w(m_board, FUNC(mephisto_board_device::led_w)); - map(0x3000, 0x3007).w(m_muxlatch, FUNC(hc259_device::write_d7)); - map(0x3400, 0x3400).w(FUNC(mephisto_montec_state::montec_led_w)); - map(0x8000, 0xffff).rom(); -} -void mephisto_montec_state::megaiv_mem(address_map &map) +/****************************************************************************** + Address Maps +******************************************************************************/ + +void montec_state::montec_mem(address_map &map) { map(0x0000, 0x1fff).ram().share("nvram"); - map(0x2400, 0x2400).w(FUNC(mephisto_montec_state::megaiv_led_w)); + map(0x2000, 0x2000).rw(FUNC(montec_state::irq_ack_r), FUNC(montec_state::irq_ack_w)); + map(0x2400, 0x2400).r(FUNC(montec_state::input_r)); map(0x2800, 0x2800).w(m_board, FUNC(mephisto_board_device::mux_w)); - map(0x2c00, 0x2c07).w(m_muxlatch, FUNC(hc259_device::write_d7)).nopr(); - map(0x3000, 0x3007).r(FUNC(mephisto_montec_state::megaiv_input_r)); + map(0x2c00, 0x2c00).w(m_board, FUNC(mephisto_board_device::led_w)); + map(0x3000, 0x3007).w(m_lcd_latch, FUNC(hc259_device::write_d7)).nopr(); + map(0x3400, 0x3400).w(FUNC(montec_state::led_w)); map(0x8000, 0xffff).rom(); } -void mephisto_montec_state::smondial2_mem(address_map &map) -{ - megaiv_mem(map); - map(0x4000, 0x7fff).r("cartslot", FUNC(generic_slot_device::read_rom)); -} - - -template -WRITE_LINE_MEMBER(mephisto_smondial_state::led_mux_w) -{ - uint8_t leds_mux = ~m_ledlatch->output_state(); - if (leds_mux & 0x03) m_high_leds[N] = state; - if (leds_mux & 0x0c) m_low_leds[8 + N] = state; - if (leds_mux & 0x30) m_low_leds[0 + N] = state; -} - -WRITE_LINE_MEMBER(mephisto_smondial_state::leds_a_w) -{ - if (!m_ledlatch->q0_r() || !m_ledlatch->q1_r()) - for (int i = 0; i < 8; i++) - m_high_leds[i] = BIT(m_boardlatch->output_state(), i); -} -WRITE_LINE_MEMBER(mephisto_smondial_state::leds_b_w) -{ - if (!m_ledlatch->q2_r() || !m_ledlatch->q3_r()) - for (int i = 0; i < 8; i++) - m_low_leds[8 + i] = BIT(m_boardlatch->output_state(), i); -} - -WRITE_LINE_MEMBER(mephisto_smondial_state::leds_c_w) -{ - if (!m_ledlatch->q4_r() || !m_ledlatch->q5_r()) - for (int i = 0; i < 8; i++) - m_low_leds[0 + i] = BIT(m_boardlatch->output_state(), i); -} - -void mephisto_smondial_state::smondial_mem(address_map &map) -{ - map(0x0000, 0x1fff).ram().share("nvram"); - map(0x4000, 0x4007).r(FUNC(mephisto_smondial_state::megaiv_input_r)); - map(0x6400, 0x6407).w(m_ledlatch, FUNC(hc259_device::write_d7)); - map(0x6800, 0x6807).w(m_boardlatch, FUNC(hc259_device::write_d7)); - map(0x6c00, 0x6c07).w(m_muxlatch, FUNC(hc259_device::write_d7)); - map(0x8000, 0xffff).rom(); -} +/****************************************************************************** + Input Ports +******************************************************************************/ static INPUT_PORTS_START( montec ) PORT_START("KEY.0") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("1 Pawn") PORT_CODE(KEYCODE_1) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("2 Knight") PORT_CODE(KEYCODE_2) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("3 Bishop") PORT_CODE(KEYCODE_3) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("4 Rook") PORT_CODE(KEYCODE_4) - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("5 Queen") PORT_CODE(KEYCODE_5) - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("6 King") PORT_CODE(KEYCODE_6) - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("7 Black") PORT_CODE(KEYCODE_7) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("8 White") PORT_CODE(KEYCODE_8) + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("BOOK / 9") PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_CODE(KEYCODE_B) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("POS / 0") PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(KEYCODE_O) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("MEM") PORT_CODE(KEYCODE_M) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("INFO") PORT_CODE(KEYCODE_I) + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("CL") PORT_CODE(KEYCODE_DEL) PORT_CODE(KEYCODE_BACKSPACE) + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("LEV") PORT_CODE(KEYCODE_L) + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("ENT") PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("RES") PORT_CODE(KEYCODE_F1) PORT_START("KEY.1") - PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("9 Book") PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_B) - PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("0 Pos") PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_O) - PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Mem") PORT_CODE(KEYCODE_M) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Info") PORT_CODE(KEYCODE_I) - PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Clear") PORT_CODE(KEYCODE_BACKSPACE) - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Level") PORT_CODE(KEYCODE_L) - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Enter") PORT_CODE(KEYCODE_ENTER) - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Reset") PORT_CODE(KEYCODE_DEL) + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Pawn / 1") PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Knight / 2") PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Bishop / 3") PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Rook / 4") PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Queen / 5") PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("King / 6") PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Black / 7") PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("White / 8") PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) INPUT_PORTS_END -static INPUT_PORTS_START( megaiv ) - PORT_START("KEY.0") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("3 Bishop") PORT_CODE(KEYCODE_3) - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("7 Black") PORT_CODE(KEYCODE_7) - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Mem") PORT_CODE(KEYCODE_M) - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Enter") PORT_CODE(KEYCODE_ENTER) - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("4 Rook") PORT_CODE(KEYCODE_4) - PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("8 White") PORT_CODE(KEYCODE_8) - PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Info") PORT_CODE(KEYCODE_I) - PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Reset") PORT_CODE(KEYCODE_DEL) - - PORT_START("KEY.1") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("1 Pawn") PORT_CODE(KEYCODE_1) - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("5 Queen") PORT_CODE(KEYCODE_5) - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("9 Book") PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_B) - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Clear") PORT_CODE(KEYCODE_BACKSPACE) - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("2 Knight") PORT_CODE(KEYCODE_2) - PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("6 King") PORT_CODE(KEYCODE_6) - PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("0 Pos") PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_O) - PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Level") PORT_CODE(KEYCODE_L) -INPUT_PORTS_END -static INPUT_PORTS_START( smondial2 ) - PORT_START("KEY.0") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("3 Bishop") PORT_CODE(KEYCODE_3) - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("7 Black") PORT_CODE(KEYCODE_7) - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Pos") PORT_CODE(KEYCODE_O) - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Enter") PORT_CODE(KEYCODE_ENTER) - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("4 Rook") PORT_CODE(KEYCODE_4) - PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("8 White") PORT_CODE(KEYCODE_8) - PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Mem") PORT_CODE(KEYCODE_M) - PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Reset") PORT_CODE(KEYCODE_DEL) - PORT_START("KEY.1") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("1 Pawn") PORT_CODE(KEYCODE_1) - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("5 Queen") PORT_CODE(KEYCODE_5) - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("9 Help") PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_H) - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Level") PORT_CODE(KEYCODE_L) - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("2 Knight") PORT_CODE(KEYCODE_2) - PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("6 King") PORT_CODE(KEYCODE_6) - PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("0 Info") PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_I) - PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Clear") PORT_CODE(KEYCODE_BACKSPACE) -INPUT_PORTS_END +/****************************************************************************** + Machine Configs +******************************************************************************/ + +void montec_state::montec(machine_config &config) +{ + /* basic machine hardware */ + R65C02(config, m_maincpu, 8_MHz_XTAL / 2); // R65C02P4 + m_maincpu->set_addrmap(AS_PROGRAM, &montec_state::montec_mem); -void mephisto_montec_state::montec(machine_config &config) -{ - M65C02(config, m_maincpu, XTAL(8'000'000) / 2); // R65C02P4 - m_maincpu->set_addrmap(AS_PROGRAM, &mephisto_montec_state::montec_mem); - m_maincpu->set_periodic_int(FUNC(mephisto_montec_state::nmi_line_pulse), attotime::from_hz(XTAL(8'000'000) / (1 << 14))); + const attotime irq_period = attotime::from_hz(8_MHz_XTAL / 2 / 0x2000); + m_maincpu->set_periodic_int(FUNC(montec_state::irq0_line_assert), irq_period); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - HC259(config, m_muxlatch); - m_muxlatch->q_out_cb<2>().set(m_dac, FUNC(dac_bit_interface::write)); - m_muxlatch->q_out_cb<4>().set(m_lcd[0], FUNC(pcf2112_device::data_w)); - m_muxlatch->q_out_cb<4>().append(m_lcd[1], FUNC(pcf2112_device::data_w)); - m_muxlatch->q_out_cb<5>().set(m_lcd[1], FUNC(pcf2112_device::dlen_w)); - m_muxlatch->q_out_cb<6>().set(m_lcd[0], FUNC(pcf2112_device::clb_w)); - m_muxlatch->q_out_cb<6>().append(m_lcd[1], FUNC(pcf2112_device::clb_w)); - m_muxlatch->q_out_cb<7>().set(m_lcd[0], FUNC(pcf2112_device::dlen_w)); + HC259(config, m_lcd_latch); + m_lcd_latch->q_out_cb<2>().set(m_dac, FUNC(dac_bit_interface::write)).invert(); + m_lcd_latch->q_out_cb<4>().set(m_lcd[0], FUNC(pcf2112_device::data_w)); + m_lcd_latch->q_out_cb<4>().append(m_lcd[1], FUNC(pcf2112_device::data_w)); + m_lcd_latch->q_out_cb<5>().set(m_lcd[1], FUNC(pcf2112_device::dlen_w)); + m_lcd_latch->q_out_cb<6>().set(m_lcd[0], FUNC(pcf2112_device::clb_w)); + m_lcd_latch->q_out_cb<6>().append(m_lcd[1], FUNC(pcf2112_device::clb_w)); + m_lcd_latch->q_out_cb<7>().set(m_lcd[0], FUNC(pcf2112_device::dlen_w)); + + MEPHISTO_SENSORS_BOARD(config, m_board); // internal + m_board->set_delay(attotime::from_msec(300)); + /* video hardware */ PCF2112(config, m_lcd[0], 50); // frequency guessed - m_lcd[0]->write_segs().set(FUNC(mephisto_montec_state::montec_lcd_s_w<0>)); + m_lcd[0]->write_segs().set(FUNC(montec_state::lcd_output_w<0>)); PCF2112(config, m_lcd[1], 50); // " - m_lcd[1]->write_segs().set(FUNC(mephisto_montec_state::montec_lcd_s_w<1>)); - - SPEAKER(config, "speaker").front_center(); - DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.25); - - MEPHISTO_SENSORS_BOARD(config, m_board); - m_board->set_delay(attotime::from_msec(300)); + m_lcd[1]->write_segs().set(FUNC(montec_state::lcd_output_w<1>)); + PWM_DISPLAY(config, m_led_pwm).set_size(4, 4); config.set_default_layout(layout_mephisto_montec); -} -void mephisto_montec_state::monteciv(machine_config &config) -{ - montec(config); - m_maincpu->set_clock(XTAL(8'000'000)); - m_board->set_delay(attotime::from_msec(150)); + /* sound hardware */ + SPEAKER(config, "speaker").front_center(); + DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.25); } -void mephisto_montec_state::megaiv(machine_config &config) +void montec_state::montec4le(machine_config &config) { montec(config); - m_maincpu->set_clock(XTAL(4'915'200)); - m_maincpu->set_addrmap(AS_PROGRAM, &mephisto_montec_state::megaiv_mem); - m_maincpu->set_periodic_int(FUNC(mephisto_montec_state::nmi_line_pulse), attotime::from_hz(XTAL(4'915'200) / (1 << 13))); - - m_muxlatch->q_out_cb<2>().set_nop(); - - MEPHISTO_BUTTONS_BOARD(config.replace(), m_board); - m_board->set_delay(attotime::from_msec(250)); - m_board->set_disable_leds(true); - config.set_default_layout(layout_mephisto_megaiv); -} - -void mephisto_smondial_state::smondial(machine_config &config) -{ - megaiv(config); - m_maincpu->set_clock(XTAL(4'000'000)); - m_maincpu->set_addrmap(AS_PROGRAM, &mephisto_smondial_state::smondial_mem); - m_maincpu->set_periodic_int(FUNC(mephisto_montec_state::nmi_line_pulse), attotime::from_hz(XTAL(4'000'000) / (1 << 13))); - - HC259(config, m_ledlatch); - m_ledlatch->q_out_cb<0>().set(FUNC(mephisto_smondial_state::leds_a_w)); - m_ledlatch->q_out_cb<1>().set(FUNC(mephisto_smondial_state::leds_a_w)); - m_ledlatch->q_out_cb<2>().set(FUNC(mephisto_smondial_state::leds_b_w)); - m_ledlatch->q_out_cb<3>().set(FUNC(mephisto_smondial_state::leds_b_w)); - m_ledlatch->q_out_cb<4>().set(FUNC(mephisto_smondial_state::leds_c_w)); - m_ledlatch->q_out_cb<5>().set(FUNC(mephisto_smondial_state::leds_c_w)); - m_ledlatch->q_out_cb<7>().set(m_dac, FUNC(dac_bit_interface::write)); - - HC259(config, m_boardlatch); - m_boardlatch->parallel_out_cb().set(m_board, FUNC(mephisto_board_device::mux_w)).invert(); - m_boardlatch->q_out_cb<0>().set(FUNC(mephisto_smondial_state::led_mux_w<0>)); - m_boardlatch->q_out_cb<1>().set(FUNC(mephisto_smondial_state::led_mux_w<1>)); - m_boardlatch->q_out_cb<2>().set(FUNC(mephisto_smondial_state::led_mux_w<2>)); - m_boardlatch->q_out_cb<3>().set(FUNC(mephisto_smondial_state::led_mux_w<3>)); - m_boardlatch->q_out_cb<4>().set(FUNC(mephisto_smondial_state::led_mux_w<4>)); - m_boardlatch->q_out_cb<5>().set(FUNC(mephisto_smondial_state::led_mux_w<5>)); - m_boardlatch->q_out_cb<6>().set(FUNC(mephisto_smondial_state::led_mux_w<6>)); - m_boardlatch->q_out_cb<7>().set(FUNC(mephisto_smondial_state::led_mux_w<7>)); -} -void mephisto_montec_state::smondial2(machine_config &config) -{ - megaiv(config); - m_maincpu->set_clock(XTAL(4'000'000)); - m_maincpu->set_addrmap(AS_PROGRAM, &mephisto_montec_state::smondial2_mem); - m_maincpu->set_periodic_int(FUNC(mephisto_montec_state::nmi_line_pulse), attotime::from_hz(XTAL(4'000'000) / (1 << 13))); + /* basic machine hardware */ + M65C02(config.replace(), m_maincpu, 8_MHz_XTAL); + m_maincpu->set_addrmap(AS_PROGRAM, &montec_state::montec_mem); - GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "smondial2_cart"); - SOFTWARE_LIST(config, "cart_list").set_original("mephisto_smondial2"); + const attotime irq_period = attotime::from_hz(8_MHz_XTAL / 0x4000); + m_maincpu->set_periodic_int(FUNC(montec_state::irq0_line_assert), irq_period); - config.set_default_layout(layout_mephisto_smondial2); + m_board->set_delay(attotime::from_msec(150)); } -ROM_START( megaiv ) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD("megaiv.bin", 0x8000, 0x8000, CRC(dee355d2) SHA1(6bc79c0fb169020f017412f5f9696b9ecafbf99f) ) -ROM_END - -ROM_START( megaiva ) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD("mega_iv_17.03.88", 0x8000, 0x8000, CRC(85267e82) SHA1(654c9cf84bf2165fc94f8c4cf9c662786ef3283b) ) -ROM_END -ROM_START( monteciv ) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD("mciv.bin", 0x8000, 0x8000, CRC(c4887694) SHA1(7f482d2a40fcb3125266e7a5407da315b4f9b49c) ) -ROM_END +/****************************************************************************** + ROM Definitions +******************************************************************************/ ROM_START( montec ) ROM_REGION( 0x10000, "maincpu", 0 ) @@ -438,36 +246,22 @@ ROM_LOAD("mc2_20.7.87", 0x8000, 0x8000, CRC(05524da9) SHA1(bee2ffe09a27095f733584e0fb1203b95c23e17e) ) ROM_END -ROM_START( smondial ) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD("supermondial_a.bin", 0x8000, 0x8000, CRC(c1d7d0a5) SHA1(d7f0da6938458c06925f0936e63915319144d7e0) ) -ROM_END -ROM_START( smondialab ) +ROM_START( montec4le ) ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD("supermondial_ab.bin", 0x8000, 0x8000, CRC(a8781685) SHA1(fd4c97e13bd398dc4c85e3e1778bf7e59fccd71e) ) + ROM_LOAD("mc4le.bin", 0x8000, 0x8000, CRC(c4887694) SHA1(7f482d2a40fcb3125266e7a5407da315b4f9b49c) ) ROM_END -ROM_START( smondialb ) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD("supermondial_b.bin", 0x8000, 0x8000, CRC(6fb89e97) SHA1(b001e657b4fdc097322b28a25c31814f3da7b124) ) -ROM_END +} // anonymous namespace -ROM_START( smondial2 ) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD("supermondial_ii.bin", 0x8000, 0x8000, CRC(cd73df4a) SHA1(bad786074be613d7f48bf98b6fdf8178a4a85f5b) ) -ROM_END -/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ -CONS( 1988, megaiv, 0, 0, megaiv, megaiv, mephisto_montec_state, empty_init, "Hegener + Glaser", "Mephisto Mega IV (set 1)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1988, megaiva, megaiv, 0, megaiv, megaiv, mephisto_montec_state, empty_init, "Hegener + Glaser", "Mephisto Mega IV (set 2)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) - -CONS( 1986, smondial, 0, 0, smondial, megaiv, mephisto_smondial_state, empty_init, "Hegener + Glaser", "Mephisto Super Mondial (ver. A)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1986, smondialab, smondial, 0, smondial, megaiv, mephisto_smondial_state, empty_init, "Hegener + Glaser", "Mephisto Super Mondial (ver. AB)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1986, smondialb, smondial, 0, megaiv, megaiv, mephisto_montec_state, empty_init, "Hegener + Glaser", "Mephisto Super Mondial (ver. B)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1988, smondial2, 0, 0, smondial2, smondial2, mephisto_montec_state, empty_init, "Hegener + Glaser", "Mephisto Super Mondial II", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) - -CONS( 1987, montec, 0, 0, montec, montec, mephisto_montec_state, empty_init, "Hegener + Glaser", "Mephisto Monte Carlo (ver. MC3)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1987, monteca, montec, 0, montec, montec, mephisto_montec_state, empty_init, "Hegener + Glaser", "Mephisto Monte Carlo (ver. MC2)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1990, monteciv, 0, 0, monteciv, montec, mephisto_montec_state, empty_init, "Hegener + Glaser", "Mephisto Monte Carlo IV - Limited Edition", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +/*************************************************************************** + Drivers +***************************************************************************/ + +/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ +CONS( 1987, montec, 0, 0, montec, montec, montec_state, empty_init, "Hegener + Glaser", "Mephisto Monte Carlo (ver. MC3)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1987, monteca, montec, 0, montec, montec, montec_state, empty_init, "Hegener + Glaser", "Mephisto Monte Carlo (ver. MC2)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) + +CONS( 1990, montec4le, 0, 0, montec4le, montec, montec_state, empty_init, "Hegener + Glaser", "Mephisto Monte Carlo IV - Limited Edition", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/mephisto_polgar.cpp mame-0.231+dfsg.1/src/mame/drivers/mephisto_polgar.cpp --- mame-0.230+dfsg.1/src/mame/drivers/mephisto_polgar.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/mephisto_polgar.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -1,229 +1,116 @@ // license:BSD-3-Clause -// copyright-holders:Sandro Ronco -/************************************************************************************************** +// copyright-holders:Sandro Ronco, hap +/****************************************************************************** -Mephisto Polgar and RISC +Mephisto Polgar -The chess engine in Mephisto Risc is also compatible with Tasc's The ChessMachine. +Hardware notes: +- RP65C02G @ 4.91MHz +- 64KB ROM (25% unused) +- Mephisto modular display module +- Mephisto modular chessboard -TODO: -- split driver into several files? mrisc for example is completely different hw - -**************************************************************************************************/ +The 10MHz version has a W65C02P-8 @ 9.83MHz. +******************************************************************************/ #include "emu.h" #include "cpu/m6502/m65c02.h" -#include "cpu/m6502/m65sc02.h" +#include "cpu/m6502/r65c02.h" #include "machine/74259.h" #include "machine/nvram.h" #include "machine/mmboard.h" -#include "machine/chessmachine.h" #include "video/mmdisplay2.h" -#include "speaker.h" - // internal artwork -#include "mephisto_milano.lh" #include "mephisto_polgar.lh" -class mephisto_polgar_state : public driver_device +namespace { + +class polgar_state : public driver_device { public: - mephisto_polgar_state(const machine_config &mconfig, device_type type, const char *tag) + polgar_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") , m_keys(*this, "KEY") { } - uint8_t polgar_keys_r(offs_t offset); - void polgar10(machine_config &config); void polgar(machine_config &config); - void polgar_mem(address_map &map); -protected: + +private: required_device m_maincpu; required_ioport m_keys; -}; - -class mephisto_risc_state : public mephisto_polgar_state -{ -public: - mephisto_risc_state(const machine_config &mconfig, device_type type, const char *tag) - : mephisto_polgar_state(mconfig, type, tag) - , m_chessm(*this, "chessm") - , m_rombank(*this, "rombank") - { } - - uint8_t chessm_r(); - void chessm_w(uint8_t data); - void mrisc(machine_config &config); - void mrisc_mem(address_map &map); -protected: - virtual void machine_start() override; + void polgar_mem(address_map &map); -private: - required_device m_chessm; - required_memory_bank m_rombank; - uint8_t m_bank; + u8 keys_r(offs_t offset); }; -class mephisto_milano_state : public mephisto_polgar_state -{ -public: - mephisto_milano_state(const machine_config &mconfig, device_type type, const char *tag) - : mephisto_polgar_state(mconfig, type, tag) - , m_board(*this, "board") - , m_display(*this, "display") - , m_leds(*this, "led%u", 0U) - { } - uint8_t milano_input_r(); - void milano_led_w(uint8_t data); - void milano_io_w(uint8_t data); - - void milano(machine_config &config); - void milano_mem(address_map &map); -protected: - virtual void machine_reset() override; - virtual void machine_start() override; -private: - required_device m_board; - required_device m_display; - output_finder<16> m_leds; - uint8_t m_led_latch; -}; +/****************************************************************************** + I/O +******************************************************************************/ -uint8_t mephisto_polgar_state::polgar_keys_r(offs_t offset) +u8 polgar_state::keys_r(offs_t offset) { - return (BIT(m_keys->read(), offset) << 7) | 0x7f; + return ~(BIT(m_keys->read(), offset) << 7); } -void mephisto_polgar_state::polgar_mem(address_map &map) -{ - map(0x0000, 0x1fff).ram().share("nvram"); - map(0x2000, 0x2000).w("display", FUNC(mephisto_display_module2_device::latch_w)); - map(0x2004, 0x2004).w("display", FUNC(mephisto_display_module2_device::io_w)); - map(0x2400, 0x2400).w("board", FUNC(mephisto_board_device::led_w)); - map(0x2800, 0x2800).w("board", FUNC(mephisto_board_device::mux_w)); - map(0x2c00, 0x2c07).r(FUNC(mephisto_polgar_state::polgar_keys_r)); - map(0x3000, 0x3000).r("board", FUNC(mephisto_board_device::input_r)); - map(0x3400, 0x3407).w("outlatch", FUNC(hc259_device::write_d7)); - map(0x4000, 0xffff).rom(); -} -uint8_t mephisto_risc_state::chessm_r() -{ - return m_chessm->data_r(); -} - -void mephisto_risc_state::chessm_w(uint8_t data) -{ - m_chessm->data0_w(data & 1); - m_chessm->data1_w(data & 0x80); - m_chessm->reset_w(data & 2); -} +/****************************************************************************** + Address Maps +******************************************************************************/ -void mephisto_risc_state::mrisc_mem(address_map &map) +void polgar_state::polgar_mem(address_map &map) { - map.unmap_value_high(); map(0x0000, 0x1fff).ram().share("nvram"); - map(0x2000, 0x2000).w("display", FUNC(mephisto_display_module2_device::latch_w)); - map(0x2004, 0x2004).w("display", FUNC(mephisto_display_module2_device::io_w)); - map(0x2c00, 0x2c07).r(FUNC(mephisto_risc_state::polgar_keys_r)); + map(0x2000, 0x2000).w("display", FUNC(mephisto_display2_device::latch_w)); + map(0x2004, 0x2004).w("display", FUNC(mephisto_display2_device::io_w)); map(0x2400, 0x2400).w("board", FUNC(mephisto_board_device::led_w)); map(0x2800, 0x2800).w("board", FUNC(mephisto_board_device::mux_w)); + map(0x2c00, 0x2c07).r(FUNC(polgar_state::keys_r)); map(0x3000, 0x3000).r("board", FUNC(mephisto_board_device::input_r)); - map(0x3400, 0x3407).w("outlatch", FUNC(hc259_device::write_d7)).nopr(); - map(0x3800, 0x3800).w(FUNC(mephisto_risc_state::chessm_w)); - map(0x3c00, 0x3c00).r(FUNC(mephisto_risc_state::chessm_r)); - map(0x4000, 0x7fff).rom(); - map(0x8000, 0xffff).bankr("rombank"); -} - - -uint8_t mephisto_milano_state::milano_input_r() -{ - return m_board->input_r() ^ 0xff; -} - -void mephisto_milano_state::milano_led_w(uint8_t data) -{ - m_led_latch = data; - m_board->mux_w(data); -} - -void mephisto_milano_state::milano_io_w(uint8_t data) -{ - if ((data & 0xf0) == 0x90 || (data & 0xf0) == 0x60) - { - uint8_t base = (data & 0xf0) == 0x90 ? 0 : 8; - for(int i=0; i<8; i++) - m_leds[base + i] = BIT(m_led_latch, i) ? 0 : 1; - } - else - { - for(int i=0; i<16; i++) - m_leds[i] = 0; - } - - m_display->io_w(data & 0x0f); + map(0x3400, 0x3407).w("outlatch", FUNC(hc259_device::write_d7)); + map(0x4000, 0xffff).rom(); } -void mephisto_milano_state::milano_mem(address_map &map) -{ - map(0x0000, 0x1fbf).ram().share("nvram"); - - map(0x1fc0, 0x1fc0).w(m_display, FUNC(mephisto_display_module2_device::latch_w)); - map(0x1fd0, 0x1fd0).w(FUNC(mephisto_milano_state::milano_led_w)); - map(0x1fe0, 0x1fe0).r(FUNC(mephisto_milano_state::milano_input_r)); - map(0x1fe8, 0x1fef).w("outlatch", FUNC(hc259_device::write_d7)); - map(0x1fd8, 0x1fdf).r(FUNC(mephisto_milano_state::polgar_keys_r)); - map(0x1ff0, 0x1ff0).w(FUNC(mephisto_milano_state::milano_io_w)); - map(0x2000, 0xffff).rom(); -} +/****************************************************************************** + Input Ports +******************************************************************************/ static INPUT_PORTS_START( polgar ) PORT_START("KEY") - PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Trn") PORT_CODE(KEYCODE_T) - PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Info") PORT_CODE(KEYCODE_I) - PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Mem") PORT_CODE(KEYCODE_M) - PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("Pos") PORT_CODE(KEYCODE_O) - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("LEV") PORT_CODE(KEYCODE_L) - PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("FCT") PORT_CODE(KEYCODE_F) - PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("ENT") PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_F1) // combine for NEW GAME - PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYPAD) PORT_NAME("CL") PORT_CODE(KEYCODE_BACKSPACE) PORT_CODE(KEYCODE_DEL) PORT_CODE(KEYCODE_F1) // " + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("TRN / Pawn") PORT_CODE(KEYCODE_T) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("INFO / Knight") PORT_CODE(KEYCODE_I) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("MEM / Bishop") PORT_CODE(KEYCODE_M) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("POS / Rook") PORT_CODE(KEYCODE_O) + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("LEV / Queen") PORT_CODE(KEYCODE_L) + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("FCT / King") PORT_CODE(KEYCODE_F) + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("ENT / New Game") PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_F1) // combine for NEW GAME + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("CL / New Game") PORT_CODE(KEYCODE_BACKSPACE) PORT_CODE(KEYCODE_DEL) PORT_CODE(KEYCODE_F1) // " INPUT_PORTS_END -void mephisto_risc_state::machine_start() -{ - m_rombank->configure_entries(0, 4, memregion("maincpu")->base(), 0x8000); - save_item(NAME(m_bank)); -} -void mephisto_milano_state::machine_start() -{ - m_leds.resolve(); - save_item(NAME(m_led_latch)); -} -void mephisto_milano_state::machine_reset() -{ - m_led_latch = 0; -} +/****************************************************************************** + Machine Configs +******************************************************************************/ -void mephisto_polgar_state::polgar(machine_config &config) +void polgar_state::polgar(machine_config &config) { - M65C02(config, m_maincpu, XTAL(4'915'200)); // RP65C02G - m_maincpu->set_addrmap(AS_PROGRAM, &mephisto_polgar_state::polgar_mem); - m_maincpu->set_periodic_int(FUNC(mephisto_polgar_state::nmi_line_pulse), attotime::from_hz(XTAL(4'915'200) / (1 << 13))); + R65C02(config, m_maincpu, 4.9152_MHz_XTAL); + m_maincpu->set_addrmap(AS_PROGRAM, &polgar_state::polgar_mem); + + const attotime nmi_period = attotime::from_hz(4.9152_MHz_XTAL / 0x2000); + m_maincpu->set_periodic_int(FUNC(polgar_state::nmi_line_pulse), nmi_period); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); @@ -240,48 +127,22 @@ config.set_default_layout(layout_mephisto_polgar); } -void mephisto_polgar_state::polgar10(machine_config &config) +void polgar_state::polgar10(machine_config &config) { polgar(config); - m_maincpu->set_clock(9.8304_MHz_XTAL); // W65C02P-8 - m_maincpu->set_periodic_int(FUNC(mephisto_polgar_state::nmi_line_pulse), attotime::from_hz(9.8304_MHz_XTAL / (1 << 13))); -} - -void mephisto_risc_state::mrisc(machine_config &config) -{ - M65SC02(config, m_maincpu, XTAL(10'000'000) / 4); // G65SC02P-4 - m_maincpu->set_addrmap(AS_PROGRAM, &mephisto_risc_state::mrisc_mem); - m_maincpu->set_periodic_int(FUNC(mephisto_risc_state::irq0_line_hold), attotime::from_hz(XTAL(10'000'000) / (1 << 14))); - CHESSMACHINE(config, m_chessm, 14'000'000); // Tasc ChessMachine EC PCB, Mephisto manual says 14MHz (no XTAL) - config.set_perfect_quantum(m_maincpu); - - NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); - - hc259_device &outlatch(HC259(config, "outlatch")); - outlatch.q_out_cb<0>().set_output("led100"); - outlatch.q_out_cb<1>().set_output("led101"); - outlatch.q_out_cb<2>().set_output("led102"); - outlatch.q_out_cb<3>().set_output("led103"); - outlatch.q_out_cb<4>().set_output("led104"); - outlatch.q_out_cb<5>().set_output("led105"); - outlatch.parallel_out_cb().set_membank("rombank").rshift(6).mask(0x03).exor(0x01); + M65C02(config.replace(), m_maincpu, 9.8304_MHz_XTAL); + m_maincpu->set_addrmap(AS_PROGRAM, &polgar_state::polgar_mem); - MEPHISTO_SENSORS_BOARD(config, "board"); - MEPHISTO_DISPLAY_MODULE2(config, "display"); - config.set_default_layout(layout_mephisto_polgar); + const attotime nmi_period = attotime::from_hz(9.8304_MHz_XTAL / 0x2000); + m_maincpu->set_periodic_int(FUNC(polgar_state::nmi_line_pulse), nmi_period); } -void mephisto_milano_state::milano(machine_config &config) -{ - polgar(config); // CPU: W65C02P-8, 4.9152MHz - m_maincpu->set_addrmap(AS_PROGRAM, &mephisto_milano_state::milano_mem); - MEPHISTO_BUTTONS_BOARD(config.replace(), m_board); - m_board->set_disable_leds(true); - config.set_default_layout(layout_mephisto_milano); -} +/****************************************************************************** + ROM Definitions +******************************************************************************/ ROM_START( polgar ) ROM_REGION( 0x10000, "maincpu", 0 ) @@ -303,50 +164,16 @@ ROM_LOAD("polg_101.bin", 0x00000, 0x10000, CRC(8fb6afa4) SHA1(d1cf868302a665ff351686b26a149ced0045fc81) ) ROM_END -ROM_START( mrisc ) - ROM_REGION( 0x20000, "maincpu", 0 ) - // contains ChessMachine engine at 0x0-0x03fff + 0x10000-0x1c74f, concatenate those sections and make a .bin file, - // then it will work on ChessMachine software. It identifies as R E B E L ver. HG-021 03-04-92 - ROM_LOAD("meph-risci-v1-2.bin", 0x00000, 0x20000, CRC(19c6ab83) SHA1(0baab84e5aa6999c24250938d207145144945fd5) ) -ROM_END +} // anonymous namespace -ROM_START( mrisc2 ) - ROM_REGION( 0x20000, "maincpu", 0 ) - // contains ChessMachine engine at 0x0-0x03fff + 0x10000-0x1cb7f, concatenate those sections and make a .bin file, - // then it will work on ChessMachine software. It identifies as R E B E L ver. 2.31 22-07-93, world champion Madrid 1992 - ROM_LOAD("risc_2.31", 0x00000, 0x20000, CRC(9ecf9cd3) SHA1(7bfc628183037a172242c9589f15aca218d8fb12) ) -ROM_END - -ROM_START( milano ) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD("milano102.bin", 0x0000, 0x10000, CRC(0e9c8fe1) SHA1(e9176f42d86fe57e382185c703c7eff7e63ca711) ) -ROM_END - -ROM_START( milanoa ) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD("milano101.bin", 0x0000, 0x10000, CRC(22efc0be) SHA1(921607d6dacf72c0686b8970261c43e2e244dc9f) ) -ROM_END - -ROM_START( nshort ) - ROM_REGION( 0x10000, "maincpu", 0 ) - ROM_LOAD("nshort.bin", 0x00000, 0x10000, CRC(4bd51e23) SHA1(3f55cc1c55dae8818b7e9384b6b8d43dc4f0a1af) ) -ROM_END /*************************************************************************** - Game driver(s) + Drivers ***************************************************************************/ -/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ -CONS( 1990, polgar, 0, 0, polgar, polgar, mephisto_polgar_state, empty_init, "Hegener + Glaser", "Mephisto Polgar (v1.50)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1989, polgara, polgar, 0, polgar, polgar, mephisto_polgar_state, empty_init, "Hegener + Glaser", "Mephisto Polgar (v1.10)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1990, polgar10, polgar, 0, polgar10, polgar, mephisto_polgar_state, empty_init, "Hegener + Glaser", "Mephisto Polgar 10 MHz (v10.0)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1990, polgar101, polgar, 0, polgar10, polgar, mephisto_polgar_state, empty_init, "Hegener + Glaser", "Mephisto Polgar 10 MHz (v10.1)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) - -CONS( 1992, mrisc, 0, 0, mrisc, polgar, mephisto_risc_state, empty_init, "Hegener + Glaser / Tasc", "Mephisto Risc 1MB", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1994, mrisc2, mrisc, 0, mrisc, polgar, mephisto_risc_state, empty_init, "Hegener + Glaser / Tasc", "Mephisto Risc II", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) - -// not modular boards -CONS( 1991, milano, 0, 0, milano, polgar, mephisto_milano_state, empty_init, "Hegener + Glaser", "Mephisto Milano (v1.02)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1991, milanoa, milano, 0, milano, polgar, mephisto_milano_state, empty_init, "Hegener + Glaser", "Mephisto Milano (v1.01)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1993, nshort, milano, 0, milano, polgar, mephisto_milano_state, empty_init, "Hegener + Glaser", "Mephisto Nigel Short", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ +CONS( 1990, polgar, 0, 0, polgar, polgar, polgar_state, empty_init, "Hegener + Glaser", "Mephisto Polgar (v1.50)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1989, polgara, polgar, 0, polgar, polgar, polgar_state, empty_init, "Hegener + Glaser", "Mephisto Polgar (v1.10)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1990, polgar10, polgar, 0, polgar10, polgar, polgar_state, empty_init, "Hegener + Glaser", "Mephisto Polgar 10 MHz (v10.0)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1990, polgar101, polgar, 0, polgar10, polgar, polgar_state, empty_init, "Hegener + Glaser", "Mephisto Polgar 10 MHz (v10.1)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/mephisto_risc.cpp mame-0.231+dfsg.1/src/mame/drivers/mephisto_risc.cpp --- mame-0.230+dfsg.1/src/mame/drivers/mephisto_risc.cpp 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/mephisto_risc.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,199 @@ +// license:BSD-3-Clause +// copyright-holders:Sandro Ronco, hap +/****************************************************************************** + +Mephisto Risc 1MB/II (stylized "risc") + +The chess engine in Mephisto Risc is also compatible with Tasc's The ChessMachine, +see ROM defs for details. + +Hardware notes: +- G65SC02P-4 @ 2.5MHz +- 128KB ROM +- Tasc ChessMachine EC PCB +- Mephisto modular display module +- Mephisto modular chessboard + +******************************************************************************/ + +#include "emu.h" + +#include "cpu/m6502/m65sc02.h" +#include "machine/74259.h" +#include "machine/nvram.h" +#include "machine/mmboard.h" +#include "machine/chessmachine.h" +#include "video/mmdisplay2.h" + +// internal artwork +#include "mephisto_risc.lh" + + +namespace { + +class risc_state : public driver_device +{ +public: + risc_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_chessm(*this, "chessm") + , m_rombank(*this, "rombank") + , m_keys(*this, "KEY") + { } + + void mrisc(machine_config &config); + +protected: + virtual void machine_start() override; + +private: + required_device m_maincpu; + required_device m_chessm; + required_memory_bank m_rombank; + required_ioport m_keys; + + void mrisc_mem(address_map &map); + + u8 keys_r(offs_t offset); + u8 chessm_r(); + void chessm_w(u8 data); +}; + +void risc_state::machine_start() +{ + m_rombank->configure_entries(0, 4, memregion("maincpu")->base(), 0x8000); +} + + + +/****************************************************************************** + I/O +******************************************************************************/ + +u8 risc_state::keys_r(offs_t offset) +{ + return ~(BIT(m_keys->read(), offset) << 7); +} + +u8 risc_state::chessm_r() +{ + // d0: chessmachine data + return m_chessm->data_r(); +} + +void risc_state::chessm_w(u8 data) +{ + // d0,d7: chessmachine data + m_chessm->data0_w(BIT(data, 0)); + m_chessm->data1_w(BIT(data, 7)); + + // d1: chessmachine reset + m_chessm->reset_w(BIT(data, 1)); +} + + + +/****************************************************************************** + Address Maps +******************************************************************************/ + +void risc_state::mrisc_mem(address_map &map) +{ + map.unmap_value_high(); + map(0x0000, 0x1fff).ram().share("nvram"); + map(0x2000, 0x2000).w("display", FUNC(mephisto_display2_device::latch_w)); + map(0x2004, 0x2004).w("display", FUNC(mephisto_display2_device::io_w)); + map(0x2c00, 0x2c07).r(FUNC(risc_state::keys_r)); + map(0x2400, 0x2400).w("board", FUNC(mephisto_board_device::led_w)); + map(0x2800, 0x2800).w("board", FUNC(mephisto_board_device::mux_w)); + map(0x3000, 0x3000).r("board", FUNC(mephisto_board_device::input_r)); + map(0x3400, 0x3407).w("outlatch", FUNC(hc259_device::write_d7)).nopr(); + map(0x3800, 0x3800).w(FUNC(risc_state::chessm_w)); + map(0x3c00, 0x3c00).r(FUNC(risc_state::chessm_r)); + map(0x4000, 0x7fff).rom(); + map(0x8000, 0xffff).bankr("rombank"); +} + + + +/****************************************************************************** + Input Ports +******************************************************************************/ + +static INPUT_PORTS_START( mrisc ) + PORT_START("KEY") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("TRN / Pawn") PORT_CODE(KEYCODE_T) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("INFO / Knight") PORT_CODE(KEYCODE_I) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("MEM / Bishop") PORT_CODE(KEYCODE_M) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("POS / Rook") PORT_CODE(KEYCODE_O) + PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("LEV / Queen") PORT_CODE(KEYCODE_L) + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("FCT / King") PORT_CODE(KEYCODE_F) + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("ENT / New Game") PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_F1) // combine for NEW GAME + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("CL / New Game") PORT_CODE(KEYCODE_BACKSPACE) PORT_CODE(KEYCODE_DEL) PORT_CODE(KEYCODE_F1) // " +INPUT_PORTS_END + + + +/****************************************************************************** + Machine Configs +******************************************************************************/ + +void risc_state::mrisc(machine_config &config) +{ + M65SC02(config, m_maincpu, 10_MHz_XTAL / 4); + m_maincpu->set_addrmap(AS_PROGRAM, &risc_state::mrisc_mem); + + const attotime irq_period = attotime::from_hz(10_MHz_XTAL / 0x4000); + m_maincpu->set_periodic_int(FUNC(risc_state::irq0_line_hold), irq_period); + + CHESSMACHINE(config, m_chessm, 14'000'000); // Mephisto manual says 14MHz (no XTAL) + config.set_perfect_quantum(m_maincpu); + + NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); + + hc259_device &outlatch(HC259(config, "outlatch")); + outlatch.q_out_cb<0>().set_output("led100"); + outlatch.q_out_cb<1>().set_output("led101"); + outlatch.q_out_cb<2>().set_output("led102"); + outlatch.q_out_cb<3>().set_output("led103"); + outlatch.q_out_cb<4>().set_output("led104"); + outlatch.q_out_cb<5>().set_output("led105"); + outlatch.parallel_out_cb().set_membank("rombank").rshift(6).mask(0x03).exor(0x01); + + MEPHISTO_SENSORS_BOARD(config, "board"); + MEPHISTO_DISPLAY_MODULE2(config, "display"); + config.set_default_layout(layout_mephisto_risc); +} + + + +/****************************************************************************** + ROM Definitions +******************************************************************************/ + +ROM_START( mrisc ) + ROM_REGION( 0x20000, "maincpu", 0 ) + // contains ChessMachine engine at 0x0-0x03fff + 0x10000-0x1c74f, concatenate those sections and make a .bin file, + // then it will work on ChessMachine software. It identifies as R E B E L ver. HG-021 03-04-92 + ROM_LOAD("meph-risci-v1-2.bin", 0x00000, 0x20000, CRC(19c6ab83) SHA1(0baab84e5aa6999c24250938d207145144945fd5) ) +ROM_END + +ROM_START( mrisc2 ) + ROM_REGION( 0x20000, "maincpu", 0 ) + // contains ChessMachine engine at 0x0-0x03fff + 0x10000-0x1cb7f, concatenate those sections and make a .bin file, + // then it will work on ChessMachine software. It identifies as R E B E L ver. 2.31 22-07-93, world champion Madrid 1992 + ROM_LOAD("risc_2.31", 0x00000, 0x20000, CRC(9ecf9cd3) SHA1(7bfc628183037a172242c9589f15aca218d8fb12) ) +ROM_END + +} // anonymous namespace + + + +/*************************************************************************** + Drivers +***************************************************************************/ + +/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ +CONS( 1992, mrisc, 0, 0, mrisc, mrisc, risc_state, empty_init, "Hegener + Glaser / Tasc", "Mephisto Risc 1MB", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1994, mrisc2, mrisc, 0, mrisc, mrisc, risc_state, empty_init, "Hegener + Glaser / Tasc", "Mephisto Risc II", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/mephisto_smondial.cpp mame-0.231+dfsg.1/src/mame/drivers/mephisto_smondial.cpp --- mame-0.230+dfsg.1/src/mame/drivers/mephisto_smondial.cpp 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/mephisto_smondial.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,407 @@ +// license:BSD-3-Clause +// copyright-holders:Sandro Ronco, hap +// thanks-to:yoyo_chessboard +/****************************************************************************** + +Mephisto Super Mondial +Mephisto Super Mondial II +Mephisto Mega IV + +Hardware notes: +- G65SC02P-4 @ 4MHz +- 8KB RAM(battery-backed), 32KB ROM +- expansion slot at underside (only used for smondial2) +- 2*PCF2112, 2 7seg LCD screens +- 8*8 chessboard buttons, 24 tri-color leds, piezo + +Undocumented buttons: +- smondialb: holding CL+INFO on boot runs diagnostics + +******************************************************************************/ + +#include "emu.h" + +#include "bus/generic/slot.h" +#include "bus/generic/carts.h" +#include "cpu/m6502/m65sc02.h" +#include "cpu/m6502/r65c02.h" +#include "machine/74259.h" +#include "machine/nvram.h" +#include "machine/sensorboard.h" +#include "sound/dac.h" +#include "video/pcf2100.h" +#include "video/pwm.h" + +#include "softlist.h" +#include "speaker.h" + +// internal artwork +#include "mephisto_smondial.lh" +#include "mephisto_smondial2.lh" + + +namespace { + +// Super Mondial B / shared + +class smondialb_state : public driver_device +{ +public: + smondialb_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_board(*this, "board") + , m_lcd_latch(*this, "lcd_latch") + , m_led_pwm(*this, "led_pwm") + , m_lcd(*this, "lcd%u", 0) + , m_dac(*this, "dac") + , m_keys(*this, "KEY.%u", 0) + , m_digits(*this, "digit%u", 0U) + { } + + // machine configs + void smondial2(machine_config &config); + void mega4(machine_config &config); + void smondialb(machine_config &config); + +protected: + virtual void machine_start() override; + + // devices/pointers + required_device m_maincpu; + required_device m_board; + required_device m_lcd_latch; + required_device m_led_pwm; + required_device_array m_lcd; + required_device m_dac; + required_ioport_array<4> m_keys; + output_finder<8> m_digits; + + // address maps + void smondialb_mem(address_map &map); + void smondial2_mem(address_map &map); + + // I/O handlers + template void lcd_output_w(u32 data); + void update_leds(); + u8 input_r(offs_t offset); + virtual void led_w(u8 data); + void board_w(u8 data); + INTERRUPT_GEN_MEMBER(nmi_handler); + + u8 m_led_data = 0; + u8 m_board_mux = 0; +}; + +void smondialb_state::machine_start() +{ + m_digits.resolve(); + + save_item(NAME(m_led_data)); + save_item(NAME(m_board_mux)); +} + +// Super Mondial A + +class smondiala_state : public smondialb_state +{ +public: + smondiala_state(const machine_config &mconfig, device_type type, const char *tag) : + smondialb_state(mconfig, type, tag) + { } + + void smondiala(machine_config &config); + +private: + void smondiala_mem(address_map &map); + + // led row/column is switched around, do a trampoline here instead of making a different .lay file + virtual void led_w(u8 data) override { smondialb_state::led_w(bitswap<8>(data, 7,6,3,2,5,4,1,0)); } + + void irq_ack_w(u8 data); +}; + + + +/****************************************************************************** + I/O +******************************************************************************/ + +template +void smondialb_state::lcd_output_w(u32 data) +{ + // lcd segment outputs + for (int i = 0; i < 4; i++) + m_digits[i + N*4] = bitswap<8>(data >> (8 * i), 7,4,5,0,1,2,3,6); +} + +void smondialb_state::update_leds() +{ + m_led_pwm->matrix(m_board_mux, m_led_data); +} + +void smondialb_state::board_w(u8 data) +{ + m_board_mux = ~data; + update_leds(); +} + +void smondialb_state::led_w(u8 data) +{ + // d0-d5: led data + m_led_data = data; + update_leds(); + + // d6: nmi enable (does not apply to smondiala) + // d7: speaker out + m_dac->write(BIT(data, 7)); +} + +u8 smondialb_state::input_r(offs_t offset) +{ + u8 data = 0; + + // read keypad + for (int i = 0; i < 4; i++) + if (!BIT(m_lcd_latch->output_state(), i)) + data |= BIT(m_keys[i]->read(), offset & 3); + + // read chessboard sensors + for (int i = 0; i < 8; i++) + if (BIT(m_board_mux, i)) + data |= BIT(m_board->read_rank(i), offset); + + return ~(data << 7); +} + +INTERRUPT_GEN_MEMBER(smondialb_state::nmi_handler) +{ + if (m_led_data & 0x40) + m_maincpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero); +} + +void smondiala_state::irq_ack_w(u8 data) +{ + m_maincpu->set_input_line(0, CLEAR_LINE); +} + + + +/****************************************************************************** + Address Maps +******************************************************************************/ + +void smondialb_state::smondialb_mem(address_map &map) +{ + map(0x0000, 0x1fff).ram().share("nvram"); + map(0x2400, 0x2400).w(FUNC(smondialb_state::led_w)); + map(0x2800, 0x2800).w(FUNC(smondialb_state::board_w)); + map(0x2c00, 0x2c07).w(m_lcd_latch, FUNC(hc259_device::write_d7)).nopr(); + map(0x3000, 0x3007).r(FUNC(smondialb_state::input_r)); + map(0x8000, 0xffff).rom(); +} + +void smondialb_state::smondial2_mem(address_map &map) +{ + smondialb_mem(map); + map(0x4000, 0x7fff).r("cartslot", FUNC(generic_slot_device::read_rom)); +} + +void smondiala_state::smondiala_mem(address_map &map) +{ + map(0x0000, 0x1fff).ram().share("nvram"); + map(0x4000, 0x4007).r(FUNC(smondiala_state::input_r)); + map(0x6000, 0x6000).w(FUNC(smondiala_state::irq_ack_w)); + map(0x6400, 0x6407).w("led_latch", FUNC(hc259_device::write_d7)).nopr(); + map(0x6800, 0x6807).w("board_latch", FUNC(hc259_device::write_d7)).nopr(); + map(0x6c00, 0x6c07).w(m_lcd_latch, FUNC(hc259_device::write_d7)).nopr(); + map(0x8000, 0xffff).rom(); +} + + + +/****************************************************************************** + Input Ports +******************************************************************************/ + +static INPUT_PORTS_START( smondial ) + PORT_START("KEY.0") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Pawn / 1") PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Queen / 5") PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("BOOK / 9") PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_CODE(KEYCODE_B) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("CL") PORT_CODE(KEYCODE_DEL) PORT_CODE(KEYCODE_BACKSPACE) + + PORT_START("KEY.1") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Knight / 2") PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("King / 6") PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("POS / 0") PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(KEYCODE_O) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("LEV") PORT_CODE(KEYCODE_L) + + PORT_START("KEY.2") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Bishop / 3") PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Black / 7") PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("MEM") PORT_CODE(KEYCODE_M) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("ENT") PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) + + PORT_START("KEY.3") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Rook / 4") PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("White / 8") PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("INFO") PORT_CODE(KEYCODE_I) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("RES") PORT_CODE(KEYCODE_F1) +INPUT_PORTS_END + +static INPUT_PORTS_START( smondial2 ) + PORT_INCLUDE( smondial ) + + PORT_MODIFY("KEY.0") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("HELP / 9") PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_CODE(KEYCODE_H) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("LEV") PORT_CODE(KEYCODE_L) + + PORT_MODIFY("KEY.1") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("INFO / 0") PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_CODE(KEYCODE_I) + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("CL") PORT_CODE(KEYCODE_DEL) PORT_CODE(KEYCODE_BACKSPACE) + + PORT_MODIFY("KEY.2") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("POS") PORT_CODE(KEYCODE_O) + + PORT_MODIFY("KEY.3") + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("MEM") PORT_CODE(KEYCODE_M) +INPUT_PORTS_END + + + +/****************************************************************************** + Machine Configs +******************************************************************************/ + +void smondialb_state::smondialb(machine_config &config) +{ + /* basic machine hardware */ + M65SC02(config, m_maincpu, 4_MHz_XTAL); + m_maincpu->set_addrmap(AS_PROGRAM, &smondialb_state::smondialb_mem); + + const attotime nmi_period = attotime::from_hz(4_MHz_XTAL / 0x2000); + m_maincpu->set_periodic_int(FUNC(smondialb_state::nmi_handler), nmi_period); + + NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); + + HC259(config, m_lcd_latch); + m_lcd_latch->q_out_cb<4>().set(m_lcd[0], FUNC(pcf2112_device::data_w)); + m_lcd_latch->q_out_cb<4>().append(m_lcd[1], FUNC(pcf2112_device::data_w)); + m_lcd_latch->q_out_cb<5>().set(m_lcd[1], FUNC(pcf2112_device::dlen_w)); + m_lcd_latch->q_out_cb<6>().set(m_lcd[0], FUNC(pcf2112_device::clb_w)); + m_lcd_latch->q_out_cb<6>().append(m_lcd[1], FUNC(pcf2112_device::clb_w)); + m_lcd_latch->q_out_cb<7>().set(m_lcd[0], FUNC(pcf2112_device::dlen_w)); + + SENSORBOARD(config, m_board).set_type(sensorboard_device::BUTTONS); + m_board->init_cb().set(m_board, FUNC(sensorboard_device::preset_chess)); + m_board->set_delay(attotime::from_msec(250)); + + /* video hardware */ + PCF2112(config, m_lcd[0], 50); // frequency guessed + m_lcd[0]->write_segs().set(FUNC(smondialb_state::lcd_output_w<0>)); + PCF2112(config, m_lcd[1], 50); // " + m_lcd[1]->write_segs().set(FUNC(smondialb_state::lcd_output_w<1>)); + + PWM_DISPLAY(config, m_led_pwm).set_size(8, 6); + config.set_default_layout(layout_mephisto_smondial); + + /* sound hardware */ + SPEAKER(config, "speaker").front_center(); + DAC_1BIT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.25); +} + +void smondiala_state::smondiala(machine_config &config) +{ + smondialb(config); + + /* basic machine hardware */ + m_maincpu->set_addrmap(AS_PROGRAM, &smondiala_state::smondiala_mem); + + const attotime irq_period = attotime::from_hz(4_MHz_XTAL / 0x2000); + m_maincpu->set_periodic_int(FUNC(smondiala_state::irq0_line_assert), irq_period); + + HC259(config, "led_latch").parallel_out_cb().set(FUNC(smondiala_state::led_w)).invert(); + HC259(config, "board_latch").parallel_out_cb().set(FUNC(smondiala_state::board_w)).invert(); +} + +void smondialb_state::smondial2(machine_config &config) +{ + smondialb(config); + + /* basic machine hardware */ + m_maincpu->set_addrmap(AS_PROGRAM, &smondialb_state::smondial2_mem); + + GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "smondial2_cart"); + SOFTWARE_LIST(config, "cart_list").set_original("mephisto_smondial2"); + + config.set_default_layout(layout_mephisto_smondial2); +} + +void smondialb_state::mega4(machine_config &config) +{ + smondialb(config); + + /* basic machine hardware */ + R65C02(config.replace(), m_maincpu, 4.9152_MHz_XTAL); + m_maincpu->set_addrmap(AS_PROGRAM, &smondialb_state::smondialb_mem); + + const attotime nmi_period = attotime::from_hz(4.9152_MHz_XTAL / 0x2000); + m_maincpu->set_periodic_int(FUNC(smondialb_state::nmi_handler), nmi_period); +} + + + +/****************************************************************************** + ROM Definitions +******************************************************************************/ + +ROM_START( smondial ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD("supermondial_a.bin", 0x8000, 0x8000, CRC(c1d7d0a5) SHA1(d7f0da6938458c06925f0936e63915319144d7e0) ) +ROM_END + +ROM_START( smondialab ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD("supermondial_ab.bin", 0x8000, 0x8000, CRC(a8781685) SHA1(fd4c97e13bd398dc4c85e3e1778bf7e59fccd71e) ) +ROM_END + +ROM_START( smondialb ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD("supermondial_b.bin", 0x8000, 0x8000, CRC(6fb89e97) SHA1(b001e657b4fdc097322b28a25c31814f3da7b124) ) +ROM_END + + +ROM_START( smondial2 ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD("supermondial_ii.bin", 0x8000, 0x8000, CRC(cd73df4a) SHA1(bad786074be613d7f48bf98b6fdf8178a4a85f5b) ) +ROM_END + + +ROM_START( mega4 ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD("mega_iv.bin", 0x8000, 0x8000, CRC(dee355d2) SHA1(6bc79c0fb169020f017412f5f9696b9ecafbf99f) ) +ROM_END + +ROM_START( mega4a ) + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD("mega_iv_17.03.88", 0x8000, 0x8000, CRC(85267e82) SHA1(654c9cf84bf2165fc94f8c4cf9c662786ef3283b) ) +ROM_END + +} // anonymous namespace + + + +/*************************************************************************** + Drivers +***************************************************************************/ + +/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ +CONS( 1986, smondial, 0, 0, smondiala, smondial, smondiala_state, empty_init, "Hegener + Glaser", "Mephisto Super Mondial (ver. A)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1986, smondialab, smondial, 0, smondiala, smondial, smondiala_state, empty_init, "Hegener + Glaser", "Mephisto Super Mondial (ver. AB)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1986, smondialb, smondial, 0, smondialb, smondial, smondialb_state, empty_init, "Hegener + Glaser", "Mephisto Super Mondial (ver. B)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) + +CONS( 1988, smondial2, 0, 0, smondial2, smondial2, smondialb_state, empty_init, "Hegener + Glaser", "Mephisto Super Mondial II", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) + +CONS( 1988, mega4, 0, 0, mega4, smondial, smondialb_state, empty_init, "Hegener + Glaser", "Mephisto Mega IV (set 1)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1988, mega4a, mega4, 0, mega4, smondial, smondialb_state, empty_init, "Hegener + Glaser", "Mephisto Mega IV (set 2)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/mephistp.cpp mame-0.231+dfsg.1/src/mame/drivers/mephistp.cpp --- mame-0.230+dfsg.1/src/mame/drivers/mephistp.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/mephistp.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -18,14 +18,13 @@ #include "machine/nvram.h" #include "sound/ay8910.h" #include "sound/dac.h" -#include "sound/3812intf.h" +#include "sound/ym3812.h" #include "speaker.h" -// mephisto_state was also defined in mess/drivers/mephisto.c -class mephisto_pinball_state : public driver_device +class mephisto_state : public driver_device { public: - mephisto_pinball_state(const machine_config &mconfig, device_type type, const char *tag) + mephisto_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") , m_aysnd(*this, "aysnd") @@ -62,29 +61,29 @@ }; -void mephisto_pinball_state::shift_load_w(u8 data) +void mephisto_state::shift_load_w(u8 data) { } -u8 mephisto_pinball_state::ay8910_read() +u8 mephisto_state::ay8910_read() { return m_ay8910_data; } -void mephisto_pinball_state::ay8910_write(u8 data) +void mephisto_state::ay8910_write(u8 data) { m_ay8910_data = data; ay8910_update(); } -void mephisto_pinball_state::t0_t1_w(u8 data) +void mephisto_state::t0_t1_w(u8 data) { m_ay8910_bdir = BIT(data, 4); // T0 m_ay8910_bc1 = BIT(data, 5); // T1 ay8910_update(); } -void mephisto_pinball_state::ay8910_update() +void mephisto_state::ay8910_update() { if (m_ay8910_bdir) m_aysnd->data_address_w(m_ay8910_bc1, m_ay8910_data); @@ -92,21 +91,21 @@ m_ay8910_data = m_aysnd->data_r(); } -void mephisto_pinball_state::ay8910_columns_w(u8 data) +void mephisto_state::ay8910_columns_w(u8 data) { } -u8 mephisto_pinball_state::ay8910_inputs_r() +u8 mephisto_state::ay8910_inputs_r() { return 0xff; } -void mephisto_pinball_state::sound_rombank_w(u8 data) +void mephisto_state::sound_rombank_w(u8 data) { m_soundbank->set_entry(data & 0xf); } -void mephisto_pinball_state::mephisto_map(address_map &map) +void mephisto_state::mephisto_map(address_map &map) { map(0x00000, 0x07fff).rom().region("maincpu", 0).mirror(0x8000); map(0x10000, 0x107ff).ram().share("nvram"); @@ -115,12 +114,12 @@ map(0x13800, 0x13807).rw("ic20", FUNC(i8155_device::io_r), FUNC(i8155_device::io_w)); map(0x14000, 0x140ff).rw("ic9", FUNC(i8155_device::memory_r), FUNC(i8155_device::memory_w)); map(0x14800, 0x14807).rw("ic9", FUNC(i8155_device::io_r), FUNC(i8155_device::io_w)); - map(0x16000, 0x16000).w(FUNC(mephisto_pinball_state::shift_load_w)); + map(0x16000, 0x16000).w(FUNC(mephisto_state::shift_load_w)); map(0x17000, 0x17001).nopw(); //??? map(0xf0000, 0xf7fff).rom().region("maincpu", 0).mirror(0x8000); } -void mephisto_pinball_state::sport2k_map(address_map &map) +void mephisto_state::sport2k_map(address_map &map) { map(0x00000, 0x0ffff).rom().region("maincpu", 0); map(0x20000, 0x21fff).ram().share("nvram"); @@ -129,25 +128,25 @@ map(0x2b800, 0x2b807).rw("ic20", FUNC(i8155_device::io_r), FUNC(i8155_device::io_w)); map(0x2c000, 0x2c0ff).rw("ic9", FUNC(i8155_device::memory_r), FUNC(i8155_device::memory_w)); map(0x2c800, 0x2c807).rw("ic9", FUNC(i8155_device::io_r), FUNC(i8155_device::io_w)); - map(0x2e000, 0x2e000).w(FUNC(mephisto_pinball_state::shift_load_w)); + map(0x2e000, 0x2e000).w(FUNC(mephisto_state::shift_load_w)); map(0x2f000, 0x2f001).nopw(); //??? map(0xf0000, 0xfffff).rom().region("maincpu", 0); } -void mephisto_pinball_state::mephisto_8051_map(address_map &map) +void mephisto_state::mephisto_8051_map(address_map &map) { map(0x0000, 0x7fff).rom(); map(0x8000, 0xffff).bankr("soundbank"); } -void mephisto_pinball_state::mephisto_8051_io(address_map &map) +void mephisto_state::mephisto_8051_io(address_map &map) { map(0x0000, 0x07ff).ram(); - map(0x0800, 0x0800).w(FUNC(mephisto_pinball_state::sound_rombank_w)); + map(0x0800, 0x0800).w(FUNC(mephisto_state::sound_rombank_w)); map(0x1000, 0x1000).w("dac", FUNC(dac08_device::data_w)); } -void mephisto_pinball_state::sport2k_8051_io(address_map &map) +void mephisto_state::sport2k_8051_io(address_map &map) { mephisto_8051_io(map); map(0x1800, 0x1801).rw("ymsnd", FUNC(ym3812_device::read), FUNC(ym3812_device::write)); @@ -157,7 +156,7 @@ static INPUT_PORTS_START( mephisto ) INPUT_PORTS_END -void mephisto_pinball_state::machine_start() +void mephisto_state::machine_start() { m_soundbank->configure_entries(0, 16, memregion("sound1")->base(), 0x8000); m_soundbank->set_entry(0); @@ -170,15 +169,15 @@ save_item(NAME(m_ay8910_bc1)); } -void mephisto_pinball_state::machine_reset() +void mephisto_state::machine_reset() { } -void mephisto_pinball_state::mephisto(machine_config &config) +void mephisto_state::mephisto(machine_config &config) { /* basic machine hardware */ I8088(config, m_maincpu, XTAL(18'000'000)/3); - m_maincpu->set_addrmap(AS_PROGRAM, &mephisto_pinball_state::mephisto_map); + m_maincpu->set_addrmap(AS_PROGRAM, &mephisto_state::mephisto_map); //m_maincpu->set_irq_acknowledge_callback("muart", FUNC(i8256_device::inta_cb)); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); @@ -193,32 +192,32 @@ I8155(config, "ic9", XTAL(18'000'000)/6); //i8155_device &i8155_2(I8155(config, "ic9", XTAL(18'000'000)/6)); - //i8155_2.out_to_callback().set(FUNC(mephisto_pinball_state::clk_shift_w)); + //i8155_2.out_to_callback().set(FUNC(mephisto_state::clk_shift_w)); i8051_device &soundcpu(I8051(config, "soundcpu", XTAL(12'000'000))); - soundcpu.set_addrmap(AS_PROGRAM, &mephisto_pinball_state::mephisto_8051_map); // EA tied high for external program ROM - soundcpu.set_addrmap(AS_IO, &mephisto_pinball_state::mephisto_8051_io); - soundcpu.port_in_cb<1>().set(FUNC(mephisto_pinball_state::ay8910_read)); - soundcpu.port_out_cb<1>().set(FUNC(mephisto_pinball_state::ay8910_write)); - soundcpu.port_out_cb<3>().set(FUNC(mephisto_pinball_state::t0_t1_w)); + soundcpu.set_addrmap(AS_PROGRAM, &mephisto_state::mephisto_8051_map); // EA tied high for external program ROM + soundcpu.set_addrmap(AS_IO, &mephisto_state::mephisto_8051_io); + soundcpu.port_in_cb<1>().set(FUNC(mephisto_state::ay8910_read)); + soundcpu.port_out_cb<1>().set(FUNC(mephisto_state::ay8910_write)); + soundcpu.port_out_cb<3>().set(FUNC(mephisto_state::t0_t1_w)); soundcpu.serial_rx_cb().set_constant(0); // from MUART SPEAKER(config, "mono").front_center(); AY8910(config, m_aysnd, XTAL(12'000'000)/8); - m_aysnd->port_a_write_callback().set(FUNC(mephisto_pinball_state::ay8910_columns_w)); - m_aysnd->port_b_read_callback().set(FUNC(mephisto_pinball_state::ay8910_inputs_r)); + m_aysnd->port_a_write_callback().set(FUNC(mephisto_state::ay8910_columns_w)); + m_aysnd->port_b_read_callback().set(FUNC(mephisto_state::ay8910_inputs_r)); m_aysnd->add_route(ALL_OUTPUTS, "mono", 0.5); DAC08(config, "dac", 0).add_route(ALL_OUTPUTS, "mono", 0.5); } -void mephisto_pinball_state::sport2k(machine_config &config) +void mephisto_state::sport2k(machine_config &config) { mephisto(config); - m_maincpu->set_addrmap(AS_PROGRAM, &mephisto_pinball_state::sport2k_map); - subdevice("soundcpu")->set_addrmap(AS_IO, &mephisto_pinball_state::sport2k_8051_io); + m_maincpu->set_addrmap(AS_PROGRAM, &mephisto_state::sport2k_map); + subdevice("soundcpu")->set_addrmap(AS_IO, &mephisto_state::sport2k_8051_io); YM3812(config, "ymsnd", XTAL(14'318'181)/4).add_route(ALL_OUTPUTS, "mono", 0.5); } @@ -296,7 +295,7 @@ ROM_LOAD("s511_512.bin", 0x40000, 0x10000, CRC(ca9afa80) SHA1(6f219bdc1ad06e340b2930610897b70369a43684)) ROM_END -GAME(1987, mephistp, 0, mephisto, mephisto, mephisto_pinball_state, empty_init, ROT0, "Stargame", "Mephisto (Stargame) (rev. 1.2)", MACHINE_NOT_WORKING | MACHINE_MECHANICAL | MACHINE_IMPERFECT_SOUND) -GAME(1987, mephistp1, mephistp, mephisto, mephisto, mephisto_pinball_state, empty_init, ROT0, "Stargame", "Mephisto (Stargame) (rev. 1.1)", MACHINE_NOT_WORKING | MACHINE_MECHANICAL | MACHINE_IMPERFECT_SOUND) -GAME(1987, mephistpn, mephistp, mephisto, mephisto, mephisto_pinball_state, empty_init, ROT0, "Stargame", "Mephisto (Stargame) (newer?)", MACHINE_NOT_WORKING | MACHINE_MECHANICAL | MACHINE_IMPERFECT_SOUND) -GAME(1988, sport2k, 0, sport2k, mephisto, mephisto_pinball_state, empty_init, ROT0, "Cirsa", "Sport 2000", MACHINE_NOT_WORKING | MACHINE_MECHANICAL | MACHINE_NO_SOUND) +GAME(1987, mephistp, 0, mephisto, mephisto, mephisto_state, empty_init, ROT0, "Stargame", "Mephisto (Stargame) (rev. 1.2)", MACHINE_NOT_WORKING | MACHINE_MECHANICAL | MACHINE_IMPERFECT_SOUND) +GAME(1987, mephistp1, mephistp, mephisto, mephisto, mephisto_state, empty_init, ROT0, "Stargame", "Mephisto (Stargame) (rev. 1.1)", MACHINE_NOT_WORKING | MACHINE_MECHANICAL | MACHINE_IMPERFECT_SOUND) +GAME(1987, mephistpn, mephistp, mephisto, mephisto, mephisto_state, empty_init, ROT0, "Stargame", "Mephisto (Stargame) (newer?)", MACHINE_NOT_WORKING | MACHINE_MECHANICAL | MACHINE_IMPERFECT_SOUND) +GAME(1988, sport2k, 0, sport2k, mephisto, mephisto_state, empty_init, ROT0, "Cirsa", "Sport 2000", MACHINE_NOT_WORKING | MACHINE_MECHANICAL | MACHINE_NO_SOUND) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/meritum.cpp mame-0.231+dfsg.1/src/mame/drivers/meritum.cpp --- mame-0.230+dfsg.1/src/mame/drivers/meritum.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/meritum.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -38,15 +38,16 @@ Status: - Starts up, runs Basic. Cassette works. Quickload mostly works. - Some quickloads have corrupt text due to no lowercase. -- Some quickloads don't run at all. Some may crash the emulator. +- Some quickloads don't run at all. - Intel chips need adding, along with the peripherals they control. - A speaker has been included (which works), but real machine might not have - one at that address. To be checked. + one at that address. To be checked. - On meritum1, type SYSTEM then /12288 to enter the Monitor. - On meritum_net, type NET to activate the networking features. - Add Reset key and 2 blank keys. - Need software specific to test the hardware. - Need boot disks (MER-DOS, CP/M 2.2) +- Due to faster CPU clock, no TRS-80 cassettes can be loaded. For Model III: - Add 4-colour mode, 4 shades of grey mode, and 512x192 monochrome. @@ -341,20 +342,15 @@ d1, d0 Cassette output */ static const double levels[4] = { 0.0, 1.0, -1.0, 0.0 }; - static bool init = 0; // FIXME: static variable, breaks hard reset and multiple runs from system selection menu - m_cassette->change_state(BIT(data, 2) ? CASSETTE_MOTOR_ENABLED : CASSETTE_MOTOR_DISABLED, CASSETTE_MASK_MOTOR ); m_cassette->output(levels[data & 3]); m_cassette_data = false; m_mode = BIT(data, 3); - if (!init) - { - init = 1; - static double const speaker_levels[4] = { 0.0, -1.0, 0.0, 1.0 }; - m_speaker->set_levels(4, speaker_levels); - } + static double const speaker_levels[4] = { 0.0, -1.0, 0.0, 1.0 }; + m_speaker->set_levels(4, speaker_levels); + m_speaker->level_w(data & 3); // see note about the speaker } u8 meritum_state::keyboard_r(offs_t offset) @@ -406,9 +402,9 @@ { address_space &program = m_maincpu->space(AS_PROGRAM); - u8 type, length; - u8 data[0x100]; - u8 addr[2]; + uint8_t type, length; + uint8_t data[0x100]; + uint8_t addr[2]; void *ptr; while (!image.image_feof()) @@ -416,39 +412,49 @@ image.fread( &type, 1); image.fread( &length, 1); - length -= 2; - int block_length = length ? length : 256; - switch (type) { - case CMD_TYPE_OBJECT_CODE: + case CMD_TYPE_OBJECT_CODE: // 01 - block of data { + length -= 2; + u16 block_length = length ? length : 256; image.fread( &addr, 2); - uint16_t address = (addr[1] << 8) | addr[0]; + u16 address = (addr[1] << 8) | addr[0]; + logerror("/CMD object code block: address %04x length %u\n", address, block_length); + if (address < 0x3c00) + { + image.message("Attempting to write outside of RAM"); + return image_init_result::FAIL; + } ptr = program.get_write_ptr(address); image.fread( ptr, block_length); } break; - case CMD_TYPE_TRANSFER_ADDRESS: + case CMD_TYPE_TRANSFER_ADDRESS: // 02 - go address { image.fread( &addr, 2); - uint16_t address = (addr[1] << 8) | addr[0]; + u16 address = (addr[1] << 8) | addr[0]; + logerror("/CMD transfer address %04x\n", address); m_maincpu->set_state_int(Z80_PC, address); } - break; + return image_init_result::PASS; - case CMD_TYPE_LOAD_MODULE_HEADER: - image.fread( &data, block_length); + case CMD_TYPE_LOAD_MODULE_HEADER: // 05 - name + image.fread( &data, length); + logerror("/CMD load module header '%s'\n", data); break; - case CMD_TYPE_COPYRIGHT_BLOCK: - image.fread( &data, block_length); + case CMD_TYPE_COPYRIGHT_BLOCK: // 1F - copyright info + image.fread( &data, length); + logerror("/CMD copyright block '%s'\n", data); break; default: - image.fread( &data, block_length); + image.fread( &data, length); logerror("/CMD unsupported block type %u!\n", type); + image.message("Unsupported or invalid block type"); + return image_init_result::FAIL; } } @@ -521,9 +527,13 @@ // media CASSETTE(config, m_cassette); + m_cassette->set_default_state(CASSETTE_PLAY); m_cassette->add_route(ALL_OUTPUTS, "mono", 0.05); - QUICKLOAD(config, "quickload", "cmd", attotime::from_seconds(1)).set_load_callback(FUNC(meritum_state::quickload_cb)); + quickload_image_device &quickload(QUICKLOAD(config, "quickload", "cmd", attotime::from_seconds(1))); + quickload.set_load_callback(FUNC(meritum_state::quickload_cb)); + quickload.set_interface("trs80_quik"); + SOFTWARE_LIST(config, "quik_list").set_original("trs80_quik").set_filter("M"); } void meritum_state::meritum2(machine_config &config) @@ -546,45 +556,45 @@ ROM_START( meritum1 ) ROM_REGION(0x3800, "maincpu",0) - ROM_LOAD( "rom_0.bin", 0x0000, 0x0800, CRC(1ecf7205) SHA1(e91cedfe2ce7636d37d5b765e5bbc8168deaba77)) - ROM_LOAD( "rom_1.bin", 0x0800, 0x0800, CRC(ac297d99) SHA1(ccf31d3f9d02c3b68a0ee3be4984424df0e83ab0)) - ROM_LOAD( "rom_2.bin", 0x1000, 0x0800, CRC(a21d0d62) SHA1(6dfdf3806ed2b6502e09a1b6922f21494134cc05)) - ROM_LOAD( "rom_3.bin", 0x1800, 0x0800, CRC(3a5ea239) SHA1(8c489670977892d7f2bfb098f5df0b4dfa8fbba6)) - ROM_LOAD( "rom_4.bin", 0x2000, 0x0800, CRC(2ba025d7) SHA1(232efbe23c3f5c2c6655466ebc0a51cf3697be9b)) - ROM_LOAD( "rom_5.bin", 0x2800, 0x0800, CRC(ed547445) SHA1(20102de89a3ee4a65366bc2d62be94da984a156b)) - ROM_LOAD( "rom_6.bin", 0x3000, 0x0800, CRC(650c0f47) SHA1(05f67fed3c3f69ad210823460bacf40166cbf06e)) + ROM_LOAD( "rom_0.ic7", 0x0000, 0x0800, CRC(1ecf7205) SHA1(e91cedfe2ce7636d37d5b765e5bbc8168deaba77)) + ROM_LOAD( "rom_1.ic8", 0x0800, 0x0800, CRC(ac297d99) SHA1(ccf31d3f9d02c3b68a0ee3be4984424df0e83ab0)) + ROM_LOAD( "rom_2.ic9", 0x1000, 0x0800, CRC(a21d0d62) SHA1(6dfdf3806ed2b6502e09a1b6922f21494134cc05)) + ROM_LOAD( "rom_3.ic10", 0x1800, 0x0800, CRC(3a5ea239) SHA1(8c489670977892d7f2bfb098f5df0b4dfa8fbba6)) + ROM_LOAD( "rom_4.ic11", 0x2000, 0x0800, CRC(2ba025d7) SHA1(232efbe23c3f5c2c6655466ebc0a51cf3697be9b)) + ROM_LOAD( "rom_5.ic12", 0x2800, 0x0800, CRC(ed547445) SHA1(20102de89a3ee4a65366bc2d62be94da984a156b)) + ROM_LOAD( "rom_6.ic13", 0x3000, 0x0800, CRC(650c0f47) SHA1(05f67fed3c3f69ad210823460bacf40166cbf06e)) ROM_REGION(0x1000, "chargen", ROMREGION_INVERT) - ROM_LOAD( "char_gen.bin", 0x0000, 0x0400, CRC(626fb8b1) SHA1(1274d14efad46e5397bd9952e1277ebee44e0491)) + ROM_LOAD( "char_gen.ic72", 0x0000, 0x0400, CRC(626fb8b1) SHA1(1274d14efad46e5397bd9952e1277ebee44e0491)) ROM_CONTINUE( 0x0800, 0x0400) ROM_END ROM_START( meritum2) ROM_REGION(0x3800, "maincpu",0) - ROM_LOAD( "01.bin", 0x0000, 0x0800, CRC(ed705a47) SHA1(dae8b14eb2ddb2a8b4458215180ebc0fb781816a)) - ROM_LOAD( "02.bin", 0x0800, 0x0800, CRC(ac297d99) SHA1(ccf31d3f9d02c3b68a0ee3be4984424df0e83ab0)) - ROM_LOAD( "03.bin", 0x1000, 0x0800, CRC(a21d0d62) SHA1(6dfdf3806ed2b6502e09a1b6922f21494134cc05)) - ROM_LOAD( "04.bin", 0x1800, 0x0800, CRC(3610bdda) SHA1(602f0ba1e1267f24620f993acac019ac6342a594)) - ROM_LOAD( "05.bin", 0x2000, 0x0800, CRC(461fbf0d) SHA1(bd19187dd992168af43bd68055343d515f152624)) - ROM_LOAD( "06.bin", 0x2800, 0x0800, CRC(ed547445) SHA1(20102de89a3ee4a65366bc2d62be94da984a156b)) - ROM_LOAD( "07.bin", 0x3000, 0x0800, CRC(044b1459) SHA1(faace7353ffbef6587b1b9e7f8b312e0892e3427)) + ROM_LOAD( "01.ic7", 0x0000, 0x0800, CRC(ed705a47) SHA1(dae8b14eb2ddb2a8b4458215180ebc0fb781816a)) + ROM_LOAD( "02.ic8", 0x0800, 0x0800, CRC(ac297d99) SHA1(ccf31d3f9d02c3b68a0ee3be4984424df0e83ab0)) + ROM_LOAD( "03.ic9", 0x1000, 0x0800, CRC(a21d0d62) SHA1(6dfdf3806ed2b6502e09a1b6922f21494134cc05)) + ROM_LOAD( "04.ic10", 0x1800, 0x0800, CRC(3610bdda) SHA1(602f0ba1e1267f24620f993acac019ac6342a594)) + ROM_LOAD( "05.ic11", 0x2000, 0x0800, CRC(461fbf0d) SHA1(bd19187dd992168af43bd68055343d515f152624)) + ROM_LOAD( "06.ic12", 0x2800, 0x0800, CRC(ed547445) SHA1(20102de89a3ee4a65366bc2d62be94da984a156b)) + ROM_LOAD( "07.ic13", 0x3000, 0x0800, CRC(044b1459) SHA1(faace7353ffbef6587b1b9e7f8b312e0892e3427)) ROM_REGION(0x1000, "chargen", ROMREGION_INVERT) - ROM_LOAD( "chargen.bin", 0x0000, 0x1000, CRC(3dfc6439) SHA1(6e45a27f68c3491c403b4eafe45a108f348dd2fd)) + ROM_LOAD( "chargen.ic72", 0x0000, 0x1000, CRC(3dfc6439) SHA1(6e45a27f68c3491c403b4eafe45a108f348dd2fd)) ROM_END ROM_START( meritum_net ) ROM_REGION(0x3800, "maincpu",0) - ROM_LOAD( "01_447_m07_015m.bin", 0x0000, 0x0800, CRC(6d30cb49) SHA1(558241340a84eebcbbf8d92540e028e9164b6f8a)) - ROM_LOAD( "02_440_m08_01.bin", 0x0800, 0x0800, CRC(ac297d99) SHA1(ccf31d3f9d02c3b68a0ee3be4984424df0e83ab0)) - ROM_LOAD( "03_440_m09_015m.bin", 0x1000, 0x0800, CRC(88e267da) SHA1(9cb8626801f8e969f35291de43c1b643c809a3c3)) - ROM_LOAD( "04_447_m10_015m.bin", 0x1800, 0x0800, CRC(e51991e4) SHA1(a7d42436da1af405970f9f99ab34b6d9abd05adf)) - ROM_LOAD( "05_440_m11_02.bin", 0x2000, 0x0800, CRC(461fbf0d) SHA1(bd19187dd992168af43bd68055343d515f152624)) - ROM_LOAD( "06_440_m12_01.bin", 0x2800, 0x0800, CRC(ed547445) SHA1(20102de89a3ee4a65366bc2d62be94da984a156b)) - ROM_LOAD( "07_447_m13_015m.bin", 0x3000, 0x0800, CRC(789f6964) SHA1(9b2231ca7ffd82bbca1f53988a7df833290ddbf2)) + ROM_LOAD( "01_447_m07_015m.ic7", 0x0000, 0x0800, CRC(6d30cb49) SHA1(558241340a84eebcbbf8d92540e028e9164b6f8a)) + ROM_LOAD( "02_440_m08_01.ic8", 0x0800, 0x0800, CRC(ac297d99) SHA1(ccf31d3f9d02c3b68a0ee3be4984424df0e83ab0)) + ROM_LOAD( "03_440_m09_015m.ic9", 0x1000, 0x0800, CRC(88e267da) SHA1(9cb8626801f8e969f35291de43c1b643c809a3c3)) + ROM_LOAD( "04_447_m10_015m.ic10", 0x1800, 0x0800, CRC(e51991e4) SHA1(a7d42436da1af405970f9f99ab34b6d9abd05adf)) + ROM_LOAD( "05_440_m11_02.ic11", 0x2000, 0x0800, CRC(461fbf0d) SHA1(bd19187dd992168af43bd68055343d515f152624)) + ROM_LOAD( "06_440_m12_01.ic12", 0x2800, 0x0800, CRC(ed547445) SHA1(20102de89a3ee4a65366bc2d62be94da984a156b)) + ROM_LOAD( "07_447_m13_015m.ic13", 0x3000, 0x0800, CRC(789f6964) SHA1(9b2231ca7ffd82bbca1f53988a7df833290ddbf2)) ROM_REGION(0x1000, "chargen", ROMREGION_INVERT) - ROM_LOAD( "char.bin", 0x0000, 0x1000, CRC(2c09a5a7) SHA1(146891b3ddfc2de95e6a5371536394a657880054)) + ROM_LOAD( "char.ic72", 0x0000, 0x1000, CRC(2c09a5a7) SHA1(146891b3ddfc2de95e6a5371536394a657880054)) ROM_END diff -Nru mame-0.230+dfsg.1/src/mame/drivers/metlclsh.cpp mame-0.231+dfsg.1/src/mame/drivers/metlclsh.cpp --- mame-0.230+dfsg.1/src/mame/drivers/metlclsh.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/metlclsh.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -37,8 +37,8 @@ #include "includes/metlclsh.h" #include "cpu/m6809/m6809.h" -#include "sound/3526intf.h" #include "sound/ym2203.h" +#include "sound/ym3526.h" #include "screen.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/midtunit.cpp mame-0.231+dfsg.1/src/mame/drivers/midtunit.cpp --- mame-0.230+dfsg.1/src/mame/drivers/midtunit.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/midtunit.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -432,24 +432,24 @@ PORT_START("DSW") /* DS1 */ PORT_DIPNAME( 0x0001, 0x0001, "Test Switch" ) - PORT_DIPSETTING( 0x0001, DEF_STR( Off )) - PORT_DIPSETTING( 0x0000, DEF_STR( On )) + PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) PORT_DIPNAME( 0x0002, 0x0000, "Powerup Test" ) - PORT_DIPSETTING( 0x0000, DEF_STR( Off )) - PORT_DIPSETTING( 0x0002, DEF_STR( On )) - PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unused )) - PORT_DIPSETTING( 0x0004, DEF_STR( Off )) - PORT_DIPSETTING( 0x0000, DEF_STR( On )) - PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unused )) - PORT_DIPSETTING( 0x0008, DEF_STR( Off )) - PORT_DIPSETTING( 0x0000, DEF_STR( On )) - PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unused )) - PORT_DIPSETTING( 0x0010, DEF_STR( Off )) - PORT_DIPSETTING( 0x0000, DEF_STR( On )) - PORT_DIPNAME( 0x0020, 0x0020, "Video" ) - PORT_DIPSETTING( 0x0000, "Skip" ) - PORT_DIPSETTING( 0x0020, "Show" ) - PORT_DIPNAME( 0x0040, 0x0040, "Validator" ) + PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0002, DEF_STR( On ) ) + PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unused ) ) + PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unused ) ) + PORT_DIPSETTING( 0x0008, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unused ) ) + PORT_DIPSETTING( 0x0010, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0020, 0x0020, "Video Clips" ) + PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0020, DEF_STR( On ) ) + PORT_DIPNAME( 0x0040, 0x0040, "Dollar Bill Validator" ) PORT_DIPSETTING( 0x0000, "Installed" ) PORT_DIPSETTING( 0x0040, "Not Present" ) PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Players ) ) @@ -464,16 +464,16 @@ PORT_DIPSETTING( 0x0c00, DEF_STR( USA ) ) PORT_DIPSETTING( 0x0800, DEF_STR( French ) ) PORT_DIPSETTING( 0x0400, DEF_STR( German ) ) -// PORT_DIPSETTING( 0x0000, DEF_STR( Unused )) - PORT_DIPNAME( 0x7000, 0x7000, DEF_STR( Coinage )) +// PORT_DIPSETTING( 0x0000, DEF_STR( Unused ) ) + PORT_DIPNAME( 0x7000, 0x7000, DEF_STR( Coinage ) ) PORT_DIPSETTING( 0x7000, "1" ) PORT_DIPSETTING( 0x3000, "2" ) PORT_DIPSETTING( 0x5000, "3" ) PORT_DIPSETTING( 0x1000, "4" ) PORT_DIPSETTING( 0x6000, "ECA" ) -// PORT_DIPSETTING( 0x4000, DEF_STR( Unused )) -// PORT_DIPSETTING( 0x2000, DEF_STR( Unused )) - PORT_DIPSETTING( 0x0000, DEF_STR( Free_Play )) +// PORT_DIPSETTING( 0x4000, DEF_STR( Unused ) ) +// PORT_DIPSETTING( 0x2000, DEF_STR( Unused ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( Free_Play ) ) PORT_DIPNAME( 0x8000, 0x0000, "Coinage Source" ) PORT_DIPSETTING( 0x8000, "Dipswitch" ) PORT_DIPSETTING( 0x0000, "CMOS" ) @@ -535,24 +535,24 @@ PORT_START("DSW")/* DS1 */ PORT_DIPNAME( 0x0001, 0x0001, "Test Switch" ) - PORT_DIPSETTING( 0x0001, DEF_STR( Off )) - PORT_DIPSETTING( 0x0000, DEF_STR( On )) + PORT_DIPSETTING( 0x0001, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) PORT_DIPNAME( 0x0002, 0x0000, "Powerup Test" ) - PORT_DIPSETTING( 0x0000, DEF_STR( Off )) - PORT_DIPSETTING( 0x0002, DEF_STR( On )) - PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unused )) - PORT_DIPSETTING( 0x0004, DEF_STR( Off )) - PORT_DIPSETTING( 0x0000, DEF_STR( On )) - PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unused )) - PORT_DIPSETTING( 0x0008, DEF_STR( Off )) - PORT_DIPSETTING( 0x0000, DEF_STR( On )) - PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unused )) - PORT_DIPSETTING( 0x0010, DEF_STR( Off )) - PORT_DIPSETTING( 0x0000, DEF_STR( On )) - PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unused )) - PORT_DIPSETTING( 0x0000, DEF_STR( Off )) - PORT_DIPSETTING( 0x0020, DEF_STR( On )) - PORT_DIPNAME( 0x0040, 0x0040, "Validator" ) + PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0002, DEF_STR( On ) ) + PORT_DIPNAME( 0x0004, 0x0004, DEF_STR( Unused ) ) + PORT_DIPSETTING( 0x0004, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Unused ) ) + PORT_DIPSETTING( 0x0008, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0010, 0x0010, DEF_STR( Unused ) ) + PORT_DIPSETTING( 0x0010, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) + PORT_DIPNAME( 0x0020, 0x0020, DEF_STR( Unused ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x0020, DEF_STR( On ) ) + PORT_DIPNAME( 0x0040, 0x0040, "Dollar Bill Validator" ) PORT_DIPSETTING( 0x0000, "Installed" ) PORT_DIPSETTING( 0x0040, "Not Present" ) PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Players ) ) @@ -567,16 +567,16 @@ PORT_DIPSETTING( 0x0c00, DEF_STR( USA ) ) PORT_DIPSETTING( 0x0800, DEF_STR( French ) ) PORT_DIPSETTING( 0x0400, DEF_STR( German ) ) -// PORT_DIPSETTING( 0x0000, DEF_STR( Unused )) - PORT_DIPNAME( 0x7000, 0x7000, DEF_STR( Coinage )) +// PORT_DIPSETTING( 0x0000, DEF_STR( Unused ) ) + PORT_DIPNAME( 0x7000, 0x7000, DEF_STR( Coinage ) ) PORT_DIPSETTING( 0x7000, "1" ) PORT_DIPSETTING( 0x3000, "2" ) PORT_DIPSETTING( 0x5000, "3" ) PORT_DIPSETTING( 0x1000, "4" ) PORT_DIPSETTING( 0x6000, "ECA" ) -// PORT_DIPSETTING( 0x4000, DEF_STR( Unused )) -// PORT_DIPSETTING( 0x2000, DEF_STR( Unused )) - PORT_DIPSETTING( 0x0000, DEF_STR( Free_Play )) +// PORT_DIPSETTING( 0x4000, DEF_STR( Unused ) ) +// PORT_DIPSETTING( 0x2000, DEF_STR( Unused ) ) + PORT_DIPSETTING( 0x0000, DEF_STR( Free_Play ) ) PORT_DIPNAME( 0x8000, 0x0000, "Coinage Source" ) PORT_DIPSETTING( 0x8000, "Dipswitch" ) PORT_DIPSETTING( 0x0000, "CMOS" ) @@ -1310,8 +1310,44 @@ ROM_LOAD( "l1_nba_jam_tournament_u13_sound_rom.u13", 0x080000, 0x80000, CRC(6f27b202) SHA1(c1f0db15624d1e7102ce9fd1db49ccf86e8611d6) ) ROM_REGION16_LE( 0x100000, "maincpu", 0 ) /* 34010 code */ - ROM_LOAD16_BYTE( "l4_nba_jam_tournament_game_rom_uj12.uj12", 0x00000, 0x80000, CRC(d7c21bc4) SHA1(e05f0299b955500df6a08b1c0b24b932a9cdfa6a) ) - ROM_LOAD16_BYTE( "l4_nba_jam_tournament_game_rom_ug12.ug12", 0x00001, 0x80000, CRC(7ad49229) SHA1(e9ceedb0e620809d8a4d42087d806aa296a4cd59) ) + ROM_LOAD16_BYTE( "l4_nba_jam_tournament_game_rom_uj12.uj12", 0x00000, 0x80000, CRC(d7c21bc4) SHA1(e05f0299b955500df6a08b1c0b24b932a9cdfa6a) ) // sldh - rev 4.0 3/23/94 + ROM_LOAD16_BYTE( "l4_nba_jam_tournament_game_rom_ug12.ug12", 0x00001, 0x80000, CRC(7ad49229) SHA1(e9ceedb0e620809d8a4d42087d806aa296a4cd59) ) // sldh - rev 4.0 3/23/94 + + ROM_REGION( 0xc00000, "gfxrom", 0 ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug14.ug14", 0x000000, 0x80000, CRC(04bb9f64) SHA1(9e1a8c37e14cb6fe67f4aa3caa9022f356f1ca64) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj14.uj14", 0x000001, 0x80000, CRC(b34b7af3) SHA1(0abb74d2f414bc9da0380a81beb134f3a87c1a0a) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug19.ug19", 0x000002, 0x80000, CRC(a8f22fbb) SHA1(514208a9d6d0c8c2d7847cc02d4387eac90be659) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj19.uj19", 0x000003, 0x80000, CRC(8130a8a2) SHA1(f23f124024285d07d8cf822817b62e42c38b82db) ) + + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug16.ug16", 0x200000, 0x80000, CRC(c7ce74d0) SHA1(93861cd909e0f28ed112096d6f9fc57d0d31c57c) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj16.uj16", 0x200001, 0x80000, CRC(905ad88b) SHA1(24c336ccc0e2ac0ee96a34ad6fe4aa7464de0009) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug20.ug20", 0x200002, 0x80000, CRC(8a48728c) SHA1(3684099b4934b027336c319c77d9e0710b8c22dc) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj20.uj20", 0x200003, 0x80000, CRC(bf263d61) SHA1(b5b59e8df55f8030eff068c1d8b07dad8521bf5d) ) + + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug17.ug17", 0x400000, 0x80000, CRC(9401be62) SHA1(597413a8a1eb66a7ad89af2f548fa3062e5e8efb) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj17.uj17", 0x400001, 0x80000, CRC(8a852b9e) SHA1(604c7f4305887e9505320630027765ea76607c58) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug22.ug22", 0x400002, 0x80000, CRC(3b05133b) SHA1(f6067abb92b8751afe7352a4f1b1a22c9528002b) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj22.uj22", 0x400003, 0x80000, CRC(39791051) SHA1(7aa02500ddacd31fca04044a22a38f36452ca300) ) + + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug18.ug18", 0x600000, 0x80000, CRC(6fd08f57) SHA1(5b7031dffc88374c5bfdf3021aa01ec4e28d0631) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj18.uj18", 0x600001, 0x80000, CRC(4eb73c26) SHA1(693bf45f777da8e55b7bcd8699ea5bd711964941) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug23.ug23", 0x600002, 0x80000, CRC(854f73bc) SHA1(242cc8ce28711f6f0787524a1070eb4b0956e6ae) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj23.uj23", 0x600003, 0x80000, CRC(f8c30998) SHA1(33e2f982d74e9f3686b1f4a8172c49fb8b604cf5) ) +ROM_END + + +ROM_START( nbajamte4 ) + ROM_REGION( 0x50000, "adpcm:cpu", 0 ) /* sound CPU */ + ROM_LOAD( "l1_nba_jam_tournament_u3_sound_rom.u3", 0x010000, 0x20000, CRC(d4551195) SHA1(e8908fbe4339fb8c93f7e74113dfd25dda1667ea) ) + ROM_RELOAD( 0x030000, 0x20000 ) + + ROM_REGION( 0x100000, "adpcm:oki", 0 ) /* ADPCM */ + ROM_LOAD( "l1_nba_jam_tournament_u12_sound_rom.u12", 0x000000, 0x80000, CRC(4fac97bc) SHA1(bd88d8c3edab0e35ad9f9350bcbaa17cda61d87a) ) + ROM_LOAD( "l1_nba_jam_tournament_u13_sound_rom.u13", 0x080000, 0x80000, CRC(6f27b202) SHA1(c1f0db15624d1e7102ce9fd1db49ccf86e8611d6) ) + + ROM_REGION16_LE( 0x100000, "maincpu", 0 ) /* 34010 code */ + ROM_LOAD16_BYTE( "l4_nba_jam_tournament_game_rom_uj12.uj12", 0x00000, 0x80000, CRC(f94074f8) SHA1(0d669a38f33b000ec12352ae15ebdd7849b6ad50) ) // sldh - rev 4.0 3/03/94 + ROM_LOAD16_BYTE( "l4_nba_jam_tournament_game_rom_ug12.ug12", 0x00001, 0x80000, CRC(2c55890b) SHA1(839492d50474a54a434090a5f06548963773aec7) ) // sldh - rev 4.0 3/03/94 ROM_REGION( 0xc00000, "gfxrom", 0 ) ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug14.ug14", 0x000000, 0x80000, CRC(04bb9f64) SHA1(9e1a8c37e14cb6fe67f4aa3caa9022f356f1ca64) ) @@ -1346,8 +1382,44 @@ ROM_LOAD( "l1_nba_jam_tournament_u13_sound_rom.u13", 0x080000, 0x80000, CRC(6f27b202) SHA1(c1f0db15624d1e7102ce9fd1db49ccf86e8611d6) ) ROM_REGION16_LE( 0x100000, "maincpu", 0 ) /* 34010 code */ - ROM_LOAD16_BYTE( "l3_nba_jam_tournament_game_rom_uj12.uj12", 0x00000, 0x80000, CRC(8fdf77b4) SHA1(1a8a178b19d0b8e7a5fd2ddf373a4279321440d0) ) - ROM_LOAD16_BYTE( "l3_nba_jam_tournament_game_rom_ug12.ug12", 0x00001, 0x80000, CRC(656579ed) SHA1(b038fdc814ebc8d203724fdb2f7501d40f1dc21f) ) + ROM_LOAD16_BYTE( "l3_nba_jam_tournament_game_rom_uj12.uj12", 0x00000, 0x80000, CRC(8fdf77b4) SHA1(1a8a178b19d0b8e7a5fd2ddf373a4279321440d0) ) // sldh - rev 3.0 3/04/94 + ROM_LOAD16_BYTE( "l3_nba_jam_tournament_game_rom_ug12.ug12", 0x00001, 0x80000, CRC(656579ed) SHA1(b038fdc814ebc8d203724fdb2f7501d40f1dc21f) ) // sldh - rev 3.0 3/04/94 + + ROM_REGION( 0xc00000, "gfxrom", 0 ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug14.ug14", 0x000000, 0x80000, CRC(04bb9f64) SHA1(9e1a8c37e14cb6fe67f4aa3caa9022f356f1ca64) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj14.uj14", 0x000001, 0x80000, CRC(b34b7af3) SHA1(0abb74d2f414bc9da0380a81beb134f3a87c1a0a) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug19.ug19", 0x000002, 0x80000, CRC(a8f22fbb) SHA1(514208a9d6d0c8c2d7847cc02d4387eac90be659) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj19.uj19", 0x000003, 0x80000, CRC(8130a8a2) SHA1(f23f124024285d07d8cf822817b62e42c38b82db) ) + + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug16.ug16", 0x200000, 0x80000, CRC(c7ce74d0) SHA1(93861cd909e0f28ed112096d6f9fc57d0d31c57c) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj16.uj16", 0x200001, 0x80000, CRC(905ad88b) SHA1(24c336ccc0e2ac0ee96a34ad6fe4aa7464de0009) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug20.ug20", 0x200002, 0x80000, CRC(8a48728c) SHA1(3684099b4934b027336c319c77d9e0710b8c22dc) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj20.uj20", 0x200003, 0x80000, CRC(bf263d61) SHA1(b5b59e8df55f8030eff068c1d8b07dad8521bf5d) ) + + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug17.ug17", 0x400000, 0x80000, CRC(9401be62) SHA1(597413a8a1eb66a7ad89af2f548fa3062e5e8efb) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj17.uj17", 0x400001, 0x80000, CRC(8a852b9e) SHA1(604c7f4305887e9505320630027765ea76607c58) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug22.ug22", 0x400002, 0x80000, CRC(3b05133b) SHA1(f6067abb92b8751afe7352a4f1b1a22c9528002b) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj22.uj22", 0x400003, 0x80000, CRC(39791051) SHA1(7aa02500ddacd31fca04044a22a38f36452ca300) ) + + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug18.ug18", 0x600000, 0x80000, CRC(6fd08f57) SHA1(5b7031dffc88374c5bfdf3021aa01ec4e28d0631) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj18.uj18", 0x600001, 0x80000, CRC(4eb73c26) SHA1(693bf45f777da8e55b7bcd8699ea5bd711964941) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug23.ug23", 0x600002, 0x80000, CRC(854f73bc) SHA1(242cc8ce28711f6f0787524a1070eb4b0956e6ae) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj23.uj23", 0x600003, 0x80000, CRC(f8c30998) SHA1(33e2f982d74e9f3686b1f4a8172c49fb8b604cf5) ) +ROM_END + + +ROM_START( nbajamte3a ) + ROM_REGION( 0x50000, "adpcm:cpu", 0 ) /* sound CPU */ + ROM_LOAD( "l1_nba_jam_tournament_u3_sound_rom.u3", 0x010000, 0x20000, CRC(d4551195) SHA1(e8908fbe4339fb8c93f7e74113dfd25dda1667ea) ) + ROM_RELOAD( 0x030000, 0x20000 ) + + ROM_REGION( 0x100000, "adpcm:oki", 0 ) /* ADPCM */ + ROM_LOAD( "l1_nba_jam_tournament_u12_sound_rom.u12", 0x000000, 0x80000, CRC(4fac97bc) SHA1(bd88d8c3edab0e35ad9f9350bcbaa17cda61d87a) ) + ROM_LOAD( "l1_nba_jam_tournament_u13_sound_rom.u13", 0x080000, 0x80000, CRC(6f27b202) SHA1(c1f0db15624d1e7102ce9fd1db49ccf86e8611d6) ) + + ROM_REGION16_LE( 0x100000, "maincpu", 0 ) /* 34010 code */ + ROM_LOAD16_BYTE( "l3_nba_jam_tournament_game_rom_uj12.uj12", 0x00000, 0x80000, CRC(83f03079) SHA1(2aa95339edb8b50b38f0842c960ca2adee4db5dd) ) // sldh - rev 3.0 2/26/94 + ROM_LOAD16_BYTE( "l3_nba_jam_tournament_game_rom_ug12.ug12", 0x00001, 0x80000, CRC(121ccb3a) SHA1(c5e76f34b222f33e7af957bd57b45d30f43cb012) ) // sldh - rev 3.0 2/26/94 ROM_REGION( 0xc00000, "gfxrom", 0 ) ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug14.ug14", 0x000000, 0x80000, CRC(04bb9f64) SHA1(9e1a8c37e14cb6fe67f4aa3caa9022f356f1ca64) ) @@ -1382,6 +1454,42 @@ ROM_LOAD( "l1_nba_jam_tournament_u13_sound_rom.u13", 0x080000, 0x80000, CRC(6f27b202) SHA1(c1f0db15624d1e7102ce9fd1db49ccf86e8611d6) ) ROM_REGION16_LE( 0x100000, "maincpu", 0 ) /* 34010 code */ + ROM_LOAD16_BYTE( "l2.1_nba_jam_tournament_game_rom_uj12.uj12", 0x00000, 0x80000, CRC(d009aa29) SHA1(2f9317d3f89488a3593637a37eea4ac68dd1067b) ) + ROM_LOAD16_BYTE( "l2.1_nba_jam_tournament_game_rom_ug12.ug12", 0x00001, 0x80000, CRC(6c3bfb6a) SHA1(e05cbe33661fb37a929c6a75d9e0f3469cc81d2d) ) + + ROM_REGION( 0xc00000, "gfxrom", 0 ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug14.ug14", 0x000000, 0x80000, CRC(04bb9f64) SHA1(9e1a8c37e14cb6fe67f4aa3caa9022f356f1ca64) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj14.uj14", 0x000001, 0x80000, CRC(b34b7af3) SHA1(0abb74d2f414bc9da0380a81beb134f3a87c1a0a) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug19.ug19", 0x000002, 0x80000, CRC(a8f22fbb) SHA1(514208a9d6d0c8c2d7847cc02d4387eac90be659) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj19.uj19", 0x000003, 0x80000, CRC(8130a8a2) SHA1(f23f124024285d07d8cf822817b62e42c38b82db) ) + + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug16.ug16", 0x200000, 0x80000, CRC(c7ce74d0) SHA1(93861cd909e0f28ed112096d6f9fc57d0d31c57c) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj16.uj16", 0x200001, 0x80000, CRC(905ad88b) SHA1(24c336ccc0e2ac0ee96a34ad6fe4aa7464de0009) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug20.ug20", 0x200002, 0x80000, CRC(8a48728c) SHA1(3684099b4934b027336c319c77d9e0710b8c22dc) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj20.uj20", 0x200003, 0x80000, CRC(bf263d61) SHA1(b5b59e8df55f8030eff068c1d8b07dad8521bf5d) ) + + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug17.ug17", 0x400000, 0x80000, CRC(9401be62) SHA1(597413a8a1eb66a7ad89af2f548fa3062e5e8efb) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj17.uj17", 0x400001, 0x80000, CRC(8a852b9e) SHA1(604c7f4305887e9505320630027765ea76607c58) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug22.ug22", 0x400002, 0x80000, CRC(3b05133b) SHA1(f6067abb92b8751afe7352a4f1b1a22c9528002b) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj22.uj22", 0x400003, 0x80000, CRC(39791051) SHA1(7aa02500ddacd31fca04044a22a38f36452ca300) ) + + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug18.ug18", 0x600000, 0x80000, CRC(6fd08f57) SHA1(5b7031dffc88374c5bfdf3021aa01ec4e28d0631) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj18.uj18", 0x600001, 0x80000, CRC(4eb73c26) SHA1(693bf45f777da8e55b7bcd8699ea5bd711964941) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_ug23.ug23", 0x600002, 0x80000, CRC(854f73bc) SHA1(242cc8ce28711f6f0787524a1070eb4b0956e6ae) ) + ROM_LOAD32_BYTE( "l1_nba_jam_tournament_game_rom_uj23.uj23", 0x600003, 0x80000, CRC(f8c30998) SHA1(33e2f982d74e9f3686b1f4a8172c49fb8b604cf5) ) +ROM_END + + +ROM_START( nbajamte2a ) + ROM_REGION( 0x50000, "adpcm:cpu", 0 ) /* sound CPU */ + ROM_LOAD( "l1_nba_jam_tournament_u3_sound_rom.u3", 0x010000, 0x20000, CRC(d4551195) SHA1(e8908fbe4339fb8c93f7e74113dfd25dda1667ea) ) + ROM_RELOAD( 0x030000, 0x20000 ) + + ROM_REGION( 0x100000, "adpcm:oki", 0 ) /* ADPCM */ + ROM_LOAD( "l1_nba_jam_tournament_u12_sound_rom.u12", 0x000000, 0x80000, CRC(4fac97bc) SHA1(bd88d8c3edab0e35ad9f9350bcbaa17cda61d87a) ) + ROM_LOAD( "l1_nba_jam_tournament_u13_sound_rom.u13", 0x080000, 0x80000, CRC(6f27b202) SHA1(c1f0db15624d1e7102ce9fd1db49ccf86e8611d6) ) + + ROM_REGION16_LE( 0x100000, "maincpu", 0 ) /* 34010 code */ ROM_LOAD16_BYTE( "l2_nba_jam_tournament_game_rom_uj12.uj12", 0x00000, 0x80000, CRC(eaa6fb32) SHA1(8c8c0c6ace2b98679d7fe90e1f9284bdf0e14eaf) ) ROM_LOAD16_BYTE( "l2_nba_jam_tournament_game_rom_ug12.ug12", 0x00001, 0x80000, CRC(5a694d9a) SHA1(fb74e4242d9adba03f24a81451ea06e8d9b4af96) ) @@ -1523,30 +1631,33 @@ * *************************************/ -GAME( 1992, mk, 0, tunit_adpcm, mk, midtunit_state, init_mktunit, ROT0, "Midway", "Mortal Kombat (rev 5.0 T-Unit 03/19/93)", MACHINE_SUPPORTS_SAVE ) -GAME( 1992, mkr4, mk, tunit_adpcm, mk, midtunit_state, init_mktunit, ROT0, "Midway", "Mortal Kombat (rev 4.0 T-Unit 02/11/93)", MACHINE_SUPPORTS_SAVE ) -GAME( 1992, mktturbo, mk, tunit_adpcm, mk, midtunit_state, init_mkturbo, ROT0, "hack", "Mortal Kombat (Turbo Ninja T-Unit 03/19/93, hack)", MACHINE_SUPPORTS_SAVE ) - -GAME( 1993, mk2, 0, tunit_dcs, mk2, midtunit_state, init_mk2, ROT0, "Midway", "Mortal Kombat II (rev L3.1)", MACHINE_SUPPORTS_SAVE ) -GAME( 1993, mk2r32e, mk2, tunit_dcs, mk2, midtunit_state, init_mk2, ROT0, "Midway", "Mortal Kombat II (rev L3.2, European)", MACHINE_SUPPORTS_SAVE ) -GAME( 1993, mk2r31e, mk2, tunit_dcs, mk2, midtunit_state, init_mk2, ROT0, "Midway", "Mortal Kombat II (rev L3.1, European)", MACHINE_SUPPORTS_SAVE ) -GAME( 1993, mk2r30, mk2, tunit_dcs, mk2, midtunit_state, init_mk2, ROT0, "Midway", "Mortal Kombat II (rev L3.0)", MACHINE_SUPPORTS_SAVE ) -GAME( 1993, mk2r21, mk2, tunit_dcs, mk2, midtunit_state, init_mk2, ROT0, "Midway", "Mortal Kombat II (rev L2.1)", MACHINE_SUPPORTS_SAVE ) -GAME( 1993, mk2r20, mk2, tunit_dcs, mk2, midtunit_state, init_mk2, ROT0, "Midway", "Mortal Kombat II (rev L2.0)", MACHINE_SUPPORTS_SAVE ) -GAME( 1993, mk2r14, mk2, tunit_dcs, mk2, midtunit_state, init_mk2, ROT0, "Midway", "Mortal Kombat II (rev L1.4)", MACHINE_SUPPORTS_SAVE ) -GAME( 1993, mk2r11, mk2, tunit_dcs, mk2, midtunit_state, init_mk2, ROT0, "Midway", "Mortal Kombat II (rev L1.1)", MACHINE_SUPPORTS_SAVE ) -GAME( 1993, mk2r42, mk2, tunit_dcs, mk2, midtunit_state, init_mk2, ROT0, "hack", "Mortal Kombat II (rev L4.2, hack)", MACHINE_SUPPORTS_SAVE ) -GAME( 1993, mk2r91, mk2, tunit_dcs, mk2, midtunit_state, init_mk2, ROT0, "hack", "Mortal Kombat II (rev L9.1, hack)", MACHINE_SUPPORTS_SAVE ) -GAME( 1993, mk2chal, mk2, tunit_dcs, mk2, midtunit_state, init_mk2, ROT0, "hack", "Mortal Kombat II Challenger (hack)", MACHINE_SUPPORTS_SAVE ) - -GAME( 1993, jdreddp, 0, tunit_adpcm, jdreddp, midtunit_state, init_jdreddp, ROT0, "Midway", "Judge Dredd (rev TA1 7/12/92, location test)", MACHINE_SUPPORTS_SAVE ) - -GAME( 1993, nbajam, 0, tunit_adpcm, nbajam, midtunit_state, init_nbajam, ROT0, "Midway", "NBA Jam (rev 3.01 04/07/93)", MACHINE_SUPPORTS_SAVE ) -GAME( 1993, nbajamr2, nbajam, tunit_adpcm, nbajam, midtunit_state, init_nbajam, ROT0, "Midway", "NBA Jam (rev 2.00 02/10/93)", MACHINE_SUPPORTS_SAVE ) -GAME( 1993, nbajamr1, nbajam, tunit_adpcm, nbajam, midtunit_state, init_nbajam, ROT0, "Midway", "NBA Jam (rev 1.00 02/1/93)", MACHINE_SUPPORTS_SAVE ) - -GAME( 1994, nbajamte, 0, tunit_adpcm, nbajamte, midtunit_state, init_nbajamte, ROT0, "Midway", "NBA Jam TE (rev 4.0 03/23/94)", MACHINE_SUPPORTS_SAVE ) -GAME( 1994, nbajamte3, nbajamte, tunit_adpcm, nbajamte, midtunit_state, init_nbajamte, ROT0, "Midway", "NBA Jam TE (rev 3.0 03/04/94)", MACHINE_SUPPORTS_SAVE ) -GAME( 1994, nbajamte2, nbajamte, tunit_adpcm, nbajamte, midtunit_state, init_nbajamte, ROT0, "Midway", "NBA Jam TE (rev 2.0 01/28/94)", MACHINE_SUPPORTS_SAVE ) -GAME( 1994, nbajamte1, nbajamte, tunit_adpcm, nbajamte, midtunit_state, init_nbajamte, ROT0, "Midway", "NBA Jam TE (rev 1.0 01/17/94)", MACHINE_SUPPORTS_SAVE ) -GAME( 1995, nbajamten, nbajamte, tunit_adpcm, nbajamte, midtunit_state, init_nbajamte, ROT0, "Midway", "NBA Jam T.E. Nani Edition (rev 5.2 8/11/95, prototype)", MACHINE_SUPPORTS_SAVE ) +GAME( 1992, mk, 0, tunit_adpcm, mk, midtunit_state, init_mktunit, ROT0, "Midway", "Mortal Kombat (rev 5.0 T-Unit 03/19/93)", MACHINE_SUPPORTS_SAVE ) +GAME( 1992, mkr4, mk, tunit_adpcm, mk, midtunit_state, init_mktunit, ROT0, "Midway", "Mortal Kombat (rev 4.0 T-Unit 02/11/93)", MACHINE_SUPPORTS_SAVE ) +GAME( 1992, mktturbo, mk, tunit_adpcm, mk, midtunit_state, init_mkturbo, ROT0, "hack", "Mortal Kombat (Turbo Ninja T-Unit 03/19/93, hack)", MACHINE_SUPPORTS_SAVE ) + +GAME( 1993, mk2, 0, tunit_dcs, mk2, midtunit_state, init_mk2, ROT0, "Midway", "Mortal Kombat II (rev L3.1)", MACHINE_SUPPORTS_SAVE ) +GAME( 1993, mk2r32e, mk2, tunit_dcs, mk2, midtunit_state, init_mk2, ROT0, "Midway", "Mortal Kombat II (rev L3.2, European)", MACHINE_SUPPORTS_SAVE ) +GAME( 1993, mk2r31e, mk2, tunit_dcs, mk2, midtunit_state, init_mk2, ROT0, "Midway", "Mortal Kombat II (rev L3.1, European)", MACHINE_SUPPORTS_SAVE ) +GAME( 1993, mk2r30, mk2, tunit_dcs, mk2, midtunit_state, init_mk2, ROT0, "Midway", "Mortal Kombat II (rev L3.0)", MACHINE_SUPPORTS_SAVE ) +GAME( 1993, mk2r21, mk2, tunit_dcs, mk2, midtunit_state, init_mk2, ROT0, "Midway", "Mortal Kombat II (rev L2.1)", MACHINE_SUPPORTS_SAVE ) +GAME( 1993, mk2r20, mk2, tunit_dcs, mk2, midtunit_state, init_mk2, ROT0, "Midway", "Mortal Kombat II (rev L2.0)", MACHINE_SUPPORTS_SAVE ) +GAME( 1993, mk2r14, mk2, tunit_dcs, mk2, midtunit_state, init_mk2, ROT0, "Midway", "Mortal Kombat II (rev L1.4)", MACHINE_SUPPORTS_SAVE ) +GAME( 1993, mk2r11, mk2, tunit_dcs, mk2, midtunit_state, init_mk2, ROT0, "Midway", "Mortal Kombat II (rev L1.1)", MACHINE_SUPPORTS_SAVE ) +GAME( 1993, mk2r42, mk2, tunit_dcs, mk2, midtunit_state, init_mk2, ROT0, "hack", "Mortal Kombat II (rev L4.2, hack)", MACHINE_SUPPORTS_SAVE ) +GAME( 1993, mk2r91, mk2, tunit_dcs, mk2, midtunit_state, init_mk2, ROT0, "hack", "Mortal Kombat II (rev L9.1, hack)", MACHINE_SUPPORTS_SAVE ) +GAME( 1993, mk2chal, mk2, tunit_dcs, mk2, midtunit_state, init_mk2, ROT0, "hack", "Mortal Kombat II Challenger (hack)", MACHINE_SUPPORTS_SAVE ) + +GAME( 1993, jdreddp, 0, tunit_adpcm, jdreddp, midtunit_state, init_jdreddp, ROT0, "Midway", "Judge Dredd (rev TA1 7/12/92, location test)", MACHINE_SUPPORTS_SAVE ) + +GAME( 1993, nbajam, 0, tunit_adpcm, nbajam, midtunit_state, init_nbajam, ROT0, "Midway", "NBA Jam (rev 3.01 4/07/93)", MACHINE_SUPPORTS_SAVE ) +GAME( 1993, nbajamr2, nbajam, tunit_adpcm, nbajam, midtunit_state, init_nbajam, ROT0, "Midway", "NBA Jam (rev 2.00 2/10/93)", MACHINE_SUPPORTS_SAVE ) +GAME( 1993, nbajamr1, nbajam, tunit_adpcm, nbajam, midtunit_state, init_nbajam, ROT0, "Midway", "NBA Jam (rev 1.00 2/1/93)", MACHINE_SUPPORTS_SAVE ) + +GAME( 1994, nbajamte, 0, tunit_adpcm, nbajamte, midtunit_state, init_nbajamte, ROT0, "Midway", "NBA Jam TE (rev 4.0 3/23/94)", MACHINE_SUPPORTS_SAVE ) +GAME( 1994, nbajamte4, nbajamte, tunit_adpcm, nbajamte, midtunit_state, init_nbajamte, ROT0, "Midway", "NBA Jam TE (rev 4.0 3/03/94)", MACHINE_SUPPORTS_SAVE ) +GAME( 1994, nbajamte3, nbajamte, tunit_adpcm, nbajamte, midtunit_state, init_nbajamte, ROT0, "Midway", "NBA Jam TE (rev 3.0 3/04/94)", MACHINE_SUPPORTS_SAVE ) +GAME( 1994, nbajamte3a, nbajamte, tunit_adpcm, nbajamte, midtunit_state, init_nbajamte, ROT0, "Midway", "NBA Jam TE (rev 3.0 2/26/94)", MACHINE_SUPPORTS_SAVE ) +GAME( 1994, nbajamte2, nbajamte, tunit_adpcm, nbajamte, midtunit_state, init_nbajamte, ROT0, "Midway", "NBA Jam TE (rev 2.1 2/06/94)", MACHINE_SUPPORTS_SAVE ) +GAME( 1994, nbajamte2a, nbajamte, tunit_adpcm, nbajamte, midtunit_state, init_nbajamte, ROT0, "Midway", "NBA Jam TE (rev 2.0 1/28/94)", MACHINE_SUPPORTS_SAVE ) +GAME( 1994, nbajamte1, nbajamte, tunit_adpcm, nbajamte, midtunit_state, init_nbajamte, ROT0, "Midway", "NBA Jam TE (rev 1.00 1/17/94)", MACHINE_SUPPORTS_SAVE ) +GAME( 1995, nbajamten, nbajamte, tunit_adpcm, nbajamte, midtunit_state, init_nbajamte, ROT0, "Midway", "NBA Jam T.E. Nani Edition (rev 5.2 8/11/95, prototype)", MACHINE_SUPPORTS_SAVE ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/midwunit.cpp mame-0.231+dfsg.1/src/mame/drivers/midwunit.cpp --- mame-0.230+dfsg.1/src/mame/drivers/midwunit.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/midwunit.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -1070,6 +1070,170 @@ ROM_LOAD16_BYTE( "l1.0_nba_hangtime_u_5_music_spch.u5", 0x600000, 0x100000, CRC(ef19316a) SHA1(d41ae87ab45630a37c73684de42f7f6e0ed8f13b) ) ROM_REGION16_LE( 0x100000, "maincpu", 0 ) /* 34010 code */ + ROM_LOAD16_BYTE( "l1.3_nba_hangtime_u_54_game_rom.u54", 0x00000, 0x80000, CRC(fd9ccca2) SHA1(fc38d2440dd0712d7d5e2d2cca9635efd63a3d85) ) + ROM_LOAD16_BYTE( "l1.3_nba_hangtime_u_63_game_rom.u63", 0x00001, 0x80000, CRC(57de886f) SHA1(7cc127c7db7a68ea716914f7ddbbaf1356937f97) ) + + ROM_REGION( 0x2000000, "gfxrom", 0 ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_133_image_rom.u133", 0x0000000, 0x100000, CRC(3163feed) SHA1(eb7f128de306933929a0933e36e57760459cb0a1) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_132_image_rom.u132", 0x0000001, 0x100000, CRC(428eaf44) SHA1(2897efef4ab1653870b5bebb2762ea85549da03a) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_131_image_rom.u131", 0x0000002, 0x100000, CRC(5f7c5111) SHA1(14337f50b7b98254b54250af00f8a4a46bd7ee8d) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_130_image_rom.u130", 0x0000003, 0x100000, CRC(c7c0c514) SHA1(49788ff885996d9c5909c0ecebe06b6abd4298ed) ) + + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_129_image_rom.u129", 0x0400000, 0x100000, CRC(b3d0daa0) SHA1(302208c30f2b0c4aead8cf9201ae4c9501f7f952) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_128_image_rom.u128", 0x0400001, 0x100000, CRC(3704ee69) SHA1(e57846e96380af480fd6851c5359f88d432ac7cc) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_127_image_rom.u127", 0x0400002, 0x100000, CRC(4ea64d5a) SHA1(e7054c3946898ab0c5b4c27244c2eb6b24eaced7) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_126_image_rom.u126", 0x0400003, 0x100000, CRC(0c5c19b7) SHA1(802a05f53fcc2827960a63ef5c32a884fc96aaee) ) + + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_125_image_rom.u125", 0x0800000, 0x100000, CRC(46c43d67) SHA1(13a4d924fed51c2db7f750436b0b7c6ef03d36a5) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_124_image_rom.u124", 0x0800001, 0x100000, CRC(ed495156) SHA1(40f67fb2ccdd185b444f1127b1ec2fa4b493d7d6) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_123_image_rom.u123", 0x0800002, 0x100000, CRC(b48aa5da) SHA1(d8ee259a63dd7d997f2b99b73d0f11a277ba961d) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_122_image_rom.u122", 0x0800003, 0x100000, CRC(b18cd181) SHA1(d86eb5c81b10ba112ed989ab581683ccb669c3b5) ) + + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_121_image_rom.u121", 0x0c00000, 0x100000, CRC(5acb267a) SHA1(9c7e55991f795f0deae5f5cada3d5f49b7da578e) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_120_image_rom.u120", 0x0c00001, 0x100000, CRC(28e05f86) SHA1(ab642e7525b8fe55aab79597fcf84c4a8265463f) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_119_image_rom.u119", 0x0c00002, 0x100000, CRC(b4f604ea) SHA1(3997acfc856eead321e98584f7cb21953c95951a) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_118_image_rom.u118", 0x0c00003, 0x100000, CRC(a257b973) SHA1(31b4e3cf4e93be673d9b32dc85d7be0edcf6234c) ) + + // U114 through U117 sockets not populated + + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_113_image_rom.u113", 0x1400000, 0x100000, CRC(d712a779) SHA1(ca0e25fbb570c28c9ac6674f35050152a9072a5b) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_112_image_rom.u112", 0x1400001, 0x100000, CRC(644e1bca) SHA1(447cc3b0a16aaff39b6cd095f1c255a91f235f7f) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_111_image_rom.u111", 0x1400002, 0x100000, CRC(10d3b768) SHA1(e22fcb02a17c78f963ee5d35a38a9ab14f3de450) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_110_image_rom.u110", 0x1400003, 0x100000, CRC(8575aeb2) SHA1(883acfc45416ab6e1ab77fc897638f89286bea7e) ) +ROM_END + + +ROM_START( nbahangtm13 ) + ROM_REGION16_LE( 0x800000, "dcs", ROMREGION_ERASEFF ) /* sound data */ + ROM_LOAD16_BYTE( "l1.0_nba_hangtime_u_2_music_spch.u2", 0x000000, 0x100000, CRC(3f0b0d0a) SHA1(e3b8a264686ce7359d86e4926237d8cf17612991) ) // Labeled: L1.0 NBA HANGTIME U 2 MUSIC/SPCH + ROM_LOAD16_BYTE( "l1.0_nba_hangtime_u_3_music_spch.u3", 0x200000, 0x100000, CRC(ec1db988) SHA1(1cf06d0b75f20ded7db648070e85c056043765bb) ) + ROM_LOAD16_BYTE( "l1.0_nba_hangtime_u_4_music_spch.u4", 0x400000, 0x100000, CRC(c7f847a3) SHA1(c50175dffa3563ccd5792c59a6b44523f4014544) ) + ROM_LOAD16_BYTE( "l1.0_nba_hangtime_u_5_music_spch.u5", 0x600000, 0x100000, CRC(ef19316a) SHA1(d41ae87ab45630a37c73684de42f7f6e0ed8f13b) ) + + ROM_REGION16_LE( 0x100000, "maincpu", 0 ) /* 34010 code */ + ROM_LOAD16_BYTE( "m1.3_nba_hangtime_u_54_game_rom.u54", 0x00000, 0x80000, CRC(3ee3a9f4) SHA1(e5c2ab23f03af5aa493fcc3250f6e9bf38040793) ) + ROM_LOAD16_BYTE( "m1.3_nba_hangtime_u_63_game_rom.u63", 0x00001, 0x80000, CRC(42e6aeca) SHA1(468ad4095ea54be77e59def04b78fd5fed0616e5) ) + + ROM_REGION( 0x2000000, "gfxrom", 0 ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_133_image_rom.u133", 0x0000000, 0x100000, CRC(3163feed) SHA1(eb7f128de306933929a0933e36e57760459cb0a1) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_132_image_rom.u132", 0x0000001, 0x100000, CRC(428eaf44) SHA1(2897efef4ab1653870b5bebb2762ea85549da03a) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_131_image_rom.u131", 0x0000002, 0x100000, CRC(5f7c5111) SHA1(14337f50b7b98254b54250af00f8a4a46bd7ee8d) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_130_image_rom.u130", 0x0000003, 0x100000, CRC(c7c0c514) SHA1(49788ff885996d9c5909c0ecebe06b6abd4298ed) ) + + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_129_image_rom.u129", 0x0400000, 0x100000, CRC(b3d0daa0) SHA1(302208c30f2b0c4aead8cf9201ae4c9501f7f952) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_128_image_rom.u128", 0x0400001, 0x100000, CRC(3704ee69) SHA1(e57846e96380af480fd6851c5359f88d432ac7cc) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_127_image_rom.u127", 0x0400002, 0x100000, CRC(4ea64d5a) SHA1(e7054c3946898ab0c5b4c27244c2eb6b24eaced7) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_126_image_rom.u126", 0x0400003, 0x100000, CRC(0c5c19b7) SHA1(802a05f53fcc2827960a63ef5c32a884fc96aaee) ) + + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_125_image_rom.u125", 0x0800000, 0x100000, CRC(46c43d67) SHA1(13a4d924fed51c2db7f750436b0b7c6ef03d36a5) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_124_image_rom.u124", 0x0800001, 0x100000, CRC(ed495156) SHA1(40f67fb2ccdd185b444f1127b1ec2fa4b493d7d6) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_123_image_rom.u123", 0x0800002, 0x100000, CRC(b48aa5da) SHA1(d8ee259a63dd7d997f2b99b73d0f11a277ba961d) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_122_image_rom.u122", 0x0800003, 0x100000, CRC(b18cd181) SHA1(d86eb5c81b10ba112ed989ab581683ccb669c3b5) ) + + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_121_image_rom.u121", 0x0c00000, 0x100000, CRC(5acb267a) SHA1(9c7e55991f795f0deae5f5cada3d5f49b7da578e) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_120_image_rom.u120", 0x0c00001, 0x100000, CRC(28e05f86) SHA1(ab642e7525b8fe55aab79597fcf84c4a8265463f) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_119_image_rom.u119", 0x0c00002, 0x100000, CRC(b4f604ea) SHA1(3997acfc856eead321e98584f7cb21953c95951a) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_118_image_rom.u118", 0x0c00003, 0x100000, CRC(a257b973) SHA1(31b4e3cf4e93be673d9b32dc85d7be0edcf6234c) ) + + // U114 through U117 sockets not populated + + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_113_image_rom.u113", 0x1400000, 0x100000, CRC(d712a779) SHA1(ca0e25fbb570c28c9ac6674f35050152a9072a5b) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_112_image_rom.u112", 0x1400001, 0x100000, CRC(644e1bca) SHA1(447cc3b0a16aaff39b6cd095f1c255a91f235f7f) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_111_image_rom.u111", 0x1400002, 0x100000, CRC(10d3b768) SHA1(e22fcb02a17c78f963ee5d35a38a9ab14f3de450) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_110_image_rom.u110", 0x1400003, 0x100000, CRC(8575aeb2) SHA1(883acfc45416ab6e1ab77fc897638f89286bea7e) ) +ROM_END + + +ROM_START( nbahangtl12 ) + ROM_REGION16_LE( 0x800000, "dcs", ROMREGION_ERASEFF ) /* sound data */ + ROM_LOAD16_BYTE( "l1.0_nba_hangtime_u_2_music_spch.u2", 0x000000, 0x100000, CRC(3f0b0d0a) SHA1(e3b8a264686ce7359d86e4926237d8cf17612991) ) // Labeled: L1.0 NBA HANGTIME U 2 MUSIC/SPCH + ROM_LOAD16_BYTE( "l1.0_nba_hangtime_u_3_music_spch.u3", 0x200000, 0x100000, CRC(ec1db988) SHA1(1cf06d0b75f20ded7db648070e85c056043765bb) ) + ROM_LOAD16_BYTE( "l1.0_nba_hangtime_u_4_music_spch.u4", 0x400000, 0x100000, CRC(c7f847a3) SHA1(c50175dffa3563ccd5792c59a6b44523f4014544) ) + ROM_LOAD16_BYTE( "l1.0_nba_hangtime_u_5_music_spch.u5", 0x600000, 0x100000, CRC(ef19316a) SHA1(d41ae87ab45630a37c73684de42f7f6e0ed8f13b) ) + + ROM_REGION16_LE( 0x100000, "maincpu", 0 ) /* 34010 code */ + ROM_LOAD16_BYTE( "l1.2_nba_hangtime_u_54_game_rom.u54", 0x00000, 0x80000, CRC(c90dc3cd) SHA1(62d74e3f9ca290c2cdf0fdc7dbcd7f4004454d46) ) + ROM_LOAD16_BYTE( "l1.2_nba_hangtime_u_63_game_rom.u63", 0x00001, 0x80000, CRC(1883c461) SHA1(6e72b4d55041cc8d50f2591013b75dd75aa8a9dd) ) + + ROM_REGION( 0x2000000, "gfxrom", 0 ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_133_image_rom.u133", 0x0000000, 0x100000, CRC(3163feed) SHA1(eb7f128de306933929a0933e36e57760459cb0a1) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_132_image_rom.u132", 0x0000001, 0x100000, CRC(428eaf44) SHA1(2897efef4ab1653870b5bebb2762ea85549da03a) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_131_image_rom.u131", 0x0000002, 0x100000, CRC(5f7c5111) SHA1(14337f50b7b98254b54250af00f8a4a46bd7ee8d) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_130_image_rom.u130", 0x0000003, 0x100000, CRC(c7c0c514) SHA1(49788ff885996d9c5909c0ecebe06b6abd4298ed) ) + + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_129_image_rom.u129", 0x0400000, 0x100000, CRC(b3d0daa0) SHA1(302208c30f2b0c4aead8cf9201ae4c9501f7f952) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_128_image_rom.u128", 0x0400001, 0x100000, CRC(3704ee69) SHA1(e57846e96380af480fd6851c5359f88d432ac7cc) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_127_image_rom.u127", 0x0400002, 0x100000, CRC(4ea64d5a) SHA1(e7054c3946898ab0c5b4c27244c2eb6b24eaced7) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_126_image_rom.u126", 0x0400003, 0x100000, CRC(0c5c19b7) SHA1(802a05f53fcc2827960a63ef5c32a884fc96aaee) ) + + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_125_image_rom.u125", 0x0800000, 0x100000, CRC(46c43d67) SHA1(13a4d924fed51c2db7f750436b0b7c6ef03d36a5) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_124_image_rom.u124", 0x0800001, 0x100000, CRC(ed495156) SHA1(40f67fb2ccdd185b444f1127b1ec2fa4b493d7d6) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_123_image_rom.u123", 0x0800002, 0x100000, CRC(b48aa5da) SHA1(d8ee259a63dd7d997f2b99b73d0f11a277ba961d) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_122_image_rom.u122", 0x0800003, 0x100000, CRC(b18cd181) SHA1(d86eb5c81b10ba112ed989ab581683ccb669c3b5) ) + + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_121_image_rom.u121", 0x0c00000, 0x100000, CRC(5acb267a) SHA1(9c7e55991f795f0deae5f5cada3d5f49b7da578e) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_120_image_rom.u120", 0x0c00001, 0x100000, CRC(28e05f86) SHA1(ab642e7525b8fe55aab79597fcf84c4a8265463f) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_119_image_rom.u119", 0x0c00002, 0x100000, CRC(b4f604ea) SHA1(3997acfc856eead321e98584f7cb21953c95951a) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_118_image_rom.u118", 0x0c00003, 0x100000, CRC(a257b973) SHA1(31b4e3cf4e93be673d9b32dc85d7be0edcf6234c) ) + + // U114 through U117 sockets not populated + + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_113_image_rom.u113", 0x1400000, 0x100000, CRC(d712a779) SHA1(ca0e25fbb570c28c9ac6674f35050152a9072a5b) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_112_image_rom.u112", 0x1400001, 0x100000, CRC(644e1bca) SHA1(447cc3b0a16aaff39b6cd095f1c255a91f235f7f) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_111_image_rom.u111", 0x1400002, 0x100000, CRC(10d3b768) SHA1(e22fcb02a17c78f963ee5d35a38a9ab14f3de450) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_110_image_rom.u110", 0x1400003, 0x100000, CRC(8575aeb2) SHA1(883acfc45416ab6e1ab77fc897638f89286bea7e) ) +ROM_END + + +ROM_START( nbahangtm12 ) + ROM_REGION16_LE( 0x800000, "dcs", ROMREGION_ERASEFF ) /* sound data */ + ROM_LOAD16_BYTE( "l1.0_nba_hangtime_u_2_music_spch.u2", 0x000000, 0x100000, CRC(3f0b0d0a) SHA1(e3b8a264686ce7359d86e4926237d8cf17612991) ) // Labeled: L1.0 NBA HANGTIME U 2 MUSIC/SPCH + ROM_LOAD16_BYTE( "l1.0_nba_hangtime_u_3_music_spch.u3", 0x200000, 0x100000, CRC(ec1db988) SHA1(1cf06d0b75f20ded7db648070e85c056043765bb) ) + ROM_LOAD16_BYTE( "l1.0_nba_hangtime_u_4_music_spch.u4", 0x400000, 0x100000, CRC(c7f847a3) SHA1(c50175dffa3563ccd5792c59a6b44523f4014544) ) + ROM_LOAD16_BYTE( "l1.0_nba_hangtime_u_5_music_spch.u5", 0x600000, 0x100000, CRC(ef19316a) SHA1(d41ae87ab45630a37c73684de42f7f6e0ed8f13b) ) + + ROM_REGION16_LE( 0x100000, "maincpu", 0 ) /* 34010 code */ + ROM_LOAD16_BYTE( "m1.2_nba_hangtime_u_54_game_rom.u54", 0x00000, 0x80000, CRC(3be47f64) SHA1(71b54037b89c11c031c1db0e3112ae08f7f28e8c) ) + ROM_LOAD16_BYTE( "m1.2_nba_hangtime_u_63_game_rom.u63", 0x00001, 0x80000, CRC(ba4344ae) SHA1(86557a21411c18136ac4383cc7e0da78b6f01235) ) + + ROM_REGION( 0x2000000, "gfxrom", 0 ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_133_image_rom.u133", 0x0000000, 0x100000, CRC(3163feed) SHA1(eb7f128de306933929a0933e36e57760459cb0a1) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_132_image_rom.u132", 0x0000001, 0x100000, CRC(428eaf44) SHA1(2897efef4ab1653870b5bebb2762ea85549da03a) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_131_image_rom.u131", 0x0000002, 0x100000, CRC(5f7c5111) SHA1(14337f50b7b98254b54250af00f8a4a46bd7ee8d) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_130_image_rom.u130", 0x0000003, 0x100000, CRC(c7c0c514) SHA1(49788ff885996d9c5909c0ecebe06b6abd4298ed) ) + + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_129_image_rom.u129", 0x0400000, 0x100000, CRC(b3d0daa0) SHA1(302208c30f2b0c4aead8cf9201ae4c9501f7f952) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_128_image_rom.u128", 0x0400001, 0x100000, CRC(3704ee69) SHA1(e57846e96380af480fd6851c5359f88d432ac7cc) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_127_image_rom.u127", 0x0400002, 0x100000, CRC(4ea64d5a) SHA1(e7054c3946898ab0c5b4c27244c2eb6b24eaced7) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_126_image_rom.u126", 0x0400003, 0x100000, CRC(0c5c19b7) SHA1(802a05f53fcc2827960a63ef5c32a884fc96aaee) ) + + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_125_image_rom.u125", 0x0800000, 0x100000, CRC(46c43d67) SHA1(13a4d924fed51c2db7f750436b0b7c6ef03d36a5) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_124_image_rom.u124", 0x0800001, 0x100000, CRC(ed495156) SHA1(40f67fb2ccdd185b444f1127b1ec2fa4b493d7d6) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_123_image_rom.u123", 0x0800002, 0x100000, CRC(b48aa5da) SHA1(d8ee259a63dd7d997f2b99b73d0f11a277ba961d) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_122_image_rom.u122", 0x0800003, 0x100000, CRC(b18cd181) SHA1(d86eb5c81b10ba112ed989ab581683ccb669c3b5) ) + + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_121_image_rom.u121", 0x0c00000, 0x100000, CRC(5acb267a) SHA1(9c7e55991f795f0deae5f5cada3d5f49b7da578e) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_120_image_rom.u120", 0x0c00001, 0x100000, CRC(28e05f86) SHA1(ab642e7525b8fe55aab79597fcf84c4a8265463f) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_119_image_rom.u119", 0x0c00002, 0x100000, CRC(b4f604ea) SHA1(3997acfc856eead321e98584f7cb21953c95951a) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_118_image_rom.u118", 0x0c00003, 0x100000, CRC(a257b973) SHA1(31b4e3cf4e93be673d9b32dc85d7be0edcf6234c) ) + + // U114 through U117 sockets not populated + + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_113_image_rom.u113", 0x1400000, 0x100000, CRC(d712a779) SHA1(ca0e25fbb570c28c9ac6674f35050152a9072a5b) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_112_image_rom.u112", 0x1400001, 0x100000, CRC(644e1bca) SHA1(447cc3b0a16aaff39b6cd095f1c255a91f235f7f) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_111_image_rom.u111", 0x1400002, 0x100000, CRC(10d3b768) SHA1(e22fcb02a17c78f963ee5d35a38a9ab14f3de450) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_110_image_rom.u110", 0x1400003, 0x100000, CRC(8575aeb2) SHA1(883acfc45416ab6e1ab77fc897638f89286bea7e) ) +ROM_END + + +ROM_START( nbahangtl11 ) + ROM_REGION16_LE( 0x800000, "dcs", ROMREGION_ERASEFF ) /* sound data */ + ROM_LOAD16_BYTE( "l1.0_nba_hangtime_u_2_music_spch.u2", 0x000000, 0x100000, CRC(3f0b0d0a) SHA1(e3b8a264686ce7359d86e4926237d8cf17612991) ) // Labeled: L1.0 NBA HANGTIME U 2 MUSIC/SPCH + ROM_LOAD16_BYTE( "l1.0_nba_hangtime_u_3_music_spch.u3", 0x200000, 0x100000, CRC(ec1db988) SHA1(1cf06d0b75f20ded7db648070e85c056043765bb) ) + ROM_LOAD16_BYTE( "l1.0_nba_hangtime_u_4_music_spch.u4", 0x400000, 0x100000, CRC(c7f847a3) SHA1(c50175dffa3563ccd5792c59a6b44523f4014544) ) + ROM_LOAD16_BYTE( "l1.0_nba_hangtime_u_5_music_spch.u5", 0x600000, 0x100000, CRC(ef19316a) SHA1(d41ae87ab45630a37c73684de42f7f6e0ed8f13b) ) + + ROM_REGION16_LE( 0x100000, "maincpu", 0 ) /* 34010 code */ ROM_LOAD16_BYTE( "l1.1_nba_hangtime_u_54_game_rom.u54", 0x00000, 0x80000, CRC(c2875d98) SHA1(3f88f6f5c15ae03bedda39f71a1deaf549a55516) ) ROM_LOAD16_BYTE( "l1.1_nba_hangtime_u_63_game_rom.u63", 0x00001, 0x80000, CRC(6f4728c3) SHA1(c059f4aa72cc5c3edc41e72428b3ebba97cc9417) ) @@ -1103,6 +1267,47 @@ ROM_END +ROM_START( nbahangtm11 ) + ROM_REGION16_LE( 0x800000, "dcs", ROMREGION_ERASEFF ) /* sound data */ + ROM_LOAD16_BYTE( "l1.0_nba_hangtime_u_2_music_spch.u2", 0x000000, 0x100000, CRC(3f0b0d0a) SHA1(e3b8a264686ce7359d86e4926237d8cf17612991) ) // Labeled: L1.0 NBA HANGTIME U 2 MUSIC/SPCH + ROM_LOAD16_BYTE( "l1.0_nba_hangtime_u_3_music_spch.u3", 0x200000, 0x100000, CRC(ec1db988) SHA1(1cf06d0b75f20ded7db648070e85c056043765bb) ) + ROM_LOAD16_BYTE( "l1.0_nba_hangtime_u_4_music_spch.u4", 0x400000, 0x100000, CRC(c7f847a3) SHA1(c50175dffa3563ccd5792c59a6b44523f4014544) ) + ROM_LOAD16_BYTE( "l1.0_nba_hangtime_u_5_music_spch.u5", 0x600000, 0x100000, CRC(ef19316a) SHA1(d41ae87ab45630a37c73684de42f7f6e0ed8f13b) ) + + ROM_REGION16_LE( 0x100000, "maincpu", 0 ) /* 34010 code */ + ROM_LOAD16_BYTE( "m1.1_nba_hangtime_u_54_game_rom.u54", 0x00000, 0x80000, CRC(113b37f4) SHA1(61fac820a6f6bf9ca74a52d7d4f718e08fc58a36) ) + ROM_LOAD16_BYTE( "m1.1_nba_hangtime_u_63_game_rom.u63", 0x00001, 0x80000, CRC(beaa3e92) SHA1(86b2c8278f200fea3df3f4b9e5ceea37cb0e6191) ) + + ROM_REGION( 0x2000000, "gfxrom", 0 ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_133_image_rom.u133", 0x0000000, 0x100000, CRC(3163feed) SHA1(eb7f128de306933929a0933e36e57760459cb0a1) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_132_image_rom.u132", 0x0000001, 0x100000, CRC(428eaf44) SHA1(2897efef4ab1653870b5bebb2762ea85549da03a) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_131_image_rom.u131", 0x0000002, 0x100000, CRC(5f7c5111) SHA1(14337f50b7b98254b54250af00f8a4a46bd7ee8d) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_130_image_rom.u130", 0x0000003, 0x100000, CRC(c7c0c514) SHA1(49788ff885996d9c5909c0ecebe06b6abd4298ed) ) + + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_129_image_rom.u129", 0x0400000, 0x100000, CRC(b3d0daa0) SHA1(302208c30f2b0c4aead8cf9201ae4c9501f7f952) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_128_image_rom.u128", 0x0400001, 0x100000, CRC(3704ee69) SHA1(e57846e96380af480fd6851c5359f88d432ac7cc) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_127_image_rom.u127", 0x0400002, 0x100000, CRC(4ea64d5a) SHA1(e7054c3946898ab0c5b4c27244c2eb6b24eaced7) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_126_image_rom.u126", 0x0400003, 0x100000, CRC(0c5c19b7) SHA1(802a05f53fcc2827960a63ef5c32a884fc96aaee) ) + + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_125_image_rom.u125", 0x0800000, 0x100000, CRC(46c43d67) SHA1(13a4d924fed51c2db7f750436b0b7c6ef03d36a5) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_124_image_rom.u124", 0x0800001, 0x100000, CRC(ed495156) SHA1(40f67fb2ccdd185b444f1127b1ec2fa4b493d7d6) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_123_image_rom.u123", 0x0800002, 0x100000, CRC(b48aa5da) SHA1(d8ee259a63dd7d997f2b99b73d0f11a277ba961d) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_122_image_rom.u122", 0x0800003, 0x100000, CRC(b18cd181) SHA1(d86eb5c81b10ba112ed989ab581683ccb669c3b5) ) + + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_121_image_rom.u121", 0x0c00000, 0x100000, CRC(5acb267a) SHA1(9c7e55991f795f0deae5f5cada3d5f49b7da578e) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_120_image_rom.u120", 0x0c00001, 0x100000, CRC(28e05f86) SHA1(ab642e7525b8fe55aab79597fcf84c4a8265463f) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_119_image_rom.u119", 0x0c00002, 0x100000, CRC(b4f604ea) SHA1(3997acfc856eead321e98584f7cb21953c95951a) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_118_image_rom.u118", 0x0c00003, 0x100000, CRC(a257b973) SHA1(31b4e3cf4e93be673d9b32dc85d7be0edcf6234c) ) + + // U114 through U117 sockets not populated + + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_113_image_rom.u113", 0x1400000, 0x100000, CRC(d712a779) SHA1(ca0e25fbb570c28c9ac6674f35050152a9072a5b) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_112_image_rom.u112", 0x1400001, 0x100000, CRC(644e1bca) SHA1(447cc3b0a16aaff39b6cd095f1c255a91f235f7f) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_111_image_rom.u111", 0x1400002, 0x100000, CRC(10d3b768) SHA1(e22fcb02a17c78f963ee5d35a38a9ab14f3de450) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_110_image_rom.u110", 0x1400003, 0x100000, CRC(8575aeb2) SHA1(883acfc45416ab6e1ab77fc897638f89286bea7e) ) +ROM_END + + /* The NBA Maximum Hangtime sets are a program ROM update for NBA Hangtime. The MAX sets use all the same Music/SPCH ROMs, Image ROMs and even the same security PIC chip. @@ -1153,7 +1358,7 @@ ROM_END -ROM_START( nbamht1 ) +ROM_START( nbamhtl10 ) ROM_REGION16_LE( 0x800000, "dcs", ROMREGION_ERASEFF ) /* sound data */ ROM_LOAD16_BYTE( "l1.0_nba_hangtime_u_2_music_spch.u2", 0x000000, 0x100000, CRC(3f0b0d0a) SHA1(e3b8a264686ce7359d86e4926237d8cf17612991) ) // Uses NBA Hangtime MUSIC/SPCH ROMs - verified correct ROM_LOAD16_BYTE( "l1.0_nba_hangtime_u_3_music_spch.u3", 0x200000, 0x100000, CRC(ec1db988) SHA1(1cf06d0b75f20ded7db648070e85c056043765bb) ) @@ -1194,6 +1399,88 @@ ROM_END +ROM_START( nbamhtm10 ) + ROM_REGION16_LE( 0x800000, "dcs", ROMREGION_ERASEFF ) /* sound data */ + ROM_LOAD16_BYTE( "l1.0_nba_hangtime_u_2_music_spch.u2", 0x000000, 0x100000, CRC(3f0b0d0a) SHA1(e3b8a264686ce7359d86e4926237d8cf17612991) ) // Uses NBA Hangtime MUSIC/SPCH ROMs - verified correct + ROM_LOAD16_BYTE( "l1.0_nba_hangtime_u_3_music_spch.u3", 0x200000, 0x100000, CRC(ec1db988) SHA1(1cf06d0b75f20ded7db648070e85c056043765bb) ) + ROM_LOAD16_BYTE( "l1.0_nba_hangtime_u_4_music_spch.u4", 0x400000, 0x100000, CRC(c7f847a3) SHA1(c50175dffa3563ccd5792c59a6b44523f4014544) ) + ROM_LOAD16_BYTE( "l1.0_nba_hangtime_u_5_music_spch.u5", 0x600000, 0x100000, CRC(ef19316a) SHA1(d41ae87ab45630a37c73684de42f7f6e0ed8f13b) ) + + ROM_REGION16_LE( 0x100000, "maincpu", 0 ) /* 34010 code */ + ROM_LOAD16_BYTE( "m1.0_maximum_hangtime_u54_m_version.u54", 0x00000, 0x80000, CRC(e4e665d5) SHA1(8111536e041f69ec35284bf3cae40a85a48d7331) ) // Labeled: L1.0 Maximum Hangtime U54 "M" Version + ROM_LOAD16_BYTE( "m1.0_maximum_hangtime_u63_m_version.u63", 0x00001, 0x80000, CRC(51cfda55) SHA1(e8c8326fd57af9916a7fb8159b1d0901f30fd331) ) // Labeled: L1.0 Maximum Hangtime U63 "M" Version + + ROM_REGION( 0x2000000, "gfxrom", 0 ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_133_image_rom.u133", 0x0000000, 0x100000, CRC(3163feed) SHA1(eb7f128de306933929a0933e36e57760459cb0a1) ) // Uses NBA Hangtime IMAGE ROMs - verified correct + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_132_image_rom.u132", 0x0000001, 0x100000, CRC(428eaf44) SHA1(2897efef4ab1653870b5bebb2762ea85549da03a) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_131_image_rom.u131", 0x0000002, 0x100000, CRC(5f7c5111) SHA1(14337f50b7b98254b54250af00f8a4a46bd7ee8d) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_130_image_rom.u130", 0x0000003, 0x100000, CRC(c7c0c514) SHA1(49788ff885996d9c5909c0ecebe06b6abd4298ed) ) + + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_129_image_rom.u129", 0x0400000, 0x100000, CRC(b3d0daa0) SHA1(302208c30f2b0c4aead8cf9201ae4c9501f7f952) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_128_image_rom.u128", 0x0400001, 0x100000, CRC(3704ee69) SHA1(e57846e96380af480fd6851c5359f88d432ac7cc) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_127_image_rom.u127", 0x0400002, 0x100000, CRC(4ea64d5a) SHA1(e7054c3946898ab0c5b4c27244c2eb6b24eaced7) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_126_image_rom.u126", 0x0400003, 0x100000, CRC(0c5c19b7) SHA1(802a05f53fcc2827960a63ef5c32a884fc96aaee) ) + + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_125_image_rom.u125", 0x0800000, 0x100000, CRC(46c43d67) SHA1(13a4d924fed51c2db7f750436b0b7c6ef03d36a5) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_124_image_rom.u124", 0x0800001, 0x100000, CRC(ed495156) SHA1(40f67fb2ccdd185b444f1127b1ec2fa4b493d7d6) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_123_image_rom.u123", 0x0800002, 0x100000, CRC(b48aa5da) SHA1(d8ee259a63dd7d997f2b99b73d0f11a277ba961d) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_122_image_rom.u122", 0x0800003, 0x100000, CRC(b18cd181) SHA1(d86eb5c81b10ba112ed989ab581683ccb669c3b5) ) + + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_121_image_rom.u121", 0x0c00000, 0x100000, CRC(5acb267a) SHA1(9c7e55991f795f0deae5f5cada3d5f49b7da578e) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_120_image_rom.u120", 0x0c00001, 0x100000, CRC(28e05f86) SHA1(ab642e7525b8fe55aab79597fcf84c4a8265463f) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_119_image_rom.u119", 0x0c00002, 0x100000, CRC(b4f604ea) SHA1(3997acfc856eead321e98584f7cb21953c95951a) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_118_image_rom.u118", 0x0c00003, 0x100000, CRC(a257b973) SHA1(31b4e3cf4e93be673d9b32dc85d7be0edcf6234c) ) + + // U114 through U117 sockets not populated + + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_113_image_rom.u113", 0x1400000, 0x100000, CRC(d712a779) SHA1(ca0e25fbb570c28c9ac6674f35050152a9072a5b) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_112_image_rom.u112", 0x1400001, 0x100000, CRC(644e1bca) SHA1(447cc3b0a16aaff39b6cd095f1c255a91f235f7f) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_111_image_rom.u111", 0x1400002, 0x100000, CRC(10d3b768) SHA1(e22fcb02a17c78f963ee5d35a38a9ab14f3de450) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_110_image_rom.u110", 0x1400003, 0x100000, CRC(8575aeb2) SHA1(883acfc45416ab6e1ab77fc897638f89286bea7e) ) +ROM_END + + +ROM_START( nbamhtp ) + ROM_REGION16_LE( 0x800000, "dcs", ROMREGION_ERASEFF ) /* sound data */ + ROM_LOAD16_BYTE( "l1.0_nba_hangtime_u_2_music_spch.u2", 0x000000, 0x100000, CRC(3f0b0d0a) SHA1(e3b8a264686ce7359d86e4926237d8cf17612991) ) // Uses NBA Hangtime MUSIC/SPCH ROMs - verified correct + ROM_LOAD16_BYTE( "l1.0_nba_hangtime_u_3_music_spch.u3", 0x200000, 0x100000, CRC(ec1db988) SHA1(1cf06d0b75f20ded7db648070e85c056043765bb) ) + ROM_LOAD16_BYTE( "l1.0_nba_hangtime_u_4_music_spch.u4", 0x400000, 0x100000, CRC(c7f847a3) SHA1(c50175dffa3563ccd5792c59a6b44523f4014544) ) + ROM_LOAD16_BYTE( "l1.0_nba_hangtime_u_5_music_spch.u5", 0x600000, 0x100000, CRC(ef19316a) SHA1(d41ae87ab45630a37c73684de42f7f6e0ed8f13b) ) + + ROM_REGION16_LE( 0x100000, "maincpu", 0 ) /* 34010 code */ + ROM_LOAD16_BYTE( "l0.9_maximum_hangtime_u54_l_version.u54", 0x00000, 0x80000, CRC(0fbed60e) SHA1(a017d498a901c1608ffecfe0fb2ec82c7a23f4ea) ) + ROM_LOAD16_BYTE( "l0.9_maximum_hangtime_u63_l_version.u63", 0x00001, 0x80000, CRC(a064645a) SHA1(43dba6f64ef1d940f1d1b1764addf40359fcdb51) ) + + ROM_REGION( 0x2000000, "gfxrom", 0 ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_133_image_rom.u133", 0x0000000, 0x100000, CRC(3163feed) SHA1(eb7f128de306933929a0933e36e57760459cb0a1) ) // Uses NBA Hangtime IMAGE ROMs - verified correct + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_132_image_rom.u132", 0x0000001, 0x100000, CRC(428eaf44) SHA1(2897efef4ab1653870b5bebb2762ea85549da03a) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_131_image_rom.u131", 0x0000002, 0x100000, CRC(5f7c5111) SHA1(14337f50b7b98254b54250af00f8a4a46bd7ee8d) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_130_image_rom.u130", 0x0000003, 0x100000, CRC(c7c0c514) SHA1(49788ff885996d9c5909c0ecebe06b6abd4298ed) ) + + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_129_image_rom.u129", 0x0400000, 0x100000, CRC(b3d0daa0) SHA1(302208c30f2b0c4aead8cf9201ae4c9501f7f952) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_128_image_rom.u128", 0x0400001, 0x100000, CRC(3704ee69) SHA1(e57846e96380af480fd6851c5359f88d432ac7cc) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_127_image_rom.u127", 0x0400002, 0x100000, CRC(4ea64d5a) SHA1(e7054c3946898ab0c5b4c27244c2eb6b24eaced7) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_126_image_rom.u126", 0x0400003, 0x100000, CRC(0c5c19b7) SHA1(802a05f53fcc2827960a63ef5c32a884fc96aaee) ) + + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_125_image_rom.u125", 0x0800000, 0x100000, CRC(46c43d67) SHA1(13a4d924fed51c2db7f750436b0b7c6ef03d36a5) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_124_image_rom.u124", 0x0800001, 0x100000, CRC(ed495156) SHA1(40f67fb2ccdd185b444f1127b1ec2fa4b493d7d6) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_123_image_rom.u123", 0x0800002, 0x100000, CRC(b48aa5da) SHA1(d8ee259a63dd7d997f2b99b73d0f11a277ba961d) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_122_image_rom.u122", 0x0800003, 0x100000, CRC(b18cd181) SHA1(d86eb5c81b10ba112ed989ab581683ccb669c3b5) ) + + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_121_image_rom.u121", 0x0c00000, 0x100000, CRC(5acb267a) SHA1(9c7e55991f795f0deae5f5cada3d5f49b7da578e) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_120_image_rom.u120", 0x0c00001, 0x100000, CRC(28e05f86) SHA1(ab642e7525b8fe55aab79597fcf84c4a8265463f) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_119_image_rom.u119", 0x0c00002, 0x100000, CRC(b4f604ea) SHA1(3997acfc856eead321e98584f7cb21953c95951a) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_118_image_rom.u118", 0x0c00003, 0x100000, CRC(a257b973) SHA1(31b4e3cf4e93be673d9b32dc85d7be0edcf6234c) ) + + // U114 through U117 sockets not populated + + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_113_image_rom.u113", 0x1400000, 0x100000, CRC(d712a779) SHA1(ca0e25fbb570c28c9ac6674f35050152a9072a5b) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_112_image_rom.u112", 0x1400001, 0x100000, CRC(644e1bca) SHA1(447cc3b0a16aaff39b6cd095f1c255a91f235f7f) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_111_image_rom.u111", 0x1400002, 0x100000, CRC(10d3b768) SHA1(e22fcb02a17c78f963ee5d35a38a9ab14f3de450) ) + ROM_LOAD32_BYTE( "l1.0_nba_hangtime_u_110_image_rom.u110", 0x1400003, 0x100000, CRC(8575aeb2) SHA1(883acfc45416ab6e1ab77fc897638f89286bea7e) ) +ROM_END + + ROM_START( rmpgwt ) ROM_REGION16_LE( 0x800000, "dcs", ROMREGION_ERASEFF ) /* sound data */ ROM_LOAD16_BYTE( "1.0_rampage_world_tour_u2_sound.u2", 0x000000, 0x100000, CRC(0e82f83d) SHA1(215eebb6c229ef9ad0fcbcbc6e4e07300c05654f) ) @@ -1442,30 +1729,35 @@ * *************************************/ -GAME( 1994, mk3, 0, wunit_picsim, mk3, midwunit_state, init_mk3, ROT0, "Midway", "Mortal Kombat 3 (rev 2.1)", MACHINE_SUPPORTS_SAVE ) -GAME( 1994, mk3r20, mk3, wunit_picsim, mk3, midwunit_state, init_mk3r20, ROT0, "Midway", "Mortal Kombat 3 (rev 2.0)", MACHINE_SUPPORTS_SAVE ) -GAME( 1994, mk3r10, mk3, wunit_picsim, mk3, midwunit_state, init_mk3r10, ROT0, "Midway", "Mortal Kombat 3 (rev 1.0)", MACHINE_SUPPORTS_SAVE ) -GAME( 1994, mk3p40, mk3, wunit_picsim, mk3, midwunit_state, init_mk3r10, ROT0, "Midway", "Mortal Kombat 3 (rev 1 chip label p4.0)", MACHINE_SUPPORTS_SAVE ) - -GAME( 1994, umk3, 0, wunit_picemu, mk3, midwunit_state, init_umk3, ROT0, "Midway", "Ultimate Mortal Kombat 3 (rev 1.2)", MACHINE_SUPPORTS_SAVE ) -GAME( 1994, umk3r11, umk3, wunit_picemu, mk3, midwunit_state, init_umk3r11, ROT0, "Midway", "Ultimate Mortal Kombat 3 (rev 1.1)", MACHINE_SUPPORTS_SAVE ) -GAME( 1994, umk3r10, umk3, wunit_picemu, mk3, midwunit_state, init_umk3r11, ROT0, "Midway", "Ultimate Mortal Kombat 3 (rev 1.0)", MACHINE_SUPPORTS_SAVE ) +GAME( 1994, mk3, 0, wunit_picsim, mk3, midwunit_state, init_mk3, ROT0, "Midway", "Mortal Kombat 3 (rev 2.1)", MACHINE_SUPPORTS_SAVE ) +GAME( 1994, mk3r20, mk3, wunit_picsim, mk3, midwunit_state, init_mk3r20, ROT0, "Midway", "Mortal Kombat 3 (rev 2.0)", MACHINE_SUPPORTS_SAVE ) +GAME( 1994, mk3r10, mk3, wunit_picsim, mk3, midwunit_state, init_mk3r10, ROT0, "Midway", "Mortal Kombat 3 (rev 1.0)", MACHINE_SUPPORTS_SAVE ) +GAME( 1994, mk3p40, mk3, wunit_picsim, mk3, midwunit_state, init_mk3r10, ROT0, "Midway", "Mortal Kombat 3 (rev 1 chip label p4.0)", MACHINE_SUPPORTS_SAVE ) + +GAME( 1994, umk3, 0, wunit_picemu, mk3, midwunit_state, init_umk3, ROT0, "Midway", "Ultimate Mortal Kombat 3 (rev 1.2)", MACHINE_SUPPORTS_SAVE ) +GAME( 1994, umk3r11, umk3, wunit_picemu, mk3, midwunit_state, init_umk3r11, ROT0, "Midway", "Ultimate Mortal Kombat 3 (rev 1.1)", MACHINE_SUPPORTS_SAVE ) +GAME( 1994, umk3r10, umk3, wunit_picemu, mk3, midwunit_state, init_umk3r11, ROT0, "Midway", "Ultimate Mortal Kombat 3 (rev 1.0)", MACHINE_SUPPORTS_SAVE ) // Ultimate Mortal Kombat 3 rev 2.0.35 (TE? Hack?) version known to exist -GAME( 1995, wwfmania, 0, wunit_picsim, wwfmania, midwunit_state, init_wwfmania, ROT0, "Midway", "WWF: Wrestlemania (rev 1.30 08/10/95)", MACHINE_SUPPORTS_SAVE ) -GAME( 1995, wwfmaniab, wwfmania, wunit_picsim, wwfmania, midwunit_state, init_wwfmania, ROT0, "Midway", "WWF: Wrestlemania (rev 1.20 08/02/95)", MACHINE_SUPPORTS_SAVE ) -GAME( 1995, wwfmaniac, wwfmania, wunit_picsim, wwfmania, midwunit_state, init_wwfmania, ROT0, "Midway", "WWF: Wrestlemania (rev 1.1 07/11/95)", MACHINE_SUPPORTS_SAVE ) -GAME( 1995, wwfmaniap, wwfmania, wunit_picsim, wwfmania, midwunit_state, init_wwfmania, ROT0, "Midway", "WWF: Wrestlemania (proto 2.01 06/07/95)", MACHINE_SUPPORTS_SAVE ) - -GAME( 1995, openice, 0, wunit_picsim, openice, midwunit_state, init_openice, ROT0, "Midway", "2 On 2 Open Ice Challenge (rev 1.21)", MACHINE_SUPPORTS_SAVE ) -GAME( 1995, openicea, openice, wunit_picsim, openice, midwunit_state, init_openice, ROT0, "Midway", "2 On 2 Open Ice Challenge (rev 1.2A)", MACHINE_SUPPORTS_SAVE ) - -GAME( 1996, nbahangt, 0, wunit_picsim, nbahangt, midwunit_state, init_nbahangt, ROT0, "Midway", "NBA Hangtime (rev L1.1 04/16/96)", MACHINE_SUPPORTS_SAVE ) -// NBA HANGTIME - VER M1.2 8/29/96 known to exist, just not dumped - -GAME( 1996, nbamht, 0, wunit_picsim, nbahangt, midwunit_state, init_nbahangt, ROT0, "Midway", "NBA Maximum Hangtime (rev L1.03 06/09/97)", MACHINE_SUPPORTS_SAVE ) -GAME( 1996, nbamht1, nbamht, wunit_picsim, nbahangt, midwunit_state, init_nbahangt, ROT0, "Midway", "NBA Maximum Hangtime (rev L1.0 11/08/96)", MACHINE_SUPPORTS_SAVE ) -// MAX HANGTIME - VER M1.0 11/08/96 known to exist, just not dumped +GAME( 1995, wwfmania, 0, wunit_picsim, wwfmania, midwunit_state, init_wwfmania, ROT0, "Midway", "WWF: Wrestlemania (rev 1.30 08/10/95)", MACHINE_SUPPORTS_SAVE ) +GAME( 1995, wwfmaniab, wwfmania, wunit_picsim, wwfmania, midwunit_state, init_wwfmania, ROT0, "Midway", "WWF: Wrestlemania (rev 1.20 08/02/95)", MACHINE_SUPPORTS_SAVE ) +GAME( 1995, wwfmaniac, wwfmania, wunit_picsim, wwfmania, midwunit_state, init_wwfmania, ROT0, "Midway", "WWF: Wrestlemania (rev 1.1 07/11/95)", MACHINE_SUPPORTS_SAVE ) +GAME( 1995, wwfmaniap, wwfmania, wunit_picsim, wwfmania, midwunit_state, init_wwfmania, ROT0, "Midway", "WWF: Wrestlemania (proto 2.01 06/07/95)", MACHINE_SUPPORTS_SAVE ) + +GAME( 1995, openice, 0, wunit_picsim, openice, midwunit_state, init_openice, ROT0, "Midway", "2 On 2 Open Ice Challenge (rev 1.21)", MACHINE_SUPPORTS_SAVE ) +GAME( 1995, openicea, openice, wunit_picsim, openice, midwunit_state, init_openice, ROT0, "Midway", "2 On 2 Open Ice Challenge (rev 1.2A)", MACHINE_SUPPORTS_SAVE ) + +GAME( 1996, nbahangt, 0, wunit_picsim, nbahangt, midwunit_state, init_nbahangt, ROT0, "Midway", "NBA Hangtime (ver L1.3 10/10/96)", MACHINE_SUPPORTS_SAVE ) +GAME( 1996, nbahangtm13, nbahangt, wunit_picsim, nbahangt, midwunit_state, init_nbahangt, ROT0, "Midway", "NBA Hangtime (ver M1.3 10/10/96)", MACHINE_SUPPORTS_SAVE ) +GAME( 1996, nbahangtl12, nbahangt, wunit_picsim, nbahangt, midwunit_state, init_nbahangt, ROT0, "Midway", "NBA Hangtime (ver L1.2 8/29/96)", MACHINE_SUPPORTS_SAVE ) +GAME( 1996, nbahangtm12, nbahangt, wunit_picsim, nbahangt, midwunit_state, init_nbahangt, ROT0, "Midway", "NBA Hangtime (ver M1.2 8/29/96)", MACHINE_SUPPORTS_SAVE ) +GAME( 1996, nbahangtl11, nbahangt, wunit_picsim, nbahangt, midwunit_state, init_nbahangt, ROT0, "Midway", "NBA Hangtime (ver L1.1 4/16/96)", MACHINE_SUPPORTS_SAVE ) +GAME( 1996, nbahangtm11, nbahangt, wunit_picsim, nbahangt, midwunit_state, init_nbahangt, ROT0, "Midway", "NBA Hangtime (ver M1.1 4/16/96)", MACHINE_SUPPORTS_SAVE ) + +GAME( 1996, nbamht, nbahangt, wunit_picsim, nbahangt, midwunit_state, init_nbahangt, ROT0, "Midway", "NBA Maximum Hangtime (ver L1.03 06/09/97)", MACHINE_SUPPORTS_SAVE ) +GAME( 1996, nbamhtl10, nbahangt, wunit_picsim, nbahangt, midwunit_state, init_nbahangt, ROT0, "Midway", "NBA Maximum Hangtime (ver L1.0 11/08/96)", MACHINE_SUPPORTS_SAVE ) +GAME( 1996, nbamhtm10, nbahangt, wunit_picsim, nbahangt, midwunit_state, init_nbahangt, ROT0, "Midway", "NBA Maximum Hangtime (ver M1.0 11/08/96)", MACHINE_SUPPORTS_SAVE ) +GAME( 1996, nbamhtp, nbahangt, wunit_picsim, nbahangt, midwunit_state, init_nbahangt, ROT0, "Midway", "NBA Maximum Hangtime (ver L0.9 10/30/96)", MACHINE_SUPPORTS_SAVE ) -GAME( 1997, rmpgwt, 0, wunit_picemu, rmpgwt, midwunit_state, init_rmpgwt, ROT0, "Midway", "Rampage: World Tour (rev 1.3)", MACHINE_SUPPORTS_SAVE ) -GAME( 1997, rmpgwt11, rmpgwt, wunit_picemu, rmpgwt, midwunit_state, init_rmpgwt, ROT0, "Midway", "Rampage: World Tour (rev 1.1)", MACHINE_SUPPORTS_SAVE ) +GAME( 1997, rmpgwt, 0, wunit_picemu, rmpgwt, midwunit_state, init_rmpgwt, ROT0, "Midway", "Rampage: World Tour (rev 1.3)", MACHINE_SUPPORTS_SAVE ) +GAME( 1997, rmpgwt11, rmpgwt, wunit_picemu, rmpgwt, midwunit_state, init_rmpgwt, ROT0, "Midway", "Rampage: World Tour (rev 1.1)", MACHINE_SUPPORTS_SAVE ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/midxunit.cpp mame-0.231+dfsg.1/src/mame/drivers/midxunit.cpp --- mame-0.230+dfsg.1/src/mame/drivers/midxunit.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/midxunit.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -322,7 +322,7 @@ ROM_START( revx ) ROM_REGION16_LE( 0x1000000, "dcs", ROMREGION_ERASEFF ) // sound data - ROM_LOAD16_BYTE( "l1_revolution_x_sound_rom_u2.u2", 0x000000, 0x80000, CRC(4ed9e803) SHA1(ba50f1beb9f2a2cf5110897209b5e9a2951ff165) ) + ROM_LOAD16_BYTE( "l1_revolution_x_sound_rom_u2.u2", 0x000000, 0x80000, CRC(d2ed9f5e) SHA1(415ce5e41a560d135ea41c7924219fdeda504237) ) // shows as "Sound Software Version - Release 2" ROM_LOAD16_BYTE( "l1_revolution_x_sound_rom_u3.u3", 0x200000, 0x80000, CRC(af8f253b) SHA1(25a0000cab177378070f7a6e3c7378fe87fad63e) ) ROM_LOAD16_BYTE( "l1_revolution_x_sound_rom_u4.u4", 0x400000, 0x80000, CRC(3ccce59c) SHA1(e81a31d64c64e7b1d25f178c53da3d68453c203c) ) ROM_LOAD16_BYTE( "l1_revolution_x_sound_rom_u5.u5", 0x600000, 0x80000, CRC(a0438006) SHA1(560d216d21cb8073dbee0fd20ebe589932a9144e) ) @@ -332,10 +332,10 @@ ROM_LOAD16_BYTE( "l1_revolution_x_sound_rom_u9.u9", 0xe00000, 0x80000, CRC(14ddbea1) SHA1(8dba9dc5529ea77c4312ea61f825bf9062ffc6c3) ) ROM_REGION32_LE( 0x200000, "maincpu", 0 ) // 34020 code - ROM_LOAD32_BYTE( "revx.u51", 0x00000, 0x80000, CRC(9960ac7c) SHA1(441322f061d627ca7573f612f370a85794681d0f) ) // labels needs to be verified, so far was observed only reprogrammed P5 ROMs - ROM_LOAD32_BYTE( "revx.u52", 0x00001, 0x80000, CRC(fbf55510) SHA1(8a5b0004ed09391fe37f0f501b979903d6ae4868) ) - ROM_LOAD32_BYTE( "revx.u53", 0x00002, 0x80000, CRC(a045b265) SHA1(b294d3a56e41f5ec4ab9bbcc0088833b1cab1879) ) - ROM_LOAD32_BYTE( "revx.u54", 0x00003, 0x80000, CRC(24471269) SHA1(262345bd147402100785459af422dafd1c562787) ) + ROM_LOAD32_BYTE( "l1_revolution_x_game_rom_u51.u51", 0x00000, 0x80000, CRC(9960ac7c) SHA1(441322f061d627ca7573f612f370a85794681d0f) ) // labels needs to be verified, so far was observed only reprogrammed P5 ROMs + ROM_LOAD32_BYTE( "l1_revolution_x_game_rom_u52.u52", 0x00001, 0x80000, CRC(fbf55510) SHA1(8a5b0004ed09391fe37f0f501b979903d6ae4868) ) + ROM_LOAD32_BYTE( "l1_revolution_x_game_rom_u53.u53", 0x00002, 0x80000, CRC(a045b265) SHA1(b294d3a56e41f5ec4ab9bbcc0088833b1cab1879) ) + ROM_LOAD32_BYTE( "l1_revolution_x_game_rom_u54.u54", 0x00003, 0x80000, CRC(24471269) SHA1(262345bd147402100785459af422dafd1c562787) ) ROM_REGION( 0x2000, "pic", 0 ) ROM_LOAD( "419_revolution-x_u444.u444", 0x0000000, 0x2000, BAD_DUMP CRC(517e0110) SHA1(cd603c66794ff426dd2994fc1a0c0c8e6bbd864b) ) // manually restored @@ -389,7 +389,7 @@ ROM_START( revxp5 ) ROM_REGION16_LE( 0x1000000, "dcs", ROMREGION_ERASEFF ) // sound data - ROM_LOAD16_BYTE( "l1_revolution_x_sound_rom_u2.u2", 0x000000, 0x80000, CRC(4ed9e803) SHA1(ba50f1beb9f2a2cf5110897209b5e9a2951ff165) ) + ROM_LOAD16_BYTE( "p5_revolution_x_sound_rom_u2.u2", 0x000000, 0x80000, CRC(4ed9e803) SHA1(ba50f1beb9f2a2cf5110897209b5e9a2951ff165) ) // shows as "Sound Software Version - Release 1" ROM_LOAD16_BYTE( "l1_revolution_x_sound_rom_u3.u3", 0x200000, 0x80000, CRC(af8f253b) SHA1(25a0000cab177378070f7a6e3c7378fe87fad63e) ) ROM_LOAD16_BYTE( "l1_revolution_x_sound_rom_u4.u4", 0x400000, 0x80000, CRC(3ccce59c) SHA1(e81a31d64c64e7b1d25f178c53da3d68453c203c) ) ROM_LOAD16_BYTE( "l1_revolution_x_sound_rom_u5.u5", 0x600000, 0x80000, CRC(a0438006) SHA1(560d216d21cb8073dbee0fd20ebe589932a9144e) ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/midyunit.cpp mame-0.231+dfsg.1/src/mame/drivers/midyunit.cpp --- mame-0.230+dfsg.1/src/mame/drivers/midyunit.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/midyunit.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -31,6 +31,8 @@ table from the UTILITIES menu. It's best to do a FULL FACTORY RESTORE +************************************************************************* + Super High Impact Midway, 1991 @@ -1299,6 +1301,7 @@ * *************************************/ + ROM_START( narc ) ROM_REGION( 0x90000, "narcsnd:cpu0", 0 ) /* sound CPU */ ROM_LOAD( "rev2_narc_sound_rom_u4.u4", 0x50000, 0x10000, CRC(450a591a) SHA1(bbda8061262738e5866f2707f69483a0a51d2910) ) @@ -1394,6 +1397,112 @@ ROM_END +ROM_START( narc6 ) + ROM_REGION( 0x90000, "narcsnd:cpu0", 0 ) /* sound CPU */ + ROM_LOAD( "rev2_narc_sound_rom_u4.u4", 0x50000, 0x10000, CRC(450a591a) SHA1(bbda8061262738e5866f2707f69483a0a51d2910) ) + ROM_RELOAD( 0x60000, 0x10000 ) + ROM_LOAD( "rev2_narc_sound_rom_u5.u5", 0x70000, 0x10000, CRC(e551e5e3) SHA1(c8b4f53dbd4c534abb77d4dc07c4d12653b79894) ) + ROM_RELOAD( 0x80000, 0x10000 ) + + ROM_REGION( 0x90000, "narcsnd:cpu1", 0 ) /* slave sound CPU */ + ROM_LOAD( "rev2_narc_sound_rom_u35.u35", 0x10000, 0x10000, CRC(81295892) SHA1(159664e5ee03c88d6e940e70e87e2150dc5b8b25) ) + ROM_RELOAD( 0x20000, 0x10000 ) + ROM_LOAD( "rev2_narc_sound_rom_u36.u36", 0x30000, 0x10000, CRC(16cdbb13) SHA1(2dfd961a5d909c1804f4fda34de33ee2664c4bc6) ) + ROM_RELOAD( 0x40000, 0x10000 ) + ROM_LOAD( "rev2_narc_sound_rom_u37.u37", 0x50000, 0x10000, CRC(29dbeffd) SHA1(4cbdc619db34f9c552de1ed3d034f8c079987e03) ) + ROM_RELOAD( 0x60000, 0x10000 ) + ROM_LOAD( "rev2_narc_sound_rom_u38.u38", 0x70000, 0x10000, CRC(09b03b80) SHA1(a45782d29a426fac38299b56af0815e844e35ae4) ) + ROM_RELOAD( 0x80000, 0x10000 ) + + ROM_REGION16_LE( 0x100000, "user1", 0 ) /* 34010 code */ + ROM_LOAD16_BYTE( "rev6_narc_game_rom_u78.u78", 0x00000, 0x10000, CRC(2c9e799b) SHA1(28847e5aea08f4d4b12321cd2bfc13280ee8ec4f) ) + ROM_RELOAD( 0x20000, 0x10000 ) + ROM_LOAD16_BYTE( "rev6_narc_game_rom_u60.u60", 0x00001, 0x10000, CRC(5f6b0429) SHA1(1bda1a7644f2c7939800d64c3e73d589296032d9) ) + ROM_RELOAD( 0x20001, 0x10000 ) + ROM_LOAD16_BYTE( "rev6_narc_game_rom_u77.u77", 0x40000, 0x10000, CRC(508cfa38) SHA1(9b90d4bc199f9c30c38d986692829fe8ba458090) ) + ROM_RELOAD( 0x60000, 0x10000 ) + ROM_LOAD16_BYTE( "rev6_narc_game_rom_u59.u59", 0x40001, 0x10000, CRC(84bc91fc) SHA1(6203f1ac473f095d9a8fa9ed9081777526d7abb9) ) + ROM_RELOAD( 0x60001, 0x10000 ) + ROM_LOAD16_BYTE( "rev6_narc_game_rom_u42.u42", 0x80000, 0x10000, CRC(ee8ae9d4) SHA1(52721b40ff63c8e6d96ecb550e540e3d34c5d692) ) + ROM_RELOAD( 0xa0000, 0x10000 ) + ROM_LOAD16_BYTE( "rev6_narc_game_rom_u24.u24", 0x80001, 0x10000, CRC(4fbe2ff5) SHA1(9396018c095947f361e03196bee3dc598da57181) ) + ROM_RELOAD( 0xa0001, 0x10000 ) + ROM_LOAD16_BYTE( "rev6_narc_game_rom_u41.u41", 0xc0000, 0x10000, CRC(43a1bbbc) SHA1(0afe83e3c9a8a76fcadddf3d37f96f55a29fbb22) ) + ROM_RELOAD( 0xe0000, 0x10000 ) + ROM_LOAD16_BYTE( "rev6_narc_game_rom_u23.u23", 0xc0001, 0x10000, CRC(ed0d149d) SHA1(02b376cc7584fd26f537ad8122f73211bf0e66b8) ) + ROM_RELOAD( 0xe0001, 0x10000 ) + + ROM_REGION( 0x800000, "gfx1", 0 ) + ROM_LOAD( "rev2_narc_image_rom_u94.u94", 0x000000, 0x10000, CRC(ca3194e4) SHA1(d6aa6a09e4353a1dddd502abf85acf48e6e94cef) ) + ROM_LOAD( "rev2_narc_image_rom_u93.u93", 0x010000, 0x10000, CRC(0ed7f7f5) SHA1(913d0dc81531adc6a7e6ffabfe681150aa4638a3) ) + ROM_LOAD( "rev2_narc_image_rom_u92.u92", 0x020000, 0x10000, CRC(40d2fc66) SHA1(95b8d90e6abe336ad05dc3746d02b38823d2b8cd) ) + ROM_LOAD( "rev2_narc_image_rom_u91.u91", 0x030000, 0x10000, CRC(f39325e0) SHA1(c1179825c76ed2934dfeff263a9296c2c1a5abe4) ) + ROM_LOAD( "rev2_narc_image_rom_u90.u90", 0x040000, 0x10000, CRC(0132aefa) SHA1(9bf11ebc06f1069ea056427750902c204facbd3d) ) + ROM_LOAD( "rev2_narc_image_rom_u89.u89", 0x050000, 0x10000, CRC(f7260c9e) SHA1(5a3fd88c7c0fa01ec2eb6fdef380ccee9d7da3a8) ) + ROM_LOAD( "rev2_narc_image_rom_u88.u88", 0x060000, 0x10000, CRC(edc19f42) SHA1(b7121b3df743e5744ae72de2216b679fe71a2049) ) + ROM_LOAD( "rev2_narc_image_rom_u87.u87", 0x070000, 0x10000, CRC(d9b42ff9) SHA1(cab05a5f8aadff010fba1107eb2000cc128063ff) ) + ROM_LOAD( "rev2_narc_image_rom_u86.u86", 0x080000, 0x10000, CRC(af7daad3) SHA1(e2635a0acd6a238159ef91c1c3c9dfe8de8ae18f) ) + ROM_LOAD( "rev2_narc_image_rom_u85.u85", 0x090000, 0x10000, CRC(095fae6b) SHA1(94f1df799142990a559e54cd949d9723481806b1) ) + ROM_LOAD( "rev2_narc_image_rom_u84.u84", 0x0a0000, 0x10000, CRC(3fdf2057) SHA1(25ac6263a4eb962d90a305572fb95b75cb9f4138) ) + ROM_LOAD( "rev2_narc_image_rom_u83.u83", 0x0b0000, 0x10000, CRC(f2d27c9f) SHA1(de30c7e0191adf62b11b2f2fbdf80687e653de12) ) + ROM_LOAD( "rev2_narc_image_rom_u82.u82", 0x0c0000, 0x10000, CRC(962ce47c) SHA1(ea32f7f58a5ec1d941b372db5378d14fd850a2a7) ) + ROM_LOAD( "rev2_narc_image_rom_u81.u81", 0x0d0000, 0x10000, CRC(00fe59ec) SHA1(85efd623b9cd75b249e19b2e97440a47718da728) ) + ROM_LOAD( "rev2_narc_image_rom_u80.u80", 0x0e0000, 0x10000, CRC(147ba8e9) SHA1(1065b57082e0198025fe6f0bb3548f37c6a715e4) ) + // U79 socket not populated + + ROM_LOAD( "rev2_narc_image_rom_u76.u76", 0x200000, 0x10000, CRC(1cd897f4) SHA1(80414c3718ac6719abcca83f483302fc16fcfef3) ) + ROM_LOAD( "rev2_narc_image_rom_u75.u75", 0x210000, 0x10000, CRC(78abfa01) SHA1(1523f537491b901f2d987d4443077b92e24b969d) ) + ROM_LOAD( "rev2_narc_image_rom_u74.u74", 0x220000, 0x10000, CRC(66d2a234) SHA1(290b3051fa9d35e24a9d00fcc2b72d2751f3e7f1) ) + ROM_LOAD( "rev2_narc_image_rom_u73.u73", 0x230000, 0x10000, CRC(efa5cd4e) SHA1(7aca6058d644a025c6799d55ffa082ba8eb5d76f) ) + ROM_LOAD( "rev2_narc_image_rom_u72.u72", 0x240000, 0x10000, CRC(70638eb5) SHA1(fbafb354fca7c3c402be5073fa03060de569f536) ) + ROM_LOAD( "rev2_narc_image_rom_u71.u71", 0x250000, 0x10000, CRC(61226883) SHA1(09a366df0603cc0afc8c6c5547ec6ae3a02724b2) ) + ROM_LOAD( "rev2_narc_image_rom_u70.u70", 0x260000, 0x10000, CRC(c808849f) SHA1(bd3f69c4641331738e415d6d72fafe0eeeb2e56b) ) + ROM_LOAD( "rev2_narc_image_rom_u69.u69", 0x270000, 0x10000, CRC(e7f9c34f) SHA1(f65aed012f1d575a63690222b8c8f2c56bc196c3) ) + ROM_LOAD( "rev2_narc_image_rom_u68.u68", 0x280000, 0x10000, CRC(88a634d5) SHA1(9ddf86ca8cd91965348bc311cc722151f831db21) ) + ROM_LOAD( "rev2_narc_image_rom_u67.u67", 0x290000, 0x10000, CRC(4ab8b69e) SHA1(4320407c78864edc7876ad3604405414a3e7762d) ) + ROM_LOAD( "rev2_narc_image_rom_u66.u66", 0x2a0000, 0x10000, CRC(e1da4b25) SHA1(c81ed1ffc0a4bf64e794a1313559453f9455c312) ) + ROM_LOAD( "rev2_narc_image_rom_u65.u65", 0x2b0000, 0x10000, CRC(6df0d125) SHA1(37392cc917e73cfa09970fd24503b45ced399976) ) + ROM_LOAD( "rev2_narc_image_rom_u64.u64", 0x2c0000, 0x10000, CRC(abab1b16) SHA1(2913a94e1fcf8df52e29d0fb6e373aa64d23c019) ) + ROM_LOAD( "rev2_narc_image_rom_u63.u63", 0x2d0000, 0x10000, CRC(80602f31) SHA1(f1c5c4476dbf80382f33c0776c103cff9bed8346) ) + ROM_LOAD( "rev2_narc_image_rom_u62.u62", 0x2e0000, 0x10000, CRC(c2a476d1) SHA1(ffde1784548050d87f1404aaca3689417e6f7a81) ) + // U61 socket not populated + + ROM_LOAD( "rev2_narc_image_rom_u58.u58", 0x400000, 0x10000, CRC(8a7501e3) SHA1(dcd87c464fcb88180cc1c24ec82586440a197a5c) ) + ROM_LOAD( "rev2_narc_image_rom_u57.u57", 0x410000, 0x10000, CRC(a504735f) SHA1(2afe58e576eea2e0326c6b42adb621358a270881) ) + ROM_LOAD( "rev2_narc_image_rom_u56.u56", 0x420000, 0x10000, CRC(55f8cca7) SHA1(0b0a0d50be4401e4ac4e75d8040f18540f9ddc61) ) + ROM_LOAD( "rev2_narc_image_rom_u55.u55", 0x430000, 0x10000, CRC(d3c932c1) SHA1(1a7ffc04e796ba355506bf9037c21aef18fe01a3) ) + ROM_LOAD( "rev2_narc_image_rom_u54.u54", 0x440000, 0x10000, CRC(c7f4134b) SHA1(aea523e17f95c27d1f2c1f69884f626d96c8cb3b) ) + ROM_LOAD( "rev2_narc_image_rom_u53.u53", 0x450000, 0x10000, CRC(6be4da56) SHA1(35a93a259be04a644ca70df4922f6915274c3932) ) + ROM_LOAD( "rev2_narc_image_rom_u52.u52", 0x460000, 0x10000, CRC(1ea36a4a) SHA1(78e5437d46c1ecff5e221bc301925b10f00c5269) ) + ROM_LOAD( "rev2_narc_image_rom_u51.u51", 0x470000, 0x10000, CRC(9d4b0324) SHA1(80fb38a9ac81a0383112df680b9755d7cccbd50b) ) + ROM_LOAD( "rev2_narc_image_rom_u50.u50", 0x480000, 0x10000, CRC(6f9f0c26) SHA1(be77d99fb37fa31c3824725b28ee74206c584b90) ) + ROM_LOAD( "rev2_narc_image_rom_u49.u49", 0x490000, 0x10000, CRC(80386fce) SHA1(f182ed0f1a3753dedc56cb120cb8d10e1556e966) ) + ROM_LOAD( "rev2_narc_image_rom_u48.u48", 0x4a0000, 0x10000, CRC(05c16185) SHA1(429910c5b1f1fe47fdec6cfcba765ee9f10749f0) ) + ROM_LOAD( "rev2_narc_image_rom_u47.u47", 0x4b0000, 0x10000, CRC(4c0151f1) SHA1(b526066fc594f3ec83bb4866986e3b73cdae3992) ) + ROM_LOAD( "rev2_narc_image_rom_u46.u46", 0x4c0000, 0x10000, CRC(5670bfcb) SHA1(b20829b715c6421894c10c02aebb08d22b5109c9) ) + ROM_LOAD( "rev2_narc_image_rom_u45.u45", 0x4d0000, 0x10000, CRC(27f10d98) SHA1(b027ade2b4a52977d9c40c9549b9067d37fab41c) ) + ROM_LOAD( "rev2_narc_image_rom_u44.u44", 0x4e0000, 0x10000, CRC(93b8eaa4) SHA1(b786f3286c5443cf08e556e9fb030b3444288f3c) ) + // U43 socket not populated + + ROM_LOAD( "rev2_narc_image_rom_u40.u40", 0x600000, 0x10000, CRC(7fcaebc7) SHA1(b951d63c072d693f7dfc7e362a12513eb9bd6bab) ) + ROM_LOAD( "rev2_narc_image_rom_u39.u39", 0x610000, 0x10000, CRC(7db5cf52) SHA1(478aefc1126493378d22c857646e2fce221c7d21) ) + ROM_LOAD( "rev2_narc_image_rom_u38.u38", 0x620000, 0x10000, CRC(3f9f3ef7) SHA1(5315e8c372bb63d95f814d8eafe0f41e4d95ba1a) ) + ROM_LOAD( "rev2_narc_image_rom_u37.u37", 0x630000, 0x10000, CRC(ed81826c) SHA1(afe1c0fc692a802279c1f7f31143d33028d35ce4) ) + ROM_LOAD( "rev2_narc_image_rom_u36.u36", 0x640000, 0x10000, CRC(e5d855c0) SHA1(3fa0f765238ad2a27c0c65805bf56ebfbe50bf05) ) + ROM_LOAD( "rev2_narc_image_rom_u35.u35", 0x650000, 0x10000, CRC(3a7b1329) SHA1(e8b547a3b8f85cd13e12cfe0bf3949acc1486e6b) ) + ROM_LOAD( "rev2_narc_image_rom_u34.u34", 0x660000, 0x10000, CRC(fe982b0e) SHA1(a03e7e348186339fd93ce119f65e8f0ea7b7bb7a) ) + ROM_LOAD( "rev2_narc_image_rom_u33.u33", 0x670000, 0x10000, CRC(6bc7eb0f) SHA1(6964ef63d0daf1bc7fa9585567659cfc198b6cc3) ) + ROM_LOAD( "rev2_narc_image_rom_u32.u32", 0x680000, 0x10000, CRC(5875a6d3) SHA1(ae64aa786239be39c3c99bbe019bdc91003c1691) ) + ROM_LOAD( "rev2_narc_image_rom_u31.u31", 0x690000, 0x10000, CRC(2fa4b8e5) SHA1(8e4e4abd60d20e0ef955ac4b1f300cfd157e50ca) ) + ROM_LOAD( "rev2_narc_image_rom_u30.u30", 0x6a0000, 0x10000, CRC(7e4bb8ee) SHA1(7166bd56a569329e01ed0c03579a403d659a4a7b) ) + ROM_LOAD( "rev2_narc_image_rom_u29.u29", 0x6b0000, 0x10000, CRC(45136fd9) SHA1(44388e16d02a8c55fed0dbbcd842c941fa4b11b1) ) + ROM_LOAD( "rev2_narc_image_rom_u28.u28", 0x6c0000, 0x10000, CRC(d6cdac24) SHA1(d4bbe3a1be89be7d21769bfe476b50c05cd0c357) ) + ROM_LOAD( "rev2_narc_image_rom_u27.u27", 0x6d0000, 0x10000, CRC(4d33bbec) SHA1(05a3bd66ff91c824e841ca3943585f6aa383c5c2) ) + ROM_LOAD( "rev2_narc_image_rom_u26.u26", 0x6e0000, 0x10000, CRC(cb19f784) SHA1(1e4d85603c940e247fdc45f0366dfb484285e588) ) + // U25 socket not populated +ROM_END + + ROM_START( narc4 ) ROM_REGION( 0x90000, "narcsnd:cpu0", 0 ) /* sound CPU */ ROM_LOAD( "rev2_narc_sound_rom_u4.u4", 0x50000, 0x10000, CRC(450a591a) SHA1(bbda8061262738e5866f2707f69483a0a51d2910) ) @@ -1873,8 +1982,8 @@ ROM_RELOAD( 0x60000, 0x10000 ) ROM_REGION16_LE( 0x100000, "user1", 0 ) /* 34010 code */ - ROM_LOAD16_BYTE( "trog_ii_u-105_la-3.u105", 0xc0000, 0x20000, CRC(d09cea97) SHA1(0c1384be2af8abbaf1c5c7f86f31ec605c18e798) ) - ROM_LOAD16_BYTE( "trog_ii_u-89_la-3.u89", 0xc0001, 0x20000, CRC(a61e3572) SHA1(5366f4c9592dc9e23ffe867a16cbf51d1811a622) ) + ROM_LOAD16_BYTE( "trog_ii_u-105_la-3.u105", 0xc0000, 0x20000, CRC(d09cea97) SHA1(0c1384be2af8abbaf1c5c7f86f31ec605c18e798) ) // sldh - rev LA3 2/14/91 + ROM_LOAD16_BYTE( "trog_ii_u-89_la-3.u89", 0xc0001, 0x20000, CRC(a61e3572) SHA1(5366f4c9592dc9e23ffe867a16cbf51d1811a622) ) // sldh - rev LA3 2/14/91 ROM_REGION( 0x800000, "gfx1", 0 ) ROM_LOAD( "trog_ii_u-111_la-1.u111", 0x000000, 0x20000, CRC(9ded08c1) SHA1(bbf069f218e3f3d67e45fa2229a471451b3a8f96) ) @@ -1893,6 +2002,36 @@ ROM_END +ROM_START( trog3a ) + ROM_REGION( 0x90000, "cvsd:cpu", 0 ) /* sound CPU */ + ROM_LOAD( "trog_ii_u-4_sl_1.u4", 0x10000, 0x10000, CRC(759d0bf4) SHA1(c4c3fa51c43cf7fd241ac1f33d7d220aa9f9edb3) ) + ROM_RELOAD( 0x20000, 0x10000 ) + ROM_LOAD( "trog_ii_u-19_sl_1.u19", 0x30000, 0x10000, CRC(960c333d) SHA1(da8ce8dfffffe7a2d60b3f75cc5aa88e5e2be659) ) + ROM_RELOAD( 0x40000, 0x10000 ) + ROM_LOAD( "trog_ii_u-20_sl_1.u20", 0x50000, 0x10000, CRC(67f1658a) SHA1(c85dc920ff4b292afa9f6681f31918a200799cc9) ) + ROM_RELOAD( 0x60000, 0x10000 ) + + ROM_REGION16_LE( 0x100000, "user1", 0 ) /* 34010 code */ + ROM_LOAD16_BYTE( "trog_ii_u-105_la-3.u105", 0xc0000, 0x20000, CRC(9b3841dd) SHA1(7af3b30857531de324afc44fc7577cefaea5aebb) ) // sldh - rev LA3 2/10/91 + ROM_LOAD16_BYTE( "trog_ii_u-89_la-3.u89", 0xc0001, 0x20000, CRC(9c0e6542) SHA1(a80ce0f1135cd48dcbf6f98e3f385ddcdba35af7) ) // sldh - rev LA3 2/10/91 + + ROM_REGION( 0x800000, "gfx1", 0 ) + ROM_LOAD( "trog_ii_u-111_la-1.u111", 0x000000, 0x20000, CRC(9ded08c1) SHA1(bbf069f218e3f3d67e45fa2229a471451b3a8f96) ) + ROM_LOAD( "trog_ii_u-112_la-1.u112", 0x020000, 0x20000, CRC(42293843) SHA1(cae77eeddd784573beccb79e54573da0e4ccdd8a) ) + ROM_LOAD( "trog_ii_u-113_la-1.u113", 0x040000, 0x20000, CRC(77f50cbb) SHA1(5f2df3aedd90871ac02bca07c66387f6cda0dfdf) ) // changes for LA1 + + ROM_LOAD( "trog_ii_u-106_la-1.u106", 0x080000, 0x20000, CRC(af2eb0d8) SHA1(3767e6f3853b092b40664c2b6c6a838f0243514b) ) + ROM_LOAD( "trog_ii_u-107_la-1.u107", 0x0a0000, 0x20000, CRC(88a7b3f6) SHA1(ba55f66929841a915d7b96aabf4b11e50ba6cfbd) ) + + ROM_LOAD( "trog_ii_u-95_la-1.u95", 0x200000, 0x20000, CRC(f3ba2838) SHA1(2bee6c783c84a9f3f9309d802f42983857190ece) ) + ROM_LOAD( "trog_ii_u-96_la-1.u96", 0x220000, 0x20000, CRC(cfed2e77) SHA1(7fc0f52ac844c9efcbcc3004c40f9f4fc7e1c346) ) + ROM_LOAD( "trog_ii_u-97_la-1.u97", 0x240000, 0x20000, CRC(3262d1f8) SHA1(754e3e8223edd11398b2db77fd5db619dad1577b) ) // changes for LA1 + + ROM_LOAD( "trog_ii_u-90_la-1.u90", 0x280000, 0x20000, CRC(16e06753) SHA1(62ec2b18e6b965ea0792d655d7878b4225da3aca) ) + ROM_LOAD( "trog_ii_u-91_la-1.u91", 0x2a0000, 0x20000, CRC(880a02c7) SHA1(ab1b2d24be4571a183b230d267c6c8167d4a42a4) ) +ROM_END + + ROM_START( trogpa6 ) ROM_REGION( 0x90000, "cvsd:cpu", 0 ) /* sound CPU */ ROM_LOAD( "trog_ii_u-4_sl_1.u4", 0x10000, 0x10000, CRC(759d0bf4) SHA1(c4c3fa51c43cf7fd241ac1f33d7d220aa9f9edb3) ) @@ -1909,14 +2048,44 @@ ROM_REGION( 0x800000, "gfx1", 0 ) ROM_LOAD( "trog_ii_u-111_la-1.u111", 0x000000, 0x20000, CRC(9ded08c1) SHA1(bbf069f218e3f3d67e45fa2229a471451b3a8f96) ) ROM_LOAD( "trog_ii_u-112_la-1.u112", 0x020000, 0x20000, CRC(42293843) SHA1(cae77eeddd784573beccb79e54573da0e4ccdd8a) ) - ROM_LOAD( "trog_ii_u-113_rev.6.u113",0x040000, 0x20000, CRC(ae50e5ea) SHA1(915b76f76e7ccbf2c4c28829cea15feaafea498b) ) + ROM_LOAD( "trog_ii_u-113_rev.5.u113",0x040000, 0x20000, CRC(ae50e5ea) SHA1(915b76f76e7ccbf2c4c28829cea15feaafea498b) ) ROM_LOAD( "trog_ii_u-106_la-1.u106", 0x080000, 0x20000, CRC(af2eb0d8) SHA1(3767e6f3853b092b40664c2b6c6a838f0243514b) ) ROM_LOAD( "trog_ii_u-107_la-1.u107", 0x0a0000, 0x20000, CRC(88a7b3f6) SHA1(ba55f66929841a915d7b96aabf4b11e50ba6cfbd) ) ROM_LOAD( "trog_ii_u-95_la-1.u95", 0x200000, 0x20000, CRC(f3ba2838) SHA1(2bee6c783c84a9f3f9309d802f42983857190ece) ) ROM_LOAD( "trog_ii_u-96_la-1.u96", 0x220000, 0x20000, CRC(cfed2e77) SHA1(7fc0f52ac844c9efcbcc3004c40f9f4fc7e1c346) ) - ROM_LOAD( "trog_ii_u-97_rev.6.u97", 0x240000, 0x20000, CRC(354b1cb3) SHA1(88400e39f0476d32a0798c50855a8ff9dc0a6617) ) + ROM_LOAD( "trog_ii_u-97_rev.5.u97", 0x240000, 0x20000, CRC(354b1cb3) SHA1(88400e39f0476d32a0798c50855a8ff9dc0a6617) ) + + ROM_LOAD( "trog_ii_u-90_la-1.u90", 0x280000, 0x20000, CRC(16e06753) SHA1(62ec2b18e6b965ea0792d655d7878b4225da3aca) ) + ROM_LOAD( "trog_ii_u-91_la-1.u91", 0x2a0000, 0x20000, CRC(880a02c7) SHA1(ab1b2d24be4571a183b230d267c6c8167d4a42a4) ) +ROM_END + + +ROM_START( trogpa5 ) + ROM_REGION( 0x90000, "cvsd:cpu", 0 ) /* sound CPU */ + ROM_LOAD( "trog_ii_u-4_sl_1.u4", 0x10000, 0x10000, CRC(759d0bf4) SHA1(c4c3fa51c43cf7fd241ac1f33d7d220aa9f9edb3) ) + ROM_RELOAD( 0x20000, 0x10000 ) + ROM_LOAD( "trog_ii_u-19_sl_1.u19", 0x30000, 0x10000, CRC(960c333d) SHA1(da8ce8dfffffe7a2d60b3f75cc5aa88e5e2be659) ) + ROM_RELOAD( 0x40000, 0x10000 ) + ROM_LOAD( "trog_ii_u-20_sl_1.u20", 0x50000, 0x10000, CRC(67f1658a) SHA1(c85dc920ff4b292afa9f6681f31918a200799cc9) ) + ROM_RELOAD( 0x60000, 0x10000 ) + + ROM_REGION16_LE( 0x100000, "user1", 0 ) /* 34010 code */ + ROM_LOAD16_BYTE( "trog_ii_u-105_rev.5.u105", 0xc0000, 0x20000, CRC(da645900) SHA1(202a3c89b5fbda676a1c875b6e4c19853ab75983) ) + ROM_LOAD16_BYTE( "trog_ii_u-89_rev.5.u89", 0xc0001, 0x20000, CRC(d42d0f71) SHA1(8fc8af1544ff6fb7258ce9d810e566c3751c871c) ) + + ROM_REGION( 0x800000, "gfx1", 0 ) + ROM_LOAD( "trog_ii_u-111_la-1.u111", 0x000000, 0x20000, CRC(9ded08c1) SHA1(bbf069f218e3f3d67e45fa2229a471451b3a8f96) ) + ROM_LOAD( "trog_ii_u-112_la-1.u112", 0x020000, 0x20000, CRC(42293843) SHA1(cae77eeddd784573beccb79e54573da0e4ccdd8a) ) + ROM_LOAD( "trog_ii_u-113_rev.5.u113",0x040000, 0x20000, CRC(ae50e5ea) SHA1(915b76f76e7ccbf2c4c28829cea15feaafea498b) ) // changes with PAC5 + + ROM_LOAD( "trog_ii_u-106_la-1.u106", 0x080000, 0x20000, CRC(af2eb0d8) SHA1(3767e6f3853b092b40664c2b6c6a838f0243514b) ) + ROM_LOAD( "trog_ii_u-107_la-1.u107", 0x0a0000, 0x20000, CRC(88a7b3f6) SHA1(ba55f66929841a915d7b96aabf4b11e50ba6cfbd) ) + + ROM_LOAD( "trog_ii_u-95_la-1.u95", 0x200000, 0x20000, CRC(f3ba2838) SHA1(2bee6c783c84a9f3f9309d802f42983857190ece) ) + ROM_LOAD( "trog_ii_u-96_la-1.u96", 0x220000, 0x20000, CRC(cfed2e77) SHA1(7fc0f52ac844c9efcbcc3004c40f9f4fc7e1c346) ) + ROM_LOAD( "trog_ii_u-97_rev.5.u97", 0x240000, 0x20000, CRC(354b1cb3) SHA1(88400e39f0476d32a0798c50855a8ff9dc0a6617) ) // changes with PAC5 ROM_LOAD( "trog_ii_u-90_la-1.u90", 0x280000, 0x20000, CRC(16e06753) SHA1(62ec2b18e6b965ea0792d655d7878b4225da3aca) ) ROM_LOAD( "trog_ii_u-91_la-1.u91", 0x2a0000, 0x20000, CRC(880a02c7) SHA1(ab1b2d24be4571a183b230d267c6c8167d4a42a4) ) @@ -1939,14 +2108,14 @@ ROM_REGION( 0x800000, "gfx1", 0 ) ROM_LOAD( "trog_ii_u-111_la-1.u111", 0x000000, 0x20000, CRC(9ded08c1) SHA1(bbf069f218e3f3d67e45fa2229a471451b3a8f96) ) ROM_LOAD( "trog_ii_u-112_la-1.u112", 0x020000, 0x20000, CRC(42293843) SHA1(cae77eeddd784573beccb79e54573da0e4ccdd8a) ) - ROM_LOAD( "trogu113.pa4", 0x040000, 0x20000, CRC(2980a56f) SHA1(1e6ab16be6071d6568149e9ba56e146e3431b5f2) ) + ROM_LOAD( "trogu113.pa4", 0x040000, 0x20000, CRC(2980a56f) SHA1(1e6ab16be6071d6568149e9ba56e146e3431b5f2) ) // unique to rev 4.00 ROM_LOAD( "trog_ii_u-106_la-1.u106", 0x080000, 0x20000, CRC(af2eb0d8) SHA1(3767e6f3853b092b40664c2b6c6a838f0243514b) ) ROM_LOAD( "trog_ii_u-107_la-1.u107", 0x0a0000, 0x20000, CRC(88a7b3f6) SHA1(ba55f66929841a915d7b96aabf4b11e50ba6cfbd) ) ROM_LOAD( "trog_ii_u-95_la-1.u95", 0x200000, 0x20000, CRC(f3ba2838) SHA1(2bee6c783c84a9f3f9309d802f42983857190ece) ) ROM_LOAD( "trog_ii_u-96_la-1.u96", 0x220000, 0x20000, CRC(cfed2e77) SHA1(7fc0f52ac844c9efcbcc3004c40f9f4fc7e1c346) ) - ROM_LOAD( "trogu97.pa4", 0x240000, 0x20000, CRC(f94b77c1) SHA1(d4ca3d7270ea1d86cb5c53e85dc7682b0e5945ef) ) + ROM_LOAD( "trogu97.pa4", 0x240000, 0x20000, CRC(f94b77c1) SHA1(d4ca3d7270ea1d86cb5c53e85dc7682b0e5945ef) ) // unique to rev 4.00 ROM_LOAD( "trog_ii_u-90_la-1.u90", 0x280000, 0x20000, CRC(16e06753) SHA1(62ec2b18e6b965ea0792d655d7878b4225da3aca) ) ROM_LOAD( "trog_ii_u-91_la-1.u91", 0x2a0000, 0x20000, CRC(880a02c7) SHA1(ab1b2d24be4571a183b230d267c6c8167d4a42a4) ) @@ -1965,8 +2134,8 @@ ROM_COPY( "cvsd:cpu", 0x70000, 0x80000, 0x10000 ) ROM_REGION16_LE( 0x100000, "user1", 0 ) // 34010 code - ROM_LOAD16_BYTE( "2", 0xc0000, 0x20000, CRC(e6095189) SHA1(a2caaf64e371050b37c63d9608ba5d289cf3cd91) ) - ROM_LOAD16_BYTE( "3", 0xc0001, 0x20000, CRC(fdd7cc65) SHA1(bfc4339953c122bca968f9cfa3a82df3584a3727) ) + ROM_LOAD16_BYTE( "2", 0xc0000, 0x20000, CRC(e6095189) SHA1(a2caaf64e371050b37c63d9608ba5d289cf3cd91) ) // == trog_ii_u-105_la-4.u105 + ROM_LOAD16_BYTE( "3", 0xc0001, 0x20000, CRC(fdd7cc65) SHA1(bfc4339953c122bca968f9cfa3a82df3584a3727) ) // == trog_ii_u-89_la-4.u89 ROM_REGION( 0x800000, "gfx1", 0 ) ROM_LOAD( "4", 0x000000, 0x80000, CRC(dd7cd402) SHA1(78419fddd98bc37d5382f22d2ce2615948f80d5f) ) @@ -3327,7 +3496,6 @@ ROM_END - /************************************* * * Game drivers @@ -3335,17 +3503,20 @@ *************************************/ GAME( 1988, narc, 0, zunit, narc, midyunit_state, init_narc, ROT0, "Williams", "Narc (rev 7.00)", MACHINE_SUPPORTS_SAVE ) +GAME( 1988, narc6, narc, zunit, narc, midyunit_state, init_narc, ROT0, "Williams", "Narc (rev 6.00)", MACHINE_SUPPORTS_SAVE ) GAME( 1988, narc4, narc, zunit, narc, midyunit_state, init_narc, ROT0, "Williams", "Narc (rev 4.00)", MACHINE_SUPPORTS_SAVE ) GAME( 1988, narc3, narc, zunit, narc, midyunit_state, init_narc, ROT0, "Williams", "Narc (rev 3.20)", MACHINE_SUPPORTS_SAVE ) GAME( 1988, narc2, narc, zunit, narc, midyunit_state, init_narc, ROT0, "Williams", "Narc (rev 2.00)", MACHINE_SUPPORTS_SAVE ) GAME( 1988, narc1, narc, zunit, narc, midyunit_state, init_narc, ROT0, "Williams", "Narc (rev 1.80)", MACHINE_SUPPORTS_SAVE ) -GAME( 1990, trog, 0, yunit_cvsd_4bit_slow, trog, midyunit_state, init_trog, ROT0, "Midway", "Trog (rev LA5 03/29/91)", MACHINE_SUPPORTS_SAVE ) -GAME( 1990, trog4, trog, yunit_cvsd_4bit_slow, trog, midyunit_state, init_trog, ROT0, "Midway", "Trog (rev LA4 03/11/91)", MACHINE_SUPPORTS_SAVE ) -GAME( 1990, trog3, trog, yunit_cvsd_4bit_slow, trog, midyunit_state, init_trog, ROT0, "Midway", "Trog (rev LA3 02/14/91)", MACHINE_SUPPORTS_SAVE ) -GAME( 1990, trogpa6, trog, yunit_cvsd_4bit_slow, trog, midyunit_state, init_trog, ROT0, "Midway", "Trog (prototype, rev PA6-PAC 09/09/90)", MACHINE_SUPPORTS_SAVE ) -GAME( 1990, trogpa4, trog, yunit_cvsd_4bit_slow, trogpa4, midyunit_state, init_trog, ROT0, "Midway", "Trog (prototype, rev 4.00 07/27/90)", MACHINE_SUPPORTS_SAVE ) -GAME( 1990, mazebl, trog, yunit_cvsd_4bit_slow, trog, midyunit_state, init_trog, ROT0, "bootleg", "Maze (Trog bootleg)", MACHINE_SUPPORTS_SAVE ) +GAME( 1990, trog, 0, yunit_cvsd_4bit_slow, trog, midyunit_state, init_trog, ROT0, "Midway", "Trog (rev LA5 3/29/91)", MACHINE_SUPPORTS_SAVE ) +GAME( 1990, trog4, trog, yunit_cvsd_4bit_slow, trog, midyunit_state, init_trog, ROT0, "Midway", "Trog (rev LA4 3/11/91)", MACHINE_SUPPORTS_SAVE ) +GAME( 1990, trog3, trog, yunit_cvsd_4bit_slow, trog, midyunit_state, init_trog, ROT0, "Midway", "Trog (rev LA3 2/14/91)", MACHINE_SUPPORTS_SAVE ) +GAME( 1990, trog3a, trog, yunit_cvsd_4bit_slow, trog, midyunit_state, init_trog, ROT0, "Midway", "Trog (rev LA3 2/10/91)", MACHINE_SUPPORTS_SAVE ) +GAME( 1990, trogpa6, trog, yunit_cvsd_4bit_slow, trog, midyunit_state, init_trog, ROT0, "Midway", "Trog (prototype, rev PA6-PAC 9/09/90)", MACHINE_SUPPORTS_SAVE ) +GAME( 1990, trogpa5, trog, yunit_cvsd_4bit_slow, trog, midyunit_state, init_trog, ROT0, "Midway", "Trog (prototype, rev PA5-PAC 8/28/90)", MACHINE_SUPPORTS_SAVE ) +GAME( 1990, trogpa4, trog, yunit_cvsd_4bit_slow, trogpa4, midyunit_state, init_trog, ROT0, "Midway", "Trog (prototype, rev 4.00 7/27/90)", MACHINE_SUPPORTS_SAVE ) +GAME( 1990, mazebl, trog, yunit_cvsd_4bit_slow, trog, midyunit_state, init_trog, ROT0, "bootleg", "Maze (Trog rev LA4 3/11/91 bootleg)", MACHINE_SUPPORTS_SAVE ) GAME( 1990, smashtv, 0, yunit_cvsd_6bit_slow, smashtv, midyunit_state, init_smashtv, ROT0, "Williams", "Smash T.V. (rev 8.00)", MACHINE_SUPPORTS_SAVE ) GAME( 1990, smashtv6, smashtv, yunit_cvsd_6bit_slow, smashtv, midyunit_state, init_smashtv, ROT0, "Williams", "Smash T.V. (rev 6.00)", MACHINE_SUPPORTS_SAVE ) @@ -3392,4 +3563,4 @@ GAME( 1992, mkyawdim4, mk, mkyawdim, mkyawdim, midyunit_state, init_mkyawdim, ROT0, "bootleg (Yawdim)", "Mortal Kombat (Yawdim bootleg, set 4)", MACHINE_SUPPORTS_SAVE | MACHINE_IMPERFECT_SOUND) // are some sound effects missing/wrong? GAME( 1992, totcarn, 0, yunit_adpcm_6bit_fast, totcarn, midyunit_state, init_totcarn, ROT0, "Midway", "Total Carnage (rev LA1 03/10/92)", MACHINE_SUPPORTS_SAVE ) -GAME( 1992, totcarnp, totcarn, yunit_adpcm_6bit_fast, totcarn, midyunit_state, init_totcarn, ROT0, "Midway", "Total Carnage (prototype, proto v1.0 01/25/92)", MACHINE_SUPPORTS_SAVE ) +GAME( 1992, totcarnp, totcarn, yunit_adpcm_6bit_fast, totcarn, midyunit_state, init_totcarn, ROT0, "Midway", "Total Carnage (prototype, proto v 1.0 01/25/92)", MACHINE_SUPPORTS_SAVE ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/missb2.cpp mame-0.231+dfsg.1/src/mame/drivers/missb2.cpp --- mame-0.230+dfsg.1/src/mame/drivers/missb2.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/missb2.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -18,8 +18,8 @@ #include "includes/bublbobl.h" #include "cpu/z80/z80.h" -#include "sound/3526intf.h" #include "sound/okim6295.h" +#include "sound/ym3526.h" #include "machine/watchdog.h" #include "emupal.h" #include "screen.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/mitchell.cpp mame-0.231+dfsg.1/src/mame/drivers/mitchell.cpp --- mame-0.230+dfsg.1/src/mame/drivers/mitchell.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/mitchell.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -123,9 +123,9 @@ #include "cpu/z80/z80.h" #include "machine/kabuki.h" // needed for decoding functions only #include "sound/okim6295.h" -#include "sound/3812intf.h" #include "sound/msm5205.h" #include "sound/ym2413.h" +#include "sound/ym3812.h" #include "screen.h" #include "speaker.h" @@ -350,8 +350,8 @@ map(0x00, 0x02).r(FUNC(mitchell_state::input_r)); /* The Mahjong games and Block Block need special input treatment */ map(0x01, 0x01).w(FUNC(mitchell_state::input_w)); map(0x02, 0x02).w(FUNC(mitchell_state::pang_bankswitch_w)); /* Code bank register */ - map(0x03, 0x03).w("ymsnd", FUNC(ym2413_device::data_port_w)); - map(0x04, 0x04).w("ymsnd", FUNC(ym2413_device::register_port_w)); + map(0x03, 0x03).w("ymsnd", FUNC(ym2413_device::data_w)); + map(0x04, 0x04).w("ymsnd", FUNC(ym2413_device::address_w)); map(0x05, 0x05).r(FUNC(mitchell_state::pang_port5_r)).w(m_oki, FUNC(okim6295_device::write)); map(0x06, 0x06).noprw(); /* watchdog? IRQ ack? video buffering? */ map(0x07, 0x07).w(FUNC(mitchell_state::pang_video_bank_w)); /* Video RAM bank register */ @@ -455,7 +455,7 @@ { map.global_mask(0xff); map(0x00, 0x00).portr("IN0").w(FUNC(mitchell_state::pang_gfxctrl_w)); /* Palette bank, layer enable, coin counters, more */ - map(0x01, 0x01).portr("IN1").w("ymsnd", FUNC(ym2413_device::register_port_w)); // TODO: hold buttons are here, multiplexed but not in the same way as the original + map(0x01, 0x01).portr("IN1").w("ymsnd", FUNC(ym2413_device::address_w)); // TODO: hold buttons are here, multiplexed but not in the same way as the original map(0x02, 0x02).portr("IN2").w(FUNC(mitchell_state::pang_bankswitch_w)); /* Code bank register */ map(0x03, 0x03).portr("DSW0"); map(0x04, 0x04).portr("DSW1"); @@ -463,7 +463,7 @@ map(0x06, 0x06).noprw(); /* watchdog? IRQ ack? video buffering? */ map(0x07, 0x07).w(FUNC(mitchell_state::pang_video_bank_w)); /* Video RAM bank register */ map(0x08, 0x08).w(FUNC(mitchell_state::eeprom_cs_w)); - map(0x09, 0x09).w("ymsnd", FUNC(ym2413_device::data_port_w)); + map(0x09, 0x09).w("ymsnd", FUNC(ym2413_device::data_w)); map(0x10, 0x10).w(FUNC(mitchell_state::eeprom_clock_w)); map(0x18, 0x18).w(FUNC(mitchell_state::eeprom_serial_w)); } diff -Nru mame-0.230+dfsg.1/src/mame/drivers/model1.cpp mame-0.231+dfsg.1/src/mame/drivers/model1.cpp --- mame-0.230+dfsg.1/src/mame/drivers/model1.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/model1.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -597,6 +597,7 @@ #include "machine/clock.h" #include "machine/model1io.h" #include "machine/model1io2.h" +#include "machine/nvram.h" #include "speaker.h" #include "vr.lh" @@ -609,7 +610,8 @@ u8 model1_state::dpram_r(offs_t offset) { // insert waitstate - m_maincpu->adjust_icount(-1); + if (!machine().side_effects_disabled()) + m_maincpu->adjust_icount(-1); return m_dpram->right_r(offset); } @@ -893,7 +895,7 @@ /* ROMO */ map(0x100000, 0x1fffff).bankr("bank1"); /* ROMX */ map(0x200000, 0x2fffff).rom(); /* ROMY */ - /* RAMA */ map(0x400000, 0x40ffff).ram(); + /* RAMA */ map(0x400000, 0x40ffff).ram().share("nvram"); /* RAMB */ map(0x500000, 0x53ffff).ram(); /* TGP */ map(0x600000, 0x60ffff).ram().share("display_list0"); @@ -1712,6 +1714,8 @@ m_maincpu->set_addrmap(AS_IO, &model1_state::model1_io); m_maincpu->set_irq_acknowledge_callback(FUNC(model1_state::irq_callback)); + NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // exact type uncertain + GENERIC_FIFO_U32(config, "copro_fifo_in", 0); GENERIC_FIFO_U32(config, "copro_fifo_out", 0); diff -Nru mame-0.230+dfsg.1/src/mame/drivers/namcofl.cpp mame-0.231+dfsg.1/src/mame/drivers/namcofl.cpp --- mame-0.230+dfsg.1/src/mame/drivers/namcofl.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/namcofl.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -168,7 +168,7 @@ #include "machine/nvram.h" #include "speaker.h" -#include "namcofl.lh" +#include "finalapr.lh" #include @@ -799,7 +799,7 @@ } GAME( 1995, speedrcr, 0, namcofl, speedrcr, namcofl_state, driver_init, ROT0, "Namco", "Speed Racer", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NODEVICE_LAN | MACHINE_SUPPORTS_SAVE ) -GAMEL( 1995, finalapr, 0, namcofl, finalapr, namcofl_state, driver_init, ROT0, "Namco", "Final Lap R (Rev. B)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NODEVICE_LAN | MACHINE_SUPPORTS_SAVE, layout_namcofl ) -GAMEL( 1995, finalapr1, finalapr, namcofl, finalapr, namcofl_state, driver_init, ROT0, "Namco", "Final Lap R", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NODEVICE_LAN | MACHINE_SUPPORTS_SAVE, layout_namcofl ) -GAMEL( 1995, finalaprj, finalapr, namcofl, finalapr, namcofl_state, driver_init, ROT0, "Namco", "Final Lap R (Japan Rev. C)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NODEVICE_LAN | MACHINE_SUPPORTS_SAVE, layout_namcofl ) -GAMEL( 1995, finalaprj1, finalapr, namcofl, finalapr, namcofl_state, driver_init, ROT0, "Namco", "Final Lap R (Japan Rev. B)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NODEVICE_LAN | MACHINE_SUPPORTS_SAVE, layout_namcofl ) +GAMEL( 1995, finalapr, 0, namcofl, finalapr, namcofl_state, driver_init, ROT0, "Namco", "Final Lap R (Rev. B)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NODEVICE_LAN | MACHINE_SUPPORTS_SAVE, layout_finalapr ) +GAMEL( 1995, finalapr1, finalapr, namcofl, finalapr, namcofl_state, driver_init, ROT0, "Namco", "Final Lap R", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NODEVICE_LAN | MACHINE_SUPPORTS_SAVE, layout_finalapr ) +GAMEL( 1995, finalaprj, finalapr, namcofl, finalapr, namcofl_state, driver_init, ROT0, "Namco", "Final Lap R (Japan Rev. C)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NODEVICE_LAN | MACHINE_SUPPORTS_SAVE, layout_finalapr ) +GAMEL( 1995, finalaprj1, finalapr, namcofl, finalapr, namcofl_state, driver_init, ROT0, "Namco", "Final Lap R (Japan Rev. B)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NODEVICE_LAN | MACHINE_SUPPORTS_SAVE, layout_finalapr ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/namconb1.cpp mame-0.231+dfsg.1/src/mame/drivers/namconb1.cpp --- mame-0.230+dfsg.1/src/mame/drivers/namconb1.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/namconb1.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -986,7 +986,7 @@ m_screen->screen_vblank().set(FUNC(namconb1_state::screen_vblank)); m_screen->set_palette(m_c116); - NAMCO_C355SPR(config, m_c355spr, 0); + NAMCO_C355SPR(config, m_c355spr); m_c355spr->set_screen(m_screen); m_c355spr->set_palette(m_c116); m_c355spr->set_scroll_offsets(0x26, 0x19); @@ -995,12 +995,12 @@ m_c355spr->set_buffer(2); // triple buffered m_c355spr->set_color_base(0); - NAMCO_C123TMAP(config, m_c123tmap, 0); + NAMCO_C123TMAP(config, m_c123tmap); m_c123tmap->set_palette(m_c116); m_c123tmap->set_tile_callback(namco_c123tmap_device::c123_tilemap_delegate(&namconb1_state::NB1TilemapCB, this)); m_c123tmap->set_color_base(0x1000); - NAMCO_C116(config, m_c116, 0); + NAMCO_C116(config, m_c116); m_c116->enable_shadows(); SPEAKER(config, "lspeaker").front_left(); @@ -1021,7 +1021,7 @@ m_screen->set_screen_update(FUNC(namconb1_state::screen_update_namconb2)); - NAMCO_C169ROZ(config, m_c169roz, 0); + NAMCO_C169ROZ(config, m_c169roz); m_c169roz->set_palette(m_c116); m_c169roz->set_is_namcofl(false); m_c169roz->set_ram_words(0x20000 / 2); diff -Nru mame-0.230+dfsg.1/src/mame/drivers/namcos11.cpp mame-0.231+dfsg.1/src/mame/drivers/namcos11.cpp --- mame-0.230+dfsg.1/src/mame/drivers/namcos11.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/namcos11.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -1267,6 +1267,28 @@ ROM_RELOAD( 0x800000, 0x400000 ) ROM_END +// no rom labels, converted from Soul Edge (Japan, SO1/VER.A) +ROM_START( ptblank2c ) + ROM_REGION32_LE( 0x0400000, "maincpu:rom", 0 ) /* main prg */ + ROM_LOAD16_BYTE( "gnb2verx.2l", 0x0000000, 0x100000, CRC(c2a02ccf) SHA1(fa637ecacc3e72d432c91dbff7d59fe56f28bab2) ) + ROM_LOAD16_BYTE( "gnb2verx.2j", 0x0000001, 0x100000, CRC(96abd746) SHA1(13720d02ef9e7445422c07836296acde4db4aa50) ) + ROM_LOAD16_BYTE( "gnb1vera.2k", 0x0200000, 0x100000, CRC(e6335e4e) SHA1(9067f05d848c1c8a88967a3c6552d2d24e80672b) ) + ROM_LOAD16_BYTE( "gnb1vera.2f", 0x0200001, 0x100000, CRC(2bb7eb6d) SHA1(d1b1e031a28443140ac8652dfd77a65a042b67fc) ) + + ROM_REGION32_LE( 0x2000000, "bankedroms", 0 ) /* main data */ + ROM_LOAD16_BYTE( "gnb2prg.1", 0x0000000, 0x400000, CRC(8a8e77c3) SHA1(1a37e04a0acd1ab8c5fcbf807f24fd22f1d90a82) ) // == same data as the 64Mbit ROMs + ROM_LOAD16_BYTE( "gnb2prg.2", 0x0000001, 0x400000, CRC(563edc3f) SHA1(d691560bded88fe7738de01b293f1e761ab9304c) ) + ROM_LOAD16_BYTE( "gnb2prg.3", 0x0800000, 0x400000, CRC(94fbe733) SHA1(74634c3680d22697c1cc3059c2bbe1703e77ddf1) ) + ROM_LOAD16_BYTE( "gnb2prg.4", 0x0800001, 0x400000, CRC(1cbe79a6) SHA1(46e9f72c121ece3457b2f66413489ce6568e5510) ) + + ROM_REGION16_LE( 0x80000, "c76", 0 ) /* sound data */ + ROM_LOAD( "gnb1vera.6d", 0x0000000, 0x040000, CRC(6461ae77) SHA1(1377b716a69ef9d4d2e48083d23f22bd5c103c00) ) + + ROM_REGION( 0x1000000, "c352", 0 ) /* samples */ + ROM_LOAD( "gnb1wave.8k", 0x0000000, 0x400000, CRC(4e19d9d6) SHA1(0a92c987536999a789663a30c787950ab6995128) ) + ROM_RELOAD( 0x800000, 0x400000 ) +ROM_END + ROM_START( ptblank2ua ) ROM_REGION32_LE( 0x0400000, "maincpu:rom", 0 ) /* main prg */ ROM_LOAD16_BYTE( "gnb3vera.2l", 0x0000000, 0x100000, CRC(57ad719a) SHA1(f22a02d33c7c23cccffb8ce2e3aca26b07ecac0a) ) @@ -1776,4 +1798,5 @@ GAME( 1998, myangel3, 0, myangel3, myangel3, namcos11_state, empty_init, ROT0, "MOSS / Namco", "Kosodate Quiz My Angel 3 (Japan, KQT1/VER.A)", 0 ) GAME( 1999, ptblank2a, ptblank2 ,ptblank2ua, ptblank2ua, namcos11_state, empty_init, ROT0, "Namco", "Point Blank 2 (World, GNB2/VER.A)", 0 ) GAME( 1999, ptblank2b, ptblank2 ,ptblank2ua, ptblank2ua, namcos11_state, empty_init, ROT0, "Namco", "Point Blank 2 (World, GNB2/VER.A alt)", 0 ) +GAME( 1999, ptblank2c, ptblank2 ,ptblank2ua, ptblank2ua, namcos11_state, empty_init, ROT0, "Namco", "Point Blank 2 (unknown region)", 0 ) GAME( 1999, ptblank2ua, ptblank2, ptblank2ua, ptblank2ua, namcos11_state, empty_init, ROT0, "Namco", "Point Blank 2 (US, GNB3/VER.A)", 0 ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/namcos12.cpp mame-0.231+dfsg.1/src/mame/drivers/namcos12.cpp --- mame-0.230+dfsg.1/src/mame/drivers/namcos12.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/namcos12.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -43,7 +43,6 @@ Golgo 13 Kiseki no Dandou (GLS1/VER.A) (C) Raizing/Namco,2000 COH-700 SYSTEM12 MOTHER(C) SYSTEM12 M8F6 KC059 Kaiun Quiz (KW1/VER.A1) (C) Namco/MOSS, 1999 COH-700 SYSTEM12 MOTHER(C) SYSTEM12 M10X64 KC050 Kart Duel (KTD1/VER.A) (C) Namco, 2000 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M4F0 KC057 -Libero Grande (LG1/VER.A) (C) Namco, 1997 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M8F2F KC014 Libero Grande (LG2/VER.A) (C) Namco, 1997 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M8F2F KC014 Techno Drive (TH1/VER.B) (C) Namco, 1998 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M8F2F KC056 Mr Driller (DRI3/VER.A2) (C) Namco, 1999 COH-700 SYSTEM12 MOTHER(C) SYSTEM12 M8F2F KC048 @@ -70,6 +69,7 @@ Tekken 3 (TET2/VER.A) (C) Namco, 1996 COH-700 SYSTEM12 MOTHER SYSTEM12 M8F2F KC006 Tekken 3 (TET3/VER.A) (C) Namco, 1996 COH-700 SYSTEM12 MOTHER SYSTEM12 M8F2F KC006 Tekken 3 (TET3/VER.B) (C) Namco, 1996 COH-700 SYSTEM12 MOTHER SYSTEM12 M8F2F KC006 +Tekken 3 (TET2/VER.D) (C) Namco, 1996 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M8F2F KC006 Tekken 3 (TET3/VER.D) (C) Namco, 1996 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M8F2F KC006 Tekken 3 (TET1/VER.E1) (C) Namco, 1996 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M8F2F KC006 Tekken 3 (TET2/VER.E1) (C) Namco, 1996 COH-700 SYSTEM12 MOTHER(B) SYSTEM12 M8F2F KC006 @@ -2376,24 +2376,6 @@ ROM_LOAD( "lg1wave0.5", 0x0000000, 0x400000, CRC(4647fada) SHA1(99f5e9ded0c83f1a0d3670f6380bc15c1380671e) ) ROM_END -ROM_START( lbgrandeja ) - ROM_REGION32_LE( 0x00400000, "maincpu:rom", 0 ) /* main prg */ - ROM_LOAD16_BYTE( "lg1vera.2l", 0x0000000, 0x200000, CRC(ff269bcd) SHA1(f118b69ffe3ee1ad785c115c39d5166f3c546554) ) - ROM_LOAD16_BYTE( "lg1vera.2p", 0x0000001, 0x200000, CRC(46f9205c) SHA1(662b8f910e4ccc1a0e9f3fef0992a92abbebebd0) ) - - ROM_REGION32_LE( 0x1c00000, "bankedroms", 0 ) /* main data */ - ROM_LOAD16_BYTE( "lg1rom0l.6", 0x0000000, 0x400000, CRC(c5df7f27) SHA1(07c596efb2533b9adc579874b7e8ef7fcc7f73c3) ) - ROM_LOAD16_BYTE( "lg1rom0u.9", 0x0000001, 0x400000, CRC(74607817) SHA1(448a9213fa566fdbab5d789df064da7dc946ba2c) ) - ROM_LOAD16_BYTE( "lg1fl3l.12", 0x1800000, 0x200000, CRC(c9947d3e) SHA1(239b1f81ffac6a54b438082664124b6cf51a9b1c) ) - ROM_LOAD16_BYTE( "lg1fl3u.13", 0x1800001, 0x200000, CRC(f3d69f45) SHA1(546f588f144e1a75eee4a6d0a6cef8a3f79f0238) ) - - ROM_REGION( 0x0080000, "sub", 0 ) /* sound prg */ - ROM_LOAD16_WORD_SWAP( "lg1vera.11s", 0x0000000, 0x080000, CRC(de717a09) SHA1(78f26ff630c50632916fa17fa870dcde7f13781d) ) - - ROM_REGION( 0x1000000, "c352", 0 ) /* samples */ - ROM_LOAD( "lg1wave0.5", 0x0000000, 0x400000, CRC(4647fada) SHA1(99f5e9ded0c83f1a0d3670f6380bc15c1380671e) ) -ROM_END - ROM_START( mdhorse ) ROM_REGION32_LE( 0x00400000, "maincpu:rom", 0 ) /* main prg */ ROM_LOAD16_BYTE( "mdh1vera.2l", 0x0000000, 0x200000, CRC(fbb567b2) SHA1(899dccdfbc8dcbcdaf9b5df93e249a36f8cbf999) ) @@ -2810,6 +2792,29 @@ ROM_LOAD("cl1-leda.ic5", 0x0000, 0x40000, CRC(43602a58) SHA1(64156ded8c43dbbe84b5d6ae13a068c8b18e8aed) ) ROM_END +ROM_START( tekken3d ) + ROM_REGION32_LE( 0x00400000, "maincpu:rom", 0 ) /* main prg */ + ROM_LOAD16_BYTE( "tet2verd.2e", 0x0000000, 0x200000, CRC(ff269bcd) SHA1(f118b69ffe3ee1ad785c115c39d5166f3c546554) ) + ROM_LOAD16_BYTE( "tet2verd.2j", 0x0000001, 0x200000, CRC(46f9205c) SHA1(662b8f910e4ccc1a0e9f3fef0992a92abbebebd0) ) + + ROM_REGION32_LE( 0x1c00000, "bankedroms", 0 ) /* main data */ + ROM_LOAD16_BYTE( "tet1rom0l.6", 0x0000000, 0x400000, CRC(2886bb32) SHA1(08ad9da2df25ad8c933a812ac238c81135072929) ) + ROM_LOAD16_BYTE( "tet1rom0u.9", 0x0000001, 0x400000, CRC(c5705b92) SHA1(20df20c8d18eb4712d565a3df9a8d9270dee6aaa) ) + ROM_LOAD16_BYTE( "tet1rom1l.7", 0x0800000, 0x400000, CRC(0397d283) SHA1(ebafcd14cdb2601214129a84fc6830846f5cd274) ) + ROM_LOAD16_BYTE( "tet1rom1u.10", 0x0800001, 0x400000, CRC(502ba5cd) SHA1(19c1282245c6dbfc945c0bd0f3918968c3e5c3ed) ) + ROM_LOAD16_BYTE( "tet1rom2l.8", 0x1000000, 0x400000, CRC(e03b1c24) SHA1(8579b95a8fd06b7d2893ff88b228fd794162dff1) ) + ROM_LOAD16_BYTE( "tet1rom2u.11", 0x1000001, 0x400000, CRC(75eb2ab3) SHA1(dee43884e542391903f6aaae2c166e7921a86fb4) ) + ROM_LOAD16_BYTE( "tet1fl3l.12", 0x1800000, 0x200000, CRC(45513073) SHA1(8a36f58ee2d292b50e00c6bf275f9def358032d8) ) + ROM_LOAD16_BYTE( "tet1fl3u.13", 0x1800001, 0x200000, CRC(1917d993) SHA1(cabc44514a3e62a18a7f8f883603241447d6948b) ) + + ROM_REGION( 0x0080000, "sub", 0 ) /* sound prg */ + ROM_LOAD16_WORD_SWAP( "tet1verb.11s", 0x0000000, 0x080000, CRC(c92b98d1) SHA1(8ae6fba8c5b6b9a2ab9541eac8553b282f35750d) ) /* No label but different than tet1vera.11s */ + + ROM_REGION( 0x1000000, "c352", 0 ) /* samples */ + ROM_LOAD( "tet1wave0.5", 0x0000000, 0x400000, CRC(77ba7975) SHA1(fe9434dcf0fb232c85efaaae1b4b13d36099620a) ) + ROM_LOAD( "tet1wave1.4", 0x0400000, 0x400000, CRC(ffeba79f) SHA1(941412bbe9d0305d9a23c224c1bb774c4321f6df) ) +ROM_END + ROM_START( tekken3ud ) ROM_REGION32_LE( 0x00400000, "maincpu:rom", 0 ) /* main prg */ ROM_LOAD16_BYTE( "tet3verd.2e", 0x0000000, 0x200000, CRC(9056a8d1) SHA1(08269de80361672f1a193e5cdcd0d4571b746a85) ) @@ -3258,6 +3263,7 @@ ROM_END GAME( 1996, tekken3, 0, coh700, namcos12, namcos12_state, init_namcos12, ROT0, "Namco", "Tekken 3 (World, TET2/VER.E1)", 0 ) /* KC006 */ +GAME( 1996, tekken3d, tekken3, coh700, namcos12, namcos12_state, init_namcos12, ROT0, "Namco", "Tekken 3 (World, TET2/VER.D)", 0 ) /* KC006 */ GAME( 1996, tekken3b, tekken3, coh700, namcos12, namcos12_state, init_namcos12, ROT0, "Namco", "Tekken 3 (World, TET2/VER.B)", 0 ) /* KC006 */ GAME( 1996, tekken3a, tekken3, coh700, namcos12, namcos12_state, init_namcos12, ROT0, "Namco", "Tekken 3 (World, TET2/VER.A)", 0 ) /* KC006 */ GAME( 1996, tekken3ud, tekken3, coh700, namcos12, namcos12_state, init_namcos12, ROT0, "Namco", "Tekken 3 (US, TET3/VER.D)", 0 ) /* KC006 */ @@ -3265,7 +3271,6 @@ GAME( 1996, tekken3je1,tekken3, coh700, namcos12, namcos12_state, init_namcos12, ROT0, "Namco", "Tekken 3 (Japan, TET1/VER.E1)", 0 ) /* KC006 */ GAME( 1996, tekken3ja, tekken3, coh700, namcos12, namcos12_state, init_namcos12, ROT0, "Namco", "Tekken 3 (Japan, TET1/VER.A)", 0 ) /* KC006 */ GAME( 1997, lbgrande, 0, coh700, namcos12, namcos12_state, init_namcos12, ROT0, "Namco", "Libero Grande (World, LG2/VER.A)", 0 ) /* KC014 */ -GAME( 1997, lbgrandeja,lbgrande, coh700, namcos12, namcos12_state, init_namcos12, ROT0, "Namco", "Libero Grande (Japan, LG1/VER.A)", MACHINE_NOT_WORKING ) /* KC014 */ GAME( 1997, toukon3, 0, coh700, namcos12, namcos12_state, init_namcos12, ROT0, "Namco / Tomy", "Shin Nihon Pro Wrestling Toukon Retsuden 3 Arcade Edition (Japan, TR1/VER.A)", 0 ) /* KC019 */ GAME( 1998, soulclbr, 0, coh700, namcos12, namcos12_state, init_namcos12, ROT0, "Namco", "Soul Calibur (World, SOC14/VER.C)", 0 ) GAME( 1998, soulclbrwb,soulclbr, coh700, namcos12, namcos12_state, init_namcos12, ROT0, "Namco", "Soul Calibur (World, SOC14/VER.B)", 0 ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/namcos2.cpp mame-0.231+dfsg.1/src/mame/drivers/namcos2.cpp --- mame-0.230+dfsg.1/src/mame/drivers/namcos2.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/namcos2.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -1641,7 +1641,7 @@ void namcos2_state::configure_c116_standard(machine_config &config) { - NAMCO_C116(config, m_c116, 0); + NAMCO_C116(config, m_c116); m_c116->enable_shadows(); } @@ -1761,7 +1761,7 @@ void namcos2_state::configure_c123tmap_standard(machine_config &config) { - NAMCO_C123TMAP(config, m_c123tmap, 0); + NAMCO_C123TMAP(config, m_c123tmap); m_c123tmap->set_palette(m_c116); m_c123tmap->set_tile_callback(namco_c123tmap_device::c123_tilemap_delegate(&namcos2_state::TilemapCB, this)); m_c123tmap->set_color_base(16*256); @@ -1769,7 +1769,7 @@ void namcos2_state::configure_c169roz_standard(machine_config &config) { - NAMCO_C169ROZ(config, m_c169roz, 0); + NAMCO_C169ROZ(config, m_c169roz); m_c169roz->set_palette(m_c116); m_c169roz->set_is_namcofl(false); m_c169roz->set_ram_words(0x10000/2); @@ -1778,7 +1778,7 @@ void namcos2_state::configure_c355spr_standard(machine_config &config) { - NAMCO_C355SPR(config, m_c355spr, 0); + NAMCO_C355SPR(config, m_c355spr); m_c355spr->set_screen(m_screen); m_c355spr->set_palette(m_c116); m_c355spr->set_scroll_offsets(0x26, 0x19); @@ -1789,7 +1789,7 @@ void namcos2_state::configure_c45road_standard(machine_config &config) { - NAMCO_C45_ROAD(config, m_c45_road, 0); + NAMCO_C45_ROAD(config, m_c45_road); m_c45_road->set_palette(m_c116); } diff -Nru mame-0.230+dfsg.1/src/mame/drivers/naomi.cpp mame-0.231+dfsg.1/src/mame/drivers/naomi.cpp --- mame-0.230+dfsg.1/src/mame/drivers/naomi.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/naomi.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -408,8 +408,8 @@ 18 Wheeler (deluxe, Rev T) ? 22185T 20 (64Mb) ? ? ? 18 Wheeler (standard) 840-0036C 23298 20 (64Mb) present 315-6213 317-0273-COM 18 Wheeler (upright) 840-0037C 23299 20 (64Mb) present 315-6213 317-0273-COM -Airline Pilots (World, Rev B) ? 21787B 11 (64Mb) present 315-6213 317-0251-COM 2 known BIOS 21801 (USA), 21802 (EXP) -Airline Pilots (Japan, Rev A) 840-0005C 21739A 11 (64Mb) present 315-6213 317-0251-COM +Airline Pilots (World, Rev B) 840-0005C* 21787B 11 (64Mb) present 315-6213 317-0251-COM * no cart case if 3-screen multi-board setup, 834-13763(-01) ROM PCB. 2 known BIOS 21801 (USA), 21802 (EXP) +Airline Pilots (Japan, Rev A) 840-0005C* 21739A 11 (64Mb) present 315-6213 317-0251-COM * same as above Cosmic Smash 840-0044C 23428 8 (64Mb) ? 315-6213 317-0289-COM joystick + 2 buttons Cosmic Smash (Rev A) 840-0044C 23428A 8 (64Mb) present 315-6213 317-0289-COM joystick + 2 buttons Crazy Taxi 840-0002C 21684 13 (64Mb)* present 315-6213 317-0248-COM * ic8 and ic9 are not present @@ -11621,7 +11621,7 @@ /* 13950 */ GAME( 1999, f355twin, f355bios, naomim2, naomi, naomi_state, empty_init, ROT0, "Sega", "Ferrari F355 Challenge (twin/deluxe)", GAME_FLAGS ) /* specific BIOS "f355bios" needed */ /* 13950P */ GAME( 1999, f355twinp,f355twin, naomim2, naomi, naomi_state, empty_init, ROT0, "Sega", "Ferrari F355 Challenge (twin/deluxe, preview)", GAME_FLAGS ) /* specific BIOS "f355bios" needed */ /* none */ GAME( 2001, f355twn2, f355bios, naomim2, naomi, naomi_state, empty_init, ROT0, "Sega", "Ferrari F355 Challenge 2 - International Course Edition (twin/deluxe)", GAME_FLAGS ) /* specific BIOS "f355bios" needed */ -/* ????? */ GAME( 1999, alpilot, airlbios, naomim2, naomi, naomi_state, empty_init, ROT0, "Sega", "Airline Pilots (World, Rev B)", GAME_FLAGS ) // have "Sega Airlines" texts on airplanes, deluxe/multiboard setup uses specific BIOS "airlbios" +/* 13763-01 */ GAME( 1999, alpilot, airlbios, naomim2, naomi, naomi_state, empty_init, ROT0, "Sega", "Airline Pilots (World, Rev B)", GAME_FLAGS ) // have "Sega Airlines" texts on airplanes, deluxe/multiboard setup uses specific BIOS "airlbios" /* 840-xxxxx (Sega Naomi cart games)*/ /* 0001 */ GAME( 1998, dybbnao, naomi, naomim2, dybbnao, naomi_state, init_naomi, ROT0, "Sega", "Dynamite Baseball NAOMI (Japan)", GAME_FLAGS ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/nbmj8688.cpp mame-0.231+dfsg.1/src/mame/drivers/nbmj8688.cpp --- mame-0.230+dfsg.1/src/mame/drivers/nbmj8688.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/nbmj8688.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -35,9 +35,9 @@ #include "cpu/z80/z80.h" #include "machine/nvram.h" -#include "sound/3812intf.h" #include "sound/ay8910.h" #include "sound/dac.h" +#include "sound/ym3812.h" #include "screen.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/nbmj8891.cpp mame-0.231+dfsg.1/src/mame/drivers/nbmj8891.cpp --- mame-0.230+dfsg.1/src/mame/drivers/nbmj8891.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/nbmj8891.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -45,9 +45,9 @@ #include "cpu/z80/z80.h" #include "machine/nvram.h" -#include "sound/3812intf.h" #include "sound/ay8910.h" #include "sound/dac.h" +#include "sound/ym3812.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/nbmj8900.cpp mame-0.231+dfsg.1/src/mame/drivers/nbmj8900.cpp --- mame-0.230+dfsg.1/src/mame/drivers/nbmj8900.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/nbmj8900.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -29,8 +29,8 @@ #include "includes/nbmj8900.h" #include "cpu/z80/z80.h" -#include "sound/3812intf.h" #include "sound/dac.h" +#include "sound/ym3812.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/nbmj8991.cpp mame-0.231+dfsg.1/src/mame/drivers/nbmj8991.cpp --- mame-0.230+dfsg.1/src/mame/drivers/nbmj8991.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/nbmj8991.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -35,9 +35,9 @@ #include "cpu/z80/z80.h" #include "machine/nvram.h" -#include "sound/3812intf.h" #include "sound/ay8910.h" #include "sound/dac.h" +#include "sound/ym3812.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/nbmj9195.cpp mame-0.231+dfsg.1/src/mame/drivers/nbmj9195.cpp --- mame-0.230+dfsg.1/src/mame/drivers/nbmj9195.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/nbmj9195.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -26,8 +26,8 @@ #include "machine/gen_latch.h" #include "machine/nvram.h" -#include "sound/3812intf.h" #include "sound/dac.h" +#include "sound/ym3812.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/nemesis.cpp mame-0.231+dfsg.1/src/mame/drivers/nemesis.cpp --- mame-0.230+dfsg.1/src/mame/drivers/nemesis.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/nemesis.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -115,10 +115,10 @@ #include "machine/gen_latch.h" #include "machine/rescap.h" #include "machine/watchdog.h" -#include "sound/3812intf.h" #include "sound/ay8910.h" #include "sound/k051649.h" #include "sound/ym2151.h" +#include "sound/ym3812.h" #include "speaker.h" #include "konamigt.lh" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/neptunp2.cpp mame-0.231+dfsg.1/src/mame/drivers/neptunp2.cpp --- mame-0.230+dfsg.1/src/mame/drivers/neptunp2.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/neptunp2.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -38,7 +38,7 @@ Unidesa Cirsa Secreto de la Pirámide Unidesa Cirsa Filón Unidesa Cirsa Multi Points -Unidesa Cirsa Corsario +Unidesa Cirsa Corsarios CIRSA / UNIDESA 960606-5 CPU BOARD _________________________________________________________________ @@ -98,6 +98,7 @@ #include "cpu/i86/i186.h" #include "emupal.h" #include "screen.h" +#include "sound/okim6376.h" #include "speaker.h" @@ -108,10 +109,12 @@ public: neptunp2_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu") + m_maincpu(*this, "maincpu"), + m_okim6376(*this, "oki") { } - void neptunp2(machine_config &config); + void neptunp2_video(machine_config &config); + void neptunp2_no_video(machine_config &config); protected: // driver_device overrides @@ -123,12 +126,35 @@ uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void neptunp2_io(address_map &map); - void neptunp2_map(address_map &map); + void neptunp2_video_map(address_map &map); + void neptunp2_no_video_map(address_map &map); // devices required_device m_maincpu; + required_device m_okim6376; }; +static INPUT_PORTS_START(c960606) + PORT_START("DSW1") + PORT_DIPUNKNOWN_DIPLOC(0x01, 0x01, "SW1:1") + PORT_DIPUNKNOWN_DIPLOC(0x02, 0x02, "SW1:2") + PORT_DIPUNKNOWN_DIPLOC(0x04, 0x04, "SW1:3") + PORT_DIPUNKNOWN_DIPLOC(0x08, 0x08, "SW1:4") + PORT_DIPUNKNOWN_DIPLOC(0x10, 0x10, "SW1:5") + PORT_DIPUNKNOWN_DIPLOC(0x20, 0x20, "SW1:6") + PORT_DIPUNKNOWN_DIPLOC(0x40, 0x40, "SW1:7") + PORT_DIPUNKNOWN_DIPLOC(0x80, 0x80, "SW1:8") + + PORT_START("DSW2") + PORT_DIPUNKNOWN_DIPLOC(0x01, 0x01, "SW2:1") + PORT_DIPUNKNOWN_DIPLOC(0x02, 0x02, "SW2:2") + PORT_DIPUNKNOWN_DIPLOC(0x04, 0x04, "SW2:3") + PORT_DIPUNKNOWN_DIPLOC(0x08, 0x08, "SW2:4") + PORT_DIPUNKNOWN_DIPLOC(0x10, 0x10, "SW2:5") + PORT_DIPUNKNOWN_DIPLOC(0x20, 0x20, "SW2:6") + PORT_DIPUNKNOWN_DIPLOC(0x40, 0x40, "SW2:7") + PORT_DIPUNKNOWN_DIPLOC(0x80, 0x80, "SW2:8") +INPUT_PORTS_END void neptunp2_state::video_start() { @@ -144,12 +170,11 @@ return machine().rand(); } -void neptunp2_state::neptunp2_map(address_map &map) +void neptunp2_state::neptunp2_no_video_map(address_map &map) { map(0x00000, 0xbffff).rom(); map(0xe0000, 0xeffff).ram(); - map(0xd0000, 0xd7fff).ram(); //videoram map(0xdb004, 0xdb007).ram(); map(0xdb00c, 0xdb00f).ram(); @@ -162,6 +187,13 @@ map(0xffff0, 0xfffff).rom(); } +void neptunp2_state::neptunp2_video_map(address_map &map) +{ + neptunp2_no_video_map(map); + + map(0xd0000, 0xd7fff).ram(); //videoram +} + void neptunp2_state::neptunp2_io(address_map &map) { } @@ -187,12 +219,24 @@ // GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 8 ) GFXDECODE_END -void neptunp2_state::neptunp2(machine_config &config) +void neptunp2_state::neptunp2_no_video(machine_config &config) { // Basic machine hardware I80188(config, m_maincpu, 36.864_MHz_XTAL); // N80C188-20 AMD - m_maincpu->set_addrmap(AS_PROGRAM, &neptunp2_state::neptunp2_map); + m_maincpu->set_addrmap(AS_PROGRAM, &neptunp2_state::neptunp2_no_video_map); m_maincpu->set_addrmap(AS_IO, &neptunp2_state::neptunp2_io); + + // Sound hardware + SPEAKER(config, "mono").front_center(); + + OKIM6376(config, "oki", 36.864_MHz_XTAL/32).add_route(ALL_OUTPUTS, "mono", 1.0); // Frequency divisor is a guess +} + +void neptunp2_state::neptunp2_video(machine_config &config) +{ + neptunp2_no_video(config); + + m_maincpu->set_addrmap(AS_PROGRAM, &neptunp2_state::neptunp2_video_map); m_maincpu->set_vblank_int("screen", FUNC(neptunp2_state::irq0_line_hold)); // Video hardware @@ -206,11 +250,6 @@ GFXDECODE(config, "gfxdecode", "palette", gfx_neptunp2); PALETTE(config, "palette").set_entries(512); - - // Sound hardware - SPEAKER(config, "mono").front_center(); - - // OKIM6376(config, "oki", xxx).add_route(ALL_OUTPUTS, "mono", 1.0); } /*************************************************************************** @@ -240,16 +279,13 @@ ***************************************************************************/ // No battery on the PCB for this game. PLD "PAT-062", CPLD "PD03" (Xilinx XC9536). -ROM_START( ccorsario ) // PCB serigraphed 'CB1 (CS4)' and '960606-5 CPU'. It was found with most sockets unpopulated. This is mechanical. +ROM_START( ccorsario ) // PCB serigraphed 'CB1 (CS4)' and '960606-5 CPU'. This is mechanical. ROM_REGION( 0x100000, "maincpu", 0 ) - ROM_LOAD( "u2", 0x000000, 0x100000, NO_DUMP ) - - ROM_REGION( 0x100000, "prg_data", 0 ) - ROM_LOAD( "u3", 0x000000, 0x100000, NO_DUMP ) + ROM_LOAD( "c_corsarios_50_b-2057-a_a_6.0d_b-0082.u2", 0x000000, 0x080000, CRC(3a68e622) SHA1(0fddf47915b1eb584eb9fc1a2ca611582629ace1) ) ROM_REGION( 0x100000, "oki", 0 ) - ROM_LOAD( "cirsa_corsario_b-2057-a_s127_1.0.u14", 0x00000, 0x80000, CRC(f15ccc6b) SHA1(08f2f0129634075297d4a6b9697ba5bd0c8455ce) ) - ROM_LOAD( "cirsa_corsario_b-2057-a_s128_1.0.u15", 0x80000, 0x80000, CRC(061dc7c8) SHA1(a9c8da9c2e7cecd8800974ce70546cc60391cfe8) ) + ROM_LOAD( "cirsa_corsarios_b-2057-a_s127_1.0_b-82.u14", 0x000000, 0x080000, CRC(f15ccc6b) SHA1(08f2f0129634075297d4a6b9697ba5bd0c8455ce) ) + ROM_LOAD( "cirsa_corsarios_b-2057-a_s128_1.0_b-82.u15", 0x080000, 0x080000, CRC(061dc7c8) SHA1(a9c8da9c2e7cecd8800974ce70546cc60391cfe8) ) ROM_REGION( 0x800, "eeprom", 0 ) ROM_LOAD( "24lc16b.u10", 0x000, 0x800, CRC(0212ae8f) SHA1(d1db767bd4314894e0cbf8063290fe3260646843) ) @@ -263,7 +299,7 @@ ROM_LOAD( "u2", 0x000000, 0x100000, NO_DUMP ) ROM_REGION( 0x100000, "prg_data", 0 ) - ROM_LOAD( "u3", 0x000000, 0x100000, NO_DUMP ) + ROM_LOAD( "u3", 0x000000, 0x100000, NO_DUMP ) // it's also possible it wasn't ever populated ROM_REGION( 0x200000, "oki", 0 ) ROM_LOAD( "c.rock_n_roll_b-2103_6219_otp_b-82_m27c801.u14", 0x000000, 0x100000, CRC(963d184b) SHA1(8ad8b3215d3fc513dfae27bea2ed2ae9939c0f02) ) @@ -281,7 +317,7 @@ ROM_LOAD( "u2", 0x000000, 0x100000, NO_DUMP ) ROM_REGION( 0x100000, "prg_data", 0 ) - ROM_LOAD( "u3", 0x000000, 0x100000, NO_DUMP ) + ROM_LOAD( "u3", 0x000000, 0x100000, NO_DUMP ) // it's also possible it wasn't ever populated ROM_REGION( 0x200000, "oki", 0 ) ROM_LOAD( "s284_otp_m27c801.u14", 0x000000, 0x100000, CRC(87325ae4) SHA1(6d77f1933f0aab29371795e8fc7bef9bd05cafea) ) @@ -296,10 +332,11 @@ } // Anonymous namespace +// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS -GAME( 2003, neptunp2, 0, neptunp2, neptunp2, neptunp2_state, empty_init, ROT0, "Unidesa / Cirsa", "Neptune's Pearls 2", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) // Year from legal registry date +GAME( 2003, neptunp2, 0, neptunp2_video, neptunp2, neptunp2_state, empty_init, ROT0, "Unidesa / Cirsa", "Neptune's Pearls 2", MACHINE_IS_SKELETON ) // Year from legal registry date // Games on Cirsa "960606-5" PCB -GAME( 2002, ccorsario, 0, neptunp2, neptunp2, neptunp2_state, empty_init, ROT0, "Unidesa / Cirsa", "Corsario (Cirsa slot machine)", MACHINE_MECHANICAL | MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) // Year from legal registry date -GAME( 1999, rockroll, 0, neptunp2, neptunp2, neptunp2_state, empty_init, ROT0, "Unidesa / Cirsa", "Rock 'n' Roll", MACHINE_MECHANICAL | MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) // Year taken from parts' manual and sticker on PCB -GAME( 2001?, unk960606, 0, neptunp2, neptunp2, neptunp2_state, empty_init, ROT0, "Unidesa / Cirsa", "unknown 960606-5 based machine", MACHINE_MECHANICAL | MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) // Year taken from sticker on PCB +GAME( 1999, ccorsario, 0, neptunp2_no_video, c960606, neptunp2_state, empty_init, ROT0, "Unidesa / Cirsa", "Corsarios (Cirsa slot machine)", MACHINE_IS_SKELETON_MECHANICAL ) // Year taken from sticker on PCB +GAME( 1999, rockroll, 0, neptunp2_no_video, c960606, neptunp2_state, empty_init, ROT0, "Unidesa / Cirsa", "Rock 'n' Roll", MACHINE_IS_SKELETON_MECHANICAL ) // Year taken from parts' manual and sticker on PCB +GAME( 2001?, unk960606, 0, neptunp2_no_video, c960606, neptunp2_state, empty_init, ROT0, "Unidesa / Cirsa", "unknown 960606-5 based machine", MACHINE_IS_SKELETON_MECHANICAL ) // Year taken from sticker on PCB diff -Nru mame-0.230+dfsg.1/src/mame/drivers/nes_clone.cpp mame-0.231+dfsg.1/src/mame/drivers/nes_clone.cpp --- mame-0.230+dfsg.1/src/mame/drivers/nes_clone.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/nes_clone.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -61,6 +61,47 @@ void nes_clone_map(address_map &map); }; + +class nes_clone_dancexpt_state : public nes_clone_state +{ +public: + nes_clone_dancexpt_state(const machine_config &mconfig, device_type type, const char *tag) : + nes_clone_state(mconfig, type, tag), + m_nametables(*this, "nametable%u", 0), + m_prgrom(*this, "prgrom"), + m_gfxrom(*this, "gfxrom"), + m_mainrom(*this, "maincpu") + { } + void nes_clone_dancexpt(machine_config &config); + +private: + void nes_clone_dancexpt_map(address_map &map); + memory_bank_array_creator<4> m_nametables; + required_memory_bank m_prgrom; + memory_bank_creator m_gfxrom; + required_region_ptr m_mainrom; + + std::unique_ptr m_nt_ram; + + virtual void machine_start() override; + virtual void machine_reset() override; + + void mapper_5000_w(offs_t offset, uint8_t data); + void mapper_5100_w(offs_t offset, uint8_t data); + void mapper_5200_w(offs_t offset, uint8_t data); + + virtual uint8_t in0_r() override; + virtual uint8_t in1_r() override; + virtual void in0_w(uint8_t data) override; + + void update_video_bank(); + + uint8_t m_5000_val; + uint8_t m_5100_val; + uint8_t m_5200_val; +}; + + class nes_clone_dnce2000_state : public nes_clone_state { public: @@ -141,7 +182,6 @@ m_cbank(*this, "cbank%u", 0), m_nametables(*this, "nametable%u", 0), m_charbank(*this, "charbank"), - m_ntbank(*this, "ntbank"), m_rom_solderpad_bank(*this, "rom_sldpad_bank") { } void nes_clone_afbm7800(machine_config& config); @@ -180,9 +220,9 @@ uint8_t m_extraregs[4]; void update_banks(); - void multigam3_mmc3_scanline_cb(int scanline, int vblank, int blanked); - int16_t m_multigam3_mmc3_scanline_counter; - uint8_t m_multigam3_mmc3_scanline_latch; + void mmc3_scanline_cb(int scanline, int vblank, int blanked); + int16_t m_mmc3_scanline_counter; + uint8_t m_mmc3_scanline_latch; uint8_t m_mmc3_irq_enable; std::vector m_vram; @@ -193,19 +233,15 @@ void update_nt_mirroring(); std::vector m_nt_ram; - void multigam_nt_w(offs_t offset, uint8_t data); - uint8_t multigam_nt_r(offs_t offset); - void vram_map(address_map &map); void ntram_map(address_map &map); void romarea_map(address_map &map); required_memory_bank_array<4> m_prgbank; required_memory_bank_array<6> m_cbank; - required_memory_bank_array<4> m_nametables; + memory_bank_array_creator<4> m_nametables; required_device m_charbank; - required_device m_ntbank; required_device m_rom_solderpad_bank; }; @@ -329,6 +365,20 @@ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) INPUT_PORTS_END + + +static INPUT_PORTS_START( dancexpt ) + PORT_START("IO1") + PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_PLAYER(1) PORT_16WAY // NOT A JOYSTICK!! + PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1) PORT_16WAY + PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1) PORT_16WAY + PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(1) PORT_16WAY + PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1) + PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1) + PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(1) + PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_PLAYER(1) +INPUT_PORTS_END + void nes_clone_state::video_start() { } @@ -398,6 +448,124 @@ } /************************************************** + Dancing Expert specifics +**************************************************/ + +void nes_clone_dancexpt_state::machine_start() +{ + nes_clone_state::machine_start(); + + m_nt_ram = std::make_unique(0x800); + + m_prgrom->configure_entries(0, 0x08, &m_mainrom[0], 0x4000); + m_gfxrom->configure_entries(0, 0x20, memregion("gfx1")->base(), 0x2000); + + m_ppu->space(AS_PROGRAM).install_read_bank(0x0000, 0x1fff, m_gfxrom); + + for (int i = 0; i < 4; i++) + m_nametables[i]->configure_entries(0, 2, &m_nt_ram[0], 0x400); + + save_pointer(NAME(m_nt_ram), 0x800); + + m_nametables[0]->set_entry(0); + m_nametables[1]->set_entry(1); + m_nametables[2]->set_entry(0); + m_nametables[3]->set_entry(1); + + m_ppu->space(AS_PROGRAM).install_readwrite_bank(0x2000,0x23ff,m_nametables[0]); + m_ppu->space(AS_PROGRAM).install_readwrite_bank(0x2400,0x27ff,m_nametables[1]); + m_ppu->space(AS_PROGRAM).install_readwrite_bank(0x2800,0x2bff,m_nametables[2]); + m_ppu->space(AS_PROGRAM).install_readwrite_bank(0x2c00,0x2fff,m_nametables[3]); +} + + +uint8_t nes_clone_dancexpt_state::in0_r() +{ + // polled frequently during game, music data? from some other device? + return 0xfe; // bit 0x01 exits the song? +} + +uint8_t nes_clone_dancexpt_state::in1_r() +{ + // read directly, not through shifter here + return m_io1->read(); +} + +void nes_clone_dancexpt_state::machine_reset() +{ + nes_clone_state::machine_reset(); + m_5000_val = 0x6; +} + +void nes_clone_dancexpt_state::update_video_bank() +{ + int bank = (m_previous_port0 & 0x7) * 4; + bank += m_5100_val & 0x3; + + m_gfxrom->set_entry(bank); +} + +void nes_clone_dancexpt_state::mapper_5000_w(offs_t offset, uint8_t data) +{ + // xxxx -bbb b = CPU bank at 8000-bfff x = unknown (sometimes 2, sometimes d) + + if (data & ~0x27) + logerror("%s: mapper_5000_w %02x\n", machine().describe_context(), data); + + m_5000_val = data; + + m_prgrom->set_entry(m_5000_val & 0x7); +} + +void nes_clone_dancexpt_state::mapper_5100_w(offs_t offset, uint8_t data) +{ + // ---- --cc c = lower character ROM bank + + if (data & 0xfc) + logerror("%s: mapper_5100_w %02x\n", machine().describe_context(), data); + + m_5100_val = data; + update_video_bank(); +} + +void nes_clone_dancexpt_state::in0_w(uint8_t data) +{ + // ---- -CCC C = upper character ROM bank + + // instead of input related writes, the video banking is here?! + m_previous_port0 = data; + update_video_bank(); +} + +void nes_clone_dancexpt_state::mapper_5200_w(offs_t offset, uint8_t data) +{ + // ---- ---- unknown + + logerror("%s: mapper_5200_w %02x\n", machine().describe_context(), data); + m_5200_val = data; + //update_video_bank(); +} + +void nes_clone_dancexpt_state::nes_clone_dancexpt(machine_config &config) +{ + nes_clone(config); + m_maincpu->set_addrmap(AS_PROGRAM, &nes_clone_dancexpt_state::nes_clone_dancexpt_map); +} + +void nes_clone_dancexpt_state::nes_clone_dancexpt_map(address_map &map) +{ + nes_clone_basemap(map); + + map(0x5000, 0x5000).w(FUNC(nes_clone_dancexpt_state::mapper_5000_w)); + map(0x5100, 0x5100).w(FUNC(nes_clone_dancexpt_state::mapper_5100_w)); + map(0x5200, 0x5200).w(FUNC(nes_clone_dancexpt_state::mapper_5200_w)); + + map(0x8000, 0xbfff).bankr("prgrom"); + map(0xc000, 0xffff).rom().region("maincpu", 0x1c000); +} + + +/************************************************** Dance 2000 Specifics **************************************************/ @@ -639,13 +807,13 @@ void nes_clone_afbm7800_state::mapper_c000_w(uint8_t data) { // irq latch - m_multigam3_mmc3_scanline_counter = data ^ 0xff; + m_mmc3_scanline_counter = data ^ 0xff; } void nes_clone_afbm7800_state::mapper_c001_w(uint8_t data) { // irq reload - m_multigam3_mmc3_scanline_latch = data; + m_mmc3_scanline_latch = data; } void nes_clone_afbm7800_state::mapper_e000_w(uint8_t data) @@ -663,15 +831,15 @@ -void nes_clone_afbm7800_state::multigam3_mmc3_scanline_cb( int scanline, int vblank, int blanked ) +void nes_clone_afbm7800_state::mmc3_scanline_cb( int scanline, int vblank, int blanked ) { if (m_mmc3_irq_enable) { if (!vblank && !blanked) { - if (--m_multigam3_mmc3_scanline_counter == -1) + if (--m_mmc3_scanline_counter == -1) { - m_multigam3_mmc3_scanline_counter = m_multigam3_mmc3_scanline_latch; + m_mmc3_scanline_counter = m_mmc3_scanline_latch; m_maincpu->set_input_line(M6502_IRQ_LINE, ASSERT_LINE); } } @@ -816,8 +984,8 @@ update_banks(); update_nt_mirroring(); - m_multigam3_mmc3_scanline_counter = 0; - m_multigam3_mmc3_scanline_latch = 0; + m_mmc3_scanline_counter = 0; + m_mmc3_scanline_latch = 0; m_mmc3_irq_enable = 0; } @@ -831,15 +999,6 @@ m_charbank->write8(offset, data); } -uint8_t nes_clone_afbm7800_state::multigam_nt_r(offs_t offset) -{ - return m_ntbank->read8(offset); -} - -void nes_clone_afbm7800_state::multigam_nt_w(offs_t offset, uint8_t data) -{ - m_ntbank->write8(offset, data); -} void nes_clone_afbm7800_state::machine_start() { @@ -867,15 +1026,18 @@ m_nametables[i]->configure_entries(0, 0x800 / 0x400, &m_nt_ram[0], 0x400); m_ppu->space(AS_PROGRAM).install_readwrite_handler(0x0000, 0x1fff, read8sm_delegate(*this, FUNC(nes_clone_afbm7800_state::vram_r)), write8sm_delegate(*this, FUNC(nes_clone_afbm7800_state::vram_w))); - m_ppu->set_scanline_callback(*this, FUNC(nes_clone_afbm7800_state::multigam3_mmc3_scanline_cb)); + m_ppu->set_scanline_callback(*this, FUNC(nes_clone_afbm7800_state::mmc3_scanline_cb)); - m_ppu->space(AS_PROGRAM).install_readwrite_handler(0x2000, 0x3eff, read8sm_delegate(*this, FUNC(nes_clone_afbm7800_state::multigam_nt_r)), write8sm_delegate(*this, FUNC(nes_clone_afbm7800_state::multigam_nt_w))); + m_ppu->space(AS_PROGRAM).install_readwrite_bank(0x2000,0x23ff,m_nametables[0]); + m_ppu->space(AS_PROGRAM).install_readwrite_bank(0x2400,0x27ff,m_nametables[1]); + m_ppu->space(AS_PROGRAM).install_readwrite_bank(0x2800,0x2bff,m_nametables[2]); + m_ppu->space(AS_PROGRAM).install_readwrite_bank(0x2c00,0x2fff,m_nametables[3]); save_item(NAME(m_vram)); save_item(NAME(m_nt_ram)); - save_item(NAME(m_multigam3_mmc3_scanline_counter)); - save_item(NAME(m_multigam3_mmc3_scanline_latch)); + save_item(NAME(m_mmc3_scanline_counter)); + save_item(NAME(m_mmc3_scanline_latch)); save_item(NAME(m_mmc3_irq_enable)); save_item(NAME(m_ntmirror)); @@ -1084,6 +1246,13 @@ ROM_LOAD( "mx29lv160cbtc.u3", 0x00000, 0x200000, CRC(b5cf91a0) SHA1(399f015fb0580c90928e7f3d73810cc4b6cc70d9) ) ROM_END +ROM_START( dancexpt ) + ROM_REGION( 0x20000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD( "dancingexpert27c010.bin", 0x0000, 0x20000, CRC(658ba2ea) SHA1(c08f6a2735b3c7383cba3a5fa3af905d5af6926f) ) + + ROM_REGION( 0x40000, "gfx1", ROMREGION_ERASE00 ) + ROM_LOAD( "dancingexpert27c020.bin", 0x00000, 0x40000, CRC(b653c40c) SHA1(9b74e56768ea5b5309df9761fb442b9be0be46e9) ) +ROM_END void nes_clone_state::init_nes_clone() { @@ -1107,6 +1276,24 @@ CONS( 200?, pjoypj001, 0, 0, nes_clone, nes_clone, nes_clone_state, init_nes_clone, "Trump Grand", "PowerJoy (PJ001, NES based plug & play)", MACHINE_NOT_WORKING ) +// + +/* + Dancing Export by Daidaixing (aka TimeTop) + + (notes from Sean Riddle regarding missing sound) + There are two globs on the main PCB, the bigger one next to a label that says NT6561. + Also two 32-pin COBs, one marked 27C020 and the other 27C010 (both dumped) + + Finally, a daughterboard with 1 glob. + The daughterboard has 10 traces going to it; power, ground, and 7 from the smaller glob. + The 10th trace looks like the audio output. + + I assume the daughterboard has a microcontroller for sound + I'm not sure what the smaller glob is, but it looks like it sends commands to the daughterboard. +*/ +CONS( 200?, dancexpt, 0, 0, nes_clone_dancexpt, dancexpt, nes_clone_dancexpt_state, init_nes_clone, "Daidaixing", "Dancing Expert", MACHINE_NOT_WORKING ) + CONS( 200?, vtvsocr, 0, 0, nes_clone_vtvsocr, nes_clone, nes_clone_vtvsocr_state, init_nes_clone, "", "Virtual TV Soccer", MACHINE_NOT_WORKING ) // might be VT02 hardware, needs decrypting, possibly designed by wellminds (M350 etc.) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/nes_vt09.cpp mame-0.231+dfsg.1/src/mame/drivers/nes_vt09.cpp --- mame-0.230+dfsg.1/src/mame/drivers/nes_vt09.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/nes_vt09.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -450,6 +450,11 @@ ROM_LOAD( "joypad65.bin", 0x00000, 0x800000, CRC(b7f81c5f) SHA1(8579d9bc866415e0049979b7c3427d8dd0a60813) ) ROM_END +ROM_START( rbbrite ) + ROM_REGION( 0x100000, "mainrom", 0 ) + ROM_LOAD( "coleco_rainbowbrite_29dl800ba_000422cb.bin", 0x00000, 0x100000, CRC(d2ad0d7d) SHA1(4423a5aa2eda20b3621ab46e951ac08dc2d24789) ) +ROM_END + // MSI Entertainment games (MSI previously operated as Majesco Entertainment) // There are meant to be multiple revisions of this software, some with theme tunes for the new wrestlers, some without. This one appears to lack them. @@ -491,3 +496,5 @@ CONS( 200?, jl2050, 0, 0, nes_vt09_16mb,nes_vt09, nes_vt09_state, empty_init, "LexiBook / JungleTac / NiceCode", "Cyber Console Center 200-in-1 (JL2050)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND ) +// might be VT369 based, if so, move +CONS( 2018, rbbrite, 0, 0, nes_vt09_1mb, nes_vt09, nes_vt09_state, empty_init, "Coleco", "Rainbow Brite (mini-arcade)", MACHINE_NOT_WORKING ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/nmg5.cpp mame-0.231+dfsg.1/src/mame/drivers/nmg5.cpp --- mame-0.230+dfsg.1/src/mame/drivers/nmg5.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/nmg5.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -225,8 +225,8 @@ #include "cpu/m68000/m68000.h" #include "cpu/z80/z80.h" #include "machine/gen_latch.h" -#include "sound/3812intf.h" #include "sound/okim6295.h" +#include "sound/ym3812.h" #include "video/decospr.h" #include "emupal.h" #include "screen.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/nmk16.cpp mame-0.231+dfsg.1/src/mame/drivers/nmk16.cpp --- mame-0.230+dfsg.1/src/mame/drivers/nmk16.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/nmk16.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -204,10 +204,10 @@ #include "cpu/z80/z80.h" #include "machine/nmk004.h" #include "machine/nmk112.h" -#include "sound/3812intf.h" #include "sound/okim6295.h" #include "sound/ym2151.h" #include "sound/ym2203.h" +#include "sound/ym3812.h" #include "screen.h" #include "speaker.h" @@ -8454,40 +8454,60 @@ * - Unknown PLCC68 IC + - Not populated +NOTE: +The hotbubl set is also known to use double sized EPROMs with the identical halves: + Program data on a 27C020 EPROM: + ROM @ C1 with a CRC32 of 0x7bb240e9 + ROM @ C2 with a CRC32 of 0x7917b95d + Sprite data on a 27C040 EPROM: + ROM @ BR1 with a CRC32 of 0x6fc18de4 + ROM @ BR3 with a CRC32 of 0xbb677240 + +All EPROMs had identical AFEGA 8, AFEGA 9 or AFEGA 10 labels, so each was named as found +and are distinguished by PCB / IC locations. + +The hotbubla set also has program data with identical halves. While not confirmed, there +may be a PCB out there using the smaller 27C010's for the program data. IE: + ROM @ C1 with a CRC32 of 0x41c3edbc and 0x20000 bytes in length + ROM @ C2 with a CRC32 of 0xf59aea4a and 0x20000 bytes in length + +It was not uncommon for manufacturers to use whatever size EPROMs were readily +available and either double the data or padded the empty space with a fill byte. + ***************************************************************************/ ROM_START( hotbubl ) // Korean release - Nude images of women for backgrounds ROM_REGION( 0x80000, "maincpu", 0 ) // 68000 code - ROM_LOAD16_BYTE( "c1.uc1", 0x00001, 0x40000, CRC(7bb240e9) SHA1(99048fa275182c3da3bfb0dedd790f4b5858bd92) ) - ROM_LOAD16_BYTE( "c2.uc9", 0x00000, 0x40000, CRC(7917b95d) SHA1(0344bae9c373c5943e7693720e5e531bc2e0d7ee) ) + ROM_LOAD16_BYTE( "afega8.c1.uc1", 0x00001, 0x20000, CRC(d1e72a31) SHA1(abe9113c1dd31fc1a6fc0f479b42e629650ecb1c) ) + ROM_LOAD16_BYTE( "afega9.c2.uc9", 0x00000, 0x20000, CRC(4537c6d9) SHA1(0b6ea74311389dc592615f0073629d07500cc2c4) ) ROM_REGION( 0x10000, "audiocpu", 0 ) // Z80 code - ROM_LOAD( "s1.uc14", 0x00000, 0x10000, CRC(5d8cf28e) SHA1(2a440bf5136f95af137b6688e566a14e65be94b1) ) // same as the other games on this driver + ROM_LOAD( "afega8.s1.uc14", 0x00000, 0x10000, CRC(5d8cf28e) SHA1(2a440bf5136f95af137b6688e566a14e65be94b1) ) // same as the other games on this driver - ROM_REGION( 0x100000, "sprites", 0 ) // Sprites, 16x16x4 - ROM_LOAD16_BYTE( "br1.uc3", 0x000000, 0x080000, CRC(6fc18de4) SHA1(57b4823fc41637780f64eadd1ddf61db531a2599) ) - ROM_LOAD16_BYTE( "br3.uc10", 0x000001, 0x080000, CRC(bb677240) SHA1(d7a26bcd33d491cee441edda6d092a1d08308b0e) ) + ROM_REGION( 0x80000, "sprites", 0 ) // Sprites, 16x16x4 + ROM_LOAD16_BYTE( "afega10.br1.uc3", 0x000000, 0x040000, CRC(7e132eff) SHA1(f3ec5750c73017f0a2eb87f6f39ab49e59d39711) ) + ROM_LOAD16_BYTE( "afega8.br3.uc10", 0x000001, 0x040000, CRC(22707728) SHA1(8a27aa2d1b6f902276c02bd7098526243661cff8) ) ROM_REGION( 0x300000, "bgtile", 0 ) // Layer 0, 16x16x8 - ROM_LOAD( "cr6.uc16", 0x100000, 0x080000, CRC(99d6523c) SHA1(0b628585d749e175d5a4dc600af1ba9cb936bfeb) ) - ROM_LOAD( "cr7.uc19", 0x080000, 0x080000, CRC(a89d9ce4) SHA1(5965b2b4b67bc91bc0e7474e593c7e1953b75adc) ) - ROM_LOAD( "cr5.uc15", 0x000000, 0x080000, CRC(65bd5159) SHA1(627ccc0ab131e643c3c52ee9bb41c7a85153c35e) ) - - ROM_LOAD( "cr2.uc7", 0x280000, 0x080000, CRC(27ad6fc8) SHA1(00b1a5c5e1a245590b300b9baf71585d41813e3e) ) - ROM_LOAD( "cr3.uc12", 0x200000, 0x080000, CRC(c841a4f6) SHA1(9b0ee5623c87a0cfc63d3741a65d399bd6593f18) ) - ROM_LOAD( "cr1.uc6", 0x180000, 0x080000, CRC(fc9101d2) SHA1(1d5b8484264b6d73fe032946096a469226cce901) ) + ROM_LOAD( "afega9.cr6.uc16", 0x100000, 0x080000, CRC(99d6523c) SHA1(0b628585d749e175d5a4dc600af1ba9cb936bfeb) ) + ROM_LOAD( "afega10.cr7.uc19", 0x080000, 0x080000, CRC(a89d9ce4) SHA1(5965b2b4b67bc91bc0e7474e593c7e1953b75adc) ) + ROM_LOAD( "afega10.cr5.uc15", 0x000000, 0x080000, CRC(65bd5159) SHA1(627ccc0ab131e643c3c52ee9bb41c7a85153c35e) ) + + ROM_LOAD( "afega9.cr2.uc7", 0x280000, 0x080000, CRC(27ad6fc8) SHA1(00b1a5c5e1a245590b300b9baf71585d41813e3e) ) + ROM_LOAD( "afega9.cr3.uc12", 0x200000, 0x080000, CRC(c841a4f6) SHA1(9b0ee5623c87a0cfc63d3741a65d399bd6593f18) ) + ROM_LOAD( "afega8.cr1.uc6", 0x180000, 0x080000, CRC(fc9101d2) SHA1(1d5b8484264b6d73fe032946096a469226cce901) ) ROM_REGION( 0x10000, "fgtile", 0 ) // Layer 1, 8x8x4 - ROM_LOAD( "t1.uc2", 0x00000, 0x10000, CRC(ce683a93) SHA1(aeee2671051f1badf2255375cd7c5fa847d1746c) ) + ROM_LOAD( "afega9.t1.uc2", 0x00000, 0x10000, CRC(ce683a93) SHA1(aeee2671051f1badf2255375cd7c5fa847d1746c) ) ROM_REGION( 0x40000, "oki1", 0 ) // Samples - ROM_LOAD( "s2.uc18", 0x00000, 0x40000, CRC(401c980f) SHA1(e47710c47cfeecce3ccf87f845b219a9c9f21ee3) ) + ROM_LOAD( "afega8.s2.uc18", 0x00000, 0x40000, CRC(401c980f) SHA1(e47710c47cfeecce3ccf87f845b219a9c9f21ee3) ) ROM_END ROM_START( hotbubla ) // Korean release - Nude images replaced with pictures of satellite dishes ROM_REGION( 0x80000, "maincpu", 0 ) // 68000 code - ROM_LOAD16_BYTE( "6_c1.uc1", 0x00001, 0x40000, CRC(7c65bf47) SHA1(fe578d3336c5f437bfd1bc81bfe3763b12f3e63f) ) - ROM_LOAD16_BYTE( "7_c2.uc9", 0x00000, 0x40000, CRC(74eb11c3) SHA1(88aeb02c4088706a56b4c930ffe6fdfbc99031c6) ) + ROM_LOAD16_BYTE( "6_c1.uc1", 0x00001, 0x40000, CRC(7c65bf47) SHA1(fe578d3336c5f437bfd1bc81bfe3763b12f3e63f) ) // 1st and 2nd half identical + ROM_LOAD16_BYTE( "7_c2.uc9", 0x00000, 0x40000, CRC(74eb11c3) SHA1(88aeb02c4088706a56b4c930ffe6fdfbc99031c6) ) // 1st and 2nd half identical ROM_REGION( 0x10000, "audiocpu", 0 ) // Z80 code ROM_LOAD( "1_s1.uc14", 0x00000, 0x10000, CRC(5d8cf28e) SHA1(2a440bf5136f95af137b6688e566a14e65be94b1) ) // same as the other games on this driver diff -Nru mame-0.230+dfsg.1/src/mame/drivers/novag_cforte.cpp mame-0.231+dfsg.1/src/mame/drivers/novag_cforte.cpp --- mame-0.230+dfsg.1/src/mame/drivers/novag_cforte.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/novag_cforte.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -117,8 +117,6 @@ data = bitswap<8>(data,7,2,0,4,6,5,3,1); m_display->write_row(dig+3, data); } - - m_display->update(); } diff -Nru mame-0.230+dfsg.1/src/mame/drivers/novag_diablo.cpp mame-0.231+dfsg.1/src/mame/drivers/novag_diablo.cpp --- mame-0.230+dfsg.1/src/mame/drivers/novag_diablo.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/novag_diablo.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -3,11 +3,13 @@ // thanks-to:yoyo_chessboard /****************************************************************************** -Novag Diablo 68000 / Novag Scorpio 68000 +Novag Diablo 68000 (model 908) +Novag Scorpio 68000 (model 909) Hardware notes (Diablo): - M68000 @ 16MHz, IPL1 256Hz, IPL2 from ACIA IRQ(always high) -- 2*8KB RAM TC5565 battery-backed, 2*32KB hashtable RAM TC55257 3*32KB ROM +- 2*8KB RAM TC5565 battery-backed, 2*32KB hashtable RAM TC55257 +- 3*32KB ROM (27C256 or equivalent) - HD44780 LCD controller (16x1) - R65C51P2 ACIA @ 1.8432MHz, RS232 - magnetic sensors, 8*8 chessboard leds @@ -17,6 +19,7 @@ ******************************************************************************/ #include "emu.h" + #include "bus/rs232/rs232.h" #include "cpu/m68000/m68000.h" #include "machine/sensorboard.h" @@ -94,22 +97,15 @@ HD44780_PIXEL_UPDATE(lcd_pixel_update); void lcd_palette(palette_device &palette) const; - u8 m_inp_mux; - u8 m_led_data; - u8 m_led_side; - u8 m_lcd_control; - u8 m_lcd_data; + u8 m_inp_mux = 0; + u8 m_led_data = 0; + u8 m_led_side = 0; + u8 m_lcd_control = 0; + u8 m_lcd_data = 0; }; void diablo_state::machine_start() { - // zerofill - m_inp_mux = 0; - m_led_data = 0; - m_led_side = 0; - m_lcd_control = 0; - m_lcd_data = 0; - // register for savestates save_item(NAME(m_inp_mux)); save_item(NAME(m_led_data)); @@ -291,7 +287,7 @@ const attotime irq_period = attotime::from_hz(32.768_kHz_XTAL/128); // 256Hz TIMER(config, m_irq_on).configure_periodic(FUNC(diablo_state::irq_on), irq_period); - m_irq_on->set_start_delay(irq_period - attotime::from_nsec(1100)); // active for 1.1us + m_irq_on->set_start_delay(irq_period - attotime::from_nsec(1380)); // active for 1.38us TIMER(config, "irq_off").configure_periodic(FUNC(diablo_state::irq_off), irq_period); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); @@ -357,9 +353,16 @@ ROM_START( diablo68 ) // ID = D 1.08 ROM_REGION16_BE( 0x20000, "maincpu", ROMREGION_ERASE00 ) - ROM_LOAD16_BYTE("evenurom.bin", 0x00000, 0x8000, CRC(03477746) SHA1(8bffcb159a61e59bfc45411e319aea6501ebe2f9) ) - ROM_LOAD16_BYTE("oddlrom.bin", 0x00001, 0x8000, CRC(e182dbdd) SHA1(24dacbef2173fa737636e4729ff22ec1e6623ca5) ) - ROM_LOAD16_BYTE("book.bin", 0x10000, 0x8000, CRC(553a5c8c) SHA1(ccb5460ff10766a5ca8008ae2cffcff794318108) ) // no odd rom + ROM_LOAD16_BYTE("d_evn_904.u3", 0x00000, 0x8000, CRC(03477746) SHA1(8bffcb159a61e59bfc45411e319aea6501ebe2f9) ) + ROM_LOAD16_BYTE("d_odd_904.u2", 0x00001, 0x8000, CRC(d46fcc7a) SHA1(8ed69cd0fec07bf5451eaa882c87cf7cf70c87eb) ) + ROM_LOAD16_BYTE("ds_bk.u4", 0x10000, 0x8000, CRC(553a5c8c) SHA1(ccb5460ff10766a5ca8008ae2cffcff794318108) ) // no odd rom +ROM_END + +ROM_START( diablo68a ) // ID = D 1.08 + ROM_REGION16_BE( 0x20000, "maincpu", ROMREGION_ERASE00 ) + ROM_LOAD16_BYTE("d_evn_904.u3", 0x00000, 0x8000, CRC(03477746) SHA1(8bffcb159a61e59bfc45411e319aea6501ebe2f9) ) + ROM_LOAD16_BYTE("d_odd_904.u2", 0x00001, 0x8000, CRC(e182dbdd) SHA1(24dacbef2173fa737636e4729ff22ec1e6623ca5) ) // only 2 bytes differ (one of them is the checksum) + ROM_LOAD16_BYTE("ds_bk.u4", 0x10000, 0x8000, CRC(553a5c8c) SHA1(ccb5460ff10766a5ca8008ae2cffcff794318108) ) // no odd rom ROM_END @@ -378,7 +381,8 @@ Drivers ******************************************************************************/ -// YEAR NAME PARENT CMP MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS -CONS( 1991, diablo68, 0, 0, diablo68k, diablo68k, diablo_state, empty_init, "Novag", "Diablo 68000", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +// YEAR NAME PARENT CMP MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS +CONS( 1991, diablo68, 0, 0, diablo68k, diablo68k, diablo_state, empty_init, "Novag", "Diablo 68000 (set 1)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1991, diablo68a, diablo68, 0, diablo68k, diablo68k, diablo_state, empty_init, "Novag", "Diablo 68000 (set 2)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1991, scorpio68, 0, 0, scorpio68k, diablo68k, diablo_state, empty_init, "Novag", "Scorpio 68000", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1991, scorpio68, 0, 0, scorpio68k, diablo68k, diablo_state, empty_init, "Novag", "Scorpio 68000", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/novag_sexpert.cpp mame-0.231+dfsg.1/src/mame/drivers/novag_sexpert.cpp --- mame-0.230+dfsg.1/src/mame/drivers/novag_sexpert.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/novag_sexpert.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -37,6 +37,7 @@ ******************************************************************************/ #include "emu.h" + #include "bus/rs232/rs232.h" #include "cpu/m6502/m65c02.h" #include "machine/sensorboard.h" @@ -124,20 +125,14 @@ HD44780_PIXEL_UPDATE(lcd_pixel_update); void lcd_palette(palette_device &palette) const; - u8 m_inp_mux; - u8 m_led_data; - u8 m_lcd_control; - u8 m_lcd_data; + u8 m_inp_mux = 0; + u8 m_led_data = 0; + u8 m_lcd_control = 0; + u8 m_lcd_data = 0; }; void sexpert_state::machine_start() { - // zerofill - m_inp_mux = 0; - m_led_data = 0; - m_lcd_control = 0; - m_lcd_data = 0; - // register for savestates save_item(NAME(m_inp_mux)); save_item(NAME(m_led_data)); diff -Nru mame-0.230+dfsg.1/src/mame/drivers/omegrace.cpp mame-0.231+dfsg.1/src/mame/drivers/omegrace.cpp --- mame-0.230+dfsg.1/src/mame/drivers/omegrace.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/omegrace.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -240,30 +240,36 @@ , m_dvg(*this, "dvg") , m_soundlatch(*this, "soundlatch") , m_leds(*this, "led%u", 0U) + , m_spinner(*this, "SPIN%u", 0) { } void omegrace(machine_config &config); void init_omegrace(); -private: - TIMER_CALLBACK_MEMBER(periodic_int); - uint8_t omegrace_vg_go_r(); - uint8_t omegrace_spinner1_r(); - void omegrace_leds_w(uint8_t data); - void main_map(address_map &map); - void port_map(address_map &map); - void sound_map(address_map &map); - void sound_port(address_map &map); - +protected: virtual void machine_start() override; virtual void machine_reset() override; +private: required_device m_maincpu; required_device m_audiocpu; required_device m_dvg; required_device m_soundlatch; output_finder<4> m_leds; + required_ioport_array<2> m_spinner; + + void main_map(address_map &map); + void port_map(address_map &map); + void sound_map(address_map &map); + void sound_port(address_map &map); + + TIMER_CALLBACK_MEMBER(periodic_int); + uint8_t vg_go_r(); + uint8_t spinner1_r(); + uint8_t spinner2_r(); + void outputs_w(uint8_t data); + emu_timer *m_gbnmi; }; @@ -304,7 +310,7 @@ * *************************************/ -uint8_t omegrace_state::omegrace_vg_go_r() +uint8_t omegrace_state::vg_go_r() { if (!machine().side_effects_disabled()) m_dvg->go_w(); @@ -322,30 +328,34 @@ * Encoder bit mappings * The encoder is a 64 way switch, with the inputs scrambled * on the input port (and shifted 2 bits to the left for the - * 1 player encoder + * 1 player encoder) * * 3 6 5 4 7 2 for encoder 1 (shifted two bits left..) * - * - * 5 4 3 2 1 0 for encoder 2 (not shifted..) + * 1 4 3 2 5 0 for encoder 2 (not shifted..) */ static const uint8_t spinnerTable[64] = { - 0x00, 0x04, 0x14, 0x10, 0x18, 0x1c, 0x5c, 0x58, - 0x50, 0x54, 0x44, 0x40, 0x48, 0x4c, 0x6c, 0x68, - 0x60, 0x64, 0x74, 0x70, 0x78, 0x7c, 0xfc, 0xf8, - 0xf0, 0xf4, 0xe4, 0xe0, 0xe8, 0xec, 0xcc, 0xc8, - 0xc0, 0xc4, 0xd4, 0xd0, 0xd8, 0xdc, 0x9c, 0x98, - 0x90, 0x94, 0x84, 0x80, 0x88, 0x8c, 0xac, 0xa8, - 0xa0, 0xa4, 0xb4, 0xb0, 0xb8, 0xbc, 0x3c, 0x38, - 0x30, 0x34, 0x24, 0x20, 0x28, 0x2c, 0x0c, 0x08 + 0x00, 0x01, 0x05, 0x04, 0x06, 0x07, 0x17, 0x16, + 0x14, 0x15, 0x11, 0x10, 0x12, 0x13, 0x1b, 0x1a, + 0x18, 0x19, 0x1d, 0x1c, 0x1e, 0x1f, 0x3f, 0x3e, + 0x3c, 0x3d, 0x39, 0x38, 0x3a, 0x3b, 0x33, 0x32, + 0x30, 0x31, 0x35, 0x34, 0x36, 0x37, 0x27, 0x26, + 0x24, 0x25, 0x21, 0x20, 0x22, 0x23, 0x2b, 0x2a, + 0x28, 0x29, 0x2d, 0x2c, 0x2e, 0x2f, 0x0f, 0x0e, + 0x0c, 0x0d, 0x09, 0x08, 0x0a, 0x0b, 0x03, 0x02 }; -uint8_t omegrace_state::omegrace_spinner1_r() +uint8_t omegrace_state::spinner1_r() +{ + return spinnerTable[m_spinner[0]->read() & 0x3f] << 2; +} + +uint8_t omegrace_state::spinner2_r() { - return (spinnerTable[ioport("SPIN0")->read() & 0x3f]); + return spinnerTable[m_spinner[1]->read() & 0x3f]; } @@ -356,7 +366,7 @@ * *************************************/ -void omegrace_state::omegrace_leds_w(uint8_t data) +void omegrace_state::outputs_w(uint8_t data) { /* bits 0 and 1 are coin counters */ machine().bookkeeping().coin_counter_w(0,data & 0x01); @@ -392,7 +402,7 @@ void omegrace_state::port_map(address_map &map) { map.global_mask(0xff); - map(0x08, 0x08).r(FUNC(omegrace_state::omegrace_vg_go_r)); + map(0x08, 0x08).r(FUNC(omegrace_state::vg_go_r)); map(0x09, 0x09).r("watchdog", FUNC(watchdog_timer_device::reset_r)); map(0x0a, 0x0a).w(m_dvg, FUNC(dvg_device::reset_w)); map(0x0b, 0x0b).portr("AVGDVG"); /* vg_halt */ @@ -400,10 +410,10 @@ map(0x17, 0x17).portr("DSW2"); /* DIP SW C6 */ map(0x11, 0x11).portr("IN0"); /* Player 1 input */ map(0x12, 0x12).portr("IN1"); /* Player 2 input */ - map(0x13, 0x13).w(FUNC(omegrace_state::omegrace_leds_w)); /* coin counters, leds, flip screen */ + map(0x13, 0x13).w(FUNC(omegrace_state::outputs_w)); /* coin counters, leds, flip screen */ map(0x14, 0x14).w(m_soundlatch, FUNC(generic_latch_8_device::write)); - map(0x15, 0x15).r(FUNC(omegrace_state::omegrace_spinner1_r)); /* 1st controller */ - map(0x16, 0x16).portr("SPIN1"); /* 2nd controller (cocktail) */ + map(0x15, 0x15).r(FUNC(omegrace_state::spinner1_r)); /* 1st controller */ + map(0x16, 0x16).r(FUNC(omegrace_state::spinner2_r)); /* 2nd controller (cocktail) */ } diff -Nru mame-0.230+dfsg.1/src/mame/drivers/oneshot.cpp mame-0.231+dfsg.1/src/mame/drivers/oneshot.cpp --- mame-0.230+dfsg.1/src/mame/drivers/oneshot.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/oneshot.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -131,8 +131,8 @@ #include "cpu/m68000/m68000.h" #include "cpu/z80/z80.h" #include "machine/gen_latch.h" -#include "sound/3812intf.h" #include "sound/okim6295.h" +#include "sound/ym3812.h" #include "screen.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/onetwo.cpp mame-0.231+dfsg.1/src/mame/drivers/onetwo.cpp --- mame-0.230+dfsg.1/src/mame/drivers/onetwo.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/onetwo.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -45,8 +45,8 @@ #include "cpu/z80/z80.h" #include "machine/gen_latch.h" #include "machine/watchdog.h" -#include "sound/3812intf.h" #include "sound/okim6295.h" +#include "sound/ym3812.h" #include "emupal.h" #include "screen.h" #include "speaker.h" @@ -198,8 +198,8 @@ void onetwo_state::sound_cpu_io(address_map &map) { map.global_mask(0xff); - map(0x00, 0x00).rw("ymsnd", FUNC(ym3812_device::status_port_r), FUNC(ym3812_device::control_port_w)); - map(0x20, 0x20).w("ymsnd", FUNC(ym3812_device::write_port_w)); + map(0x00, 0x00).rw("ymsnd", FUNC(ym3812_device::status_r), FUNC(ym3812_device::address_w)); + map(0x20, 0x20).w("ymsnd", FUNC(ym3812_device::data_w)); map(0x40, 0x40).rw("oki", FUNC(okim6295_device::read), FUNC(okim6295_device::write)); map(0xc0, 0xc0).w(m_soundlatch, FUNC(generic_latch_8_device::acknowledge_w)); } diff -Nru mame-0.230+dfsg.1/src/mame/drivers/pc88va.cpp mame-0.231+dfsg.1/src/mame/drivers/pc88va.cpp --- mame-0.230+dfsg.1/src/mame/drivers/pc88va.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/pc88va.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -10,18 +10,18 @@ Special thanks to Fujix for his documentation translation help TODO: - - Does this system have one or two CPUs? I'm prone to think that the V30 does all the job - and then enters into z80 compatible mode for PC-8801 emulation. - What exact kind of garbage happens if you try to enable both direct and palette color modes to a graphic layer? + - unemulated upd71071 demand mode; - What is exactly supposed to be a "bus slot"? - fdc "intelligent mode" has 0x7f as irq vector ... 0x7f is ld a,a and it IS NOT correctly hooked up by the current z80 core - PC-88VA stock version has two bogus opcodes. One is at 0xf0b15, another at 0xf0b31. Making a patch for the latter makes the system to jump into a "DIP-Switch" display. bp f0b31,pc=0xf0b36,g - - unemulated upd71071 demand mode. - - Fix floppy motor hook-up; + Update: it never reaches latter with V30->V50 CPU switch fix; + - Fix floppy motor hook-up (floppy believes to be always in even if empty drive); + - Support for PC8801 compatible mode & PC80S31K (floppy interface); ********************************************************************************************/ @@ -1573,7 +1573,7 @@ void pc88va_state::pc88va(machine_config &config) { - V30(config, m_maincpu, 8000000); /* 8 MHz */ + V50(config, m_maincpu, 8000000); // μPD9002, aka V30 + μPD70008AC (for PC8801 compatibility mode) m_maincpu->set_addrmap(AS_PROGRAM, &pc88va_state::pc88va_map); m_maincpu->set_addrmap(AS_IO, &pc88va_state::pc88va_io_map); m_maincpu->set_vblank_int("screen", FUNC(pc88va_state::pc88va_vrtc_irq)); diff -Nru mame-0.230+dfsg.1/src/mame/drivers/pc9801.cpp mame-0.231+dfsg.1/src/mame/drivers/pc9801.cpp --- mame-0.230+dfsg.1/src/mame/drivers/pc9801.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/pc9801.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -1,126 +1,64 @@ // license:BSD-3-Clause // copyright-holders:Angelo Salese,Carl -/*************************************************************************************************** +/************************************************************************************************** PC-9801 (c) 1981 NEC driver by Angelo Salese TODO: - - move sound bios ROMs into pc9801_26 / pc9801_86 devices - - proper 8251 uart hook-up on keyboard + - proper 8251 uart hook-up on keyboard; - SASI/SCSI support; - - Write a PC80S31K device (also used on PC-8801 and PC-88VA, it's the FDC + Z80 sub-system); - - Finish DIP-Switches support - - text scrolling - - GRCG+ - - rewrite using slot devices - - some later SWs put "Invalid command byte 05" (Absolutely Mahjong on Epson logo) - - investigate on POR bit - - test 2dd more - - clean-ups/split into devices. + - Finish DIP-Switches support; + - text scrolling, upd52611 (cfr. clipping in edge & arcus2, madoum* too?); + - AGDC emulation, upd72120; + - CMT support (-13/-36 cbus only, identify which models mounted it off the bat); + - Write a PC80S31K device for 2d type floppies + (also used on PC-8801 and PC-88VA, it's the FDC + Z80 sub-system); + - Anything post-PC9801E/F/M should overwrite "speaker_device" to actually use a + dac_bit_interface instead (cfr. DAC1BIT in SW list); + - clean-ups & split into separate devices and driver flavours; + - derive romsets by default options (cfr. 3.5 2HD floppies vs. default 5.25, 2D/2DD etc.); + - Remove kludge for POR bit in a20_ctrl_w fn; + - floppy sounds never silences when drive is idle (disabled for the time being); + + TODO (PC-9801F) + - kanji port 0xa9 readback is broken for several games (balpower, lovelyho). TODO (PC-9801RS): - - extra features; - - keyboard shift doesn't seem to disable properly; + - several unemulated extra f/f features; + - keyboard shift doesn't seem to disable properly (fixed by now?); + - Several games hangs with stuck note by misfired/not catched up -26 / -86 irq; - clean-up duplicate code; TODO (PC-9821): - fix CPU for some clones; - "cache error" - - undumped IDE ROM, kludged to work - - Compatibility is untested; + - undumped IDE ROM, kludged to work; TODO (PC-9821AS) - IPL ROM banking contradicts greatly from the other machines; - TODO: (PC-486MU) - - Tries to read port C of i8255_sys (-> 0x35) at boot without setting up the control - port. This causes a jump to invalid program area; - - Dies on ARTIC check; - - Presumably one ROM is undumped? + TODO (PC-386M): + - "ERR:BR" at boot (BIOS loader error). + Executes some code in text VRAM area (PC=$a006e), trying to setup a writeable RAM bank + (shadow RAM even?) to IPL window, I/O $c06 seems to be the control port for it; + + TODO: (PC-486SE/PC-486MU): + - Verify ROM bankswitch; + On PC-486SE sets up what is normally IPL bankswitch at PC=0xf5115, successive opcode + is a jmp 0xf8000, pretty unlikely it delays bankswitch so assume it reloads + the same bank. + - Fix POR/ROM bankswitch on soft resets. + - Eventually errors with a ERR:VR (GFX VRAM); TODO: (PC-9821AP) - - No way to exit the initial loop. Code looks broken/bad dump? + - No way to exit the initial loop. Code looks broken, bad dump? - floppy issues TODO (* denotes actually fixed, to be moved into specific sheet) - - 46okunen (DOS not booting / disk swap); - * ckrynn - - aishogi: (asserts upon loading, 3'5 image?) - - akitsuka: (works in PC-9801RS only) - * alice - * genghis - * arcshu - * arcus2 - * artjigs1 / artjigs2 / artjigs3 - * Atlantia (disk swap?) - - azusa108 (disk i/o error) - * bacta2 - - btech (disk swap?) - - baycity - - beast (keeps reading command sense) - * beast2 - * bellsave (disk swap? select B on config menu) - * biblems2 (at new game loading) - * birdywld - - * Bokosuka Wars - * jangou2: floppy fails to load after the title screen; - - runners (size assert) - - Sorcerian (2dd image) - - Twilight Zone 3 (2dd image) - - List of per-game TODO: - - 4dboxing: inputs are unresponsive; - - 4dboxing: crashes after user disk creation (regression); - - agumixsl: non-interlace mode doesn't resize graphics, has rectangle selection bugs (note: needs GDC = 5 MHz to boot); - - agenesis: fails loading, attempting to read IDE RAM switch port; - - alice: doesn't set bitmap interlace properly, can't do disk swaps via the File Manager; - - applecl1: can't pass hands apparently; - - arctic, fsmoon: Doesn't detect sound board (tied to 0x00ec ports); - - arcus2: has intro glitches; - - artjigs*: some text doesn't appear? Namely under the puzzles and when you clear one; - - atragon: HDD install disk swap doesn't work? - - asokokof: black screen with BGM, executes invalid opcode (previous note "waits at 0x225f6"); - - arquelph: beeps out at initial sound check, no voice samples, extra sound board tested; - - akitsuka: could not setup "initial data" (regression); - - bandkun: can't install to HDD, has unemulated sound boards in settings (Roland MT-32 & D-10/D-110, Kawai MSB-98, Korg M1, MIDI); - - biblems2: initial GLODIA logo uses raster effects? - - bishohzx: Soft House logo uses pseudo-ROZ effect (?), no title screen graphics? - - bishotsu: beeps out before game (missing sound board?), doesn't draw some text? - - - deflektr: no sound, moans about a DIP-SW setting during loading, has timing issues (keyboard being too fast on PC-9801RS); - - edge: has gfx glitch when intro scrolls to top-left; - - edge: user disk creation screen is offset? - - idolsaga: Moans with a "(program) ended. remove the floppy disk and turn off the power." - - karateka: no sound; - - lovelyho: Doesn't show kanjis in PC-9801F version (tries to read them thru the 0xa9 port); - - madoum1, madoum2, madoum3: doesn't display bitmap gfxs during gameplay; - - quarth: sound cuts off at title screen, doesn't work on 9801rs (bogus "corrupt .exe" detected); - - prinmak2, tim: cursor stays stuck when using mouse (works with keyboard); - - puyopuyo: beeps out when it's supposed to play samples, Not supposed to use ADPCM, is it a PIT issue? - - runners: wrong double height on the title screen; - - rusty: black stripes when scrolling; - - rusty: voice pitches are too slow (tested with -26 and -86); - - win211: EGC drawing issue (byte wide writes?) - - win31: doesn't boot at - - per-game TODO (Dounjishi SW): - - Absolutely Mahjong: Transitions are too fast. - - per-game TODO (PC-9821): - - Battle Skin Panic: gfx bugs at the Gainax logo, it crashes after it; - - Policenauts: CD-ROM drive not found; - - Notes: - - annivers: GRPH (ALT) key cycles through different color schemes (normal, b&w, legacy); - - Animahjong V3 makes advantage of the possibility of installing 2 sound boards, where SFX and BGMs are played on separate chips. - - Apple Club 1/2 needs data disks to load properly; - - Beast Lord: needs a titan.fnt, in MS-DOS - - fhtag2: product key is 001J0283TA 100001 - - To deprotect BASIC modules set 0xcd7 in ram to 0 + TODO: (PC-9821Xa16/PC-9821Ra20/PC-9821Ra333) + - "MICON ERROR" at POST (generic HW fault, PCI?); -======================================================================================== +=================================================================================================== This series features a huge number of models released between 1982 and 1997. They were not IBM PC-compatible, but they had similar hardware (and software: in the @@ -302,6 +240,8 @@ For more info (e.g. optional hardware), see http://www.geocities.jp/retro_zzz/machines/nec/9801/mdl98cpu.html + Epson Series + http://www.pc-9800.net/db_epson/desk_index.htm PC-9821 Series @@ -312,7 +252,7 @@ PC-9821Es (1994) - aka 98FINE, desktop computer with integrated LCD, successor of the PC-98T PC-9821X series (1994->1995) - aka 98MATE X, desktop computers, Pentium based PC-9821V series (1995) - aka 98MATE Valuestar, desktop computers, Pentium based - PC-9821S series (1995->2996) - aka 98Pro, tower computers, PentiumPro based + PC-9821S series (1995->1996) - aka 98Pro, tower computers, PentiumPro based PC-9821R series (1996->2000) - aka 98MATE R, desktop & tower & server computers, various CPU PC-9821C200 (1997) - aka CEREB, desktop computer, Pentium MMX based PC-9821 Ne/Ns/Np/Nm (1993->1995) - aka 98NOTE, laptops, 486 based @@ -387,7 +327,7 @@ 0x9d keyboard LED settings 0x9f keyboard ID -****************************************************************************************************/ +**************************************************************************************************/ #include "emu.h" #include "includes/pc9801.h" @@ -984,10 +924,12 @@ case 0x0e: m_analog16.b[m_analog16.pal_entry] = data & 0xf; break; } - m_palette->set_pen_color((m_analog16.pal_entry)+0x10, - pal4bit(m_analog16.r[m_analog16.pal_entry]), - pal4bit(m_analog16.g[m_analog16.pal_entry]), - pal4bit(m_analog16.b[m_analog16.pal_entry])); + m_palette->set_pen_color( + m_analog16.pal_entry + 0x10, + pal4bit(m_analog16.r[m_analog16.pal_entry]), + pal4bit(m_analog16.g[m_analog16.pal_entry]), + pal4bit(m_analog16.b[m_analog16.pal_entry]) + ); return; } @@ -1175,10 +1117,12 @@ case 0x0e: m_analog256.b[m_analog256.pal_entry] = data & 0xff; break; } - m_palette->set_pen_color((m_analog256.pal_entry)+0x20, - m_analog256.r[m_analog256.pal_entry], - m_analog256.g[m_analog256.pal_entry], - m_analog256.b[m_analog256.pal_entry]); + m_palette->set_pen_color( + m_analog256.pal_entry + 0x20, + m_analog256.r[m_analog256.pal_entry], + m_analog256.g[m_analog256.pal_entry], + m_analog256.b[m_analog256.pal_entry] + ); return; } @@ -1673,10 +1617,10 @@ PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_START("MOUSE_X") - PORT_BIT( 0xff, 0x00, IPT_MOUSE_X ) PORT_RESET PORT_SENSITIVITY(30) PORT_KEYDELTA(30) + PORT_BIT( 0xff, 0x00, IPT_MOUSE_X ) PORT_SENSITIVITY(30) PORT_KEYDELTA(30) PORT_START("MOUSE_Y") - PORT_BIT( 0xff, 0x00, IPT_MOUSE_Y ) PORT_RESET PORT_SENSITIVITY(30) PORT_KEYDELTA(30) + PORT_BIT( 0xff, 0x00, IPT_MOUSE_Y ) PORT_SENSITIVITY(30) PORT_KEYDELTA(30) PORT_START("MOUSE_B") PORT_BIT(0x0f, IP_ACTIVE_LOW, IPT_UNUSED ) @@ -1938,20 +1882,45 @@ m_beeper->set_state(!(data & 0x08)); } +/* + * Mouse 8255 I/F + * + * Port A: + * x--- ---- LEFT mouse button + * -x-- ---- MIDDLE mouse button + * \- Undocumented, most PC98 mice don't have it + * --x- ---- RIGHT mouse button + * ---? ---- + * ---- xxxx MD3-0 mouse direction latch + * + * Port C: + * + * x--- ---- HC Latch Mode (1=read latch, 0=read delta) + * \- on 0->1 transition reset delta + * -x-- ---- SXY Axis select (1=Y 0=X) + * --x- ---- SHL Read nibble select (1) upper (0) lower + * ---x ---- INT # (1) disable (0) enable + * + * Reading Port B and Port C low nibble are misc DIPSW selectors, + * their meaning diverges on XA/XL/RL classes vs. the rest. + * + */ + uint8_t pc9801_state::ppi_mouse_porta_r() { - uint8_t res; - uint8_t isporthi; - const char *const mousenames[] = { "MOUSE_X", "MOUSE_Y" }; - - res = ioport("MOUSE_B")->read() & 0xf0; - isporthi = ((m_mouse.control & 0x20) >> 5)*4; + uint8_t res = ioport("MOUSE_B")->read() & 0xf0; + const uint8_t isporthi = ((m_mouse.control & 0x20) >> 5)*4; - if((m_mouse.control & 0x80) == 0) - res |= ioport(mousenames[(m_mouse.control & 0x40) >> 6])->read() >> (isporthi) & 0xf; + if ((m_mouse.control & 0x80) == 0) + { + if (m_mouse.control & 0x40) + res |= (m_mouse.dy >> isporthi) & 0xf; + else + res |= (m_mouse.dx >> isporthi) & 0xf; + } else { - if(m_mouse.control & 0x40) + if (m_mouse.control & 0x40) res |= (m_mouse.ly >> isporthi) & 0xf; else res |= (m_mouse.lx >> isporthi) & 0xf; @@ -1973,10 +1942,24 @@ void pc9801_state::ppi_mouse_portc_w(uint8_t data) { - if((m_mouse.control & 0x80) == 0 && data & 0x80) - { - m_mouse.lx = ioport("MOUSE_X")->read(); - m_mouse.ly = ioport("MOUSE_Y")->read(); + // fsmoon: 0x00 -> 0x80 -> 0xa0 -> 0xc0 -> 0xf0 + // (read latch as relative) + // prinmak2: 0x00 -> 0x20 -> 0x40 -> 0x60 -> 0x60 + // (keeps reading "delta" but never reset it, absolute mode) + // biblems2: 0x0f -> 0x2f -> 0x4f -> 0x6f -> 0xef + // (latches a delta reset then reads delta diff, relative mode) + + const u8 mouse_x = ioport("MOUSE_X")->read(); + const u8 mouse_y = ioport("MOUSE_Y")->read(); + m_mouse.dx = (mouse_x - m_mouse.prev_dx) & 0xff; + m_mouse.dy = (mouse_y - m_mouse.prev_dy) & 0xff; + + if ((m_mouse.control & 0x80) == 0 && data & 0x80) + { + m_mouse.lx = m_mouse.dx & 0xff; + m_mouse.ly = m_mouse.dy & 0xff; + m_mouse.prev_dx = mouse_x; + m_mouse.prev_dy = mouse_y; } m_mouse.control = data; @@ -2135,6 +2118,7 @@ m_mouse.control = 0xff; m_mouse.freq_reg = 0; m_mouse.freq_index = 0; + m_mouse.lx = m_mouse.ly = m_mouse.prev_dx = m_mouse.prev_dy = m_mouse.dx = m_mouse.dy = 0; m_dma_autoinc[0] = m_dma_autoinc[1] = m_dma_autoinc[2] = m_dma_autoinc[3] = 0; memset(&m_egc, 0, sizeof(m_egc)); } @@ -2233,6 +2217,13 @@ m_keyb->irq_wr_callback().set(m_pic1, FUNC(pic8259_device::ir1_w)); } +void pc9801_state::pc9801_pit_clock(machine_config &config, const XTAL clock) +{ + m_pit8253->set_clk<0>(clock); + m_pit8253->set_clk<1>(clock); + m_pit8253->set_clk<2>(clock); +} + void pc9801_state::pc9801_mouse(machine_config &config) { i8255_device &ppi_mouse(I8255(config, "ppi8255_mouse")); @@ -2436,7 +2427,6 @@ PALETTE(config, m_palette, FUNC(pc9801_state::pc9801_palette), 16); } - void pc9801_state::pc9801rs(machine_config &config) { I386SX(config, m_maincpu, MAIN_CLOCK_X1*8); // unknown clock. @@ -2499,6 +2489,8 @@ MCFG_MACHINE_START_OVERRIDE(pc9801_state, pc9801bx2) } +// TODO: setter for DMAC clock should follow up whatever is the CPU clock + void pc9801_state::pc9821(machine_config &config) { pc9801rs(config); @@ -2542,12 +2534,96 @@ void pc9801_state::pc9821v20(machine_config &config) { pc9821(config); - PENTIUM(config.replace(), m_maincpu, 32000000); // unknown clock + PENTIUM(config.replace(), m_maincpu, 32000000); // unknown clock, definitely not 32 MHz + m_maincpu->set_addrmap(AS_PROGRAM, &pc9801_state::pc9821_map); + m_maincpu->set_addrmap(AS_IO, &pc9801_state::pc9821_io); + m_maincpu->set_irq_acknowledge_callback("pic8259_master", FUNC(pic8259_device::inta_cb)); +} + +void pc9801_state::pc9821xa16(machine_config &config) +{ + pc9821(config); + PENTIUM(config.replace(), m_maincpu, 166000000); // Pentium P54C + m_maincpu->set_addrmap(AS_PROGRAM, &pc9801_state::pc9821_map); + m_maincpu->set_addrmap(AS_IO, &pc9801_state::pc9821_io); + m_maincpu->set_irq_acknowledge_callback("pic8259_master", FUNC(pic8259_device::inta_cb)); +} + +void pc9801_state::pc9821ra20(machine_config &config) +{ + pc9821(config); + PENTIUM_PRO(config.replace(), m_maincpu, XTAL(200'000'000)); m_maincpu->set_addrmap(AS_PROGRAM, &pc9801_state::pc9821_map); m_maincpu->set_addrmap(AS_IO, &pc9801_state::pc9821_io); m_maincpu->set_irq_acknowledge_callback("pic8259_master", FUNC(pic8259_device::inta_cb)); } +void pc9801_state::pc9821ra333(machine_config &config) +{ + pc9821(config); + const double xtal = 333000000; + PENTIUM2(config.replace(), m_maincpu, xtal); // actually a Celeron + m_maincpu->set_addrmap(AS_PROGRAM, &pc9801_state::pc9821_map); + m_maincpu->set_addrmap(AS_IO, &pc9801_state::pc9821_io); + m_maincpu->set_irq_acknowledge_callback("pic8259_master", FUNC(pic8259_device::inta_cb)); + + // 128KB CPU cache RAM + // Trident TGUI9682XGi + integrated 98 gfx card + // 3x cbus + 2x PCI slots + // 6GB HDD + // built-in ethernet 100BASE-TX/10BASE-T + +} + +// Epson clones +// TODO: definitely runs on their own state machine +// (verify if for instance they need EGC and what kind of FM board they needs up) + +void pc9801_state::pc386m(machine_config &config) +{ + pc9801rs(config); +// I386SX(config.replace(), m_maincpu, 16000000); // i386SX 16MHz, switchable to 10/6 MHz +// m_maincpu->set_addrmap(AS_PROGRAM, &pc9801_state::pc9801rs_map); +// m_maincpu->set_addrmap(AS_IO, &pc9801_state::pc9801rs_io); +// m_maincpu->set_irq_acknowledge_callback("pic8259_master", FUNC(pic8259_device::inta_cb)); + // RAM: 640KB + 14.6MB max + // 2 3.5 floppy drives + // ... +} + +void pc9801_state::pc486se(machine_config &config) +{ + pc9821(config); + const XTAL xtal = XTAL(25'000'000); + I486(config.replace(), m_maincpu, xtal); // i486SX, switchable to 10/5 MHz, supports overdrive + m_maincpu->set_addrmap(AS_PROGRAM, &pc9801_state::pc9821_map); + m_maincpu->set_addrmap(AS_IO, &pc9801_state::pc9821as_io); + m_maincpu->set_irq_acknowledge_callback("pic8259_master", FUNC(pic8259_device::inta_cb)); + + pc9801_pit_clock(config, xtal/8); // unknown, passes "ERR:TM" test + + // RAM: 1.6 MB (!) + 17.6 max + // "dedicated internal memory slot x 1" + // "dedicated video board" slot +} + +void pc9801_state::pc486mu(machine_config &config) +{ + pc9821(config); + const XTAL xtal = XTAL(33'000'000); + I486(config.replace(), m_maincpu, xtal); // i486SX, switchable to I386DX 10MHz/5MHz, Pentium ODP compatible + m_maincpu->set_addrmap(AS_PROGRAM, &pc9801_state::pc9821_map); + m_maincpu->set_addrmap(AS_IO, &pc9801_state::pc9821as_io); + m_maincpu->set_irq_acknowledge_callback("pic8259_master", FUNC(pic8259_device::inta_cb)); + + pc9801_pit_clock(config, xtal/8); // unknown, passes "ERR:TM" test + + // CL-GD5428 + // RAM: 5.6 + 61.6MB max + // 2 x 3.5 floppy drives +} + + /* took from "raw" memory dump, uncomment ROM_FILL if you want to play with it */ #define LOAD_IDE_ROM \ ROM_REGION( 0x4000, "ide", ROMREGION_ERASEVAL(0xcb) ) \ @@ -2649,7 +2725,7 @@ ROM_LOAD( "itf_rs.rom", 0x10000, 0x08000, CRC(c1815325) SHA1(a2fb11c000ed7c976520622cfb7940ed6ddc904e) ) ROM_LOAD( "bios_rs.rom", 0x18000, 0x18000, BAD_DUMP CRC(315d2703) SHA1(4f208d1dbb68373080d23bff5636bb6b71eb7565) ) - /* following is an emulator memory dump, should be checked and nuked */ + /* following is an emulator memory dump, should be checked and eventually nuked if nothing worth is there */ ROM_REGION( 0x100000, "memory", 0 ) ROM_LOAD( "00000.rom", 0x00000, 0x8000, CRC(6e299128) SHA1(d0e7d016c005cdce53ea5ecac01c6f883b752b80) ) ROM_LOAD( "c0000.rom", 0xc0000, 0x8000, CRC(1b43eabd) SHA1(ca711c69165e1fa5be72993b9a7870ef6d485249) ) // 0xff everywhere @@ -2669,7 +2745,7 @@ /* BX2/U2 - 486SX - (should be 33, but "dumper" note says it's 25 MHz) -Yet another franken-dump done with a lame program, shrug +Yet another franken-romset done with direct memory dump, shrug */ @@ -2812,7 +2888,8 @@ ROM_SYSTEM_BIOS(1, "phd0102", "PHD0102") ROMX_LOAD( "phd0102.rom", 0x000000, 0x80000, CRC(3036774c) SHA1(59856a348f156adf5eca06326f967aca54ff871c), ROM_BIOS(1) ) - ROM_REGION16_LE( 0x30000, "ipl", ROMREGION_ERASEFF ) // TODO: identify ROM banks + ROM_REGION16_LE( 0x30000, "ipl", ROMREGION_ERASEFF ) + // TODO: identify ROM banks ROM_COPY( "biosrom", 0x20000, 0x10000, 0x08000 ) ROM_COPY( "biosrom", 0x30000, 0x18000, 0x18000 ) @@ -2841,48 +2918,110 @@ ROM_END /* -Epson PC-486MU - 486 based, unknown clock +98MULTi Ce2 - 80486SX 25 */ -ROM_START( pc486mu ) +ROM_START( pc9821ce2 ) ROM_REGION16_LE( 0x30000, "ipl", ROMREGION_ERASEFF ) - ROM_LOAD( "bios_486mu.rom", 0x00000, 0x18000, BAD_DUMP CRC(57b5d701) SHA1(15029800842e93e07615b0fd91fb9f2bfe3e3c24)) - ROM_RELOAD( 0x18000, 0x18000 ) // missing rom? + ROM_LOAD( "itf_ce2.rom", 0x10000, 0x008000, CRC(273e9e88) SHA1(9bca7d5116788776ed0f297bccb4dfc485379b41) ) + ROM_LOAD( "bios_ce2.rom", 0x18000, 0x018000, BAD_DUMP CRC(76affd90) SHA1(910fae6763c0cd59b3957b6cde479c72e21f33c1) ) ROM_REGION( 0x80000, "chargen", 0 ) - ROM_LOAD( "font_486mu.rom", 0x0000, 0x46800, CRC(456d9fc7) SHA1(78ba9960f135372825ab7244b5e4e73a810002ff)) + ROM_LOAD( "font_ce2.rom", 0x00000, 0x046800, BAD_DUMP CRC(d1c2702a) SHA1(e7781e9d35b6511d12631641d029ad2ba3f7daef) ) LOAD_KANJI_ROMS LOAD_IDE_ROM ROM_END /* -98MULTi Ce2 - 80486SX 25 +98MATE X - 486/Pentium based */ -ROM_START( pc9821ce2 ) +ROM_START( pc9821xs ) ROM_REGION16_LE( 0x30000, "ipl", ROMREGION_ERASEFF ) - ROM_LOAD( "itf_ce2.rom", 0x10000, 0x08000, CRC(273e9e88) SHA1(9bca7d5116788776ed0f297bccb4dfc485379b41) ) - ROM_LOAD( "bios_ce2.rom", 0x18000, 0x018000, BAD_DUMP CRC(76affd90) SHA1(910fae6763c0cd59b3957b6cde479c72e21f33c1) ) + ROM_LOAD( "itf.rom", 0x10000, 0x008000, BAD_DUMP CRC(dd4c7bb8) SHA1(cf3aa193df2722899066246bccbed03f2e79a74a) ) + ROM_LOAD( "bios_xs.rom", 0x18000, 0x018000, BAD_DUMP CRC(0a682b93) SHA1(76a7360502fa0296ea93b4c537174610a834d367) ) + + ROM_REGION( 0x80000, "chargen", 0 ) + ROM_LOAD( "font_xs.rom", 0x00000, 0x046800, BAD_DUMP CRC(c9a77d8f) SHA1(deb8563712eb2a634a157289838b95098ba0c7f2) ) + + LOAD_KANJI_ROMS + LOAD_IDE_ROM +ROM_END + + +/* +9821Xa16 + +Pentium P54C @ 166 +32MB +3.5"2DD/2HDx1, 8xCD-ROM +CBus: 3 slots + +*/ + +ROM_START( pc9821xa16 ) + ROM_REGION16_LE( 0x40000, "biosrom", ROMREGION_ERASEFF ) + ROM_LOAD( "pc-9821xa16_g8yewa_a1_wsg8b01_ab28f200b5-t.bin", 0x00000, 0x040000, CRC(f99c8ce2) SHA1(2bc328d2c496046f6f4f39b0637e90b713a63155) ) // SOP44 + + ROM_REGION16_LE( 0x30000, "ipl", ROMREGION_ERASEFF ) + // TODO: all of the 256k space seems valid + ROM_COPY( "biosrom", 0x28000, 0x00000, 0x18000 ) + ROM_COPY( "biosrom", 0x00000, 0x18000, 0x18000 ) ROM_REGION( 0x80000, "chargen", 0 ) - ROM_LOAD( "font_ce2.rom", 0x000000, 0x046800, CRC(d1c2702a) SHA1(e7781e9d35b6511d12631641d029ad2ba3f7daef) ) + ROM_LOAD( "font.rom", 0x00000, 0x46800, BAD_DUMP CRC(a61c0649) SHA1(554b87377d176830d21bd03964dc71f8e98676b1) ) LOAD_KANJI_ROMS LOAD_IDE_ROM ROM_END /* -98MATE X - 486/Pentium based +pc-9821Ra20 (98MATE R) + +Pentium Pro @ 200 +32MB +3.5"2DD/2HDx1, 8xCD-ROM +CBus: 3 slots */ -ROM_START( pc9821xs ) +ROM_START( pc9821ra20 ) + ROM_REGION16_LE( 0x40000, "biosrom", ROMREGION_ERASEFF ) + ROM_LOAD( "g8wtp_a13_wtp8b01_ab28f200b5-t.bin", 0x00000, 0x040000, CRC(cd3acc5c) SHA1(746490d7f3d8d0e8df865315adaaae65f3fd0425) ) // SOP44 + ROM_REGION16_LE( 0x30000, "ipl", ROMREGION_ERASEFF ) - ROM_LOAD( "itf.rom", 0x10000, 0x08000, BAD_DUMP CRC(dd4c7bb8) SHA1(cf3aa193df2722899066246bccbed03f2e79a74a) ) - ROM_LOAD( "bios_xs.rom", 0x18000, 0x018000, BAD_DUMP CRC(0a682b93) SHA1(76a7360502fa0296ea93b4c537174610a834d367) ) + // TODO: all of the 256k space seems valid + ROM_COPY( "biosrom", 0x28000, 0x00000, 0x18000 ) + ROM_COPY( "biosrom", 0x00000, 0x18000, 0x18000 ) ROM_REGION( 0x80000, "chargen", 0 ) - ROM_LOAD( "font_xs.rom", 0x000000, 0x046800, BAD_DUMP CRC(c9a77d8f) SHA1(deb8563712eb2a634a157289838b95098ba0c7f2) ) + ROM_LOAD( "font.rom", 0x00000, 0x46800, BAD_DUMP CRC(a61c0649) SHA1(554b87377d176830d21bd03964dc71f8e98676b1) ) + + LOAD_KANJI_ROMS + LOAD_IDE_ROM +ROM_END + +/* +pc-9821Ra333 (98MATE R) + +Celeron @ 333 +32MB, max 256 MB (ECC EDO RAM) +3.5x1, 24xCD-ROM +CBus: 3 slots, PCI: 2 slots +*/ + + +ROM_START( pc9821ra333 ) + ROM_REGION16_LE( 0x40000, "biosrom", ROMREGION_ERASEFF ) + ROM_LOAD( "g8ykkw.bin", 0x00000, 0x040000, CRC(c605ef31) SHA1(3779aed757f21eb75093c1bfcbf18a232c198ee6) ) + + ROM_REGION16_LE( 0x30000, "ipl", ROMREGION_ERASEFF ) + // TODO: all of the 256k space seems valid + ROM_COPY( "biosrom", 0x28000, 0x00000, 0x18000 ) + ROM_COPY( "biosrom", 0x00000, 0x18000, 0x18000 ) + + ROM_REGION( 0x80000, "chargen", 0 ) + ROM_LOAD( "font.rom", 0x00000, 0x46800, BAD_DUMP CRC(a61c0649) SHA1(554b87377d176830d21bd03964dc71f8e98676b1) ) LOAD_KANJI_ROMS LOAD_IDE_ROM @@ -2899,7 +3038,7 @@ ROM_LOAD( "bios_v13.rom", 0x18000, 0x18000, BAD_DUMP CRC(0a682b93) SHA1(76a7360502fa0296ea93b4c537174610a834d367) ) ROM_REGION( 0x80000, "chargen", 0 ) - ROM_LOAD( "font_a.rom", 0x00000, 0x46800, BAD_DUMP CRC(c9a77d8f) SHA1(deb8563712eb2a634a157289838b95098ba0c7f2) ) + ROM_LOAD( "font_a.rom", 0x00000, 0x46800, BAD_DUMP CRC(c9a77d8f) SHA1(deb8563712eb2a634a157289838b95098ba0c7f2) ) LOAD_KANJI_ROMS LOAD_IDE_ROM @@ -2915,13 +3054,91 @@ ROM_LOAD( "bios_v20.rom", 0x18000, 0x18000, BAD_DUMP CRC(d5d1f13b) SHA1(bf44b5f4e138e036f1b848d6616fbd41b5549764) ) ROM_REGION( 0x80000, "chargen", 0 ) - ROM_LOAD( "font_v20.rom", 0x000000, 0x046800, BAD_DUMP CRC(6244c4c0) SHA1(9513cac321e89b4edb067b30e9ecb1adae7e7be7) ) + ROM_LOAD( "font_v20.rom", 0x00000, 0x046800, BAD_DUMP CRC(6244c4c0) SHA1(9513cac321e89b4edb067b30e9ecb1adae7e7be7) ) LOAD_KANJI_ROMS LOAD_IDE_ROM ROM_END +/* +Epson PC-386M +i386SX-16 @ 16 +1MB +3.5"2DD/2HDx2 +CBus: 3slots +*/ + +ROM_START( pc386m ) + ROM_REGION16_LE( 0x30000, "ipl", ROMREGION_ERASEFF ) + ROM_LOAD( "cwma-a02.bin", 0x10000, 0x08000, CRC(d2c357a4) SHA1(819c9a1fc92124a8d6a85339c74651add7efaf92) ) + ROM_CONTINUE( 0x18000, 0x18000 ) + + ROM_REGION( 0x80000, "chargen", 0 ) + ROM_LOAD( "font_486mu.rom", 0x0000, 0x46800, BAD_DUMP CRC(456d9fc7) SHA1(78ba9960f135372825ab7244b5e4e73a810002ff)) + + LOAD_KANJI_ROMS + LOAD_IDE_ROM +ROM_END + +/* +Epson PC-486SE + +i486SX @ 25 MHz +1.6 MB of conventional memory (???) +17.6 MB +CBus: 2slots +*/ + +ROM_START( pc486se ) + ROM_REGION16_LE( 0x20000, "biosrom", ROMREGION_ERASEFF ) + ROM_LOAD( "1699ma_cw99-a03.bin", 0x00000, 0x20000, CRC(f03df711) SHA1(88614746e01c7d3cff9f3b8ce0a598830a77d1dc) ) + + ROM_REGION16_LE( 0x30000, "ipl", ROMREGION_ERASEFF ) + // this looks convoluted + ROM_COPY( "biosrom", 0x08000, 0x00000, 0x08000 ) // tests this area at PC=0xf5149 + ROM_COPY( "biosrom", 0x00000, 0x10000, 0x08000 ) + ROM_COPY( "biosrom", 0x10000, 0x08000, 0x08000 ) +// ROM_FILL( 0x18000, 0x08000, 0x90) // untested by BIOS + ROM_COPY( "biosrom", 0x10000, 0x20000, 0x08000 ) // PC=f5113 bankswitch into same area, correct? + ROM_COPY( "biosrom", 0x18000, 0x28000, 0x08000 ) + + ROM_REGION( 0x80000, "chargen", 0 ) + ROM_LOAD( "font_486mu.rom", 0x0000, 0x46800, BAD_DUMP CRC(456d9fc7) SHA1(78ba9960f135372825ab7244b5e4e73a810002ff)) + + LOAD_KANJI_ROMS + LOAD_IDE_ROM +ROM_END + +/* +Epson PC-486MU +i486SX-33 @ 33 +8MB RAM +3.5'2DD/2HDx2, 2xCD-ROM +CBus: 3 slots +*/ + +ROM_START( pc486mu ) + ROM_REGION16_LE( 0x20000, "biosrom", ROMREGION_ERASEFF ) + ROM_LOAD( "pc-486mu_hn27c1024.bin", 0x00000, 0x20000, CRC(113268e1) SHA1(2a630abc825b2808f9f8fb65c6cb1fb7e7f6c710)) +// ROM_LOAD( "bios_486mu.rom", 0x00000, 0x18000, BAD_DUMP CRC(57b5d701) SHA1(15029800842e93e07615b0fd91fb9f2bfe3e3c24)) + + ROM_REGION16_LE( 0x30000, "ipl", ROMREGION_ERASEFF ) + // backported from pc486se + ROM_COPY( "biosrom", 0x08000, 0x00000, 0x08000 ) + ROM_COPY( "biosrom", 0x00000, 0x10000, 0x08000 ) + ROM_COPY( "biosrom", 0x10000, 0x08000, 0x08000 ) +// ROM_FILL( 0x18000, 0x08000, 0x90) // untested by BIOS + ROM_COPY( "biosrom", 0x10000, 0x20000, 0x08000 ) + ROM_COPY( "biosrom", 0x18000, 0x28000, 0x08000 ) + + + ROM_REGION( 0x80000, "chargen", 0 ) + ROM_LOAD( "font_486mu.rom", 0x0000, 0x46800, BAD_DUMP CRC(456d9fc7) SHA1(78ba9960f135372825ab7244b5e4e73a810002ff)) + + LOAD_KANJI_ROMS + LOAD_IDE_ROM +ROM_END void pc9801_state::init_pc9801_kanji() { @@ -3055,22 +3272,65 @@ } } -/* Genuine dumps */ -COMP( 1983, pc9801f, 0, 0, pc9801, pc9801, pc9801_state, init_pc9801_kanji, "NEC", "PC-9801F", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND) -COMP( 1985, pc9801vm, pc9801ux, 0, pc9801vm, pc9801rs, pc9801_state, init_pc9801vm_kanji, "NEC", "PC-9801VM", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND) +// For simpilicity's sake we arbitrarily group those with whatever romset came first historically. +// This is also repeated in SW list reports: you'd have to use an "On RS class xxx" format to indicate a bug report +// specifically happening for a family group. This will be hopefully put into stone with driver splits at some point in future. + +// "vanilla" class (i86, E/F/M) +COMP( 1983, pc9801f, 0, 0, pc9801, pc9801, pc9801_state, init_pc9801_kanji, "NEC", "PC-9801F", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND) // genuine dump + +// N5200 (started as a vanilla PC-98 business line derivative, eventually diverged into its own thing and incorporated various Hyper 98 features. Runs proprietary PTOS) +// APC III (US version of either vanilla PC9801 or N5200, aimed at business market. Runs MS-DOS 2.11/3.xx or PC-UX) +// ... -/* TODO: ANYTHING below there needs REDUMPING! */ -COMP( 1989, pc9801rs, 0, 0, pc9801rs, pc9801rs, pc9801_state, init_pc9801_kanji, "NEC", "PC-9801RS", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND) //TODO: not sure about the exact model +// VM class (V30 and/or i286) +COMP( 1985, pc9801vm, pc9801ux, 0, pc9801vm, pc9801rs, pc9801_state, init_pc9801vm_kanji, "NEC", "PC-9801VM", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND) // genuine dump COMP( 1985, pc9801vm11, pc9801ux, 0, pc9801vm, pc9801rs, pc9801_state, init_pc9801_kanji, "NEC", "PC-9801VM11", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND) COMP( 1987, pc9801ux, 0, 0, pc9801ux, pc9801rs, pc9801_state, init_pc9801_kanji, "NEC", "PC-9801UX", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND) + +// VX class (first model using an EGC) +// ... + +// XA/XL class (1120 x 750 true color, nicknamed "High-reso") +// ... + +// PC-H98 (Hyper 98, '90-'93 high end line with High-reso, proprietary NESA bus, E²GC) +// PC-H98T (LCD Hyper 98) +// SV-H98 (Later Hyper 98 revision, up to Pentium CPU) +// ... + +// RS class (i386SX) COMP( 1988, pc9801rx, pc9801rs, 0, pc9801rs, pc9801rs, pc9801_state, init_pc9801_kanji, "NEC", "PC-9801RX", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND) +COMP( 1989, pc9801rs, 0, 0, pc9801rs, pc9801rs, pc9801_state, init_pc9801_kanji, "NEC", "PC-9801RS", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND) +// FA class (i486SX) COMP( 1993, pc9801bx2, pc9801rs, 0, pc9801bx2, pc9801rs, pc9801_state, init_pc9801_kanji, "NEC", "PC-9801BX2/U2", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND) -COMP( 1994, pc9821, 0, 0, pc9821, pc9821, pc9801_state, init_pc9801_kanji, "NEC", "PC-9821 (98MATE)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND) //TODO: not sure about the exact model -COMP( 1993, pc9821as, pc9821, 0, pc9821as, pc9821, pc9801_state, init_pc9801_kanji, "NEC", "PC-9821 (98MATE A)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND) -COMP( 1993, pc9821ap2, pc9821, 0, pc9821ap2, pc9821, pc9801_state, init_pc9801_kanji, "NEC", "PC-9821AP2/U8W (98MATE A)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND) -COMP( 1994, pc9821xs, pc9821, 0, pc9821, pc9821, pc9801_state, init_pc9801_kanji, "NEC", "PC-9821 (98MATE Xs)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND) -COMP( 1994, pc9821ce2, pc9821, 0, pc9821, pc9821, pc9801_state, init_pc9801_kanji, "NEC", "PC-9821 (98MULTi Ce2)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND) -COMP( 1994, pc9821ne, pc9821, 0, pc9821, pc9821, pc9801_state, init_pc9801_kanji, "NEC", "PC-9821 (98NOTE)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND) -COMP( 1994, pc486mu, pc9821, 0, pc9821, pc9821, pc9801_state, init_pc9801_kanji, "Epson", "PC-486MU", MACHINE_NOT_WORKING | MACHINE_NO_SOUND) -COMP( 1998, pc9821v13, pc9821, 0, pc9821, pc9821, pc9801_state, init_pc9801_kanji, "NEC", "PC-9821 (98MATE VALUESTAR 13)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND) -COMP( 1998, pc9821v20, pc9821, 0, pc9821v20, pc9821, pc9801_state, init_pc9801_kanji, "NEC", "PC-9821 (98MATE VALUESTAR 20)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND) + +// PC-98GS (Multimedia PC, exclusive video mode "Extended Screen Graphics", -73 sound board (a superset of later -86), superimposition) +// ... + +// Epson class +COMP( 1990, pc386m, 0, 0, pc386m, pc9801rs, pc9801_state, init_pc9801_kanji, "Epson", "PC-386M", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND) +COMP( 1994, pc486mu, 0, 0, pc486mu, pc9821, pc9801_state, init_pc9801_kanji, "Epson", "PC-486MU", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND) +COMP( 1993, pc486se, pc486mu, 0, pc486se, pc9801rs, pc9801_state, init_pc9801_kanji, "Epson", "PC-486SE", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND) + +// PC9821 class +// TODO: unknown real model of parent, given the BIOS rom size wrt the others it may be better suited as a "98Multi" or even a FA class? +// investigate by making genuine BIOS dumps to boot +COMP( 1994, pc9821, 0, 0, pc9821, pc9821, pc9801_state, init_pc9801_kanji, "NEC", "PC-9821 (98MATE)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND) +COMP( 1993, pc9821as, pc9821, 0, pc9821as, pc9821, pc9801_state, init_pc9801_kanji, "NEC", "PC-9821 (98MATE A)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND) +COMP( 1993, pc9821ap2, pc9821, 0, pc9821ap2, pc9821, pc9801_state, init_pc9801_kanji, "NEC", "PC-9821AP2/U8W (98MATE A)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND) +COMP( 1994, pc9821xs, pc9821, 0, pc9821, pc9821, pc9801_state, init_pc9801_kanji, "NEC", "PC-9821 (98MATE Xs)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND) +COMP( 1994, pc9821ce2, pc9821, 0, pc9821, pc9821, pc9801_state, init_pc9801_kanji, "NEC", "PC-9821 (98MULTi Ce2)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND) +COMP( 1994, pc9821ne, pc9821, 0, pc9821, pc9821, pc9801_state, init_pc9801_kanji, "NEC", "PC-9821 (98NOTE)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND) +COMP( 1996, pc9821xa16, pc9821, 0, pc9821xa16, pc9821, pc9801_state, init_pc9801_kanji, "NEC", "PC-9821Xa16", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND) +COMP( 1996, pc9821ra20, pc9821, 0, pc9821ra20, pc9821, pc9801_state, init_pc9801_kanji, "NEC", "PC-9821Ra20 (98MATE R)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND) +COMP( 1998, pc9821ra333, pc9821, 0, pc9821ra333, pc9821, pc9801_state, init_pc9801_kanji, "NEC", "PC-9821Ra333 (98MATE R)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND) +COMP( 1998, pc9821v13, pc9821, 0, pc9821, pc9821, pc9801_state, init_pc9801_kanji, "NEC", "PC-9821 (98MATE VALUESTAR 13)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND) +COMP( 1998, pc9821v20, pc9821, 0, pc9821v20, pc9821, pc9801_state, init_pc9801_kanji, "NEC", "PC-9821 (98MATE VALUESTAR 20)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND) + +// PC98DO (PC88+PC98, V33 + μPD70008AC) + +// PC-98LT (laptop b&w LCD version V50, no upd7220, just one single bitmap layer) +// PC-98HA aka HANDY98 (portable b&w LCD version, V50, apparently compatible with LT) +// RC-9801 (portable (color?) LCD, i386SX, wireless 9600bps modem) +// PC-9801P (LCD with light pen) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/pcktgal.cpp mame-0.231+dfsg.1/src/mame/drivers/pcktgal.cpp --- mame-0.230+dfsg.1/src/mame/drivers/pcktgal.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/pcktgal.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -18,8 +18,8 @@ #include "includes/pcktgal.h" #include "cpu/m6502/m6502.h" -#include "sound/3812intf.h" #include "sound/ym2203.h" +#include "sound/ym3812.h" #include "machine/deco222.h" #include "screen.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/pgm.cpp mame-0.231+dfsg.1/src/mame/drivers/pgm.cpp --- mame-0.230+dfsg.1/src/mame/drivers/pgm.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/pgm.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -678,29 +678,33 @@ Oriental Legend / Xi You Shi E Zhuan (CHINA 111 Ver.) (c)1997 IGS -PGM system -IGS PCB NO-0134-1 -IGS PCB NO-0135 +Top board +--------- +PCB Number: IGS PCB NO-0134-2 -OLV 111 CHINA U11.U11 [b80ddd3c] OLV 111 CHINA U6.U6 [5fb86373] OLV 111 CHINA U7.U7 [6ee79faf] OLV 111 CHINA U9.U9 [83cf09c8] +OLV 111 CHINA U11.U11 [b80ddd3c] + +PGM T0100.U8 -T0100.U8 +Bottom Board +------------ +PCB Number: IGS PCB NO-0135 -A0100.U5 -A0101.U6 -A0102.U7 -A0103.U8 -A0104.U11 -A0105.U12 - -B0100.U9 -B0101.U10 -B0102.U15 +PGM A0100.U5 +PGM A0101.U6 +PGM A0102.U7 +PGM A0103.U8 +PGM A0104.U11 +PGM A0105.U12 + +PGM B0100.U9 +PGM B0101.U10 +PGM B0102.U15 -M0100.U1 +PGM M0100.U1 */ @@ -734,6 +738,40 @@ ROM_LOAD( "pgm_m0100.u1", 0x400000, 0x200000, CRC(e5c36c83) SHA1(50c6f66770e8faa3df349f7d68c407a7ad021716) ) ROM_END +/* + +Oriental Legend / Xi You Shi E Zhuan (TAIWAN 111 Ver.) +(c)1997 IGS + +Top board +--------- +PCB Number: IGS PCB NO-0134-2 + +OLV 111 TAIWAN U6.U6 [b205a733] +OLV 111 TAIWAN U7.U7 [27628e87] +OLV 111 TAIWAN U9.U9 [6d9d29b4] +OLV 111 TAIWAN U11.U11 [23f33bc9] + +PGM T0100.U8 + +Bottom Board +------------ +PCB Number: IGS PCB NO-0135-1 + +PGM A0100B.U5 +PGM A0101B.U8 +PGM A0102B.U6 +PGM A0103B.U9 +PGM A0104B.U7 +PGM A0105B.U10 + +PGM B0100B.U11 +PGM B0101B.U12 +PGM B0102.U2 + +PGM M0100.U1 + +*/ ROM_START( orlegend111t ) ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */ @@ -772,29 +810,33 @@ Oriental Legend / Xi You Shi E Zhuan (KOREA 111 Ver.) (c)1997 IGS -PGM system -IGS PCB NO-0134-2 -IGS PCB NO-0135 +Top board +--------- +PCB Number: IGS PCB NO-0134-2 -OLV 111 KOREA U11.U11 [23f33bc9] OLV 111 KOREA U6.U6 [1ff35baa] OLV 111 KOREA U7.U7 [27628e87] OLV 111 KOREA U9.U9 [87b6d202] +OLV 111 KOREA U11.U11 [23f33bc9] + +PGM T0100.U8 -T0100.U8 +Bottom Board +------------ +PCB Number: IGS PCB NO-0135 -A0100.U5 -A0101.U6 -A0102.U7 -A0103.U8 -A0104.U11 -A0105.U12 - -B0100.U9 -B0101.U10 -B0102.U15 +PGM A0100.U5 +PGM A0101.U6 +PGM A0102.U7 +PGM A0103.U8 +PGM A0104.U11 +PGM A0105.U12 + +PGM B0100.U9 +PGM B0101.U10 +PGM B0102.U15 -M0100.U1 +PGM M0100.U1 */ @@ -828,6 +870,42 @@ ROM_LOAD( "pgm_m0100.u1", 0x400000, 0x200000, CRC(e5c36c83) SHA1(50c6f66770e8faa3df349f7d68c407a7ad021716) ) ROM_END + +/* + +Oriental Legend / Xi You Shi E Zhuan (TAIWAN 105 Ver.) +(c)1997 IGS + +Top board +--------- +PCB Number: IGS PCB NO-0134-2 + +OLV 105 TAIWAN U6.U6 [2b14331f] +OLV 105 TAIWAN U7.U7 [5712facc] +OLV 105 TAIWAN U9.U9 [ae9d71e4] +OLV 105 TAIWAN U11.U11 [40ae4d9e] + +PGM T0100.U8 + +Bottom Board +------------ +PCB Number: IGS PCB NO-0135 + +PGM A0100.U5 +PGM A0101.U6 +PGM A0102.U7 +PGM A0103.U8 +PGM A0104.U11 +PGM A0105.U12 + +PGM B0100.U9 +PGM B0101.U10 +PGM B0102.U15 + +PGM M0100.U1 + +*/ + ROM_START( orlegend105t ) ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */ PGM_68K_BIOS @@ -863,39 +941,44 @@ Oriental Legend / Xi You Shi E Zhuan (KOREA 105 Ver.) (c)1997 IGS -PGM system -IGS PCB NO-0134-2 +Top board +--------- +PCB Number: IGS PCB NO-0134-2 IGS PCB NO-0135 -OLV105KO.U11 [40ae4d9e] -OLV105KO.U6 [b86703fe] -OLV105KO.U7 [5712facc] -OLV105KO.U9 [5a108e39] - -T0100.U8 - -A0100.U5 -A0101.U6 -A0102.U7 -A0103.U8 -A0104.U11 -A0105.U12 - -B0100.U9 -B0101.U10 -B0102.U15 +OLV 105 KOREA U6.U6 [b86703fe] +OLV 105 KOREA U7.U7 [5712facc] +OLV 105 KOREA U9.U9 [5a108e39] +OLV 105 KOREA U11.U11 [40ae4d9e] + +PGM T0100.U8 + +Bottom Board +------------ +PCB Number: IGS PCB NO-0135 + +PGM A0100.U5 +PGM A0101.U6 +PGM A0102.U7 +PGM A0103.U8 +PGM A0104.U11 +PGM A0105.U12 + +PGM B0100.U9 +PGM B0101.U10 +PGM B0102.U15 -M0100.U1 +PGM M0100.U1 */ ROM_START( orlegend105k ) ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */ PGM_68K_BIOS - ROM_LOAD16_BYTE( "olv105ko.u6", 0x100001, 0x080000, CRC(b86703fe) SHA1(a3529b45efd400ecd5e76f764b528ebce46e24ab) ) - ROM_LOAD16_BYTE( "olv105ko.u9", 0x100000, 0x080000, CRC(5a108e39) SHA1(2033f4fe3f2dfd725dac535324f58348b9ac3914) ) - ROM_LOAD16_BYTE( "olv105ko.u7", 0x200001, 0x080000, CRC(5712facc) SHA1(2d95ebd1703874e89ac3a206f8c1f0ece6e833e0) ) - ROM_LOAD16_BYTE( "olv105ko.u11", 0x200000, 0x080000, CRC(40ae4d9e) SHA1(62d7a96438b7fe93f74753333f50e077d417971e) ) + ROM_LOAD16_BYTE( "olv_105_korea_u6.u6", 0x100001, 0x080000, CRC(b86703fe) SHA1(a3529b45efd400ecd5e76f764b528ebce46e24ab) ) + ROM_LOAD16_BYTE( "olv_105_korea_u9.u9", 0x100000, 0x080000, CRC(5a108e39) SHA1(2033f4fe3f2dfd725dac535324f58348b9ac3914) ) + ROM_LOAD16_BYTE( "olv_105_korea_u7.u7", 0x200001, 0x080000, CRC(5712facc) SHA1(2d95ebd1703874e89ac3a206f8c1f0ece6e833e0) ) + ROM_LOAD16_BYTE( "olv_105_korea_u11.u11", 0x200000, 0x080000, CRC(40ae4d9e) SHA1(62d7a96438b7fe93f74753333f50e077d417971e) ) ROM_REGION( 0xa00000, "tiles", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */ PGM_VIDEO_BIOS @@ -1104,17 +1187,30 @@ /* -Dragon World 3 (KOREA 106 Ver.) +Dragon World 3 (CHINA 106 Ver.) (c)1998 IGS -PGM system -IGS PCB NO-0189 -IGS PCB NO-0178 +Top board +--------- +PCB Number: IGS PCB NO-0189-1 + +DW3 V106 U12.U12 [c3f6838b] +DW3 V106 U13.U13 [28284e22] + +DW3 TEXT U15.U15 + +PGM T0400.U18 + +Bottom Board +------------ +PCB Number: IGS PCB NO-0178 +PGM A0400.U9 +PGM A0401.U10 -DW3_V106.U12 [c3f6838b] -DW3_V106.U13 [28284e22] +PGM B0400.U13 +PGM M0400.U1 */ @@ -1151,7 +1247,7 @@ ROM_LOAD16_BYTE( "dw3_v105_u13.u13", 0x100000, 0x080000, CRC(8d6c9d39) SHA1(cb79303ab551e91f07e11414db4254d5b161d415) ) ROM_REGION( 0x010000, "igs022", 0 ) /* Protection Data - is it correct for this set? */ - ROM_LOAD( "dw3_v100.u15", 0x000000, 0x010000, CRC(03dc4fdf) SHA1(b329b04325d4f725231b1bb7862eedef2319b652) ) + ROM_LOAD( "dw3_v100_u15.u15", 0x000000, 0x010000, CRC(03dc4fdf) SHA1(b329b04325d4f725231b1bb7862eedef2319b652) ) ROM_REGION( 0xa00000, "tiles", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */ PGM_VIDEO_BIOS @@ -1193,14 +1289,17 @@ PGM_AUDIO_BIOS ROM_LOAD( "pgm_m0400.u1", 0x400000, 0x400000, CRC(031eb9ce) SHA1(0673ec194732becc6648c2ae1396e894aa269f9a) ) ROM_END + + /* -Dragon World 3 +Chuugokuryuu 3 Special (JAPAN 100 Ver.) Alta Co./IGS, 1998 -Cart for IGS PGM system +Top board +--------- +PCB Number: IGS PCB-0189 -Top board of cart contains..... 8MHz Xtal 32.768kHz Xtal UM6164 (RAM x 2) @@ -1208,12 +1307,28 @@ IGS022 ASIC IGS025 ASIC 1x PAL + 2x 27C040 EPROMs (main 68k program) +DW3 V100 U12.U12 +DW3 V100 U13.U13 + 1x 27C512 EPROM (protection code?) -1x 32MBit smt mask ROM (T0400) +DW3 V100 U15.U15 -Bottom board contains..... -4x 32MBit smt mask ROMs (A0400, A0401, B0400, M0400) +1x 32MBit smt mask ROM +PGM T0400.U18 + +Bottom Board +------------ +PCB Number: IGS PCB-0178 + +4x 32MBit smt mask ROMs +PGM A0400.U9 +PGM A0401.U10 + +PGM B0400.U13 + +PGM M0400.U1 */ @@ -1320,10 +1435,39 @@ ROM_END +/* + +Sangoku Senki / Knights of Valour (HONG KONG 117 Ver.) +(c)1999 ALTA / IGS + +Top board +--------- +PCB Number: IGS PCB NO-0212-2 + +PGM P0601 V117.U1 [c4d19fe6] + +PGM T0600.U11 + +Bottom Board +------------ +PCB Number: IGS PCB NO-0213T + +PGM A0600.U2 +PGM A0601.U4 +PGM A0602.U6 +PGM A0603.U9 + +PGM M0600.U3 + +PGM B0600.U5 +PGM B0601.U7 + +*/ + ROM_START( kov ) ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */ PGM_68K_BIOS - ROM_LOAD16_WORD_SWAP( "p0600.117", 0x100000, 0x400000, CRC(c4d19fe6) SHA1(14ef31539bfbc665e76c9703ee01b12228344052) ) + ROM_LOAD16_WORD_SWAP( "pgm_p0601_v117.u1", 0x100000, 0x400000, CRC(c4d19fe6) SHA1(14ef31539bfbc665e76c9703ee01b12228344052) ) ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */ ROM_LOAD( "kov_igs027a.bin", 0x000000, 0x04000, NO_DUMP ) @@ -1374,6 +1518,39 @@ ROM_LOAD( "pgm_m0600.u3", 0x400000, 0x400000, CRC(3ada4fd6) SHA1(4c87adb25d31cbd41f04fbffe31f7bc37173da76) ) ROM_END +/* + +Sangoku Senki / Knights of Valour (HONG KONG 114 Ver.) +(c)1999 ALTA / IGS + +Top board +--------- +PCB Number: IGS PCB NO-0212-1 + +SAV111 U4.U4 [ae2f1b4e] +SAV111 U5.U5 [5fdd4aa8] +SAV111 U7.U7 [95eedf0e] +SAV111 U8.U8 [003cbf49] +SAV111 U10.U10 [d5536107] + +T0600.U11 + +Bottom Board +------------ +PCB Number: IGS PCB NO-0213T + +PGM A0600.U2 +PGM A0601.U4 +PGM A0602.U6 +PGM A0603.U9 + +PGM M0600.U3 + +PGM B0600.U5 +PGM B0601.U7 + +*/ + ROM_START( kov114 ) ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */ PGM_68K_BIOS @@ -1407,32 +1584,35 @@ /* -Sangoku Senki / Knights of Valour (JPN 111 Ver.) +Sangoku Senki / Knights of Valour (JAPAN 111 Ver.) (c)1999 ALTA / IGS -PGM system -IGS PCB NO-0212-1 +Top board +--------- +PCB Number: IGS PCB NO-0212-1 IGS PCB NO-0213T +SAV111 U4.U4 [ae2f1b4e] +SAV111 U5.U5 [5fdd4aa8] +SAV111 U7.U7 [95eedf0e] +SAV111 U8.U8 [003cbf49] +SAV111 U10.U10 [d5536107] -SAV111.U10 [d5536107] -SAV111.U4 [ae2f1b4e] -SAV111.U5 [5fdd4aa8] -SAV111.U7 [95eedf0e] -SAV111.U8 [003cbf49] - -T0600.U11 +PGM T0600.U11 +Bottom Board +------------ +PCB Number: IGS PCB NO-0213T -A0600.U2 -A0601.U4 -A0602.U6 -A0603.U9 +PGM A0600.U2 +PGM A0601.U4 +PGM A0602.U6 +PGM A0603.U9 -M0600.U3 +PGM M0600.U3 -B0600.U5 -B0601.U7 +PGM B0600.U5 +PGM B0601.U7 */ @@ -3266,7 +3446,7 @@ ROM_REGION( 0xa00000, "tiles", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */ PGM_VIDEO_BIOS - ROM_LOAD( "dwpc_v100jp_u11.u11", 0x180000, 0x400000, CRC(3aa5a787) SHA1(ef7bb83f7141b24621c86237244fd9f280923ed1) ) + ROM_LOAD( "dwpc_v100jp_u11.u11", 0x180000, 0x400000, CRC(c29d8831) SHA1(0ae93ef31fffc244111f636d47e5762d3ba23fe5) ) ROM_REGION16_LE( 0x0400000, "sprcol", 0 ) /* Sprite Colour Data */ ROM_LOAD( "dwpc_v100jp_u2.u2", 0x000000, 0x200000, CRC(e7115763) SHA1(f1bf06e9434a3b962166849f51b9dc3a74d7f2a4) ) @@ -3749,13 +3929,13 @@ ROM_START( dmnfrntpcb ) ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */ ROM_LOAD16_WORD_SWAP( "pgm_p02s.u42", 0x00000, 0x020000, CRC(78c15fa2) SHA1(885a6558e022602cc6f482ac9667ba9f61e75092) ) /* IGS PGM P02S 1A3708A1A0 S002838 (uses standard PGM v2 bios) */ - ROM_LOAD16_WORD_SWAP( "demonfront_v107kr_u43.u43", 0x100000, 0x200000, CRC(671d8a31) SHA1(a0c2af67d7c56b4b355883892a47640fc72408a1) ) + ROM_LOAD16_WORD_SWAP( "demon_front_v107kr_u43.u43", 0x100000, 0x200000, CRC(671d8a31) SHA1(a0c2af67d7c56b4b355883892a47640fc72408a1) ) ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */ ROM_LOAD( "dmnfrnt_igs027a.bin", 0x000000, 0x04000, NO_DUMP ) ROM_REGION32_LE( 0x800000, "user1", 0 ) /* Protection Data (encrypted external ARM data, internal missing) */ - ROM_LOAD( "demonfront_v107kr_u62.u62", 0x000000, 0x400000, CRC(cb94772e) SHA1(4213600be41fd9ea295dd308920b1d89b635724f) ) + ROM_LOAD( "demon_front_v107kr_u62.u62", 0x000000, 0x400000, CRC(cb94772e) SHA1(4213600be41fd9ea295dd308920b1d89b635724f) ) ROM_REGION( 0xa00000, "tiles", 0 ) /* 8x8 Text Tiles + 32x32 BG Tiles */ PGM_VIDEO_BIOS @@ -5354,7 +5534,7 @@ //三国战纪/Sānguó zhàn jì (China, Hong Kong; Simplified Chinese) //三國戰紀/Sānguó zhàn jì (Taiwan, Japan; Traditional Chinese) -GAME( 1999, kov, pgm, pgm_arm_type1_sim, sango, pgm_arm_type1_state, init_kov, ROT0, "IGS", "Knights of Valour / Sanguo Zhan Ji / Sangoku Senki (ver. 117)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */ // V0008 04/27/99 10:33:33 +GAME( 1999, kov, pgm, pgm_arm_type1_sim, sango, pgm_arm_type1_state, init_kov, ROT0, "IGS", "Knights of Valour / Sanguo Zhan Ji / Sangoku Senki (ver. 117, Hong Kong)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */ // V0008 04/27/99 10:33:33 GAME( 1999, kov115, kov, pgm_arm_type1_sim, sango, pgm_arm_type1_state, init_kov, ROT0, "IGS", "Knights of Valour / Sanguo Zhan Ji / Sangoku Senki (ver. 115)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */ // V0006 02/22/99 11:53:18 GAME( 1999, kov114, kov, pgm_arm_type1_sim, sango, pgm_arm_type1_state, init_kov, ROT0, "IGS", "Knights of Valour / Sanguo Zhan Ji / Sangoku Senki (ver. 114, Hong Kong)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */ GAME( 1999, kov111, kov, pgm_arm_type1_sim, sango, pgm_arm_type1_state, init_kov, ROT0, "IGS", "Knights of Valour / Sanguo Zhan Ji / Sangoku Senki (ver. 111, Japanese Board)", MACHINE_IMPERFECT_SOUND | MACHINE_UNEMULATED_PROTECTION | MACHINE_SUPPORTS_SAVE ) /* need internal rom of IGS027A */ // V0002 01/31/99 01:54:16 diff -Nru mame-0.230+dfsg.1/src/mame/drivers/playmark.cpp mame-0.231+dfsg.1/src/mame/drivers/playmark.cpp --- mame-0.230+dfsg.1/src/mame/drivers/playmark.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/playmark.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -86,6 +86,7 @@ - Lucky Boom has some minor colour issue with the background - see the title screen. The game selects the wrong colour for some tiles. The tiles should be colour 0x01 not 0x02. Affects the backgrounds in game however it's barely noticeable. +- Fix banking for both World Beach Volleyball configurations (PIC and MCS MCUs) ***************************************************************************/ @@ -252,6 +253,29 @@ } } +uint8_t playmark_state::wbeachvla_snd_command_r() // TODO: convert the rest of the driver to use generic_latch_8_device and merge this with playmark_snd_command_r +{ + uint8_t data = 0; + + if ((m_oki_control & 0x38) == 0x30) + data = m_soundlatch->read(); + else if ((m_oki_control & 0x38) == 0x28) + data = (m_oki->read() & 0x0f); + + return data; +} + +void playmark_state::wbeachvla_snd_control_w(uint8_t data) // TODO: merge this with playmark_snd_control_w +{ + m_oki_control = data; + + m_okibank->set_entry(data & 7); + + if ((data & 0x38) == 0x18) + { + m_oki->write(m_oki_command); + } +} /***************************** 68000 Memory Maps ****************************/ @@ -321,6 +345,13 @@ map(0xff0000, 0xffffff).ram(); } +void playmark_state::wbeachvla_main_map(address_map &map) +{ + wbeachvl_main_map(map); + + map(0x71001f, 0x71001f).w(m_soundlatch, FUNC(generic_latch_8_device::write)); +} + void playmark_state::excelsr_main_map(address_map &map) { map(0x000000, 0x2fffff).rom(); @@ -1157,9 +1188,18 @@ { wbeachvl_base(config); + m_maincpu->set_addrmap(AS_PROGRAM, &playmark_state::wbeachvla_main_map); + I87C51(config, m_audio_mcs, 24'000'000 / 2); // actually S87C751, clock unverified, near a 24 MHz XTAL + //m_audio_mcs->port_in_cb<1>().set(); // TODO: reads something here. pending_r? + m_audio_mcs->port_out_cb<1>().set(FUNC(playmark_state::wbeachvla_snd_control_w)); + m_audio_mcs->port_in_cb<3>().set(FUNC(playmark_state::wbeachvla_snd_command_r)); + m_audio_mcs->port_out_cb<3>().set(FUNC(playmark_state::playmark_oki_w)); I87C51(config, "extracpu", 12'000'000); // actually S87C751, clock unverified, on a sub PCB near a 12 MHz XTAL + + GENERIC_LATCH_8(config, m_soundlatch); + m_soundlatch->data_pending_callback().set_inputline(m_audio_mcs, MCS51_INT1_LINE, HOLD_LINE); } void playmark_state::excelsr(machine_config &config) @@ -1822,7 +1862,7 @@ GAME( 1995, bigtwin, 0, bigtwin, bigtwin, playmark_state, init_pic_decode, ROT0, "Playmark", "Big Twin", MACHINE_SUPPORTS_SAVE ) GAME( 1995, bigtwinb, bigtwin, bigtwinb, bigtwinb, playmark_state, init_pic_decode, ROT0, "Playmark", "Big Twin (No Girls Conversion)", MACHINE_SUPPORTS_SAVE ) GAME( 1995, wbeachvl, 0, wbeachvl_pic, wbeachvl, playmark_state, empty_init, ROT0, "Playmark", "World Beach Volley (set 1, PIC16C57 audio CPU)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // no music due to incorrect OKI banking / PIC hookup -GAME( 1995, wbeachvla, wbeachvl, wbeachvl_mcs, wbeachvl, playmark_state, empty_init, ROT0, "Playmark", "World Beach Volley (set 1, S87C751 audio CPU)", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE ) // S87C751 not hooked up +GAME( 1995, wbeachvla, wbeachvl, wbeachvl_mcs, wbeachvl, playmark_state, empty_init, ROT0, "Playmark", "World Beach Volley (set 1, S87C751 audio CPU)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // wrong banking, so some sounds are played at the wrong time GAME( 1995, wbeachvl2, wbeachvl, wbeachvl_pic, wbeachvl, playmark_state, empty_init, ROT0, "Playmark", "World Beach Volley (set 2)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) GAME( 1995, wbeachvl3, wbeachvl, wbeachvl_pic, wbeachvl, playmark_state, empty_init, ROT0, "Playmark", "World Beach Volley (set 3)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) GAME( 1996, excelsr, 0, excelsr, excelsr, playmark_state, init_pic_decode, ROT0, "Playmark", "Excelsior (set 1)", MACHINE_SUPPORTS_SAVE ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/pockchal.cpp mame-0.231+dfsg.1/src/mame/drivers/pockchal.cpp --- mame-0.230+dfsg.1/src/mame/drivers/pockchal.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/pockchal.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -32,6 +32,8 @@ #include "softlist.h" +namespace { + class pockchalv1_state : public driver_device { public: @@ -55,7 +57,7 @@ required_device m_maincpu; required_device m_cart; - uint32_t m_rom_size; + uint32_t m_rom_size; }; @@ -131,5 +133,8 @@ ROM_START( pockchal ) ROM_END +} // Anonymous namespace + + // YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS CONS( 199?, pockchal, 0, 0, pockchalv1, pockchalv1, pockchalv1_state, empty_init, "Benesse Corporation", "Pocket Challenge W (Japan)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/pokechmp.cpp mame-0.231+dfsg.1/src/mame/drivers/pokechmp.cpp --- mame-0.230+dfsg.1/src/mame/drivers/pokechmp.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/pokechmp.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -44,9 +44,9 @@ #include "includes/pokechmp.h" #include "cpu/m6502/m6502.h" -#include "sound/3812intf.h" #include "sound/okim6295.h" #include "sound/ym2203.h" +#include "sound/ym3812.h" #include "screen.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/prehisle.cpp mame-0.231+dfsg.1/src/mame/drivers/prehisle.cpp --- mame-0.230+dfsg.1/src/mame/drivers/prehisle.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/prehisle.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -16,7 +16,7 @@ #include "cpu/z80/z80.h" #include "cpu/m68000/m68000.h" -#include "sound/3812intf.h" +#include "sound/ym3812.h" #include "screen.h" #include "speaker.h" @@ -75,8 +75,8 @@ void prehisle_state::prehisle_sound_io_map(address_map &map) { map.global_mask(0xff); - map(0x00, 0x00).rw("ymsnd", FUNC(ym3812_device::status_port_r), FUNC(ym3812_device::control_port_w)); - map(0x20, 0x20).w("ymsnd", FUNC(ym3812_device::write_port_w)); + map(0x00, 0x00).rw("ymsnd", FUNC(ym3812_device::status_r), FUNC(ym3812_device::address_w)); + map(0x20, 0x20).w("ymsnd", FUNC(ym3812_device::data_w)); map(0x40, 0x40).w(FUNC(prehisle_state::upd_port_w)); map(0x80, 0x80).lw8(NAME([this] (u8 data) { m_upd7759->reset_w(BIT(data, 7)); })); } diff -Nru mame-0.230+dfsg.1/src/mame/drivers/qx10.cpp mame-0.231+dfsg.1/src/mame/drivers/qx10.cpp --- mame-0.230+dfsg.1/src/mame/drivers/qx10.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/qx10.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -11,6 +11,7 @@ Done: - preliminary memory map + - sound - floppy (upd765) - DMA - Interrupts (pic8295) @@ -45,6 +46,8 @@ #include "machine/ram.h" #include "machine/upd765.h" #include "machine/z80sio.h" +#include "sound/spkrdev.h" +#include "speaker.h" #include "video/upd7220.h" #include "emupal.h" @@ -79,6 +82,7 @@ m_hgdc(*this, "upd7220"), m_rtc(*this, "rtc"), m_kbd(*this, "kbd"), + m_speaker(*this, "speaker"), m_vram_bank(0), m_char_rom(*this, "chargen"), m_maincpu(*this, "maincpu"), @@ -100,14 +104,14 @@ void update_memory_mapping(); + void update_speaker(); + void qx10_18_w(uint8_t data); void prom_sel_w(uint8_t data); void cmos_sel_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER( qx10_upd765_interrupt ); void fdd_motor_w(uint8_t data); uint8_t qx10_30_r(); - uint8_t gdc_dack_r(); - void gdc_dack_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER( tc_w ); uint8_t mc146818_r(offs_t offset); void mc146818_w(offs_t offset, uint8_t data); @@ -121,6 +125,8 @@ void memory_write_byte(offs_t offset, uint8_t data); DECLARE_WRITE_LINE_MEMBER(keyboard_clk); DECLARE_WRITE_LINE_MEMBER(keyboard_irq); + DECLARE_WRITE_LINE_MEMBER(speaker_freq); + DECLARE_WRITE_LINE_MEMBER(speaker_duration); DECLARE_QUICKLOAD_LOAD_MEMBER(quickload_cb); @@ -147,6 +153,7 @@ required_device m_hgdc; required_device m_rtc; required_device m_kbd; + required_device m_speaker; uint8_t m_vram_bank; //required_shared_ptr m_video_ram; std::unique_ptr m_video_ram; @@ -162,6 +169,10 @@ int m_fdcmotor; //int m_fdcready; + int m_spkr_enable; + int m_spkr_freq; + int m_pit1_out0; + /* memory */ int m_membank; int m_memprom; @@ -255,6 +266,23 @@ } /* + Sound +*/ +void qx10_state::update_speaker() +{ + + /* + * freq ----- + * pit1_out0 ----- NAND ---- level + * NAND ----- + * !enable ----- + */ + + uint8_t level = ((!m_spkr_enable && m_pit1_out0) || !m_spkr_freq) ? 1 : 0; + m_speaker->level_w(level); +} + +/* Memory */ void qx10_state::update_memory_mapping() @@ -299,6 +327,9 @@ void qx10_state::qx10_18_w(uint8_t data) { m_membank = (data >> 4) & 0x0f; + m_spkr_enable = (data >> 2) & 0x01; + m_pit_1->write_gate0(data & 1); + update_speaker(); update_memory_mapping(); } @@ -386,6 +417,7 @@ m_fdcmotor = 1; m_floppy[0]->get_device()->mon_w(false); + m_floppy[1]->get_device()->mon_w(false); // motor off controlled by clock } @@ -411,17 +443,6 @@ m_dma_1->hack_w(state); } -uint8_t qx10_state::gdc_dack_r() -{ - logerror("GDC DACK read\n"); - return 0; -} - -void qx10_state::gdc_dack_w(uint8_t data) -{ - logerror("GDC DACK write %02x\n", data); -} - WRITE_LINE_MEMBER( qx10_state::tc_w ) { /* floppy terminal count */ @@ -481,6 +502,18 @@ m_scc->txca_w(state); } +WRITE_LINE_MEMBER(qx10_state::speaker_duration) +{ + m_pit1_out0 = state; + update_speaker(); +} + +WRITE_LINE_MEMBER(qx10_state::speaker_freq) +{ + m_spkr_freq = state; + update_speaker(); +} + /* Master PIC8259 IR0 Power down detection interrupt @@ -628,6 +661,10 @@ void qx10_state::machine_reset() { m_dma_1->dreq0_w(1); + m_dma_1->dreq1_w(1); + + m_spkr_enable = 0; + m_pit1_out0 = 1; m_memprom = 0; m_memcmos = 0; @@ -678,7 +715,7 @@ void qx10_state::video_start() { // allocate memory - m_video_ram = make_unique_clear(0x30000); + m_video_ram = make_unique_clear(0x60000); } void qx10_state::qx10_palette(palette_device &palette) const @@ -744,6 +781,7 @@ */ PIT8253(config, m_pit_1, 0); m_pit_1->set_clk<0>(1200); + m_pit_1->out_handler<0>().set(FUNC(qx10_state::speaker_duration)); m_pit_1->set_clk<1>(1200); m_pit_1->set_clk<2>(MAIN_CLK / 8); @@ -756,6 +794,7 @@ */ PIT8253(config, m_pit_2, 0); m_pit_2->set_clk<0>(MAIN_CLK / 8); + m_pit_2->out_handler<0>().set(FUNC(qx10_state::speaker_freq)); m_pit_2->set_clk<1>(MAIN_CLK / 8); m_pit_2->out_handler<1>().set(FUNC(qx10_state::keyboard_clk)); m_pit_2->set_clk<2>(MAIN_CLK / 8); @@ -785,11 +824,9 @@ m_dma_1->in_memr_callback().set(FUNC(qx10_state::memory_read_byte)); m_dma_1->out_memw_callback().set(FUNC(qx10_state::memory_write_byte)); m_dma_1->in_ior_callback<0>().set(m_fdc, FUNC(upd765a_device::dma_r)); - m_dma_1->in_ior_callback<1>().set(FUNC(qx10_state::gdc_dack_r)); - //m_dma_1->in_ior_callback<2>().set(m_hgdc, FUNC(upd7220_device::dack_r)); + m_dma_1->in_ior_callback<1>().set(m_hgdc, FUNC(upd7220_device::dack_r)); m_dma_1->out_iow_callback<0>().set(m_fdc, FUNC(upd765a_device::dma_w)); - m_dma_1->out_iow_callback<1>().set(FUNC(qx10_state::gdc_dack_w)); - //m_dma_1->out_iow_callback<2>().set(m_hgdc, FUNC(upd7220_device::dack_w)); + m_dma_1->out_iow_callback<1>().set(m_hgdc, FUNC(upd7220_device::dack_w)); AM9517A(config, m_dma_2, MAIN_CLK/4); I8255(config, m_ppi, 0); @@ -798,6 +835,7 @@ m_hgdc->set_addrmap(0, &qx10_state::upd7220_map); m_hgdc->set_display_pixels(FUNC(qx10_state::hgdc_display_pixels)); m_hgdc->set_draw_text(FUNC(qx10_state::hgdc_draw_text)); + m_hgdc->drq_wr_callback().set(m_dma_1, FUNC(am9517a_device::dreq1_w)).invert(); m_hgdc->set_screen("screen"); MC146818(config, m_rtc, 32.768_kHz_XTAL); @@ -815,6 +853,10 @@ RS232_PORT(config, m_kbd, keyboard, "qx10"); m_kbd->rxd_handler().set(m_scc, FUNC(upd7201_device::rxa_w)); + /* sound hardware */ + SPEAKER(config, "mono").front_center(); + SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 1.00); + /* internal ram */ RAM(config, RAM_TAG).set_default_size("256K"); @@ -847,4 +889,4 @@ /* Driver */ /* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ -COMP( 1983, qx10, 0, 0, qx10, qx10, qx10_state, empty_init, "Epson", "QX-10", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) +COMP( 1983, qx10, 0, 0, qx10, qx10, qx10_state, empty_init, "Epson", "QX-10", MACHINE_NOT_WORKING ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/r2dx_v33.cpp mame-0.231+dfsg.1/src/mame/drivers/r2dx_v33.cpp --- mame-0.230+dfsg.1/src/mame/drivers/r2dx_v33.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/r2dx_v33.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -68,9 +68,8 @@ #include "cpu/nec/nec.h" #include "cpu/z80/z80.h" #include "machine/eepromser.h" -#include "sound/3812intf.h" #include "sound/okim6295.h" -//#include "sound/ym2151.h" +#include "sound/ym3812.h" #include "machine/r2crypt.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/rabbit.cpp mame-0.231+dfsg.1/src/mame/drivers/rabbit.cpp --- mame-0.230+dfsg.1/src/mame/drivers/rabbit.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/rabbit.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -884,7 +884,7 @@ irq 5 = ? irq 1 = ? - */ +*/ INTERRUPT_GEN_MEMBER(rabbit_state::vblank_interrupt) { @@ -1110,7 +1110,7 @@ ROM_LOAD( "epm7032.u1", 0x0000, 0x0798, CRC(bb1c930e) SHA1(7513ed6a0d797276dab1e3446fe346a9c340e69d) ) // unprotected ROM_END -GAME( 1997, rabbit, 0, rabbit, rabbit, rabbit_state, init_rabbit, ROT0, "Aorn / Electronic Arts", "Rabbit (Asia 3/6)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // For use in Japan notice, English text, (C) 1997 -GAME( 1996, rabbita, rabbit, rabbit, rabbit, rabbit_state, init_rabbit, ROT0, "Aorn / Electronic Arts", "Rabbit (Asia 1-28?)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // For use in Japan notice, English text, (C) 1996 +GAME( 1997, rabbit, 0, rabbit, rabbit, rabbit_state, init_rabbit, ROT0, "Aorn / Electronic Arts", "Rabbit (Asia 3/6)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // For use in Japan notice, English text, (C) 1997 +GAME( 1996, rabbita, rabbit, rabbit, rabbit, rabbit_state, init_rabbit, ROT0, "Aorn / Electronic Arts", "Rabbit (Asia 1/28?)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // For use in Japan notice, English text, (C) 1996 GAME( 1997, rabbitj, rabbit, rabbit, rabbit, rabbit_state, init_rabbit, ROT0, "Aorn / Electronic Arts", "Rabbit (Japan 3/6?)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // For use in Japan notice, Japanese text, (C) 1997 GAME( 1996, rabbitjt, rabbit, rabbit, rabbit, rabbit_state, init_rabbit, ROT0, "Aorn / Electronic Arts", "Rabbit (Japan 1/28, location test)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // For use in Japan notice, Japanese text, (C) 1996 diff -Nru mame-0.230+dfsg.1/src/mame/drivers/radionic.cpp mame-0.231+dfsg.1/src/mame/drivers/radionic.cpp --- mame-0.230+dfsg.1/src/mame/drivers/radionic.cpp 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/radionic.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,578 @@ +// license:BSD-3-Clause +// copyright-holders:Robbbert +/*************************************************************************** +Komtek 1 (Radionic R1001) memory map + +0000-37ff ROM R D0-D7 +37de UART status R/W D0-D7 +37df UART data R/W D0-D7 +37e0 interrupt latch address +37e1 select disk drive 0 W +37e2 cassette drive latch address W +37e3 select disk drive 1 W +37e4 select which cassette unit W D0-D1 (D0 selects unit 1, D1 selects unit 2) +37e5 select disk drive 2 W +37e7 select disk drive 3 W +37e0-37e3 floppy motor W D0-D3 + or floppy head select W D3 +37e8 send a byte to printer W D0-D7 +37e8 read printer status R D7 +37ec-37ef FDC FD1771 R/W D0-D7 +37ec command W D0-D7 +37ec status R D0-D7 +37ed track R/W D0-D7 +37ee sector R/W D0-D7 +37ef data R/W D0-D7 +3800-38ff keyboard matrix R D0-D7 +3900-3bff unused - kbd mirrored +3c00-3fff static video RAM and colour ram, banked +4000-ffff dynamic main RAM + +Printer: Usually 37e8, but you can use the PPI instead. + +Cassette baud rate: 500 baud + +I/O ports +FF: +- bits 0 and 1 are for writing a cassette +- bit 2 must be high to turn the cassette motor on, enables cassette data paths on a system-80 +- bit 3 switches the display between 64 or 32 characters per line +- bit 6 remembers the 32/64 screen mode (inverted) +- bit 7 is for reading from a cassette + +Shift and Right-arrow will enable 32 cpl. + +SYSTEM commands: + - Press Break (End key) to quit + - Press Enter to exit with error + - xxxx to load program xxxx from tape. + - / to execute last program loaded + - /nnnnn to execute program at nnnnn (decimal) + +Inbuilt Monitor - its existence is not revealed to the user. + - SYSTEM then /12710 = enter machine-language monitor + Monitor commands: + - B : return to Basic + - Dnnnn : Dump hex to screen. Press down-arrow for more. Press enter to quit. + - Mnnnn : Modify memory. Enter new byte and it increments to next address. X to quit. + - Gnnnn : Execute program at nnnn + - Gnnnn,tttt : as above, breakpoint at tttt + - R : modify registers + The monitor appears to end at 33D3, however the rom contains more code through to 35EB. + But, the 34xx area is overwitten by the optional RS-232 expansion box. + +About the RTC - The time is incremented while it is enabled via the Machine Configuration. The time + is stored in a series of bytes in the computer's work area. The bytes are in a certain order, + this being: seconds, minutes, hours, days. The seconds are stored at 0x4041. A reboot always + sets the time to zero. + +About colours - The computer has 16 colours with a byte at 350B controlling the operation. + POKE 13579,2 : monochrome + POKE 13579,4 : programmable colour + POKE 13579,12 : automatic colour + More information was discovered, this being + - It doesn't have to be 350B (13579), anything in the 35xx range will do. + - d0 : write of vram goes to vram (0 = yes, 1 = no) + - d1 : write of vram goes to colour ram (0 = yes, 1 = no) + - d2 : colour enable (0 = monochrome, 1 = colour) + - d3 : programmable or automatic (0 = programmable, 1 = automatic) + The colour codes and names are listed in the palette below. The descriptions are quite vague, + and appear to be background only. The foreground is assumed to always be white. + Automatic is a preset colour set by internal jumpers. + - No schematic or technical info for the colour board + - No information on the settings of the Automatic mode + - The "User Friendly Manual" has a bunch of mistakes (page 15). + - It's not known if colour ram can be read. But LDOS won't scroll if it can't always read vram. + - No colour programs exist in the wild, so nothing can be verified. + So, some guesswork has been done. + +About the PPI - A selling point of this computer was the ability to sense and control external gadgets. + For example, it could join to a temperature sensor, and when the temperature reached a certain value + the computer could instruct a device to turn on or off. There's 4 input jacks and 6 output jacks. + The PPI can also control a parallel printer. To enable this, enter SYSTEM then /12367 . + +About the RS-232 unit - This is an external box that plugs into the expansion port. It takes over memory + region 3400-34FF, although it only uses 3400 and 3401. It has a baud generator consisting of 2x 74LS163 + and a dipswitch block to choose one of 5 possible rates. The UART and RS-232 parts are conventional. + There's no programming of the unit from the inbuilt roms; you need to write your own. + +******************************************************************************************************** + +To Do / Status: +-------------- + +- Difficulty loading real tapes. +- Writing to floppy is problematic; freezing/crashing are common issues. +- Add fdc doubler (only some info available) + +*******************************************************************************************************/ + +#include "emu.h" +#include "includes/trs80.h" +#include "machine/i8251.h" +#include "machine/i8255.h" +#include "machine/clock.h" +#include "bus/rs232/rs232.h" +#define MASTER_XTAL 12164800 + + +class radionic_state : public trs80_state +{ +public: + radionic_state(const machine_config &mconfig, device_type type, const char *tag) + : trs80_state(mconfig, type, tag) + , m_ppi(*this, "ppi") + , m_uart2(*this, "uart2") + , m_clock(*this, "uclock") + { } + + void radionic(machine_config &config); + +private: + INTERRUPT_GEN_MEMBER(rtc_via_nmi); + void radionic_palette(palette_device &palette) const; + uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + std::unique_ptr m_vram; // video ram + std::unique_ptr m_cram; // colour ram + void machine_start() override; + void machine_reset() override; + void cctrl_w(offs_t offset, u8 data); + void video_w(offs_t offset, u8 data); + u8 video_r(offs_t offset); + void ppi_pa_w(offs_t offset, u8 data); + void ppi_pb_w(offs_t offset, u8 data); + void ppi_pc_w(offs_t offset, u8 data); + u8 ppi_pc_r(offs_t offset); + void mem_map(address_map &map); + static void floppy_formats(format_registration &fr); + u8 m_cctrl = 2; + required_device m_ppi; + required_device m_uart2; + required_device m_clock; +}; + +void radionic_state::mem_map(address_map &map) +{ + map(0x0000, 0x37ff).rom(); + map(0x3400, 0x3401).mirror(0xfe).rw("uart2", FUNC(i8251_device::read), FUNC(i8251_device::write)); // optional RS-232 + map(0x3500, 0x35ff).w(FUNC(radionic_state::cctrl_w)); + map(0x3600, 0x3603).mirror(0xfc).rw("ppi", FUNC(i8255_device::read), FUNC(i8255_device::write)); // interface to external sensors + map(0x37e0, 0x37e3).rw(FUNC(radionic_state::irq_status_r), FUNC(radionic_state::motor_w)); + map(0x37e8, 0x37eb).rw(FUNC(radionic_state::printer_r), FUNC(radionic_state::printer_w)); + map(0x37ec, 0x37ef).rw(FUNC(radionic_state::fdc_r), FUNC(radionic_state::fdc_w)); + map(0x3800, 0x3bff).r(FUNC(radionic_state::keyboard_r)); + map(0x3c00, 0x3fff).rw(FUNC(radionic_state::video_r), FUNC(radionic_state::video_w)); + map(0x4000, 0xffff).ram(); +} + +/************************************************************************** + w/o SHIFT with SHIFT + +-------------------------------+ +-------------------------------+ + | 0 1 2 3 4 5 6 7 | | 0 1 2 3 4 5 6 7 | ++--+---+---+---+---+---+---+---+---+ +--+---+---+---+---+---+---+---+---+ +|0 | @ | A | B | C | D | E | F | G | |0 | ` | a | b | c | d | e | f | g | +| +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ +|1 | H | I | J | K | L | M | N | O | |1 | h | i | j | k | l | m | n | o | +| +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ +|2 | P | Q | R | S | T | U | V | W | |2 | p | q | r | s | t | u | v | w | +| +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ +|3 | X | Y | Z | [ | \ | ] | ^ | _ | |3 | x | y | z | { | | | } | ~ | | +| +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ +|4 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | |4 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | +| +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ +|5 | 8 | 9 | : | ; | , | - | . | / | |5 | 8 | 9 | * | + | < | = | > | ? | +| +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ +|6 |ENT|CLR|BRK|UP |DN |LFT|RGT|SPC| |6 |ENT|CLR|BRK|UP |DN |LFT|RGT|SPC| +| +---+---+---+---+---+---+---+---+ | +---+---+---+---+---+---+---+---+ +|7 |SHF| | | | | | | | |7 |SHF| | | | | | | | ++--+---+---+---+---+---+---+---+---+ +--+---+---+---+---+---+---+---+---+ + +***************************************************************************/ + +static INPUT_PORTS_START( radionic ) + PORT_START("LINE0") + PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_NAME("@") PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('@') + PORT_BIT(0x02, 0x00, IPT_KEYBOARD) PORT_NAME("A") PORT_CODE(KEYCODE_A) PORT_CHAR('A') PORT_CHAR('a') + PORT_BIT(0x04, 0x00, IPT_KEYBOARD) PORT_NAME("B") PORT_CODE(KEYCODE_B) PORT_CHAR('B') PORT_CHAR('b') + PORT_BIT(0x08, 0x00, IPT_KEYBOARD) PORT_NAME("C") PORT_CODE(KEYCODE_C) PORT_CHAR('C') PORT_CHAR('c') + PORT_BIT(0x10, 0x00, IPT_KEYBOARD) PORT_NAME("D") PORT_CODE(KEYCODE_D) PORT_CHAR('D') PORT_CHAR('d') + PORT_BIT(0x20, 0x00, IPT_KEYBOARD) PORT_NAME("E") PORT_CODE(KEYCODE_E) PORT_CHAR('E') PORT_CHAR('e') + PORT_BIT(0x40, 0x00, IPT_KEYBOARD) PORT_NAME("F") PORT_CODE(KEYCODE_F) PORT_CHAR('F') PORT_CHAR('f') + PORT_BIT(0x80, 0x00, IPT_KEYBOARD) PORT_NAME("G") PORT_CODE(KEYCODE_G) PORT_CHAR('G') PORT_CHAR('g') + + PORT_START("LINE1") + PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_NAME("H") PORT_CODE(KEYCODE_H) PORT_CHAR('H') PORT_CHAR('h') + PORT_BIT(0x02, 0x00, IPT_KEYBOARD) PORT_NAME("I") PORT_CODE(KEYCODE_I) PORT_CHAR('I') PORT_CHAR('i') + PORT_BIT(0x04, 0x00, IPT_KEYBOARD) PORT_NAME("J") PORT_CODE(KEYCODE_J) PORT_CHAR('J') PORT_CHAR('j') + PORT_BIT(0x08, 0x00, IPT_KEYBOARD) PORT_NAME("K") PORT_CODE(KEYCODE_K) PORT_CHAR('K') PORT_CHAR('k') + PORT_BIT(0x10, 0x00, IPT_KEYBOARD) PORT_NAME("L") PORT_CODE(KEYCODE_L) PORT_CHAR('L') PORT_CHAR('l') + PORT_BIT(0x20, 0x00, IPT_KEYBOARD) PORT_NAME("M") PORT_CODE(KEYCODE_M) PORT_CHAR('M') PORT_CHAR('m') + PORT_BIT(0x40, 0x00, IPT_KEYBOARD) PORT_NAME("N") PORT_CODE(KEYCODE_N) PORT_CHAR('N') PORT_CHAR('n') + PORT_BIT(0x80, 0x00, IPT_KEYBOARD) PORT_NAME("O") PORT_CODE(KEYCODE_O) PORT_CHAR('O') PORT_CHAR('o') + + PORT_START("LINE2") + PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_NAME("P") PORT_CODE(KEYCODE_P) PORT_CHAR('P') PORT_CHAR('p') + PORT_BIT(0x02, 0x00, IPT_KEYBOARD) PORT_NAME("Q") PORT_CODE(KEYCODE_Q) PORT_CHAR('Q') PORT_CHAR('q') + PORT_BIT(0x04, 0x00, IPT_KEYBOARD) PORT_NAME("R") PORT_CODE(KEYCODE_R) PORT_CHAR('R') PORT_CHAR('r') + PORT_BIT(0x08, 0x00, IPT_KEYBOARD) PORT_NAME("S") PORT_CODE(KEYCODE_S) PORT_CHAR('S') PORT_CHAR('s') + PORT_BIT(0x10, 0x00, IPT_KEYBOARD) PORT_NAME("T") PORT_CODE(KEYCODE_T) PORT_CHAR('T') PORT_CHAR('t') + PORT_BIT(0x20, 0x00, IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U) PORT_CHAR('U') PORT_CHAR('u') + PORT_BIT(0x40, 0x00, IPT_KEYBOARD) PORT_NAME("V") PORT_CODE(KEYCODE_V) PORT_CHAR('V') PORT_CHAR('v') + PORT_BIT(0x80, 0x00, IPT_KEYBOARD) PORT_NAME("W") PORT_CODE(KEYCODE_W) PORT_CHAR('W') PORT_CHAR('w') + + PORT_START("LINE3") + PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_NAME("X") PORT_CODE(KEYCODE_X) PORT_CHAR('X') PORT_CHAR('x') + PORT_BIT(0x02, 0x00, IPT_KEYBOARD) PORT_NAME("Y") PORT_CODE(KEYCODE_Y) PORT_CHAR('Y') PORT_CHAR('y') + PORT_BIT(0x04, 0x00, IPT_KEYBOARD) PORT_NAME("Z") PORT_CODE(KEYCODE_Z) PORT_CHAR('Z') PORT_CHAR('z') + PORT_BIT(0x08, 0x00, IPT_KEYBOARD) PORT_NAME("[") PORT_CODE(KEYCODE_F1) PORT_CHAR('[') PORT_CHAR('{') + PORT_BIT(0x10, 0x00, IPT_KEYBOARD) PORT_NAME("\\") PORT_CODE(KEYCODE_F2) PORT_CHAR('\\') PORT_CHAR('}') + PORT_BIT(0x20, 0x00, IPT_KEYBOARD) PORT_NAME("]") PORT_CODE(KEYCODE_F3) PORT_CHAR(']') PORT_CHAR('|') + PORT_BIT(0x40, 0x00, IPT_KEYBOARD) PORT_NAME("^") PORT_CODE(KEYCODE_F4) PORT_CHAR('^') + PORT_BIT(0x80, 0x00, IPT_KEYBOARD) PORT_NAME("_") PORT_CODE(KEYCODE_F5) PORT_CHAR('_') // radionic: LF + + PORT_START("LINE4") // Number pad: System 80 Mk II only + PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_NAME("0") PORT_CODE(KEYCODE_0) PORT_CODE(KEYCODE_0_PAD) PORT_CHAR('0') + PORT_BIT(0x02, 0x00, IPT_KEYBOARD) PORT_NAME("1") PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) PORT_CHAR('1') PORT_CHAR('!') + PORT_BIT(0x04, 0x00, IPT_KEYBOARD) PORT_NAME("2") PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) PORT_CHAR('2') PORT_CHAR('"') + PORT_BIT(0x08, 0x00, IPT_KEYBOARD) PORT_NAME("3") PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) PORT_CHAR('3') PORT_CHAR('#') + PORT_BIT(0x10, 0x00, IPT_KEYBOARD) PORT_NAME("4") PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) PORT_CHAR('4') PORT_CHAR('$') + PORT_BIT(0x20, 0x00, IPT_KEYBOARD) PORT_NAME("5") PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) PORT_CHAR('5') PORT_CHAR('%') + PORT_BIT(0x40, 0x00, IPT_KEYBOARD) PORT_NAME("6") PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) PORT_CHAR('6') PORT_CHAR('&') + PORT_BIT(0x80, 0x00, IPT_KEYBOARD) PORT_NAME("7") PORT_CODE(KEYCODE_7) PORT_CODE(KEYCODE_7_PAD) PORT_CHAR('7') PORT_CHAR('\'') + + PORT_START("LINE5") + PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_NAME("8") PORT_CODE(KEYCODE_8) PORT_CODE(KEYCODE_8_PAD) PORT_CHAR('8') PORT_CHAR('(') + PORT_BIT(0x02, 0x00, IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) PORT_CODE(KEYCODE_9_PAD) PORT_CHAR('9') PORT_CHAR(')') + PORT_BIT(0x04, 0x00, IPT_KEYBOARD) PORT_NAME(": *") PORT_CODE(KEYCODE_MINUS) PORT_CHAR(':') PORT_CHAR('*') + PORT_BIT(0x08, 0x00, IPT_KEYBOARD) PORT_NAME("; +") PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR('+') + PORT_BIT(0x10, 0x00, IPT_KEYBOARD) PORT_NAME(", <") PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') + PORT_BIT(0x20, 0x00, IPT_KEYBOARD) PORT_NAME("- =") PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('-') PORT_CHAR('=') + PORT_BIT(0x40, 0x00, IPT_KEYBOARD) PORT_NAME(". >") PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') + PORT_BIT(0x80, 0x00, IPT_KEYBOARD) PORT_NAME("/ ?") PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') + + PORT_START("LINE6") + PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_NAME("Enter") PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_CHAR(13) + PORT_BIT(0x02, 0x00, IPT_KEYBOARD) PORT_NAME("Clear") PORT_CODE(KEYCODE_HOME) PORT_CHAR(UCHAR_MAMEKEY(F8)) + PORT_BIT(0x04, 0x00, IPT_KEYBOARD) PORT_NAME("Break") PORT_CODE(KEYCODE_END) PORT_CHAR(UCHAR_MAMEKEY(F9)) + PORT_BIT(0x08, 0x00, IPT_KEYBOARD) PORT_NAME(UTF8_UP) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) + PORT_BIT(0x10, 0x00, IPT_KEYBOARD) PORT_NAME("Down") PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) + /* backspace do the same as cursor left */ + PORT_BIT(0x20, 0x00, IPT_KEYBOARD) PORT_NAME("Left") PORT_CODE(KEYCODE_LEFT) PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) + PORT_BIT(0x40, 0x00, IPT_KEYBOARD) PORT_NAME("Right") PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) + PORT_BIT(0x80, 0x00, IPT_KEYBOARD) PORT_NAME("Space") PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') + + PORT_START("LINE7") + PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_NAME("Left Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) + PORT_BIT(0xfe, 0x00, IPT_UNUSED) + + PORT_START("CONFIG") + PORT_CONFNAME( 0xc0, 0x00, "Floppy and RTC") // Floppy doesn't work if RTC is on, so interlink them. + PORT_CONFSETTING( 0x00, "Both Off" ) + PORT_CONFSETTING( 0x80, "RTC off, Floppy On" ) + PORT_CONFSETTING( 0x40, "RTC on, Floppy Off" ) + PORT_CONFNAME( 0x30, 0x00, "Colour") // 2 switches on the side + PORT_CONFSETTING( 0x00, "Monochrome" ) + PORT_CONFSETTING( 0x10, "Auto Colour" ) + PORT_CONFSETTING( 0x30, "Programmable Colour" ) + PORT_CONFNAME( 0x07, 0x00, "Serial Port" ) // a jumper on the board? (not documented) + PORT_CONFSETTING( 0x00, "300 baud" ) + PORT_CONFSETTING( 0x01, "600 baud" ) + PORT_CONFSETTING( 0x02, "1200 baud" ) + PORT_CONFSETTING( 0x03, "2400 baud" ) + PORT_CONFSETTING( 0x04, "4800 baud" ) +INPUT_PORTS_END + + +/* Levels are unknown - guessing */ +static constexpr rgb_t radionic_pens[] = +{ + // colour + { 200, 200, 200 }, // 0 off white + { 0, 255, 0 }, // 1 light green + { 255, 0, 0 }, // 2 red + { 0, 128, 0 }, // 3 dark green + { 0, 0, 255 }, // 4 blue + { 0, 255, 255 }, // 5 greenish blue + { 255, 3, 62 }, // 6 rose red + { 136, 155, 174 }, // 7 dusty blue + { 200, 200, 0 }, // 8 greenish yellow + { 173, 255, 47 }, // 9 light yellow (greenish) + { 207, 33, 33 }, // 10 golden red + { 128, 128, 128 }, // 11 grey + { 220, 255, 0 }, // 12 reddish green + { 255, 255, 191 }, // 13 pale yellow + { 247, 170, 0 }, // 14 orange + { 90, 156, 57 }, // 15 ogre green + // monochrome + { 250, 250, 250 }, // 16 white + { 0, 0, 0 } // 17 black +}; + +void radionic_state::radionic_palette(palette_device &palette) const +{ + palette.set_pen_colors(0, radionic_pens); +} + +/**************************** F4 CHARACTER DISPLAYER ***********************************************************/ +static const gfx_layout radionic_charlayout = +{ + 8, 16, /* 8 x 16 characters */ + 256, /* 256 characters */ + 1, /* 1 bits per pixel */ + { 0 }, /* no bitplanes */ + /* x offsets */ + { 7, 6, 5, 4, 3, 2, 1, 0 }, + /* y offsets */ + { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, 2048*8, 2049*8, 2050*8, 2051*8, 2052*8, 2053*8, 2054*8, 2055*8 }, + 8*8 /* every char takes 16 bytes */ +}; + +static GFXDECODE_START(gfx_radionic) + GFXDECODE_ENTRY( "chargen", 0, radionic_charlayout, 0, 1 ) +GFXDECODE_END + +/* lores characters are in the character generator. Each character is 8x16. */ +uint32_t radionic_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +{ + uint16_t sy=0,ma=0; + uint8_t cols = BIT(m_mode, 0) ? 32 : 64; + uint8_t skip = BIT(m_mode, 0) ? 2 : 1; + // colours have to be enabled both by a poke and by switches on the side of the unit + bool col_en = BIT(m_cctrl, 2) && BIT(m_io_config->read(), 4); + bool auto_en = BIT(m_cctrl, 3) || !BIT(m_io_config->read(), 5); + u8 fg = 16, bg = 17; // monochrome + if (col_en && auto_en) + bg = 4; // automatic colour + + if (m_mode != m_size_store) + { + m_size_store = m_mode; + screen.set_visible_area(0, cols*8-1, 0, 16*16-1); + } + + for (uint8_t y = 0; y < 16; y++) + { + for (uint8_t ra = 0; ra < 16; ra++) + { + uint16_t *p = &bitmap.pix(sy++); + + for (uint16_t x = ma; x < ma + 64; x+=skip) + { + uint8_t chr = m_vram[x]; + if (col_en && !auto_en) + bg = m_cram[x] & 15; + + /* get pattern of pixels for that character scanline */ + uint8_t gfx = m_p_chargen[(chr<<3) | (ra & 7) | (ra & 8) << 8]; + + /* Display a scanline of a character (8 pixels) */ + *p++ = BIT(gfx, 0) ? fg : bg; + *p++ = BIT(gfx, 1) ? fg : bg; + *p++ = BIT(gfx, 2) ? fg : bg; + *p++ = BIT(gfx, 3) ? fg : bg; + *p++ = BIT(gfx, 4) ? fg : bg; + *p++ = BIT(gfx, 5) ? fg : bg; + *p++ = BIT(gfx, 6) ? fg : bg; + *p++ = BIT(gfx, 7) ? fg : bg; + } + } + ma+=64; + } + return 0; +} + +void radionic_state::machine_start() +{ + trs80_state::machine_start(); + save_item(NAME(m_cctrl)); + + // video ram + m_vram = make_unique_clear(0x0800); + save_pointer(NAME(m_vram), 0x0800); + + // colour + m_cram = make_unique_clear(0x0800); + save_pointer(NAME(m_cram), 0x0800); +} + +void radionic_state::machine_reset() +{ + trs80_state::machine_reset(); + m_cctrl = 2; + + u8 sw = m_io_config->read() & 7; + u16 baud = 300; + for (u8 i = 0; i < sw; i++) + baud <<= 1; + m_clock->set_unscaled_clock(baud*16); // It's designed on the assumption that the uart will divide by 16 + //printf("%d\n",baud); +} + +INTERRUPT_GEN_MEMBER(radionic_state::rtc_via_nmi) +{ + if (BIT(m_io_config->read(), 6)) + m_maincpu->pulse_input_line(INPUT_LINE_NMI, attotime::from_usec(100)); +} + +u8 radionic_state::video_r(offs_t offset) +{ + return m_vram[offset]; +} + +void radionic_state::video_w(offs_t offset, u8 data) +{ + if (!BIT(m_cctrl, 0)) + m_vram[offset] = data; + if (!BIT(m_cctrl, 1)) + m_cram[offset] = data; +} + +void radionic_state::cctrl_w(offs_t offset, u8 data) +{ + m_cctrl = data & 15; +} + +void radionic_state::ppi_pa_w(offs_t offset, u8 data) +{ + // d0-7: Data to extra printer +} + +void radionic_state::ppi_pb_w(offs_t offset, u8 data) +{ + // d0-7: Outputs to control jacks (only 6 connected up by default) +} + +void radionic_state::ppi_pc_w(offs_t offset, u8 data) +{ + // Printer control + // d0: Strobe +} + +u8 radionic_state::ppi_pc_r(offs_t offset) +{ + // Printer Status + // d1: Busy + // d2: out of paper + // d3: Unit select + + // Sensor Status + // d4-7: sensing inputs + return 0xFF; +} + +void radionic_state::floppy_formats(format_registration &fr) +{ + fr.add(FLOPPY_JV1_FORMAT); +} + +// Most images are single-sided, 40 tracks or less. +// However, the default is QD to prevent MAME from +// crashing if a disk with more than 40 tracks is used. +static void radionic_floppies(device_slot_interface &device) +{ + device.option_add("35t_sd", FLOPPY_525_SSSD_35T); + device.option_add("40t_sd", FLOPPY_525_SSSD); + device.option_add("40t_dd", FLOPPY_525_DD); + device.option_add("80t_qd", FLOPPY_525_QD); +} + +void radionic_state::radionic(machine_config &config) +{ + // Photos from Incog show 12.1648, and 3.579545 xtals. The schematic seems to just approximate these values. + Z80(config, m_maincpu, 3.579545_MHz_XTAL / 2); + //m_maincpu->set_clock(MASTER_XTAL / 6); // early machines only, before the floppy interface was added + m_maincpu->set_addrmap(AS_PROGRAM, &radionic_state::mem_map); + m_maincpu->set_addrmap(AS_IO, &radionic_state::trs80_io); + m_maincpu->set_periodic_int(FUNC(radionic_state::rtc_via_nmi), attotime::from_hz(MASTER_XTAL / 12 / 16384)); + + /* video hardware */ + screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); + screen.set_raw(MASTER_XTAL, 768, 0, 512, 312, 0, 256); + screen.set_screen_update(FUNC(radionic_state::screen_update)); + screen.set_palette("palette"); + + GFXDECODE(config, "gfxdecode", "palette", gfx_radionic); + PALETTE(config, "palette", FUNC(radionic_state::radionic_palette), 18); // 16 colours + monochrome + + /* sound hardware */ + SPEAKER(config, "mono").front_center(); + SPEAKER_SOUND(config, "speaker").add_route(ALL_OUTPUTS, "mono", 0.50); + + /* devices */ + CASSETTE(config, m_cassette); + m_cassette->set_formats(trs80l2_cassette_formats); + m_cassette->set_default_state(CASSETTE_PLAY); + m_cassette->add_route(ALL_OUTPUTS, "mono", 0.05); + m_cassette->set_interface("trs80_cass"); + + quickload_image_device &quickload(QUICKLOAD(config, "quickload", "cmd", attotime::from_seconds(1))); + quickload.set_load_callback(FUNC(radionic_state::quickload_cb)); + quickload.set_interface("trs80_quik"); + + FD1771(config, m_fdc, 16_MHz_XTAL / 16); + m_fdc->intrq_wr_callback().set(FUNC(radionic_state::intrq_w)); + + FLOPPY_CONNECTOR(config, m_floppy[0], radionic_floppies, "80t_qd", radionic_state::floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, m_floppy[1], radionic_floppies, "80t_qd", radionic_state::floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, m_floppy[2], radionic_floppies, nullptr, radionic_state::floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, m_floppy[3], radionic_floppies, nullptr, radionic_state::floppy_formats).enable_sound(true); + + CENTRONICS(config, m_centronics, centronics_devices, "printer"); + m_centronics->busy_handler().set(m_cent_status_in, FUNC(input_buffer_device::write_bit7)); + m_centronics->perror_handler().set(m_cent_status_in, FUNC(input_buffer_device::write_bit6)); + m_centronics->select_handler().set(m_cent_status_in, FUNC(input_buffer_device::write_bit5)); + m_centronics->fault_handler().set(m_cent_status_in, FUNC(input_buffer_device::write_bit4)); + + INPUT_BUFFER(config, m_cent_status_in); + + OUTPUT_LATCH(config, m_cent_data_out); + m_centronics->set_output_latch(*m_cent_data_out); + + CLOCK(config, m_clock, 4'800); + m_clock->signal_handler().set(m_uart2, FUNC(i8251_device::write_txc)); + m_clock->signal_handler().set(m_uart2, FUNC(i8251_device::write_rxc)); + + // RS232 port: the schematic is missing most of the info, so guessing + I8251(config, m_uart2, 3.579545_MHz_XTAL / 2 ); + m_uart2->txd_handler().set("rs232", FUNC(rs232_port_device::write_txd)); + m_uart2->dtr_handler().set("rs232", FUNC(rs232_port_device::write_dtr)); + m_uart2->rts_handler().set("rs232", FUNC(rs232_port_device::write_rts)); + + rs232_port_device &rs232(RS232_PORT(config, "rs232", default_rs232_devices, nullptr)); + rs232.rxd_handler().set(m_uart2, FUNC(i8251_device::write_rxd)); + rs232.dsr_handler().set(m_uart2, FUNC(i8251_device::write_dsr)); + + // Interface to external circuits + I8255(config, m_ppi); + m_ppi->in_pc_callback().set(FUNC(radionic_state::ppi_pc_r)); // Sensing from external and printer status + m_ppi->out_pa_callback().set(FUNC(radionic_state::ppi_pa_w)); // Data for external plugin printer module + m_ppi->out_pb_callback().set(FUNC(radionic_state::ppi_pb_w)); // Control data to external + m_ppi->out_pc_callback().set(FUNC(radionic_state::ppi_pc_w)); // Printer strobe + + SOFTWARE_LIST(config, "cass_list").set_original("trs80_cass").set_filter("1"); // R + SOFTWARE_LIST(config, "quik_list").set_original("trs80_quik").set_filter("1"); // R + SOFTWARE_LIST(config, "flop_list").set_original("trs80_flop").set_filter("1"); // R +} + + +/*************************************************************************** + + Game driver(s) + +***************************************************************************/ + +ROM_START(radionic) + ROM_REGION(0x3800, "maincpu", 0) + ROM_LOAD("ep1.z37", 0x0000, 0x1000, CRC(e8908f44) SHA1(7a5a60c3afbeb6b8434737dd302332179a7fca59) ) + ROM_LOAD("ep2.z36", 0x1000, 0x1000, CRC(46e88fbf) SHA1(a3ca32757f269e09316e1e91ba1502774e2f5155) ) + ROM_LOAD("ep3.z35", 0x2000, 0x1000, CRC(306e5d66) SHA1(1e1abcfb5b02d4567cf6a81ffc35318723442369) ) + ROM_LOAD("ep4.z34", 0x3000, 0x0800, CRC(70f90f26) SHA1(cbee70da04a3efac08e50b8e3a270262c2440120) ) + ROM_CONTINUE( 0x3000, 0x0800) + + ROM_REGION(0x1000, "chargen", 0) + ROM_LOAD("trschar.z58", 0x0000, 0x1000, CRC(02e767b6) SHA1(c431fcc6bd04ce2800ca8c36f6f8aeb2f91ce9f7) ) +ROM_END + + +// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS +COMP( 1983, radionic, 0, trs80l2, radionic, radionic, radionic_state, empty_init, "Komtek", "Radionic R1001/Komtek 1", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/raiden2.cpp mame-0.231+dfsg.1/src/mame/drivers/raiden2.cpp --- mame-0.230+dfsg.1/src/mame/drivers/raiden2.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/raiden2.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -174,9 +174,9 @@ #include "cpu/nec/nec.h" #include "cpu/z80/z80.h" #include "machine/eepromser.h" -#include "sound/3812intf.h" #include "sound/okim6295.h" #include "sound/ym2151.h" +#include "sound/ym3812.h" #include "machine/r2crypt.h" #include "debugger.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/raiden.cpp mame-0.231+dfsg.1/src/mame/drivers/raiden.cpp --- mame-0.230+dfsg.1/src/mame/drivers/raiden.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/raiden.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -78,8 +78,8 @@ #include "cpu/nec/nec.h" #include "cpu/z80/z80.h" -#include "sound/3812intf.h" #include "sound/okim6295.h" +#include "sound/ym3812.h" #include "video/seibu_crtc.h" #include "screen.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/renegade.cpp mame-0.231+dfsg.1/src/mame/drivers/renegade.cpp --- mame-0.230+dfsg.1/src/mame/drivers/renegade.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/renegade.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -119,7 +119,7 @@ #include "cpu/m6502/m6502.h" #include "cpu/m6809/m6809.h" -#include "sound/3526intf.h" +#include "sound/ym3526.h" #include "emupal.h" #include "screen.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/rfslots8085.cpp mame-0.231+dfsg.1/src/mame/drivers/rfslots8085.cpp --- mame-0.230+dfsg.1/src/mame/drivers/rfslots8085.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/rfslots8085.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -21,7 +21,7 @@ -Baby Formula -Limon y Baby -Limon y Baby 100 - -Baby Afrojin Dakar 3 + -Baby Ajofrin Dakar 3 -El Tren -Baby Derby Etc. @@ -38,6 +38,9 @@ #include "sound/ay8910.h" #include "speaker.h" +namespace +{ + class rfslots8085_state : public driver_device { public: @@ -89,8 +92,6 @@ static INPUT_PORTS_START(unkrfslt) PORT_START("DSW") // 1 x 6-dips bank - PORT_BIT(0x80, 0x80, IPT_UNKNOWN) - PORT_BIT(0x40, 0x40, IPT_UNKNOWN) PORT_BIT(0x20, 0x20, IPT_UNKNOWN) PORT_BIT(0x10, 0x10, IPT_UNKNOWN) PORT_BIT(0x08, 0x08, IPT_UNKNOWN) @@ -184,5 +185,7 @@ ROM_IGNORE( 0x3000 ) // 0xff filled and it's outside of the 8035's global address mask (fff) ROM_END +} // anonymous namespace + // Date "25-05-87" engraved on the PCB GAME( 1987?, unkrfslt, 0, unkrfslt, unkrfslt, rfslots8085_state, empty_init, ROT0, "Recreativos Franco", "unknown Recreativos Franco slot machine", MACHINE_IS_SKELETON_MECHANICAL ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/roland_cm32p.cpp mame-0.231+dfsg.1/src/mame/drivers/roland_cm32p.cpp --- mame-0.230+dfsg.1/src/mame/drivers/roland_cm32p.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/roland_cm32p.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -39,7 +39,6 @@ TODO: - figure out how "freeing a voice" works - right now the firmware gets stuck when playing the 32th note. -- add PCM card support PCB Layout @@ -231,18 +230,24 @@ #include "machine/timer.h" #include "sound/rolandpcm.h" #include "video/msm6222b.h" +#include "bus/generic/slot.h" +#include "bus/generic/carts.h" #include "emupal.h" #include "screen.h" #include "speaker.h" // unscramble address: ROM dump offset -> proper (descrambled) offset -#define UNSCRAMBLE_ADDRESS(_offset) \ +#define UNSCRAMBLE_ADDR_INT(_offset) \ bitswap<19>(_offset,18,17,15,14,16,12,11, 7, 9,13,10, 8, 3, 2, 1, 6, 4, 5, 0) // scramble address: proper offset -> ROM dump offset -#define SCRAMBLE_ADDRESS(_offset) \ +#define SCRAMBLE_ADDR_INT(_offset) \ bitswap<19>(_offset,18,17,14,16,15, 9,13,12, 8,10, 7,11, 3, 1, 2, 6, 5, 4, 0) +// PCM cards use a different address line scrambling +#define UNSCRAMBLE_ADDR_EXT(_offset) \ + bitswap<19>(_offset,18,17, 8, 9,16,11,12, 7,14,10,13,15, 3, 2, 1, 6, 4, 5, 0) + #define UNSCRAMBLE_DATA(_data) \ bitswap<8>(_data,1,2,7,3,5,0,4,6) @@ -254,7 +259,7 @@ PORT_START("SERVICE") // connected to Port 0 of the P8098 CPU. PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Test Switch") PORT_TOGGLE PORT_CODE(KEYCODE_F2) // SW A (checked during boot) PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Test: Check/Tune") PORT_CODE(KEYCODE_B) // SW B - PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("PCM card inserted") PORT_TOGGLE PORT_CODE(KEYCODE_C) + //PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("PCM card inserted") PORT_TOGGLE PORT_CODE(KEYCODE_C) PORT_START("SW") // test switches, accessed by reading from address 0x1300 PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("Test: MSB Adj.") PORT_CODE(KEYCODE_1) // SW 1 @@ -283,6 +288,7 @@ private: required_device cpu; required_device pcm; + required_device pcmcard; required_device lcd; required_device midi_timer; required_device some_ram; @@ -309,8 +315,15 @@ TIMER_DEVICE_CALLBACK_MEMBER(midi_timer_cb); TIMER_DEVICE_CALLBACK_MEMBER(samples_timer_cb); + DECLARE_DEVICE_IMAGE_LOAD_MEMBER(card_load); + DECLARE_DEVICE_IMAGE_UNLOAD_MEMBER(card_unload); + void cm32p_map(address_map &map); + void descramble_rom_internal(u8* dst, const u8* src); + void descramble_rom_external(u8* dst, const u8* src); + + bool pcmard_loaded; u8 midi; int midi_pos; u8 sound_io_buffer[0x100]; @@ -321,6 +334,7 @@ : driver_device(mconfig, type, tag) , cpu(*this, "maincpu") , pcm(*this, "pcm") + , pcmcard(*this, "cardslot") , lcd(*this, "lcd") , midi_timer(*this, "midi_timer") , some_ram(*this, "some_ram") @@ -379,6 +393,46 @@ midi_pos = 0; } +DEVICE_IMAGE_LOAD_MEMBER(cm32p_state::card_load) +{ + uint32_t size = pcmcard->common_get_size("rom"); + if (size > 0x080000) + { + image.seterror(IMAGE_ERROR_UNSPECIFIED, "Invalid size: Only up to 512K is supported"); + return image_init_result::FAIL; + } + + pcmcard->rom_alloc(0x080000, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE); // cards are up to 512K + pcmcard->common_load_rom(pcmcard->get_rom_base(), size, "rom"); + u8* base = pcmcard->get_rom_base(); + if (size < 0x080000) + { + uint32_t mirror = (1 << (31 - count_leading_zeros(size))); + if (mirror < 0x020000) // due to how address descrambling works, we can currently only do mirroring for 128K pages + mirror = 0x020000; + for (uint32_t ofs = mirror; ofs < 0x080000; ofs += mirror) + memcpy(base + ofs, base, mirror); + } + + u8* src = static_cast(memregion("pcmorg")->base()); + u8* dst = static_cast(memregion("pcm")->base()); + memcpy(&src[0x080000], base, 0x080000); + // descramble PCM card ROM + descramble_rom_external(&dst[0x080000], &src[0x080000]); + pcmard_loaded = true; + + return image_init_result::PASS; +} + +DEVICE_IMAGE_UNLOAD_MEMBER(cm32p_state::card_unload) +{ + u8* src = static_cast(memregion("pcmorg")->base()); + u8* dst = static_cast(memregion("pcm")->base()); + memset(&src[0x080000], 0xFF, 0x080000); + memset(&dst[0x080000], 0xFF, 0x080000); + pcmard_loaded = false; +} + void cm32p_state::lcd_ctrl_w(u8 data) { lcd->control_w(data); @@ -414,7 +468,7 @@ u16 cm32p_state::port0_r() { - return service_port->read(); + return service_port->read() | (pcmard_loaded ? 0x10 : 0x00); } u8 cm32p_state::pcmrom_r(offs_t offset) @@ -565,11 +619,14 @@ screen.set_size(16*6-1, (16*6-1)*3/4); screen.set_visarea(0, 16*6-2, 0, (16*6-1)*3/4-1); screen.set_palette("palette"); - PALETTE(config, "palette", FUNC(cm32p_state::mt32_palette), 2); - MSM6222B_01(config, lcd, 0); + generic_cartslot_device &cardslot(GENERIC_CARTSLOT(config, "cardslot", generic_romram_plain_slot, "u110_card", "bin")); + cardslot.set_device_load(FUNC(cm32p_state::card_load)); + cardslot.set_device_unload(FUNC(cm32p_state::card_unload)); + SOFTWARE_LIST(config, "card_list").set_original("u110_card"); + TIMER(config, midi_timer).configure_generic(FUNC(cm32p_state::midi_timer_cb)); TIMER(config, "samples_timer").configure_periodic(FUNC(cm32p_state::samples_timer_cb), attotime::from_hz(32000*2)); @@ -578,20 +635,37 @@ void cm32p_state::init_cm32p() { // Roland did a fair amount of scrambling on the address and data lines. - // Only the first 0x20 bytes of the ROMs are readable text in a raw dump. + // Only the first 0x80 bytes of the ROMs are readable text in a raw dump. + // The CM-32P actually checks some of these header bytes, but it uses post-scrambling variants of offsets/values. u8* src = static_cast(memregion("pcmorg")->base()); u8* dst = static_cast(memregion("pcm")->base()); - for (offs_t bank_ofs = 0x00; bank_ofs < 0x400000; bank_ofs += 0x080000) + // descramble internal ROMs + descramble_rom_internal(&dst[0x000000], &src[0x000000]); + descramble_rom_internal(&dst[0x100000], &src[0x100000]); + descramble_rom_internal(&dst[0x200000], &src[0x200000]); + // descramble PCM card ROM + descramble_rom_external(&dst[0x080000], &src[0x080000]); +} + +void cm32p_state::descramble_rom_internal(u8* dst, const u8* src) +{ + for (offs_t srcpos = 0x00; srcpos < 0x80000; srcpos ++) { - offs_t dstpos; - for (offs_t srcpos = 0x00; srcpos < 0x80000; srcpos ++) - { - dstpos = UNSCRAMBLE_ADDRESS(srcpos); - dst[bank_ofs + dstpos] = UNSCRAMBLE_DATA(src[bank_ofs + srcpos]); - } + offs_t dstpos = UNSCRAMBLE_ADDR_INT(srcpos); + dst[dstpos] = UNSCRAMBLE_DATA(src[srcpos]); + } +} + +void cm32p_state::descramble_rom_external(u8* dst, const u8* src) +{ + for (offs_t srcpos = 0x00; srcpos < 0x80000; srcpos ++) + { + offs_t dstpos = UNSCRAMBLE_ADDR_EXT(srcpos); + dst[dstpos] = UNSCRAMBLE_DATA(src[srcpos]); } } + ROM_START( cm32p ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "cm-32_p__1.0.0.am27c512.7d.ic9", 0x000000, 0x10000, CRC(6f2f6dfd) SHA1(689f77c1d56f923ef1dab7d993a124c47736bc56) ) // "CM-32 P // 1 0 0 " sticker on an AM27C512-150DC eprom @ IC9 diff -Nru mame-0.230+dfsg.1/src/mame/drivers/roland_mt32.cpp mame-0.231+dfsg.1/src/mame/drivers/roland_mt32.cpp --- mame-0.230+dfsg.1/src/mame/drivers/roland_mt32.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/roland_mt32.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -404,6 +404,11 @@ ROMX_LOAD( "a__m-9.27c256.ic27.bin", 0, 0x8000, CRC(c078ab00) SHA1(381e4208c0211a9a24a3a1b06a36760a1940ea6b), ROM_BIOS(5) | ROM_SKIP(1) ) ROMX_LOAD( "b__m-9.27c256.ic26.bin", 1, 0x8000, CRC(e9c439c4) SHA1(36fece02eddd84230a7cf32f931c94dd14adbf2c), ROM_BIOS(5) | ROM_SKIP(1) ) + // Dumped from "new" board revision single 128K x 8 ROM + ROM_SYSTEM_BIOS( 6, "204", "Firmware 2.0.4" ) + ROMX_LOAD( "mt32_2.0.4.ic28", 0, 0x10000, CRC(59a49d5c) SHA1(2c16432b6c73dd2a3947cba950a0f4c19d6180eb), ROM_BIOS(6) ) + ROM_IGNORE(0x10000) // banking needs to be implemented + // We need a bios-like selection for these too ROM_REGION( 0x80000, "la32", 0 ) ROM_LOAD16_BYTE( "r15179844.ic21.bin", 0, 0x40000, CRC(dd9deac3) SHA1(3a1e19b0cd4036623fd1d1d11f5f25995585962b) ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/roland_pr100.cpp mame-0.231+dfsg.1/src/mame/drivers/roland_pr100.cpp --- mame-0.230+dfsg.1/src/mame/drivers/roland_pr100.cpp 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/roland_pr100.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,121 @@ +// license:BSD-3-Clause +// copyright-holders:AJR +/************************************************************************************************* + + Skeleton driver for Roland PR-100 MIDI sequencer. + + There are two custom gate arrays: M60012-0105SP on the main board and M6003A-0117SP on the + panel board. The main board gate array multiplexes addresses for the four MB81464 DRAMs and + decodes all CPU I/O space accesses. It also generates a "metronome" signal which is this + device's only audio output. The panel board's gate array is almost entirely controlled by + the main gate array, with only the reset and power signals generated independently. + + The LCD unit is a DM0815. + +*************************************************************************************************/ + +#include "emu.h" +//#include "bus/midi/midi.h" +#include "cpu/z180/z180.h" +#include "machine/eepromser.h" +#include "machine/input_merger.h" +#include "machine/i8251.h" +#include "machine/mb87013.h" + +class roland_pr100_state : public driver_device +{ +public: + roland_pr100_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_eeprom(*this, "eeprom") + , m_port9x(0) + { + } + + void pr100(machine_config &config); + +protected: + virtual void machine_start() override; + +private: + u8 port9x_r(offs_t offset); + void port9x_w(offs_t offset, u8 data); + + void mem_map(address_map &map); + void io_map(address_map &map); + + required_device m_maincpu; + required_device m_eeprom; + + u8 m_port9x; +}; + +void roland_pr100_state::machine_start() +{ + save_item(NAME(m_port9x)); +} + +u8 roland_pr100_state::port9x_r(offs_t offset) +{ + return m_port9x; +} + +void roland_pr100_state::port9x_w(offs_t offset, u8 data) +{ + logerror("port%02X = %02X\n", offset + 0x90, data); + m_port9x = data; +} + + +void roland_pr100_state::mem_map(address_map &map) +{ + map.global_mask(0x3ffff); // A18 not connected + map(0x00000, 0x0ffff).mirror(0x10000).rom().region("program", 0); // CE = A17 + map(0x20000, 0x3ffff).ram(); +} + +void roland_pr100_state::io_map(address_map &map) +{ + map(0x0000, 0x003f).noprw(); // internal + map(0x0090, 0x0093).mirror(0xff00).rw(FUNC(roland_pr100_state::port9x_r), FUNC(roland_pr100_state::port9x_w)); // EEPROM I/O? + map(0x00a0, 0x00a3).rw("qdc", FUNC(mb87013_device::read), FUNC(mb87013_device::write)); +} + + +static INPUT_PORTS_START(pr100) +INPUT_PORTS_END + +void roland_pr100_state::pr100(machine_config &config) +{ + HD64180RP(config, m_maincpu, 10_MHz_XTAL); // HD64B180R0P + m_maincpu->set_addrmap(AS_PROGRAM, &roland_pr100_state::mem_map); + m_maincpu->set_addrmap(AS_IO, &roland_pr100_state::io_map); + + mb87013_device &qdc(MB87013(config, "qdc", 6.5_MHz_XTAL)); + qdc.sio_rd_callback().set("sio", FUNC(i8251_device::read)); + qdc.sio_wr_callback().set("sio", FUNC(i8251_device::write)); + qdc.txc_callback().set("sio", FUNC(i8251_device::write_txc)); + qdc.rxc_callback().set("sio", FUNC(i8251_device::write_rxc)); + qdc.rxd_callback().set("sio", FUNC(i8251_device::write_rxd)); + qdc.dsr_callback().set("sio", FUNC(i8251_device::write_dsr)); + qdc.op4_callback().set("qdc", FUNC(mb87013_device::rts_w)); + + i8251_device &sio(I8251(config, "sio", 6.5_MHz_XTAL)); // MB89251 + sio.dtr_handler().set("qdc", FUNC(mb87013_device::dtr_w)); + sio.txd_handler().set("qdc", FUNC(mb87013_device::txd_w)); + sio.rxrdy_handler().set("siodrq", FUNC(input_merger_device::in_w<0>)); + sio.txrdy_handler().set("siodrq", FUNC(input_merger_device::in_w<0>)); + sio.write_cts(0); + + INPUT_MERGER_ANY_HIGH(config, "siodrq").output_handler().set_inputline(m_maincpu, Z180_INPUT_LINE_DREQ1); // 74ALS08 + + EEPROM_93C46_16BIT(config, m_eeprom); // HY93C46 +} + +ROM_START(pr100) + ROM_REGION(0x10000, "program", 0) + ROM_LOAD("roland_mbm27c512-20.ic10", 0x00000, 0x10000, CRC(41160b69) SHA1(11e5fb001dd004a5625d9a75fb1acac4ade614c8)) +ROM_END + +SYST(1987, pr100, 0, 0, pr100, pr100, roland_pr100_state, empty_init, "Roland", "PR-100 Digital Sequencer", MACHINE_NOT_WORKING | MACHINE_NO_SOUND) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/roland_s10.cpp mame-0.231+dfsg.1/src/mame/drivers/roland_s10.cpp --- mame-0.230+dfsg.1/src/mame/drivers/roland_s10.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/roland_s10.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -18,6 +18,7 @@ #include "machine/i8251.h" #include "machine/mb62h195.h" #include "machine/mb63h149.h" +#include "machine/mb87013.h" #include "machine/nvram.h" #include "machine/rescap.h" #include "machine/upd7001.h" @@ -32,7 +33,6 @@ : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") , m_io(*this, "io") - , m_usart(*this, "usart") , m_lcdc(*this, "lcdc") , m_sampler(*this, "sampler") { @@ -44,8 +44,6 @@ protected: HD44780_PIXEL_UPDATE(lcd_pixel_update); - u8 qdd_r(offs_t offset); - void qdd_w(offs_t offset, u8 data); void lcd_data_w(offs_t offset, u8 data); void led_data_w(offs_t offset, u8 data); u8 sw_scan_r(offs_t offset); @@ -60,7 +58,6 @@ required_device m_maincpu; required_device m_io; - required_device m_usart; required_device m_lcdc; required_device m_sampler; }; @@ -102,20 +99,6 @@ bitmap.pix(line * 8 + y, pos * 6 + x) = state; } -u8 roland_s10_state::qdd_r(offs_t offset) -{ - if (!BIT(offset, 1)) - return m_usart->read(offset); - - return 0; -} - -void roland_s10_state::qdd_w(offs_t offset, u8 data) -{ - if (!BIT(offset, 1)) - m_usart->write(offset, data); -} - void roland_s10_state::lcd_data_w(offs_t offset, u8 data) { if (offset == 0) @@ -165,7 +148,7 @@ void roland_s10_state::mks100_ext_map(address_map &map) { - map(0x4000, 0x4003).mirror(0xffc).rw(FUNC(roland_s10_state::qdd_r), FUNC(roland_s10_state::qdd_w)); + map(0x4000, 0x4003).mirror(0xffc).rw("qddia", FUNC(mb87013_device::read), FUNC(mb87013_device::write)); map(0x6000, 0x7fff).ram().share("nvram"); map(0x8000, 0x80ff).mirror(0xf00).w(FUNC(roland_s10_state::lcd_data_w)); map(0x9000, 0x90ff).mirror(0xf00).w(FUNC(roland_s10_state::led_data_w)); @@ -184,7 +167,7 @@ void roland_s220_state::s220_ext_map(address_map &map) { map(0x0000, 0x000f).mirror(0x3ff0).w(FUNC(roland_s220_state::output_control_w)); - map(0x4000, 0x4003).mirror(0xffc).rw(FUNC(roland_s220_state::qdd_r), FUNC(roland_s220_state::qdd_w)); + map(0x4000, 0x4003).mirror(0xffc).rw("qddia", FUNC(mb87013_device::read), FUNC(mb87013_device::write)); map(0x5000, 0x5000).mirror(0xfff).w(FUNC(roland_s220_state::led_latch1_w)); map(0x6000, 0x7fff).ram().share("nvram"); map(0x8000, 0x80ff).mirror(0xf00).w(FUNC(roland_s220_state::lcd_data_w)); @@ -225,9 +208,18 @@ NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // TC5564PL-20 + battery - I8251(config, m_usart, 6.5_MHz_XTAL / 2); // MB89251A - - //MB87013(config, "qddia", 6.5_MHz_XTAL); + i8251_device &usart(I8251(config, "usart", 6.5_MHz_XTAL)); // MB89251A + usart.dtr_handler().set("qddia", FUNC(mb87013_device::dtr_w)); + usart.txd_handler().set("qddia", FUNC(mb87013_device::txd_w)); + + mb87013_device &qddia(MB87013(config, "qddia", 6.5_MHz_XTAL)); + qddia.sio_rd_callback().set("usart", FUNC(i8251_device::read)); + qddia.sio_wr_callback().set("usart", FUNC(i8251_device::write)); + qddia.txc_callback().set("usart", FUNC(i8251_device::write_txc)); + qddia.rxc_callback().set("usart", FUNC(i8251_device::write_rxc)); + qddia.rxd_callback().set("usart", FUNC(i8251_device::write_rxd)); + qddia.dsr_callback().set("usart", FUNC(i8251_device::write_dsr)); + qddia.op4_callback().set("qddia", FUNC(mb87013_device::rts_w)); mb63h149_device &keyscan(MB63H149(config, "keyscan", 12_MHz_XTAL)); keyscan.int_callback().set_inputline(m_maincpu, MCS51_T1_LINE); diff -Nru mame-0.230+dfsg.1/src/mame/drivers/rollerg.cpp mame-0.231+dfsg.1/src/mame/drivers/rollerg.cpp --- mame-0.230+dfsg.1/src/mame/drivers/rollerg.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/rollerg.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -17,8 +17,8 @@ #include "cpu/z80/z80.h" #include "machine/watchdog.h" -#include "sound/3812intf.h" #include "sound/k053260.h" +#include "sound/ym3812.h" #include "emupal.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/sag.cpp mame-0.231+dfsg.1/src/mame/drivers/sag.cpp --- mame-0.230+dfsg.1/src/mame/drivers/sag.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/sag.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -179,7 +179,7 @@ void sag_state::update_display() { // grid 0-7 are the 'pixels' - m_display->matrix_partial(0, 8, m_grid, m_plate, false); + m_display->matrix_partial(0, 8, m_grid, m_plate); // grid 8-13 are 7segs u8 seg = bitswap<7>(m_plate,4,5,6,7,8,9,10); diff -Nru mame-0.230+dfsg.1/src/mame/drivers/saitek_corona.cpp mame-0.231+dfsg.1/src/mame/drivers/saitek_corona.cpp --- mame-0.230+dfsg.1/src/mame/drivers/saitek_corona.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/saitek_corona.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -14,7 +14,6 @@ #include "includes/saitek_stratos.h" #include "cpu/m6502/m65c02.h" -#include "machine/bankdev.h" #include "machine/nvram.h" #include "machine/sensorboard.h" #include "sound/dac.h" @@ -52,13 +51,12 @@ private: // devices/pointers - required_device m_rombank; + memory_view m_rombank; required_device m_board; required_device m_dac; required_ioport_array<8+1> m_inputs; void main_map(address_map &map); - void rombank_map(address_map &map); // I/O handlers void update_leds(); @@ -106,7 +104,8 @@ { saitek_stratos_state::machine_reset(); - m_rombank->set_bank(0); + m_control2 = 0; + m_rombank.select(0); } @@ -120,11 +119,11 @@ void corona_state::update_leds() { // button leds - m_display->matrix_partial(0, 2, 1 << (m_control1 >> 5 & 1), ~m_led_data1 & 0xff, false); + m_display->matrix_partial(0, 2, 1 << (m_control1 >> 5 & 1), ~m_led_data1 & 0xff); m_display->write_row(2, ~m_select1 >> 4 & 0xf); // chessboard leds - m_display->matrix_partial(3, 8, 1 << (m_select1 & 0xf), m_led_data2, true); + m_display->matrix_partial(3, 8, 1 << (m_select1 & 0xf), m_led_data2); } void corona_state::leds1_w(u8 data) @@ -169,7 +168,7 @@ void corona_state::control2_w(u8 data) { // d0,d1: rombank - m_rombank->set_bank(data & 3); + m_rombank.select(data & 3); // d2 rising edge: write to lcd if (~m_control2 & data & 4) @@ -239,14 +238,12 @@ map(0x6200, 0x6200).w(FUNC(corona_state::lcd_reset_w)); map(0x6400, 0x6400).w(FUNC(corona_state::leds2_w)); map(0x6600, 0x6600).rw(FUNC(corona_state::control2_r), FUNC(corona_state::control2_w)); - map(0x8000, 0xffff).m(m_rombank, FUNC(address_map_bank_device::amap8)); -} -void corona_state::rombank_map(address_map &map) -{ - map.unmap_value_high(); - map(0x00000, 0x0ffff).rom().region("maincpu", 0); - map(0x10000, 0x17fff).r("extrom", FUNC(generic_slot_device::read_rom)); + map(0x8000, 0xffff).view(m_rombank); + m_rombank[0](0x8000, 0xffff).rom().region("maincpu", 0x0000); + m_rombank[1](0x8000, 0xffff).rom().region("maincpu", 0x8000); + m_rombank[2](0x8000, 0xffff).r("extrom", FUNC(generic_slot_device::read_rom)); + m_rombank[3](0x8000, 0xffff).lr8(NAME([]() { return 0xff; })); } @@ -275,8 +272,6 @@ m_maincpu->set_addrmap(AS_PROGRAM, &corona_state::main_map); m_maincpu->set_periodic_int(FUNC(corona_state::irq0_line_hold), attotime::from_hz(183)); - ADDRESS_MAP_BANK(config, "rombank").set_map(&corona_state::rombank_map).set_options(ENDIANNESS_LITTLE, 8, 17, 0x8000); - NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); SENSORBOARD(config, m_board).set_type(sensorboard_device::MAGNETS); diff -Nru mame-0.230+dfsg.1/src/mame/drivers/saitek_leonardo.cpp mame-0.231+dfsg.1/src/mame/drivers/saitek_leonardo.cpp --- mame-0.230+dfsg.1/src/mame/drivers/saitek_leonardo.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/saitek_leonardo.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -125,8 +125,8 @@ void leo_state::update_display() { - m_display->matrix_partial(0, 8, 1 << (m_inp_mux & 0xf), m_led_data[0], false); - m_display->matrix_partial(8, 2, 1 << BIT(m_inp_mux, 5), (~m_inp_mux << 2 & 0x300) | m_led_data[1], true); + m_display->matrix_partial(0, 8, 1 << (m_inp_mux & 0xf), m_led_data[0]); + m_display->matrix_partial(8, 2, 1 << BIT(m_inp_mux, 5), (~m_inp_mux << 2 & 0x300) | m_led_data[1]); } void leo_state::mux_w(u8 data) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/saitek_renaissance.cpp mame-0.231+dfsg.1/src/mame/drivers/saitek_renaissance.cpp --- mame-0.230+dfsg.1/src/mame/drivers/saitek_renaissance.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/saitek_renaissance.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -131,8 +131,8 @@ void ren_state::update_display() { - m_display->matrix_partial(0, 9, 1 << (m_inp_mux & 0xf), (m_inp_mux << 4 & 0x100) | m_led_data[0], false); - m_display->matrix_partial(9, 1, 1, (m_inp_mux >> 2 & 0x30) | m_led_data[1], true); + m_display->matrix_partial(0, 9, 1 << (m_inp_mux & 0xf), (m_inp_mux << 4 & 0x100) | m_led_data[0]); + m_display->matrix_partial(9, 1, 1, (m_inp_mux >> 2 & 0x30) | m_led_data[1]); } void ren_state::mux_w(u8 data) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/saitek_risc2500.cpp mame-0.231+dfsg.1/src/mame/drivers/saitek_risc2500.cpp --- mame-0.230+dfsg.1/src/mame/drivers/saitek_risc2500.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/saitek_risc2500.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -1,82 +1,104 @@ // license:BSD-3-Clause -// copyright-holders:Sandro Ronco +// copyright-holders:Sandro Ronco, hap /****************************************************************************** Saitek RISC 2500, Mephisto Montreux The chess engine is also compatible with Tasc's The ChessMachine software. -The hardware+software appears to have been subcontracted to Tasc. It has similarities -with Tasc R30, PCB label and Montreux repair manual schematics footnotes say TASC23C. +The hardware+software appears to have been subcontracted to Tasc. It has +similarities with Tasc R30. -notes: -- holding LEFT+RIGHT on boot load the QC TestMode -- holding UP+DOWN on boot load the TestMode +To make sure it continues the game at next power-on, press the OFF button before +exiting MAME. If nvram is broken somehow, boot with the BACK button held down. + +Hardware notes: +- PCB label: TASC23C +- ARM2 CPU(VY86C010) @ 14.16MHz +- 128KB ROM, 128KB RAM* +- SED1520, custom LCD screen +- 8*8 chessboard buttons, 16 leds, piezo + +*: Sold with 128KB RAM by default. This can be easily increased up to 2MB +by the user(chesscomputer owner, but also the MAME user in this case). +The manual also says that RAM is expandable. + +According to Saitek's repair manual, there is a GAL and a clock frequency +divider chip, ROM access goes through it. This allows reading from slow EPROM +while the chess engine resides in faster RAM. The piezo output routine is +also in ROM, it would be way too high-pitched at full speed. + +Undocumented buttons: +- hold LEFT+RIGHT on boot to start the QC TestMode +- hold UP+DOWN on boot to start the TestMode TODO: - bootrom disable timer shouldn't be needed, real ARM has already fetched the next opcode -- Sound is too short and high pitched, better when you underclock the cpu. - Is cpu cycle timing wrong? I suspect conditional branch timing due to cache miss - (pipeline has to refill). The delay loop between writing to the speaker is simply: - SUBS R2, R2, #$1, BNE $2000cd8 +- More accurate dynamic cpu clock divider, without the cost of emulation speed. + The current implementation catches almost everything, luckily ARM opcodes have a + fixed length. It only fails to detect ALU opcodes that directly modify pc(R15). + It also possibly has problems with very short subroutine calls from ROM to RAM, + but I tested for those and the shortest one is more than 50 cycles. ******************************************************************************/ - #include "emu.h" + #include "cpu/arm/arm.h" -#include "machine/ram.h" #include "machine/nvram.h" +#include "machine/ram.h" #include "machine/sensorboard.h" +#include "machine/timer.h" #include "video/sed1520.h" -#include "sound/dac.h" +#include "sound/spkrdev.h" + #include "emupal.h" #include "screen.h" #include "speaker.h" +// internal artwork +#include "mephisto_montreux.lh" #include "saitek_risc2500.lh" +namespace { + class risc2500_state : public driver_device { public: risc2500_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") + , m_rom(*this, "maincpu") , m_ram(*this, "ram") , m_nvram(*this, "nvram") - , m_dac(*this, "dac") + , m_disable_bootrom(*this, "disable_bootrom") + , m_speaker(*this, "speaker") , m_lcdc(*this, "lcdc") , m_board(*this, "board") - , m_inputs(*this, "P%u", 0) + , m_inputs(*this, "IN.%u", 0) , m_digits(*this, "digit%u", 0U) , m_syms(*this, "sym%u", 0U) , m_leds(*this, "led%u", 0U) { } + DECLARE_INPUT_CHANGED_MEMBER(acl_button) { if (newval) power_off(); } DECLARE_INPUT_CHANGED_MEMBER(on_button); void risc2500(machine_config &config); + void montreux(machine_config &config); protected: - uint32_t p1000_r(); - void p1000_w(uint32_t data); - uint32_t disable_boot_rom_r(); - TIMER_CALLBACK_MEMBER(disable_boot_rom); - virtual void machine_start() override; virtual void machine_reset() override; - SED1520_UPDATE_CB(screen_update_cb); - void install_boot_rom(); - void remove_boot_rom(); - void lcd_palette(palette_device &palette) const; - - void risc2500_mem(address_map &map); + virtual void device_post_load() override { install_bootrom(m_bootrom_enabled); } private: required_device m_maincpu; + required_region_ptr m_rom; required_device m_ram; required_device m_nvram; - required_device m_dac; + required_device m_disable_bootrom; + required_device m_speaker; required_device m_lcdc; required_device m_board; required_ioport_array<8> m_inputs; @@ -84,21 +106,58 @@ output_finder<14> m_syms; output_finder<16> m_leds; - uint32_t m_p1000; - emu_timer *m_boot_rom_disable_timer; -}; + void risc2500_mem(address_map &map); + void lcd_palette(palette_device &palette) const; + SED1520_UPDATE_CB(screen_update_cb); + u32 input_r(); + void control_w(u32 data); + u32 rom_r(offs_t offset); + void power_off(); + + u32 disable_boot_rom_r(); + void install_bootrom(bool enable); + TIMER_DEVICE_CALLBACK_MEMBER(disable_bootrom) { install_bootrom(false); } + bool m_bootrom_enabled = false; + + bool m_power = false; + u32 m_control = 0; + u32 m_prev_pc = 0; + u64 m_prev_cycle = 0; +}; -void risc2500_state::install_boot_rom() +void risc2500_state::machine_start() { - m_maincpu->space(AS_PROGRAM).install_rom(0x00000000, 0x001ffff, memregion("maincpu")->base()); + m_digits.resolve(); + m_syms.resolve(); + m_leds.resolve(); + + m_nvram->set_base(m_ram->pointer(), m_ram->size()); + + // register for savestates + save_item(NAME(m_power)); + save_item(NAME(m_bootrom_enabled)); + save_item(NAME(m_control)); + save_item(NAME(m_prev_pc)); + save_item(NAME(m_prev_cycle)); } -void risc2500_state::remove_boot_rom() +void risc2500_state::machine_reset() { - m_maincpu->space(AS_PROGRAM).install_ram(0x00000000, m_ram->size() - 1, m_ram->pointer()); + install_bootrom(true); + + m_power = true; + m_control = 0; + m_prev_pc = m_maincpu->pc(); + m_prev_cycle = m_maincpu->total_cycles(); } + + +/****************************************************************************** + Video +******************************************************************************/ + void risc2500_state::lcd_palette(palette_device &palette) const { palette.set_pen_color(0, rgb_t(131, 136, 139)); // lcd pixel off @@ -110,16 +169,16 @@ { bitmap.fill(2, cliprect); - for (int c=0; c<12; c++) + for (int c = 0; c < 12; c++) { // 12 characters 5 x 7 - for (int x=0; x<5; x++) + for (int x = 0; x < 5; x++) { - uint8_t gfx = 0; + u8 gfx = 0; if (lcd_on) gfx = bitswap<8>(dram[c * 5 + x], 6,5,0,1,2,3,4,7); - for (int y=1; y<8; y++) + for (int y = 1; y < 8; y++) bitmap.pix(y, 71 - (c * 6 + x)) = BIT(gfx, y); } @@ -127,7 +186,7 @@ if (lcd_on) { int data_addr = 80 + c * 5; - uint16_t data = ((dram[data_addr + 1] & 0x3) << 5) | ((dram[data_addr + 2] & 0x7) << 2) | (dram[data_addr + 4] & 0x3); + u16 data = ((dram[data_addr + 1] & 0x3) << 5) | ((dram[data_addr + 2] & 0x7) << 2) | (dram[data_addr + 4] & 0x3); data = bitswap<8>(data, 7,3,0,1,4,6,5,2) | ((dram[data_addr - 1] & 0x04) ? 0x80 : 0); m_digits[c] = data; @@ -146,71 +205,85 @@ return 0; } + + +/****************************************************************************** + I/O +******************************************************************************/ + +// bootrom bankswitch + +void risc2500_state::install_bootrom(bool enable) +{ + address_space &program = m_maincpu->space(AS_PROGRAM); + program.unmap_readwrite(0, std::max(m_rom.bytes(), size_t(m_ram->size())) - 1); + + if (enable) + program.install_read_handler(0, m_rom.bytes() - 1, read32sm_delegate(*this, FUNC(risc2500_state::rom_r))); + else + program.install_ram(0, m_ram->size() - 1, m_ram->pointer()); + + m_bootrom_enabled = enable; +} + +u32 risc2500_state::disable_boot_rom_r() +{ + // disconnect bootrom from the bus after next opcode + if (m_bootrom_enabled && !m_disable_bootrom->enabled() && !machine().side_effects_disabled()) + m_disable_bootrom->adjust(m_maincpu->cycles_to_attotime(10)); + + return 0; +} + + +// soft power on/off + INPUT_CHANGED_MEMBER(risc2500_state::on_button) { - if (newval) + if (newval && !m_power) { - install_boot_rom(); - m_maincpu->reset(); + m_maincpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); + machine_reset(); } } -static INPUT_PORTS_START( risc2500 ) - PORT_START("P0") - PORT_BIT(0x40000000, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_1_PAD) PORT_NAME("Pawn") - PORT_BIT(0x80000000, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_BACKSPACE) PORT_NAME("BACK") - - PORT_START("P1") - PORT_BIT(0x40000000, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_2_PAD) PORT_NAME("Knight") - PORT_BIT(0x80000000, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_ENTER) PORT_NAME("ENTER") - - PORT_START("P2") - PORT_BIT(0x40000000, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_3_PAD) PORT_NAME("Bishop") - PORT_BIT(0x80000000, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_DOWN) PORT_NAME("DOWN") - - PORT_START("P3") - PORT_BIT(0x40000000, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_4_PAD) PORT_NAME("Rook") - PORT_BIT(0x80000000, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_UP) PORT_NAME("UP") - - PORT_START("P4") - PORT_BIT(0x40000000, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_5_PAD) PORT_NAME("Queen") - PORT_BIT(0x80000000, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_M) PORT_NAME("MENU") - - PORT_START("P5") - PORT_BIT(0x40000000, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_6_PAD) PORT_NAME("King") - PORT_BIT(0x80000000, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_L) PORT_NAME("PLAY") - - PORT_START("P6") - PORT_BIT(0x40000000, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_RIGHT) PORT_NAME("RIGHT") - PORT_BIT(0x80000000, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_N) PORT_NAME("NEW GAME") - - PORT_START("P7") - PORT_BIT(0x40000000, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_LEFT) PORT_NAME("LEFT") - PORT_BIT(0x80000000, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_O) PORT_NAME("OFF") +void risc2500_state::power_off() +{ + m_power = false; + m_maincpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); - PORT_START("RESET") - PORT_BIT(0x00000001, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_I) PORT_NAME("ON") PORT_CHANGED_MEMBER(DEVICE_SELF, risc2500_state, on_button, 0) -INPUT_PORTS_END + // clear display + m_lcdc->reset(); + + for (int i = 0; i < 16; i++) + m_leds[i] = 0; +} -uint32_t risc2500_state::p1000_r() +// main I/O + +u32 risc2500_state::input_r() { - uint32_t data = 0; + u32 data = (u32)m_lcdc->status_read() << 16; - for (int i=0; i<8; i++) + for (int i = 0; i < 8; i++) { - if (m_p1000 & (1 << i)) + if (m_control & (1 << i)) { - data |= m_inputs[i]->read(); + data |= m_inputs[i]->read() << 24; data |= m_board->read_rank(i, true); } } - return data | ((uint32_t)m_lcdc->status_read() << 16); + if (!machine().side_effects_disabled()) + m_maincpu->set_input_line(ARM_FIRQ_LINE, CLEAR_LINE); + + return data; } -void risc2500_state::p1000_w(uint32_t data) +void risc2500_state::control_w(u32 data) { + // lcd if (!BIT(data, 27)) { if (BIT(data, 26)) @@ -219,73 +292,162 @@ m_lcdc->control_write(data); } - if (BIT(data, 31)) // Vertical LED + // vertical leds + if (BIT(data, 31)) { - for (int i=0; i<8; i++) - m_leds[i] = BIT(data, i); + for (int i = 0; i < 8; i++) + m_leds[i] = BIT(~data, i); } - if (BIT(data, 30)) // Horizontal LED + // horizontal leds + if (BIT(data, 30)) { - for (int i=0; i<8; i++) - m_leds[8 + i] = BIT(data, i); + for (int i = 0; i < 8; i++) + m_leds[8 + i] = BIT(~data, i); } - m_dac->write(data >> 28 & 3); // Speaker - - m_p1000 = data; -} + // speaker + m_speaker->level_w(data >> 28 & 3); -uint32_t risc2500_state::disable_boot_rom_r() -{ - m_boot_rom_disable_timer->adjust(m_maincpu->cycles_to_attotime(10)); - return 0; -} + // power-off + if (BIT(m_control & ~data, 24)) + power_off(); -TIMER_CALLBACK_MEMBER(risc2500_state::disable_boot_rom) -{ - remove_boot_rom(); + m_control = data; } -void risc2500_state::machine_start() +u32 risc2500_state::rom_r(offs_t offset) { - m_digits.resolve(); - m_syms.resolve(); - m_leds.resolve(); - - m_nvram->set_base(m_ram->pointer(), m_ram->size()); + if (!machine().side_effects_disabled()) + { + // handle dynamic cpu clock divider when accessing rom + u64 cur_cycle = m_maincpu->total_cycles(); + u64 prev_cycle = m_prev_cycle; + s64 diff = cur_cycle - prev_cycle; + + u32 pc = m_maincpu->pc(); + u32 prev_pc = m_prev_pc; + m_prev_pc = pc; - m_boot_rom_disable_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(risc2500_state::disable_boot_rom), this)); + if (diff > 0) + { + static constexpr int arm_branch_cycles = 3; + static constexpr int arm_max_cycles = 17; // datablock transfer + static constexpr int divider = -8 + 1; + + // this takes care of almost all cases, otherwise, total cycles taken can't be determined + if (diff <= arm_branch_cycles || (diff <= arm_max_cycles && (pc - prev_pc) == 4 && (pc & ~0x02000000) == (offset * 4))) + m_maincpu->adjust_icount(divider * (int)diff); + else + m_maincpu->adjust_icount(divider); + } - save_item(NAME(m_p1000)); + m_prev_cycle = m_maincpu->total_cycles(); + } - machine().save().register_postload(save_prepost_delegate(FUNC(risc2500_state::remove_boot_rom), this)); + return m_rom[offset]; } -void risc2500_state::machine_reset() -{ - m_p1000 = 0; - install_boot_rom(); -} + +/****************************************************************************** + Address Maps +******************************************************************************/ void risc2500_state::risc2500_mem(address_map &map) { - map(0x00000000, 0x0001ffff).ram(); map(0x01800000, 0x01800003).r(FUNC(risc2500_state::disable_boot_rom_r)); - map(0x01000000, 0x01000003).rw(FUNC(risc2500_state::p1000_r), FUNC(risc2500_state::p1000_w)); - map(0x02000000, 0x0203ffff).rom().region("maincpu", 0); + map(0x01000000, 0x01000003).rw(FUNC(risc2500_state::input_r), FUNC(risc2500_state::control_w)); + map(0x02000000, 0x0203ffff).r(FUNC(risc2500_state::rom_r)); } + + +/****************************************************************************** + Input Ports +******************************************************************************/ + +static INPUT_PORTS_START( risc2500 ) + PORT_START("IN.0") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Pawn") PORT_CODE(KEYCODE_1) PORT_CODE(KEYCODE_1_PAD) + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("BACK") PORT_CODE(KEYCODE_B) PORT_CODE(KEYCODE_BACKSPACE) + + PORT_START("IN.1") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Knight") PORT_CODE(KEYCODE_2) PORT_CODE(KEYCODE_2_PAD) + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("ENTER") PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) + + PORT_START("IN.2") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Bishop") PORT_CODE(KEYCODE_3) PORT_CODE(KEYCODE_3_PAD) + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("DOWN") PORT_CODE(KEYCODE_DOWN) + + PORT_START("IN.3") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Rook") PORT_CODE(KEYCODE_4) PORT_CODE(KEYCODE_4_PAD) + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("UP") PORT_CODE(KEYCODE_UP) + + PORT_START("IN.4") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Queen") PORT_CODE(KEYCODE_5) PORT_CODE(KEYCODE_5_PAD) + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("MENU") PORT_CODE(KEYCODE_M) + + PORT_START("IN.5") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("King") PORT_CODE(KEYCODE_6) PORT_CODE(KEYCODE_6_PAD) + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("PLAY") PORT_CODE(KEYCODE_L) + + PORT_START("IN.6") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("RIGHT") PORT_CODE(KEYCODE_RIGHT) + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("NEW GAME") PORT_CODE(KEYCODE_N) + + PORT_START("IN.7") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("LEFT") PORT_CODE(KEYCODE_LEFT) + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("OFF") PORT_CODE(KEYCODE_O) + + PORT_START("RESET") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("ON") PORT_CODE(KEYCODE_I) PORT_CHANGED_MEMBER(DEVICE_SELF, risc2500_state, on_button, 0) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("ACL") PORT_CODE(KEYCODE_F1) PORT_CHANGED_MEMBER(DEVICE_SELF, risc2500_state, acl_button, 0) +INPUT_PORTS_END + +static INPUT_PORTS_START( montreux ) // on/off buttons have different labels + PORT_INCLUDE( risc2500 ) + + PORT_MODIFY("IN.7") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("STOP") PORT_CODE(KEYCODE_S) + + PORT_MODIFY("RESET") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("GO") PORT_CODE(KEYCODE_G) PORT_CHANGED_MEMBER(DEVICE_SELF, risc2500_state, on_button, 0) +INPUT_PORTS_END + + + +/****************************************************************************** + Machine Configs +******************************************************************************/ + void risc2500_state::risc2500(machine_config &config) { - ARM(config, m_maincpu, XTAL(28'322'000) / 2); // VY86C010 + /* basic machine hardware */ + ARM(config, m_maincpu, 28.322_MHz_XTAL / 2); m_maincpu->set_addrmap(AS_PROGRAM, &risc2500_state::risc2500_mem); m_maincpu->set_copro_type(arm_cpu_device::copro_type::VL86C020); - m_maincpu->set_periodic_int(FUNC(risc2500_state::irq1_line_hold), attotime::from_hz(32.768_kHz_XTAL/128)); // 256Hz + const attotime irq_period = attotime::from_hz(32.768_kHz_XTAL / 128); // 256Hz + m_maincpu->set_periodic_int(FUNC(risc2500_state::irq1_line_assert), irq_period); + + TIMER(config, "disable_bootrom").configure_generic(FUNC(risc2500_state::disable_bootrom)); + + RAM(config, m_ram).set_extra_options("128K, 256K, 512K, 1M, 2M"); + m_ram->set_default_size("128K"); + m_ram->set_default_value(0); + + NVRAM(config, "nvram", nvram_device::DEFAULT_NONE); + + SENSORBOARD(config, m_board); + m_board->set_type(sensorboard_device::BUTTONS); + m_board->init_cb().set(m_board, FUNC(sensorboard_device::preset_chess)); + m_board->set_delay(attotime::from_msec(100)); + m_board->set_nvram_enable(true); + + /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD)); - screen.set_refresh_hz(50); + screen.set_refresh_hz(60); screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */ screen.set_size(12*6+1, 7+2); screen.set_visarea_full(); @@ -299,25 +461,24 @@ SED1520(config, m_lcdc); m_lcdc->set_screen_update_cb(FUNC(risc2500_state::screen_update_cb)); - SENSORBOARD(config, m_board); - m_board->set_type(sensorboard_device::BUTTONS); - m_board->init_cb().set(m_board, FUNC(sensorboard_device::preset_chess)); - m_board->set_delay(attotime::from_msec(100)); - m_board->set_nvram_enable(true); - - RAM(config, m_ram).set_extra_options("128K, 256K, 512K, 1M, 2M"); - m_ram->set_default_size("2M"); - m_ram->set_default_value(0); - - NVRAM(config, "nvram", nvram_device::DEFAULT_NONE); - /* sound hardware */ - SPEAKER(config, "speaker").front_center(); - DAC_2BIT_BINARY_WEIGHTED_ONES_COMPLEMENT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.25); // unknown DAC + SPEAKER(config, "mono").front_center(); + static const double speaker_levels[4] = { 0.0, 1.0, -1.0, 0.0 }; + SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25); + m_speaker->set_levels(4, speaker_levels); } +void risc2500_state::montreux(machine_config &config) +{ + risc2500(config); + config.set_default_layout(layout_mephisto_montreux); +} + + -/* ROM definitions */ +/****************************************************************************** + ROM Definitions +******************************************************************************/ ROM_START( risc2500 ) ROM_REGION( 0x40000, "maincpu", ROMREGION_ERASE00 ) @@ -330,13 +491,20 @@ ROM_END ROM_START( montreux ) // v1.00 - ROM_REGION( 0x40000, "maincpu", ROMREGION_ERASE00 ) + ROM_REGION( 0x40000, "maincpu", 0 ) ROM_LOAD("rt17b_103_u_7.u7", 0x000000, 0x040000, CRC(db374cf3) SHA1(44dd60d56779084326c3dfb41d2137ebf0b4e0ac) ) // 27C020-15 ROM_END +} // anonymous namespace + + + +/****************************************************************************** + Drivers +******************************************************************************/ -/* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS */ -CONS( 1992, risc2500, 0, 0, risc2500, risc2500, risc2500_state, empty_init, "Saitek / Tasc", "Kasparov RISC 2500 (v1.04)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_SOUND ) -CONS( 1992, risc2500a, risc2500, 0, risc2500, risc2500, risc2500_state, empty_init, "Saitek / Tasc", "Kasparov RISC 2500 (v1.03)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_SOUND ) +// YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS +CONS( 1992, risc2500, 0, 0, risc2500, risc2500, risc2500_state, empty_init, "Saitek / Tasc", "Kasparov RISC 2500 (v1.04)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1992, risc2500a, risc2500, 0, risc2500, risc2500, risc2500_state, empty_init, "Saitek / Tasc", "Kasparov RISC 2500 (v1.03)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) -CONS( 1995, montreux, 0, 0, risc2500, risc2500, risc2500_state, empty_init, "Saitek / Tasc", "Mephisto Montreux", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_SOUND ) // after Saitek bought Hegener + Glaser +CONS( 1995, montreux, 0, 0, montreux, montreux, risc2500_state, empty_init, "Saitek / Tasc", "Mephisto Montreux", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) // after Saitek bought Hegener + Glaser diff -Nru mame-0.230+dfsg.1/src/mame/drivers/saitek_schess.cpp mame-0.231+dfsg.1/src/mame/drivers/saitek_schess.cpp --- mame-0.230+dfsg.1/src/mame/drivers/saitek_schess.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/saitek_schess.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -33,12 +33,14 @@ ******************************************************************************/ #include "emu.h" + +#include "bus/generic/slot.h" +#include "bus/generic/carts.h" #include "cpu/m6502/m6502.h" #include "machine/sensorboard.h" #include "sound/dac.h" #include "video/pwm.h" -#include "bus/generic/slot.h" -#include "bus/generic/carts.h" + #include "speaker.h" // internal artwork @@ -116,7 +118,6 @@ { // button panel leds (direct) m_display->write_row(8 + (offset ? 1 : 0), ~data); - m_display->update(); } void schess_state::control_w(u8 data) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/saitek_simultano.cpp mame-0.231+dfsg.1/src/mame/drivers/saitek_simultano.cpp --- mame-0.230+dfsg.1/src/mame/drivers/saitek_simultano.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/saitek_simultano.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -31,7 +31,6 @@ #include "cpu/m6502/m65c02.h" #include "cpu/m6502/r65c02.h" -#include "machine/bankdev.h" #include "machine/nvram.h" #include "machine/sensorboard.h" #include "sound/dac.h" @@ -79,7 +78,7 @@ private: // devices/pointers required_device m_maincpu; - required_device m_rombank; + memory_view m_rombank; required_device m_board; required_device m_display; required_device m_lcd_pwm; @@ -88,9 +87,8 @@ required_ioport_array<8+1> m_inputs; output_finder<16, 34> m_out_lcd; - void main_map(address_map &map); - void simultano_rombank_map(address_map &map); - void cc2150_rombank_map(address_map &map); + void simultano_map(address_map &map); + void cc2150_map(address_map &map); void power_off(); void lcd_pwm_w(offs_t offset, u8 data); @@ -120,7 +118,8 @@ void simultano_state::machine_reset() { m_power = true; - m_rombank->set_bank(0); + m_control = 0; + m_rombank.select(0); } @@ -182,8 +181,8 @@ // d0-d3: input/chessboard mux // d6,d7: side panel led mux // d4,d5: led data - m_display->matrix_partial(0, 2, data >> 4 & 3, 1 << (data & 0xf), false); - m_display->matrix_partial(2, 2, data >> 6 & 3, ~data >> 4 & 3, true); + m_display->matrix_partial(0, 2, data >> 4 & 3, 1 << (data & 0xf)); + m_display->matrix_partial(2, 2, data >> 6 & 3, ~data >> 4 & 3); m_select = data; } @@ -211,7 +210,7 @@ m_control = data; // d0,d1: rombank - m_rombank->set_bank(bitswap<2>(data,0,1)); + m_rombank.select(bitswap<2>(data,0,1)); // d6 falling edge: power-off request if (~data & prev & 0x40) @@ -224,7 +223,7 @@ Address Maps ******************************************************************************/ -void simultano_state::main_map(address_map &map) +void simultano_state::cc2150_map(address_map &map) { map(0x0000, 0x1fff).ram().share("nvram"); map(0x2000, 0x2000).w(FUNC(simultano_state::select_w)); @@ -233,19 +232,18 @@ map(0x2600, 0x2600).rw(FUNC(simultano_state::control_r), FUNC(simultano_state::control_w)); //map(0x4000, 0x5fff).noprw(); // tries to access RAM, unpopulated on PCB map(0x6000, 0x607f).rw("lcd", FUNC(sed1502_device::read), FUNC(sed1502_device::write)); - map(0x8000, 0xffff).m(m_rombank, FUNC(address_map_bank_device::amap8)); -} -void simultano_state::cc2150_rombank_map(address_map &map) -{ - map.unmap_value_high(); - map(0x00000, 0x0ffff).rom().region("maincpu", 0); + map(0x8000, 0xffff).view(m_rombank); + m_rombank[0](0x8000, 0xffff).rom().region("maincpu", 0x0000); + m_rombank[1](0x8000, 0xffff).rom().region("maincpu", 0x8000); + m_rombank[2](0x8000, 0xffff).lr8(NAME([]() { return 0xff; })); + m_rombank[3](0x8000, 0xffff).lr8(NAME([]() { return 0xff; })); } -void simultano_state::simultano_rombank_map(address_map &map) +void simultano_state::simultano_map(address_map &map) { - cc2150_rombank_map(map); - map(0x10000, 0x17fff).r("extrom", FUNC(generic_slot_device::read_rom)); + cc2150_map(map); + m_rombank[2](0x8000, 0xffff).r("extrom", FUNC(generic_slot_device::read_rom)); } @@ -322,13 +320,9 @@ { /* basic machine hardware */ R65C02(config, m_maincpu, 3_MHz_XTAL); - m_maincpu->set_addrmap(AS_PROGRAM, &simultano_state::main_map); + m_maincpu->set_addrmap(AS_PROGRAM, &simultano_state::cc2150_map); m_maincpu->set_periodic_int(FUNC(simultano_state::irq0_line_hold), attotime::from_hz(91.6)); // measured - ADDRESS_MAP_BANK(config, m_rombank); - m_rombank->set_map(&simultano_state::cc2150_rombank_map); - m_rombank->set_options(ENDIANNESS_LITTLE, 8, 17, 0x8000); - NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); SENSORBOARD(config, m_board).set_type(sensorboard_device::BUTTONS); @@ -361,11 +355,9 @@ /* basic machine hardware */ M65C02(config.replace(), m_maincpu, 5_MHz_XTAL); - m_maincpu->set_addrmap(AS_PROGRAM, &simultano_state::main_map); + m_maincpu->set_addrmap(AS_PROGRAM, &simultano_state::simultano_map); m_maincpu->set_periodic_int(FUNC(simultano_state::irq0_line_hold), attotime::from_hz(76)); // approximation - m_rombank->set_map(&simultano_state::simultano_rombank_map); - /* extension rom */ GENERIC_CARTSLOT(config, "extrom", generic_plain_slot, "saitek_egr"); SOFTWARE_LIST(config, "cart_list").set_original("saitek_egr").set_filter("egr2"); diff -Nru mame-0.230+dfsg.1/src/mame/drivers/saitek_ssystem3.cpp mame-0.231+dfsg.1/src/mame/drivers/saitek_ssystem3.cpp --- mame-0.230+dfsg.1/src/mame/drivers/saitek_ssystem3.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/saitek_ssystem3.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -236,7 +236,6 @@ for (int i = 0; i < 4; i++) m_display[0]->write_row(i, m_lcd1_data >> (8*i) & 0xff); m_display[0]->write_row(4, (m_shift ^ xorval) | 0x100); - m_display[0]->update(); } // PB3: device serial out diff -Nru mame-0.230+dfsg.1/src/mame/drivers/saitek_stratos.cpp mame-0.231+dfsg.1/src/mame/drivers/saitek_stratos.cpp --- mame-0.230+dfsg.1/src/mame/drivers/saitek_stratos.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/saitek_stratos.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -191,6 +191,7 @@ { saitek_stratos_state::machine_reset(); + m_control = 0; m_rombank->set_entry(0); m_nvrambank->set_entry(0); } diff -Nru mame-0.230+dfsg.1/src/mame/drivers/sauro.cpp mame-0.231+dfsg.1/src/mame/drivers/sauro.cpp --- mame-0.230+dfsg.1/src/mame/drivers/sauro.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/sauro.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -131,7 +131,7 @@ #include "cpu/z80/z80.h" #include "machine/nvram.h" #include "machine/watchdog.h" -#include "sound/3812intf.h" +#include "sound/ym3812.h" #include "screen.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/segaorun.cpp mame-0.231+dfsg.1/src/mame/drivers/segaorun.cpp --- mame-0.230+dfsg.1/src/mame/drivers/segaorun.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/segaorun.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -6,12 +6,17 @@ **************************************************************************** - Known bugs: - * LED connected to stop lights no longer working +Known bugs: +* LED connected to stop lights no longer working - To do for each game: - * verify analog input min/max - * verify protection +To do for each game: +* verify analog input min/max +* verify protection + +BTANB: +* there are plenty, but the most notorious one is that outrun's opr-10188 + is bad with a stuck d5. This was fixed by M2/Sega for the 3DS version, + and also included in the newer 'enhanced edition' -- @@ -1289,7 +1294,6 @@ // ROM DEFINITIONS //************************************************************************** - //************************************************************************************************************************* //************************************************************************************************************************* //************************************************************************************************************************* @@ -1358,6 +1362,60 @@ ROM_START( outruneh ) ROM_REGION( 0x60000, "maincpu", 0 ) // 68000 code + ROM_LOAD16_BYTE( "enhanced_203_epr-10380b.133", 0x000000, 0x10000, CRC(db563a0f) SHA1(06cdc53cb1e4a0f304d9e843a046338495d76e89) ) + ROM_LOAD16_BYTE( "enhanced_203_epr-10382b.118", 0x000001, 0x10000, CRC(ca324a4e) SHA1(763c89a10a734ffc2d170c7f0826f0ec6e7bc879) ) + ROM_LOAD16_BYTE( "enhanced_203_epr-10381b.132", 0x020000, 0x10000, CRC(d60be71f) SHA1(8d65d2d23d9a2202ea286ad3e1d52ef623dfa4e4) ) + ROM_LOAD16_BYTE( "enhanced_203_epr-10383b.117", 0x020001, 0x10000, CRC(cc1f2f75) SHA1(7002c926b6df53935dfebb40110efd514b601791) ) + + ROM_REGION( 0x60000, "subcpu", 0 ) // second 68000 CPU + ROM_LOAD16_BYTE( "epr-10327a.76", 0x00000, 0x10000, CRC(e28a5baf) SHA1(f715bde96c73ed47035acf5a41630fdeb41bb2f9) ) + ROM_LOAD16_BYTE( "epr-10329a.58", 0x00001, 0x10000, CRC(da131c81) SHA1(57d5219bd0e2fd886217e37e8773fd76be9b40eb) ) + ROM_LOAD16_BYTE( "epr-10328a.75", 0x20000, 0x10000, CRC(d5ec5e5d) SHA1(a4e3cfca4d803e72bc4fcf91ab00e21bf3f8959f) ) + ROM_LOAD16_BYTE( "epr-10330a.57", 0x20001, 0x10000, CRC(ba9ec82a) SHA1(2136c9572e26b7ae6de402c0cd53174407cc6018) ) + + ROM_REGION( 0x30000, "gfx1", 0 ) // tiles + ROM_LOAD( "opr-10268.99", 0x00000, 0x08000, CRC(95344b04) SHA1(b3480714b11fc49b449660431f85d4ba92f799ba) ) + ROM_LOAD( "opr-10232.102", 0x08000, 0x08000, CRC(776ba1eb) SHA1(e3477961d19e694c97643066534a1f720e0c4327) ) + ROM_LOAD( "opr-10267.100", 0x10000, 0x08000, CRC(a85bb823) SHA1(a7e0143dee5a47e679fd5155e58e717813912692) ) + ROM_LOAD( "opr-10231.103", 0x18000, 0x08000, CRC(8908bcbf) SHA1(8e1237b640a6f26bdcbfd5e201dadb2687c4febb) ) + ROM_LOAD( "opr-10266.101", 0x20000, 0x08000, CRC(9f6f1a74) SHA1(09164e858ebeedcff4d389524ddf89e7c216dcae) ) + ROM_LOAD( "opr-10230.104", 0x28000, 0x08000, CRC(686f5e50) SHA1(03697b892f911177968aa40de6c5f464eb0258e7) ) + + ROM_REGION32_LE( 0x100000, "sprites", 0 ) // sprites + // VIDEO BD 837-6064-02 uses mask ROMs four times the size of those used on VIDEO BD 837-6064-01, same data + ROM_LOAD32_BYTE( "mpr-10371.9", 0x00000, 0x20000, CRC(7cc86208) SHA1(21320f945f7c8e990c97c9b1232a0f4b6bd00f8f) ) + ROM_LOAD32_BYTE( "mpr-10373.10", 0x00001, 0x20000, CRC(b0d26ac9) SHA1(3a9ce8547cd43b7b04abddf9a9ab5634e0bbfaba) ) + ROM_LOAD32_BYTE( "mpr-10375.11", 0x00002, 0x20000, CRC(59b60bd7) SHA1(e5d8c67e020608edd24ba87b7687b2ac2483ee7f) ) + ROM_LOAD32_BYTE( "mpr-10377.12", 0x00003, 0x20000, CRC(17a1b04a) SHA1(9f7210cb4153ac9029a785dcd4b45f4513a4b008) ) + ROM_LOAD32_BYTE( "mpr-10372.13", 0x80000, 0x20000, CRC(b557078c) SHA1(a3746a2da077a8df4932348f650a061f413e8430) ) + ROM_LOAD32_BYTE( "mpr-10374.14", 0x80001, 0x20000, CRC(8051e517) SHA1(9c8509fbed170b4ac74c169da573393e54774f49) ) + ROM_LOAD32_BYTE( "mpr-10376.15", 0x80002, 0x20000, CRC(f3b8f318) SHA1(a5f2532613f33a64441e0f75443c10ba78dccc6e) ) + ROM_LOAD32_BYTE( "mpr-10378.16", 0x80003, 0x20000, CRC(a1062984) SHA1(4399030a155caf71f2dec7f75c4b65531ab53576) ) + + ROM_REGION( 0x10000, "segaic16road", 0 ) // road gfx (2 identical ROMs, 1 for each road) + ROM_LOAD( "opr-10186.47", 0x0000, 0x8000, CRC(22794426) SHA1(a554d4b68e71861a0d0da4d031b3b811b246f082) ) + ROM_LOAD( "opr-10185.11", 0x8000, 0x8000, CRC(22794426) SHA1(a554d4b68e71861a0d0da4d031b3b811b246f082) ) + + ROM_REGION( 0x10000, "soundcpu", 0 ) // sound CPU + ROM_LOAD( "epr-10187.88", 0x00000, 0x8000, CRC(a10abaa9) SHA1(01c8a819587a66d2ee4d255656e36fa0904377b0) ) + + ROM_REGION( 0x80000, "pcm", ROMREGION_ERASEFF ) // sound PCM data + ROM_LOAD( "opr-10193.66", 0x00000, 0x08000, CRC(bcd10dde) SHA1(417ce1d7242884640c5b14f4db8ee57cde7d085d) ) + ROM_RELOAD( 0x08000, 0x08000 ) + ROM_LOAD( "opr-10192.67", 0x10000, 0x08000, CRC(770f1270) SHA1(686bdf44d45c1d6002622f6658f037735382f3e0) ) + ROM_RELOAD( 0x18000, 0x08000 ) + ROM_LOAD( "opr-10191.68", 0x20000, 0x08000, CRC(20a284ab) SHA1(7c9027416d4122791ba53782fe2230cf02b7d506) ) + ROM_RELOAD( 0x28000, 0x08000 ) + ROM_LOAD( "opr-10190.69", 0x30000, 0x08000, CRC(7cab70e2) SHA1(a3c581d2b438630d0d4c39481dcfd85681c9f889) ) + ROM_RELOAD( 0x38000, 0x08000 ) + ROM_LOAD( "opr-10189.70", 0x40000, 0x08000, CRC(01366b54) SHA1(f467a6b807694d5832a985f5381c170d24aaee4e) ) + ROM_RELOAD( 0x48000, 0x08000 ) + ROM_LOAD( "enhanced_203_opr-10188.71", 0x50000, 0x08000, CRC(c2de09b2) SHA1(00777e08ad8eddd48fe58686d4d1db68a78d3d6f) ) // official replacement for factory defective opr-10188 + ROM_RELOAD( 0x58000, 0x08000 ) +ROM_END + +ROM_START( outruneha ) + ROM_REGION( 0x60000, "maincpu", 0 ) // 68000 code ROM_LOAD16_BYTE( "enhanced_110_epr-10380b.133", 0x000000, 0x10000, CRC(30d6ab84) SHA1(2ab4baee7bcf160fb9b47e50d20618537c1b1b45) ) ROM_LOAD16_BYTE( "enhanced_110_epr-10382b.118", 0x000001, 0x10000, CRC(62041a21) SHA1(c3245c7b6ed0268c5baa2cd542f27bc88f5ad315) ) ROM_LOAD16_BYTE( "enhanced_110_epr-10381b.132", 0x020000, 0x10000, CRC(a3cc8db5) SHA1(f48d2a66c622b34a24705da5719f5adecaff9916) ) @@ -1410,7 +1468,6 @@ ROM_RELOAD( 0x58000, 0x08000 ) ROM_END - //************************************************************************************************************************* // Outrun // CPU: 68000 @@ -1640,6 +1697,84 @@ ROM_RELOAD( 0x38000, 0x08000 ) ROM_LOAD( "opr-10189.70", 0x40000, 0x08000, CRC(01366b54) SHA1(f467a6b807694d5832a985f5381c170d24aaee4e) ) ROM_RELOAD( 0x48000, 0x08000 ) + ROM_LOAD( "enhanced_203_opr-10188.71", 0x50000, 0x08000, CRC(c2de09b2) SHA1(00777e08ad8eddd48fe58686d4d1db68a78d3d6f) ) // official replacement for factory defective opr-10188 + ROM_RELOAD( 0x58000, 0x08000 ) +ROM_END + +ROM_START( outrundxeha ) + ROM_REGION( 0x60000, "maincpu", 0 ) // 68000 code + ROM_LOAD16_BYTE( "enhanced_103_epr-10380.133", 0x000000, 0x10000, CRC(0e7db21f) SHA1(f6c3fc26708da518989fffe3faf6c6d46a44c670) ) + ROM_LOAD16_BYTE( "enhanced_103_epr-10382.118", 0x000001, 0x10000, CRC(4e1ded90) SHA1(a86b756b4aa152359db86b424314100beecb9594) ) + ROM_LOAD16_BYTE( "enhanced_103_epr-10381.132", 0x020000, 0x10000, CRC(5f8ef718) SHA1(a1360f5199da6e2d869f848eeae7a24e65f1c7ff) ) + ROM_LOAD16_BYTE( "enhanced_103_epr-10383.117", 0x020001, 0x10000, CRC(9794985b) SHA1(b9a1e48b6e5f874141dd62c0672a1c0b191b9708) ) + + ROM_REGION( 0x60000, "subcpu", 0 ) // second 68000 CPU + ROM_LOAD16_BYTE( "epr-10327.76", 0x00000, 0x10000, CRC(da99d855) SHA1(77d18092e3c10a400e62eeba562f161398fe37a7) ) + ROM_LOAD16_BYTE( "epr-10329.58", 0x00001, 0x10000, CRC(fe0fa5e2) SHA1(e63fe5f7950af35131539836f18fa056767c2c80) ) + ROM_LOAD16_BYTE( "epr-10328.75", 0x20000, 0x10000, CRC(3c0e9a7f) SHA1(0e182fdac70423a85dc2b996c70bcb3954e75e10) ) + ROM_LOAD16_BYTE( "epr-10330.57", 0x20001, 0x10000, CRC(59786e99) SHA1(834bf361ca67cee3793c324bb26cf0ec82a72068) ) + + ROM_REGION( 0x30000, "gfx1", 0 ) // tiles + ROM_LOAD( "opr-10268.99", 0x00000, 0x08000, CRC(95344b04) SHA1(b3480714b11fc49b449660431f85d4ba92f799ba) ) + ROM_LOAD( "opr-10232.102", 0x08000, 0x08000, CRC(776ba1eb) SHA1(e3477961d19e694c97643066534a1f720e0c4327) ) + ROM_LOAD( "opr-10267.100", 0x10000, 0x08000, CRC(a85bb823) SHA1(a7e0143dee5a47e679fd5155e58e717813912692) ) + ROM_LOAD( "opr-10231.103", 0x18000, 0x08000, CRC(8908bcbf) SHA1(8e1237b640a6f26bdcbfd5e201dadb2687c4febb) ) + ROM_LOAD( "opr-10266.101", 0x20000, 0x08000, CRC(9f6f1a74) SHA1(09164e858ebeedcff4d389524ddf89e7c216dcae) ) + ROM_LOAD( "opr-10230.104", 0x28000, 0x08000, CRC(686f5e50) SHA1(03697b892f911177968aa40de6c5f464eb0258e7) ) + + ROM_REGION32_LE( 0x100000, "sprites", 0 ) // sprites + // VIDEO BD 837-6064-01 uses EPROMs a fourth of the size of those used on VIDEO BD 837-6064-02, same data + ROM_LOAD32_BYTE( "epr-10194.26", 0x00000, 0x08000, CRC(f0eda3bd) SHA1(173e10a10372d42da81e6eb48c3e23a117638c0c) ) + ROM_LOAD32_BYTE( "epr-10203.38", 0x00001, 0x08000, CRC(8445a622) SHA1(1187dee7db09a42446fc75872d49936310141eb8) ) + ROM_LOAD32_BYTE( "epr-10212.52", 0x00002, 0x08000, CRC(dee7e731) SHA1(f09d18f8d8405025b87dd01488ad2098e28410b0) ) + ROM_LOAD32_BYTE( "epr-10221.66", 0x00003, 0x08000, CRC(43431387) SHA1(a28896e888bc4d4f67babd49003d663c1ceabb71) ) + ROM_LOAD32_BYTE( "epr-10195.27", 0x20000, 0x08000, CRC(0de75cdd) SHA1(a97faea76aca663ccbbde327f3d1d8ae256649d3) ) + ROM_LOAD32_BYTE( "epr-10204.39", 0x20001, 0x08000, CRC(5f4b5abb) SHA1(f81637b2eb6a4bde76c43eedfad7e5375594c7bd) ) + ROM_LOAD32_BYTE( "epr-10213.53", 0x20002, 0x08000, CRC(1d1b22f0) SHA1(d3b1c36d08c4b7b08f9969a521e62eebd5b2238d) ) + ROM_LOAD32_BYTE( "epr-10222.67", 0x20003, 0x08000, CRC(a254c706) SHA1(e2801a0a7fd5546a48cd53ad7e4743d821d985ff) ) + ROM_LOAD32_BYTE( "epr-10196.28", 0x40000, 0x08000, CRC(8688bb59) SHA1(0aaa90c5101aa1db00db776a15a0a525587dfc43) ) + ROM_LOAD32_BYTE( "epr-10205.40", 0x40001, 0x08000, CRC(74bd93ca) SHA1(6a02ea3b977e56cfd61302afa2abf6c2dc766ba7) ) + ROM_LOAD32_BYTE( "epr-10214.54", 0x40002, 0x08000, CRC(57527e18) SHA1(4cc95c4b741f495e5b9c3b9d4d9ab9a6fded9aeb) ) + ROM_LOAD32_BYTE( "epr-10223.68", 0x40003, 0x08000, CRC(3850690e) SHA1(0f92743f848edc8deaeeef3afca5f662ceba61e7) ) + ROM_LOAD32_BYTE( "epr-10197.29", 0x60000, 0x08000, CRC(009165a6) SHA1(987b91e8c5c54bb7c4520b13a72f1f47c34278f4) ) + ROM_LOAD32_BYTE( "epr-10206.41", 0x60001, 0x08000, CRC(954542c5) SHA1(3c67e3568c04ba083f4aacad2e8857cdd16b3b2f) ) + ROM_LOAD32_BYTE( "epr-10215.55", 0x60002, 0x08000, CRC(69be5a6c) SHA1(2daac5877a71de04878f231f03361f697552431f) ) + ROM_LOAD32_BYTE( "epr-10224.69", 0x60003, 0x08000, CRC(5cffc346) SHA1(0481f864bb584c96cd92c260a62c0c1d4030bde8) ) + ROM_LOAD32_BYTE( "epr-10198.30", 0x80000, 0x08000, CRC(d894992e) SHA1(451469f743a0019b8797d16ba7b26a267d13fe06) ) + ROM_LOAD32_BYTE( "epr-10207.42", 0x80001, 0x08000, CRC(ca61cea4) SHA1(7c39e2863f5c7be290522acdaf046b1dab7a3542) ) + ROM_LOAD32_BYTE( "epr-10216.56", 0x80002, 0x08000, CRC(d394134d) SHA1(42f768a9c9eb9f556d197548c35b3a0cd5414734) ) + ROM_LOAD32_BYTE( "epr-10225.70", 0x80003, 0x08000, CRC(0a5d1f2b) SHA1(43d9c7539b6cebbac3395a4ba71a702300c9e644) ) + ROM_LOAD32_BYTE( "epr-10199.31", 0xa0000, 0x08000, CRC(86376af6) SHA1(971f4b0d9a01ca7ffb50cefbe1ab41b703a4a41a) ) + ROM_LOAD32_BYTE( "epr-10208.43", 0xa0001, 0x08000, CRC(6830b7fa) SHA1(3ece1971a4f025104ebd026da6751caea9aa8a64) ) + ROM_LOAD32_BYTE( "epr-10217.57", 0xa0002, 0x08000, CRC(bf2c9b76) SHA1(248e273255968115a60855b1fffcce1dbeacc3d4) ) + ROM_LOAD32_BYTE( "epr-10226.71", 0xa0003, 0x08000, CRC(5a452474) SHA1(6789a33b55a1693ec9cc196b3ebd220b14169e08) ) + ROM_LOAD32_BYTE( "epr-10200.32", 0xc0000, 0x08000, CRC(1e5d4f73) SHA1(79deddf4461dad5784441c2839894207b7d2ecac) ) + ROM_LOAD32_BYTE( "epr-10209.44", 0xc0001, 0x08000, CRC(5c15419e) SHA1(7b4e9c0cb430afae7f927c0224021add0a627251) ) + ROM_LOAD32_BYTE( "epr-10218.58", 0xc0002, 0x08000, CRC(db4bdb39) SHA1(b4661611b28e7ff1c721565175038cfd1e99d383) ) + ROM_LOAD32_BYTE( "epr-10227.72", 0xc0003, 0x08000, CRC(c7def392) SHA1(fa7d1245eefdc3abb9520118bbb0d025ca62901e) ) + ROM_LOAD32_BYTE( "epr-10201.33", 0xe0000, 0x08000, CRC(1d9d4b9c) SHA1(3264b66c87aa7de4c140450b96adbe3071231d4a) ) + ROM_LOAD32_BYTE( "epr-10210.45", 0xe0001, 0x08000, CRC(39422931) SHA1(8d8a3f4597945c92aebd20c0784180696b6c9c1c) ) + ROM_LOAD32_BYTE( "epr-10219.59", 0xe0002, 0x08000, CRC(e73b9224) SHA1(1904a71a0c18ab2a3a5929e72b1c215dbb0fa213) ) + ROM_LOAD32_BYTE( "epr-10228.73", 0xe0003, 0x08000, CRC(25803978) SHA1(1a18922aeb516e8deb026d52e3cdcc4e69385af5) ) + + ROM_REGION( 0x10000, "segaic16road", 0 ) // road gfx (2 identical ROMs, 1 for each road) + ROM_LOAD( "opr-10186.47", 0x0000, 0x8000, CRC(22794426) SHA1(a554d4b68e71861a0d0da4d031b3b811b246f082) ) + ROM_LOAD( "opr-10185.11", 0x8000, 0x8000, CRC(22794426) SHA1(a554d4b68e71861a0d0da4d031b3b811b246f082) ) + + ROM_REGION( 0x10000, "soundcpu", 0 ) // sound CPU + ROM_LOAD( "epr-10187.88", 0x00000, 0x8000, CRC(a10abaa9) SHA1(01c8a819587a66d2ee4d255656e36fa0904377b0) ) + + ROM_REGION( 0x80000, "pcm", ROMREGION_ERASEFF ) // sound PCM data + ROM_LOAD( "opr-10193.66", 0x00000, 0x08000, CRC(bcd10dde) SHA1(417ce1d7242884640c5b14f4db8ee57cde7d085d) ) + ROM_RELOAD( 0x08000, 0x08000 ) + ROM_LOAD( "opr-10192.67", 0x10000, 0x08000, CRC(770f1270) SHA1(686bdf44d45c1d6002622f6658f037735382f3e0) ) + ROM_RELOAD( 0x18000, 0x08000 ) + ROM_LOAD( "opr-10191.68", 0x20000, 0x08000, CRC(20a284ab) SHA1(7c9027416d4122791ba53782fe2230cf02b7d506) ) + ROM_RELOAD( 0x28000, 0x08000 ) + ROM_LOAD( "opr-10190.69", 0x30000, 0x08000, CRC(7cab70e2) SHA1(a3c581d2b438630d0d4c39481dcfd85681c9f889) ) + ROM_RELOAD( 0x38000, 0x08000 ) + ROM_LOAD( "opr-10189.70", 0x40000, 0x08000, CRC(01366b54) SHA1(f467a6b807694d5832a985f5381c170d24aaee4e) ) + ROM_RELOAD( 0x48000, 0x08000 ) ROM_LOAD( "enhanced_103_opr-10188.71", 0x50000, 0x08000, CRC(37598616) SHA1(e7c8ae6c59742e1de7ec5a95c5aebfab5716d959) ) // unofficial replacement for factory defective opr-10188 ROM_RELOAD( 0x58000, 0x08000 ) ROM_END @@ -2353,7 +2488,6 @@ ROM_LOAD( "opr-12306.71", 0x50000, 0x10000, CRC(e49249fd) SHA1(ff36e4dba4e9d3d354e3dd528edeb50ad9c18ee4) ) ROM_END - //************************************************************************************************************************* // Turbo Outrun Japan (Out Run upgrade set) // CPU: FD1094 (317-0117) @@ -2647,7 +2781,6 @@ ROM_LOAD( "opr-12306.71", 0x50000, 0x10000, CRC(e49249fd) SHA1(ff36e4dba4e9d3d354e3dd528edeb50ad9c18ee4) ) ROM_END - ROM_START( toutrun2d ) ROM_REGION( 0x60000, "maincpu", 0 ) // 68000 code ROM_LOAD16_BYTE( "bootleg_epr-12397.133", 0x000000, 0x10000, CRC(815ec9af) SHA1(94128ae06630bcfc21194c5113894c775e07d766) ) @@ -2766,8 +2899,6 @@ ROM_LOAD( "opr-12306.71", 0x50000, 0x10000, CRC(e49249fd) SHA1(ff36e4dba4e9d3d354e3dd528edeb50ad9c18ee4) ) ROM_END - - //************************************************************************************************************************* // Turbo Outrun (Japan DX) (original all EPR based board) // CPU: FD1094 (317-0101) @@ -2835,7 +2966,6 @@ ROM_LOAD( "epr-12306.ic71", 0x50000, 0x10000, CRC(e49249fd) SHA1(ff36e4dba4e9d3d354e3dd528edeb50ad9c18ee4) ) ROM_END - ROM_START( toutrunj1d ) ROM_REGION( 0x60000, "maincpu", 0 ) // 68000 code ROM_LOAD16_BYTE( "bootleg_epr-12289.133", 0x000000, 0x10000, CRC(bcdb64ae) SHA1(731d232d0c705d0caf6c01c721f58c48c166d131) ) @@ -2890,6 +3020,7 @@ ROM_LOAD( "epr-12306.ic71", 0x50000, 0x10000, CRC(e49249fd) SHA1(ff36e4dba4e9d3d354e3dd528edeb50ad9c18ee4) ) ROM_END + //************************************************************************** // CONFIGURATION //************************************************************************** @@ -2979,7 +3110,7 @@ // GAME DRIVERS //************************************************************************** -// YEAR, NAME, PARENT, MACHINE, INPUT, INIT, MONITOR,COMPANY,FULLNAME,FLAGS, LAYOUT +// YEAR, NAME, PARENT, MACHINE, INPUT, INIT, MONITOR,COMPANY,FULLNAME,FLAGS, LAYOUT GAMEL(1986, outrun, 0, outrun, outrun, segaorun_state, init_outrun, ROT0, "Sega", "Out Run (sitdown/upright, Rev B)", 0, layout_outrun ) // Upright/Sitdown determined by dipswitch settings GAMEL(1986, outrunra, outrun, outrun, outrun, segaorun_state, init_outrun, ROT0, "Sega", "Out Run (sitdown/upright, Rev A)", 0, layout_outrun ) // Upright/Sitdown determined by dipswitch settings GAMEL(1986, outrundx, outrun, outrun, outrundx, segaorun_state, init_outrun, ROT0, "Sega", "Out Run (deluxe sitdown)", 0, layout_outrun ) @@ -2987,11 +3118,19 @@ GAMEL(1986, outrundxa, outrun, outrundx, outrundx, segaorun_state, init_outrun, ROT0, "Sega", "Out Run (deluxe sitdown earlier version)", 0, layout_outrun ) GAMEL(1986, outrunb, outrun, outrun, outrun, segaorun_state, init_outrunb, ROT0, "bootleg", "Out Run (bootleg)", 0, layout_outrun ) +// aftermarket outrun modifications, these fix various issues in the game, including making the attract mode work correctly when set to Free Play. +// see http://reassembler.blogspot.co.uk/2011/08/outrun-enhanced-edition.html and http://reassembler.blogspot.com/2020/04/outrun-enhanced-edition-201.html +GAMEL(2020, outruneh, outrun, outrun, outruneh, segaorun_state, init_outrun, ROT0, "hack (Chris White)", "Out Run (sitdown/upright, Rev B) (Enhanced Edition v2.0.3)", 0, layout_outrun ) // Mar 2020 - this is not "V2" +GAMEL(2014, outruneha, outrun, outrun, outruneh, segaorun_state, init_outrun, ROT0, "hack (Chris White)", "Out Run (sitdown/upright, Rev B) (Enhanced Edition v1.1.0)", 0, layout_outrun ) // July 2014 +GAMEL(2020, outrundxeh, outrun, outrun, outrundxeh, segaorun_state, init_outrun, ROT0, "hack (Chris White)", "Out Run (deluxe sitdown) (Enhanced Edition v2.0.3)", 0, layout_outrun ) // Mar 2020 - this is not "V2" +GAMEL(2013, outrundxeha, outrun, outrun, outrundxeh, segaorun_state, init_outrun, ROT0, "hack (Chris White)", "Out Run (deluxe sitdown) (Enhanced Edition v1.0.3)", 0, layout_outrun ) // Jan 2013 + GAME( 1987, shangon, 0, shangon, shangon, segaorun_state, init_shangon, ROT0, "Sega", "Super Hang-On (sitdown/upright) (unprotected)", 0 ) GAME( 1987, shangon3, shangon, shangon_fd1089b, shangon, segaorun_state, init_shangon, ROT0, "Sega", "Super Hang-On (sitdown/upright) (FD1089B 317-0034)", 0 ) GAME( 1987, shangon2, shangon, shangon_fd1089b, shangon, segaorun_state, init_shangon, ROT0, "Sega", "Super Hang-On (mini ride-on, Rev A) (FD1089B 317-0034)", 0 ) GAME( 1987, shangon1, shangon, shangon_fd1089b, shangon, segaorun_state, init_shangon, ROT0, "Sega", "Super Hang-On (mini ride-on) (FD1089B 317-0034)", 0 ) GAME( 1991, shangonle, shangon, shangon, shangon, segaorun_state, init_shangon, ROT0, "Sega", "Limited Edition Hang-On", 0 ) +GAME( 1987, shangon3d, shangon, shangon, shangon, segaorun_state, init_shangon, ROT0, "bootleg", "Super Hang-On (sitdown/upright) (bootleg of FD1089B 317-0034 set)", 0 ) GAMEL(1989, toutrun, 0, outrun_fd1094, toutrun, segaorun_state, init_outrun, ROT0, "Sega", "Turbo Out Run (Out Run upgrade) (FD1094 317-0118)", 0, layout_outrun ) // Cabinet determined by dipswitch settings GAMEL(1989, toutrunj, toutrun, outrun_fd1094, toutrun, segaorun_state, init_outrun, ROT0, "Sega", "Turbo Out Run (Japan, Out Run upgrade) (FD1094 317-0117)", 0, layout_outrun ) // Cabinet determined by dipswitch settings @@ -3000,17 +3139,9 @@ GAMEL(1989, toutrun1, toutrun, outrun_fd1094, toutrunm, segaorun_state, init_outrun, ROT0, "Sega", "Turbo Out Run (deluxe cockpit) (FD1094 317-0109)", 0, layout_outrun ) GAMEL(1989, toutrunj1, toutrun, outrun_fd1094, toutrunct, segaorun_state, init_outrun, ROT0, "Sega", "Turbo Out Run (Japan, cockpit) (FD1094 317-0101)", 0, layout_outrun ) -// decrypted bootlegs +// decrypted toutrun bootlegs GAMEL(1989, toutrund, toutrun, outrun, toutrun, segaorun_state, init_outrun, ROT0, "bootleg", "Turbo Out Run (Out Run upgrade) (bootleg of FD1094 317-0118 set)", 0, layout_outrun ) // Cabinet determined by dipswitch settings GAMEL(1989, toutrunjd, toutrun, outrun, toutrun, segaorun_state, init_outrun, ROT0, "bootleg", "Turbo Out Run (Japan, Out Run upgrade) (bootleg of FD1094 317-0117 set)", 0, layout_outrun ) // Cabinet determined by dipswitch settings GAMEL(1989, toutrun3d, toutrun, outrun, toutrunc, segaorun_state, init_outrun, ROT0, "bootleg", "Turbo Out Run (cockpit) (bootleg of FD1094 317-0107 set)", 0, layout_outrun ) GAMEL(1989, toutrunj1d,toutrun, outrun, toutrunct, segaorun_state, init_outrun, ROT0, "bootleg", "Turbo Out Run (Japan, cockpit) (bootleg of FD1094 317-0101 set)", 0, layout_outrun ) GAMEL(1989, toutrun2d, toutrun, outrun, toutrunct, segaorun_state, init_outrun, ROT0, "bootleg", "Turbo Out Run (cockpit) (bootleg of FD1094 317-0106 set)", 0, layout_outrun ) - - -GAME( 1987, shangon3d, shangon, shangon, shangon, segaorun_state, init_shangon, ROT0, "bootleg", "Super Hang-On (sitdown/upright) (bootleg of FD1089B 317-0034 set)", 0 ) - -// aftermarket modifications, these fix various issues in the game, including making the attract mode work correctly when set to Free Play. -// see http://reassembler.blogspot.co.uk/2011/08/outrun-enhanced-edition.html -GAMEL(2013, outrundxeh, outrun, outrun, outrundxeh, segaorun_state, init_outrun, ROT0, "hack (Chris White)", "Out Run (deluxe sitdown) (Enhanced Edition v1.0.3)", 0, layout_outrun ) // Jan 2013 -GAMEL(2014, outruneh, outrun, outrun, outruneh, segaorun_state, init_outrun, ROT0, "hack (Chris White)", "Out Run (sitdown/upright, Rev B) (Enhanced Edition v1.1.0)", 0, layout_outrun ) // Upright/Sitdown determined by dipswitch settings - July 2014 diff -Nru mame-0.230+dfsg.1/src/mame/drivers/segas16a.cpp mame-0.231+dfsg.1/src/mame/drivers/segas16a.cpp --- mame-0.230+dfsg.1/src/mame/drivers/segas16a.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/segas16a.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -1995,6 +1995,9 @@ m_screen->set_visarea(0*8, 40*8-1, 0*8, 28*8-1); m_screen->set_screen_update(FUNC(segas16a_state::screen_update)); m_screen->set_palette(m_palette); + // see MT1852 (glitch in fantzone after stage intro text vanishes) + // this is a hack, but the scroll values must be latched at some point, when is unknown + m_screen->set_video_attributes(VIDEO_UPDATE_AFTER_VBLANK); SEGA_SYS16A_SPRITES(config, m_sprites, 0); SEGAIC16VID(config, m_segaic16vid, 0, "gfxdecode"); @@ -2056,6 +2059,9 @@ m_mcu->port_out_cb<1>().set(FUNC(segas16a_state::mcu_control_w)); m_screen->screen_vblank().set(FUNC(segas16a_state::i8751_main_cpu_vblank_w)); + + // prevent glitchy background scroll on quartet stage 18 + config.set_maximum_quantum(attotime::from_hz(6000)); } void segas16a_state::system16a_no7751(machine_config &config) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/segas16b.cpp mame-0.231+dfsg.1/src/mame/drivers/segas16b.cpp --- mame-0.230+dfsg.1/src/mame/drivers/segas16b.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/segas16b.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -3974,6 +3974,8 @@ m_screen->set_raw(MASTER_CLOCK_25MHz/4, 400, 0, 320, 262, 0, 224); m_screen->set_screen_update(FUNC(segas16b_state::screen_update)); m_screen->set_palette(m_palette); + // see note in segas16a.cpp, also used here for consistency + m_screen->set_video_attributes(VIDEO_UPDATE_AFTER_VBLANK); SEGA_SYS16B_SPRITES(config, m_sprites, 0); SEGAIC16VID(config, m_segaic16vid, 0, m_gfxdecode); @@ -4198,6 +4200,8 @@ m_screen->set_raw(MASTER_CLOCK_25MHz/4, 400, 0, 320, 262, 0, 224); // wrong, other XTAL seems to be 17Mhz? m_screen->set_screen_update(FUNC(segas16b_state::screen_update)); m_screen->set_palette(m_palette); + // see note in segas16a.cpp, also used here for consistency + m_screen->set_video_attributes(VIDEO_UPDATE_AFTER_VBLANK); SEGA_SYS16B_SPRITES(config, m_sprites, 0); SEGAIC16VID(config, m_segaic16vid, 0, m_gfxdecode); @@ -7419,6 +7423,56 @@ ROM_END //************************************************************************************************************************* +// Heavyweight Champ, Sega System 16B (set 2) +// CPU: 68000 +// ROM Board type: 171-5521 +// Sega ID# for ROM board: 834-6397-02 +// Notes: Only three different bytes from 'hwchamp', two for modifying the checksum so the ingame ROM test won't fail and +// the other it's an actual code value (which is actually readed quite frequently during gameplay, when certain +// moves are executed). +// This was dumped from an original Sega PCB with original Sega 'EPR' stickers on the ROMs. +// +ROM_START( hwchampa ) + ROM_REGION( 0x40000, "maincpu", 0 ) // 68000 code + ROM_LOAD16_BYTE( "epr-11239.a7", 0x000000, 0x20000, CRC(42d59e4b) SHA1(c806b7e10519f8885e9b900da9c63fbb74ee19a5) ) // the only different ROM from 'hwchamp' (but same label) + ROM_LOAD16_BYTE( "epr-11238.a5", 0x000001, 0x20000, CRC(25180124) SHA1(77b414f8cd88270713c57bddadec5d8dca490e86) ) + + ROM_REGION( 0xc0000, "gfx1", 0 ) // tiles + ROM_LOAD( "mpr-11241.a14", 0x00000, 0x20000, CRC(fc586a86) SHA1(2c26ef3ab94089940add3be9952804a6e62f5113) ) // all MPR-11xxx here are 28 pin Fujitsu MB831000 mask ROMs + ROM_LOAD( "mpr-11166.b14", 0x20000, 0x20000, CRC(aeaaa9d8) SHA1(6b7e5320f515c1c35445d3320b3edaef911191e1) ) + ROM_LOAD( "mpr-11242.a15", 0x40000, 0x20000, CRC(7715a742) SHA1(e6040ff0e9c68f3f502e5f6d7e7ca04b14059752) ) + ROM_LOAD( "mpr-11167.b15", 0x60000, 0x20000, CRC(63a82afa) SHA1(a02bbb6dd84cdf7cdab8e738c6927f5b1e3fcad5) ) + ROM_LOAD( "mpr-11243.a16", 0x80000, 0x20000, CRC(f30cd5fd) SHA1(df6118ca4b724c37b11e18d9f2ea18e9591ae7aa) ) + ROM_LOAD( "mpr-11168.b16", 0xA0000, 0x20000, CRC(5b8494a8) SHA1(9e3f09f4037a007b6a188dd81ec8f9c635e87650) ) + + ROM_REGION16_BE( 0x200000, "sprites", 0 ) // sprites + ROM_LOAD16_BYTE( "mpr-11158.b1", 0x000001, 0x010000, CRC(fc098a13) SHA1(b4a6e00d4765265bad170dabf0b2a4a58e063b16) ) // all MPR-111xx here are 28 pin Fujitsu MB831000 mask ROMs + ROM_CONTINUE( 0x020001, 0x010000 ) + ROM_LOAD16_BYTE( "mpr-11162.b5", 0x000000, 0x010000, CRC(5db934a8) SHA1(ba7cc93025af71ad2674b1376b61afbb7ae910ff) ) + ROM_CONTINUE( 0x020000, 0x010000 ) + ROM_LOAD16_BYTE( "mpr-11159.b2", 0x040001, 0x010000, CRC(1f27ee74) SHA1(a60d50a4f501623187c067a3c17bff49151ca3b2) ) + ROM_CONTINUE( 0x060001, 0x010000 ) + ROM_LOAD16_BYTE( "mpr-11163.b6", 0x040000, 0x010000, CRC(8a6a5cf1) SHA1(28b22aa326682ef3b54891dda7aa9a432da12a4d) ) + ROM_CONTINUE( 0x060000, 0x010000 ) + ROM_LOAD16_BYTE( "mpr-11160.b3", 0x080001, 0x010000, CRC(c0b2ba82) SHA1(30349c86a99bbe3dfb423027ad534a9333e27679) ) + ROM_CONTINUE( 0x0a0001, 0x010000 ) + ROM_LOAD16_BYTE( "mpr-11164.b7", 0x080000, 0x010000, CRC(d6c7917b) SHA1(8b313a5634c14f4c90bfa9f9616d600283f72768) ) + ROM_CONTINUE( 0x0a0000, 0x010000 ) + ROM_LOAD16_BYTE( "mpr-11161.b4", 0x0c0001, 0x010000, CRC(35c9e44b) SHA1(2de32cb684c46d1169d8afcb0d3058d08e452a49) ) + ROM_CONTINUE( 0x0e0001, 0x010000 ) + ROM_LOAD16_BYTE( "mpr-11165.b8", 0x0c0000, 0x010000, CRC(57e8f9d2) SHA1(1804677820d05a421120660f91e3a5f1df1e6a8d) ) + ROM_CONTINUE( 0x0e0000, 0x010000 ) + + ROM_REGION( 0x50000, "soundcpu", 0 ) // sound CPU + ROM_LOAD( "epr-11240.a10", 0x00000, 0x08000, CRC(96a12d9d) SHA1(f4ba70c3b5d80a1b6a187c940b922d5182d5ab12) ) + ROM_LOAD( "mpr-11244.a11", 0x10000, 0x20000, CRC(4191c03d) SHA1(40809fb80527980015d3b5c4ca7cf159bc09cf5a) ) // 28 pin Fujitsu MB831000 mask ROM + ROM_LOAD( "mpr-11245.a12", 0x30000, 0x20000, CRC(a4d53f7b) SHA1(71123a8ecfa093897c6f2bb7312e6c755be14521) ) // 28 pin Fujitsu MB831000 mask ROM + + ROM_REGION( 0x0100, "plds", 0 ) + ROM_LOAD( "315-5298.b9", 0x0000, 0x00eb, CRC(39b47212) SHA1(432b47aee5ecbf08a8a6dc2f8379c816feb86328) ) // PLS153 +ROM_END + +//************************************************************************************************************************* // Heavyweight Champ (Japan), Sega System 16B // CPU: FD1094 (317-0046) // ROM Board type: 171-5521 @@ -9883,7 +9937,8 @@ GAME( 1989, goldnaxe2, goldnaxe, system16b_i8751, goldnaxe, segas16b_state, init_generic_5704, ROT0, "Sega", "Golden Axe (set 2, US) (8751 317-0112)", 0 ) GAME( 1989, goldnaxe1, goldnaxe, system16b_fd1094_5797, goldnaxe, segas16b_state, init_generic_5797, ROT0, "Sega", "Golden Axe (set 1, World) (FD1094 317-0110)", 0 ) -GAME( 1987, hwchamp, 0, system16b, hwchamp, segas16b_state, init_hwchamp_5521, ROT0, "Sega", "Heavyweight Champ", 0 ) +GAME( 1987, hwchamp, 0, system16b, hwchamp, segas16b_state, init_hwchamp_5521, ROT0, "Sega", "Heavyweight Champ (set 1)", 0 ) +GAME( 1987, hwchampa, hwchamp, system16b, hwchamp, segas16b_state, init_hwchamp_5521, ROT0, "Sega", "Heavyweight Champ (set 2)", 0 ) GAME( 1987, hwchampj, hwchamp, system16b_fd1094, hwchamp, segas16b_state, init_hwchamp_5521, ROT0, "Sega", "Heavyweight Champ (Japan) (FD1094 317-0046)", 0 ) GAME( 1989, mvp, 0, system16b_fd1094_5797, mvp, segas16b_state, init_generic_5797, ROT0, "Sega", "MVP (set 2, US) (FD1094 317-0143)", 0 ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/segasp.cpp mame-0.231+dfsg.1/src/mame/drivers/segasp.cpp --- mame-0.230+dfsg.1/src/mame/drivers/segasp.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/segasp.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -36,6 +36,7 @@ todo: make this actually readable, we don't support unicode source files Title PCB ID REV CFID Dumped Region PIC MAIN BD Serial +Aminosan (satellite) 837-15041 F* yes JP 253-5508-0613J AAFG-01A40195003, Medal Battle Police ???-????? no ???-????-???? AAFE-xxxxxxxxxxx Beetle DASH!! ???-????? no ???-????-???? AAFE-xxxxxxxxxxx Bingo Galaxy (main) 834-14788 C ROM JP 253-5508-0513J AAFE-01A37754716, AAFE-01E10924916, AAFE-01D67304905, Medal @@ -391,6 +392,23 @@ ROM_REGION( 0x800, "pic_readout", ROMREGION_ERASE00 ) ROM_END +// probably satellite screen-less player I/O and hoppers controller units, while actual game running on main Lindbergh unit +ROM_START( aminosan ) + SEGASP_BIOS + ROM_DEFAULT_BIOS( "v201" ) + SEGASP_JP + SEGASP_MISC + + ROM_REGION( 0x08000000, "rom_board", ROMREGION_ERASE) + ROM_LOAD( "ic62", 0x00000000, 0x4000000, CRC(3d15e610) SHA1(00b040365eaf23f4d6ffe9927e264836d0cdaba1) ) + ROM_LOAD( "ic63", 0x04000000, 0x4000000, CRC(0db8a64a) SHA1(6b6144d1e9b90cb1beb4ac65801ee0b261339106) ) + + ROM_PARAMETER( ":rom_board:id", "5502" ) // 2x 512Mbit FlashROMs + + ROM_REGION( 0x800, "pic_readout", 0 ) + ROM_LOAD( "317-0613-jpn.ic15", 0, 0x800, CRC(cf3071b9) SHA1(27044f8d51ce3d2662847ff3f58dd4302935b9c8) ) +ROM_END + ROM_START( brickppl ) SEGASP_BIOS ROM_DEFAULT_BIOS( "v201" ) @@ -748,6 +766,7 @@ GAME( 2004, segasp, 0, segasp, segasp, segasp_state, init_segasp, ROT0, "Sega", "Sega System SP (Spider) BIOS", GAME_FLAGS | MACHINE_IS_BIOS_ROOT ) // These use ROMs +GAME( 2010, aminosan,segasp, segasp, segasp, segasp_state, init_segasp, ROT0, "Sega", "Aminosan (satellite)", GAME_FLAGS ) GAME( 2009, bingogal,segasp, segasp, segasp, segasp_state, init_segasp, ROT0, "Sega", "Bingo Galaxy (main)", GAME_FLAGS ) // 28.05.2009 GAME( 2009, bingogals,segasp, segasp, segasp, segasp_state, init_segasp, ROT0, "Sega", "Bingo Galaxy (satellite)", GAME_FLAGS ) // 28.05.2009 GAME( 2009, brickppl,segasp, segasp, segasp, segasp_state, init_segasp, ROT0, "Sega", "Brick People / Block PeePoo (Ver 1.002)", GAME_FLAGS ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/seibuspi.cpp mame-0.231+dfsg.1/src/mame/drivers/seibuspi.cpp --- mame-0.230+dfsg.1/src/mame/drivers/seibuspi.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/seibuspi.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -220,7 +220,7 @@ 4560 - Japan Radio Co. JRC4560 Op Amp IC (DIP8) YAC513-W - Yamaha YAC513-M DAC (SOIC16) HA13118 - Audio Power AMP IC (ZIP15) - JP121 - Jumper used when swapping game board cartridges + JP121 - Jumper to set sound output to mono or stereo JP051 - Slide Switch to flip screen CN121 - Output connector for left/right speakers EXCN1/2 - Connectors for player 3 & 4 controls @@ -1183,7 +1183,7 @@ { sxx2e_soundmap(map); map(0x4008, 0x4008).w("soundfifo2", FUNC(fifo7200_device::data_byte_w)); - map(0x400a, 0x400a).portr("JUMPERS"); // TO DO: get these to actually work + map(0x400a, 0x400a).portr("JUMPERS"); // TODO: get these to actually work (only on SXX2C) } void seibuspi_state::spi_ymf271_map(address_map &map) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/sengokmj.cpp mame-0.231+dfsg.1/src/mame/drivers/sengokmj.cpp --- mame-0.230+dfsg.1/src/mame/drivers/sengokmj.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/sengokmj.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -58,8 +58,8 @@ #include "cpu/nec/nec.h" #include "machine/nvram.h" -#include "sound/3812intf.h" #include "sound/okim6295.h" +#include "sound/ym3812.h" #include "video/seibu_crtc.h" #include "emupal.h" #include "screen.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/seta.cpp mame-0.231+dfsg.1/src/mame/drivers/seta.cpp --- mame-0.230+dfsg.1/src/mame/drivers/seta.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/seta.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -1421,11 +1421,11 @@ #include "machine/nvram.h" #include "machine/pit8253.h" #include "machine/watchdog.h" -#include "sound/3812intf.h" #include "sound/okim6295.h" #include "sound/ym2151.h" #include "sound/ym2203.h" #include "sound/ym2612.h" +#include "sound/ym3812.h" #include "diserial.h" #include "screen.h" @@ -10908,17 +10908,55 @@ ROM_LOAD( "snd2.u158", 0x040000, 0x020000, CRC(bc8de02a) SHA1(503c2c9f9ce029701e6a5b134d9407ab06e28913) ) ROM_LOAD( "snd3.u159", 0x060000, 0x020000, CRC(939777fd) SHA1(3dd1b89a4f81f745c68037c568c885fe1403ed31) ) ROM_LOAD( "snd4.u160", 0x080000, 0x020000, CRC(7b97716d) SHA1(6693e81dc008317c6a985558624f5d5cf00785e9) ) - ROM_LOAD( "snd5.u161", 0x0A0000, 0x020000, CRC(294e1cc9) SHA1(5faef5eb9f15c23686c2f66646c6f6724e7c611f) ) - ROM_LOAD( "snd6.u162", 0x0C0000, 0x020000, CRC(ecab073b) SHA1(f991fb9d9d4ffe24b67b233850ef0727dc6329b6) ) - ROM_LOAD( "snd7.u163", 0x0E0000, 0x020000, CRC(1b7ea768) SHA1(7dfa8cbcb839c76f3f9eefd6abbc2b424c3d970a) ) + ROM_LOAD( "snd5.u161", 0x0a0000, 0x020000, CRC(294e1cc9) SHA1(5faef5eb9f15c23686c2f66646c6f6724e7c611f) ) + ROM_LOAD( "snd6.u162", 0x0c0000, 0x020000, CRC(ecab073b) SHA1(f991fb9d9d4ffe24b67b233850ef0727dc6329b6) ) + ROM_LOAD( "snd7.u163", 0x0e0000, 0x020000, CRC(1b7ea768) SHA1(7dfa8cbcb839c76f3f9eefd6abbc2b424c3d970a) ) - ROM_REGION( 0xC00, "pals", 0 ) + ROM_REGION( 0xc00, "pals", 0 ) ROM_LOAD( "con1x.u35", 0x000000, 0x104, CRC(ce8b57d9) SHA1(e433a8cee4f964123595f904170793e152290be1) ) ROM_LOAD( "con2x.u36", 0x000200, 0x104, CRC(0b18db9e) SHA1(80e6aacb1455e15c6e665feaec8711070c14a901) ) ROM_LOAD( "dec1x.u14", 0x000400, 0x104, CRC(d197abfe) SHA1(93f08d879c339ec00598383723912d7d0eab306c) ) ROM_LOAD( "dec2x.u206", 0x000600, 0x104, CRC(35afbba8) SHA1(ce1cc0f75467a1ce6444250d741e70c2ed8d4c14) ) ROM_LOAD( "pcon2.u110", 0x000800, 0x104, CRC(082882c2) SHA1(78385047ed8b1e2c11926c5ce8dea40450b0d0b0) ) - ROM_LOAD( "sc.u116", 0x000A00, 0x104, CRC(e57bfde9) SHA1(33632d007c8e48d756fc920985f82ae32dcd63e6) ) + ROM_LOAD( "sc.u116", 0x000a00, 0x104, CRC(e57bfde9) SHA1(33632d007c8e48d756fc920985f82ae32dcd63e6) ) +ROM_END + +ROM_START( daiohp2 ) /* Found on the same P0-072-2 PCB as the previous Daioh prototype */ + ROM_REGION( 0x200000, "maincpu", ROMREGION_ERASEFF ) /* 68000 Code */ + ROM_LOAD16_BYTE( "prg_even.u3", 0x000000, 0x020000, CRC(0079c08f) SHA1(6353c06ec24c9ed28c34c7023557b63471ca2514) ) + ROM_LOAD16_BYTE( "prg_odd.u4", 0x000001, 0x020000, CRC(d2a843ad) SHA1(1a867740227cbbbf7783cad9de1938508a21e8d3) ) + ROM_LOAD16_BYTE( "data_even.u103", 0x100000, 0x040000, CRC(a76139bb) SHA1(684c949ac4b652c645ab61be7acb2821fe1b6c8d) ) + ROM_LOAD16_BYTE( "data_odd.u102", 0x100001, 0x040000, CRC(075c4b30) SHA1(6acd4f21fe06bc4864e87f3174b64d73e33cdf22) ) + + ROM_REGION( 0x200000, "gfx1", 0 ) /* Sprites */ + ROM_LOAD16_BYTE( "obj_1.u140", 0x000000, 0x080000, CRC(01f12e59) SHA1(8741916643df8f723e1151a966a9e1436ba7b336) ) + ROM_LOAD16_BYTE( "obj_0.u142", 0x000001, 0x080000, CRC(361d47ae) SHA1(9d76e64087d5193f79036a934fc87387d2909212) ) + ROM_LOAD16_BYTE( "obj_3.u144", 0x100000, 0x080000, CRC(68b5be19) SHA1(e057773b83f721411782fc275e2cc1e586dfe090) ) + ROM_LOAD16_BYTE( "obj_2.u146", 0x100001, 0x080000, CRC(85f5a720) SHA1(c1eadb112192b9a5bd5b1efb67c756847b3dc191) ) + + ROM_REGION( 0x200000, "gfx2", 0 ) /* Layer 1 */ + ROM_LOAD16_BYTE( "bg1_0.u148", 0x000001, 0x080000, CRC(bec48d7a) SHA1(9fdcc8f461e48cb4244827bead980ad48acdfbd8) ) + ROM_LOAD16_BYTE( "bg1_1.u150", 0x000000, 0x080000, CRC(d5793a2f) SHA1(0623d51d405fde69622f1e15512fd8fc41209a59) ) + ROM_LOAD16_BYTE( "bg1_2.u149", 0x100001, 0x080000, CRC(85761988) SHA1(5602052f5fed5afcedc257b0ee07b4eca25f87cb) ) + ROM_LOAD16_BYTE( "bg1_3.u151", 0x100000, 0x080000, CRC(f6912766) SHA1(d919f679138bbc2dd7d79d814c220193024c769b) ) + + ROM_REGION( 0x200000, "gfx3", 0 ) /* Layer 2 */ + ROM_LOAD16_BYTE( "bg2_0.u164", 0x000001, 0x080000, CRC(7e46a10e) SHA1(a8576f7a140b065b88a0dab648f7b31c75fec006) ) + ROM_LOAD16_BYTE( "bg2_1.u166", 0x000000, 0x080000, CRC(9274123b) SHA1(b58e107a5bd222e454fd435d515e57cab52e6593) ) + ROM_LOAD16_BYTE( "bg2_2.u165", 0x100001, 0x080000, CRC(3119189b) SHA1(3a45ec8db30659d7fd47090cb137df05bbdc1c86) ) + ROM_LOAD16_BYTE( "bg2_3.u167", 0x100000, 0x080000, CRC(533ba782) SHA1(b5f62323be95b2def8d1383b400b4ef0d3b3d6cd) ) + + ROM_REGION( 0x100000, "x1snd", 0 ) /* Samples */ + ROM_LOAD( "se_0.u69", 0x000000, 0x080000, CRC(21e4f093) SHA1(f0420d158dc5d182e41b6fb2ea3af6baf88bacb8) ) + ROM_LOAD( "se_1.u70", 0x080000, 0x080000, CRC(593c3c58) SHA1(475fb530a6d23269cb0aea6e294291c7463b57a2) ) + + ROM_REGION( 0xc00, "pals", 0 ) + ROM_LOAD( "fa-023.u35", 0x000000, 0x117, CRC(f187ea2d) SHA1(d2f05b42c0bbc6dc711c525b2a63d4de3ac9de03) ) + ROM_LOAD( "fa-024.u36", 0x000200, 0x117, CRC(02c87697) SHA1(5ff985ba88f4de677cf13626c95eee0b59fbb96a) ) + ROM_LOAD( "fa-022.u14", 0x000400, 0x117, CRC(f780fd0e) SHA1(58513fdef8bff5bb32f7de04d2d5f1446c66d108) ) + ROM_LOAD( "fa-020.u206", 0x000600, 0x117, CRC(cd2cd02c) SHA1(150fdacfc44ea5a2f61c1cf626011d43b75ad618) ) + ROM_LOAD( "fa-025.u76", 0x000800, 0x117, CRC(875c0c81) SHA1(8c259b75f40bf8ad2971648e4bd3284ef5da30d5) ) + ROM_LOAD( "fa-021.u116", 0x000a00, 0x117, CRC(e335cf2e) SHA1(35f6fa2fb2da1dc5b1fad93f44947f76d6ef35aa) ) ROM_END ROM_START( daiohc ) /* Found on a 93111A PCB - same PCB as War of Areo & J. J. Squawkers */ @@ -12324,6 +12362,7 @@ GAME( 1993, daioh, 0, daioh, daioh, seta_state, empty_init, ROT270, "Athena", "Daioh", 0 ) GAME( 1993, daioha, daioh, daioh, daioh, seta_state, empty_init, ROT270, "Athena", "Daioh (earlier)", 0 ) GAME( 1993, daiohp, daioh, daiohp, daiohp, seta_state, empty_init, ROT270, "Athena", "Daioh (prototype)", 0 ) +GAME( 1993, daiohp2, daioh, daiohp, daiohp, seta_state, empty_init, ROT270, "Athena", "Daioh (prototype, earlier)", 0 ) GAME( 1993, daiohc, daioh, wrofaero, daioh, seta_state, empty_init, ROT270, "Athena", "Daioh (93111A PCB conversion)", 0 ) GAME( 1993, jjsquawk, 0, jjsquawk, jjsquawk, seta_state, empty_init, ROT0, "Athena / Able", "J. J. Squawkers", MACHINE_IMPERFECT_SOUND ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/sidepckt.cpp mame-0.231+dfsg.1/src/mame/drivers/sidepckt.cpp --- mame-0.230+dfsg.1/src/mame/drivers/sidepckt.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/sidepckt.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -136,8 +136,8 @@ #include "cpu/m6809/m6809.h" #include "cpu/m6502/m6502.h" -#include "sound/3526intf.h" #include "sound/ym2203.h" +#include "sound/ym3526.h" #include "screen.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/sigmab31.cpp mame-0.231+dfsg.1/src/mame/drivers/sigmab31.cpp --- mame-0.230+dfsg.1/src/mame/drivers/sigmab31.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/sigmab31.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -95,7 +95,7 @@ #include "machine/6840ptm.h" #include "machine/6850acia.h" #include "machine/nvram.h" -#include "sound/3812intf.h" +#include "sound/ym3812.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/sigmab52.cpp mame-0.231+dfsg.1/src/mame/drivers/sigmab52.cpp --- mame-0.230+dfsg.1/src/mame/drivers/sigmab52.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/sigmab52.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -111,7 +111,7 @@ #include "machine/6850acia.h" #include "machine/gen_latch.h" #include "machine/nvram.h" -#include "sound/3812intf.h" +#include "sound/ym3812.h" #include "video/hd63484.h" #include "emupal.h" #include "screen.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/snesb.cpp mame-0.231+dfsg.1/src/mame/drivers/snesb.cpp --- mame-0.230+dfsg.1/src/mame/drivers/snesb.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/snesb.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -30,6 +30,7 @@ so you are awarded 55 credits on a hard reset) - sblast2b : dipswitches - sblast2b : pressing start during gameplay changes the character used. Intentional? + - sblast2ba: needs decryption - denseib,2: fix gfx glitches, missing texts - legendsb : unknown dipswitches - rushbets : dipswitches (stored at memory locations $785006 and $785008) @@ -1552,7 +1553,18 @@ ROM_LOAD( "1.bin", 0x000000, 0x0080000, CRC(bea10c40) SHA1(d9cc65267b9b57145d714f2c17b436c1fb21513f) ) ROM_LOAD( "2.bin", 0x080000, 0x0080000, CRC(57d2b6e9) SHA1(1a7b347101f67b254e2f86294d501b0669431644) ) ROM_LOAD( "3.bin", 0x100000, 0x0080000, CRC(9e63a5ce) SHA1(1d18606fbb28b55a921fc37e1af1aff4caae9003) ) +ROM_END + +ROM_START( sblast2ba) // all 27c4000 + ROM_REGION( 0x400000, "user3", ROMREGION_ERASEFF ) + + ROM_REGION(0x800, "user6", ROMREGION_ERASEFF) + ROM_REGION( 0x400000, "user7", 0 ) + ROM_LOAD( "u14", 0x000000, 0x080000, CRC(d2bdc126) SHA1(fa8f03b73f2f9b7a159699b764e2c46b5f8a8190) ) + ROM_LOAD( "u15", 0x080000, 0x080000, CRC(50f9acb1) SHA1(a86bc98f81dc2c9443fbcd9b5f4880b8d5851ed6) ) + ROM_LOAD( "u16", 0x100000, 0x080000, CRC(2a7f40f3) SHA1(e0db49969880af1edbadd8bc5a1bc59a55777d23) ) + ROM_LOAD( "u17", 0x180000, 0x080000, CRC(09817173) SHA1(e2ad9e7e1a95cde9ee973647dbd5df83b524978b) ) ROM_END ROM_START( legendsb ) @@ -1664,16 +1676,17 @@ } // Anonymous namespace -GAME( 199?, kinstb, 0, kinstb, kinstb, snesb_state, init_kinstb, ROT0, "bootleg", "Killer Instinct (SNES bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) -GAME( 1996, ffight2b, 0, ffight2b, ffight2b, snesb_state, init_ffight2b, ROT0, "bootleg", "Final Fight 2 (SNES bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) -GAME( 1996, iron, 0, kinstb, iron, snesb_state, init_iron, ROT0, "bootleg", "Iron (SNES bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) -GAME( 1996, denseib, 0, kinstb, denseib, snesb_state, init_denseib, ROT0, "bootleg", "Ghost Chaser Densei (SNES bootleg, set 1)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) -GAME( 1996, denseib2, denseib, kinstb, denseib, snesb_state, init_denseib2, ROT0, "bootleg", "Ghost Chaser Densei (SNES bootleg, set 2)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) -GAME( 1997, sblast2b, 0, kinstb, sblast2b, snesb_state, init_sblast2b, ROT0, "bootleg", "Sonic Blast Man 2 Special Turbo (SNES bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS) -GAME( 1996, endless, 0, kinstb, endless, snesb_state, init_endless, ROT0, "bootleg", "Gundam Wing: Endless Duel (SNES bootleg, set 1)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) -GAME( 1996, endlessa, endless, kinstb, endless, snesb_state, init_endless, ROT0, "bootleg", "Gundam Wing: Endless Duel (SNES bootleg, set 2)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) -GAME( 1996, legendsb, 0, kinstb, kinstb, snesb_state, init_legendsb, ROT0, "bootleg", "Legend (SNES bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) -GAME( 1997, rushbets, 0, kinstb, rushbets, snesb_state, init_rushbets, ROT0, "bootleg", "Rushing Beat Shura (SNES bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) -GAME( 1997, venom, 0, kinstb, venom, snesb_state, init_venom, ROT0, "bootleg", "Venom & Spider-Man - Separation Anxiety (SNES bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) -GAME( 1996, wldgunsb, 0, kinstb, wldgunsb, snesb_state, init_wldgunsb, ROT0, "bootleg", "Wild Guns (SNES bootleg)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // based off Japanese version -GAME( 199?, fatfurspb, 0, kinstb, venom, snesb_state, init_fatfurspb, ROT0, "bootleg", "Fatal Fury Special (SNES bootleg)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // coinage, etc. handled by protection device +GAME( 199?, kinstb, 0, kinstb, kinstb, snesb_state, init_kinstb, ROT0, "bootleg", "Killer Instinct (SNES bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) +GAME( 1996, ffight2b, 0, ffight2b, ffight2b, snesb_state, init_ffight2b, ROT0, "bootleg", "Final Fight 2 (SNES bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) +GAME( 1996, iron, 0, kinstb, iron, snesb_state, init_iron, ROT0, "bootleg", "Iron (SNES bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) +GAME( 1996, denseib, 0, kinstb, denseib, snesb_state, init_denseib, ROT0, "bootleg", "Ghost Chaser Densei (SNES bootleg, set 1)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) +GAME( 1996, denseib2, denseib, kinstb, denseib, snesb_state, init_denseib2, ROT0, "bootleg", "Ghost Chaser Densei (SNES bootleg, set 2)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) +GAME( 1997, sblast2b, 0, kinstb, sblast2b, snesb_state, init_sblast2b, ROT0, "bootleg", "Sonic Blast Man 2 Special Turbo (SNES bootleg, set 1)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS) +GAME( 1997, sblast2ba, sblast2b, kinstb, sblast2b, snesb_state, empty_init, ROT0, "bootleg", "Sonic Blast Man 2 Special Turbo (SNES bootleg, set 2)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // bad dump, needs to be descrambled, too +GAME( 1996, endless, 0, kinstb, endless, snesb_state, init_endless, ROT0, "bootleg", "Gundam Wing: Endless Duel (SNES bootleg, set 1)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) +GAME( 1996, endlessa, endless, kinstb, endless, snesb_state, init_endless, ROT0, "bootleg", "Gundam Wing: Endless Duel (SNES bootleg, set 2)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) +GAME( 1996, legendsb, 0, kinstb, kinstb, snesb_state, init_legendsb, ROT0, "bootleg", "Legend (SNES bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) +GAME( 1997, rushbets, 0, kinstb, rushbets, snesb_state, init_rushbets, ROT0, "bootleg", "Rushing Beat Shura (SNES bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) +GAME( 1997, venom, 0, kinstb, venom, snesb_state, init_venom, ROT0, "bootleg", "Venom & Spider-Man - Separation Anxiety (SNES bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) +GAME( 1996, wldgunsb, 0, kinstb, wldgunsb, snesb_state, init_wldgunsb, ROT0, "bootleg", "Wild Guns (SNES bootleg)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // based off Japanese version +GAME( 199?, fatfurspb, 0, kinstb, venom, snesb_state, init_fatfurspb, ROT0, "bootleg", "Fatal Fury Special (SNES bootleg)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // coinage, etc. handled by protection device diff -Nru mame-0.230+dfsg.1/src/mame/drivers/snk68.cpp mame-0.231+dfsg.1/src/mame/drivers/snk68.cpp --- mame-0.230+dfsg.1/src/mame/drivers/snk68.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/snk68.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -47,8 +47,8 @@ #include "cpu/m68000/m68000.h" #include "cpu/z80/z80.h" -#include "sound/3812intf.h" #include "sound/msm5205.h" +#include "sound/ym3812.h" #include "emupal.h" #include "speaker.h" @@ -152,8 +152,8 @@ void snk68_state::sound_io_map(address_map &map) { map.global_mask(0xff); - map(0x00, 0x00).rw("ymsnd", FUNC(ym3812_device::status_port_r), FUNC(ym3812_device::control_port_w)); - map(0x20, 0x20).w("ymsnd", FUNC(ym3812_device::write_port_w)); + map(0x00, 0x00).rw("ymsnd", FUNC(ym3812_device::status_r), FUNC(ym3812_device::address_w)); + map(0x20, 0x20).w("ymsnd", FUNC(ym3812_device::data_w)); map(0x40, 0x40).w(FUNC(snk68_state::D7759_write_port_0_w)); map(0x80, 0x80).lw8(NAME([this] (u8 data) { m_upd7759->reset_w(BIT(data, 7)); } )); } @@ -161,8 +161,8 @@ void snk68_state::powb_sound_io_map(address_map &map) { map.global_mask(0xff); - map(0x00, 0x00).rw("ymsnd", FUNC(ym3812_device::status_port_r), FUNC(ym3812_device::control_port_w)); - map(0x20, 0x20).w("ymsnd", FUNC(ym3812_device::write_port_w)); + map(0x00, 0x00).rw("ymsnd", FUNC(ym3812_device::status_r), FUNC(ym3812_device::address_w)); + map(0x20, 0x20).w("ymsnd", FUNC(ym3812_device::data_w)); } /******************************************************************************/ diff -Nru mame-0.230+dfsg.1/src/mame/drivers/snk.cpp mame-0.231+dfsg.1/src/mame/drivers/snk.cpp --- mame-0.230+dfsg.1/src/mame/drivers/snk.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/snk.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -578,9 +578,9 @@ #include "cpu/z80/z80.h" #include "sound/snkwave.h" #include "sound/ay8910.h" -#include "sound/3526intf.h" -#include "sound/3812intf.h" -#include "sound/8950intf.h" +#include "sound/y8950.h" +#include "sound/ym3526.h" +#include "sound/ym3812.h" #include "speaker.h" @@ -1760,10 +1760,10 @@ map(0x0000, 0xbfff).rom(); map(0xc000, 0xcfff).ram(); map(0xe000, 0xe000).r(m_soundlatch, FUNC(generic_latch_8_device::read)); - map(0xe800, 0xe800).rw("ym1", FUNC(ym3526_device::status_port_r), FUNC(ym3526_device::control_port_w)); - map(0xec00, 0xec00).w("ym1", FUNC(ym3526_device::write_port_w)); - map(0xf000, 0xf000).rw("ym2", FUNC(ym3526_device::status_port_r), FUNC(ym3526_device::control_port_w)); - map(0xf400, 0xf400).w("ym2", FUNC(ym3526_device::write_port_w)); + map(0xe800, 0xe800).rw("ym1", FUNC(ym3526_device::status_r), FUNC(ym3526_device::address_w)); + map(0xec00, 0xec00).w("ym1", FUNC(ym3526_device::data_w)); + map(0xf000, 0xf000).rw("ym2", FUNC(ym3526_device::status_r), FUNC(ym3526_device::address_w)); + map(0xf400, 0xf400).w("ym2", FUNC(ym3526_device::data_w)); map(0xf800, 0xf800).rw(FUNC(snk_state::snk_sound_status_r), FUNC(snk_state::snk_sound_status_w)); } @@ -1772,8 +1772,8 @@ map(0x0000, 0xbfff).rom(); map(0xc000, 0xcfff).ram(); map(0xe000, 0xe000).r(m_soundlatch, FUNC(generic_latch_8_device::read)); - map(0xe800, 0xe800).rw("ym1", FUNC(ym3812_device::status_port_r), FUNC(ym3812_device::control_port_w)); - map(0xec00, 0xec00).w("ym1", FUNC(ym3812_device::write_port_w)); + map(0xe800, 0xe800).rw("ym1", FUNC(ym3812_device::status_r), FUNC(ym3812_device::address_w)); + map(0xec00, 0xec00).w("ym1", FUNC(ym3812_device::data_w)); map(0xf800, 0xf800).rw(FUNC(snk_state::snk_sound_status_r), FUNC(snk_state::snk_sound_status_w)); } @@ -1782,10 +1782,10 @@ map(0x0000, 0xbfff).rom(); map(0xc000, 0xcfff).ram(); map(0xe000, 0xe000).r(m_soundlatch, FUNC(generic_latch_8_device::read)); - map(0xe800, 0xe800).rw("ym1", FUNC(ym3526_device::status_port_r), FUNC(ym3526_device::control_port_w)); - map(0xec00, 0xec00).w("ym1", FUNC(ym3526_device::write_port_w)); - map(0xf000, 0xf000).rw("ym2", FUNC(y8950_device::status_port_r), FUNC(y8950_device::control_port_w)); - map(0xf400, 0xf400).w("ym2", FUNC(y8950_device::write_port_w)); + map(0xe800, 0xe800).rw("ym1", FUNC(ym3526_device::status_r), FUNC(ym3526_device::address_w)); + map(0xec00, 0xec00).w("ym1", FUNC(ym3526_device::data_w)); + map(0xf000, 0xf000).rw("ym2", FUNC(y8950_device::status_r), FUNC(y8950_device::address_w)); + map(0xf400, 0xf400).w("ym2", FUNC(y8950_device::data_w)); map(0xf800, 0xf800).rw(FUNC(snk_state::snk_sound_status_r), FUNC(snk_state::snk_sound_status_w)); } @@ -1794,10 +1794,10 @@ map(0x0000, 0xbfff).rom(); map(0xc000, 0xcfff).ram(); map(0xe000, 0xe000).r(m_soundlatch, FUNC(generic_latch_8_device::read)); - map(0xe800, 0xe800).rw("ym1", FUNC(ym3812_device::status_port_r), FUNC(ym3812_device::control_port_w)); - map(0xec00, 0xec00).w("ym1", FUNC(ym3812_device::write_port_w)); - map(0xf000, 0xf000).rw("ym2", FUNC(y8950_device::status_port_r), FUNC(y8950_device::control_port_w)); - map(0xf400, 0xf400).w("ym2", FUNC(y8950_device::write_port_w)); + map(0xe800, 0xe800).rw("ym1", FUNC(ym3812_device::status_r), FUNC(ym3812_device::address_w)); + map(0xec00, 0xec00).w("ym1", FUNC(ym3812_device::data_w)); + map(0xf000, 0xf000).rw("ym2", FUNC(y8950_device::status_r), FUNC(y8950_device::address_w)); + map(0xf400, 0xf400).w("ym2", FUNC(y8950_device::data_w)); map(0xf800, 0xf800).rw(FUNC(snk_state::snk_sound_status_r), FUNC(snk_state::snk_sound_status_w)); } @@ -1806,8 +1806,8 @@ map(0x0000, 0xbfff).rom(); map(0xc000, 0xcfff).ram(); map(0xe000, 0xe000).r(m_soundlatch, FUNC(generic_latch_8_device::read)); - map(0xf000, 0xf000).rw("ym2", FUNC(y8950_device::status_port_r), FUNC(y8950_device::control_port_w)); - map(0xf400, 0xf400).w("ym2", FUNC(y8950_device::write_port_w)); + map(0xf000, 0xf000).rw("ym2", FUNC(y8950_device::status_r), FUNC(y8950_device::address_w)); + map(0xf400, 0xf400).w("ym2", FUNC(y8950_device::data_w)); map(0xf800, 0xf800).rw(FUNC(snk_state::snk_sound_status_r), FUNC(snk_state::snk_sound_status_w)); } @@ -4216,7 +4216,7 @@ /* sound hardware */ y8950_device &ym2(Y8950(config.replace(), "ym2", XTAL(8'000'000)/2)); /* verified on pcb */ - ym2.irq().set(FUNC(snk_state::ymirq_callback_2)); + ym2.irq_handler().set(FUNC(snk_state::ymirq_callback_2)); ym2.add_route(ALL_OUTPUTS, "mono", 2.0); } @@ -4260,7 +4260,7 @@ ym1.add_route(ALL_OUTPUTS, "mono", 2.0); y8950_device &ym2(Y8950(config, "ym2", XTAL(8'000'000)/2)); /* verified on pcb */ - ym2.irq().set(FUNC(snk_state::ymirq_callback_2)); + ym2.irq_handler().set(FUNC(snk_state::ymirq_callback_2)); ym2.add_route(ALL_OUTPUTS, "mono", 2.0); } @@ -4342,7 +4342,7 @@ ym1.add_route(ALL_OUTPUTS, "mono", 1.0); y8950_device &ym2(Y8950(config, "ym2", 4000000)); - ym2.irq().set(FUNC(snk_state::ymirq_callback_2)); + ym2.irq_handler().set(FUNC(snk_state::ymirq_callback_2)); ym2.add_route(ALL_OUTPUTS, "mono", 1.0); } diff -Nru mame-0.230+dfsg.1/src/mame/drivers/snowbros.cpp mame-0.231+dfsg.1/src/mame/drivers/snowbros.cpp --- mame-0.230+dfsg.1/src/mame/drivers/snowbros.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/snowbros.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -81,8 +81,8 @@ #include "cpu/mcs51/mcs51.h" // for semicom mcu #include "cpu/z80/z80.h" #include "machine/watchdog.h" -#include "sound/3812intf.h" #include "sound/ym2151.h" +#include "sound/ym3812.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/spbactn.cpp mame-0.231+dfsg.1/src/mame/drivers/spbactn.cpp --- mame-0.230+dfsg.1/src/mame/drivers/spbactn.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/spbactn.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -136,8 +136,8 @@ #include "cpu/m68000/m68000.h" #include "cpu/z80/z80.h" -#include "sound/3812intf.h" #include "sound/okim6295.h" +#include "sound/ym3812.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/spdodgeb.cpp mame-0.231+dfsg.1/src/mame/drivers/spdodgeb.cpp --- mame-0.230+dfsg.1/src/mame/drivers/spdodgeb.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/spdodgeb.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -28,7 +28,7 @@ #include "cpu/m6502/m6502.h" #include "cpu/m6800/m6801.h" #include "cpu/m6809/m6809.h" -#include "sound/3812intf.h" +#include "sound/ym3812.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/speedbal.cpp mame-0.231+dfsg.1/src/mame/drivers/speedbal.cpp --- mame-0.230+dfsg.1/src/mame/drivers/speedbal.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/speedbal.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -33,7 +33,7 @@ #include "includes/speedbal.h" #include "cpu/z80/z80.h" -#include "sound/3812intf.h" +#include "sound/ym3812.h" #include "screen.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/spg110.cpp mame-0.231+dfsg.1/src/mame/drivers/spg110.cpp --- mame-0.230+dfsg.1/src/mame/drivers/spg110.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/spg110.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -23,9 +23,13 @@ #include "emu.h" +#include "bus/generic/slot.h" +#include "bus/generic/carts.h" + #include "cpu/unsp/unsp.h" #include "machine/spg110.h" #include "screen.h" +#include "softlist.h" #include "speaker.h" class spg110_game_state : public driver_device @@ -49,6 +53,28 @@ virtual void mem_map(address_map &map); }; +class spg110_sstarkar_game_state : public spg110_game_state +{ +public: + spg110_sstarkar_game_state(const machine_config &mconfig, device_type type, const char *tag) : + spg110_game_state(mconfig, type, tag), + m_cart(*this, "cartslot"), + m_cartrom(*this, "cartrom") + { } +public: + void sstarkar(machine_config &config); + +protected: + virtual void machine_start() override; + +private: + required_device m_cart; + DECLARE_DEVICE_IMAGE_LOAD_MEMBER(cart_load); + optional_memory_bank m_cartrom; + + void mem_map_cart(address_map &map); +}; + /************************* * Machine Hardware * *************************/ @@ -58,6 +84,12 @@ map(0x004000, 0x3fffff).rom().region("maincpu", 0x8000); } +void spg110_sstarkar_game_state::mem_map_cart(address_map &map) +{ + map(0x004000, 0x0fffff).bankr("cartrom"); +} + + static INPUT_PORTS_START( jak_capb ) PORT_START("PA") PORT_DIPNAME( 0x0001, 0x0000, "PA" ) @@ -515,6 +547,43 @@ m_maincpu->set_video_irq_spidman(true); } + +void spg110_sstarkar_game_state::machine_start() +{ + // if there's a cart, override the standard mapping + if (m_cart && m_cart->exists()) + { + m_cartrom->configure_entries(0, 1, m_cart->get_rom_base()+0x8000, 0x200000-0x8000); + m_cartrom->set_entry(0); + } +} + +DEVICE_IMAGE_LOAD_MEMBER(spg110_sstarkar_game_state::cart_load) +{ + uint32_t size = m_cart->common_get_size("rom"); + + m_cart->rom_alloc(size, GENERIC_ROM16_WIDTH, ENDIANNESS_LITTLE); + m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom"); + + return image_init_result::PASS; +} + + +void spg110_sstarkar_game_state::sstarkar(machine_config &config) +{ + spg110_game_state::spg110_base(config); + + m_maincpu->set_addrmap(AS_PROGRAM, &spg110_sstarkar_game_state::mem_map_cart); + + GENERIC_CARTSLOT(config, m_cart, generic_plain_slot, "singingstarkaraoke_cart"); + m_cart->set_width(GENERIC_ROM16_WIDTH); + m_cart->set_device_load(FUNC(spg110_sstarkar_game_state::cart_load)); + m_cart->set_must_be_loaded(true); + + SOFTWARE_LIST(config, "cart_list").set_original("singingstarkaraoke_cart"); +} + + ROM_START( jak_capb ) ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) ROM_LOAD16_WORD_SWAP( "classicarcadepinball.bin", 0x000000, 0x200000, CRC(b643dab0) SHA1(f57d546758ba442e28b5f0f48b3819b2fc2eb7f7) ) @@ -552,10 +621,9 @@ // MCU (I/O?) read protected TODO: add NO_DUMP ROM_END -// TODO: move this to a Softlist once Vol 1 is dumped -ROM_START( karaokd2 ) +ROM_START( sstarkar ) ROM_REGION( 0x800000, "maincpu", ROMREGION_ERASE00 ) - ROM_LOAD16_WORD_SWAP( "karaokidssongs2.bin", 0x000000, 0x200000, CRC(7a1f455c) SHA1(13bb5949629df64f5940923b224d930a4adf23ff) ) + // no internal BIOS ROM_END @@ -575,4 +643,5 @@ // Also sold by SDW Games as both TV Virtual Fighter and TV Kickboxing (unit still has TV Virtual Fighter stickers even when box is TV Kickboxing - possibly just box changed due to Sega?) CONS( 200?, conyfght, 0, 0, spg110_base, conyteni, spg110_game_state, empty_init, "Conny / Big Ben", "TV Virtual Fighter / Free Fight Kung Fu (Conny / Big Ben)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) -CONS( 200?, karaokd2, 0, 0, spg110_base, conyteni, spg110_game_state, empty_init, "Imaginarium / ItsMagical", "Karao Kids Songs 2 (Spain)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // "ItsMagical" brand from Imaginarium +// The unit contains no BIOS ROM, was sold by Taikee as Singing Star Karaoke, but also by Imaginarium / ItsMagical in Spain as Karao Kids. Cartridges are compatible. +CONS( 200?, sstarkar, 0, 0, sstarkar, conyteni, spg110_sstarkar_game_state, empty_init, "Taikee", "Singing Star Karaoke (World) / Karao Kids (Spain)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_IMPERFECT_GRAPHICS ) // "ItsMagical" brand from Imaginarium diff -Nru mame-0.230+dfsg.1/src/mame/drivers/splash.cpp mame-0.231+dfsg.1/src/mame/drivers/splash.cpp --- mame-0.230+dfsg.1/src/mame/drivers/splash.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/splash.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -50,8 +50,8 @@ #include "cpu/z80/z80.h" #include "cpu/m68000/m68000.h" -#include "sound/3812intf.h" #include "sound/ym2203.h" +#include "sound/ym3812.h" #include "screen.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/splash_ms.cpp mame-0.231+dfsg.1/src/mame/drivers/splash_ms.cpp --- mame-0.230+dfsg.1/src/mame/drivers/splash_ms.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/splash_ms.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -14,7 +14,7 @@ #include "speaker.h" #include "tilemap.h" #include "sound/msm5205.h" -#include "sound/3812intf.h" +#include "sound/ym3812.h" #include "machine/gen_latch.h" #include "machine/bankdev.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/spy.cpp mame-0.231+dfsg.1/src/mame/drivers/spy.cpp --- mame-0.230+dfsg.1/src/mame/drivers/spy.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/spy.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -27,7 +27,7 @@ #include "cpu/z80/z80.h" #include "machine/gen_latch.h" #include "machine/watchdog.h" -#include "sound/3812intf.h" +#include "sound/ym3812.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/srumbler.cpp mame-0.231+dfsg.1/src/mame/drivers/srumbler.cpp --- mame-0.230+dfsg.1/src/mame/drivers/srumbler.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/srumbler.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -248,15 +248,14 @@ void srumbler_state::srumbler(machine_config &config) { /* basic machine hardware */ - MC6809(config, m_maincpu, 6000000); /* HD68B09P at 6 MHz (?) */ + MC6809(config, m_maincpu, 16_MHz_XTAL / 2); // HD68B09P m_maincpu->set_addrmap(AS_PROGRAM, &srumbler_state::srumbler_map); TIMER(config, "scantimer").configure_scanline(FUNC(srumbler_state::interrupt), "screen", 0, 1); - z80_device &audiocpu(Z80(config, "audiocpu", 3000000)); /* 3 MHz ??? */ + z80_device &audiocpu(Z80(config, "audiocpu", 16_MHz_XTAL / 4)); audiocpu.set_addrmap(AS_PROGRAM, &srumbler_state::srumbler_sound_map); audiocpu.set_periodic_int(FUNC(srumbler_state::irq0_line_hold), attotime::from_hz(4*60)); - /* video hardware */ BUFFERED_SPRITERAM8(config, m_spriteram); @@ -278,13 +277,13 @@ GENERIC_LATCH_8(config, "soundlatch"); - ym2203_device &ym1(YM2203(config, "ym1", 4000000)); + ym2203_device &ym1(YM2203(config, "ym1", 16_MHz_XTAL / 4)); ym1.add_route(0, "mono", 0.10); ym1.add_route(1, "mono", 0.10); ym1.add_route(2, "mono", 0.10); ym1.add_route(3, "mono", 0.30); - ym2203_device &ym2(YM2203(config, "ym2", 4000000)); + ym2203_device &ym2(YM2203(config, "ym2", 16_MHz_XTAL / 4)); ym2.add_route(0, "mono", 0.10); ym2.add_route(1, "mono", 0.10); ym2.add_route(2, "mono", 0.10); diff -Nru mame-0.230+dfsg.1/src/mame/drivers/stadhero.cpp mame-0.231+dfsg.1/src/mame/drivers/stadhero.cpp --- mame-0.230+dfsg.1/src/mame/drivers/stadhero.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/stadhero.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -94,9 +94,9 @@ #include "cpu/m68000/m68000.h" #include "cpu/m6502/m6502.h" -#include "sound/3812intf.h" #include "sound/okim6295.h" #include "sound/ym2203.h" +#include "sound/ym3812.h" #include "emupal.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/stfight.cpp mame-0.231+dfsg.1/src/mame/drivers/stfight.cpp --- mame-0.230+dfsg.1/src/mame/drivers/stfight.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/stfight.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -240,16 +240,16 @@ 4 bytes from each 32-byte slice. Intervening addresses appear to be conventional RAM. See the memory map for sprite data format. - **************************************************************************** +****************************************************************************** TODO: - handle transparency in text layer properly (how?) - second bank of sf02 is this used? (probably NOT) -- stfight/empcity YM2203s should be clocked at 1.5MHz but this results in - the sound and music being 1/3 of the pitch they should be. The game never - writes the YM2203s' divider registers yet other games (e.g. Lock-On) - suggest the default values are correct. - cshootert however, sounds too high-pitched at 1.5MHz*3. +- empcity/stfight never writes the YM2203s' divider registers but it expects + 0x2f, there's a workaround for it in the driver init +- if empcity turns out to really be a bootleg, maybe it doesn't have an MCU, + and instead does the ADPCM with the audiocpu? (see the driver notes above + mentioning an unused NMI handler) - Each version of empcity/stfight has a different protection code stored in the MCU (at $1D2) so each 68705 will need to be dumped. We currently use hacked versions of the empcityu MCU for each different set. @@ -267,7 +267,6 @@ #include "includes/stfight.h" #include "cpu/z80/z80.h" - #include "sound/ym2203.h" #include "speaker.h" @@ -324,8 +323,8 @@ void stfight_state::cpu2_map(address_map &map) { map(0x0000, 0x7fff).rom(); - map(0xc000, 0xc001).rw("ym1", FUNC(ym2203_device::read), FUNC(ym2203_device::write)); - map(0xc800, 0xc801).rw("ym2", FUNC(ym2203_device::read), FUNC(ym2203_device::write)); + map(0xc000, 0xc001).rw(m_ym[0], FUNC(ym2203_device::read), FUNC(ym2203_device::write)); + map(0xc800, 0xc801).rw(m_ym[1], FUNC(ym2203_device::read), FUNC(ym2203_device::write)); map(0xd000, 0xd000).nopr(); map(0xd800, 0xd800).nopw(); map(0xe800, 0xe800).nopw(); @@ -458,7 +457,6 @@ - void stfight_state::stfight_base(machine_config &config) { /* basic machine hardware */ @@ -483,22 +481,21 @@ /* sound hardware */ SPEAKER(config, "mono").front_center(); - // YM2203_PITCH_HACK - These should be clocked at 1.5Mhz (see TODO list) - ym2203_device &ym1(YM2203(config, "ym1", 12_MHz_XTAL / 8 * 3)); - ym1.add_route(0, "mono", 0.15); - ym1.add_route(1, "mono", 0.15); - ym1.add_route(2, "mono", 0.15); - ym1.add_route(3, "mono", 0.10); - - ym2203_device &ym2(YM2203(config, "ym2", 12_MHz_XTAL / 8 * 3)); - ym2.add_route(0, "mono", 0.15); - ym2.add_route(1, "mono", 0.15); - ym2.add_route(2, "mono", 0.15); - ym2.add_route(3, "mono", 0.10); + YM2203(config, m_ym[0], 12_MHz_XTAL / 8); + m_ym[0]->add_route(0, "mono", 0.15); + m_ym[0]->add_route(1, "mono", 0.15); + m_ym[0]->add_route(2, "mono", 0.15); + m_ym[0]->add_route(3, "mono", 0.10); + + YM2203(config, m_ym[1], 12_MHz_XTAL / 8); + m_ym[1]->add_route(0, "mono", 0.15); + m_ym[1]->add_route(1, "mono", 0.15); + m_ym[1]->add_route(2, "mono", 0.15); + m_ym[1]->add_route(3, "mono", 0.10); MSM5205(config, m_msm, 384_kHz_XTAL); m_msm->vck_callback().set(FUNC(stfight_state::stfight_adpcm_int)); // Interrupt function - m_msm->set_prescaler_selector(msm5205_device::S48_4B); // 8KHz, 4-bit + m_msm->set_prescaler_selector(msm5205_device::S48_4B); // 8KHz, 4-bit m_msm->add_route(ALL_OUTPUTS, "mono", 0.50); } @@ -1131,7 +1128,7 @@ // Note: Marked MACHINE_IMPERFECT_SOUND due to YM2203 clock issue -GAME( 1986, empcity, 0, stfight, stfight, stfight_state, init_empcity, ROT0, "Seibu Kaihatsu", "Empire City: 1931 (bootleg?)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1986, empcity, 0, stfight, stfight, stfight_state, init_stfight, ROT0, "Seibu Kaihatsu", "Empire City: 1931 (bootleg?)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) GAME( 1986, empcityu, empcity, stfight, stfight, stfight_state, init_stfight, ROT0, "Seibu Kaihatsu (Taito / Romstar license)", "Empire City: 1931 (US)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // different title logo GAME( 1986, empcityj, empcity, stfight, stfight, stfight_state, init_stfight, ROT0, "Seibu Kaihatsu (Taito license)", "Empire City: 1931 (Japan)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) GAME( 1986, empcityi, empcity, stfight, stfight, stfight_state, init_stfight, ROT0, "Seibu Kaihatsu (Eurobed license)", "Empire City: 1931 (Italy)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) @@ -1141,4 +1138,4 @@ GAME( 1986, stfightgb, empcity, stfight, stfight, stfight_state, init_stfight, ROT0, "Seibu Kaihatsu (Tuning license)", "Street Fight (Germany - Benelux)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // Cross Shooter uses the same base board, but different video board -GAME( 1987, cshootert, airraid, cshooter, cshooter, stfight_state, init_cshooter, ROT270, "Seibu Kaihatsu (Taito license)", "Cross Shooter (2 PCB Stack)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1987, cshootert, airraid, cshooter, cshooter, stfight_state, empty_init, ROT270, "Seibu Kaihatsu (Taito license)", "Cross Shooter (2 PCB Stack)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/subhuntr.cpp mame-0.231+dfsg.1/src/mame/drivers/subhuntr.cpp --- mame-0.230+dfsg.1/src/mame/drivers/subhuntr.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/subhuntr.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -1,20 +1,30 @@ // license:BSD-3-Clause -// copyright-holders:David Haywood +// copyright-holders:Vas Crabb /* -QTY Type clock position function -2x 2636 Programmable Video Interface -1x 2650 OSC/2 = 1.7897725 MHz 8-bit Microprocessor - main -1x oscillator 3.579545 MHz +QTY Type clock position function +1x 2621 B8 Universal Sync Generator (PAL) +3x 2636 H5,L5,N5 Programmable Video Interface +1x 2650 OSC/2 = 1.7897725 MHz 8-bit Microprocessor - main +1x oscillator 3.579545 MHz ROMs QTY Type position status -4x 2708 6F,6H,6L,6N dumped -1x N82S115 2B dumped +4x 2708 F7,H7,L7,N7 dumped +1x N82S115 B2 dumped RAMs QTY Type position -2x 2101 +4x 2112-2 G8,G9,H8,H9,L8,L9,M8,M9 +2x 2101-1 B4,C4 + +Video uses approximate PAL timings derived from a 3.579MHz crystal +using a 2621 USG (227 clocks per line, 43-clock HBLANK, 312 lines, +43-line VBLANK). This gives a resolution of 184*269, which is used for +the 2636 PVIs. The clock is doubled to 7.15MHz for the text layer, +giving a resolution of 368*269. Screen raw parameters are derived by +considering pixel/line zero to be the first period after the end of the +horizontal/vertical sync pulse. */ @@ -24,80 +34,268 @@ #include "emupal.h" #include "screen.h" #include "speaker.h" +#include "tilemap.h" + +namespace { class subhuntr_state : public driver_device { public: - subhuntr_state(const machine_config &mconfig, device_type type, const char *tag) + subhuntr_state(machine_config const &mconfig, device_type type, char const *tag) : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") + , m_screen(*this, "screen") + , m_pvi1_h5(*this, "pvi1") + , m_pvi2_l5(*this, "pvi2") + , m_pvi3_n5(*this, "pvi3") + , m_gfx(*this, "gfxdecode") + , m_txtram(*this, "txtram") + , m_intreq_cnf(*this, "JMP_1_7") { } void subhuntr(machine_config &config); protected: + enum { TIMER_VIDEO }; + + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; + virtual void machine_start() override; virtual void machine_reset() override; - virtual void video_start() override; private: - INTERRUPT_GEN_MEMBER(subhuntr_interrupt); + void txtram_w(offs_t offset, u8 data); + u8 intack_r(); + + DECLARE_WRITE_LINE_MEMBER(pvi1_intreq_w); + DECLARE_WRITE_LINE_MEMBER(pvi2_intreq_w); + DECLARE_WRITE_LINE_MEMBER(pvi3_intreq_w); + + void palette_init(palette_device &palette) const; + u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, rectangle const &cliprect); + TILE_GET_INFO_MEMBER(tile_info); + TIMER_CALLBACK_MEMBER(video_callback); - void subhuntr_palette(palette_device &palette) const; - uint32_t screen_update_subhuntr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + void set_intreq(unsigned bit, u8 mask); + void clr_intreq(unsigned bit); - void subhuntr_data_map(address_map &map); - void subhuntr_io_map(address_map &map); void subhuntr_map(address_map &map); - required_device m_maincpu; + required_device m_maincpu; + required_device m_screen; + required_device m_pvi1_h5; + required_device m_pvi2_l5; + required_device m_pvi3_n5; + required_device m_gfx; + required_shared_ptr m_txtram; + + required_ioport m_intreq_cnf; + + u8 m_intreqs = 0; + + bitmap_ind16 m_bitmap; + emu_timer *m_video_timer = nullptr; + tilemap_t *m_tilemap = nullptr; }; /*************************************************************************** - Video + Machine implementation ***************************************************************************/ -void subhuntr_state::subhuntr_palette(palette_device &palette) const +void subhuntr_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) +{ + switch (id) + { + case TIMER_VIDEO: + video_callback(ptr, param); + break; + default: + throw emu_fatalerror("Unknown id in subhuntr_state::device_timer"); + } +} + +void subhuntr_state::machine_start() +{ + m_video_timer = timer_alloc(TIMER_VIDEO); + m_tilemap = &machine().tilemap().create(*m_gfx, tilemap_get_info_delegate(*this, FUNC(subhuntr_state::tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 8); + m_tilemap->set_transparent_pen(0); + + save_item(NAME(m_intreqs)); + + m_screen->register_screen_bitmap(m_bitmap); + + m_video_timer->adjust(m_screen->time_until_pos(1, 0)); +} + +void subhuntr_state::machine_reset() { } -uint32_t subhuntr_state::screen_update_subhuntr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) +void subhuntr_state::txtram_w(offs_t offset, u8 data) { + if (m_txtram[offset] != data) + { + m_txtram[offset] = data; + m_tilemap->mark_tile_dirty(offset); + } +} + +u8 subhuntr_state::intack_r() +{ + unsigned const source = count_leading_zeros(m_intreqs) - 24; + u8 const vector = ((m_intreq_cnf->read() & 0x01) ? 0x91 : 0x11) | (source << 1); + switch (source) + { + case 1: + m_pvi1_h5->write_intack(ASSERT_LINE); + m_pvi1_h5->write_intack(CLEAR_LINE); + break; + case 2: + m_pvi2_l5->write_intack(ASSERT_LINE); + m_pvi2_l5->write_intack(CLEAR_LINE); + break; + case 4: + m_pvi3_n5->write_intack(ASSERT_LINE); + m_pvi3_n5->write_intack(CLEAR_LINE); + break; + case 3: + case 5: + case 6: + clr_intreq(7 - source); + break; + } + return vector; +} + +WRITE_LINE_MEMBER(subhuntr_state::pvi1_intreq_w) +{ + if (state) set_intreq(6, 0x02); + else clr_intreq(6); +} + +WRITE_LINE_MEMBER(subhuntr_state::pvi2_intreq_w) +{ + if (state) set_intreq(5, 0x04); + else clr_intreq(5); +} + +WRITE_LINE_MEMBER(subhuntr_state::pvi3_intreq_w) +{ + if (state) set_intreq(3, 0x08); + else clr_intreq(3); +} + +void subhuntr_state::palette_init(palette_device &palette) const +{ + palette.set_pen_color(0, 0x00, 0x00, 0x00); + palette.set_pen_color(1, 0x00, 0xff, 0x00); + palette.set_pen_color(2, 0x00, 0x00, 0x00); + palette.set_pen_color(3, 0x00, 0xff, 0xff); + palette.set_pen_color(4, 0x00, 0x00, 0x00); + palette.set_pen_color(5, 0xff, 0xff, 0x00); + palette.set_pen_color(6, 0x00, 0x00, 0x00); + palette.set_pen_color(7, 0xff, 0xff, 0xff); +} + +u32 subhuntr_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, rectangle const &cliprect) +{ + copybitmap(bitmap, m_bitmap, 0, 0, 0, 0, cliprect); return 0; } -void subhuntr_state::video_start() +TILE_GET_INFO_MEMBER(subhuntr_state::tile_info) { + u8 const tile = m_txtram[tile_index]; + u8 const code = tile & 0x3f; + u8 const colour = (tile >> 6) & 0x03; + tileinfo.set(0, code, colour, 0); } +TIMER_CALLBACK_MEMBER(subhuntr_state::video_callback) +{ + int const y = m_screen->vpos(); -/*************************************************************************** + if (!y) + { + m_pvi1_h5->render_first_line(); + m_pvi2_l5->render_first_line(); + m_pvi3_n5->render_first_line(); + } + else + { + m_pvi1_h5->render_next_line(); + m_pvi2_l5->render_next_line(); + m_pvi3_n5->render_next_line(); + } - Memory Maps, I/O + u16 const *src1 = &m_pvi1_h5->bitmap().pix(y); + u16 const *src2 = &m_pvi2_l5->bitmap().pix(y); + u16 const *src3 = &m_pvi3_n5->bitmap().pix(y); + u16 *dst = &m_bitmap.pix(y); + for (unsigned x = 0; x < m_bitmap.width(); x++, src1++, src2++, src3++, dst++) + { + u16 const pvi_val = S2636_PIXEL_COLOR(*src1 | *src2 | *src3); + *dst = pvi_val; + if (S2636_IS_PIXEL_DRAWN(*src1) && S2636_IS_PIXEL_DRAWN(*src2)) set_intreq(4, 0x10); + if (S2636_IS_PIXEL_DRAWN(*src1) && S2636_IS_PIXEL_DRAWN(*src3)) set_intreq(2, 0x20); + if (S2636_IS_PIXEL_DRAWN(*src2) && S2636_IS_PIXEL_DRAWN(*src3)) set_intreq(1, 0x40); + } -***************************************************************************/ + m_video_timer->adjust(m_screen->time_until_pos(y + 1, 0)); +} -void subhuntr_state::subhuntr_map(address_map &map) +void subhuntr_state::set_intreq(unsigned bit, u8 mask) { - map(0x0000, 0x0fff).rom(); - map(0x1c00, 0x1fff).ram(); + u8 const shifted = ((m_intreq_cnf->read() & mask) ? 1U : 0U) << bit; + if (shifted & ~m_intreqs) + { + if (!m_intreqs) + m_maincpu->set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE); + m_intreqs |= shifted; + } } -void subhuntr_state::subhuntr_io_map(address_map &map) +void subhuntr_state::clr_intreq(unsigned bit) { + u8 const shifted = 1U << bit; + if (shifted & m_intreqs) + { + m_intreqs &= ~shifted; + if (!m_intreqs) + m_maincpu->set_input_line(INPUT_LINE_IRQ0, CLEAR_LINE); + } } -void subhuntr_state::subhuntr_data_map(address_map &map) + +/*************************************************************************** + + Memory Maps, I/O + +***************************************************************************/ + +void subhuntr_state::subhuntr_map(address_map &map) { -// map(S2650_CTRL_PORT, S2650_CTRL_PORT).rw(FUNC(subhuntr_state::), FUNC(subhuntr_state::)); -// map(S2650_DATA_PORT, S2650_DATA_PORT).rw(FUNC(subhuntr_state::), FUNC(subhuntr_state::)); + map.global_mask(0x1fff); + map.unmap_value_high(); + + map(0x0000, 0x0fff).rom(); + map(0x1000, 0x10ff).mirror(0x0100).ram(); // G8/G9 + map(0x1200, 0x12ff).mirror(0x0100).ram(); // H8/H9 + map(0x1400, 0x14ff).mirror(0x0100).ram(); // L8/L9 + map(0x1600, 0x16ff).mirror(0x0100).ram(); // M8/M9 + map(0x1800, 0x18ff).mirror(0x0100).w(FUNC(subhuntr_state::txtram_w)).share(m_txtram); // B4/C4 + map(0x1b00, 0x1bff).rw(m_pvi3_n5, FUNC(s2636_device::read_data), FUNC(s2636_device::write_data)); + map(0x1d00, 0x1dff).rw(m_pvi2_l5, FUNC(s2636_device::read_data), FUNC(s2636_device::write_data)); + // Some kind of I/O at 1e00-1eff (enabled by PVI1 CE2) + map(0x1f00, 0x1fff).rw(m_pvi1_h5, FUNC(s2636_device::read_data), FUNC(s2636_device::write_data)); } + /*************************************************************************** Inputs @@ -105,6 +303,31 @@ ***************************************************************************/ static INPUT_PORTS_START( subhuntr ) + + // Factory jumpers controlling interrupt masking + PORT_START("JMP_1_7") + PORT_CONFNAME(0x01, 0x00, "JMP1") // interrupt vector MSB select (indirect bit) + PORT_CONFSETTING(0x00, DEF_STR(Off)) + PORT_CONFSETTING(0x01, DEF_STR(On)) + PORT_CONFNAME(0x02, 0x02, "JMP2") // PVI1 VBLANK/completion interrupt enable + PORT_CONFSETTING(0x00, DEF_STR(Off)) + PORT_CONFSETTING(0x02, DEF_STR(On)) + PORT_CONFNAME(0x04, 0x04, "JMP3") // PVI2 VBLANK/completion interrupt enable + PORT_CONFSETTING(0x00, DEF_STR(Off)) + PORT_CONFSETTING(0x04, DEF_STR(On)) + PORT_CONFNAME(0x08, 0x08, "JMP4") // PVI3 VBLANK/completion interrupt enable + PORT_CONFSETTING(0x00, DEF_STR(Off)) + PORT_CONFSETTING(0x08, DEF_STR(On)) + PORT_CONFNAME(0x10, 0x10, "JMP5") // PVI1/PVI2 collision interrupt enable + PORT_CONFSETTING(0x00, DEF_STR(Off)) + PORT_CONFSETTING(0x10, DEF_STR(On)) + PORT_CONFNAME(0x20, 0x20, "JMP6") // PVI1/PVI3 collision interrupt enable + PORT_CONFSETTING(0x00, DEF_STR(Off)) + PORT_CONFSETTING(0x20, DEF_STR(On)) + PORT_CONFNAME(0x40, 0x40, "JMP7") // PVI2/PVI3 collision interrupt enable + PORT_CONFSETTING(0x00, DEF_STR(Off)); + PORT_CONFSETTING(0x40, DEF_STR(On)); + INPUT_PORTS_END @@ -114,67 +337,52 @@ ***************************************************************************/ -void subhuntr_state::machine_start() -{ -} - -void subhuntr_state::machine_reset() -{ -} - -INTERRUPT_GEN_MEMBER(subhuntr_state::subhuntr_interrupt) -{ - m_maincpu->set_input_line(0, ASSERT_LINE); -} - static const gfx_layout tiles8x8_layout = { 8,8, RGN_FRAC(1,1), 1, { 0 }, - { 0, 1, 2, 3, 4, 5, 6, 7 }, + { 7, 6, 5, 4, 3, 2, 1, 0 }, { 0*8,1*8,2*8,3*8,4*8,5*8,6*8,7*8 }, 8*8 }; static GFXDECODE_START( gfx_subhuntr ) - GFXDECODE_ENTRY( "gfx1", 0, tiles8x8_layout, 0, 1 ) + GFXDECODE_ENTRY("gfx1", 0, tiles8x8_layout, 0, 4) GFXDECODE_END void subhuntr_state::subhuntr(machine_config &config) { - /* basic machine hardware */ - S2650(config, m_maincpu, 14318180/4/2); + S2650(config, m_maincpu, 3.579545_MHz_XTAL/2); m_maincpu->set_addrmap(AS_PROGRAM, &subhuntr_state::subhuntr_map); - m_maincpu->set_addrmap(AS_IO, &subhuntr_state::subhuntr_io_map); - m_maincpu->set_addrmap(AS_DATA, &subhuntr_state::subhuntr_data_map); - m_maincpu->set_vblank_int("screen", FUNC(subhuntr_state::subhuntr_interrupt)); - m_maincpu->sense_handler().set("screen", FUNC(screen_device::vblank)); - m_maincpu->intack_handler().set([this]() { m_maincpu->set_input_line(0, CLEAR_LINE); return 0x03; }); - - //s2636_device &s2636(S2636(config, "s2636", 0)); - //s2636.set_offsets(3, -21); - //s2636.add_route(ALL_OUTPUTS, "mono", 0.10); - - /* video hardware */ - screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); - screen.set_video_attributes(VIDEO_ALWAYS_UPDATE); - screen.set_refresh_hz(50); - screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); /* not accurate */ - screen.set_size(256, 256); - screen.set_visarea(1*8, 29*8-1, 2*8, 32*8-1); - screen.set_screen_update(FUNC(subhuntr_state::screen_update_subhuntr)); - screen.set_palette("palette"); + m_maincpu->sense_handler().set(m_screen, FUNC(screen_device::vblank)); + m_maincpu->intack_handler().set(FUNC(subhuntr_state::intack_r)); - GFXDECODE(config, "gfxdecode", "palette", gfx_subhuntr); - PALETTE(config, "palette", FUNC(subhuntr_state::subhuntr_palette), 26); + S2636(config, m_pvi1_h5, 3.579545_MHz_XTAL); + m_pvi1_h5->set_divider(2); + m_pvi1_h5->intreq_cb().set(FUNC(subhuntr_state::pvi1_intreq_w)); + + S2636(config, m_pvi2_l5, 3.579545_MHz_XTAL); + m_pvi2_l5->set_divider(2); + m_pvi2_l5->intreq_cb().set(FUNC(subhuntr_state::pvi2_intreq_w)); + + S2636(config, m_pvi3_n5, 3.579545_MHz_XTAL); + m_pvi3_n5->set_divider(2); + m_pvi3_n5->intreq_cb().set(FUNC(subhuntr_state::pvi3_intreq_w)); + + SCREEN(config, m_screen, SCREEN_TYPE_RASTER); + m_screen->set_raw(3.579545_MHz_XTAL*2, 227*2, 21*2, 205*2, 312, 29, 298); + m_screen->set_palette("palette"); + m_screen->set_screen_update(FUNC(subhuntr_state::screen_update)); - /* sound hardware */ - SPEAKER(config, "mono").front_center(); + GFXDECODE(config, m_gfx, "txtpal", gfx_subhuntr); + + PALETTE(config, "palette", palette_device::RGB_3BIT); + PALETTE(config, "txtpal", FUNC(subhuntr_state::palette_init), 8); - /* discrete sound */ + SPEAKER(config, "mono").front_center(); } @@ -183,13 +391,15 @@ ROM_START( subhuntr ) ROM_REGION( 0x1000, "maincpu", 0 ) - ROM_LOAD( "mr21.6f", 0x0000, 0x0400, CRC(27847939) SHA1(e6b41b511fefac1e1e207eff2dac8c2963d47c5c) ) - ROM_LOAD( "mr22.6g", 0x0400, 0x0400, CRC(e9af1ee8) SHA1(451e88407a120444377a58b06b65152c57503533) ) - ROM_LOAD( "mr25.6l", 0x0800, 0x0400, CRC(8271c975) SHA1(c7192658b50d781ab1b94c2e8cb75c5be3539820) ) - ROM_LOAD( "mr24.6n", 0x0c00, 0x0400, CRC(385c4944) SHA1(84050b0356c9a3a36528dba768f2684e28c6c7c4) ) + ROM_LOAD( "mr21.f7", 0x0000, 0x0400, CRC(27847939) SHA1(e6b41b511fefac1e1e207eff2dac8c2963d47c5c) ) + ROM_LOAD( "mr22.g7", 0x0400, 0x0400, CRC(e9af1ee8) SHA1(451e88407a120444377a58b06b65152c57503533) ) + ROM_LOAD( "mr25.l7", 0x0800, 0x0400, CRC(8271c975) SHA1(c7192658b50d781ab1b94c2e8cb75c5be3539820) ) + ROM_LOAD( "mr24.n7", 0x0c00, 0x0400, CRC(385c4944) SHA1(84050b0356c9a3a36528dba768f2684e28c6c7c4) ) ROM_REGION( 0x0200, "gfx1", 0 ) - ROM_LOAD( "82s115.2b", 0x0000, 0x0200, CRC(6946c9de) SHA1(956b4bebe6960a73609deb75e1493c4127fd7f77) ) // ASCII, not much else + ROM_LOAD( "82s115.b2", 0x0000, 0x0200, CRC(6946c9de) SHA1(956b4bebe6960a73609deb75e1493c4127fd7f77) ) ROM_END +} // anonymous namespace + GAME(1979, subhuntr, 0, subhuntr, subhuntr, subhuntr_state, empty_init, ROT0, "Model Racing", "Sub Hunter (Model Racing)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/subsino2.cpp mame-0.231+dfsg.1/src/mame/drivers/subsino2.cpp --- mame-0.230+dfsg.1/src/mame/drivers/subsino2.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/subsino2.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -49,8 +49,8 @@ #include "machine/nvram.h" #include "machine/subsino.h" #include "machine/ticket.h" -#include "sound/3812intf.h" #include "sound/okim6295.h" +#include "sound/ym3812.h" #include "video/ramdac.h" #include "emupal.h" #include "screen.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/subsino.cpp mame-0.231+dfsg.1/src/mame/drivers/subsino.cpp --- mame-0.230+dfsg.1/src/mame/drivers/subsino.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/subsino.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -228,9 +228,9 @@ #include "machine/nvram.h" #include "machine/subsino.h" #include "machine/ticket.h" -#include "sound/3812intf.h" #include "sound/okim6295.h" #include "sound/ym2413.h" +#include "sound/ym3812.h" #include "video/ramdac.h" #include "emupal.h" #include "screen.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/suna16.cpp mame-0.231+dfsg.1/src/mame/drivers/suna16.cpp --- mame-0.230+dfsg.1/src/mame/drivers/suna16.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/suna16.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -29,10 +29,10 @@ #include "cpu/m68000/m68000.h" #include "cpu/z80/z80.h" -#include "sound/3526intf.h" #include "sound/ay8910.h" #include "sound/dac.h" #include "sound/ym2151.h" +#include "sound/ym3526.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/suna8.cpp mame-0.231+dfsg.1/src/mame/drivers/suna8.cpp --- mame-0.230+dfsg.1/src/mame/drivers/suna8.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/suna8.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -40,10 +40,10 @@ #include "cpu/z80/z80.h" #include "machine/watchdog.h" -#include "sound/3812intf.h" #include "sound/ay8910.h" #include "sound/dac.h" #include "sound/ym2203.h" +#include "sound/ym3812.h" #include "speaker.h" @@ -1299,7 +1299,7 @@ map(0xa000, 0xa001).rw("ymsnd", FUNC(ym3812_device::read), FUNC(ym3812_device::write)); map(0xa002, 0xa003).w("aysnd", FUNC(ay8910_device::address_data_w)); map(0xc000, 0xc7ff).ram(); // RAM - map(0xc800, 0xc800).r("ymsnd", FUNC(ym3812_device::status_port_r)); // ? unsure + map(0xc800, 0xc800).r("ymsnd", FUNC(ym3812_device::status_r)); // ? unsure map(0xd000, 0xd000).w(m_soundlatch2, FUNC(generic_latch_8_device::write)); // map(0xd800, 0xd800).r(m_soundlatch, FUNC(generic_latch_8_device::read)); // From Main CPU } diff -Nru mame-0.230+dfsg.1/src/mame/drivers/suprgolf.cpp mame-0.231+dfsg.1/src/mame/drivers/suprgolf.cpp --- mame-0.230+dfsg.1/src/mame/drivers/suprgolf.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/suprgolf.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -13,7 +13,7 @@ trees (zooming?) - not sure if the analog inputs are handled correctly; - Fix the framebuffer display in cocktail mode; - - Albatross: bad graphics, caused by missing rom(s). + - Albatross: controls. Notes: - The game uses special control panel with 1 golf club shaped device to select shot @@ -33,6 +33,8 @@ #include "tilemap.h" +namespace { + class suprgolf_state : public driver_device { public: @@ -49,6 +51,11 @@ void init_suprgolf(); +protected: + virtual void machine_start() override; + virtual void machine_reset() override; + virtual void video_start() override; + private: required_device m_maincpu; required_device m_msm; @@ -92,10 +99,6 @@ TILE_GET_INFO_MEMBER(get_tile_info); - virtual void machine_start() override; - virtual void machine_reset() override; - virtual void video_start() override; - uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void io_map(address_map &map); void suprgolf_map(address_map &map); @@ -135,10 +138,9 @@ uint32_t suprgolf_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - int count; bitmap.fill(m_palette->black_pen(), cliprect); - count = 0; + int count = 0; for(int y=0;y<256;y++) { @@ -657,15 +659,18 @@ ROM_LOAD( "map.4a", 0x0b0000, 0x010000, CRC(cfec1a0f) SHA1(c09ece059cb3c456b66c016c6fab3139d3f61c6a) ) ROM_REGION( 0x100000, "user2", ROMREGION_ERASEFF ) - ROM_LOAD( "cg20.7k",0x000000, 0x10000, BAD_DUMP CRC(1e3fa2fd) SHA1(4771b90e40ebfbae4a98ff7ce6db50f635232597) ) // - empty sockets on PCB :/ (temps from Super Crowns Golf) - ROM_LOAD( "cg21.7j",0x010000, 0x10000, BAD_DUMP CRC(0323a2cd) SHA1(d7d4b35ad451acb2fa3d117bb0ae2f8fbd883f17) ) // / - ROM_LOAD( "2.4c", 0x020000, 0x20000, CRC(08d4363b) SHA1(60c5543c35f44af2f4a8f7ca4bc10633f5fa67fb) ) + ROM_LOAD( "cg30.ic14", 0x000000, 0x10000, BAD_DUMP CRC(6b7ffee9) SHA1(7b7f0f9801ab604ea4280c6d75dfcfdb4123520c) ) // - empty sockets on PCB :/ (temps from Super Crowns Golf World version) + ROM_LOAD( "cg31.ic13", 0x010000, 0x10000, BAD_DUMP CRC(c5ba8e39) SHA1(aff8d5fd532f1e1d90c21bc42a349e3e83c67064) ) // + ROM_LOAD( "2.4c", 0x020000, 0x20000, CRC(08d4363b) SHA1(60c5543c35f44af2f4a8f7ca4bc10633f5fa67fb) ) // matches cg32 + cg33 of the World version ROM_REGION( 0x70000, "gfx1", 0 ) - ROM_LOAD( "chr1.3h", 0x000000, 0x020000, CRC(e62d2bb4) SHA1(f931699114a99b7eb25f8bb841d85de0d6a106a5) ) - ROM_LOAD( "chr2.3g", 0x020000, 0x020000, CRC(808c15e6) SHA1(d7d1ac7456f492dfcc1c1b501f8dde86e405fd7b) ) - ROM_LOAD( "chr3.3e", 0x040000, 0x020000, CRC(9a60193d) SHA1(d22c958b5bd82626fcfc94f7ad16d8cd4bacdda2) ) - ROM_LOAD( "chr4.3d", 0x060000, 0x010000, CRC(0fb88270) SHA1(d85a7f1bc5b3c4b13bbd887cea4c055541cbb737) ) + ROM_LOAD( "chr1.3h", 0x000000, 0x010000, CRC(e62d2bb4) SHA1(f931699114a99b7eb25f8bb841d85de0d6a106a5) ) + ROM_CONTINUE( 0x040000, 0x010000 ) + ROM_LOAD( "chr2.3g", 0x010000, 0x010000, CRC(808c15e6) SHA1(d7d1ac7456f492dfcc1c1b501f8dde86e405fd7b) ) + ROM_CONTINUE( 0x050000, 0x010000 ) + ROM_LOAD( "chr3.3e", 0x020000, 0x010000, CRC(9a60193d) SHA1(d22c958b5bd82626fcfc94f7ad16d8cd4bacdda2) ) + ROM_CONTINUE( 0x060000, 0x010000 ) + ROM_LOAD( "chr4.3d", 0x030000, 0x010000, CRC(0fb88270) SHA1(d85a7f1bc5b3c4b13bbd887cea4c055541cbb737) ) ROM_END @@ -680,6 +685,9 @@ ROM[0x6d72+(0x4000*3)-0x4000] = 0x20; //patch ROM check } +} // Anonymous namespace + + GAME( 1989, suprgolf, 0, suprgolf, suprgolf, suprgolf_state, empty_init, ROT0, "Nasco", "Super Crowns Golf (World)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) GAME( 1989, suprgolfj, suprgolf, suprgolf, suprgolf, suprgolf_state, init_suprgolf, ROT0, "Nasco", "Super Crowns Golf (Japan)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_COCKTAIL | MACHINE_SUPPORTS_SAVE ) GAME( 1989, albatross, suprgolf, suprgolf, suprgolf, suprgolf_state, empty_init, ROT0, "Nasco", "Albatross (US Prototype?)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_GRAPHICS | MACHINE_NO_COCKTAIL| MACHINE_SUPPORTS_SAVE ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/system1.cpp mame-0.231+dfsg.1/src/mame/drivers/system1.cpp --- mame-0.230+dfsg.1/src/mame/drivers/system1.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/system1.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -3919,13 +3919,11 @@ ROM_LOAD( "pr5317.ic37", 0x00000, 0x0100, CRC(648350b8) SHA1(c7986aa9127ef5b50b845434cb4e81dff9861cd2) ) /* N82S129AN */ /* These pld's are located on the main board. */ - ROM_REGION( 0x0618, "plds", 0 ) - ROM_LOAD( "315-5137.bin", 0x00000, 0x0104, CRC(6ffd9e6f) SHA1(a60a3a2ec5bc256b18bfff0fec0172ee2e4fd955) ) /* TI PAL16R4A-2CN Located at IC10 */ - ROM_LOAD( "315-5138.bin", 0x00000, 0x0104, CRC(dd223015) SHA1(8d70f91b118e8653dda1efee3eaea287ae63809f) ) /* TI PAL16R4ACN Located at IC11 */ - ROM_LOAD( "315-5139.bin", 0x00000, 0x0104, NO_DUMP ) /* CK2605 located at IC50 */ - ROM_LOAD( "315-5155.bin", 0x00000, 0x0104, NO_DUMP ) /* Located at IC7 */ - ROM_LOAD( "315-5155.bin", 0x00000, 0x0104, NO_DUMP ) /* Located at IC13 */ - ROM_LOAD( "315-5155.bin", 0x00000, 0x0104, NO_DUMP ) /* Located at IC19 */ + ROM_REGION( 0x1000, "plds", 0 ) + ROM_LOAD( "315-5137.ic10", 0x0000, 0x0104, CRC(6ffd9e6f) SHA1(a60a3a2ec5bc256b18bfff0fec0172ee2e4fd955) ) /* TI PAL16R4A-2CN Located at IC10 */ + ROM_LOAD( "315-5138.ic11", 0x0200, 0x0104, CRC(dd223015) SHA1(8d70f91b118e8653dda1efee3eaea287ae63809f) ) /* TI PAL16R4ACN Located at IC11 */ + ROM_LOAD( "315-5139.ic50", 0x0400, 0x0943, CRC(4b6036a9) SHA1(a0f838d38b0829f20c61a10d1b9027d85555baa3) ) // PLS153 CK2605 located at IC50 */ + // Note that IC7, IC13 and IC19 (315-5155) are not PLDs, but are a custom graphics shifter. ROM_END /* diff -Nru mame-0.230+dfsg.1/src/mame/drivers/taito_x.cpp mame-0.231+dfsg.1/src/mame/drivers/taito_x.cpp --- mame-0.230+dfsg.1/src/mame/drivers/taito_x.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/taito_x.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -921,6 +921,8 @@ MCFG_MACHINE_START_OVERRIDE(taitox_state,taitox) SETA001_SPRITE(config, m_seta001, 16000000, m_palette, gfx_taito_x); + m_seta001->set_fg_yoffsets(-0xa, 0xe); + m_seta001->set_bg_yoffsets(0x1, -0x1); /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); diff -Nru mame-0.230+dfsg.1/src/mame/drivers/taito_z.cpp mame-0.231+dfsg.1/src/mame/drivers/taito_z.cpp --- mame-0.230+dfsg.1/src/mame/drivers/taito_z.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/taito_z.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -1121,8 +1121,6 @@ Some layer offsets are out a little. -Road layer has wrong colors--regression? - Battle Shark ------------ @@ -1279,9 +1277,10 @@ #include "sound/ym2610.h" #include "speaker.h" +#include "chasehq.lh" #include "contcirc.lh" #include "dblaxle.lh" -#include "enforce.lh" +#include "enforceja.lh" void taitoz_state::parse_cpu_control() @@ -1678,7 +1677,7 @@ map(0x000000, 0x03ffff).rom(); map(0x100000, 0x103fff).ram(); map(0x104000, 0x107fff).ram().share("share1"); - map(0x200000, 0x200001).w(FUNC(taitoz_state::cpua_ctrl_w)); // works without? + map(0x200001, 0x200001).w(FUNC(taitoz_state::contcirc_out_w)); map(0x300000, 0x3006ff).ram().share("spriteram"); map(0x400000, 0x401fff).rw(m_tc0150rod, FUNC(tc0150rod_device::word_r), FUNC(tc0150rod_device::word_w)); /* "root ram" ??? */ map(0x500000, 0x500007).rw(m_tc0110pcr, FUNC(tc0110pcr_device::word_r), FUNC(tc0110pcr_device::step1_rbswap_word_w)); /* palette */ @@ -3145,12 +3144,21 @@ /* these are specific to various games: we ought to split the inits */ save_item(NAME(m_sci_int6)); save_item(NAME(m_ioc220_port)); + + // 3d scope on contcirc/enforceja + m_shutter_out.resolve(); + m_shutter_toggle = 0; + m_shutter_control = 0; + + save_item(NAME(m_shutter_toggle)); + save_item(NAME(m_shutter_control)); } MACHINE_START_MEMBER(taitoz_state,chasehq) { - m_lamps.resolve(); machine_start(); + + m_lamps.resolve(); } void taitoz_state::machine_reset() @@ -3193,6 +3201,7 @@ screen_config(config, 24, 248); m_screen->set_screen_update(FUNC(taitoz_state::screen_update_contcirc)); m_screen->set_palette(m_tc0110pcr); + m_screen->screen_vblank().set(FUNC(taitoz_state::scope_vblank)); GFXDECODE(config, m_gfxdecode, m_tc0110pcr, gfx_taitoz); @@ -3319,6 +3328,7 @@ screen_config(config, 24, 248); m_screen->set_screen_update(FUNC(taitoz_state::screen_update_contcirc)); m_screen->set_palette(m_tc0110pcr); + m_screen->screen_vblank().set(FUNC(taitoz_state::scope_vblank)); GFXDECODE(config, m_gfxdecode, m_tc0110pcr, gfx_taitoz); @@ -5540,27 +5550,27 @@ GAMEL(1987, contcirc, 0, contcirc, contcirc, taitoz_state, empty_init, ROT0, "Taito Corporation Japan", "Continental Circus (World)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE, layout_contcirc ) GAMEL(1987, contcircu, contcirc, contcirc, contcrcu, taitoz_state, empty_init, ROT0, "Taito America Corporation", "Continental Circus (US set 1)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE, layout_contcirc ) GAMEL(1987, contcircua, contcirc, contcirc, contcrcj, taitoz_state, empty_init, ROT0, "Taito America Corporation", "Continental Circus (US set 2)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE, layout_contcirc ) -GAMEL(1987, contcircj , contcirc, contcirc, contcrcj, taitoz_state, empty_init, ROT0, "Taito Corporation", "Continental Circus (Japan)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE, layout_contcirc ) +GAMEL(1987, contcircj, contcirc, contcirc, contcrcj, taitoz_state, empty_init, ROT0, "Taito Corporation", "Continental Circus (Japan)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE, layout_contcirc ) -GAMEL(1988, chasehq, 0, chasehq, chasehq, taitoz_state, empty_init, ROT0, "Taito Corporation Japan", "Chase H.Q. (World)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE, layout_contcirc ) -GAMEL(1988, chasehqj, chasehq, chasehq, chasehqj, taitoz_state, empty_init, ROT0, "Taito Corporation", "Chase H.Q. (Japan)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE, layout_contcirc ) -GAMEL(1988, chasehqju, chasehq, chasehq, chasehq, taitoz_state, empty_init, ROT0, "Taito Corporation", "Chase H.Q. (Japan, upright?)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE, layout_contcirc ) // same code rev as Chase H.Q. (World) -GAMEL(1988, chasehqu, chasehq, chasehq, chasehq, taitoz_state, empty_init, ROT0, "Taito America Corporation", "Chase H.Q. (US)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE, layout_contcirc ) +GAMEL(1988, chasehq, 0, chasehq, chasehq, taitoz_state, empty_init, ROT0, "Taito Corporation Japan", "Chase H.Q. (World)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE, layout_chasehq ) +GAMEL(1988, chasehqj, chasehq, chasehq, chasehqj, taitoz_state, empty_init, ROT0, "Taito Corporation", "Chase H.Q. (Japan)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE, layout_chasehq ) +GAMEL(1988, chasehqju, chasehq, chasehq, chasehq, taitoz_state, empty_init, ROT0, "Taito Corporation", "Chase H.Q. (Japan, upright?)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE, layout_chasehq ) // same code rev as Chase H.Q. (World) +GAMEL(1988, chasehqu, chasehq, chasehq, chasehq, taitoz_state, empty_init, ROT0, "Taito America Corporation", "Chase H.Q. (US)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE, layout_chasehq ) GAME( 1988, enforce, 0, enforce, enforce, taitoz_state, empty_init, ROT0, "Taito Corporation Japan", "Enforce (World)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) GAME( 1988, enforcej, enforce, enforce, enforcej, taitoz_state, empty_init, ROT0, "Taito Corporation", "Enforce (Japan)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) -GAMEL( 1988, enforceja, enforce, enforce, enforceja, taitoz_state, empty_init, ROT0, "Taito Corporation", "Enforce (Japan, Analog Controls)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE, layout_enforce ) +GAMEL(1988, enforceja, enforce, enforce, enforceja, taitoz_state, empty_init, ROT0, "Taito Corporation", "Enforce (Japan, Analog Controls)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE, layout_enforceja ) GAME( 1989, bshark, 0, bshark, bshark, taitoz_state, init_bshark, ORIENTATION_FLIP_X, "Taito Corporation Japan", "Battle Shark (World)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) GAME( 1989, bsharku, bshark, bshark, bsharku, taitoz_state, init_bshark, ORIENTATION_FLIP_X, "Taito America Corporation", "Battle Shark (US)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) GAME( 1989, bsharkj, bshark, bshark, bsharkj, taitoz_state, init_bshark, ORIENTATION_FLIP_X, "Taito Corporation", "Battle Shark (Japan)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) GAME( 1989, bsharkjjs, bshark, bsharkjjs, bsharkjjs, taitoz_state, init_bshark, ORIENTATION_FLIP_X, "Taito Corporation", "Battle Shark (Japan, Joystick)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) -GAMEL(1989, sci, 0, sci, sci, taitoz_state, empty_init, ROT0, "Taito Corporation Japan", "Special Criminal Investigation (World set 1)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE, layout_contcirc ) -GAMEL(1989, scia, sci, sci, sci, taitoz_state, empty_init, ROT0, "Taito Corporation Japan", "Special Criminal Investigation (World set 2)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE, layout_contcirc ) -GAMEL(1989, scij, sci, sci, scij, taitoz_state, empty_init, ROT0, "Taito Corporation", "Special Criminal Investigation (Japan)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE, layout_contcirc ) -GAMEL(1989, sciu, sci, sci, sciu, taitoz_state, empty_init, ROT0, "Taito America Corporation", "Special Criminal Investigation (US)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE, layout_contcirc ) -GAMEL(1991, scin, sci, sci, sci, taitoz_state, empty_init, ROT0, "hack (Negro Torino)", "Super Special Criminal Investigation (Negro Torino hack)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE, layout_contcirc ) +GAMEL(1989, sci, 0, sci, sci, taitoz_state, empty_init, ROT0, "Taito Corporation Japan", "Special Criminal Investigation (World set 1)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE, layout_chasehq ) +GAMEL(1989, scia, sci, sci, sci, taitoz_state, empty_init, ROT0, "Taito Corporation Japan", "Special Criminal Investigation (World set 2)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE, layout_chasehq ) +GAMEL(1989, scij, sci, sci, scij, taitoz_state, empty_init, ROT0, "Taito Corporation", "Special Criminal Investigation (Japan)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE, layout_chasehq ) +GAMEL(1989, sciu, sci, sci, sciu, taitoz_state, empty_init, ROT0, "Taito America Corporation", "Special Criminal Investigation (US)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE, layout_chasehq ) +GAMEL(1991, scin, sci, sci, sci, taitoz_state, empty_init, ROT0, "hack (Negro Torino)", "Super Special Criminal Investigation (Negro Torino hack)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE, layout_chasehq ) GAME( 1989, nightstr, 0, nightstr, nightstr, taitoz_state, empty_init, ROT0, "Taito Corporation Japan", "Night Striker (World)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) GAME( 1989, nightstrj, nightstr, nightstr, nghtstrj, taitoz_state, empty_init, ROT0, "Taito Corporation", "Night Striker (Japan)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_SUPPORTS_SAVE ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/tasc.cpp mame-0.231+dfsg.1/src/mame/drivers/tasc.cpp --- mame-0.230+dfsg.1/src/mame/drivers/tasc.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/tasc.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -8,12 +8,19 @@ The King chess engines are also compatible with Tasc's The ChessMachine software on PC, however the prototype Gideon 2.1(internally: Rebel 2.01) is not. +WARNING: Don't configure more than 512KB RAM for R30 The King 2.50, it will still +be playable but will actually use less than 512KB RAM and become weaker. + +The King 2.23 version was not sold to consumers. It has an opening book meant +for chesscomputer competitions. +For more information, see: http://chesseval.com/ChessEvalJournal/R30v223.htm + R30 hardware notes: - ARM6 CPU(P60ARM/CG) @ 30MHz - 256KB system ROM (2*27C010) - 512KB program RAM (4*MT5C1008), 128KB permanent RAM (KM681000ALP-7L) - Toshiba LCD drivers (3*T7778A, T7900, T6963C), TC5565AFL-15 -- SB20 or SB30 "Smartboard" chessboard with piece recognition +- SB20 or SB30 "SmartBoard" chessboard with piece recognition R40 hardware notes: - ARM6 CPU(VY86C061PSTC) @ 40MHz @@ -23,6 +30,14 @@ Documentation for the Toshiba chips is hard to find, but similar chips exist: T7778 is equivalent to T6A39, T7900 is equivalent to T6A40. +EPROMs are interchangable between R30 and R40, with some limitations with +The King 2.50 (see below). + +Regarding RAM: The King 2.2x will work fine with RAM expanded up to 8MB. +The King 2.50 appears to be protected against RAM upgrades though, and will +limit itself to 128KB if it detects a non-default amount of RAM. Gideon doesn't +use RAM above 128KB either, perhaps the R30 prototype only had 128KB RAM. + references: - https://www.schach-computer.info/wiki/index.php?title=Tasc_R30 - https://www.schach-computer.info/wiki/index.php?title=Tasc_R40 @@ -35,20 +50,26 @@ TODO: - bootrom disable timer shouldn't be needed, real ARM has already fetched the next opcode -- sound is too high pitched, same problem as in risc2500 +- more accurate dynamic cpu clock divider (same problem as in saitek_risc2500.cpp), + sound pitch is correct now though +- does the R40 version have the same clock divider value? ******************************************************************************/ #include "emu.h" + #include "cpu/arm/arm.h" #include "machine/bankdev.h" #include "machine/nvram.h" +#include "machine/ram.h" #include "machine/smartboard.h" #include "machine/timer.h" #include "video/t6963c.h" #include "sound/spkrdev.h" + #include "speaker.h" +// internal artwork #include "tascr30.lh" @@ -60,11 +81,11 @@ tasc_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), + m_rom(*this, "maincpu"), + m_ram(*this, "ram"), m_lcd(*this, "lcd"), m_smartboard(*this, "smartboard"), - m_rom(*this, "maincpu"), m_speaker(*this, "speaker"), - m_mainram(*this, "mainram"), m_disable_bootrom(*this, "disable_bootrom"), m_inputs(*this, "IN.%u", 0U), m_out_leds(*this, "pled%u", 0U) @@ -72,18 +93,21 @@ void tasc(machine_config &config); + DECLARE_INPUT_CHANGED_MEMBER(switch_cpu_freq) { set_cpu_freq(); } + protected: virtual void machine_start() override; virtual void machine_reset() override; + virtual void device_post_load() override { install_bootrom(m_bootrom_enabled); } private: // devices/pointers required_device m_maincpu; + required_region_ptr m_rom; + required_device m_ram; required_device m_lcd; required_device m_smartboard; - required_region_ptr m_rom; required_device m_speaker; - required_shared_ptr m_mainram; required_device m_disable_bootrom; required_ioport_array<4> m_inputs; output_finder<2> m_out_leds; @@ -91,27 +115,44 @@ void main_map(address_map &map); void nvram_map(address_map &map); - bool m_bootrom_enabled; - uint32_t m_mux; - TIMER_DEVICE_CALLBACK_MEMBER(disable_bootrom) { m_bootrom_enabled = false; } - // I/O handlers - uint32_t bootrom_r(offs_t offset); - uint32_t p1000_r(); - void p1000_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + u32 input_r(); + u32 rom_r(offs_t offset); + void control_w(offs_t offset, u32 data, u32 mem_mask = ~0); + + void set_cpu_freq(); + void install_bootrom(bool enable); + TIMER_DEVICE_CALLBACK_MEMBER(disable_bootrom) { install_bootrom(false); } + bool m_bootrom_enabled = false; + + u32 m_control = 0; + u32 m_prev_pc = 0; + u64 m_prev_cycle = 0; }; void tasc_state::machine_start() { m_out_leds.resolve(); + save_item(NAME(m_bootrom_enabled)); - save_item(NAME(m_mux)); + save_item(NAME(m_control)); + save_item(NAME(m_prev_pc)); + save_item(NAME(m_prev_cycle)); } void tasc_state::machine_reset() { - m_bootrom_enabled = true; - m_mux = 0; + install_bootrom(true); + set_cpu_freq(); + + m_prev_pc = m_maincpu->pc(); + m_prev_cycle = m_maincpu->total_cycles(); +} + +void tasc_state::set_cpu_freq() +{ + // R30 is 30MHz, R40 is 40MHz + m_maincpu->set_unscaled_clock((ioport("FAKE")->read() & 1) ? 40_MHz_XTAL : 30_MHz_XTAL); } @@ -120,36 +161,53 @@ I/O ******************************************************************************/ -uint32_t tasc_state::bootrom_r(offs_t offset) +void tasc_state::install_bootrom(bool enable) { - return (m_bootrom_enabled) ? m_rom[offset] : m_mainram[offset]; + address_space &program = m_maincpu->space(AS_PROGRAM); + program.unmap_readwrite(0, std::max(m_rom.bytes(), size_t(m_ram->size())) - 1); + + // bootrom bankswitch + if (enable) + program.install_read_handler(0, m_rom.bytes() - 1, read32sm_delegate(*this, FUNC(tasc_state::rom_r))); + else + program.install_ram(0, m_ram->size() - 1, m_ram->pointer()); + + m_bootrom_enabled = enable; } -uint32_t tasc_state::p1000_r() +u32 tasc_state::input_r() { - // disconnect bootrom from the bus after next opcode - if (m_bootrom_enabled && !m_disable_bootrom->enabled() && !machine().side_effects_disabled()) - m_disable_bootrom->adjust(m_maincpu->cycles_to_attotime(5)); + if (!machine().side_effects_disabled()) + { + // disconnect bootrom from the bus after next opcode + if (m_bootrom_enabled && !m_disable_bootrom->enabled()) + m_disable_bootrom->adjust(m_maincpu->cycles_to_attotime(10)); - uint32_t data = m_smartboard->read(); + m_maincpu->set_input_line(ARM_FIRQ_LINE, CLEAR_LINE); + } - for(int i=0; i<4; i++) + // read chessboard + u32 data = m_smartboard->data_r(); + + // read keypad + for (int i = 0; i < 4; i++) { - if (BIT(m_mux, i)) + if (BIT(m_control, i)) data |= (m_inputs[i]->read() << 24); } return data; } -void tasc_state::p1000_w(offs_t offset, uint32_t data, uint32_t mem_mask) +void tasc_state::control_w(offs_t offset, u32 data, u32 mem_mask) { if (ACCESSING_BITS_24_31) { if (BIT(data, 27)) m_lcd->write(BIT(data, 26), data & 0xff); - m_smartboard->write((data >> 24) & 0xff); + m_smartboard->data0_w(BIT(data, 30)); + m_smartboard->data1_w(BIT(data, 31)); } else { @@ -158,7 +216,39 @@ m_speaker->level_w((data >> 2) & 3); } - COMBINE_DATA(&m_mux); + COMBINE_DATA(&m_control); +} + +u32 tasc_state::rom_r(offs_t offset) +{ + if (!machine().side_effects_disabled()) + { + // handle dynamic cpu clock divider when accessing rom + u64 cur_cycle = m_maincpu->total_cycles(); + u64 prev_cycle = m_prev_cycle; + s64 diff = cur_cycle - prev_cycle; + + u32 pc = m_maincpu->pc(); + u32 prev_pc = m_prev_pc; + m_prev_pc = pc; + + if (diff > 0) + { + static constexpr int arm_branch_cycles = 3; + static constexpr int arm_max_cycles = 17; // datablock transfer + static constexpr int divider = -7 + 1; + + // this takes care of almost all cases, otherwise, total cycles taken can't be determined + if (diff <= arm_branch_cycles || (diff <= arm_max_cycles && (pc - prev_pc) == 4 && (pc & ~0x02000000) == (offset * 4))) + m_maincpu->adjust_icount(divider * (int)diff); + else + m_maincpu->adjust_icount(divider); + } + + m_prev_cycle = m_maincpu->total_cycles(); + } + + return m_rom[offset]; } @@ -169,10 +259,8 @@ void tasc_state::main_map(address_map &map) { - map(0x00000000, 0x0007ffff).ram().share("mainram"); - map(0x00000000, 0x0000000b).r(FUNC(tasc_state::bootrom_r)); - map(0x01000000, 0x01000003).rw(FUNC(tasc_state::p1000_r), FUNC(tasc_state::p1000_w)); - map(0x02000000, 0x0203ffff).rom().region("maincpu", 0); + map(0x01000000, 0x01000003).rw(FUNC(tasc_state::input_r), FUNC(tasc_state::control_w)); + map(0x02000000, 0x0203ffff).r(FUNC(tasc_state::rom_r)); map(0x03000000, 0x0307ffff).m("nvram_map", FUNC(address_map_bank_device::amap8)).umask32(0x000000ff); } @@ -190,24 +278,29 @@ static INPUT_PORTS_START( tasc ) PORT_START("IN.0") - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_G) PORT_NAME("PLAY") - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_LEFT) PORT_NAME("LEFT") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_G) PORT_NAME("PLAY") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_LEFT) PORT_NAME("LEFT") PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) PORT_START("IN.1") - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_BACKSPACE) PORT_NAME("BACK") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_B) PORT_CODE(KEYCODE_BACKSPACE) PORT_NAME("BACK") PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_RIGHT) PORT_NAME("RIGHT") PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) PORT_START("IN.2") - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_M) PORT_NAME("MENU") - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_UP) PORT_NAME("UP") - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_L) PORT_NAME("Left Clock") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_M) PORT_NAME("MENU") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_UP) PORT_NAME("UP") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_L) PORT_NAME("Left Clock") PORT_START("IN.3") - PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_ENTER) PORT_NAME("ENTER") - PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_DOWN) PORT_NAME("DOWN") - PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_NAME("Right Clock") + PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_ENTER) PORT_CODE(KEYCODE_ENTER_PAD) PORT_NAME("ENTER") + PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_DOWN) PORT_NAME("DOWN") + PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CODE(KEYCODE_R) PORT_NAME("Right Clock") + + PORT_START("FAKE") + PORT_CONFNAME( 0x01, 0x00, "CPU Frequency" ) PORT_CHANGED_MEMBER(DEVICE_SELF, tasc_state, switch_cpu_freq, 0) + PORT_CONFSETTING( 0x00, "30MHz (R30)" ) + PORT_CONFSETTING( 0x01, "40MHz (R40)" ) INPUT_PORTS_END @@ -222,25 +315,32 @@ ARM(config, m_maincpu, 30_MHz_XTAL); m_maincpu->set_addrmap(AS_PROGRAM, &tasc_state::main_map); m_maincpu->set_copro_type(arm_cpu_device::copro_type::VL86C020); - m_maincpu->set_periodic_int(FUNC(tasc_state::irq1_line_hold), attotime::from_hz(32.768_kHz_XTAL/128)); // 256Hz + + const attotime irq_period = attotime::from_hz(32.768_kHz_XTAL / 128); // 256Hz + m_maincpu->set_periodic_int(FUNC(tasc_state::irq1_line_assert), irq_period); TIMER(config, "disable_bootrom").configure_generic(FUNC(tasc_state::disable_bootrom)); + RAM(config, m_ram).set_extra_options("512K, 1M, 2M, 4M, 8M"); // see driver notes + m_ram->set_default_size("512K"); + m_ram->set_default_value(0); + NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); ADDRESS_MAP_BANK(config, "nvram_map").set_map(&tasc_state::nvram_map).set_options(ENDIANNESS_LITTLE, 8, 17); - LM24014H(config, m_lcd, 0); - m_lcd->set_fs(1); // font size 6x8 - TASC_SB30(config, m_smartboard); subdevice("smartboard:board")->set_nvram_enable(true); + /* video hardware */ + LM24014H(config, m_lcd, 0); + m_lcd->set_fs(1); // font size 6x8 + config.set_default_layout(layout_tascr30); /* sound hardware */ SPEAKER(config, "mono").front_center(); static const double speaker_levels[4] = { 0.0, 1.0, -1.0, 0.0 }; - SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.75); + SPEAKER_SOUND(config, m_speaker).add_route(ALL_OUTPUTS, "mono", 0.25); m_speaker->set_levels(4, speaker_levels); } @@ -283,7 +383,7 @@ ******************************************************************************/ // YEAR NAME PARENT CMP MACHINE INPUT CLASS INIT COMPANY, FULLNAME, FLAGS -CONS( 1995, tascr30, 0, 0, tasc, tasc, tasc_state, empty_init, "Tasc", "ChessSystem R30 (The King 2.50)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_SOUND ) -CONS( 1993, tascr30a, tascr30, 0, tasc, tasc, tasc_state, empty_init, "Tasc", "ChessSystem R30 (The King 2.20)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_SOUND ) -CONS( 1993, tascr30b, tascr30, 0, tasc, tasc, tasc_state, empty_init, "Tasc", "ChessSystem R30 (The King 2.23, unreleased)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_SOUND ) -CONS( 1993, tascr30g, tascr30, 0, tasc, tasc, tasc_state, empty_init, "Tasc", "ChessSystem R30 (Gideon 2.1, prototype)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK | MACHINE_IMPERFECT_SOUND ) // made in 1993, later released in 2012 +CONS( 1995, tascr30, 0, 0, tasc, tasc, tasc_state, empty_init, "Tasc", "ChessSystem R30 (The King 2.50)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1993, tascr30a, tascr30, 0, tasc, tasc, tasc_state, empty_init, "Tasc", "ChessSystem R30 (The King 2.20)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) +CONS( 1993, tascr30b, tascr30, 0, tasc, tasc, tasc_state, empty_init, "Tasc", "ChessSystem R30 (The King 2.23, TM version)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) // competed in several chesscomputer tournaments +CONS( 1993, tascr30g, tascr30, 0, tasc, tasc, tasc_state, empty_init, "Tasc", "ChessSystem R30 (Gideon 2.1, prototype)", MACHINE_SUPPORTS_SAVE | MACHINE_CLICKABLE_ARTWORK ) // made in 1993, later released in 2012 diff -Nru mame-0.230+dfsg.1/src/mame/drivers/tbowl.cpp mame-0.231+dfsg.1/src/mame/drivers/tbowl.cpp --- mame-0.230+dfsg.1/src/mame/drivers/tbowl.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/tbowl.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -18,7 +18,7 @@ #include "includes/tbowl.h" #include "cpu/z80/z80.h" -#include "sound/3812intf.h" +#include "sound/ym3812.h" #include "layout/generic.h" #include "screen.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/tceptor.cpp mame-0.231+dfsg.1/src/mame/drivers/tceptor.cpp --- mame-0.230+dfsg.1/src/mame/drivers/tceptor.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/tceptor.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -343,7 +343,7 @@ GFXDECODE(config, m_gfxdecode, m_palette, gfx_tceptor); PALETTE(config, m_palette, FUNC(tceptor_state::tceptor_palette), 4096, 1024); - NAMCO_C45_ROAD(config, m_c45_road, 0); + NAMCO_C45_ROAD(config, m_c45_road); m_c45_road->set_palette(m_palette); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); diff -Nru mame-0.230+dfsg.1/src/mame/drivers/tecmo.cpp mame-0.231+dfsg.1/src/mame/drivers/tecmo.cpp --- mame-0.230+dfsg.1/src/mame/drivers/tecmo.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/tecmo.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -232,8 +232,8 @@ #include "cpu/z80/z80.h" #include "machine/gen_latch.h" #include "machine/watchdog.h" -#include "sound/3526intf.h" -#include "sound/3812intf.h" +#include "sound/ym3526.h" +#include "sound/ym3812.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/tecmosys.cpp mame-0.231+dfsg.1/src/mame/drivers/tecmosys.cpp --- mame-0.230+dfsg.1/src/mame/drivers/tecmosys.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/tecmosys.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -191,8 +191,8 @@ #include "cpu/m68000/m68000.h" #include "cpu/z80/z80.h" -#include "sound/262intf.h" #include "sound/okim6295.h" +#include "sound/ymf262.h" #include "sound/ymz280b.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/terracre.cpp mame-0.231+dfsg.1/src/mame/drivers/terracre.cpp --- mame-0.230+dfsg.1/src/mame/drivers/terracre.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/terracre.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -85,9 +85,9 @@ #include "cpu/m68000/m68000.h" #include "cpu/z80/z80.h" -#include "sound/3526intf.h" #include "sound/dac.h" #include "sound/ym2203.h" +#include "sound/ym3526.h" #include "screen.h" #include "speaker.h" @@ -513,7 +513,7 @@ amazon_base(config); m_maincpu->set_addrmap(AS_PROGRAM, &amazon_state::amazon_1412m2_map); - NB1412M2(config, m_prot, XTAL(16'000'000)); // divided by 4 maybe + NB1412M2(config, m_prot, XTAL(16'000'000)/4); // divided by 4 maybe } diff -Nru mame-0.230+dfsg.1/src/mame/drivers/thomson.cpp mame-0.231+dfsg.1/src/mame/drivers/thomson.cpp --- mame-0.230+dfsg.1/src/mame/drivers/thomson.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/thomson.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -81,7 +81,11 @@ #include "bus/centronics/ctronics.h" #include "bus/rs232/rs232.h" -#include "imagedev/flopdrv.h" +#include "bus/thomson/cd90_015.h" +#include "bus/thomson/cq90_028.h" +#include "bus/thomson/cd90_351.h" +#include "bus/thomson/cd90_640.h" +#include "bus/thomson/nanoreseau.h" #include "machine/6821pia.h" #include "machine/clock.h" #include "machine/ram.h" @@ -285,7 +289,7 @@ . DD 90-352 3"1/2 floppy drives - alternate QDD floppy drive extension . CQ 90-028 floppy controller, based on a Motorola 6852 SSDA - . QD 90-028 quickdrive 2"8 (QDD), only one drive, signe side + . QD 90-028 quickdrive 2"8 (QDD), only one drive, single side - speech synthesis extension: based on a Philips / Signetics MEA 8000 (cannot be used with the MODEM) - MIDIPAK MIDI extension, uses a EF 6850 ACIA @@ -315,11 +319,9 @@ map(0x4000, 0x5fff).bankr(THOM_VRAM_BANK).w(FUNC(thomson_state::to7_vram_w)); map(0x6000, 0x7fff).bankrw(THOM_BASE_BANK); /* 1 * 8 KB */ map(0x8000, 0xdfff).bankrw(THOM_RAM_BANK); /* 16 or 24 KB (for extension) */ - map(0xe000, 0xe7bf).bankr(THOM_FLOP_BANK); map(0xe7c0, 0xe7c7).rw(m_mc6846, FUNC(mc6846_device::read), FUNC(mc6846_device::write)); map(0xe7c8, 0xe7cb).rw("pia_0", FUNC(pia6821_device::read_alt), FUNC(pia6821_device::write_alt)); map(0xe7cc, 0xe7cf).rw("pia_1", FUNC(pia6821_device::read_alt), FUNC(pia6821_device::write_alt)); - map(0xe7d0, 0xe7df).rw(FUNC(thomson_state::to7_floppy_r), FUNC(thomson_state::to7_floppy_w)); map(0xe7e0, 0xe7e3).rw("to7_io:pia_2", FUNC(pia6821_device::read_alt), FUNC(pia6821_device::write_alt)); map(0xe7e8, 0xe7eb).rw("acia", FUNC(mos6551_device::read), FUNC(mos6551_device::write)); map(0xe7f2, 0xe7f3).rw(FUNC(thomson_state::to7_midi_r), FUNC(thomson_state::to7_midi_w)); @@ -342,57 +344,6 @@ /* ------------ ROMS ------------ */ -/* external floppy controllers */ -#define ROM_FLOPPY \ - /* no controller */ \ - ROM_REGION( 0x800, "floppy_none", 0 ) \ - ROM_FILL( 0, 0x800, 0x39 ) \ - /* CD 90-015 (5"1/4) */ \ - ROM_REGION( 0x800, "floppy_cd90_015", 0 ) \ - ROM_LOAD ( "cd90-015.rom", 0x000, 0x7c0, \ - CRC(821d34c1) \ - SHA1(31a6bb81baaeec5fc8de457c97264f9dfa92c18b) ) \ - /* CD 90-640 (5"1/4) */ \ - ROM_REGION( 0x800, "floppy_cd90_640", 0 ) \ - ROM_LOAD ( "cd90-640.rom", 0x000, 0x7c0, \ - CRC(5114c0a5) \ - SHA1(5c72566c22d8160ef0c75959e1863a1309bbbe49) ) \ - /* CD 90-351 (3"1/2) */ \ - ROM_REGION( 0x2000, "floppy_cd90_351", 0 ) \ - ROM_LOAD ( "cd-351-0.rom", 0x0000, 0x7c0, \ - CRC(2c0159fd) \ - SHA1(bab5395ed8bc7c06f9897897f836054e6546e8e8) ) \ - ROM_LOAD ( "cd-351-1.rom", 0x0800, 0x7c0, \ - CRC(8e58d159) \ - SHA1(dcf992c96e7556b2faee6bacd3f744e56998e6ea) ) \ - ROM_LOAD ( "cd-351-2.rom", 0x1000, 0x7c0, \ - CRC(c9228b60) \ - SHA1(179e10107d5be91e684069dee80f94847b83201f) ) \ - ROM_LOAD ( "cd-351-3.rom", 0x1800, 0x7c0, \ - CRC(3ca8e5dc) \ - SHA1(7118636fb5c597c78c2fce17b02aed5e4ba38635) ) \ - /* CQ 90-028 (2"8, aka QDD) */ \ - ROM_REGION( 0x800, "floppy_cq90_028", 0 ) \ - ROM_LOAD ( "cq90-028.rom", 0x000, 0x7c0, \ - CRC(ca4dba3d) \ - SHA1(949c1f777c892da62c242215d79757d61e71e62b) ) - -/* external floppy / network controller: 9 banks */ -#define ROM_FLOPPY5 \ - ROM_FLOPPY \ - ROM_REGION( 0x800, "floppy_nano", 0 ) \ - ROM_LOAD ( "nano5.rom", 0x000, 0x7c0, \ - CRC(2f756868) \ - SHA1(b5b7cb6d12493d849330b6b5628efd1a83a4bbf5) ) - -#define ROM_FLOPPY7 \ - ROM_FLOPPY \ - ROM_REGION( 0x800, "floppy_nano", 0 ) \ - ROM_LOAD ( "nano7.rom", 0x000, 0x7c0, \ - CRC(42a1d1a6) \ - SHA1(973209f4baa5e81bf7885c0602949e064bac7862) ) - - ROM_START ( to7 ) ROM_REGION ( 0x10000, "maincpu", 0 ) ROM_LOAD ( "to7.rom", 0xe800, 0x1800, @@ -401,8 +352,6 @@ ROM_REGION ( 0x10000, "cartridge", 0 ) ROM_FILL ( 0x00000, 0x10000, 0x39 ) - - ROM_FLOPPY7 ROM_END ROM_START ( t9000 ) @@ -413,8 +362,6 @@ ROM_REGION ( 0x10000, "cartridge", 0 ) ROM_FILL ( 0x00000, 0x10000, 0x39 ) - - ROM_FLOPPY7 ROM_END @@ -453,54 +400,6 @@ INPUT_PORTS_END -static INPUT_PORTS_START ( to7_fconfig ) - PORT_START ( "fconfig" ) - - PORT_CONFNAME ( 0x07, 0x03, "Floppy (reset)" ) - PORT_CONFSETTING ( 0x00, DEF_STR ( None ) ) - PORT_CONFSETTING ( 0x01, "CD 90-015 (5\"1/4 SD)" ) - PORT_CONFSETTING ( 0x02, "CD 90-640 (5\"1/4 DD)" ) - PORT_CONFSETTING ( 0x03, "CD 90-351 (3\"1/2)" ) - PORT_CONFSETTING ( 0x04, "CQ 90-028 (2\"8 QDD)" ) - PORT_CONFSETTING ( 0x05, "Network" ) - - PORT_CONFNAME ( 0xf8, 0x08, "Network ID" ) - PORT_CONFSETTING ( 0x00, "0 (Master)" ) - PORT_CONFSETTING ( 0x08, "1" ) - PORT_CONFSETTING ( 0x10, "2" ) - PORT_CONFSETTING ( 0x18, "3" ) - PORT_CONFSETTING ( 0x20, "4" ) - PORT_CONFSETTING ( 0x28, "5" ) - PORT_CONFSETTING ( 0x30, "6" ) - PORT_CONFSETTING ( 0x38, "7" ) - PORT_CONFSETTING ( 0x40, "8" ) - PORT_CONFSETTING ( 0x48, "9" ) - PORT_CONFSETTING ( 0x50, "10" ) - PORT_CONFSETTING ( 0x58, "11" ) - PORT_CONFSETTING ( 0x60, "12" ) - PORT_CONFSETTING ( 0x68, "13" ) - PORT_CONFSETTING ( 0x70, "14" ) - PORT_CONFSETTING ( 0x78, "15" ) - PORT_CONFSETTING ( 0x80, "16" ) - PORT_CONFSETTING ( 0x88, "17" ) - PORT_CONFSETTING ( 0x90, "18" ) - PORT_CONFSETTING ( 0x98, "19" ) - PORT_CONFSETTING ( 0xa0, "20" ) - PORT_CONFSETTING ( 0xa8, "21" ) - PORT_CONFSETTING ( 0xb0, "22" ) - PORT_CONFSETTING ( 0xb8, "23" ) - PORT_CONFSETTING ( 0xc0, "24" ) - PORT_CONFSETTING ( 0xc8, "25" ) - PORT_CONFSETTING ( 0xd0, "26" ) - PORT_CONFSETTING ( 0xd8, "27" ) - PORT_CONFSETTING ( 0xe0, "28" ) - PORT_CONFSETTING ( 0xe8, "29" ) - PORT_CONFSETTING ( 0xf0, "30" ) - PORT_CONFSETTING ( 0xf8, "31" ) - -INPUT_PORTS_END - - static INPUT_PORTS_START ( to7_keyboard ) PORT_START ( "keyboard.0" ) KEY ( 0, "Shift", LSHIFT ) PORT_CODE ( KEYCODE_RSHIFT ) PORT_CHAR(UCHAR_SHIFT_1) @@ -580,7 +479,6 @@ PORT_INCLUDE ( thom_game_port ) PORT_INCLUDE ( to7_keyboard ) PORT_INCLUDE ( to7_config ) - PORT_INCLUDE ( to7_fconfig ) PORT_INCLUDE ( to7_vconfig ) PORT_INCLUDE ( to7_mconfig ) INPUT_PORTS_END @@ -589,51 +487,9 @@ PORT_INCLUDE ( to7 ) INPUT_PORTS_END -WRITE_LINE_MEMBER( thomson_state::fdc_index_0_w ) -{ - thomson_index_callback(0, state); -} - -WRITE_LINE_MEMBER( thomson_state::fdc_index_1_w ) -{ - thomson_index_callback(1, state); -} - -WRITE_LINE_MEMBER( thomson_state::fdc_index_2_w ) -{ - thomson_index_callback(2, state); -} - -WRITE_LINE_MEMBER( thomson_state::fdc_index_3_w ) -{ - thomson_index_callback(3, state); -} - -static const floppy_interface thomson_floppy_interface = -{ - FLOPPY_STANDARD_5_25_DSHD, - LEGACY_FLOPPY_OPTIONS_NAME(thomson), - "thom_flop" -}; - -void thomson_state::cd90_640_formats(format_registration &fr) -{ - fr.add_mfm_containers(); - fr.add(FLOPPY_CD90_640_FORMAT); -} - -static void cd90_640_floppies(device_slot_interface &device) -{ - device.option_add("sssd", FLOPPY_525_SSSD); - device.option_add("sd", FLOPPY_525_SD); - device.option_add("ssdd", FLOPPY_525_SSDD); - device.option_add("dd", FLOPPY_525_DD); -} - - /* ------------ driver ------------ */ -void thomson_state::to7_base(machine_config &config) +void thomson_state::to7_base(machine_config &config, bool is_mo) { MCFG_MACHINE_START_OVERRIDE( thomson_state, to7 ) MCFG_MACHINE_RESET_OVERRIDE( thomson_state, to7 ) @@ -671,33 +527,16 @@ m_cassette->set_default_state(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED); m_cassette->set_interface("to_cass"); -/* floppy */ - CQ90_028(config, m_to7qdd, 0); - - THMFC1(config, m_thmfc, 16_MHz_XTAL); - m_thmfc->floppy_active_cb().set(FUNC(thomson_state::thom_floppy_active)); - - MC6843(config, m_mc6843, 16_MHz_XTAL / 16 / 2); - m_mc6843->set_floppy_drives(m_floppy_image[0], m_floppy_image[1], m_floppy_image[2], m_floppy_image[3]); - - LEGACY_FLOPPY(config, m_floppy_image[0], 0, &thomson_floppy_interface); - m_floppy_image[0]->out_idx_cb().set(FUNC(thomson_state::fdc_index_0_w)); - LEGACY_FLOPPY(config, m_floppy_image[1], 0, &thomson_floppy_interface); - m_floppy_image[1]->out_idx_cb().set(FUNC(thomson_state::fdc_index_1_w)); - LEGACY_FLOPPY(config, m_floppy_image[2], 0, &thomson_floppy_interface); - m_floppy_image[2]->out_idx_cb().set(FUNC(thomson_state::fdc_index_2_w)); - LEGACY_FLOPPY(config, m_floppy_image[3], 0, &thomson_floppy_interface); - m_floppy_image[3]->out_idx_cb().set(FUNC(thomson_state::fdc_index_3_w)); - - WD2793(config, m_wd2793_fdc, 16_MHz_XTAL / 16); - FLOPPY_CONNECTOR(config, "wd2793:0", cd90_640_floppies, "dd", thomson_state::cd90_640_formats); - FLOPPY_CONNECTOR(config, "wd2793:1", cd90_640_floppies, "dd", thomson_state::cd90_640_formats); - - -/* network */ - MC6854(config, m_mc6854); - m_mc6854->set_out_frame_callback(FUNC(thomson_state::to7_network_got_frame)); - +/* extension port */ + THOMSON_EXTENSION(config, m_extension); + m_extension->option_add("cd90_015", CD90_015); + m_extension->option_add("cq90_028", CQ90_028); + m_extension->option_add("cd90_351", CD90_351); + m_extension->option_add("cd90_640", CD90_640); + if(is_mo) + m_extension->option_add("nanoreseau", NANORESEAU_MO); + else + m_extension->option_add("nanoreseau", NANORESEAU_TO); /* pia */ PIA6821(config, m_pia_sys, 0); @@ -759,7 +598,7 @@ void thomson_state::to7(machine_config &config) { - to7_base(config); + to7_base(config, false); /* timer */ MC6846(config, m_mc6846, 16_MHz_XTAL / 16); @@ -837,11 +676,9 @@ map(0x4000, 0x5fff).bankr(THOM_VRAM_BANK).w(FUNC(thomson_state::to770_vram_w)); map(0x6000, 0x9fff).bankrw(THOM_BASE_BANK); /* 16 KB */ map(0xa000, 0xdfff).bankrw(THOM_RAM_BANK); /* 6 * 16 KB */ - map(0xe000, 0xe7bf).bankr(THOM_FLOP_BANK); map(0xe7c0, 0xe7c7).rw(m_mc6846, FUNC(mc6846_device::read), FUNC(mc6846_device::write)); map(0xe7c8, 0xe7cb).rw("pia_0", FUNC(pia6821_device::read_alt), FUNC(pia6821_device::write_alt)); map(0xe7cc, 0xe7cf).rw("pia_1", FUNC(pia6821_device::read_alt), FUNC(pia6821_device::write_alt)); - map(0xe7d0, 0xe7df).rw(FUNC(thomson_state::to7_floppy_r), FUNC(thomson_state::to7_floppy_w)); map(0xe7e0, 0xe7e3).rw("to7_io:pia_2", FUNC(pia6821_device::read_alt), FUNC(pia6821_device::write_alt)); map(0xe7e4, 0xe7e7).rw(FUNC(thomson_state::to770_gatearray_r), FUNC(thomson_state::to770_gatearray_w)); map(0xe7e8, 0xe7eb).rw("acia", FUNC(mos6551_device::read), FUNC(mos6551_device::write)); @@ -873,8 +710,6 @@ ROM_REGION ( 0x10000, "cartridge", 0 ) ROM_FILL ( 0x00000, 0x10000, 0x39 ) - - ROM_FLOPPY7 ROM_END ROM_START ( to770a ) @@ -885,8 +720,6 @@ ROM_REGION ( 0x10000, "cartridge", 0 ) ROM_FILL ( 0x00000, 0x10000, 0x39 ) - - ROM_FLOPPY7 ROM_END @@ -1034,22 +867,20 @@ **********************************************************************/ -void thomson_state::mo5_map(address_map &map) +void mo5_state::mo5_map(address_map &map) { - map(0x0000, 0x1fff).bankr(THOM_VRAM_BANK).w(FUNC(thomson_state::to770_vram_w)); + map(0x0000, 0x1fff).bankr(THOM_VRAM_BANK).w(FUNC(mo5_state::to770_vram_w)); map(0x2000, 0x9fff).bankrw(THOM_BASE_BANK); - map(0xa000, 0xa7bf).bankr(THOM_FLOP_BANK); map(0xa7c0, 0xa7c3).rw("pia_0", FUNC(pia6821_device::read_alt), FUNC(pia6821_device::write_alt)); - map(0xa7cb, 0xa7cb).w(FUNC(thomson_state::mo5_ext_w)); + map(0xa7cb, 0xa7cb).w(FUNC(mo5_state::mo5_ext_w)); map(0xa7cc, 0xa7cf).rw("pia_1", FUNC(pia6821_device::read_alt), FUNC(pia6821_device::write_alt)); - map(0xa7d0, 0xa7df).rw(FUNC(thomson_state::to7_floppy_r), FUNC(thomson_state::to7_floppy_w)); map(0xa7e0, 0xa7e3).rw("to7_io:pia_2", FUNC(pia6821_device::read_alt), FUNC(pia6821_device::write_alt)); - map(0xa7e4, 0xa7e7).rw(FUNC(thomson_state::mo5_gatearray_r), FUNC(thomson_state::mo5_gatearray_w)); + map(0xa7e4, 0xa7e7).rw(FUNC(mo5_state::mo5_gatearray_r), FUNC(mo5_state::mo5_gatearray_w)); map(0xa7e8, 0xa7eb).rw("acia", FUNC(mos6551_device::read), FUNC(mos6551_device::write)); - map(0xa7f2, 0xa7f3).rw(FUNC(thomson_state::to7_midi_r), FUNC(thomson_state::to7_midi_w)); + map(0xa7f2, 0xa7f3).rw(FUNC(mo5_state::to7_midi_r), FUNC(mo5_state::to7_midi_w)); map(0xa7fe, 0xa7ff).rw(m_mea8000, FUNC(mea8000_device::read), FUNC(mea8000_device::write)); - map(0xb000, 0xefff).bankr(THOM_CART_BANK).w(FUNC(thomson_state::mo5_cartridge_w)); + map(0xb000, 0xefff).bankr(THOM_CART_BANK).w(FUNC(mo5_state::mo5_cartridge_w)); map(0xf000, 0xffff).rom(); /* system bios */ /* 0x10000 - 0x1ffff: 16 KB integrated BASIC / 64 KB external cartridge */ @@ -1078,8 +909,6 @@ ROM_REGION ( 0x10000, "cartridge", 0 ) ROM_FILL( 0x00000, 0x10000, 0x39 ) - - ROM_FLOPPY5 ROM_END ROM_START ( mo5e ) @@ -1093,8 +922,6 @@ ROM_REGION ( 0x10000, "cartridge", 0 ) ROM_FILL( 0x00000, 0x10000, 0x39 ) - - ROM_FLOPPY5 ROM_END @@ -1138,28 +965,28 @@ /* ------------ driver ------------ */ -void thomson_state::mo5(machine_config &config) +void mo5_state::mo5(machine_config &config) { - to7_base(config); - MCFG_MACHINE_START_OVERRIDE( thomson_state, mo5 ) - MCFG_MACHINE_RESET_OVERRIDE( thomson_state, mo5 ) + to7_base(config, true); + MCFG_MACHINE_START_OVERRIDE( mo5_state, mo5 ) + MCFG_MACHINE_RESET_OVERRIDE( mo5_state, mo5 ) - m_maincpu->set_addrmap(AS_PROGRAM, &thomson_state::mo5_map); + m_maincpu->set_addrmap(AS_PROGRAM, &mo5_state::mo5_map); m_cassette->set_formats(mo5_cassette_formats); m_cassette->set_interface("mo_cass"); - subdevice("palette")->set_init(FUNC(thomson_state::mo5_palette)); + subdevice("palette")->set_init(FUNC(mo5_state::mo5_palette)); - m_pia_sys->readpa_handler().set(FUNC(thomson_state::mo5_sys_porta_in)); - m_pia_sys->readpb_handler().set(FUNC(thomson_state::mo5_sys_portb_in)); - m_pia_sys->writepa_handler().set(FUNC(thomson_state::mo5_sys_porta_out)); + m_pia_sys->readpa_handler().set(FUNC(mo5_state::mo5_sys_porta_in)); + m_pia_sys->readpb_handler().set(FUNC(mo5_state::mo5_sys_portb_in)); + m_pia_sys->writepa_handler().set(FUNC(mo5_state::mo5_sys_porta_out)); m_pia_sys->writepb_handler().set("buzzer", FUNC(dac_bit_interface::data_w)); - m_pia_sys->ca2_handler().set(FUNC(thomson_state::mo5_set_cassette_motor)); + m_pia_sys->ca2_handler().set(FUNC(mo5_state::mo5_set_cassette_motor)); m_pia_sys->cb2_handler().set_nop(); m_pia_sys->irqb_handler().set("mainirq", FUNC(input_merger_device::in_w<1>)); // WARNING: differs from TO7 ! - GENERIC_CARTSLOT(config.replace(), "cartslot", generic_plain_slot, "mo_cart", "m5,rom").set_device_load(FUNC(thomson_state::mo5_cartridge)); + GENERIC_CARTSLOT(config.replace(), "cartslot", generic_plain_slot, "mo_cart", "m5,rom").set_device_load(FUNC(mo5_state::mo5_cartridge)); config.device_remove("to7_cart_list"); config.device_remove("to7_cass_list"); @@ -1175,15 +1002,15 @@ m_ram->set_default_size("112K"); } -void thomson_state::mo5e(machine_config &config) +void mo5_state::mo5e(machine_config &config) { mo5(config); } -COMP( 1984, mo5, 0, 0, mo5, mo5, thomson_state, empty_init, "Thomson", "MO5", 0 ) +COMP( 1984, mo5, 0, 0, mo5, mo5, mo5_state, empty_init, "Thomson", "MO5", 0 ) -COMP( 1986, mo5e, mo5, 0, mo5e, mo5e, thomson_state, empty_init, "Thomson", "MO5E", 0 ) +COMP( 1986, mo5e, mo5, 0, mo5e, mo5e, mo5_state, empty_init, "Thomson", "MO5E", 0 ) /********************************* TO9 ******************************* @@ -1258,26 +1085,24 @@ **********************************************************************/ -void thomson_state::to9_map(address_map &map) +void to9_state::to9_map(address_map &map) { - map(0x0000, 0x3fff).bankr(THOM_CART_BANK).w(FUNC(thomson_state::to9_cartridge_w));/* 4 * 16 KB */ - map(0x4000, 0x5fff).bankr(THOM_VRAM_BANK).w(FUNC(thomson_state::to770_vram_w)); + map(0x0000, 0x3fff).bankr(THOM_CART_BANK).w(FUNC(to9_state::to9_cartridge_w));/* 4 * 16 KB */ + map(0x4000, 0x5fff).bankr(THOM_VRAM_BANK).w(FUNC(to9_state::to770_vram_w)); map(0x6000, 0x9fff).bankrw(THOM_BASE_BANK); /* 16 KB */ map(0xa000, 0xdfff).bankrw(THOM_RAM_BANK); /* 10 * 16 KB */ - map(0xe000, 0xe7bf).bankr(THOM_FLOP_BANK); map(0xe7c0, 0xe7c7).rw(m_mc6846, FUNC(mc6846_device::read), FUNC(mc6846_device::write)); map(0xe7c8, 0xe7cb).rw("pia_0", FUNC(pia6821_device::read_alt), FUNC(pia6821_device::write_alt)); map(0xe7cc, 0xe7cf).rw("pia_1", FUNC(pia6821_device::read_alt), FUNC(pia6821_device::write_alt)); - map(0xe7d0, 0xe7d9).rw(FUNC(thomson_state::to9_floppy_r), FUNC(thomson_state::to9_floppy_w)); - map(0xe7da, 0xe7dd).rw(FUNC(thomson_state::to9_vreg_r), FUNC(thomson_state::to9_vreg_w)); - map(0xe7de, 0xe7df).rw(FUNC(thomson_state::to9_kbd_r), FUNC(thomson_state::to9_kbd_w)); - map(0xe7e4, 0xe7e7).rw(FUNC(thomson_state::to9_gatearray_r), FUNC(thomson_state::to9_gatearray_w)); + map(0xe7da, 0xe7dd).rw(FUNC(to9_state::to9_vreg_r), FUNC(to9_state::to9_vreg_w)); + map(0xe7de, 0xe7df).rw(FUNC(to9_state::to9_kbd_r), FUNC(to9_state::to9_kbd_w)); + map(0xe7e4, 0xe7e7).rw(FUNC(to9_state::to9_gatearray_r), FUNC(to9_state::to9_gatearray_w)); map(0xe7e8, 0xe7eb).rw("acia", FUNC(mos6551_device::read), FUNC(mos6551_device::write)); -/* map(0xe7f0, 0xe7f7).rw(FUNC(thomson_state::to9_ieee_r), FUNC(thomson_state::to9_ieee_w )); */ - map(0xe7f2, 0xe7f3).rw(FUNC(thomson_state::to7_midi_r), FUNC(thomson_state::to7_midi_w)); +/* map(0xe7f0, 0xe7f7).rw(FUNC(to9_state::to9_ieee_r), FUNC(to9_state::to9_ieee_w )); */ + map(0xe7f2, 0xe7f3).rw(FUNC(to9_state::to7_midi_r), FUNC(to9_state::to7_midi_w)); map(0xe7f8, 0xe7fb).rw("pia_3", FUNC(pia6821_device::read_alt), FUNC(pia6821_device::write_alt)); - map(0xe7fe, 0xe7ff).rw(FUNC(thomson_state::to7_modem_mea8000_r), FUNC(thomson_state::to7_modem_mea8000_w)); + map(0xe7fe, 0xe7ff).rw(FUNC(to9_state::to7_modem_mea8000_r), FUNC(to9_state::to7_modem_mea8000_w)); map(0xe800, 0xffff).rom(); /* system bios */ /* 0x10000 - 0x1ffff: 64 KB external ROM cartridge */ @@ -1335,8 +1160,6 @@ ROM_REGION ( 0x10000, "cartridge", 0 ) ROM_FILL( 0x00000, 0x10000, 0x39 ) - - ROM_FLOPPY7 ROM_END @@ -1435,92 +1258,44 @@ KEY ( 7, "> <", BACKSLASH2 ) PORT_CHAR('>') PORT_CHAR('<') INPUT_PORTS_END -static INPUT_PORTS_START ( to9_fconfig ) - PORT_START ( "fconfig" ) - - PORT_CONFNAME ( 0x07, 0x00, "External floppy (reset)" ) - PORT_CONFSETTING ( 0x00, "No external" ) - PORT_CONFSETTING ( 0x01, "CD 90-015 (5\"1/4 SD)" ) - PORT_CONFSETTING ( 0x02, "CD 90-640 (5\"1/4 DD)" ) - PORT_CONFSETTING ( 0x03, "CD 90-351 (3\"1/2)" ) - PORT_CONFSETTING ( 0x04, "CQ 90-028 (2\"8 QDD)" ) - PORT_CONFSETTING ( 0x05, "Network" ) - - PORT_CONFNAME ( 0xf8, 0x08, "Network ID" ) - PORT_CONFSETTING ( 0x00, "0 (Master)" ) - PORT_CONFSETTING ( 0x08, "1" ) - PORT_CONFSETTING ( 0x10, "2" ) - PORT_CONFSETTING ( 0x18, "3" ) - PORT_CONFSETTING ( 0x20, "4" ) - PORT_CONFSETTING ( 0x28, "5" ) - PORT_CONFSETTING ( 0x30, "6" ) - PORT_CONFSETTING ( 0x38, "7" ) - PORT_CONFSETTING ( 0x40, "8" ) - PORT_CONFSETTING ( 0x48, "9" ) - PORT_CONFSETTING ( 0x50, "10" ) - PORT_CONFSETTING ( 0x58, "11" ) - PORT_CONFSETTING ( 0x60, "12" ) - PORT_CONFSETTING ( 0x68, "13" ) - PORT_CONFSETTING ( 0x70, "14" ) - PORT_CONFSETTING ( 0x78, "15" ) - PORT_CONFSETTING ( 0x80, "16" ) - PORT_CONFSETTING ( 0x88, "17" ) - PORT_CONFSETTING ( 0x90, "18" ) - PORT_CONFSETTING ( 0x98, "19" ) - PORT_CONFSETTING ( 0xa0, "20" ) - PORT_CONFSETTING ( 0xa8, "21" ) - PORT_CONFSETTING ( 0xb0, "22" ) - PORT_CONFSETTING ( 0xb8, "23" ) - PORT_CONFSETTING ( 0xc0, "24" ) - PORT_CONFSETTING ( 0xc8, "25" ) - PORT_CONFSETTING ( 0xd0, "26" ) - PORT_CONFSETTING ( 0xd8, "27" ) - PORT_CONFSETTING ( 0xe0, "28" ) - PORT_CONFSETTING ( 0xe8, "29" ) - PORT_CONFSETTING ( 0xf0, "30" ) - PORT_CONFSETTING ( 0xf8, "31" ) - -INPUT_PORTS_END - static INPUT_PORTS_START ( to9 ) PORT_INCLUDE ( thom_lightpen ) PORT_INCLUDE ( thom_game_port ) PORT_INCLUDE ( to9_keyboard ) PORT_INCLUDE ( to7_config ) - PORT_INCLUDE ( to9_fconfig ) PORT_INCLUDE ( to7_vconfig ) PORT_INCLUDE ( to7_mconfig ) INPUT_PORTS_END /* ------------ driver ------------ */ -void thomson_state::to9(machine_config &config) +void to9_state::to9(machine_config &config) { to7(config); - MCFG_MACHINE_START_OVERRIDE( thomson_state, to9 ) - MCFG_MACHINE_RESET_OVERRIDE( thomson_state, to9 ) + MCFG_MACHINE_START_OVERRIDE( to9_state, to9 ) + MCFG_MACHINE_RESET_OVERRIDE( to9_state, to9 ) - m_maincpu->set_addrmap(AS_PROGRAM, &thomson_state::to9_map); + m_maincpu->set_addrmap(AS_PROGRAM, &to9_state::to9_map); - m_pia_sys->readpa_handler().set(FUNC(thomson_state::to9_sys_porta_in)); + m_pia_sys->readpa_handler().set(FUNC(to9_state::to9_sys_porta_in)); m_pia_sys->readpb_handler().set_constant(0); - m_pia_sys->writepa_handler().set(FUNC(thomson_state::to9_sys_porta_out)); - m_pia_sys->writepb_handler().set(FUNC(thomson_state::to9_sys_portb_out)); + m_pia_sys->writepa_handler().set(FUNC(to9_state::to9_sys_porta_out)); + m_pia_sys->writepb_handler().set(FUNC(to9_state::to9_sys_portb_out)); m_pia_sys->cb2_handler().set_nop(); m_pia_sys->irqa_handler().set_nop(); - m_mc6846->out_port().set(FUNC(thomson_state::to9_timer_port_out)); + m_mc6846->out_port().set(FUNC(to9_state::to9_timer_port_out)); CENTRONICS(config, m_centronics, centronics_devices, "printer"); - m_centronics->busy_handler().set(FUNC(thomson_state::write_centronics_busy)); + m_centronics->busy_handler().set(FUNC(to9_state::write_centronics_busy)); /* internal ram */ m_ram->set_default_size("192K").set_extra_options("128K"); } -COMP( 1985, to9, 0, 0, to9, to9, thomson_state, empty_init, "Thomson", "TO9", MACHINE_IMPERFECT_COLORS ) +COMP( 1985, to9, 0, 0, to9, to9, to9_state, empty_init, "Thomson", "TO9", MACHINE_IMPERFECT_COLORS ) /******************************** TO8 ******************************** @@ -1586,27 +1361,25 @@ **********************************************************************/ -void thomson_state::to8_map(address_map &map) +void to9_state::to8_map(address_map &map) { - map(0x0000, 0x3fff).bankr(THOM_CART_BANK).w(FUNC(thomson_state::to8_cartridge_w)); /* 4 * 16 KB */ - map(0x4000, 0x5fff).bankr(THOM_VRAM_BANK).w(FUNC(thomson_state::to770_vram_w)); - map(0x6000, 0x7fff).bankr(TO8_SYS_LO).w(FUNC(thomson_state::to8_sys_lo_w)); - map(0x8000, 0x9fff).bankr(TO8_SYS_HI).w(FUNC(thomson_state::to8_sys_hi_w)); - map(0xa000, 0xbfff).bankr(TO8_DATA_LO).w(FUNC(thomson_state::to8_data_lo_w)); - map(0xc000, 0xdfff).bankr(TO8_DATA_HI).w(FUNC(thomson_state::to8_data_hi_w)); - map(0xe000, 0xe7bf).bankr(THOM_FLOP_BANK); /* 2 * 2 KB */ + map(0x0000, 0x3fff).bankr(THOM_CART_BANK).w(FUNC(to9_state::to8_cartridge_w)); /* 4 * 16 KB */ + map(0x4000, 0x5fff).bankr(THOM_VRAM_BANK).w(FUNC(to9_state::to770_vram_w)); + map(0x6000, 0x7fff).bankr(TO8_SYS_LO).w(FUNC(to9_state::to8_sys_lo_w)); + map(0x8000, 0x9fff).bankr(TO8_SYS_HI).w(FUNC(to9_state::to8_sys_hi_w)); + map(0xa000, 0xbfff).bankr(TO8_DATA_LO).w(FUNC(to9_state::to8_data_lo_w)); + map(0xc000, 0xdfff).bankr(TO8_DATA_HI).w(FUNC(to9_state::to8_data_hi_w)); map(0xe7c0, 0xe7c7).rw(m_mc6846, FUNC(mc6846_device::read), FUNC(mc6846_device::write)); map(0xe7c8, 0xe7cb).rw("pia_0", FUNC(pia6821_device::read_alt), FUNC(pia6821_device::write_alt)); map(0xe7cc, 0xe7cf).rw("pia_1", FUNC(pia6821_device::read_alt), FUNC(pia6821_device::write_alt)); - map(0xe7d0, 0xe7d9).rw(FUNC(thomson_state::to8_floppy_r), FUNC(thomson_state::to8_floppy_w)); - map(0xe7da, 0xe7dd).rw(FUNC(thomson_state::to8_vreg_r), FUNC(thomson_state::to8_vreg_w)); - map(0xe7e4, 0xe7e7).rw(FUNC(thomson_state::to8_gatearray_r), FUNC(thomson_state::to8_gatearray_w)); + map(0xe7da, 0xe7dd).rw(FUNC(to9_state::to8_vreg_r), FUNC(to9_state::to8_vreg_w)); + map(0xe7e4, 0xe7e7).rw(FUNC(to9_state::to8_gatearray_r), FUNC(to9_state::to8_gatearray_w)); map(0xe7e8, 0xe7eb).rw("acia", FUNC(mos6551_device::read), FUNC(mos6551_device::write)); -/* map(0xe7f0, 0xe7f7).rw(FUNC(thomson_state::to9_ieee_r), FUNC(thomson_state::to9_ieee_w )); */ - map(0xe7f2, 0xe7f3).rw(FUNC(thomson_state::to7_midi_r), FUNC(thomson_state::to7_midi_w)); +/* map(0xe7f0, 0xe7f7).rw(FUNC(to9_state::to9_ieee_r), FUNC(to9_state::to9_ieee_w )); */ + map(0xe7f2, 0xe7f3).rw(FUNC(to9_state::to7_midi_r), FUNC(to9_state::to7_midi_w)); map(0xe7f8, 0xe7fb).rw("pia_3", FUNC(pia6821_device::read_alt), FUNC(pia6821_device::write_alt)); - map(0xe7fe, 0xe7ff).rw(FUNC(thomson_state::to7_modem_mea8000_r), FUNC(thomson_state::to7_modem_mea8000_w)); + map(0xe7fe, 0xe7ff).rw(FUNC(to9_state::to7_modem_mea8000_r), FUNC(to9_state::to7_modem_mea8000_w)); map(0xe800, 0xffff).bankr(TO8_BIOS_BANK); /* 2 * 6 KB */ /* 0x10000 - 0x1ffff: 64 KB external ROM cartridge */ @@ -1648,8 +1421,6 @@ ROM_REGION ( 0x10000, "cartridge", 0 ) ROM_FILL( 0x00000, 0x10000, 0x39 ) - - ROM_FLOPPY7 ROM_END ROM_START ( to8d ) @@ -1679,8 +1450,6 @@ ROM_REGION ( 0x10000, "cartridge", 0 ) ROM_FILL( 0x00000, 0x10000, 0x39 ) - - ROM_FLOPPY7 ROM_END @@ -1705,7 +1474,6 @@ PORT_INCLUDE ( thom_game_port ) PORT_INCLUDE ( to9_keyboard ) PORT_INCLUDE ( to8_config ) - PORT_INCLUDE ( to9_fconfig ) PORT_INCLUDE ( to7_vconfig ) PORT_INCLUDE ( to7_mconfig ) INPUT_PORTS_END @@ -1717,29 +1485,29 @@ /* ------------ driver ------------ */ -void thomson_state::to8(machine_config &config) +void to9_state::to8(machine_config &config) { to7(config); - MCFG_MACHINE_START_OVERRIDE( thomson_state, to8 ) - MCFG_MACHINE_RESET_OVERRIDE( thomson_state, to8 ) + MCFG_MACHINE_START_OVERRIDE( to9_state, to8 ) + MCFG_MACHINE_RESET_OVERRIDE( to9_state, to8 ) - m_maincpu->set_addrmap(AS_PROGRAM, &thomson_state::to8_map); + m_maincpu->set_addrmap(AS_PROGRAM, &to9_state::to8_map); //MC6804(config, "kbdmcu", 11_MHz_XTAL); - m_pia_sys->readpa_handler().set(FUNC(thomson_state::to8_sys_porta_in)); + m_pia_sys->readpa_handler().set(FUNC(to9_state::to8_sys_porta_in)); m_pia_sys->readpb_handler().set_constant(0); - m_pia_sys->writepa_handler().set(FUNC(thomson_state::to9_sys_porta_out)); - m_pia_sys->writepb_handler().set(FUNC(thomson_state::to8_sys_portb_out)); + m_pia_sys->writepa_handler().set(FUNC(to9_state::to9_sys_porta_out)); + m_pia_sys->writepb_handler().set(FUNC(to9_state::to8_sys_portb_out)); m_pia_sys->cb2_handler().set_nop(); m_pia_sys->irqa_handler().set_nop(); CENTRONICS(config, m_centronics, centronics_devices, "printer"); - m_centronics->busy_handler().set(FUNC(thomson_state::write_centronics_busy)); + m_centronics->busy_handler().set(FUNC(to9_state::write_centronics_busy)); - m_mc6846->out_port().set(FUNC(thomson_state::to8_timer_port_out)); - m_mc6846->in_port().set(FUNC(thomson_state::to8_timer_port_in)); - m_mc6846->cp2().set(FUNC(thomson_state::to8_timer_cp2_out)); + m_mc6846->out_port().set(FUNC(to9_state::to8_timer_port_out)); + m_mc6846->in_port().set(FUNC(to9_state::to8_timer_port_in)); + m_mc6846->cp2().set(FUNC(to9_state::to8_timer_cp2_out)); /* internal ram */ m_ram->set_default_size("512K").set_extra_options("256K"); @@ -1750,15 +1518,15 @@ SOFTWARE_LIST(config.replace(), "to7_qd_list").set_compatible("to7_qd"); } -void thomson_state::to8d(machine_config &config) +void to9_state::to8d(machine_config &config) { to8(config); } -COMP( 1986, to8, 0, 0, to8, to8, thomson_state, empty_init, "Thomson", "TO8", 0 ) +COMP( 1986, to8, 0, 0, to8, to8, to9_state, empty_init, "Thomson", "TO8", 0 ) -COMP( 1987, to8d, to8, 0, to8d, to8d, thomson_state, empty_init, "Thomson", "TO8D", 0 ) +COMP( 1987, to8d, to8, 0, to8d, to8d, to9_state, empty_init, "Thomson", "TO8D", 0 ) /******************************** TO9+ ******************************* @@ -1798,28 +1566,26 @@ **********************************************************************/ -void thomson_state::to9p_map(address_map &map) +void to9_state::to9p_map(address_map &map) { - map(0x0000, 0x3fff).bankr(THOM_CART_BANK).w(FUNC(thomson_state::to8_cartridge_w)); /* 4 * 16 KB */ - map(0x4000, 0x5fff).bankr(THOM_VRAM_BANK).w(FUNC(thomson_state::to770_vram_w)); - map(0x6000, 0x7fff).bankr(TO8_SYS_LO).w(FUNC(thomson_state::to8_sys_lo_w)); - map(0x8000, 0x9fff).bankr(TO8_SYS_HI).w(FUNC(thomson_state::to8_sys_hi_w)); - map(0xa000, 0xbfff).bankr(TO8_DATA_LO).w(FUNC(thomson_state::to8_data_lo_w)); - map(0xc000, 0xdfff).bankr(TO8_DATA_HI).w(FUNC(thomson_state::to8_data_hi_w)); - map(0xe000, 0xe7bf).bankr(THOM_FLOP_BANK); /* 2 * 2 KB */ + map(0x0000, 0x3fff).bankr(THOM_CART_BANK).w(FUNC(to9_state::to8_cartridge_w)); /* 4 * 16 KB */ + map(0x4000, 0x5fff).bankr(THOM_VRAM_BANK).w(FUNC(to9_state::to770_vram_w)); + map(0x6000, 0x7fff).bankr(TO8_SYS_LO).w(FUNC(to9_state::to8_sys_lo_w)); + map(0x8000, 0x9fff).bankr(TO8_SYS_HI).w(FUNC(to9_state::to8_sys_hi_w)); + map(0xa000, 0xbfff).bankr(TO8_DATA_LO).w(FUNC(to9_state::to8_data_lo_w)); + map(0xc000, 0xdfff).bankr(TO8_DATA_HI).w(FUNC(to9_state::to8_data_hi_w)); map(0xe7c0, 0xe7c7).rw(m_mc6846, FUNC(mc6846_device::read), FUNC(mc6846_device::write)); map(0xe7c8, 0xe7cb).rw("pia_0", FUNC(pia6821_device::read_alt), FUNC(pia6821_device::write_alt)); map(0xe7cc, 0xe7cf).rw("pia_1", FUNC(pia6821_device::read_alt), FUNC(pia6821_device::write_alt)); - map(0xe7d0, 0xe7d9).rw(FUNC(thomson_state::to8_floppy_r), FUNC(thomson_state::to8_floppy_w)); - map(0xe7da, 0xe7dd).rw(FUNC(thomson_state::to8_vreg_r), FUNC(thomson_state::to8_vreg_w)); - map(0xe7de, 0xe7df).rw(FUNC(thomson_state::to9_kbd_r), FUNC(thomson_state::to9_kbd_w)); - map(0xe7e4, 0xe7e7).rw(FUNC(thomson_state::to8_gatearray_r), FUNC(thomson_state::to8_gatearray_w)); + map(0xe7da, 0xe7dd).rw(FUNC(to9_state::to8_vreg_r), FUNC(to9_state::to8_vreg_w)); + map(0xe7de, 0xe7df).rw(FUNC(to9_state::to9_kbd_r), FUNC(to9_state::to9_kbd_w)); + map(0xe7e4, 0xe7e7).rw(FUNC(to9_state::to8_gatearray_r), FUNC(to9_state::to8_gatearray_w)); map(0xe7e8, 0xe7eb).rw("acia", FUNC(mos6551_device::read), FUNC(mos6551_device::write)); -/* map(0xe7f0, 0xe7f7).rw(FUNC(thomson_state::to9_ieee_r), FUNC(thomson_state::to9_ieee_w )); */ - map(0xe7f2, 0xe7f3).rw(FUNC(thomson_state::to7_midi_r), FUNC(thomson_state::to7_midi_w)); +/* map(0xe7f0, 0xe7f7).rw(FUNC(to9_state::to9_ieee_r), FUNC(to9_state::to9_ieee_w )); */ + map(0xe7f2, 0xe7f3).rw(FUNC(to9_state::to7_midi_r), FUNC(to9_state::to7_midi_w)); map(0xe7f8, 0xe7fb).rw("pia_3", FUNC(pia6821_device::read_alt), FUNC(pia6821_device::write_alt)); - map(0xe7fe, 0xe7ff).rw(FUNC(thomson_state::to7_modem_mea8000_r), FUNC(thomson_state::to7_modem_mea8000_w)); + map(0xe7fe, 0xe7ff).rw(FUNC(to9_state::to7_modem_mea8000_r), FUNC(to9_state::to7_modem_mea8000_w)); map(0xe800, 0xffff).bankr(TO8_BIOS_BANK); /* 2 * 6 KB */ /* 0x10000 - 0x1ffff: 64 KB external ROM cartridge */ @@ -1861,8 +1627,6 @@ ROM_REGION ( 0x10000, "cartridge", 0 ) ROM_FILL( 0x00000, 0x10000, 0x39 ) - - ROM_FLOPPY7 ROM_END @@ -1873,35 +1637,34 @@ PORT_INCLUDE ( thom_game_port ) PORT_INCLUDE ( to9_keyboard ) PORT_INCLUDE ( to7_config ) - PORT_INCLUDE ( to9_fconfig ) PORT_INCLUDE ( to7_vconfig ) PORT_INCLUDE ( to7_mconfig ) INPUT_PORTS_END /* ------------ driver ------------ */ -void thomson_state::to9p(machine_config &config) +void to9_state::to9p(machine_config &config) { to7(config); - MCFG_MACHINE_START_OVERRIDE( thomson_state, to9p ) - MCFG_MACHINE_RESET_OVERRIDE( thomson_state, to9p ) + MCFG_MACHINE_START_OVERRIDE( to9_state, to9p ) + MCFG_MACHINE_RESET_OVERRIDE( to9_state, to9p ) - m_maincpu->set_addrmap(AS_PROGRAM, &thomson_state::to9p_map); + m_maincpu->set_addrmap(AS_PROGRAM, &to9_state::to9p_map); - m_pia_sys->readpa_handler().set(FUNC(thomson_state::to8_sys_porta_in)); + m_pia_sys->readpa_handler().set(FUNC(to9_state::to8_sys_porta_in)); m_pia_sys->readpb_handler().set_constant(0); - m_pia_sys->writepa_handler().set(FUNC(thomson_state::to9_sys_porta_out)); - m_pia_sys->writepb_handler().set(FUNC(thomson_state::to8_sys_portb_out)); + m_pia_sys->writepa_handler().set(FUNC(to9_state::to9_sys_porta_out)); + m_pia_sys->writepb_handler().set(FUNC(to9_state::to8_sys_portb_out)); m_pia_sys->cb2_handler().set_nop(); m_pia_sys->irqa_handler().set_nop(); m_pia_sys->irqb_handler().set("mainfirq", FUNC(input_merger_device::in_w<1>)); CENTRONICS(config, m_centronics, centronics_devices, "printer"); - m_centronics->busy_handler().set(FUNC(thomson_state::write_centronics_busy)); + m_centronics->busy_handler().set(FUNC(to9_state::write_centronics_busy)); - m_mc6846->out_port().set(FUNC(thomson_state::to9p_timer_port_out)); - m_mc6846->in_port().set(FUNC(thomson_state::to9p_timer_port_in)); - m_mc6846->cp2().set(FUNC(thomson_state::to8_timer_cp2_out)); + m_mc6846->out_port().set(FUNC(to9_state::to9p_timer_port_out)); + m_mc6846->in_port().set(FUNC(to9_state::to9p_timer_port_in)); + m_mc6846->cp2().set(FUNC(to9_state::to8_timer_cp2_out)); /* internal ram */ m_ram->set_default_size("512K"); @@ -1912,7 +1675,7 @@ SOFTWARE_LIST(config.replace(), "to7_qd_list").set_compatible("to7_qd"); } -COMP( 1986, to9p, 0, 0, to9p, to9p, thomson_state, empty_init, "Thomson", "TO9+", 0 ) +COMP( 1986, to9p, 0, 0, to9p, to9p, to9_state, empty_init, "Thomson", "TO9+", 0 ) @@ -1974,27 +1737,25 @@ **********************************************************************/ -void thomson_state::mo6_map(address_map &map) +void mo6_state::mo6_map(address_map &map) { - map(0x0000, 0x1fff).bankr(THOM_VRAM_BANK).w(FUNC(thomson_state::to770_vram_w)); - map(0x2000, 0x3fff).bankr(TO8_SYS_LO).w(FUNC(thomson_state::to8_sys_lo_w)); - map(0x4000, 0x5fff).bankr(TO8_SYS_HI).w(FUNC(thomson_state::to8_sys_hi_w)); - map(0x6000, 0x7fff).bankr(TO8_DATA_LO).w(FUNC(thomson_state::to8_data_lo_w)); - map(0x8000, 0x9fff).bankr(TO8_DATA_HI).w(FUNC(thomson_state::to8_data_hi_w)); - map(0xa000, 0xa7bf).bankr(THOM_FLOP_BANK); + map(0x0000, 0x1fff).bankr(THOM_VRAM_BANK).w(FUNC(mo6_state::to770_vram_w)); + map(0x2000, 0x3fff).bankr(TO8_SYS_LO).w(FUNC(mo6_state::to8_sys_lo_w)); + map(0x4000, 0x5fff).bankr(TO8_SYS_HI).w(FUNC(mo6_state::to8_sys_hi_w)); + map(0x6000, 0x7fff).bankr(TO8_DATA_LO).w(FUNC(mo6_state::to8_data_lo_w)); + map(0x8000, 0x9fff).bankr(TO8_DATA_HI).w(FUNC(mo6_state::to8_data_hi_w)); map(0xa7c0, 0xa7c3).rw("pia_0", FUNC(pia6821_device::read_alt), FUNC(pia6821_device::write_alt)); - map(0xa7cb, 0xa7cb).w(FUNC(thomson_state::mo6_ext_w)); + map(0xa7cb, 0xa7cb).w(FUNC(mo6_state::mo6_ext_w)); map(0xa7cc, 0xa7cf).rw("pia_1", FUNC(pia6821_device::read_alt), FUNC(pia6821_device::write_alt)); - map(0xa7d0, 0xa7d9).rw(FUNC(thomson_state::to7_floppy_r), FUNC(thomson_state::to7_floppy_w)); - map(0xa7da, 0xa7dd).rw(FUNC(thomson_state::mo6_vreg_r), FUNC(thomson_state::mo6_vreg_w)); - map(0xa7e4, 0xa7e7).rw(FUNC(thomson_state::mo6_gatearray_r), FUNC(thomson_state::mo6_gatearray_w)); + map(0xa7da, 0xa7dd).rw(FUNC(mo6_state::mo6_vreg_r), FUNC(mo6_state::mo6_vreg_w)); + map(0xa7e4, 0xa7e7).rw(FUNC(mo6_state::mo6_gatearray_r), FUNC(mo6_state::mo6_gatearray_w)); map(0xa7e8, 0xa7eb).rw("acia", FUNC(mos6551_device::read), FUNC(mos6551_device::write)); -/* map(0xa7f0, 0xa7f7).rw(FUNC(thomson_state::to9_ieee_r), FUNC(homson_state::to9_ieee_w));*/ - map(0xa7f2, 0xa7f3).rw(FUNC(thomson_state::to7_midi_r), FUNC(thomson_state::to7_midi_w)); +/* map(0xa7f0, 0xa7f7).rw(FUNC(mo6_state::to9_ieee_r), FUNC(homson_state::to9_ieee_w));*/ + map(0xa7f2, 0xa7f3).rw(FUNC(mo6_state::to7_midi_r), FUNC(mo6_state::to7_midi_w)); map(0xa7fe, 0xa7ff).rw(m_mea8000, FUNC(mea8000_device::read), FUNC(mea8000_device::write)); - map(0xb000, 0xbfff).bankr(MO6_CART_LO).w(FUNC(thomson_state::mo6_cartridge_w)); - map(0xc000, 0xefff).bankr(MO6_CART_HI).w(FUNC(thomson_state::mo6_cartridge_w)); + map(0xb000, 0xbfff).bankr(MO6_CART_LO).w(FUNC(mo6_state::mo6_cartridge_w)); + map(0xc000, 0xefff).bankr(MO6_CART_HI).w(FUNC(mo6_state::mo6_cartridge_w)); map(0xf000, 0xffff).bankr(TO8_BIOS_BANK); /* 0x10000 - 0x1ffff: 64 KB external ROM cartridge */ @@ -2035,8 +1796,6 @@ ROM_REGION ( 0x10000, "cartridge", 0 ) ROM_FILL ( 0x00000, 0x10000, 0x39 ) - - ROM_FLOPPY5 ROM_END ROM_START ( pro128 ) @@ -2066,8 +1825,6 @@ ROM_REGION ( 0x10000, "cartridge", 0 ) ROM_FILL ( 0x00000, 0x10000, 0x39 ) - - ROM_FLOPPY5 ROM_END @@ -2211,7 +1968,6 @@ PORT_INCLUDE ( thom_game_port ) PORT_INCLUDE ( mo6_keyboard ) PORT_INCLUDE ( to7_config ) - PORT_INCLUDE ( to7_fconfig ) PORT_INCLUDE ( to7_vconfig ) INPUT_PORTS_END @@ -2220,42 +1976,41 @@ PORT_INCLUDE ( thom_game_port ) PORT_INCLUDE ( pro128_keyboard ) PORT_INCLUDE ( to7_config ) - PORT_INCLUDE ( to7_fconfig ) PORT_INCLUDE ( to7_vconfig ) INPUT_PORTS_END /* ------------ driver ------------ */ -void thomson_state::mo6(machine_config &config) +void mo6_state::mo6(machine_config &config) { - to7_base(config); - MCFG_MACHINE_START_OVERRIDE( thomson_state, mo6 ) - MCFG_MACHINE_RESET_OVERRIDE( thomson_state, mo6 ) + to7_base(config, true); + MCFG_MACHINE_START_OVERRIDE( mo6_state, mo6 ) + MCFG_MACHINE_RESET_OVERRIDE( mo6_state, mo6 ) - m_maincpu->set_addrmap(AS_PROGRAM, &thomson_state::mo6_map); + m_maincpu->set_addrmap(AS_PROGRAM, &mo6_state::mo6_map); m_cassette->set_formats(mo5_cassette_formats); m_cassette->set_interface("mo_cass"); - m_pia_sys->readpa_handler().set(FUNC(thomson_state::mo6_sys_porta_in)); - m_pia_sys->readpb_handler().set(FUNC(thomson_state::mo6_sys_portb_in)); - m_pia_sys->writepa_handler().set(FUNC(thomson_state::mo6_sys_porta_out)); + m_pia_sys->readpa_handler().set(FUNC(mo6_state::mo6_sys_porta_in)); + m_pia_sys->readpb_handler().set(FUNC(mo6_state::mo6_sys_portb_in)); + m_pia_sys->writepa_handler().set(FUNC(mo6_state::mo6_sys_porta_out)); m_pia_sys->writepb_handler().set("buzzer", FUNC(dac_bit_interface::data_w)); - m_pia_sys->ca2_handler().set(FUNC(thomson_state::mo5_set_cassette_motor)); - m_pia_sys->cb2_handler().set(FUNC(thomson_state::mo6_sys_cb2_out)); + m_pia_sys->ca2_handler().set(FUNC(mo6_state::mo5_set_cassette_motor)); + m_pia_sys->cb2_handler().set(FUNC(mo6_state::mo6_sys_cb2_out)); m_pia_sys->irqb_handler().set("mainirq", FUNC(input_merger_device::in_w<1>)); // differs from TO - m_pia_game->writepa_handler().set(FUNC(thomson_state::mo6_game_porta_out)); - m_pia_game->cb2_handler().set(FUNC(thomson_state::mo6_game_cb2_out)); + m_pia_game->writepa_handler().set(FUNC(mo6_state::mo6_game_porta_out)); + m_pia_game->cb2_handler().set(FUNC(mo6_state::mo6_game_cb2_out)); CENTRONICS(config, m_centronics, centronics_devices, "printer"); - m_centronics->busy_handler().set(FUNC(thomson_state::write_centronics_busy)); + m_centronics->busy_handler().set(FUNC(mo6_state::write_centronics_busy)); OUTPUT_LATCH(config, m_cent_data_out); m_centronics->set_output_latch(*m_cent_data_out); - GENERIC_CARTSLOT(config.replace(), "cartslot", generic_plain_slot, "mo_cart", "m5,rom").set_device_load(FUNC(thomson_state::mo5_cartridge)); + GENERIC_CARTSLOT(config.replace(), "cartslot", generic_plain_slot, "mo_cart", "m5,rom").set_device_load(FUNC(mo6_state::mo5_cartridge)); /* internal ram */ m_ram->set_default_size("128K"); @@ -2274,7 +2029,7 @@ SOFTWARE_LIST(config, "mo5_qd_list").set_compatible("mo5_qd"); } -void thomson_state::pro128(machine_config &config) +void mo6_state::pro128(machine_config &config) { mo6(config); config.device_remove("mo6_cass_list"); @@ -2290,9 +2045,9 @@ SOFTWARE_LIST(config, "p128_flop_list").set_original("pro128_flop"); } -COMP( 1986, mo6, 0, 0, mo6, mo6, thomson_state, empty_init, "Thomson", "MO6", 0 ) +COMP( 1986, mo6, 0, 0, mo6, mo6, mo6_state, empty_init, "Thomson", "MO6", 0 ) -COMP( 1986, pro128, mo6, 0, pro128, pro128, thomson_state, empty_init, "Olivetti / Thomson", "Prodest PC 128", 0 ) +COMP( 1986, pro128, mo6, 0, pro128, pro128, mo6_state, empty_init, "Olivetti / Thomson", "Prodest PC 128", 0 ) @@ -2325,31 +2080,31 @@ **********************************************************************/ -void thomson_state::mo5nr_map(address_map &map) +void mo5nr_state::mo5nr_map(address_map &map) { - map(0x0000, 0x1fff).bankr(THOM_VRAM_BANK).w(FUNC(thomson_state::to770_vram_w)); - map(0x2000, 0x3fff).bankr(TO8_SYS_LO).w(FUNC(thomson_state::to8_sys_lo_w)); - map(0x4000, 0x5fff).bankr(TO8_SYS_HI).w(FUNC(thomson_state::to8_sys_hi_w)); - map(0x6000, 0x7fff).bankr(TO8_DATA_LO).w(FUNC(thomson_state::to8_data_lo_w)); - map(0x8000, 0x9fff).bankr(TO8_DATA_HI).w(FUNC(thomson_state::to8_data_hi_w)); - map(0xa000, 0xa7bf).bankr(THOM_FLOP_BANK); + map(0x0000, 0x1fff).bankr(THOM_VRAM_BANK).w(FUNC(mo5nr_state::to770_vram_w)); + map(0x2000, 0x3fff).bankr(TO8_SYS_LO).w(FUNC(mo5nr_state::to8_sys_lo_w)); + map(0x4000, 0x5fff).bankr(TO8_SYS_HI).w(FUNC(mo5nr_state::to8_sys_hi_w)); + map(0x6000, 0x7fff).bankr(TO8_DATA_LO).w(FUNC(mo5nr_state::to8_data_lo_w)); + map(0x8000, 0x9fff).bankr(TO8_DATA_HI).w(FUNC(mo5nr_state::to8_data_hi_w)); + map(0xa000, 0xa7ff).view(m_extension_view); map(0xa7c0, 0xa7c3).rw("pia_0", FUNC(pia6821_device::read_alt), FUNC(pia6821_device::write_alt)); - map(0xa7cb, 0xa7cb).w(FUNC(thomson_state::mo6_ext_w)); + map(0xa7cb, 0xa7cb).w(FUNC(mo5nr_state::mo6_ext_w)); map(0xa7cc, 0xa7cf).rw("pia_1", FUNC(pia6821_device::read_alt), FUNC(pia6821_device::write_alt)); - map(0xa7d0, 0xa7d9).rw(FUNC(thomson_state::mo5nr_net_r), FUNC(thomson_state::mo5nr_net_w)); - map(0xa7da, 0xa7dd).rw(FUNC(thomson_state::mo6_vreg_r), FUNC(thomson_state::mo6_vreg_w)); + m_extension_view[1](0xa7d8, 0xa7d9).r(FUNC(mo5nr_state::id_r)); + map(0xa7da, 0xa7dd).rw(FUNC(mo5nr_state::mo6_vreg_r), FUNC(mo5nr_state::mo6_vreg_w)); map(0xa7e1, 0xa7e1).r("cent_data_in", FUNC(input_buffer_device::read)); map(0xa7e1, 0xa7e1).w(m_cent_data_out, FUNC(output_latch_device::write)); - map(0xa7e3, 0xa7e3).rw(FUNC(thomson_state::mo5nr_prn_r), FUNC(thomson_state::mo5nr_prn_w)); - map(0xa7e4, 0xa7e7).rw(FUNC(thomson_state::mo6_gatearray_r), FUNC(thomson_state::mo6_gatearray_w)); + map(0xa7e3, 0xa7e3).rw(FUNC(mo5nr_state::mo5nr_prn_r), FUNC(mo5nr_state::mo5nr_prn_w)); + map(0xa7e4, 0xa7e7).rw(FUNC(mo5nr_state::mo6_gatearray_r), FUNC(mo5nr_state::mo6_gatearray_w)); map(0xa7e8, 0xa7eb).rw("acia", FUNC(mos6551_device::read), FUNC(mos6551_device::write)); -/* map(0xa7f0, 0xa7f7).rw(FUNC(thomson_state::to9_ieee_r), FUNC(homson_state::to9_ieee_w));*/ - map(0xa7f2, 0xa7f3).rw(FUNC(thomson_state::to7_midi_r), FUNC(thomson_state::to7_midi_w)); +/* map(0xa7f0, 0xa7f7).rw(FUNC(mo5nr_state::to9_ieee_r), FUNC(homson_state::to9_ieee_w));*/ + map(0xa7f2, 0xa7f3).rw(FUNC(mo5nr_state::to7_midi_r), FUNC(mo5nr_state::to7_midi_w)); map(0xa7f8, 0xa7fb).rw("pia_3", FUNC(pia6821_device::read_alt), FUNC(pia6821_device::write_alt)); map(0xa7fe, 0xa7ff).rw(m_mea8000, FUNC(mea8000_device::read), FUNC(mea8000_device::write)); - map(0xb000, 0xbfff).bankr(MO6_CART_LO).w(FUNC(thomson_state::mo6_cartridge_w)); - map(0xc000, 0xefff).bankr(MO6_CART_HI).w(FUNC(thomson_state::mo6_cartridge_w)); + map(0xb000, 0xbfff).bankr(MO6_CART_LO).w(FUNC(mo5nr_state::mo6_cartridge_w)); + map(0xc000, 0xefff).bankr(MO6_CART_HI).w(FUNC(mo5nr_state::mo6_cartridge_w)); map(0xf000, 0xffff).bankr(TO8_BIOS_BANK); /* 0x10000 - 0x1ffff: 64 KB external ROM cartridge */ @@ -2390,8 +2145,6 @@ ROM_REGION ( 0x10000, "cartridge", 0 ) ROM_FILL ( 0x00000, 0x10000, 0x39 ) /* TODO: network ROM */ - - ROM_FLOPPY5 ROM_END @@ -2485,44 +2238,84 @@ PORT_INCLUDE ( thom_game_port ) PORT_INCLUDE ( mo5nr_keyboard ) PORT_INCLUDE ( to7_config ) - PORT_INCLUDE ( to7_fconfig ) PORT_INCLUDE ( to7_vconfig ) + + PORT_START ( "nanoreseau_config" ) + PORT_DIPNAME(0x01, 0x01, "Extension selection") PORT_DIPLOCATION("SW03:1") + PORT_DIPSETTING(0x00, "Extension port") + PORT_DIPSETTING(0x01, "Internal networking") + + PORT_DIPNAME(0x3e, 0x02, "Network ID") PORT_DIPLOCATION("SW03:2,3,4,5,6") + PORT_DIPSETTING(0x00, "0 (Master)") + PORT_DIPSETTING(0x02, "1") + PORT_DIPSETTING(0x04, "2") + PORT_DIPSETTING(0x06, "3") + PORT_DIPSETTING(0x08, "4") + PORT_DIPSETTING(0x0a, "5") + PORT_DIPSETTING(0x0c, "6") + PORT_DIPSETTING(0x0e, "7") + PORT_DIPSETTING(0x10, "8") + PORT_DIPSETTING(0x12, "9") + PORT_DIPSETTING(0x14, "10") + PORT_DIPSETTING(0x16, "11") + PORT_DIPSETTING(0x18, "12") + PORT_DIPSETTING(0x1a, "13") + PORT_DIPSETTING(0x1c, "14") + PORT_DIPSETTING(0x1e, "15") + PORT_DIPSETTING(0x20, "16") + PORT_DIPSETTING(0x22, "17") + PORT_DIPSETTING(0x24, "18") + PORT_DIPSETTING(0x26, "19") + PORT_DIPSETTING(0x28, "20") + PORT_DIPSETTING(0x2a, "21") + PORT_DIPSETTING(0x2c, "22") + PORT_DIPSETTING(0x2e, "23") + PORT_DIPSETTING(0x30, "24") + PORT_DIPSETTING(0x32, "25") + PORT_DIPSETTING(0x34, "26") + PORT_DIPSETTING(0x36, "27") + PORT_DIPSETTING(0x38, "28") + PORT_DIPSETTING(0x3a, "29") + PORT_DIPSETTING(0x3c, "30") + PORT_DIPSETTING(0x3e, "31") INPUT_PORTS_END /* ------------ driver ------------ */ -void thomson_state::mo5nr(machine_config &config) +void mo5nr_state::mo5nr(machine_config &config) { - to7_base(config); - MCFG_MACHINE_START_OVERRIDE( thomson_state, mo5nr ) - MCFG_MACHINE_RESET_OVERRIDE( thomson_state, mo5nr ) + to7_base(config, true); + MCFG_MACHINE_START_OVERRIDE( mo5nr_state, mo5nr ) + MCFG_MACHINE_RESET_OVERRIDE( mo5nr_state, mo5nr ) - m_maincpu->set_addrmap(AS_PROGRAM, &thomson_state::mo5nr_map); + m_maincpu->set_addrmap(AS_PROGRAM, &mo5nr_state::mo5nr_map); m_cassette->set_formats(mo5_cassette_formats); m_cassette->set_interface("mo_cass"); - m_pia_sys->readpa_handler().set(FUNC(thomson_state::mo6_sys_porta_in)); - m_pia_sys->readpb_handler().set(FUNC(thomson_state::mo5nr_sys_portb_in)); - m_pia_sys->writepa_handler().set(FUNC(thomson_state::mo5nr_sys_porta_out)); + m_pia_sys->readpa_handler().set(FUNC(mo5nr_state::mo6_sys_porta_in)); + m_pia_sys->readpb_handler().set(FUNC(mo5nr_state::mo5nr_sys_portb_in)); + m_pia_sys->writepa_handler().set(FUNC(mo5nr_state::mo5nr_sys_porta_out)); m_pia_sys->writepb_handler().set("buzzer", FUNC(dac_bit_interface::data_w)); - m_pia_sys->ca2_handler().set(FUNC(thomson_state::mo5_set_cassette_motor)); - m_pia_sys->cb2_handler().set(FUNC(thomson_state::mo6_sys_cb2_out)); + m_pia_sys->ca2_handler().set(FUNC(mo5nr_state::mo5_set_cassette_motor)); + m_pia_sys->cb2_handler().set(FUNC(mo5nr_state::mo6_sys_cb2_out)); m_pia_sys->irqb_handler().set("mainirq", FUNC(input_merger_device::in_w<1>)); // differs from TO - m_pia_game->writepa_handler().set(FUNC(thomson_state::mo6_game_porta_out)); + m_pia_game->writepa_handler().set(FUNC(mo5nr_state::mo6_game_porta_out)); CENTRONICS(config, m_centronics, centronics_devices, "printer"); m_centronics->set_data_input_buffer("cent_data_in"); - m_centronics->busy_handler().set(FUNC(thomson_state::write_centronics_busy)); + m_centronics->busy_handler().set(FUNC(mo5nr_state::write_centronics_busy)); INPUT_BUFFER(config, "cent_data_in"); OUTPUT_LATCH(config, m_cent_data_out); m_centronics->set_output_latch(*m_cent_data_out); - GENERIC_CARTSLOT(config.replace(), "cartslot", generic_plain_slot, "mo_cart", "m5,rom").set_device_load(FUNC(thomson_state::mo5_cartridge)); + GENERIC_CARTSLOT(config.replace(), "cartslot", generic_plain_slot, "mo_cart", "m5,rom").set_device_load(FUNC(mo5nr_state::mo5_cartridge)); + + NANORESEAU_MO(config, m_nanoreseau, 0, true); /* internal ram */ m_ram->set_default_size("128K"); @@ -2541,4 +2334,4 @@ SOFTWARE_LIST(config, "mo5_qd_list").set_compatible("mo5_qd"); } -COMP( 1986, mo5nr, 0, 0, mo5nr, mo5nr, thomson_state, empty_init, "Thomson", "MO5 NR", 0 ) +COMP( 1986, mo5nr, 0, 0, mo5nr, mo5nr, mo5nr_state, empty_init, "Thomson", "MO5 NR", 0 ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/ti74.cpp mame-0.231+dfsg.1/src/mame/drivers/ti74.cpp --- mame-0.230+dfsg.1/src/mame/drivers/ti74.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/ti74.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -51,9 +51,8 @@ Overall, the hardware is very similar to TI CC-40. A lot has been shuffled around - to cut down on complexity (and probably for protection too). To reduce power usage - even more, the OS often idles while waiting for any keypress that triggers an interrupt - and wakes the processor up. + to cut down on complexity. To reduce power usage even more, the OS often idles while + waiting for any keypress that triggers an interrupt and wakes the processor up. The machine is powered by 4 AAA batteries. These will also save internal RAM, provided that the machine is turned off properly. @@ -70,11 +69,13 @@ ***************************************************************************/ #include "emu.h" + #include "bus/generic/carts.h" #include "bus/generic/slot.h" #include "cpu/tms7000/tms7000.h" #include "machine/nvram.h" #include "video/hd44780.h" + #include "emupal.h" #include "screen.h" #include "softlist.h" @@ -83,16 +84,19 @@ #include "ti95.lh" +namespace { + class ti74_state : public driver_device { public: ti74_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), + m_sysbank(*this, "sysbank"), m_cart(*this, "cartslot"), m_key_matrix(*this, "IN.%u", 0), m_battery_inp(*this, "BATTERY"), - m_lamps(*this, "lamp%u", 0U) + m_segs(*this, "seg%u", 0U) { } void ti74(machine_config &config); @@ -119,14 +123,14 @@ void main_map(address_map &map); required_device m_maincpu; + required_memory_bank m_sysbank; required_device m_cart; required_ioport_array<8> m_key_matrix; required_ioport m_battery_inp; + output_finder<80> m_segs; - u8 m_key_select; - u8 m_power; - - output_finder<80> m_lamps; + u8 m_key_select = 0; + u8 m_power = 0; }; @@ -165,7 +169,7 @@ void ti74_state::ti74_palette(palette_device &palette) const { palette.set_pen_color(0, rgb_t(138, 146, 148)); // background - palette.set_pen_color(1, rgb_t(92, 83, 88)); // LCD pixel on + palette.set_pen_color(1, rgb_t(50, 45, 60)); // LCD pixel on palette.set_pen_color(2, rgb_t(131, 136, 139)); // LCD pixel off } @@ -183,7 +187,7 @@ // above | _LOW _ERROR 2nd INV ALPHA LC INS DEGRAD HEX OCT I/O // screen- | _P{70} <{71} RUN{3} // area . SYS{4} - m_lamps[y * 10 + x] = state ? 1 : 0; + m_segs[y * 10 + x] = state ? 1 : 0; } HD44780_PIXEL_UPDATE(ti74_state::ti74_pixel_update) @@ -242,28 +246,28 @@ u8 ti74_state::keyboard_r() { - u8 ret = 0; + u8 data = 0; // read selected keyboard rows for (int i = 0; i < 8; i++) { if (m_key_select >> i & 1) - ret |= m_key_matrix[i]->read(); + data |= m_key_matrix[i]->read(); } - return ret; + return data; } void ti74_state::keyboard_w(u8 data) { - // d(0-7): select keyboard column + // d0-d7: select keyboard column m_key_select = data; } void ti74_state::bankswitch_w(u8 data) { // d0-d1: system rom bankswitch - membank("sysbank")->set_entry(data & 3); + m_sysbank->set_entry(data & 3); // d2: power-on latch if (~data & 4 && m_power) @@ -496,22 +500,18 @@ { m_power = 1; + m_sysbank->set_entry(0); update_battery_status(m_battery_inp->read()); } void ti74_state::machine_start() { - m_lamps.resolve(); + m_segs.resolve(); if (m_cart->exists()) m_maincpu->space(AS_PROGRAM).install_read_handler(0x4000, 0xbfff, read8sm_delegate(*m_cart, FUNC(generic_slot_device::read_rom))); - membank("sysbank")->configure_entries(0, 4, memregion("system")->base(), 0x2000); - membank("sysbank")->set_entry(0); - - // zerofill - m_key_select = 0; - m_power = 0; + m_sysbank->configure_entries(0, 4, memregion("system")->base(), 0x2000); // register for savestates save_item(NAME(m_key_select)); @@ -520,8 +520,8 @@ void ti74_state::ti74(machine_config &config) { - /* basic machine hardware */ - TMS70C46(config, m_maincpu, XTAL(4'000'000)); + // basic machine hardware + TMS70C46(config, m_maincpu, 4_MHz_XTAL); m_maincpu->set_addrmap(AS_PROGRAM, &ti74_state::main_map); m_maincpu->in_porta().set(FUNC(ti74_state::keyboard_r)); m_maincpu->out_portb().set(FUNC(ti74_state::bankswitch_w)); @@ -529,7 +529,7 @@ NVRAM(config, "sysram.ic3", nvram_device::DEFAULT_ALL_0); - /* video hardware */ + // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD)); screen.set_refresh_hz(60); // arbitrary screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); @@ -546,16 +546,15 @@ hd44780.set_lcd_size(2, 16); // 2*16 internal hd44780.set_pixel_update_cb(FUNC(ti74_state::ti74_pixel_update)); - /* cartridge */ + // cartridge GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "ti74_cart", "bin,rom,256").set_device_load(FUNC(ti74_state::cart_load)); - SOFTWARE_LIST(config, "cart_list").set_original("ti74_cart"); } void ti74_state::ti95(machine_config &config) { - /* basic machine hardware */ - TMS70C46(config, m_maincpu, XTAL(4'000'000)); + // basic machine hardware + TMS70C46(config, m_maincpu, 4_MHz_XTAL); m_maincpu->set_addrmap(AS_PROGRAM, &ti74_state::main_map); m_maincpu->in_porta().set(FUNC(ti74_state::keyboard_r)); m_maincpu->out_portb().set(FUNC(ti74_state::bankswitch_w)); @@ -563,7 +562,7 @@ NVRAM(config, "sysram.ic3", nvram_device::DEFAULT_ALL_0); - /* video hardware */ + // video hardware screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD)); screen.set_refresh_hz(60); // arbitrary screen.set_vblank_time(ATTOSECONDS_IN_USEC(2500)); @@ -580,9 +579,8 @@ hd44780.set_lcd_size(2, 16); hd44780.set_pixel_update_cb(FUNC(ti74_state::ti95_pixel_update)); - /* cartridge */ + // cartridge GENERIC_CARTSLOT(config, "cartslot", generic_plain_slot, "ti95_cart", "bin,rom,256").set_device_load(FUNC(ti74_state::cart_load)); - SOFTWARE_LIST(config, "cart_list").set_original("ti95_cart"); } @@ -611,7 +609,9 @@ ROM_LOAD( "hn61256pc95.ic1", 0x0000, 0x8000, CRC(c46d29ae) SHA1(c653f08590dbc28241a9f5a6c2541641bdb0208b) ) // system rom, banked ROM_END +} // anonymous namespace + // YEAR NAME PARENT CMP MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS -COMP( 1985, ti74, 0, 0, ti74, ti74, ti74_state, empty_init, "Texas Instruments", "TI-74 BASICALC", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW ) -COMP( 1986, ti95, 0, 0, ti95, ti95, ti74_state, empty_init, "Texas Instruments", "TI-95 PROCALC", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW ) +COMP( 1985, ti74, 0, 0, ti74, ti74, ti74_state, empty_init, "Texas Instruments", "TI-74 Basicalc", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW ) +COMP( 1986, ti95, 0, 0, ti95, ti95, ti74_state, empty_init, "Texas Instruments", "TI-95 Procalc", MACHINE_SUPPORTS_SAVE | MACHINE_NO_SOUND_HW ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/tiamc1.cpp mame-0.231+dfsg.1/src/mame/drivers/tiamc1.cpp --- mame-0.230+dfsg.1/src/mame/drivers/tiamc1.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/tiamc1.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -123,6 +123,7 @@ #include "cpu/i8085/i8085.h" #include "machine/i8255.h" +#include "machine/pit8253.h" #include "screen.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/tmnt.cpp mame-0.231+dfsg.1/src/mame/drivers/tmnt.cpp --- mame-0.230+dfsg.1/src/mame/drivers/tmnt.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/tmnt.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -73,6 +73,7 @@ #include "sound/okim6295.h" #include "sound/samples.h" #include "sound/ym2151.h" +#include "sound/ymfm.h" #include "speaker.h" @@ -230,25 +231,11 @@ int i; uint8_t *source = memregion("title")->base(); - /* Sound sample for TMNT.D05 is stored in the following mode (ym3012 format): - * - * Bit 15-13: Exponent (2 ^ x) - * Bit 12-3 : Sound data (10 bit) - * - * (Sound info courtesy of Dave ) - */ - + // sample data is encoded in Yamaha FP format for (i = 0; i < 0x40000; i++) { int val = source[2 * i] + source[2 * i + 1] * 256; - int expo = val >> 13; - - val = (val >> 3) & (0x3ff); /* 10 bit, Max Amplitude 0x400 */ - val -= 0x200; /* Centralize value */ - - val = (val << expo) >> 3; - - m_sampledata[i] = val; + m_sampledata[i] = ymfm_decode_fp(val >> 3); } } @@ -2093,7 +2080,7 @@ SAMPLES(config, m_samples); m_samples->set_channels(1); /* 1 channel for the title music */ m_samples->set_samples_start_callback(FUNC(tmnt_state::tmnt_decode_sample)); - m_samples->add_route(ALL_OUTPUTS, "mono", 1.0); + m_samples->add_route(ALL_OUTPUTS, "mono", 0.5); } void tmnt_state::punkshot(machine_config &config) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/toaplan1.cpp mame-0.231+dfsg.1/src/mame/drivers/toaplan1.cpp --- mame-0.230+dfsg.1/src/mame/drivers/toaplan1.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/toaplan1.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -973,8 +973,8 @@ map(0x82, 0x82).portr("DSWA"); map(0x83, 0x83).portr("SYSTEM"); map(0x84, 0x84).w(FUNC(toaplan1_state::coin_w)); // Coin counter/lockout // needs verify - map(0x87, 0x87).rw("ymsnd", FUNC(ym3812_device::status_port_r), FUNC(ym3812_device::control_port_w)); - map(0x8f, 0x8f).rw("ymsnd", FUNC(ym3812_device::read_port_r), FUNC(ym3812_device::write_port_w)); + map(0x87, 0x87).rw("ymsnd", FUNC(ym3812_device::status_r), FUNC(ym3812_device::address_w)); + map(0x8f, 0x8f).w("ymsnd", FUNC(ym3812_device::data_w)); } u8 toaplan1_state::vimana_dswb_invert_r() @@ -1018,8 +1018,7 @@ map(0xa0, 0xa0).r(FUNC(toaplan1_samesame_state::soundlatch_r)); map(0xb0, 0xb0).w(FUNC(toaplan1_samesame_state::sound_done_w)); - map(0x80, 0x80).rw("ymsnd", FUNC(ym3812_device::status_port_r), FUNC(ym3812_device::control_port_w)); - map(0x81, 0x81).rw("ymsnd", FUNC(ym3812_device::read_port_r), FUNC(ym3812_device::write_port_w)); + map(0x80, 0x81).rw("ymsnd", FUNC(ym3812_device::read), FUNC(ym3812_device::write)); } /***************************************************************************** diff -Nru mame-0.230+dfsg.1/src/mame/drivers/toaplan2.cpp mame-0.231+dfsg.1/src/mame/drivers/toaplan2.cpp --- mame-0.230+dfsg.1/src/mame/drivers/toaplan2.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/toaplan2.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -397,8 +397,8 @@ #include "cpu/z80/z80.h" #include "cpu/z180/hd647180x.h" #include "machine/nvram.h" -#include "sound/3812intf.h" #include "sound/ym2151.h" +#include "sound/ym3812.h" #include "sound/ymz280b.h" #include "speaker.h" @@ -1487,8 +1487,8 @@ map(0x70, 0x75).nopw(); // DDRs are written with the wrong upper addresses! map(0x84, 0x84).r(m_soundlatch, FUNC(generic_latch_8_device::read)); - map(0x82, 0x82).rw("ymsnd", FUNC(ym3812_device::status_port_r), FUNC(ym3812_device::control_port_w)); - map(0x83, 0x83).rw("ymsnd", FUNC(ym3812_device::read_port_r), FUNC(ym3812_device::write_port_w)); + map(0x82, 0x82).rw("ymsnd", FUNC(ym3812_device::status_r), FUNC(ym3812_device::address_w)); + map(0x83, 0x83).w("ymsnd", FUNC(ym3812_device::data_w)); } @@ -4183,7 +4183,7 @@ Z80(config, m_audiocpu, XTAL(32'000'000)/6); /* 5.3333MHz , 32MHz Oscillator */ m_audiocpu->set_addrmap(AS_PROGRAM, &toaplan2_state::bbakraid_sound_z80_mem); m_audiocpu->set_addrmap(AS_IO, &toaplan2_state::bbakraid_sound_z80_port); - m_audiocpu->set_periodic_int(FUNC(toaplan2_state::bbakraid_snd_interrupt), attotime::from_hz(448)); + m_audiocpu->set_periodic_int(FUNC(toaplan2_state::bbakraid_snd_interrupt), attotime::from_hz(XTAL(32'000'000) / 6 / 12000)); // sound CPU clock (divider unverified) config.set_maximum_quantum(attotime::from_hz(600)); diff -Nru mame-0.230+dfsg.1/src/mame/drivers/toki.cpp mame-0.231+dfsg.1/src/mame/drivers/toki.cpp --- mame-0.230+dfsg.1/src/mame/drivers/toki.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/toki.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -98,8 +98,8 @@ #include "cpu/m68000/m68000.h" #include "cpu/z80/z80.h" #include "machine/watchdog.h" -#include "sound/3812intf.h" #include "sound/okim6295.h" +#include "sound/ym3812.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/travrusa.cpp mame-0.231+dfsg.1/src/mame/drivers/travrusa.cpp --- mame-0.230+dfsg.1/src/mame/drivers/travrusa.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/travrusa.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -309,7 +309,6 @@ /* basic machine hardware */ Z80(config, m_maincpu, 4000000); /* 4 MHz (?) */ m_maincpu->set_addrmap(AS_PROGRAM, &travrusa_state::main_map); - m_maincpu->set_vblank_int("screen", FUNC(travrusa_state::irq0_line_hold)); /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); @@ -321,6 +320,8 @@ screen.set_visarea(1*8, 31*8-1, 0*8, 32*8-1); screen.set_screen_update(FUNC(travrusa_state::screen_update_travrusa)); screen.set_palette(m_palette); + // Race start countdown in shtrider needs multiple interrupts per frame to sync, mustache.cpp has the same, and is also a Seibu game + screen.screen_vblank().set_inputline(m_maincpu, INPUT_LINE_IRQ0); GFXDECODE(config, m_gfxdecode, m_palette, gfx_travrusa); PALETTE(config, m_palette, FUNC(travrusa_state::travrusa_palette), 16*8+16*8, 128+16); diff -Nru mame-0.230+dfsg.1/src/mame/drivers/trs80.cpp mame-0.231+dfsg.1/src/mame/drivers/trs80.cpp --- mame-0.230+dfsg.1/src/mame/drivers/trs80.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/trs80.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -5,31 +5,31 @@ /*************************************************************************** TRS80 memory map -0000-2fff ROM R D0-D7 -3000-37ff ROM on Model III R D0-D7 - unused on Model I -37de UART status R/W D0-D7 -37df UART data R/W D0-D7 -37e0 interrupt latch address (lnw80 = for the realtime clock) -37e1 select disk drive 0 W -37e2 cassette drive latch address W -37e3 select disk drive 1 W -37e4 select which cassette unit W D0-D1 (D0 selects unit 1, D1 selects unit 2) -37e5 select disk drive 2 W -37e7 select disk drive 3 W -37e0-37e3 floppy motor W D0-D3 - or floppy head select W D3 -37e8 send a byte to printer W D0-D7 -37e8 read printer status R D7 -37ec-37ef FDC WD179x R/W D0-D7 -37ec command W D0-D7 -37ec status R D0-D7 -37ed track R/W D0-D7 -37ee sector R/W D0-D7 -37ef data R/W D0-D7 -3800-38ff keyboard matrix R D0-D7 +0000-2fff ROM R D0-D7 +3000-37ff ROM on EACA models R D0-D7 + unused on Model I +37de UART status R/W D0-D7 +37df UART data R/W D0-D7 +37e0 interrupt latch address +37e1 select disk drive 0 W +37e2 cassette drive latch address W +37e3 select disk drive 1 W +37e4 select which cassette unit W D0-D1 (D0 selects unit 1, D1 selects unit 2) +37e5 select disk drive 2 W +37e7 select disk drive 3 W +37e0-37e3 floppy motor W D0-D3 + or floppy head select W D3 +37e8 send a byte to printer W D0-D7 +37e8 read printer status R D7 +37ec-37ef FDC FD1771 R/W D0-D7 +37ec command W D0-D7 +37ec status R D0-D7 +37ed track R/W D0-D7 +37ee sector R/W D0-D7 +37ef data R/W D0-D7 +3800-38ff keyboard matrix R D0-D7 3900-3bff unused - kbd mirrored -3c00-3fff video RAM R/W D0-D5,D7 (or D0-D7) +3c00-3fff video RAM R/W D0-D5,D7 (or D0-D7) 4000-ffff RAM Interrupts: @@ -39,11 +39,10 @@ Printer: Level II usually 37e8; System80 uses port FD. System80 has non-addressable dip switches to set the UART control register. -System80 and LNW80 have non-addressable links to set the baud rate. Receive and Transmit clocks are tied together. +System80 has non-addressable links to set the baud rate. Receive and Transmit clocks are tied together. Cassette baud rates: Model I level I - 250 baud Model I level II and all clones - 500 baud - LNW-80 - 500 baud @1.77MHz and 1000 baud @4MHz. I/O ports FF: @@ -54,9 +53,6 @@ - bit 7 is for reading from a cassette FE: -- bit 0 is for selecting inverse video of the whole screen on a lnw80 -- bit 2 enables colour on a lnw80 -- bit 3 is for selecting roms (low) or 16k hires area (high) on a lnw80 - bit 4 selects internal cassette player (low) or external unit (high) on a system-80 FD: @@ -93,7 +89,6 @@ - Gnnnn : Execute program at nnnn - Gnnnn,tttt : as above, breakpoint at tttt - R : modify registers - The monitor works on the radionic too. About the ht1080z - This was made for schools in Hungary. Each comes with a BASIC extension roms which activated Hungarian features. To activate - start emulation - enter SYSTEM @@ -101,6 +96,22 @@ The ht1080z is identical to the System 80, apart from the character rom. The ht1080z2 has a modified extension rom and character generator. +About the eg3003 - This is the original of the EACA clones, and enjoyed success in Europe, + particularly in Germany. The normal roms would make it exactly a System-80, however we've + added the TCS ROM extension for something different. To activate - enter SYSTEM + Enter /12345 and the inbuilt monitor will be ready to go. To start the monitor, hold + up-arrow and hit M. You get a # prompt. The keyboard is also now in lower-case, even + though monitor commands are required to be in upper-case. Monitor commands: + - A : Ascii Dump + - D : Hex dump + - E : Edit Memory + - H : Hex converter + - J : Jump (Go) + - P : Punch + - R : Return to BASIC + - S : Search + - X : Hex Calculator + About the RTC - The time is incremented while ever the cursor is flashing. It is stored in a series of bytes in the computer's work area. The bytes are in a certain order, this is: seconds, minutes, hours, year, day, month. The seconds are stored at 0x4041. @@ -111,22 +122,21 @@ TRS80 Katakana Character Generator TRS80 Small English Character Generator TRS80 Model III old version Character Generator - TRS80 Model II bios and boot disk Not emulated: TRS80 Japanese kana/ascii switch and alternate keyboard TRS80 Model III/4 Hard drive, Graphics board, Alternate Character set - LNW80 1.77 / 4.0 MHz switch (this is a physical switch) Radionic has 16 colours with a byte at 350B controlling the operation. See manual. -Virtual floppy disk formats are JV1, JV3, and DMK. Only the JV1 is emulated. ******************************************************************************************************** To Do / Status: -------------- -For those machines that allow it, add cass2 as an image device and hook it up. +- For those machines that allow it, add cass2 as an image device and hook it up. +- Difficulty loading real tapes. +- Writing to floppy is problematic; freezing/crashing are common issues. trs80: works @@ -141,34 +151,11 @@ verify clock for AY-3-8910 investigate expansion-box -radionic: works - floppy not working (@6C0, DRQ never gets set) - add colour - expansion-box? - uart - -lnw80: works - add 1.77 / 4 MHz switch - find out if it really did support 32-cpl mode or not - hi-res and colour are coded but do not work - investigate expansion-box - -2021-03-26 MT 07903 - most floppies no longer boot. - Most machines have problems loading real tapes. - Cannot load CAS tapes, but they can be loaded with trs80m3. - *******************************************************************************************************/ #include "emu.h" #include "includes/trs80.h" - -#include "machine/com8116.h" #include "sound/ay8910.h" -#include "screen.h" -#include "speaker.h" - -#include "formats/trs80_dsk.h" -#include "formats/dmk_dsk.h" void trs80_state::trs80_mem(address_map &map) @@ -188,17 +175,13 @@ void trs80_state::m1_mem(address_map &map) { - map(0x0000, 0x377f).rom(); // sys80,ht1080 needs up to 375F + map(0x0000, 0x37ff).rom(); map(0x37de, 0x37de).rw(FUNC(trs80_state::sys80_f9_r), FUNC(trs80_state::sys80_f8_w)); map(0x37df, 0x37df).rw(m_uart, FUNC(ay31015_device::receive), FUNC(ay31015_device::transmit)); map(0x37e0, 0x37e3).rw(FUNC(trs80_state::irq_status_r), FUNC(trs80_state::motor_w)); map(0x37e4, 0x37e7).w(FUNC(trs80_state::cassunit_w)); map(0x37e8, 0x37eb).rw(FUNC(trs80_state::printer_r), FUNC(trs80_state::printer_w)); - map(0x37ec, 0x37ec).r(FUNC(trs80_state::wd179x_r)); - map(0x37ec, 0x37ec).w(m_fdc, FUNC(fd1793_device::cmd_w)); - map(0x37ed, 0x37ed).rw(m_fdc, FUNC(fd1793_device::track_r), FUNC(fd1793_device::track_w)); - map(0x37ee, 0x37ee).rw(m_fdc, FUNC(fd1793_device::sector_r), FUNC(fd1793_device::sector_w)); - map(0x37ef, 0x37ef).rw(m_fdc, FUNC(fd1793_device::data_r), FUNC(fd1793_device::data_w)); + map(0x37ec, 0x37ef).rw(FUNC(trs80_state::fdc_r), FUNC(trs80_state::fdc_w)); map(0x3800, 0x3bff).r(FUNC(trs80_state::keyboard_r)); map(0x3c00, 0x3fff).ram().share(m_p_videoram); map(0x4000, 0xffff).ram(); @@ -235,50 +218,6 @@ map(0x1f, 0x1f).w("ay1", FUNC(ay8910_device::address_w)); } -void trs80_state::lnw80_mem(address_map &map) -{ - map(0x0000, 0x3fff).m(m_lnw_bank, FUNC(address_map_bank_device::amap8)); - map(0x4000, 0xffff).ram(); -} - -void trs80_state::lnw_banked_mem(address_map &map) -{ - map(0x0000, 0x2fff).rom().region("maincpu", 0); - map(0x37e0, 0x37e3).rw(FUNC(trs80_state::irq_status_r), FUNC(trs80_state::motor_w)); - map(0x37e8, 0x37eb).rw(FUNC(trs80_state::printer_r), FUNC(trs80_state::printer_w)); - map(0x37ec, 0x37ec).r(FUNC(trs80_state::wd179x_r)); - map(0x37ec, 0x37ec).w(m_fdc, FUNC(fd1793_device::cmd_w)); - map(0x37ed, 0x37ed).rw(m_fdc, FUNC(fd1793_device::track_r), FUNC(fd1793_device::track_w)); - map(0x37ee, 0x37ee).rw(m_fdc, FUNC(fd1793_device::sector_r), FUNC(fd1793_device::sector_w)); - map(0x37ef, 0x37ef).rw(m_fdc, FUNC(fd1793_device::data_r), FUNC(fd1793_device::data_w)); - map(0x3800, 0x3bff).r(FUNC(trs80_state::keyboard_r)); - map(0x3c00, 0x3fff).ram().share(m_p_videoram); - map(0x4000, 0x7fff).ram().share(m_p_gfxram); -} - -void trs80_state::lnw80_io(address_map &map) -{ - map.global_mask(0xff); - map.unmap_value_high(); - map(0xe8, 0xe8).rw(FUNC(trs80_state::port_e8_r), FUNC(trs80_state::port_e8_w)); - map(0xe9, 0xe9).portr("E9"); - map(0xea, 0xea).rw(FUNC(trs80_state::port_ea_r), FUNC(trs80_state::port_ea_w)); - map(0xeb, 0xeb).rw(m_uart, FUNC(ay31015_device::receive), FUNC(ay31015_device::transmit)); - map(0xfe, 0xfe).rw(FUNC(trs80_state::lnw80_fe_r), FUNC(trs80_state::lnw80_fe_w)); - map(0xff, 0xff).rw(FUNC(trs80_state::port_ff_r), FUNC(trs80_state::port_ff_w)); -} - -void trs80_state::radionic_mem(address_map &map) -{ - m1_mem(map); - // Optional external RS232 module with 8251 - //map(0x3400, 0x3401).mirror(0xfe).rw("uart2", FUNC(i8251_device::read), FUNC(i8251_device::write)); - // Internal colour controls (need details) - //map(0x3500, 0x35ff).w(FUNC(trs80_state::colour_w)); - // Internal interface to external slots - map(0x3600, 0x3603).mirror(0xfc).rw("ppi", FUNC(i8255_device::read), FUNC(i8255_device::write)); -} - /************************************************************************** w/o SHIFT with SHIFT +-------------------------------+ +-------------------------------+ @@ -381,8 +320,7 @@ PORT_START("LINE7") PORT_BIT(0x01, 0x00, IPT_KEYBOARD) PORT_NAME("Left Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) - PORT_BIT(0x10, 0x00, IPT_KEYBOARD) PORT_NAME("Control") PORT_CODE(KEYCODE_LCONTROL) // LNW80 only - PORT_BIT(0xee, 0x00, IPT_UNUSED) + PORT_BIT(0xfe, 0x00, IPT_UNUSED) INPUT_PORTS_END static INPUT_PORTS_START(trs80l2) @@ -452,32 +390,6 @@ 8*16 /* every char takes 16 bytes */ }; -static const gfx_layout lnw80_charlayout = -{ - 8, 8, /* 8 x 8 characters */ - 128, /* 128 characters */ - 1, /* 1 bits per pixel */ - { 0 }, /* no bitplanes */ - /* x offsets */ - { 7, 5, 6, 1, 0, 2, 4, 3 }, - /* y offsets */ - { 0*8, 512*8, 256*8, 768*8, 1*8, 513*8, 257*8, 769*8 }, - 8*2 /* every char takes 8 bytes */ -}; - -static const gfx_layout radionic_charlayout = -{ - 8, 16, /* 8 x 16 characters */ - 256, /* 256 characters */ - 1, /* 1 bits per pixel */ - { 0 }, /* no bitplanes */ - /* x offsets */ - { 7, 6, 5, 4, 3, 2, 1, 0 }, - /* y offsets */ - { 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8, 2048*8, 2049*8, 2050*8, 2051*8, 2052*8, 2053*8, 2054*8, 2055*8 }, - 8*8 /* every char takes 16 bytes */ -}; - static GFXDECODE_START(gfx_trs80) GFXDECODE_ENTRY( "chargen", 0, trs80_charlayout, 0, 1 ) GFXDECODE_END @@ -486,25 +398,21 @@ GFXDECODE_ENTRY( "chargen", 0, ht1080z_charlayout, 0, 1 ) GFXDECODE_END -static GFXDECODE_START(gfx_lnw80) - GFXDECODE_ENTRY( "chargen", 0, lnw80_charlayout, 0, 4 ) -GFXDECODE_END - -static GFXDECODE_START(gfx_radionic) - GFXDECODE_ENTRY( "chargen", 0, radionic_charlayout, 0, 1 ) -GFXDECODE_END - void trs80_state::floppy_formats(format_registration &fr) { - fr.add_mfm_containers(); - fr.add(FLOPPY_TRS80_FORMAT); - fr.add(FLOPPY_DMK_FORMAT); + fr.add(FLOPPY_JV1_FORMAT); } +// Most images are single-sided, 40 tracks or less. +// However, the default is QD to prevent MAME from +// crashing if a disk with more than 40 tracks is used. static void trs80_floppies(device_slot_interface &device) { - device.option_add("sssd", FLOPPY_525_QD); + device.option_add("35t_sd", FLOPPY_525_SSSD_35T); + device.option_add("40t_sd", FLOPPY_525_SSSD); + device.option_add("40t_dd", FLOPPY_525_DD); + device.option_add("80t_qd", FLOPPY_525_QD); } @@ -530,7 +438,13 @@ /* devices */ CASSETTE(config, m_cassette); + m_cassette->set_formats(trs80l1_cassette_formats); + m_cassette->set_default_state(CASSETTE_PLAY); m_cassette->add_route(ALL_OUTPUTS, "mono", 0.05); + m_cassette->set_interface("trs80_cass"); + + /* software lists */ + SOFTWARE_LIST(config, "cass_list").set_original("trs80_cass").set_filter("0"); } void trs80_state::model1(machine_config &config) // model I, level II @@ -543,17 +457,18 @@ /* devices */ m_cassette->set_formats(trs80l2_cassette_formats); - m_cassette->set_default_state(CASSETTE_PLAY); - QUICKLOAD(config, "quickload", "cmd", attotime::from_seconds(1)).set_load_callback(FUNC(trs80_state::quickload_cb)); + quickload_image_device &quickload(QUICKLOAD(config, "quickload", "cmd", attotime::from_seconds(1))); + quickload.set_load_callback(FUNC(trs80_state::quickload_cb)); + quickload.set_interface("trs80_quik"); - FD1793(config, m_fdc, 4_MHz_XTAL / 4); // todo: should be fd1771 + FD1771(config, m_fdc, 4_MHz_XTAL / 4); m_fdc->intrq_wr_callback().set(FUNC(trs80_state::intrq_w)); - FLOPPY_CONNECTOR(config, "fdc:0", trs80_floppies, "sssd", trs80_state::floppy_formats).enable_sound(true); - FLOPPY_CONNECTOR(config, "fdc:1", trs80_floppies, "sssd", trs80_state::floppy_formats).enable_sound(true); - FLOPPY_CONNECTOR(config, "fdc:2", trs80_floppies, nullptr, trs80_state::floppy_formats).enable_sound(true); - FLOPPY_CONNECTOR(config, "fdc:3", trs80_floppies, nullptr, trs80_state::floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, m_floppy[0], trs80_floppies, "80t_qd", trs80_state::floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, m_floppy[1], trs80_floppies, "80t_qd", trs80_state::floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, m_floppy[2], trs80_floppies, nullptr, trs80_state::floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, m_floppy[3], trs80_floppies, nullptr, trs80_state::floppy_formats).enable_sound(true); CENTRONICS(config, m_centronics, centronics_devices, "printer"); m_centronics->busy_handler().set(m_cent_status_in, FUNC(input_buffer_device::write_bit7)); @@ -576,6 +491,10 @@ //MCFG_AY31015_WRITE_DAV_CB(WRITELINE( , , )) m_uart->set_auto_rdav(true); RS232_PORT(config, "rs232", default_rs232_devices, nullptr); + + SOFTWARE_LIST(config.replace(), "cass_list").set_original("trs80_cass").set_filter("1"); + SOFTWARE_LIST(config, "quik_list").set_original("trs80_quik").set_filter("1"); + SOFTWARE_LIST(config, "flop_list").set_original("trs80_flop").set_filter("1"); } void trs80_state::sys80(machine_config &config) @@ -607,57 +526,9 @@ AY8910(config, "ay1", 1'500'000).add_route(ALL_OUTPUTS, "mono", 0.25); // guess of clock //ay1.port_a_read_callback(FUNC(trs80_state::...); // ports are some kind of expansion slot //ay1.port_b_read_callback(FUNC(trs80_state::...); -} -void trs80_state::lnw80(machine_config &config) -{ - model1(config); - //m_maincpu->set_clock(16_MHz_XTAL / 4); // or 16MHz / 9; 4MHz or 1.77MHz operation selected by HI/LO switch - m_maincpu->set_clock(16_MHz_XTAL / 9); // need this so cassette can work - m_maincpu->set_addrmap(AS_PROGRAM, &trs80_state::lnw80_mem); - m_maincpu->set_addrmap(AS_IO, &trs80_state::lnw80_io); - - ADDRESS_MAP_BANK(config, m_lnw_bank, 0); - m_lnw_bank->set_addrmap(0, &trs80_state::lnw_banked_mem); - m_lnw_bank->set_data_width(8); - m_lnw_bank->set_addr_width(16); - m_lnw_bank->set_stride(0x4000); - - MCFG_MACHINE_RESET_OVERRIDE(trs80_state, lnw80) - - subdevice("gfxdecode")->set_info(gfx_lnw80); - - subdevice("palette")->set_entries(8).set_init(FUNC(trs80_state::lnw80_palette)); - subdevice("screen")->set_raw(3.579545_MHz_XTAL * 3, 682, 0, 480, 264, 0, 192); // 10.738MHz generated by tank circuit (top left of page 2 of schematics) - // LNW80 Theory of Operations gives H and V periods as 15.750kHz and 59.66Hz, probably due to rounding the calculated ~15.7468kHz to 4 figures - subdevice("screen")->set_screen_update(FUNC(trs80_state::screen_update_lnw80)); - - config.device_remove("brg"); - CLOCK(config, m_uart_clock, 19200 * 16); - m_uart_clock->signal_handler().set(m_uart, FUNC(ay31015_device::write_rcp)); - m_uart_clock->signal_handler().append(m_uart, FUNC(ay31015_device::write_tcp)); -} - -void trs80_state::radionic(machine_config &config) -{ - model1(config); - m_maincpu->set_clock(12_MHz_XTAL / 6); // or 3.579MHz / 2 (selectable?) - // Komtek I "User Friendly Manual" calls for "Z80 running at 1.97 MHz." This likely refers to an alternate NTSC version - // whose master clock was approximately 11.8005 MHz (6 times ~1.966 MHz and 750 times 15.734 kHz). Though the schematics - // provide the main XTAL frequency as 12 MHz, that they also include a 3.579 MHz XTAL suggests this possibility. - m_maincpu->set_periodic_int(FUNC(trs80_state::nmi_line_pulse), attotime::from_hz(12_MHz_XTAL / 12 / 16384)); - m_maincpu->set_addrmap(AS_PROGRAM, &trs80_state::radionic_mem); - - subdevice("screen")->set_raw(12_MHz_XTAL, 768, 0, 512, 312, 0, 256); - subdevice("screen")->set_screen_update(FUNC(trs80_state::screen_update_radionic)); - subdevice("gfxdecode")->set_info(gfx_radionic); - - // Interface to external circuits - I8255(config, m_ppi); - //m_ppi->in_pc_callback().set(FUNC(pulsar_state::ppi_pc_r)); // Sensing from external and printer status - //m_ppi->out_pa_callback().set(FUNC(pulsar_state::ppi_pa_w)); // Data for external plugin printer module - //m_ppi->out_pb_callback().set(FUNC(pulsar_state::ppi_pb_w)); // Control data to external - //m_ppi->out_pc_callback().set(FUNC(pulsar_state::ppi_pc_w)); // Printer strobe + SOFTWARE_LIST(config.replace(), "cass_list").set_original("trs80_cass").set_filter("H"); + SOFTWARE_LIST(config.replace(), "quik_list").set_original("trs80_quik").set_filter("H"); } @@ -668,107 +539,111 @@ ***************************************************************************/ ROM_START(trs80) - ROM_REGION(0x3800, "maincpu",0) - ROM_LOAD("level1.rom", 0x0000, 0x1000, CRC(70d06dff) SHA1(20d75478fbf42214381e05b14f57072f3970f765)) + ROM_REGION(0x3800, "maincpu", ROMREGION_ERASEFF) + // These roms had many names due to multiple suppliers + // Memory Location Maker and type Label + // 000-7FF Z33 Intel 2716 ROM-A + // 800-FFF Z34 Intel 2716 ROM-B + // 000-7FF Z33 National Semiconductor 2316 MM2316_R/D + // 800-FFF Z34 National Semiconductor 2316 MM2316_S/D + // 000-7FF Z33 National Semiconductor 2316 M2316E_R/N + // 800-FFF Z34 National Semiconductor 2316 M2316E_S/N + // 000-7FF Z33 Motorola 7807 + // 800-FFF Z34 Motorola 7804 + // 000-FFF Z33 Motorola 7809_BASIC I + ROM_LOAD("level1.rom", 0x0000, 0x1000, CRC(70d06dff) SHA1(20d75478fbf42214381e05b14f57072f3970f765) ) - ROM_REGION(0x0400, "chargen",0) - ROM_LOAD("trs80m1.chr", 0x0000, 0x0400, CRC(0033f2b9) SHA1(0d2cd4197d54e2e872b515bbfdaa98efe502eda7)) + ROM_REGION(0x0400, "chargen", 0) + ROM_LOAD("mcm6670p.z29", 0x0000, 0x0400, CRC(0033f2b9) SHA1(0d2cd4197d54e2e872b515bbfdaa98efe502eda7) ) ROM_END ROM_START(trs80l2) - ROM_REGION(0x3800, "maincpu",0) + ROM_REGION(0x3800, "maincpu", ROMREGION_ERASEFF) + // There's no space for these roms on a Model 1 board, so an extra ROM board was created to hold them. + // This board plugs into either Z33 or Z34. Confusingly, the locations on this board are also Z numbers. + // The last version of the board only holds 2 roms - Z1 as 8K (ROM A/B), and Z2 as 4K (ROM C). ROM_SYSTEM_BIOS(0, "level2", "Radio Shack Level II Basic") - ROMX_LOAD("trs80.z33", 0x0000, 0x1000, CRC(37c59db2) SHA1(e8f8f6a4460a6f6755873580be6ff70cebe14969), ROM_BIOS(0)) - ROMX_LOAD("trs80.z34", 0x1000, 0x1000, CRC(05818718) SHA1(43c538ca77623af6417474ca5b95fb94205500c1), ROM_BIOS(0)) - ROMX_LOAD("trs80.zl2", 0x2000, 0x1000, CRC(306e5d66) SHA1(1e1abcfb5b02d4567cf6a81ffc35318723442369), ROM_BIOS(0)) + ROMX_LOAD("rom-a.z1", 0x0000, 0x1000, CRC(37c59db2) SHA1(e8f8f6a4460a6f6755873580be6ff70cebe14969), ROM_BIOS(0) ) + ROMX_LOAD("rom-b.z2", 0x1000, 0x1000, CRC(05818718) SHA1(43c538ca77623af6417474ca5b95fb94205500c1), ROM_BIOS(0) ) + ROMX_LOAD("rom-c.z3", 0x2000, 0x1000, CRC(306e5d66) SHA1(1e1abcfb5b02d4567cf6a81ffc35318723442369), ROM_BIOS(0) ) ROM_SYSTEM_BIOS(1, "rsl2", "R/S L2 Basic") - ROMX_LOAD("trs80alt.z33",0x0000, 0x1000, CRC(be46faf5) SHA1(0e63fc11e207bfd5288118be5d263e7428cc128b), ROM_BIOS(1)) - ROMX_LOAD("trs80alt.z34",0x1000, 0x1000, CRC(6c791c2d) SHA1(2a38e0a248f6619d38f1a108eea7b95761cf2aee), ROM_BIOS(1)) - ROMX_LOAD("trs80alt.zl2",0x2000, 0x1000, CRC(55b3ad13) SHA1(6279f6a68f927ea8628458b278616736f0b3c339), ROM_BIOS(1)) + ROMX_LOAD("rom-a_alt.z1", 0x0000, 0x1000, CRC(be46faf5) SHA1(0e63fc11e207bfd5288118be5d263e7428cc128b), ROM_BIOS(1) ) + ROMX_LOAD("rom-b_alt.z2", 0x1000, 0x1000, CRC(6c791c2d) SHA1(2a38e0a248f6619d38f1a108eea7b95761cf2aee), ROM_BIOS(1) ) + ROMX_LOAD("rom-c_alt.z3", 0x2000, 0x1000, CRC(55b3ad13) SHA1(6279f6a68f927ea8628458b278616736f0b3c339), ROM_BIOS(1) ) - ROM_REGION(0x0400, "chargen",0) - ROM_LOAD("trs80m1.chr", 0x0000, 0x0400, CRC(0033f2b9) SHA1(0d2cd4197d54e2e872b515bbfdaa98efe502eda7)) + ROM_REGION(0x0400, "chargen", 0) + ROM_LOAD("mcm6670p.z29", 0x0000, 0x0400, CRC(0033f2b9) SHA1(0d2cd4197d54e2e872b515bbfdaa98efe502eda7) ) ROM_END -ROM_START(radionic) - ROM_REGION(0x3800, "maincpu",0) - ROM_LOAD("ep1.bin", 0x0000, 0x1000, CRC(e8908f44) SHA1(7a5a60c3afbeb6b8434737dd302332179a7fca59)) - ROM_LOAD("ep2.bin", 0x1000, 0x1000, CRC(46e88fbf) SHA1(a3ca32757f269e09316e1e91ba1502774e2f5155)) - ROM_LOAD("ep3.bin", 0x2000, 0x1000, CRC(306e5d66) SHA1(1e1abcfb5b02d4567cf6a81ffc35318723442369)) - ROM_LOAD("ep4.bin", 0x3000, 0x0800, CRC(70f90f26) SHA1(cbee70da04a3efac08e50b8e3a270262c2440120)) - ROM_CONTINUE( 0x3000, 0x0800) +// From here are EACA-made clones - ROM_REGION(0x1000, "chargen",0) - ROM_LOAD("trschar.bin", 0x0000, 0x1000, CRC(02e767b6) SHA1(c431fcc6bd04ce2800ca8c36f6f8aeb2f91ce9f7)) +ROM_START(eg3003) + ROM_REGION(0x3800, "maincpu", 0) + ROM_LOAD("3001.z10", 0x0000, 0x1000, CRC(8f5214de) SHA1(d8c052be5a2d0ec74433043684791d0554bf203b) ) + ROM_LOAD("3002.z11", 0x1000, 0x1000, CRC(46e88fbf) SHA1(a3ca32757f269e09316e1e91ba1502774e2f5155) ) + ROM_LOAD("3003.z12", 0x2000, 0x1000, CRC(306e5d66) SHA1(1e1abcfb5b02d4567cf6a81ffc35318723442369) ) + ROM_LOAD("tcs-ext.z13", 0x3000, 0x0800, CRC(8f2ac112) SHA1(be0c2a5fb9cb01173c4da6dc8c71ca5975f441bb) ) + + ROM_REGION(0x0800, "chargen", 0) + ROM_LOAD("tcs-ext.z25", 0x0000, 0x0800, CRC(150c5f1f) SHA1(afbce73ab0360108b32e75eb75a3966eb5c503e7) ) ROM_END ROM_START(sys80) - ROM_REGION(0x3800, "maincpu",0) - ROM_LOAD("sys80rom.1", 0x0000, 0x1000, CRC(8f5214de) SHA1(d8c052be5a2d0ec74433043684791d0554bf203b)) - ROM_LOAD("sys80rom.2", 0x1000, 0x1000, CRC(46e88fbf) SHA1(a3ca32757f269e09316e1e91ba1502774e2f5155)) - ROM_LOAD("trs80.zl2", 0x2000, 0x1000, CRC(306e5d66) SHA1(1e1abcfb5b02d4567cf6a81ffc35318723442369)) + ROM_REGION(0x3800, "maincpu", 0) + ROM_LOAD("3001.z10", 0x0000, 0x1000, CRC(8f5214de) SHA1(d8c052be5a2d0ec74433043684791d0554bf203b) ) + ROM_LOAD("3002.z11", 0x1000, 0x1000, CRC(46e88fbf) SHA1(a3ca32757f269e09316e1e91ba1502774e2f5155) ) + ROM_LOAD("3003.z12", 0x2000, 0x1000, CRC(306e5d66) SHA1(1e1abcfb5b02d4567cf6a81ffc35318723442369) ) /* This rom turns the system80 into the "blue label" version. SYSTEM then /12288 to activate. */ - ROM_LOAD("sys80.ext", 0x3000, 0x0800, CRC(2a851e33) SHA1(dad21ec60973eb66e499fe0ecbd469118826a715)) + ROM_LOAD("sys80.z13", 0x3000, 0x0800, CRC(2a851e33) SHA1(dad21ec60973eb66e499fe0ecbd469118826a715) ) - ROM_REGION(0x0400, "chargen",0) - ROM_LOAD("trs80m1.chr", 0x0000, 0x0400, CRC(0033f2b9) SHA1(0d2cd4197d54e2e872b515bbfdaa98efe502eda7)) + ROM_REGION(0x0400, "chargen", 0) + // Z25 could be 2513 (early version) or 52116 (later version) + // This rom is Z25 on the video board, not Z25 on the CPU board. + ROM_LOAD("2513.z25", 0x0000, 0x0400, CRC(0033f2b9) SHA1(0d2cd4197d54e2e872b515bbfdaa98efe502eda7) ) ROM_END #define rom_sys80p rom_sys80 - -ROM_START(lnw80) - ROM_REGION(0x3800, "maincpu",0) - ROM_LOAD("lnw_a.bin", 0x0000, 0x0800, CRC(e09f7e91) SHA1(cd28e72efcfebde6cf1c7dbec4a4880a69e683da)) - ROM_LOAD("lnw_a1.bin", 0x0800, 0x0800, CRC(ac297d99) SHA1(ccf31d3f9d02c3b68a0ee3be4984424df0e83ab0)) - ROM_LOAD("lnw_b.bin", 0x1000, 0x0800, CRC(c4303568) SHA1(13e3d81c6f0de0e93956fa58c465b5368ea51682)) - ROM_LOAD("lnw_b1.bin", 0x1800, 0x0800, CRC(3a5ea239) SHA1(8c489670977892d7f2bfb098f5df0b4dfa8fbba6)) - ROM_LOAD("lnw_c.bin", 0x2000, 0x0800, CRC(2ba025d7) SHA1(232efbe23c3f5c2c6655466ebc0a51cf3697be9b)) - ROM_LOAD("lnw_c1.bin", 0x2800, 0x0800, CRC(ed547445) SHA1(20102de89a3ee4a65366bc2d62be94da984a156b)) - - ROM_REGION(0x0800, "chargen",0) - ROM_LOAD("lnw_chr.bin", 0x0000, 0x0800, CRC(c89b27df) SHA1(be2a009a07e4378d070002a558705e9a0de59389)) -ROM_END - - +// Although I don't have schematics for the HT-series, it would be reasonable to expect the board locations to be the same ROM_START(ht1080z) - ROM_REGION(0x3800, "maincpu",0) - ROM_LOAD("ht1080z.rom", 0x0000, 0x3000, CRC(2bfef8f7) SHA1(7a350925fd05c20a3c95118c1ae56040c621be8f)) - ROM_LOAD("sys80.ext", 0x3000, 0x0800, CRC(2a851e33) SHA1(dad21ec60973eb66e499fe0ecbd469118826a715)) + ROM_REGION(0x3800, "maincpu", 0) + ROM_LOAD("3001.z10", 0x0000, 0x1000, CRC(8f5214de) SHA1(d8c052be5a2d0ec74433043684791d0554bf203b) ) + ROM_LOAD("3002.z11", 0x1000, 0x1000, CRC(46e88fbf) SHA1(a3ca32757f269e09316e1e91ba1502774e2f5155) ) + ROM_LOAD("3003.z12", 0x2000, 0x1000, CRC(306e5d66) SHA1(1e1abcfb5b02d4567cf6a81ffc35318723442369) ) + ROM_LOAD("sys80.z13", 0x3000, 0x0800, CRC(2a851e33) SHA1(dad21ec60973eb66e499fe0ecbd469118826a715) ) - ROM_REGION(0x0800, "chargen",0) - ROM_LOAD("ht1080z.chr", 0x0000, 0x0800, CRC(e8c59d4f) SHA1(a15f30a543e53d3e30927a2e5b766fcf80f0ae31)) + ROM_REGION(0x0800, "chargen", 0) + ROM_LOAD("ht1080z.z25", 0x0000, 0x0800, CRC(e8c59d4f) SHA1(a15f30a543e53d3e30927a2e5b766fcf80f0ae31) ) ROM_END ROM_START(ht1080z2) - ROM_REGION(0x3800, "maincpu",0) - ROM_LOAD("ht1080z.rom", 0x0000, 0x3000, CRC(2bfef8f7) SHA1(7a350925fd05c20a3c95118c1ae56040c621be8f)) - ROM_LOAD("ht1080z2.ext", 0x3000, 0x0800, CRC(07415ac6) SHA1(b08746b187946e78c4971295c0aefc4e3de97115)) + ROM_REGION(0x3800, "maincpu", 0) + ROM_LOAD("3001.z10", 0x0000, 0x1000, CRC(8f5214de) SHA1(d8c052be5a2d0ec74433043684791d0554bf203b) ) + ROM_LOAD("3002.z11", 0x1000, 0x1000, CRC(46e88fbf) SHA1(a3ca32757f269e09316e1e91ba1502774e2f5155) ) + ROM_LOAD("3003.z12", 0x2000, 0x1000, CRC(306e5d66) SHA1(1e1abcfb5b02d4567cf6a81ffc35318723442369) ) + ROM_LOAD("ht1080z2.z13", 0x3000, 0x0800, CRC(07415ac6) SHA1(b08746b187946e78c4971295c0aefc4e3de97115) ) - ROM_REGION(0x0800, "chargen",0) - ROM_LOAD("ht1080z2.chr", 0x0000, 0x0800, CRC(6728f0ab) SHA1(1ba949f8596f1976546f99a3fdcd3beb7aded2c5)) + ROM_REGION(0x0800, "chargen", 0) + ROM_LOAD("ht1080z2.z25", 0x0000, 0x0800, CRC(6728f0ab) SHA1(1ba949f8596f1976546f99a3fdcd3beb7aded2c5) ) ROM_END ROM_START(ht108064) - ROM_REGION(0x3800, "maincpu",0) - ROM_LOAD("ht108064.rom", 0x0000, 0x3000, CRC(48985a30) SHA1(e84cf3121f9e0bb9e1b01b095f7a9581dcfaaae4)) - ROM_LOAD("ht108064.ext", 0x3000, 0x0800, CRC(fc12bd28) SHA1(0da93a311f99ec7a1e77486afe800a937778e73b)) + ROM_REGION(0x3800, "maincpu", 0) + ROM_LOAD("3001_64.z10", 0x0000, 0x1000, CRC(59ec132e) SHA1(232c04827e494ea49931d7ab9a5b87b76c81aef1) ) + ROM_LOAD("3002_64.z11", 0x1000, 0x1000, CRC(a7a73e8c) SHA1(6e0f232b8666744328853cef6bb72b8e44b4c184) ) + ROM_LOAD("3003.z12", 0x2000, 0x1000, CRC(306e5d66) SHA1(1e1abcfb5b02d4567cf6a81ffc35318723442369) ) + ROM_LOAD("ht108064.z13", 0x3000, 0x0800, CRC(fc12bd28) SHA1(0da93a311f99ec7a1e77486afe800a937778e73b) ) - ROM_REGION(0x0800, "chargen",0) - ROM_LOAD("ht108064.chr", 0x0000, 0x0800, CRC(e76b73a4) SHA1(6361ee9667bf59d50059d09b0baf8672fdb2e8af)) + ROM_REGION(0x0800, "chargen", 0) + ROM_LOAD("ht108064.z25", 0x0000, 0x0800, CRC(e76b73a4) SHA1(6361ee9667bf59d50059d09b0baf8672fdb2e8af) ) ROM_END -void trs80_state::init_trs80() -{ - m_mode = 0; -} - void trs80_state::init_trs80l2() { m_mode = 2; @@ -776,12 +651,11 @@ // YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS -COMP( 1977, trs80, 0, 0, trs80, trs80, trs80_state, init_trs80, "Tandy Radio Shack", "TRS-80 Model I (Level I Basic)", MACHINE_SUPPORTS_SAVE ) -COMP( 1978, trs80l2, 0, 0, model1, trs80l2, trs80_state, init_trs80l2, "Tandy Radio Shack", "TRS-80 Model I (Level II Basic)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) -COMP( 1983, radionic, trs80l2, 0, radionic, trs80l2, trs80_state, init_trs80, "Komtek", "Radionic", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) -COMP( 1980, sys80, trs80l2, 0, sys80, sys80, trs80_state, init_trs80l2, "EACA Computers Ltd", "System-80 (60 Hz)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) -COMP( 1980, sys80p, trs80l2, 0, sys80p, sys80, trs80_state, init_trs80l2, "EACA Computers Ltd", "System-80 (50 Hz)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) -COMP( 1981, lnw80, trs80l2, 0, lnw80, sys80, trs80_state, init_trs80, "LNW Research", "LNW-80", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) -COMP( 1983, ht1080z, trs80l2, 0, ht1080z, sys80, trs80_state, init_trs80l2, "Hiradastechnika Szovetkezet", "HT-1080Z Series I", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) -COMP( 1984, ht1080z2, trs80l2, 0, ht1080z, sys80, trs80_state, init_trs80l2, "Hiradastechnika Szovetkezet", "HT-1080Z Series II", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) -COMP( 1985, ht108064, trs80l2, 0, ht1080z, sys80, trs80_state, init_trs80, "Hiradastechnika Szovetkezet", "HT-1080Z/64", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) +COMP( 1977, trs80, 0, 0, trs80, trs80, trs80_state, empty_init, "Tandy Radio Shack", "TRS-80 Model I (Level I Basic)", MACHINE_SUPPORTS_SAVE ) +COMP( 1978, trs80l2, 0, 0, model1, trs80l2, trs80_state, init_trs80l2, "Tandy Radio Shack", "TRS-80 Model I (Level II Basic)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) +COMP( 1980, eg3003, 0, trs80l2, sys80, sys80, trs80_state, init_trs80l2, "EACA Computers Ltd", "Video Genie EG3003", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) +COMP( 1980, sys80, eg3003, 0, sys80, sys80, trs80_state, init_trs80l2, "EACA Computers Ltd", "System-80 (60 Hz)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) +COMP( 1980, sys80p, eg3003, 0, sys80p, sys80, trs80_state, init_trs80l2, "EACA Computers Ltd", "System-80 (50 Hz)", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) +COMP( 1983, ht1080z, eg3003, 0, ht1080z, sys80, trs80_state, init_trs80l2, "Hiradastechnika Szovetkezet", "HT-1080Z Series I", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) +COMP( 1984, ht1080z2, eg3003, 0, ht1080z, sys80, trs80_state, init_trs80l2, "Hiradastechnika Szovetkezet", "HT-1080Z Series II", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) +COMP( 1985, ht108064, eg3003, 0, ht1080z, sys80, trs80_state, empty_init, "Hiradastechnika Szovetkezet", "HT-1080Z/64", MACHINE_NOT_WORKING | MACHINE_SUPPORTS_SAVE ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/trs80m3.cpp mame-0.231+dfsg.1/src/mame/drivers/trs80m3.cpp --- mame-0.230+dfsg.1/src/mame/drivers/trs80m3.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/trs80m3.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -57,16 +57,17 @@ To Do / Status: -------------- -trs80m3: works - MT 07903 - most floppies no longer boot - CAS handler doesn't support 1500 baud - -trs80m4: works - will boot model 3 floppies, but not model 4 ones - MT 07903 - most floppies no longer boot - CAS handler doesn't support 1500 baud +JV3: Cannot write, due to an emulation bug causing the machine to hang. +JV1: If you try to create a disk in the File Manager, MAME will crash. +DMK: Cannot write (no option). +IMD: Does not work with a quad drive. Cannot write. -trs80m4p: floppy not working, so machine is useless +trs80m3: Works + +trs80m4: Works + +trs80m4p: Floppy not working, so machine is useless. + In debugger g 402a, then pc=0;g and it will boot. ***************************************************************************/ @@ -76,6 +77,7 @@ #include "screen.h" #include "speaker.h" +#include "formats/imd_dsk.h" #include "formats/trs80_dsk.h" #include "formats/dmk_dsk.h" @@ -328,14 +330,23 @@ void trs80m3_state::floppy_formats(format_registration &fr) { - fr.add_mfm_containers(); - fr.add(FLOPPY_TRS80_FORMAT); + fr.add(FLOPPY_IMD_FORMAT); + fr.add(FLOPPY_JV3_FORMAT); fr.add(FLOPPY_DMK_FORMAT); + fr.add(FLOPPY_JV1_FORMAT); } +// If you choose a disk that has more tracks than the drive, +// MAME will probably crash. The default is DD, which allows +// IMD boot disks to work, and any other disk with up to 40 +// tracks. You need QD to support up to 80 tracks, but it +// breaks the IMD disks. static void trs80_floppies(device_slot_interface &device) { - device.option_add("sssd", FLOPPY_525_QD); + device.option_add("35t_sd", FLOPPY_525_SSSD_35T); + device.option_add("40t_sd", FLOPPY_525_SSSD); + device.option_add("40t_dd", FLOPPY_525_DD); + device.option_add("80t_qd", FLOPPY_525_QD); } @@ -365,16 +376,19 @@ m_cassette->set_formats(trs80l2_cassette_formats); m_cassette->set_default_state(CASSETTE_PLAY); m_cassette->add_route(ALL_OUTPUTS, "mono", 0.05); + m_cassette->set_interface("trs80_cass"); - QUICKLOAD(config, "quickload", "cmd", attotime::from_seconds(1)).set_load_callback(FUNC(trs80m3_state::quickload_cb)); + quickload_image_device &quickload(QUICKLOAD(config, "quickload", "cmd", attotime::from_seconds(1))); + quickload.set_load_callback(FUNC(trs80m3_state::quickload_cb)); + quickload.set_interface("trs80_quik"); FD1793(config, m_fdc, 4_MHz_XTAL / 4); m_fdc->intrq_wr_callback().set(FUNC(trs80m3_state::intrq_w)); m_fdc->drq_wr_callback().set(FUNC(trs80m3_state::drq_w)); // Internal drives - FLOPPY_CONNECTOR(config, "fdc:0", trs80_floppies, "sssd", trs80m3_state::floppy_formats).enable_sound(true); - FLOPPY_CONNECTOR(config, "fdc:1", trs80_floppies, "sssd", trs80m3_state::floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, m_floppy[0], trs80_floppies, "40t_dd", trs80m3_state::floppy_formats).enable_sound(true); + FLOPPY_CONNECTOR(config, m_floppy[1], trs80_floppies, "40t_dd", trs80m3_state::floppy_formats).enable_sound(true); CENTRONICS(config, m_centronics, centronics_devices, "printer"); m_centronics->busy_handler().set(m_cent_status_in, FUNC(input_buffer_device::write_bit7)); @@ -397,6 +411,10 @@ //MCFG_AY31015_WRITE_DAV_CB(WRITELINE( , , )) m_uart->set_auto_rdav(true); RS232_PORT(config, "rs232", default_rs232_devices, nullptr); + + SOFTWARE_LIST(config, "cass_list").set_original("trs80_cass").set_filter("3"); + SOFTWARE_LIST(config, "quik_list").set_original("trs80_quik").set_filter("3"); + SOFTWARE_LIST(config, "flop_list").set_original("trs80_flop").set_filter("3"); } void trs80m3_state::model4(machine_config &config) @@ -415,6 +433,11 @@ m_m4_bank->set_data_width(8); m_m4_bank->set_addr_width(18); m_m4_bank->set_stride(0x10000); + + SOFTWARE_LIST(config.replace(), "cass_list").set_original("trs80_cass").set_filter("4"); + SOFTWARE_LIST(config.replace(), "flop_list").set_original("trs80_flop").set_filter("4"); + config.device_remove("quickload"); // removed because it crashes.. + config.device_remove("quik_list"); } void trs80m3_state::model4p(machine_config &config) @@ -434,7 +457,11 @@ m_m4p_bank->set_addr_width(19); m_m4p_bank->set_stride(0x10000); + SOFTWARE_LIST(config.replace(), "flop_list").set_original("trs80_flop").set_filter("4"); config.device_remove("quickload"); + config.device_remove("cassette"); + config.device_remove("cass_list"); + config.device_remove("quik_list"); } void trs80m3_state::cp500(machine_config &config) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/tumbleb.cpp mame-0.231+dfsg.1/src/mame/drivers/tumbleb.cpp --- mame-0.230+dfsg.1/src/mame/drivers/tumbleb.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/tumbleb.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -307,9 +307,9 @@ #include "cpu/mcs51/mcs51.h" // for semicom mcu #include "cpu/pic16c5x/pic16c5x.h" #include "machine/decocrpt.h" -#include "sound/3812intf.h" #include "sound/okim6295.h" #include "sound/ym2151.h" +#include "sound/ym3812.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/twincobr.cpp mame-0.231+dfsg.1/src/mame/drivers/twincobr.cpp --- mame-0.230+dfsg.1/src/mame/drivers/twincobr.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/twincobr.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -384,7 +384,7 @@ #include "cpu/m68000/m68000.h" #include "cpu/mcs48/mcs48.h" #include "cpu/z80/z80.h" -#include "sound/3812intf.h" +#include "sound/ym3812.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/twinkle.cpp mame-0.231+dfsg.1/src/mame/drivers/twinkle.cpp --- mame-0.230+dfsg.1/src/mame/drivers/twinkle.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/twinkle.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -24,17 +24,18 @@ Video CD Security Game Title Year Program CD 6/7/8 use DVD Dongle HDD label ----------------------------------------------------------------------------------------------------- -beatmania IIDX (English) 1999 GQ863 A01 GQ863 A04 *863 A02 863 HDD A01 -beatmania IIDX (Japanese) 1999 GQ863-JA B01 GQ863 A04 *863 A02 863 HDD A01 -beatmania IIDX + DDR Club Kit 1999 896 JA ABM GQ863 A04 *863 A02 863 HDD A01 +beatmania IIDX (English) 1999 GQ863 A01 GQ863 A04 863 A02! 863 HDD A01 +beatmania IIDX (Japanese) 1999 GQ863-JA B01 GQ863 A04 863 A02! 863 HDD A01 +beatmania IIDX + DDR Club Kit 1999 896 JA ABM GQ863 A04 863 A02! 863 HDD A01 + 896 JA A01 -beatmania IIDX + DDR Club Kit(newer) 1999 896 JA BBM GQ863 A04 *863 A02 863 HDD A01 +beatmania IIDX + DDR Club Kit(newer) 1999 896 JA BBM GQ863 A04 863 A02! 863 HDD A01 + 896 JA A01 -beatmania IIDX Substream 1999 GC983 A01 GC983 A04 *983 A02 983 HDD A01 -beatmania IIDX Substream (Asia) 1999 GC983-AA A01 GC983 A04 *983A A02 983 HDD A01 -beatmania IIDX Club Version 2 1999 GE984 A01(BM) GC983 A04 *984 A02 983 HDD A01 +beatmania IIDX Substream 1999 GC983 A01 GC983 A04 983 A02! 983 HDD A01 +beatmania IIDX Substream (Asia) 1999 GC983-AA A01 GC983 A04 983A A02! 983 HDD A01 +beatmania IIDX Club Version 2 1999 GE984 A01(BM) GC983 A04 984 A02! 983 HDD A01 + GE984 A01(DDR) beatmania IIDX 2nd Style 1999 GC985 A01 GC985 A04 985 985 HDD A01 +beatstage II 2nd Style 1999 ? ? ? ? beatmania IIDX 3rd Style 2000 GC992-JA A01 GC992-JA A04 992 992 HDD A01 beatmania IIDX 3rd Style(newer) 2000 GC992-JA B01 GC992-JA A04 992 992 HDD A01 beatmania IIDX 3rd Style(newest) 2000 GC992-JA C01 GC992-JA A04 992 992 HDD A01 @@ -47,9 +48,31 @@ beatmania IIDX 8th Style 2002 C44 JA A01 C44 JA A02 C44 C44 JA A03 * = Not dumped. +! = Dumped partially, see security note below. ? = Code unknown. -Where there are multiple revisions of the program cd, it has been assumed that the video and hdd are the same. +All versions of IIDX before 2nd Style use a security dongle containing a X76F041. It contains three +8 byte passwords for writing to the dongle, reading from the dongle and reading/writing configuration +registers. Without the password, you cannot perform the desired action. Further, the chip contains +a feature where a series of bad passwords locks all actions permanently until the chip is reset. The +only way around this, according to the datasheet, is to submit the correct password or wipe the entire +chip and reprogram it. + +All four secure enclaves making the 512 bytes of data present on the dongle are protected by the read +password which must be present in some form in the game binary and as such is trivial to recover. +Additionally, tracing the code reveals unused functions for writing dongles and setting configuration +registers. Unfortunately, the write and config passwords appear scrubbed from the binaries. However, +the intended configuration register valuse are still present in the binaries. Thus, we can at least +infer the read password as well as the config register values, and use the read password to dump the +512 bytes contained in the secure enclave. The data sheet specifies the reset sequence. With this data, +we can reconstruct a dongle dump that is missing only the write and config passwords since it is not +presently possible to read them. Further, a brute-force attack seems impossible due to the config +register defaults being set to 3 password failures before lockout. All of the dumps taken in this +manner are labelled "bad dump" since they are incomplete. + +Dongles for 2nd Style and newer do not suffer this problem as they use a serial EEPROM with no +protection. They can be read out and contain a serial number that matches the printed serial on the +outside of the dongle as well as game-specific bytes to tie the dongle to the specific mix. The Konami Twinkle hardware basically consists of the following parts.... 3 PCBs sandwiched together in a metal box @@ -1217,7 +1240,7 @@ TWINKLE_BIOS ROM_REGION( 0x224, "security", 0 ) - ROM_LOAD( "863a02", 0x000000, 0x000224, BAD_DUMP CRC(7b2a429b) SHA1(f710d19c7b900a58584c07ab8fd3ab7b9f0121d7) ) + ROM_LOAD( "863a02", 0x000000, 0x000224, BAD_DUMP CRC(078be99f) SHA1(7def88d18a9250a8e4b54a51bf663161676cd9be) ) DISK_REGION( "scsi:" SCSI_PORT_DEVICE1 ":cdrom" ) // program DISK_IMAGE_READONLY( "gq863-jab01", 0, SHA1(331f80b40ed560c7e017621b7daeeb8275d92b9a) ) @@ -1233,7 +1256,7 @@ TWINKLE_BIOS ROM_REGION( 0x224, "security", 0 ) - ROM_LOAD( "863a02", 0x000000, 0x000224, BAD_DUMP CRC(7b2a429b) SHA1(f710d19c7b900a58584c07ab8fd3ab7b9f0121d7) ) + ROM_LOAD( "863a02", 0x000000, 0x000224, BAD_DUMP CRC(078be99f) SHA1(7def88d18a9250a8e4b54a51bf663161676cd9be) ) DISK_REGION( "scsi:" SCSI_PORT_DEVICE1 ":cdrom" ) // program DISK_IMAGE_READONLY( "gq863a01", 0, SHA1(07fc467f6500504729becbaf77dabc093a134e65) ) @@ -1425,7 +1448,7 @@ TWINKLE_BIOS ROM_REGION( 0x224, "security", 0 ) - ROM_LOAD( "896a02", 0x000000, 0x000224, BAD_DUMP CRC(7b2a429b) SHA1(f710d19c7b900a58584c07ab8fd3ab7b9f0121d7) ) + ROM_LOAD( "863a02", 0x000000, 0x000224, BAD_DUMP CRC(078be99f) SHA1(7def88d18a9250a8e4b54a51bf663161676cd9be) ) DISK_REGION( "scsi:" SCSI_PORT_DEVICE1 ":cdrom" ) DISK_IMAGE_READONLY( "896jabbm", 0, SHA1(09fb638bc5b3e64af13ae3df66ba25e490440946) ) @@ -1441,7 +1464,7 @@ TWINKLE_BIOS ROM_REGION( 0x224, "security", 0 ) - ROM_LOAD( "896a02", 0x000000, 0x000224, BAD_DUMP CRC(7b2a429b) SHA1(f710d19c7b900a58584c07ab8fd3ab7b9f0121d7) ) + ROM_LOAD( "863a02", 0x000000, 0x000224, BAD_DUMP CRC(078be99f) SHA1(7def88d18a9250a8e4b54a51bf663161676cd9be) ) DISK_REGION( "scsi:" SCSI_PORT_DEVICE1 ":cdrom" ) DISK_IMAGE_READONLY( "896jaabm", 0, SHA1(ea7205f86543d9273efcc226666ab530c32b23c1) ) @@ -1457,7 +1480,7 @@ TWINKLE_BIOS ROM_REGION( 0x224, "security", 0 ) - ROM_LOAD( "983a02", 0x000000, 0x000224, NO_DUMP ) + ROM_LOAD( "983a02", 0x000000, 0x000224, BAD_DUMP CRC(6a6ace82) SHA1(1e1373f40c469c117316c03db414d9984567dd42) ) DISK_REGION( "scsi:" SCSI_PORT_DEVICE1 ":cdrom" ) DISK_IMAGE_READONLY( "gc983a01", 0, SHA1(7a80380f9c18c7da9643e0b9954ad8367eda5948) ) @@ -1473,7 +1496,7 @@ TWINKLE_BIOS ROM_REGION( 0x224, "security", 0 ) - ROM_LOAD( "983aa02", 0x000000, 0x000224, NO_DUMP ) + ROM_LOAD( "983aa02", 0x000000, 0x000224, BAD_DUMP CRC(bcc8965c) SHA1(e152d19a92544212e321a332c6e6678d623dab21) ) DISK_REGION( "scsi:" SCSI_PORT_DEVICE1 ":cdrom" ) DISK_IMAGE_READONLY( "gc983aa,a01", 0, SHA1(9ef5725fc79a7f4f524ef93849af42b2758102cd) ) @@ -1489,7 +1512,7 @@ TWINKLE_BIOS ROM_REGION( 0x224, "security", 0 ) - ROM_LOAD( "984a02", 0x000000, 0x000224, BAD_DUMP CRC(5b08e1ef) SHA1(d43ad5d958313ccb2420246621d9180230b4782d) ) + ROM_LOAD( "984a02", 0x000000, 0x000224, BAD_DUMP CRC(786db814) SHA1(722c709d95d54cd519856ddea64b9176ef191b0d) ) DISK_REGION( "scsi:" SCSI_PORT_DEVICE1 ":cdrom" ) DISK_IMAGE_READONLY( "ge984a01,bm", 0, SHA1(03b083ba09652dfab6f328000c3c9de2a7a4e618) ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/umipoker.cpp mame-0.231+dfsg.1/src/mame/drivers/umipoker.cpp --- mame-0.230+dfsg.1/src/mame/drivers/umipoker.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/umipoker.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -20,8 +20,8 @@ #include "cpu/m68000/m68000.h" #include "cpu/z80/z80.h" #include "machine/nvram.h" -#include "sound/3812intf.h" #include "sound/okim6295.h" +#include "sound/ym3812.h" #include "emupal.h" #include "screen.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/unico.cpp mame-0.231+dfsg.1/src/mame/drivers/unico.cpp --- mame-0.230+dfsg.1/src/mame/drivers/unico.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/unico.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -29,9 +29,9 @@ #include "cpu/m68000/m68000.h" #include "machine/eepromser.h" -#include "sound/3812intf.h" #include "sound/okim6295.h" #include "sound/ym2151.h" +#include "sound/ym3812.h" #include "speaker.h" @@ -63,8 +63,8 @@ map(0x800030, 0x800031).nopw(); // ? 0 map(0x80010c, 0x800121).rw(FUNC(unico_state::scroll_r), FUNC(unico_state::scroll_w)); // Scroll map(0x800189, 0x800189).rw(m_oki, FUNC(okim6295_device::read), FUNC(okim6295_device::write)); // Sound - map(0x80018a, 0x80018a).w("ymsnd", FUNC(ym3812_device::write_port_w)); - map(0x80018c, 0x80018c).rw("ymsnd", FUNC(ym3812_device::status_port_r), FUNC(ym3812_device::control_port_w)); + map(0x80018a, 0x80018a).w("ymsnd", FUNC(ym3812_device::data_w)); + map(0x80018c, 0x80018c).rw("ymsnd", FUNC(ym3812_device::status_r), FUNC(ym3812_device::address_w)); map(0x80018e, 0x80018e).w(FUNC(unico_state::burglarx_okibank_w)); // map(0x8001e0, 0x8001e1).nopw(); // IRQ Ack map(0x904000, 0x90ffff).rw(FUNC(unico_state::vram_r), FUNC(unico_state::vram_w)); // Layers 1, 2, 0 @@ -146,8 +146,8 @@ map(0x800178, 0x800179).r(FUNC(zeropnt_state::guny_1_msb_r)); // map(0x80017c, 0x80017d).r(FUNC(zeropnt_state::gunx_1_msb_r)); // map(0x800189, 0x800189).rw("oki", FUNC(okim6295_device::read), FUNC(okim6295_device::write)); // Sound - map(0x80018a, 0x80018a).w("ymsnd", FUNC(ym3812_device::write_port_w)); - map(0x80018c, 0x80018c).rw("ymsnd", FUNC(ym3812_device::status_port_r), FUNC(ym3812_device::control_port_w)); + map(0x80018a, 0x80018a).w("ymsnd", FUNC(ym3812_device::data_w)); + map(0x80018c, 0x80018c).rw("ymsnd", FUNC(ym3812_device::status_r), FUNC(ym3812_device::address_w)); map(0x80018e, 0x80018e).w(FUNC(zeropnt_state::zeropnt_okibank_leds_w)); // map(0x8001e0, 0x8001e1).nopw(); // ? IRQ Ack map(0x904000, 0x90ffff).rw(FUNC(zeropnt_state::vram_r), FUNC(zeropnt_state::vram_w)); // Layers 1, 2, 0 diff -Nru mame-0.230+dfsg.1/src/mame/drivers/vgmplay.cpp mame-0.231+dfsg.1/src/mame/drivers/vgmplay.cpp --- mame-0.230+dfsg.1/src/mame/drivers/vgmplay.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/vgmplay.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -14,10 +14,6 @@ #include "cpu/m6502/n2a03.h" #include "cpu/m68000/m68000.h" #include "cpu/sh/sh2.h" -#include "sound/262intf.h" -#include "sound/3526intf.h" -#include "sound/3812intf.h" -#include "sound/8950intf.h" #include "sound/ay8910.h" #include "sound/c140.h" #include "sound/c352.h" @@ -42,13 +38,17 @@ #include "sound/upd7759.h" #include "sound/vgm_visualizer.h" #include "sound/x1_010.h" +#include "sound/y8950.h" #include "sound/ym2151.h" #include "sound/ym2203.h" #include "sound/ym2413.h" #include "sound/ym2608.h" #include "sound/ym2610.h" #include "sound/ym2612.h" +#include "sound/ym3526.h" +#include "sound/ym3812.h" #include "sound/ymf271.h" +#include "sound/ymf262.h" #include "sound/ymf278b.h" #include "sound/ymz280b.h" #include "audio/vboy.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/vicdual.cpp mame-0.231+dfsg.1/src/mame/drivers/vicdual.cpp --- mame-0.230+dfsg.1/src/mame/drivers/vicdual.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/vicdual.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -3399,6 +3399,33 @@ ROM_LOAD( "316-0206.u14", 0x0000, 0x0020, CRC(9617d796) SHA1(7cff2741866095ff42eadd8022bea349ec8d2f39) ) /* control PROM */ ROM_END +ROM_START( invho2a ) // found on a Gremlin 'EXTENDED ROM VIDEO LOGIC ASSY NO 800-003' PCB, with a 'S-96674-P-BK' sticker and 'rev. D' handwritten + ROM_REGION( 0x10000, "maincpu", 0 ) + ROM_LOAD( "326.u33", 0x0000, 0x0400, CRC(35bc6216) SHA1(92a98694807009c41335c2b039a06205102daf44) ) + ROM_LOAD( "327.u32", 0x0400, 0x0400, CRC(9484a3db) SHA1(73908de15197bfcdbadfd6cadaa8b01863b60e18) ) + ROM_LOAD( "328.u31", 0x0800, 0x0400, CRC(000cf180) SHA1(685c4bec01a34223cfb68917efdd8873d8d5bac6) ) + ROM_LOAD( "329.u30", 0x0c00, 0x0400, CRC(12ce15c4) SHA1(56aed8127e02f0ee7ee7a2b617624c8fb968fe7f) ) + ROM_LOAD( "330.u29", 0x1000, 0x0400, CRC(2f02f721) SHA1(9124eb2eed0cbab02a3f3b5c811da0ef4b1d1a48) ) + ROM_LOAD( "331.u28", 0x1400, 0x0400, CRC(38f4ab51) SHA1(588c9adbe2cb3c1c287b1f090383ba544b9109fa) ) + ROM_LOAD( "332.u27", 0x1800, 0x0400, CRC(94b1cacb) SHA1(005e40957926624d8d60cdd96f27c2cfbcd07d6e) ) + ROM_LOAD( "333.u26", 0x1c00, 0x0400, CRC(455a8f42) SHA1(4609839ff502c128e5692fa6c1ce31e6d32b79eb) ) + ROM_LOAD( "334.u8", 0x2000, 0x0400, CRC(9c578f37) SHA1(88b97295d0375ada227ade8b9ec5f70086410927) ) + ROM_LOAD( "335.u7", 0x2400, 0x0400, CRC(56df9e11) SHA1(6e02f0de8621244282504526c99a0e2f5aedf5ed) ) + ROM_LOAD( "336.u6", 0x2800, 0x0400, CRC(219b2513) SHA1(c5f92c266d6cd82d36961aefbbf8b4d522824e82) ) + ROM_LOAD( "337.u5", 0x2c00, 0x0400, CRC(d6410227) SHA1(bcdace3d0759df5e6f7dd10a9541db551b129399) ) + ROM_LOAD( "338.u4", 0x3000, 0x0400, CRC(e4550755) SHA1(f5874cb0d0a8e950de555762cc5bb6697e04888f) ) + ROM_LOAD( "339.u3", 0x3400, 0x0400, CRC(426dd538) SHA1(cf591b380895478d54018cfbe5fb41c24146c2ea) ) + ROM_LOAD( "340.u2", 0x3800, 0x0400, CRC(aec47500) SHA1(4500a63967b2b2c52d41cbde9e5e6fe3d39322c2) ) + ROM_LOAD( "341.u1", 0x3c00, 0x0400, CRC(0b7a0607) SHA1(bdb58da071d9b7d2796b3f244c6a95ce1c9f2833) ) + + ROM_REGION( 0x0020, "proms", 0 ) + ROM_LOAD( "pr-16.u49", 0x0000, 0x0020, CRC(733eac6f) SHA1(3cf488155992977875a76f8aa0ce73c1faf8a1a4) ) // TODO: multiple dump attempts give consistent results, but with this Head On 2 is completely black, while Invinco shows unexpected colors + + ROM_REGION( 0x0040, "user1", 0 ) // timing PROMs + ROM_LOAD( "pr-34.u14", 0x0000, 0x0020, CRC(e60a7960) SHA1(b8b8716e859c57c35310efc4594262afedb84823) ) + ROM_LOAD( "7603.u15", 0x0020, 0x0020, CRC(a1506b9d) SHA1(037c3db2ea40eca459e8acba9d1506dd28d72d10) ) // label was peeled off (guess: pr-33) +ROM_END + ROM_START( sspacaho ) ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "epr-0001.bin", 0x0000, 0x0800, CRC(ba62f57a) SHA1(7cfc079c6afe317b6c389c06802fdf1f83858510) ) @@ -4120,7 +4147,8 @@ GAME( 1979, headon2, 0, headon2, headon2, vicdual_state, empty_init, ROT0, "Sega", "Head On 2", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) GAME( 1979, headon2s, headon2, headon2bw, headon2s, headonsa_state, empty_init, ROT0, "bootleg (Sidam)", "Head On 2 (Sidam bootleg)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) GAME( 1979, car2, headon2, headon2bw, car2, vicdual_state, empty_init, ROT0, "bootleg (RZ Bologna)", "Car 2 (bootleg of Head On 2)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // title still says 'HeadOn 2' -GAME( 1979, invho2, 0, invho2, invho2, vicdual_state, empty_init, ROT270, "Sega", "Invinco / Head On 2", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1979, invho2, 0, invho2, invho2, vicdual_state, empty_init, ROT270, "Sega", "Invinco / Head On 2 (set 1)", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) +GAME( 1979, invho2a, invho2, invho2, invho2, vicdual_state, empty_init, ROT270, "Sega", "Invinco / Head On 2 (set 2)", MACHINE_NOT_WORKING | MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // wrong colors make Head On 2 unplayable (all black) GAME( 1980, nsub, 0, nsub, nsub, nsub_state, empty_init, ROT270, "Sega", "N-Sub (upright)", MACHINE_IMPERFECT_GRAPHICS | MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) // this is the upright set. cocktail set still needs to be dumped GAME( 1980, samurai, 0, samurai, samurai, vicdual_state, empty_init, ROT270, "Sega", "Samurai", MACHINE_NO_SOUND | MACHINE_SUPPORTS_SAVE ) GAME( 1979, invinco, 0, invinco, invinco, vicdual_state, empty_init, ROT270, "Sega", "Invinco", MACHINE_IMPERFECT_SOUND | MACHINE_SUPPORTS_SAVE ) diff -Nru mame-0.230+dfsg.1/src/mame/drivers/vis.cpp mame-0.231+dfsg.1/src/mame/drivers/vis.cpp --- mame-0.230+dfsg.1/src/mame/drivers/vis.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/vis.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -6,8 +6,8 @@ #include "cpu/i86/i286.h" #include "machine/8042kbdc.h" #include "machine/at.h" -#include "sound/262intf.h" #include "sound/dac.h" +#include "sound/ymf262.h" #include "video/pc_vga.h" #include "speaker.h" @@ -551,7 +551,7 @@ case 0x01: if(vga.crtc.protect_enable) return; - vga.crtc.horz_disp_end = data / (m_interlace && !(vga.sequencer.data[0x25] & 0x20) ? 2 : 1); + vga.crtc.horz_disp_end = (data / (m_interlace && !(vga.sequencer.data[0x25] & 0x20) ? 2 : 1)) | 1; recompute_params(); return; case 0x02: @@ -651,7 +651,7 @@ if(!(vga.sequencer.data[0x25] & 0x20)) { vga.crtc.horz_total /= 2; - vga.crtc.horz_disp_end /= 2; + vga.crtc.horz_disp_end = (vga.crtc.horz_disp_end / 2) | 1; vga.crtc.horz_blank_end /= 2; vga.crtc.horz_retrace_start /= 2; vga.crtc.horz_retrace_end /= 2; @@ -668,7 +668,7 @@ if(!(vga.sequencer.data[0x25] & 0x20)) { vga.crtc.horz_total *= 2; - vga.crtc.horz_disp_end *= 2; + vga.crtc.horz_disp_end = (vga.crtc.horz_disp_end * 2) | 1; vga.crtc.horz_blank_end *= 2; vga.crtc.horz_retrace_start *= 2; vga.crtc.horz_retrace_end *= 2; diff -Nru mame-0.230+dfsg.1/src/mame/drivers/wardner.cpp mame-0.231+dfsg.1/src/mame/drivers/wardner.cpp --- mame-0.230+dfsg.1/src/mame/drivers/wardner.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/wardner.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -134,7 +134,7 @@ #include "cpu/z80/z80.h" #include "machine/74259.h" #include "machine/bankdev.h" -#include "sound/3812intf.h" +#include "sound/ym3812.h" #include "speaker.h" namespace { diff -Nru mame-0.230+dfsg.1/src/mame/drivers/wecleman.cpp mame-0.231+dfsg.1/src/mame/drivers/wecleman.cpp --- mame-0.230+dfsg.1/src/mame/drivers/wecleman.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/wecleman.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -278,6 +278,7 @@ #include "cpu/z80/z80.h" #include "machine/adc0804.h" #include "machine/gen_latch.h" +#include "machine/k007452.h" #include "sound/ym2151.h" #include "speaker.h" @@ -608,17 +609,6 @@ WEC Le Mans 24 Sound CPU Handlers ***************************************************************************/ -/* Protection - an external multiplier connected to the sound CPU */ -uint8_t wecleman_state::multiply_r() -{ - return (m_multiply_reg[0] * m_multiply_reg[1]) & 0xFF; -} - -void wecleman_state::multiply_w(offs_t offset, uint8_t data) -{ - m_multiply_reg[offset] = data; -} - /* K007232 registers reminder: [Ch A] [Ch B] [Meaning] @@ -651,9 +641,7 @@ map(0x0000, 0x7fff).rom(); map(0x8000, 0x83ff).ram(); map(0x8500, 0x8500).nopw(); // increased with speed (global volume)? - map(0x9000, 0x9000).r(FUNC(wecleman_state::multiply_r)); // 007452: Protection - map(0x9000, 0x9001).w(FUNC(wecleman_state::multiply_w)); // 007452: Protection - map(0x9006, 0x9006).nopw(); // 007452: ? + map(0x9000, 0x9007).rw("k007452", FUNC(k007452_device::read), FUNC(k007452_device::write)); // Protection map(0xa000, 0xa000).r("soundlatch", FUNC(generic_latch_8_device::read)); // From main CPU map(0xb000, 0xb00d).rw("k007232_1", FUNC(k007232_device::read), FUNC(k007232_device::write)); // K007232 (Reading offset 5/b triggers the sample) map(0xc000, 0xc001).rw("ymsnd", FUNC(ym2151_device::read), FUNC(ym2151_device::write)); @@ -1068,6 +1056,8 @@ adc0804_device &adc(ADC0804(config, "adc", 640000)); // unknown "ADCCLK" (generated on video board?) adc.vin_callback().set(FUNC(wecleman_state::selected_ip_r)); + KONAMI_007452_MATH(config, "k007452"); + /* video hardware */ SCREEN(config, m_screen, SCREEN_TYPE_RASTER); m_screen->set_refresh_hz(60); diff -Nru mame-0.230+dfsg.1/src/mame/drivers/wy85.cpp mame-0.231+dfsg.1/src/mame/drivers/wy85.cpp --- mame-0.230+dfsg.1/src/mame/drivers/wy85.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/wy85.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -171,7 +171,10 @@ ROM_START(wy85) ROM_REGION(0x4000, "maincpu", 0) - ROM_LOAD("250151-04_reva.5e", 0x0000, 0x4000, CRC(8fcb9f43) SHA1(6c7e1d27fa6014870c29ab2b8b856ae412bfc411)) // 27128 + ROM_SYSTEM_BIOS(0, "revd", "Rev. D") + ROMX_LOAD("23-121-r7d.5e", 0x0000, 0x4000, CRC(76203960) SHA1(ea58c7337435edb06d2d5434886a67045e96bf1f), ROM_BIOS(0)) + ROM_SYSTEM_BIOS(1, "reva", "Rev. A") + ROMX_LOAD("250151-04_reva.5e", 0x0000, 0x4000, CRC(8fcb9f43) SHA1(6c7e1d27fa6014870c29ab2b8b856ae412bfc411), ROM_BIOS(1)) // 27128 ROM_REGION(0x2000, "chargen", 0) ROM_LOAD("am9265.1h", 0x0000, 0x2000, CRC(5ee65b55) SHA1(a0b38a38838f262aaea22d212351e7441e4b07e8)) // AM9265EPC diff -Nru mame-0.230+dfsg.1/src/mame/drivers/ymmu100.cpp mame-0.231+dfsg.1/src/mame/drivers/ymmu100.cpp --- mame-0.230+dfsg.1/src/mame/drivers/ymmu100.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/ymmu100.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -176,6 +176,7 @@ void regs_int_read_tap(offs_t address, u16 data, u16 mem_mask); void regs_int_write_tap(offs_t address, u16 data, u16 mem_mask); void voice_write_tap(offs_t address, u16 data, u16 mem_mask); + void voice_read_tap(offs_t address, u16 data, u16 mem_mask); void chan_write_tap(offs_t address, u16 data, u16 mem_mask); void prg_write_tap(offs_t address, u16 data, u16 mem_mask); @@ -188,10 +189,14 @@ m_maincpu->space(0).install_write_tap(0x20cb10, 0x20cb10 + 0x122*0x22 - 1, "chan debug", [this](offs_t offset, u16 &data, u16 mem_mask) { chan_write_tap(offset, data, mem_mask); }); - if(0) + if(1) m_maincpu->space(0).install_write_tap(0x20f03e, 0x20f03e + 0x92*0x40 - 1, "voice debug", [this](offs_t offset, u16 &data, u16 mem_mask) { voice_write_tap(offset, data, mem_mask); }); + if(1) + m_maincpu->space(0).install_read_tap(0x20f03e, 0x20f03e + 0x92*0x40 - 1, "voice debug", [this](offs_t offset, u16 &data, u16 mem_mask) { + voice_read_tap(offset, data, mem_mask); + }); if(0) m_maincpu->space(0).install_readwrite_tap(0x214ca2+0x20, 0x214ca2+0x320-1, "regs fp", [this](offs_t offset, u16 &data, u16 mem_mask) { @@ -411,20 +416,71 @@ logerror("regs_int_w %03x, %04x @ %04x (%06x)\n", reg, data, mem_mask, pc); } +struct xmap { + int slot; + const char *name; +}; + +static xmap vmap[] = { + { 0x00, "instrumenthi" }, + { 0x02, "instrumentlo" }, + { 0x04, "midi_channelhi" }, + { 0x06, "midi_channello" }, + { 0x0c, "lpf_cutoff" }, + { 0x42, "delay_time" }, + { 0x48, "active" }, + { 0x4a, "velocity" }, + { 0x51, "inverse_velocity" }, + { -1, "" }, +}; + void mu100_state::voice_write_tap(offs_t address, u16 data, u16 mem_mask) { offs_t pc = m_maincpu->pc(); offs_t off = address - 0x20f03e; int voice = off / 0x92; int slot = off % 0x92; + + if(mem_mask == 0xff00) + data >>= 8; + else if(mem_mask == 0x00ff) + slot++; + + std::string slotname = util::string_format("%02x", slot); + for(int i=0; vmap[i].slot != -1; i++) + if(vmap[i].slot == slot) + slotname = vmap[i].name; + + if(mem_mask == 0xffff) { + logerror("voice_w %02x:%s, %04x (%06x)\n", voice, slotname, data, pc); + } else { + logerror("voice_w %02x:%s, %02x (%06x)\n", voice, slotname, data, pc); + } +} + +void mu100_state::voice_read_tap(offs_t address, u16 data, u16 mem_mask) +{ + offs_t pc = m_maincpu->pc(); + offs_t off = address - 0x20f03e; + int voice = off / 0x92; + int slot = off % 0x92; + + logerror("off %x voice %x slot %x mask %04x\n", off, voice, slot, mem_mask); + data &= mem_mask; + if(mem_mask == 0xff00) + data >>= 8; + else if(mem_mask == 0x00ff) + slot++; + + std::string slotname = util::string_format("%02x", slot); + for(int i=0; vmap[i].slot != -1; i++) + if(vmap[i].slot == slot) + slotname = vmap[i].name; + if(mem_mask == 0xffff) { - logerror("voice_w %02x:%02x, %04x (%06x)\n", voice, slot, data, pc); + logerror("voice_r %02x:%s, %04x (%06x)\n", voice, slotname, data, pc); } else { - if(mem_mask == 0xff00) - data >>= 8; - else - slot++; - logerror("voice_w %02x:%02x, %02x (%06x)\n", voice, slot, data, pc); + logerror("voice_r %02x:%s, %02x (%06x)\n", voice, slotname, data, pc); } } diff -Nru mame-0.230+dfsg.1/src/mame/drivers/yunsun16.cpp mame-0.231+dfsg.1/src/mame/drivers/yunsun16.cpp --- mame-0.230+dfsg.1/src/mame/drivers/yunsun16.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/yunsun16.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -93,7 +93,7 @@ #include "cpu/m68000/m68000.h" #include "cpu/z80/z80.h" #include "sound/okim6295.h" -#include "sound/3812intf.h" +#include "sound/ym3812.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/drivers/yunsung8.cpp mame-0.231+dfsg.1/src/mame/drivers/yunsung8.cpp --- mame-0.230+dfsg.1/src/mame/drivers/yunsung8.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/drivers/yunsung8.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -32,7 +32,7 @@ #include "cpu/z80/z80.h" #include "machine/gen_latch.h" -#include "sound/3812intf.h" +#include "sound/ym3812.h" #include "screen.h" #include "speaker.h" diff -Nru mame-0.230+dfsg.1/src/mame/includes/alpha68k.h mame-0.231+dfsg.1/src/mame/includes/alpha68k.h --- mame-0.230+dfsg.1/src/mame/includes/alpha68k.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/includes/alpha68k.h 2021-04-27 15:32:05.000000000 +0000 @@ -13,11 +13,11 @@ #include "cpu/m68000/m68000.h" #include "cpu/mcs48/mcs48.h" #include "cpu/z80/z80.h" -#include "sound/3812intf.h" #include "sound/ay8910.h" #include "sound/dac.h" #include "sound/ym2203.h" #include "sound/ym2413.h" +#include "sound/ym3812.h" #include "machine/74259.h" #include "machine/gen_latch.h" #include "video/snk68_spr.h" diff -Nru mame-0.230+dfsg.1/src/mame/includes/battlane.h mame-0.231+dfsg.1/src/mame/includes/battlane.h --- mame-0.230+dfsg.1/src/mame/includes/battlane.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/includes/battlane.h 2021-04-27 15:32:05.000000000 +0000 @@ -12,15 +12,24 @@ class battlane_state : public driver_device { public: - battlane_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), + battlane_state(const machine_config &mconfig, device_type type, const char *tag) : + driver_device(mconfig, type, tag), m_tileram(*this, "tileram"), m_spriteram(*this, "spriteram"), m_maincpu(*this, "maincpu"), m_subcpu(*this, "sub"), m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette") { } + m_palette(*this, "palette") + { } + void battlane(machine_config &config); + +protected: + virtual void machine_start() override; + virtual void machine_reset() override; + virtual void video_start() override; + +private: /* memory pointers */ required_shared_ptr m_tileram; required_shared_ptr m_spriteram; @@ -47,13 +56,9 @@ void battlane_video_ctrl_w(uint8_t data); TILE_GET_INFO_MEMBER(get_tile_info_bg); TILEMAP_MAPPER_MEMBER(battlane_tilemap_scan_rows_2x2); - virtual void machine_start() override; - virtual void machine_reset() override; - virtual void video_start() override; uint32_t screen_update_battlane(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(battlane_cpu1_interrupt); - void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); - void draw_fg_bitmap( bitmap_ind16 &bitmap ); - void battlane(machine_config &config); + void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); + void draw_fg_bitmap(bitmap_ind16 &bitmap, const rectangle &cliprect); void battlane_map(address_map &map); }; diff -Nru mame-0.230+dfsg.1/src/mame/includes/bbusters.h mame-0.231+dfsg.1/src/mame/includes/bbusters.h --- mame-0.230+dfsg.1/src/mame/includes/bbusters.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/includes/bbusters.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,115 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Bryan McPhail -#ifndef MAME_INCLUDES_BBUSTERS_H -#define MAME_INCLUDES_BBUSTERS_H - -#pragma once - -#include "machine/gen_latch.h" -#include "video/bufsprite.h" -#include "screen.h" -#include "tilemap.h" - -class bbusters_state_base : public driver_device -{ -protected: - bbusters_state_base(const machine_config &mconfig, device_type type, const char *tag) : - driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_audiocpu(*this, "audiocpu"), - m_gfxdecode(*this, "gfxdecode"), - m_spriteram(*this, "spriteram%u", 1U), - m_soundlatch(*this, "soundlatch%u", 1U), - m_videoram(*this, "videoram"), - m_pf_data(*this, "pf%u_data", 1U), - m_pf_scroll_data(*this, "pf%u_scroll_data", 1U), - m_scale_table(*this, "scale_table"), - m_gun_io(*this, { "GUNX1", "GUNY1", "GUNX2", "GUNY2", "GUNX3", "GUNY3" }), - m_gun_recoil(*this, "Player%u_Gun_Recoil", 1U) - { } - - required_device m_maincpu; - required_device m_audiocpu; - required_device m_gfxdecode; - optional_device_array m_spriteram; - required_device_array m_soundlatch; - - required_shared_ptr m_videoram; - required_shared_ptr_array m_pf_data; - required_shared_ptr_array m_pf_scroll_data; - - required_region_ptr m_scale_table; - - optional_ioport_array<6> m_gun_io; - output_finder<3> m_gun_recoil; - - tilemap_t *m_fix_tilemap; - tilemap_t *m_pf_tilemap[2]; - const uint8_t *m_scale_table_ptr; - uint8_t m_scale_line_count; - - virtual void machine_start() override; - virtual void video_start() override; - - TILE_GET_INFO_MEMBER(get_tile_info); - template TILE_GET_INFO_MEMBER(get_pf_tile_info); - - void sound_cpu_w(uint8_t data); - void video_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - template void pf_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - void coin_counter_w(uint8_t data); - - const uint8_t *get_source_ptr(gfx_element *gfx, uint32_t sprite, int dx, int dy, int block); - void draw_block(screen_device &screen, bitmap_ind16 &dest,int x,int y,int size,int flipx,int flipy,uint32_t sprite,int color,int bank,int block,int priority); - void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const uint16_t *source, int bank); - - void sound_map(address_map &map); -}; - -class bbusters_state : public bbusters_state_base -{ -public: - bbusters_state(const machine_config &mconfig, device_type type, const char *tag) : - bbusters_state_base(mconfig, type, tag), - m_eprom_data(*this, "eeprom") - { } - - void bbusters(machine_config &config); - -protected: - virtual void machine_start() override; - virtual void video_start() override; - -private: - required_shared_ptr m_eprom_data; - - uint16_t eprom_r(offs_t offset); - void three_gun_output_w(uint16_t data); - - uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void bbusters_map(address_map &map); - void sound_portmap(address_map &map); -}; - -class mechatt_state : public bbusters_state_base -{ -public: - mechatt_state(const machine_config &mconfig, device_type type, const char *tag) : - bbusters_state_base(mconfig, type, tag) - { } - - void mechatt(machine_config &config); - -protected: - virtual void video_start() override; - -private: - void two_gun_output_w(uint16_t data); - uint16_t mechatt_gun_r(offs_t offset); - - uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void mechatt_map(address_map &map); - void sounda_portmap(address_map &map); -}; - -#endif // MAME_INCLUDES_BBUSTERS_H diff -Nru mame-0.230+dfsg.1/src/mame/includes/bloodbro.h mame-0.231+dfsg.1/src/mame/includes/bloodbro.h --- mame-0.230+dfsg.1/src/mame/includes/bloodbro.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/includes/bloodbro.h 2021-04-27 15:32:05.000000000 +0000 @@ -6,7 +6,7 @@ #pragma once #include "audio/seibu.h" -#include "sound/3812intf.h" +#include "sound/ym3812.h" #include "emupal.h" #include "screen.h" #include "tilemap.h" diff -Nru mame-0.230+dfsg.1/src/mame/includes/bublbobl.h mame-0.231+dfsg.1/src/mame/includes/bublbobl.h --- mame-0.230+dfsg.1/src/mame/includes/bublbobl.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/includes/bublbobl.h 2021-04-27 15:32:05.000000000 +0000 @@ -9,8 +9,8 @@ #include "cpu/mcs48/mcs48.h" #include "machine/input_merger.h" #include "machine/gen_latch.h" -#include "sound/3526intf.h" #include "sound/ym2203.h" +#include "sound/ym3526.h" #include "emupal.h" #include "screen.h" diff -Nru mame-0.230+dfsg.1/src/mame/includes/calomega.h mame-0.231+dfsg.1/src/mame/includes/calomega.h --- mame-0.230+dfsg.1/src/mame/includes/calomega.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/includes/calomega.h 2021-04-27 15:32:05.000000000 +0000 @@ -1,13 +1,23 @@ // license:BSD-3-Clause -// copyright-holders:Roberto Fresca +// copyright-holders: Roberto Fresca + #ifndef MAME_INCLUDES_CALOMEGA_H #define MAME_INCLUDES_CALOMEGA_H #pragma once +#include "cpu/m6502/m6502.h" +#include "cpu/m6502/r65c02.h" +#include "machine/nvram.h" +#include "machine/timer.h" #include "machine/6821pia.h" #include "machine/6850acia.h" #include "machine/clock.h" +#include "machine/ticket.h" +#include "sound/ay8910.h" +#include "video/mc6845.h" +#include "screen.h" +#include "speaker.h" #include "emupal.h" #include "tilemap.h" @@ -24,6 +34,7 @@ m_palette(*this, "palette"), m_videoram(*this, "videoram"), m_colorram(*this, "colorram"), + m_hopper(*this, "hopper"), m_in0(*this, "IN0"), m_in0_0(*this, "IN0-0"), m_in0_1(*this, "IN0-1"), @@ -32,12 +43,17 @@ m_frq(*this, "FRQ"), m_sw2(*this, "SW2"), m_lamps(*this, "lamp%u", 1U) - { } + { + } void init_sys903(); void init_comg080(); void init_s903mod(); void init_sys905(); + void init_comg5108(); + void init_cas21iwc(); + void init_pokeriwc(); + void init_any(); void sys905(machine_config &config); void s903mod(machine_config &config); @@ -55,22 +71,38 @@ void s903_mux_w(uint8_t data); uint8_t s905_mux_port_r(); void s905_mux_w(uint8_t data); - uint8_t pia0_ain_r(); uint8_t pia0_bin_r(); void pia0_aout_w(uint8_t data); void pia0_bout_w(uint8_t data); - DECLARE_WRITE_LINE_MEMBER(pia0_ca2_w); uint8_t pia1_ain_r(); uint8_t pia1_bin_r(); + uint8_t dummy_pia_r(); void pia1_aout_w(uint8_t data); void pia1_bout_w(uint8_t data); void lamps_903a_w(uint8_t data); void lamps_903b_w(uint8_t data); void lamps_905_w(uint8_t data); + void dummy_pia_w(uint8_t data); + + DECLARE_READ_LINE_MEMBER(timer_r); + DECLARE_READ_LINE_MEMBER(vblank_r); + DECLARE_READ_LINE_MEMBER(dummy_pia_line_r); + + DECLARE_WRITE_LINE_MEMBER(pia1_cb2_w); + DECLARE_WRITE_LINE_MEMBER(vblank0_w); + DECLARE_WRITE_LINE_MEMBER(vblank1_w); + DECLARE_WRITE_LINE_MEMBER(vblank2_w); + DECLARE_WRITE_LINE_MEMBER(dummy_pia_line_w); DECLARE_WRITE_LINE_MEMBER(write_acia_tx); DECLARE_WRITE_LINE_MEMBER(write_acia_clock); DECLARE_WRITE_LINE_MEMBER(update_aciabaud_scale); + + TIMER_DEVICE_CALLBACK_MEMBER(timer_0); + TIMER_DEVICE_CALLBACK_MEMBER(timer_1); + TIMER_DEVICE_CALLBACK_MEMBER(timer_2); + TILE_GET_INFO_MEMBER(get_bg_tile_info); + uint32_t screen_update_calomega(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); void calomega_palette(palette_device &palette) const; @@ -81,15 +113,18 @@ optional_device_array m_pia; - required_device m_maincpu; + required_device m_maincpu; optional_device m_acia6850_0; optional_device m_aciabaud; required_device m_gfxdecode; required_device m_palette; + required_shared_ptr m_videoram; required_shared_ptr m_colorram; + required_device m_hopper; + optional_ioport m_in0; optional_ioport m_in0_0; optional_ioport m_in0_1; @@ -99,9 +134,12 @@ optional_ioport m_sw2; output_finder<9> m_lamps; - uint8_t m_tx_line; + uint8_t m_vblank, m_timer, m_tx_line; int m_s903_mux_data; int m_s905_mux_data; + int m_pia_data; + bool m_lockout = false; + bool m_diverter; tilemap_t *m_bg_tilemap; }; diff -Nru mame-0.230+dfsg.1/src/mame/includes/combatsc.h mame-0.231+dfsg.1/src/mame/includes/combatsc.h --- mame-0.230+dfsg.1/src/mame/includes/combatsc.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/includes/combatsc.h 2021-04-27 15:32:05.000000000 +0000 @@ -14,6 +14,7 @@ #include "sound/upd7759.h" #include "sound/msm5205.h" #include "video/k007121.h" +#include "machine/k007452.h" #include "emupal.h" #include "screen.h" #include "tilemap.h" @@ -27,6 +28,7 @@ m_audiocpu(*this, "audiocpu"), m_k007121_1(*this, "k007121_1"), m_k007121_2(*this, "k007121_2"), + m_k007452(*this, "k007452"), m_upd7759(*this, "upd"), m_msm(*this, "msm"), m_screen(*this, "screen"), @@ -59,7 +61,6 @@ /* misc */ uint8_t m_pos[4]; uint8_t m_sign[4]; - int m_prot[2]; int m_boost; emu_timer *m_interleave_timer; @@ -69,6 +70,7 @@ required_device m_audiocpu; optional_device m_k007121_1; optional_device m_k007121_2; + optional_device m_k007452; optional_device m_upd7759; optional_device m_msm; required_device m_screen; @@ -86,10 +88,7 @@ void combatscb_bankselect_w(address_space &space, uint8_t data); void combatsc_coin_counter_w(uint8_t data); uint8_t trackball_r(offs_t offset); - void protection_w(offs_t offset, uint8_t data); - uint8_t protection_r(offs_t offset); uint8_t unk_r(); - void protection_clock_w(uint8_t data); void combatsc_sh_irqtrigger_w(uint8_t data); uint8_t combatsc_video_r(offs_t offset); void combatsc_video_w(offs_t offset, uint8_t data); diff -Nru mame-0.230+dfsg.1/src/mame/includes/contra.h mame-0.231+dfsg.1/src/mame/includes/contra.h --- mame-0.230+dfsg.1/src/mame/includes/contra.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/includes/contra.h 2021-04-27 15:32:05.000000000 +0000 @@ -11,6 +11,7 @@ #pragma once #include "video/k007121.h" +#include "machine/k007452.h" #include "emupal.h" #include "screen.h" #include "tilemap.h" @@ -31,6 +32,7 @@ m_audiocpu(*this, "audiocpu"), m_k007121_1(*this, "k007121_1"), m_k007121_2(*this, "k007121_2"), + m_k007452(*this, "k007452"), m_maincpu(*this, "maincpu"), m_gfxdecode(*this, "gfxdecode"), m_screen(*this, "screen"), @@ -61,6 +63,7 @@ required_device m_audiocpu; required_device m_k007121_1; required_device m_k007121_2; + required_device m_k007452; void contra_bankswitch_w(uint8_t data); void contra_sh_irqtrigger_w(uint8_t data); void sirq_clear_w(uint8_t data); diff -Nru mame-0.230+dfsg.1/src/mame/includes/flkatck.h mame-0.231+dfsg.1/src/mame/includes/flkatck.h --- mame-0.230+dfsg.1/src/mame/includes/flkatck.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/includes/flkatck.h 2021-04-27 15:32:05.000000000 +0000 @@ -12,6 +12,7 @@ #include "machine/gen_latch.h" #include "machine/watchdog.h" +#include "machine/k007452.h" #include "sound/k007232.h" #include "video/k007121.h" #include "tilemap.h" @@ -27,6 +28,7 @@ m_audiocpu(*this, "audiocpu"), m_k007121(*this, "k007121"), m_k007232(*this, "k007232"), + m_k007452(*this, "k007452"), m_watchdog(*this, "watchdog"), m_gfxdecode(*this, "gfxdecode"), m_soundlatch(*this, "soundlatch") @@ -45,13 +47,13 @@ /* misc */ int m_irq_enabled; - int m_multiply_reg[2]; /* devices */ required_device m_maincpu; required_device m_audiocpu; required_device m_k007121; required_device m_k007232; + required_device m_k007452; required_device m_watchdog; required_device m_gfxdecode; required_device m_soundlatch; @@ -59,8 +61,6 @@ void flkatck_bankswitch_w(uint8_t data); uint8_t flkatck_ls138_r(offs_t offset); void flkatck_ls138_w(offs_t offset, uint8_t data); - uint8_t multiply_r(); - void multiply_w(offs_t offset, uint8_t data); void vram_w(offs_t offset, uint8_t data); void flkatck_k007121_regs_w(offs_t offset, uint8_t data); TILE_GET_INFO_MEMBER(get_tile_info_A); diff -Nru mame-0.230+dfsg.1/src/mame/includes/funkyjet.h mame-0.231+dfsg.1/src/mame/includes/funkyjet.h --- mame-0.230+dfsg.1/src/mame/includes/funkyjet.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/includes/funkyjet.h 2021-04-27 15:32:05.000000000 +0000 @@ -5,11 +5,21 @@ Funky Jet *************************************************************************/ +#ifndef MAME_INCLUDES_FUNKYJET_H +#define MAME_INCLUDES_FUNKYJET_H -#include "cpu/h6280/h6280.h" -#include "video/decospr.h" -#include "video/deco16ic.h" +#pragma once + +// mame #include "machine/deco146.h" +#include "video/deco16ic.h" +#include "video/decospr.h" + +// devices +#include "cpu/h6280/h6280.h" + +// emu +#include "screen.h" class funkyjet_state : public driver_device @@ -19,6 +29,7 @@ : driver_device(mconfig, type, tag) , m_spriteram(*this, "spriteram") , m_pf_rowscroll(*this, "pf%u_rowscroll", 1) + , m_screen(*this, "screen") , m_maincpu(*this, "maincpu") , m_audiocpu(*this, "audiocpu") , m_deco146(*this, "ioprot") @@ -31,11 +42,12 @@ void init_funkyjet(); private: - /* memory pointers */ + // memory pointers required_shared_ptr m_spriteram; required_shared_ptr_array m_pf_rowscroll; - /* devices */ + // devices + required_device m_screen; required_device m_maincpu; required_device m_audiocpu; required_device m_deco146; @@ -49,3 +61,5 @@ void funkyjet_map(address_map &map); void sound_map(address_map &map); }; + +#endif // MAME_INCLUDES_FUNKYJET_H diff -Nru mame-0.230+dfsg.1/src/mame/includes/gba.h mame-0.231+dfsg.1/src/mame/includes/gba.h --- mame-0.230+dfsg.1/src/mame/includes/gba.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/includes/gba.h 2021-04-27 15:32:05.000000000 +0000 @@ -22,24 +22,25 @@ m_ldacb(*this, "ldacb"), m_rdacb(*this, "rdacb"), m_gbsound(*this, "custom"), - m_cart(*this, "cartslot"), - m_region_maincpu(*this, "maincpu"), - m_io_inputs(*this, "INPUTS"), - m_bios_hack(*this, "SKIP_CHECK") + m_io_inputs(*this, "INPUTS") { } void gbadv(machine_config &config); - void init_gbadv(); +protected: + virtual void machine_start() override; + virtual void machine_reset() override; + + required_device m_maincpu; + + void gba_map(address_map &map); private: - required_device m_maincpu; required_device m_ldaca; required_device m_rdaca; required_device m_ldacb; required_device m_rdacb; required_device m_gbsound; - required_device m_cart; void request_irq(uint32_t int_type); @@ -71,24 +72,57 @@ uint32_t gba_io_r(offs_t offset, uint32_t mem_mask = ~0); void gba_io_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); - uint32_t gba_bios_r(offs_t offset, uint32_t mem_mask = ~0); uint32_t gba_10000000_r(offs_t offset, uint32_t mem_mask = ~0); DECLARE_WRITE_LINE_MEMBER(int_hblank_callback); DECLARE_WRITE_LINE_MEMBER(int_vblank_callback); DECLARE_WRITE_LINE_MEMBER(int_vcount_callback); DECLARE_WRITE_LINE_MEMBER(dma_hblank_callback); DECLARE_WRITE_LINE_MEMBER(dma_vblank_callback); - virtual void machine_start() override; - virtual void machine_reset() override; TIMER_CALLBACK_MEMBER(dma_complete); TIMER_CALLBACK_MEMBER(timer_expire); TIMER_CALLBACK_MEMBER(handle_irq); - void gba_map(address_map &map); + required_ioport m_io_inputs; +}; + +class gba_cons_state : public gba_state +{ +public: + gba_cons_state(const machine_config &mconfig, device_type type, const char *tag) + : gba_state(mconfig, type, tag), + m_region_maincpu(*this, "maincpu"), + m_cart(*this, "cartslot"), + m_bios_hack(*this, "SKIP_CHECK") + { } + + void gbadv_cons(machine_config &config); + +protected: + virtual void machine_start() override; + + void gba_cons_map(address_map &map); + + uint32_t gba_bios_r(offs_t offset, uint32_t mem_mask = ~0); required_region_ptr m_region_maincpu; - required_ioport m_io_inputs; + required_device m_cart; required_ioport m_bios_hack; }; + +class gba_robotech_state : public gba_state +{ +public: + gba_robotech_state(const machine_config &mconfig, device_type type, const char *tag) + : gba_state(mconfig, type, tag) + { } + + void gbadv_robotech(machine_config &config); + +protected: + + void gba_robotech_map(address_map &map); +}; + + #endif diff -Nru mame-0.230+dfsg.1/src/mame/includes/kaypro.h mame-0.231+dfsg.1/src/mame/includes/kaypro.h --- mame-0.230+dfsg.1/src/mame/includes/kaypro.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/includes/kaypro.h 2021-04-27 15:32:05.000000000 +0000 @@ -80,6 +80,7 @@ DECLARE_WRITE_LINE_MEMBER(fdc_drq_w); u8 kaypro_videoram_r(offs_t offset); void kaypro_videoram_w(offs_t offset, u8 data); + static void floppy_formats(format_registration &fr); void kaypro_palette(palette_device &palette) const; uint32_t screen_update_kayproii(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); diff -Nru mame-0.230+dfsg.1/src/mame/includes/laserbat.h mame-0.231+dfsg.1/src/mame/includes/laserbat.h --- mame-0.230+dfsg.1/src/mame/includes/laserbat.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/includes/laserbat.h 2021-04-27 15:32:05.000000000 +0000 @@ -29,7 +29,14 @@ class laserbat_state_base : public driver_device { public: - laserbat_state_base(const machine_config &mconfig, device_type type, const char *tag) + void laserbat_base(machine_config &config); + void laserbat_io_map(address_map &map); + void laserbat_map(address_map &map); + +protected: + enum { TIMER_SCANLINE }; + + laserbat_state_base(const machine_config &mconfig, device_type type, const char *tag, uint8_t eff2_mask) : driver_device(mconfig, type, tag) , m_mux_ports(*this, {"ROW0", "ROW1", "SW1", "SW2"}) , m_row1(*this, "ROW1") @@ -40,39 +47,12 @@ , m_gfxmix(*this, "gfxmix") , m_pvi(*this, "pvi%u", 1U) , m_gfxdecode(*this, "gfxdecode") - , m_scanline_timer(nullptr) - , m_gfx1(nullptr) - , m_gfx2(nullptr) - , m_input_mux(0) - , m_mpx_p_1_2(false) - , m_mpx_bkeff(false) - , m_nave(false) - , m_clr_lum(0) - , m_shp(0) - , m_wcoh(0) - , m_wcov(0) - , m_abeff1(false) - , m_abeff2(false) - , m_mpx_eff2_sh(false) - , m_coleff(0) - , m_neg1(false) - , m_neg2(false) - , m_rhsc(0) - , m_whsc(0) - , m_csound1(0) - , m_csound2(0) + , m_gfx1(*this, "gfx1") + , m_gfx2(*this, "gfx2") + , m_eff2_mask(eff2_mask) { } - void init_laserbat(); - - void laserbat_base(machine_config &config); - void laserbat_io_map(address_map &map); - void laserbat_map(address_map &map); - -protected: - enum { TIMER_SCANLINE }; - // control ports void ct_io_w(uint8_t data); uint8_t rrowx_r(); @@ -93,7 +73,7 @@ virtual void csound2_w(uint8_t data); // running the video - virtual void video_start() override; + virtual void machine_start() override; uint32_t screen_update_laserbat(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; @@ -102,55 +82,57 @@ TIMER_CALLBACK_MEMBER(video_line); // input lines - required_ioport_array<4> m_mux_ports; - required_ioport m_row1; - required_ioport m_row2; + required_ioport_array<4> m_mux_ports; + required_ioport m_row1; + required_ioport m_row2; // main CPU device - required_device m_maincpu; + required_device m_maincpu; // video devices - required_device m_screen; - required_device m_palette; - required_device m_gfxmix; - required_device_array m_pvi; - required_device m_gfxdecode; + required_device m_screen; + required_device m_palette; + required_device m_gfxmix; + required_device_array m_pvi; + required_device m_gfxdecode; // stuff for rendering video - emu_timer *m_scanline_timer; - bitmap_ind16 m_bitmap; - uint8_t const *m_gfx1; - uint8_t const *m_gfx2; + required_region_ptr m_gfx1; + required_region_ptr m_gfx2; + emu_timer *m_scanline_timer = nullptr; + bitmap_ind16 m_bitmap; + uint16_t m_gfx2_base = 0; + uint8_t const m_eff2_mask; // control lines - unsigned m_input_mux; + uint8_t m_input_mux; bool m_mpx_p_1_2; // RAM used by TTL video hardware, writable by CPU - uint8_t m_bg_ram[0x400]; // background tilemap - uint8_t m_eff_ram[0x400]; // per-scanline effects (A8 not wired meaning only half is usable) - bool m_mpx_bkeff; // select between writing background and effects memory + uint8_t m_bg_ram[0x400]; // background tilemap + uint8_t m_eff_ram[0x400]; // per-scanline effects (A8 not wired meaning only half is usable) + bool m_mpx_bkeff = false; // select between writing background and effects memory // signals affecting the TTL-generated 32x32 sprite - bool m_nave; // 1-bit enable - unsigned m_clr_lum; // 3-bit colour/luminance - unsigned m_shp; // 3-bit shape - unsigned m_wcoh; // 8-bit offset horizontal - unsigned m_wcov; // 8-bit offset vertical + bool m_nave = false; // 1-bit enable + uint8_t m_clr_lum = 0; // 3-bit colour/luminance + uint8_t m_shp = 0; // 3-bit shape + uint8_t m_wcoh = 0; // 8-bit offset horizontal + uint8_t m_wcov = 0; // 8-bit offset vertical // video effects signals - bool m_abeff1; // 1-bit effect enable - bool m_abeff2; // 1-bit effect enable - bool m_mpx_eff2_sh; // 1-bit effect selection - unsigned m_coleff; // 2-bit colour effect - bool m_neg1; // 1-bit area selection - bool m_neg2; // 1-bit area selection + bool m_abeff1 = false; // 1-bit effect enable + bool m_abeff2 = false; // 1-bit effect enable + bool m_mpx_eff2_sh = false; // 1-bit effect selection + uint8_t m_coleff = 0; // 2-bit colour effect + bool m_neg1 = false; // 1-bit area selection + bool m_neg2 = false; // 1-bit area selection // sound board I/O signals - unsigned m_rhsc; // 8-bit input from J7 - unsigned m_whsc; // 8-bit output to J7 - unsigned m_csound1; // bits 1-8 on J3 - unsigned m_csound2; // bits 9-16 on J3 + uint8_t m_rhsc = 0; // 8-bit input from J7 + uint8_t m_whsc = 0; // 8-bit output to J7 + uint8_t m_csound1 = 0; // bits 1-8 on J3 + uint8_t m_csound2 = 0; // bits 9-16 on J3 }; @@ -158,11 +140,10 @@ { public: laserbat_state(const machine_config &mconfig, device_type type, const char *tag) - : laserbat_state_base(mconfig, type, tag) + : laserbat_state_base(mconfig, type, tag, 0x00) , m_csg(*this, "csg") , m_synth_low(*this, "synth_low") , m_synth_high(*this, "synth_high") - , m_keys(0) { } @@ -184,7 +165,7 @@ required_device m_synth_high; // register state - unsigned m_keys; // low octave keys 1-13 and high octave keys 2-12 (24 bits) + uint32_t m_keys = 0; // low octave keys 1-13 and high octave keys 2-12 (24 bits) }; @@ -192,7 +173,7 @@ { public: catnmous_state(const machine_config &mconfig, device_type type, const char *tag) - : laserbat_state_base(mconfig, type, tag) + : laserbat_state_base(mconfig, type, tag, 0x03) , m_audiopcb(*this, "audiopcb") { } diff -Nru mame-0.230+dfsg.1/src/mame/includes/megadriv_acbl.h mame-0.231+dfsg.1/src/mame/includes/megadriv_acbl.h --- mame-0.230+dfsg.1/src/mame/includes/megadriv_acbl.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/includes/megadriv_acbl.h 2021-04-27 15:32:05.000000000 +0000 @@ -24,7 +24,9 @@ void init_puckpkmn(); void init_hshavoc(); void init_barek2(); + void init_barek2ch(); void init_barek3(); + void init_barekch(); void init_bk3ssrmb(); void init_sonic2mb(); void init_twinktmb(); diff -Nru mame-0.230+dfsg.1/src/mame/includes/megasys1.h mame-0.231+dfsg.1/src/mame/includes/megasys1.h --- mame-0.230+dfsg.1/src/mame/includes/megasys1.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/includes/megasys1.h 2021-04-27 15:32:05.000000000 +0000 @@ -32,6 +32,7 @@ m_maincpu(*this, "maincpu"), m_audiocpu(*this, "audiocpu"), m_oki(*this, "oki%u", 1U), + m_ymsnd(*this, "ymsnd"), m_p47b_adpcm(*this, "msm%u", 1U), m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette"), @@ -96,6 +97,7 @@ required_device m_maincpu; optional_device m_audiocpu; optional_device_array m_oki; + optional_device m_ymsnd; optional_device_array m_p47b_adpcm; required_device m_gfxdecode; required_device m_palette; diff -Nru mame-0.230+dfsg.1/src/mame/includes/namcos2.h mame-0.231+dfsg.1/src/mame/includes/namcos2.h --- mame-0.230+dfsg.1/src/mame/includes/namcos2.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/includes/namcos2.h 2021-04-27 15:32:05.000000000 +0000 @@ -16,7 +16,7 @@ #include "machine/namco_c148.h" #include "machine/timer.h" #include "sound/c140.h" -#include "video/c45.h" +#include "video/namco_c45road.h" #include "video/namco_c116.h" #include "machine/namco65.h" #include "machine/namco68.h" diff -Nru mame-0.230+dfsg.1/src/mame/includes/pc88va.h mame-0.231+dfsg.1/src/mame/includes/pc88va.h --- mame-0.230+dfsg.1/src/mame/includes/pc88va.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/includes/pc88va.h 2021-04-27 15:32:05.000000000 +0000 @@ -11,7 +11,7 @@ #ifndef MAME_INCLUDES_PC88VA_H #define MAME_INCLUDES_PC88VA_H -#include "cpu/nec/nec.h" +#include "cpu/nec/v5x.h" #include "cpu/z80/z80.h" #include "imagedev/floppy.h" #include "machine/am9517a.h" diff -Nru mame-0.230+dfsg.1/src/mame/includes/pc9801.h mame-0.231+dfsg.1/src/mame/includes/pc9801.h --- mame-0.230+dfsg.1/src/mame/includes/pc9801.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/includes/pc9801.h 2021-04-27 15:32:05.000000000 +0000 @@ -113,15 +113,27 @@ { } - void pc9821v20(machine_config &config); - void pc9801ux(machine_config &config); - void pc9801vm(machine_config &config); void pc9801(machine_config &config); - void pc9801bx2(machine_config &config); + + void pc9801vm(machine_config &config); + + void pc9801ux(machine_config &config); void pc9801rs(machine_config &config); + + void pc9801bx2(machine_config &config); + void pc9821(machine_config &config); void pc9821as(machine_config &config); void pc9821ap2(machine_config &config); + void pc9821xa16(machine_config &config); + void pc9821ra20(machine_config &config); + void pc9821ra333(machine_config &config); + void pc9821v20(machine_config &config); + + void pc386m(machine_config &config); + void pc486mu(machine_config &config); + void pc486se(machine_config &config); + DECLARE_CUSTOM_INPUT_MEMBER(system_type_r); void init_pc9801_kanji(); void init_pc9801vm_kanji(); @@ -129,6 +141,14 @@ protected: virtual void video_start() override; + void pc9801_keyboard(machine_config &config); + void pc9801_mouse(machine_config &config); + void pc9801_cbus(machine_config &config); + void pc9801_sasi(machine_config &config); + void pc9801_ide(machine_config &config); + void pc9801_common(machine_config &config); + void pc9801_pit_clock(machine_config &config, const XTAL clock); + private: static void cdrom_headphones(device_t *device); @@ -314,12 +334,6 @@ uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); uint32_t a20_286(bool state); - void pc9801_keyboard(machine_config &config); - void pc9801_mouse(machine_config &config); - void pc9801_cbus(machine_config &config); - void pc9801_sasi(machine_config &config); - void pc9801_ide(machine_config &config); - void pc9801_common(machine_config &config); void ipl_bank(address_map &map); void pc9801_common_io(address_map &map); void pc9801_io(address_map &map); @@ -370,8 +384,9 @@ struct{ uint8_t control; - uint8_t lx; - uint8_t ly; + uint8_t lx, ly; + uint8_t dx, dy; + uint8_t prev_dx, prev_dy; uint8_t freq_reg; uint8_t freq_index; }m_mouse; diff -Nru mame-0.230+dfsg.1/src/mame/includes/playmark.h mame-0.231+dfsg.1/src/mame/includes/playmark.h --- mame-0.230+dfsg.1/src/mame/includes/playmark.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/includes/playmark.h 2021-04-27 15:32:05.000000000 +0000 @@ -8,6 +8,7 @@ #include "cpu/mcs51/mcs51.h" #include "cpu/pic16c5x/pic16c5x.h" #include "machine/eepromser.h" +#include "machine/gen_latch.h" #include "machine/ticket.h" #include "sound/okim6295.h" @@ -63,6 +64,7 @@ m_rowscroll(*this, "rowscroll"), m_audio_pic(*this, "audiopic"), m_audio_mcs(*this, "audiomcs"), + m_soundlatch(*this, "soundlatch"), m_eeprom(*this, "eeprom"), m_ticket(*this, "ticket"), m_token(*this, "token") @@ -119,6 +121,7 @@ // devices optional_device m_audio_pic; // all but wbeachvla; optional_device m_audio_mcs; // wbeachvla + optional_device m_soundlatch; // wbeachvla optional_device m_eeprom; // wbeachvl hotmind optional_device m_ticket; // hotmind luckboomh optional_device m_token; // hotmind luckboomh @@ -144,6 +147,8 @@ void excelsr_scroll_w(offs_t offset, u16 data, u16 mem_mask = ~0); // excelsr void hrdtimes_scroll_w(offs_t offset, u16 data, u16 mem_mask = ~0); // bigtwinb, hrdtimes, hotmind, luckboomh void playmark_oki_banking_w(u8 data); + uint8_t wbeachvla_snd_command_r(); // wbeachvla + void wbeachvla_snd_control_w(uint8_t data); // wbeachvla TILE_GET_INFO_MEMBER(bigtwin_get_tx_tile_info); // bigtwin, excelsr TILE_GET_INFO_MEMBER(bigtwin_get_fg_tile_info); // bigtwin, excelsr TILE_GET_INFO_MEMBER(wbeachvl_get_tx_tile_info); // wbeachvk @@ -180,6 +185,7 @@ void luckboomh_main_map(address_map &map); void oki_map(address_map &map); void wbeachvl_main_map(address_map &map); + void wbeachvla_main_map(address_map &map); void wbeachvl_base(machine_config &config); }; diff -Nru mame-0.230+dfsg.1/src/mame/includes/raiden2.h mame-0.231+dfsg.1/src/mame/includes/raiden2.h --- mame-0.230+dfsg.1/src/mame/includes/raiden2.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/includes/raiden2.h 2021-04-27 15:32:05.000000000 +0000 @@ -94,10 +94,10 @@ void tilemap_enable_w(offs_t offset, u16 data, u16 mem_mask = ~0); void tile_scroll_w(offs_t offset, u16 data, u16 mem_mask = ~0); - void background_w(offs_t offset, u16 data, u16 mem_mask = ~0); - void foreground_w(offs_t offset, u16 data, u16 mem_mask = ~0); - void midground_w(offs_t offset, u16 data, u16 mem_mask = ~0); - void text_w(offs_t offset, u16 data, u16 mem_mask = ~0); + void background_w(offs_t offset, u16 data); + void foreground_w(offs_t offset, u16 data); + void midground_w(offs_t offset, u16 data); + void text_w(offs_t offset, u16 data); void m_videoram_private_w(offs_t offset, uint16_t data); void bank_reset(int bgbank, int fgbank, int midbank, int txbank); diff -Nru mame-0.230+dfsg.1/src/mame/includes/simpsons.h mame-0.231+dfsg.1/src/mame/includes/simpsons.h --- mame-0.230+dfsg.1/src/mame/includes/simpsons.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/includes/simpsons.h 2021-04-27 15:32:05.000000000 +0000 @@ -6,7 +6,6 @@ #pragma once #include "cpu/m6809/konami.h" // for the callback and the firq irq definition -#include "machine/bankdev.h" #include "video/k052109.h" #include "video/k053251.h" #include "video/k053246_k053247_k055673.h" diff -Nru mame-0.230+dfsg.1/src/mame/includes/stfight.h mame-0.231+dfsg.1/src/mame/includes/stfight.h --- mame-0.230+dfsg.1/src/mame/includes/stfight.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/includes/stfight.h 2021-04-27 15:32:05.000000000 +0000 @@ -6,6 +6,7 @@ #pragma once #include "cpu/m6805/m68705.h" +#include "sound/ym2203.h" #include "sound/msm5205.h" #include "video/stfight_dev.h" #include "video/airraid_dev.h" @@ -20,6 +21,7 @@ , m_audiocpu(*this, "audiocpu") , m_mcu(*this, "mcu") , m_msm(*this, "msm") + , m_ym(*this, "ym%u", 0) , m_main_bank(*this, "mainbank") , m_samples(*this, "adpcm") , m_decrypted_opcodes(*this, "decrypted_opcodes") @@ -40,8 +42,6 @@ void cshooter(machine_config &config); void init_stfight(); - void init_empcity(); - void init_cshooter(); protected: enum @@ -87,6 +87,7 @@ required_device m_audiocpu; required_device m_mcu; required_device m_msm; + required_device_array m_ym; required_memory_bank m_main_bank; diff -Nru mame-0.230+dfsg.1/src/mame/includes/taito_z.h mame-0.231+dfsg.1/src/mame/includes/taito_z.h --- mame-0.230+dfsg.1/src/mame/includes/taito_z.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/includes/taito_z.h 2021-04-27 15:32:05.000000000 +0000 @@ -2,7 +2,6 @@ // copyright-holders:David Graves /************************************************************************* - Taito Z system *************************************************************************/ @@ -51,7 +50,8 @@ m_stickx(*this, "STICKX"), m_sticky(*this, "STICKY"), m_io_eepromout(*this, "EEPROMOUT"), - m_lamps(*this, "lamp%u", 0U) + m_lamps(*this, "lamp%u", 0U), + m_shutter_out(*this, "shutter%u", 0U) { } DECLARE_CUSTOM_INPUT_MEMBER(gas_pedal_r); @@ -101,6 +101,8 @@ s32 m_sci_int6; s32 m_ioc220_port; u8 m_eep_latch; + int m_shutter_toggle; + u8 m_shutter_control; /* devices */ required_device m_maincpu; @@ -125,6 +127,7 @@ optional_ioport m_sticky; optional_ioport m_io_eepromout; output_finder<2> m_lamps; + output_finder<2> m_shutter_out; void cpua_ctrl_w(offs_t offset, u16 data, u16 mem_mask = ~0); void chasehq_cpua_ctrl_w(offs_t offset, u16 data, u16 mem_mask = ~0); @@ -145,6 +148,7 @@ u16 sci_spriteframe_r(); void sci_spriteframe_w(u16 data); void contcirc_out_w(u8 data); + DECLARE_WRITE_LINE_MEMBER(scope_vblank); DECLARE_VIDEO_START(taitoz); DECLARE_MACHINE_START(chasehq); u32 screen_update_contcirc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); diff -Nru mame-0.230+dfsg.1/src/mame/includes/tceptor.h mame-0.231+dfsg.1/src/mame/includes/tceptor.h --- mame-0.230+dfsg.1/src/mame/includes/tceptor.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/includes/tceptor.h 2021-04-27 15:32:05.000000000 +0000 @@ -7,7 +7,7 @@ #include "cpu/m6502/m65c02.h" #include "sound/namco.h" -#include "video/c45.h" +#include "video/namco_c45road.h" #include "emupal.h" #include "screen.h" #include "tilemap.h" diff -Nru mame-0.230+dfsg.1/src/mame/includes/thomson.h mame-0.231+dfsg.1/src/mame/includes/thomson.h --- mame-0.230+dfsg.1/src/mame/includes/thomson.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/includes/thomson.h 2021-04-27 15:32:05.000000000 +0000 @@ -17,20 +17,18 @@ #include "formats/thom_cas.h" #include "formats/thom_dsk.h" #include "imagedev/cassette.h" -#include "imagedev/floppy.h" #include "machine/6821pia.h" #include "machine/6850acia.h" #include "machine/input_merger.h" #include "machine/mc6843.h" #include "machine/mc6846.h" #include "machine/mc6846.h" -#include "machine/mc6854.h" #include "machine/mos6551.h" #include "machine/ram.h" -#include "machine/thomflop.h" -#include "machine/wd_fdc.h" #include "sound/dac.h" #include "sound/mea8000.h" +#include "bus/thomson/extension.h" +#include "bus/thomson/nanoreseau.h" #include "bus/centronics/ctronics.h" #include "bus/generic/slot.h" @@ -55,7 +53,6 @@ /* bank-switching */ #define THOM_CART_BANK "bank2" /* cartridge ROM */ #define THOM_RAM_BANK "bank3" /* data RAM */ -#define THOM_FLOP_BANK "bank4" /* external floppy controller ROM */ #define THOM_BASE_BANK "bank5" /* system RAM */ /* bank-switching */ @@ -104,7 +101,6 @@ public: thomson_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), - m_mc6854(*this, "mc6854"), m_maincpu(*this, "maincpu"), m_cassette(*this, "cassette"), m_dac(*this, "dac"), @@ -117,10 +113,10 @@ m_ram(*this, RAM_TAG), m_mc6846(*this, "mc6846"), m_mc6843(*this, "mc6843"), - m_wd2793_fdc(*this, "wd2793"), m_screen(*this, "screen"), m_mainirq(*this, "mainirq"), m_mainfirq(*this, "mainfirq"), + m_extension(*this, "extension"), m_io_game_port_directions(*this, "game_port_directions"), m_io_game_port_buttons(*this, "game_port_buttons"), m_io_mouse_x(*this, "mouse_x"), @@ -132,54 +128,30 @@ m_io_config(*this, "config"), m_io_vconfig(*this, "vconfig"), m_io_mconfig(*this, "mconfig"), - m_io_fconfig(*this, "fconfig"), m_io_keyboard(*this, "keyboard.%u", 0), m_vrambank(*this, THOM_VRAM_BANK), m_cartbank(*this, THOM_CART_BANK), m_rambank(*this, THOM_RAM_BANK), - m_flopbank(*this, THOM_FLOP_BANK), m_basebank(*this, THOM_BASE_BANK), - m_syslobank(*this, TO8_SYS_LO), - m_syshibank(*this, TO8_SYS_HI), - m_datalobank(*this, TO8_DATA_LO), - m_datahibank(*this, TO8_DATA_HI), - m_biosbank(*this, TO8_BIOS_BANK), - m_cartlobank(*this, MO6_CART_LO), - m_carthibank(*this, MO6_CART_HI), m_cart_rom(*this, "cartridge"), - m_to7qdd(*this, "to7qdd"), - m_thmfc(*this, "thmfc"), - m_floppy_led(*this, "floppy"), - m_floppy_image(*this, "floppy%u", 0U), m_caps_led(*this, "led0") { } - void to9(machine_config &config); - void to7_base(machine_config &config); + void to7_base(machine_config &config, bool is_mo); void to7(machine_config &config); - void mo5e(machine_config &config); void to770a(machine_config &config); void t9000(machine_config &config); - void to8(machine_config &config); - void pro128(machine_config &config); - void mo6(machine_config &config); - void mo5(machine_config &config); - void to9p(machine_config &config); - void mo5nr(machine_config &config); void to770(machine_config &config); - void to8d(machine_config &config); void to770_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); void mo5_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); void mo5alt_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); - void to9_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); void bitmap4_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); void bitmap4alt_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); void bitmap4althalf_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); void bitmap16_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); void mode80_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); - void mode80_to9_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); void page1_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); void page2_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); void overlay_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); @@ -189,31 +161,31 @@ void to770_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); void mo5_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); void mo5alt_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); - void to9_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); void bitmap4_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); void bitmap4alt_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); void bitmap4althalf_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); void bitmap16_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); void mode80_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); - void mode80_to9_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); void page1_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); void page2_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); void overlay_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); void overlayhalf_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); void overlay3_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); void bitmap16alt_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); + void to9_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); + void mode80_to9_scandraw_16( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); + void to9_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); + void mode80_to9_scandraw_8( uint8_t* vram, uint16_t* dst, uint16_t* pal, int org, int len ); protected: - virtual void video_start() override; + emu_timer* m_mo5_periodic_timer; + uint8_t m_mo5_reg_cart; /* 0xa7cb bank switch */ -private: - static void cd90_640_formats(format_registration &fr); + virtual void video_start() override; DECLARE_DEVICE_IMAGE_LOAD_MEMBER( to7_cartridge ); - DECLARE_DEVICE_IMAGE_LOAD_MEMBER( mo5_cartridge ); DECLARE_WRITE_LINE_MEMBER( to7_set_cassette_motor ); - DECLARE_WRITE_LINE_MEMBER( mo5_set_cassette_motor ); DECLARE_WRITE_LINE_MEMBER( thom_dev_irq_0 ); void to7_cartridge_w(offs_t offset, uint8_t data); uint8_t to7_cartridge_r(offs_t offset); @@ -249,102 +221,12 @@ DECLARE_MACHINE_RESET( to770 ); DECLARE_MACHINE_START( to770 ); void to7_lightpen_cb( int step ); - void mo5_lightpen_cb( int step ); - TIMER_CALLBACK_MEMBER( mo5_periodic_cb ); - void mo5_sys_porta_out(uint8_t data); - uint8_t mo5_sys_porta_in(); - uint8_t mo5_sys_portb_in(); - uint8_t mo5_gatearray_r(offs_t offset); - void mo5_gatearray_w(offs_t offset, uint8_t data); - void mo5_update_cart_bank_postload(); - void mo5_cartridge_w(offs_t offset, uint8_t data); - uint8_t mo5_cartridge_r(offs_t offset); - void mo5_ext_w(uint8_t data); - DECLARE_MACHINE_RESET( mo5 ); - DECLARE_MACHINE_START( mo5 ); - void to9_ieee_w(offs_t offset, uint8_t data); - uint8_t to9_ieee_r(offs_t offset); - uint8_t to9_gatearray_r(offs_t offset); - void to9_gatearray_w(offs_t offset, uint8_t data); - uint8_t to9_vreg_r(offs_t offset); - void to9_vreg_w(offs_t offset, uint8_t data); - void to9_update_cart_bank_postload(); - void to9_cartridge_w(offs_t offset, uint8_t data); - uint8_t to9_cartridge_r(offs_t offset); - void to9_update_ram_bank_postload(); - uint8_t to9_kbd_r(offs_t offset); - void to9_kbd_w(offs_t offset, uint8_t data); - TIMER_CALLBACK_MEMBER( to9_kbd_timer_cb ); - uint8_t to9_sys_porta_in(); - void to9_sys_porta_out(uint8_t data); - void to9_sys_portb_out(uint8_t data); - void to9_timer_port_out(uint8_t data); - DECLARE_MACHINE_RESET( to9 ); - DECLARE_MACHINE_START( to9 ); - TIMER_CALLBACK_MEMBER( to8_kbd_timer_cb ); - void to8_update_floppy_bank_postload(); - void to8_update_ram_bank_postload(); - void to8_update_cart_bank_postload(); - void to8_cartridge_w(offs_t offset, uint8_t data); - uint8_t to8_cartridge_r(offs_t offset); - uint8_t to8_floppy_r(offs_t offset); - void to8_floppy_w(offs_t offset, uint8_t data); - uint8_t to8_gatearray_r(offs_t offset); - void to8_gatearray_w(offs_t offset, uint8_t data); - uint8_t to8_vreg_r(offs_t offset); - void to8_vreg_w(offs_t offset, uint8_t data); - uint8_t to8_sys_porta_in(); - void to8_sys_portb_out(uint8_t data); - uint8_t to8_timer_port_in(); - void to8_timer_port_out(uint8_t data); - DECLARE_WRITE_LINE_MEMBER( to8_timer_cp2_out ); - void to8_lightpen_cb( int step ); - DECLARE_MACHINE_RESET( to8 ); - DECLARE_MACHINE_START( to8 ); - uint8_t to9p_timer_port_in(); - void to9p_timer_port_out(uint8_t data); - DECLARE_MACHINE_RESET( to9p ); - DECLARE_MACHINE_START( to9p ); - void mo6_update_ram_bank_postload(); - void mo6_update_cart_bank_postload(); - void mo6_cartridge_w(offs_t offset, uint8_t data); - uint8_t mo6_cartridge_r(offs_t offset); - void mo6_ext_w(uint8_t data); - DECLARE_WRITE_LINE_MEMBER( mo6_centronics_busy ); - void mo6_game_porta_out(uint8_t data); - DECLARE_WRITE_LINE_MEMBER( mo6_game_cb2_out ); - TIMER_CALLBACK_MEMBER( mo6_game_update_cb ); - uint8_t mo6_sys_porta_in(); - uint8_t mo6_sys_portb_in(); - void mo6_sys_porta_out(uint8_t data); - DECLARE_WRITE_LINE_MEMBER( mo6_sys_cb2_out ); - uint8_t mo6_gatearray_r(offs_t offset); - void mo6_gatearray_w(offs_t offset, uint8_t data); - uint8_t mo6_vreg_r(offs_t offset); - void mo6_vreg_w(offs_t offset, uint8_t data); - DECLARE_MACHINE_RESET( mo6 ); - DECLARE_MACHINE_START( mo6 ); - uint8_t mo5nr_net_r(offs_t offset); - void mo5nr_net_w(offs_t offset, uint8_t data); - uint8_t mo5nr_prn_r(); - void mo5nr_prn_w(uint8_t data); - uint8_t mo5nr_sys_portb_in(); - void mo5nr_sys_porta_out(uint8_t data); - DECLARE_MACHINE_RESET( mo5nr ); - DECLARE_MACHINE_START( mo5nr ); TIMER_CALLBACK_MEMBER( thom_lightpen_step ); TIMER_CALLBACK_MEMBER( thom_scanline_start ); uint32_t screen_update_thom(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void to7_vram_w(offs_t offset, uint8_t data); void to770_vram_w(offs_t offset, uint8_t data); - void to8_sys_lo_w(offs_t offset, uint8_t data); - void to8_sys_hi_w(offs_t offset, uint8_t data); - void to8_data_lo_w(offs_t offset, uint8_t data); - void to8_data_hi_w(offs_t offset, uint8_t data); - void to8_vcart_w(offs_t offset, uint8_t data); - void mo6_vcart_lo_w(offs_t offset, uint8_t data); - void mo6_vcart_hi_w(offs_t offset, uint8_t data); TIMER_CALLBACK_MEMBER( thom_set_init ); DECLARE_WRITE_LINE_MEMBER(thom_vblank); @@ -357,37 +239,13 @@ TIMER_CALLBACK_MEMBER( ans3 ); TIMER_CALLBACK_MEMBER( ans2 ); TIMER_CALLBACK_MEMBER( ans ); - uint8_t to7_network_r(offs_t offset); - void to7_network_w(offs_t offset, uint8_t data); - uint8_t to7_floppy_r(offs_t offset); - void to7_floppy_w(offs_t offset, uint8_t data); - uint8_t to9_floppy_r(offs_t offset); - void to9_floppy_w(offs_t offset, uint8_t data); - WRITE_LINE_MEMBER( fdc_index_0_w); - WRITE_LINE_MEMBER( fdc_index_1_w); - WRITE_LINE_MEMBER( fdc_index_2_w); - WRITE_LINE_MEMBER( fdc_index_3_w); - void thomson_index_callback(int index, int state); void thom_palette(palette_device &palette); - void mo5_palette(palette_device &palette); - - optional_device m_mc6854; - - DECLARE_WRITE_LINE_MEMBER(write_centronics_busy); int m_centronics_busy; int m_centronics_perror; - void to7_network_got_frame(uint8_t *data, int length); - - void mo5_map(address_map &map); - void mo5nr_map(address_map &map); - void mo6_map(address_map &map); void to7_map(address_map &map); void to770_map(address_map &map); - void to8_map(address_map &map); - void to9_map(address_map &map); - void to9p_map(address_map &map); required_device m_maincpu; required_device m_cassette; @@ -401,10 +259,10 @@ required_device m_ram; optional_device m_mc6846; optional_device m_mc6843; - required_device m_wd2793_fdc; required_device m_screen; required_device m_mainirq; required_device m_mainfirq; + required_device m_extension; required_ioport m_io_game_port_directions; required_ioport m_io_game_port_buttons; required_ioport m_io_mouse_x; @@ -416,34 +274,19 @@ required_ioport m_io_config; required_ioport m_io_vconfig; optional_ioport m_io_mconfig; - required_ioport m_io_fconfig; required_ioport_array<10> m_io_keyboard; required_memory_bank m_vrambank; optional_memory_bank m_cartbank; optional_memory_bank m_rambank; - required_memory_bank m_flopbank; required_memory_bank m_basebank; - required_memory_bank m_syslobank; - optional_memory_bank m_syshibank; - optional_memory_bank m_datalobank; - optional_memory_bank m_datahibank; - optional_memory_bank m_biosbank; - optional_memory_bank m_cartlobank; - optional_memory_bank m_carthibank; required_region_ptr m_cart_rom; - required_device m_to7qdd; - required_device m_thmfc; - output_finder<> m_floppy_led; - required_device_array m_floppy_image; - output_finder<> m_caps_led; /* bank logging and optimisations */ int m_old_cart_bank; int m_old_cart_bank_was_read_only; int m_old_ram_bank; - int m_old_floppy_bank; /* buffer storing demodulated bits, only for k7 and with speed hack */ uint32_t m_to7_k7_bitsize; uint8_t* m_to7_k7_bits; @@ -457,43 +300,6 @@ emu_timer* m_to7_game_timer; uint8_t m_to7_game_sound; uint8_t m_to7_game_mute; - emu_timer* m_mo5_periodic_timer; - uint8_t m_mo5_reg_cart; /* 0xa7cb bank switch */ - uint8_t m_to9_palette_data[32]; - uint8_t m_to9_palette_idx; - uint8_t m_to9_soft_bank; - uint8_t m_to9_kbd_parity; /* 0=even, 1=odd, 2=no parity */ - uint8_t m_to9_kbd_intr; /* interrupt mode */ - uint8_t m_to9_kbd_in; /* data from keyboard */ - uint8_t m_to9_kbd_status; /* status */ - uint8_t m_to9_kbd_overrun; /* character lost */ - uint8_t m_to9_kbd_periph; /* peripheral mode */ - uint8_t m_to9_kbd_byte_count; /* byte-count in peripheral mode */ - uint16_t m_to9_mouse_x; - uint16_t m_to9_mouse_y; - uint8_t m_to9_kbd_last_key; /* for key repetition */ - uint16_t m_to9_kbd_key_count; - uint8_t m_to9_kbd_caps; /* caps-lock */ - uint8_t m_to9_kbd_pad; /* keypad outputs special codes */ - emu_timer* m_to9_kbd_timer; - uint8_t m_to8_kbd_ack; /* 1 = cpu inits / accepts transfers */ - uint16_t m_to8_kbd_data; /* data to transmit */ - uint16_t m_to8_kbd_step; /* transmission automaton state */ - uint8_t m_to8_kbd_last_key; /* last key (for repetition) */ - uint32_t m_to8_kbd_key_count; /* keypress time (for repetition) */ - uint8_t m_to8_kbd_caps; /* caps lock */ - emu_timer* m_to8_kbd_timer; /* bit-send */ - emu_timer* m_to8_kbd_signal; /* signal from CPU */ - uint8_t m_to8_data_vpage; - uint8_t m_to8_cart_vpage; - uint8_t m_to8_reg_ram; - uint8_t m_to8_reg_cart; - uint8_t m_to8_reg_sys1; - uint8_t m_to8_reg_sys2; - uint8_t m_to8_lightpen_intr; - uint8_t m_to8_soft_select; - uint8_t m_to8_soft_bank; - uint8_t m_to8_bios_bank; /* We allow choosing dynamically: - the border size @@ -516,7 +322,7 @@ /* called thom_lightpen_nb times */ emu_timer *m_thom_lightpen_timer; /* lightpen callback function to call from timer */ - void (thomson_state::*m_thom_lightpen_cb)(int step); + std::function m_thom_lightpen_cb; uint8_t* m_thom_vram; /* pointer to video memory */ emu_timer* m_thom_scanline_timer; /* scan-line update */ uint16_t m_thom_last_pal[16]; /* palette at last scanline start */ @@ -546,19 +352,10 @@ bool m_thom_vstate_dirty; bool m_thom_vstate_last_dirty; uint32_t m_thom_mode_point; - uint32_t m_thom_floppy_wcount; - uint32_t m_thom_floppy_rcount; emu_timer *m_thom_init_timer; void (thomson_state::*m_thom_init_cb)( int init ); - uint8_t m_to7_controller_type; - uint8_t m_to7_floppy_bank; - uint8_t m_to7_5p14_select; - uint8_t m_to7_5p14sd_select; - int to7_get_cassette(); - int mo5_get_cassette(); - void mo5_set_cassette( int data ); void thom_irq_reset(); void to7_update_cart_bank(); void to7_set_init( int init ); @@ -571,8 +368,190 @@ void to7_midi_reset(); void to7_midi_init(); void to770_update_ram_bank(); + + TIMER_CALLBACK_MEMBER( mo5_periodic_cb ); + int mo5_get_cassette(); + void mo5_set_cassette( int data ); void mo5_init_timer(); + + bool update_screen_size(); + unsigned thom_video_elapsed(); + struct thom_vsignal thom_get_vsignal(); + void thom_get_lightpen_pos( int*x, int* y ); + struct thom_vsignal thom_get_lightpen_vsignal( int xdec, int ydec, int xdec2 ); + void thom_set_lightpen_callback( int nb ); + int thom_mode_is_hires( int mode ); + void thom_border_changed(); + void thom_gplinfo_changed(); + void thom_set_border_color( unsigned index ); + void thom_set_palette( unsigned index, uint16_t color ); + void thom_set_video_mode( unsigned mode ); + void thom_set_video_page( unsigned page ); + void thom_set_mode_point( int point ); + unsigned to7_lightpen_gpl( int decx, int decy ); + void thom_configure_palette( double gamma, const uint16_t* pal, palette_device& palette ); + + DECLARE_WRITE_LINE_MEMBER( mo5_set_cassette_motor ); + DECLARE_DEVICE_IMAGE_LOAD_MEMBER( mo5_cartridge ); +}; + +class mo5_state : public thomson_state +{ +public: + mo5_state(const machine_config &mconfig, device_type type, const char *tag) : + thomson_state(mconfig, type, tag) + { + } + + void mo5(machine_config &config); + void mo5e(machine_config &config); + +protected: + void mo5_lightpen_cb( int step ); + void mo5_sys_porta_out(uint8_t data); + uint8_t mo5_sys_porta_in(); + uint8_t mo5_sys_portb_in(); + uint8_t mo5_gatearray_r(offs_t offset); + void mo5_gatearray_w(offs_t offset, uint8_t data); + void mo5_update_cart_bank_postload(); + void mo5_cartridge_w(offs_t offset, uint8_t data); + uint8_t mo5_cartridge_r(offs_t offset); + void mo5_ext_w(uint8_t data); + DECLARE_MACHINE_RESET( mo5 ); + DECLARE_MACHINE_START( mo5 ); + + void mo5_palette(palette_device &palette); + + void mo5_map(address_map &map); + void mo5_update_cart_bank(); +}; + +class to9_state : public thomson_state +{ +public: + to9_state(const machine_config &mconfig, device_type type, const char *tag) : + thomson_state(mconfig, type, tag), + m_syslobank(*this, TO8_SYS_LO), + m_syshibank(*this, TO8_SYS_HI), + m_datalobank(*this, TO8_DATA_LO), + m_datahibank(*this, TO8_DATA_HI), + m_biosbank(*this, TO8_BIOS_BANK) + { + } + + void to8(machine_config &config); + void to8d(machine_config &config); + void to9(machine_config &config); + void to9p(machine_config &config); + +protected: + required_memory_bank m_syslobank; + optional_memory_bank m_syshibank; + optional_memory_bank m_datalobank; + optional_memory_bank m_datahibank; + optional_memory_bank m_biosbank; + + uint8_t m_to8_kbd_ack; /* 1 = cpu inits / accepts transfers */ + uint16_t m_to8_kbd_data; /* data to transmit */ + uint16_t m_to8_kbd_step; /* transmission automaton state */ + uint8_t m_to8_kbd_last_key; /* last key (for repetition) */ + uint32_t m_to8_kbd_key_count; /* keypress time (for repetition) */ + uint8_t m_to8_kbd_caps; /* caps lock */ + emu_timer* m_to8_kbd_timer; /* bit-send */ + emu_timer* m_to8_kbd_signal; /* signal from CPU */ + uint8_t m_to8_data_vpage; + uint8_t m_to8_cart_vpage; + uint8_t m_to8_reg_ram; + uint8_t m_to8_reg_cart; + uint8_t m_to8_reg_sys1; + uint8_t m_to8_reg_sys2; + uint8_t m_to8_lightpen_intr; + uint8_t m_to8_soft_select; + uint8_t m_to8_soft_bank; + uint8_t m_to8_bios_bank; + + TIMER_CALLBACK_MEMBER( to8_kbd_timer_cb ); + void to8_update_ram_bank_postload(); + void to8_update_cart_bank_postload(); + void to8_cartridge_w(offs_t offset, uint8_t data); + uint8_t to8_cartridge_r(offs_t offset); + uint8_t to8_gatearray_r(offs_t offset); + void to8_gatearray_w(offs_t offset, uint8_t data); + uint8_t to8_vreg_r(offs_t offset); + void to8_vreg_w(offs_t offset, uint8_t data); + uint8_t to8_sys_porta_in(); + void to8_sys_portb_out(uint8_t data); + uint8_t to8_timer_port_in(); + void to8_timer_port_out(uint8_t data); + DECLARE_WRITE_LINE_MEMBER( to8_timer_cp2_out ); + void to8_lightpen_cb( int step ); + DECLARE_MACHINE_RESET( to8 ); + DECLARE_MACHINE_START( to8 ); + + DECLARE_WRITE_LINE_MEMBER(write_centronics_busy); + + void to8_sys_lo_w(offs_t offset, uint8_t data); + void to8_sys_hi_w(offs_t offset, uint8_t data); + void to8_data_lo_w(offs_t offset, uint8_t data); + void to8_data_hi_w(offs_t offset, uint8_t data); + void to8_vcart_w(offs_t offset, uint8_t data); + + int to8_kbd_ktest(); + int to8_kbd_get_key(); + void to8_kbd_timer_func(); + void to8_kbd_set_ack( int data ); + void to8_kbd_reset(); + void to8_kbd_init(); + void to8_update_ram_bank(); + void to8_update_cart_bank(); + + void to9_ieee_w(offs_t offset, uint8_t data); + uint8_t to9_ieee_r(offs_t offset); + uint8_t to9_gatearray_r(offs_t offset); + void to9_gatearray_w(offs_t offset, uint8_t data); + uint8_t to9_vreg_r(offs_t offset); + void to9_vreg_w(offs_t offset, uint8_t data); + void to9_update_cart_bank_postload(); + void to9_cartridge_w(offs_t offset, uint8_t data); + uint8_t to9_cartridge_r(offs_t offset); + void to9_update_ram_bank_postload(); + uint8_t to9_kbd_r(offs_t offset); + void to9_kbd_w(offs_t offset, uint8_t data); + TIMER_CALLBACK_MEMBER( to9_kbd_timer_cb ); + uint8_t to9_sys_porta_in(); + void to9_sys_porta_out(uint8_t data); + void to9_sys_portb_out(uint8_t data); + void to9_timer_port_out(uint8_t data); + DECLARE_MACHINE_RESET( to9 ); + DECLARE_MACHINE_START( to9 ); + uint8_t to9p_timer_port_in(); + void to9p_timer_port_out(uint8_t data); + DECLARE_MACHINE_RESET( to9p ); + DECLARE_MACHINE_START( to9p ); + + void to8_map(address_map &map); + void to9_map(address_map &map); + void to9p_map(address_map &map); + + uint8_t m_to9_palette_data[32]; + uint8_t m_to9_palette_idx; + uint8_t m_to9_soft_bank; + uint8_t m_to9_kbd_parity; /* 0=even, 1=odd, 2=no parity */ + uint8_t m_to9_kbd_intr; /* interrupt mode */ + uint8_t m_to9_kbd_in; /* data from keyboard */ + uint8_t m_to9_kbd_status; /* status */ + uint8_t m_to9_kbd_overrun; /* character lost */ + uint8_t m_to9_kbd_periph; /* peripheral mode */ + uint8_t m_to9_kbd_byte_count; /* byte-count in peripheral mode */ + uint16_t m_to9_mouse_x; + uint16_t m_to9_mouse_y; + uint8_t m_to9_kbd_last_key; /* for key repetition */ + uint16_t m_to9_kbd_key_count; + uint8_t m_to9_kbd_caps; /* caps-lock */ + uint8_t m_to9_kbd_pad; /* keypad outputs special codes */ + emu_timer* m_to9_kbd_timer; + void to9_set_video_mode( uint8_t data, int style ); void to9_palette_init(); void to9_update_cart_bank(); @@ -583,53 +562,88 @@ int to9_kbd_get_key(); void to9_kbd_reset(); void to9_kbd_init(); - int to8_kbd_ktest(); - int to8_kbd_get_key(); - void to8_kbd_timer_func(); - void to8_kbd_set_ack( int data ); - void to8_kbd_reset(); - void to8_kbd_init(); - void to8_update_floppy_bank(); - void to8_update_ram_bank(); - void to8_update_cart_bank(); - void to8_floppy_init(); - void to8_floppy_reset(); +}; + +class mo6_state : public to9_state +{ +public: + mo6_state(const machine_config &mconfig, device_type type, const char *tag) : + to9_state(mconfig, type, tag), + m_cartlobank(*this, MO6_CART_LO), + m_carthibank(*this, MO6_CART_HI) + { + } + + void mo6(machine_config &config); + void pro128(machine_config &config); + + DECLARE_MACHINE_RESET( mo6 ); + DECLARE_MACHINE_START( mo6 ); + +protected: + optional_memory_bank m_cartlobank; + optional_memory_bank m_carthibank; + + void mo6_update_ram_bank_postload(); + void mo6_update_cart_bank_postload(); + void mo6_cartridge_w(offs_t offset, uint8_t data); + uint8_t mo6_cartridge_r(offs_t offset); + void mo6_ext_w(uint8_t data); + DECLARE_WRITE_LINE_MEMBER( mo6_centronics_busy ); + void mo6_game_porta_out(uint8_t data); + DECLARE_WRITE_LINE_MEMBER( mo6_game_cb2_out ); + TIMER_CALLBACK_MEMBER( mo6_game_update_cb ); + uint8_t mo6_sys_porta_in(); + uint8_t mo6_sys_portb_in(); + void mo6_sys_porta_out(uint8_t data); + DECLARE_WRITE_LINE_MEMBER( mo6_sys_cb2_out ); + uint8_t mo6_gatearray_r(offs_t offset); + void mo6_gatearray_w(offs_t offset, uint8_t data); + uint8_t mo6_vreg_r(offs_t offset); + void mo6_vreg_w(offs_t offset, uint8_t data); + void mo6_vcart_lo_w(offs_t offset, uint8_t data); + void mo6_vcart_hi_w(offs_t offset, uint8_t data); + void mo6_map(address_map &map); void mo6_update_ram_bank(); void mo6_update_cart_bank(); void mo6_game_init(); void mo6_game_reset(); +}; + +class mo5nr_state : public mo6_state +{ +public: + mo5nr_state(const machine_config &mconfig, device_type type, const char *tag) : + mo6_state(mconfig, type, tag), + m_nanoreseau(*this, "nanoreseau"), + m_nanoreseau_config(*this, "nanoreseau_config"), + m_extension_view(*this, "extension_view") + { + } + + void mo5nr(machine_config &config); + + DECLARE_MACHINE_RESET( mo5nr ); + DECLARE_MACHINE_START( mo5nr ); + +protected: + required_device m_nanoreseau; + required_ioport m_nanoreseau_config; + memory_view m_extension_view; + + void mo5nr_map(address_map &map); + void mo5nr_game_init(); void mo5nr_game_reset(); - bool update_screen_size(); - unsigned thom_video_elapsed(); - struct thom_vsignal thom_get_vsignal(); - void thom_get_lightpen_pos( int*x, int* y ); - struct thom_vsignal thom_get_lightpen_vsignal( int xdec, int ydec, int xdec2 ); - void thom_set_lightpen_callback( int nb ); - int thom_mode_is_hires( int mode ); - void thom_border_changed(); - void thom_gplinfo_changed(); - void thom_set_border_color( unsigned index ); - void thom_set_palette( unsigned index, uint16_t color ); - void thom_set_video_mode( unsigned mode ); - void thom_set_video_page( unsigned page ); - void thom_set_mode_point( int point ); - void thom_floppy_active( int write ); - unsigned to7_lightpen_gpl( int decx, int decy ); - void thom_configure_palette( double gamma, const uint16_t* pal, palette_device& palette ); + uint8_t id_r(); - void to7_5p14_reset(); - void to7_5p14_init(); - void to7_5p14_index_pulse_callback( int state ); - void to7_5p14sd_reset(); - void to7_5p14sd_init(); - void to7_network_init(); - void to7_network_reset(); - void to7_floppy_init(); - void to7_floppy_reset(); - void to9_floppy_init(void* int_base); - void to9_floppy_reset(); + uint8_t mo5nr_net_r(offs_t offset); + void mo5nr_net_w(offs_t offset, uint8_t data); + uint8_t mo5nr_prn_r(); + void mo5nr_prn_w(uint8_t data); + uint8_t mo5nr_sys_portb_in(); + void mo5nr_sys_porta_out(uint8_t data); }; /*----------- defined in video/thomson.cpp -----------*/ diff -Nru mame-0.230+dfsg.1/src/mame/includes/toaplan1.h mame-0.231+dfsg.1/src/mame/includes/toaplan1.h --- mame-0.230+dfsg.1/src/mame/includes/toaplan1.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/includes/toaplan1.h 2021-04-27 15:32:05.000000000 +0000 @@ -11,7 +11,7 @@ #include "cpu/m68000/m68000.h" #include "cpu/tms32010/tms32010.h" -#include "sound/3812intf.h" +#include "sound/ym3812.h" #include "video/toaplan_scu.h" #include "emupal.h" #include "screen.h" diff -Nru mame-0.230+dfsg.1/src/mame/includes/trs80.h mame-0.231+dfsg.1/src/mame/includes/trs80.h --- mame-0.230+dfsg.1/src/mame/includes/trs80.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/includes/trs80.h 2021-04-27 15:32:05.000000000 +0000 @@ -9,19 +9,20 @@ #include "bus/centronics/ctronics.h" #include "cpu/z80/z80.h" -#include "machine/bankdev.h" #include "imagedev/cassette.h" #include "imagedev/floppy.h" #include "imagedev/snapquik.h" #include "machine/ay31015.h" #include "machine/clock.h" -#include "machine/i8255.h" +#include "machine/com8116.h" #include "bus/rs232/rs232.h" #include "machine/buffer.h" #include "machine/wd_fdc.h" #include "sound/spkrdev.h" #include "emupal.h" - +#include "screen.h" +#include "speaker.h" +#include "formats/trs80_dsk.h" #include "formats/trs_cas.h" @@ -34,50 +35,37 @@ , m_region_maincpu(*this, "maincpu") , m_p_chargen(*this, "chargen") , m_p_videoram(*this, "videoram") - , m_p_gfxram(*this, "gfxram") // LNW80 only - , m_lnw_bank(*this, "lnw_banked_mem") // LNW80 only , m_centronics(*this, "centronics") , m_cent_data_out(*this, "cent_data_out") , m_cent_status_in(*this, "cent_status_in") , m_uart(*this, "uart") , m_uart_clock(*this, "uart_clock") - , m_ppi(*this, "ppi") // Radionic only , m_fdc(*this, "fdc") - , m_floppy0(*this, "fdc:0") - , m_floppy1(*this, "fdc:1") - , m_floppy2(*this, "fdc:2") - , m_floppy3(*this, "fdc:3") + , m_floppy(*this, "flop%u", 0U) , m_speaker(*this, "speaker") , m_cassette(*this, "cassette") , m_io_baud(*this, "BAUD") , m_io_config(*this, "CONFIG") - , m_io_keyboard(*this, "LINE%u", 0) + , m_io_keyboard(*this, "LINE%u", 0U) { } void sys80(machine_config &config); void sys80p(machine_config &config); void trs80(machine_config &config); - void lnw80(machine_config &config); - void radionic(machine_config &config); void model1(machine_config &config); void ht1080z(machine_config &config); void init_trs80l2(); - void init_trs80(); protected: - virtual void machine_start() override; - virtual void machine_reset() override; + void machine_start() override; + void machine_reset() override; -private: - static void floppy_formats(format_registration &fr); void port_ff_w(uint8_t data); - void lnw80_fe_w(uint8_t data); void sys80_fe_w(uint8_t data); void sys80_f8_w(uint8_t data); void port_ea_w(uint8_t data); void port_e8_w(uint8_t data); - uint8_t lnw80_fe_r(); uint8_t port_ff_r(); uint8_t sys80_f9_r(); uint8_t port_ea_r(); @@ -88,65 +76,54 @@ void cassunit_w(uint8_t data); void motor_w(uint8_t data); uint8_t keyboard_r(offs_t offset); - uint8_t wd179x_r(); + u8 fdc_r(offs_t offset); + void fdc_w(offs_t offset, u8 data); INTERRUPT_GEN_MEMBER(rtc_interrupt); INTERRUPT_GEN_MEMBER(fdc_interrupt); TIMER_CALLBACK_MEMBER(cassette_data_callback); DECLARE_WRITE_LINE_MEMBER(intrq_w); DECLARE_QUICKLOAD_LOAD_MEMBER(quickload_cb); - DECLARE_MACHINE_RESET(lnw80); - void lnw80_palette(palette_device &palette) const; - uint32_t screen_update_trs80(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - uint32_t screen_update_ht1080z(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - uint32_t screen_update_lnw80(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - uint32_t screen_update_radionic(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - - void lnw80_io(address_map &map); - void lnw80_mem(address_map &map); - void lnw_banked_mem(address_map &map); - void m1_io(address_map &map); - void m1_mem(address_map &map); - void sys80_io(address_map &map); - void trs80_io(address_map &map); - void trs80_mem(address_map &map); - void ht1080z_io(address_map &map); - void radionic_mem(address_map &map); - uint8_t m_mode; - uint8_t m_irq; - uint8_t m_mask; - uint8_t m_tape_unit; - bool m_reg_load; - u8 m_lnw_mode; - bool m_cassette_data; + uint8_t m_mode = 0; + uint8_t m_irq = 0; + uint8_t m_mask = 0; + uint8_t m_tape_unit = 1; + bool m_reg_load = true; + bool m_cassette_data = false; emu_timer *m_cassette_data_timer; - double m_old_cassette_val; - uint8_t m_size_store; - uint16_t m_timeout; - floppy_image_device *m_floppy; + double m_old_cassette_val = 0; + uint8_t m_size_store = 0xFF; + uint16_t m_timeout = 600; + void trs80_io(address_map &map); + floppy_image_device *m_fdd; required_device m_maincpu; required_memory_region m_region_maincpu; required_region_ptr m_p_chargen; optional_shared_ptr m_p_videoram; - optional_shared_ptr m_p_gfxram; - optional_device m_lnw_bank; optional_device m_centronics; optional_device m_cent_data_out; optional_device m_cent_status_in; optional_device m_uart; optional_device m_uart_clock; - optional_device m_ppi; - optional_device m_fdc; - optional_device m_floppy0; - optional_device m_floppy1; - optional_device m_floppy2; - optional_device m_floppy3; + optional_device m_fdc; + optional_device_array m_floppy; required_device m_speaker; required_device m_cassette; optional_ioport m_io_baud; optional_ioport m_io_config; required_ioport_array<8> m_io_keyboard; + +private: + void m1_io(address_map &map); + void m1_mem(address_map &map); + void sys80_io(address_map &map); + void trs80_mem(address_map &map); + void ht1080z_io(address_map &map); + + uint32_t screen_update_trs80(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + uint32_t screen_update_ht1080z(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); + static void floppy_formats(format_registration &fr); }; #endif // MAME_INCLUDES_TRS80_H diff -Nru mame-0.230+dfsg.1/src/mame/includes/trs80m3.h mame-0.231+dfsg.1/src/mame/includes/trs80m3.h --- mame-0.230+dfsg.1/src/mame/includes/trs80m3.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/includes/trs80m3.h 2021-04-27 15:32:05.000000000 +0000 @@ -41,12 +41,11 @@ , m_uart(*this, "uart") , m_brg(*this, "brg") , m_fdc(*this, "fdc") - , m_floppy0(*this, "fdc:0") - , m_floppy1(*this, "fdc:1") + , m_floppy(*this, "fdc%u", 0U) , m_speaker(*this, "speaker") , m_cassette(*this, "cassette") , m_io_config(*this, "CONFIG") - , m_io_keyboard(*this, "LINE%u", 0) + , m_io_keyboard(*this, "LINE%u", 0U) , m_mainram(*this, RAM_TAG) , m_m4_bank(*this, "m4_banked_mem") , m_m4p_bank(*this, "m4p_banked_mem") @@ -130,7 +129,7 @@ bool m_wait; bool m_drq_off; bool m_intrq_off; - floppy_image_device *m_floppy; + floppy_image_device *m_fdd; required_device m_maincpu; required_memory_region m_region_maincpu; required_region_ptr m_p_chargen; @@ -142,10 +141,9 @@ optional_device m_uart; optional_device m_brg; optional_device m_fdc; - optional_device m_floppy0; - optional_device m_floppy1; + optional_device_array m_floppy; required_device m_speaker; - required_device m_cassette; + optional_device m_cassette; optional_ioport m_io_config; required_ioport_array<8> m_io_keyboard; optional_device m_mainram; diff -Nru mame-0.230+dfsg.1/src/mame/includes/wecleman.h mame-0.231+dfsg.1/src/mame/includes/wecleman.h --- mame-0.230+dfsg.1/src/mame/includes/wecleman.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/includes/wecleman.h 2021-04-27 15:32:05.000000000 +0000 @@ -8,6 +8,7 @@ #include "machine/timer.h" #include "sound/k007232.h" #include "video/k051316.h" +#include "machine/k007452.h" #include "emupal.h" #include "screen.h" #include "tilemap.h" @@ -31,6 +32,7 @@ , m_subcpu(*this, "sub") , m_k051316(*this, "k051316_%u", 1) , m_k007232(*this, "k007232_%u", 1) + , m_k007452(*this, "k007452") , m_gfxdecode(*this, "gfxdecode") , m_palette(*this, "palette") , m_screen(*this, "screen") @@ -65,7 +67,6 @@ required_region_ptr m_sprite_region; - int m_multiply_reg[2]; int m_spr_color_offs; int m_prot_state; int m_selected_ip; @@ -97,8 +98,6 @@ void selected_ip_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); uint8_t selected_ip_r(); void blitter_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - uint8_t multiply_r(); - void multiply_w(offs_t offset, uint8_t data); void wecleman_txtram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); void wecleman_pageram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); @@ -125,6 +124,7 @@ required_device m_subcpu; optional_device_array m_k051316; optional_device_array m_k007232; + optional_device m_k007452; required_device m_gfxdecode; required_device m_palette; required_device m_screen; diff -Nru mame-0.230+dfsg.1/src/mame/layout/cc40.lay mame-0.231+dfsg.1/src/mame/layout/cc40.lay --- mame-0.230+dfsg.1/src/mame/layout/cc40.lay 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/cc40.lay 2021-04-27 15:32:05.000000000 +0000 @@ -16,7 +16,7 @@ - + @@ -26,7 +26,7 @@ - + @@ -36,7 +36,7 @@ - + @@ -46,7 +46,7 @@ - + @@ -56,7 +56,7 @@ - + @@ -66,7 +66,7 @@ - + @@ -76,7 +76,7 @@ - + @@ -86,7 +86,7 @@ - + @@ -96,7 +96,7 @@ - + @@ -106,7 +106,7 @@ - + @@ -116,7 +116,7 @@ - + @@ -126,13 +126,13 @@ - + - + @@ -164,65 +164,65 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff -Nru mame-0.230+dfsg.1/src/mame/layout/chasehq.lay mame-0.231+dfsg.1/src/mame/layout/chasehq.lay --- mame-0.230+dfsg.1/src/mame/layout/chasehq.lay 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/chasehq.lay 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru mame-0.230+dfsg.1/src/mame/layout/contcirc.lay mame-0.231+dfsg.1/src/mame/layout/contcirc.lay --- mame-0.230+dfsg.1/src/mame/layout/contcirc.lay 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/contcirc.lay 2021-04-27 15:32:05.000000000 +0000 @@ -3,6 +3,13 @@ license:CC0 --> + + + + + + + @@ -51,6 +58,9 @@ + + + @@ -85,4 +95,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru mame-0.230+dfsg.1/src/mame/layout/enforceja.lay mame-0.231+dfsg.1/src/mame/layout/enforceja.lay --- mame-0.230+dfsg.1/src/mame/layout/enforceja.lay 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/enforceja.lay 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru mame-0.230+dfsg.1/src/mame/layout/enforce.lay mame-0.231+dfsg.1/src/mame/layout/enforce.lay --- mame-0.230+dfsg.1/src/mame/layout/enforce.lay 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/enforce.lay 1970-01-01 00:00:00.000000000 +0000 @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru mame-0.230+dfsg.1/src/mame/layout/finalapr.lay mame-0.231+dfsg.1/src/mame/layout/finalapr.lay --- mame-0.230+dfsg.1/src/mame/layout/finalapr.lay 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/finalapr.lay 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru mame-0.230+dfsg.1/src/mame/layout/j6guabcl.lay mame-0.231+dfsg.1/src/mame/layout/j6guabcl.lay --- mame-0.230+dfsg.1/src/mame/layout/j6guabcl.lay 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/j6guabcl.lay 2021-04-27 15:32:05.000000000 +0000 @@ -2252,7 +2252,7 @@ - + @@ -2367,107 +2367,451 @@ - + + - + + - + + - + - + + - + + - - - + + + + + - + - + + - + + - + - + + - + + - - - + + + + + - + - + + - + + - + - + + - + + - - - + + + + + - + - + + - + + - + - + + - + + - - - + + + + + - + - + + - + + - + - + + - + + - - - + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2475,19 +2819,19 @@ - + - + - + @@ -2495,19 +2839,19 @@ - + - + - + @@ -2515,99 +2859,99 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -2615,14 +2959,14 @@ - + - + @@ -2747,33 +3091,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + @@ -4922,6 +5301,15 @@ + + + + + + + + + @@ -5357,6 +5745,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5825,118 +6349,88 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - + diff -Nru mame-0.230+dfsg.1/src/mame/layout/j6impuls15.lay mame-0.231+dfsg.1/src/mame/layout/j6impuls15.lay --- mame-0.230+dfsg.1/src/mame/layout/j6impuls15.lay 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/j6impuls15.lay 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,3464 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru mame-0.230+dfsg.1/src/mame/layout/j6impulsc.lay mame-0.231+dfsg.1/src/mame/layout/j6impulsc.lay --- mame-0.230+dfsg.1/src/mame/layout/j6impulsc.lay 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/j6impulsc.lay 1970-01-01 00:00:00.000000000 +0000 @@ -1,7397 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru mame-0.230+dfsg.1/src/mame/layout/j6impuls.lay mame-0.231+dfsg.1/src/mame/layout/j6impuls.lay --- mame-0.230+dfsg.1/src/mame/layout/j6impuls.lay 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/j6impuls.lay 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,3452 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru mame-0.230+dfsg.1/src/mame/layout/j6kungfud.lay mame-0.231+dfsg.1/src/mame/layout/j6kungfud.lay --- mame-0.230+dfsg.1/src/mame/layout/j6kungfud.lay 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/j6kungfud.lay 1970-01-01 00:00:00.000000000 +0000 @@ -1,6975 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru mame-0.230+dfsg.1/src/mame/layout/j6kungfu.lay mame-0.231+dfsg.1/src/mame/layout/j6kungfu.lay --- mame-0.230+dfsg.1/src/mame/layout/j6kungfu.lay 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/j6kungfu.lay 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,2806 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru mame-0.230+dfsg.1/src/mame/layout/j6mono6010.lay mame-0.231+dfsg.1/src/mame/layout/j6mono6010.lay --- mame-0.230+dfsg.1/src/mame/layout/j6mono6010.lay 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/j6mono6010.lay 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,8024 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru mame-0.230+dfsg.1/src/mame/layout/j6mono608.lay mame-0.231+dfsg.1/src/mame/layout/j6mono608.lay --- mame-0.230+dfsg.1/src/mame/layout/j6mono608.lay 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/j6mono608.lay 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,8024 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru mame-0.230+dfsg.1/src/mame/layout/j6mono60.lay mame-0.231+dfsg.1/src/mame/layout/j6mono60.lay --- mame-0.230+dfsg.1/src/mame/layout/j6mono60.lay 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/j6mono60.lay 2021-04-27 15:32:05.000000000 +0000 @@ -874,11 +874,11 @@ - + - + @@ -1222,11 +1222,11 @@ - + - + @@ -1426,11 +1426,11 @@ - + - + @@ -1699,6 +1699,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1778,7 +1882,7 @@ - + @@ -1818,7 +1922,7 @@ - + @@ -1858,11 +1962,32 @@ - + + + + + + + + + + + + + + + + + + + + + + @@ -2106,7 +2231,7 @@ - + @@ -2126,7 +2251,7 @@ - + @@ -2146,7 +2271,7 @@ - + @@ -2166,7 +2291,7 @@ - + @@ -2186,7 +2311,7 @@ - + @@ -2206,7 +2331,7 @@ - + @@ -2226,7 +2351,7 @@ - + @@ -2246,7 +2371,7 @@ - + @@ -2310,7 +2435,7 @@ - + @@ -2477,27 +2602,27 @@ - + - + - + - + - + @@ -2606,27 +2731,27 @@ - + - + - + - + - + @@ -4832,28 +4957,28 @@ - + - + - + - + - + - + - + - + @@ -5383,6 +5508,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5431,11 +5588,17 @@ + + + + + + - + - + @@ -5498,58 +5661,58 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -5563,99 +5726,59 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + @@ -7642,58 +7765,58 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -7702,58 +7825,58 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -7762,58 +7885,58 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff -Nru mame-0.230+dfsg.1/src/mame/layout/j6montlk6.lay mame-0.231+dfsg.1/src/mame/layout/j6montlk6.lay --- mame-0.230+dfsg.1/src/mame/layout/j6montlk6.lay 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/j6montlk6.lay 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,7620 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru mame-0.230+dfsg.1/src/mame/layout/j6montlkb.lay mame-0.231+dfsg.1/src/mame/layout/j6montlkb.lay --- mame-0.230+dfsg.1/src/mame/layout/j6montlkb.lay 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/j6montlkb.lay 1970-01-01 00:00:00.000000000 +0000 @@ -1,7676 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru mame-0.230+dfsg.1/src/mame/layout/j6montlk.lay mame-0.231+dfsg.1/src/mame/layout/j6montlk.lay --- mame-0.230+dfsg.1/src/mame/layout/j6montlk.lay 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/j6montlk.lay 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,7620 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru mame-0.230+dfsg.1/src/mame/layout/mephisto_1.lay mame-0.231+dfsg.1/src/mame/layout/mephisto_1.lay --- mame-0.230+dfsg.1/src/mame/layout/mephisto_1.lay 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/mephisto_1.lay 2021-04-27 15:32:05.000000000 +0000 @@ -47,13 +47,14 @@ + - - - + + + @@ -61,17 +62,23 @@ - - - - - - - - + + + + + + + + + + + + + + - - + + diff -Nru mame-0.230+dfsg.1/src/mame/layout/mephisto_3.lay mame-0.231+dfsg.1/src/mame/layout/mephisto_3.lay --- mame-0.230+dfsg.1/src/mame/layout/mephisto_3.lay 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/mephisto_3.lay 2021-04-27 15:32:05.000000000 +0000 @@ -205,7 +205,7 @@ - + @@ -423,13 +423,14 @@ + - - - + + + @@ -437,17 +438,23 @@ - - - - - - - - + + + + + + + + + + + + + + - - + + diff -Nru mame-0.230+dfsg.1/src/mame/layout/mephisto_academy.lay mame-0.231+dfsg.1/src/mame/layout/mephisto_academy.lay --- mame-0.230+dfsg.1/src/mame/layout/mephisto_academy.lay 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/mephisto_academy.lay 2021-04-27 15:32:05.000000000 +0000 @@ -20,20 +20,20 @@ - + - + - + - + @@ -47,44 +47,44 @@ - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -121,8 +121,8 @@ - - + + @@ -210,7 +210,7 @@ - + @@ -266,34 +266,34 @@ - + - + - + - + - + - + - + @@ -468,9 +468,9 @@ - + - + diff -Nru mame-0.230+dfsg.1/src/mame/layout/mephisto_alm16.lay mame-0.231+dfsg.1/src/mame/layout/mephisto_alm16.lay --- mame-0.230+dfsg.1/src/mame/layout/mephisto_alm16.lay 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/mephisto_alm16.lay 2021-04-27 15:32:05.000000000 +0000 @@ -11,7 +11,7 @@ - + @@ -181,7 +181,7 @@ - + @@ -460,7 +460,7 @@ - + diff -Nru mame-0.230+dfsg.1/src/mame/layout/mephisto_alm32.lay mame-0.231+dfsg.1/src/mame/layout/mephisto_alm32.lay --- mame-0.230+dfsg.1/src/mame/layout/mephisto_alm32.lay 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/mephisto_alm32.lay 2021-04-27 15:32:05.000000000 +0000 @@ -11,7 +11,7 @@ - + @@ -181,7 +181,7 @@ - + @@ -460,7 +460,7 @@ - + diff -Nru mame-0.230+dfsg.1/src/mame/layout/mephisto_amsterdam.lay mame-0.231+dfsg.1/src/mame/layout/mephisto_amsterdam.lay --- mame-0.230+dfsg.1/src/mame/layout/mephisto_amsterdam.lay 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/mephisto_amsterdam.lay 2021-04-27 15:32:05.000000000 +0000 @@ -4,18 +4,14 @@ --> - - - - - + - + @@ -169,7 +165,7 @@ - + @@ -348,14 +344,41 @@ - + + + + + + + + + + + + + + + - - - - - - + + + + + + + + + + + + + + + + + + + @@ -470,55 +493,60 @@ - - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + - + - + - + @@ -531,15 +559,10 @@ - - - - - - + @@ -557,6 +580,11 @@ + + + + + diff -Nru mame-0.230+dfsg.1/src/mame/layout/mephisto_berlin.lay mame-0.231+dfsg.1/src/mame/layout/mephisto_berlin.lay --- mame-0.230+dfsg.1/src/mame/layout/mephisto_berlin.lay 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/mephisto_berlin.lay 2021-04-27 15:32:05.000000000 +0000 @@ -11,7 +11,7 @@ - + @@ -25,22 +25,22 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + @@ -390,30 +390,31 @@ - + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - + diff -Nru mame-0.230+dfsg.1/src/mame/layout/mephisto_bup.lay mame-0.231+dfsg.1/src/mame/layout/mephisto_bup.lay --- mame-0.230+dfsg.1/src/mame/layout/mephisto_bup.lay 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/mephisto_bup.lay 2021-04-27 15:32:05.000000000 +0000 @@ -3,20 +3,15 @@ license:CC0 --> - - - - - - + - + @@ -170,7 +165,7 @@ - + @@ -349,14 +344,41 @@ - + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -371,7 +393,7 @@ - + @@ -479,41 +501,41 @@ - + - + - + - + - + - + - + - + - + - + - + - + @@ -523,16 +545,16 @@ - + - + - + - + @@ -545,15 +567,10 @@ - - - - - - + @@ -571,6 +588,13 @@ + + + + + + + diff -Nru mame-0.230+dfsg.1/src/mame/layout/mephisto_esb2.lay mame-0.231+dfsg.1/src/mame/layout/mephisto_esb2.lay --- mame-0.230+dfsg.1/src/mame/layout/mephisto_esb2.lay 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/mephisto_esb2.lay 2021-04-27 15:32:05.000000000 +0000 @@ -205,7 +205,7 @@ - + @@ -423,13 +423,14 @@ + - - - + + + @@ -437,17 +438,23 @@ - - - - - - - - + + + + + + + + + + + + + + - - + + diff -Nru mame-0.230+dfsg.1/src/mame/layout/mephisto_gen32.lay mame-0.231+dfsg.1/src/mame/layout/mephisto_gen32.lay --- mame-0.230+dfsg.1/src/mame/layout/mephisto_gen32.lay 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/mephisto_gen32.lay 2021-04-27 15:32:05.000000000 +0000 @@ -11,7 +11,7 @@ - + @@ -181,7 +181,7 @@ - + @@ -460,7 +460,7 @@ - + diff -Nru mame-0.230+dfsg.1/src/mame/layout/mephisto_glasgow.lay mame-0.231+dfsg.1/src/mame/layout/mephisto_glasgow.lay --- mame-0.230+dfsg.1/src/mame/layout/mephisto_glasgow.lay 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/mephisto_glasgow.lay 2021-04-27 15:32:05.000000000 +0000 @@ -4,18 +4,14 @@ --> - - - - - + - + @@ -169,7 +165,7 @@ - + @@ -348,14 +344,41 @@ - + + + + + + + + + + + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -468,55 +491,54 @@ - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -529,8 +551,10 @@ - + + + @@ -549,11 +573,9 @@ - - + + + - - - diff -Nru mame-0.230+dfsg.1/src/mame/layout/mephisto_junior.lay mame-0.231+dfsg.1/src/mame/layout/mephisto_junior.lay --- mame-0.230+dfsg.1/src/mame/layout/mephisto_junior.lay 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/mephisto_junior.lay 2021-04-27 15:32:05.000000000 +0000 @@ -47,13 +47,14 @@ + - - - + + + @@ -61,17 +62,23 @@ - - - - - - - - + + + + + + + + + + + + + + - - + + diff -Nru mame-0.230+dfsg.1/src/mame/layout/mephisto_megaiv.lay mame-0.231+dfsg.1/src/mame/layout/mephisto_megaiv.lay --- mame-0.230+dfsg.1/src/mame/layout/mephisto_megaiv.lay 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/mephisto_megaiv.lay 1970-01-01 00:00:00.000000000 +0000 @@ -1,498 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru mame-0.230+dfsg.1/src/mame/layout/mephisto_milano.lay mame-0.231+dfsg.1/src/mame/layout/mephisto_milano.lay --- mame-0.230+dfsg.1/src/mame/layout/mephisto_milano.lay 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/mephisto_milano.lay 2021-04-27 15:32:05.000000000 +0000 @@ -14,7 +14,7 @@ - + @@ -22,7 +22,7 @@ - + @@ -195,14 +195,14 @@ - - - - - - - - + + + + + + + + @@ -284,8 +284,8 @@ - - + + @@ -305,18 +305,18 @@ - - - - - - - - - - - - + + + + + + + + + + + + @@ -325,7 +325,7 @@ - + @@ -338,10 +338,10 @@ - - - - + + + + @@ -430,22 +430,23 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + diff -Nru mame-0.230+dfsg.1/src/mame/layout/mephisto_mirage.lay mame-0.231+dfsg.1/src/mame/layout/mephisto_mirage.lay --- mame-0.230+dfsg.1/src/mame/layout/mephisto_mirage.lay 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/mephisto_mirage.lay 2021-04-27 15:32:05.000000000 +0000 @@ -11,10 +11,10 @@ - + - + @@ -161,26 +161,36 @@ - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + + + + + + + + + + + @@ -289,8 +299,8 @@ - - + + @@ -310,18 +320,18 @@ - - - - - - - - - - - - + + + + + + + + + + + + @@ -330,7 +340,7 @@ - + @@ -343,10 +353,10 @@ - - - - + + + + @@ -357,13 +367,14 @@ + - - - + + + @@ -371,17 +382,23 @@ - - - - - - - - + + + + + + + + + + + + + + - - + + @@ -474,23 +491,23 @@ - - - - - - - - - - + + + + + + + + + + - - - - - + + + + + diff -Nru mame-0.230+dfsg.1/src/mame/layout/mephisto_mm1.lay mame-0.231+dfsg.1/src/mame/layout/mephisto_mm1.lay --- mame-0.230+dfsg.1/src/mame/layout/mephisto_mm1.lay 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/mephisto_mm1.lay 2021-04-27 15:32:05.000000000 +0000 @@ -200,14 +200,24 @@ - - - - - - - - + + + + + + + + + + + + + + + + + + @@ -215,14 +225,14 @@ - - - - - - - - + + + + + + + + @@ -304,8 +314,8 @@ - - + + @@ -325,18 +335,18 @@ - - - - - - - - - - - - + + + + + + + + + + + + @@ -345,7 +355,7 @@ - + @@ -358,10 +368,10 @@ - - - - + + + + @@ -372,13 +382,14 @@ + - - - + + + @@ -386,17 +397,23 @@ - - - - - - - - + + + + + + + + + + + + + + - - + + @@ -512,26 +529,26 @@ - - - - + + + + - + - - - - + + + + - - - - - + + + + + @@ -545,10 +562,7 @@ - - - - + @@ -566,5 +580,10 @@ + + + + + diff -Nru mame-0.230+dfsg.1/src/mame/layout/mephisto_mm2.lay mame-0.231+dfsg.1/src/mame/layout/mephisto_mm2.lay --- mame-0.230+dfsg.1/src/mame/layout/mephisto_mm2.lay 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/mephisto_mm2.lay 2021-04-27 15:32:05.000000000 +0000 @@ -3,20 +3,15 @@ license:CC0 --> - - - - - - + - + @@ -170,7 +165,7 @@ - + @@ -349,14 +344,41 @@ - + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -371,7 +393,7 @@ - + @@ -488,41 +510,41 @@ - + - + - + - + - + - + - + - + - + - + - + - + @@ -532,16 +554,16 @@ - + - + - + - + @@ -554,15 +576,10 @@ - - - - - - + @@ -580,6 +597,13 @@ + + + + + + + diff -Nru mame-0.230+dfsg.1/src/mame/layout/mephisto_modena.lay mame-0.231+dfsg.1/src/mame/layout/mephisto_modena.lay --- mame-0.230+dfsg.1/src/mame/layout/mephisto_modena.lay 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/mephisto_modena.lay 2021-04-27 15:32:05.000000000 +0000 @@ -3,22 +3,18 @@ license:CC0 --> + - - - - - - + @@ -26,7 +22,7 @@ - + @@ -353,17 +349,47 @@ - + + + + + + + + + + + + + + + + + - - - - - - + + + + + + + + + + + + + + + + + - + + + + @@ -405,11 +431,15 @@ + - + + + + @@ -428,9 +458,7 @@ - - - + @@ -449,11 +477,9 @@ - - - - - - + + + + diff -Nru mame-0.230+dfsg.1/src/mame/layout/mephisto_modular_tm.lay mame-0.231+dfsg.1/src/mame/layout/mephisto_modular_tm.lay --- mame-0.230+dfsg.1/src/mame/layout/mephisto_modular_tm.lay 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/mephisto_modular_tm.lay 2021-04-27 15:32:05.000000000 +0000 @@ -11,7 +11,7 @@ - + @@ -155,7 +155,7 @@ - + diff -Nru mame-0.230+dfsg.1/src/mame/layout/mephisto_mondial2.lay mame-0.231+dfsg.1/src/mame/layout/mephisto_mondial2.lay --- mame-0.230+dfsg.1/src/mame/layout/mephisto_mondial2.lay 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/mephisto_mondial2.lay 2021-04-27 15:32:05.000000000 +0000 @@ -3,19 +3,21 @@ license:CC0 --> + + - + - + @@ -27,47 +29,47 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -103,8 +105,8 @@ - - + + @@ -195,14 +197,14 @@ - - - - - - - - + + + + + + + + @@ -226,34 +228,34 @@ - + - + - + - + - + - + - + @@ -284,8 +286,8 @@ - - + + @@ -305,18 +307,18 @@ - - - - - - - - - - - - + + + + + + + + + + + + @@ -325,7 +327,7 @@ - + @@ -338,45 +340,48 @@ - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + @@ -384,8 +389,8 @@ - - + + @@ -408,59 +413,56 @@ + - - + - + + - - - - - - - - - - - - - - - - - + - + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff -Nru mame-0.230+dfsg.1/src/mame/layout/mephisto_mondial68k.lay mame-0.231+dfsg.1/src/mame/layout/mephisto_mondial68k.lay --- mame-0.230+dfsg.1/src/mame/layout/mephisto_mondial68k.lay 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/mephisto_mondial68k.lay 2021-04-27 15:32:05.000000000 +0000 @@ -3,6 +3,7 @@ license:CC0 --> + @@ -14,7 +15,7 @@ - + @@ -29,44 +30,43 @@ - + - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -103,8 +103,8 @@ - - + + @@ -226,34 +226,34 @@ - + - + - + - + - + - + - + @@ -348,18 +348,19 @@ + + + - - - - - - - - + + + + + + @@ -415,59 +416,55 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + diff -Nru mame-0.230+dfsg.1/src/mame/layout/mephisto_mondial.lay mame-0.231+dfsg.1/src/mame/layout/mephisto_mondial.lay --- mame-0.230+dfsg.1/src/mame/layout/mephisto_mondial.lay 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/mephisto_mondial.lay 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,468 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru mame-0.230+dfsg.1/src/mame/layout/mephisto_montec.lay mame-0.231+dfsg.1/src/mame/layout/mephisto_montec.lay --- mame-0.230+dfsg.1/src/mame/layout/mephisto_montec.lay 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/mephisto_montec.lay 2021-04-27 15:32:05.000000000 +0000 @@ -3,28 +3,41 @@ license:CC0 --> + + + + + + + + + + + + + - + - + - + - + @@ -39,48 +52,48 @@ - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -116,8 +129,8 @@ - - + + @@ -205,7 +218,7 @@ - + @@ -261,34 +274,34 @@ - + - + - + - + - + - + - + @@ -383,39 +396,60 @@ + + + - - + + - - + + - + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -433,30 +467,32 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - + + - + @@ -476,8 +512,8 @@ - - + + diff -Nru mame-0.230+dfsg.1/src/mame/layout/mephisto_montreux.lay mame-0.231+dfsg.1/src/mame/layout/mephisto_montreux.lay --- mame-0.230+dfsg.1/src/mame/layout/mephisto_montreux.lay 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/mephisto_montreux.lay 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,533 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru mame-0.230+dfsg.1/src/mame/layout/mephisto_polgar.lay mame-0.231+dfsg.1/src/mame/layout/mephisto_polgar.lay --- mame-0.230+dfsg.1/src/mame/layout/mephisto_polgar.lay 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/mephisto_polgar.lay 2021-04-27 15:32:05.000000000 +0000 @@ -2,14 +2,19 @@ + + + + + - + @@ -39,15 +44,15 @@ - - - - - - - - - + + + + + + + + + @@ -182,7 +187,7 @@ - + @@ -386,7 +391,7 @@ - + @@ -404,6 +409,10 @@ + + + + @@ -422,8 +431,7 @@ - - + @@ -442,11 +450,10 @@ - + - diff -Nru mame-0.230+dfsg.1/src/mame/layout/mephisto_risc.lay mame-0.231+dfsg.1/src/mame/layout/mephisto_risc.lay --- mame-0.230+dfsg.1/src/mame/layout/mephisto_risc.lay 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/mephisto_risc.lay 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,459 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru mame-0.230+dfsg.1/src/mame/layout/mephisto_smondial2.lay mame-0.231+dfsg.1/src/mame/layout/mephisto_smondial2.lay --- mame-0.230+dfsg.1/src/mame/layout/mephisto_smondial2.lay 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/mephisto_smondial2.lay 2021-04-27 15:32:05.000000000 +0000 @@ -3,18 +3,31 @@ license:CC0 --> + + + + + + + + + + + + + - + @@ -29,35 +42,35 @@ - + - + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + @@ -69,12 +82,12 @@ - + - - + + @@ -111,8 +124,8 @@ - - + + @@ -203,14 +216,14 @@ - - - - - - - - + + + + + + + + @@ -234,34 +247,34 @@ - + - + - + - + - + - + - + @@ -292,8 +305,8 @@ - - + + @@ -313,18 +326,18 @@ - - - - - - - - - - - - + + + + + + + + + + + + @@ -333,7 +346,7 @@ - + @@ -346,21 +359,25 @@ - - - - + + + + + + + - + + @@ -372,14 +389,32 @@ - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -405,7 +440,7 @@ - + @@ -423,79 +458,111 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru mame-0.230+dfsg.1/src/mame/layout/mephisto_smondial.lay mame-0.231+dfsg.1/src/mame/layout/mephisto_smondial.lay --- mame-0.230+dfsg.1/src/mame/layout/mephisto_smondial.lay 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/mephisto_smondial.lay 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,565 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru mame-0.230+dfsg.1/src/mame/layout/namcofl.lay mame-0.231+dfsg.1/src/mame/layout/namcofl.lay --- mame-0.230+dfsg.1/src/mame/layout/namcofl.lay 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/namcofl.lay 1970-01-01 00:00:00.000000000 +0000 @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -Nru mame-0.230+dfsg.1/src/mame/layout/saitek_risc2500.lay mame-0.231+dfsg.1/src/mame/layout/saitek_risc2500.lay --- mame-0.230+dfsg.1/src/mame/layout/saitek_risc2500.lay 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/saitek_risc2500.lay 2021-04-27 15:32:05.000000000 +0000 @@ -3,18 +3,20 @@ license:CC0 --> + + - + - + - + - + @@ -28,93 +30,85 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + - + + @@ -151,8 +145,8 @@ - - + + @@ -274,34 +268,34 @@ - + - + - + - + - + - + - + @@ -397,14 +391,33 @@ - + + - - - + + + + + + + + + + + + + + + + + + + + + + - - + @@ -420,110 +433,108 @@ - - - - - - - - - + - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + - + diff -Nru mame-0.230+dfsg.1/src/mame/layout/tascr30.lay mame-0.231+dfsg.1/src/mame/layout/tascr30.lay --- mame-0.230+dfsg.1/src/mame/layout/tascr30.lay 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/tascr30.lay 2021-04-27 15:32:05.000000000 +0000 @@ -8,14 +8,14 @@ - - - + + + + - - + @@ -193,7 +193,7 @@ - + @@ -310,20 +310,43 @@ - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + + + + + @@ -495,25 +518,17 @@ - - - - - - - - - + - + - + - + diff -Nru mame-0.230+dfsg.1/src/mame/layout/ti74.lay mame-0.231+dfsg.1/src/mame/layout/ti74.lay --- mame-0.230+dfsg.1/src/mame/layout/ti74.lay 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/ti74.lay 2021-04-27 15:32:05.000000000 +0000 @@ -16,7 +16,7 @@ - + @@ -26,7 +26,7 @@ - + @@ -36,7 +36,7 @@ - + @@ -46,7 +46,7 @@ - + @@ -56,7 +56,7 @@ - + @@ -66,7 +66,7 @@ - + @@ -76,7 +76,7 @@ - + @@ -86,7 +86,7 @@ - + @@ -96,7 +96,7 @@ - + @@ -106,7 +106,7 @@ - + @@ -116,7 +116,7 @@ - + @@ -126,7 +126,7 @@ - + @@ -136,13 +136,13 @@ - + - + @@ -174,51 +174,51 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff -Nru mame-0.230+dfsg.1/src/mame/layout/ti95.lay mame-0.231+dfsg.1/src/mame/layout/ti95.lay --- mame-0.230+dfsg.1/src/mame/layout/ti95.lay 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/ti95.lay 2021-04-27 15:32:05.000000000 +0000 @@ -11,14 +11,14 @@ - + - + @@ -26,7 +26,7 @@ - + @@ -34,7 +34,7 @@ - + @@ -46,7 +46,7 @@ - + @@ -56,7 +56,7 @@ - + @@ -66,7 +66,7 @@ - + @@ -76,7 +76,7 @@ - + @@ -86,7 +86,7 @@ - + @@ -96,7 +96,7 @@ - + @@ -106,7 +106,7 @@ - + @@ -116,7 +116,7 @@ - + @@ -126,7 +126,7 @@ - + @@ -136,7 +136,7 @@ - + @@ -146,7 +146,7 @@ - + @@ -156,7 +156,7 @@ - + @@ -166,7 +166,7 @@ - + @@ -176,7 +176,7 @@ - + @@ -258,68 +258,68 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff -Nru mame-0.230+dfsg.1/src/mame/layout/warp1bl.lay mame-0.231+dfsg.1/src/mame/layout/warp1bl.lay --- mame-0.230+dfsg.1/src/mame/layout/warp1bl.lay 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/layout/warp1bl.lay 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru mame-0.230+dfsg.1/src/mame/machine/basf7100_kbd.cpp mame-0.231+dfsg.1/src/mame/machine/basf7100_kbd.cpp --- mame-0.230+dfsg.1/src/mame/machine/basf7100_kbd.cpp 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/machine/basf7100_kbd.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,300 @@ +// license: BSD-3-Clause +// copyright-holders: Dirk Best +/*************************************************************************** + + BASF 7100 Keyboard (HLE) + + Keytronics keyboard hardware: A65-01966-003 PCB-201 F + BASF part number 19-4203-01 + + Hardware: + - 30293E-054 20-04592-054 (possibly PIC1650) + - 1 KB ROM (contains translation tables) + - Speaker + + TODO: + - Extract internal ROM from MCU and convert to LLE + - Speaker + +***************************************************************************/ + +#include "emu.h" +#include "basf7100_kbd.h" +#include "machine/keyboard.ipp" + + +//************************************************************************** +// DEVICE DEFINITIONS +//************************************************************************** + +DEFINE_DEVICE_TYPE(BASF7100_KBD, basf7100_kbd_device, "basf7100_kbd", "BASF 7100 Keyboard (HLE)") + +//------------------------------------------------- +// rom_region - device-specific ROM region +//------------------------------------------------- + +ROM_START( keyboard ) + ROM_REGION(0x400, "translation", 0) + ROM_LOAD("19-2114-01e.bin", 0x000, 0x400, CRC(d694b5dd) SHA1(6262379ba565c1de072b2b21dc3141db1ec5129c)) +ROM_END + +const tiny_rom_entry *basf7100_kbd_device::device_rom_region() const +{ + return ROM_NAME(keyboard); +} + +//------------------------------------------------- +// input_ports - device-specific input ports +//------------------------------------------------- + +static INPUT_PORTS_START( keyboard ) + PORT_START("mod") + PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("CTRL") PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL) PORT_CHAR(UCHAR_MAMEKEY(LCONTROL)) + PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) + PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("CAPS") PORT_CODE(KEYCODE_CAPSLOCK) PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK)) PORT_TOGGLE + + PORT_START("row_0") + PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') + PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') + PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') + PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') + PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR(')') + PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') + PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') + PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR(':') + PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC)) + PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x0400, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0xf800, IP_ACTIVE_HIGH, IPT_UNUSED) + + PORT_START("row_1") + PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('@') + PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') + PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S') + PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') + PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('_') + PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('{') PORT_CHAR('[') + PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_0_PAD) PORT_CHAR(UCHAR_MAMEKEY(0_PAD)) + PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('\'') PORT_CHAR('"') + PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_TAB) PORT_CHAR('\t') // 0x89 with shift + PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_4_PAD) PORT_CHAR(UCHAR_MAMEKEY(4_PAD)) + PORT_BIT(0x0400, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_1_PAD) PORT_CHAR(UCHAR_MAMEKEY(1_PAD)) + PORT_BIT(0xf800, IP_ACTIVE_HIGH, IPT_UNUSED) + + PORT_START("row_2") + PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') + PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') + PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_D) PORT_CHAR('d') PORT_CHAR('D') + PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C') + PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') PORT_CHAR('+') + PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\') PORT_CHAR('|') // actually ¦ + PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('}') PORT_CHAR(']') + PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_5_PAD) PORT_CHAR(UCHAR_MAMEKEY(5_PAD)) + PORT_BIT(0x0400, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_2_PAD) PORT_CHAR(UCHAR_MAMEKEY(2_PAD)) + PORT_BIT(0xf800, IP_ACTIVE_HIGH, IPT_UNUSED) + + PORT_START("row_3") + PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') + PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_R) PORT_CHAR('r') PORT_CHAR('R') + PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F) PORT_CHAR('f') PORT_CHAR('F') + PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_V) PORT_CHAR('v') PORT_CHAR('V') + PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_TILDE) PORT_CHAR('`') PORT_CHAR('~') + PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(UCHAR_MAMEKEY(ENTER)) PORT_NAME("RETURN") + PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA_PAD) PORT_CHAR(UCHAR_MAMEKEY(COMMA_PAD)) PORT_CHAR(UCHAR_MAMEKEY(COMMA_PAD)) PORT_NAME("Keypad .") + PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F10) PORT_CHAR(UCHAR_MAMEKEY(F10)) PORT_NAME("LF") + PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_UNUSED) // sends keycode for "-", but not on keyboard + PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_6_PAD) PORT_CHAR(UCHAR_MAMEKEY(6_PAD)) + PORT_BIT(0x0400, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_3_PAD) PORT_CHAR(UCHAR_MAMEKEY(3_PAD)) + PORT_BIT(0xf800, IP_ACTIVE_HIGH, IPT_UNUSED) + + PORT_START("row_4") + PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') + PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_T) PORT_CHAR('t') PORT_CHAR('T') + PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_G) PORT_CHAR('g') PORT_CHAR('G') + PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_B) PORT_CHAR('b') PORT_CHAR('B') + PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F11) PORT_CHAR(UCHAR_MAMEKEY(F11)) PORT_NAME("DEL") + PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') + PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_9_PAD) PORT_CHAR(UCHAR_MAMEKEY(9_PAD)) + PORT_BIT(0x0400, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Keypad Space") + PORT_BIT(0xf800, IP_ACTIVE_HIGH, IPT_UNUSED) + + PORT_START("row_5") + PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('^') + PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') + PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') + PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_N) PORT_CHAR('n') PORT_CHAR('N') + PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F12) PORT_CHAR(UCHAR_MAMEKEY(F12)) PORT_NAME("BREAK") + PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_LALT) PORT_CHAR(UCHAR_MAMEKEY(LALT)) PORT_NAME("FUNCT") + PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_8_PAD) PORT_CHAR(UCHAR_MAMEKEY(8_PAD)) + PORT_BIT(0x0400, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0xf800, IP_ACTIVE_HIGH, IPT_UNUSED) + + PORT_START("row_6") + PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('&') + PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U') + PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_J) PORT_CHAR('j') PORT_CHAR('J') + PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_M) PORT_CHAR('m') PORT_CHAR('M') + PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F9) PORT_CHAR(UCHAR_MAMEKEY(F9)) PORT_NAME("CLEAR") + PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_INSERT) PORT_CHAR(UCHAR_MAMEKEY(INSERT)) PORT_NAME("INS CHAR") + PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_PGUP) PORT_CHAR(UCHAR_MAMEKEY(PGUP)) PORT_NAME("INS LINE") + PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_LEFT) PORT_CHAR(UCHAR_MAMEKEY(LEFT)) PORT_NAME("\xe2\x86\x90") // ← + PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER_PAD) PORT_CHAR(UCHAR_MAMEKEY(ENTER_PAD)) PORT_NAME("ENTER") + PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_7_PAD) PORT_CHAR(UCHAR_MAMEKEY(7_PAD)) + PORT_BIT(0x0400, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0xf800, IP_ACTIVE_HIGH, IPT_UNUSED) + + PORT_START("row_7") + PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('*') + PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_I) PORT_CHAR('i') PORT_CHAR('I') + PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_K) PORT_CHAR('k') PORT_CHAR('K') + PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') + PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_END) PORT_CHAR(UCHAR_MAMEKEY(END)) PORT_NAME("CLR EOL") + PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_UP) PORT_CHAR(UCHAR_MAMEKEY(UP)) PORT_NAME("\xe2\x86\x91") // ↑ + PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_DOWN) PORT_CHAR(UCHAR_MAMEKEY(DOWN)) PORT_NAME("\xe2\x86\x93") // ↓ + PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_HOME) PORT_CHAR(UCHAR_MAMEKEY(HOME)) PORT_NAME("HOME") + PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_UNUSED) // sends keycode for TAB, but physical space taken by ENTER key + PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x0400, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0xf800, IP_ACTIVE_HIGH, IPT_UNUSED) + + PORT_START("row_8") + PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR('(') + PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') + PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') + PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') + PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_F8) PORT_CHAR(UCHAR_MAMEKEY(F8)) PORT_NAME("CLR EOS") + PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_DEL) PORT_CHAR(UCHAR_MAMEKEY(DEL)) PORT_NAME("DEL CHAR") + PORT_BIT(0x0040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_PGDN) PORT_CHAR(UCHAR_MAMEKEY(PGDN)) PORT_NAME("DEL LINE") + PORT_BIT(0x0080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_RIGHT) PORT_CHAR(UCHAR_MAMEKEY(RIGHT)) PORT_NAME("\xe2\x86\x92") // → + PORT_BIT(0x0100, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_PLUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(PLUS_PAD)) PORT_NAME("SOM EOM") + PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0x0400, IP_ACTIVE_HIGH, IPT_UNUSED) + PORT_BIT(0xf800, IP_ACTIVE_HIGH, IPT_UNUSED) +INPUT_PORTS_END + +ioport_constructor basf7100_kbd_device::device_input_ports() const +{ + return INPUT_PORTS_NAME( keyboard ); +} + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// basf7100_kbd_device - constructor +//------------------------------------------------- + +basf7100_kbd_device::basf7100_kbd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + device_t(mconfig, BASF7100_KBD, tag, owner, clock), + device_matrix_keyboard_interface(mconfig, *this, "row_0", "row_1", "row_2", "row_3", "row_4", "row_5", "row_6", "row_7", "row_8"), + m_translation(*this, "translation"), + m_modifiers(*this, "mod"), + m_int_handler(*this) +{ +} + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void basf7100_kbd_device::device_start() +{ + // resolve callbacks + m_int_handler.resolve_safe(); + + // register for state saving + save_item(NAME(m_data)); +} + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void basf7100_kbd_device::device_reset() +{ + reset_key_state(); + start_processing(attotime::from_hz(1200)); + typematic_stop(); +} + +//------------------------------------------------- +// key_make - handle a key being pressed +//------------------------------------------------- + +void basf7100_kbd_device::key_make(uint8_t row, uint8_t column) +{ + uint8_t code = translate(row, column); + + if (code != 0xff) + { + send_key(code); + typematic_start(row, column, attotime::from_msec(750), attotime::from_msec(50)); + } +} + +//------------------------------------------------- +// key_break - handle a key being released +//------------------------------------------------- + +void basf7100_kbd_device::key_break(uint8_t row, uint8_t column) +{ + if (typematic_is(row, column)) + typematic_stop(); +} + +//------------------------------------------------- +// key_repeat - handle a key being repeated +//------------------------------------------------- + +void basf7100_kbd_device::key_repeat(u8 row, u8 column) +{ + uint8_t code = translate(row, column); + send_key(code); +} + +//------------------------------------------------- +// translate - row and column to key code +//------------------------------------------------- + +uint8_t basf7100_kbd_device::translate(uint8_t row, uint8_t column) +{ + uint8_t const modifiers(m_modifiers->read()); + + bool const ctrl(modifiers & 0x01); + bool const shift(bool(modifiers & 0x02) || (bool(modifiers & 0x04))); + bool const ctrl_shift(ctrl && shift); + + unsigned const map(ctrl_shift? 3 : ctrl ? 2 : shift ? 1 : 0); + + return m_translation[(map * 0x100) + 0x10 + (row * 0x10) + column]; +} + +//------------------------------------------------- +// send_key - send key code to host +//------------------------------------------------- + +void basf7100_kbd_device::send_key(uint8_t code) +{ + m_data = code; + m_int_handler(1); + m_int_handler(0); +} + +//------------------------------------------------- +// read - return current keycode +//------------------------------------------------- + +uint8_t basf7100_kbd_device::read() +{ + return m_data; +} diff -Nru mame-0.230+dfsg.1/src/mame/machine/basf7100_kbd.h mame-0.231+dfsg.1/src/mame/machine/basf7100_kbd.h --- mame-0.230+dfsg.1/src/mame/machine/basf7100_kbd.h 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/machine/basf7100_kbd.h 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,61 @@ +// license: BSD-3-Clause +// copyright-holders: Dirk Best +/*************************************************************************** + + BASF 7100 Keyboard (HLE) + +***************************************************************************/ + +#ifndef MAME_MACHINE_BASF7100_KBD_H +#define MAME_MACHINE_BASF7100_KBD_H + +#pragma once + +#include "machine/keyboard.h" + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// ======================> basf7100_kbd_device + +class basf7100_kbd_device : public device_t, protected device_matrix_keyboard_interface<9> +{ +public: + // construction/destruction + basf7100_kbd_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + + // callbacks + auto int_handler() { return m_int_handler.bind(); } + + uint8_t read(); + +protected: + // device-level overrides + virtual const tiny_rom_entry *device_rom_region() const override; + virtual ioport_constructor device_input_ports() const override; + virtual void device_start() override; + virtual void device_reset() override; + + // device_matrix_keyboard_interface overrides + virtual void key_make(uint8_t row, uint8_t column) override; + virtual void key_break(uint8_t row, uint8_t column) override; + virtual void key_repeat(uint8_t row, uint8_t column) override; + +private: + required_region_ptr m_translation; + required_ioport m_modifiers; + + devcb_write_line m_int_handler; + + uint8_t translate(uint8_t row, uint8_t column); + void send_key(uint8_t code); + + uint8_t m_data; +}; + +// device type definition +DECLARE_DEVICE_TYPE(BASF7100_KBD, basf7100_kbd_device) + +#endif // MAME_MACHINE_BASF7100_KBD_H diff -Nru mame-0.230+dfsg.1/src/mame/machine/egret.cpp mame-0.231+dfsg.1/src/mame/machine/egret.cpp --- mame-0.230+dfsg.1/src/mame/machine/egret.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/machine/egret.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -97,38 +97,67 @@ //************************************************************************** // LIVE DEVICE //************************************************************************** +#if USE_BUS_ADB +void egret_device::adb_w(int id, int state) +{ + m_adb_device_out[id] = state; + adb_change(); +} + +void egret_device::adb_poweron_w(int id, int state) +{ + m_adb_device_poweron[id] = state; +} + +void egret_device::adb_change() +{ + bool adb = m_adb_out & m_adb_device_out[0] & m_adb_device_out[1]; + logerror("adb c:%d 1:%d 2:%d -> %d (%02x %02x)\n", m_adb_out, m_adb_device_out[0], m_adb_device_out[1], adb, ddrs[0], ports[0]); + for (int i = 0; i != 2; i++) + if (m_adb_device[i]) + { + m_adb_device[i]->adb_w(adb); + } +} +#endif void egret_device::send_port(uint8_t offset, uint8_t data) { switch (offset) { - case 0: // port A -/* printf("ADB:%d DFAC:%d PowerEnable:%d\n", - (data & 0x80) ? 1 : 0, - (data & 0x10) ? 1 : 0, - (data & 0x02) ? 1 : 0);*/ - - if ((data & 0x80) != last_adb) - { - m_adb_dtime = (int)(machine().time().as_ticks(1000000) - last_adb_time); - /* - if (data & 0x80) - { - printf("EG ADB: 1->0 time %d\n", m_adb_dtime); - } - else - { - printf("EG ADB: 0->1 time %d\n", m_adb_dtime); - } - */ - // allow the linechange handler to override us - adb_in = (data & 0x80) ? true : false; + case 0: // port A + /* printf("ADB:%d DFAC:%d PowerEnable:%d\n", + (data & 0x80) ? 1 : 0, + (data & 0x10) ? 1 : 0, + (data & 0x02) ? 1 : 0);*/ + +#if USE_BUS_ADB + // the line goes to a mosfet pulling the adb data line to graound, hence the inversion + m_adb_out = !(data & 0x80); + adb_change(); +#else + if ((data & 0x80) != last_adb) + { + m_adb_dtime = (int)(machine().time().as_ticks(1000000) - last_adb_time); + /* + if (data & 0x80) + { + printf("EG ADB: 1->0 time %d\n", m_adb_dtime); + } + else + { + printf("EG ADB: 0->1 time %d\n", m_adb_dtime); + } + */ + // allow the linechange handler to override us + adb_in = (data & 0x80) ? true : false; - write_linechange(((data & 0x80) >> 7) ^ 1); + write_linechange(((data & 0x80) >> 7) ^ 1); - last_adb = data & 0x80; - last_adb_time = machine().time().as_ticks(1000000); + last_adb = data & 0x80; + last_adb_time = machine().time().as_ticks(1000000); } +#endif break; case 1: // port B @@ -205,8 +234,12 @@ switch (offset) { case 0: // port A +#if USE_BUS_ADB + incoming |= (m_adb_out & m_adb_device_out[0] & m_adb_device_out[1]) ? 0x40 : 0; + incoming |= (m_adb_device_poweron[0] & m_adb_device_poweron[1]) ? 0x04 : 0; +#else incoming |= adb_in ? 0x40 : 0; - +#endif if (egret_controls_power) { incoming |= 0x02; // indicate soft power, indicate chassis switch on @@ -327,12 +360,15 @@ egret_device::egret_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, EGRET, tag, owner, clock), - device_nvram_interface(mconfig, *this), - write_reset(*this), - write_linechange(*this), - write_via_clock(*this), - write_via_data(*this), - m_maincpu(*this, EGRET_CPU_TAG) + device_nvram_interface(mconfig, *this), + write_reset(*this), + write_linechange(*this), + write_via_clock(*this), + write_via_data(*this), + m_maincpu(*this, EGRET_CPU_TAG) +#if USE_BUS_ADB + , m_adb_connector{{*this, ":adb1"}, {*this, finder_base::DUMMY_TAG}} +#endif { } @@ -347,6 +383,18 @@ write_via_clock.resolve_safe(); write_via_data.resolve_safe(); +#if USE_BUS_ADB + for (int i = 0; i < 2; i++) + { + m_adb_device[i] = m_adb_connector[i] ? m_adb_connector[i]->get_device() : nullptr; + if (m_adb_device[i]) + { + m_adb_device[i]->adb_r().set([this, i](int state) { adb_w(i, state); }); + m_adb_device[i]->poweron_r().set([this, i](int state) { adb_poweron_w(i, state); }); + } + } +#endif + m_timer = timer_alloc(0, nullptr); save_item(NAME(ddrs[0])); save_item(NAME(ddrs[1])); @@ -369,6 +417,11 @@ save_item(NAME(pram_loaded)); save_item(NAME(pram)); save_item(NAME(disk_pram)); +#if USE_BUS_ADB + save_item(NAME(m_adb_out)); + save_item(NAME(m_adb_device_out)); + save_item(NAME(m_adb_device_poweron)); +#endif uint8_t *rom = device().machine().root_device().memregion(device().subtag(EGRET_CPU_TAG))->base(); @@ -388,6 +441,11 @@ ddrs[0] = ddrs[1] = ddrs[2] = 0; ports[0] = ports[1] = ports[2] = 0; + #if USE_BUS_ADB + m_adb_device_out[0] = m_adb_device_out[1] = true; + m_adb_device_poweron[0] = m_adb_device_poweron[1] = true; + #endif + m_timer->adjust(attotime::never); egret_controls_power = false; // set to hard power control diff -Nru mame-0.230+dfsg.1/src/mame/machine/egret.h mame-0.231+dfsg.1/src/mame/machine/egret.h --- mame-0.230+dfsg.1/src/mame/machine/egret.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/machine/egret.h 2021-04-27 15:32:05.000000000 +0000 @@ -5,7 +5,11 @@ #pragma once +#define USE_BUS_ADB (0) +#if USE_BUS_ADB +#include "bus/adb/adb.h" +#endif //************************************************************************** // MACROS / CONSTANTS @@ -59,6 +63,12 @@ uint8_t pram_r(offs_t offset); void pram_w(offs_t offset, uint8_t data); +#if USE_BUS_ADB + void adb_w(int id, int state); + void adb_poweron_w(int id, int state); + void adb_change(); +#endif + // interface routines uint8_t get_xcvr_session() { return xcvr_session; } void set_via_full(uint8_t val) { via_full = val; } @@ -107,6 +117,14 @@ uint8_t pram[0x100], disk_pram[0x100]; bool pram_loaded; + #if USE_BUS_ADB + optional_device m_adb_connector[2]; + adb_device *m_adb_device[2]; + bool m_adb_device_out[2]; + bool m_adb_device_poweron[2]; + bool m_adb_out; + #endif + void send_port(uint8_t offset, uint8_t data); }; diff -Nru mame-0.230+dfsg.1/src/mame/machine/gaelco3d.cpp mame-0.231+dfsg.1/src/mame/machine/gaelco3d.cpp --- mame-0.230+dfsg.1/src/mame/machine/gaelco3d.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/machine/gaelco3d.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -21,8 +21,8 @@ a) Uncomment SHARED_MEM_DRIVER below b) Open two terminals - c) In terminal 1: mkdir /tmp/x1; cd /tmp/x1; /path/to/mame64 -np 2 -mt -rp /mnt/mame/romlib/r -inipath . radikalb -w -nomaximize -inipath . - d) In terminal 2: mkdir /tmp/x2; cd /tmp/x2; /path/to/mame64 -np 2 -mt -rp /mnt/mame/romlib/r -inipath . radikalb -w -nomaximize -inipath . + c) In terminal 1: mkdir /tmp/x1; cd /tmp/x1; /path/to/mame -np 2 -rp /mnt/mame/romlib/r -inipath . radikalb -w -nomaximize -inipath . + d) In terminal 2: mkdir /tmp/x2; cd /tmp/x2; /path/to/mame -np 2 -rp /mnt/mame/romlib/r -inipath . radikalb -w -nomaximize -inipath . e) Set one instance to be master and one to be slave in service mode f) Have fun diff -Nru mame-0.230+dfsg.1/src/mame/machine/k007452.cpp mame-0.231+dfsg.1/src/mame/machine/k007452.cpp --- mame-0.230+dfsg.1/src/mame/machine/k007452.cpp 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/machine/k007452.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,104 @@ +// license:BSD-3-Clause +// copyright-holders:Sean Gonsalves +/*************************************************************************** + + Konami 007452 multiplier/divider + +***************************************************************************/ + +#include "emu.h" +#include "k007452.h" + +//************************************************************************** +// CONSTANTS +//************************************************************************** + +// device type definition +DEFINE_DEVICE_TYPE(KONAMI_007452_MATH, k007452_device, "konami_007452", "Konami 007452 math chip") + +//------------------------------------------------- +// k007452_device - constructor +//------------------------------------------------- + +k007452_device::k007452_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, KONAMI_007452_MATH, tag, owner, clock) +{ +} + + +//------------------------------------------------- +// read - read the registers +//------------------------------------------------- + +u8 k007452_device::read(offs_t offset) +{ + switch (offset & 7) + { + case 0: return u8(m_multiply_result & 0xff); + case 1: return u8((m_multiply_result >> 8) & 0xff); + case 2: return u8(m_divide_remainder & 0xff); + case 3: return u8((m_divide_remainder >> 8) & 0xff); + case 4: return u8(m_divide_quotient & 0xff); + case 5: return u8((m_divide_quotient >> 8) & 0xff); + default: return 0; + } +} + + +//------------------------------------------------- +// write - write to the registers +//------------------------------------------------- + +void k007452_device::write(offs_t offset, u8 data) +{ + if (offset < 6) + m_math_regs[offset] = data; + + if (offset == 1) + { + // Starts multiplication process + m_multiply_result = u16(m_math_regs[0]) * m_math_regs[1]; + } + else if (offset == 5) + { + // Starts division process + u16 const dividend = (u16(m_math_regs[4]) << 8) | m_math_regs[5]; + u16 const divisor = (u16(m_math_regs[2]) << 8) | m_math_regs[3]; + if (!divisor) + { + m_divide_quotient = 0xffff; + m_divide_remainder = 0x0000; + } + else + { + m_divide_quotient = dividend / divisor; + m_divide_remainder = dividend % divisor; + } + } +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void k007452_device::device_start() +{ + save_item(NAME(m_math_regs)); + save_item(NAME(m_multiply_result)); + save_item(NAME(m_divide_quotient)); + save_item(NAME(m_divide_remainder)); +} + + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void k007452_device::device_reset() +{ + std::fill(std::begin(m_math_regs), std::end(m_math_regs), 0); + m_multiply_result = 0; + m_divide_quotient = 0; + m_divide_remainder = 0; +} diff -Nru mame-0.230+dfsg.1/src/mame/machine/k007452.h mame-0.231+dfsg.1/src/mame/machine/k007452.h --- mame-0.230+dfsg.1/src/mame/machine/k007452.h 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/machine/k007452.h 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,46 @@ +// license:BSD-3-Clause +// copyright-holders:Sean Gonsalves +/*************************************************************************** + + Konami 007452 multiplier/divider + +***************************************************************************/ + +#ifndef MAME_MACHINE_K007452_H +#define MAME_MACHINE_K007452_H + +#pragma once + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +class k007452_device : public device_t +{ +public: + // construction/destruction + k007452_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + + // public interface + u8 read(offs_t offset); + void write(offs_t offset, u8 data); + +protected: + // device-level overrides + virtual void device_start() override; + virtual void device_reset() override; + +private: + // internal state + u8 m_math_regs[6]; + u16 m_multiply_result; + u16 m_divide_quotient; + u16 m_divide_remainder; +}; + + +// device type declaration +DECLARE_DEVICE_TYPE(KONAMI_007452_MATH, k007452_device) + +#endif // MAME_MACHINE_K007452_H diff -Nru mame-0.230+dfsg.1/src/mame/machine/mac.cpp mame-0.231+dfsg.1/src/mame/machine/mac.cpp --- mame-0.230+dfsg.1/src/mame/machine/mac.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/machine/mac.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -76,9 +76,6 @@ #include "emu.h" #include "includes/mac.h" -#include "machine/sonydriv.h" -#include "machine/iwm.h" -#include "machine/swim1.h" #define INTS_RBV ((m_model >= MODEL_MAC_IICI) && (m_model <= MODEL_MAC_IIVI)) || ((m_model >= MODEL_MAC_LC) && (m_model <= MODEL_MAC_LC_580)) @@ -98,12 +95,6 @@ #define LOG_MEMORY 0 #endif -// handle disk enable lines -void mac_fdc_set_enable_lines(device_t *device, int enable_mask) -{ - sony_set_enable_lines(device, enable_mask); -} - void mac_state::mac_install_memory(offs_t memory_begin, offs_t memory_end, offs_t memory_size, void *memory_data, int is_rom) { @@ -1200,8 +1191,6 @@ } } -#include "cpu/powerpc/ppc.h" - void mac_state::mac_driver_init(model_t model) { m_overlay = 1; diff -Nru mame-0.230+dfsg.1/src/mame/machine/macpci.cpp mame-0.231+dfsg.1/src/mame/machine/macpci.cpp --- mame-0.230+dfsg.1/src/mame/machine/macpci.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/machine/macpci.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -11,13 +11,7 @@ ****************************************************************************/ #include "emu.h" -#include "machine/8530scc.h" -#include "cpu/m68000/m68000.h" -#include "machine/applefdc.h" -#include "machine/sonydriv.h" #include "includes/macpci.h" -#include "machine/ram.h" -#include "debugger.h" #define LOG_ADB 0 #define LOG_VIA 0 diff -Nru mame-0.230+dfsg.1/src/mame/machine/mb87013.cpp mame-0.231+dfsg.1/src/mame/machine/mb87013.cpp --- mame-0.230+dfsg.1/src/mame/machine/mb87013.cpp 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/machine/mb87013.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,150 @@ +// license:BSD-3-Clause +// copyright-holders:AJR +/*************************************************************************** + + Roland MB87013 QD (Quick Disk) Drive Interface Adapter + + This device uses a MB89251 (Intel 8251 compatible USART) to serialize + and deserialize the disk data. The two ICs appear to be clocked at the + same 6.5 MHz rate, and they have address, data, RD and WR signals in + common. + + The OP4 and RTS pins are usually bridged. + +***************************************************************************/ + +#include "emu.h" +#include "mb87013.h" + +//************************************************************************** +// GLOBAL VARIABLES +//************************************************************************** + +// device type definition +DEFINE_DEVICE_TYPE(MB87013, mb87013_device, "mb87013", "Roland MB87013 QDC") + + +//************************************************************************** +// DEVICE IMPLEMENTATION +//************************************************************************** + +//------------------------------------------------- +// mb87013_device - constructor +//------------------------------------------------- + +mb87013_device::mb87013_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, MB87013, tag, owner, clock) + , m_sio_rd_callback(*this) + , m_sio_wr_callback(*this) + , m_txc_callback(*this) + , m_rxc_callback(*this) + , m_rxd_callback(*this) + , m_dsr_callback(*this) + , m_op4_callback(*this) +{ +} + + +//------------------------------------------------- +// device_resolve_objects - resolve objects that +// may be needed for other devices to set +// initial conditions at start time +//------------------------------------------------- + +void mb87013_device::device_resolve_objects() +{ + m_sio_rd_callback.resolve_safe(0); + m_sio_wr_callback.resolve_safe(); + m_txc_callback.resolve_safe(); + m_rxc_callback.resolve_safe(); + m_rxd_callback.resolve_safe(); + m_dsr_callback.resolve_safe(); + m_op4_callback.resolve_safe(); +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void mb87013_device::device_start() +{ +} + + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void mb87013_device::device_reset() +{ +} + + +//------------------------------------------------- +// read - CPU read from QDC/SIO +//------------------------------------------------- + +u8 mb87013_device::read(offs_t offset) +{ + if (!BIT(offset, 1)) + return m_sio_rd_callback(offset); + + // TODO + if (BIT(offset, 0)) + logerror("%s: Reading data from control register or CRC register (LSB)\n", machine().describe_context()); + else + logerror("%s: Reading data from CRC register (MSB)\n", machine().describe_context()); + return 0; +} + + +//------------------------------------------------- +// write - CPU write to QDC/SIO +//------------------------------------------------- + +void mb87013_device::write(offs_t offset, u8 data) +{ + if (!BIT(offset, 1)) + { + // TODO: A1 = 0 & A0 = 0 writes data to both devices + m_sio_wr_callback(offset, data); + return; + } + + // TODO + if (BIT(offset, 0)) + logerror("%s: Writing %02X to control register\n", machine().describe_context(), data); + else + logerror("%s: Writing %02X to data register\n", machine().describe_context(), data); +} + + +//------------------------------------------------- +// dtr_w - SIO control line write to enable +// MFM modulator +//------------------------------------------------- + +WRITE_LINE_MEMBER(mb87013_device::dtr_w) +{ +} + + +//------------------------------------------------- +// txd_w - SIO line write of data to be MFM +// modulated by QDC +//------------------------------------------------- + +WRITE_LINE_MEMBER(mb87013_device::txd_w) +{ +} + + +//------------------------------------------------- +// rts_w - line write to enable transfer of +// data through RxC and RxD +//------------------------------------------------- + +WRITE_LINE_MEMBER(mb87013_device::rts_w) +{ +} diff -Nru mame-0.230+dfsg.1/src/mame/machine/mb87013.h mame-0.231+dfsg.1/src/mame/machine/mb87013.h --- mame-0.230+dfsg.1/src/mame/machine/mb87013.h 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/machine/mb87013.h 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,90 @@ +// license:BSD-3-Clause +// copyright-holders:AJR +/*************************************************************************** + + Roland MB87013 QD (Quick Disk) Drive Interface Adapter + +**************************************************************************** + _____ _____ + D2 1 |* \_/ | 40 D1 + D3 2 | | 39 D0 + D4 3 | | 38 N. C. + D5 4 | | 37 RXDA + D6 5 | | 36 RXCA + D7 6 | | 35 N. C. + N. C. 7 | | 34 TXCA + A0 8 | | 33 TXDA + A1 9 | | 32 INIB + Vss 10 | | 31 TST + ISCB 11 | MB87013 | 30 VDD + RSTB 12 | | 29 OCSB + RDB 13 | | 28 INIT + WRB 14 | | 27 IP0 + DTRB 15 | | 26 WRDT + RTSB 16 | | 25 WRGA + OP4 17 | | 24 RDT + OP3 18 | | 23 IP1 + N. C. 19 | | 22 IP2 + XTAL 20 |_____________| 21 EXTAL + +***************************************************************************/ + +#ifndef MAME_MACHINE_MB87013_H +#define MAME_MACHINE_MB87013_H + +#pragma once + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// ======================> mb87013_device + +class mb87013_device : public device_t +{ +public: + // device type constructor + mb87013_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + + static constexpr feature_type unemulated_features() { return feature::DISK; } + + // configuration + auto sio_rd_callback() { return m_sio_rd_callback.bind(); } + auto sio_wr_callback() { return m_sio_wr_callback.bind(); } + auto txc_callback() { return m_txc_callback.bind(); } + auto rxc_callback() { return m_rxc_callback.bind(); } + auto rxd_callback() { return m_rxd_callback.bind(); } + auto dsr_callback() { return m_dsr_callback.bind(); } + auto op4_callback() { return m_op4_callback.bind(); } + + // CPU read/write handlers + u8 read(offs_t offset); + void write(offs_t offset, u8 data); + + // line write handlers + DECLARE_WRITE_LINE_MEMBER(dtr_w); + DECLARE_WRITE_LINE_MEMBER(txd_w); + DECLARE_WRITE_LINE_MEMBER(rts_w); + +protected: + // device-specific overrides + virtual void device_resolve_objects() override; + virtual void device_start() override; + virtual void device_reset() override; + +private: + // callback objects + devcb_read8 m_sio_rd_callback; + devcb_write8 m_sio_wr_callback; + devcb_write_line m_txc_callback; + devcb_write_line m_rxc_callback; + devcb_write_line m_rxd_callback; + devcb_write_line m_dsr_callback; + devcb_write_line m_op4_callback; +}; + + +// device type declaration +DECLARE_DEVICE_TYPE(MB87013, mb87013_device) + +#endif // MAME_MACHINE_MB87013_H diff -Nru mame-0.230+dfsg.1/src/mame/machine/megacdcd.cpp mame-0.231+dfsg.1/src/mame/machine/megacdcd.cpp --- mame-0.230+dfsg.1/src/mame/machine/megacdcd.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/machine/megacdcd.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -455,7 +455,7 @@ SCD_CURLBA = msf_to_lba(msf)-150; if(segacd.cd == nullptr) // no CD is there, bail out return; - uint32_t end_msf = segacd.toc->tracks[ cdrom_get_track(segacd.cd, SCD_CURLBA) + 1 ].logframeofs; + uint32_t track_length = segacd.toc->tracks[ cdrom_get_track(segacd.cd, SCD_CURLBA) ].logframes; SCD_CURTRK = cdrom_get_track(segacd.cd, SCD_CURLBA)+1; LC8951UpdateHeader(); SCD_STATUS = CDD_PLAYINGCDDA; @@ -464,7 +464,7 @@ printf("%d Track played\n",SCD_CURTRK); CDD_MIN = to_bcd(SCD_CURTRK, false); if(!(CURRENT_TRACK_IS_DATA)) - m_cdda->start_audio(SCD_CURLBA, end_msf - SCD_CURLBA); + m_cdda->start_audio(SCD_CURLBA, SCD_CURLBA + track_length); SET_CDC_READ diff -Nru mame-0.230+dfsg.1/src/mame/machine/mmboard.cpp mame-0.231+dfsg.1/src/mame/machine/mmboard.cpp --- mame-0.230+dfsg.1/src/mame/machine/mmboard.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/machine/mmboard.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -23,22 +23,22 @@ // constructor //------------------------------------------------- -mephisto_board_device::mephisto_board_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) +mephisto_board_device::mephisto_board_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, type, tag, owner, clock) , m_board(*this, "board") , m_led_pwm(*this, "led_pwm") - , m_sensordelay(attotime::from_msec(150)) , m_led_out(*this, "led%u", 0U) + , m_sensordelay(attotime::from_msec(150)) , m_disable_leds(false) { } -mephisto_sensors_board_device::mephisto_sensors_board_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mephisto_sensors_board_device::mephisto_sensors_board_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : mephisto_board_device(mconfig, MEPHISTO_SENSORS_BOARD, tag, owner, clock) { } -mephisto_buttons_board_device::mephisto_buttons_board_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mephisto_buttons_board_device::mephisto_buttons_board_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : mephisto_board_device(mconfig, MEPHISTO_BUTTONS_BOARD, tag, owner, clock) { } @@ -76,6 +76,9 @@ { m_led_out.resolve(); + m_mux = 0xff; + m_led_data = 0; + save_item(NAME(m_mux)); save_item(NAME(m_led_data)); @@ -99,15 +102,15 @@ // I/O handlers //------------------------------------------------- -void mephisto_board_device::refresh_leds_w(offs_t offset, uint8_t data) +void mephisto_board_device::refresh_leds_w(offs_t offset, u8 data) { if (!m_disable_leds) m_led_out[(offset >> 6 & 7) | (offset & 7) << 3] = data; } -uint8_t mephisto_board_device::input_r() +u8 mephisto_board_device::input_r() { - uint8_t data = 0xff; + u8 data = 0xff; for (int i = 0; i < 8; i++) if (!BIT(m_mux, i)) @@ -116,18 +119,18 @@ return data; } -uint8_t mephisto_board_device::mux_r() +u8 mephisto_board_device::mux_r() { return m_mux; } -void mephisto_board_device::mux_w(uint8_t data) +void mephisto_board_device::mux_w(u8 data) { m_mux = data; update_led_pwm(); } -void mephisto_board_device::led_w(uint8_t data) +void mephisto_board_device::led_w(u8 data) { m_led_data = data; update_led_pwm(); diff -Nru mame-0.230+dfsg.1/src/mame/machine/mmboard.h mame-0.231+dfsg.1/src/mame/machine/mmboard.h --- mame-0.230+dfsg.1/src/mame/machine/mmboard.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/machine/mmboard.h 2021-04-27 15:32:05.000000000 +0000 @@ -2,7 +2,7 @@ // copyright-holders:Sandro Ronco /********************************************************************** - Mephisto Sensors Board + Mephisto Modular Sensors Board *********************************************************************/ @@ -21,18 +21,18 @@ { public: // construction/destruction - mephisto_board_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); + mephisto_board_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); // configuration helpers - void set_disable_leds(int disable_leds) { m_disable_leds = disable_leds; } - void set_delay(attotime sensordelay) { m_sensordelay = sensordelay; } + void set_disable_leds(bool disable_leds) { m_disable_leds = disable_leds; } + void set_delay(attotime sensordelay) { m_sensordelay = sensordelay; } sensorboard_device *get() { return m_board; } - uint8_t input_r(); - void led_w(uint8_t data); - uint8_t mux_r(); - void mux_w(uint8_t data); + u8 input_r(); + void led_w(u8 data); + u8 mux_r(); + void mux_w(u8 data); protected: // device-level overrides @@ -40,25 +40,27 @@ virtual void device_reset() override; void set_config(machine_config &config, sensorboard_device::sb_type board_type); - void refresh_leds_w(offs_t offset, uint8_t data); + void refresh_leds_w(offs_t offset, u8 data); void update_led_pwm() { m_led_pwm->matrix(~m_mux, m_led_data); } required_device m_board; required_device m_led_pwm; - attotime m_sensordelay; - output_finder<64> m_led_out; - bool m_disable_leds; - uint8_t m_led_data; - uint8_t m_mux; + output_finder<64> m_led_out; + + attotime m_sensordelay; + bool m_disable_leds; + u8 m_led_data; + u8 m_mux; }; + // ======================> mephisto_sensors_board_device class mephisto_sensors_board_device : public mephisto_board_device { public: // construction/destruction - mephisto_sensors_board_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + mephisto_sensors_board_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); protected: // optional information overrides @@ -72,7 +74,7 @@ { public: // construction/destruction - mephisto_buttons_board_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + mephisto_buttons_board_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); protected: // optional information overrides diff -Nru mame-0.230+dfsg.1/src/mame/machine/nb1412m2.cpp mame-0.231+dfsg.1/src/mame/machine/nb1412m2.cpp --- mame-0.230+dfsg.1/src/mame/machine/nb1412m2.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/machine/nb1412m2.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -14,8 +14,6 @@ (with internal ROM). TODO: -- main sound timer is "jumpy" (like BGM tempo gets screwy then fixes itself somehow), - fiddling with port 0x90 seems to improve things, why? - DAC timer is guessworked; Legacy notes from drivers: @@ -104,7 +102,7 @@ map(0x42, 0x43).nopw(); // always 0x03 // DAC control - map(0x11, 0x11).nopw(); // - unknown (volume/channel control?) + map(0x11, 0x11).w(FUNC(nb1412m2_device::dac_control_w)); map(0x18, 0x18).w(FUNC(nb1412m2_device::dac_timer_w)); // timer frequency map(0x19, 0x19).nopw(); // 2 written at POST map(0x51, 0x52).w(FUNC(nb1412m2_device::dac_address_w)); // start address @@ -158,6 +156,7 @@ save_item(NAME(m_dac_playback)); save_item(NAME(m_dac_frequency)); save_item(NAME(m_const90)); + save_item(NAME(m_timer_rate)); m_timer = timer_alloc(TIMER_MAIN); m_timer->adjust(attotime::never); @@ -179,9 +178,9 @@ m_rom_op = 0; m_const90 = 0x18; // fixes coin sample if inserted at first title screen m_dac_current_address = m_dac_start_address = 0; - m_dac_frequency = 4000; m_timer_reg = false; m_dac_playback = false; + dac_timer_w(0xd0); m_dac_timer->adjust(attotime::never); } @@ -290,8 +289,10 @@ if(data != 1) logerror("nb1412m2: timer_w with data == %02x\n",data); - // TODO: timing of this, related to m_const90? - m_timer->adjust(attotime::from_hz(960)); + // The DAC frequency and timer clock are linked. + // When the DAC clock changes, sound driver sets wait loop count ($C010) + // in the range of 2 to 4 in order to keep the tempo of BGM even if clock changed. + m_timer->adjust(attotime::from_hz(double(clock()) / (256 * 35) * m_timer_rate)); } void nb1412m2_device::timer_ack_w(uint8_t data) @@ -314,13 +315,22 @@ } } +void nb1412m2_device::dac_control_w(uint8_t data) +{ + if (data == 0) + { + // Mighty Guy is uses this to stop psycho gun sound. + m_dac_playback = false; + } +} + // seems directly correlated to the DAC timer frequency // 0xd0 - 0xe0 - 0xf0 are the settings used void nb1412m2_device::dac_timer_w(uint8_t data) { -// popmessage("%02x",data); - // TODO: unknown algo, 0xe0*18 gives 4032 Hz which seems close enough for sample 36 - m_dac_frequency = data*18; + // TODO: Algorithm is unknown + m_timer_rate = ((data & 0x30) >> 4) + 1; + m_dac_frequency = double(clock()) / (256 * 12) * m_timer_rate; } // controls music tempo diff -Nru mame-0.230+dfsg.1/src/mame/machine/nb1412m2.h mame-0.231+dfsg.1/src/mame/machine/nb1412m2.h --- mame-0.230+dfsg.1/src/mame/machine/nb1412m2.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/machine/nb1412m2.h 2021-04-27 15:32:05.000000000 +0000 @@ -47,7 +47,8 @@ uint16_t m_rom_address; uint16_t m_adj_address; uint16_t m_dac_start_address, m_dac_current_address; - int m_dac_frequency; + double m_dac_frequency; + uint8_t m_timer_rate; uint8_t m_rom_op; uint8_t m_const90; bool m_timer_reg; @@ -72,6 +73,7 @@ uint8_t const90_r(); void const90_w(uint8_t data); void dac_address_w(offs_t offset, uint8_t data); + void dac_control_w(uint8_t data); void dac_timer_w(uint8_t data); }; diff -Nru mame-0.230+dfsg.1/src/mame/machine/pce_cd.cpp mame-0.231+dfsg.1/src/mame/machine/pce_cd.cpp --- mame-0.230+dfsg.1/src/mame/machine/pce_cd.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/machine/pce_cd.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -503,7 +503,7 @@ else { //m_cdda_status = PCE_CD_CDDA_PLAYING; - m_end_frame = m_toc->tracks[ cdrom_get_track(m_cd_file, m_current_frame) + 1 ].logframeofs; //get the end of THIS track + m_end_frame = m_toc->tracks[ cdrom_get_track(m_cd_file, m_current_frame) ].logframeofs + m_toc->tracks[ cdrom_get_track(m_cd_file, m_current_frame) ].logframes; //get the end of THIS track m_cdda->start_audio(m_current_frame, m_end_frame - m_current_frame); m_end_mark = 0; m_cdda_play_mode = 3; @@ -700,11 +700,6 @@ { track = std::max(bcd_2_dec(m_command_buffer[2]), 1U); frame = toc->tracks[track-1].logframeofs; - // PCE wants the start sector for data tracks to *not* include the pregap - if (toc->tracks[track-1].trktype != CD_TRACK_AUDIO) - { - frame += toc->tracks[track-1].pregap; - } m_data_buffer[3] = (toc->tracks[track-1].trktype == CD_TRACK_AUDIO) ? 0x00 : 0x04; } logerror("track = %d, frame = %d\n", track, frame); diff -Nru mame-0.230+dfsg.1/src/mame/machine/psxcd.cpp mame-0.231+dfsg.1/src/mame/machine/psxcd.cpp --- mame-0.230+dfsg.1/src/mame/machine/psxcd.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/machine/psxcd.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -1149,7 +1149,8 @@ if (mode&mode_autopause) { - autopause_sector = cdrom_get_track_start(m_cdrom_handle, track) + cdrom_get_toc(m_cdrom_handle)->tracks[track].frames; + auto toc = cdrom_get_toc(m_cdrom_handle); + autopause_sector = cdrom_get_track_start(m_cdrom_handle, track) + toc->tracks[track].logframes; // printf("pos=%d auto=%d\n",pos,autopause_sector); } diff -Nru mame-0.230+dfsg.1/src/mame/machine/smartboard.cpp mame-0.231+dfsg.1/src/mame/machine/smartboard.cpp --- mame-0.230+dfsg.1/src/mame/machine/smartboard.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/machine/smartboard.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,281 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Sandro Ronco -/****************************************************************************** - - Tasc SmartBoard - - The SmartBoard can detect which piece is present on a specific square, more - info on the technology used in the piece recognition system can be found in - the US patent 5,129,654 - -******************************************************************************/ - -#include "emu.h" -#include "smartboard.h" - -enum -{ - SB30_WHITE_KNIGHT1 = 0, - SB30_WHITE_KNIGHT2 = 1, - SB30_BLACK_KING = 2, - SB30_WHITE_KING = 3, - SB30_BLACK_QUEEN = 4, - SB30_WHITE_QUEEN = 5, - SB30_BLACK_ROOK1 = 6, - SB30_BLACK_ROOK2 = 7, - SB30_WHITE_ROOK1 = 8, - SB30_WHITE_ROOK2 = 9, - SB30_BLACK_BISHOP1 = 10, - SB30_BLACK_BISHOP2 = 11, - SB30_WHITE_BISHOP1 = 12, - SB30_WHITE_BISHOP2 = 13, - SB30_BLACK_KNIGHT1 = 14, - SB30_BLACK_KNIGHT2 = 15, - SB30_WHITE_PAWN1 = 16, - SB30_WHITE_PAWN2 = 17, - SB30_WHITE_PAWN3 = 18, - SB30_WHITE_PAWN4 = 19, - SB30_WHITE_PAWN5 = 20, - SB30_WHITE_PAWN6 = 21, - SB30_WHITE_PAWN7 = 22, - SB30_WHITE_PAWN8 = 23, - SB30_BLACK_PAWN1 = 24, - SB30_BLACK_PAWN2 = 25, - SB30_BLACK_PAWN3 = 26, - SB30_BLACK_PAWN4 = 27, - SB30_BLACK_PAWN5 = 28, - SB30_BLACK_PAWN6 = 29, - SB30_BLACK_PAWN7 = 30, - SB30_BLACK_PAWN8 = 31, -}; - -//************************************************************************** -// DEVICE DEFINITIONS -//************************************************************************** - -DEFINE_DEVICE_TYPE(TASC_SB30, tasc_sb30_device, "tasc_sb30", "Tasc SmartBoard SB30") - -//************************************************************************** -// LIVE DEVICE -//************************************************************************** - -//------------------------------------------------- -// tasc_sb30_device - constructor -//------------------------------------------------- - -tasc_sb30_device::tasc_sb30_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : device_t(mconfig, TASC_SB30, tag, owner, clock) - , m_board(*this, "board") - , m_out_leds(*this, "led_%u%u", 0U, 0U) -{ -} - - -//------------------------------------------------- -// device_start - device-specific startup -//------------------------------------------------- - -void tasc_sb30_device::device_start() -{ - m_out_leds.resolve(); - m_leds_off_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(tasc_sb30_device::leds_off_cb), this)); - - save_item(NAME(m_data)); - save_item(NAME(m_position)); - save_item(NAME(m_shift)); -} - -//------------------------------------------------- -// device_reset - device-specific reset -//------------------------------------------------- - -void tasc_sb30_device::device_reset() -{ - m_data = 0; - m_position = 0; - m_shift = 0; -} - - -//------------------------------------------------- -// device_add_mconfig - add device-specific -// machine configuration -//------------------------------------------------- - -void tasc_sb30_device::device_add_mconfig(machine_config &config) -{ - SENSORBOARD(config, m_board); - m_board->set_type(sensorboard_device::INDUCTIVE); - m_board->set_max_id(32); - m_board->init_cb().set(FUNC(tasc_sb30_device::init_cb)); - m_board->spawn_cb().set(FUNC(tasc_sb30_device::spawn_cb)); -} - - -TIMER_CALLBACK_MEMBER(tasc_sb30_device::leds_off_cb) -{ - for (int y=0; y<9; y++) - for (int x=0; x<9; x++) - m_out_leds[y][x] = 0; -} - -void tasc_sb30_device::init_cb(int state) -{ - m_board->clear_board(); - m_board->write_piece(0, 0, 1 + SB30_WHITE_ROOK1); - m_board->write_piece(7, 0, 1 + SB30_WHITE_ROOK2); - m_board->write_piece(1, 0, 1 + SB30_WHITE_KNIGHT1); - m_board->write_piece(6, 0, 1 + SB30_WHITE_KNIGHT2); - m_board->write_piece(2, 0, 1 + SB30_WHITE_BISHOP1); - m_board->write_piece(5, 0, 1 + SB30_WHITE_BISHOP2); - m_board->write_piece(3, 0, 1 + SB30_WHITE_QUEEN); - m_board->write_piece(4, 0, 1 + SB30_WHITE_KING); - m_board->write_piece(0, 7, 1 + SB30_BLACK_ROOK1); - m_board->write_piece(7, 7, 1 + SB30_BLACK_ROOK2); - m_board->write_piece(1, 7, 1 + SB30_BLACK_KNIGHT1); - m_board->write_piece(6, 7, 1 + SB30_BLACK_KNIGHT2); - m_board->write_piece(2, 7, 1 + SB30_BLACK_BISHOP1); - m_board->write_piece(5, 7, 1 + SB30_BLACK_BISHOP2); - m_board->write_piece(3, 7, 1 + SB30_BLACK_QUEEN); - m_board->write_piece(4, 7, 1 + SB30_BLACK_KING); - - for (int x = 0; x < 8; x++) - { - m_board->write_piece(x, 1, 1 + SB30_WHITE_PAWN1 + x); - m_board->write_piece(x, 6, 1 + SB30_BLACK_PAWN1 + x); - } -} - -bool tasc_sb30_device::piece_available(uint8_t id) -{ - for (int y=0; y<8; y++) - for (int x=0; x<8; x++) - { - if (m_board->read_piece(x, y) == id) - return false; - } - - return true; -} - -uint8_t tasc_sb30_device::spawn_cb(offs_t offset) -{ - int piece_id = -1; - if (offset == 1) - { - for (int p = 0; p < 8; p++) - if (piece_available(1 + SB30_WHITE_PAWN1 + p)) - { - piece_id = SB30_WHITE_PAWN1 + p; - break; - } - } - else if (offset == 7) - { - for (int p = 0; p < 8; p++) - if (piece_available(1 + SB30_BLACK_PAWN1 + p)) - { - piece_id = SB30_BLACK_PAWN1 + p; - break; - } - } - else if (offset == 2) - { - if (piece_available(1 + SB30_WHITE_KNIGHT1)) piece_id = SB30_WHITE_KNIGHT1; - else if (piece_available(1 + SB30_WHITE_KNIGHT2)) piece_id = SB30_WHITE_KNIGHT2; - } - else if (offset == 3) - { - if (piece_available(1 + SB30_WHITE_BISHOP1)) piece_id = SB30_WHITE_BISHOP1; - else if (piece_available(1 + SB30_WHITE_BISHOP2)) piece_id = SB30_WHITE_BISHOP2; - } - else if (offset == 4) - { - if (piece_available(1 + SB30_WHITE_ROOK1)) piece_id = SB30_WHITE_ROOK1; - else if (piece_available(1 + SB30_WHITE_ROOK2)) piece_id = SB30_WHITE_ROOK2; - } - else if (offset == 5 && piece_available(1 + SB30_WHITE_QUEEN)) - piece_id = SB30_WHITE_QUEEN; - - else if (offset == 6 && piece_available(1 + SB30_WHITE_KING)) - piece_id = SB30_WHITE_KING; - - else if (offset == 8) - { - if (piece_available(1 + SB30_BLACK_KNIGHT1)) piece_id = SB30_BLACK_KNIGHT1; - else if (piece_available(1 + SB30_BLACK_KNIGHT2)) piece_id = SB30_BLACK_KNIGHT2; - } - else if (offset == 9) - { - if (piece_available(1 + SB30_BLACK_BISHOP1)) piece_id = SB30_BLACK_BISHOP1; - else if (piece_available(1 + SB30_BLACK_BISHOP2)) piece_id = SB30_BLACK_BISHOP2; - } - - else if (offset == 10) - { - if (piece_available(1 + SB30_BLACK_ROOK1)) piece_id = SB30_BLACK_ROOK1; - else if (piece_available(1 + SB30_BLACK_ROOK2)) piece_id = SB30_BLACK_ROOK2; - } - else if (offset == 11 && piece_available(1 + SB30_BLACK_QUEEN)) - piece_id = SB30_BLACK_QUEEN; - - else if (offset == 12 && piece_available(1 + SB30_BLACK_KING)) - piece_id = SB30_BLACK_KING; - - if (piece_id >= 0) - return piece_id + 1; - else - return 0; // not available -} - -uint8_t tasc_sb30_device::read() -{ - int x = (m_position & 0x3f) / 8; - int y = (m_position & 0x3f) % 8; - int piece_id = m_board->read_sensor(7 - x, 7 - y); - - // each piece is identified by a single bit in a 32-bit sequence, if multiple bits are active the MSB is used - uint32_t sb30_id = 0; - if (piece_id > 0) - sb30_id = 1UL << (piece_id - 1); - - return BIT(sb30_id, m_shift & 0x1f); -} - - -void tasc_sb30_device::write(uint8_t data) -{ - if (BIT(data, 3) && !BIT(m_data, 3)) - m_position = 0; - - if (BIT(data, 7) && BIT(data, 6) && !BIT(m_data, 6)) - { - out_led(m_position); - m_leds_off_timer->adjust(attotime::from_hz(5)); - } - - if (!BIT(data, 7) && BIT(m_data, 7)) - { - m_position++; - if (m_position & 0x40) - { - m_shift++; - if (m_position & 1) - m_shift = 0; - } - } - - m_data = data; -} - - -void tasc_sb30_device::out_led(int pos) -{ - pos &= 0x3f; - int x = pos / 8; - int y = pos % 8; - m_out_leds[y + 0][x + 0] = 1; - m_out_leds[y + 0][x + 1] = 1; - m_out_leds[y + 1][x + 0] = 1; - m_out_leds[y + 1][x + 1] = 1; -} diff -Nru mame-0.230+dfsg.1/src/mame/machine/smartboard.h mame-0.231+dfsg.1/src/mame/machine/smartboard.h --- mame-0.230+dfsg.1/src/mame/machine/smartboard.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/machine/smartboard.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,60 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Sandro Ronco -/********************************************************************** - - Tasc SmartBoard - -*********************************************************************/ - -#ifndef MAME_MACHINE_SMARTBOARD_H -#define MAME_MACHINE_SMARTBOARD_H - -#pragma once - -#include "machine/sensorboard.h" - - -//************************************************************************** -// TYPE DEFINITIONS -//************************************************************************** - -// ======================> tasc_sb30_device - -class tasc_sb30_device : public device_t -{ -public: - // construction/destruction - tasc_sb30_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); - - uint8_t read(); - void write(uint8_t data); - -protected: - // device-level overrides - virtual void device_start() override; - virtual void device_reset() override; - - // optional information overrides - virtual void device_add_mconfig(machine_config &config) override; - -private: - TIMER_CALLBACK_MEMBER(leds_off_cb); - void out_led(int pos); - bool piece_available(uint8_t id); - void init_cb(int state); - uint8_t spawn_cb(offs_t offset); - - required_device m_board; - output_finder<9,9> m_out_leds; - emu_timer * m_leds_off_timer; - uint8_t m_data; - uint8_t m_position; - uint8_t m_shift; -}; - - -// device type definition -DECLARE_DEVICE_TYPE(TASC_SB30, tasc_sb30_device) - - -#endif // MAME_MACHINE_SMARTBOARD_H diff -Nru mame-0.230+dfsg.1/src/mame/machine/stfight.cpp mame-0.231+dfsg.1/src/mame/machine/stfight.cpp --- mame-0.230+dfsg.1/src/mame/machine/stfight.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/machine/stfight.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -37,7 +37,7 @@ */ -void stfight_state::init_empcity() +void stfight_state::init_stfight() { uint8_t *rom = memregion("maincpu")->base(); @@ -62,15 +62,9 @@ ( ~( ( src >> 6 ) ^ A ) & 0x01 ); } -} - -void stfight_state::init_stfight() -{ - init_empcity(); -} - -void stfight_state::init_cshooter() -{ + // Set clock prescaler FM:1/2 PSG:1/1 + m_ym[0]->write(0, 0x2f); + m_ym[1]->write(0, 0x2f); } void stfight_state::machine_start() @@ -81,7 +75,6 @@ m_int1_timer = timer_alloc(TIMER_STFIGHT_INTERRUPT_1); save_item(NAME(m_coin_state)); - save_item(NAME(m_fm_data)); save_item(NAME(m_cpu_to_mcu_empty)); diff -Nru mame-0.230+dfsg.1/src/mame/machine/thomflop.cpp mame-0.231+dfsg.1/src/mame/machine/thomflop.cpp --- mame-0.230+dfsg.1/src/mame/machine/thomflop.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/machine/thomflop.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,1867 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Antoine Mine -/********************************************************************** - - Copyright (C) Antoine Mine' 2006 - - Thomson 8-bit computers - -**********************************************************************/ - -#include "emu.h" -#include "includes/thomson.h" - - -#define VERBOSE 0 /* 0, 1 or 2 */ - -#define PRINT(x) osd_printf_info x - -#define LOG(x) do { if (VERBOSE > 0) logerror x; } while (0) -#define VLOG(x) do { if (VERBOSE > 1) logerror x; } while (0) - - - - -/******************* 3''1/2 & 5''1/4 disk format ********************/ - -/* - single density sector format: - - data bytes - - id field 00 6 byte synchro - FE 1 id field mark - 1 track - 1 side - 1 sector - 00 1 log sector size (0->128, 1->256, 2->512,...) - 2 CRC (unemulated) - FF 12 spaces - data field 00 6 bytes synchro - FB 1 data field mark - E5 128 actual data (set to E5 when formatting) - 2 CRC (unemulated) - FF 22 ? spaces - - - - double density sector format: - - data bytes - - id field 00 12 bit synchro - A1 3 byte synchro - FE 1 id field mark - 1 track - 1 side - 1 sector - 01 1 log sector size (0->128, 1->256, 2->512,...) - 2 CRC (unemulated) - 4E/F7 22 spaces - data field 00 12 bit synchro - A1 3 bytes synchro - FB 1 data field mark - E5 256 actual data (set to E5 when formatting) - 2 CRC (unemulated) - 4E/F7 74 ? spaces - - => at most 392 bytes / sector - => at most 6272 bytes / track - - Notes: - - the BIOS puts 4E bytes as spaces after id and data fields - - some protected games expect F7 bytes (instead of 4E) after id fields -*/ - -#define THOM_SIZE_ID 32 -#define THOM_SIZE_DATA_LO (128+80) -#define THOM_SIZE_DATA_HI (256+80) -#define THOM_SIZE_SYNCHRO 12 - - -// build an identifier, with header & space -int thomson_legacy_floppy_interface::floppy_make_addr(chrn_id id, uint8_t *dst, int sector_size) -{ - if ( sector_size == 128 ) - { - // single density - memset( dst, 0x00, 6 ); // synchro bytes - dst[ 7 ] = 0xfe; // address field mark - dst[ 8 ] = id.C; - dst[ 9 ] = id.H; - dst[ 10 ] = id.N; - dst[ 11 ] = id.R; - dst[ 12 ] = 0; // TODO: CRC - dst[ 13 ] = 0; // TODO: CRC - memset( dst + 14, 0xff, 12 ); // end mark - return 36; - } - else - { - // double density - memset( dst, 0xa1, 3 ); // synchro bytes - dst[ 3 ] = 0xfe; // address field mark - dst[ 4 ] = id.C; - dst[ 5 ] = id.H; - dst[ 6 ] = id.N; - dst[ 7 ] = id.R; - dst[ 8 ] = 0; // TODO: CRC - dst[ 9 ] = 0; // TODO: CRC - memset( dst + 10, 0xf7, 22 ); // end mark - return 32; - } -} - - - -// build a sector, with header & space -int thomson_legacy_floppy_interface::floppy_make_sector(legacy_floppy_image_device *img, chrn_id id, uint8_t *dst, int sector_size) -{ - if ( sector_size == 128 ) - { - // single density - memset( dst, 0x00, 6 ); // synchro bytes - dst[ 6 ] = 0xfb; // data field mark - img->floppy_drive_read_sector_data - ( id.H, id.data_id, dst + 7, sector_size ); - dst[ sector_size + 7 ] = 0; // TODO: CRC - dst[ sector_size + 8 ] = 0; // TODO: CRC - memset( dst + sector_size + 9, 0xff, 22 ); // end mark - return sector_size + 31; - } - else - { - // double density - memset( dst, 0xa1, 3 ); // synchro bytes - dst[ 3 ] = 0xfb; // data field mark - img->floppy_drive_read_sector_data - ( id.H, id.data_id, dst + 4, sector_size ); - dst[ sector_size + 4 ] = 0; // TODO: CRC - dst[ sector_size + 5 ] = 0; // TODO: CRC - memset( dst + sector_size + 6, 0xF7, 74 ); // end mark - return sector_size + 80; - } -} - - - -// build a whole track -int thomson_legacy_floppy_interface::floppy_make_track(legacy_floppy_image_device *img, uint8_t *dst, int sector_size, int side) -{ - uint8_t space = ( sector_size == 128 ) ? 0xff : 0; - uint8_t *org = dst; - chrn_id id; - int nb; - - // go to start of track - while ( ! img->floppy_drive_get_flag_state( FLOPPY_DRIVE_INDEX ) ) - { - if ( ! img->floppy_drive_get_next_id( side, &id ) ) - return 0; - } - - // for each sector... - for ( nb = 0; nb < 16; nb++ ) - { - if ( ! img->floppy_drive_get_next_id( side, &id ) ) - break; - - memset( dst, space, THOM_SIZE_SYNCHRO ); dst += THOM_SIZE_SYNCHRO; - dst += floppy_make_addr( id, dst, sector_size ); - memset( dst, space, THOM_SIZE_SYNCHRO ); dst += THOM_SIZE_SYNCHRO; - dst += floppy_make_sector( img, id, dst, sector_size ); - - if ( img->floppy_drive_get_flag_state( FLOPPY_DRIVE_INDEX ) ) - break; - } - return dst - org; -} - - - -/******************* QDD disk format ********************/ - -/* - sector format: - - data bytes - - id field 16 17 synchro - A5 1 id field mark - 1 sector (1-400) hi byte - 1 sector (1-400) low byte - 1 check-sum (sum modulo 256 of 3 last bytes) - - data field 16 10 synchro - 5A 1 data field mark - FF 128 actual data (set to FF when formatting) - 1 check-sum (sum modulo 256 of 129 last bytes) - - - there are 400 sectors numbered from 1 -*/ - -#define THOM_QDD_SYNCH_DISK 100 -#define THOM_QDD_SYNCH_ADDR 17 -#define THOM_QDD_SYNCH_DATA 10 - -#define THOM_QDD_SIZE_ID ( 4 + THOM_QDD_SYNCH_ADDR ) -#define THOM_QDD_SIZE_DATA ( 130 + THOM_QDD_SYNCH_DATA ) - - -// build an identifier, with header -int thomson_legacy_floppy_interface::qdd_make_addr(int sector, uint8_t *dst) -{ - dst[ 0 ] = 0xa5; - dst[ 1 ] = sector >> 8; - dst[ 2 ] = sector & 0xff; - dst[ 3 ] = dst[ 0 ] + dst[ 1 ] + dst[ 2 ]; - return 4; -} - - - -// build a sector, with header -int thomson_legacy_floppy_interface::qdd_make_sector(legacy_floppy_image_device *img, int sector, uint8_t *dst) -{ - int i; - dst[ 0 ] = 0x5a; - img->floppy_drive_read_sector_data ( 0, sector, dst + 1, 128 ); - dst[ 129 ] = 0; - for ( i = 0; i < 129; i++ ) - dst[ 129 ] += dst[ i ]; - return 130; -} - - - -// build a whole disk -int thomson_legacy_floppy_interface::qdd_make_disk(legacy_floppy_image_device *img, uint8_t *dst) -{ - uint8_t* org = dst; - int i; - - memset( dst, 0x16, THOM_QDD_SYNCH_DISK ); dst += THOM_QDD_SYNCH_DISK; - - for ( i = 1; i <= 400; i++ ) - { - memset( dst, 0x16, THOM_QDD_SYNCH_ADDR ); dst += THOM_QDD_SYNCH_ADDR; - dst += qdd_make_addr( i, dst ); - memset( dst, 0x16, THOM_QDD_SYNCH_DATA ); dst += THOM_QDD_SYNCH_DATA; - dst += qdd_make_sector( img, i, dst ); - } - - memset( dst, 0x16, THOM_QDD_SYNCH_DISK ); dst += THOM_QDD_SYNCH_DISK; - - return dst - org; -} - - - -/*********************** CD 90-640 controller ************************/ - -/* 5''1/4 two-sided double-density - used in TO7, TO7/70, MO5 computers - based on a WD2793 (or lower ?) chip -*/ - - - -uint8_t thomson_state::to7_5p14_r(offs_t offset) -{ - if ( offset < 4 ) - return m_wd2793_fdc->read(offset); - else if ( offset == 8 ) - return m_to7_5p14_select; - else - logerror ( "%s: to7_5p14_r: invalid read offset %i\n", machine().describe_context(), offset ); - return 0; -} - - - -void thomson_state::to7_5p14_w(offs_t offset, uint8_t data) -{ - if ( offset < 4 ) - m_wd2793_fdc->write(offset, data); - else if ( offset == 8 ) - { - // drive select - floppy_image_device *floppy = nullptr; - - if (BIT(data, 1)) floppy = m_wd2793_fdc->subdevice("0")->get_device(); - if (BIT(data, 2)) floppy = m_wd2793_fdc->subdevice("1")->get_device(); - - m_wd2793_fdc->set_floppy(floppy); - - if (floppy) - { - thom_floppy_active( 0 ); - floppy->mon_w(0); - floppy->ss_w(BIT(data, 0)); - } - } - else - { - logerror("%s: to7_5p14_w: invalid write offset %i (data=$%02X)\n", - machine().describe_context(), offset, data ); - } -} - - - -void thomson_state::to7_5p14_reset() -{ - logerror("%s: to7_5p14_reset: CD 90-640 controller\n", machine().describe_context()); - m_wd2793_fdc->reset(); -} - - - -void thomson_state::to7_5p14_init() -{ - logerror("%s: to7_5p14_init: CD 90-640 controller\n", machine().describe_context()); - save_item(NAME(m_to7_5p14_select)); -} - - - -/*********************** CD 90-015 controller ************************/ - -/* 5''1/4 one-sided single-density (up to 4 one-sided drives) - used in TO7, TO7/70, MO5 computers - based on HD 46503 S chip, but we actually use a MC 6843 instead - (seems they are clone) -*/ - - - -uint8_t thomson_state::to7_5p14sd_r(offs_t offset) -{ - if ( offset < 8 ) - return m_mc6843->read(offset); - else if ( offset >= 8 && offset <= 9 ) - return m_to7_5p14sd_select; - else - logerror ( "%f $%04x to7_5p14sd_r: invalid read offset %i\n", machine().time().as_double(), m_maincpu->pc(), offset ); - return 0; -} - - - -void thomson_state::to7_5p14sd_w(offs_t offset, uint8_t data) -{ - if ( offset < 8 ) - m_mc6843->write(offset, data); - else if ( offset >= 8 && offset <= 9 ) - { - // drive select - int drive = -1, side = 0; - - if ( data & 1 ) - { - drive = 0; - side = 0; - } - else if ( data & 2 ) - { - drive = 1; - side = 1; - } - else if ( data & 4 ) - { - drive = 2; - side = 0; - } - else if ( data & 8 ) - { - drive = 3; - side = 1; - } - - m_to7_5p14sd_select = data; - - if ( drive != -1 ) - { - thom_floppy_active( 0 ); - m_mc6843->set_drive( drive ); - m_mc6843->set_side( side ); - LOG(( "%f $%04x to7_5p14sd_w: $%02X set drive=%i side=%i\n", - machine().time().as_double(), m_maincpu->pc(), data, drive, side )); - } - } - else - logerror ( "%f $%04x to7_5p14sd_w: invalid write offset %i (data=$%02X)\n", - machine().time().as_double(), m_maincpu->pc(), offset, data ); -} - -void thomson_state::to7_5p14_index_pulse_callback( int state ) -{ - m_mc6843->set_index_pulse( state ); -} - -void thomson_state::to7_5p14sd_reset() -{ - LOG(( "to7_5p14sd_reset: CD 90-015 controller\n" )); - for (auto &img : m_floppy_image) - { - img->floppy_drive_set_ready_state( FLOPPY_DRIVE_READY, 0 ); - img->floppy_drive_set_rpm( 300. ); - img->floppy_drive_seek( - img->floppy_drive_get_current_track() ); - } -} - - -void thomson_state::to7_5p14sd_init() -{ - LOG(( "to7_5p14sd_init: CD 90-015 controller\n" )); - save_item(NAME(m_to7_5p14sd_select)); -} - - -/*********************** CQ 90-028 controller ************************/ - -/* QDD 2''8 controller - used in TO7, TO7/70, MO5 computers - it is based on a MC6852 SSDA - - Note: the MC6852 is only partially emulated, most features are not used in - the controller and are ignored. -*/ - - - -// MC6852 status -enum : uint8_t -{ - QDD_S_RDA = 0x01, // receiver data available - QDD_S_TDRA = 0x02, // transitter data register available - QDD_S_NDCD = 0x04, // data carrier detect, negated (unused) - QDD_S_NCTS = 0x08, // clear-to-send, negated write-protect - QDD_S_TUF = 0x10, // transmitter underflow (unused) - QDD_S_OVR = 0x20, // receiver overrun (unused) - QDD_S_PE = 0x40, // receiver parity error (unused) - QDD_S_IRQ = 0x80, // interrupt request - QDD_S_ERR = (QDD_S_TUF | QDD_S_OVR | QDD_S_PE | QDD_S_NDCD | QDD_S_NCTS) -}; - - -// MC6852 control -enum : uint8_t -{ - QDD_C1_RIE = 0x20, // interrupt on reveive - QDD_C1_TIE = 0x10, // interrupt on transmit - QDD_C1_CLRSYNC = 0x08, // clear receiver sync char (unused) - QDD_C1_STRIPSYNC = 0x04, // strips sync from received (unused) - QDD_C1_TRESET = 0x02, // transmitter reset - QDD_C1_RRESET = 0x01, // receiver reset - QDD_C2_EIE = 0x80, // interrupt on error - QDD_C2_TSYNC = 0x40, // underflow = ff if 0 / sync if 1 (unused) - QDD_C2_BLEN = 0x04, // transfer byte length (unused) - QDD_C3_CLRTUF = 0x08, // clear underflow - QDD_C3_CLRCTS = 0x04, // clear CTS - QDD_C3_SYNCLEN = 0x02, // sync byte length (unused) - QDD_C3_SYNCMODE = 0x01 // external / internal sync mode (unused) -}; - - -// a track is actually the whole disk = 400 128-byte sectors + headers -#define QDD_MAXBUF ( THOM_QDD_SIZE_ID + THOM_QDD_SIZE_DATA ) * 512 - - -DEFINE_DEVICE_TYPE(CQ90_028, cq90_028_device, "cq90_028", "Thomson CQ 90-028 Quick Disk Controller") - -cq90_028_device::cq90_028_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : device_t(mconfig, CQ90_028, tag, owner, clock) - , thomson_legacy_floppy_interface(mconfig, *this) - , m_qdd_image(*this, "^floppy0") -{ -} - - -void cq90_028_device::index_pulse_cb(int state) -{ - m_index_pulse = state; - - if ( state ) - { - // rewind to disk start - m_data_idx = 0; - m_start_idx = 0; - m_data_size = 0; - } - - VLOG(( "%f to7_qdd_pulse_cb: state=%i\n", machine().time().as_double(), state )); -} - - -// update MC6852 status register -void cq90_028_device::stat_update() -{ - // byte-ready - m_status |= QDD_S_RDA | QDD_S_TDRA; - if ( !m_drive ) - m_status |= QDD_S_PE; - - // write-protect - if (m_qdd_image->floppy_wpt_r() == CLEAR_LINE) - m_status |= QDD_S_NCTS; - - // sticky reset conditions - if ( m_ctrl1 & QDD_C1_RRESET ) - m_status &= ~(QDD_S_PE | QDD_S_RDA | QDD_S_OVR); - if ( m_ctrl1 & QDD_C1_TRESET ) - m_status &= ~(QDD_S_TDRA | QDD_S_TUF); - - // irq update - if ( ( (m_ctrl1 & QDD_C1_RIE) && !(m_status & QDD_S_RDA ) ) || - ( (m_ctrl1 & QDD_C1_TIE) && !(m_status & QDD_S_TDRA) ) || - ( (m_ctrl2 & QDD_C2_EIE) && !(m_status & QDD_S_ERR ) ) ) - m_status &= ~QDD_S_IRQ; - - if ( ( (m_ctrl1 & QDD_C1_RIE) && (m_status & QDD_S_RDA ) ) || - ( (m_ctrl1 & QDD_C1_TIE) && (m_status & QDD_S_TDRA) ) || - ( (m_ctrl2 & QDD_C2_EIE) && (m_status & QDD_S_ERR ) ) ) - m_status |= QDD_S_IRQ; -} - - - -uint8_t cq90_028_device::qdd_read_byte() -{ - uint8_t data; - - // rebuild disk if needed - if ( !m_data_size ) - { - m_data_size = qdd_make_disk( m_qdd_image.target(), &m_data[0] ); - assert( m_data_idx < QDD_MAXBUF ); - } - - if ( m_data_idx >= m_data_size ) - data = 0; - else - data = m_data[ m_data_idx ]; - - VLOG(( "%f %s to7_qdd_read_byte: RDATA off=%i/%i data=$%02X\n", - machine().time().as_double(), machine().describe_context(), - m_data_idx, m_data_size, data )); - - m_data_idx++; - m_start_idx = m_data_idx; - - return data; -} - - - -/* This is quite complex: bytes are written one at a time by the CPU and we - must detect the following patterns: - * CPU write id field and data field => format - * CPU write data field after it has read an id field => sector write - */ -void cq90_028_device::qdd_write_byte(uint8_t data) -{ - // rebuild disk if needed - if ( !m_data_size ) - { - m_data_size = qdd_make_disk( m_qdd_image.target(), &m_data[0] ); - assert( m_data_idx < QDD_MAXBUF ); - } - - if ( ( m_start_idx != m_data_idx || // field in construction - data==0xA5 || data==0x5A ) && // first byte of tentative field - m_data_idx < m_data_size ) - { - // this is the first byte of the field - if ( m_start_idx == m_data_idx ) - m_data_crc = 0; - - // accumulate bytes - m_data[ m_data_idx ] = data; - m_data_idx++; - - VLOG (( "%f %s to7_qdd_write_byte: got $%02X offs=%i-%i\n", - machine().time().as_double(), machine().describe_context(), data, - m_start_idx, m_data_idx )); - - // end of tentative id field - if ( m_data_idx == m_start_idx + 4 && - m_data[ m_start_idx ] == 0xA5 && - m_data[ m_start_idx + 3 ] == m_data_crc ) - { - // got an id field => format - int sector = (int) m_data[ m_start_idx + 1 ] * 256 + (int) m_data[ m_start_idx + 2 ]; - uint8_t filler = 0xff; - - LOG(( "%f %s to7_qdd_write_byte: got id field for sector=%i\n", - machine().time().as_double(), machine().describe_context(), sector )); - - m_qdd_image->floppy_drive_format_sector( - 0, sector, 0, 0, sector, 128, filler ); - //thom_floppy_active( 1 ); - m_start_idx = m_data_idx; - } - - // end of tentative data field - else if ( m_data_idx == m_start_idx + 130 && - m_data[ m_start_idx ] == 0x5A && - m_data[ m_start_idx + 129 ] == m_data_crc ) - { - int i; - - // look backwards for previous id field - for ( i = m_start_idx - 3; i >= 0; i-- ) - { - if ( m_data[ i ] == 0xA5 && - ( ( m_data[ i ] + m_data[ i + 1 ] + - m_data[ i + 2 ] ) & 0xff - ) == m_data[ i + 3 ] ) - break; - } - - if ( i >= 0 ) - { - // got an id & a data field => write - int sector = (int) m_data[ i + 1 ] * 256 + (int) m_data[ i + 2 ]; - - LOG(( "%f %s to7_qdd_write_byte: goto data field for sector=%i\n", - machine().time().as_double(), machine().describe_context(), sector )); - - m_qdd_image->floppy_drive_write_sector_data( 0, sector, &m_data[ m_start_idx + 1 ], 128, 0 ); - //thom_floppy_active( 1 ); - } - - m_start_idx = m_data_idx; - } - - else m_data_crc += data; - } -} - - - -uint8_t cq90_028_device::qdd_r(offs_t offset) -{ - switch ( offset ) - { - case 0: // MC6852 status - stat_update(); - VLOG(( "%f %s to7_qdd_r: STAT=$%02X irq=%i pe=%i ovr=%i und=%i tr=%i rd=%i ncts=%i\n", - machine().time().as_double(), machine().describe_context(), m_status, - m_status & QDD_S_IRQ ? 1 : 0, - m_status & QDD_S_PE ? 1 : 0, - m_status & QDD_S_OVR ? 1 : 0, - m_status & QDD_S_TUF ? 1 : 0, - m_status & QDD_S_TDRA ? 1 : 0, - m_status & QDD_S_RDA ? 1 : 0, - m_status & QDD_S_NCTS ? 1 : 0 )); - return m_status; - - case 1: // MC6852 data input => read byte from disk - m_status &= ~(QDD_S_RDA | QDD_S_PE | QDD_S_OVR); - stat_update(); - return qdd_read_byte(); - - case 8: // floppy status - { - uint8_t data = 0; - device_image_interface* img = m_qdd_image.target(); - if ( ! img->exists() ) - data |= 0x40; // disk present - if ( m_index_pulse ) - data |= 0x80; // disk start - VLOG(( "%f %s to7_qdd_r: STATUS8 $%02X\n", machine().time().as_double(), machine().describe_context(), data )); - return data; - } - - default: - logerror ( "%f %s to7_qdd_r: invalid read offset %i\n", machine().time().as_double(), machine().describe_context(), offset ); - return 0; - } -} - - - -void cq90_028_device::qdd_w(offs_t offset, uint8_t data) -{ - switch ( offset ) - { - case 0: // MC6852 control 1 - // reset - if ( data & QDD_C1_RRESET ) - m_status &= ~(QDD_S_PE | QDD_S_RDA | QDD_S_OVR); - if ( data & QDD_C1_TRESET ) - m_status &= ~(QDD_S_TDRA | QDD_S_TUF); - - m_ctrl1 = ( data & ~(QDD_C1_RRESET | QDD_C1_TRESET) ) |( data & (QDD_C1_RRESET | QDD_C1_TRESET) & m_ctrl1 ); - stat_update(); - VLOG(( "%f %s to7_qdd_w: CTRL1=$%02X reset=%c%c %s%sirq=%c%c\n", - machine().time().as_double(), machine().describe_context(), data, - data & QDD_C1_RRESET ? 'r' : '-', data & QDD_C1_TRESET ? 't' : '-', - data & QDD_C1_STRIPSYNC ? "strip-sync " : "", - data & QDD_C1_CLRSYNC ? "clear-sync " : "", - data & QDD_C1_RIE ? 'r' : '-', - data & QDD_C1_TIE ? 't' : '-' )); - break; - - case 1: - switch ( m_ctrl1 >> 6 ) - { - case 0: // MC6852 control 2 - { -#if 0 - // most of these are unused now - static const int bit[8] = { 6, 6, 7, 8, 7, 7, 8, 8 }; - static const int par[8] = { 2, 1, 0, 0, 2, 1, 2, 1 }; - static const char *const parname[3] = { "none", "odd", "even" }; - int bits, parity; - bits = bit[ (data >> 3) & 7 ]; - parity = par[ (data >> 3) & 7 ]; - stat_update(); - VLOG(( "%f %s to7_qdd_w: CTRL2=$%02X bits=%i par=%s blen=%i under=%s%s\n", - machine().time().as_double(), machine().describe_context(), data, - bits, parname[ parity ], data & QDD_C2_BLEN ? 1 : 2, - data & QDD_C2_TSYNC ? "sync" : "ff", - data & QDD_C2_EIE ? "irq-err" : "" )); -#endif - m_ctrl2 = data; - break; - } - - case 1: // MC6852 control 3 - m_ctrl3 = data; - // reset just once each write, not sticky - if ( data & QDD_C3_CLRTUF ) - m_status &= ~QDD_S_TUF; - if ( data & QDD_C3_CLRCTS ) - m_status &= ~QDD_S_NCTS; - stat_update(); - VLOG(( "%f %s to7_qdd_w: CTRL3=$%02X %s%ssync-len=%i sync-mode=%s\n", - machine().time().as_double(), machine().describe_context(), data, - data & QDD_C3_CLRTUF ? "clr-tuf " : "", - data & QDD_C3_CLRCTS ? "clr-cts " : "", - data & QDD_C3_SYNCLEN ? 1 : 2, - data & QDD_C3_SYNCMODE ? "ext" : "int" )); - break; - - case 2: // MC6852 sync code => write byte to disk - qdd_write_byte( data ); - break; - - case 3: // MC6852 data out => does not seem to be used - VLOG(( "%f %s to7_qdd_w: ignored WDATA=$%02X\n", machine().time().as_double(), machine().describe_context(), data )); - break; - - } - break; - - case 8: // set drive - m_drive = data; - VLOG(( "%f %s to7_qdd_w: DRIVE=$%02X\n", machine().time().as_double(), machine().describe_context(), data )); - break; - - case 12: // motor pulse ? - //thom_floppy_active( 0 ); - VLOG(( "%f %s to7_qdd_w: MOTOR=$%02X\n", machine().time().as_double(), machine().describe_context(), data )); - break; - - default: - logerror ( "%f %s to7_qdd_w: invalid write offset %i (data=$%02X)\n", machine().time().as_double(), machine().describe_context(), offset, data ); - } -} - - - -void cq90_028_device::qdd_reset() -{ - LOG(( "to7_qdd_reset: CQ 90-028 controller\n" )); - - m_qdd_image->floppy_drive_set_ready_state( FLOPPY_DRIVE_READY, 0 ); - - m_qdd_image->floppy_mon_w(CLEAR_LINE); - - // pulse each time the whole-disk spiraling track ends - // at 90us per byte read, the disk can be read in 6s - m_qdd_image->floppy_drive_set_rpm( 60. / 6. ); - - m_ctrl1 |= QDD_C1_TRESET | QDD_C1_RRESET; // reset - m_ctrl2 &= 0x7c; // clear EIE, PC2-PC1 - m_ctrl3 &= 0xfe; // internal sync - m_drive = 0; - stat_update(); -} - - - -void cq90_028_device::device_start() -{ - m_data = make_unique_clear(QDD_MAXBUF); - - save_item(NAME(m_status)); - save_item(NAME(m_ctrl1)); - save_item(NAME(m_ctrl2)); - save_item(NAME(m_ctrl3)); - save_item(NAME(m_drive)); - save_item(NAME(m_data_idx)); - save_item(NAME(m_start_idx)); - save_item(NAME(m_data_size)); - save_item(NAME(m_data_crc)); - save_item(NAME(m_index_pulse)); - save_pointer(NAME(m_data), QDD_MAXBUF); -} - - - -/********************** THMFC1 controller *************************/ - -/* custom Thomson Gate-array for 3''1/2, 5''1/4 (double density only) & QDD - */ - - -// STAT0 flags -enum : uint8_t -{ - STAT0_SYNCHRO = 0x01, // bit clock synchronized - STAT0_BYTE_READY_OP = 0x02, // byte ready (high-level operation) - STAT0_CRC_ERROR = 0x04, - STAT0_FINISHED = 0x08, - STAT0_FINISHING = 0x10, // (unemulated) - STAT0_BYTE_READY_POL = 0x80 // polling mode -}; - -/*#define THOM_MAXBUF (THOM_SIZE_ID+THOM_SIZE_DATA_HI+2*THOM_SIZE_SYNCHRO)*17*/ -#define THOM_MAXBUF ( THOM_QDD_SIZE_ID + THOM_QDD_SIZE_DATA ) * 512 - - -DEFINE_DEVICE_TYPE(THMFC1, thmfc1_device, "thmfc1", "Thomson THMFC1 floppy controller") - -ALLOW_SAVE_TYPE(thmfc1_device::thmfc1_op); - -thmfc1_device::thmfc1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : device_t(mconfig, THMFC1, tag, owner, clock) - , thomson_legacy_floppy_interface(mconfig, *this) - , m_floppy_image(*this, "^floppy%u", 0U) - , m_floppy_active_cb(*this) - , m_op(OP_RESET) - , m_sector(0) - , m_sector_id(0) - , m_track(0) - , m_side(0) - , m_drive(0) - , m_sector_size(0) - , m_formatting(0) - , m_ipl(0) - , m_wsync(0) - , m_motor_on(0) - , m_data_idx(0) - , m_data_size(0) - , m_data_finish(0) - , m_data_raw_idx(0) - , m_data_raw_size(0) - , m_data_crc(0) - , m_stat0(0) - , m_floppy_cmd(nullptr) -{ -} - - -void thmfc1_device::device_resolve_objects() -{ - m_floppy_active_cb.resolve_safe(); -} - - -legacy_floppy_image_device *thmfc1_device::get_floppy_image() -{ - return m_floppy_image[m_drive].target(); -} - - - -bool thmfc1_device::floppy_is_qdd( legacy_floppy_image_device *image ) const -{ - if (!image) return false; - if (!image->exists()) return false; - return image->length() == 51200; // idf QDD -} - - - -void thmfc1_device::index_pulse_cb( int index, int state ) -{ - legacy_floppy_image_device *const image = m_floppy_image[index]; - - if ( image != get_floppy_image()) - return; - - if ( floppy_is_qdd(image) ) - { - // pulse each time the whole-disk spiraling track ends - image->floppy_drive_set_rpm( 16.92f /* 423/25 */ ); - m_ipl = state; - if ( state ) - { - m_data_raw_size = 0; - m_data_raw_idx = 0; - m_data_idx = 0; - } - } - else - { - image->floppy_drive_set_rpm( 300. ); - m_ipl = state; - if ( state ) - m_data_raw_idx = 0; - } - - VLOG(( "%f thmfc_floppy_index_pulse_cb: state=%i\n", machine().time().as_double(), state )); -} - - - -int thmfc1_device::floppy_find_sector( chrn_id* dst ) -{ - legacy_floppy_image_device *const img = get_floppy_image(); - chrn_id id; - int r = 0; - - // scan track, try 4 revolutions - while ( r < 4 ) - { - if ( img->floppy_drive_get_next_id( m_side, &id ) ) - { - if ( id.C == m_track && - id.R == m_sector && - (128 << id.N) == m_sector_size - /* check side ? id.H == m_side */ ) - { - if ( dst ) - memcpy( dst, &id, sizeof( chrn_id ) ); - m_stat0 = STAT0_BYTE_READY_POL; - LOG (( "thmfc_floppy_find_sector: sector found C=%i H=%i R=%i N=%i\n", id.C, id.H, id.R, id.N )); - return 1; - } - } - - if ( img->floppy_drive_get_flag_state( FLOPPY_DRIVE_INDEX ) ) - r++; - } - - m_stat0 = STAT0_CRC_ERROR | STAT0_FINISHED; - LOG (( "thmfc_floppy_find_sector: sector not found drive=%s track=%i sector=%i\n", img->tag(), m_track, m_sector )); - return 0; -} - - - -// complete command (by read, write, or timeout) -void thmfc1_device::floppy_cmd_complete() -{ - LOG (( "%f thmfc_floppy_cmd_complete_cb: cmd=%i off=%i/%i/%i\n", - machine().time().as_double(), m_op, m_data_idx, - m_data_finish - 1, m_data_size - 1 )); - - if ( m_op == OP_WRITE_SECT ) - { - legacy_floppy_image_device *const img = get_floppy_image(); - img->floppy_drive_write_sector_data( m_side, m_sector_id, &m_data[3], m_data_size - 3, 0 ); - m_floppy_active_cb( 1 ); - } - m_op = OP_RESET; - m_stat0 |= STAT0_FINISHED; - m_data_idx = 0; - m_data_size = 0; - m_floppy_cmd->adjust(attotime::never); -} - - - -TIMER_CALLBACK_MEMBER( thmfc1_device::floppy_cmd_complete_cb ) -{ - floppy_cmd_complete(); -} - - - -// intelligent read: show just one field, skip header -uint8_t thmfc1_device::floppy_read_byte() -{ - uint8_t data = m_data[ m_data_idx ]; - - VLOG(( "%f %s thmfc_floppy_read_byte: off=%i/%i/%i data=$%02X\n", - machine().time().as_double(), machine().describe_context(), - m_data_idx, m_data_finish - 1, m_data_size - 1, - data )); - - if ( m_data_idx >= m_data_size - 1 ) - floppy_cmd_complete(); - else - m_data_idx++; - - if ( m_data_idx >= m_data_finish ) - m_stat0 |= STAT0_FINISHED; - - return data; -} - - - -// dumb read: show whole track with field headers and gaps -uint8_t thmfc1_device::floppy_raw_read_byte() -{ - uint8_t data; - - // rebuild track if needed - if ( ! m_data_raw_size ) - { - if ( floppy_is_qdd(get_floppy_image())) - // QDD: track = whole disk - m_data_raw_size = qdd_make_disk ( get_floppy_image(), &m_data[0] ); - else - { - m_data_raw_idx = 0; - m_data_raw_size = floppy_make_track( get_floppy_image(), &m_data[0], - m_sector_size, m_side ); - } - assert( m_data_raw_size < THOM_MAXBUF ); - } - - if ( m_data_raw_idx >= m_data_raw_size ) - data = 0; - else - data = m_data[ m_data_raw_idx ]; - - VLOG(( "%f %s thmfc_floppy_raw_read_byte: off=%i/%i data=$%02X\n", - machine().time().as_double(), machine().describe_context(), - m_data_raw_idx, m_data_raw_size, data )); - - m_data_raw_idx++; - - return data; -} - - - -// QDD writing / formating -void thmfc1_device::floppy_qdd_write_byte( uint8_t data ) -{ - int i; - - if ( m_formatting && - ( m_data_idx || data==0xA5 || data==0x5A ) && - m_data_raw_idx < THOM_MAXBUF ) - { - if ( ! m_data_raw_size ) - { - m_data_raw_size = qdd_make_disk ( get_floppy_image(), &m_data[0] ); - assert( m_data_raw_size < THOM_MAXBUF ); - } - - // accumulate bytes to form a field - m_data[ m_data_raw_idx ] = data; - m_data_raw_idx++; - - if ( ! m_data_idx ) - { - // start - m_data_crc = 0; - m_data_idx = m_data_raw_idx; - } - - VLOG (( "%f %s thmfc_floppy_qdd_write_byte: $%02X offs=%i-%i\n", - machine().time().as_double(), machine().describe_context(), data, - m_data_idx, m_data_raw_idx )); - - if ( m_data_raw_idx == m_data_idx + 3 && - m_data[ m_data_idx - 1 ] == 0xA5 && - m_data[ m_data_idx + 2 ] == m_data_crc ) - { - // got an id field => format - int sector = (int) m_data[ m_data_idx ] * 256 + (int) m_data[ m_data_idx + 1 ]; - uint8_t filler = 0xff; - - LOG(( "%f %s thmfc_floppy_qdd_write_byte: id field, sector=%i\n", machine().time().as_double(), machine().describe_context(), sector )); - - get_floppy_image()->floppy_drive_format_sector( 0, sector, 0, 0, sector, 128, filler ); - m_floppy_active_cb( 1 ); - m_data_idx = 0; - } - - else if ( m_data_raw_idx == m_data_idx + 129 && - m_data[ m_data_idx - 1 ] == 0x5A && - m_data[ m_data_idx + 128 ] == m_data_crc ) - { - // look backwards for previous id field - for ( i = m_data_idx - 4; i >= 0; i-- ) - { - if ( m_data[ i ] == 0xA5 && - ( ( m_data[ i ] + m_data[ i + 1 ] + - m_data[ i + 2 ] ) & 0xff - ) == m_data[ i + 3 ] ) - break; - } - - if ( i >= 0 ) - { - // got an id & a data field => write - legacy_floppy_image_device * img = get_floppy_image(); - int sector = (int) m_data[ i + 1 ] * 256 + - (int) m_data[ i + 2 ]; - - LOG(( "%f %s thmfc_floppy_qdd_write_byte: data field, sector=%i\n", - machine().time().as_double(), machine().describe_context(), sector )); - - img->floppy_drive_write_sector_data( 0, sector, &m_data[m_data_idx], 128, 0 ); - m_floppy_active_cb( 1 ); - } - - m_data_idx = 0; - - } - else - m_data_crc += data; - } - else - { - m_data_raw_idx++; - VLOG (( "%f %s thmfc_floppy_qdd_write_byte: ignored $%02X\n", machine().time().as_double(), machine().describe_context(), data )); - } - -} - - - -// intelligent writing -void thmfc1_device::floppy_write_byte( uint8_t data ) -{ - VLOG (( "%f %s thmfc_floppy_write_byte: off=%i/%i data=$%02X\n", - machine().time().as_double(), machine().describe_context(), - m_data_idx, m_data_size - 1, data )); - - m_data_raw_size = 0; - m_data[ m_data_idx ] = data; - if ( m_data_idx >= m_data_size - 1 ) - floppy_cmd_complete(); - else - m_data_idx++; -} - -// intelligent formatting -void thmfc1_device::floppy_format_byte( uint8_t data ) -{ - VLOG (( "%f %s thmfc_floppy_format_byte: $%02X\n", machine().time().as_double(), machine().describe_context(), data )); - - m_data_raw_size = 0; - - // accumulate bytes to form an id field - if ( m_data_idx || data==0xA1 ) - { - static const uint8_t header[] = { 0xa1, 0xa1, 0xa1, 0xfe }; - m_data[ m_data_idx ] = data; - m_data_idx++; - if ( m_data_idx > 11 ) - { - if ( !memcmp ( &m_data[0], header, sizeof( header ) ) ) - { - // got id field => format - legacy_floppy_image_device * img = get_floppy_image(); - uint8_t track = m_data[4]; - uint8_t side = m_data[5]; - uint8_t sector = m_data[6]; - uint8_t length = m_data[7]; // actually, log length - uint8_t filler = 0xe5; // standard Thomson filler - - chrn_id id; - if ( floppy_find_sector( &id ) ) - { - img->floppy_drive_format_sector( side, m_sector_id, track, m_side, sector, length, filler ); - m_floppy_active_cb( 1 ); - } - } - - m_data_idx = 0; - } - - } -} - - - -uint8_t thmfc1_device::floppy_r(offs_t offset) -{ - switch ( offset ) - { - case 0: // STAT0 - m_stat0 ^= STAT0_SYNCHRO | STAT0_BYTE_READY_POL; - VLOG(( "%f %s thmfc_floppy_r: STAT0=$%02X\n", machine().time().as_double(), machine().describe_context(), m_stat0 )); - return m_stat0; - - case 1: // STAT1 - { - uint8_t data = 0; - legacy_floppy_image_device * img = get_floppy_image(); - int flags = img->floppy_drive_get_flag_state(-1 ); - if ( floppy_is_qdd(img) ) - { - if ( ! img->exists() ) - data |= 0x40; // disk present - if ( ! m_ipl ) - data |= 0x02; // disk start - data |= 0x08; // connected - } - else - { - if ( m_ipl ) - data |= 0x40; - if ( img->exists() ) - data |= 0x20; // disk change (?) - - data |= !img->floppy_tk00_r() << 3; - - if ( flags & FLOPPY_DRIVE_READY ) - data |= 0x02; - } - if (!m_motor_on) - data |= 0x10; - if (!img->floppy_wpt_r()) - data |= 0x04; - VLOG(( "%f %s thmfc_floppy_r: STAT1=$%02X\n", machine().time().as_double(), machine().describe_context(), data )); - return data; - } - - case 3: // RDATA - - if ( m_op == OP_READ_SECT || m_op == OP_READ_ADDR ) - return floppy_read_byte(); - else - return floppy_raw_read_byte(); - - case 6: - return 0; - - case 8: - { - // undocumented => emulate TO7 QDD controller ? - uint8_t data = m_ipl << 7; - VLOG(( "%f %s thmfc_floppy_r: STAT8=$%02X\n", machine().time().as_double(), machine().describe_context(), data )); - return data; - } - - default: - logerror ( "%f %s thmfc_floppy_r: invalid read offset %i\n", machine().time().as_double(), machine().describe_context(), offset ); - return 0; - } -} - - - -void thmfc1_device::floppy_w(offs_t offset, uint8_t data) -{ - switch ( offset ) { - case 0: // CMD0 - { - int wsync = (data >> 4) & 1; - int qdd = floppy_is_qdd(get_floppy_image()); - chrn_id id; - m_formatting = (data >> 2) & 1; - LOG (( "%f %s thmfc_floppy_w: CMD0=$%02X dens=%s wsync=%i dsync=%i fmt=%i op=%i\n", - machine().time().as_double(), machine().describe_context(), data, - (BIT(data, 5) ? "FM" : "MFM"), - wsync, (data >> 3) & 1, - m_formatting, data & 3 )); - - // abort previous command, if any - m_op = OP_RESET; - m_floppy_cmd->adjust(attotime::never); - - switch ( data & 3 ) - { - case OP_RESET: - m_stat0 = STAT0_FINISHED; - break; - - case OP_WRITE_SECT: - if ( qdd ) - logerror( "thmfc_floppy_w: smart operation 1 not supported for QDD\n" ); - else if ( floppy_find_sector( &id ) ) - { - m_sector_id = id.data_id; - m_data_idx = 0; - m_data_size = m_sector_size + 3; // A1 A1 FB - m_data_finish = m_sector_size + 3; - m_stat0 |= STAT0_BYTE_READY_OP; - m_op = OP_WRITE_SECT; - m_floppy_cmd->adjust(attotime::from_msec( 10 )); - } - break; - - case OP_READ_ADDR: - if ( qdd ) - logerror( "thmfc_floppy_w: smart operation 2 not supported for QDD\n" ); - else if ( floppy_find_sector( &id ) ) - { - m_data_size = - floppy_make_addr( id, &m_data[0], m_sector_size ); - assert( m_data_size < THOM_MAXBUF ); - m_data_finish = 10; - m_data_idx = 1; - m_stat0 |= STAT0_BYTE_READY_OP; - m_op = OP_READ_ADDR; - m_floppy_cmd->adjust(attotime::from_msec( 1 )); - } - break; - - case OP_READ_SECT: - if ( qdd ) - logerror( "thmfc_floppy_w: smart operation 3 not supported for QDD\n" ); - else if ( floppy_find_sector( &id ) ) - { - m_data_size = floppy_make_sector - ( get_floppy_image(), id, &m_data[0], m_sector_size ); - assert( m_data_size < THOM_MAXBUF ); - m_data_finish = m_sector_size + 4; - m_data_idx = 1; - m_stat0 |= STAT0_BYTE_READY_OP; - m_op = OP_READ_SECT; - m_floppy_cmd->adjust(attotime::from_msec( 10 )); - } - break; - } - - // synchronize to word, if needed (QDD only) - if ( wsync && qdd ) { - if ( ! m_data_raw_size ) - m_data_raw_size = qdd_make_disk ( get_floppy_image(), &m_data[0] ); - while ( m_data_raw_idx < m_data_raw_size && - m_data[ m_data_raw_idx ] != m_wsync ) - { - m_data_raw_idx++; - } - } - } - - break; - - - case 1: // CMD1 - m_data_raw_size = 0; - m_sector_size = 128 << ( (data >> 5) & 3); - m_side = (data >> 4) & 1; - if ( m_sector_size > 256 ) - { - logerror( "%s thmfc_floppy_w: sector size %i > 256 not handled\n", - machine().describe_context(), m_sector_size ); - m_sector_size = 256; - } - - LOG (( "%f %s thmfc_floppy_w: CMD1=$%02X sect-size=%i comp=%i head=%i\n", - machine().time().as_double(), machine().describe_context(), data, - m_sector_size, (data >> 1) & 7, m_side )); - break; - - - case 2: // CMD2 - { - legacy_floppy_image_device * img; - int seek = 0, motor; - m_drive = data & 2; - - img = get_floppy_image(); - if ( floppy_is_qdd(img)) - { - motor = !(data & 0x40); - // no side select & no seek for QDD - } - else - { - if ( data & 0x10 ) - seek = (data & 0x20) ? 1 : -1; - motor = (data >> 2) & 1; - m_drive |= 1 ^ ((data >> 6) & 1); - img = get_floppy_image(); - } - - m_floppy_active_cb( 0 ); - - LOG (( "%f %s thmfc_floppy_w: CMD2=$%02X drv=%i step=%i motor=%i\n", - machine().time().as_double(), machine().describe_context(), data, - m_drive, seek, motor )); - - if ( seek ) - { - m_data_raw_size = 0; - img->floppy_drive_seek( seek ); - } - - /* in real life, to keep the motor running, it is sufficient to - set motor to 1 every few seconds. - instead of counting, we assume the motor is always running... - */ - m_motor_on = CLEAR_LINE /* motor */; - img->floppy_mon_w(m_motor_on); - } - break; - - - case 3: // WDATA - m_wsync = data; - if ( floppy_is_qdd(get_floppy_image())) - floppy_qdd_write_byte( data ); - else if ( m_op == OP_WRITE_SECT ) - floppy_write_byte( data ); - else if ( m_formatting ) - floppy_format_byte( data ); - else - { - // TODO: implement other forms of raw track writing - LOG (( "%f %s thmfc_floppy_w: ignored raw WDATA $%02X\n", - machine().time().as_double(), machine().describe_context(), data )); - } - break; - - - case 4: // WCLK (unemulated) - // clock configuration: FF for data, 0A for synchro - LOG (( "%f %s thmfc_floppy_w: WCLK=$%02X (%s)\n", - machine().time().as_double(), machine().describe_context(), data, - (data == 0xff) ? "data" : (data == 0x0A) ? "synchro" : "?" )); - break; - - case 5: // WSECT - m_sector = data; - LOG (( "%f %s thmfc_floppy_w: WSECT=%i\n", - machine().time().as_double(), machine().describe_context(), data )); - break; - - case 6: // WTRCK - m_track = data; - LOG (( "%f %s thmfc_floppy_w: WTRCK=%i (real=%i)\n", - machine().time().as_double(), machine().describe_context(), data, - get_floppy_image()->floppy_drive_get_current_track())); - break; - - case 7: // WCELL - // precompensation (unemulated) - LOG (( "%f %s thmfc_floppy_w: WCELL=$%02X\n", - machine().time().as_double(), machine().describe_context(), data )); - break; - - default: - logerror ( "%f %s thmfc_floppy_w: invalid write offset %i (data=$%02X)\n", - machine().time().as_double(), machine().describe_context(), offset, data ); - } -} - - - -void thmfc1_device::floppy_reset() -{ - LOG(( "thmfc_floppy_reset: THMFC1 controller\n" )); - - for (auto &img : m_floppy_image) - { - img->floppy_drive_set_ready_state( FLOPPY_DRIVE_READY, 0 ); - img->floppy_drive_seek( - img->floppy_drive_get_current_track() ); - } - - m_op = OP_RESET; - m_track = 0; - m_sector = 0; - m_side = 0; - m_drive = 0; - m_sector_size = 256; - m_formatting = 0; - m_stat0 = 0; - m_data_idx = 0; - m_data_size = 0; - m_data_raw_idx = 0; - m_data_raw_size = 0; - m_data_crc = 0; - m_wsync = 0; - m_motor_on = 0; - m_floppy_cmd->adjust(attotime::never); -} - - - -void thmfc1_device::device_start() -{ - m_data = make_unique_clear(THOM_MAXBUF); - - m_floppy_cmd = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(thmfc1_device::floppy_cmd_complete_cb), this)); - - save_item(NAME(m_op)); - save_item(NAME(m_sector)); - save_item(NAME(m_sector_id)); - save_item(NAME(m_track)); - save_item(NAME(m_side)); - save_item(NAME(m_drive)); - save_item(NAME(m_sector_size)); - save_item(NAME(m_formatting)); - save_item(NAME(m_ipl)); - save_item(NAME(m_data_idx)); - save_item(NAME(m_data_size)); - save_item(NAME(m_data_finish)); - save_item(NAME(m_stat0)); - save_item(NAME(m_data_raw_idx)); - save_item(NAME(m_data_raw_size)); - save_item(NAME(m_data_crc)); - save_item(NAME(m_wsync)); - save_item(NAME(m_motor_on)); - save_pointer(NAME(m_data), THOM_MAXBUF); -} - - - -/*********************** Network ************************/ - -/* The network extension is built as an external floppy controller. - It uses the same ROM and I/O space, and so, it is natural to have the - toplevel network emulation here! -*/ - -/* NOTE: This is work in progress! - For the moment, only hand-checks works: the TO7 can take the line, then - perform a DKBOOT request. We do not have the server emulated yet, so, - no way to answer the request. -*/ - -TIMER_CALLBACK_MEMBER( thomson_state::ans4 ) -{ - LOG(( "%f ans4\n", machine().time().as_double() )); - m_mc6854->set_cts( 0 ); -} - -TIMER_CALLBACK_MEMBER( thomson_state::ans3 ) -{ - LOG(( "%f ans3\n", machine().time().as_double() )); - m_mc6854->set_cts( 1 ); - machine().scheduler().timer_set( attotime::from_usec( 100 ), timer_expired_delegate(FUNC(thomson_state::ans4),this)); -} - -TIMER_CALLBACK_MEMBER( thomson_state::ans2 ) -{ - LOG(( "%f ans2\n", machine().time().as_double() )); - m_mc6854->set_cts( 0 ); - machine().scheduler().timer_set( attotime::from_usec( 100 ), timer_expired_delegate(FUNC(thomson_state::ans3),this)); -} - -TIMER_CALLBACK_MEMBER( thomson_state::ans ) -{ - LOG(( "%f ans\n", machine().time().as_double() )); - m_mc6854->set_cts( 1 ); - machine().scheduler().timer_set( attotime::from_usec( 100 ), timer_expired_delegate(FUNC(thomson_state::ans2),this)); -} -/* consigne DKBOOT - - MO5 BASIC - $00 $00 $01 $00 $00 $00 $00 $00 $00 $00 $01 $00<$41 $00 $FF $20 - $3D $4C $01 $60 $20 $3C $4F $01 $05 $20 $3F $9C $19 $25 $03 $11 - $93 $15 $10 $25 $32 $8A $7E $FF $E1 $FD $E9 $41>$00 $00 $00 $00 - $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 - - TO7/70 BASIC - $00 $00 $01 $00 $00 $00 $00 $00 $00 $00 $02 $00<$20 $42 $41 $53 - $49 $43 $20 $4D $49 $43 $52 $4F $53 $4F $46 $54 $20 $31 $2E $30 - $04 $00 $00 $00 $00 $00 $60 $FF $37 $9B $37 $9C>$00 $00 $00 $00 - $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 - - TO7 BASIC - $00 $00 $01 $00 $00 $00 $00 $00 $00 $00 $00 $00<$20 $42 $41 $53 - $49 $43 $20 $4D $49 $43 $52 $4F $53 $4F $46 $54 $20 $31 $2E $30 - $04 $00 $00 $00 $00 $00 $60 $FF $37 $9B $37 $9C>$00 $00 $00 $00 - $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 - - TO7 LOGO - $00 $00 $01 $00 $00 $00 $00 $00 $00 $00 $00 $00<$00 $00 $00 $00 - $00 $20 $4C $4F $47 $4F $04 $00 $00 $00 $00 $00 $00 $00 $00 $00 - $00 $00 $00 $00 $00 $00 $AA $FF $01 $16 $00 $C8>$00 $00 $00 $00 - $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 - - -*/ - -void thomson_state::to7_network_got_frame(uint8_t *data, int length) -{ - LOG(( "%f to7_network_got_frame:", machine().time().as_double() )); - for ( int i = 0; i < length; i++ ) - LOG(( " $%02X", data[i] )); - LOG(( "\n" )); - - if ( data[1] == 0xff ) - { - LOG(( "to7_network_got_frame: %i phones %i\n", data[2], data[0] )); - machine().scheduler().timer_set( attotime::from_usec( 100 ), timer_expired_delegate(FUNC(thomson_state::ans), this)); - m_mc6854->set_cts( 0 ); - } - else if ( ! data[1] ) - { - char name[33]; - memcpy( name, data + 12, 32 ); - name[32] = 0; - for (int i=0;i<32;i++) - { - if ( name[i]<32 || name[i]>=127 ) - name[i]=' '; - } - LOG(( "to7_network_got_frame: DKBOOT system=%s appli=\"%s\"\n", - (data[10] == 0) ? "TO7" : (data[10] == 1) ? "MO5" : - (data[10] == 2) ? "TO7/70" : "?", name )); - } -} - - -void thomson_state::to7_network_init() -{ - LOG(( "to7_network_init: NR 07-005 network extension\n" )); - logerror( "to7_network_init: network not handled!\n" ); -} - - - -void thomson_state::to7_network_reset() -{ - LOG(( "to7_network_reset: NR 07-005 network extension\n" )); - m_mc6854->set_cts( 0 ); - m_mc6854->set_cts( 1 ); -} - - - -uint8_t thomson_state::to7_network_r(offs_t offset) -{ - if ( offset < 4 ) - return m_mc6854->read(offset); - - if ( offset == 8 ) - { - // network ID of the computer - uint8_t id = m_io_fconfig->read() >> 3; - VLOG(( "%f $%04x to7_network_r: read id $%02X\n", machine().time().as_double(), m_maincpu->pc(), id )); - return id; - } - - logerror( "%f $%04x to7_network_r: invalid read offset %i\n", machine().time().as_double(), m_maincpu->pc(), offset ); - return 0; -} - - - -void thomson_state::to7_network_w(offs_t offset, uint8_t data) -{ - if ( offset < 4 ) - m_mc6854->write(offset, data); - else - { - logerror( "%f $%04x to7_network_w: invalid write offset %i (data=$%02X)\n", - machine().time().as_double(), m_maincpu->pc(), offset, data ); - } -} - - - -/*********************** TO7 dispatch ************************/ - -/* The TO7, TO7/70, MO5 and MO6 can use a variety of floppy controllers. - We use a PORT_CONFSETTING to chose the current controller, and dispatch - here. - - NOTE: you need to reset the computer after changing the floppy controller! - - The CD 90-351 controller seems similar to the THMFC1 gate-array - => we reuse the THMFC code! -*/ - - - -void thomson_state::to7_floppy_init() -{ - m_flopbank->configure_entry( 0, memregion("floppy_none")->base() ); - m_flopbank->configure_entry( 1, memregion("floppy_cd90_015")->base() ); - m_flopbank->configure_entry( 2, memregion("floppy_cd90_640")->base() ); - m_flopbank->configure_entries( 3, 4, memregion("floppy_cd90_351")->base(), 0x800 ); - m_flopbank->configure_entry( 7, memregion("floppy_cq90_028")->base() ); - m_flopbank->configure_entry( 8, memregion("floppy_nano")->base() ); - save_item(NAME(m_to7_controller_type)); - save_item(NAME(m_to7_floppy_bank)); - to7_5p14sd_init(); - to7_5p14_init(); - to7_network_init(); -} - - - -void thomson_state::to7_floppy_reset() -{ - m_to7_controller_type = (m_io_fconfig->read() ) & 7; - - switch ( m_to7_controller_type ) - { - case 1: - m_to7_floppy_bank = 1; - to7_5p14sd_reset(); - break; - - case 2: - m_to7_floppy_bank = 2; - to7_5p14_reset(); - break; - - case 3: - m_to7_floppy_bank = 3; - m_thmfc->floppy_reset(); - break; - - case 4: - m_to7_floppy_bank = 7; - m_to7qdd->qdd_reset(); - break; - - case 5: - m_to7_floppy_bank = 8; - to7_network_reset(); - break; - - default: - m_to7_floppy_bank = 0; - break; - } - - m_flopbank->set_entry( m_to7_floppy_bank ); -} - - - -uint8_t thomson_state::to7_floppy_r(offs_t offset) -{ - switch (m_to7_controller_type) - { - case 1: - return to7_5p14sd_r(offset); - - case 2: - return to7_5p14_r(offset); - - case 3: - return m_thmfc->floppy_r(offset); - - case 4: - return m_to7qdd->qdd_r(offset); - - case 5: - return to7_network_r(offset); - } - - return 0; -} - - - -void thomson_state::to7_floppy_w(offs_t offset, uint8_t data) -{ - switch (m_to7_controller_type) - { - case 1: - to7_5p14sd_w(offset, data); - return; - - case 2: - to7_5p14_w(offset, data); - break; - - case 3: - if (offset == 8) - { - m_to7_floppy_bank = 3 + (data & 3); - m_flopbank->set_entry(m_to7_floppy_bank); - VLOG (( "to7_floppy_w: set CD 90-351 ROM bank to %i\n", data & 3 )); - } - else - m_thmfc->floppy_w(offset, data); - break; - - case 4: - m_to7qdd->qdd_w(offset, data); - break; - - case 5: - to7_network_w(offset, data); - break; - } -} - - - -/*********************** TO9 ************************/ - -/* the internal controller is WD2793-based (so, similar to to7_5p14) - we also emulate external controllers -*/ - - - -void thomson_state::to9_floppy_init( void* int_base ) -{ - to7_floppy_init(); - m_flopbank->configure_entry( TO7_NB_FLOP_BANK, int_base); -} - - - -void thomson_state::to9_floppy_reset() -{ - to7_floppy_reset(); - if ( THOM_FLOPPY_EXT ) - { - LOG(( "to9_floppy_reset: external controller\n" )); - } - else - { - LOG(( "to9_floppy_reset: internal controller\n" )); - to7_5p14_reset(); - m_flopbank->set_entry( TO7_NB_FLOP_BANK ); - } -} - - - -uint8_t thomson_state::to9_floppy_r(offs_t offset) -{ - if ( THOM_FLOPPY_EXT ) - return to7_floppy_r( offset ); - else - return to7_5p14_r( offset ); -} - -void thomson_state::to9_floppy_w(offs_t offset, uint8_t data) -{ - if ( THOM_FLOPPY_EXT ) - to7_floppy_w( offset, data ); - else - to7_5p14_w( offset, data ); -} - -void thomson_state::thomson_index_callback(int index, int state) -{ - switch ( m_to7_controller_type ) - { - case 1: - to7_5p14_index_pulse_callback(state); - break; - - case 2: - break; - - case 3: - m_thmfc->index_pulse_cb(index, state); - break; - - case 4: - m_to7qdd->index_pulse_cb(state); - break; - - default: - break; - } -} diff -Nru mame-0.230+dfsg.1/src/mame/machine/thomflop.h mame-0.231+dfsg.1/src/mame/machine/thomflop.h --- mame-0.230+dfsg.1/src/mame/machine/thomflop.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/machine/thomflop.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,159 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Antoine Mine -/********************************************************************** - - Copyright (C) Antoine Mine' 2006 - - Thomson 8-bit computers - -**********************************************************************/ - -#ifndef THOMFLOP_H_ -#define THOMFLOP_H_ - -#include "image.h" -#include "imagedev/flopdrv.h" -#include "machine/mc6843.h" -#include "machine/mc6854.h" - -/* number of external floppy controller ROM banks */ -#define TO7_NB_FLOP_BANK 9 - -/* external floppy / network controller active */ -#define THOM_FLOPPY_EXT (m_to7_controller_type >= 1) - -/* internal floppy controller active (no or network extension) */ -#define THOM_FLOPPY_INT (m_to7_controller_type == 0 || m_to7_controller_type > 4) - - -/* external controllers */ -/* TO9 internal (WD2793) & external controllers */ -/* TO8 internal (THMFC1) controller */ - -class thomson_legacy_floppy_interface : public device_interface -{ -protected: - thomson_legacy_floppy_interface(const machine_config &mconfig, device_t &device) - : device_interface(device, "thom_flop") - { - } - - static int floppy_make_addr(chrn_id id, uint8_t *dst, int sector_size); - static int floppy_make_sector(legacy_floppy_image_device *img, chrn_id id, uint8_t *dst, int sector_size); - static int floppy_make_track(legacy_floppy_image_device *img, uint8_t *dst, int sector_size, int side); - - static int qdd_make_addr(int sector, uint8_t *dst); - static int qdd_make_sector(legacy_floppy_image_device *img, int sector, uint8_t *dst); - static int qdd_make_disk(legacy_floppy_image_device *img, uint8_t *dst); -}; - -class thmfc1_device : public device_t, public thomson_legacy_floppy_interface -{ -public: - thmfc1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - - auto floppy_active_cb() { return m_floppy_active_cb.bind(); } - - uint8_t floppy_r(offs_t offset); - void floppy_w(offs_t offset, uint8_t data); - - void index_pulse_cb( int index, int state ); - void floppy_reset(); - -protected: - virtual void device_resolve_objects() override; - virtual void device_start() override; - -private: - // types of high-level operations - enum thmfc1_op : uint8_t - { - OP_RESET = 0, - OP_WRITE_SECT = 1, - OP_READ_ADDR = 2, - OP_READ_SECT = 3 - }; - - TIMER_CALLBACK_MEMBER( floppy_cmd_complete_cb ); - legacy_floppy_image_device *get_floppy_image(); - bool floppy_is_qdd( legacy_floppy_image_device *image ) const; - int floppy_find_sector( chrn_id* dst ); - void floppy_cmd_complete(); - uint8_t floppy_read_byte(); - uint8_t floppy_raw_read_byte(); - void floppy_qdd_write_byte( uint8_t data ); - void floppy_write_byte( uint8_t data ); - void floppy_format_byte( uint8_t data ); - - required_device_array m_floppy_image; - - devcb_write_line m_floppy_active_cb; - - thmfc1_op m_op; - uint8_t m_sector; // target sector, in [1,16] - uint32_t m_sector_id; - uint8_t m_track; // current track, in [0,79] - uint8_t m_side; // current side, 0 or 1 - uint8_t m_drive; // 0 to 3 - uint16_t m_sector_size; // 128 or 256 (512, 1024 not supported) - uint8_t m_formatting; - uint8_t m_ipl; // index pulse / QDD start - uint8_t m_wsync; // synchronization word - int m_motor_on; - - std::unique_ptr m_data; // enough for a whole track - uint32_t m_data_idx; // reading / writing / formatting pos - uint32_t m_data_size; // bytes to read / write - uint32_t m_data_finish; // when to raise the finished flag - uint32_t m_data_raw_idx; // byte index for raw track reading - uint32_t m_data_raw_size; // size of track already cached in data - uint8_t m_data_crc; // check-sum of written data - - uint8_t m_stat0; // status register - - emu_timer *m_floppy_cmd; -}; - -class cq90_028_device : public device_t, public thomson_legacy_floppy_interface -{ -public: - cq90_028_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - - uint8_t qdd_r(offs_t offset); - void qdd_w(offs_t offset, uint8_t data); - - void index_pulse_cb(int state); - void qdd_reset(); - -protected: - virtual void device_start() override; - -private: - void stat_update(); - uint8_t qdd_read_byte(); - void qdd_write_byte(uint8_t data); - - required_device m_qdd_image; - - // MC6852 registers - uint8_t m_status; - uint8_t m_ctrl1; - uint8_t m_ctrl2; - uint8_t m_ctrl3; - - // extra registers - uint8_t m_drive; - - // internal state - std::unique_ptr m_data; // enough for a whole track - uint32_t m_data_idx; // byte position in track - uint32_t m_start_idx; // start of write position - uint32_t m_data_size; // track length - uint8_t m_data_crc; // checksum when writing - uint8_t m_index_pulse; // one pulse per track -}; - -DECLARE_DEVICE_TYPE(THMFC1, thmfc1_device) -DECLARE_DEVICE_TYPE(CQ90_028, cq90_028_device) - -#endif /* THOMFLOP_H_ */ diff -Nru mame-0.230+dfsg.1/src/mame/machine/thomson.cpp mame-0.231+dfsg.1/src/mame/machine/thomson.cpp --- mame-0.230+dfsg.1/src/mame/machine/thomson.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/machine/thomson.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -10,8 +10,6 @@ #include "emu.h" #include "includes/thomson.h" -#include "machine/thomflop.h" -#include "formats/thom_dsk.h" #include "machine/6821pia.h" #include "machine/ram.h" @@ -915,7 +913,8 @@ uint8_t thomson_state::to7_midi_r() { - logerror( "to7_midi_r: not implemented\n" ); + if(!machine().side_effects_disabled()) + logerror( "to7_midi_r: not implemented\n" ); return 0; } @@ -953,14 +952,16 @@ /* subsystems */ thom_irq_reset(); to7_game_reset(); - to7_floppy_reset(); to7_modem_reset(); to7_midi_reset(); + m_extension->rom_map(m_maincpu->space(AS_PROGRAM), 0xe000, 0xe7bf); + m_extension->io_map (m_maincpu->space(AS_PROGRAM), 0xe7d0, 0xe7df); + /* video */ thom_set_video_mode( THOM_VMODE_TO770 ); m_thom_init_cb = &thomson_state::to7_set_init; - m_thom_lightpen_cb = &thomson_state::to7_lightpen_cb; + m_thom_lightpen_cb = std::bind(&thomson_state::to7_lightpen_cb, this, std::placeholders::_1); thom_set_lightpen_callback( 3 ); thom_set_mode_point( 0 ); thom_set_border_color( 0 ); @@ -986,10 +987,12 @@ /* subsystems */ to7_game_init(); - to7_floppy_init(); to7_modem_init(); to7_midi_init(); + m_extension->rom_map(m_maincpu->space(AS_PROGRAM), 0xe000, 0xe7bf); + m_extension->io_map (m_maincpu->space(AS_PROGRAM), 0xe7d0, 0xe7df); + /* memory */ m_thom_cart_bank = 0; m_thom_vram = ram; @@ -1175,14 +1178,16 @@ /* subsystems */ thom_irq_reset(); to7_game_reset(); - to7_floppy_reset(); to7_modem_reset(); to7_midi_reset(); + m_extension->rom_map(m_maincpu->space(AS_PROGRAM), 0xe000, 0xe7bf); + m_extension->io_map (m_maincpu->space(AS_PROGRAM), 0xe7d0, 0xe7df); + /* video */ thom_set_video_mode( THOM_VMODE_TO770 ); m_thom_init_cb = &thomson_state::to7_set_init; - m_thom_lightpen_cb = &thomson_state::to7_lightpen_cb; + m_thom_lightpen_cb = std::bind(&thomson_state::to7_lightpen_cb, this, std::placeholders::_1); thom_set_lightpen_callback( 3 ); thom_set_mode_point( 0 ); thom_set_border_color( 8 ); @@ -1210,10 +1215,12 @@ /* subsystems */ to7_game_init(); - to7_floppy_init(); to7_modem_init(); to7_midi_init(); + m_extension->rom_map(m_maincpu->space(AS_PROGRAM), 0xe000, 0xe7bf); + m_extension->io_map (m_maincpu->space(AS_PROGRAM), 0xe7d0, 0xe7df); + /* memory */ m_thom_cart_bank = 0; m_thom_vram = ram; @@ -1246,7 +1253,7 @@ -void thomson_state::mo5_lightpen_cb( int step ) +void mo5_state::mo5_lightpen_cb( int step ) { /* MO5 signals ca1 (TO7 signals cb1) */ if ( ! m_to7_lightpen ) @@ -1286,7 +1293,7 @@ -void thomson_state::mo5_sys_porta_out(uint8_t data) +void mo5_state::mo5_sys_porta_out(uint8_t data) { thom_set_mode_point( data & 1 ); /* bit 0: video bank switch */ thom_set_border_color( (data >> 1) & 15 ); /* bit 1-4: border color */ @@ -1295,7 +1302,7 @@ -uint8_t thomson_state::mo5_sys_porta_in() +uint8_t mo5_state::mo5_sys_porta_in() { return ((m_io_lightpen_button->read() & 1) ? 0x20 : 0) | /* bit 5: lightpen button */ @@ -1305,7 +1312,7 @@ -uint8_t thomson_state::mo5_sys_portb_in() +uint8_t mo5_state::mo5_sys_portb_in() { uint8_t portb = m_pia_sys->b_output(); int col = (portb >> 1) & 7; /* key column */ @@ -1324,7 +1331,7 @@ -uint8_t thomson_state::mo5_gatearray_r(offs_t offset) +uint8_t mo5_state::mo5_gatearray_r(offs_t offset) { struct thom_vsignal v = thom_get_vsignal(); struct thom_vsignal l = thom_get_lightpen_vsignal( MO5_LIGHTPEN_DECAL, m_to7_lightpen_step - 1, 0 ); @@ -1347,7 +1354,7 @@ -void thomson_state::mo5_gatearray_w(offs_t offset, uint8_t data) +void mo5_state::mo5_gatearray_w(offs_t offset, uint8_t data) { if ( ! offset ) m_to7_lightpen = data & 1; @@ -1419,7 +1426,7 @@ -void thomson_state::mo5_update_cart_bank() +void mo5_state::mo5_update_cart_bank() { address_space& space = m_maincpu->space(AS_PROGRAM); int rom_is_ram = m_mo5_reg_cart & 4; @@ -1475,8 +1482,8 @@ if ( m_old_cart_bank < 0 ) { space.install_read_bank( 0xb000, 0xefff, m_cartbank); - space.install_write_handler( 0xb000, 0xefff, write8sm_delegate(*this, FUNC(thomson_state::mo5_cartridge_w)) ); - space.install_read_handler( 0xbffc, 0xbfff, read8sm_delegate(*this, FUNC(thomson_state::mo5_cartridge_r)) ); + space.install_write_handler( 0xb000, 0xefff, write8sm_delegate(*this, FUNC(mo5_state::mo5_cartridge_w)) ); + space.install_read_handler( 0xbffc, 0xbfff, read8sm_delegate(*this, FUNC(mo5_state::mo5_cartridge_r)) ); } LOG_BANK(( "mo5_update_cart_bank: CART is cartridge bank %i\n", bank )); } @@ -1487,7 +1494,7 @@ if ( m_old_cart_bank != 0 ) { space.install_read_bank( 0xb000, 0xefff, m_cartbank); - space.install_write_handler( 0xb000, 0xefff, write8sm_delegate(*this, FUNC(thomson_state::mo5_cartridge_w)) ); + space.install_write_handler( 0xb000, 0xefff, write8sm_delegate(*this, FUNC(mo5_state::mo5_cartridge_w)) ); LOG_BANK(( "mo5_update_cart_bank: CART is internal\n")); } } @@ -1501,7 +1508,7 @@ -void thomson_state::mo5_update_cart_bank_postload() +void mo5_state::mo5_update_cart_bank_postload() { mo5_update_cart_bank(); } @@ -1509,7 +1516,7 @@ /* write signal to b000-cfff generates a bank switch */ -void thomson_state::mo5_cartridge_w(offs_t offset, uint8_t data) +void mo5_state::mo5_cartridge_w(offs_t offset, uint8_t data) { if ( offset >= 0x2000 ) return; @@ -1521,7 +1528,7 @@ /* read signal to bffc-bfff generates a bank switch */ -uint8_t thomson_state::mo5_cartridge_r(offs_t offset) +uint8_t mo5_state::mo5_cartridge_r(offs_t offset) { uint8_t data = m_cart_rom[offset + 0x3ffc + (m_thom_cart_bank % m_thom_cart_nb_banks) * 0x4000]; if ( !machine().side_effects_disabled() ) @@ -1535,7 +1542,7 @@ /* 0xa7cb bank-switch register */ -void thomson_state::mo5_ext_w(uint8_t data) +void mo5_state::mo5_ext_w(uint8_t data) { m_mo5_reg_cart = data; mo5_update_cart_bank(); @@ -1547,21 +1554,20 @@ -MACHINE_RESET_MEMBER( thomson_state, mo5 ) +MACHINE_RESET_MEMBER( mo5_state, mo5 ) { LOG (( "mo5: machine reset called\n" )); /* subsystems */ thom_irq_reset(); to7_game_reset(); - to7_floppy_reset(); to7_modem_reset(); to7_midi_reset(); mo5_init_timer(); /* video */ thom_set_video_mode( THOM_VMODE_MO5 ); - m_thom_lightpen_cb = &thomson_state::mo5_lightpen_cb; + m_thom_lightpen_cb = std::bind(&mo5_state::mo5_lightpen_cb, this, std::placeholders::_1); thom_set_lightpen_callback( 3 ); thom_set_mode_point( 0 ); thom_set_border_color( 0 ); @@ -1579,7 +1585,7 @@ -MACHINE_START_MEMBER( thomson_state, mo5 ) +MACHINE_START_MEMBER( mo5_state, mo5 ) { uint8_t* mem = memregion("maincpu")->base(); uint8_t* cartmem = &m_cart_rom[0]; @@ -1589,10 +1595,12 @@ /* subsystems */ to7_game_init(); - to7_floppy_init(); to7_modem_init(); to7_midi_init(); - m_mo5_periodic_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(thomson_state::mo5_periodic_cb),this)); + m_mo5_periodic_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(mo5_state::mo5_periodic_cb),this)); + + m_extension->rom_map(m_maincpu->space(AS_PROGRAM), 0xa000, 0xa7bf); + m_extension->io_map (m_maincpu->space(AS_PROGRAM), 0xa7d0, 0xa7df); /* memory */ m_thom_cart_bank = 0; @@ -1614,7 +1622,7 @@ save_item(NAME(m_to7_lightpen_step)); save_item(NAME(m_mo5_reg_cart)); save_pointer(NAME(cartmem), 0x10000 ); - machine().save().register_postload(save_prepost_delegate(FUNC(thomson_state::mo5_update_cart_bank_postload), this)); + machine().save().register_postload(save_prepost_delegate(FUNC(mo5_state::mo5_update_cart_bank_postload), this)); } @@ -1631,14 +1639,14 @@ -void thomson_state::to9_ieee_w(offs_t offset, uint8_t data) +void to9_state::to9_ieee_w(offs_t offset, uint8_t data) { logerror( "$%04x %f to9_ieee_w: unhandled write $%02X to register %i\n", m_maincpu->pc(), machine().time().as_double(), data, offset ); } -uint8_t thomson_state::to9_ieee_r(offs_t offset) +uint8_t to9_state::to9_ieee_r(offs_t offset) { logerror( "$%04x %f to9_ieee_r: unhandled read from register %i\n", m_maincpu->pc(), machine().time().as_double(), offset ); return 0; @@ -1654,7 +1662,7 @@ -uint8_t thomson_state::to9_gatearray_r(offs_t offset) +uint8_t to9_state::to9_gatearray_r(offs_t offset) { struct thom_vsignal v = thom_get_vsignal(); struct thom_vsignal l = thom_get_lightpen_vsignal( TO9_LIGHTPEN_DECAL, m_to7_lightpen_step - 1, 0 ); @@ -1678,7 +1686,7 @@ -void thomson_state::to9_gatearray_w(offs_t offset, uint8_t data) +void to9_state::to9_gatearray_w(offs_t offset, uint8_t data) { if ( ! offset ) m_to7_lightpen = data & 1; @@ -1691,7 +1699,7 @@ /* style: 0 => TO9, 1 => TO8/TO9, 2 => MO6 */ -void thomson_state::to9_set_video_mode( uint8_t data, int style ) +void to9_state::to9_set_video_mode( uint8_t data, int style ) { switch ( data & 0x7f ) { @@ -1744,7 +1752,7 @@ -uint8_t thomson_state::to9_vreg_r(offs_t offset) +uint8_t to9_state::to9_vreg_r(offs_t offset) { switch ( offset ) { @@ -1773,7 +1781,7 @@ -void thomson_state::to9_vreg_w(offs_t offset, uint8_t data) +void to9_state::to9_vreg_w(offs_t offset, uint8_t data) { LOG_VIDEO(( "$%04x %f to9_vreg_w: off=%i ($%04X) data=$%02X\n", m_maincpu->pc(), machine().time().as_double(), offset, 0xe7da + offset, data )); @@ -1810,7 +1818,7 @@ -void thomson_state::to9_palette_init() +void to9_state::to9_palette_init() { m_to9_palette_idx = 0; memset( m_to9_palette_data, 0, sizeof( m_to9_palette_data ) ); @@ -1823,7 +1831,7 @@ /* ------------ RAM / ROM banking ------------ */ -void thomson_state::to9_update_cart_bank() +void to9_state::to9_update_cart_bank() { address_space& space = m_maincpu->space(AS_PROGRAM); int bank = 0; @@ -1877,8 +1885,8 @@ if ( m_old_cart_bank < 0 || m_old_cart_bank > 3 ) { space.install_read_bank( 0x0000, 0x3fff, m_cartbank ); - space.install_write_handler( 0x0000, 0x3fff, write8sm_delegate(*this, FUNC(thomson_state::to9_cartridge_w)) ); - space.install_read_handler( 0x0000, 0x0003, read8sm_delegate(*this, FUNC(thomson_state::to9_cartridge_r)) ); + space.install_write_handler( 0x0000, 0x3fff, write8sm_delegate(*this, FUNC(to9_state::to9_cartridge_w)) ); + space.install_read_handler( 0x0000, 0x0003, read8sm_delegate(*this, FUNC(to9_state::to9_cartridge_r)) ); } LOG_BANK(( "to9_update_cart_bank: CART is cartridge bank %i\n", m_thom_cart_bank )); } @@ -1902,7 +1910,7 @@ -void thomson_state::to9_update_cart_bank_postload() +void to9_state::to9_update_cart_bank_postload() { to9_update_cart_bank(); } @@ -1910,7 +1918,7 @@ /* write signal to 0000-1fff generates a bank switch */ -void thomson_state::to9_cartridge_w(offs_t offset, uint8_t data) +void to9_state::to9_cartridge_w(offs_t offset, uint8_t data) { int slot = ( m_mc6846->get_output_port() >> 4 ) & 3; /* bits 4-5: ROM bank */ @@ -1927,7 +1935,7 @@ /* read signal to 0000-0003 generates a bank switch */ -uint8_t thomson_state::to9_cartridge_r(offs_t offset) +uint8_t to9_state::to9_cartridge_r(offs_t offset) { uint8_t data = m_cart_rom[offset + (m_thom_cart_bank % m_thom_cart_nb_banks) * 0x4000]; if ( !machine().side_effects_disabled() ) @@ -1940,7 +1948,7 @@ -void thomson_state::to9_update_ram_bank() +void to9_state::to9_update_ram_bank() { address_space& space = m_maincpu->space(AS_PROGRAM); uint8_t port = m_mc6846->get_output_port(); @@ -1986,7 +1994,7 @@ -void thomson_state::to9_update_ram_bank_postload() +void to9_state::to9_update_ram_bank_postload() { to9_update_ram_bank(); } @@ -2019,7 +2027,7 @@ /* quick keyboard scan */ -int thomson_state::to9_kbd_ktest() +int to9_state::to9_kbd_ktest() { int line, bit; uint8_t port; @@ -2042,7 +2050,7 @@ -void thomson_state::to9_kbd_update_irq() +void to9_state::to9_kbd_update_irq() { if ( (m_to9_kbd_intr & 4) && (m_to9_kbd_status & ACIA_6850_RDRF) ) m_to9_kbd_status |= ACIA_6850_irq; /* byte received interrupt */ @@ -2058,7 +2066,7 @@ -uint8_t thomson_state::to9_kbd_r(offs_t offset) +uint8_t to9_state::to9_kbd_r(offs_t offset) { /* ACIA 6850 registers */ @@ -2105,7 +2113,7 @@ -void thomson_state::to9_kbd_w(offs_t offset, uint8_t data) +void to9_state::to9_kbd_w(offs_t offset, uint8_t data) { /* ACIA 6850 registers */ @@ -2186,7 +2194,7 @@ note: parity is not used as a checksum but to actually transmit a 9-th bit of information! */ -void thomson_state::to9_kbd_send( uint8_t data, int parity ) +void to9_state::to9_kbd_send( uint8_t data, int parity ) { if ( m_to9_kbd_status & ACIA_6850_RDRF ) { @@ -2250,7 +2258,7 @@ /* returns the ASCII code for the key, or 0 for no key */ -int thomson_state::to9_kbd_get_key() +int to9_state::to9_kbd_get_key() { int control = ! (m_io_keyboard[7]->read() & 1); int shift = ! (m_io_keyboard[9]->read() & 1); @@ -2336,7 +2344,7 @@ -TIMER_CALLBACK_MEMBER(thomson_state::to9_kbd_timer_cb) +TIMER_CALLBACK_MEMBER(to9_state::to9_kbd_timer_cb) { if ( m_to9_kbd_periph ) { @@ -2393,7 +2401,7 @@ -void thomson_state::to9_kbd_reset() +void to9_state::to9_kbd_reset() { LOG(( "to9_kbd_reset called\n" )); m_to9_kbd_overrun = 0; /* no byte lost */ @@ -2412,10 +2420,10 @@ -void thomson_state::to9_kbd_init() +void to9_state::to9_kbd_init() { LOG(( "to9_kbd_init called\n" )); - m_to9_kbd_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(thomson_state::to9_kbd_timer_cb),this)); + m_to9_kbd_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(to9_state::to9_kbd_timer_cb),this)); save_item(NAME(m_to9_kbd_parity)); save_item(NAME(m_to9_kbd_intr)); save_item(NAME(m_to9_kbd_in)); @@ -2434,7 +2442,7 @@ /* ------------ system PIA 6821 ------------ */ -uint8_t thomson_state::to9_sys_porta_in() +uint8_t to9_state::to9_sys_porta_in() { uint8_t ktest = to9_kbd_ktest(); @@ -2446,7 +2454,7 @@ -void thomson_state::to9_sys_porta_out(uint8_t data) +void to9_state::to9_sys_porta_out(uint8_t data) { m_centronics->write_data1(BIT(data, 1)); m_centronics->write_data2(BIT(data, 2)); @@ -2459,7 +2467,7 @@ -void thomson_state::to9_sys_portb_out(uint8_t data) +void to9_state::to9_sys_portb_out(uint8_t data) { m_centronics->write_data0(BIT(data, 0)); m_centronics->write_strobe(BIT(data, 1)); @@ -2476,7 +2484,7 @@ -void thomson_state::to9_timer_port_out(uint8_t data) +void to9_state::to9_timer_port_out(uint8_t data) { thom_set_mode_point( data & 1 ); /* bit 0: video bank */ to9_update_ram_bank(); @@ -2488,21 +2496,23 @@ -MACHINE_RESET_MEMBER( thomson_state, to9 ) +MACHINE_RESET_MEMBER( to9_state, to9 ) { LOG (( "to9: machine reset called\n" )); /* subsystems */ thom_irq_reset(); to7_game_reset(); - to9_floppy_reset(); to9_kbd_reset(); to7_modem_reset(); to7_midi_reset(); + m_extension->rom_map(m_maincpu->space(AS_PROGRAM), 0xe000, 0xe7bf); + m_extension->io_map (m_maincpu->space(AS_PROGRAM), 0xe7d0, 0xe7df); + /* video */ thom_set_video_mode( THOM_VMODE_TO9 ); - m_thom_lightpen_cb = &thomson_state::to7_lightpen_cb; + m_thom_lightpen_cb = std::bind(&to9_state::to7_lightpen_cb, this, std::placeholders::_1); thom_set_lightpen_callback( 3 ); thom_set_border_color( 8 ); thom_set_mode_point( 0 ); @@ -2522,9 +2532,8 @@ -MACHINE_START_MEMBER( thomson_state, to9 ) +MACHINE_START_MEMBER( to9_state, to9 ) { - uint8_t* mem = memregion("maincpu")->base(); uint8_t* cartmem = &m_cart_rom[0]; uint8_t* ram = m_ram->pointer(); @@ -2532,12 +2541,14 @@ /* subsystems */ to7_game_init(); - to9_floppy_init( mem + 0xe000 ); to9_kbd_init(); to9_palette_init(); to7_modem_init(); to7_midi_init(); + m_extension->rom_map(m_maincpu->space(AS_PROGRAM), 0xe000, 0xe7bf); + m_extension->io_map (m_maincpu->space(AS_PROGRAM), 0xe7d0, 0xe7df); + /* memory */ m_thom_vram = ram; m_thom_cart_bank = 0; @@ -2557,8 +2568,8 @@ save_item(NAME(m_to7_lightpen_step)); save_item(NAME(m_to9_soft_bank)); save_pointer(NAME(cartmem), 0x10000 ); - machine().save().register_postload(save_prepost_delegate(FUNC(thomson_state::to9_update_ram_bank_postload), this)); - machine().save().register_postload(save_prepost_delegate(FUNC(thomson_state::to9_update_cart_bank_postload), this)); + machine().save().register_postload(save_prepost_delegate(FUNC(to9_state::to9_update_ram_bank_postload), this)); + machine().save().register_postload(save_prepost_delegate(FUNC(to9_state::to9_update_cart_bank_postload), this)); } @@ -2600,7 +2611,7 @@ /* quick keyboard scan */ -int thomson_state::to8_kbd_ktest() +int to9_state::to8_kbd_ktest() { int line, bit; uint8_t port; @@ -2628,7 +2639,7 @@ /* keyboard scan & return keycode (or -1) */ -int thomson_state::to8_kbd_get_key() +int to9_state::to8_kbd_get_key() { int control = (m_io_keyboard[7]->read() & 1) ? 0 : 0x100; int shift = (m_io_keyboard[9]->read() & 1) ? 0 : 0x080; @@ -2699,7 +2710,7 @@ */ /* keyboard automaton */ -void thomson_state::to8_kbd_timer_func() +void to9_state::to8_kbd_timer_func() { attotime d; @@ -2771,7 +2782,7 @@ -TIMER_CALLBACK_MEMBER(thomson_state::to8_kbd_timer_cb) +TIMER_CALLBACK_MEMBER(to9_state::to8_kbd_timer_cb) { to8_kbd_timer_func(); } @@ -2779,7 +2790,7 @@ /* cpu <-> keyboard hand-check */ -void thomson_state::to8_kbd_set_ack( int data ) +void to9_state::to8_kbd_set_ack( int data ) { if ( data == m_to8_kbd_ack ) return; @@ -2850,7 +2861,7 @@ -void thomson_state::to8_kbd_reset() +void to9_state::to8_kbd_reset() { m_to8_kbd_last_key = 0xff; m_to8_kbd_key_count = 0; @@ -2864,9 +2875,9 @@ -void thomson_state::to8_kbd_init() +void to9_state::to8_kbd_init() { - m_to8_kbd_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(thomson_state::to8_kbd_timer_cb),this)); + m_to8_kbd_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(to9_state::to8_kbd_timer_cb),this)); m_to8_kbd_signal = machine().scheduler().timer_alloc(timer_expired_delegate()); save_item(NAME(m_to8_kbd_ack)); save_item(NAME(m_to8_kbd_data)); @@ -2880,30 +2891,7 @@ /* ------------ RAM / ROM banking ------------ */ -void thomson_state::to8_update_floppy_bank() -{ - int bank = (m_to8_reg_sys1 & 0x80) ? m_to7_floppy_bank : (m_to8_bios_bank + TO7_NB_FLOP_BANK); - - if ( bank != m_old_floppy_bank ) - { - LOG_BANK(( "to8_update_floppy_bank: floppy ROM is %s bank %i\n", - (m_to8_reg_sys1 & 0x80) ? "external" : "internal", - bank % TO7_NB_FLOP_BANK )); - m_flopbank->set_entry( bank ); - m_old_floppy_bank = bank; - } -} - - - -void thomson_state::to8_update_floppy_bank_postload() -{ - to8_update_floppy_bank(); -} - - - -void thomson_state::to8_update_ram_bank() +void to9_state::to8_update_ram_bank() { address_space& space = m_maincpu->space(AS_PROGRAM); uint8_t bank = 0; @@ -2961,14 +2949,14 @@ -void thomson_state::to8_update_ram_bank_postload() +void to9_state::to8_update_ram_bank_postload() { to8_update_ram_bank(); } -void thomson_state::to8_update_cart_bank() +void to9_state::to8_update_cart_bank() { address_space& space = m_maincpu->space(AS_PROGRAM); int bank = 0; @@ -2996,7 +2984,7 @@ } else { - space.install_write_handler( 0x0000, 0x3fff, write8sm_delegate(*this, FUNC(thomson_state::to8_vcart_w))); + space.install_write_handler( 0x0000, 0x3fff, write8sm_delegate(*this, FUNC(to9_state::to8_vcart_w))); } } } @@ -3038,7 +3026,7 @@ { if (m_to8_cart_vpage < 4) { - space.install_write_handler( 0x0000, 0x3fff, write8sm_delegate(*this, FUNC(thomson_state::to8_vcart_w))); + space.install_write_handler( 0x0000, 0x3fff, write8sm_delegate(*this, FUNC(to9_state::to8_vcart_w))); } else { @@ -3063,7 +3051,7 @@ if ( m_old_cart_bank < 4 || m_old_cart_bank > 7 ) { space.install_read_bank( 0x0000, 0x3fff, m_cartbank ); - space.install_write_handler( 0x0000, 0x3fff, write8sm_delegate(*this, FUNC(thomson_state::to8_cartridge_w)) ); + space.install_write_handler( 0x0000, 0x3fff, write8sm_delegate(*this, FUNC(to9_state::to8_cartridge_w)) ); } LOG_BANK(( "to8_update_cart_bank: CART is internal bank %i\n", m_to8_soft_bank )); } @@ -3079,8 +3067,8 @@ if ( m_old_cart_bank < 0 || m_old_cart_bank > 3 ) { space.install_read_bank( 0x0000, 0x3fff, m_cartbank ); - space.install_write_handler( 0x0000, 0x3fff, write8sm_delegate(*this, FUNC(thomson_state::to8_cartridge_w)) ); - space.install_read_handler( 0x0000, 0x0003, read8sm_delegate(*this, FUNC(thomson_state::to8_cartridge_r)) ); + space.install_write_handler( 0x0000, 0x3fff, write8sm_delegate(*this, FUNC(to9_state::to8_cartridge_w)) ); + space.install_read_handler( 0x0000, 0x0003, read8sm_delegate(*this, FUNC(to9_state::to8_cartridge_r)) ); } LOG_BANK(( "to8_update_cart_bank: CART is external cartridge bank %i\n", bank )); } @@ -3104,7 +3092,7 @@ -void thomson_state::to8_update_cart_bank_postload() +void to9_state::to8_update_cart_bank_postload() { to8_update_cart_bank(); } @@ -3112,7 +3100,7 @@ /* ROM bank switch */ -void thomson_state::to8_cartridge_w(offs_t offset, uint8_t data) +void to9_state::to8_cartridge_w(offs_t offset, uint8_t data) { if ( offset >= 0x2000 ) return; @@ -3128,7 +3116,7 @@ /* read signal to 0000-0003 generates a bank switch */ -uint8_t thomson_state::to8_cartridge_r(offs_t offset) +uint8_t to9_state::to8_cartridge_r(offs_t offset) { uint8_t data = m_cart_rom[offset + (m_thom_cart_bank % m_thom_cart_nb_banks) * 0x4000]; if ( !machine().side_effects_disabled() ) @@ -3140,58 +3128,6 @@ } -/* ------------ floppy / network controller dispatch ------------ */ - - - -void thomson_state::to8_floppy_init() -{ - to7_floppy_init(); -} - - - -void thomson_state::to8_floppy_reset() -{ - uint8_t* mem = memregion("maincpu")->base(); - to7_floppy_reset(); - if ( THOM_FLOPPY_INT ) - m_thmfc->floppy_reset(); - m_flopbank->configure_entries( TO7_NB_FLOP_BANK, 2, mem + 0x20000, 0x2000 ); -} - - - -uint8_t thomson_state::to8_floppy_r(offs_t offset) -{ - if ( machine().side_effects_disabled() ) - return 0; - - if ( (m_to8_reg_sys1 & 0x80) && THOM_FLOPPY_EXT ) - /* external controller */ - return to7_floppy_r( offset ); - else if ( ! (m_to8_reg_sys1 & 0x80) && THOM_FLOPPY_INT ) - /* internal controller */ - return m_thmfc->floppy_r( offset ); - else - /* no controller */ - return 0; -} - - - -void thomson_state::to8_floppy_w(offs_t offset, uint8_t data) -{ - if ( (m_to8_reg_sys1 & 0x80) && THOM_FLOPPY_EXT ) - /* external controller */ - to7_floppy_w( offset, data ); - else if ( ! (m_to8_reg_sys1 & 0x80) && THOM_FLOPPY_INT ) - /* internal controller */ - m_thmfc->floppy_w( offset, data ); -} - - - /* ------------ system gate-array ------------ */ @@ -3200,7 +3136,7 @@ -uint8_t thomson_state::to8_gatearray_r(offs_t offset) +uint8_t to9_state::to8_gatearray_r(offs_t offset) { struct thom_vsignal v = thom_get_vsignal(); struct thom_vsignal l = thom_get_lightpen_vsignal( TO8_LIGHTPEN_DECAL, m_to7_lightpen_step - 1, 6 ); @@ -3259,7 +3195,7 @@ -void thomson_state::to8_gatearray_w(offs_t offset, uint8_t data) +void to9_state::to8_gatearray_w(offs_t offset, uint8_t data) { LOG_VIDEO(( "$%04x %f to8_gatearray_w: off=%i ($%04X) data=$%02X\n", m_maincpu->pc(), machine().time().as_double(), @@ -3286,7 +3222,6 @@ case 3: /* system register 1 */ m_to8_reg_sys1 = data; - to8_update_floppy_bank(); to8_update_ram_bank(); to8_update_cart_bank(); break; @@ -3303,7 +3238,7 @@ -uint8_t thomson_state::to8_vreg_r(offs_t offset) +uint8_t to9_state::to8_vreg_r(offs_t offset) { /* 0xe7dc from external floppy drive aliases the video gate-array */ if ( ( offset == 3 ) && ( m_to8_reg_ram & 0x80 ) && ( m_to8_reg_sys1 & 0x80 ) ) @@ -3311,10 +3246,7 @@ if ( machine().side_effects_disabled() ) return 0; - if ( THOM_FLOPPY_EXT ) - return to7_floppy_r( 0xc ); - else - return 0; + abort(); // return to7_floppy_r( 0xc ); } switch ( offset ) @@ -3344,7 +3276,7 @@ -void thomson_state::to8_vreg_w(offs_t offset, uint8_t data) +void to9_state::to8_vreg_w(offs_t offset, uint8_t data) { LOG_VIDEO(( "$%04x %f to8_vreg_w: off=%i ($%04X) data=$%02X\n", m_maincpu->pc(), machine().time().as_double(), @@ -3376,8 +3308,7 @@ /* 0xe7dc from external floppy drive aliases the video gate-array */ if ( ( offset == 3 ) && ( m_to8_reg_ram & 0x80 ) && ( m_to8_reg_sys1 & 0x80 ) ) { - if ( THOM_FLOPPY_EXT ) - to7_floppy_w( 0xc, data ); + abort(); // to7_floppy_w( 0xc, data ); } else { @@ -3397,7 +3328,7 @@ /* ------------ system PIA 6821 ------------ */ -uint8_t thomson_state::to8_sys_porta_in() +uint8_t to9_state::to8_sys_porta_in() { int ktest = to8_kbd_ktest(); @@ -3409,7 +3340,7 @@ -void thomson_state::to8_sys_portb_out(uint8_t data) +void to9_state::to8_sys_portb_out(uint8_t data) { m_centronics->write_data0(BIT(data, 0)); m_centronics->write_strobe(BIT(data, 1)); @@ -3425,12 +3356,12 @@ /* ------------ 6846 (timer, I/O) ------------ */ -WRITE_LINE_MEMBER(thomson_state::write_centronics_busy ) +WRITE_LINE_MEMBER(to9_state::write_centronics_busy ) { m_centronics_busy = state; } -uint8_t thomson_state::to8_timer_port_in() +uint8_t to9_state::to8_timer_port_in() { int lightpen = (m_io_lightpen_button->read() & 1) ? 2 : 0; int cass = to7_get_cassette() ? 0x80 : 0; @@ -3441,21 +3372,20 @@ -void thomson_state::to8_timer_port_out(uint8_t data) +void to9_state::to8_timer_port_out(uint8_t data) { int ack = (data & 0x20) ? 1 : 0; /* bit 5: keyboard ACK */ m_to8_bios_bank = (data & 0x10) ? 1 : 0; /* bit 4: BIOS bank*/ thom_set_mode_point( data & 1 ); /* bit 0: video bank switch */ m_biosbank->set_entry( m_to8_bios_bank ); m_to8_soft_select = (data & 0x04) ? 1 : 0; /* bit 2: internal ROM select */ - to8_update_floppy_bank(); to8_update_cart_bank(); to8_kbd_set_ack(ack); } -WRITE_LINE_MEMBER( thomson_state::to8_timer_cp2_out ) +WRITE_LINE_MEMBER( to9_state::to8_timer_cp2_out ) { /* mute */ m_to7_game_mute = state; @@ -3467,7 +3397,7 @@ /* direct connection to interrupt line instead of through a PIA */ -void thomson_state::to8_lightpen_cb( int step ) +void to9_state::to8_lightpen_cb( int step ) { if ( ! m_to7_lightpen ) return; @@ -3483,14 +3413,13 @@ -MACHINE_RESET_MEMBER( thomson_state, to8 ) +MACHINE_RESET_MEMBER( to9_state, to8 ) { LOG (( "to8: machine reset called\n" )); /* subsystems */ thom_irq_reset(); to7_game_reset(); - to8_floppy_reset(); to8_kbd_reset(); to7_modem_reset(); to7_midi_reset(); @@ -3506,7 +3435,7 @@ /* video */ thom_set_video_mode( THOM_VMODE_TO770 ); - m_thom_lightpen_cb = &thomson_state::to8_lightpen_cb; + m_thom_lightpen_cb = std::bind(&to9_state::to8_lightpen_cb, this, std::placeholders::_1); thom_set_lightpen_callback( 4 ); thom_set_border_color( 0 ); thom_set_mode_point( 0 ); @@ -3516,21 +3445,19 @@ m_old_ram_bank = -1; m_old_cart_bank = -1; m_old_cart_bank_was_read_only = 0; - m_old_floppy_bank = -1; m_to8_cart_vpage = 0; m_to8_data_vpage = 0; m_to8_soft_bank = 0; m_to8_bios_bank = 0; to8_update_ram_bank(); to8_update_cart_bank(); - to8_update_floppy_bank(); m_biosbank->set_entry( 0 ); /* thom_cart_bank not reset */ } -MACHINE_START_MEMBER( thomson_state, to8 ) +MACHINE_START_MEMBER( to9_state, to8 ) { uint8_t* mem = memregion("maincpu")->base(); uint8_t* cartmem = &m_cart_rom[0]; @@ -3540,12 +3467,14 @@ /* subsystems */ to7_game_init(); - to8_floppy_init(); to8_kbd_init(); to9_palette_init(); to7_modem_init(); to7_midi_init(); + m_extension->rom_map(m_maincpu->space(AS_PROGRAM), 0xe000, 0xe7bf); + m_extension->io_map (m_maincpu->space(AS_PROGRAM), 0xe7d0, 0xe7df); + /* memory */ m_thom_cart_bank = 0; m_thom_vram = ram; @@ -3594,9 +3523,8 @@ save_item(NAME(m_to8_data_vpage)); save_item(NAME(m_to8_cart_vpage)); save_pointer(NAME(cartmem), 0x10000 ); - machine().save().register_postload(save_prepost_delegate(FUNC(thomson_state::to8_update_ram_bank_postload), this)); - machine().save().register_postload(save_prepost_delegate(FUNC(thomson_state::to8_update_cart_bank_postload), this)); - machine().save().register_postload(save_prepost_delegate(FUNC(thomson_state::to8_update_floppy_bank_postload), this)); + machine().save().register_postload(save_prepost_delegate(FUNC(to9_state::to8_update_ram_bank_postload), this)); + machine().save().register_postload(save_prepost_delegate(FUNC(to9_state::to8_update_cart_bank_postload), this)); } @@ -3613,7 +3541,7 @@ -uint8_t thomson_state::to9p_timer_port_in() +uint8_t to9_state::to9p_timer_port_in() { int lightpen = (m_io_lightpen_button->read() & 1) ? 2 : 0; int cass = to7_get_cassette() ? 0x80 : 0; @@ -3623,26 +3551,24 @@ -void thomson_state::to9p_timer_port_out(uint8_t data) +void to9_state::to9p_timer_port_out(uint8_t data) { int bios_bank = (data & 0x10) ? 1 : 0; /* bit 4: BIOS bank */ thom_set_mode_point( data & 1 ); /* bit 0: video bank switch */ m_biosbank->set_entry( bios_bank ); m_to8_soft_select = (data & 0x04) ? 1 : 0; /* bit 2: internal ROM select */ - to8_update_floppy_bank(); to8_update_cart_bank(); } /* ------------ init / reset ------------ */ -MACHINE_RESET_MEMBER( thomson_state, to9p ) +MACHINE_RESET_MEMBER( to9_state, to9p ) { LOG (( "to9p: machine reset called\n" )); /* subsystems */ thom_irq_reset(); to7_game_reset(); - to8_floppy_reset(); to9_kbd_reset(); to7_modem_reset(); to7_midi_reset(); @@ -3658,7 +3584,7 @@ /* video */ thom_set_video_mode( THOM_VMODE_TO770 ); - m_thom_lightpen_cb = &thomson_state::to8_lightpen_cb; + m_thom_lightpen_cb = std::bind(&to9_state::to8_lightpen_cb, this, std::placeholders::_1); thom_set_lightpen_callback( 4 ); thom_set_border_color( 0 ); thom_set_mode_point( 0 ); @@ -3667,21 +3593,19 @@ /* memory */ m_old_ram_bank = -1; m_old_cart_bank = -1; - m_old_floppy_bank = -1; m_to8_cart_vpage = 0; m_to8_data_vpage = 0; m_to8_soft_bank = 0; m_to8_bios_bank = 0; to8_update_ram_bank(); to8_update_cart_bank(); - to8_update_floppy_bank(); m_biosbank->set_entry( 0 ); /* thom_cart_bank not reset */ } -MACHINE_START_MEMBER( thomson_state, to9p ) +MACHINE_START_MEMBER( to9_state, to9p ) { uint8_t* mem = memregion("maincpu")->base(); uint8_t* cartmem = &m_cart_rom[0]; @@ -3691,12 +3615,14 @@ /* subsystems */ to7_game_init(); - to8_floppy_init(); to9_kbd_init(); to9_palette_init(); to7_modem_init(); to7_midi_init(); + m_extension->rom_map(m_maincpu->space(AS_PROGRAM), 0xe000, 0xe7bf); + m_extension->io_map (m_maincpu->space(AS_PROGRAM), 0xe7d0, 0xe7df); + /* memory */ m_thom_cart_bank = 0; m_thom_vram = ram; @@ -3733,9 +3659,8 @@ save_item(NAME(m_to8_data_vpage)); save_item(NAME(m_to8_cart_vpage)); save_pointer(NAME(cartmem), 0x10000 ); - machine().save().register_postload(save_prepost_delegate(FUNC(thomson_state::to8_update_ram_bank_postload), this)); - machine().save().register_postload(save_prepost_delegate(FUNC(thomson_state::to8_update_cart_bank_postload), this)); - machine().save().register_postload(save_prepost_delegate(FUNC(thomson_state::to8_update_floppy_bank_postload), this)); + machine().save().register_postload(save_prepost_delegate(FUNC(to9_state::to8_update_ram_bank_postload), this)); + machine().save().register_postload(save_prepost_delegate(FUNC(to9_state::to8_update_cart_bank_postload), this)); } @@ -3748,7 +3673,7 @@ -void thomson_state::mo6_update_ram_bank() +void mo6_state::mo6_update_ram_bank() { uint8_t bank = 0; @@ -3767,14 +3692,14 @@ -void thomson_state::mo6_update_ram_bank_postload() +void mo6_state::mo6_update_ram_bank_postload() { mo6_update_ram_bank(); } -void thomson_state::mo6_update_cart_bank() +void mo6_state::mo6_update_cart_bank() { address_space& space = m_maincpu->space(AS_PROGRAM); int b = (m_pia_sys->a_output() >> 5) & 1; @@ -3804,8 +3729,8 @@ } else { - space.install_write_handler( 0xb000, 0xbfff, write8sm_delegate(*this, FUNC(thomson_state::mo6_vcart_lo_w))); - space.install_write_handler( 0xc000, 0xefff, write8sm_delegate(*this, FUNC(thomson_state::mo6_vcart_hi_w))); + space.install_write_handler( 0xb000, 0xbfff, write8sm_delegate(*this, FUNC(mo6_state::mo6_vcart_lo_w))); + space.install_write_handler( 0xc000, 0xefff, write8sm_delegate(*this, FUNC(mo6_state::mo6_vcart_hi_w))); } } } @@ -3840,8 +3765,8 @@ { if (m_to8_cart_vpage < 4) { - space.install_write_handler( 0xb000, 0xbfff, write8sm_delegate(*this, FUNC(thomson_state::mo6_vcart_lo_w))); - space.install_write_handler( 0xc000, 0xefff, write8sm_delegate(*this, FUNC(thomson_state::mo6_vcart_hi_w))); + space.install_write_handler( 0xb000, 0xbfff, write8sm_delegate(*this, FUNC(mo6_state::mo6_vcart_lo_w))); + space.install_write_handler( 0xc000, 0xefff, write8sm_delegate(*this, FUNC(mo6_state::mo6_vcart_hi_w))); } else { @@ -3936,7 +3861,7 @@ { space.install_read_bank( 0xb000, 0xbfff, m_cartlobank ); space.install_read_bank( 0xc000, 0xefff, m_carthibank ); - space.install_write_handler( 0xb000, 0xefff, write8sm_delegate(*this, FUNC(thomson_state::mo6_cartridge_w)) ); + space.install_write_handler( 0xb000, 0xefff, write8sm_delegate(*this, FUNC(mo6_state::mo6_cartridge_w)) ); } LOG_BANK(( "mo6_update_cart_bank: CART is internal ROM bank %i\n", b )); } @@ -3953,8 +3878,8 @@ { space.install_read_bank( 0xb000, 0xbfff, m_cartlobank ); space.install_read_bank( 0xc000, 0xefff, m_carthibank ); - space.install_write_handler( 0xb000, 0xefff, write8sm_delegate(*this, FUNC(thomson_state::mo6_cartridge_w)) ); - space.install_read_handler( 0xbffc, 0xbfff, read8sm_delegate(*this, FUNC(thomson_state::mo6_cartridge_r)) ); + space.install_write_handler( 0xb000, 0xefff, write8sm_delegate(*this, FUNC(mo6_state::mo6_cartridge_w)) ); + space.install_read_handler( 0xbffc, 0xbfff, read8sm_delegate(*this, FUNC(mo6_state::mo6_cartridge_r)) ); } LOG_BANK(( "mo6_update_cart_bank: CART is external cartridge bank %i\n", bank )); } @@ -3980,7 +3905,7 @@ -void thomson_state::mo6_update_cart_bank_postload() +void mo6_state::mo6_update_cart_bank_postload() { mo6_update_cart_bank(); } @@ -3988,7 +3913,7 @@ /* write signal generates a bank switch */ -void thomson_state::mo6_cartridge_w(offs_t offset, uint8_t data) +void mo6_state::mo6_cartridge_w(offs_t offset, uint8_t data) { if ( offset >= 0x2000 ) return; @@ -4000,7 +3925,7 @@ /* read signal generates a bank switch */ -uint8_t thomson_state::mo6_cartridge_r(offs_t offset) +uint8_t mo6_state::mo6_cartridge_r(offs_t offset) { uint8_t data = m_cart_rom[offset + 0x3ffc + (m_thom_cart_bank % m_thom_cart_nb_banks) * 0x4000]; if ( !machine().side_effects_disabled() ) @@ -4013,7 +3938,7 @@ -void thomson_state::mo6_ext_w(uint8_t data) +void mo6_state::mo6_ext_w(uint8_t data) { /* MO5 network extension compatible */ m_mo5_reg_cart = data; @@ -4027,13 +3952,13 @@ /* similar to SX 90-018, but with a few differences: mute, printer */ -WRITE_LINE_MEMBER( thomson_state::mo6_centronics_busy ) +WRITE_LINE_MEMBER( mo6_state::mo6_centronics_busy ) { m_pia_game->cb1_w(state); } -void thomson_state::mo6_game_porta_out(uint8_t data) +void mo6_state::mo6_game_porta_out(uint8_t data) { LOG (( "$%04x %f mo6_game_porta_out: CENTRONICS set data=$%02X\n", m_maincpu->pc(), machine().time().as_double(), data )); @@ -4043,7 +3968,7 @@ -WRITE_LINE_MEMBER( thomson_state::mo6_game_cb2_out ) +WRITE_LINE_MEMBER( mo6_state::mo6_game_cb2_out ) { LOG (( "$%04x %f mo6_game_cb2_out: CENTRONICS set strobe=%i\n", m_maincpu->pc(), machine().time().as_double(), state )); @@ -4053,7 +3978,7 @@ -TIMER_CALLBACK_MEMBER(thomson_state::mo6_game_update_cb) +TIMER_CALLBACK_MEMBER(mo6_state::mo6_game_update_cb) { /* unlike the TO8, CB1 & CB2 are not connected to buttons */ if ( m_io_config->read() & 1 ) @@ -4073,10 +3998,10 @@ -void thomson_state::mo6_game_init() +void mo6_state::mo6_game_init() { LOG (( "mo6_game_init called\n" )); - m_to7_game_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(thomson_state::mo6_game_update_cb),this)); + m_to7_game_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(mo6_state::mo6_game_update_cb),this)); m_to7_game_timer->adjust(TO7_GAME_POLL_PERIOD, 0, TO7_GAME_POLL_PERIOD); save_item(NAME(m_to7_game_sound)); save_item(NAME(m_to7_game_mute)); @@ -4084,7 +4009,7 @@ -void thomson_state::mo6_game_reset() +void mo6_state::mo6_game_reset() { LOG (( "mo6_game_reset called\n" )); m_pia_game->ca1_w( 0 ); @@ -4099,7 +4024,7 @@ -uint8_t thomson_state::mo6_sys_porta_in() +uint8_t mo6_state::mo6_sys_porta_in() { return ((m_io_lightpen_button->read() & 1) ? 2 : 0) | /* bit 1: lightpen button */ @@ -4110,7 +4035,7 @@ -uint8_t thomson_state::mo6_sys_portb_in() +uint8_t mo6_state::mo6_sys_portb_in() { /* keyboard: 9 lines of 8 keys */ uint8_t porta = m_pia_sys->a_output(); @@ -4128,7 +4053,7 @@ -void thomson_state::mo6_sys_porta_out(uint8_t data) +void mo6_state::mo6_sys_porta_out(uint8_t data) { thom_set_mode_point( data & 1 ); /* bit 0: video bank switch */ m_to7_game_mute = data & 4; /* bit 2: sound mute */ @@ -4140,7 +4065,7 @@ -WRITE_LINE_MEMBER( thomson_state::mo6_sys_cb2_out ) +WRITE_LINE_MEMBER( mo6_state::mo6_sys_cb2_out ) { /* SCART pin 8 = slow switch (?) */ LOG(( "mo6_sys_cb2_out: SCART slow switch set to %i\n", state )); @@ -4154,7 +4079,7 @@ -uint8_t thomson_state::mo6_gatearray_r(offs_t offset) +uint8_t mo6_state::mo6_gatearray_r(offs_t offset) { struct thom_vsignal v = thom_get_vsignal(); struct thom_vsignal l = thom_get_lightpen_vsignal( MO6_LIGHTPEN_DECAL, m_to7_lightpen_step - 1, 6 ); @@ -4213,7 +4138,7 @@ -void thomson_state::mo6_gatearray_w(offs_t offset, uint8_t data) +void mo6_state::mo6_gatearray_w(offs_t offset, uint8_t data) { LOG_VIDEO(( "$%04x %f mo6_gatearray_w: off=%i ($%04X) data=$%02X\n", m_maincpu->pc(), machine().time().as_double(), @@ -4254,13 +4179,13 @@ -uint8_t thomson_state::mo6_vreg_r(offs_t offset) +uint8_t mo6_state::mo6_vreg_r(offs_t offset) { /* 0xa7dc from external floppy drive aliases the video gate-array */ if ( ( offset == 3 ) && ( m_to8_reg_ram & 0x80 ) ) { if ( !machine().side_effects_disabled() ) - return to7_floppy_r( 0xc ); + abort(); // return to7_floppy_r( 0xc ); } switch ( offset ) @@ -4281,7 +4206,7 @@ -void thomson_state::mo6_vreg_w(offs_t offset, uint8_t data) +void mo6_state::mo6_vreg_w(offs_t offset, uint8_t data) { LOG_VIDEO(( "$%04x %f mo6_vreg_w: off=%i ($%04X) data=$%02X\n", m_maincpu->pc(), machine().time().as_double(), @@ -4296,7 +4221,7 @@ case 2: /* display / external floppy register */ if ( ( m_to8_reg_sys1 & 0x80 ) && ( m_to8_reg_ram & 0x80 ) ) - to7_floppy_w( 0xc, data ); + abort(); // to7_floppy_w( 0xc, data ); else to9_set_video_mode( data, 2 ); break; @@ -4304,7 +4229,7 @@ case 3: /* system register 2 */ /* 0xa7dc from external floppy drive aliases the video gate-array */ if ( ( offset == 3 ) && ( m_to8_reg_ram & 0x80 ) ) - to7_floppy_w( 0xc, data ); + abort(); // to7_floppy_w( 0xc, data ); else { m_to8_reg_sys2 = data; @@ -4325,14 +4250,13 @@ -MACHINE_RESET_MEMBER( thomson_state, mo6 ) +MACHINE_RESET_MEMBER( mo6_state, mo6 ) { LOG (( "mo6: machine reset called\n" )); /* subsystems */ thom_irq_reset(); mo6_game_reset(); - to7_floppy_reset(); to7_modem_reset(); to7_midi_reset(); mo5_init_timer(); @@ -4347,7 +4271,7 @@ /* video */ thom_set_video_mode( THOM_VMODE_MO5 ); - m_thom_lightpen_cb = &thomson_state::to8_lightpen_cb; + m_thom_lightpen_cb = std::bind(&mo6_state::to8_lightpen_cb, this, std::placeholders::_1); thom_set_lightpen_callback( 3 ); thom_set_border_color( 0 ); thom_set_mode_point( 0 ); @@ -4366,7 +4290,7 @@ -MACHINE_START_MEMBER( thomson_state, mo6 ) +MACHINE_START_MEMBER( mo6_state, mo6 ) { uint8_t* mem = memregion("maincpu")->base(); uint8_t* cartmem = &m_cart_rom[0]; @@ -4376,11 +4300,13 @@ /* subsystems */ mo6_game_init(); - to7_floppy_init(); to9_palette_init(); to7_modem_init(); to7_midi_init(); - m_mo5_periodic_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(thomson_state::mo5_periodic_cb),this)); + m_mo5_periodic_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(mo6_state::mo5_periodic_cb),this)); + + m_extension->rom_map(m_maincpu->space(AS_PROGRAM), 0xa000, 0xa7bf); + m_extension->io_map (m_maincpu->space(AS_PROGRAM), 0xa7d0, 0xa7df); /* memory */ m_thom_cart_bank = 0; @@ -4424,8 +4350,8 @@ save_item(NAME(m_to8_cart_vpage)); save_item(NAME(m_mo5_reg_cart)); save_pointer(NAME(cartmem), 0x10000 ); - machine().save().register_postload(save_prepost_delegate(FUNC(thomson_state::mo6_update_ram_bank_postload), this)); - machine().save().register_postload(save_prepost_delegate(FUNC(thomson_state::mo6_update_cart_bank_postload), this)); + machine().save().register_postload(save_prepost_delegate(FUNC(mo6_state::mo6_update_ram_bank_postload), this)); + machine().save().register_postload(save_prepost_delegate(FUNC(mo6_state::mo6_update_cart_bank_postload), this)); } @@ -4434,35 +4360,6 @@ -/* ------------ network ( & external floppy) ------------ */ - - - -uint8_t thomson_state::mo5nr_net_r(offs_t offset) -{ - if ( machine().side_effects_disabled() ) - return 0; - - if ( m_to7_controller_type ) - return to7_floppy_r ( offset ); - - logerror( "$%04x %f mo5nr_net_r: read from reg %i\n", m_maincpu->pc(), machine().time().as_double(), offset ); - - return 0; -} - - - -void thomson_state::mo5nr_net_w(offs_t offset, uint8_t data) -{ - if ( m_to7_controller_type ) - to7_floppy_w ( offset, data ); - else - logerror( "$%04x %f mo5nr_net_w: write $%02X to reg %i\n", - m_maincpu->pc(), machine().time().as_double(), data, offset ); -} - - /* ------------ printer ------------ */ /* Unlike the TO8, TO9, TO9+, MO6, the printer has its own ports and does not @@ -4470,7 +4367,7 @@ */ -uint8_t thomson_state::mo5nr_prn_r() +uint8_t mo5nr_state::mo5nr_prn_r() { uint8_t result = 0; @@ -4480,7 +4377,7 @@ } -void thomson_state::mo5nr_prn_w(uint8_t data) +void mo5nr_state::mo5nr_prn_w(uint8_t data) { /* TODO: understand other bits */ m_centronics->write_strobe(BIT(data, 3)); @@ -4492,7 +4389,7 @@ -uint8_t thomson_state::mo5nr_sys_portb_in() +uint8_t mo5nr_state::mo5nr_sys_portb_in() { /* keyboard: only 8 lines of 8 keys (MO6 has 9 lines) */ uint8_t portb = m_pia_sys->b_output(); @@ -4505,7 +4402,7 @@ -void thomson_state::mo5nr_sys_porta_out(uint8_t data) +void mo5nr_state::mo5nr_sys_porta_out(uint8_t data) { /* no keyboard LED */ thom_set_mode_point( data & 1 ); /* bit 0: video bank switch */ @@ -4523,10 +4420,10 @@ -void thomson_state::mo5nr_game_init() +void mo5nr_state::mo5nr_game_init() { LOG (( "mo5nr_game_init called\n" )); - m_to7_game_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(thomson_state::mo6_game_update_cb),this)); + m_to7_game_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(mo5nr_state::mo6_game_update_cb),this)); m_to7_game_timer->adjust( TO7_GAME_POLL_PERIOD, 0, TO7_GAME_POLL_PERIOD ); save_item(NAME(m_to7_game_sound)); save_item(NAME(m_to7_game_mute)); @@ -4534,7 +4431,7 @@ -void thomson_state::mo5nr_game_reset() +void mo5nr_state::mo5nr_game_reset() { LOG (( "mo5nr_game_reset called\n" )); m_pia_game->ca1_w( 0 ); @@ -4548,15 +4445,20 @@ /* ------------ init / reset ------------ */ +uint8_t mo5nr_state::id_r() +{ + return (m_nanoreseau_config->read() >> 1) & 0x1f; +} -MACHINE_RESET_MEMBER( thomson_state, mo5nr ) +MACHINE_RESET_MEMBER( mo5nr_state, mo5nr ) { LOG (( "mo5nr: machine reset called\n" )); + m_extension_view.select(m_nanoreseau_config->read() & 1); + /* subsystems */ thom_irq_reset(); mo5nr_game_reset(); - to7_floppy_reset(); to7_modem_reset(); to7_midi_reset(); mo5_init_timer(); @@ -4571,7 +4473,7 @@ /* video */ thom_set_video_mode( THOM_VMODE_MO5 ); - m_thom_lightpen_cb = &thomson_state::to8_lightpen_cb; + m_thom_lightpen_cb = std::bind(&mo5nr_state::to8_lightpen_cb, this, std::placeholders::_1); thom_set_lightpen_callback( 3 ); thom_set_border_color( 0 ); thom_set_mode_point( 0 ); @@ -4590,7 +4492,7 @@ -MACHINE_START_MEMBER( thomson_state, mo5nr ) +MACHINE_START_MEMBER( mo5nr_state, mo5nr ) { uint8_t* mem = memregion("maincpu")->base(); uint8_t* cartmem = &m_cart_rom[0]; @@ -4600,11 +4502,15 @@ /* subsystems */ mo5nr_game_init(); - to7_floppy_init(); to9_palette_init(); to7_modem_init(); to7_midi_init(); - m_mo5_periodic_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(thomson_state::mo5_periodic_cb),this)); + m_mo5_periodic_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(mo5nr_state::mo5_periodic_cb),this)); + + m_extension->rom_map(m_extension_view[0], 0xa000, 0xa7bf); + m_extension->io_map (m_extension_view[0], 0xa7d0, 0xa7df); + m_extension_view[1].install_device(0xa000, 0xa7bf, *m_nanoreseau, &nanoreseau_device::rom_map ); + m_extension_view[1].install_device(0xa7d0, 0xa7df, *m_nanoreseau, &nanoreseau_device::io_map ); /* memory */ m_thom_cart_bank = 0; @@ -4649,6 +4555,6 @@ save_item(NAME(m_to8_cart_vpage)); save_item(NAME(m_mo5_reg_cart)); save_pointer(NAME(cartmem), 0x10000 ); - machine().save().register_postload(save_prepost_delegate(FUNC(thomson_state::mo6_update_ram_bank_postload), this)); - machine().save().register_postload(save_prepost_delegate(FUNC(thomson_state::mo6_update_cart_bank_postload), this)); + machine().save().register_postload(save_prepost_delegate(FUNC(mo5nr_state::mo6_update_ram_bank_postload), this)); + machine().save().register_postload(save_prepost_delegate(FUNC(mo5nr_state::mo6_update_cart_bank_postload), this)); } diff -Nru mame-0.230+dfsg.1/src/mame/machine/toaplan1.cpp mame-0.231+dfsg.1/src/mame/machine/toaplan1.cpp --- mame-0.230+dfsg.1/src/mame/machine/toaplan1.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/machine/toaplan1.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -8,7 +8,7 @@ #include "emu.h" #include "cpu/z80/z80.h" #include "cpu/tms32010/tms32010.h" -#include "sound/3812intf.h" +#include "sound/ym3812.h" #include "includes/toaplan1.h" diff -Nru mame-0.230+dfsg.1/src/mame/machine/trs80.cpp mame-0.231+dfsg.1/src/mame/machine/trs80.cpp --- mame-0.230+dfsg.1/src/mame/machine/trs80.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/machine/trs80.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -12,8 +12,7 @@ TIMER_CALLBACK_MEMBER(trs80_state::cassette_data_callback) { -/* This does all baud rates. 250 baud (trs80), and 500 baud (all others) set bit 7 of "cassette_data". - 1500 baud (trs80m3, trs80m4) is interrupt-driven and uses bit 0 of "cassette_data" */ +// This does all baud rates. 250 baud (trs80), and 500 baud (all others) set bit 7 of "cassette_data". double new_val = (m_cassette->input()); @@ -136,11 +135,6 @@ return data; } -uint8_t trs80_state::lnw80_fe_r() -{ - return m_lnw_mode; -} - uint8_t trs80_state::port_ff_r() { /* ModeSel and cassette data @@ -166,20 +160,6 @@ m_tape_unit = BIT(data, 4) ? 2 : 1; } -/* lnw80 can switch out all the devices, roms and video ram to be replaced by graphics ram. */ -void trs80_state::lnw80_fe_w(uint8_t data) -{ -/* lnw80 video options - d3 bankswitch lower 16k between roms and hires ram (1=hires) - d2 enable colour \ - d1 hres / these 2 are the bits from the MODE command of LNWBASIC - d0 inverse video (entire screen) */ - - m_lnw_mode = data; - - m_lnw_bank->set_bank(BIT(data, 3)); -} - void trs80_state::port_ff_w(uint8_t data) { /* Standard output port of Model I @@ -188,7 +168,6 @@ d1, d0 Cassette output */ static const double levels[4] = { 0.0, 1.0, -1.0, 0.0 }; - static bool init = 0; m_cassette->change_state(BIT(data, 2) ? CASSETTE_MOTOR_ENABLED : CASSETTE_MOTOR_DISABLED, CASSETTE_MASK_MOTOR ); m_cassette->output(levels[data & 3]); @@ -196,13 +175,9 @@ m_mode = (m_mode & 0xfe) | BIT(data, 3); - if (!init) - { - init = 1; - static double speaker_levels[4] = { 0.0, -1.0, 0.0, 1.0 }; - m_speaker->set_levels(4, speaker_levels); + static const double speaker_levels[4] = { 0.0, -1.0, 0.0, 1.0 }; + m_speaker->set_levels(4, speaker_levels); - } /* Speaker for System-80 MK II - only sounds if relay is off */ if (!(BIT(data, 2))) m_speaker->level_w(data & 3); @@ -228,8 +203,8 @@ // { // m_timeout--; // if (m_timeout == 0) -// if (m_floppy) -// m_floppy->mon_w(1); // motor off +// if (m_fdd) +// m_fdd->mon_w(1); // motor off // } } @@ -252,13 +227,17 @@ * * *************************************/ -uint8_t trs80_state::wd179x_r() +u8 trs80_state::fdc_r(offs_t offset) { - uint8_t data = 0xff; - if (BIT(m_io_config->read(), 7)) - data = m_fdc->status_r(); + if ((offset == 0) && (!BIT(m_io_config->read(), 7))) + return 0xff; + else + return m_fdc->read(offset) ^ 0xff; +} - return data; +void trs80_state::fdc_w(offs_t offset, u8 data) +{ + m_fdc->write(offset, data ^ 0xff); } uint8_t trs80_state::printer_r() @@ -300,19 +279,18 @@ void trs80_state::motor_w(uint8_t data) { - m_floppy = nullptr; + m_fdd = nullptr; - if (BIT(data, 0)) m_floppy = m_floppy0->get_device(); - if (BIT(data, 1)) m_floppy = m_floppy1->get_device(); - if (BIT(data, 2)) m_floppy = m_floppy2->get_device(); - if (BIT(data, 3)) m_floppy = m_floppy3->get_device(); + for (u8 i = 0; i < 4; i++) + if (BIT(data, i)) + m_fdd = m_floppy[i]->get_device(); - m_fdc->set_floppy(m_floppy); + m_fdc->set_floppy(m_fdd); - if (m_floppy) + if (m_fdd) { - m_floppy->mon_w(0); - m_floppy->ss_w(BIT(data, 4)); + m_fdd->mon_w(0); + m_fdd->ss_w(BIT(data, 4)); m_timeout = 200; } @@ -346,7 +324,6 @@ save_item(NAME(m_mask)); save_item(NAME(m_tape_unit)); save_item(NAME(m_reg_load)); - save_item(NAME(m_lnw_mode)); save_item(NAME(m_cassette_data)); save_item(NAME(m_old_cassette_val)); save_item(NAME(m_size_store)); @@ -372,14 +349,6 @@ } } -MACHINE_RESET_MEMBER(trs80_state,lnw80) -{ - machine_reset(); - m_reg_load = 1; - m_lnw_mode = 0; - lnw80_fe_w(0); -} - /*************************************************************************** PARAMETERS diff -Nru mame-0.230+dfsg.1/src/mame/machine/trs80m3.cpp mame-0.231+dfsg.1/src/mame/machine/trs80m3.cpp --- mame-0.230+dfsg.1/src/mame/machine/trs80m3.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/machine/trs80m3.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -292,6 +292,7 @@ d7 1=enable disk INTRQ to generate NMI d6 1=enable disk Motor Timeout to generate NMI */ + m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); m_nmi_mask = data; } @@ -355,7 +356,8 @@ m_mode = (m_mode & 0xde) | (BIT(data, 2) ? 1 : 0) | (BIT(data, 3) ? 0x20 : 0); - m_cassette->change_state(( data & 2 ) ? CASSETTE_MOTOR_ENABLED : CASSETTE_MOTOR_DISABLED, CASSETTE_MASK_MOTOR ); + if (!BIT(m_model4, 2)) // Model 4P has no cassette hardware + m_cassette->change_state(( data & 2 ) ? CASSETTE_MOTOR_ENABLED : CASSETTE_MOTOR_DISABLED, CASSETTE_MASK_MOTOR ); m_port_ec = data & 0x7e; } @@ -387,17 +389,17 @@ m_wait = false; } - m_floppy = nullptr; + m_fdd = nullptr; - if (BIT(data, 0)) m_floppy = m_floppy0->get_device(); - if (BIT(data, 1)) m_floppy = m_floppy1->get_device(); + if (BIT(data, 0)) m_fdd = m_floppy[0]->get_device(); + if (BIT(data, 1)) m_fdd = m_floppy[1]->get_device(); - m_fdc->set_floppy(m_floppy); + m_fdc->set_floppy(m_fdd); - if (m_floppy) + if (m_fdd) { - m_floppy->mon_w(0); - m_floppy->ss_w(BIT(data, 4)); + m_fdd->mon_w(0); + m_fdd->ss_w(BIT(data, 4)); m_timeout = 1600; } @@ -409,9 +411,13 @@ /* Cassette port d1, d0 Cassette output */ - static const double levels[4] = { 0.0, 1.0, -1.0, 0.0 }; - m_cassette->output(levels[data & 3]); - m_cassette_data &= ~0x80; + if (!BIT(m_model4, 2)) // Model 4P has no cassette hardware + { + static const double levels[4] = { 0.0, 1.0, -1.0, 0.0 }; + m_cassette->output(levels[data & 3]); + m_cassette_data &= ~0x80; + } + m_speaker->level_w(!(BIT(data, 0))); } @@ -437,8 +443,8 @@ { m_timeout--; if (m_timeout == 0) - if (m_floppy) - m_floppy->mon_w(1); // motor off + if (m_fdd) + m_fdd->mon_w(1); // motor off } // Also, if cpu is in wait, unlock it and trigger NMI // Don't, it breaks disk loading @@ -558,8 +564,12 @@ m_start_address = 0; m_old_cassette_val = 0; - m_cassette_data_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(trs80m3_state::cassette_data_callback),this)); - m_cassette_data_timer->adjust( attotime::zero, 0, attotime::from_hz(11025) ); + if (!BIT(m_model4, 2)) // Model 4P has no cassette hardware + { + m_cassette_data_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(trs80m3_state::cassette_data_callback),this)); + m_cassette_data_timer->adjust( attotime::zero, 0, attotime::from_hz(11025) ); + } + if (!(m_model4 & 6)) // Model 3 leave now return; @@ -615,7 +625,7 @@ if (m_model4 & 6) port_84_w(0); // 4 & 4P - switch in devices - m_floppy = nullptr; + m_fdd = nullptr; } diff -Nru mame-0.230+dfsg.1/src/mame/mame.lst mame-0.231+dfsg.1/src/mame/mame.lst --- mame-0.230+dfsg.1/src/mame/mame.lst 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/mame.lst 2021-04-27 15:32:05.000000000 +0000 @@ -1399,6 +1399,7 @@ @source:apple2.cpp ace100 // ??? 1982 Franklin Ace 100 +ace1000 // 1982 Franklin ACE 1000 am64 // 1985 ASEM AM 64 (motherboard is marked AM-100 but it boots as "AM 64") apple2 // Apr 1977 Apple ][ apple2jp // ??? ???? Apple ][j+ @@ -3251,6 +3252,9 @@ @source:bartop52.cpp barbball // (proto) (c) 1983 +@source:basf7100.cpp +basf7120 // + @source:basic52.cpp basic31 // basic52 // @@ -3330,10 +3334,6 @@ bbustersua // A9003 'BB' (c) 1989 bbustersj // bbustersja // -mechatt // A8002 'MA' (c) 1989 -mechattj // A8002 'MA' (c) 1989 -mechattu // A8002 'MA' (c) 1989 -mechattu1 // A8002 'MA' (c) 1989 @source:bcs3.cpp bcs3 // @@ -9811,6 +9811,7 @@ calcune @source:calomega.cpp +cas21iwc // (c) 1990 UCMC / IWC comg074 // (c) 1981 Cal Omega Inc. comg076 // (c) 1981 Cal Omega Inc. comg079 // (c) 1981 Cal Omega Inc. @@ -9845,12 +9846,14 @@ comg246 // (c) 1985 Cal Omega Inc. comg272a // (c) 1985 Cal Omega Inc. comg272b // (c) 1985 Cal Omega Inc. -comg5108 // (c) 1985 Cal Omega Inc. +comg5108 // (c) 1985 Casino Electronics Inc. comg903d // (c) 198? Cal Omega Inc. comg905d // (c) 198? Cal Omega Inc. elgrande // (c) 1982 Tuni Electro Service / E.T. Marketing jjpoker // (c) 1983 Enter-Tech jjpokerb // (c) 1983 Enter-Tech +pokeriwc // (c) 1991 UCMC / IWC +pokiwc162 // (c) 1991 UCMC / IWC ssipkr24 // (c) 1988 SSI ssipkr30 // (c) 1988 SSI ssipkr40 // (c) 1990 SSI @@ -10055,6 +10058,7 @@ @source:cc40.cpp cc40 // 1983 TI CC-40 +cc40p // 1983 TI CC-40+ @source:ccastles.cpp ccastles // 136022 (c) 1983 @@ -10301,6 +10305,7 @@ outr2st // 2004.12 Outrun 2 Special Tours (Rev A) outr2stj // 2004.12 Outrun 2 Special Tours (Japan) (Rev A) scg05nt // 2004.10 Sega Golf Club Network Pro Tour 2005 (Rev C) (GDX-0010C) +scg05ntb // 2004.10 Sega Golf Club Network Pro Tour 2005 (Rev B) (GDX-0010B) scg06nt // 2005.12 Sega Golf Club 2006: Next Tours (Rev A) vcop3a // 2003.02.26 Virtua Cop 3 (Rev A) vcop3 // 2003.05.21 Virtua Cop 3 (Rev B) @@ -11094,6 +11099,7 @@ mmancp2ur1 // 26/09/1995 (c) 1995 (USA) mmancp2ur2 // 25/09/1995 (c) 1995 (USA) mmatrix // 12/04/2000 (c) 2000 Takumi (USA) +mmatrixa // 12/04/2000 (c) 2000 Takumi (Asia) mmatrixd // mmatrixj // 12/04/2000 (c) 2000 Takumi (Japan) mpang // 10/10/2000 (c) 2000 Mitchell (Euro) @@ -11310,6 +11316,9 @@ cps3bs32 // cps3bs32a // jojo // 28/01/1999 (c) 1998 (Euro) +jojoa // 28/01/1999 (c) 1998 (Asia) +jojoar1 // 08/01/1999 (c) 1998 (Asia) +jojoar2 // 02/12/1998 (c) 1998 (Asia) jojoba // 27/09/1999 (c) 1999 (Euro) jojobaj // 27/09/1999 (c) 1999 (Japan) jojobajr1 // 13/09/1999 (c) 1999 (Japan) @@ -11615,6 +11624,8 @@ @source:dai3wksi.cpp dai3wksi // 1979.09 Dai San Wakusei (The Third Planet) +warp1 // 1979.12 Warp-1 +warp1bl // bootleg @source:dambustr.cpp dambustr // (c) 1981 South West Research @@ -13160,6 +13171,10 @@ @source:elwro800.cpp elwro800 // +@source:elzet80.cpp +elzet80k // +elzet80p // + @source:emax.cpp emax // emax2 // @@ -13989,6 +14004,7 @@ @source:funkyjet.cpp funkyjet // MAT (c) 1992 Data East (Mitchell license) (World, Rev 1) funkyjeta // MAT (c) 1992 Data East (Mitchell license) (World) - Rev unverified +funkyjeta2 // MAT (c) 1992 Data East (Mitchell license) (World) - Rev unverified - alternative demo funkyjetj // MAT (c) 1992 Data East (Mitchell license) (Japan, Rev 2) sotsugyo // (c) 1995 Mitchell (Atlus license) @@ -14892,6 +14908,7 @@ @source:gba.cpp gba // Nintendo Game Boy Advance Handheld +robotech // Coleco @source:gberet.cpp gberet // GX577 (c) 1985 @@ -14986,6 +15003,7 @@ jak_sspop jak_hmhsm jak_hmg2 +jak_hmpt jak_hsmg2 jak_umdf jak_duck @@ -16976,6 +16994,9 @@ intlc44 // intlc440 // +@source:intellec8.cpp +intlc8 // + @source:intellect02.cpp intel02 // @@ -18902,6 +18923,9 @@ @source:junior.cpp junior // +@source:junior80.cpp +junior80 // + @source:juno106.cpp juno106 // mks7 // @@ -19362,6 +19386,7 @@ dmx2majp // 2001 - Dance Maniax 2nd Mix Append J-Paradise (G*A38 VER. JAA dncfrks // 2000 - Dance Freaks (G*874 VER. KAA) drmn // 1999 - DrumMania (GQ881 VER. JAD) +drmna // 1999 - DrumMania (GQ881 VER. JAB) drmn10m // 2004 - DrumMania 10th Mix (G*D40 VER. JAA) drmn2m // 1999 - DrumMania 2nd Mix (GE912 VER. JAB) drmn2mpu // 1999 - DrumMania 2nd Mix Session Power Up Kit (GE912 VER. JAB) @@ -19413,8 +19438,9 @@ gtrfrksj // 1999 - Guitar Freaks (GQ886 VER. JAC) gtrfrksu // 1999 - Guitar Freaks (GQ886 VER. UAC) gunmania // 2000 - GunMania (GL906 VER. JAA) -strgchmp // 1997 - Steering Champ (GQ710 VER. UAA) -hndlchmp // 1997 - Handle Champ (GQ710 VER. JAB) +strgchmp // 1997 - Steering Champ (GQ710 97/12/18 VER. UAA) +hndlchmp // 1997 - Handle Champ (GQ710 97/12/18 VER. SAA) +hndlchmpj // 1997 - Handle Champ (GQ710 1997/12/08 VER. JAB) hypbbc2p // 1999 - Hyper Bishi Bashi Champ - 2 Player (GX908 1999/08/24 VER. JAA) hypbbc2pk // 1999 - Hyper Bishi Bashi Champ - 2 Player (GX908 1999/08/24 VER. KAA) hyperbbc // 1998 - Hyper Bishi Bashi (GQ876 VER. EAA) @@ -19429,6 +19455,10 @@ mamboagg // 2001 - Mambo A Go-Go (GQA40 VER. JAB) mamboagga // 2001 - Mambo A Go-Go e-Amusement (GQA40 VER. JRB) mrtlbeat // 2002 - Martial Beat (Martial Beat (G*B47 VER. JBA) +pcnfrk // 1999 - Percussion Freaks (GQ881 VER. EAB) +pcnfrka // 1999 - Percussion Freaks (GQ881 VER. AAB) +pcnfrkk // 1999 - Percussion Freaks (GQ881 VER. KAB) +pcnfrku // 1999 - Percussion Freaks (GQ881 VER. UAB) pcnfrk2m // 2000 - Percussion Freaks 2nd Mix (GE912 VER. KAA) pcnfrk3m // 2000 - Percussion Freaks 3rd Mix (G*A23 VER. KAA) pcnfrk4m // 2001 - Percussion Freaks 4rd Mix (G*A25 VER. AAA) @@ -19803,6 +19833,9 @@ @source:lms46.cpp lms46 // +@source:lnw80.cpp +lnw80 // LNW Research LNW-80 + @source:lockon.cpp lockon // (c) 1986 Tatsumi lockonc // (c) 1986 Tatsumi @@ -20375,6 +20408,9 @@ @source:mattelchess.cpp mchess +@source:max80.cpp +max80 + @source:maxaflex.cpp maxaflex // mf_achas // (c) 1982 Exidy / First Star Software @@ -22443,6 +22479,12 @@ ckidzo // (c) 1976 Meadows mead4in1 // (c) 197? Meadows +@source:mechatt.cpp +mechatt // A8002 'MA' (c) 1989 +mechattj // A8002 'MA' (c) 1989 +mechattu // A8002 'MA' (c) 1989 +mechattu1 // A8002 'MA' (c) 1989 + @source:mediagx.cpp a51site4 // ?? (c) 1998 a51site4a // Sept.11,1998 (c) 1998 @@ -22479,6 +22521,8 @@ @source:megadriv_acbl.cpp aladmdb // MegaDrive-based hack +barekch // MegaDrive-based hack +barek2ch // MegaDrive-based hack barek2mb // MegaDrive-based hack barek3mb // MegaDrive-based hack bk3ssrmb // MegaDrive-based hack @@ -22668,6 +22712,13 @@ academyg academyga +@source:mephisto_amsterdam.cpp +amsterd // Amsterdam +dallas16 // Dallas +dallas32 // Dallas +roma16 // Roma +roma32 // Roma + @source:mephisto_berlin.cpp berl16 // 1992 Mephisto Berlin 68000 berl16a // 1992 Mephisto Berlin 68000 @@ -22688,15 +22739,15 @@ mephistoj @source:mephisto_glasgow.cpp -amsterd // Amsterdam amsterda // Amsterdam -dallas16 // Dallas dallas16a // Dallas -dallas32 // Dallas glasgow // Glasgow -roma16 // Roma roma16a // Roma -roma32 // Roma + +@source:mephisto_milano.cpp +milano // 1991 Mephisto Milano +milanoa // 1991 Mephisto Milano +nshort // 1993 Mephisto Nigel Short @source:mephisto_mm1.cpp mm1 @@ -22755,32 +22806,35 @@ @source:mephisto_mondial.cpp mondial // 1985 Mephisto Mondial + +@source:mephisto_mondial2.cpp mondial2 // 1987 Mephisto Mondial II @source:mephisto_mondial68k.cpp mondl68k // 1988 Mephisto Mondial 68000XL @source:mephisto_montec.cpp -smondial // 1986 Mephisto Super Mondial (Ver A) -smondialab // 1986 Mephisto Super Mondial (Ver AB) -smondialb // 1986 Mephisto Super Mondial (Ver B) montec // 1987 Mephisto Monte Carlo monteca // 1987 Mephisto Monte Carlo -smondial2 // 1989 Mephisto Super Mondial II -megaiv // 1989 Mephisto Mega IV -megaiva // 1989 Mephisto Mega IV -monteciv // 1990 Mephisto Monte Carlo IV LE +montec4le // 1990 Mephisto Monte Carlo IV LE @source:mephisto_polgar.cpp polgar // 1990 Mephisto Polgar polgara // 1989 Mephisto Polgar polgar10 // 1990 Mephisto Polgar 10MHz polgar101 // 1990 Mephisto Polgar 10MHz + +@source:mephisto_risc.cpp mrisc // 1992 Mephisto RISC 1MB mrisc2 // 1994 Mephisto RISC II -milano // 1991 Mephisto Milano -milanoa // 1991 Mephisto Milano -nshort // 1993 Mephisto Nigel Short + +@source:mephisto_smondial.cpp +mega4 // 1989 Mephisto Mega IV +mega4a // 1989 Mephisto Mega IV +smondial // 1986 Mephisto Super Mondial (Ver A) +smondialab // 1986 Mephisto Super Mondial (Ver AB) +smondialb // 1986 Mephisto Super Mondial (Ver B) +smondial2 // 1989 Mephisto Super Mondial II @source:mephistp.cpp mephistp // @@ -23111,10 +23165,13 @@ nbajam // (c) 1993 Midway nbajamr1 // (c) 1993 Midway nbajamr2 // (c) 1993 Midway -nbajamte // (c) 1994 Midway -nbajamte1 // (c) 1994 Midway -nbajamte2 // (c) 1994 Midway -nbajamte3 // (c) 1994 Midway +nbajamte // (c) 1994 Midway (rev 4.0 3/23/94) +nbajamte1 // (c) 1994 Midway (rev 1.00 1/17/94) +nbajamte2 // (c) 1994 Midway (rev 2.1 2/06/94) +nbajamte2a // (c) 1994 Midway (rev 2.0 1/28/94) +nbajamte3 // (c) 1994 Midway (rev 3.0 3/04/94) +nbajamte3a // (c) 1994 Midway (rev 3.0 2/26/94) +nbajamte4 // (c) 1994 Midway (rev 4.0 3/03/94) nbajamten // (c) 1995 Midway @source:midvunit.cpp @@ -23144,9 +23201,16 @@ mk3p40 // (c) 1994 Midway mk3r10 // (c) 1994 Midway mk3r20 // (c) 1994 Midway -nbahangt // (c) 1996 Midway -nbamht // (c) 1996 Midway -nbamht1 // (c) 1996 Midway +nbahangt // (c) 1996 Midway (ver L1.3 10/10/96) +nbahangtl11 // (c) 1996 Midway (ver L1.1 4/16/96) +nbahangtm11 // (c) 1996 Midway (ver M1.1 4/16/96) +nbahangtl12 // (c) 1996 Midway (ver L1.2 8/29/96) +nbahangtm12 // (c) 1996 Midway (ver M1.2 8/29/96) +nbahangtm13 // (c) 1996 Midway (ver M1.3 10/10/96) +nbamht // (c) 1996 Midway (ver L1.03 06/09/97) +nbamhtl10 // (c) 1996 Midway (ver L1.0 11/08/96) +nbamhtm10 // (c) 1996 Midway (ver M1.0 11/08/96) +nbamhtp // (c) 1996 Midway (ver L0.9 10/30/96) openice // (c) 1995 Midway openicea // (c) 1995 Midway rmpgwt // (c) 1997 Midway @@ -23192,6 +23256,7 @@ narc2 // (c) 1988 Williams narc3 // (c) 1988 Williams narc4 // (c) 1988 Williams +narc6 // (c) 1988 Williams shimpact // (c) 1991 Midway shimpactp4 // (c) 1991 Midway shimpactp5 // (c) 1991 Midway @@ -23210,11 +23275,13 @@ term2pa2 // (c) 1992 Midway totcarn // (c) 1992 Midway totcarnp // (c) 1992 Midway -trog // (c) 1990 Midway -trog3 // (c) 1990 Midway -trog4 // (c) 1990 Midway -trogpa4 // (c) 1990 Midway -trogpa6 // (c) 1990 Midway +trog // (c) 1990 Midway (rev LA5 3/29/91) +trog3 // (c) 1990 Midway (rev LA3 2/14/91) +trog3a // (c) 1990 Midway (rev LA3 2/10/91) +trog4 // (c) 1990 Midway (rev LA4 3/11/91) +trogpa4 // (c) 1990 Midway (rev 4.00 7/27/90) +trogpa5 // (c) 1990 Midway (rev PA5-PAC 8/28/90) +trogpa6 // (c) 1990 Midway (rev PA6-PAC 9/09/90) @source:midzeus.cpp crusnexo // (c) 1999 Midway (v2.4) Latest offical release @@ -31365,6 +31432,7 @@ primglex // 1996.03 Prime Goal EX (Japan, PG1/VER.A) ptblank2a // 1999.?? Point Blank 2 (World, GNB2/VER.A) ptblank2b // 1999.?? Point Blank 2 (World, GNB2/VER.A alt) +ptblank2c // 1999.?? Point Blank 2 (Unknown region) ptblank2ua // 1999.?? Point Blank 2 (US, GNB3/VER.A) souledge // 1996.05 Soul Edge Ver. II (Asia, SO4/VER.C) souledgea // 1996.02 Soul Edge (World, SO2/VER.A) @@ -31401,7 +31469,6 @@ kaiunqz // 1999.12 Kaiun Quiz (Japan, KW1/VER.A) kartduel // 2000.07 Kart Duel (Japan, KTD1/VER.A) lbgrande // 1997.?? Libero Grande (World, LG2/VER.A) -lbgrandeja // 1997.12 Libero Grande (Japan, LG1/VER.A) mdhorse // 1998.11 Derby Quiz My Dream Horse (Japan, MDH1/VER.A2) mrdrillr // 1999.11 Mr Driller (US, DRI3/VER.A2) mrdrillrj // 1999.11 Mr Driller (Japan, DRI1/VER.A2, Japan) @@ -31425,6 +31492,7 @@ tekken3 // 1997.03 Tekken 3 (World, TET2/VER.E1) tekken3a // 1997.?? Tekken 3 (World, TET2/VER.A) tekken3b // 1997.?? Tekken 3 (World, TET2/VER.B) +tekken3d // 1997.?? Tekken 3 (World, TET2/VER.D) tekken3ja // 1997.?? Tekken 3 (Japan, TET1/VER.A) tekken3je1 // 1997.03 Tekken 3 (Japan, TET1/VER.E1) tekken3ua // 1997.?? Tekken 3 (US, TET3/VER.A) @@ -32474,6 +32542,7 @@ @source:nes_clone.cpp afbm7800 +dancexpt dnce2000 hs36blk hs36red @@ -32578,6 +32647,7 @@ msinamco msisinv msifrog +rbbrite rcapnp senario25 ventur25 @@ -32948,8 +33018,9 @@ supercon @source:novag_diablo.cpp -diablo68 // -scorpio68 // +diablo68 +diablo68a +scorpio68 @source:novag_micro.cpp nmicro @@ -33559,21 +33630,26 @@ pc88va2 // @source:pc9801.cpp +pc386m // pc486mu // +pc486se // 1993 pc9801bx2 // 1993 pc9801f // 1983 pc9801rs // 1989 pc9801rx // 1988 pc9801ux // 1987 pc9801vm // 1985 -pc9801vm11 +pc9801vm11 // pc9821 // pc9821ap2 // pc9821as // pc9821ce2 // pc9821ne // +pc9821ra20 // +pc9821ra333 // pc9821v13 // pc9821v20 // +pc9821xa16 // pc9821xs // @source:pcat_dyn.cpp @@ -35540,6 +35616,9 @@ rk700716 // spektr01 // +@source:radionic.cpp +radionic // Komtek 1 + @source:raiden.cpp raiden // (c) 1990 Seibu Kaihatsu raidena // (c) 1990 Seibu Kaihatsu @@ -35845,6 +35924,9 @@ cm32l // mt32 // +@source:roland_pr100.cpp +pr100 // + @source:roland_r8.cpp r8 // r8m // @@ -36921,8 +37003,10 @@ outrundx // Deluxe version outrundxa // Deluxe version (ealier??) outrundxeh // hack +outrundxeha // hack outrundxj // 1986.09 Deluxe version (Japan, FD1089A) outruneh // hack +outruneha // hack outrunra // Revision A (added support for Standard and Mini cabinets) shangon // 1987 (unprotected) shangon1 // 1987 (FD1089B) @@ -37077,6 +37161,7 @@ goldnaxeu // (c) 1989 (FD1094) goldnaxeud // hwchamp // (c) 1987 (Unprotected) +hwchampa // (c) 1987 (Unprotected) hwchampj // (c) 1987 (FD1094) hwchampjd // isgsm // @@ -37279,6 +37364,7 @@ titlefu // 1993.04 Title Fight (US) @source:segasp.cpp +aminosan // 2010.?? Aminosan (satellite) bingogal // 2009.05 Bingo Galaxy (main) bingogals // 2009.05 Bingo Galaxy (satellite) brickppl // @@ -37488,6 +37574,7 @@ daioha // (C) 1993 Athena daiohc // (C) 1993 Athena (93111A PCB conversion) daiohp // (C) 1993 Athena (prototype) +daiohp2 // (C) 1993 Athena (prototype, earlier) downtown // UD-2 (c) 1989 + Romstar or Taito license (DSW) downtown2 // UD-2 (c) 1989 + Romstar or Taito license (DSW) downtownj // UD-2 (c) 1989 + Romstar or Taito license (DSW) @@ -38208,6 +38295,7 @@ kinstb // bootleg rushbets // bootleg sblast2b // bootleg +sblast2ba // bootleg venom // bootleg wldgunsb // bootleg @@ -38545,7 +38633,7 @@ conyteni // conyping // conyfght -karaokd2 +sstarkar @source:spg29x.cpp hyprscan // @@ -41055,11 +41143,10 @@ shtscore @source:trs80.cpp +eg3003 // ht108064 // Hradstechnika Szvetkezet HT-1080Z/64 ht1080z // Hradstechnika Szvetkezet HT-1080Z ht1080z2 // Hradstechnika Szvetkezet HT-1080Z Series II -lnw80 // LNW Research LNW-80 -radionic // Radionic sys80 // EACA System 80 sys80p // EACA System 80 trs80 // TRS-80 Model I - Level I BASIC @@ -41632,6 +41719,7 @@ hocrash // bootleg invds // 367-382 (c) 1979 Sega invho2 // 271-286 (c) 1979 Sega +invho2a // 326-341 (c) 1979 Sega invinco // 310-318 (c) 1979 Sega nsub // 268-275 (c) 1980 Sega pulsar // 790-805 (c) 1981 Sega diff -Nru mame-0.230+dfsg.1/src/mame/mess.flt mame-0.231+dfsg.1/src/mame/mess.flt --- mame-0.230+dfsg.1/src/mame/mess.flt 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/mess.flt 2021-04-27 15:32:05.000000000 +0000 @@ -108,6 +108,7 @@ babbage.cpp banctec.cpp bandai_design_master.cpp +basf7100.cpp basic52.cpp basssta.cpp bbc.cpp @@ -267,6 +268,7 @@ elektronmono.cpp elf.cpp elwro800.cpp +elzet80.cpp emax.cpp emma2.cpp emu2.cpp @@ -447,6 +449,7 @@ instruct.cpp inteladv.cpp intellec4.cpp +intellec8.cpp intellect02.cpp interpro.cpp intv.cpp @@ -478,6 +481,7 @@ juicebox.cpp juku.cpp junior.cpp +junior80.cpp juno106.cpp juno6.cpp jupace.cpp @@ -530,6 +534,7 @@ llc1.cpp llc2.cpp lms46.cpp +lnw80.cpp lola8a.cpp lviv.cpp lwriter.cpp @@ -551,6 +556,7 @@ magiceyes_pollux_vr3520f.cpp magnum.cpp mattelchess.cpp +max80.cpp mbc020.cpp mbc200.cpp mbc55x.cpp @@ -574,18 +580,23 @@ mekd4.cpp mekd5.cpp mephisto_academy.cpp +mephisto_amsterdam.cpp mephisto_berlin.cpp mephisto_brikett.cpp mephisto_glasgow.cpp +mephisto_milano.cpp mephisto_mm1.cpp mephisto_mm2.cpp mephisto_modena.cpp mephisto_modular.cpp mephisto_modular_tm.cpp mephisto_mondial.cpp +mephisto_mondial2.cpp mephisto_mondial68k.cpp mephisto_montec.cpp mephisto_polgar.cpp +mephisto_risc.cpp +mephisto_smondial.cpp meritum.cpp mes.cpp mfabfz.cpp @@ -825,6 +836,7 @@ qx10.cpp r9751.cpp radio86.cpp +radionic.cpp rainbow.cpp rambo.cpp ravens.cpp @@ -846,6 +858,7 @@ roland_jx8p.cpp roland_mc50.cpp roland_mt32.cpp +roland_pr100.cpp roland_r8.cpp roland_ra30.cpp roland_s10.cpp diff -Nru mame-0.230+dfsg.1/src/mame/video/battlane.cpp mame-0.231+dfsg.1/src/mame/video/battlane.cpp --- mame-0.230+dfsg.1/src/mame/video/battlane.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/video/battlane.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -9,35 +9,25 @@ #include "emu.h" #include "includes/battlane.h" -/* - Video control register - - 0x80 = low bit of blue component (taken when writing to palette) - 0x0e = Bitmap plane (bank?) select (0-7) - 0x01 = Scroll MSB -*/ void battlane_state::battlane_palette_w(offs_t offset, uint8_t data) { int r, g, b; int bit0, bit1, bit2; - /* red component */ - + // red component bit0 = (~data >> 0) & 0x01; bit1 = (~data >> 1) & 0x01; bit2 = (~data >> 2) & 0x01; r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; - /* green component */ - + // green component bit0 = (~data >> 3) & 0x01; bit1 = (~data >> 4) & 0x01; bit2 = (~data >> 5) & 0x01; g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2; - /* blue component */ - + // blue component bit0 = (~m_video_ctrl >> 7) & 0x01; bit1 = (~data >> 6) & 0x01; bit2 = (~data >> 7) & 0x01; @@ -59,7 +49,7 @@ void battlane_state::battlane_tileram_w(offs_t offset, uint8_t data) { m_tileram[offset] = data; - //m_bg_tilemap->mark_tile_dirty(offset); + m_bg_tilemap->mark_tile_dirty(offset & 0x3ff); } void battlane_state::battlane_spriteram_w(offs_t offset, uint8_t data) @@ -77,17 +67,25 @@ { if (data & 1 << i) { - m_screen_bitmap.pix(offset % 0x100, (offset / 0x100) * 8 + i) |= orval; + m_screen_bitmap.pix(offset & 0xff, (offset >> 8 ) * 8 + i) |= orval; } else { - m_screen_bitmap.pix(offset % 0x100, (offset / 0x100) * 8 + i) &= ~orval; + m_screen_bitmap.pix(offset & 0xff, (offset >> 8) * 8 + i) &= ~orval; } } } void battlane_state::battlane_video_ctrl_w(uint8_t data) { + /* + Video control register + + 0x80 = low bit of blue component (taken when writing to palette) + 0x0e = Bitmap plane (bank?) select (0-7) + 0x01 = Scroll MSB + */ + m_video_ctrl = data; } @@ -126,6 +124,7 @@ return (row & 0xf) * 16 + (col & 0xf) + (row & 0x10) * 32 + (col & 0x10) * 16; } + /*************************************************************************** Start the video hardware emulation. @@ -139,9 +138,9 @@ save_item(NAME(m_screen_bitmap)); } -void battlane_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ) +void battlane_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect) { - int offs, attr, code, color, sx, sy, flipx, flipy, dy; + int offs, attr, code, color, sx, sy, flipx, flipy; for (offs = 0; offs < 0x100; offs += 4) { @@ -164,13 +163,13 @@ if (attr & 0x01) { - color = (attr >> 3) & 0x01; + color = BIT(attr, 3); sx = m_spriteram[offs + 2]; sy = m_spriteram[offs]; - flipx = attr & 0x04; - flipy = attr & 0x02; + flipx = BIT(attr, 2); + flipy = BIT(attr, 1); if (!flip_screen()) { @@ -180,29 +179,28 @@ flipy = !flipy; } - - m_gfxdecode->gfx(0)->transpen(bitmap,cliprect, - code, - color, - flipx, flipy, - sx, sy, 0); - - if (attr & 0x10) /* Double Y direction */ + if (attr & 0x10) // Y Double { - dy = flipy ? 16 : -16; - - + for (int i = 0; i < 2; i++) m_gfxdecode->gfx(0)->transpen(bitmap,cliprect, - code + 1, + code + i, + color, + flipx, flipy, + sx, sy - (16 * (i ^ flipy)), 0); + } + else + { + m_gfxdecode->gfx(0)->transpen(bitmap,cliprect, + code, color, flipx, flipy, - sx, sy + dy, 0); + sx, sy, 0); } } } } -void battlane_state::draw_fg_bitmap( bitmap_ind16 &bitmap ) +void battlane_state::draw_fg_bitmap(bitmap_ind16 &bitmap, const rectangle &cliprect) { for (int y = 0; y < 32 * 8; y++) { @@ -212,9 +210,14 @@ if (data) { + int px = x, py = y; if (flip_screen()) - bitmap.pix(255 - y, 255 - x) = data; - else + { + px = 255 - px; + py = 255 - py; + } + + if (cliprect.contains(px, py)) bitmap.pix(y, x) = data; } } @@ -223,10 +226,8 @@ uint32_t battlane_state::screen_update_battlane(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - m_bg_tilemap->mark_all_dirty(); // HACK - - m_bg_tilemap->draw(screen, bitmap, cliprect, 0, 0); + m_bg_tilemap->draw(screen, bitmap, cliprect); draw_sprites(bitmap, cliprect); - draw_fg_bitmap(bitmap); + draw_fg_bitmap(bitmap, cliprect); return 0; } diff -Nru mame-0.230+dfsg.1/src/mame/video/bbusters.cpp mame-0.231+dfsg.1/src/mame/video/bbusters.cpp --- mame-0.230+dfsg.1/src/mame/video/bbusters.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/video/bbusters.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,297 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Bryan McPhail -/*************************************************************************** - - Emulation by Bryan McPhail, mish@tendril.co.uk - - Like NeoGeo sprite scale Y line selection is from an external rom. - - For 16 high sprites scale data starts at 0x3800 (9 scale levels) - For 32 high sprites scale data starts at 0x7000 (17 scale levels) - For 64 high sprites scale data starts at 0xa000 (33 scale levels) - For 128 pixel high sprites scale data starts 0xc000 (65 scale levels) - - 0xe000 and up - possibly X scale data? unconfirmed - - Sprites are also double buffered, and this seems to be performed - by having two complete sprite chips that are toggled per frame, rather - than just ram. Beast Busters has 4 sprite chips as it has two sprite - banks. - -***************************************************************************/ - -#include "emu.h" -#include "includes/bbusters.h" - - -/******************************************************************************/ - -TILE_GET_INFO_MEMBER(bbusters_state_base::get_tile_info) -{ - uint16_t tile = m_videoram[tile_index]; - - tileinfo.set(0,tile&0xfff,tile>>12,0); -} - -template -TILE_GET_INFO_MEMBER(bbusters_state_base::get_pf_tile_info) -{ - uint16_t tile = m_pf_data[Layer][tile_index]; - - tileinfo.set(Gfx,tile&0xfff,tile>>12,0); -} - -void bbusters_state_base::video_w(offs_t offset, uint16_t data, uint16_t mem_mask) -{ - COMBINE_DATA(&m_videoram[offset]); - m_fix_tilemap->mark_tile_dirty(offset); -} - -/******************************************************************************/ - -void bbusters_state_base::video_start() -{ - m_fix_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, FUNC(bbusters_state_base::get_tile_info)), TILEMAP_SCAN_ROWS, 8, 8, 32, 32); - m_fix_tilemap->set_transparent_pen(15); - - save_item(NAME(m_scale_line_count)); -} - -void bbusters_state::video_start() -{ - bbusters_state_base::video_start(); - - m_pf_tilemap[0] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, NAME((&bbusters_state::get_pf_tile_info<0,3>))), TILEMAP_SCAN_COLS, 16, 16, 128, 32); - m_pf_tilemap[1] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, NAME((&bbusters_state::get_pf_tile_info<1,4>))), TILEMAP_SCAN_COLS, 16, 16, 128, 32); - - m_pf_tilemap[0]->set_transparent_pen(15); -} - -void mechatt_state::video_start() -{ - bbusters_state_base::video_start(); - - m_pf_tilemap[0] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, NAME((&mechatt_state::get_pf_tile_info<0,2>))), TILEMAP_SCAN_COLS, 16, 16, 256, 32); - m_pf_tilemap[1] = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(*this, NAME((&mechatt_state::get_pf_tile_info<1,3>))), TILEMAP_SCAN_COLS, 16, 16, 256, 32); - - m_pf_tilemap[0]->set_transparent_pen(15); -} - -/******************************************************************************/ - -#define ADJUST_4x4 \ - if ((dx&0x10) && (dy&0x10)) code+=3; \ - else if (dy&0x10) code+=2; \ - else if (dx&0x10) code+=1 - -#define ADJUST_8x8 \ - if ((dx&0x20) && (dy&0x20)) code+=12; \ - else if (dy&0x20) code+=8; \ - else if (dx&0x20) code+=4 - -#define ADJUST_16x16 \ - if ((dx&0x40) && (dy&0x40)) code+=48; \ - else if (dy&0x40) code+=32; \ - else if (dx&0x40) code+=16 - -inline const uint8_t *bbusters_state_base::get_source_ptr(gfx_element *gfx, uint32_t sprite, int dx, int dy, int block) -{ - int code=0; - - /* Get a tile index from the x,y position in the block */ - switch (block) - { - case 0: /* 16 x 16 sprite */ - break; - - case 1: /* 32 x 32 block - 0 1 - 2 3 - */ - ADJUST_4x4; - break; - - case 2: /* 64 by 64 block - 0 1 4 5 - 2 3 6 7 - - 8 9 12 13 - 10 11 14 15 - */ - ADJUST_4x4; - ADJUST_8x8; - break; - - case 3: /* 128 by 128 block */ - ADJUST_4x4; - ADJUST_8x8; - ADJUST_16x16; - break; - } - - return gfx->get_data((sprite+code) % gfx->elements()) + ((dy%16) * gfx->rowbytes()); -} - -void bbusters_state_base::draw_block(screen_device &screen, bitmap_ind16 &dest,int x,int y,int size,int flipx,int flipy,uint32_t sprite,int color,int bank,int block,int priority) -{ - gfx_element *gfx = m_gfxdecode->gfx(bank); - pen_t pen_base = gfx->colorbase() + gfx->granularity() * (color % gfx->colors()); - uint32_t xinc=(m_scale_line_count * 0x10000 ) / size; - int dy=y; - int ex = m_scale_line_count; - - while (m_scale_line_count) { - if (dy>=16 && dy<240) { - uint16_t *const destline = &dest.pix(dy); - uint8_t *const priorityline = &screen.priority().pix(dy); - uint8_t srcline=*m_scale_table_ptr; - const uint8_t *srcptr=nullptr; - - if (!flipy) - srcline=size-srcline-1; - - int x_index; - if (flipx) - x_index=(ex-1)*0x10000; - else - x_index=0; - - for (int sx=0; sx priorityline[(x+(x_index>>16)) & 0x1ff]) - { - priorityline[(x+(x_index>>16)) & 0x1ff] = priority; - destline[(x+(x_index>>16)) & 0x1ff]= pen_base + pixel; - } - - if (flipx) - x_index-=xinc; - else - x_index+=xinc; - } - } - - dy++; - m_scale_table_ptr--; - m_scale_line_count--; - } -} - -void bbusters_state_base::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const uint16_t *source, int bank) -{ - int offs; - - // Sprites are stored in memory in back to front order. - // We draw them here front to back with a priority buffer in case any sprite - // with priority under a tilemap is later in the list than a sprite with - // above tilemap priority (which would cause a cut-out as only the top-most sprite - // in the line buffer goes to the priority mixer) - for (offs = 0x7fc;offs >=0 ;offs -= 4) { - int x,sprite,colour,fx,fy,scale; - int16_t y; - int block; - int priority; - - sprite=source[offs+1]; - colour=source[offs+0]; - - if ((colour==0xf7 || colour==0xffff || colour == 0x43f9) && (sprite==0x3fff || sprite==0xffff || sprite==0x0001)) - continue; // sprite 1, color 0x43f9 is the dead sprite in the top-right of the screen in Mechanized Attack's High Score table. - - y=source[offs+3]; - x=source[offs+2]; - if (x&0x200) x=-(0x100-(x&0xff)); - if (y > 320 || y < -256) y &= 0x1ff; // fix for bbusters ending & "Zing!" attract-mode fullscreen zombie & Helicopter on the 3rd rotation of the attractmode sequence - - /* - Source[0]: - 0xf000: Colour - 0x0800: FX - 0x0400: FY? - 0x0300: Block control - 0x0080: ? - 0x007f: scale - - Scale varies according to block size. - Block type 0: 0x70 = no scale, 0x7f == half size - 16 pixel sprite - Block type 1: 0x60 = no scale, 0x6f == half size - 32 pixel sprite - Block type 2: 0x40 = no scale, 0x5f == half size - 64 pixel sprite - Block type 3: 0x00 = no scale, 0x3f == half size - 128 pixel sprite - - */ - colour=colour>>12; - block=(source[offs+0]>>8)&0x3; - fy=source[offs+0]&0x400; - fx=source[offs+0]&0x800; - sprite=sprite&0x3fff; - - // Palettes 0xc-0xf confirmed to be behind tilemap on Beast Busters for 2nd sprite chip - priority = (bank==2) ? (((colour&0xc)==0xc) ? 1 : 4) : 8; - - switch ((source[offs+0]>>8)&0x3) { - case 0: - scale=source[offs+0]&0x7; - m_scale_table_ptr = m_scale_table+0x387f+(0x80*scale); - m_scale_line_count = 0x10-scale; - draw_block(screen,bitmap,x,y,16,fx,fy,sprite,colour,bank,block,priority); - break; - case 1: /* 2 x 2 */ - scale=source[offs+0]&0xf; - m_scale_table_ptr = m_scale_table+0x707f+(0x80*scale); - m_scale_line_count = 0x20-scale; - draw_block(screen,bitmap,x,y,32,fx,fy,sprite,colour,bank,block,priority); - break; - case 2: /* 64 by 64 block (2 x 2) x 2 */ - scale=source[offs+0]&0x1f; - m_scale_table_ptr = m_scale_table+0xa07f+(0x80*scale); - m_scale_line_count = 0x40-scale; - draw_block(screen,bitmap,x,y,64,fx,fy,sprite,colour,bank,block,priority); - break; - case 3: /* 2 x 2 x 2 x 2 */ - scale=source[offs+0]&0x3f; - m_scale_table_ptr = m_scale_table+0xc07f+(0x80*scale); - m_scale_line_count = 0x80-scale; - draw_block(screen,bitmap,x,y,128,fx,fy,sprite,colour,bank,block,priority); - break; - } - } -} - -/******************************************************************************/ - -uint32_t bbusters_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) -{ - screen.priority().fill(0, cliprect); - - m_pf_tilemap[0]->set_scrollx(0, m_pf_scroll_data[0][0]); - m_pf_tilemap[0]->set_scrolly(0, m_pf_scroll_data[0][1]); - m_pf_tilemap[1]->set_scrollx(0, m_pf_scroll_data[1][0]); - m_pf_tilemap[1]->set_scrolly(0, m_pf_scroll_data[1][1]); - - m_pf_tilemap[1]->draw(screen, bitmap, cliprect, 0, 0); - m_pf_tilemap[0]->draw(screen, bitmap, cliprect, 0, 2); - draw_sprites(screen, bitmap, m_spriteram[1]->buffer(), 2); - draw_sprites(screen, bitmap, m_spriteram[0]->buffer(), 1); - m_fix_tilemap->draw(screen, bitmap, cliprect, 0, 0); - - return 0; -} - -uint32_t mechatt_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) -{ - screen.priority().fill(0, cliprect); - - m_pf_tilemap[0]->set_scrollx(0, m_pf_scroll_data[0][0]); - m_pf_tilemap[0]->set_scrolly(0, m_pf_scroll_data[0][1]); - m_pf_tilemap[1]->set_scrollx(0, m_pf_scroll_data[1][0]); - m_pf_tilemap[1]->set_scrolly(0, m_pf_scroll_data[1][1]); - - m_pf_tilemap[1]->draw(screen, bitmap, cliprect, 0, 0); - m_pf_tilemap[0]->draw(screen, bitmap, cliprect, 0, 0); - draw_sprites(screen, bitmap, m_spriteram[0]->buffer(), 1); - m_fix_tilemap->draw(screen, bitmap, cliprect, 0, 0); - return 0; -} diff -Nru mame-0.230+dfsg.1/src/mame/video/c45.cpp mame-0.231+dfsg.1/src/mame/video/c45.cpp --- mame-0.230+dfsg.1/src/mame/video/c45.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/video/c45.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,267 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Phil Stroffolino, Aaron Giles, Alex W. Jackson -/**************************************************************************************************************/ -/* - Land Line Buffer - Land Generator - 0xf,0x7,0xe,0x6,0xd,0x5,0xc,0x4, - 0xb,0x3,0xa,0x2,0x9,0x1,0x8,0x0 - -*/ - -/* Preliminary! The road circuitry is identical for all the driving games. - * - * There are several chunks of RAM - * - * Road Tilemap: - * 0x00000..0x0ffff 64x512 tilemap - * - * Road Tiles: - * 0x10000..0x1f9ff 16x16x2bpp tiles - * - * - * Line Attributes: - * - * 0x1fa00..0x1fbdf xxx- ---- ---- ---- priority - * ---- xxxx xxxx xxxx xscroll - * - * 0x1fbfe horizontal adjust? - * 0x0017 - * 0x0018 (Final Lap3) - * - * 0x1fc00..0x1fddf selects line in source bitmap - * 0x1fdfe yscroll - * - * 0x1fe00..0x1ffdf ---- --xx xxxx xxxx zoomx - * 0x1fffd always 0xffff 0xffff? - */ - -#include "emu.h" -#include "video/c45.h" - - -//**************************************************************************** -// CONSTANTS -//**************************************************************************** - -// device type definition -DEFINE_DEVICE_TYPE(NAMCO_C45_ROAD, namco_c45_road_device, "namco_c45_road", "Namco C45 Road") - - -const gfx_layout namco_c45_road_device::tilelayout = -{ - ROAD_TILE_SIZE, ROAD_TILE_SIZE, - RGN_FRAC(1,1), - 2, - { 0, 8 }, - { STEP8(0, 1), STEP8(16, 1) }, - { STEP16(0, 32) }, - 0x200 // offset to next tile -}; - - -GFXDECODE_MEMBER( namco_c45_road_device::gfxinfo ) - GFXDECODE_DEVICE_RAM( "tileram", 0, tilelayout, 0xf00, 64 ) -GFXDECODE_END - - -void namco_c45_road_device::map(address_map &map) -{ - map(0x00000, 0x0ffff).ram().w(FUNC(namco_c45_road_device::tilemap_w)).share("tmapram"); - map(0x10000, 0x1f9ff).ram().w(FUNC(namco_c45_road_device::tileram_w)).share("tileram"); - map(0x1fa00, 0x1ffff).ram().share("lineram"); -} - - -//------------------------------------------------- -// namco_c45_road_device -- constructor -//------------------------------------------------- - -namco_c45_road_device::namco_c45_road_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : - device_t(mconfig, NAMCO_C45_ROAD, tag, owner, clock), - device_gfx_interface(mconfig, *this, gfxinfo), - device_memory_interface(mconfig, *this), - m_space_config("c45", ENDIANNESS_BIG, 16, 17, 0, address_map_constructor(FUNC(namco_c45_road_device::map), this)), - m_tmapram(*this, "tmapram"), - m_tileram(*this, "tileram"), - m_lineram(*this, "lineram"), - m_clut(*this, "clut"), - m_transparent_color(~0) -{ -} - - - -// We need these trampolines for now because uplift_submaps() -// can't deal with address maps that contain RAM. -// We need to explicitly use device_memory_interface::space() -// because read/write handlers have a parameter called 'space' - -//------------------------------------------------- -// read -- CPU read from our address space -//------------------------------------------------- - -uint16_t namco_c45_road_device::read(offs_t offset) -{ - return device_memory_interface::space().read_word(offset*2); -} - - -//------------------------------------------------- -// write -- CPU write to our address space -//------------------------------------------------- - -void namco_c45_road_device::write(offs_t offset, uint16_t data, uint16_t mem_mask) -{ - device_memory_interface::space().write_word(offset*2, data, mem_mask); -} - - -//------------------------------------------------- -// tilemap_w -- write to tilemap RAM -//------------------------------------------------- - -void namco_c45_road_device::tilemap_w(offs_t offset, uint16_t data, uint16_t mem_mask) -{ - COMBINE_DATA(&m_tmapram[offset]); - m_tilemap->mark_tile_dirty(offset); -} - - -//------------------------------------------------- -// tileram_w -- write to tile RAM -//------------------------------------------------- - -void namco_c45_road_device::tileram_w(offs_t offset, uint16_t data, uint16_t mem_mask) -{ - COMBINE_DATA(&m_tileram[offset]); - gfx(0)->mark_dirty(offset / WORDS_PER_ROAD_TILE); -} - - -//------------------------------------------------- -// draw -- render to the target bitmap -//------------------------------------------------- - -void namco_c45_road_device::draw(bitmap_ind16 &bitmap, const rectangle &cliprect, int pri) -{ - bitmap_ind16 &source_bitmap = m_tilemap->pixmap(); - unsigned yscroll = m_lineram[0x3fe/2]; - - // loop over scanlines - for (int y = cliprect.min_y; y <= cliprect.max_y; y++) - { - // skip if we are not the right priority - int screenx = m_lineram[y + 15]; - if (pri != ((screenx & 0xf000) >> 12)) - continue; - - // skip if we don't have a valid zoom factor - unsigned zoomx = m_lineram[0x400/2 + y + 15] & 0x3ff; - if (zoomx == 0) - continue; - - // skip if we don't have a valid source increment - unsigned sourcey = m_lineram[0x200/2 + y + 15] + yscroll; - const uint16_t *source_gfx = &source_bitmap.pix(sourcey & (ROAD_TILEMAP_HEIGHT - 1)); - unsigned dsourcex = (ROAD_TILEMAP_WIDTH << 16) / zoomx; - if (dsourcex == 0) - continue; - - // mask off priority bits and sign-extend - screenx &= 0x0fff; - if (screenx & 0x0800) - screenx |= ~0x7ff; - - // adjust the horizontal placement - screenx -= 64; // needs adjustment to left - - int numpixels = (44 * ROAD_TILE_SIZE << 16) / dsourcex; - unsigned sourcex = 0; - - // crop left - int clip_pixels = cliprect.min_x - screenx; - if (clip_pixels > 0) - { - numpixels -= clip_pixels; - sourcex += dsourcex*clip_pixels; - screenx = cliprect.min_x; - } - - // crop right - clip_pixels = (screenx + numpixels) - (cliprect.max_x + 1); - if (clip_pixels > 0) - numpixels -= clip_pixels; - - // TBA: work out palette mapping for Final Lap, Suzuka - - // BUT: support transparent color for Thunder Ceptor - uint16_t *dest = &bitmap.pix(y); - if (m_transparent_color != ~0) - { - while (numpixels-- > 0) - { - int pen = source_gfx[sourcex >> 16]; - if (palette().pen_indirect(pen) != m_transparent_color) - { - if (m_clut != nullptr) - pen = (pen & ~0xff) | m_clut[pen & 0xff]; - dest[screenx] = pen; - } - screenx++; - sourcex += dsourcex; - } - } - else - { - while (numpixels-- > 0) - { - int pen = source_gfx[sourcex >> 16]; - if (m_clut != nullptr) - pen = (pen & ~0xff) | m_clut[pen & 0xff]; - dest[screenx++] = pen; - sourcex += dsourcex; - } - } - } -} - - -//------------------------------------------------- -// device_start -- device startup -//------------------------------------------------- - -void namco_c45_road_device::device_start() -{ - // create a tilemap for the road - m_tilemap = &machine().tilemap().create(*this, tilemap_get_info_delegate(*this, FUNC(namco_c45_road_device::get_road_info)), - TILEMAP_SCAN_ROWS, ROAD_TILE_SIZE, ROAD_TILE_SIZE, ROAD_COLS, ROAD_ROWS); -} - - -//------------------------------------------------- -// memory_space_config - return a description of -// any address spaces owned by this device -//------------------------------------------------- - -device_memory_interface::space_config_vector namco_c45_road_device::memory_space_config() const -{ - return space_config_vector { - std::make_pair(0, &m_space_config) - }; -} - - -//------------------------------------------------- -// get_road_info -- tilemap callback -//------------------------------------------------- - -TILE_GET_INFO_MEMBER( namco_c45_road_device::get_road_info ) -{ - // ------xx xxxxxxxx tile number - // xxxxxx-- -------- palette select - uint16_t data = m_tmapram[tile_index]; - int tile = data & 0x3ff; - int color = data >> 10; - tileinfo.set(0, tile, color, 0); -} diff -Nru mame-0.230+dfsg.1/src/mame/video/c45.h mame-0.231+dfsg.1/src/mame/video/c45.h --- mame-0.230+dfsg.1/src/mame/video/c45.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/video/c45.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,69 +0,0 @@ -// license:BSD-3-Clause -// copyright-holders:Phil Stroffolino, Aaron Giles, Alex W. Jackson -#ifndef MAME_VIDEO_C45_H -#define MAME_VIDEO_C45_H - -#pragma once - -#include "tilemap.h" - - -//************************************************************************** -// TYPE DEFINITIONS -//************************************************************************** - - -// ======================> namco_c45_road_device - -class namco_c45_road_device : public device_t, public device_gfx_interface, public device_memory_interface -{ -public: - // construction/destruction - namco_c45_road_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - - void map(address_map &map); - - // read/write handlers - uint16_t read(offs_t offset); - void write(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - - // C45 Land (Road) Emulation - void set_transparent_color(pen_t pen) { m_transparent_color = pen; } - void draw(bitmap_ind16 &bitmap, const rectangle &cliprect, int pri); - -protected: - // device-level overrides - virtual void device_start() override; - virtual space_config_vector memory_space_config() const override; - -private: - // constants - static constexpr int ROAD_COLS = 64; - static constexpr int ROAD_ROWS = 512; - static constexpr int ROAD_TILE_SIZE = 16; - static constexpr int ROAD_TILEMAP_WIDTH = ROAD_TILE_SIZE * ROAD_COLS; - static constexpr int ROAD_TILEMAP_HEIGHT = ROAD_TILE_SIZE * ROAD_ROWS; - static constexpr int WORDS_PER_ROAD_TILE = 0x40/2; - static const gfx_layout tilelayout; - - // internal helpers - DECLARE_GFXDECODE_MEMBER(gfxinfo); - void tilemap_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - void tileram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - TILE_GET_INFO_MEMBER( get_road_info ); - - // internal state - address_space_config m_space_config; - required_shared_ptr m_tmapram; - required_shared_ptr m_tileram; - required_shared_ptr m_lineram; - optional_region_ptr m_clut; - tilemap_t * m_tilemap; - pen_t m_transparent_color; -}; - - -// device type definition -DECLARE_DEVICE_TYPE(NAMCO_C45_ROAD, namco_c45_road_device) - -#endif // MAME_VIDEO_C45_H diff -Nru mame-0.230+dfsg.1/src/mame/video/funkyjet.cpp mame-0.231+dfsg.1/src/mame/video/funkyjet.cpp --- mame-0.230+dfsg.1/src/mame/video/funkyjet.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/video/funkyjet.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -13,6 +13,22 @@ uint32_t funkyjet_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { + // Similar to chinatwn and tumblep, see video/supbtime.cpp + // + // This causes a 2 pixel gap on the left side of the first stage of all worlds in funkyjet + // but allows subsequent stages to be centered and avoids corruption on the world select + // screen after each world. It also correctly aligns the graphics in sotsugyo. + // + // The 2 pixel gap on the first stage of each world has been verified to occur on hardware. + // (it can easily be seen by moving your player sprite to the far left) + // + // it is unclear where this offset comes from, but real hardware videos confirm it is needed + + m_deco_tilegen->set_scrolldx(0, 0, 1, 1); + m_deco_tilegen->set_scrolldx(0, 1, 1, 1); + m_deco_tilegen->set_scrolldx(1, 0, 1, 1); + m_deco_tilegen->set_scrolldx(1, 1, 1, 1); + uint16_t flip = m_deco_tilegen->pf_control_r(0); flip_screen_set(BIT(flip, 7)); diff -Nru mame-0.230+dfsg.1/src/mame/video/laserbat.cpp mame-0.231+dfsg.1/src/mame/video/laserbat.cpp --- mame-0.230+dfsg.1/src/mame/video/laserbat.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/video/laserbat.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -157,18 +157,6 @@ } -void laserbat_state_base::video_start() -{ - // we render straight from ROM - m_gfx1 = memregion("gfx1")->base(); - m_gfx2 = memregion("gfx2")->base(); - - // start rendering scanlines - m_screen->register_screen_bitmap(m_bitmap); - m_scanline_timer->adjust(m_screen->time_until_pos(1, 0)); -} - - uint32_t laserbat_state_base::screen_update_laserbat(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { bool const flip_y = flip_screen_y(), flip_x = flip_screen_x(); @@ -281,16 +269,14 @@ for (int x = 0, px = x_offset; max_x >= px; x++) { // calculate area effects - // I have no idea where the magical x offset comes from but it's necessary - bool const right_half = bool((x + 0) & 0x80); - bool const eff1_cmp = right_half ? (uint8_t((x + 0) & 0x7f) < (eff1_val & 0x7f)) : (uint8_t((x + 0) & 0x7f) > (~eff1_val & 0x7f)); - bool const eff2_cmp = right_half ? (uint8_t((x + 0) & 0x7f) < (eff2_val & 0x7f)) : (uint8_t((x + 0) & 0x7f) > (~eff2_val & 0x7f)); + bool const right_half = bool(x & 0x80); + bool const eff1_cmp = right_half ? (uint8_t(x & 0x7f) < (eff1_val & 0x7f)) : (uint8_t(x & 0x7f) > (~eff1_val & 0x7f)); + bool const eff2_cmp = right_half ? ((uint8_t(x & 0x7f) | m_eff2_mask) < ((eff2_val & 0x7f) | m_eff2_mask)) : ((uint8_t(x & 0x7f) | m_eff2_mask) > ((~eff2_val & 0x7f) | m_eff2_mask)); bool const eff1 = m_abeff1 && (m_neg1 ? !eff1_cmp : eff1_cmp); bool const eff2 = m_abeff2 && (m_neg2 ? !eff2_cmp : eff2_cmp) && m_mpx_eff2_sh; // calculate shell point effect - // using the same magical offset as the area effects - bool const shell = m_abeff2 && (uint8_t((x + 0) & 0xff) == (eff2_val & 0xff)) && !m_mpx_eff2_sh; + bool const shell = m_abeff2 && ((uint8_t(x & 0xff) | m_eff2_mask) == ((eff2_val & 0xff) | m_eff2_mask)) && !m_mpx_eff2_sh; // set effect bits, and mix in PVI graphics while we're here uint16_t const effect_bits = (shell ? 0x0800 : 0x0000) | (eff1 ? 0x1000 : 0x0000) | (eff2 ? 0x2000 : 0x0000); @@ -305,7 +291,7 @@ } // render the TTL-generated sprite - // more magic offsets here I don't understand the source of + // magic offsets here I don't understand the source of if (m_nave) { int const sprite_row = y + y_offset - ((256 - m_wcov) & 0x0ff); @@ -313,7 +299,7 @@ { for (unsigned byte = 0, x = x_offset + (3 * ((256 - m_wcoh + 5) & 0x0ff)); 8 > byte; byte++) { - uint8_t bits = m_gfx2[((m_shp << 8) & 0x700) | ((sprite_row << 3) & 0x0f8) | (byte & 0x07)]; + uint8_t bits = m_gfx2[m_gfx2_base | ((m_shp << 8) & 0x700) | ((sprite_row << 3) & 0x0f8) | (byte & 0x07)]; for (unsigned pixel = 0; 4 > pixel; pixel++, bits <<= 2) { if (max_x >= x) row[x++] |= (bits >> 6) & 0x03; diff -Nru mame-0.230+dfsg.1/src/mame/video/megasys1.cpp mame-0.231+dfsg.1/src/mame/video/megasys1.cpp --- mame-0.230+dfsg.1/src/mame/video/megasys1.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/video/megasys1.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -195,6 +195,7 @@ #include "emu.h" #include "includes/megasys1.h" +#include "sound/ym2151.h" @@ -261,12 +262,15 @@ COMBINE_DATA(&m_screen_flag); if (m_audiocpu.found()) - { - if (m_screen_flag & 0x10) - m_audiocpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); - else - m_audiocpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); - } + m_audiocpu->set_input_line(INPUT_LINE_RESET, BIT(m_screen_flag, 4) ? ASSERT_LINE : CLEAR_LINE); + + ym2151_device *opm = dynamic_cast(m_ymsnd.target()); + if (opm != nullptr) + opm->reset_w(!BIT(m_screen_flag, 4)); + if (BIT(m_screen_flag, 4) && m_oki[0].found()) + m_oki[0]->reset(); + if (BIT(m_screen_flag, 4) && m_oki[1].found()) + m_oki[1]->reset(); } void megasys1_state::soundlatch_w(u16 data) diff -Nru mame-0.230+dfsg.1/src/mame/video/mmdisplay1.cpp mame-0.231+dfsg.1/src/mame/video/mmdisplay1.cpp --- mame-0.230+dfsg.1/src/mame/video/mmdisplay1.cpp 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/video/mmdisplay1.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,91 @@ +// license:BSD-3-Clause +// copyright-holders:hap +/********************************************************************** + +Hegener + Glaser Mephisto Display Module for modular chesscomputers, +the 1st version with a 4*7seg LCD. There is no LCD chip, it's handled +with 4 4015 dual shift registers. + +*********************************************************************/ + +#include "emu.h" +#include "mmdisplay1.h" + + +DEFINE_DEVICE_TYPE(MEPHISTO_DISPLAY_MODULE1, mephisto_display1_device, "mdisplay1", "Mephisto Display Module 1") + +//------------------------------------------------- +// constructor +//------------------------------------------------- + +mephisto_display1_device::mephisto_display1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : + device_t(mconfig, MEPHISTO_DISPLAY_MODULE1, tag, owner, clock), + m_digits(*this, "digit%u", 0U), + m_output_digit(*this) +{ } + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void mephisto_display1_device::device_start() +{ + m_output_digit.resolve(); + if (m_output_digit.isnull()) + m_digits.resolve(); + + // register for savestates + save_item(NAME(m_strobe)); + save_item(NAME(m_digit_idx)); + save_item(NAME(m_digit_data)); +} + + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void mephisto_display1_device::device_reset() +{ + m_strobe = 0; + m_digit_idx = 0; + + // clear display + for (int i = 0; i < 4; i++) + m_digit_data[i] = 0; + update_lcd(); +} + + +//------------------------------------------------- +// I/O handlers +//------------------------------------------------- + +void mephisto_display1_device::update_lcd() +{ + for (int i = 0; i < 4; i++) + { + if (m_output_digit.isnull()) + m_digits[i] = m_digit_data[i]; + else + m_output_digit(i, m_digit_data[i]); + } +} + +void mephisto_display1_device::strobe_w(int state) +{ + state = state ? 1 : 0; + + // update lcd on rising edge + if (state && ~m_strobe) + update_lcd(); + + m_strobe = state; +} + +void mephisto_display1_device::data_w(u8 data) +{ + m_digit_data[m_digit_idx] = m_strobe ? ~data : data; + m_digit_idx = (m_digit_idx + 1) & 3; +} diff -Nru mame-0.230+dfsg.1/src/mame/video/mmdisplay1.h mame-0.231+dfsg.1/src/mame/video/mmdisplay1.h --- mame-0.230+dfsg.1/src/mame/video/mmdisplay1.h 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/video/mmdisplay1.h 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,45 @@ +// license:BSD-3-Clause +// copyright-holders:hap +/********************************************************************** + + Mephisto Modular Display Module (1st version) + +*********************************************************************/ + +#ifndef MAME_VIDEO_MMDISPLAY1_H +#define MAME_VIDEO_MMDISPLAY1_H + +#pragma once + + +class mephisto_display1_device : public device_t +{ +public: + mephisto_display1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); + + // callback is optional, it will output to digitx when not used + auto output_digit() { return m_output_digit.bind(); } + + void strobe_w(int state); + void data_w(u8 data); + +protected: + // device-level overrides + virtual void device_start() override; + virtual void device_reset() override; + +private: + output_finder<4> m_digits; + devcb_write8 m_output_digit; + + void update_lcd(); + + int m_strobe = 0; + u8 m_digit_idx = 0; + u8 m_digit_data[4] = { 0, 0, 0, 0 }; +}; + + +DECLARE_DEVICE_TYPE(MEPHISTO_DISPLAY_MODULE1, mephisto_display1_device) + +#endif // MAME_VIDEO_MMDISPLAY1_H diff -Nru mame-0.230+dfsg.1/src/mame/video/mmdisplay2.cpp mame-0.231+dfsg.1/src/mame/video/mmdisplay2.cpp --- mame-0.230+dfsg.1/src/mame/video/mmdisplay2.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/video/mmdisplay2.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -6,23 +6,22 @@ the 2nd version with 2 LCD lines. The 16/32bit module also includes 8KB NVRAM, but that part is emulated in the driver. -TODO: -- add mmdisplay1.cpp, the one with shift registers and 4-digit lcd - *********************************************************************/ #include "emu.h" - #include "mmdisplay2.h" +#include "screen.h" +#include "speaker.h" + -DEFINE_DEVICE_TYPE(MEPHISTO_DISPLAY_MODULE2, mephisto_display_module2_device, "mdisplay2", "Mephisto Display Module 2") +DEFINE_DEVICE_TYPE(MEPHISTO_DISPLAY_MODULE2, mephisto_display2_device, "mdisplay2", "Mephisto Display Module 2") //------------------------------------------------- // constructor //------------------------------------------------- -mephisto_display_module2_device::mephisto_display_module2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +mephisto_display2_device::mephisto_display2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : device_t(mconfig, MEPHISTO_DISPLAY_MODULE2, tag, owner, clock) , m_lcd(*this, "hd44780") , m_dac(*this, "dac") @@ -34,7 +33,7 @@ // device_add_mconfig //------------------------------------------------- -void mephisto_display_module2_device::device_add_mconfig(machine_config &config) +void mephisto_display2_device::device_add_mconfig(machine_config &config) { /* video hardware */ screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_LCD)); @@ -45,25 +44,25 @@ screen.set_screen_update("hd44780", FUNC(hd44780_device::screen_update)); screen.set_palette("palette"); - PALETTE(config, "palette", FUNC(mephisto_display_module2_device::lcd_palette), 3); + PALETTE(config, "palette", FUNC(mephisto_display2_device::lcd_palette), 3); HD44780(config, m_lcd, 0); m_lcd->set_lcd_size(2, 16); - m_lcd->set_pixel_update_cb(FUNC(mephisto_display_module2_device::lcd_pixel_update)); + m_lcd->set_pixel_update_cb(FUNC(mephisto_display2_device::lcd_pixel_update)); /* sound hardware */ SPEAKER(config, "speaker").front_center(); DAC_2BIT_BINARY_WEIGHTED_ONES_COMPLEMENT(config, m_dac).add_route(ALL_OUTPUTS, "speaker", 0.25); } -void mephisto_display_module2_device::lcd_palette(palette_device &palette) const +void mephisto_display2_device::lcd_palette(palette_device &palette) const { palette.set_pen_color(0, rgb_t(0xff, 0xff, 0xff)); // background palette.set_pen_color(1, rgb_t(0x00, 0x00, 0x00)); // lcd pixel on palette.set_pen_color(2, rgb_t(0xe8, 0xe8, 0xe8)); // lcd pixel off } -HD44780_PIXEL_UPDATE(mephisto_display_module2_device::lcd_pixel_update) +HD44780_PIXEL_UPDATE(mephisto_display2_device::lcd_pixel_update) { if (x < 5 && y < 8 && line < 2 && pos < 16) bitmap.pix(line*9 + 1 + y, 1 + pos*6 + x) = state ? 1 : 2; @@ -74,7 +73,7 @@ // device_start - device-specific startup //------------------------------------------------- -void mephisto_display_module2_device::device_start() +void mephisto_display2_device::device_start() { save_item(NAME(m_latch)); save_item(NAME(m_ctrl)); @@ -85,7 +84,7 @@ // device_reset - device-specific reset //------------------------------------------------- -void mephisto_display_module2_device::device_reset() +void mephisto_display2_device::device_reset() { m_latch = 0; m_ctrl = 0; @@ -96,12 +95,12 @@ // I/O handlers //------------------------------------------------- -void mephisto_display_module2_device::latch_w(uint8_t data) +void mephisto_display2_device::latch_w(u8 data) { m_latch = data; } -void mephisto_display_module2_device::io_w(uint8_t data) +void mephisto_display2_device::io_w(u8 data) { if (BIT(data, 1) && !BIT(m_ctrl, 1)) m_lcd->write(BIT(data, 0), m_latch); diff -Nru mame-0.230+dfsg.1/src/mame/video/mmdisplay2.h mame-0.231+dfsg.1/src/mame/video/mmdisplay2.h --- mame-0.230+dfsg.1/src/mame/video/mmdisplay2.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/video/mmdisplay2.h 2021-04-27 15:32:05.000000000 +0000 @@ -2,7 +2,7 @@ // copyright-holders:Sandro Ronco /********************************************************************** - Mephisto Display Module (2nd version) + Mephisto Modular Display Module (2nd version) *********************************************************************/ @@ -11,26 +11,23 @@ #pragma once -#include "video/hd44780.h" #include "sound/dac.h" +#include "video/hd44780.h" #include "emupal.h" -#include "screen.h" -#include "speaker.h" - -// ======================> mephisto_display_module2_device -class mephisto_display_module2_device : public device_t +class mephisto_display2_device : public device_t { public: // construction/destruction - mephisto_display_module2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + mephisto_display2_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); hd44780_device *get() { return m_lcd; } - void latch_w(uint8_t data); - void io_w(uint8_t data); + void latch_w(u8 data); + void io_w(u8 data); + u8 io_r() { return m_ctrl; } protected: // device-level overrides @@ -39,18 +36,17 @@ virtual void device_add_mconfig(machine_config &config) override; private: - optional_device m_lcd; + required_device m_lcd; required_device m_dac; void lcd_palette(palette_device &palette) const; HD44780_PIXEL_UPDATE(lcd_pixel_update); - uint8_t m_latch; - uint8_t m_ctrl; + u8 m_latch = 0; + u8 m_ctrl = 0; }; -// device type definition -DECLARE_DEVICE_TYPE(MEPHISTO_DISPLAY_MODULE2, mephisto_display_module2_device) +DECLARE_DEVICE_TYPE(MEPHISTO_DISPLAY_MODULE2, mephisto_display2_device) #endif // MAME_VIDEO_MMDISPLAY2_H diff -Nru mame-0.230+dfsg.1/src/mame/video/namco_c116.h mame-0.231+dfsg.1/src/mame/video/namco_c116.h --- mame-0.230+dfsg.1/src/mame/video/namco_c116.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/video/namco_c116.h 2021-04-27 15:32:05.000000000 +0000 @@ -6,7 +6,6 @@ #pragma once - //*************************************************************************** // TYPE DEFINITIONS //*************************************************************************** @@ -18,7 +17,7 @@ { public: //construction/destruction - namco_c116_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + namco_c116_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); // configuration void enable_shadows() { m_enable_shadows = true; } @@ -44,7 +43,7 @@ std::vector m_ram_g; std::vector m_ram_b; uint16_t m_regs[8]; - bool m_enable_shadows; // are shadows enabled? + bool m_enable_shadows; // are shadows enabled? }; DECLARE_DEVICE_TYPE(NAMCO_C116, namco_c116_device) diff -Nru mame-0.230+dfsg.1/src/mame/video/namco_c123tmap.h mame-0.231+dfsg.1/src/mame/video/namco_c123tmap.h --- mame-0.230+dfsg.1/src/mame/video/namco_c123tmap.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/video/namco_c123tmap.h 2021-04-27 15:32:05.000000000 +0000 @@ -13,7 +13,7 @@ { public: // construction/destruction - namco_c123tmap_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + namco_c123tmap_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); void set_color_base(int color) { m_color_base = color; } void set_offset(int xoffs, int yoffs) diff -Nru mame-0.230+dfsg.1/src/mame/video/namco_c169roz.h mame-0.231+dfsg.1/src/mame/video/namco_c169roz.h --- mame-0.230+dfsg.1/src/mame/video/namco_c169roz.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/video/namco_c169roz.h 2021-04-27 15:32:05.000000000 +0000 @@ -13,7 +13,7 @@ { public: // construction/destruction - namco_c169roz_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + namco_c169roz_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); void set_is_namcofl(bool state) { m_is_namcofl = state; } void set_ram_words(uint32_t size) { m_ramsize = size; } diff -Nru mame-0.230+dfsg.1/src/mame/video/namco_c355spr.cpp mame-0.231+dfsg.1/src/mame/video/namco_c355spr.cpp --- mame-0.230+dfsg.1/src/mame/video/namco_c355spr.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/video/namco_c355spr.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -133,9 +133,6 @@ void namco_c355spr_device::copybitmap(bitmap_ind16 &dest_bmp, const rectangle &clip, u8 pri) { - device_palette_interface &palette = gfx(0)->palette(); - const int shadow_offset = (palette.shadows_enabled()) ? palette.entries() : 0; - const pen_t black = palette.black_pen(); if (m_palxor) { for (int y = clip.min_y; y <= clip.max_y; y++) @@ -186,10 +183,9 @@ { if ((c & 0xff) != 0xff) { - if (c == 0xffe && shadow_offset) + if (c == 0xffe) { - if (dest[x] != black) - dest[x] |= shadow_offset; + dest[x] |= 0x800; } else { @@ -206,8 +202,6 @@ void namco_c355spr_device::copybitmap(bitmap_rgb32 &dest_bmp, const rectangle &clip, u8 pri) { device_palette_interface &palette = gfx(0)->palette(); - const int shadow_offset = (palette.shadows_enabled()) ? palette.entries() : 0; - const pen_t black = palette.black_pen(); const pen_t *pal = &palette.pen(gfx(0)->colorbase()); if (m_palxor) { @@ -264,10 +258,9 @@ { if ((c & 0xff) != 0xff) { - if (c == 0xffe && shadow_offset) + if (c == 0xffe) { - if (srcrender[x] != black) - srcrender[x] |= shadow_offset; + srcrender[x] |= 0x800; } else { diff -Nru mame-0.230+dfsg.1/src/mame/video/namco_c355spr.h mame-0.231+dfsg.1/src/mame/video/namco_c355spr.h --- mame-0.230+dfsg.1/src/mame/video/namco_c355spr.h 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/video/namco_c355spr.h 2021-04-27 15:32:05.000000000 +0000 @@ -12,7 +12,7 @@ { public: // construction/destruction - namco_c355spr_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + namco_c355spr_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock = 0); void set_color_base(u16 base) { m_colbase = base; } void set_scroll_offsets(int x, int y) { m_scrolloffs[0] = x; m_scrolloffs[1] = y; } diff -Nru mame-0.230+dfsg.1/src/mame/video/namco_c45road.cpp mame-0.231+dfsg.1/src/mame/video/namco_c45road.cpp --- mame-0.230+dfsg.1/src/mame/video/namco_c45road.cpp 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/video/namco_c45road.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,267 @@ +// license:BSD-3-Clause +// copyright-holders:Phil Stroffolino, Aaron Giles, Alex W. Jackson +/**************************************************************************************************************/ +/* + Land Line Buffer + Land Generator + 0xf,0x7,0xe,0x6,0xd,0x5,0xc,0x4, + 0xb,0x3,0xa,0x2,0x9,0x1,0x8,0x0 + +*/ + +/* Preliminary! The road circuitry is identical for all the driving games. + * + * There are several chunks of RAM + * + * Road Tilemap: + * 0x00000..0x0ffff 64x512 tilemap + * + * Road Tiles: + * 0x10000..0x1f9ff 16x16x2bpp tiles + * + * + * Line Attributes: + * + * 0x1fa00..0x1fbdf xxx- ---- ---- ---- priority + * ---- xxxx xxxx xxxx xscroll + * + * 0x1fbfe horizontal adjust? + * 0x0017 + * 0x0018 (Final Lap3) + * + * 0x1fc00..0x1fddf selects line in source bitmap + * 0x1fdfe yscroll + * + * 0x1fe00..0x1ffdf ---- --xx xxxx xxxx zoomx + * 0x1fffd always 0xffff 0xffff? + */ + +#include "emu.h" +#include "video/namco_c45road.h" + + +//**************************************************************************** +// CONSTANTS +//**************************************************************************** + +// device type definition +DEFINE_DEVICE_TYPE(NAMCO_C45_ROAD, namco_c45_road_device, "namco_c45_road", "Namco C45 Road") + + +const gfx_layout namco_c45_road_device::tilelayout = +{ + ROAD_TILE_SIZE, ROAD_TILE_SIZE, + RGN_FRAC(1,1), + 2, + { 0, 8 }, + { STEP8(0, 1), STEP8(16, 1) }, + { STEP16(0, 32) }, + 0x200 // offset to next tile +}; + + +GFXDECODE_MEMBER( namco_c45_road_device::gfxinfo ) + GFXDECODE_DEVICE_RAM( "tileram", 0, tilelayout, 0xf00, 64 ) +GFXDECODE_END + + +void namco_c45_road_device::map(address_map &map) +{ + map(0x00000, 0x0ffff).ram().w(FUNC(namco_c45_road_device::tilemap_w)).share("tmapram"); + map(0x10000, 0x1f9ff).ram().w(FUNC(namco_c45_road_device::tileram_w)).share("tileram"); + map(0x1fa00, 0x1ffff).ram().share("lineram"); +} + + +//------------------------------------------------- +// namco_c45_road_device -- constructor +//------------------------------------------------- + +namco_c45_road_device::namco_c45_road_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + device_t(mconfig, NAMCO_C45_ROAD, tag, owner, clock), + device_gfx_interface(mconfig, *this, gfxinfo), + device_memory_interface(mconfig, *this), + m_space_config("c45", ENDIANNESS_BIG, 16, 17, 0, address_map_constructor(FUNC(namco_c45_road_device::map), this)), + m_tmapram(*this, "tmapram"), + m_tileram(*this, "tileram"), + m_lineram(*this, "lineram"), + m_clut(*this, "clut"), + m_transparent_color(~0) +{ +} + + + +// We need these trampolines for now because uplift_submaps() +// can't deal with address maps that contain RAM. +// We need to explicitly use device_memory_interface::space() +// because read/write handlers have a parameter called 'space' + +//------------------------------------------------- +// read -- CPU read from our address space +//------------------------------------------------- + +uint16_t namco_c45_road_device::read(offs_t offset) +{ + return device_memory_interface::space().read_word(offset*2); +} + + +//------------------------------------------------- +// write -- CPU write to our address space +//------------------------------------------------- + +void namco_c45_road_device::write(offs_t offset, uint16_t data, uint16_t mem_mask) +{ + device_memory_interface::space().write_word(offset*2, data, mem_mask); +} + + +//------------------------------------------------- +// tilemap_w -- write to tilemap RAM +//------------------------------------------------- + +void namco_c45_road_device::tilemap_w(offs_t offset, uint16_t data, uint16_t mem_mask) +{ + COMBINE_DATA(&m_tmapram[offset]); + m_tilemap->mark_tile_dirty(offset); +} + + +//------------------------------------------------- +// tileram_w -- write to tile RAM +//------------------------------------------------- + +void namco_c45_road_device::tileram_w(offs_t offset, uint16_t data, uint16_t mem_mask) +{ + COMBINE_DATA(&m_tileram[offset]); + gfx(0)->mark_dirty(offset / WORDS_PER_ROAD_TILE); +} + + +//------------------------------------------------- +// draw -- render to the target bitmap +//------------------------------------------------- + +void namco_c45_road_device::draw(bitmap_ind16 &bitmap, const rectangle &cliprect, int pri) +{ + bitmap_ind16 &source_bitmap = m_tilemap->pixmap(); + unsigned yscroll = m_lineram[0x3fe/2]; + + // loop over scanlines + for (int y = cliprect.min_y; y <= cliprect.max_y; y++) + { + // skip if we are not the right priority + int screenx = m_lineram[y + 15]; + if (pri != ((screenx & 0xf000) >> 12)) + continue; + + // skip if we don't have a valid zoom factor + unsigned zoomx = m_lineram[0x400/2 + y + 15] & 0x3ff; + if (zoomx == 0) + continue; + + // skip if we don't have a valid source increment + unsigned sourcey = m_lineram[0x200/2 + y + 15] + yscroll; + const uint16_t *source_gfx = &source_bitmap.pix(sourcey & (ROAD_TILEMAP_HEIGHT - 1)); + unsigned dsourcex = (ROAD_TILEMAP_WIDTH << 16) / zoomx; + if (dsourcex == 0) + continue; + + // mask off priority bits and sign-extend + screenx &= 0x0fff; + if (screenx & 0x0800) + screenx |= ~0x7ff; + + // adjust the horizontal placement + screenx -= 64; // needs adjustment to left + + int numpixels = (44 * ROAD_TILE_SIZE << 16) / dsourcex; + unsigned sourcex = 0; + + // crop left + int clip_pixels = cliprect.min_x - screenx; + if (clip_pixels > 0) + { + numpixels -= clip_pixels; + sourcex += dsourcex*clip_pixels; + screenx = cliprect.min_x; + } + + // crop right + clip_pixels = (screenx + numpixels) - (cliprect.max_x + 1); + if (clip_pixels > 0) + numpixels -= clip_pixels; + + // TBA: work out palette mapping for Final Lap, Suzuka + + // BUT: support transparent color for Thunder Ceptor + uint16_t *dest = &bitmap.pix(y); + if (m_transparent_color != ~0) + { + while (numpixels-- > 0) + { + int pen = source_gfx[sourcex >> 16]; + if (palette().pen_indirect(pen) != m_transparent_color) + { + if (m_clut != nullptr) + pen = (pen & ~0xff) | m_clut[pen & 0xff]; + dest[screenx] = pen; + } + screenx++; + sourcex += dsourcex; + } + } + else + { + while (numpixels-- > 0) + { + int pen = source_gfx[sourcex >> 16]; + if (m_clut != nullptr) + pen = (pen & ~0xff) | m_clut[pen & 0xff]; + dest[screenx++] = pen; + sourcex += dsourcex; + } + } + } +} + + +//------------------------------------------------- +// device_start -- device startup +//------------------------------------------------- + +void namco_c45_road_device::device_start() +{ + // create a tilemap for the road + m_tilemap = &machine().tilemap().create(*this, tilemap_get_info_delegate(*this, FUNC(namco_c45_road_device::get_road_info)), + TILEMAP_SCAN_ROWS, ROAD_TILE_SIZE, ROAD_TILE_SIZE, ROAD_COLS, ROAD_ROWS); +} + + +//------------------------------------------------- +// memory_space_config - return a description of +// any address spaces owned by this device +//------------------------------------------------- + +device_memory_interface::space_config_vector namco_c45_road_device::memory_space_config() const +{ + return space_config_vector { + std::make_pair(0, &m_space_config) + }; +} + + +//------------------------------------------------- +// get_road_info -- tilemap callback +//------------------------------------------------- + +TILE_GET_INFO_MEMBER( namco_c45_road_device::get_road_info ) +{ + // ------xx xxxxxxxx tile number + // xxxxxx-- -------- palette select + uint16_t data = m_tmapram[tile_index]; + int tile = data & 0x3ff; + int color = data >> 10; + tileinfo.set(0, tile, color, 0); +} diff -Nru mame-0.230+dfsg.1/src/mame/video/namco_c45road.h mame-0.231+dfsg.1/src/mame/video/namco_c45road.h --- mame-0.230+dfsg.1/src/mame/video/namco_c45road.h 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/video/namco_c45road.h 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,69 @@ +// license:BSD-3-Clause +// copyright-holders:Phil Stroffolino, Aaron Giles, Alex W. Jackson +#ifndef MAME_VIDEO_C45_H +#define MAME_VIDEO_C45_H + +#pragma once + +#include "tilemap.h" + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + + +// ======================> namco_c45_road_device + +class namco_c45_road_device : public device_t, public device_gfx_interface, public device_memory_interface +{ +public: + // construction/destruction + namco_c45_road_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); + + void map(address_map &map); + + // read/write handlers + uint16_t read(offs_t offset); + void write(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + + // C45 Land (Road) Emulation + void set_transparent_color(pen_t pen) { m_transparent_color = pen; } + void draw(bitmap_ind16 &bitmap, const rectangle &cliprect, int pri); + +protected: + // device-level overrides + virtual void device_start() override; + virtual space_config_vector memory_space_config() const override; + +private: + // constants + static constexpr int ROAD_COLS = 64; + static constexpr int ROAD_ROWS = 512; + static constexpr int ROAD_TILE_SIZE = 16; + static constexpr int ROAD_TILEMAP_WIDTH = ROAD_TILE_SIZE * ROAD_COLS; + static constexpr int ROAD_TILEMAP_HEIGHT = ROAD_TILE_SIZE * ROAD_ROWS; + static constexpr int WORDS_PER_ROAD_TILE = 0x40/2; + static const gfx_layout tilelayout; + + // internal helpers + DECLARE_GFXDECODE_MEMBER(gfxinfo); + void tilemap_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + void tileram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + TILE_GET_INFO_MEMBER( get_road_info ); + + // internal state + address_space_config m_space_config; + required_shared_ptr m_tmapram; + required_shared_ptr m_tileram; + required_shared_ptr m_lineram; + optional_region_ptr m_clut; + tilemap_t * m_tilemap; + pen_t m_transparent_color; +}; + + +// device type definition +DECLARE_DEVICE_TYPE(NAMCO_C45_ROAD, namco_c45_road_device) + +#endif // MAME_VIDEO_C45_H diff -Nru mame-0.230+dfsg.1/src/mame/video/namcos2_sprite.cpp mame-0.231+dfsg.1/src/mame/video/namcos2_sprite.cpp --- mame-0.230+dfsg.1/src/mame/video/namcos2_sprite.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/video/namcos2_sprite.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -50,7 +50,6 @@ if (gfx) { device_palette_interface &palette = gfx->palette(); - const int shadow_offset = (palette.shadows_enabled()) ? palette.entries() : 0; const pen_t *pal = &palette.pen(gfx->colorbase() + gfx->granularity() * (color % gfx->colors())); const u8 *source_base = gfx->get_data(code % gfx->elements()); const int sprite_screen_height = (scaley * gfx->height() + 0x8000) >> 16; @@ -160,9 +159,9 @@ { if (pri[x] <= zpos) { - if (color == 0xf && c==0xfe && shadow_offset) + if (color == 0xf && c == 0xfe) { - dest[x] |= shadow_offset; + dest[x] |= 0x800; } else { diff -Nru mame-0.230+dfsg.1/src/mame/video/raiden2.cpp mame-0.231+dfsg.1/src/mame/video/raiden2.cpp --- mame-0.230+dfsg.1/src/mame/video/raiden2.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/video/raiden2.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -18,22 +18,22 @@ if (offset < 0x800 / 2) { - background_w(offset, data, 0xffff); + background_w(offset, data); } else if (offset < 0x1000 /2) { offset -= 0x800 / 2; - foreground_w(offset, data, 0xffff); + foreground_w(offset, data); } else if (offset < 0x1800/2) { offset -= 0x1000 / 2; - midground_w(offset, data, 0xffff); + midground_w(offset, data); } else if (offset < 0x2800/2) { offset -= 0x1800 / 2; - text_w(offset, data, 0xffff); + text_w(offset, data); } } @@ -148,28 +148,40 @@ } -void raiden2_state::background_w(offs_t offset, u16 data, u16 mem_mask) +void raiden2_state::background_w(offs_t offset, u16 data) { - COMBINE_DATA(&m_back_data[offset]); - m_background_layer->mark_tile_dirty(offset); + if (m_back_data[offset] != data) + { + m_back_data[offset] = data; + m_background_layer->mark_tile_dirty(offset); + } } -void raiden2_state::midground_w(offs_t offset, u16 data, u16 mem_mask) +void raiden2_state::midground_w(offs_t offset, u16 data) { - COMBINE_DATA(&m_mid_data[offset]); - m_midground_layer->mark_tile_dirty(offset); + if (m_mid_data[offset] != data) + { + m_mid_data[offset] = data; + m_midground_layer->mark_tile_dirty(offset); + } } -void raiden2_state::foreground_w(offs_t offset, u16 data, u16 mem_mask) +void raiden2_state::foreground_w(offs_t offset, u16 data) { - COMBINE_DATA(&m_fore_data[offset]); - m_foreground_layer->mark_tile_dirty(offset); + if (m_fore_data[offset] != data) + { + m_fore_data[offset] = data; + m_foreground_layer->mark_tile_dirty(offset); + } } -void raiden2_state::text_w(offs_t offset, u16 data, u16 mem_mask) +void raiden2_state::text_w(offs_t offset, u16 data) { - COMBINE_DATA(&m_text_data[offset]); - m_text_layer->mark_tile_dirty(offset); + if (m_text_data[offset] != data) + { + m_text_data[offset] = data; + m_text_layer->mark_tile_dirty(offset); + } } void raiden2_state::tilemap_enable_w(offs_t offset, u16 data, u16 mem_mask) diff -Nru mame-0.230+dfsg.1/src/mame/video/seta001.cpp mame-0.231+dfsg.1/src/mame/video/seta001.cpp --- mame-0.230+dfsg.1/src/mame/video/seta001.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/video/seta001.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -32,6 +32,14 @@ This should implement device_video_interface, since it generates the vertical and horizontal blanking and sync signals from a master clock. + + understand sprite limits / how sprite 0 sometimes must be skipped, maybe + layers being enabled counts against limits? maybe some chip revisions skip + the first sprite? see note in device_start + + understand why we need offset kludges for some games, they can even differ + from layer to layer + */ #include "emu.h" diff -Nru mame-0.230+dfsg.1/src/mame/video/snk_bbusters_spr.cpp mame-0.231+dfsg.1/src/mame/video/snk_bbusters_spr.cpp --- mame-0.230+dfsg.1/src/mame/video/snk_bbusters_spr.cpp 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/video/snk_bbusters_spr.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,222 @@ +// license:BSD-3-Clause +// copyright-holders:Bryan McPhail +/*************************************************************************** + + Like NeoGeo sprite scale Y line selection is from an external rom. + + For 16 high sprites scale data starts at 0x3800 (9 scale levels) + For 32 high sprites scale data starts at 0x7000 (17 scale levels) + For 64 high sprites scale data starts at 0xa000 (33 scale levels) + For 128 pixel high sprites scale data starts 0xc000 (65 scale levels) + + 0xe000 and up - possibly X scale data? unconfirmed + + Sprites are also double buffered, and this seems to be performed + by having two complete sprite chips that are toggled per frame, rather + than just ram. Beast Busters has 4 sprite chips as it has two sprite + banks. + +***************************************************************************/ + +#include "emu.h" +#include "snk_bbusters_spr.h" + +DEFINE_DEVICE_TYPE(SNK_BBUSTERS_SPR, snk_bbusters_spr_device, "snk_bbusters_spr", "SNK Beast Busters Sprites") + +snk_bbusters_spr_device::snk_bbusters_spr_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : device_t(mconfig, SNK_BBUSTERS_SPR, tag, owner, clock) + , device_gfx_interface(mconfig, *this, gfxinfo) + , m_scale_table(*this, finder_base::DUMMY_TAG) + , m_spriteram(*this, finder_base::DUMMY_TAG) +{ +} + +static const gfx_layout spritelayout = +{ + 16,16, + RGN_FRAC(1,1), + 4, + { STEP4(0,4) }, + { + STEP4(0,1), STEP4(4*4,1), + STEP4(4*4*2*8,1), STEP4(4*4+4*4*2*8,1) + }, + { STEP8(0,4*4*2), STEP8(16*32,4*8) }, + 128*8 +}; + +GFXDECODE_MEMBER( snk_bbusters_spr_device::gfxinfo ) + GFXDECODE_DEVICE( DEVICE_SELF, 0, spritelayout, 0, 16*4 ) +GFXDECODE_END + + +void snk_bbusters_spr_device::device_start() +{ + save_item(NAME(m_scale_line_count)); +} + +template +inline int snk_bbusters_spr_device::adjust_spritecode(int dx, int dy, int code) +{ + if (dy & (0x10 << Size)) code += 2 << (Size * 2); + if (dx & (0x10 << Size)) code += 1 << (Size * 2); + return code; +} + +inline const uint8_t *snk_bbusters_spr_device::get_source_ptr(gfx_element *tilegfx, uint32_t sprite, int dx, int dy, int block) +{ + int code = 0; + + /* Get a tile index from the x,y position in the block */ + switch (block) + { + case 0: /* 16 x 16 sprite */ + break; + + case 1: /* 32 x 32 block + 0 1 + 2 3 + */ + code = adjust_spritecode<0>(dx, dy, code); // 4x4 + break; + + case 2: /* 64 by 64 block + 0 1 4 5 + 2 3 6 7 + + 8 9 12 13 + 10 11 14 15 + */ + code = adjust_spritecode<0>(dx, dy, code); // 4x4 + code = adjust_spritecode<1>(dx, dy, code); // 8x8 + break; + + case 3: /* 128 by 128 block */ + code = adjust_spritecode<0>(dx, dy, code); // 4x4 + code = adjust_spritecode<1>(dx, dy, code); // 8x8 + code = adjust_spritecode<2>(dx, dy, code); // 16x16 + break; + } + + return tilegfx->get_data((sprite + code) % tilegfx->elements()) + ((dy % 16) * tilegfx->rowbytes()); +} + +void snk_bbusters_spr_device::draw_block(bitmap_ind16 &dest, const rectangle &cliprect, int x, int y, int size, int flipx, int flipy, uint32_t sprite, int color, int block) +{ + // TODO: respect cliprect + + gfx_element *tilegfx = gfx(0); + pen_t pen_base = tilegfx->colorbase() + tilegfx->granularity() * (color % tilegfx->colors()); + uint32_t xinc = (m_scale_line_count * 0x10000) / size; + int dy = y; + int ex = m_scale_line_count; + + while (m_scale_line_count) + { + if (dy >= 16 && dy < 240) + { + uint16_t *const destline = &dest.pix(dy); + uint8_t srcline = *m_scale_table_ptr; + const uint8_t *srcptr = nullptr; + + if (!flipy) + srcline = size - srcline - 1; + + int x_index; + if (flipx) + x_index = (ex - 1) * 0x10000; + else + x_index = 0; + + for (int sx = 0; sx < size; sx++) + { + if ((sx % 16) == 0) + srcptr = get_source_ptr(tilegfx, sprite, sx, srcline, block); + + uint8_t pixel = *srcptr++; + if (pixel != 15) + destline[(x + (x_index >> 16)) & 0x1ff] = pen_base + pixel; + + if (flipx) + x_index -= xinc; + else + x_index += xinc; + } + } + + dy++; + m_scale_table_ptr--; + m_scale_line_count--; + } +} + +void snk_bbusters_spr_device::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect) +{ + const uint16_t *sprram = m_spriteram->buffer(); + + for (int offs = 0; offs < 0x800; offs += 4) + { + int sprite = sprram[offs + 1]; + int colour = sprram[offs + 0]; + + // TODO: get rid of this abominable hack without breaking anything + if ((colour == 0xf7 || colour == 0xffff || colour == 0x43f9) && (sprite == 0x3fff || sprite == 0xffff || sprite == 0x0001)) + continue; // sprite 1, color 0x43f9 is the dead sprite in the top-right of the screen in Mechanized Attack's High Score table. + + int16_t y = sprram[offs + 3]; + int x = sprram[offs + 2]; + if (x & 0x200) x = -(0x100 - (x & 0xff)); + if (y > 320 || y < -256) y &= 0x1ff; // fix for bbusters ending & "Zing!" attract-mode fullscreen zombie & Helicopter on the 3rd rotation of the attractmode sequence + + /* + sprram[0]: + 0xf000: Colour + 0x0800: FX + 0x0400: FY? + 0x0300: Block control + 0x0080: ? + 0x007f: scale + + Scale varies according to block size. + Block type 0: 0x70 = no scale, 0x7f == half size - 16 pixel sprite + Block type 1: 0x60 = no scale, 0x6f == half size - 32 pixel sprite + Block type 2: 0x40 = no scale, 0x5f == half size - 64 pixel sprite + Block type 3: 0x00 = no scale, 0x3f == half size - 128 pixel sprite + + */ + colour >>= 12; + int block = (sprram[offs + 0] >> 8) & 0x3; + int fy = sprram[offs + 0] & 0x400; + int fx = sprram[offs + 0] & 0x800; + sprite &= 0x3fff; + + int scale; + switch ((sprram[offs + 0] >> 8) & 0x3) + { + case 0: + scale = sprram[offs + 0] & 0x7; + m_scale_table_ptr = m_scale_table + 0x387f + (0x80 * scale); + m_scale_line_count = 0x10 - scale; + draw_block(bitmap, cliprect, x, y, 16, fx, fy, sprite, colour, block); + break; + case 1: /* 2 x 2 */ + scale = sprram[offs + 0] & 0xf; + m_scale_table_ptr = m_scale_table + 0x707f + (0x80 * scale); + m_scale_line_count = 0x20 - scale; + draw_block(bitmap, cliprect, x, y, 32, fx, fy, sprite, colour, block); + break; + case 2: /* 64 by 64 block (2 x 2) x 2 */ + scale = sprram[offs + 0] & 0x1f; + m_scale_table_ptr = m_scale_table + 0xa07f + (0x80 * scale); + m_scale_line_count = 0x40 - scale; + draw_block(bitmap, cliprect, x, y, 64, fx, fy, sprite, colour, block); + break; + case 3: /* 2 x 2 x 2 x 2 */ + scale = sprram[offs + 0] & 0x3f; + m_scale_table_ptr = m_scale_table + 0xc07f + (0x80 * scale); + m_scale_line_count = 0x80 - scale; + draw_block(bitmap, cliprect, x, y, 128, fx, fy, sprite, colour, block); + break; + } + } +} diff -Nru mame-0.230+dfsg.1/src/mame/video/snk_bbusters_spr.h mame-0.231+dfsg.1/src/mame/video/snk_bbusters_spr.h --- mame-0.230+dfsg.1/src/mame/video/snk_bbusters_spr.h 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/video/snk_bbusters_spr.h 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,42 @@ +// license:BSD-3-Clause +// copyright-holders:Bryan McPhail +#ifndef MAME_VIDEO_SNK_BBUSTERS_SPR_H +#define MAME_VIDEO_SNK_BBUSTERS_SPR_H + +#pragma once + +#include "video/bufsprite.h" + +class snk_bbusters_spr_device : public device_t, public device_gfx_interface +{ +public: + snk_bbusters_spr_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + + // configuration + template void set_spriteram_tag(T &&tag) { m_spriteram.set_tag(std::forward(tag)); } + template void set_scaletable_tag(T &&tag) { m_scale_table.set_tag(std::forward(tag)); } + + void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); + +protected: + virtual void device_start() override; + +private: + DECLARE_GFXDECODE_MEMBER(gfxinfo); + + const uint8_t *get_source_ptr(gfx_element *tilegfx, uint32_t sprite, int dx, int dy, int block); + void draw_block(bitmap_ind16 &dest, const rectangle &cliprect, int x, int y, int size, int flipx, int flipy, uint32_t sprite, int color, int block); + + template + static int adjust_spritecode(int dx, int dy, int code); + + const uint8_t *m_scale_table_ptr; + uint8_t m_scale_line_count; + + required_region_ptr m_scale_table; + required_device m_spriteram; +}; + +DECLARE_DEVICE_TYPE(SNK_BBUSTERS_SPR, snk_bbusters_spr_device) + +#endif // MAME_VIDEO_SNK_BBUSTERS_SPR_H diff -Nru mame-0.230+dfsg.1/src/mame/video/taito_z.cpp mame-0.231+dfsg.1/src/mame/video/taito_z.cpp --- mame-0.230+dfsg.1/src/mame/video/taito_z.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/video/taito_z.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -19,7 +19,6 @@ SPRITE READ AND WRITE HANDLERS ********************************************************/ - u16 taitoz_state::sci_spriteframe_r() { return (m_sci_spriteframe << 8); @@ -780,14 +779,37 @@ /* bits 1-3 n.c. */ - /* 3d glasses control */ + /* 3d scope control */ /* bit 4 = SCPSW */ - /* bit 5 = SCP */ + /* bit 5 = _SCP */ + if (~m_shutter_control & 2 && data & 0x20) + m_shutter_toggle = 0; + m_shutter_control = data >> 4 & 3; /* bits 6 and 7 select the road palette bank */ m_road_palbank = (data & 0xc0) >> 6; } +WRITE_LINE_MEMBER(taitoz_state::scope_vblank) +{ + if (state) + { + // it outputs 3d scope shutters at vblank + if (m_shutter_control & 1) + { + m_shutter_out[0] = m_shutter_toggle; + m_shutter_out[1] = m_shutter_toggle ^ 1; + } + else + { + m_shutter_out[0] = 0; + m_shutter_out[1] = 0; + } + + if (m_shutter_control & 2) + m_shutter_toggle ^= 1; + } +} u32 taitoz_state::screen_update_contcirc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { diff -Nru mame-0.230+dfsg.1/src/mame/video/thomson.cpp mame-0.231+dfsg.1/src/mame/video/thomson.cpp --- mame-0.230+dfsg.1/src/mame/video/thomson.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/video/thomson.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -172,7 +172,7 @@ int step = param; if ( m_thom_lightpen_cb ) - (this->*m_thom_lightpen_cb)( step ); + m_thom_lightpen_cb( step ); if ( step < m_thom_lightpen_nb ) m_thom_lightpen_timer->adjust(attotime::from_usec( 64 ), step + 1); @@ -902,10 +902,6 @@ /* -------------- misc --------------- */ -#define FLOP_STATE (m_thom_floppy_wcount ? 2 : m_thom_floppy_rcount ? 1 : 0) - - - void thomson_state::thom_set_mode_point( int point ) { assert( point >= 0 && point <= 1 ); @@ -915,24 +911,6 @@ -void thomson_state::thom_floppy_active( int write ) -{ - int fold = FLOP_STATE, fnew; - - /* stays up for a few frames */ - if ( write ) - m_thom_floppy_wcount = 25; - else - m_thom_floppy_rcount = 25; - - /* update icon */ - fnew = FLOP_STATE; - if ( fold != fnew ) - m_floppy_led = fnew; -} - - - /* -------------- main update function --------------- */ @@ -1065,22 +1043,12 @@ // rising edge if (state) { - int fnew, fold = FLOP_STATE; int i; uint16_t b = 0; struct thom_vsignal l = thom_get_lightpen_vsignal( 0, -1, 0 ); LOG("%f thom: video eof called\n", machine().time().as_double()); - /* floppy indicator count */ - if ( m_thom_floppy_wcount ) - m_thom_floppy_wcount--; - if ( m_thom_floppy_rcount ) - m_thom_floppy_rcount--; - fnew = FLOP_STATE; - if ( fnew != fold ) - m_floppy_led = fnew; - /* prepare state for next frame */ for ( i = 0; i <= THOM_TOTAL_HEIGHT; i++ ) { @@ -1194,12 +1162,6 @@ save_item(NAME(m_thom_mode_point)); m_vrambank->set_entry( 0 ); - m_thom_floppy_rcount = 0; - m_thom_floppy_wcount = 0; - save_item(NAME(m_thom_floppy_wcount)); - save_item(NAME(m_thom_floppy_rcount)); - m_floppy_led.resolve(); - m_caps_led.resolve(); m_thom_video_timer = machine().scheduler().timer_alloc(timer_expired_delegate()); @@ -1258,7 +1220,7 @@ thom_configure_palette(1.0 / 2.8, thom_pal_init, palette); } -void thomson_state::mo5_palette(palette_device &palette) +void mo5_state::mo5_palette(palette_device &palette) { LOG("thom: MO5 palette init called\n"); @@ -1334,7 +1296,7 @@ /* write to video memory through system space (always page 1) */ -void thomson_state::to8_sys_lo_w(offs_t offset, uint8_t data) +void to9_state::to8_sys_lo_w(offs_t offset, uint8_t data) { uint8_t* dst = m_thom_vram + offset + 0x6000; assert( offset < 0x2000 ); @@ -1347,7 +1309,7 @@ -void thomson_state::to8_sys_hi_w(offs_t offset, uint8_t data) +void to9_state::to8_sys_hi_w(offs_t offset, uint8_t data) { uint8_t* dst = m_thom_vram + offset + 0x4000; assert( offset < 0x2000 ); @@ -1361,7 +1323,7 @@ /* write to video memory through data space */ -void thomson_state::to8_data_lo_w(offs_t offset, uint8_t data) +void to9_state::to8_data_lo_w(offs_t offset, uint8_t data) { uint8_t* dst = m_thom_vram + ( ( offset + 0x4000 * m_to8_data_vpage + 0x2000 ) & m_ram->mask() ); assert( offset < 0x2000 ); @@ -1376,7 +1338,7 @@ -void thomson_state::to8_data_hi_w(offs_t offset, uint8_t data) +void to9_state::to8_data_hi_w(offs_t offset, uint8_t data) { uint8_t* dst = m_thom_vram + ( ( offset + 0x4000 * m_to8_data_vpage ) & m_ram->mask() ); assert( offset < 0x2000 ); @@ -1392,7 +1354,7 @@ /* write to video memory page through cartridge addresses space */ -void thomson_state::to8_vcart_w(offs_t offset, uint8_t data) +void to9_state::to8_vcart_w(offs_t offset, uint8_t data) { uint8_t* dst = m_thom_vram + ( ( offset + 0x4000 * m_to8_cart_vpage ) & m_ram->mask() ); assert( offset < 0x4000 ); @@ -1405,7 +1367,7 @@ m_thom_vmem_dirty[ (offset & 0x1fff) / 40 ] = true; } -void thomson_state::mo6_vcart_lo_w(offs_t offset, uint8_t data) +void mo6_state::mo6_vcart_lo_w(offs_t offset, uint8_t data) { uint8_t* dst = m_thom_vram + ( ( offset + 0x3000 + 0x4000 * m_to8_cart_vpage ) & m_ram->mask() ); assert( offset < 0x1000 ); @@ -1418,7 +1380,7 @@ m_thom_vmem_dirty[ (offset & 0x1fff) / 40 ] = true; } -void thomson_state::mo6_vcart_hi_w(offs_t offset, uint8_t data) +void mo6_state::mo6_vcart_hi_w(offs_t offset, uint8_t data) { uint8_t* dst = m_thom_vram + ( ( offset + 0x4000 * m_to8_cart_vpage ) & m_ram->mask() ); assert( offset < 0x3000 ); diff -Nru mame-0.230+dfsg.1/src/mame/video/trs80.cpp mame-0.231+dfsg.1/src/mame/video/trs80.cpp --- mame-0.230+dfsg.1/src/mame/video/trs80.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/video/trs80.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -140,240 +140,3 @@ return 0; } -/* 8-bit video, 64/80 characters per line = lnw80 */ -uint32_t trs80_state::screen_update_lnw80(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) -{ - static const uint16_t rows[] = { 0, 0x200, 0x100, 0x300, 1, 0x201, 0x101, 0x301 }; - uint16_t sy=0,ma=0; - uint8_t cols = BIT(m_lnw_mode, 1) ? 80 : 64; - - /* Although the OS can select 32-character mode, it is not supported by hardware */ - if (m_lnw_mode != m_size_store) - { - m_size_store = m_lnw_mode; - screen.set_visible_area(0, cols*6-1, 0, 16*12-1); - } - - uint8_t bg=7,fg=0; - if (BIT(m_lnw_mode, 1)) - { - bg = 0; - fg = 7; - } - - switch (m_lnw_mode & 0x06) - { - case 0: // MODE 0 - for (uint16_t y = 0; y < 16; y++) - { - for (uint16_t ra = 0; ra < 12; ra++) - { - uint16_t *p = &bitmap.pix(sy++); - - for (uint16_t x = ma; x < ma + 64; x++) - { - uint8_t chr = m_p_videoram[x]; - - if (chr & 0x80) - { - uint8_t gfxbit = (ra & 0x0c)>>1; - /* Display one line of a lores character (6 pixels) */ - *p++ = BIT(chr, gfxbit) ? fg : bg; - *p++ = BIT(chr, gfxbit) ? fg : bg; - *p++ = BIT(chr, gfxbit) ? fg : bg; - gfxbit++; - *p++ = BIT(chr, gfxbit) ? fg : bg; - *p++ = BIT(chr, gfxbit) ? fg : bg; - *p++ = BIT(chr, gfxbit) ? fg : bg; - } - else - { - /* get pattern of pixels for that character scanline */ - uint8_t gfx; - if (ra < 8) - gfx = m_p_chargen[(chr<<1) | rows[ra] ]; - else - gfx = 0; - - /* Display a scanline of a character (6 pixels) */ - *p++ = BIT(gfx, 2) ? fg : bg; - *p++ = BIT(gfx, 1) ? fg : bg; - *p++ = BIT(gfx, 6) ? fg : bg; - *p++ = BIT(gfx, 7) ? fg : bg; - *p++ = BIT(gfx, 5) ? fg : bg; - *p++ = BIT(gfx, 3) ? fg : bg; - } - } - } - ma+=64; - } - break; - - case 0x02: // MODE 1 - for (uint16_t y = 0; y < 0x400; y+=0x40) - { - for (uint16_t ra = 0; ra < 0x3000; ra+=0x400) - { - uint16_t *p = &bitmap.pix(sy++); - - for (uint16_t x = 0; x < 0x40; x++) - { - uint8_t gfx = m_p_gfxram[ y | x | ra]; - /* Display 6 pixels in normal region */ - *p++ = BIT(gfx, 0) ? fg : bg; - *p++ = BIT(gfx, 1) ? fg : bg; - *p++ = BIT(gfx, 2) ? fg : bg; - *p++ = BIT(gfx, 3) ? fg : bg; - *p++ = BIT(gfx, 4) ? fg : bg; - *p++ = BIT(gfx, 5) ? fg : bg; - } - - for (uint16_t x = 0; x < 0x10; x++) - { - uint8_t gfx = m_p_gfxram[ 0x3000 | x | (ra & 0xc00) | ((ra & 0x3000) >> 8)]; - /* Display 6 pixels in extended region */ - *p++ = BIT(gfx, 0) ? fg : bg; - *p++ = BIT(gfx, 1) ? fg : bg; - *p++ = BIT(gfx, 2) ? fg : bg; - *p++ = BIT(gfx, 3) ? fg : bg; - *p++ = BIT(gfx, 4) ? fg : bg; - *p++ = BIT(gfx, 5) ? fg : bg; - } - } - } - break; - - case 0x04: // MODE 2 - /* it seems the text video ram can have an effect in this mode, - not explained clearly, so not emulated */ - for (uint16_t y = 0; y < 0x400; y+=0x40) - { - for (uint16_t ra = 0; ra < 0x3000; ra+=0x400) - { - uint16_t *p = &bitmap.pix(sy++); - - for (uint16_t x = 0; x < 0x40; x++) - { - uint8_t gfx = m_p_gfxram[ y | x | ra]; - /* Display 6 pixels in normal region */ - fg = (gfx & 0x38) >> 3; - *p++ = fg; - *p++ = fg; - *p++ = fg; - fg = gfx & 0x07; - *p++ = fg; - *p++ = fg; - *p++ = fg; - } - } - } - break; - - case 0x06: // MODE 3 - /* the manual does not explain at all how colour is determined - for the extended area. Further, the background colour - is not mentioned anywhere. Black is assumed. */ - for (uint16_t y = 0; y < 0x400; y+=0x40) - { - for (uint16_t ra = 0; ra < 0x3000; ra+=0x400) - { - uint16_t *p = &bitmap.pix(sy++); - - for (uint16_t x = 0; x < 0x40; x++) - { - uint8_t gfx = m_p_gfxram[ y | x | ra]; - fg = (m_p_videoram[ x | y ] & 0x38) >> 3; - /* Display 6 pixels in normal region */ - *p++ = BIT(gfx, 0) ? fg : bg; - *p++ = BIT(gfx, 1) ? fg : bg; - *p++ = BIT(gfx, 2) ? fg : bg; - fg = m_p_videoram[ 0x3c00 | x | y ] & 0x07; - *p++ = BIT(gfx, 3) ? fg : bg; - *p++ = BIT(gfx, 4) ? fg : bg; - *p++ = BIT(gfx, 5) ? fg : bg; - } - - for (uint16_t x = 0; x < 0x10; x++) - { - uint8_t gfx = m_p_gfxram[ 0x3000 | x | (ra & 0xc00) | ((ra & 0x3000) >> 8)]; - fg = (m_p_gfxram[ 0x3c00 | x | y ] & 0x38) >> 3; - /* Display 6 pixels in extended region */ - *p++ = BIT(gfx, 0) ? fg : bg; - *p++ = BIT(gfx, 1) ? fg : bg; - *p++ = BIT(gfx, 2) ? fg : bg; - fg = m_p_gfxram[ 0x3c00 | x | y ] & 0x07; - *p++ = BIT(gfx, 3) ? fg : bg; - *p++ = BIT(gfx, 4) ? fg : bg; - *p++ = BIT(gfx, 5) ? fg : bg; - } - } - } - break; - } - return 0; -} - -/* lores characters are in the character generator. Each character is 8x16. */ -uint32_t trs80_state::screen_update_radionic(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) -{ - uint16_t sy=0,ma=0; - uint8_t cols = BIT(m_mode, 0) ? 32 : 64; - uint8_t skip = BIT(m_mode, 0) ? 2 : 1; - - if (m_mode != m_size_store) - { - m_size_store = m_mode; - screen.set_visible_area(0, cols*8-1, 0, 16*16-1); - } - - for (uint8_t y = 0; y < 16; y++) - { - for (uint8_t ra = 0; ra < 16; ra++) - { - uint16_t *p = &bitmap.pix(sy++); - - for (uint16_t x = ma; x < ma + 64; x+=skip) - { - uint8_t chr = m_p_videoram[x]; - - /* get pattern of pixels for that character scanline */ - uint8_t gfx = m_p_chargen[(chr<<3) | (ra & 7) | (ra & 8) << 8]; - - /* Display a scanline of a character (8 pixels) */ - *p++ = BIT(gfx, 0); - *p++ = BIT(gfx, 1); - *p++ = BIT(gfx, 2); - *p++ = BIT(gfx, 3); - *p++ = BIT(gfx, 4); - *p++ = BIT(gfx, 5); - *p++ = BIT(gfx, 6); - *p++ = BIT(gfx, 7); - } - } - ma+=64; - } - return 0; -} - - -/*************************************************************************** - Palettes -***************************************************************************/ - -/* Levels are unknown - guessing */ -static constexpr rgb_t lnw80_pens[] = -{ - { 220, 220, 220 }, // white - { 0, 175, 0 }, // green - { 200, 200, 0 }, // yellow - { 255, 0, 0 }, // red - { 255, 0, 255 }, // magenta - { 0, 0, 175 }, // blue - { 0, 255, 255 }, // cyan - { 0, 0, 0 } // black -}; - -void trs80_state::lnw80_palette(palette_device &palette) const -{ - palette.set_pen_colors(0, lnw80_pens); -} diff -Nru mame-0.230+dfsg.1/src/mame/video/trs80m3.cpp mame-0.231+dfsg.1/src/mame/video/trs80m3.cpp --- mame-0.230+dfsg.1/src/mame/video/trs80m3.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/video/trs80m3.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -45,7 +45,7 @@ uint8_t rows = BIT(m_mode, 2) ? 24 : 16; uint8_t lines = BIT(m_mode, 2) ? 10 : 12; uint8_t s_cols = cols; - uint8_t mask = BIT(m_mode, 5) ? 0xff : 0xbf; /* Select Japanese or extended chars */ + uint8_t mask = BIT(m_mode, 5) ? 0xbf : 0xff; /* Select Japanese or extended chars */ if (BIT(m_mode, 0)) { diff -Nru mame-0.230+dfsg.1/src/mame/video/tx1.cpp mame-0.231+dfsg.1/src/mame/video/tx1.cpp --- mame-0.230+dfsg.1/src/mame/video/tx1.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/mame/video/tx1.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -862,7 +862,7 @@ const uint8_t *const pixdata_rgn = &m_obj_tiles[0]; - for (offs = 0x0; offs <= 0x300; offs += 8) + for (offs = 0x0; offs < 0x300 / 2; offs += 8) { uint32_t x; uint32_t y; @@ -1067,7 +1067,6 @@ } /* Check if we've stepped into a new 8x8 tile */ - if ((((x_acc + x_step) >> (OBJ_FRAC + 3)) & TX1_MASK) != ((x_acc >> (OBJ_FRAC + 3)) & TX1_MASK)) { if (lasttile) @@ -2590,7 +2589,7 @@ x_stride = 256; } - for (offs = 0; offs <= 0x300; offs += 8) + for (offs = 0; offs < 0x300 / 2; offs += 8) { uint32_t x; uint32_t y; diff -Nru mame-0.230+dfsg.1/src/osd/mac/macmain.cpp mame-0.231+dfsg.1/src/osd/mac/macmain.cpp --- mame-0.230+dfsg.1/src/osd/mac/macmain.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/osd/mac/macmain.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -232,6 +232,7 @@ int bench = options().bench(); if (bench > 0) { + options().set_value(OPTION_SLEEP, false, OPTION_PRIORITY_MAXIMUM); options().set_value(OPTION_THROTTLE, false, OPTION_PRIORITY_MAXIMUM); options().set_value(OSDOPTION_SOUND, "none", OPTION_PRIORITY_MAXIMUM); options().set_value(OSDOPTION_VIDEO, "none", OPTION_PRIORITY_MAXIMUM); diff -Nru mame-0.230+dfsg.1/src/osd/modules/debugger/debuggdbstub.cpp mame-0.231+dfsg.1/src/osd/modules/debugger/debuggdbstub.cpp --- mame-0.230+dfsg.1/src/osd/modules/debugger/debuggdbstub.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/osd/modules/debugger/debuggdbstub.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -334,6 +334,72 @@ } }; + +//------------------------------------------------------------------------- +static const gdb_register_map gdb_register_map_score7 = +{ + "score7", + "mame.score7", + { + { "r0", "r0", true, TYPE_DATA_POINTER }, + { "r1", "r1", false, TYPE_INT }, + { "r2", "r2", false, TYPE_INT }, + { "r3", "r3", false, TYPE_INT }, + { "r4", "r4", false, TYPE_INT }, + { "r5", "r5", false, TYPE_INT }, + { "r6", "r6", false, TYPE_INT }, + { "r7", "r7", false, TYPE_INT }, + { "r8", "r8", false, TYPE_INT }, + { "r9", "r9", false, TYPE_INT }, + { "r10", "r10", false, TYPE_INT }, + { "r11", "r11", false, TYPE_INT }, + { "r12", "r12", false, TYPE_INT }, + { "r13", "r13", false, TYPE_INT }, + { "r14", "r14", false, TYPE_INT }, + { "r15", "r15", false, TYPE_INT }, + { "r16", "r16", false, TYPE_INT }, + { "r17", "r17", false, TYPE_INT }, + { "r18", "r18", false, TYPE_INT }, + { "r19", "r19", false, TYPE_INT }, + { "r20", "r20", false, TYPE_INT }, + { "r21", "r21", false, TYPE_INT }, + { "r22", "r22", false, TYPE_INT }, + { "r23", "r23", false, TYPE_INT }, + { "r24", "r24", false, TYPE_INT }, + { "r25", "r25", false, TYPE_INT }, + { "r26", "r26", false, TYPE_INT }, + { "r27", "r27", false, TYPE_INT }, + { "r28", "r28", false, TYPE_INT }, + { "r29", "r29", false, TYPE_INT }, + { "r30", "r30", false, TYPE_INT }, + { "r31", "r31", false, TYPE_INT }, + { "cr0", "PSR", false, TYPE_INT }, + { "cr1", "COND", false, TYPE_INT }, + { "cr2", "ECR", false, TYPE_INT }, + { "cr3", "EXCPVEC", false, TYPE_INT }, + { "cr4", "CCR", false, TYPE_INT }, + { "cr5", "EPC", false, TYPE_INT }, + { "cr6", "EMA", false, TYPE_INT }, + { "cr7", "TLBLOCK", false, TYPE_INT }, + { "cr8", "TLBPT", false, TYPE_INT }, + { "cr9", "PEADDR", false, TYPE_INT }, + { "cr10", "TLBRPT", false, TYPE_INT }, + { "cr11", "PEVN", false, TYPE_INT }, + { "cr12", "PECTX", false, TYPE_INT }, + { "cr15", "LIMPFN", false, TYPE_INT }, + { "cr16", "LDMPFN", false, TYPE_INT }, + { "cr18", "PREV", false, TYPE_INT }, + { "cr29", "DREG", false, TYPE_INT }, + { "PC", "PC", true, TYPE_CODE_POINTER }, // actually Debug exception program counter (DEPC) + { "cr31", "DSAVE", false, TYPE_INT }, + { "sr0", "COUNTER", false, TYPE_INT }, + { "sr1", "LDCR", false, TYPE_INT }, + { "sr2", "STCR", false, TYPE_INT }, + { "ceh", "CEH", false, TYPE_INT }, + { "cel", "CEL", false, TYPE_INT }, + } +}; + //------------------------------------------------------------------------- static const std::map gdb_register_maps = { { "i486", gdb_register_map_i486 }, @@ -346,6 +412,7 @@ { "m6502", gdb_register_map_m6502 }, { "n2a03", gdb_register_map_m6502 }, { "m6809", gdb_register_map_m6809 }, + { "score7", gdb_register_map_score7 }, }; //------------------------------------------------------------------------- diff -Nru mame-0.230+dfsg.1/src/osd/modules/lib/osdobj_common.cpp mame-0.231+dfsg.1/src/osd/modules/lib/osdobj_common.cpp --- mame-0.230+dfsg.1/src/osd/modules/lib/osdobj_common.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/osd/modules/lib/osdobj_common.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -129,7 +129,7 @@ { nullptr, nullptr, OPTION_HEADER, "OSD SOUND OPTIONS" }, { OSDOPTION_SOUND, OSDOPTVAL_AUTO, OPTION_STRING, "sound output method: " }, - { OSDOPTION_AUDIO_LATENCY "(1-5)", "2", OPTION_INTEGER, "set audio latency (increase to reduce glitches, decrease for responsiveness)" }, + { OSDOPTION_AUDIO_LATENCY "(0-5)", "2", OPTION_INTEGER, "set audio latency (increase to reduce glitches, decrease for responsiveness)" }, #ifndef NO_USE_PORTAUDIO { nullptr, nullptr, OPTION_HEADER, "PORTAUDIO OPTIONS" }, @@ -226,6 +226,9 @@ #ifndef NO_USE_PORTAUDIO REGISTER_MODULE(m_mod_man, SOUND_PORTAUDIO); #endif +#ifndef NO_USE_PULSEAUDIO + REGISTER_MODULE(m_mod_man, SOUND_PULSEAUDIO); +#endif REGISTER_MODULE(m_mod_man, SOUND_NONE); REGISTER_MODULE(m_mod_man, MONITOR_SDL); diff -Nru mame-0.230+dfsg.1/src/osd/modules/sound/direct_sound.cpp mame-0.231+dfsg.1/src/osd/modules/sound/direct_sound.cpp --- mame-0.230+dfsg.1/src/osd/modules/sound/direct_sound.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/osd/modules/sound/direct_sound.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -428,7 +428,8 @@ stream_format.nAvgBytesPerSec = stream_format.nSamplesPerSec * stream_format.nBlockAlign; // compute the buffer size based on the output sample rate - DWORD stream_buffer_size = stream_format.nSamplesPerSec * stream_format.nBlockAlign * m_audio_latency / 10; + int audio_latency = std::max(m_audio_latency, 1); + DWORD stream_buffer_size = stream_format.nSamplesPerSec * stream_format.nBlockAlign * audio_latency / 10; stream_buffer_size = std::max(DWORD(1024), (stream_buffer_size / 1024) * 1024); LOG(("stream_buffer_size = %u\n", (unsigned)stream_buffer_size)); diff -Nru mame-0.230+dfsg.1/src/osd/modules/sound/pulse_sound.cpp mame-0.231+dfsg.1/src/osd/modules/sound/pulse_sound.cpp --- mame-0.230+dfsg.1/src/osd/modules/sound/pulse_sound.cpp 1970-01-01 00:00:00.000000000 +0000 +++ mame-0.231+dfsg.1/src/osd/modules/sound/pulse_sound.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -0,0 +1,405 @@ +// license:BSD-3-Clause +// copyright-holders:Olivier Galibert +/*************************************************************************** + + pulse_sound.c + + PulseAudio interface. + +*******************************************************************c********/ + +#include "sound_module.h" +#include "modules/osdmodule.h" + +#ifndef NO_USE_PULSEAUDIO + +#define GNU_SOURCE +#include +#include +#include +#include +#include + +#include +#include + +#include "modules/lib/osdobj_common.h" + +class sound_pulse : public osd_module, public sound_module +{ +public: + sound_pulse() + : osd_module(OSD_SOUND_PROVIDER, "pulse"), sound_module() + { + } + virtual ~sound_pulse() { } + + virtual int init(osd_options const &options) override; + virtual void exit() override; + virtual void update_audio_stream(bool is_throttled, const s16 *buffer, int samples_this_frame) override; + virtual void set_mastervolume(int attenuation) override; + +private: + struct abuffer { + size_t cpos; + std::vector data; + }; + + std::thread *m_thread; + pa_mainloop *m_mainloop; + pa_context *m_context; + pa_stream *m_stream; + std::mutex m_mutex; + + std::vector m_buffers; + + u32 m_last_sample; + int m_new_volume_value; + bool m_setting_volume; + bool m_new_volume; + + int m_pipe_to_sub[2]; + int m_pipe_to_main[2]; + + static void i_volume_set_notify(pa_context *, int success, void *self); + void volume_set_notify(int success); + static void i_context_notify(pa_context *, void *self); + void context_notify(); + static void i_stream_notify(pa_stream *, void *self); + void stream_notify(); + static void i_stream_write_request(pa_stream *, size_t size, void *self); + void stream_write_request(size_t size); + + void make_pipes(); + + void mainloop_thread(); + void send_main(char c); + void send_sub(char c); + char get_main(); + char peek_main(); + void stop_mainloop(int err); + void generic_error(const char *msg); + void generic_pa_error(const char *msg, int err); +}; + +void sound_pulse::generic_error(const char *msg) +{ + perror(msg); + ::exit(1); +} + +void sound_pulse::generic_pa_error(const char *msg, int err) +{ + fprintf(stderr, "%s: %s\n", msg, pa_strerror(err)); + ::exit(1); +} + +char sound_pulse::peek_main() +{ + char c; + int err = read(m_pipe_to_main[0], &c, 1); + if(err != 1) { + if(err >= 0) { + fprintf(stderr, "peek_main: read returned %d, that's supposedly impossible\n", err); + ::exit(1); + } + if(errno == EAGAIN || errno == EWOULDBLOCK) { + // No data, no problem + return -1; + } + generic_error("peek_main: read"); + } + return c; +} + +char sound_pulse::get_main() +{ + pollfd pfds[1]; + pfds[0].fd = m_pipe_to_main[0]; + pfds[0].events = POLL_IN; + pfds[0].revents = 0; + int err = poll(pfds, 1, -1); + if(err < 0) + generic_error("get_main: poll"); + + char c; + err = read(m_pipe_to_main[0], &c, 1); + if(err != 1) { + if(err >= 0) { + fprintf(stderr, "get_main: read returned %d, that's supposedly impossible\n", err); + ::exit(1); + } + generic_error("get_main: read"); + } + return c; +} + +void sound_pulse::send_main(char c) +{ + int err = write(m_pipe_to_main[1], &c, 1); + if(err != 1) { + if(err >= 0) { + fprintf(stderr, "send_main: write returned %d, that's supposedly impossible\n", err); + ::exit(1); + } + if(errno == EAGAIN || errno == EWOULDBLOCK) { + fprintf(stderr, "send_main: write would block, pipe buffer overflowed, something is going very badly\n"); + ::exit(1); + } + generic_error("send_main: write"); + } +} + +void sound_pulse::send_sub(char c) +{ + int err = write(m_pipe_to_sub[1], &c, 1); + if(err != 1) { + if(err >= 0) { + fprintf(stderr, "send_sub: write returned %d, that's supposedly impossible\n", err); + ::exit(1); + } + if(errno == EAGAIN || errno == EWOULDBLOCK) { + fprintf(stderr, "send_sub: write would block, pipe buffer overflowed, something is going very badly\n"); + ::exit(1); + } + generic_error("send_sub: write"); + } +} + +void sound_pulse::make_pipes() +{ + if(pipe2(m_pipe_to_sub, O_NONBLOCK)) + generic_error("pipe2 pipe_to_sub"); + if(pipe2(m_pipe_to_main, O_NONBLOCK)) + generic_error("pipe2 pipe_to_main"); +} + +void sound_pulse::context_notify() +{ + pa_context_state state = pa_context_get_state(m_context); + if(state == PA_CONTEXT_READY) + send_main('r'); + + else if(state == PA_CONTEXT_FAILED) { + send_main('f'); + stop_mainloop(pa_context_errno(m_context)); + + } else if(state == PA_CONTEXT_TERMINATED) { + send_main('t'); + stop_mainloop(0); + } +} + +void sound_pulse::i_context_notify(pa_context *, void *self) +{ + static_cast(self)->context_notify(); +} + +void sound_pulse::stream_notify() +{ + pa_stream_state state = pa_stream_get_state(m_stream); + + if(state == PA_STREAM_READY) + send_main('r'); + + else if(state == PA_STREAM_FAILED) { + send_main('f'); + stop_mainloop(pa_context_errno(m_context)); + + } else if(state == PA_STREAM_TERMINATED) + pa_context_disconnect(m_context); +} + +void sound_pulse::i_stream_notify(pa_stream *, void *self) +{ + static_cast(self)->stream_notify(); +} + +void sound_pulse::stream_write_request(size_t size) +{ + if(size & 3) { + fprintf(stderr, "stream request with size %d not a multiple of 4.\n", int(size)); + ::exit(1); + } + size >>= 2; + + std::unique_lock lock(m_mutex); + while(size) { + if(m_buffers.empty()) { + std::vector zero(size, m_last_sample); + int err = pa_stream_write(m_stream, zero.data(), size << 2, nullptr, 0, PA_SEEK_RELATIVE); + if(err) + generic_pa_error("stream write", err); + size = 0; + + } else { + auto &buf = m_buffers[0]; + size_t csz = size; + size_t cur = buf.data.size() - buf.cpos; + if(csz > cur) + csz = cur; + int err = pa_stream_write(m_stream, buf.data.data() + buf.cpos, csz << 2, nullptr, 0, PA_SEEK_RELATIVE); + if(err) + generic_pa_error("stream write", err); + if(csz == cur) + m_buffers.erase(m_buffers.begin()); + else + buf.cpos += csz; + size -= csz; + } + } +} + +void sound_pulse::i_stream_write_request(pa_stream *, size_t size, void *self) +{ + static_cast(self)->stream_write_request(size); +} + + +void sound_pulse::mainloop_thread() +{ + int err = 0; + pa_mainloop_run(m_mainloop, &err); + if(err) + generic_pa_error("mainloop stopped", err); +} + +void sound_pulse::stop_mainloop(int err) +{ + pa_mainloop_quit(m_mainloop, err); +} + +int sound_pulse::init(osd_options const &options) +{ + m_last_sample = 0; + m_setting_volume = false; + m_new_volume = false; + m_new_volume_value = 0; + + m_mainloop = pa_mainloop_new(); + m_context = pa_context_new(pa_mainloop_get_api(m_mainloop), "MAME"); + pa_context_set_state_callback(m_context, i_context_notify, this); + int err = pa_context_connect(m_context, nullptr, PA_CONTEXT_NOFLAGS, nullptr); + + if(err) + generic_pa_error("pa_connect", err); + + make_pipes(); + m_thread = new std::thread(&sound_pulse::mainloop_thread, this); + + char res = get_main(); + + if(res != 'r') + return 1; + + pa_sample_spec ss; + ss.format = ENDIANNESS_NATIVE == ENDIANNESS_BIG ? PA_SAMPLE_S16BE : PA_SAMPLE_S16LE; + ss.rate = sample_rate(); + ss.channels = 2; + m_stream = pa_stream_new(m_context, "main output", &ss, nullptr); + pa_stream_set_state_callback(m_stream, i_stream_notify, this); + pa_stream_set_write_callback(m_stream, i_stream_write_request, this); + + pa_buffer_attr battr; + battr.fragsize = sample_rate() / 1000; + battr.maxlength = uint32_t(-1); + battr.minreq = sample_rate() / 1000; + battr.prebuf = uint32_t(-1); + battr.tlength = sample_rate() / 1000; + + err = pa_stream_connect_playback(m_stream, nullptr, &battr, PA_STREAM_ADJUST_LATENCY, nullptr, nullptr); + if(err) + generic_pa_error("stream connect playback", err); + + res = get_main(); + if(res != 'r') + return 1; + return 0; +} + +void sound_pulse::update_audio_stream(bool is_throttled, const s16 *buffer, int samples_this_frame) +{ + std::unique_lock lock(m_mutex); + m_buffers.resize(m_buffers.size() + 1); + auto &buf = m_buffers.back(); + buf.cpos = 0; + buf.data.resize(samples_this_frame); + memcpy(buf.data.data(), buffer, samples_this_frame*4); + m_last_sample = buf.data.back(); + + if(m_buffers.size() > 10) + // If there way too many buffers, drop some so only 10 are left (roughly 0.2s) + m_buffers.erase(m_buffers.begin(), m_buffers.begin() + m_buffers.size() - 10); + + else if(m_buffers.size() >= 5) + // If there are too many buffers, remove five sample per buffer + // to slowly resync to reduce latency (4 seconds to + // compensate one buffer roughly) + buf.cpos = 5; +} + +void sound_pulse::volume_set_notify(int success) +{ + std::unique_lock lock(m_mutex); + if(m_new_volume) { + m_new_volume = false; + pa_cvolume vol; + pa_cvolume_set(&vol, 2, pa_sw_volume_from_dB(m_new_volume_value)); + pa_context_set_sink_input_volume(m_context, pa_stream_get_index(m_stream), &vol, i_volume_set_notify, this); + } else + m_setting_volume = false; +} + +void sound_pulse::i_volume_set_notify(pa_context *, int success, void *self) +{ + static_cast(self)->volume_set_notify(success); +} + +void sound_pulse::set_mastervolume(int attenuation) +{ + if(!m_stream) + return; + + + std::unique_lock lock(m_mutex); + if(m_setting_volume) { + m_new_volume = true; + m_new_volume_value = attenuation; + } else { + m_setting_volume = true; + pa_cvolume vol; + pa_cvolume_set(&vol, 2, pa_sw_volume_from_dB(attenuation)); + pa_context_set_sink_input_volume(m_context, pa_stream_get_index(m_stream), &vol, i_volume_set_notify, this); + } +} + +void sound_pulse::exit() +{ + if(!m_stream) + return; + + pa_stream_disconnect(m_stream); + while(get_main() != 't') {} + pa_stream_unref(m_stream); + pa_context_unref(m_context); + m_thread->join(); + pa_mainloop_free(m_mainloop); + delete m_thread; + + close(m_pipe_to_sub[0]); + close(m_pipe_to_sub[1]); + close(m_pipe_to_main[0]); + close(m_pipe_to_main[1]); + + m_thread = nullptr; + m_mainloop = nullptr; + m_context = nullptr; + m_stream = nullptr; + m_buffers.clear(); +} + +#else + MODULE_NOT_SUPPORTED(sound_pulse, OSD_SOUND_PROVIDER, "pulse") +#endif + +MODULE_DEFINITION(SOUND_PULSEAUDIO, sound_pulse) diff -Nru mame-0.230+dfsg.1/src/osd/modules/sound/xaudio2_sound.cpp mame-0.231+dfsg.1/src/osd/modules/sound/xaudio2_sound.cpp --- mame-0.230+dfsg.1/src/osd/modules/sound/xaudio2_sound.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/osd/modules/sound/xaudio2_sound.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -479,7 +479,8 @@ { // Compute the buffer size // buffer size is equal to the bytes we need to hold in memory per X tenths of a second where X is audio_latency - float audio_latency_in_seconds = m_audio_latency / 10.0f; + int audio_latency = std::max(m_audio_latency, 1); + float audio_latency_in_seconds = audio_latency / 10.0f; uint32_t format_bytes_per_second = format.nSamplesPerSec * format.nBlockAlign; uint32_t total_buffer_size = format_bytes_per_second * audio_latency_in_seconds * RESAMPLE_TOLERANCE; diff -Nru mame-0.230+dfsg.1/src/osd/sdl/sdlmain.cpp mame-0.231+dfsg.1/src/osd/sdl/sdlmain.cpp --- mame-0.230+dfsg.1/src/osd/sdl/sdlmain.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/osd/sdl/sdlmain.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -420,6 +420,7 @@ int bench = options().bench(); if (bench > 0) { + options().set_value(OPTION_SLEEP, false, OPTION_PRIORITY_MAXIMUM); options().set_value(OPTION_THROTTLE, false, OPTION_PRIORITY_MAXIMUM); options().set_value(OSDOPTION_SOUND, "none", OPTION_PRIORITY_MAXIMUM); options().set_value(OSDOPTION_VIDEO, "none", OPTION_PRIORITY_MAXIMUM); diff -Nru mame-0.230+dfsg.1/src/osd/windows/winmain.cpp mame-0.231+dfsg.1/src/osd/windows/winmain.cpp --- mame-0.230+dfsg.1/src/osd/windows/winmain.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/osd/windows/winmain.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -529,6 +529,7 @@ int bench = options.bench(); if (bench > 0) { + options.set_value(OPTION_SLEEP, false, OPTION_PRIORITY_MAXIMUM); options.set_value(OPTION_THROTTLE, false, OPTION_PRIORITY_MAXIMUM); options.set_value(OSDOPTION_SOUND, "none", OPTION_PRIORITY_MAXIMUM); options.set_value(OSDOPTION_VIDEO, "none", OPTION_PRIORITY_MAXIMUM); diff -Nru mame-0.230+dfsg.1/src/tools/unidasm.cpp mame-0.231+dfsg.1/src/tools/unidasm.cpp --- mame-0.230+dfsg.1/src/tools/unidasm.cpp 2021-03-30 11:19:45.000000000 +0000 +++ mame-0.231+dfsg.1/src/tools/unidasm.cpp 2021-04-27 15:32:05.000000000 +0000 @@ -504,6 +504,7 @@ { "mm76", le, 0, []() -> util::disasm_interface * { return new mm76_disassembler; } }, { "mm78", le, 0, []() -> util::disasm_interface * { return new mm78_disassembler; } }, { "mn10200", le, 0, []() -> util::disasm_interface * { return new mn10200_disassembler; } }, + { "mn1860", be, 0, []() -> util::disasm_interface * { return new mn1860_disassembler; } }, { "mn1870", be, 0, []() -> util::disasm_interface * { return new mn1870_disassembler; } }, { "mn1880", be, 0, []() -> util::disasm_interface * { return new mn1880_disassembler; } }, { "msm65x2", le, 0, []() -> util::disasm_interface * { return new msm65x2_disassembler; } },