summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--docs/source/initialsetup/compilingmame.rst106
-rw-r--r--makefile275
-rw-r--r--scripts/genie.lua44
-rwxr-xr-xscripts/src/3rdparty.lua18
-rw-r--r--scripts/src/cpu.lua10
-rw-r--r--scripts/src/machine.lua12
-rw-r--r--scripts/toolchain.lua5
-rw-r--r--src/devices/bus/a2bus/mouse.cpp64
-rw-r--r--src/devices/cpu/drcuml.cpp20
-rw-r--r--src/devices/machine/pseudovia.cpp (renamed from src/mame/apple/pseudovia.cpp)0
-rw-r--r--src/devices/machine/pseudovia.h (renamed from src/mame/apple/pseudovia.h)6
-rw-r--r--src/emu/debug/debugcmd.cpp6
-rw-r--r--src/mame/apple/macpwrbk030.cpp2
-rw-r--r--src/mame/apple/msc.h3
-rw-r--r--src/mame/apple/rbv.h2
-rw-r--r--src/mame/apple/sonora.h3
-rw-r--r--src/mame/apple/v8.h3
-rw-r--r--src/mame/apple/vasp.h4
-rw-r--r--src/mame/mame.lst2
-rw-r--r--src/mame/nec/pc9801.cpp13
-rw-r--r--src/mame/nec/pc9821.cpp79
-rw-r--r--src/mame/nec/pc9821.h26
-rw-r--r--src/mame/nec/pc98_kbd.cpp14
-rw-r--r--src/mame/pinball/zac_2.cpp2
24 files changed, 306 insertions, 413 deletions
diff --git a/docs/source/initialsetup/compilingmame.rst b/docs/source/initialsetup/compilingmame.rst
index bd5a33f530a..a4559842b39 100644
--- a/docs/source/initialsetup/compilingmame.rst
+++ b/docs/source/initialsetup/compilingmame.rst
@@ -86,10 +86,11 @@ Microsoft Windows
MAME for Windows is built using the MSYS2 environment. You will need Windows 7
or later and a reasonably up-to-date MSYS2 installation. We strongly recommend
building MAME on a 64-bit system. Instructions may need to be adjusted for
-32-bit systems.
+32-bit systems. Building for 64-bit ARM (AArch64) requires a 64-bit ARM system
+running Windows 11 or later.
* A pre-packaged MSYS2 installation including the prerequisites for building
- MAME can be downloaded from the `MAME Build Tools
+ MAME for 64-bit x86-64 can be downloaded from the `MAME Build Tools
<http://mamedev.org/tools/>`_ page.
* After initial installation, you can update the MSYS2 environment using the
**pacman** (Arch package manage) command.
@@ -120,20 +121,7 @@ with MSYS2 and the **pacman** package manager.
verification for this repository (``SigLevel = Never``).
* Install packages necessary to build MAME. At the very least, you’ll need
``bash``, ``git``, ``make``.
-* For 64-bit builds you’ll need ``mingw-w64-x86_64-gcc`` and
- ``mingw-w64-x86_64-python``.
-* For 32-bit builds you’ll need ``mingw-w64-i686-gcc`` and
- ``mingw-w64-i686-python``.
* For debugging you may want to install ``gdb``.
-* To link using the LLVM linker (generally much faster than the GNU linker),
- you’ll need ``mingw-w64-x86_64-lld`` and ``mingw-w64-x86_64-libc++`` for
- 64-bit builds, or ``mingw-w64-i686-lld`` and ``mingw-w64-i686-libc++`` for
- 32-bit builds.
-* To build against the portable SDL interfaces, you’ll need
- ``mingw-w64-x86_64-SDL2`` and ``mingw-w64-x86_64-SDL2_ttf`` for 64-bit builds,
- or ``mingw-w64-i686-SDL2`` and ``mingw-w64-i686-SDL2_ttf`` for 32-bit builds.
-* To build the Qt debugger, you’ll need ``mingw-w64-x86_64-qt5`` for 64-bit
- builds, or ``mingw-w64-i686-qt5`` for 32-bit builds.
* To build the HTML user/developer documentation, you’ll need
``mingw-w64-x86_64-librsvg``, ``mingw-w64-x86_64-python-sphinx``,
``mingw-w64-x86_64-python-sphinx_rtd_theme`` and
@@ -146,12 +134,53 @@ with MSYS2 and the **pacman** package manager.
``mingw-w64-x86_64-texlive-latex-extra`` and
``mingw-w64-x86_64-texlive-fonts-recommended`` (or
``mingw-w64-i686-texlive-latex-extra`` and
- ``mingw-w64-i686-texlive-fonts-recommended`` for a 32-but MinGW environment).
+ ``mingw-w64-i686-texlive-fonts-recommended`` for a 32-bit MinGW environment).
* To generate API documentation from source, you’ll need ``doxygen``.
* If you plan to rebuild bgfx shaders and you want to rebuild the GLSL parser,
you’ll need ``bison``.
-* For 64-bit builds, open **MSYS2 MinGW 64-bit** from the start menu.
-* For 32-bit builds, open **MSYS2 MinGW 32-bit** from the start menu.
+
+The additional packages you’ll need depend on the CPU architecture you’re
+building for.
+
+**64-bit x86-64**
+
+* You’ll need ``mingw-w64-x86_64-gcc`` and ``mingw-w64-x86_64-python``.
+* To link using the LLVM linker (generally much faster than the GNU linker),
+ you’ll need ``mingw-w64-x86_64-lld``, ``mingw-w64-x86_64-llvm`` and
+ ``mingw-w64-x86_64-libc++``.
+* To build against the portable SDL interfaces, you’ll need
+ ``mingw-w64-x86_64-SDL2`` and ``mingw-w64-x86_64-SDL2_ttf``.
+* To build the Qt debugger, you’ll need ``mingw-w64-x86_64-qt5``.
+* Open the **mingw64.exe** helper from the **msys64** installation folder or the
+ **MSYS2 MinGW 64-bit** shortcut from the start menu to start a Bash shell
+ configured with the correct paths and environment variables.
+
+**32-bit x86**
+
+* You’ll need ``mingw-w64-i686-gcc`` and ``mingw-w64-i686-python``.
+* To link using the LLVM linker (generally much faster than the GNU linker),
+ you’ll need ``mingw-w64-i686-lld``, ``mingw-w64-i686-llvm`` and
+ ``mingw-w64-i686-libc++``.
+* To build against the portable SDL interfaces, you’ll need
+ ``mingw-w64-i686-SDL2`` and ``mingw-w64-i686-SDL2_ttf``.
+* To build the Qt debugger, you’ll need ``mingw-w64-i686-qt5``.
+* Open the **mingw32.exe** helper from the **msys64** installation folder or the
+ **MSYS2 MinGW 32-bit** shortcut from the start menu to start a Bash shell
+ configured with the correct paths and environment variables.
+
+**64-bit ARM (AArch64)**
+
+* You’ll need ``mingw-w64-clang-aarch64-clang``,
+ ``mingw-w64-clang-aarch64-python`` and ``mingw-w64-clang-aarch64-gcc-compat``.
+* To link using the LLVM linker (generally much faster than the GNU linker),
+ you’ll need ``mingw-w64-clang-aarch64-lld``, ``mingw-w64-clang-aarch64-llvm``
+ and ``mingw-w64-clang-aarch64-libc++``.
+* To build against the portable SDL interfaces, you’ll need
+ ``mingw-w64-clang-aarch64-SDL2`` and ``mingw-w64-clang-aarch64-SDL2_ttf``.
+* To build the Qt debugger, you’ll need ``mingw-w64-clang-aarch64-qt5``.
+* Open the **clangarm64.exe** helper from the **msys64** installation folder to
+ start a Bash shell configured with the correct paths and environment
+ variables.
For example you could use these commands to ensure you have the packages you
need to compile MAME, omitting the ones for configurations you don’t plan to
@@ -160,12 +189,18 @@ once::
pacman -Syu
pacman -S curl git make
- pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-libc++ mingw-w64-x86_64-lld mingw-w64-x86_64-python
+ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-python
+ pacman -S mingw-w64-x86_64-llvm mingw-w64-x86_64-libc++ mingw-w64-x86_64-lld
pacman -S mingw-w64-x86_64-SDL2 mingw-w64-x86_64-SDL2_ttf
pacman -S mingw-w64-x86_64-qt5
- pacman -S mingw-w64-i686-gcc mingw-w64-i686-libc++ mingw-w64-i686-lld mingw-w64-i686-python
+ pacman -S mingw-w64-i686-gcc mingw-w64-i686-python
+ pacman -S mingw-w64-i686-llvm mingw-w64-i686-libc++ mingw-w64-i686-lld
pacman -S mingw-w64-i686-SDL2 mingw-w64-i686-SDL2_ttf
pacman -S mingw-w64-i686-qt5
+ pacman -S mingw-w64-clang-aarch64-clang mingw-w64-clang-aarch64-python mingw-w64-clang-aarch64-gcc-compat
+ pacman -S mingw-w64-clang-aarch64-lld mingw-w64-clang-aarch64-llvm mingw-w64-clang-aarch64-libc++
+ pacman -S mingw-w64-clang-aarch64-SDL2 mingw-w64-clang-aarch64-SDL2_ttf
+ pacman -S mingw-w64-clang-aarch64-qt5
You could use these commands to install the current version of the
mame-essentials package and add the MAME package repository to your pacman
@@ -204,10 +239,10 @@ with helpful information on using the pacman package management tool.
The MSYS2 environment includes two kinds of tools: MSYS2 tools designed to work
in a UNIX-like environment on top of Windows, and MinGW tools designed to work
in a more Windows-like environment. The MSYS2 tools are installed in
-``/usr/bin`` while the MinGW tools are installed in ``/ming64/bin`` and/or
-``/mingw32/bin`` (relative to the MSYS2 installation directory). MSYS2 tools
-work best in an MSYS2 terminal, while MinGW tools work best in a Microsoft
-command prompt.
+``/usr/bin`` while the MinGW tools are installed in ``/ming64/bin``,
+``/mingw32/bin`` and/or ``/clangarm64/bin`` (relative to the MSYS2 installation
+directory). MSYS2 tools work best in an MSYS2 terminal, while MinGW tools work
+best in a Microsoft command prompt.
The most obvious symptom of this is that arrow keys don’t work in interactive
programs if you run them in the wrong kind of terminal. If you run MinGW gdb or
@@ -216,9 +251,9 @@ be possible to interrupt an attached program with gdb. Similarly it may be very
difficult to edit using MSYS2 vim in a Microsoft command prompt window.
MAME is built using the MinGW compilers, so the MinGW directories are included
-earlier in the ``PATH`` for the build environments. If you want to use an
-interactive MSYS2 program from an MSYS2 shell, you may need to type the absolute
-path to avoid using the MinGW equivalent instead.
+earlier in the ``PATH`` environment variable for the build environments. If you
+want to use an interactive MSYS2 program from an MSYS2 shell, you may need to
+type the absolute path to avoid using the MinGW equivalent instead.
MSYS2 gdb may have issues debugging MinGW programs like MAME. You may get
better results by installing the MinGW version of gdb and running it from a
@@ -227,16 +262,19 @@ Microsoft command prompt window to debug MAME.
GNU make supports both POSIX-style shells (e.g. bash) and the Microsoft cmd.exe
shell. One issue to be aware of when using the cmd.exe shell is that the
``copy`` command doesn’t provide a useful exit status, so file copy tasks can
-fail silently.
+fail silently. This may cause your build to appear to succeed while producing
+incorrect results.
It is not possible to cross-compile a 32-bit version of MAME using 64-bit MinGW
tools on Windows, the 32-bit MinGW tools must be used. This causes issues due
-to the size of MAME. It is not possible to link a full 32-bit MAME build
-including the SDL OS-dependent layer and the Qt debugger. GNU ld and lld will
-both run out of memory, leaving an output file that doesn’t work. It’s also
-impossible to make a 32-bit build with full local variable symbols. GCC may run
-out of memory, and certain source files may exceed the limit of 32,768 sections
-imposed by the PE/COFF object file format.
+to the size of MAME. It’s impossible to make a 32-bit build with full local
+variable symbols. GCC may run out of memory, and certain source files may
+exceed the limit of 32,768 sections imposed by the PE/COFF object file format.
+
+A complete build of MAME including line number symbols exceeds the size limit
+imposed by the PE file format and cannot be run. Workarounds include including
+only a subset of the systems supported by MAME or extracting symbols to a
+separate file and stripping excess symbols from the MAME executable.
.. _compiling-fedora:
diff --git a/makefile b/makefile
index 2094e226d3b..04287345595 100644
--- a/makefile
+++ b/makefile
@@ -140,114 +140,108 @@ MAKEPARAMS := -R
#
ifeq ($(OS),Windows_NT)
-OSARCH := $(shell wmic OS get OSArchitecture)
OS := windows
GENIEOS := windows
+
+ifeq ($(MSYSTEM),MINGW32)
+PLATFORM := x86
+else ifeq ($(MSYSTEM),MINGW64)
+PLATFORM := x86
+else ifeq ($(MSYSTEM),CLANGARM64)
+PLATFORM := arm64
+else # MSYSTEM
+OSARCH := $(shell wmic OS get OSArchitecture)
ifneq ($(findstring ARM 64-bit,$(OSARCH)),)
PLATFORM := arm64
-else
+else # OSARCH
PLATFORM := x86
-endif
-else
+endif # OSARCH
+endif # MSYSTEM
+
+else # Windows_NT
UNAME := $(shell uname -mps)
UNAME_M := $(shell uname -m)
UNAME_P := $(shell uname -p)
GENIEOS := linux
PLATFORM := unknown
+
ifneq ($(filter x86_64,$(UNAME_P)),)
PLATFORM := x86
-endif
-ifneq ($(filter %86,$(UNAME_P)),)
+else ifneq ($(filter %86,$(UNAME_P)),)
PLATFORM := x86
endif
+
ifneq ($(filter alpha,$(UNAME_M)),)
PLATFORM := alpha
-endif
-ifneq ($(filter alpha,$(UNAME_P)),)
+else ifneq ($(filter alpha,$(UNAME_P)),)
PLATFORM := alpha
-endif
-ifneq ($(filter arm%,$(UNAME_M)),)
-PLATFORM := arm
-endif
-ifneq ($(filter arm%,$(UNAME_P)),)
-PLATFORM := arm
-endif
-ifneq ($(filter aarch64%,$(UNAME_M)),)
+else ifneq ($(filter aarch64%,$(UNAME_M)),)
PLATFORM := arm64
-endif
-ifneq ($(filter arm64%,$(UNAME_M)),)
+else ifneq ($(filter aarch64%,$(UNAME_P)),)
PLATFORM := arm64
-endif
-ifneq ($(filter aarch64%,$(UNAME_P)),)
+else ifneq ($(filter arm64%,$(UNAME_M)),)
PLATFORM := arm64
-endif
-ifneq ($(filter powerpc,$(UNAME_P)),)
+else ifneq ($(filter arm%,$(UNAME_M)),)
+PLATFORM := arm
+else ifneq ($(filter arm%,$(UNAME_P)),)
+PLATFORM := arm
+else ifneq ($(filter powerpc,$(UNAME_P)),)
PLATFORM := powerpc
-endif
-ifneq ($(filter riscv64%,$(UNAME_M)),)
+else ifneq ($(filter riscv64%,$(UNAME_M)),)
PLATFORM := riscv64
-endif
-ifneq ($(filter riscv64%,$(UNAME_P)),)
+else ifneq ($(filter riscv64%,$(UNAME_P)),)
PLATFORM := riscv64
-endif
-ifneq ($(filter mips64%,$(UNAME_M)),)
+else ifneq ($(filter mips64%,$(UNAME_M)),)
ifeq ($(shell getconf LONG_BIT),64)
PLATFORM := mips64
endif
endif
+
ifeq ($(firstword $(filter Linux,$(UNAME))),Linux)
OS := linux
-endif
-ifeq ($(firstword $(filter Solaris,$(UNAME))),Solaris)
+else ifeq ($(firstword $(filter Solaris,$(UNAME))),Solaris)
OS := solaris
GENIEOS := solaris
-endif
-ifeq ($(firstword $(filter SunOS,$(UNAME))),SunOS)
+else ifeq ($(firstword $(filter SunOS,$(UNAME))),SunOS)
OS := solaris
GENIEOS := solaris
-endif
-ifeq ($(firstword $(filter FreeBSD,$(UNAME))),FreeBSD)
+else ifeq ($(firstword $(filter FreeBSD,$(UNAME))),FreeBSD)
OS := freebsd
GENIEOS := bsd
-endif
-ifeq ($(firstword $(filter GNU/kFreeBSD,$(UNAME))),GNU/kFreeBSD)
+else ifeq ($(firstword $(filter GNU/kFreeBSD,$(UNAME))),GNU/kFreeBSD)
OS := freebsd
GENIEOS := freebsd
-endif
-ifeq ($(firstword $(filter NetBSD,$(UNAME))),NetBSD)
+else ifeq ($(firstword $(filter NetBSD,$(UNAME))),NetBSD)
OS := netbsd
GENIEOS := freebsd
-endif
-ifeq ($(firstword $(filter OpenBSD,$(UNAME))),OpenBSD)
+else ifeq ($(firstword $(filter OpenBSD,$(UNAME))),OpenBSD)
OS := openbsd
GENIEOS := freebsd
-endif
-ifeq ($(firstword $(filter Darwin,$(UNAME))),Darwin)
+else ifeq ($(firstword $(filter Darwin,$(UNAME))),Darwin)
OS := macosx
GENIEOS := darwin
-endif
-ifeq ($(firstword $(filter Haiku,$(UNAME))),Haiku)
+else ifeq ($(firstword $(filter Haiku,$(UNAME))),Haiku)
OS := haiku
endif
+
ifndef OS
$(error Unable to detect OS from uname -a: $(UNAME))
endif
-endif
+
+endif # Windows_NT
ifdef MSYSTEM
MINGW := $(MINGW_PREFIX)
ifeq ($(MSYSTEM),MINGW32)
MINGW32 := $(MINGW_PREFIX)
-endif
-ifeq ($(MSYSTEM),MINGW64)
+else ifeq ($(MSYSTEM),MINGW64)
MINGW64 := $(MINGW_PREFIX)
-endif
-ifeq ($(MSYSTEM),CLANGARM64)
+else ifeq ($(MSYSTEM),CLANGARM64)
MINGW64 := $(MINGW_PREFIX)
-endif
+endif # MSYSTEM
ifndef TOOLCHAIN
TOOLCHAIN := $(MINGW_PREFIX)/bin/
-endif
+endif # TOOLCHAIN
else # MSYSTEM
MINGW :=
ifdef MINGW64
@@ -308,60 +302,48 @@ ifndef TARGETOS
ifeq ($(OS),windows)
TARGETOS := windows
-ifeq ($(PROCESSOR_ARCHITECTURE),AMD64)
+
+ifeq ($(MSYSTEM),MINGW32)
+ARCHITECTURE = _x86
+else ifeq ($(MSYSTEM),MINGW64)
ARCHITECTURE := _x64
-endif
-ifeq ($(PROCESSOR_ARCHITECTURE),x86)
+else ifeq ($(MSYSTEM),CLANGARM64)
ARCHITECTURE := _x64
+else ifeq ($(PROCESSOR_ARCHITECTURE),AMD64)
+ARCHITECTURE := _x64
+else ifeq ($(PROCESSOR_ARCHITECTURE),x86)
ifeq ($(PROCESSOR_ARCHITEW6432),AMD64)
-else
+ARCHITECTURE := _x64
+else # PROCESSOR_ARCHITEW6432
ARCHITECTURE := _x86
+endif # PROCESSOR_ARCHITEW6432
endif
-endif
-else
+
+else # windows
UNAME := $(shell uname -mps)
TARGETOS := $(OS)
-#-------------------------------------------------
-# determine the whether -m32, -m64 or nothing
-# should be passed to gcc when building genie
-#-------------------------------------------------
-
-ifeq ($(ARCHITECTURE),_x86)
-MPARAM := -m32
-else
-ifeq ($(ARCHITECTURE),_x64)
-MPARAM := -m64
-else
-MPARAM :=
-endif
-endif
-
ARCHITECTURE := _x86
ifeq ($(firstword $(filter x86_64,$(UNAME))),x86_64)
ARCHITECTURE := _x64
-endif
-ifeq ($(firstword $(filter amd64,$(UNAME))),amd64)
+else ifeq ($(firstword $(filter amd64,$(UNAME))),amd64)
ARCHITECTURE := _x64
-endif
-ifeq ($(firstword $(filter ppc64,$(UNAME))),ppc64)
+else ifeq ($(firstword $(filter ppc64le,$(UNAME))),ppc64le)
ARCHITECTURE := _x64
-endif
-ifeq ($(firstword $(filter powerpc64,$(UNAME))),powerpc64)
+else ifeq ($(firstword $(filter ppc64,$(UNAME))),ppc64)
ARCHITECTURE := _x64
-endif
-ifeq ($(firstword $(filter ppc64le,$(UNAME))),ppc64le)
+else ifeq ($(firstword $(filter powerpc64,$(UNAME))),powerpc64)
ARCHITECTURE := _x64
-endif
-ifeq ($(firstword $(filter s390x,$(UNAME))),s390x)
+else ifeq ($(firstword $(filter s390x,$(UNAME))),s390x)
ARCHITECTURE := _x64
endif
-endif
-else
+endif # windows
+
+else # TARGETOS
CROSS_BUILD := 1
-endif # TARGET_OS
+endif # TARGETOS
ifdef PTR64
ifeq ($(PTR64),1)
@@ -372,21 +354,25 @@ endif
endif
ifeq ($(OS),windows)
+
ifndef MINGW64
ARCHITECTURE := _x86
-endif
-ifeq ($(ARCHITECTURE),_x64)
-WINDRES := $(MINGW64)/bin/windres
-else
+endif # MINGW64
+ifeq ($(ARCHITECTURE),_x86)
WINDRES := $(MINGW32)/bin/windres
-endif
-else
-ifeq ($(ARCHITECTURE),_x64)
-WINDRES := $(word 1,$(TOOLCHAIN) x86_64-w64-mingw32-)windres
-else
+else # ARCHITECTURE
+WINDRES := $(MINGW64)/bin/windres
+endif # ARCHITECTURE
+
+else # windows
+
+ifeq ($(ARCHITECTURE),_x86)
WINDRES := $(word 1,$(TOOLCHAIN) i686-w64-mingw32-)windres
-endif
-endif
+else # ARCHITECTURE
+WINDRES := $(word 1,$(TOOLCHAIN) x86_64-w64-mingw32-)windres
+endif # ARCHITECTURE
+
+endif # windows
# Emscripten
ifeq ($(findstring emcc,$(CC)),emcc)
@@ -397,44 +383,10 @@ ifndef NOASM
endif
endif
-ifeq ($(findstring ppc,$(UNAME)),ppc)
-ifndef FORCE_DRC_C_BACKEND
- FORCE_DRC_C_BACKEND := 1
-endif
-endif
-
-ifeq ($(findstring powerpc,$(UNAME)),powerpc)
-ifndef FORCE_DRC_C_BACKEND
- FORCE_DRC_C_BACKEND := 1
-endif
-endif
-
-ifeq ($(findstring arm,$(UNAME)),arm)
-ARCHITECTURE :=
-ifneq ($(PLATFORM),arm64)
- ifndef FORCE_DRC_C_BACKEND
- FORCE_DRC_C_BACKEND := 1
- endif
-endif
-endif
-
ifeq ($(findstring aarch64,$(UNAME)),aarch64)
ARCHITECTURE :=
endif
-ifeq ($(findstring s390x,$(UNAME)),s390x)
-ifndef FORCE_DRC_C_BACKEND
- FORCE_DRC_C_BACKEND := 1
-endif
-endif
-
-ifeq ($(findstring riscv64,$(UNAME)),riscv64)
-ARCHITECTURE :=
-ifndef FORCE_DRC_C_BACKEND
- FORCE_DRC_C_BACKEND := 1
-endif
-endif
-
# Autodetect BIGENDIAN
# MacOSX
ifndef BIGENDIAN
@@ -486,36 +438,23 @@ OSD := sdl
ifeq ($(TARGETOS),windows)
OSD := windows
-endif
-
-ifeq ($(TARGETOS),linux)
+else ifeq ($(TARGETOS),linux)
OSD := sdl
-endif
-
-ifeq ($(TARGETOS),freebsd)
+else ifeq ($(TARGETOS),freebsd)
OSD := sdl
-endif
-
-ifeq ($(TARGETOS),netbsd)
+else ifeq ($(TARGETOS),netbsd)
OSD := sdl
-endif
-
-ifeq ($(TARGETOS),openbsd)
+else ifeq ($(TARGETOS),openbsd)
OSD := sdl
-endif
-
-ifeq ($(TARGETOS),solaris)
+else ifeq ($(TARGETOS),solaris)
OSD := sdl
-endif
-
-ifeq ($(TARGETOS),macosx)
+else ifeq ($(TARGETOS),macosx)
OSD := sdl
-endif
-
-ifeq ($(TARGETOS),asmjs)
+else ifeq ($(TARGETOS),asmjs)
OSD := sdl
-endif
-endif
+endif # TARGETOS
+
+endif # OSD
#-------------------------------------------------
# which 3rdparty library to build;
@@ -577,21 +516,6 @@ ifdef USE_SYSTEM_LIB_PUGIXML
PARAMS += --with-system-pugixml='$(USE_SYSTEM_LIB_PUGIXML)'
endif
-#-------------------------------------------------
-# distribution may change things
-#-------------------------------------------------
-
-ifeq ($(DISTRO),)
-DISTRO := generic
-else
-ifeq ($(DISTRO),debian-stable)
-else
-$(error DISTRO $(DISTRO) unknown)
-endif
-endif
-
-PARAMS+= --distro=$(DISTRO)
-
ifdef TOOLCHAIN
PARAMS += --TOOLCHAIN='$(TOOLCHAIN)'
endif
@@ -1067,20 +991,18 @@ endif
ifeq ($(CLANG_VERSION),)
$(info GCC $(GCC_VERSION) detected)
-else
+else # CLANG_VERSION
$(info Clang $(CLANG_VERSION) detected)
ifneq ($(TARGETOS),asmjs)
ifeq ($(ARCHITECTURE),_x64)
ARCHITECTURE := _x64_clang
-else
-ifneq ($(filter arm64%,$(UNAME_M)),)
+else ifneq ($(filter arm64%,$(UNAME_M)),)
ARCHITECTURE := _arm64_clang
else
ARCHITECTURE := _x86_clang
endif
-endif
-endif
-endif
+endif # asmjs
+endif # CLANG_VERSION
ifneq ($(PYTHON_AVAILABLE),python)
$(error Python is not available in path)
@@ -1543,13 +1465,13 @@ openbsd_x86_clang: generate $(PROJECTDIR)/$(MAKETYPE)-openbsd-clang/Makefile
GENIE_SRC=$(wildcard 3rdparty/genie/src/host/*.c)
$(GENIE): $(GENIE_SRC)
- $(SILENT) $(MAKE) $(MAKEPARAMS) -C 3rdparty/genie/build/gmake.$(GENIEOS) -f genie.make MPARAM=$(MPARAM)
+ $(SILENT) $(MAKE) $(MAKEPARAMS) -C 3rdparty/genie/build/gmake.$(GENIEOS) -f genie.make
3rdparty/genie/src/hosts/%.c:
.PHONY: genieclean
genieclean:
- $(SILENT) $(MAKE) $(MAKEPARAMS) -C 3rdparty/genie/build/gmake.$(GENIEOS) -f genie.make MPARAM=$(MPARAM) clean
+ $(SILENT) $(MAKE) $(MAKEPARAMS) -C 3rdparty/genie/build/gmake.$(GENIEOS) -f genie.make clean
clean: genieclean
@echo Cleaning...
@@ -1709,7 +1631,6 @@ CPPCHECK_PARAMS += -DLSB_FIRST
ifndef USE_SYSTEM_LIB_FLAC
CPPCHECK_PARAMS += -DFLAC__NO_DLL
endif
-CPPCHECK_PARAMS += -DNATIVE_DRC=drcbe_x64
CPPCHECK_PARAMS += -DLUA_COMPAT_APIINTCASTS
CPPCHECK_PARAMS += -DWIN32
CPPCHECK_PARAMS += -D__GNUC__
diff --git a/scripts/genie.lua b/scripts/genie.lua
index fab53dafec1..9f6bcb3ce8e 100644
--- a/scripts/genie.lua
+++ b/scripts/genie.lua
@@ -158,16 +158,6 @@ newoption {
}
newoption {
- trigger = "distro",
- description = "Choose distribution",
- allowed = {
- { "generic", "generic" },
- { "debian-stable", "debian-stable" },
- { "ubuntu-intrepid", "ubuntu-intrepid" },
- },
-}
-
-newoption {
trigger = "target",
description = "Building target",
}
@@ -694,32 +684,18 @@ else
}
end
-if _OPTIONS["NOASM"]=="1" then
+if _OPTIONS["NOASM"] == "1" then
defines {
"MAME_NOASM"
}
end
-if not _OPTIONS["FORCE_DRC_C_BACKEND"] then
- if _OPTIONS["BIGENDIAN"]~="1" then
- if (_OPTIONS["PLATFORM"]=="arm64") then
- configuration { }
- defines {
- "NATIVE_DRC=drcbe_arm64",
- }
- else
- configuration { "x64" }
- defines {
- "NATIVE_DRC=drcbe_x64",
- }
- configuration { "x32" }
- defines {
- "NATIVE_DRC=drcbe_x86",
- }
- configuration { }
- end
- end
-
+if _OPTIONS["FORCE_DRC_C_BACKEND"] then
+ configuration { }
+ defines {
+ "NATIVE_DRC=drcbe_c",
+ }
+elseif (_OPTIONS["PLATFORM"] == "x86") or (_OPTIONS["PLATFORM"] == "arm64") then
configuration { }
defines {
"ASMJIT_STATIC",
@@ -1228,12 +1204,6 @@ configuration { "linux-*" }
flags {
"LinkSupportCircularDependencies",
}
- if _OPTIONS["distro"]=="debian-stable" then
- defines
- {
- "NO_AFFINITY_NP",
- }
- end
configuration { "freebsd or netbsd" }
diff --git a/scripts/src/3rdparty.lua b/scripts/src/3rdparty.lua
index 3ea340dbd9e..c391cea657e 100755
--- a/scripts/src/3rdparty.lua
+++ b/scripts/src/3rdparty.lua
@@ -1602,14 +1602,6 @@ end
end
end
- if _OPTIONS["targetos"]=="macosx" and _OPTIONS["gcc"]~=nil then
- if string.find(_OPTIONS["gcc"], "clang") and (version < 80000) then
- defines {
- "TARGET_OS_OSX=1",
- }
- end
- end
-
files {
MAME_DIR .. "3rdparty/bgfx/src/bgfx.cpp",
MAME_DIR .. "3rdparty/bgfx/src/debug_renderdoc.cpp",
@@ -1954,7 +1946,7 @@ project "ymfm"
-- asmjit library
--------------------------------------------------
-if not _OPTIONS["FORCE_DRC_C_BACKEND"] then
+if (not _OPTIONS["FORCE_DRC_C_BACKEND"]) and ((_OPTIONS["PLATFORM"] == "x86") or (_OPTIONS["PLATFORM"] == "arm64")) then
project "asmjit"
uuid "4539757c-6e99-4bae-b3d0-b342a7c49539"
kind "StaticLib"
@@ -1971,14 +1963,6 @@ project "asmjit"
"ASMJIT_STATIC",
}
- if _OPTIONS["targetos"]=="macosx" and _OPTIONS["gcc"]~=nil then
- if string.find(_OPTIONS["gcc"], "clang") and (version < 80000) then
- defines {
- "TARGET_OS_OSX=1",
- }
- end
- end
-
files {
MAME_DIR .. "3rdparty/asmjit/src/asmjit/a64.h",
MAME_DIR .. "3rdparty/asmjit/src/asmjit/arm.h",
diff --git a/scripts/src/cpu.lua b/scripts/src/cpu.lua
index 37bee222d71..6e7a71ba0d5 100644
--- a/scripts/src/cpu.lua
+++ b/scripts/src/cpu.lua
@@ -41,7 +41,7 @@ if (CPU_INCLUDE_DRC) then
MAME_DIR .. "src/devices/cpu/x86log.h",
MAME_DIR .. "src/devices/cpu/drcumlsh.h",
}
- if not _OPTIONS["FORCE_DRC_C_BACKEND"] then
+ if (not _OPTIONS["FORCE_DRC_C_BACKEND"]) and ((_OPTIONS["PLATFORM"] == "x86") or (_OPTIONS["PLATFORM"] == "arm64")) then
files {
MAME_DIR .. "src/devices/cpu/drcbearm64.cpp",
MAME_DIR .. "src/devices/cpu/drcbearm64.h",
@@ -51,14 +51,6 @@ if (CPU_INCLUDE_DRC) then
MAME_DIR .. "src/devices/cpu/drcbex86.h",
}
end
-
- if _OPTIONS["targetos"]=="macosx" and _OPTIONS["gcc"]~=nil then
- if string.find(_OPTIONS["gcc"], "clang") and (str_to_version(_OPTIONS["gcc_version"]) < 80000) then
- defines {
- "TARGET_OS_OSX=1",
- }
- end
- end
end
--------------------------------------------------
diff --git a/scripts/src/machine.lua b/scripts/src/machine.lua
index f146574f715..9df64987200 100644
--- a/scripts/src/machine.lua
+++ b/scripts/src/machine.lua
@@ -2901,6 +2901,18 @@ end
---------------------------------------------------
--
+--@src/devices/machine/pseudovia.h,MACHINES["PSEUDOVIA"] = true
+---------------------------------------------------
+
+if (MACHINES["PSEUDOVIA"]~=null) then
+ files {
+ MAME_DIR .. "src/devices/machine/pseudovia.cpp",
+ MAME_DIR .. "src/devices/machine/pseudovia.h",
+ }
+end
+
+---------------------------------------------------
+--
--@src/devices/machine/psion_asic1.h,MACHINES["PSION_ASIC"] = true
--@src/devices/machine/psion_asic2.h,MACHINES["PSION_ASIC"] = true
--@src/devices/machine/psion_asic3.h,MACHINES["PSION_ASIC"] = true
diff --git a/scripts/toolchain.lua b/scripts/toolchain.lua
index 6ee4748b258..59e8bdb504a 100644
--- a/scripts/toolchain.lua
+++ b/scripts/toolchain.lua
@@ -141,11 +141,6 @@ function toolchain(_buildDir, _subDir)
end
if "linux-gcc" == _OPTIONS["gcc"] then
- -- Force gcc-4.2 on ubuntu-intrepid
- if _OPTIONS["distro"]=="ubuntu-intrepid" then
- premake.gcc.cc = "@gcc -V 4.2"
- premake.gcc.cxx = "@g++-4.2"
- end
premake.gcc.ar = "ar"
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-linux")
end
diff --git a/src/devices/bus/a2bus/mouse.cpp b/src/devices/bus/a2bus/mouse.cpp
index 87b9f2298ce..9d8d889386e 100644
--- a/src/devices/bus/a2bus/mouse.cpp
+++ b/src/devices/bus/a2bus/mouse.cpp
@@ -97,22 +97,20 @@ public:
// construction/destruction
a2bus_mouse_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // optional information overrides
- virtual const tiny_rom_entry *device_rom_region() const override ATTR_COLD;
- virtual ioport_constructor device_input_ports() const override ATTR_COLD;
-
protected:
a2bus_mouse_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
+ virtual const tiny_rom_entry *device_rom_region() const override ATTR_COLD;
virtual void device_add_mconfig(machine_config &config) override ATTR_COLD;
+ virtual ioport_constructor device_input_ports() const override ATTR_COLD;
virtual void device_start() override ATTR_COLD;
- virtual void device_reset() override ATTR_COLD;
// overrides of standard a2bus slot functions
virtual uint8_t read_c0nx(uint8_t offset) override;
virtual void write_c0nx(uint8_t offset, uint8_t data) override;
virtual uint8_t read_cnxx(uint8_t offset) override;
+private:
void pia_out_a(uint8_t data);
void pia_out_b(uint8_t data);
void pia_irqa_w(int state);
@@ -124,18 +122,21 @@ protected:
void mcu_port_b_w(uint8_t data);
void mcu_port_c_w(uint8_t data);
+ template <unsigned AXIS, u8 DIR, u8 CLK> void update_axis();
+ void set_port_a_out(int32_t param);
+ void set_port_a_in(int32_t param);
+ void set_port_c_in(int32_t param);
+
required_device<pia6821_device> m_pia;
required_device<m68705p_device> m_mcu;
required_ioport m_mouseb;
required_ioport_array<2> m_mousexy;
-private:
- template <unsigned AXIS, u8 DIR, u8 CLK> void update_axis();
-
required_region_ptr<uint8_t> m_rom;
- int m_rom_bank;
+
+ uint16_t m_rom_bank;
uint8_t m_port_a_in, m_port_b_in;
- int m_last[2], m_count[2];
+ int16_t m_last[2], m_count[2];
};
@@ -236,16 +237,16 @@ a2bus_mouse_device::a2bus_mouse_device(const machine_config &mconfig, const char
void a2bus_mouse_device::device_start()
{
+ m_last[0] = m_last[1] = m_count[0] = m_count[1] = 0;
+
// register save state variables
+ save_item(NAME(m_rom_bank));
save_item(NAME(m_port_a_in));
save_item(NAME(m_port_b_in));
save_item(NAME(m_last));
save_item(NAME(m_count));
-}
-void a2bus_mouse_device::device_reset()
-{
- m_last[0] = m_last[1] = m_count[0] = m_count[1] = 0;
+ m_pia->cb1_w(1); // tied high via 10k resistor
}
/*-------------------------------------------------
@@ -272,19 +273,23 @@ void a2bus_mouse_device::write_c0nx(uint8_t offset, uint8_t data)
uint8_t a2bus_mouse_device::read_cnxx(uint8_t offset)
{
- return m_rom[offset+m_rom_bank];
+ return m_rom[offset | m_rom_bank];
}
void a2bus_mouse_device::pia_out_a(uint8_t data)
{
- m_port_a_in = data;
+ machine().scheduler().synchronize(
+ timer_expired_delegate(FUNC(a2bus_mouse_device::set_port_a_in), this),
+ int32_t(uint32_t(data)));
}
void a2bus_mouse_device::pia_out_b(uint8_t data)
{
- m_mcu->pc_w(data >> 4);
+ machine().scheduler().synchronize(
+ timer_expired_delegate(FUNC(a2bus_mouse_device::set_port_c_in), this),
+ int32_t(uint32_t(data >> 4)));
- m_rom_bank = (data & 0xe) << 7;
+ m_rom_bank = uint16_t(data & 0xe) << 7;
}
void a2bus_mouse_device::pia_irqa_w(int state)
@@ -302,7 +307,9 @@ uint8_t a2bus_mouse_device::mcu_port_a_r()
void a2bus_mouse_device::mcu_port_a_w(uint8_t data)
{
- m_pia->set_a_input(data);
+ machine().scheduler().synchronize(
+ timer_expired_delegate(FUNC(a2bus_mouse_device::set_port_a_out), this),
+ int32_t(uint32_t(data)));
}
uint8_t a2bus_mouse_device::mcu_port_b_r()
@@ -348,7 +355,8 @@ void a2bus_mouse_device::mcu_port_c_w(uint8_t data)
m_pia->portb_w(data << 4);
}
-template <unsigned AXIS, u8 DIR, u8 CLK> void a2bus_mouse_device::update_axis()
+template <unsigned AXIS, u8 DIR, u8 CLK>
+void a2bus_mouse_device::update_axis()
{
// read the axis and check for changes
const int new_m = m_mousexy[AXIS]->read();
@@ -379,8 +387,24 @@ template <unsigned AXIS, u8 DIR, u8 CLK> void a2bus_mouse_device::update_axis()
}
}
+void a2bus_mouse_device::set_port_a_out(int32_t param)
+{
+ m_pia->set_a_input(uint8_t(uint32_t(param)));
+}
+
+void a2bus_mouse_device::set_port_a_in(int32_t param)
+{
+ m_port_a_in = uint8_t(uint32_t(param));
+}
+
+void a2bus_mouse_device::set_port_c_in(int32_t param)
+{
+ const uint8_t data = uint8_t(uint32_t(param));
+ m_mcu->pc_w(data);
}
+} // anonymous namespace
+
/***************************************************************************
GLOBAL VARIABLES
diff --git a/src/devices/cpu/drcuml.cpp b/src/devices/cpu/drcuml.cpp
index 9a345f8e41a..a0ccfa7b349 100644
--- a/src/devices/cpu/drcuml.cpp
+++ b/src/devices/cpu/drcuml.cpp
@@ -34,15 +34,12 @@
#include "emu.h"
#include "drcuml.h"
-#include "emuopts.h"
+#include "drcbearm64.h"
#include "drcbec.h"
-#ifdef NATIVE_DRC
-#ifndef ASMJIT_NO_X86
-#include "drcbex86.h"
#include "drcbex64.h"
-#endif
-#include "drcbearm64.h"
-#endif
+#include "drcbex86.h"
+
+#include "emuopts.h"
#include <fstream>
@@ -62,8 +59,17 @@
// determine the type of the native DRC, falling back to C
#ifndef NATIVE_DRC
+#if !defined(MAME_NOASM) && (defined(__x86_64__) || defined(_M_X64))
+#define NATIVE_DRC drcbe_x64
+#elif !defined(MAME_NOASM) && (defined(__i386__) || defined(_M_IX86))
+#define NATIVE_DRC drcbe_x86
+#elif !defined(MAME_NOASM) && (defined(__aarch64__) || defined(_M_ARM64))
+#define NATIVE_DRC drcbe_arm64
+#else
#define NATIVE_DRC drcbe_c
#endif
+#endif
+
#define MAKE_DRCBE_IMPL(name) make_##name
#define MAKE_DRCBE(name) MAKE_DRCBE_IMPL(name)
#define make_drcbe_native MAKE_DRCBE(NATIVE_DRC)
diff --git a/src/mame/apple/pseudovia.cpp b/src/devices/machine/pseudovia.cpp
index 4474efb01ff..4474efb01ff 100644
--- a/src/mame/apple/pseudovia.cpp
+++ b/src/devices/machine/pseudovia.cpp
diff --git a/src/mame/apple/pseudovia.h b/src/devices/machine/pseudovia.h
index 31154def859..641077aa800 100644
--- a/src/mame/apple/pseudovia.h
+++ b/src/devices/machine/pseudovia.h
@@ -1,8 +1,8 @@
// license:BSD-3-Clause
// copyright-holders:R. Belmont
-#ifndef MAME_APPLE_PSEUDOVIA_H
-#define MAME_APPLE_PSEUDOVIA_H
+#ifndef MAME_MACHINE_PSEUDOVIA_H
+#define MAME_MACHINE_PSEUDOVIA_H
#pragma once
@@ -51,4 +51,4 @@ private:
// device type definition
DECLARE_DEVICE_TYPE(APPLE_PSEUDOVIA, pseudovia_device)
-#endif // MAME_APPLE_PSEUDOVIA_H
+#endif // MAME_MACHINE_PSEUDOVIA_H
diff --git a/src/emu/debug/debugcmd.cpp b/src/emu/debug/debugcmd.cpp
index a8c74f471d1..0b7efa44a93 100644
--- a/src/emu/debug/debugcmd.cpp
+++ b/src/emu/debug/debugcmd.cpp
@@ -3517,16 +3517,16 @@ void debugger_commands::execute_trace(const std::vector<std::string_view> &param
using namespace std::literals;
if (!util::streqlower(filename, "off"sv))
{
- std::ios_base::openmode mode = std::ios_base::out;
+ std::ios_base::openmode mode;
// opening for append?
if ((filename[0] == '>') && (filename[1] == '>'))
{
- mode |= std::ios_base::ate;
+ mode = std::ios_base::in | std::ios_base::out | std::ios_base::ate;
filename = filename.substr(2);
}
else
- mode |= std::ios_base::trunc;
+ mode = std::ios_base::out | std::ios_base::trunc;
f = std::make_unique<std::ofstream>(filename.c_str(), mode);
if (f->fail())
diff --git a/src/mame/apple/macpwrbk030.cpp b/src/mame/apple/macpwrbk030.cpp
index 258261ee79c..1c387b29e74 100644
--- a/src/mame/apple/macpwrbk030.cpp
+++ b/src/mame/apple/macpwrbk030.cpp
@@ -131,7 +131,6 @@
#include "macrtc.h"
#include "macscsi.h"
#include "mactoolbox.h"
-#include "pseudovia.h"
#include "bus/nscsi/cd.h"
#include "bus/nscsi/devices.h"
@@ -145,6 +144,7 @@
#include "machine/z80scc.h"
#include "machine/ncr5380.h"
#include "machine/nscsi_bus.h"
+#include "machine/pseudovia.h"
#include "bus/nscsi/devices.h"
#include "sound/asc.h"
#include "video/wd90c26.h"
diff --git a/src/mame/apple/msc.h b/src/mame/apple/msc.h
index 1b51a4cc11a..d28d84aeeb4 100644
--- a/src/mame/apple/msc.h
+++ b/src/mame/apple/msc.h
@@ -6,9 +6,8 @@
#pragma once
-#include "pseudovia.h"
-
#include "machine/6522via.h"
+#include "machine/pseudovia.h"
#include "sound/asc.h"
#include "speaker.h"
diff --git a/src/mame/apple/rbv.h b/src/mame/apple/rbv.h
index 94f5c762ade..da303a3f211 100644
--- a/src/mame/apple/rbv.h
+++ b/src/mame/apple/rbv.h
@@ -6,7 +6,7 @@
#pragma once
-#include "pseudovia.h"
+#include "machine/pseudovia.h"
#include "screen.h"
diff --git a/src/mame/apple/sonora.h b/src/mame/apple/sonora.h
index b6ee52517cd..3634a666f02 100644
--- a/src/mame/apple/sonora.h
+++ b/src/mame/apple/sonora.h
@@ -6,11 +6,10 @@
#pragma once
-#include "pseudovia.h"
-
#include "machine/6522via.h"
#include "machine/applefdintf.h"
#include "machine/mv_sonora.h"
+#include "machine/pseudovia.h"
#include "machine/swim2.h"
#include "sound/asc.h"
#include "speaker.h"
diff --git a/src/mame/apple/v8.h b/src/mame/apple/v8.h
index 153b1246b29..24289c3bbce 100644
--- a/src/mame/apple/v8.h
+++ b/src/mame/apple/v8.h
@@ -6,10 +6,9 @@
#pragma once
-#include "pseudovia.h"
-
#include "machine/6522via.h"
#include "machine/applefdintf.h"
+#include "machine/pseudovia.h"
#include "machine/swim2.h"
#include "sound/asc.h"
#include "emupal.h"
diff --git a/src/mame/apple/vasp.h b/src/mame/apple/vasp.h
index 5341af968cf..c5c7727ebe4 100644
--- a/src/mame/apple/vasp.h
+++ b/src/mame/apple/vasp.h
@@ -6,10 +6,10 @@
#pragma once
-#include "pseudovia.h"
-
#include "machine/6522via.h"
+#include "machine/pseudovia.h"
#include "sound/asc.h"
+
#include "emupal.h"
#include "speaker.h"
#include "screen.h"
diff --git a/src/mame/mame.lst b/src/mame/mame.lst
index b34ce0807c8..6ad892c3423 100644
--- a/src/mame/mame.lst
+++ b/src/mame/mame.lst
@@ -34173,8 +34173,6 @@ pc9821nw150
pc9821ra20
pc9821ra266
pc9821ra333
-pc9821v13
-pc9821v20
pc9821xa16
pc9821xs
diff --git a/src/mame/nec/pc9801.cpp b/src/mame/nec/pc9801.cpp
index 309d9d68b7f..f9004b9a3fe 100644
--- a/src/mame/nec/pc9801.cpp
+++ b/src/mame/nec/pc9801.cpp
@@ -85,6 +85,7 @@
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
1990s, they run MS Windows as OS)
+ TODO: move this table in a markdown, upgrade
Models:
@@ -334,18 +335,6 @@ Ext Video F/F (i/o 0x6a):
1100 010x chart GDC operating mode (?)
(everything else is undocumented / unknown)
-Keyboard TX commands:
-0xfa ACK
-0xfc NACK
-0x95
----- --xx extension key settings (00 normal 11 Win and App Keys enabled)
-0x96 identification codes
-0x9c
--xx- ---- key delay (11 = 1000 ms, 10 = 500 ms, 01 = 500 ms, 00 = 250 ms)
----x xxxx repeat rate (slow 11111 -> 00001 fast)
-0x9d keyboard LED settings
-0x9f keyboard ID
-
**************************************************************************************************/
#include "emu.h"
diff --git a/src/mame/nec/pc9821.cpp b/src/mame/nec/pc9821.cpp
index dbc21369d18..1915dac53d7 100644
--- a/src/mame/nec/pc9821.cpp
+++ b/src/mame/nec/pc9821.cpp
@@ -900,37 +900,6 @@ void pc9821_mate_x_state::pc9821xa16(machine_config &config)
m_maincpu->set_irq_acknowledge_callback("pic8259_master", FUNC(pic8259_device::inta_cb));
}
-void pc9821_valuestar_state::pc9821v13(machine_config &config)
-{
- pc9821(config);
- const double xtal = 133000000;
- PENTIUM(config.replace(), m_maincpu, xtal); // Pentium Pro, 256kB cache RAM
- m_maincpu->set_addrmap(AS_PROGRAM, &pc9821_valuestar_state::pc9821_map);
- m_maincpu->set_addrmap(AS_IO, &pc9821_valuestar_state::pc9821_io);
- m_maincpu->set_irq_acknowledge_callback("pic8259_master", FUNC(pic8259_device::inta_cb));
-
- // VLSI Supercore594 (Wildcat) / Intel 430FX (Triton) PCI 2.0
- // PCI slot x 1
- // GD5440
- // built-in 3.5 floppy x 1
- // file bay with built-in CD-Rom (4x, 6x, 8x depending on sub-model type)
- // HDD with pre-installed software (850MB, 1.2GB, 1.6GB)
- // minimum RAM: 16MB
- // maximum RAM: 128MB
- // C-Bus x 2
- // PC-9801-120 pre-installed (fax/modem 28'000 bps) or PC-9801-121 (ISDN)
-}
-
-void pc9821_valuestar_state::pc9821v20(machine_config &config)
-{
- pc9821(config);
- const double xtal = 200000000;
- PENTIUM(config.replace(), m_maincpu, xtal); // Pentium Pro
- m_maincpu->set_addrmap(AS_PROGRAM, &pc9821_valuestar_state::pc9821_map);
- m_maincpu->set_addrmap(AS_IO, &pc9821_valuestar_state::pc9821_io);
- m_maincpu->set_irq_acknowledge_callback("pic8259_master", FUNC(pic8259_device::inta_cb));
-}
-
void pc9821_mate_r_state::pc9821ra20(machine_config &config)
{
pc9821(config);
@@ -1377,43 +1346,23 @@ ROM_END
/*
98MATE VALUESTAR - Pentium based
-*/
-
-ROM_START( pc9821v13 )
- ROM_REGION16_LE( 0x30000, "ipl", ROMREGION_ERASEFF )
- // "ROM SUM ERROR"
- ROM_LOAD( "itf.rom", 0x10000, 0x08000, BAD_DUMP CRC(dd4c7bb8) SHA1(cf3aa193df2722899066246bccbed03f2e79a74a) )
-// ROM_LOAD( "itf_v20.rom", 0x10000, 0x08000, BAD_DUMP CRC(10e52302) SHA1(f95b8648e3f5a23e507a9fbda8ab2e317d8e5151) )
- ROM_LOAD( "bios_v13.rom", 0x18000, 0x18000, BAD_DUMP CRC(0a682b93) SHA1(76a7360502fa0296ea93b4c537174610a834d367) )
-
- ROM_REGION( 0x80000, "chargen", 0 )
- ROM_LOAD( "font_v13.rom", 0x00000, 0x46800, BAD_DUMP CRC(c9a77d8f) SHA1(deb8563712eb2a634a157289838b95098ba0c7f2) )
- LOAD_KANJI_ROMS
- LOAD_IDE_ROM
-
- // TODO: factory HDDs
-ROM_END
-
-/*
-98MATE VALUESTAR - Pentium based
+Both bad dumps, requires separate PCI-based driver anyway.
*/
-ROM_START( pc9821v20 )
- ROM_REGION16_LE( 0x30000, "ipl", ROMREGION_ERASEFF )
- // Doesn't boot, not an ITF ROM!
- ROM_LOAD( "itf.rom", 0x10000, 0x08000, BAD_DUMP CRC(dd4c7bb8) SHA1(cf3aa193df2722899066246bccbed03f2e79a74a) )
-// ROM_LOAD( "itf_v20.rom", 0x10000, 0x08000, CRC(10e52302) SHA1(f95b8648e3f5a23e507a9fbda8ab2e317d8e5151) )
- ROM_LOAD( "bios_v20.rom", 0x18000, 0x18000, BAD_DUMP CRC(d5d1f13b) SHA1(bf44b5f4e138e036f1b848d6616fbd41b5549764) )
-
- ROM_REGION( 0x80000, "chargen", 0 )
- ROM_LOAD( "font_v20.rom", 0x00000, 0x046800, BAD_DUMP CRC(6244c4c0) SHA1(9513cac321e89b4edb067b30e9ecb1adae7e7be7) )
+//ROM_START( pc9821v13 )
+// "ROM SUM ERROR"
+// ROM_LOAD( "itf.rom", 0x10000, 0x08000, BAD_DUMP CRC(dd4c7bb8) SHA1(cf3aa193df2722899066246bccbed03f2e79a74a) )
+// ROM_LOAD( "bios_v13.rom", 0x18000, 0x18000, BAD_DUMP CRC(0a682b93) SHA1(76a7360502fa0296ea93b4c537174610a834d367) )
- LOAD_KANJI_ROMS
- LOAD_IDE_ROM
+//ROM_START( pc9821v20 )
+// ROM_REGION16_LE( 0x30000, "ipl", ROMREGION_ERASEFF )
+// "ROM SUM ERROR"
+// ROM_LOAD( "itf.rom", 0x10000, 0x08000, BAD_DUMP CRC(dd4c7bb8) SHA1(cf3aa193df2722899066246bccbed03f2e79a74a) )
+// Not an ITF ROM
+// ROM_LOAD( "itf_v20.rom", 0x10000, 0x08000, CRC(10e52302) SHA1(f95b8648e3f5a23e507a9fbda8ab2e317d8e5151) )
+// ROM_LOAD( "bios_v20.rom", 0x18000, 0x18000, BAD_DUMP CRC(d5d1f13b) SHA1(bf44b5f4e138e036f1b848d6616fbd41b5549764) )
- // TODO: factory HDDs
-ROM_END
/*
PC-9821Nr15
@@ -1534,8 +1483,8 @@ COMP( 1994, pc9821xs, 0, 0, pc9821xs, pc9821, pc9821_mate_x_s
COMP( 1996, pc9821xa16, pc9821xs, 0, pc9821xa16, pc9821, pc9821_mate_x_state, init_pc9801_kanji, "NEC", "PC-9821Xa16 (98MATE X)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND )
// 98MATE VALUESTAR (Pentium, comes with Windows 95 and several programs pre-installed)
-COMP( 1998, pc9821v13, 0, 0, pc9821v13, pc9821, pc9821_valuestar_state, init_pc9801_kanji, "NEC", "PC-9821V13 (98MATE VALUESTAR)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND )
-COMP( 1998, pc9821v20, pc9821v13, 0, pc9821v20, pc9821, pc9821_valuestar_state, init_pc9801_kanji, "NEC", "PC-9821V20 (98MATE VALUESTAR)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND )
+//COMP( 1998, pc9821v13, 0, 0, pc9821v13, pc9821, pc9821_valuestar_state, init_pc9801_kanji, "NEC", "PC-9821V13 (98MATE VALUESTAR)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND )
+//COMP( 1998, pc9821v20, pc9821v13, 0, pc9821v20, pc9821, pc9821_valuestar_state, init_pc9801_kanji, "NEC", "PC-9821V20 (98MATE VALUESTAR)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND )
// 98MATE R (Pentium Pro, otherwise same as 98MATE X?)
COMP( 1996, pc9821ra20, 0, 0, pc9821ra20, pc9821, pc9821_mate_r_state, init_pc9801_kanji, "NEC", "PC-9821Ra20 (98MATE R)", MACHINE_NOT_WORKING | MACHINE_IMPERFECT_SOUND )
diff --git a/src/mame/nec/pc9821.h b/src/mame/nec/pc9821.h
index 18291390a12..88e9a8cc22d 100644
--- a/src/mame/nec/pc9821.h
+++ b/src/mame/nec/pc9821.h
@@ -170,17 +170,21 @@ public:
void pc9821ra333(machine_config &config);
};
-class pc9821_valuestar_state : public pc9821_mate_x_state
-{
-public:
- pc9821_valuestar_state(const machine_config &mconfig, device_type type, const char *tag)
- : pc9821_mate_x_state(mconfig, type, tag)
- {
- }
-
- void pc9821v13(machine_config &config);
- void pc9821v20(machine_config &config);
-};
+// VLSI Supercore594 (Wildcat) or Intel 430FX (Triton) PCI 2.0
+// V166 / V200 / V233 uses an Intel 430VX PCI 2.1
+// https://www.pc-9800.net/db_98/data/pc-9821v13.htm
+// https://www.pc-9800.net/db_98/data/pc-9821v20.htm
+//class pc9821_valuestar_state : public pc9821_mate_x_state
+//{
+//public:
+// pc9821_valuestar_state(const machine_config &mconfig, device_type type, const char *tag)
+// : pc9821_mate_x_state(mconfig, type, tag)
+// {
+// }
+//
+// void pc9821v13(machine_config &config);
+// void pc9821v20(machine_config &config);
+//};
// 9821NOTE
diff --git a/src/mame/nec/pc98_kbd.cpp b/src/mame/nec/pc98_kbd.cpp
index 36b0ef7b35f..237100283cb 100644
--- a/src/mame/nec/pc98_kbd.cpp
+++ b/src/mame/nec/pc98_kbd.cpp
@@ -22,6 +22,20 @@ TODO:
STOP is correct, verified with branmar2
- Problems with natural keyboard (most nonprinting keys don't work);
+===================================================================================================
+
+Keyboard TX commands:
+0xfa ACK
+0xfc NACK
+0x95
+---- --xx extension key settings (00 normal 11 Win and App Keys enabled)
+0x96 identification codes
+0x9c
+-xx- ---- key delay (11 = 1000 ms, 10 = 500 ms, 01 = 500 ms, 00 = 250 ms)
+---x xxxx repeat rate (slow 11111 -> 00001 fast)
+0x9d keyboard LED settings
+0x9f keyboard ID
+
**************************************************************************************************/
#include "emu.h"
diff --git a/src/mame/pinball/zac_2.cpp b/src/mame/pinball/zac_2.cpp
index 0d4613de088..4bd11b93d35 100644
--- a/src/mame/pinball/zac_2.cpp
+++ b/src/mame/pinball/zac_2.cpp
@@ -1020,7 +1020,7 @@ ROM_START(socrkingb)
ROM_REGION(0x8000, "maincpu", 0)
ROM_LOAD ( "sk-02-1.bin", 0x0000, 0x0800, CRC(9c0802f0) SHA1(81f65920576f686a489529975e583aa8b82eca26))
ROM_CONTINUE(0x2000, 0x0800)
- ROM_LOAD ( "sk-02-1.bin", 0x0800, 0x0800, CRC(23a6bb94) SHA1(55d042c6ccd56fbccf6c0e7e240b92e8f065368b))
+ ROM_LOAD ( "sk-02-2.bin", 0x0800, 0x0800, CRC(23a6bb94) SHA1(55d042c6ccd56fbccf6c0e7e240b92e8f065368b))
ROM_CONTINUE(0x2800, 0x0800)
ROM_LOAD ( "sk-al-3.bin", 0x1000, 0x0800, CRC(f22a79d9) SHA1(6156d37e5693c617ba48bd9f22a8d415df790b12))
ROM_CONTINUE(0x3000, 0x0800)